@carbon/web-components 2.47.0 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +963 -145
- package/es/components/accordion/accordion-item.d.ts +28 -12
- package/es/components/accordion/accordion-item.js +7 -5
- package/es/components/accordion/accordion-item.js.map +1 -1
- package/es/components/accordion/accordion-skeleton.d.ts +1 -1
- package/es/components/accordion/accordion-skeleton.js +7 -5
- package/es/components/accordion/accordion-skeleton.js.map +1 -1
- package/es/components/accordion/accordion.d.ts +1 -1
- package/es/components/accordion/accordion.js +7 -5
- package/es/components/accordion/accordion.js.map +1 -1
- package/es/components/ai-label/ai-label.d.ts +1 -1
- package/es/components/ai-label/ai-label.js +6 -5
- package/es/components/ai-label/ai-label.js.map +1 -1
- package/es/components/button/button.d.ts +56 -22
- package/es/components/checkbox/checkbox-group.d.ts +2 -0
- package/es/components/checkbox/checkbox.d.ts +57 -23
- package/es/components/checkbox/checkbox.js +7 -5
- package/es/components/checkbox/checkbox.js.map +1 -1
- package/es/components/code-snippet/code-snippet.d.ts +29 -11
- package/es/components/code-snippet/code-snippet.js +15 -14
- package/es/components/code-snippet/code-snippet.js.map +1 -1
- package/es/components/combo-box/combo-box.scss.js +1 -1
- package/es/components/combo-button/combo-button.d.ts +27 -11
- package/es/components/content-switcher/content-switcher-item.d.ts +29 -11
- package/es/components/copy-button/copy-button.d.ts +27 -11
- package/es/components/data-table/table-expanded-row.d.ts +28 -12
- package/es/components/data-table/table-expanded-row.js +7 -5
- package/es/components/data-table/table-expanded-row.js.map +1 -1
- package/es/components/data-table/table-header-cell.d.ts +29 -11
- package/es/components/data-table/table-row.d.ts +54 -22
- package/es/components/data-table/table-toolbar-search.d.ts +29 -11
- package/es/components/data-table/table.d.ts +28 -12
- package/es/components/data-table/table.js +9 -8
- package/es/components/data-table/table.js.map +1 -1
- package/es/components/date-picker/date-picker-input.d.ts +29 -11
- package/es/components/date-picker/date-picker.d.ts +54 -22
- package/es/components/dropdown/dropdown.d.ts +110 -44
- package/es/components/dropdown/dropdown.js +8 -6
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/file-uploader/file-uploader-button.d.ts +27 -11
- package/es/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
- package/es/components/floating-menu/floating-menu.d.ts +56 -22
- package/es/components/fluid-select/fluid-select.d.ts +5 -0
- package/es/components/fluid-select/fluid-select.js +50 -1
- package/es/components/fluid-select/fluid-select.js.map +1 -1
- package/es/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
- package/es/components/fluid-textarea/fluid-textarea-skeleton.js +3 -3
- package/es/components/fluid-textarea/fluid-textarea-skeleton.js.map +1 -1
- package/es/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
- package/es/components/fluid-time-picker/fluid-time-picker-select.js +53 -0
- package/es/components/fluid-time-picker/fluid-time-picker-select.js.map +1 -0
- package/es/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
- package/es/components/fluid-time-picker/fluid-time-picker-skeleton.js +63 -0
- package/es/components/fluid-time-picker/fluid-time-picker-skeleton.js.map +1 -0
- package/es/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
- package/es/components/fluid-time-picker/fluid-time-picker.js +239 -0
- package/es/components/fluid-time-picker/fluid-time-picker.js.map +1 -0
- package/es/components/fluid-time-picker/fluid-time-picker.scss.js +13 -0
- package/es/components/fluid-time-picker/fluid-time-picker.scss.js.map +1 -0
- package/es/components/fluid-time-picker/index.d.ts +9 -0
- package/es/components/fluid-time-picker/index.js +11 -0
- package/es/components/fluid-time-picker/index.js.map +1 -0
- package/es/components/grid/column.d.ts +3 -1
- package/es/components/grid/column.js +6 -0
- package/es/components/grid/column.js.map +1 -1
- package/es/components/icon-button/icon-button.d.ts +1 -1
- package/es/components/icon-button/icon-button.js +6 -5
- package/es/components/icon-button/icon-button.js.map +1 -1
- package/es/components/link/link.d.ts +29 -11
- package/es/components/menu/menu-item-selectable.d.ts +5 -3
- package/es/components/menu/menu-item-selectable.js +3 -3
- package/es/components/menu/menu-item-selectable.js.map +1 -1
- package/es/components/menu/menu-item.d.ts +68 -23
- package/es/components/menu/menu-item.js +37 -2
- package/es/components/menu/menu-item.js.map +1 -1
- package/es/components/menu/menu.d.ts +27 -11
- package/es/components/menu-button/menu-button.d.ts +27 -11
- package/es/components/modal/modal-close-button.d.ts +29 -11
- package/es/components/modal/modal.d.ts +27 -11
- package/es/components/modal/modal.js +6 -4
- package/es/components/modal/modal.js.map +1 -1
- package/es/components/multi-select/multi-select.js +12 -8
- package/es/components/multi-select/multi-select.js.map +1 -1
- package/es/components/notification/actionable-notification.d.ts +27 -11
- package/es/components/notification/actionable-notification.scss.js +1 -1
- package/es/components/notification/inline-notification.d.ts +27 -11
- package/es/components/notification/inline-notification.scss.js +1 -1
- package/es/components/notification/toast-notification.scss.js +1 -1
- package/es/components/number-input/number-input.d.ts +2 -0
- package/es/components/overflow-menu/overflow-menu-item.d.ts +29 -11
- package/es/components/overflow-menu/overflow-menu.d.ts +54 -22
- package/es/components/pagination/pagination.d.ts +56 -22
- package/es/components/pagination-nav/defs.d.ts +61 -0
- package/es/components/pagination-nav/defs.js +74 -0
- package/es/components/pagination-nav/defs.js.map +1 -0
- package/es/components/pagination-nav/index.d.ts +7 -0
- package/es/components/pagination-nav/index.js +9 -0
- package/es/components/pagination-nav/index.js.map +1 -0
- package/es/components/pagination-nav/pagination-nav.d.ts +109 -0
- package/es/components/pagination-nav/pagination-nav.js +427 -0
- package/es/components/pagination-nav/pagination-nav.js.map +1 -0
- package/es/components/pagination-nav/pagination-nav.scss.js +13 -0
- package/es/components/pagination-nav/pagination-nav.scss.js.map +1 -0
- package/es/components/password-input/password-input.d.ts +2 -0
- package/es/components/popover/popover.d.ts +27 -11
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/progress-indicator/progress-step.d.ts +29 -11
- package/es/components/radio-button/radio-button-group.d.ts +54 -22
- package/es/components/radio-button/radio-button.d.ts +57 -23
- package/es/components/radio-button/radio-button.js +7 -5
- package/es/components/radio-button/radio-button.js.map +1 -1
- package/es/components/search/search.d.ts +83 -33
- package/es/components/select/select.d.ts +29 -11
- package/es/components/side-panel/side-panel.d.ts +27 -11
- package/es/components/skip-to-content/skip-to-content.d.ts +29 -11
- package/es/components/slider/slider-input.d.ts +29 -11
- package/es/components/slider/slider.d.ts +84 -34
- package/es/components/slider/slider.js +9 -7
- package/es/components/slider/slider.js.map +1 -1
- package/es/components/slug/slug.d.ts +1 -1
- package/es/components/slug/slug.js +6 -4
- package/es/components/slug/slug.js.map +1 -1
- package/es/components/structured-list/structured-list-row.d.ts +27 -11
- package/es/components/structured-list/structured-list.d.ts +30 -12
- package/es/components/structured-list/structured-list.js +7 -5
- package/es/components/structured-list/structured-list.js.map +1 -1
- package/es/components/tabs/tabs.d.ts +27 -11
- package/es/components/tag/dismissible-tag.d.ts +54 -22
- package/es/components/tag/operational-tag.d.ts +54 -22
- package/es/components/tag/selectable-tag.d.ts +54 -22
- package/es/components/tag/tag.d.ts +54 -22
- package/es/components/tearsheet/tearsheet.d.ts +27 -11
- package/es/components/text-input/text-input.d.ts +56 -22
- package/es/components/textarea/textarea.d.ts +2 -0
- package/es/components/tile/expandable-tile.d.ts +54 -22
- package/es/components/tile/selectable-tile.d.ts +56 -22
- package/es/components/tile/tile-group.d.ts +27 -11
- package/es/components/time-picker/time-picker-select.d.ts +29 -11
- package/es/components/time-picker/time-picker.d.ts +56 -22
- package/es/components/toggle/toggle.d.ts +27 -11
- package/es/components/toggle-tip/toggletip.d.ts +57 -23
- package/es/components/toggle-tip/toggletip.js +7 -5
- package/es/components/toggle-tip/toggletip.js.map +1 -1
- package/es/components/tooltip/tooltip.d.ts +28 -12
- package/es/components/tooltip/tooltip.js +7 -5
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/components/tree-view/tree-view.d.ts +28 -12
- package/es/components/tree-view/tree-view.js +7 -5
- package/es/components/tree-view/tree-view.js.map +1 -1
- package/es/components/ui-shell/header-global-action.d.ts +2 -0
- package/es/components/ui-shell/header-menu-button.d.ts +29 -11
- package/es/components/ui-shell/header-menu.d.ts +56 -22
- package/es/components/ui-shell/header-name.d.ts +29 -11
- package/es/components/ui-shell/header-nav-item.d.ts +29 -11
- package/es/components/ui-shell/header-panel.d.ts +2 -0
- package/es/components/ui-shell/side-nav-link.d.ts +29 -11
- package/es/components/ui-shell/side-nav-menu-item.d.ts +29 -11
- package/es/components/ui-shell/side-nav-menu.d.ts +29 -11
- package/es/components/ui-shell/side-nav.d.ts +27 -11
- package/es/components/ui-shell/switcher-item.d.ts +29 -11
- package/es/components/ui-shell/switcher.d.ts +2 -0
- package/es/globals/mixins/focus.d.ts +27 -11
- package/es/globals/mixins/form.d.ts +27 -11
- package/es/globals/mixins/host-listener.d.ts +27 -11
- package/es/globals/mixins/validity.d.ts +27 -11
- package/es-custom/components/accordion/accordion-item.d.ts +28 -12
- package/es-custom/components/accordion/accordion-item.js +7 -5
- package/es-custom/components/accordion/accordion-item.js.map +1 -1
- package/es-custom/components/accordion/accordion-skeleton.d.ts +1 -1
- package/es-custom/components/accordion/accordion-skeleton.js +7 -5
- package/es-custom/components/accordion/accordion-skeleton.js.map +1 -1
- package/es-custom/components/accordion/accordion.d.ts +1 -1
- package/es-custom/components/accordion/accordion.js +7 -5
- package/es-custom/components/accordion/accordion.js.map +1 -1
- package/es-custom/components/ai-label/ai-label.d.ts +1 -1
- package/es-custom/components/ai-label/ai-label.js +6 -5
- package/es-custom/components/ai-label/ai-label.js.map +1 -1
- package/es-custom/components/button/button.d.ts +56 -22
- package/es-custom/components/checkbox/checkbox-group.d.ts +2 -0
- package/es-custom/components/checkbox/checkbox.d.ts +57 -23
- package/es-custom/components/checkbox/checkbox.js +7 -5
- package/es-custom/components/checkbox/checkbox.js.map +1 -1
- package/es-custom/components/code-snippet/code-snippet.d.ts +29 -11
- package/es-custom/components/code-snippet/code-snippet.js +15 -14
- package/es-custom/components/code-snippet/code-snippet.js.map +1 -1
- package/es-custom/components/combo-box/combo-box.scss.js +1 -1
- package/es-custom/components/combo-button/combo-button.d.ts +27 -11
- package/es-custom/components/content-switcher/content-switcher-item.d.ts +29 -11
- package/es-custom/components/copy-button/copy-button.d.ts +27 -11
- package/es-custom/components/data-table/table-expanded-row.d.ts +28 -12
- package/es-custom/components/data-table/table-expanded-row.js +7 -5
- package/es-custom/components/data-table/table-expanded-row.js.map +1 -1
- package/es-custom/components/data-table/table-header-cell.d.ts +29 -11
- package/es-custom/components/data-table/table-row.d.ts +54 -22
- package/es-custom/components/data-table/table-toolbar-search.d.ts +29 -11
- package/es-custom/components/data-table/table.d.ts +28 -12
- package/es-custom/components/data-table/table.js +9 -8
- package/es-custom/components/data-table/table.js.map +1 -1
- package/es-custom/components/date-picker/date-picker-input.d.ts +29 -11
- package/es-custom/components/date-picker/date-picker.d.ts +54 -22
- package/es-custom/components/dropdown/dropdown.d.ts +110 -44
- package/es-custom/components/dropdown/dropdown.js +8 -6
- package/es-custom/components/dropdown/dropdown.js.map +1 -1
- package/es-custom/components/file-uploader/file-uploader-button.d.ts +27 -11
- package/es-custom/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
- package/es-custom/components/floating-menu/floating-menu.d.ts +56 -22
- package/es-custom/components/fluid-select/fluid-select.d.ts +5 -0
- package/es-custom/components/fluid-select/fluid-select.js +50 -1
- package/es-custom/components/fluid-select/fluid-select.js.map +1 -1
- package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
- package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.js +3 -3
- package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.js.map +1 -1
- package/es-custom/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker-select.js +53 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker-select.js.map +1 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.js +63 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.js.map +1 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker.js +239 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker.js.map +1 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker.scss.js +13 -0
- package/es-custom/components/fluid-time-picker/fluid-time-picker.scss.js.map +1 -0
- package/es-custom/components/fluid-time-picker/index.d.ts +9 -0
- package/es-custom/components/fluid-time-picker/index.js +11 -0
- package/es-custom/components/fluid-time-picker/index.js.map +1 -0
- package/es-custom/components/grid/column.d.ts +3 -1
- package/es-custom/components/grid/column.js +6 -0
- package/es-custom/components/grid/column.js.map +1 -1
- package/es-custom/components/icon-button/icon-button.d.ts +1 -1
- package/es-custom/components/icon-button/icon-button.js +6 -5
- package/es-custom/components/icon-button/icon-button.js.map +1 -1
- package/es-custom/components/link/link.d.ts +29 -11
- package/es-custom/components/menu/menu-item-selectable.d.ts +5 -3
- package/es-custom/components/menu/menu-item-selectable.js +3 -3
- package/es-custom/components/menu/menu-item-selectable.js.map +1 -1
- package/es-custom/components/menu/menu-item.d.ts +68 -23
- package/es-custom/components/menu/menu-item.js +37 -2
- package/es-custom/components/menu/menu-item.js.map +1 -1
- package/es-custom/components/menu/menu.d.ts +27 -11
- package/es-custom/components/menu-button/menu-button.d.ts +27 -11
- package/es-custom/components/modal/modal-close-button.d.ts +29 -11
- package/es-custom/components/modal/modal.d.ts +27 -11
- package/es-custom/components/modal/modal.js +6 -4
- package/es-custom/components/modal/modal.js.map +1 -1
- package/es-custom/components/multi-select/multi-select.js +12 -8
- package/es-custom/components/multi-select/multi-select.js.map +1 -1
- package/es-custom/components/notification/actionable-notification.d.ts +27 -11
- package/es-custom/components/notification/actionable-notification.scss.js +1 -1
- package/es-custom/components/notification/inline-notification.d.ts +27 -11
- package/es-custom/components/notification/inline-notification.scss.js +1 -1
- package/es-custom/components/notification/toast-notification.scss.js +1 -1
- package/es-custom/components/number-input/number-input.d.ts +2 -0
- package/es-custom/components/overflow-menu/overflow-menu-item.d.ts +29 -11
- package/es-custom/components/overflow-menu/overflow-menu.d.ts +54 -22
- package/es-custom/components/pagination/pagination.d.ts +56 -22
- package/es-custom/components/pagination-nav/defs.d.ts +61 -0
- package/es-custom/components/pagination-nav/defs.js +74 -0
- package/es-custom/components/pagination-nav/defs.js.map +1 -0
- package/es-custom/components/pagination-nav/index.d.ts +7 -0
- package/es-custom/components/pagination-nav/index.js +9 -0
- package/es-custom/components/pagination-nav/index.js.map +1 -0
- package/es-custom/components/pagination-nav/pagination-nav.d.ts +109 -0
- package/es-custom/components/pagination-nav/pagination-nav.js +427 -0
- package/es-custom/components/pagination-nav/pagination-nav.js.map +1 -0
- package/es-custom/components/pagination-nav/pagination-nav.scss.js +13 -0
- package/es-custom/components/pagination-nav/pagination-nav.scss.js.map +1 -0
- package/es-custom/components/password-input/password-input.d.ts +2 -0
- package/es-custom/components/popover/popover.d.ts +27 -11
- package/es-custom/components/popover/popover.js +1 -1
- package/es-custom/components/popover/popover.js.map +1 -1
- package/es-custom/components/progress-indicator/progress-step.d.ts +29 -11
- package/es-custom/components/radio-button/radio-button-group.d.ts +54 -22
- package/es-custom/components/radio-button/radio-button.d.ts +57 -23
- package/es-custom/components/radio-button/radio-button.js +7 -5
- package/es-custom/components/radio-button/radio-button.js.map +1 -1
- package/es-custom/components/search/search.d.ts +83 -33
- package/es-custom/components/select/select.d.ts +29 -11
- package/es-custom/components/side-panel/side-panel.d.ts +27 -11
- package/es-custom/components/skip-to-content/skip-to-content.d.ts +29 -11
- package/es-custom/components/slider/slider-input.d.ts +29 -11
- package/es-custom/components/slider/slider.d.ts +84 -34
- package/es-custom/components/slider/slider.js +9 -7
- package/es-custom/components/slider/slider.js.map +1 -1
- package/es-custom/components/slug/slug.d.ts +1 -1
- package/es-custom/components/slug/slug.js +6 -4
- package/es-custom/components/slug/slug.js.map +1 -1
- package/es-custom/components/structured-list/structured-list-row.d.ts +27 -11
- package/es-custom/components/structured-list/structured-list.d.ts +30 -12
- package/es-custom/components/structured-list/structured-list.js +7 -5
- package/es-custom/components/structured-list/structured-list.js.map +1 -1
- package/es-custom/components/tabs/tabs.d.ts +27 -11
- package/es-custom/components/tag/dismissible-tag.d.ts +54 -22
- package/es-custom/components/tag/operational-tag.d.ts +54 -22
- package/es-custom/components/tag/selectable-tag.d.ts +54 -22
- package/es-custom/components/tag/tag.d.ts +54 -22
- package/es-custom/components/tearsheet/tearsheet.d.ts +27 -11
- package/es-custom/components/text-input/text-input.d.ts +56 -22
- package/es-custom/components/textarea/textarea.d.ts +2 -0
- package/es-custom/components/tile/expandable-tile.d.ts +54 -22
- package/es-custom/components/tile/selectable-tile.d.ts +56 -22
- package/es-custom/components/tile/tile-group.d.ts +27 -11
- package/es-custom/components/time-picker/time-picker-select.d.ts +29 -11
- package/es-custom/components/time-picker/time-picker.d.ts +56 -22
- package/es-custom/components/toggle/toggle.d.ts +27 -11
- package/es-custom/components/toggle-tip/toggletip.d.ts +57 -23
- package/es-custom/components/toggle-tip/toggletip.js +7 -5
- package/es-custom/components/toggle-tip/toggletip.js.map +1 -1
- package/es-custom/components/tooltip/tooltip.d.ts +28 -12
- package/es-custom/components/tooltip/tooltip.js +7 -5
- package/es-custom/components/tooltip/tooltip.js.map +1 -1
- package/es-custom/components/tree-view/tree-view.d.ts +28 -12
- package/es-custom/components/tree-view/tree-view.js +7 -5
- package/es-custom/components/tree-view/tree-view.js.map +1 -1
- package/es-custom/components/ui-shell/header-global-action.d.ts +2 -0
- package/es-custom/components/ui-shell/header-menu-button.d.ts +29 -11
- package/es-custom/components/ui-shell/header-menu.d.ts +56 -22
- package/es-custom/components/ui-shell/header-name.d.ts +29 -11
- package/es-custom/components/ui-shell/header-nav-item.d.ts +29 -11
- package/es-custom/components/ui-shell/header-panel.d.ts +2 -0
- package/es-custom/components/ui-shell/side-nav-link.d.ts +29 -11
- package/es-custom/components/ui-shell/side-nav-menu-item.d.ts +29 -11
- package/es-custom/components/ui-shell/side-nav-menu.d.ts +29 -11
- package/es-custom/components/ui-shell/side-nav.d.ts +27 -11
- package/es-custom/components/ui-shell/switcher-item.d.ts +29 -11
- package/es-custom/components/ui-shell/switcher.d.ts +2 -0
- package/es-custom/globals/mixins/focus.d.ts +27 -11
- package/es-custom/globals/mixins/form.d.ts +27 -11
- package/es-custom/globals/mixins/host-listener.d.ts +27 -11
- package/es-custom/globals/mixins/validity.d.ts +27 -11
- package/lib/components/accordion/accordion-item.d.ts +28 -12
- package/lib/components/accordion/accordion-skeleton.d.ts +1 -1
- package/lib/components/accordion/accordion.d.ts +1 -1
- package/lib/components/ai-label/ai-label.d.ts +1 -1
- package/lib/components/button/button.d.ts +56 -22
- package/lib/components/checkbox/checkbox-group.d.ts +2 -0
- package/lib/components/checkbox/checkbox.d.ts +57 -23
- package/lib/components/code-snippet/code-snippet.d.ts +29 -11
- package/lib/components/combo-button/combo-button.d.ts +27 -11
- package/lib/components/content-switcher/content-switcher-item.d.ts +29 -11
- package/lib/components/copy-button/copy-button.d.ts +27 -11
- package/lib/components/data-table/table-expanded-row.d.ts +28 -12
- package/lib/components/data-table/table-header-cell.d.ts +29 -11
- package/lib/components/data-table/table-row.d.ts +54 -22
- package/lib/components/data-table/table-toolbar-search.d.ts +29 -11
- package/lib/components/data-table/table.d.ts +28 -12
- package/lib/components/date-picker/date-picker-input.d.ts +29 -11
- package/lib/components/date-picker/date-picker.d.ts +54 -22
- package/lib/components/dropdown/dropdown.d.ts +110 -44
- package/lib/components/file-uploader/file-uploader-button.d.ts +27 -11
- package/lib/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
- package/lib/components/floating-menu/floating-menu.d.ts +56 -22
- package/lib/components/fluid-select/fluid-select.d.ts +5 -0
- package/lib/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
- package/lib/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
- package/lib/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
- package/lib/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
- package/lib/components/fluid-time-picker/index.d.ts +9 -0
- package/lib/components/grid/column.d.ts +3 -1
- package/lib/components/icon-button/icon-button.d.ts +1 -1
- package/lib/components/link/link.d.ts +29 -11
- package/lib/components/menu/menu-item-selectable.d.ts +5 -3
- package/lib/components/menu/menu-item.d.ts +68 -23
- package/lib/components/menu/menu.d.ts +27 -11
- package/lib/components/menu-button/menu-button.d.ts +27 -11
- package/lib/components/modal/modal-close-button.d.ts +29 -11
- package/lib/components/modal/modal.d.ts +27 -11
- package/lib/components/notification/actionable-notification.d.ts +27 -11
- package/lib/components/notification/inline-notification.d.ts +27 -11
- package/lib/components/number-input/number-input.d.ts +2 -0
- package/lib/components/overflow-menu/overflow-menu-item.d.ts +29 -11
- package/lib/components/overflow-menu/overflow-menu.d.ts +54 -22
- package/lib/components/pagination/pagination.d.ts +56 -22
- package/lib/components/pagination-nav/defs.d.ts +61 -0
- package/lib/components/pagination-nav/defs.js +74 -0
- package/lib/components/pagination-nav/defs.js.map +1 -0
- package/lib/components/pagination-nav/index.d.ts +7 -0
- package/lib/components/pagination-nav/pagination-nav.d.ts +109 -0
- package/lib/components/password-input/password-input.d.ts +2 -0
- package/lib/components/popover/popover.d.ts +27 -11
- package/lib/components/progress-indicator/progress-step.d.ts +29 -11
- package/lib/components/radio-button/radio-button-group.d.ts +54 -22
- package/lib/components/radio-button/radio-button.d.ts +57 -23
- package/lib/components/search/search.d.ts +83 -33
- package/lib/components/select/select.d.ts +29 -11
- package/lib/components/side-panel/side-panel.d.ts +27 -11
- package/lib/components/skip-to-content/skip-to-content.d.ts +29 -11
- package/lib/components/slider/slider-input.d.ts +29 -11
- package/lib/components/slider/slider.d.ts +84 -34
- package/lib/components/slug/slug.d.ts +1 -1
- package/lib/components/structured-list/structured-list-row.d.ts +27 -11
- package/lib/components/structured-list/structured-list.d.ts +30 -12
- package/lib/components/tabs/tabs.d.ts +27 -11
- package/lib/components/tag/dismissible-tag.d.ts +54 -22
- package/lib/components/tag/operational-tag.d.ts +54 -22
- package/lib/components/tag/selectable-tag.d.ts +54 -22
- package/lib/components/tag/tag.d.ts +54 -22
- package/lib/components/tearsheet/tearsheet.d.ts +27 -11
- package/lib/components/text-input/text-input.d.ts +56 -22
- package/lib/components/textarea/textarea.d.ts +2 -0
- package/lib/components/tile/expandable-tile.d.ts +54 -22
- package/lib/components/tile/selectable-tile.d.ts +56 -22
- package/lib/components/tile/tile-group.d.ts +27 -11
- package/lib/components/time-picker/time-picker-select.d.ts +29 -11
- package/lib/components/time-picker/time-picker.d.ts +56 -22
- package/lib/components/toggle/toggle.d.ts +27 -11
- package/lib/components/toggle-tip/toggletip.d.ts +57 -23
- package/lib/components/tooltip/tooltip.d.ts +28 -12
- package/lib/components/tree-view/tree-view.d.ts +28 -12
- package/lib/components/ui-shell/header-global-action.d.ts +2 -0
- package/lib/components/ui-shell/header-menu-button.d.ts +29 -11
- package/lib/components/ui-shell/header-menu.d.ts +56 -22
- package/lib/components/ui-shell/header-name.d.ts +29 -11
- package/lib/components/ui-shell/header-nav-item.d.ts +29 -11
- package/lib/components/ui-shell/header-panel.d.ts +2 -0
- package/lib/components/ui-shell/side-nav-link.d.ts +29 -11
- package/lib/components/ui-shell/side-nav-menu-item.d.ts +29 -11
- package/lib/components/ui-shell/side-nav-menu.d.ts +29 -11
- package/lib/components/ui-shell/side-nav.d.ts +27 -11
- package/lib/components/ui-shell/switcher-item.d.ts +29 -11
- package/lib/components/ui-shell/switcher.d.ts +2 -0
- package/lib/globals/mixins/focus.d.ts +27 -11
- package/lib/globals/mixins/form.d.ts +27 -11
- package/lib/globals/mixins/host-listener.d.ts +27 -11
- package/lib/globals/mixins/validity.d.ts +27 -11
- package/package.json +7 -7
- package/scss/components/combo-box/combo-box.scss +1 -1
- package/scss/components/fluid-time-picker/fluid-time-picker.scss +198 -0
- package/scss/components/pagination-nav/pagination-nav.scss +29 -0
- package/telemetry.yml +16 -8
|
@@ -71,6 +71,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
71
71
|
accessKey: string;
|
|
72
72
|
readonly accessKeyLabel: string;
|
|
73
73
|
autocapitalize: string;
|
|
74
|
+
autocorrect: boolean;
|
|
74
75
|
dir: string;
|
|
75
76
|
draggable: boolean;
|
|
76
77
|
hidden: boolean;
|
|
@@ -92,13 +93,14 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
92
93
|
click(): void;
|
|
93
94
|
hidePopover(): void;
|
|
94
95
|
showPopover(): void;
|
|
95
|
-
togglePopover(
|
|
96
|
+
togglePopover(options?: boolean): boolean;
|
|
96
97
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
97
98
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
98
99
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
99
100
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
100
101
|
readonly attributes: NamedNodeMap;
|
|
101
|
-
|
|
102
|
+
get classList(): DOMTokenList;
|
|
103
|
+
set classList(value: string);
|
|
102
104
|
className: string;
|
|
103
105
|
readonly clientHeight: number;
|
|
104
106
|
readonly clientLeft: number;
|
|
@@ -113,7 +115,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
113
115
|
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
114
116
|
outerHTML: string;
|
|
115
117
|
readonly ownerDocument: Document;
|
|
116
|
-
|
|
118
|
+
get part(): DOMTokenList;
|
|
119
|
+
set part(value: string);
|
|
117
120
|
readonly prefix: string | null;
|
|
118
121
|
readonly scrollHeight: number;
|
|
119
122
|
scrollLeft: number;
|
|
@@ -176,6 +179,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
176
179
|
setPointerCapture(pointerId: number): void;
|
|
177
180
|
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
178
181
|
webkitMatchesSelector(selectors: string): boolean;
|
|
182
|
+
get textContent(): string;
|
|
183
|
+
set textContent(value: string | null);
|
|
179
184
|
readonly baseURI: string;
|
|
180
185
|
readonly childNodes: NodeListOf<ChildNode>;
|
|
181
186
|
readonly firstChild: ChildNode | null;
|
|
@@ -188,9 +193,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
188
193
|
readonly parentElement: HTMLElement | null;
|
|
189
194
|
readonly parentNode: ParentNode | null;
|
|
190
195
|
readonly previousSibling: ChildNode | null;
|
|
191
|
-
textContent: string | null;
|
|
192
196
|
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
193
|
-
cloneNode(
|
|
197
|
+
cloneNode(subtree?: boolean): Node;
|
|
194
198
|
compareDocumentPosition(other: Node): number;
|
|
195
199
|
contains(other: Node | null): boolean;
|
|
196
200
|
getRootNode(options?: GetRootNodeOptions): Node;
|
|
@@ -223,6 +227,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
223
227
|
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
224
228
|
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
225
229
|
dispatchEvent(event: Event): boolean;
|
|
230
|
+
ariaActiveDescendantElement: Element | null;
|
|
226
231
|
ariaAtomic: string | null;
|
|
227
232
|
ariaAutoComplete: string | null;
|
|
228
233
|
ariaBrailleLabel: string | null;
|
|
@@ -233,25 +238,33 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
233
238
|
ariaColIndex: string | null;
|
|
234
239
|
ariaColIndexText: string | null;
|
|
235
240
|
ariaColSpan: string | null;
|
|
241
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
236
242
|
ariaCurrent: string | null;
|
|
243
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
237
244
|
ariaDescription: string | null;
|
|
245
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
238
246
|
ariaDisabled: string | null;
|
|
247
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
239
248
|
ariaExpanded: string | null;
|
|
249
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
240
250
|
ariaHasPopup: string | null;
|
|
241
251
|
ariaHidden: string | null;
|
|
242
252
|
ariaInvalid: string | null;
|
|
243
253
|
ariaKeyShortcuts: string | null;
|
|
244
254
|
ariaLabel: string | null;
|
|
255
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
245
256
|
ariaLevel: string | null;
|
|
246
257
|
ariaLive: string | null;
|
|
247
258
|
ariaModal: string | null;
|
|
248
259
|
ariaMultiLine: string | null;
|
|
249
260
|
ariaMultiSelectable: string | null;
|
|
250
261
|
ariaOrientation: string | null;
|
|
262
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
251
263
|
ariaPlaceholder: string | null;
|
|
252
264
|
ariaPosInSet: string | null;
|
|
253
265
|
ariaPressed: string | null;
|
|
254
266
|
ariaReadOnly: string | null;
|
|
267
|
+
ariaRelevant: string | null;
|
|
255
268
|
ariaRequired: string | null;
|
|
256
269
|
ariaRoleDescription: string | null;
|
|
257
270
|
ariaRowCount: string | null;
|
|
@@ -293,7 +306,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
293
306
|
replaceChildren(...nodes: (Node | string)[]): void;
|
|
294
307
|
readonly assignedSlot: HTMLSlotElement | null;
|
|
295
308
|
readonly attributeStyleMap: StylePropertyMap;
|
|
296
|
-
|
|
309
|
+
get style(): CSSStyleDeclaration;
|
|
310
|
+
set style(cssText: string);
|
|
297
311
|
contentEditable: string;
|
|
298
312
|
enterKeyHint: string;
|
|
299
313
|
inputMode: string;
|
|
@@ -303,18 +317,19 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
303
317
|
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
304
318
|
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
305
319
|
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
306
|
-
onauxclick: ((this: GlobalEventHandlers, ev:
|
|
320
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
307
321
|
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
308
|
-
|
|
322
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
323
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
309
324
|
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
310
325
|
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
311
326
|
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
312
327
|
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
328
|
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
-
onclick: ((this: GlobalEventHandlers, ev:
|
|
329
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
315
330
|
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
316
331
|
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
317
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev:
|
|
332
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
318
333
|
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
319
334
|
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
320
335
|
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -362,6 +377,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
362
377
|
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
363
378
|
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
364
379
|
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
380
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
365
381
|
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
366
382
|
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
367
383
|
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -380,7 +396,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
|
|
|
380
396
|
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
381
397
|
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
382
398
|
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
383
|
-
ontoggle: ((this: GlobalEventHandlers, ev:
|
|
399
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
384
400
|
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
385
401
|
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
386
402
|
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2019,
|
|
2
|
+
* Copyright IBM Corp. 2019, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -13,6 +13,7 @@ declare const CDSAccordionItem_base: {
|
|
|
13
13
|
accessKey: string;
|
|
14
14
|
readonly accessKeyLabel: string;
|
|
15
15
|
autocapitalize: string;
|
|
16
|
+
autocorrect: boolean;
|
|
16
17
|
dir: string;
|
|
17
18
|
draggable: boolean;
|
|
18
19
|
hidden: boolean;
|
|
@@ -34,13 +35,14 @@ declare const CDSAccordionItem_base: {
|
|
|
34
35
|
click(): void;
|
|
35
36
|
hidePopover(): void;
|
|
36
37
|
showPopover(): void;
|
|
37
|
-
togglePopover(
|
|
38
|
+
togglePopover(options?: boolean): boolean;
|
|
38
39
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
39
40
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
40
41
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
41
42
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
42
43
|
readonly attributes: NamedNodeMap;
|
|
43
|
-
|
|
44
|
+
get classList(): DOMTokenList;
|
|
45
|
+
set classList(value: string);
|
|
44
46
|
className: string;
|
|
45
47
|
readonly clientHeight: number;
|
|
46
48
|
readonly clientLeft: number;
|
|
@@ -55,7 +57,8 @@ declare const CDSAccordionItem_base: {
|
|
|
55
57
|
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
56
58
|
outerHTML: string;
|
|
57
59
|
readonly ownerDocument: Document;
|
|
58
|
-
|
|
60
|
+
get part(): DOMTokenList;
|
|
61
|
+
set part(value: string);
|
|
59
62
|
readonly prefix: string | null;
|
|
60
63
|
readonly scrollHeight: number;
|
|
61
64
|
scrollLeft: number;
|
|
@@ -118,6 +121,8 @@ declare const CDSAccordionItem_base: {
|
|
|
118
121
|
setPointerCapture(pointerId: number): void;
|
|
119
122
|
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
120
123
|
webkitMatchesSelector(selectors: string): boolean;
|
|
124
|
+
get textContent(): string;
|
|
125
|
+
set textContent(value: string | null);
|
|
121
126
|
readonly baseURI: string;
|
|
122
127
|
readonly childNodes: NodeListOf<ChildNode>;
|
|
123
128
|
readonly firstChild: ChildNode | null;
|
|
@@ -130,9 +135,8 @@ declare const CDSAccordionItem_base: {
|
|
|
130
135
|
readonly parentElement: HTMLElement | null;
|
|
131
136
|
readonly parentNode: ParentNode | null;
|
|
132
137
|
readonly previousSibling: ChildNode | null;
|
|
133
|
-
textContent: string | null;
|
|
134
138
|
appendChild<T extends Node>(node: T): T;
|
|
135
|
-
cloneNode(
|
|
139
|
+
cloneNode(subtree?: boolean): Node;
|
|
136
140
|
compareDocumentPosition(other: Node): number;
|
|
137
141
|
contains(other: Node | null): boolean;
|
|
138
142
|
getRootNode(options?: GetRootNodeOptions): Node;
|
|
@@ -165,6 +169,7 @@ declare const CDSAccordionItem_base: {
|
|
|
165
169
|
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
166
170
|
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
167
171
|
dispatchEvent(event: Event): boolean;
|
|
172
|
+
ariaActiveDescendantElement: Element | null;
|
|
168
173
|
ariaAtomic: string | null;
|
|
169
174
|
ariaAutoComplete: string | null;
|
|
170
175
|
ariaBrailleLabel: string | null;
|
|
@@ -175,25 +180,33 @@ declare const CDSAccordionItem_base: {
|
|
|
175
180
|
ariaColIndex: string | null;
|
|
176
181
|
ariaColIndexText: string | null;
|
|
177
182
|
ariaColSpan: string | null;
|
|
183
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
178
184
|
ariaCurrent: string | null;
|
|
185
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
179
186
|
ariaDescription: string | null;
|
|
187
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
180
188
|
ariaDisabled: string | null;
|
|
189
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
181
190
|
ariaExpanded: string | null;
|
|
191
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
182
192
|
ariaHasPopup: string | null;
|
|
183
193
|
ariaHidden: string | null;
|
|
184
194
|
ariaInvalid: string | null;
|
|
185
195
|
ariaKeyShortcuts: string | null;
|
|
186
196
|
ariaLabel: string | null;
|
|
197
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
187
198
|
ariaLevel: string | null;
|
|
188
199
|
ariaLive: string | null;
|
|
189
200
|
ariaModal: string | null;
|
|
190
201
|
ariaMultiLine: string | null;
|
|
191
202
|
ariaMultiSelectable: string | null;
|
|
192
203
|
ariaOrientation: string | null;
|
|
204
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
193
205
|
ariaPlaceholder: string | null;
|
|
194
206
|
ariaPosInSet: string | null;
|
|
195
207
|
ariaPressed: string | null;
|
|
196
208
|
ariaReadOnly: string | null;
|
|
209
|
+
ariaRelevant: string | null;
|
|
197
210
|
ariaRequired: string | null;
|
|
198
211
|
ariaRoleDescription: string | null;
|
|
199
212
|
ariaRowCount: string | null;
|
|
@@ -235,7 +248,8 @@ declare const CDSAccordionItem_base: {
|
|
|
235
248
|
replaceChildren(...nodes: (Node | string)[]): void;
|
|
236
249
|
readonly assignedSlot: HTMLSlotElement | null;
|
|
237
250
|
readonly attributeStyleMap: StylePropertyMap;
|
|
238
|
-
|
|
251
|
+
get style(): CSSStyleDeclaration;
|
|
252
|
+
set style(cssText: string);
|
|
239
253
|
contentEditable: string;
|
|
240
254
|
enterKeyHint: string;
|
|
241
255
|
inputMode: string;
|
|
@@ -245,18 +259,19 @@ declare const CDSAccordionItem_base: {
|
|
|
245
259
|
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
246
260
|
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
247
261
|
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
248
|
-
onauxclick: ((this: GlobalEventHandlers, ev:
|
|
262
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
249
263
|
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
250
|
-
|
|
264
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
265
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
251
266
|
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
252
267
|
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
253
268
|
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
254
269
|
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
255
270
|
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
-
onclick: ((this: GlobalEventHandlers, ev:
|
|
271
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
257
272
|
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
258
273
|
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
259
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev:
|
|
274
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
260
275
|
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
261
276
|
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
262
277
|
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -304,6 +319,7 @@ declare const CDSAccordionItem_base: {
|
|
|
304
319
|
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
305
320
|
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
306
321
|
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
322
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
307
323
|
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
308
324
|
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
309
325
|
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
@@ -322,7 +338,7 @@ declare const CDSAccordionItem_base: {
|
|
|
322
338
|
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
323
339
|
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
324
340
|
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
325
|
-
ontoggle: ((this: GlobalEventHandlers, ev:
|
|
341
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
326
342
|
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
327
343
|
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
328
344
|
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
@@ -18,7 +18,7 @@ import styles from './accordion.scss.js';
|
|
|
18
18
|
import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Copyright IBM Corp. 2019,
|
|
21
|
+
* Copyright IBM Corp. 2019, 2026
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -112,10 +112,12 @@ let CDSAccordionItem = class CDSAccordionItem extends FocusMixin(LitElement) {
|
|
|
112
112
|
if (this.dispatchEvent(new CustomEvent(this.constructor.eventBeforeToggle, init))) {
|
|
113
113
|
const { selectorAccordionContent } = this
|
|
114
114
|
.constructor;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
if (!this.open) {
|
|
116
|
+
this.setAttribute('expanding', '');
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
this.setAttribute('collapsing', '');
|
|
120
|
+
}
|
|
119
121
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
120
122
|
this.shadowRoot.querySelector(selectorAccordionContent).addEventListener('animationend', () => {
|
|
121
123
|
this.removeAttribute('expanding');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.js","sources":["../../../src/components/accordion/accordion-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport FocusMixin from '../../globals/mixins/focus';\nimport Handle from '../../globals/internal/handle';\nimport { ACCORDION_ITEM_BREAKPOINT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_ITEM_BREAKPOINT };\n\n/**\n * Observes resize of the given element with the given resize observer.\n *\n * @param observer The resize observer.\n * @param elem The element to observe the resize.\n */\nconst observeResize = (observer: ResizeObserver, elem: Element) => {\n if (!elem) {\n return null;\n }\n observer.observe(elem);\n return {\n release() {\n observer.unobserve(elem);\n return null;\n },\n } as Handle;\n};\n\n/**\n * Accordion item.\n *\n * @element cds-custom-accordion-item\n * @fires cds-custom-accordion-item-beingtoggled\n * The custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n * @fires cds-custom-accordion-item-toggled - The custom event fired after this accordion item is toggled upon a user gesture.\n * @csspart title The title.\n * @csspart content The content.\n */\n@customElement(`${prefix}-accordion-item`)\nclass CDSAccordionItem extends FocusMixin(LitElement) {\n /**\n * The current breakpoint.\n */\n private _currentBreakpoint?: ACCORDION_ITEM_BREAKPOINT;\n\n /**\n * The handle for observing resize of the parent element of this element.\n */\n private _hObserveResize: Handle | null = null;\n\n /**\n * Handles user-initiated toggle request of this accordion item.\n *\n * @param open The new open state.\n */\n private _handleUserInitiatedToggle(open = !this.open) {\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventBeforeToggle,\n init\n )\n )\n ) {\n const { selectorAccordionContent } = this\n .constructor as typeof CDSAccordionItem;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452\n !this.open\n ? this.setAttribute('expanding', '')\n : this.setAttribute('collapsing', '');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelector(\n selectorAccordionContent\n )!.addEventListener('animationend', () => {\n this.removeAttribute('expanding');\n this.removeAttribute('collapsing');\n });\n\n this.open = open;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventToggle,\n init\n )\n );\n }\n }\n\n /**\n * Handler for the `click` event on the expando button.\n */\n private _handleClickExpando() {\n this._handleUserInitiatedToggle();\n }\n\n /**\n * Handler for the `keydown` event on the expando button.\n */\n private _handleKeydownExpando = ({ key }: KeyboardEvent) => {\n if (this.open && (key === 'Esc' || key === 'Escape')) {\n this._handleUserInitiatedToggle(false);\n }\n };\n\n /**\n * The `ResizeObserver` instance for observing element resizes for re-positioning floating menu position.\n */\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452\n // @ts-ignore\n private _resizeObserver = new ResizeObserver(\n (records: ResizeObserverEntry[]) => {\n const { width } = records[records.length - 1].contentRect;\n const { _sizesBreakpoints: sizesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n this._currentBreakpoint = Object.keys(sizesBreakpoints)\n .sort((lhs, rhs) => sizesBreakpoints[rhs] - sizesBreakpoints[lhs])\n .find(\n (size) => width >= sizesBreakpoints[size]\n ) as ACCORDION_ITEM_BREAKPOINT;\n this.requestUpdate();\n }\n );\n\n /**\n * `true` if the accordion item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if the accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * The title text.\n */\n @property({ attribute: 'title' })\n title = '';\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n this._hObserveResize = observeResize(this._resizeObserver, this);\n }\n\n disconnectedCallback() {\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n }\n\n render() {\n const {\n disabled,\n title,\n open,\n _currentBreakpoint: currentBreakpoint,\n _handleClickExpando: handleClickExpando,\n _handleKeydownExpando: handleKeydownExpando,\n } = this;\n const { _classesBreakpoints: classesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n const { [currentBreakpoint!]: classBreakpoint } = classesBreakpoints;\n const contentClasses = classMap({\n [classBreakpoint]: classBreakpoint,\n [`${prefix}--accordion__content`]: true,\n });\n return html`\n <button\n ?disabled=\"${disabled}\"\n type=\"button\"\n part=\"expando\"\n class=\"${prefix}--accordion__heading\"\n aria-controls=\"content\"\n aria-expanded=\"${open}\"\n @click=\"${handleClickExpando}\"\n @keydown=\"${handleKeydownExpando}\">\n ${iconLoader(ChevronRight16, {\n part: 'expando-icon',\n class: `${prefix}--accordion__arrow`,\n })}\n <div part=\"title\" class=\"${prefix}--accordion__title\">\n <slot name=\"title\">${title}</slot>\n </div>\n </button>\n <div class=\"${prefix}--accordion__wrapper\" part=\"wrapper\">\n <div id=\"content\" part=\"content\" class=\"${contentClasses}\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The CSS classes for breakpoints.\n *\n * @private\n */\n static get _classesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.SMALL}`,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.MEDIUM}`,\n };\n }\n\n /**\n * The breakpoints.\n *\n * @private\n */\n static get _sizesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: 480,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: 640,\n };\n }\n\n /**\n * The name of the custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-accordion-item-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this accordion item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-accordion-item-toggled`;\n }\n\n static get selectorAccordionContent() {\n return `.${prefix}--accordion__content`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionItem;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;AA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CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE;AACrB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AA9GP,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CAwNrB;AAED,yBAAe,gBAAgB;;;;"}
|
|
1
|
+
{"version":3,"file":"accordion-item.js","sources":["../../../src/components/accordion/accordion-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport FocusMixin from '../../globals/mixins/focus';\nimport Handle from '../../globals/internal/handle';\nimport { ACCORDION_ITEM_BREAKPOINT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_ITEM_BREAKPOINT };\n\n/**\n * Observes resize of the given element with the given resize observer.\n *\n * @param observer The resize observer.\n * @param elem The element to observe the resize.\n */\nconst observeResize = (observer: ResizeObserver, elem: Element) => {\n if (!elem) {\n return null;\n }\n observer.observe(elem);\n return {\n release() {\n observer.unobserve(elem);\n return null;\n },\n } as Handle;\n};\n\n/**\n * Accordion item.\n *\n * @element cds-custom-accordion-item\n * @fires cds-custom-accordion-item-beingtoggled\n * The custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n * @fires cds-custom-accordion-item-toggled - The custom event fired after this accordion item is toggled upon a user gesture.\n * @csspart title The title.\n * @csspart content The content.\n */\n@customElement(`${prefix}-accordion-item`)\nclass CDSAccordionItem extends FocusMixin(LitElement) {\n /**\n * The current breakpoint.\n */\n private _currentBreakpoint?: ACCORDION_ITEM_BREAKPOINT;\n\n /**\n * The handle for observing resize of the parent element of this element.\n */\n private _hObserveResize: Handle | null = null;\n\n /**\n * Handles user-initiated toggle request of this accordion item.\n *\n * @param open The new open state.\n */\n private _handleUserInitiatedToggle(open = !this.open) {\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventBeforeToggle,\n init\n )\n )\n ) {\n const { selectorAccordionContent } = this\n .constructor as typeof CDSAccordionItem;\n\n if (!this.open) {\n this.setAttribute('expanding', '');\n } else {\n this.setAttribute('collapsing', '');\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelector(\n selectorAccordionContent\n )!.addEventListener('animationend', () => {\n this.removeAttribute('expanding');\n this.removeAttribute('collapsing');\n });\n\n this.open = open;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventToggle,\n init\n )\n );\n }\n }\n\n /**\n * Handler for the `click` event on the expando button.\n */\n private _handleClickExpando() {\n this._handleUserInitiatedToggle();\n }\n\n /**\n * Handler for the `keydown` event on the expando button.\n */\n private _handleKeydownExpando = ({ key }: KeyboardEvent) => {\n if (this.open && (key === 'Esc' || key === 'Escape')) {\n this._handleUserInitiatedToggle(false);\n }\n };\n\n /**\n * The `ResizeObserver` instance for observing element resizes for re-positioning floating menu position.\n */\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452\n // @ts-ignore\n private _resizeObserver = new ResizeObserver(\n (records: ResizeObserverEntry[]) => {\n const { width } = records[records.length - 1].contentRect;\n const { _sizesBreakpoints: sizesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n this._currentBreakpoint = Object.keys(sizesBreakpoints)\n .sort((lhs, rhs) => sizesBreakpoints[rhs] - sizesBreakpoints[lhs])\n .find(\n (size) => width >= sizesBreakpoints[size]\n ) as ACCORDION_ITEM_BREAKPOINT;\n this.requestUpdate();\n }\n );\n\n /**\n * `true` if the accordion item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if the accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * The title text.\n */\n @property({ attribute: 'title' })\n title = '';\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n this._hObserveResize = observeResize(this._resizeObserver, this);\n }\n\n disconnectedCallback() {\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n }\n\n render() {\n const {\n disabled,\n title,\n open,\n _currentBreakpoint: currentBreakpoint,\n _handleClickExpando: handleClickExpando,\n _handleKeydownExpando: handleKeydownExpando,\n } = this;\n const { _classesBreakpoints: classesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n const { [currentBreakpoint!]: classBreakpoint } = classesBreakpoints;\n const contentClasses = classMap({\n [classBreakpoint]: classBreakpoint,\n [`${prefix}--accordion__content`]: true,\n });\n return html`\n <button\n ?disabled=\"${disabled}\"\n type=\"button\"\n part=\"expando\"\n class=\"${prefix}--accordion__heading\"\n aria-controls=\"content\"\n aria-expanded=\"${open}\"\n @click=\"${handleClickExpando}\"\n @keydown=\"${handleKeydownExpando}\">\n ${iconLoader(ChevronRight16, {\n part: 'expando-icon',\n class: `${prefix}--accordion__arrow`,\n })}\n <div part=\"title\" class=\"${prefix}--accordion__title\">\n <slot name=\"title\">${title}</slot>\n </div>\n </button>\n <div class=\"${prefix}--accordion__wrapper\" part=\"wrapper\">\n <div id=\"content\" part=\"content\" class=\"${contentClasses}\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The CSS classes for breakpoints.\n *\n * @private\n */\n static get _classesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.SMALL}`,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.MEDIUM}`,\n };\n }\n\n /**\n * The breakpoints.\n *\n * @private\n */\n static get _sizesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: 480,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: 640,\n };\n }\n\n /**\n * The name of the custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-accordion-item-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this accordion item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-accordion-item-toggled`;\n }\n\n static get selectorAccordionContent() {\n return `.${prefix}--accordion__content`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionItem;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,QAAwB,EAAE,IAAa,KAAI;IAChE,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAI;IACb;AACA,IAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACtB,OAAO;QACL,OAAO,GAAA;AACL,YAAA,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AACxB,YAAA,OAAO,IAAI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AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CAyNrB;AAED,yBAAe,gBAAgB;;;;"}
|
|
@@ -21,7 +21,7 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
|
21
21
|
import { ACCORDION_ALIGNMENT } from './defs.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Copyright IBM Corp. 2019,
|
|
24
|
+
* Copyright IBM Corp. 2019, 2026
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -66,10 +66,12 @@ let CDSAccordionSkeleton = class CDSAccordionSkeleton extends LitElement {
|
|
|
66
66
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
67
67
|
this.shadowRoot.querySelectorAll(this.constructor
|
|
68
68
|
.selectorAccordionItemSkeletons), (elem) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
if (this.isFlush && this.alignment !== 'start') {
|
|
70
|
+
elem.setAttribute('isFlush', '');
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
elem.removeAttribute('isFlush');
|
|
74
|
+
}
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-skeleton.js","sources":["../../../src/components/accordion/accordion-skeleton.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019,
|
|
1
|
+
{"version":3,"file":"accordion-skeleton.js","sources":["../../../src/components/accordion/accordion-skeleton.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { ACCORDION_ALIGNMENT } from './accordion';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport './accordion-item-skeleton';\nimport '../skeleton-text/index';\nimport styles from './accordion.scss?lit';\n\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Skeleton of code snippet.\n */\n@customElement(`${prefix}-accordion-skeleton`)\nclass CDSAccordionSkeleton extends LitElement {\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Set number of items to render\n */\n @property({ type: Number, attribute: 'count' })\n count = 4;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * `true` if the first accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = true;\n\n updated(changedProperties) {\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n if (this.isFlush && this.alignment !== 'start') {\n elem.setAttribute('isFlush', '');\n } else {\n elem.removeAttribute('isFlush');\n }\n }\n );\n }\n }\n\n render() {\n const classes = classMap({\n [`${prefix}--accordion__item`]: true,\n [`${prefix}--accordion__item--active`]: true,\n [`${prefix}--accordion--${this.alignment}`]: this.alignment,\n [`${prefix}--accordion--flush`]:\n this.isFlush && this.alignment !== 'start',\n });\n const numSkeletonItems = this.open ? this.count - 1 : this.count;\n return html`\n ${this.open\n ? html`\n <li class=\"${classes}\">\n <span class=\"${prefix}--accordion__heading\">\n ${iconLoader(ChevronRight16, {\n class: `${prefix}--accordion__arrow`,\n part: 'expando-icon',\n })}\n <cds-custom-skeleton-text\n class=\"${prefix}--accordion__title\"></cds-custom-skeleton-text>\n </span>\n <div class=\"${prefix}--accordion__content\">\n <cds-custom-skeleton-text width=\"90%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"80%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"95%\"></cds-custom-skeleton-text>\n </div>\n </li>\n `\n : ``}\n ${Array.from({ length: numSkeletonItems }).map(\n (_, i, arr) =>\n html`<cds-custom-accordion-item-skeleton\n key=${i}\n ?data-last-item=${i ===\n arr.length - 1}></cds-custom-accordion-item-skeleton>`\n )}\n `;\n }\n\n static get selectorAccordionItemSkeletons() {\n return `${prefix}-accordion-item-skeleton`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionSkeleton;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;AAEG;AAEH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACE;;AAEG;AAEH,QAAA,IAAA,CAAA,SAAS,GAAG,mBAAmB,CAAC,GAAG;AAEnC;;AAEG;QAEH,IAAA,CAAA,KAAK,GAAG,CAAC;AAET;;AAEG;QAEH,IAAA,CAAA,OAAO,GAAG,KAAK;AAEf;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,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,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC9B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAvBR,oBAAoB,GAAA,UAAA,CAAA;AADzB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,mBAAA,CAAqB;AACvC,CAAA,EAAA,oBAAoB,CAyGzB;AAED,6BAAe,oBAAoB;;;;"}
|
|
@@ -15,7 +15,7 @@ import styles from './accordion.scss.js';
|
|
|
15
15
|
import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Copyright IBM Corp. 2019,
|
|
18
|
+
* Copyright IBM Corp. 2019, 2026
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -68,10 +68,12 @@ let CDSAccordion = class CDSAccordion extends LitElement {
|
|
|
68
68
|
changedProperties.has('alignment')) {
|
|
69
69
|
// Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers
|
|
70
70
|
forEach(this.querySelectorAll(this.constructor.selectorAccordionItems), (elem) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
if (this.isFlush && this.alignment !== 'start') {
|
|
72
|
+
elem.setAttribute('isFlush', '');
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
elem.removeAttribute('isFlush');
|
|
76
|
+
}
|
|
75
77
|
});
|
|
76
78
|
}
|
|
77
79
|
if (changedProperties.has('disabled')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019,
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport { ACCORDION_SIZE, ACCORDION_ALIGNMENT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_SIZE, ACCORDION_ALIGNMENT };\n\n/**\n * Accordion container.\n *\n * @element cds-custom-accordion\n */\n@customElement(`${prefix}-accordion`)\nclass CDSAccordion extends LitElement {\n /**\n * Accordion size should be sm, md, lg.\n */\n @property({ reflect: true })\n size = ACCORDION_SIZE.MEDIUM;\n\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * Disable all accordion items inside this accordion.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'list');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('size')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('size', this.size);\n }\n );\n }\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n if (this.isFlush && this.alignment !== 'start') {\n elem.setAttribute('isFlush', '');\n } else {\n elem.removeAttribute('isFlush');\n }\n }\n );\n }\n\n if (changedProperties.has('disabled')) {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n if (this.disabled) {\n elem.setAttribute('disabled', '');\n } else {\n elem.removeAttribute('disabled');\n }\n }\n );\n }\n\n // Marks the last accordion item for styling (simulates :last-child in Shadow DOM)\n const items = Array.from(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n )\n );\n items.forEach((item) => item.removeAttribute('data-last-item'));\n\n const lastVisible = items\n .reverse()\n .find((item) => !(item as HTMLElement).hidden);\n lastVisible?.setAttribute('data-last-item', '');\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static get selectorAccordionItems() {\n return `${prefix}-accordion-item`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordion;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAYH;;;;AAIG;AAEH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;AACE;;AAEG;AAEH,QAAA,IAAA,CAAA,IAAI,GAAG,cAAc,CAAC,MAAM;AAE5B;;AAEG;AAEH,QAAA,IAAA,CAAA,SAAS,GAAG,mBAAmB,CAAC,GAAG;AAEnC;;AAEG;QAEH,IAAA,CAAA,OAAO,GAAG,KAAK;AAEf;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;IAyFlB;IAvFE,iBAAiB,GAAA;QACf,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC9B,YAAA,IAAI,CA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,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAvBb,YAAY,GAAA,UAAA,CAAA;AADjB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY;AAC9B,CAAA,EAAA,YAAY,CAgHjB;AAED,qBAAe,YAAY;;;;"}
|
|
@@ -20,7 +20,7 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
|
20
20
|
import { iconLoader } from '../../globals/internal/icon-loader.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Copyright IBM Corp. 2019,
|
|
23
|
+
* Copyright IBM Corp. 2019, 2026
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -135,10 +135,11 @@ let CDSAILabel = class CDSAILabel extends CDSToggleTip {
|
|
|
135
135
|
attributeChangedCallback(name, old, newValue) {
|
|
136
136
|
var _a;
|
|
137
137
|
super.attributeChangedCallback(name, old, newValue);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
if (name === 'revert-active') {
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
140
|
+
// @ts-ignore typescript does not think requestUpdate() exists on parentElement
|
|
141
|
+
(_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.requestUpdate();
|
|
142
|
+
}
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
145
|
__decorate([
|