Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(customElementRegistry): add carbonElement decorator #10080

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { classMap } from 'lit-html/directives/class-map';
import { html, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import ChevronRight16 from '@carbon/icons/lib/chevron--right/16';
import FocusMixin from '../../globals/mixins/focus';
import Handle from '../../globals/internal/handle';
import { ACCORDION_ITEM_BREAKPOINT } from './defs';
import styles from './accordion.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { ACCORDION_ITEM_BREAKPOINT };

Expand Down Expand Up @@ -189,7 +190,7 @@ class BXAccordionItem extends FocusMixin(LitElement) {
part="expando"
class="${prefix}--accordion__heading"
aria-controls="content"
aria-expanded="${String(Boolean(open))}"
aria-expanded="${open}"
@click="${handleClickExpando}"
@keydown="${handleKeydownExpando}">
${ChevronRight16({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import { forEach } from '../../globals/internal/collection-helpers';
import { ACCORDION_SIZE } from './defs';
import styles from './accordion.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { ACCORDION_SIZE };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, customElement, LitElement } from 'lit-element';
import { html, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import styles from './breadcrumb.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 { customElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import BXLink from '../link/link';
import styles from './breadcrumb.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 { customElement, html } from 'lit-element';
import { html } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import OverflowMenuHorizontal16 from '@carbon/icons/lib/overflow-menu--horizontal/16';
import BXOverflowMenu from '../overflow-menu/overflow-menu';
import styles from './breadcrumb.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, customElement, LitElement } from 'lit-element';
import { html, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import styles from './breadcrumb.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { classMap } from 'lit-html/directives/class-map';
import { html, customElement } from 'lit-element';
import { html } from 'lit-element';
import ifNonNull from '../../globals/directives/if-non-null';
import BXButton from './button';
import styles from './button.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { classMap } from 'lit-html/directives/class-map';
import { html, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import ifNonNull from '../../globals/directives/if-non-null';
import FocusMixin from '../../globals/mixins/focus';
import { BUTTON_KIND, BUTTON_SIZE, BUTTON_ICON_LAYOUT } from './defs';
import styles from './button.scss';
import HostListener from '../../globals/decorators/host-listener';
import HostListenerMixin from '../../globals/mixins/host-listener';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { BUTTON_KIND, BUTTON_SIZE, BUTTON_ICON_LAYOUT };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 { classMap } from 'lit-html/directives/class-map';
import { html, property, query, customElement, LitElement } from 'lit-element';
import { html, property, query, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import ifNonNull from '../../globals/directives/if-non-null';
import FocusMixin from '../../globals/mixins/focus';
import FormMixin from '../../globals/mixins/form';
import styles from './checkbox.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import { CODE_SNIPPET_TYPE } from './code-snippet';
import styles from './code-snippet.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 { classMap } from 'lit-html/directives/class-map';
import { TemplateResult } from 'lit-html';
import { html, property, query, customElement, LitElement } from 'lit-element';
import { html, property, query, LitElement } from 'lit-element';
import ChevronDown16 from '@carbon/icons/lib/chevron--down/16';
import settings from 'carbon-components/es/globals/js/settings';
import FocusMixin from '../../globals/mixins/focus';
Expand All @@ -19,6 +19,7 @@ import {
} from '../copy-button/copy-button';
import { CODE_SNIPPET_COLOR_SCHEME, CODE_SNIPPET_TYPE } from './defs';
import styles from './code-snippet.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { CODE_SNIPPET_COLOR_SCHEME, CODE_SNIPPET_TYPE };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { customElement } from 'lit-element';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
import BXDropdownItem from '../dropdown/dropdown-item';
import styles from './combo-box.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { TemplateResult } from 'lit-html';
import { html, property, query, customElement } from 'lit-element';
import { html, property, query } from 'lit-element';
import Close16 from '@carbon/icons/lib/close/16';
import { findIndex, forEach } from '../../globals/internal/collection-helpers';
import BXDropdown, { DROPDOWN_KEYBOARD_ACTION } from '../dropdown/dropdown';
import BXComboBoxItem from './combo-box-item';
import styles from './combo-box.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export {
DROPDOWN_COLOR_SCHEME,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 { classMap } from 'lit-html/directives/class-map';
import { html, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import ifNonNull from '../../globals/directives/if-non-null';
import FocusMixin from '../../globals/mixins/focus';
import styles from './content-switcher.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import { forEach, indexOf } from '../../globals/internal/collection-helpers';
import { NAVIGATION_DIRECTION, CONTENT_SWITCHER_SIZE } from './defs';
import BXSwitch from './content-switcher-item';
import styles from './content-switcher.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

export { NAVIGATION_DIRECTION, CONTENT_SWITCHER_SIZE };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -10,11 +10,12 @@
import { classMap } from 'lit-html/directives/class-map';
import { TemplateResult } from 'lit-html';
import { ifDefined } from 'lit-html/directives/if-defined';
import { html, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import Copy16 from '@carbon/icons/lib/copy/16';
import settings from 'carbon-components/es/globals/js/settings';
import FocusMixin from '../../globals/mixins/focus';
import styles from './copy-button.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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, property, customElement, LitElement } from 'lit-element';
import { html, property, LitElement } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import styles from './data-table.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* 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 settings from 'carbon-components/es/globals/js/settings';
import { html, property, query, customElement, LitElement } from 'lit-element';
import { html, property, query, LitElement } from 'lit-element';
import { TABLE_COLOR_SCHEME } from './defs';
import BXTableRow from './table-row';
import styles from './data-table.scss';
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

const { prefix } = settings;

Expand Down
Loading