@carbon/web-components 1.26.0-rc.2 → 1.26.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/dist/accordion.min.js +2 -2
- package/dist/accordion.rtl.min.js +2 -2
- package/dist/breadcrumb.min.js +1 -1
- package/dist/breadcrumb.rtl.min.js +1 -1
- package/dist/{button-0eeac278.js → button-c71594fa.js} +2 -2
- package/dist/{button-4b4837f0.js → button-e31ba29e.js} +2 -2
- package/dist/button.min.js +1 -1
- package/dist/button.rtl.min.js +1 -1
- package/dist/{decorators-0a905d41.js → carbon-element-18175602.js} +9 -1
- package/dist/checkbox-3fc0ced9.js +65 -0
- package/dist/checkbox-a740039c.js +65 -0
- package/dist/checkbox.min.js +1 -1
- package/dist/checkbox.rtl.min.js +1 -1
- package/dist/code-snippet.min.js +2 -2
- package/dist/code-snippet.rtl.min.js +2 -2
- package/dist/combo-box.min.js +1 -1
- package/dist/combo-box.rtl.min.js +1 -1
- package/dist/{content-switcher-item-d37071b9.js → content-switcher-item-77b690a9.js} +2 -2
- package/dist/{content-switcher-item-db96b7e3.js → content-switcher-item-96395561.js} +2 -2
- package/dist/content-switcher.min.js +1 -1
- package/dist/content-switcher.rtl.min.js +1 -1
- package/dist/copy-button-50221d0f.js +65 -0
- package/dist/copy-button-9cb9a0c6.js +65 -0
- package/dist/copy-button.min.js +1 -1
- package/dist/copy-button.rtl.min.js +1 -1
- package/dist/data-table.min.js +2 -2
- package/dist/data-table.rtl.min.js +2 -2
- package/dist/date-picker.min.js +3 -3
- package/dist/date-picker.rtl.min.js +3 -3
- package/dist/decorators-56213c84.js +78 -0
- package/dist/{dropdown-item-1630cdb0.js → dropdown-item-62abeaa7.js} +2 -2
- package/dist/{dropdown-item-8c9136d9.js → dropdown-item-97eb5366.js} +2 -2
- package/dist/dropdown.min.js +1 -1
- package/dist/dropdown.rtl.min.js +1 -1
- package/dist/file-uploader.min.js +2 -2
- package/dist/file-uploader.rtl.min.js +2 -2
- package/dist/form.min.js +1 -1
- package/dist/form.rtl.min.js +1 -1
- package/dist/inline-loading.min.js +2 -2
- package/dist/inline-loading.rtl.min.js +2 -2
- package/dist/{input-1583283e.js → input-254c34ac.js} +2 -2
- package/dist/{input-b817aa3d.js → input-bb75e577.js} +2 -2
- package/dist/input.min.js +1 -1
- package/dist/input.rtl.min.js +1 -1
- package/dist/link-3c734b06.js +65 -0
- package/dist/link-aecb4d2a.js +65 -0
- package/dist/link.min.js +1 -1
- package/dist/link.rtl.min.js +1 -1
- package/dist/list.min.js +1 -1
- package/dist/list.rtl.min.js +1 -1
- package/dist/loading-9ce928f0.js +65 -0
- package/dist/loading-c77e0b8d.js +65 -0
- package/dist/loading.min.js +1 -1
- package/dist/loading.rtl.min.js +1 -1
- package/dist/modal.min.js +2 -2
- package/dist/modal.rtl.min.js +2 -2
- package/dist/multi-select.min.js +1 -1
- package/dist/multi-select.rtl.min.js +1 -1
- package/dist/notification.min.js +2 -2
- package/dist/notification.rtl.min.js +2 -2
- package/dist/number-input.min.js +2 -2
- package/dist/number-input.rtl.min.js +2 -2
- package/dist/overflow-menu.min.js +2 -2
- package/dist/overflow-menu.rtl.min.js +2 -2
- package/dist/pagination.min.js +1 -1
- package/dist/pagination.rtl.min.js +1 -1
- package/dist/progress-indicator.min.js +2 -2
- package/dist/progress-indicator.rtl.min.js +2 -2
- package/dist/radio-button.min.js +2 -2
- package/dist/radio-button.rtl.min.js +2 -2
- package/dist/search-99e65bb6.js +65 -0
- package/dist/search-dfddc65c.js +65 -0
- package/dist/search.min.js +1 -1
- package/dist/search.rtl.min.js +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.rtl.min.js +1 -1
- package/dist/skeleton-placeholder.min.js +1 -1
- package/dist/skeleton-placeholder.rtl.min.js +1 -1
- package/dist/skeleton-text.min.js +2 -2
- package/dist/skeleton-text.rtl.min.js +2 -2
- package/dist/skip-to-content.min.js +1 -1
- package/dist/skip-to-content.rtl.min.js +1 -1
- package/dist/slider.min.js +1 -1
- package/dist/slider.rtl.min.js +1 -1
- package/dist/structured-list.min.js +1 -1
- package/dist/structured-list.rtl.min.js +1 -1
- package/dist/tabs.min.js +2 -2
- package/dist/tabs.rtl.min.js +2 -2
- package/dist/tag.min.js +2 -2
- package/dist/tag.rtl.min.js +2 -2
- package/dist/textarea.min.js +1 -1
- package/dist/textarea.rtl.min.js +1 -1
- package/dist/tile.min.js +1 -1
- package/dist/tile.rtl.min.js +1 -1
- package/dist/toggle.min.js +2 -2
- package/dist/toggle.rtl.min.js +2 -2
- package/dist/tooltip.min.js +2 -2
- package/dist/tooltip.rtl.min.js +2 -2
- package/dist/ui-shell.min.js +2 -2
- package/dist/ui-shell.rtl.min.js +2 -2
- package/es/components/accordion/accordion-item.d.ts +1 -1
- package/es/components/accordion/accordion-item.d.ts.map +1 -1
- package/es/components/accordion/accordion-item.js +4 -3
- package/es/components/accordion/accordion-item.js.map +1 -1
- package/es/components/accordion/accordion.d.ts +1 -1
- package/es/components/accordion/accordion.d.ts.map +1 -1
- package/es/components/accordion/accordion.js +3 -2
- package/es/components/accordion/accordion.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/es/components/breadcrumb/breadcrumb-item.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.js +3 -2
- package/es/components/breadcrumb/breadcrumb-item.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.d.ts +1 -1
- package/es/components/breadcrumb/breadcrumb-link.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.js +2 -2
- package/es/components/breadcrumb/breadcrumb-link.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js +3 -2
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/es/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb.js +3 -2
- package/es/components/breadcrumb/breadcrumb.js.map +1 -1
- package/es/components/button/button-skeleton.d.ts +1 -1
- package/es/components/button/button-skeleton.d.ts.map +1 -1
- package/es/components/button/button-skeleton.js +3 -2
- package/es/components/button/button-skeleton.js.map +1 -1
- package/es/components/button/button.d.ts +1 -1
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +3 -2
- package/es/components/button/button.js.map +1 -1
- package/es/components/checkbox/checkbox.d.ts +1 -1
- package/es/components/checkbox/checkbox.d.ts.map +1 -1
- package/es/components/checkbox/checkbox.js +3 -2
- package/es/components/checkbox/checkbox.js.map +1 -1
- package/es/components/code-snippet/code-snippet-skeleton.d.ts +1 -1
- package/es/components/code-snippet/code-snippet-skeleton.d.ts.map +1 -1
- package/es/components/code-snippet/code-snippet-skeleton.js +3 -2
- package/es/components/code-snippet/code-snippet-skeleton.js.map +1 -1
- package/es/components/code-snippet/code-snippet.d.ts +1 -1
- package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
- package/es/components/code-snippet/code-snippet.js +3 -2
- package/es/components/code-snippet/code-snippet.js.map +1 -1
- package/es/components/combo-box/combo-box-item.d.ts +1 -1
- package/es/components/combo-box/combo-box-item.d.ts.map +1 -1
- package/es/components/combo-box/combo-box-item.js +2 -2
- package/es/components/combo-box/combo-box-item.js.map +1 -1
- package/es/components/combo-box/combo-box.d.ts +1 -1
- package/es/components/combo-box/combo-box.d.ts.map +1 -1
- package/es/components/combo-box/combo-box.js +3 -2
- package/es/components/combo-box/combo-box.js.map +1 -1
- package/es/components/content-switcher/content-switcher-item.d.ts +1 -1
- package/es/components/content-switcher/content-switcher-item.d.ts.map +1 -1
- package/es/components/content-switcher/content-switcher-item.js +3 -2
- package/es/components/content-switcher/content-switcher-item.js.map +1 -1
- package/es/components/content-switcher/content-switcher.d.ts +1 -1
- package/es/components/content-switcher/content-switcher.d.ts.map +1 -1
- package/es/components/content-switcher/content-switcher.js +3 -2
- package/es/components/content-switcher/content-switcher.js.map +1 -1
- package/es/components/copy-button/copy-button.d.ts +1 -1
- package/es/components/copy-button/copy-button.d.ts.map +1 -1
- package/es/components/copy-button/copy-button.js +3 -2
- package/es/components/copy-button/copy-button.js.map +1 -1
- package/es/components/data-table/table-batch-actions.d.ts +1 -1
- package/es/components/data-table/table-batch-actions.d.ts.map +1 -1
- package/es/components/data-table/table-batch-actions.js +3 -2
- package/es/components/data-table/table-batch-actions.js.map +1 -1
- package/es/components/data-table/table-body.d.ts +1 -1
- package/es/components/data-table/table-body.d.ts.map +1 -1
- package/es/components/data-table/table-body.js +3 -2
- package/es/components/data-table/table-body.js.map +1 -1
- package/es/components/data-table/table-cell-skeleton.d.ts +1 -1
- package/es/components/data-table/table-cell-skeleton.d.ts.map +1 -1
- package/es/components/data-table/table-cell-skeleton.js +3 -2
- package/es/components/data-table/table-cell-skeleton.js.map +1 -1
- package/es/components/data-table/table-cell.d.ts +1 -1
- package/es/components/data-table/table-cell.d.ts.map +1 -1
- package/es/components/data-table/table-cell.js +3 -2
- package/es/components/data-table/table-cell.js.map +1 -1
- package/es/components/data-table/table-expand-row.d.ts +1 -1
- package/es/components/data-table/table-expand-row.d.ts.map +1 -1
- package/es/components/data-table/table-expand-row.js +3 -2
- package/es/components/data-table/table-expand-row.js.map +1 -1
- package/es/components/data-table/table-expanded-row.d.ts +1 -1
- package/es/components/data-table/table-expanded-row.d.ts.map +1 -1
- package/es/components/data-table/table-expanded-row.js +3 -2
- package/es/components/data-table/table-expanded-row.js.map +1 -1
- package/es/components/data-table/table-head.d.ts +1 -1
- package/es/components/data-table/table-head.d.ts.map +1 -1
- package/es/components/data-table/table-head.js +3 -2
- package/es/components/data-table/table-head.js.map +1 -1
- package/es/components/data-table/table-header-cell-skeleton.d.ts +1 -1
- package/es/components/data-table/table-header-cell-skeleton.d.ts.map +1 -1
- package/es/components/data-table/table-header-cell-skeleton.js +2 -2
- package/es/components/data-table/table-header-cell-skeleton.js.map +1 -1
- package/es/components/data-table/table-header-cell.d.ts +1 -1
- package/es/components/data-table/table-header-cell.d.ts.map +1 -1
- package/es/components/data-table/table-header-cell.js +3 -2
- package/es/components/data-table/table-header-cell.js.map +1 -1
- package/es/components/data-table/table-header-expand-row.d.ts +1 -1
- package/es/components/data-table/table-header-expand-row.d.ts.map +1 -1
- package/es/components/data-table/table-header-expand-row.js +2 -2
- package/es/components/data-table/table-header-expand-row.js.map +1 -1
- package/es/components/data-table/table-header-row.d.ts +1 -1
- package/es/components/data-table/table-header-row.d.ts.map +1 -1
- package/es/components/data-table/table-header-row.js +2 -2
- package/es/components/data-table/table-header-row.js.map +1 -1
- package/es/components/data-table/table-row.d.ts +1 -1
- package/es/components/data-table/table-row.d.ts.map +1 -1
- package/es/components/data-table/table-row.js +3 -2
- package/es/components/data-table/table-row.js.map +1 -1
- package/es/components/data-table/table-toolbar-content.d.ts +1 -1
- package/es/components/data-table/table-toolbar-content.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar-content.js +3 -2
- package/es/components/data-table/table-toolbar-content.js.map +1 -1
- package/es/components/data-table/table-toolbar-search.d.ts +1 -1
- package/es/components/data-table/table-toolbar-search.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar-search.js +3 -2
- package/es/components/data-table/table-toolbar-search.js.map +1 -1
- package/es/components/data-table/table-toolbar.d.ts +1 -1
- package/es/components/data-table/table-toolbar.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar.js +3 -2
- package/es/components/data-table/table-toolbar.js.map +1 -1
- package/es/components/data-table/table.d.ts +1 -1
- package/es/components/data-table/table.d.ts.map +1 -1
- package/es/components/data-table/table.js +3 -2
- package/es/components/data-table/table.js.map +1 -1
- package/es/components/date-picker/date-picker-input-skeleton.d.ts +1 -1
- package/es/components/date-picker/date-picker-input-skeleton.d.ts.map +1 -1
- package/es/components/date-picker/date-picker-input-skeleton.js +3 -2
- package/es/components/date-picker/date-picker-input-skeleton.js.map +1 -1
- package/es/components/date-picker/date-picker-input.d.ts +3 -7
- package/es/components/date-picker/date-picker-input.d.ts.map +1 -1
- package/es/components/date-picker/date-picker-input.js +3 -2
- package/es/components/date-picker/date-picker-input.js.map +1 -1
- package/es/components/date-picker/date-picker.d.ts +2 -4
- package/es/components/date-picker/date-picker.d.ts.map +1 -1
- package/es/components/date-picker/date-picker.js +3 -2
- package/es/components/date-picker/date-picker.js.map +1 -1
- package/es/components/dropdown/dropdown-item.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-item.js +3 -2
- package/es/components/dropdown/dropdown-item.js.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.d.ts +1 -1
- package/es/components/dropdown/dropdown-skeleton.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.js +3 -2
- package/es/components/dropdown/dropdown-skeleton.js.map +1 -1
- package/es/components/dropdown/dropdown.d.ts.map +1 -1
- package/es/components/dropdown/dropdown.js +2 -1
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/file-uploader/drop-container.d.ts +4 -1
- package/es/components/file-uploader/drop-container.d.ts.map +1 -1
- package/es/components/file-uploader/drop-container.js +3 -2
- package/es/components/file-uploader/drop-container.js.map +1 -1
- package/es/components/file-uploader/file-uploader-item.d.ts +1 -1
- package/es/components/file-uploader/file-uploader-item.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader-item.js +3 -2
- package/es/components/file-uploader/file-uploader-item.js.map +1 -1
- package/es/components/file-uploader/file-uploader.d.ts +1 -1
- package/es/components/file-uploader/file-uploader.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader.js +3 -2
- package/es/components/file-uploader/file-uploader.js.map +1 -1
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.d.ts.map +1 -1
- package/es/components/form/form-item.js +3 -2
- package/es/components/form/form-item.js.map +1 -1
- package/es/components/inline-loading/inline-loading.d.ts +1 -1
- package/es/components/inline-loading/inline-loading.d.ts.map +1 -1
- package/es/components/inline-loading/inline-loading.js +3 -2
- package/es/components/inline-loading/inline-loading.js.map +1 -1
- package/es/components/input/input.d.ts +1 -4
- package/es/components/input/input.d.ts.map +1 -1
- package/es/components/input/input.js +3 -2
- package/es/components/input/input.js.map +1 -1
- package/es/components/link/link.d.ts +1 -1
- package/es/components/link/link.d.ts.map +1 -1
- package/es/components/link/link.js +3 -2
- package/es/components/link/link.js.map +1 -1
- package/es/components/list/list-item.d.ts +1 -1
- package/es/components/list/list-item.d.ts.map +1 -1
- package/es/components/list/list-item.js +3 -2
- package/es/components/list/list-item.js.map +1 -1
- package/es/components/list/ordered-list.d.ts +1 -1
- package/es/components/list/ordered-list.d.ts.map +1 -1
- package/es/components/list/ordered-list.js +3 -2
- package/es/components/list/ordered-list.js.map +1 -1
- package/es/components/list/unordered-list.d.ts +1 -1
- package/es/components/list/unordered-list.d.ts.map +1 -1
- package/es/components/list/unordered-list.js +3 -2
- package/es/components/list/unordered-list.js.map +1 -1
- package/es/components/loading/loading.d.ts +1 -1
- package/es/components/loading/loading.d.ts.map +1 -1
- package/es/components/loading/loading.js +3 -2
- package/es/components/loading/loading.js.map +1 -1
- package/es/components/modal/modal-body.d.ts +1 -1
- package/es/components/modal/modal-body.d.ts.map +1 -1
- package/es/components/modal/modal-body.js +3 -2
- package/es/components/modal/modal-body.js.map +1 -1
- package/es/components/modal/modal-close-button.d.ts +1 -1
- package/es/components/modal/modal-close-button.d.ts.map +1 -1
- package/es/components/modal/modal-close-button.js +3 -2
- package/es/components/modal/modal-close-button.js.map +1 -1
- package/es/components/modal/modal-footer-button.d.ts +1 -1
- package/es/components/modal/modal-footer-button.d.ts.map +1 -1
- package/es/components/modal/modal-footer-button.js +2 -2
- package/es/components/modal/modal-footer-button.js.map +1 -1
- package/es/components/modal/modal-footer.d.ts +1 -1
- package/es/components/modal/modal-footer.d.ts.map +1 -1
- package/es/components/modal/modal-footer.js +3 -2
- package/es/components/modal/modal-footer.js.map +1 -1
- package/es/components/modal/modal-header.d.ts +1 -1
- package/es/components/modal/modal-header.d.ts.map +1 -1
- package/es/components/modal/modal-header.js +3 -2
- package/es/components/modal/modal-header.js.map +1 -1
- package/es/components/modal/modal-heading.d.ts +1 -1
- package/es/components/modal/modal-heading.d.ts.map +1 -1
- package/es/components/modal/modal-heading.js +3 -2
- package/es/components/modal/modal-heading.js.map +1 -1
- package/es/components/modal/modal-label.d.ts +1 -1
- package/es/components/modal/modal-label.d.ts.map +1 -1
- package/es/components/modal/modal-label.js +3 -2
- package/es/components/modal/modal-label.js.map +1 -1
- package/es/components/modal/modal.d.ts +1 -1
- package/es/components/modal/modal.d.ts.map +1 -1
- package/es/components/modal/modal.js +3 -2
- package/es/components/modal/modal.js.map +1 -1
- package/es/components/multi-select/multi-select-item.d.ts +1 -1
- package/es/components/multi-select/multi-select-item.d.ts.map +1 -1
- package/es/components/multi-select/multi-select-item.js +3 -2
- package/es/components/multi-select/multi-select-item.js.map +1 -1
- package/es/components/multi-select/multi-select.d.ts +1 -1
- package/es/components/multi-select/multi-select.d.ts.map +1 -1
- package/es/components/multi-select/multi-select.js +3 -2
- package/es/components/multi-select/multi-select.js.map +1 -1
- package/es/components/notification/inline-notification.d.ts +1 -1
- package/es/components/notification/inline-notification.d.ts.map +1 -1
- package/es/components/notification/inline-notification.js +4 -3
- package/es/components/notification/inline-notification.js.map +1 -1
- package/es/components/notification/toast-notification.d.ts +1 -1
- package/es/components/notification/toast-notification.d.ts.map +1 -1
- package/es/components/notification/toast-notification.js +3 -2
- package/es/components/notification/toast-notification.js.map +1 -1
- package/es/components/number-input/number-input-skeleton.d.ts +1 -1
- package/es/components/number-input/number-input-skeleton.d.ts.map +1 -1
- package/es/components/number-input/number-input-skeleton.js +3 -2
- package/es/components/number-input/number-input-skeleton.js.map +1 -1
- package/es/components/number-input/number-input.d.ts +1 -1
- package/es/components/number-input/number-input.d.ts.map +1 -1
- package/es/components/number-input/number-input.js +3 -2
- package/es/components/number-input/number-input.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu-body.d.ts +1 -1
- package/es/components/overflow-menu/overflow-menu-body.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu-body.js +3 -2
- package/es/components/overflow-menu/overflow-menu-body.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.d.ts +1 -1
- package/es/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.js +3 -2
- package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu.d.ts +4 -1
- package/es/components/overflow-menu/overflow-menu.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu.js +3 -2
- package/es/components/overflow-menu/overflow-menu.js.map +1 -1
- package/es/components/pagination/page-sizes-select.d.ts +1 -1
- package/es/components/pagination/page-sizes-select.d.ts.map +1 -1
- package/es/components/pagination/page-sizes-select.js +3 -2
- package/es/components/pagination/page-sizes-select.js.map +1 -1
- package/es/components/pagination/pages-select.d.ts +1 -1
- package/es/components/pagination/pages-select.d.ts.map +1 -1
- package/es/components/pagination/pages-select.js +3 -2
- package/es/components/pagination/pages-select.js.map +1 -1
- package/es/components/pagination/pagination.d.ts +1 -1
- package/es/components/pagination/pagination.d.ts.map +1 -1
- package/es/components/pagination/pagination.js +3 -2
- package/es/components/pagination/pagination.js.map +1 -1
- package/es/components/progress-indicator/progress-indicator-skeleton.d.ts +1 -1
- package/es/components/progress-indicator/progress-indicator-skeleton.d.ts.map +1 -1
- package/es/components/progress-indicator/progress-indicator-skeleton.js +3 -2
- package/es/components/progress-indicator/progress-indicator-skeleton.js.map +1 -1
- package/es/components/progress-indicator/progress-indicator.d.ts +1 -1
- package/es/components/progress-indicator/progress-indicator.d.ts.map +1 -1
- package/es/components/progress-indicator/progress-indicator.js +3 -2
- package/es/components/progress-indicator/progress-indicator.js.map +1 -1
- package/es/components/progress-indicator/progress-step-skeleton.d.ts +1 -1
- package/es/components/progress-indicator/progress-step-skeleton.d.ts.map +1 -1
- package/es/components/progress-indicator/progress-step-skeleton.js +3 -2
- package/es/components/progress-indicator/progress-step-skeleton.js.map +1 -1
- package/es/components/progress-indicator/progress-step.d.ts +1 -1
- package/es/components/progress-indicator/progress-step.d.ts.map +1 -1
- package/es/components/progress-indicator/progress-step.js +3 -2
- package/es/components/progress-indicator/progress-step.js.map +1 -1
- package/es/components/radio-button/radio-button-group.d.ts +1 -1
- package/es/components/radio-button/radio-button-group.d.ts.map +1 -1
- package/es/components/radio-button/radio-button-group.js +3 -2
- package/es/components/radio-button/radio-button-group.js.map +1 -1
- package/es/components/radio-button/radio-button-skeleton.d.ts +1 -1
- package/es/components/radio-button/radio-button-skeleton.d.ts.map +1 -1
- package/es/components/radio-button/radio-button-skeleton.js +3 -2
- package/es/components/radio-button/radio-button-skeleton.js.map +1 -1
- package/es/components/radio-button/radio-button.d.ts +1 -1
- package/es/components/radio-button/radio-button.d.ts.map +1 -1
- package/es/components/radio-button/radio-button.js +3 -2
- package/es/components/radio-button/radio-button.js.map +1 -1
- package/es/components/search/search-skeleton.d.ts +1 -1
- package/es/components/search/search-skeleton.d.ts.map +1 -1
- package/es/components/search/search-skeleton.js +3 -2
- package/es/components/search/search-skeleton.js.map +1 -1
- package/es/components/search/search.d.ts +1 -1
- package/es/components/search/search.d.ts.map +1 -1
- package/es/components/search/search.js +3 -2
- package/es/components/search/search.js.map +1 -1
- package/es/components/select/select-item-group.d.ts +1 -1
- package/es/components/select/select-item-group.d.ts.map +1 -1
- package/es/components/select/select-item-group.js +3 -2
- package/es/components/select/select-item-group.js.map +1 -1
- package/es/components/select/select-item.d.ts +1 -1
- package/es/components/select/select-item.d.ts.map +1 -1
- package/es/components/select/select-item.js +3 -2
- package/es/components/select/select-item.js.map +1 -1
- package/es/components/select/select.d.ts +6 -2
- package/es/components/select/select.d.ts.map +1 -1
- package/es/components/select/select.js +3 -2
- package/es/components/select/select.js.map +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts.map +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.js +3 -2
- package/es/components/skeleton-placeholder/skeleton-placeholder.js.map +1 -1
- package/es/components/skeleton-text/skeleton-text.d.ts +1 -1
- package/es/components/skeleton-text/skeleton-text.d.ts.map +1 -1
- package/es/components/skeleton-text/skeleton-text.js +3 -2
- package/es/components/skeleton-text/skeleton-text.js.map +1 -1
- package/es/components/skip-to-content/skip-to-content.d.ts +1 -1
- package/es/components/skip-to-content/skip-to-content.d.ts.map +1 -1
- package/es/components/skip-to-content/skip-to-content.js +3 -2
- package/es/components/skip-to-content/skip-to-content.js.map +1 -1
- package/es/components/slider/slider-input.d.ts +1 -1
- package/es/components/slider/slider-input.d.ts.map +1 -1
- package/es/components/slider/slider-input.js +3 -2
- package/es/components/slider/slider-input.js.map +1 -1
- package/es/components/slider/slider-skeleton.d.ts +1 -1
- package/es/components/slider/slider-skeleton.d.ts.map +1 -1
- package/es/components/slider/slider-skeleton.js +3 -2
- package/es/components/slider/slider-skeleton.js.map +1 -1
- package/es/components/slider/slider.d.ts +1 -1
- package/es/components/slider/slider.d.ts.map +1 -1
- package/es/components/slider/slider.js +3 -2
- package/es/components/slider/slider.js.map +1 -1
- package/es/components/structured-list/structured-list-body.d.ts +1 -1
- package/es/components/structured-list/structured-list-body.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-body.js +3 -2
- package/es/components/structured-list/structured-list-body.js.map +1 -1
- package/es/components/structured-list/structured-list-cell.d.ts +1 -1
- package/es/components/structured-list/structured-list-cell.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-cell.js +3 -2
- package/es/components/structured-list/structured-list-cell.js.map +1 -1
- package/es/components/structured-list/structured-list-head.d.ts +1 -1
- package/es/components/structured-list/structured-list-head.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-head.js +3 -2
- package/es/components/structured-list/structured-list-head.js.map +1 -1
- package/es/components/structured-list/structured-list-header-cell-skeleton.d.ts +1 -1
- package/es/components/structured-list/structured-list-header-cell-skeleton.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-header-cell-skeleton.js +3 -2
- package/es/components/structured-list/structured-list-header-cell-skeleton.js.map +1 -1
- package/es/components/structured-list/structured-list-header-cell.d.ts +1 -1
- package/es/components/structured-list/structured-list-header-cell.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-header-cell.js +3 -2
- package/es/components/structured-list/structured-list-header-cell.js.map +1 -1
- package/es/components/structured-list/structured-list-header-row.d.ts +1 -1
- package/es/components/structured-list/structured-list-header-row.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-header-row.js +3 -2
- package/es/components/structured-list/structured-list-header-row.js.map +1 -1
- package/es/components/structured-list/structured-list-row.d.ts +1 -1
- package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-row.js +3 -2
- package/es/components/structured-list/structured-list-row.js.map +1 -1
- package/es/components/structured-list/structured-list.d.ts +1 -1
- package/es/components/structured-list/structured-list.d.ts.map +1 -1
- package/es/components/structured-list/structured-list.js +3 -2
- package/es/components/structured-list/structured-list.js.map +1 -1
- package/es/components/tabs/tab-skeleton.d.ts +1 -1
- package/es/components/tabs/tab-skeleton.d.ts.map +1 -1
- package/es/components/tabs/tab-skeleton.js +3 -2
- package/es/components/tabs/tab-skeleton.js.map +1 -1
- package/es/components/tabs/tab.d.ts +1 -1
- package/es/components/tabs/tab.d.ts.map +1 -1
- package/es/components/tabs/tab.js +3 -2
- package/es/components/tabs/tab.js.map +1 -1
- package/es/components/tabs/tabs-skeleton.d.ts +1 -1
- package/es/components/tabs/tabs-skeleton.d.ts.map +1 -1
- package/es/components/tabs/tabs-skeleton.js +3 -2
- package/es/components/tabs/tabs-skeleton.js.map +1 -1
- package/es/components/tabs/tabs.d.ts +3 -3
- package/es/components/tabs/tabs.d.ts.map +1 -1
- package/es/components/tabs/tabs.js +5 -4
- package/es/components/tabs/tabs.js.map +1 -1
- package/es/components/tag/filter-tag.d.ts +5 -2
- package/es/components/tag/filter-tag.d.ts.map +1 -1
- package/es/components/tag/filter-tag.js +3 -2
- package/es/components/tag/filter-tag.js.map +1 -1
- package/es/components/tag/tag.d.ts +1 -1
- package/es/components/tag/tag.d.ts.map +1 -1
- package/es/components/tag/tag.js +3 -2
- package/es/components/tag/tag.js.map +1 -1
- package/es/components/textarea/textarea-skeleton.d.ts +1 -1
- package/es/components/textarea/textarea-skeleton.d.ts.map +1 -1
- package/es/components/textarea/textarea-skeleton.js +3 -2
- package/es/components/textarea/textarea-skeleton.js.map +1 -1
- package/es/components/textarea/textarea.d.ts +1 -1
- package/es/components/textarea/textarea.d.ts.map +1 -1
- package/es/components/textarea/textarea.js +3 -2
- package/es/components/textarea/textarea.js.map +1 -1
- package/es/components/tile/clickable-tile.d.ts +1 -1
- package/es/components/tile/clickable-tile.d.ts.map +1 -1
- package/es/components/tile/clickable-tile.js +3 -2
- package/es/components/tile/clickable-tile.js.map +1 -1
- package/es/components/tile/expandable-tile.d.ts +1 -1
- package/es/components/tile/expandable-tile.d.ts.map +1 -1
- package/es/components/tile/expandable-tile.js +3 -2
- package/es/components/tile/expandable-tile.js.map +1 -1
- package/es/components/tile/radio-tile.d.ts +1 -1
- package/es/components/tile/radio-tile.d.ts.map +1 -1
- package/es/components/tile/radio-tile.js +2 -2
- package/es/components/tile/radio-tile.js.map +1 -1
- package/es/components/tile/selectable-tile.d.ts.map +1 -1
- package/es/components/tile/selectable-tile.js +2 -1
- package/es/components/tile/selectable-tile.js.map +1 -1
- package/es/components/tile/tile-group.d.ts +1 -1
- package/es/components/tile/tile-group.d.ts.map +1 -1
- package/es/components/tile/tile-group.js +3 -2
- package/es/components/tile/tile-group.js.map +1 -1
- package/es/components/tile/tile.d.ts +1 -1
- package/es/components/tile/tile.d.ts.map +1 -1
- package/es/components/tile/tile.js +3 -2
- package/es/components/tile/tile.js.map +1 -1
- package/es/components/toggle/toggle.d.ts +1 -1
- package/es/components/toggle/toggle.d.ts.map +1 -1
- package/es/components/toggle/toggle.js +3 -2
- package/es/components/toggle/toggle.js.map +1 -1
- package/es/components/tooltip/tooltip-body.d.ts.map +1 -1
- package/es/components/tooltip/tooltip-body.js +2 -1
- package/es/components/tooltip/tooltip-body.js.map +1 -1
- package/es/components/tooltip/tooltip-definition.d.ts +1 -1
- package/es/components/tooltip/tooltip-definition.d.ts.map +1 -1
- package/es/components/tooltip/tooltip-definition.js +3 -2
- package/es/components/tooltip/tooltip-definition.js.map +1 -1
- package/es/components/tooltip/tooltip-footer.d.ts +1 -1
- package/es/components/tooltip/tooltip-footer.d.ts.map +1 -1
- package/es/components/tooltip/tooltip-footer.js +3 -2
- package/es/components/tooltip/tooltip-footer.js.map +1 -1
- package/es/components/tooltip/tooltip-icon.d.ts +1 -1
- package/es/components/tooltip/tooltip-icon.d.ts.map +1 -1
- package/es/components/tooltip/tooltip-icon.js +3 -2
- package/es/components/tooltip/tooltip-icon.js.map +1 -1
- package/es/components/tooltip/tooltip.d.ts.map +1 -1
- package/es/components/tooltip/tooltip.js +2 -1
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/components/ui-shell/header-menu-button.d.ts +1 -1
- package/es/components/ui-shell/header-menu-button.d.ts.map +1 -1
- package/es/components/ui-shell/header-menu-button.js +3 -2
- package/es/components/ui-shell/header-menu-button.js.map +1 -1
- package/es/components/ui-shell/header-menu-item.d.ts +1 -1
- package/es/components/ui-shell/header-menu-item.d.ts.map +1 -1
- package/es/components/ui-shell/header-menu-item.js +2 -2
- package/es/components/ui-shell/header-menu-item.js.map +1 -1
- package/es/components/ui-shell/header-menu.d.ts +1 -1
- package/es/components/ui-shell/header-menu.d.ts.map +1 -1
- package/es/components/ui-shell/header-menu.js +3 -2
- package/es/components/ui-shell/header-menu.js.map +1 -1
- package/es/components/ui-shell/header-name.d.ts +1 -1
- package/es/components/ui-shell/header-name.d.ts.map +1 -1
- package/es/components/ui-shell/header-name.js +3 -2
- package/es/components/ui-shell/header-name.js.map +1 -1
- package/es/components/ui-shell/header-nav-item.d.ts +1 -1
- package/es/components/ui-shell/header-nav-item.d.ts.map +1 -1
- package/es/components/ui-shell/header-nav-item.js +3 -2
- package/es/components/ui-shell/header-nav-item.js.map +1 -1
- package/es/components/ui-shell/header-nav.d.ts +1 -1
- package/es/components/ui-shell/header-nav.d.ts.map +1 -1
- package/es/components/ui-shell/header-nav.js +3 -2
- package/es/components/ui-shell/header-nav.js.map +1 -1
- package/es/components/ui-shell/header.d.ts +1 -1
- package/es/components/ui-shell/header.d.ts.map +1 -1
- package/es/components/ui-shell/header.js +3 -2
- package/es/components/ui-shell/header.js.map +1 -1
- package/es/components/ui-shell/side-nav-divider.d.ts +1 -1
- package/es/components/ui-shell/side-nav-divider.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-divider.js +3 -2
- package/es/components/ui-shell/side-nav-divider.js.map +1 -1
- package/es/components/ui-shell/side-nav-items.d.ts +1 -1
- package/es/components/ui-shell/side-nav-items.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-items.js +3 -2
- package/es/components/ui-shell/side-nav-items.js.map +1 -1
- package/es/components/ui-shell/side-nav-link.d.ts +1 -1
- package/es/components/ui-shell/side-nav-link.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-link.js +3 -2
- package/es/components/ui-shell/side-nav-link.js.map +1 -1
- package/es/components/ui-shell/side-nav-menu-item.d.ts +1 -1
- package/es/components/ui-shell/side-nav-menu-item.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-menu-item.js +3 -2
- package/es/components/ui-shell/side-nav-menu-item.js.map +1 -1
- package/es/components/ui-shell/side-nav-menu.d.ts +1 -1
- package/es/components/ui-shell/side-nav-menu.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-menu.js +3 -2
- package/es/components/ui-shell/side-nav-menu.js.map +1 -1
- package/es/components/ui-shell/side-nav.d.ts +1 -1
- package/es/components/ui-shell/side-nav.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav.js +3 -2
- package/es/components/ui-shell/side-nav.js.map +1 -1
- package/es/globals/decorators/carbon-element.d.ts +235 -0
- package/es/globals/decorators/carbon-element.d.ts.map +1 -0
- package/es/globals/decorators/carbon-element.js +429 -0
- package/es/globals/decorators/carbon-element.js.map +1 -0
- package/package.json +2 -2
- package/dist/checkbox-0edcc860.js +0 -65
- package/dist/checkbox-155d2e12.js +0 -65
- package/dist/copy-button-d50482da.js +0 -65
- package/dist/copy-button-e0c0c272.js +0 -65
- package/dist/link-5cef0608.js +0 -65
- package/dist/link-c666ff67.js +0 -65
- package/dist/loading-3754cb83.js +0 -65
- package/dist/loading-a86f38a0.js +0 -65
- package/dist/search-11f3a241.js +0 -65
- package/dist/search-487b4714.js +0 -65
|
@@ -5,19 +5,20 @@ let _ = t => t,
|
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
*
|
|
8
|
-
* Copyright IBM Corp. 2019,
|
|
8
|
+
* Copyright IBM Corp. 2019, 2023
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { classMap } from 'lit-html/directives/class-map';
|
|
15
|
-
import { html, property
|
|
15
|
+
import { html, property } from 'lit-element';
|
|
16
16
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
17
17
|
import ifNonNull from '../../globals/directives/if-non-null';
|
|
18
18
|
import BXCheckbox from '../checkbox/checkbox';
|
|
19
19
|
import { TOGGLE_SIZE } from './defs';
|
|
20
20
|
import styles from "././toggle.css.js";
|
|
21
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
21
22
|
export { TOGGLE_SIZE };
|
|
22
23
|
const {
|
|
23
24
|
prefix
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","names":["classMap","html","property","
|
|
1
|
+
{"version":3,"file":"toggle.js","names":["classMap","html","property","settings","ifNonNull","BXCheckbox","TOGGLE_SIZE","styles","carbonElement","customElement","prefix","BXToggle","_decorate","_initialize","_BXCheckbox","constructor","args","F","d","kind","key","value","_renderCheckmark","size","SMALL","undefined","_t","_","decorators","attribute","reflect","REGULAR","render","checked","checkedText","disabled","labelText","name","uncheckedText","_handleChange","handleChange","inputClasses","_t2","String","Boolean","static","eventChange"],"sources":["components/toggle/toggle.ts"],"sourcesContent":["/**\n * @license\n *\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-html/directives/class-map';\nimport { html, property } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport ifNonNull from '../../globals/directives/if-non-null';\nimport BXCheckbox from '../checkbox/checkbox';\nimport { TOGGLE_SIZE } from './defs';\nimport styles from './toggle.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { TOGGLE_SIZE };\n\nconst { prefix } = settings;\n\n/**\n * Basic toggle.\n *\n * @element bx-toggle\n * @slot label-text - The label text.\n * @slot checked-text - The text for the checked state.\n * @slot unchecked-text - The text for the unchecked state.\n * @fires bx-toggle-changed - The custom event fired after this changebox changes its checked state.\n */\n@customElement(`${prefix}-toggle`)\nclass BXToggle extends BXCheckbox {\n protected _renderCheckmark() {\n if (this.size !== TOGGLE_SIZE.SMALL) {\n return undefined;\n }\n return html`\n <svg\n class=\"${prefix}--toggle__check\"\n width=\"6px\"\n height=\"5px\"\n viewBox=\"0 0 6 5\">\n <path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n </svg>\n `;\n }\n\n /**\n * The text for the checked state.\n */\n @property({ attribute: 'checked-text' })\n checkedText = '';\n\n /**\n * Toggle size.\n */\n @property({ reflect: true })\n size = TOGGLE_SIZE.REGULAR;\n\n /**\n * The text for the unchecked state.\n */\n @property({ attribute: 'unchecked-text' })\n uncheckedText = '';\n\n render() {\n const {\n checked,\n checkedText,\n disabled,\n labelText,\n name,\n size,\n uncheckedText,\n value,\n _handleChange: handleChange,\n } = this;\n const inputClasses = classMap({\n [`${prefix}--toggle-input`]: true,\n [`${prefix}--toggle-input--${size}`]: size,\n });\n return html`\n <input\n id=\"checkbox\"\n type=\"checkbox\"\n class=\"${inputClasses}\"\n aria-checked=\"${String(Boolean(checked))}\"\n .checked=\"${checked}\"\n ?disabled=\"${disabled}\"\n name=\"${ifNonNull(name)}\"\n value=\"${ifNonNull(value)}\"\n @change=\"${handleChange}\" />\n <label for=\"checkbox\" class=\"${prefix}--toggle-input__label\">\n <slot name=\"label-text\">${labelText}</slot>\n <span class=\"${prefix}--toggle__switch\">\n ${this._renderCheckmark()}\n <span class=\"${prefix}--toggle__text--off\" aria-hidden=\"true\">\n <slot name=\"unchecked-text\">${uncheckedText}</slot>\n </span>\n <span class=\"${prefix}--toggle__text--on\" aria-hidden=\"true\">\n <slot name=\"checked-text\">${checkedText}</slot>\n </span>\n </span>\n </label>\n `;\n }\n\n /**\n * The name of the custom event fired after this changebox changes its checked state.\n */\n static get eventChange() {\n return `${prefix}-toggle-changed`;\n }\n\n static styles = styles;\n}\n\nexport default BXToggle;\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,IAAI,EAAEC,QAAQ,QAAQ,aAAa;AAC5C,OAAOC,QAAQ,MAAM,0CAA0C;AAC/D,OAAOC,SAAS,MAAM,sCAAsC;AAC5D,OAAOC,UAAU,MAAM,sBAAsB;AAC7C,SAASC,WAAW,QAAQ,QAAQ;AACpC,OAAOC,MAAM,MAAM,mBAAe;AAClC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AAExF,SAASH,WAAW;AAEpB,MAAM;EAAEI;AAAO,CAAC,GAAGP,QAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAUMQ,QAAQ,GAAAC,SAAA,EADbH,aAAa,CA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AE,GAAEU,MAAO,gBAAe,GAAG,IAAI;UACjC,CAAE,GAAEA,MAAO,mBAAkBa,IAAK,EAAC,GAAGA;QACxC,CAAC,CAAC;QACF,OAAOtB,IAAI,CAAAyC,GAAA,KAAAA,GAAA,GAAAf,CAAA,8fAIEc,YAAY,EACLE,MAAM,CAACC,OAAO,CAACX,OAAO,CAAC,CAAC,EAC5BA,OAAO,EACNE,QAAQ,EACb/B,SAAS,CAACiC,IAAI,CAAC,EACdjC,SAAS,CAACiB,KAAK,CAAC,EACdmB,YAAY,EACM9B,MAAM,EACT0B,SAAS,EACpB1B,MAAM,EACjB,IAAI,CAACY,gBAAgB,EAAE,EACVZ,MAAM,EACW4B,aAAa,EAE9B5B,MAAM,EACSwB,WAAW;MAKjD;;MAEA;AACF;AACA;IAFE;MAAAf,IAAA;MAAA0B,MAAA;MAAAzB,GAAA;MAAAC,KAAA,EAGA,SAAAyB,YAAA,EAAyB;QACvB,OAAQ,GAAEpC,MAAO,iBAAgB;MACnC;IAAC;MAAAS,IAAA;MAAA0B,MAAA;MAAAzB,GAAA;MAAAC,MAAA;QAAA,OAEed,MAAM;MAAA;IAAA;EAAA;AAAA,GAnFDF,UAAU;AAsFjC,eAAeM,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/tooltip/tooltip-body.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"sources":["components/tooltip/tooltip-body.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,cAAc,EAAE,EACrB,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,gCAAgC,CAAC;AAKxC;;GAEG;AACH,cACM,aAAc,SAAQ,cAAc;IACxC;;OAEG;IAEH,SAAS,0BAAkC;IAE3C;;OAEG;IAEH,SAAS,0BAAkC;IAE3C;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAGH,OAAO,CAAC,cAAc,CAIpB;IAEF;;OAEG;IACH,IAAI,QAAQ,kEAoEX;IAED,iBAAiB;IAOjB,MAAM;IAON,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,aAAa,CAAC","file":"tooltip-body.d.ts","sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, property } from 'lit-element';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\nimport HostListener from '../../globals/decorators/host-listener';\nimport BXFloatingMenu, {\n FLOATING_MENU_ALIGNMENT,\n FLOATING_MENU_DIRECTION,\n FLOATING_MENU_POSITION_DIRECTION,\n} from '../floating-menu/floating-menu';\nimport styles from './tooltip.scss';\n\nconst { prefix } = settings;\n\n/**\n * Tooltip body.\n */\n@customElement(`${prefix}-tooltip-body`)\nclass BXTooltipBody extends BXFloatingMenu {\n /**\n * How the menu is aligned to the trigger button.\n */\n @property()\n alignment = FLOATING_MENU_ALIGNMENT.CENTER;\n\n /**\n * The menu direction.\n */\n @property()\n direction = FLOATING_MENU_DIRECTION.BOTTOM;\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === 'Escape') {\n this.open = false;\n }\n };\n\n /**\n * The position of this tooltip body.\n */\n get position() {\n const { alignment, direction } = this;\n const position = super.position;\n const { direction: positionDirection, start, top } = position;\n\n if (\n direction === FLOATING_MENU_DIRECTION.TOP ||\n direction === FLOATING_MENU_DIRECTION.BOTTOM\n ) {\n if (alignment === FLOATING_MENU_ALIGNMENT.START) {\n position.start -= 16;\n }\n\n if (alignment === FLOATING_MENU_ALIGNMENT.END) {\n position.start += 16;\n }\n }\n\n if (\n direction === FLOATING_MENU_DIRECTION.RIGHT ||\n direction === FLOATING_MENU_DIRECTION.LEFT\n ) {\n if (alignment === FLOATING_MENU_ALIGNMENT.START) {\n position.top -= 16;\n }\n\n if (alignment === FLOATING_MENU_ALIGNMENT.END) {\n position.top += 16;\n }\n }\n\n if (direction === FLOATING_MENU_DIRECTION.LEFT) {\n const style = this.ownerDocument!.defaultView!.getComputedStyle(this);\n const margin = Number(\n (/^([\\d-.]+)px$/.exec(\n style.getPropertyValue(\n positionDirection !== FLOATING_MENU_POSITION_DIRECTION.RTL\n ? 'margin-right'\n : 'margin-left'\n )\n ) || [])[1]\n );\n if (!isNaN(margin)) {\n // For direction === DIRECTION_RIGHT, the left/top margin the caret size effectively adjusts the position,\n // but for direction === DIRECTION_LEFT such thing won't happen\n return {\n ...position,\n start: start - margin,\n };\n }\n }\n\n if (direction === FLOATING_MENU_DIRECTION.TOP) {\n const style = this.ownerDocument!.defaultView!.getComputedStyle(this);\n const margin = Number(\n (/^([\\d-.]+)px$/.exec(style.getPropertyValue('margin-bottom')) || [])[1]\n );\n if (!isNaN(margin)) {\n // For direction === DIRECTION_BOTTOM, the left/top margin the caret size effectively adjusts the position,\n // but for direction === DIRECTION_TOP such thing won't happen\n return {\n ...position,\n top: top - margin,\n };\n }\n }\n\n return position;\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'menu');\n }\n super.connectedCallback();\n }\n\n render() {\n return html`\n <span class=\"${prefix}--tooltip__caret\"></span>\n <div tabindex=\"0\" class=\"${prefix}--tooltip__content\"><slot></slot></div>\n `;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltipBody;\n"]}
|
|
@@ -14,7 +14,8 @@ let _ = t => t,
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
17
|
-
import { html, property
|
|
17
|
+
import { html, property } from 'lit-element';
|
|
18
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
18
19
|
import HostListener from '../../globals/decorators/host-listener';
|
|
19
20
|
import BXFloatingMenu, { FLOATING_MENU_ALIGNMENT, FLOATING_MENU_DIRECTION, FLOATING_MENU_POSITION_DIRECTION } from '../floating-menu/floating-menu';
|
|
20
21
|
import styles from "././tooltip.css.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-body.js","names":["settings","html","property","customElement","HostListener","BXFloatingMenu","FLOATING_MENU_ALIGNMENT","FLOATING_MENU_DIRECTION","FLOATING_MENU_POSITION_DIRECTION","styles","prefix","BXTooltipBody","_decorate","_initialize","_BXFloatingMenu","constructor","args","F","d","kind","decorators","key","value","CENTER","BOTTOM","type","Boolean","reflect","event","open","position","alignment","direction","_get","_getPrototypeOf","prototype","positionDirection","start","top","TOP","START","END","RIGHT","LEFT","style","ownerDocument","defaultView","getComputedStyle","margin","Number","exec","getPropertyValue","RTL","isNaN","_objectSpread","connectedCallback","hasAttribute","setAttribute","call","render","_t","_","static"],"sources":["components/tooltip/tooltip-body.ts"],"sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, property
|
|
1
|
+
{"version":3,"file":"tooltip-body.js","names":["settings","html","property","carbonElement","customElement","HostListener","BXFloatingMenu","FLOATING_MENU_ALIGNMENT","FLOATING_MENU_DIRECTION","FLOATING_MENU_POSITION_DIRECTION","styles","prefix","BXTooltipBody","_decorate","_initialize","_BXFloatingMenu","constructor","args","F","d","kind","decorators","key","value","CENTER","BOTTOM","type","Boolean","reflect","event","open","position","alignment","direction","_get","_getPrototypeOf","prototype","positionDirection","start","top","TOP","START","END","RIGHT","LEFT","style","ownerDocument","defaultView","getComputedStyle","margin","Number","exec","getPropertyValue","RTL","isNaN","_objectSpread","connectedCallback","hasAttribute","setAttribute","call","render","_t","_","static"],"sources":["components/tooltip/tooltip-body.ts"],"sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, property } from 'lit-element';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\nimport HostListener from '../../globals/decorators/host-listener';\nimport BXFloatingMenu, {\n FLOATING_MENU_ALIGNMENT,\n FLOATING_MENU_DIRECTION,\n FLOATING_MENU_POSITION_DIRECTION,\n} from '../floating-menu/floating-menu';\nimport styles from './tooltip.scss';\n\nconst { prefix } = settings;\n\n/**\n * Tooltip body.\n */\n@customElement(`${prefix}-tooltip-body`)\nclass BXTooltipBody extends BXFloatingMenu {\n /**\n * How the menu is aligned to the trigger button.\n */\n @property()\n alignment = FLOATING_MENU_ALIGNMENT.CENTER;\n\n /**\n * The menu direction.\n */\n @property()\n direction = FLOATING_MENU_DIRECTION.BOTTOM;\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === 'Escape') {\n this.open = false;\n }\n };\n\n /**\n * The position of this tooltip body.\n */\n get position() {\n const { alignment, direction } = this;\n const position = super.position;\n const { direction: positionDirection, start, top } = position;\n\n if (\n direction === FLOATING_MENU_DIRECTION.TOP ||\n direction === FLOATING_MENU_DIRECTION.BOTTOM\n ) {\n if (alignment === FLOATING_MENU_ALIGNMENT.START) {\n position.start -= 16;\n }\n\n if (alignment === FLOATING_MENU_ALIGNMENT.END) {\n position.start += 16;\n }\n }\n\n if (\n direction === FLOATING_MENU_DIRECTION.RIGHT ||\n direction === FLOATING_MENU_DIRECTION.LEFT\n ) {\n if (alignment === FLOATING_MENU_ALIGNMENT.START) {\n position.top -= 16;\n }\n\n if (alignment === FLOATING_MENU_ALIGNMENT.END) {\n position.top += 16;\n }\n }\n\n if (direction === FLOATING_MENU_DIRECTION.LEFT) {\n const style = this.ownerDocument!.defaultView!.getComputedStyle(this);\n const margin = Number(\n (/^([\\d-.]+)px$/.exec(\n style.getPropertyValue(\n positionDirection !== FLOATING_MENU_POSITION_DIRECTION.RTL\n ? 'margin-right'\n : 'margin-left'\n )\n ) || [])[1]\n );\n if (!isNaN(margin)) {\n // For direction === DIRECTION_RIGHT, the left/top margin the caret size effectively adjusts the position,\n // but for direction === DIRECTION_LEFT such thing won't happen\n return {\n ...position,\n start: start - margin,\n };\n }\n }\n\n if (direction === FLOATING_MENU_DIRECTION.TOP) {\n const style = this.ownerDocument!.defaultView!.getComputedStyle(this);\n const margin = Number(\n (/^([\\d-.]+)px$/.exec(style.getPropertyValue('margin-bottom')) || [])[1]\n );\n if (!isNaN(margin)) {\n // For direction === DIRECTION_BOTTOM, the left/top margin the caret size effectively adjusts the position,\n // but for direction === DIRECTION_TOP such thing won't happen\n return {\n ...position,\n top: top - margin,\n };\n }\n }\n\n return position;\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'menu');\n }\n super.connectedCallback();\n }\n\n render() {\n return html`\n <span class=\"${prefix}--tooltip__caret\"></span>\n <div tabindex=\"0\" class=\"${prefix}--tooltip__content\"><slot></slot></div>\n `;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltipBody;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,QAAQ,MAAM,0CAA0C;AAC/D,SAASC,IAAI,EAAEC,QAAQ,QAAQ,aAAa;AAC5C,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AACxF,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,cAAc,IACnBC,uBAAuB,EACvBC,uBAAuB,EACvBC,gCAAgC,QAC3B,gCAAgC;AACvC,OAAO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{"version":3,"sources":["components/tooltip/tooltip-definition.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAkB,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIhD;;;;;GAKG;AACH,cACM,mBAAoB,SAAQ,wBAAsB;IACtD;;OAEG;IAEH,SAAS,oBAA4B;IAErC;;OAEG;IAEH,QAAQ,SAAM;IAEd;;OAEG;IAEH,SAAS,oBAA4B;IAErC,gBAAgB;IAShB,MAAM;IAmBN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,mBAAmB,CAAC","file":"tooltip-definition.d.ts","sourcesContent":["/**\n * @license\n *\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-html/directives/class-map';\nimport { html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION } from './defs';\nimport styles from './tooltip.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION };\n\nconst { prefix } = settings;\n\n/**\n * Definition tooltip.\n *\n * @element bx-tooltip-definition\n * @slot body - The tooltip body content.\n */\n@customElement(`${prefix}-tooltip-definition`)\nclass BXTooltipDefinition extends FocusMixin(LitElement) {\n /**\n * How the tooltip is aligned to the trigger button.\n */\n @property()\n alignment = TOOLTIP_ALIGNMENT.CENTER;\n\n /**\n * The text for the tooltip body.\n */\n @property({ attribute: 'body-text' })\n bodyText = '';\n\n /**\n * The tooltip direction.\n */\n @property()\n direction = TOOLTIP_DIRECTION.BOTTOM;\n\n createRenderRoot() {\n return this.attachShadow({\n mode: 'open',\n delegatesFocus:\n Number((/Safari\\/(\\d+)/.exec(navigator.userAgent) ?? ['', 0])[1]) <=\n 537,\n });\n }\n\n render() {\n const { alignment, bodyText, direction } = this;\n const classes = classMap({\n [`${prefix}--tooltip__trigger`]: true,\n [`${prefix}--tooltip--a11y`]: true,\n [`${prefix}--tooltip__trigger--definition`]: true,\n [`${prefix}--tooltip--${direction}`]: direction,\n [`${prefix}--tooltip--align-${alignment}`]: alignment,\n });\n return html`\n <button class=\"${classes}\" aria-describedby=\"tooltip-body\">\n <slot></slot>\n </button>\n <div class=\"${prefix}--assistive-text\" id=\"tooltip-body\" role=\"tooltip\">\n <slot name=\"body\">${bodyText}</slot>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default BXTooltipDefinition;\n"]}
|
|
@@ -4,18 +4,19 @@ let _ = t => t,
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
*
|
|
7
|
-
* Copyright IBM Corp. 2019,
|
|
7
|
+
* Copyright IBM Corp. 2019, 2023
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { classMap } from 'lit-html/directives/class-map';
|
|
14
|
-
import { html, property,
|
|
14
|
+
import { html, property, LitElement } from 'lit-element';
|
|
15
15
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
16
16
|
import FocusMixin from '../../globals/mixins/focus';
|
|
17
17
|
import { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION } from './defs';
|
|
18
18
|
import styles from "././tooltip.css.js";
|
|
19
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
19
20
|
export { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION };
|
|
20
21
|
const {
|
|
21
22
|
prefix
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-definition.js","names":["classMap","html","property","
|
|
1
|
+
{"version":3,"file":"tooltip-definition.js","names":["classMap","html","property","LitElement","settings","FocusMixin","TOOLTIP_ALIGNMENT","TOOLTIP_DIRECTION","styles","carbonElement","customElement","prefix","BXTooltipDefinition","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","decorators","key","value","CENTER","attribute","BOTTOM","createRenderRoot","_exec","attachShadow","mode","delegatesFocus","Number","exec","navigator","userAgent","render","alignment","bodyText","direction","classes","_t","_","static"],"sources":["components/tooltip/tooltip-definition.ts"],"sourcesContent":["/**\n * @license\n *\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-html/directives/class-map';\nimport { html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION } from './defs';\nimport styles from './tooltip.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { TOOLTIP_ALIGNMENT, TOOLTIP_DIRECTION };\n\nconst { prefix } = settings;\n\n/**\n * Definition tooltip.\n *\n * @element bx-tooltip-definition\n * @slot body - The tooltip body content.\n */\n@customElement(`${prefix}-tooltip-definition`)\nclass BXTooltipDefinition extends FocusMixin(LitElement) {\n /**\n * How the tooltip is aligned to the trigger button.\n */\n @property()\n alignment = TOOLTIP_ALIGNMENT.CENTER;\n\n /**\n * The text for the tooltip body.\n */\n @property({ attribute: 'body-text' })\n bodyText = '';\n\n /**\n * The tooltip direction.\n */\n @property()\n direction = TOOLTIP_DIRECTION.BOTTOM;\n\n createRenderRoot() {\n return this.attachShadow({\n mode: 'open',\n delegatesFocus:\n Number((/Safari\\/(\\d+)/.exec(navigator.userAgent) ?? ['', 0])[1]) <=\n 537,\n });\n }\n\n render() {\n const { alignment, bodyText, direction } = this;\n const classes = classMap({\n [`${prefix}--tooltip__trigger`]: true,\n [`${prefix}--tooltip--a11y`]: true,\n [`${prefix}--tooltip__trigger--definition`]: true,\n [`${prefix}--tooltip--${direction}`]: direction,\n [`${prefix}--tooltip--align-${alignment}`]: alignment,\n });\n return html`\n <button class=\"${classes}\" aria-describedby=\"tooltip-body\">\n <slot></slot>\n </button>\n <div class=\"${prefix}--assistive-text\" id=\"tooltip-body\" role=\"tooltip\">\n <slot name=\"body\">${bodyText}</slot>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default BXTooltipDefinition;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,aAAa;AACxD,OAAOC,QAAQ,MAAM,0CAA0C;AAC/D,OAAOC,UAAU,MAAM,4BAA4B;AACnD,SAASC,iBAAiB,EAAEC,iBAAiB,QAAQ,QAAQ;AAC7D,OAAOC,MAAM,MAAM,oBAAgB;AACnC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AAExF,SAASJ,iBAAiB,EAAEC,iBAAiB;AAE7C,MAAM;EAAEI;AAAO,CAAC,GAAGP,QAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA;AALA,IAOMQ,mBAAmB,GAAAC,SAAA,EADxBH,aAAa,CAAE,GAAEC,MAAO,q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,IAAI;UACrC,CAAE,GAAEA,MAAO,iBAAgB,GAAG,IAAI;UAClC,CAAE,GAAEA,MAAO,gCAA+B,GAAG,IAAI;UACjD,CAAE,GAAEA,MAAO,cAAa4B,SAAU,EAAC,GAAGA,SAAS;UAC/C,CAAE,GAAE5B,MAAO,oBAAmB0B,SAAU,EAAC,GAAGA;QAC9C,CAAC,CAAC;QACF,OAAOpC,IAAI,CAAAwC,EAAA,KAAAA,EAAA,GAAAC,CAAA,6LACQF,OAAO,EAGV7B,MAAM,EACE2B,QAAQ;MAGlC;IAAC;MAAAlB,IAAA;MAAAuB,MAAA;MAAArB,GAAA;MAAAC,MAAA;QAAA,OAEef,MAAM;MAAA;IAAA;EAAA;AAAA,GA/CUH,UAAU,CAACF,UAAU,CAAC;AAkDxD,eAAeS,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/tooltip/tooltip-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"sources":["components/tooltip/tooltip-footer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAQ,UAAU,EAAE,MAAM,aAAa,CAAC;AAM/C;;GAEG;AACH,cACM,eAAgB,SAAQ,UAAU;IACtC,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,eAAe,CAAC","file":"tooltip-footer.d.ts","sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, LitElement } from 'lit-element';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\nimport styles from './tooltip.scss';\n\nconst { prefix } = settings;\n\n/**\n * Tooltip footer.\n */\n@customElement(`${prefix}-tooltip-footer`)\nclass BXTooltipFooter extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltipFooter;\n"]}
|
|
@@ -4,14 +4,15 @@ let _ = t => t,
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
*
|
|
7
|
-
* Copyright IBM Corp. 2019,
|
|
7
|
+
* Copyright IBM Corp. 2019, 2023
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
14
|
-
import { html,
|
|
14
|
+
import { html, LitElement } from 'lit-element';
|
|
15
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
15
16
|
import styles from "././tooltip.css.js";
|
|
16
17
|
const {
|
|
17
18
|
prefix
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-footer.js","names":["settings","html","
|
|
1
|
+
{"version":3,"file":"tooltip-footer.js","names":["settings","html","LitElement","carbonElement","customElement","styles","prefix","BXTooltipFooter","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","render","_t","_","static"],"sources":["components/tooltip/tooltip-footer.ts"],"sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, LitElement } from 'lit-element';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\nimport styles from './tooltip.scss';\n\nconst { prefix } = settings;\n\n/**\n * Tooltip footer.\n */\n@customElement(`${prefix}-tooltip-footer`)\nclass BXTooltipFooter extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltipFooter;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,QAAQ,MAAM,0CAA0C;AAC/D,SAASC,IAAI,EAAEC,UAAU,QAAQ,aAAa;AAC9C,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AACxF,OAAOC,MAAM,MAAM,oBAAgB;AAEnC,MAAM;EAAEC;AAAO,CAAC,GAAGN,QAAQ;;AAE3B;AACA;AACA;AAFA,IAIMO,eAAe,GAAAC,SAAA,EADpBJ,aAAa,CAAE,GAAEE,MAAO,iBAAgB,CAAC,aAAAG,WAAA,EAAAC,WAAA;EAA1C,MACMH,eAAe,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAMzC;EAAC;IAAAI,CAAA,EANKN,eAAe;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EACnB,SAAAC,OAAA,EAAS;QACP,OAAOjB,IAAI,CAAAkB,EAAA,KAAAA,EAAA,GAAAC,CAAA;MACb;IAAC;MAAAL,IAAA;MAAAM,MAAA;MAAAL,GAAA;MAAAC,MAAA;QAAA,OAEeZ,MAAM;MAAA;IAAA;EAAA;AAAA,GALMH,UAAU;AAQxC,eAAeK,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/tooltip/tooltip-icon.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"sources":["components/tooltip/tooltip-icon.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAKtD;;;;;GAKG;AACH,cACM,aAAc,SAAQ,kBAAkB;IAC5C,MAAM;CAoBP;AAED,eAAe,aAAa,CAAC","file":"tooltip-icon.d.ts","sourcesContent":["/**\n * @license\n *\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-html/directives/class-map';\nimport { html } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport BXTooltipDefintion from './tooltip-definition';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * Icon tooltip.\n *\n * @element bx-tooltip-icon\n * @slot body - The tooltip body content.\n */\n@customElement(`${prefix}-tooltip-icon`)\nclass BXTooltipIcon extends BXTooltipDefintion {\n render() {\n const { alignment, bodyText, direction } = this;\n const classes = classMap({\n [`${prefix}--tooltip__trigger`]: true,\n [`${prefix}--tooltip--a11y`]: true,\n [`${prefix}--tooltip--${direction}`]: direction,\n [`${prefix}--tooltip--align-${alignment}`]: alignment,\n });\n return html`\n <button class=\"${classes}\" aria-describedby=\"tooltip-body\">\n <span\n class=\"${prefix}--assistive-text\"\n id=\"tooltip-body\"\n role=\"tooltip\">\n <slot name=\"body\">${bodyText}</slot>\n </span>\n <slot></slot>\n </button>\n `;\n }\n}\n\nexport default BXTooltipIcon;\n"]}
|
|
@@ -4,16 +4,17 @@ let _ = t => t,
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
*
|
|
7
|
-
* Copyright IBM Corp. 2019,
|
|
7
|
+
* Copyright IBM Corp. 2019, 2023
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { classMap } from 'lit-html/directives/class-map';
|
|
14
|
-
import { html
|
|
14
|
+
import { html } from 'lit-element';
|
|
15
15
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
16
16
|
import BXTooltipDefintion from './tooltip-definition';
|
|
17
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
17
18
|
const {
|
|
18
19
|
prefix
|
|
19
20
|
} = settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-icon.js","names":["classMap","html","
|
|
1
|
+
{"version":3,"file":"tooltip-icon.js","names":["classMap","html","settings","BXTooltipDefintion","carbonElement","customElement","prefix","BXTooltipIcon","_decorate","_initialize","_BXTooltipDefintion","constructor","args","F","d","kind","key","value","render","alignment","bodyText","direction","classes","_t","_"],"sources":["components/tooltip/tooltip-icon.ts"],"sourcesContent":["/**\n * @license\n *\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-html/directives/class-map';\nimport { html } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport BXTooltipDefintion from './tooltip-definition';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * Icon tooltip.\n *\n * @element bx-tooltip-icon\n * @slot body - The tooltip body content.\n */\n@customElement(`${prefix}-tooltip-icon`)\nclass BXTooltipIcon extends BXTooltipDefintion {\n render() {\n const { alignment, bodyText, direction } = this;\n const classes = classMap({\n [`${prefix}--tooltip__trigger`]: true,\n [`${prefix}--tooltip--a11y`]: true,\n [`${prefix}--tooltip--${direction}`]: direction,\n [`${prefix}--tooltip--align-${alignment}`]: alignment,\n });\n return html`\n <button class=\"${classes}\" aria-describedby=\"tooltip-body\">\n <span\n class=\"${prefix}--assistive-text\"\n id=\"tooltip-body\"\n role=\"tooltip\">\n <slot name=\"body\">${bodyText}</slot>\n </span>\n <slot></slot>\n </button>\n `;\n }\n}\n\nexport default BXTooltipIcon;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,IAAI,QAAQ,aAAa;AAClC,OAAOC,QAAQ,MAAM,0CAA0C;AAC/D,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AAExF,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM3E;;;;GAIG;AACH,cACM,SACJ,SAAQ,cACR,YAAW,qBAAqB;IAEhC;;OAEG;IACH,OAAO,CAAC,SAAS,CAA+B;IAEhD;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAe;IAEnC;;OAEG;IAGH,OAAO,CAAC,YAAY,CAYlB;IAEF;;OAEG;IAGH,OAAO,CAAC,cAAc,CAIpB;IAEF;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IACH,IAAI,eAAe,YAMlB;IAED,iBAAiB;IAoBjB,OAAO,CAAC,iBAAiB,KAAA;IAezB,MAAM;IAON,MAAM,KAAK,mBAAmB,WAE7B;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,SAAS,CAAC","file":"tooltip.d.ts","sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, property, query, LitElement } from 'lit-element';\nimport Information16 from '@carbon/icons/lib/information/16';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport { find } from '../../globals/internal/collection-helpers';\nimport BXFloatingMenu from '../floating-menu/floating-menu';\nimport BXFloatingMenuTrigger from '../floating-menu/floating-menu-trigger';\nimport styles from './tooltip.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * Trigger button of tooltip.\n *\n * @element bx-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass BXTooltip\n extends HostListenerMixin(LitElement)\n implements BXFloatingMenuTrigger\n{\n /**\n * The menu body.\n */\n private _menuBody: BXFloatingMenu | null = null;\n\n /**\n * The trigger button.\n */\n @query('#trigger')\n private _triggerNode!: HTMLElement;\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleClick = async () => {\n this.open = !this.open;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { _menuBody: menuBody } = this;\n (\n menuBody?.shadowRoot?.querySelector(\n BXTooltip.selectorTooltipBody\n ) as HTMLElement\n )?.focus();\n }\n };\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter') {\n this._handleClick();\n }\n };\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * @returns The position of the trigger button in the viewport.\n */\n get triggerPosition() {\n const { _triggerNode: triggerNode } = this;\n if (!triggerNode) {\n throw new TypeError('Cannot find the trigger button.');\n }\n return triggerNode.getBoundingClientRect();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n if (!this.hasAttribute('tabindex')) {\n // TODO: Should we use a property?\n this.setAttribute('tabindex', '0');\n }\n if (!this.hasAttribute('aria-haspopup')) {\n this.setAttribute('aria-haspopup', 'true');\n }\n if (!this.hasAttribute('aria-expanded')) {\n this.setAttribute('aria-expanded', 'false');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('open')) {\n if (!this._menuBody) {\n this._menuBody = find(\n this.childNodes,\n (elem) => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU\n );\n }\n if (this._menuBody) {\n this._menuBody.open = this.open;\n }\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n }\n\n render() {\n return html`\n ${Information16({ id: 'trigger' })}\n <slot></slot>\n `;\n }\n\n static get selectorTooltipBody() {\n return `.${prefix}--tooltip__content`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltip;\n"]}
|
|
@@ -13,12 +13,13 @@ let _ = t => t,
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
16
|
-
import { html, property, query,
|
|
16
|
+
import { html, property, query, LitElement } from 'lit-element';
|
|
17
17
|
import Information16 from "../../icons/information/16";
|
|
18
18
|
import HostListener from '../../globals/decorators/host-listener';
|
|
19
19
|
import HostListenerMixin from '../../globals/mixins/host-listener';
|
|
20
20
|
import { find } from '../../globals/internal/collection-helpers';
|
|
21
21
|
import styles from "././tooltip.css.js";
|
|
22
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
22
23
|
const {
|
|
23
24
|
prefix
|
|
24
25
|
} = settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":["settings","html","property","query","
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":["settings","html","property","query","LitElement","Information16","HostListener","HostListenerMixin","find","styles","carbonElement","customElement","prefix","BXTooltip","_decorate","_initialize","_HostListenerMixin","constructor","args","F","d","kind","key","value","decorators","open","updateComplete","_menuBody$shadowRoot","_menuBody$shadowRoot$","_menuBody","menuBody","shadowRoot","querySelector","selectorTooltipBody","focus","event","_handleClick","type","Boolean","reflect","triggerPosition","_triggerNode","triggerNode","TypeError","getBoundingClientRect","connectedCallback","hasAttribute","setAttribute","attachShadow","mode","_get","_getPrototypeOf","prototype","call","updated","changedProperties","has","childNodes","elem","FLOATING_MENU","String","render","_t","_","id","static"],"sources":["components/tooltip/tooltip.ts"],"sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { html, property, query, LitElement } from 'lit-element';\nimport Information16 from '@carbon/icons/lib/information/16';\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport { find } from '../../globals/internal/collection-helpers';\nimport BXFloatingMenu from '../floating-menu/floating-menu';\nimport BXFloatingMenuTrigger from '../floating-menu/floating-menu-trigger';\nimport styles from './tooltip.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * Trigger button of tooltip.\n *\n * @element bx-tooltip\n */\n@customElement(`${prefix}-tooltip`)\nclass BXTooltip\n extends HostListenerMixin(LitElement)\n implements BXFloatingMenuTrigger\n{\n /**\n * The menu body.\n */\n private _menuBody: BXFloatingMenu | null = null;\n\n /**\n * The trigger button.\n */\n @query('#trigger')\n private _triggerNode!: HTMLElement;\n\n /**\n * Handles `click` event on this element.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleClick = async () => {\n this.open = !this.open;\n const { open, updateComplete } = this;\n if (open) {\n await updateComplete;\n const { _menuBody: menuBody } = this;\n (\n menuBody?.shadowRoot?.querySelector(\n BXTooltip.selectorTooltipBody\n ) as HTMLElement\n )?.focus();\n }\n };\n\n /**\n * Handles `keydown` event on this element.\n */\n @HostListener('keydown')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleKeydown = async (event) => {\n if (event.key === ' ' || event.key === 'Enter') {\n this._handleClick();\n }\n };\n\n /**\n * `true` if the dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * @returns The position of the trigger button in the viewport.\n */\n get triggerPosition() {\n const { _triggerNode: triggerNode } = this;\n if (!triggerNode) {\n throw new TypeError('Cannot find the trigger button.');\n }\n return triggerNode.getBoundingClientRect();\n }\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n if (!this.hasAttribute('tabindex')) {\n // TODO: Should we use a property?\n this.setAttribute('tabindex', '0');\n }\n if (!this.hasAttribute('aria-haspopup')) {\n this.setAttribute('aria-haspopup', 'true');\n }\n if (!this.hasAttribute('aria-expanded')) {\n this.setAttribute('aria-expanded', 'false');\n }\n if (!this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('open')) {\n if (!this._menuBody) {\n this._menuBody = find(\n this.childNodes,\n (elem) => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU\n );\n }\n if (this._menuBody) {\n this._menuBody.open = this.open;\n }\n this.setAttribute('aria-expanded', String(Boolean(this.open)));\n }\n }\n\n render() {\n return html`\n ${Information16({ id: 'trigger' })}\n <slot></slot>\n `;\n }\n\n static get selectorTooltipBody() {\n return `.${prefix}--tooltip__content`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXTooltip;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,QAAQ,MAAM,0CAA0C;AAC/D,SAASC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,QAAQ,aAAa;AAC/D,OAAOC,aAAa,MAAM,4BAAkC;AAC5D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,SAASC,IAAI,QAAQ,2CAA2C;AAGhE,OAAOC,MAAM,MAAM,oBAAgB;AACnC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AAExF,MAAM;EAAEC;AAAO,CAAC,GAAGZ,QAAQ;;AAE3B;AACA;AACA;AACA;AACA;AAJA,IAMMa,SAAS,GAAAC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
{"version":3,"sources":["components/ui-shell/header-menu-button.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAkB,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMzE;;;;;;;GAOG;AACH,cACM,kBAAmB,SAAQ,uBAAsB;IACrD,OAAO,CAAC,YAAY;IAkBpB;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IAEH,iBAAiB,SAA2B;IAE5C;;OAEG;IAEH,mBAAmB,SAA0B;IAE7C;;OAEG;IAEH,YAAY,yBAAqC;IAEjD;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,SAAS,sBAA+B;IAExC,gBAAgB;IAShB,MAAM;IA2BN;;OAEG;IACH,MAAM,KAAK,WAAW,WAErB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,kBAAkB,CAAC","file":"header-menu-button.d.ts","sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { classMap } from 'lit-html/directives/class-map';\nimport { html, property, LitElement } from 'lit-element';\nimport Close20 from '@carbon/icons/lib/close/20';\nimport Menu20 from '@carbon/icons/lib/menu/20';\nimport ifNonNull from '../../globals/directives/if-non-null';\nimport FocusMixin from '../../globals/mixins/focus';\nimport { SIDE_NAV_COLLAPSE_MODE, SIDE_NAV_USAGE_MODE } from './side-nav';\nimport styles from './header.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * The trigger button for side nav in header nav.\n *\n * @element bx-header-menu-button\n * @csspart button The button.\n * @csspart toggle-icon The toggle icon.\n * @fires bx-header-menu-button-toggled - The custom event fired after this header menu button is toggled upon a user gesture.\n */\n@customElement(`${prefix}-header-menu-button`)\nclass BXHeaderMenuButton extends FocusMixin(LitElement) {\n private _handleClick() {\n const active = !this.active;\n this.active = active;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof BXHeaderMenuButton).eventToggle,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n active,\n },\n }\n )\n );\n }\n\n /**\n * `true` if the button should represent its active state.\n */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /**\n * The `aria-label` attribute for the button in its active state.\n */\n @property({ attribute: 'button-label-active' })\n buttonLabelActive = 'Close navigation menu';\n\n /**\n * The `aria-label` attribute for the button in its inactive state.\n */\n @property({ attribute: 'button-label-inactive' })\n buttonLabelInactive = 'Open navigation menu';\n\n /**\n * Collapse mode of the side nav.\n */\n @property({ reflect: true, attribute: 'collapse-mode' })\n collapseMode = SIDE_NAV_COLLAPSE_MODE.RESPONSIVE;\n\n /**\n * `true` if the button should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Usage mode of the side nav.\n */\n @property({ reflect: true, attribute: 'usage-mode' })\n usageMode = SIDE_NAV_USAGE_MODE.REGULAR;\n\n createRenderRoot() {\n return this.attachShadow({\n mode: 'open',\n delegatesFocus:\n Number((/Safari\\/(\\d+)/.exec(navigator.userAgent) ?? ['', 0])[1]) <=\n 537,\n });\n }\n\n render() {\n const {\n active,\n buttonLabelActive,\n buttonLabelInactive,\n disabled,\n _handleClick: handleClick,\n } = this;\n const buttonLabel = active ? buttonLabelActive : buttonLabelInactive;\n const classes = classMap({\n [`${prefix}--header__action`]: true,\n [`${prefix}--header__menu-trigger`]: true,\n [`${prefix}--header__menu-toggle`]: true,\n [`${prefix}--header__action--active`]: active,\n });\n return html`\n <button\n part=\"button\"\n class=\"${classes}\"\n ?disabled=${disabled}\n aria-label=\"${ifNonNull(buttonLabel)}\"\n @click=${handleClick}>\n ${(active ? Close20 : Menu20)({ slot: 'toggle-icon' })}\n </button>\n `;\n }\n\n /**\n * The name of the custom event fired after this header menu button is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-header-menu-button-toggled`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXHeaderMenuButton;\n"]}
|
|
@@ -4,7 +4,7 @@ let _ = t => t,
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
*
|
|
7
|
-
* Copyright IBM Corp. 2019,
|
|
7
|
+
* Copyright IBM Corp. 2019, 2023
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -12,13 +12,14 @@ let _ = t => t,
|
|
|
12
12
|
|
|
13
13
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
14
14
|
import { classMap } from 'lit-html/directives/class-map';
|
|
15
|
-
import { html, property,
|
|
15
|
+
import { html, property, LitElement } from 'lit-element';
|
|
16
16
|
import Close20 from "../../icons/close/20";
|
|
17
17
|
import Menu20 from "../../icons/menu/20";
|
|
18
18
|
import ifNonNull from '../../globals/directives/if-non-null';
|
|
19
19
|
import FocusMixin from '../../globals/mixins/focus';
|
|
20
20
|
import { SIDE_NAV_COLLAPSE_MODE, SIDE_NAV_USAGE_MODE } from './side-nav';
|
|
21
21
|
import styles from "././header.css.js";
|
|
22
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
22
23
|
const {
|
|
23
24
|
prefix
|
|
24
25
|
} = settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-menu-button.js","names":["settings","classMap","html","property","
|
|
1
|
+
{"version":3,"file":"header-menu-button.js","names":["settings","classMap","html","property","LitElement","Close20","Menu20","ifNonNull","FocusMixin","SIDE_NAV_COLLAPSE_MODE","SIDE_NAV_USAGE_MODE","styles","carbonElement","customElement","prefix","BXHeaderMenuButton","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","key","value","_handleClick","active","dispatchEvent","CustomEvent","eventToggle","bubbles","cancelable","composed","detail","decorators","type","Boolean","reflect","attribute","RESPONSIVE","REGULAR","createRenderRoot","_exec","attachShadow","mode","delegatesFocus","Number","exec","navigator","userAgent","render","buttonLabelActive","buttonLabelInactive","disabled","handleClick","buttonLabel","classes","_t","_","slot","static"],"sources":["components/ui-shell/header-menu-button.ts"],"sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { classMap } from 'lit-html/directives/class-map';\nimport { html, property, LitElement } from 'lit-element';\nimport Close20 from '@carbon/icons/lib/close/20';\nimport Menu20 from '@carbon/icons/lib/menu/20';\nimport ifNonNull from '../../globals/directives/if-non-null';\nimport FocusMixin from '../../globals/mixins/focus';\nimport { SIDE_NAV_COLLAPSE_MODE, SIDE_NAV_USAGE_MODE } from './side-nav';\nimport styles from './header.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nconst { prefix } = settings;\n\n/**\n * The trigger button for side nav in header nav.\n *\n * @element bx-header-menu-button\n * @csspart button The button.\n * @csspart toggle-icon The toggle icon.\n * @fires bx-header-menu-button-toggled - The custom event fired after this header menu button is toggled upon a user gesture.\n */\n@customElement(`${prefix}-header-menu-button`)\nclass BXHeaderMenuButton extends FocusMixin(LitElement) {\n private _handleClick() {\n const active = !this.active;\n this.active = active;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof BXHeaderMenuButton).eventToggle,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n active,\n },\n }\n )\n );\n }\n\n /**\n * `true` if the button should represent its active state.\n */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /**\n * The `aria-label` attribute for the button in its active state.\n */\n @property({ attribute: 'button-label-active' })\n buttonLabelActive = 'Close navigation menu';\n\n /**\n * The `aria-label` attribute for the button in its inactive state.\n */\n @property({ attribute: 'button-label-inactive' })\n buttonLabelInactive = 'Open navigation menu';\n\n /**\n * Collapse mode of the side nav.\n */\n @property({ reflect: true, attribute: 'collapse-mode' })\n collapseMode = SIDE_NAV_COLLAPSE_MODE.RESPONSIVE;\n\n /**\n * `true` if the button should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Usage mode of the side nav.\n */\n @property({ reflect: true, attribute: 'usage-mode' })\n usageMode = SIDE_NAV_USAGE_MODE.REGULAR;\n\n createRenderRoot() {\n return this.attachShadow({\n mode: 'open',\n delegatesFocus:\n Number((/Safari\\/(\\d+)/.exec(navigator.userAgent) ?? ['', 0])[1]) <=\n 537,\n });\n }\n\n render() {\n const {\n active,\n buttonLabelActive,\n buttonLabelInactive,\n disabled,\n _handleClick: handleClick,\n } = this;\n const buttonLabel = active ? buttonLabelActive : buttonLabelInactive;\n const classes = classMap({\n [`${prefix}--header__action`]: true,\n [`${prefix}--header__menu-trigger`]: true,\n [`${prefix}--header__menu-toggle`]: true,\n [`${prefix}--header__action--active`]: active,\n });\n return html`\n <button\n part=\"button\"\n class=\"${classes}\"\n ?disabled=${disabled}\n aria-label=\"${ifNonNull(buttonLabel)}\"\n @click=${handleClick}>\n ${(active ? Close20 : Menu20)({ slot: 'toggle-icon' })}\n </button>\n `;\n }\n\n /**\n * The name of the custom event fired after this header menu button is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-header-menu-button-toggled`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXHeaderMenuButton;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,QAAQ,MAAM,0CAA0C;AAC/D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,aAAa;AACxD,OAAOC,OAAO,MAAM,sBAA4B;AAChD,OAAOC,MAAM,MAAM,qBAA2B;AAC9C,OAAOC,SAAS,MAAM,sCAAsC;AAC5D,OAAOC,UAAU,MAAM,4BAA4B;AACnD,SAASC,sBAAsB,EAAEC,mBAAmB,QAAQ,YAAY;AACxE,OAAOC,MAAM,MAAM,mBAAe;AAClC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;AAExF,MAAM;EAAEC;AAAO,CAAC,GAAGd,QAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IASMe,kBAAkB,GAAAC,SAAA,EADvBH,aAAa,CAAE,GAAEC,MAAO,qBAAoB,CAAC,aAAAG,WAAA,EAAAC,WAAA;EAA9C,MACMH,kBAAkB,SAAAG,WAAA,CAAgC;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAmGxD;EAAC;IAAAI,CAAA,EAnGKN,kBAAkB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EACtB,SAAAC,aAAA,EAAuB;QACrB,MAAMC,MAAM,GAAG,CAAC,IAAI,CAACA,MAAM;QAC3B,IAAI,CAACA,MAAM,GAAGA,MAAM;QACpB,IAAI,CAACC,aAAa,CAChB,IAAIC,WAAW,CACZ,IAAI,CAACV,WAAW,CAA+BW,WAAW,EAC3D;UACEC,OAAO,EAAE,IAAI;UACbC,UAAU,EAAE,IAAI;UAChBC,QAAQ,EAAE,IAAI;UACdC,MAAM,E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ed,MAAM;MAAA;IAAA;EAAA;AAAA,GAlGSH,UAAU,CAACJ,UAAU,CAAC;AAqGvD,eAAeW,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ui-shell/header-menu-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAIhD;;;;GAIG;AACH,cACM,gBAAiB,SAAQ,eAAe;CAAG;AAEjD,eAAe,gBAAgB,CAAC","file":"header-menu-item.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019,
|
|
1
|
+
{"version":3,"sources":["components/ui-shell/header-menu-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAIhD;;;;GAIG;AACH,cACM,gBAAiB,SAAQ,eAAe;CAAG;AAEjD,eAAe,gBAAgB,CAAC","file":"header-menu-item.d.ts","sourcesContent":["/**\n * @license\n *\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 settings from 'carbon-components/es/globals/js/settings';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\nimport BXHeaderNavItem from './header-nav-item';\n\nconst { prefix } = settings;\n\n/**\n * Header submenu item.\n *\n * @element bx-header-menu-item\n */\n@customElement(`${prefix}-header-menu-item`)\nclass BXHeaderMenuItem extends BXHeaderNavItem {}\n\nexport default BXHeaderMenuItem;\n"]}
|
|
@@ -2,14 +2,14 @@ import _decorate from "@babel/runtime/helpers/esm/decorate";
|
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
*
|
|
5
|
-
* Copyright IBM Corp. 2019,
|
|
5
|
+
* Copyright IBM Corp. 2019, 2023
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import settings from 'carbon-components/es/globals/js/settings';
|
|
12
|
-
import { customElement } from '
|
|
12
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
13
13
|
import BXHeaderNavItem from './header-nav-item';
|
|
14
14
|
const {
|
|
15
15
|
prefix
|