From 73be968e07873f50d852a5fcbfa5d99d0e7e5492 Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Mon, 22 Jul 2024 09:17:04 -0400 Subject: [PATCH] fix(custom-element): ensure all cwc components use carbonElement --- .../src/components/chat-button/chat-button.ts | 3 ++- .../src/components/copy-button/copy-button.ts | 5 +++-- packages/carbon-web-components/src/components/copy/copy.ts | 5 +++-- .../src/components/data-table/table-skeleton.ts | 5 +++-- .../src/components/file-uploader/demo-file-uploader.ts | 5 +++-- .../src/components/file-uploader/file-uploader-button.ts | 5 +++-- .../src/components/form-group/form-group.ts | 5 +++-- .../src/components/icon-button/icon-button.ts | 3 ++- packages/carbon-web-components/src/components/layer/layer.ts | 5 +++-- .../src/components/notification/actionable-notification.ts | 5 +++-- .../src/components/popover/popover-content.ts | 3 ++- .../carbon-web-components/src/components/popover/popover.ts | 3 ++- .../src/components/progress-bar/progress-bar.ts | 5 +++-- .../src/components/select/select-skeleton.ts | 5 +++-- packages/carbon-web-components/src/components/stack/stack.ts | 5 +++-- .../src/components/text-input/text-input-skeleton.ts | 5 +++-- .../src/components/text-input/text-input.ts | 3 ++- .../src/components/toggle-tip/toggletip.ts | 3 ++- .../src/components/ui-shell/header-global-action.ts | 5 +++-- .../src/components/ui-shell/header-panel.ts | 5 +++-- .../src/components/ui-shell/header-side-nav-items.ts | 5 +++-- .../src/components/ui-shell/switcher-item.ts | 5 +++-- .../src/components/ui-shell/switcher.ts | 5 +++-- 23 files changed, 63 insertions(+), 40 deletions(-) diff --git a/packages/carbon-web-components/src/components/chat-button/chat-button.ts b/packages/carbon-web-components/src/components/chat-button/chat-button.ts index cf2f7c7dce6..f216eecab5b 100644 --- a/packages/carbon-web-components/src/components/chat-button/chat-button.ts +++ b/packages/carbon-web-components/src/components/chat-button/chat-button.ts @@ -8,8 +8,9 @@ */ import { html, LitElement } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; import { prefix } from '../../globals/settings'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import '../button/button'; import { CHAT_BUTTON_SIZE, CHAT_BUTTON_KIND } from './defs'; import styles from './chat-button.scss'; diff --git a/packages/carbon-web-components/src/components/copy-button/copy-button.ts b/packages/carbon-web-components/src/components/copy-button/copy-button.ts index 29ece784bc2..b95398a6b53 100644 --- a/packages/carbon-web-components/src/components/copy-button/copy-button.ts +++ b/packages/carbon-web-components/src/components/copy-button/copy-button.ts @@ -1,15 +1,16 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; import Copy16 from '@carbon/icons/lib/copy/16'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import FocusMixin from '../../globals/mixins/focus'; import styles from './copy-button.scss'; diff --git a/packages/carbon-web-components/src/components/copy/copy.ts b/packages/carbon-web-components/src/components/copy/copy.ts index bf47bfe566b..e16571f76ed 100644 --- a/packages/carbon-web-components/src/components/copy/copy.ts +++ b/packages/carbon-web-components/src/components/copy/copy.ts @@ -1,17 +1,18 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; import { prefix } from '../../globals/settings'; import styles from '../copy-button/copy-button.scss'; import CDSIconButton from '../icon-button/icon-button'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; /** * Copy. diff --git a/packages/carbon-web-components/src/components/data-table/table-skeleton.ts b/packages/carbon-web-components/src/components/data-table/table-skeleton.ts index ea791a75d93..e009a00222d 100644 --- a/packages/carbon-web-components/src/components/data-table/table-skeleton.ts +++ b/packages/carbon-web-components/src/components/data-table/table-skeleton.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -9,7 +9,8 @@ import { classMap } from 'lit/directives/class-map.js'; import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './data-table.scss'; diff --git a/packages/carbon-web-components/src/components/file-uploader/demo-file-uploader.ts b/packages/carbon-web-components/src/components/file-uploader/demo-file-uploader.ts index 6e1bec3b208..32402f0cb15 100644 --- a/packages/carbon-web-components/src/components/file-uploader/demo-file-uploader.ts +++ b/packages/carbon-web-components/src/components/file-uploader/demo-file-uploader.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { html, LitElement } from 'lit'; -import { customElement, property } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { delay } from 'bluebird'; import { prefix } from '../../globals/settings'; diff --git a/packages/carbon-web-components/src/components/file-uploader/file-uploader-button.ts b/packages/carbon-web-components/src/components/file-uploader/file-uploader-button.ts index ae0d86726b9..a97cccd7b1b 100644 --- a/packages/carbon-web-components/src/components/file-uploader/file-uploader-button.ts +++ b/packages/carbon-web-components/src/components/file-uploader/file-uploader-button.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2020, 2023 + * Copyright IBM Corp. 2020, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -9,7 +9,8 @@ import { classMap } from 'lit/directives/class-map.js'; import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import HostListenerMixin from '../../globals/mixins/host-listener'; import ifNonEmpty from '../../globals/directives/if-non-empty'; diff --git a/packages/carbon-web-components/src/components/form-group/form-group.ts b/packages/carbon-web-components/src/components/form-group/form-group.ts index 77ae1652974..8ebbad55857 100644 --- a/packages/carbon-web-components/src/components/form-group/form-group.ts +++ b/packages/carbon-web-components/src/components/form-group/form-group.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './form-group.scss'; diff --git a/packages/carbon-web-components/src/components/icon-button/icon-button.ts b/packages/carbon-web-components/src/components/icon-button/icon-button.ts index 2b5a2f54795..4c1e3bf7a3d 100644 --- a/packages/carbon-web-components/src/components/icon-button/icon-button.ts +++ b/packages/carbon-web-components/src/components/icon-button/icon-button.ts @@ -8,7 +8,8 @@ */ import { html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import '../tooltip/index'; import '../button/index'; diff --git a/packages/carbon-web-components/src/components/layer/layer.ts b/packages/carbon-web-components/src/components/layer/layer.ts index a929fda7ddc..f23f009dd10 100644 --- a/packages/carbon-web-components/src/components/layer/layer.ts +++ b/packages/carbon-web-components/src/components/layer/layer.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './layer.scss'; diff --git a/packages/carbon-web-components/src/components/notification/actionable-notification.ts b/packages/carbon-web-components/src/components/notification/actionable-notification.ts index ad38f1b3900..7dbe3b8d3a0 100644 --- a/packages/carbon-web-components/src/components/notification/actionable-notification.ts +++ b/packages/carbon-web-components/src/components/notification/actionable-notification.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -13,8 +13,9 @@ import InformationSquareFilled20 from '@carbon/icons/lib/information--square--fi import WarningFilled20 from '@carbon/icons/lib/warning--filled/20'; import WarningAltFilled20 from '@carbon/icons/lib/warning--alt--filled/20'; import { html, svg } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; import { prefix } from '../../globals/settings'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { NOTIFICATION_TYPE, NOTIFICATION_KIND } from './defs'; import CDSInlineNotification from './inline-notification'; import styles from './actionable-notification.scss'; diff --git a/packages/carbon-web-components/src/components/popover/popover-content.ts b/packages/carbon-web-components/src/components/popover/popover-content.ts index f4676c041ed..d43e4769ce9 100644 --- a/packages/carbon-web-components/src/components/popover/popover-content.ts +++ b/packages/carbon-web-components/src/components/popover/popover-content.ts @@ -8,7 +8,8 @@ */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './popover.scss'; diff --git a/packages/carbon-web-components/src/components/popover/popover.ts b/packages/carbon-web-components/src/components/popover/popover.ts index c4a9011423c..80d55476577 100644 --- a/packages/carbon-web-components/src/components/popover/popover.ts +++ b/packages/carbon-web-components/src/components/popover/popover.ts @@ -9,7 +9,8 @@ import { classMap } from 'lit/directives/class-map.js'; import { LitElement, html } from 'lit'; -import { property, customElement, query } from 'lit/decorators.js'; +import { property, query } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './popover.scss'; import CDSPopoverContent from './popover-content'; diff --git a/packages/carbon-web-components/src/components/progress-bar/progress-bar.ts b/packages/carbon-web-components/src/components/progress-bar/progress-bar.ts index b4a7f19d6bb..e9f7d21d592 100644 --- a/packages/carbon-web-components/src/components/progress-bar/progress-bar.ts +++ b/packages/carbon-web-components/src/components/progress-bar/progress-bar.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { classMap } from 'lit/directives/class-map.js'; import ErrorFilled16 from '@carbon/icons/lib/error--filled/16'; import CheckmarkFilled16 from '@carbon/icons/lib/checkmark--filled/16'; diff --git a/packages/carbon-web-components/src/components/select/select-skeleton.ts b/packages/carbon-web-components/src/components/select/select-skeleton.ts index 87f46db5764..6e0c35dd175 100644 --- a/packages/carbon-web-components/src/components/select/select-skeleton.ts +++ b/packages/carbon-web-components/src/components/select/select-skeleton.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './select.scss'; diff --git a/packages/carbon-web-components/src/components/stack/stack.ts b/packages/carbon-web-components/src/components/stack/stack.ts index 49c02962f18..33c98b9d3bf 100644 --- a/packages/carbon-web-components/src/components/stack/stack.ts +++ b/packages/carbon-web-components/src/components/stack/stack.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2023 + * Copyright IBM Corp. 2023, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { customElement, property } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './stack.scss'; import { STACK_ORIENTATION, SPACING_STEPS } from './defs'; diff --git a/packages/carbon-web-components/src/components/text-input/text-input-skeleton.ts b/packages/carbon-web-components/src/components/text-input/text-input-skeleton.ts index 820f0d74c23..fdc5742a947 100644 --- a/packages/carbon-web-components/src/components/text-input/text-input-skeleton.ts +++ b/packages/carbon-web-components/src/components/text-input/text-input-skeleton.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './text-input.scss'; diff --git a/packages/carbon-web-components/src/components/text-input/text-input.ts b/packages/carbon-web-components/src/components/text-input/text-input.ts index 247e0213699..e22638e550c 100644 --- a/packages/carbon-web-components/src/components/text-input/text-input.ts +++ b/packages/carbon-web-components/src/components/text-input/text-input.ts @@ -8,7 +8,8 @@ */ import { LitElement, html } from 'lit'; -import { property, customElement, query } from 'lit/decorators.js'; +import { property, query } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { classMap } from 'lit/directives/class-map.js'; import { prefix } from '../../globals/settings'; import View16 from '@carbon/icons/lib/view/16'; diff --git a/packages/carbon-web-components/src/components/toggle-tip/toggletip.ts b/packages/carbon-web-components/src/components/toggle-tip/toggletip.ts index d91f2303773..289efa8edae 100644 --- a/packages/carbon-web-components/src/components/toggle-tip/toggletip.ts +++ b/packages/carbon-web-components/src/components/toggle-tip/toggletip.ts @@ -9,7 +9,8 @@ import { classMap } from 'lit/directives/class-map.js'; import { html, LitElement } from 'lit'; -import { customElement, property } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import Information16 from '@carbon/icons/lib/information/16'; import { prefix } from '../../globals/settings'; import HostListener from '../../globals/decorators/host-listener'; diff --git a/packages/carbon-web-components/src/components/ui-shell/header-global-action.ts b/packages/carbon-web-components/src/components/ui-shell/header-global-action.ts index 3f9184889e8..0906ef31518 100644 --- a/packages/carbon-web-components/src/components/ui-shell/header-global-action.ts +++ b/packages/carbon-web-components/src/components/ui-shell/header-global-action.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2023 + * Copyright IBM Corp. 2023, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement } from 'lit'; -import { property, customElement, query } from 'lit/decorators.js'; +import { property, query } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { BUTTON_TOOLTIP_POSITION } from '../button/button'; import CDSButton from '../button/button'; import HostListener from '../../globals/decorators/host-listener'; diff --git a/packages/carbon-web-components/src/components/ui-shell/header-panel.ts b/packages/carbon-web-components/src/components/ui-shell/header-panel.ts index 9f4f64571f2..77bfc85f5f9 100644 --- a/packages/carbon-web-components/src/components/ui-shell/header-panel.ts +++ b/packages/carbon-web-components/src/components/ui-shell/header-panel.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2023 + * Copyright IBM Corp. 2023, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import styles from './header.scss'; import { prefix } from '../../globals/settings'; diff --git a/packages/carbon-web-components/src/components/ui-shell/header-side-nav-items.ts b/packages/carbon-web-components/src/components/ui-shell/header-side-nav-items.ts index cc57a28581a..c041d9442ca 100644 --- a/packages/carbon-web-components/src/components/ui-shell/header-side-nav-items.ts +++ b/packages/carbon-web-components/src/components/ui-shell/header-side-nav-items.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2023 + * Copyright IBM Corp. 2023, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import styles from './side-nav.scss'; diff --git a/packages/carbon-web-components/src/components/ui-shell/switcher-item.ts b/packages/carbon-web-components/src/components/ui-shell/switcher-item.ts index 00a58384ca1..f792ba65e63 100644 --- a/packages/carbon-web-components/src/components/ui-shell/switcher-item.ts +++ b/packages/carbon-web-components/src/components/ui-shell/switcher-item.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2019, 2023 + * Copyright IBM Corp. 2019, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -9,7 +9,8 @@ import { classMap } from 'lit/directives/class-map.js'; import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import { prefix } from '../../globals/settings'; import FocusMixin from '../../globals/mixins/focus'; import styles from './header.scss'; diff --git a/packages/carbon-web-components/src/components/ui-shell/switcher.ts b/packages/carbon-web-components/src/components/ui-shell/switcher.ts index 30e2898dc30..4db21687571 100644 --- a/packages/carbon-web-components/src/components/ui-shell/switcher.ts +++ b/packages/carbon-web-components/src/components/ui-shell/switcher.ts @@ -1,14 +1,15 @@ /** * @license * - * Copyright IBM Corp. 2023 + * Copyright IBM Corp. 2023, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { LitElement, html } from 'lit'; -import { property, customElement } from 'lit/decorators.js'; +import { property } from 'lit/decorators.js'; +import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; import styles from './header.scss'; import { prefix } from '../../globals/settings';