@carbon/web-components 2.0.0-rc.2 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +267 -52
- package/es/components/accordion/accordion-item.d.ts.map +1 -1
- package/es/components/accordion/accordion-item.js +3 -2
- package/es/components/accordion/accordion-item.js.map +1 -1
- package/es/components/accordion/accordion-skeleton.js.map +1 -1
- package/es/components/accordion/accordion.css.js +1 -1
- package/es/components/accordion/accordion.d.ts.map +1 -1
- package/es/components/accordion/accordion.js +2 -1
- package/es/components/accordion/accordion.js.map +1 -1
- package/es/components/accordion/accordion.rtl.css.js +1 -1
- package/es/components/accordion/defs.d.ts +1 -1
- package/es/components/accordion/defs.d.ts.map +1 -1
- package/es/components/accordion/defs.js +1 -1
- package/es/components/accordion/defs.js.map +1 -1
- package/es/components/accordion/index.d.ts +1 -1
- package/es/components/accordion/index.d.ts.map +1 -1
- package/es/components/accordion/index.js +1 -1
- package/es/components/accordion/index.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.js +2 -6
- package/es/components/breadcrumb/breadcrumb-item.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.js +2 -6
- package/es/components/breadcrumb/breadcrumb-link.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js +2 -6
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-skeleton.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb.css.js +1 -1
- package/es/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb.js +3 -6
- package/es/components/breadcrumb/breadcrumb.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb.rtl.css.js +1 -1
- package/es/components/breadcrumb/index.d.ts +1 -1
- package/es/components/breadcrumb/index.d.ts.map +1 -1
- package/es/components/breadcrumb/index.js +1 -1
- package/es/components/breadcrumb/index.js.map +1 -1
- package/es/components/button/button-set.js.map +1 -1
- package/es/components/button/button-skeleton.d.ts.map +1 -1
- package/es/components/button/button-skeleton.js +2 -4
- package/es/components/button/button-skeleton.js.map +1 -1
- package/es/components/button/button.css.js +1 -1
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +4 -2
- package/es/components/button/button.js.map +1 -1
- package/es/components/button/button.rtl.css.js +1 -1
- package/es/components/button/defs.d.ts +1 -1
- package/es/components/button/defs.d.ts.map +1 -1
- package/es/components/button/defs.js +1 -1
- package/es/components/button/defs.js.map +1 -1
- package/es/components/button/index.d.ts +1 -1
- package/es/components/button/index.d.ts.map +1 -1
- package/es/components/button/index.js +1 -1
- package/es/components/button/index.js.map +1 -1
- package/es/components/checkbox/checkbox.css.js +1 -1
- package/es/components/checkbox/checkbox.d.ts.map +1 -1
- package/es/components/checkbox/checkbox.js +3 -9
- package/es/components/checkbox/checkbox.js.map +1 -1
- package/es/components/checkbox/checkbox.rtl.css.js +1 -1
- package/es/components/checkbox/index.d.ts +1 -1
- package/es/components/checkbox/index.d.ts.map +1 -1
- package/es/components/checkbox/index.js +1 -1
- package/es/components/checkbox/index.js.map +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 -4
- package/es/components/code-snippet/code-snippet-skeleton.js.map +1 -1
- package/es/components/code-snippet/code-snippet.css.js +1 -1
- package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
- package/es/components/code-snippet/code-snippet.js +2 -1
- package/es/components/code-snippet/code-snippet.js.map +1 -1
- package/es/components/code-snippet/code-snippet.rtl.css.js +1 -1
- package/es/components/code-snippet/defs.d.ts +1 -1
- package/es/components/code-snippet/defs.d.ts.map +1 -1
- package/es/components/code-snippet/defs.js +1 -1
- package/es/components/code-snippet/defs.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +1 -1
- package/es/components/code-snippet/index.d.ts.map +1 -1
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/index.js.map +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 -6
- package/es/components/combo-box/combo-box-item.js.map +1 -1
- package/es/components/combo-box/combo-box.css.js +1 -1
- package/es/components/combo-box/combo-box.d.ts.map +1 -1
- package/es/components/combo-box/combo-box.js +2 -1
- package/es/components/combo-box/combo-box.js.map +1 -1
- package/es/components/combo-box/combo-box.rtl.css.js +1 -1
- package/es/components/combo-box/index.d.ts +1 -1
- package/es/components/combo-box/index.d.ts.map +1 -1
- package/es/components/combo-box/index.js +1 -1
- package/es/components/combo-box/index.js.map +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 -6
- package/es/components/content-switcher/content-switcher-item.js.map +1 -1
- package/es/components/content-switcher/content-switcher.css.js +1 -1
- package/es/components/content-switcher/content-switcher.d.ts.map +1 -1
- package/es/components/content-switcher/content-switcher.js +2 -1
- package/es/components/content-switcher/content-switcher.js.map +1 -1
- package/es/components/content-switcher/content-switcher.rtl.css.js +1 -1
- package/es/components/content-switcher/defs.d.ts +1 -1
- package/es/components/content-switcher/defs.d.ts.map +1 -1
- package/es/components/content-switcher/defs.js +1 -1
- package/es/components/content-switcher/defs.js.map +1 -1
- package/es/components/content-switcher/index.d.ts +1 -1
- package/es/components/content-switcher/index.d.ts.map +1 -1
- package/es/components/content-switcher/index.js +1 -1
- package/es/components/content-switcher/index.js.map +1 -1
- package/es/components/copy/copy.js.map +1 -1
- package/es/components/copy-button/copy-button.css.js +1 -1
- package/es/components/copy-button/copy-button.js.map +1 -1
- package/es/components/copy-button/copy-button.rtl.css.js +1 -1
- package/es/components/copy-button/index.d.ts +1 -1
- package/es/components/copy-button/index.d.ts.map +1 -1
- package/es/components/copy-button/index.js +1 -1
- package/es/components/copy-button/index.js.map +1 -1
- package/es/components/data-table/data-table.css.js +1 -1
- package/es/components/data-table/data-table.rtl.css.js +1 -1
- package/es/components/data-table/index.d.ts +1 -1
- package/es/components/data-table/index.d.ts.map +1 -1
- package/es/components/data-table/index.js +1 -1
- package/es/components/data-table/index.js.map +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 -7
- package/es/components/data-table/table-batch-actions.js.map +1 -1
- package/es/components/data-table/table-body.d.ts.map +1 -1
- package/es/components/data-table/table-body.js +3 -6
- package/es/components/data-table/table-body.js.map +1 -1
- package/es/components/data-table/table-cell.d.ts.map +1 -1
- package/es/components/data-table/table-cell.js +3 -7
- package/es/components/data-table/table-cell.js.map +1 -1
- package/es/components/data-table/table-expanded-row.d.ts.map +1 -1
- package/es/components/data-table/table-expanded-row.js +2 -1
- package/es/components/data-table/table-expanded-row.js.map +1 -1
- package/es/components/data-table/table-head.d.ts.map +1 -1
- package/es/components/data-table/table-head.js +2 -6
- package/es/components/data-table/table-head.js.map +1 -1
- package/es/components/data-table/table-header-cell.d.ts.map +1 -1
- package/es/components/data-table/table-header-cell.js +2 -1
- package/es/components/data-table/table-header-cell.js.map +1 -1
- package/es/components/data-table/table-header-row.d.ts.map +1 -1
- package/es/components/data-table/table-header-row.js +1 -1
- package/es/components/data-table/table-header-row.js.map +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-skeleton.js.map +1 -1
- package/es/components/data-table/table-toolbar-content.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar-content.js +4 -7
- package/es/components/data-table/table-toolbar-content.js.map +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 -7
- package/es/components/data-table/table-toolbar-search.js.map +1 -1
- package/es/components/data-table/table-toolbar.d.ts +0 -8
- package/es/components/data-table/table-toolbar.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar.js +3 -30
- package/es/components/data-table/table-toolbar.js.map +1 -1
- package/es/components/data-table/table.d.ts.map +1 -1
- package/es/components/data-table/table.js +3 -3
- package/es/components/data-table/table.js.map +1 -1
- package/es/components/date-picker/append-to-plugin.js.map +1 -1
- package/es/components/date-picker/css-class-plugin.js.map +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 -4
- package/es/components/date-picker/date-picker-input-skeleton.js.map +1 -1
- package/es/components/date-picker/date-picker-input.d.ts.map +1 -1
- package/es/components/date-picker/date-picker-input.js +2 -1
- package/es/components/date-picker/date-picker-input.js.map +1 -1
- package/es/components/date-picker/date-picker.css.js +1 -1
- package/es/components/date-picker/date-picker.d.ts.map +1 -1
- package/es/components/date-picker/date-picker.js +7 -4
- package/es/components/date-picker/date-picker.js.map +1 -1
- package/es/components/date-picker/date-picker.rtl.css.js +1 -1
- package/es/components/date-picker/defs.d.ts +1 -1
- package/es/components/date-picker/defs.d.ts.map +1 -1
- package/es/components/date-picker/defs.js +1 -1
- package/es/components/date-picker/defs.js.map +1 -1
- package/es/components/date-picker/fix-events-plugin.js +9 -0
- package/es/components/date-picker/fix-events-plugin.js.map +1 -1
- package/es/components/date-picker/focus-plugin.d.ts.map +1 -1
- package/es/components/date-picker/focus-plugin.js +14 -4
- package/es/components/date-picker/focus-plugin.js.map +1 -1
- package/es/components/date-picker/icon-plugin.js.map +1 -1
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/date-picker/index.d.ts.map +1 -1
- package/es/components/date-picker/index.js +1 -1
- package/es/components/date-picker/index.js.map +1 -1
- package/es/components/date-picker/iso-date.js.map +1 -1
- package/es/components/date-picker/month-select-plugin.js.map +1 -1
- package/es/components/date-picker/range-plugin.d.ts +21 -6
- package/es/components/date-picker/range-plugin.d.ts.map +1 -1
- package/es/components/date-picker/range-plugin.js +51 -17
- package/es/components/date-picker/range-plugin.js.map +1 -1
- package/es/components/date-picker/shadow-dom-events-plugin.js.map +1 -1
- package/es/components/date-picker/state-handshake-plugin.js.map +1 -1
- package/es/components/dropdown/defs.d.ts +1 -1
- package/es/components/dropdown/defs.d.ts.map +1 -1
- package/es/components/dropdown/defs.js +1 -1
- package/es/components/dropdown/defs.js.map +1 -1
- package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-item.js +3 -7
- package/es/components/dropdown/dropdown-item.js.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.js +2 -4
- package/es/components/dropdown/dropdown-skeleton.js.map +1 -1
- package/es/components/dropdown/dropdown.css.js +1 -1
- package/es/components/dropdown/dropdown.d.ts +1 -3
- 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/dropdown/dropdown.rtl.css.js +1 -1
- package/es/components/dropdown/index.d.ts +1 -1
- package/es/components/dropdown/index.d.ts.map +1 -1
- package/es/components/dropdown/index.js +1 -1
- package/es/components/dropdown/index.js.map +1 -1
- package/es/components/file-uploader/defs.d.ts +1 -1
- package/es/components/file-uploader/defs.d.ts.map +1 -1
- package/es/components/file-uploader/defs.js +1 -1
- package/es/components/file-uploader/defs.js.map +1 -1
- package/es/components/file-uploader/demo-file-uploader.js.map +1 -1
- package/es/components/file-uploader/file-uploader-button.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader-button.js +1 -0
- package/es/components/file-uploader/file-uploader-button.js.map +1 -1
- package/es/components/file-uploader/file-uploader-drop-container.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader-drop-container.js +2 -1
- package/es/components/file-uploader/file-uploader-drop-container.js.map +1 -1
- package/es/components/file-uploader/file-uploader-item.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader-item.js +2 -1
- package/es/components/file-uploader/file-uploader-item.js.map +1 -1
- package/es/components/file-uploader/file-uploader.css.js +1 -1
- package/es/components/file-uploader/file-uploader.d.ts.map +1 -1
- package/es/components/file-uploader/file-uploader.js +3 -8
- package/es/components/file-uploader/file-uploader.js.map +1 -1
- package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
- package/es/components/file-uploader/index.d.ts +1 -1
- package/es/components/file-uploader/index.d.ts.map +1 -1
- package/es/components/file-uploader/index.js +1 -1
- package/es/components/file-uploader/index.js.map +1 -1
- package/es/components/floating-menu/defs.d.ts +1 -1
- package/es/components/floating-menu/defs.d.ts.map +1 -1
- package/es/components/floating-menu/defs.js +1 -1
- package/es/components/floating-menu/defs.js.map +1 -1
- package/es/components/floating-menu/floating-menu-trigger.d.ts +1 -1
- package/es/components/floating-menu/floating-menu-trigger.d.ts.map +1 -1
- package/es/components/floating-menu/floating-menu.js +9 -2
- package/es/components/floating-menu/floating-menu.js.map +1 -1
- package/es/components/floating-menu/index.d.ts +1 -1
- package/es/components/floating-menu/index.d.ts.map +1 -1
- package/es/components/floating-menu/index.js +1 -1
- package/es/components/floating-menu/index.js.map +1 -1
- package/es/components/form/form-item.css.js +1 -1
- package/es/components/form/form-item.d.ts.map +1 -1
- package/es/components/form/form-item.js +2 -6
- package/es/components/form/form-item.js.map +1 -1
- package/es/components/form/form-item.rtl.css.js +1 -1
- package/es/components/form/index.d.ts +1 -1
- package/es/components/form/index.d.ts.map +1 -1
- package/es/components/form/index.js +1 -1
- package/es/components/form/index.js.map +1 -1
- package/es/components/form-group/form-group.css.js +1 -1
- package/es/components/form-group/form-group.rtl.css.js +1 -1
- package/es/components/icon-button/icon-button.css.js +1 -1
- package/es/components/icon-button/icon-button.js.map +1 -1
- package/es/components/icon-button/icon-button.rtl.css.js +1 -1
- package/es/components/inline-loading/defs.d.ts +1 -1
- package/es/components/inline-loading/defs.d.ts.map +1 -1
- package/es/components/inline-loading/defs.js +1 -1
- package/es/components/inline-loading/defs.js.map +1 -1
- package/es/components/inline-loading/index.d.ts +1 -1
- package/es/components/inline-loading/index.d.ts.map +1 -1
- package/es/components/inline-loading/index.js +1 -1
- package/es/components/inline-loading/index.js.map +1 -1
- package/es/components/inline-loading/inline-loading.css.js +1 -1
- package/es/components/inline-loading/inline-loading.d.ts.map +1 -1
- package/es/components/inline-loading/inline-loading.js +2 -1
- package/es/components/inline-loading/inline-loading.js.map +1 -1
- package/es/components/inline-loading/inline-loading.rtl.css.js +1 -1
- package/es/components/layer/layer.js.map +1 -1
- package/es/components/link/index.d.ts +1 -1
- package/es/components/link/index.d.ts.map +1 -1
- package/es/components/link/index.js +1 -1
- package/es/components/link/index.js.map +1 -1
- package/es/components/link/link.d.ts.map +1 -1
- package/es/components/link/link.js +3 -4
- package/es/components/link/link.js.map +1 -1
- package/es/components/list/index.d.ts +1 -1
- package/es/components/list/index.d.ts.map +1 -1
- package/es/components/list/index.js +1 -1
- package/es/components/list/index.js.map +1 -1
- package/es/components/list/list-item.d.ts.map +1 -1
- package/es/components/list/list-item.js +3 -7
- package/es/components/list/list-item.js.map +1 -1
- package/es/components/list/ordered-list.d.ts.map +1 -1
- package/es/components/list/ordered-list.js +2 -1
- package/es/components/list/ordered-list.js.map +1 -1
- package/es/components/list/unordered-list.d.ts.map +1 -1
- package/es/components/list/unordered-list.js +3 -4
- package/es/components/list/unordered-list.js.map +1 -1
- package/es/components/loading/defs.d.ts +1 -1
- package/es/components/loading/defs.d.ts.map +1 -1
- package/es/components/loading/defs.js +1 -1
- package/es/components/loading/defs.js.map +1 -1
- package/es/components/loading/index.d.ts +1 -1
- package/es/components/loading/index.d.ts.map +1 -1
- package/es/components/loading/index.js +1 -1
- package/es/components/loading/index.js.map +1 -1
- package/es/components/loading/loading.css.js +1 -1
- package/es/components/loading/loading.d.ts.map +1 -1
- package/es/components/loading/loading.js +3 -6
- package/es/components/loading/loading.js.map +1 -1
- package/es/components/loading/loading.rtl.css.js +1 -1
- package/es/components/loading/types.d.ts +1 -1
- package/es/components/loading/types.d.ts.map +1 -1
- package/es/components/loading/types.js +1 -1
- package/es/components/loading/types.js.map +1 -1
- package/es/components/modal/defs.d.ts +1 -1
- package/es/components/modal/defs.d.ts.map +1 -1
- package/es/components/modal/defs.js +1 -1
- package/es/components/modal/defs.js.map +1 -1
- package/es/components/modal/index.d.ts +1 -1
- package/es/components/modal/index.d.ts.map +1 -1
- package/es/components/modal/index.js +1 -1
- package/es/components/modal/index.js.map +1 -1
- package/es/components/modal/modal-body.d.ts.map +1 -1
- package/es/components/modal/modal-body.js +2 -6
- package/es/components/modal/modal-body.js.map +1 -1
- package/es/components/modal/modal-close-button.d.ts.map +1 -1
- package/es/components/modal/modal-close-button.js +3 -8
- package/es/components/modal/modal-close-button.js.map +1 -1
- package/es/components/modal/modal-footer-button.d.ts.map +1 -1
- package/es/components/modal/modal-footer-button.js +2 -6
- package/es/components/modal/modal-footer-button.js.map +1 -1
- package/es/components/modal/modal-footer.d.ts.map +1 -1
- package/es/components/modal/modal-footer.js +3 -6
- package/es/components/modal/modal-footer.js.map +1 -1
- package/es/components/modal/modal-header.d.ts.map +1 -1
- package/es/components/modal/modal-header.js +2 -6
- package/es/components/modal/modal-header.js.map +1 -1
- package/es/components/modal/modal-heading.d.ts.map +1 -1
- package/es/components/modal/modal-heading.js +2 -6
- package/es/components/modal/modal-heading.js.map +1 -1
- package/es/components/modal/modal-label.d.ts.map +1 -1
- package/es/components/modal/modal-label.js +2 -6
- package/es/components/modal/modal-label.js.map +1 -1
- package/es/components/modal/modal.css.js +1 -1
- package/es/components/modal/modal.d.ts.map +1 -1
- package/es/components/modal/modal.js +2 -1
- package/es/components/modal/modal.js.map +1 -1
- package/es/components/modal/modal.rtl.css.js +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 -6
- package/es/components/multi-select/multi-select-item.js.map +1 -1
- package/es/components/multi-select/multi-select.css.js +1 -1
- package/es/components/multi-select/multi-select.d.ts.map +1 -1
- package/es/components/multi-select/multi-select.js +2 -1
- package/es/components/multi-select/multi-select.js.map +1 -1
- package/es/components/multi-select/multi-select.rtl.css.js +1 -1
- package/es/components/notification/actionable-notification-button.js.map +1 -1
- package/es/components/notification/actionable-notification.css.js +1 -1
- package/es/components/notification/actionable-notification.js.map +1 -1
- package/es/components/notification/actionable-notification.rtl.css.js +1 -1
- package/es/components/notification/inline-notification.css.js +1 -1
- package/es/components/notification/inline-notification.d.ts.map +1 -1
- package/es/components/notification/inline-notification.js +2 -1
- package/es/components/notification/inline-notification.js.map +1 -1
- package/es/components/notification/inline-notification.rtl.css.js +1 -1
- package/es/components/notification/toast-notification.css.js +1 -1
- package/es/components/notification/toast-notification.d.ts.map +1 -1
- package/es/components/notification/toast-notification.js +2 -1
- package/es/components/notification/toast-notification.js.map +1 -1
- package/es/components/notification/toast-notification.rtl.css.js +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 -4
- package/es/components/number-input/number-input-skeleton.js.map +1 -1
- package/es/components/number-input/number-input.css.js +1 -1
- package/es/components/number-input/number-input.d.ts.map +1 -1
- package/es/components/number-input/number-input.js +2 -1
- package/es/components/number-input/number-input.js.map +1 -1
- package/es/components/number-input/number-input.rtl.css.js +1 -1
- package/es/components/overflow-menu/overflow-menu-body.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu-body.js +2 -1
- package/es/components/overflow-menu/overflow-menu-body.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.js +2 -1
- package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu.css.js +1 -1
- package/es/components/overflow-menu/overflow-menu.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu.js +2 -4
- package/es/components/overflow-menu/overflow-menu.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu.rtl.css.js +1 -1
- package/es/components/pagination/pagination.css.js +1 -1
- package/es/components/pagination/pagination.d.ts.map +1 -1
- package/es/components/pagination/pagination.js +12 -6
- package/es/components/pagination/pagination.js.map +1 -1
- package/es/components/pagination/pagination.rtl.css.js +1 -1
- package/es/components/popover/popover.css.js +1 -1
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/popover/popover.rtl.css.js +1 -1
- package/es/components/progress-bar/progress-bar.css.js +1 -1
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/progress-bar/progress-bar.rtl.css.js +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 -4
- package/es/components/progress-indicator/progress-indicator-skeleton.js.map +1 -1
- package/es/components/progress-indicator/progress-indicator.css.js +1 -1
- package/es/components/progress-indicator/progress-indicator.d.ts.map +1 -1
- package/es/components/progress-indicator/progress-indicator.js +3 -6
- package/es/components/progress-indicator/progress-indicator.js.map +1 -1
- package/es/components/progress-indicator/progress-indicator.rtl.css.js +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.map +1 -1
- package/es/components/progress-indicator/progress-step.js +2 -1
- package/es/components/progress-indicator/progress-step.js.map +1 -1
- package/es/components/radio-button/radio-button-group.d.ts +23 -1
- package/es/components/radio-button/radio-button-group.d.ts.map +1 -1
- package/es/components/radio-button/radio-button-group.js +111 -11
- package/es/components/radio-button/radio-button-group.js.map +1 -1
- package/es/components/radio-button/radio-button-skeleton.d.ts.map +1 -1
- package/es/components/radio-button/radio-button-skeleton.js +2 -4
- package/es/components/radio-button/radio-button-skeleton.js.map +1 -1
- package/es/components/radio-button/radio-button.css.js +1 -1
- package/es/components/radio-button/radio-button.d.ts +4 -0
- package/es/components/radio-button/radio-button.d.ts.map +1 -1
- package/es/components/radio-button/radio-button.js +20 -1
- package/es/components/radio-button/radio-button.js.map +1 -1
- package/es/components/radio-button/radio-button.rtl.css.js +1 -1
- package/es/components/search/search-skeleton.d.ts.map +1 -1
- package/es/components/search/search-skeleton.js +3 -4
- package/es/components/search/search-skeleton.js.map +1 -1
- package/es/components/search/search.css.js +1 -1
- package/es/components/search/search.d.ts.map +1 -1
- package/es/components/search/search.js +3 -12
- package/es/components/search/search.js.map +1 -1
- package/es/components/search/search.rtl.css.js +1 -1
- package/es/components/select/select-item-group.d.ts.map +1 -1
- package/es/components/select/select-item-group.js +2 -1
- package/es/components/select/select-item-group.js.map +1 -1
- package/es/components/select/select-item.d.ts.map +1 -1
- package/es/components/select/select-item.js +2 -1
- package/es/components/select/select-item.js.map +1 -1
- package/es/components/select/select.css.js +1 -1
- package/es/components/select/select.d.ts.map +1 -1
- package/es/components/select/select.js +3 -9
- package/es/components/select/select.js.map +1 -1
- package/es/components/select/select.rtl.css.js +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts.map +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.js +2 -6
- package/es/components/skeleton-placeholder/skeleton-placeholder.js.map +1 -1
- package/es/components/skeleton-text/skeleton-text.d.ts.map +1 -1
- package/es/components/skeleton-text/skeleton-text.js +2 -1
- package/es/components/skeleton-text/skeleton-text.js.map +1 -1
- package/es/components/skip-to-content/skip-to-content.css.js +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 -6
- package/es/components/skip-to-content/skip-to-content.js.map +1 -1
- package/es/components/skip-to-content/skip-to-content.rtl.css.js +1 -1
- package/es/components/slider/slider-input.d.ts +4 -0
- package/es/components/slider/slider-input.d.ts.map +1 -1
- package/es/components/slider/slider-input.js +35 -15
- package/es/components/slider/slider-input.js.map +1 -1
- package/es/components/slider/slider-skeleton.d.ts.map +1 -1
- package/es/components/slider/slider-skeleton.js +2 -4
- package/es/components/slider/slider-skeleton.js.map +1 -1
- package/es/components/slider/slider.css.js +1 -1
- package/es/components/slider/slider.d.ts +17 -0
- package/es/components/slider/slider.d.ts.map +1 -1
- package/es/components/slider/slider.js +94 -7
- package/es/components/slider/slider.js.map +1 -1
- package/es/components/slider/slider.rtl.css.js +1 -1
- package/es/components/stack/defs.js.map +1 -1
- package/es/components/structured-list/structured-list-body.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-body.js +1 -1
- package/es/components/structured-list/structured-list-body.js.map +1 -1
- package/es/components/structured-list/structured-list-cell.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-cell.js +2 -6
- package/es/components/structured-list/structured-list-cell.js.map +1 -1
- package/es/components/structured-list/structured-list-head.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-head.js +1 -1
- package/es/components/structured-list/structured-list-head.js.map +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 +2 -4
- 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.map +1 -1
- package/es/components/structured-list/structured-list-header-cell.js +2 -6
- package/es/components/structured-list/structured-list-header-cell.js.map +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 +2 -1
- package/es/components/structured-list/structured-list-header-row.js.map +1 -1
- package/es/components/structured-list/structured-list-row.d.ts +0 -3
- package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-row.js +3 -4
- package/es/components/structured-list/structured-list-row.js.map +1 -1
- package/es/components/structured-list/structured-list.css.js +1 -1
- package/es/components/structured-list/structured-list.d.ts.map +1 -1
- package/es/components/structured-list/structured-list.js +3 -6
- package/es/components/structured-list/structured-list.js.map +1 -1
- package/es/components/structured-list/structured-list.rtl.css.js +1 -1
- package/es/components/tabs/tab-skeleton.d.ts.map +1 -1
- package/es/components/tabs/tab-skeleton.js +2 -4
- package/es/components/tabs/tab-skeleton.js.map +1 -1
- package/es/components/tabs/tab.d.ts.map +1 -1
- package/es/components/tabs/tab.js +3 -6
- package/es/components/tabs/tab.js.map +1 -1
- package/es/components/tabs/tabs-skeleton.d.ts.map +1 -1
- package/es/components/tabs/tabs-skeleton.js +2 -4
- package/es/components/tabs/tabs-skeleton.js.map +1 -1
- package/es/components/tabs/tabs.css.js +1 -1
- package/es/components/tabs/tabs.d.ts.map +1 -1
- package/es/components/tabs/tabs.js +3 -8
- package/es/components/tabs/tabs.js.map +1 -1
- package/es/components/tabs/tabs.rtl.css.js +1 -1
- package/es/components/tag/tag.css.js +1 -1
- package/es/components/tag/tag.d.ts.map +1 -1
- package/es/components/tag/tag.js +2 -1
- package/es/components/tag/tag.js.map +1 -1
- package/es/components/tag/tag.rtl.css.js +1 -1
- package/es/components/text-input/text-input.css.js +1 -1
- package/es/components/text-input/text-input.d.ts +4 -4
- package/es/components/text-input/text-input.d.ts.map +1 -1
- package/es/components/text-input/text-input.js +13 -12
- package/es/components/text-input/text-input.js.map +1 -1
- package/es/components/text-input/text-input.rtl.css.js +1 -1
- package/es/components/textarea/textarea-skeleton.d.ts.map +1 -1
- package/es/components/textarea/textarea-skeleton.js +2 -4
- package/es/components/textarea/textarea-skeleton.js.map +1 -1
- package/es/components/textarea/textarea.css.js +1 -1
- package/es/components/textarea/textarea.d.ts.map +1 -1
- package/es/components/textarea/textarea.js +12 -14
- package/es/components/textarea/textarea.js.map +1 -1
- package/es/components/textarea/textarea.rtl.css.js +1 -1
- package/es/components/tile/clickable-tile.d.ts.map +1 -1
- package/es/components/tile/clickable-tile.js +3 -6
- package/es/components/tile/clickable-tile.js.map +1 -1
- package/es/components/tile/expandable-tile.d.ts.map +1 -1
- package/es/components/tile/expandable-tile.js +2 -1
- package/es/components/tile/expandable-tile.js.map +1 -1
- package/es/components/tile/radio-tile.d.ts.map +1 -1
- package/es/components/tile/radio-tile.js +2 -6
- package/es/components/tile/radio-tile.js.map +1 -1
- package/es/components/tile/selectable-tile.d.ts +3 -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.map +1 -1
- package/es/components/tile/tile-group.js +3 -4
- package/es/components/tile/tile-group.js.map +1 -1
- package/es/components/tile/tile.css.js +1 -1
- package/es/components/tile/tile.d.ts.map +1 -1
- package/es/components/tile/tile.js +2 -1
- package/es/components/tile/tile.js.map +1 -1
- package/es/components/tile/tile.rtl.css.js +1 -1
- package/es/components/toggle/toggle.css.js +1 -1
- package/es/components/toggle/toggle.d.ts.map +1 -1
- package/es/components/toggle/toggle.js +2 -1
- package/es/components/toggle/toggle.js.map +1 -1
- package/es/components/toggle/toggle.rtl.css.js +1 -1
- package/es/components/toggle-tip/toggletip.css.js +1 -1
- package/es/components/toggle-tip/toggletip.js.map +1 -1
- package/es/components/toggle-tip/toggletip.rtl.css.js +1 -1
- package/es/components/tooltip/tooltip.css.js +1 -1
- package/es/components/tooltip/tooltip.d.ts +0 -1
- package/es/components/tooltip/tooltip.d.ts.map +1 -1
- package/es/components/tooltip/tooltip.js +3 -2
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/components/tooltip/tooltip.rtl.css.js +1 -1
- package/es/components/ui-shell/header-global-action.d.ts +16 -1
- package/es/components/ui-shell/header-global-action.d.ts.map +1 -1
- package/es/components/ui-shell/header-global-action.js +92 -8
- package/es/components/ui-shell/header-global-action.js.map +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 -9
- package/es/components/ui-shell/header-menu-button.js.map +1 -1
- package/es/components/ui-shell/header-menu-item.d.ts.map +1 -1
- package/es/components/ui-shell/header-menu-item.js +1 -1
- 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 +11 -17
- package/es/components/ui-shell/header-menu.js.map +1 -1
- package/es/components/ui-shell/header-name.d.ts.map +1 -1
- package/es/components/ui-shell/header-name.js +3 -8
- package/es/components/ui-shell/header-name.js.map +1 -1
- package/es/components/ui-shell/header-nav-item.d.ts +8 -0
- package/es/components/ui-shell/header-nav-item.d.ts.map +1 -1
- package/es/components/ui-shell/header-nav-item.js +32 -11
- package/es/components/ui-shell/header-nav-item.js.map +1 -1
- package/es/components/ui-shell/header-nav.d.ts.map +1 -1
- package/es/components/ui-shell/header-nav.js +2 -1
- package/es/components/ui-shell/header-nav.js.map +1 -1
- package/es/components/ui-shell/header.css.js +1 -1
- package/es/components/ui-shell/header.d.ts.map +1 -1
- package/es/components/ui-shell/header.js +1 -1
- package/es/components/ui-shell/header.js.map +1 -1
- package/es/components/ui-shell/header.rtl.css.js +1 -1
- package/es/components/ui-shell/index.d.ts +12 -11
- package/es/components/ui-shell/index.d.ts.map +1 -1
- package/es/components/ui-shell/index.js +12 -11
- package/es/components/ui-shell/index.js.map +1 -1
- package/es/components/ui-shell/side-nav-divider.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-divider.js +1 -1
- package/es/components/ui-shell/side-nav-divider.js.map +1 -1
- package/es/components/ui-shell/side-nav-items.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-items.js +1 -1
- package/es/components/ui-shell/side-nav-items.js.map +1 -1
- package/es/components/ui-shell/side-nav-link.d.ts +8 -0
- package/es/components/ui-shell/side-nav-link.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav-link.js +33 -11
- package/es/components/ui-shell/side-nav-link.js.map +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 -8
- package/es/components/ui-shell/side-nav-menu-item.js.map +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 -13
- package/es/components/ui-shell/side-nav-menu.js.map +1 -1
- package/es/components/ui-shell/side-nav.css.js +1 -1
- package/es/components/ui-shell/side-nav.d.ts +5 -0
- package/es/components/ui-shell/side-nav.d.ts.map +1 -1
- package/es/components/ui-shell/side-nav.js +16 -2
- package/es/components/ui-shell/side-nav.js.map +1 -1
- package/es/components/ui-shell/side-nav.rtl.css.js +1 -1
- package/es/components/ui-shell/switcher-item.js.map +1 -1
- package/es/globals/decorators/carbon-element.d.ts +29 -0
- package/es/globals/decorators/carbon-element.d.ts.map +1 -0
- package/es/globals/decorators/carbon-element.js +67 -0
- package/es/globals/decorators/carbon-element.js.map +1 -0
- package/es/globals/decorators/host-listener.js.map +1 -1
- package/es/globals/directives/spread.d.ts +1 -1
- package/es/globals/directives/spread.d.ts.map +1 -1
- package/es/globals/directives/spread.js +1 -1
- package/es/globals/directives/spread.js.map +1 -1
- package/es/globals/internal/radio-group-manager.js +3 -4
- package/es/globals/internal/radio-group-manager.js.map +1 -1
- package/es/globals/internal/storybook-cdn.d.ts +1 -1
- package/es/globals/internal/storybook-cdn.d.ts.map +1 -1
- package/es/globals/internal/storybook-cdn.js +3 -3
- package/es/globals/internal/storybook-cdn.js.map +1 -1
- package/es/globals/mixins/focus.js.map +1 -1
- package/es/globals/mixins/form.js +6 -1
- package/es/globals/mixins/form.js.map +1 -1
- package/es/globals/mixins/host-listener.js.map +1 -1
- package/es/globals/mixins/temp-layout.css.js +12 -0
- package/es/globals/mixins/temp-layout.rtl.css.js +12 -0
- package/es/globals/mixins/validity.js +16 -0
- package/es/globals/mixins/validity.js.map +1 -1
- package/es/globals/wrappers/createReactCustomElementType.js +17 -0
- package/es/globals/wrappers/createReactCustomElementType.js.map +1 -1
- package/es/polyfills/toggle-class.js.map +1 -1
- package/lib/components/accordion/defs.js +1 -1
- package/lib/components/accordion/defs.js.map +1 -1
- package/lib/components/button/defs.js +1 -1
- package/lib/components/button/defs.js.map +1 -1
- package/lib/components/code-snippet/defs.js +1 -1
- package/lib/components/code-snippet/defs.js.map +1 -1
- package/lib/components/content-switcher/defs.js +1 -1
- package/lib/components/content-switcher/defs.js.map +1 -1
- package/lib/components/date-picker/defs.js +1 -1
- package/lib/components/date-picker/defs.js.map +1 -1
- package/lib/components/dropdown/defs.js +1 -1
- package/lib/components/dropdown/defs.js.map +1 -1
- package/lib/components/file-uploader/defs.js +1 -1
- package/lib/components/file-uploader/defs.js.map +1 -1
- package/lib/components/floating-menu/defs.js +1 -1
- package/lib/components/floating-menu/defs.js.map +1 -1
- package/lib/components/inline-loading/defs.js +1 -1
- package/lib/components/inline-loading/defs.js.map +1 -1
- package/lib/components/loading/defs.js +1 -1
- package/lib/components/loading/defs.js.map +1 -1
- package/lib/components/modal/defs.js +1 -1
- package/lib/components/modal/defs.js.map +1 -1
- package/lib/components/stack/defs.js.map +1 -1
- package/lib/globals/wrappers/createReactCustomElementType.js +16 -0
- package/lib/globals/wrappers/createReactCustomElementType.js.map +1 -1
- package/package.json +17 -16
- package/scss/components/accordion/accordion.scss +10 -5
- package/scss/components/breadcrumb/breadcrumb.scss +7 -0
- package/scss/components/button/button.scss +7 -2
- package/scss/components/code-snippet/code-snippet.scss +6 -8
- package/scss/components/combo-box/combo-box.scss +0 -10
- package/scss/components/content-switcher/content-switcher.scss +8 -21
- package/scss/components/copy-button/copy-button.scss +3 -3
- package/scss/components/data-table/_table-action.scss +4 -0
- package/scss/components/data-table/_table-core.scss +0 -2
- package/scss/components/data-table/data-table.scss +0 -1
- package/scss/components/date-picker/date-picker.scss +0 -3
- package/scss/components/dropdown/dropdown.scss +1 -2
- package/scss/components/file-uploader/file-uploader.scss +3 -5
- package/scss/components/icon-button/icon-button.scss +5 -0
- package/scss/components/inline-loading/inline-loading.scss +0 -3
- package/scss/components/modal/modal.scss +1 -4
- package/scss/components/multi-select/multi-select.scss +0 -3
- package/scss/components/notification/actionable-notification.scss +69 -24
- package/scss/components/notification/inline-notification.scss +76 -25
- package/scss/components/notification/toast-notification.scss +43 -27
- package/scss/components/number-input/number-input.scss +0 -3
- package/scss/components/overflow-menu/overflow-menu.scss +8 -3
- package/scss/components/pagination/pagination.scss +8 -3
- package/scss/components/popover/popover.scss +4 -2
- package/scss/components/progress-bar/progress-bar.scss +0 -5
- package/scss/components/progress-indicator/progress-indicator.scss +0 -3
- package/scss/components/radio-button/radio-button.scss +24 -1
- package/scss/components/search/search.scss +33 -3
- package/scss/components/select/select.scss +0 -3
- package/scss/components/slider/slider.scss +2 -3
- package/scss/components/structured-list/structured-list.scss +0 -5
- package/scss/components/tag/tag.scss +10 -5
- package/scss/components/text-input/text-input.scss +2 -2
- package/scss/components/textarea/textarea.scss +0 -3
- package/scss/components/tile/tile.scss +7 -8
- package/scss/components/tooltip/tooltip.scss +4 -4
- package/scss/components/ui-shell/header.scss +13 -3
- package/scss/components/ui-shell/side-nav.scss +0 -5
- package/scss/globals/mixins/temp-layout.scss +36 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReactCustomElementType.js","names":["Component","createElement","forwardRef","on","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","constructor","args","_defineProperty","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties","mergedRef","_handleElemRef","booleanSerializer","numberSerializer","String","objectSerializer","JSON","stringify"],"sources":["globals/wrappers/createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from '../mixins/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAgBA,SAAS,EAAEC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AACnE,OAAOC,EAAE,MAAM,cAAc;AA6D7B;AACA;AACA;AACA;AACA,MAAMC,SAAS,GACbA,CAAI,GAAGC,IAAoB,KAC1BC,EAAE,IAAK;EACND,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB;IACA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,EAAE,CAAC;IACT,CAAC,MAAM,IAAIG,MAAM,CAACD,GAAG,CAAC,KAAKA,GAAG,EAAE;MAC9B;MACCA,GAAG,CAAoBE,OAAO,GAAGJ,EAAE;IACtC;EACF,CAAC,CAAC;AACJ,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA,MAAMK,WAAW,GAAGA,CAACC,IAAS,EAAEC,UAAuC,KAAK;EAC1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AC;IACJ;IAEAC,iBAAiBA,CAAA,EAAG;MAClB,IAAI,CAACJ,WAAW,EAAE;IACpB;IAEAK,kBAAkBA,CAACJ,SAAS,EAAE;MAC5B,IAAI,CAACD,WAAW,CAACC,SAAS,CAAC;IAC7B;IAEAK,MAAMA,CAAA,EAAG;MACP;MACA,MAAAC,WAAA,GAAyC,IAAI,CAACzC,KAAK;QAA7C;UAAE0C,QAAQ;UAAEC;QAAmB,CAAC,GAAAF,WAAA;QAAPzC,KAAK,GAAA4C,wBAAA,CAAAH,WAAA;MACpC,MAAMI,SAAS,GAAG3D,SAAS,CAAcyD,QAAQ,EAAE,IAAI,CAACG,cAAc,CAAC;MACvE,OAAO/D,aAAa,CAClBgC,IAAI,EAAAP,aAAA;QACFlB,GAAG,EAAEuD;MAAS,GAAK9C,YAAY,CAACC,KAAK,EAAEL,UAAU,CAAC,GACpD+C,QAAQ,CACT;IACH;EACF;EAEA,OAAO1D,UAAU,CAAsC,CAACgB,KAAK,EAAEV,GAAG,KAChEP,aAAa,CAACyC,iBAAiB,EAAAhB,aAAA,CAAAA,aAAA,KAAOR,KAAK;IAAE2C,QAAQ,EAAErD;EAAG,GAAG,CAC9D;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMyD,iBAAiB,GAAIV,KAAK,IAAM,CAACA,KAAK,GAAGvC,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMkD,gBAAgB,GAAIX,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGY,MAAM,CAACZ,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMa,gBAAgB,GAAIb,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGc,IAAI,CAACC,SAAS,CAACf,KAAK,CAAC;AAE/C,eAAehB,4BAA4B"}
|
|
1
|
+
{"version":3,"file":"createReactCustomElementType.js","names":["Component","createElement","forwardRef","on","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","constructor","args","_defineProperty","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties","mergedRef","_handleElemRef","booleanSerializer","numberSerializer","String","objectSerializer","JSON","stringify"],"sources":["globals/wrappers/createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from '../mixins/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"],"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F,CAAC;IACH;EACF;EAEA,OAAO1D,UAAU,CAAsC,CAACgB,KAAK,EAAEV,GAAG,KAChEP,aAAa,CAACyC,iBAAiB,EAAAhB,aAAA,CAAAA,aAAA,KAAOR,KAAK;IAAE2C,QAAQ,EAAErD;EAAG,EAAE,CAC9D,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMyD,iBAAiB,GAAIV,KAAK,IAAM,CAACA,KAAK,GAAGvC,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMkD,gBAAgB,GAAIX,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGY,MAAM,CAACZ,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMa,gBAAgB,GAAIb,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGc,IAAI,CAACC,SAAS,CAACf,KAAK,CAAC;AAE/C,eAAehB,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-class.js","names":["missingNativeDOMTokenListToggleForce","elem","document","createElement","randomClass","Math","random","toString","slice","classList","toggle","contains","origToggle","DOMTokenList","prototype","toggleDOMTokenList","name","add","arguments","length","call"],"sources":["polyfills/toggle-class.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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\nconst missingNativeDOMTokenListToggleForce = (() => {\n const elem = document.createElement('div');\n const randomClass = `_random_class_${Math.random().toString(36).slice(2)}`;\n elem.classList.toggle(randomClass, false);\n return elem.classList.contains(randomClass);\n})();\nif (missingNativeDOMTokenListToggleForce) {\n (() => {\n const origToggle = DOMTokenList.prototype.toggle;\n DOMTokenList.prototype.toggle = function toggleDOMTokenList(\n name: string,\n add: boolean\n ) {\n return arguments.length < 2 || this.contains(name) === !add\n ? origToggle.call(this, name)\n : add;\n };\n })();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,oCAAoC,GAAG,CAAC,MAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC1C,MAAMC,WAAW,GAAI,iBAAgBC,IAAI,CAACC,MAAM,
|
|
1
|
+
{"version":3,"file":"toggle-class.js","names":["missingNativeDOMTokenListToggleForce","elem","document","createElement","randomClass","Math","random","toString","slice","classList","toggle","contains","origToggle","DOMTokenList","prototype","toggleDOMTokenList","name","add","arguments","length","call"],"sources":["polyfills/toggle-class.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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\nconst missingNativeDOMTokenListToggleForce = (() => {\n const elem = document.createElement('div');\n const randomClass = `_random_class_${Math.random().toString(36).slice(2)}`;\n elem.classList.toggle(randomClass, false);\n return elem.classList.contains(randomClass);\n})();\nif (missingNativeDOMTokenListToggleForce) {\n (() => {\n const origToggle = DOMTokenList.prototype.toggle;\n DOMTokenList.prototype.toggle = function toggleDOMTokenList(\n name: string,\n add: boolean\n ) {\n return arguments.length < 2 || this.contains(name) === !add\n ? origToggle.call(this, name)\n : add;\n };\n })();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,oCAAoC,GAAG,CAAC,MAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC1C,MAAMC,WAAW,GAAI,iBAAgBC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAE,EAAC;EAC1EP,IAAI,CAACQ,SAAS,CAACC,MAAM,CAACN,WAAW,EAAE,KAAK,CAAC;EACzC,OAAOH,IAAI,CAACQ,SAAS,CAACE,QAAQ,CAACP,WAAW,CAAC;AAC7C,CAAC,EAAE,CAAC;AACJ,IAAIJ,oCAAoC,EAAE;EACxC,CAAC,MAAM;IACL,MAAMY,UAAU,GAAGC,YAAY,CAACC,SAAS,CAACJ,MAAM;IAChDG,YAAY,CAACC,SAAS,CAACJ,MAAM,GAAG,SAASK,kBAAkBA,CACzDC,IAAY,EACZC,GAAY,EACZ;MACA,OAAOC,SAAS,CAACC,MAAM,GAAG,CAAC,IAAI,IAAI,CAACR,QAAQ,CAACK,IAAI,CAAC,KAAK,CAACC,GAAG,GACvDL,UAAU,CAACQ,IAAI,CAAC,IAAI,EAAEJ,IAAI,CAAC,GAC3BC,GAAG;IACT,CAAC;EACH,CAAC,EAAE,CAAC;AACN"}
|
|
@@ -7,7 +7,7 @@ exports.ACCORDION_SIZE = exports.ACCORDION_ITEM_BREAKPOINT = exports.ACCORDION_A
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["ACCORDION_ITEM_BREAKPOINT","exports","ACCORDION_SIZE","ACCORDION_ALIGNMENT"],"sources":["components/accordion/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * Breakpoints for accordion items. It's different from one in `@carbon/layout` library.\n */\nexport enum ACCORDION_ITEM_BREAKPOINT {\n /**\n * Small breakpoint.\n */\n SMALL = 'sm',\n\n /**\n * Medium breakpoint.\n */\n MEDIUM = 'md',\n}\n\n/**\n * Accordion size.\n */\nexport enum ACCORDION_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n\n/**\n * Specify the alignment of the accordion heading title and chevron.\n */\nexport enum ACCORDION_ALIGNMENT {\n /**\n * Alignment to the start\n */\n START = 'start',\n\n /**\n * Alignment to the end\n */\n END = 'END',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,yBAAyB;AAYrC;AACA;AACA;AAFAC,OAAA,CAAAD,yBAAA,GAAAA,yBAAA;AAAA,WAZYA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,KAAAC,OAAA,CAAAD,yBAAA,GAAzBA,yBAAyB;AAAA,IAezBE,cAAc;AAiB1B;AACA;AACA;AAFAD,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAAA,WAjBYA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAAD,OAAA,CAAAC,cAAA,GAAdA,cAAc;AAAA,IAoBdC,mBAAmB;AAAAF,OAAA,CAAAE,mBAAA,GAAAA,mBAAA;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAAF,OAAA,CAAAE,mBAAA,GAAnBA,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["ACCORDION_ITEM_BREAKPOINT","exports","ACCORDION_SIZE","ACCORDION_ALIGNMENT"],"sources":["components/accordion/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * Breakpoints for accordion items. It's different from one in `@carbon/layout` library.\n */\nexport enum ACCORDION_ITEM_BREAKPOINT {\n /**\n * Small breakpoint.\n */\n SMALL = 'sm',\n\n /**\n * Medium breakpoint.\n */\n MEDIUM = 'md',\n}\n\n/**\n * Accordion size.\n */\nexport enum ACCORDION_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n\n/**\n * Specify the alignment of the accordion heading title and chevron.\n */\nexport enum ACCORDION_ALIGNMENT {\n /**\n * Alignment to the start\n */\n START = 'start',\n\n /**\n * Alignment to the end\n */\n END = 'END',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,yBAAyB;AAYrC;AACA;AACA;AAFAC,OAAA,CAAAD,yBAAA,GAAAA,yBAAA;AAAA,WAZYA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,KAAAC,OAAA,CAAAD,yBAAA,GAAzBA,yBAAyB;AAAA,IAezBE,cAAc;AAiB1B;AACA;AACA;AAFAD,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAAA,WAjBYA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAAD,OAAA,CAAAC,cAAA,GAAdA,cAAc;AAAA,IAoBdC,mBAAmB;AAAAF,OAAA,CAAAE,mBAAA,GAAAA,mBAAA;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAAF,OAAA,CAAAE,mBAAA,GAAnBA,mBAAmB"}
|
|
@@ -7,7 +7,7 @@ exports.BUTTON_TYPE = exports.BUTTON_TOOLTIP_POSITION = exports.BUTTON_TOOLTIP_A
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["BUTTON_KIND","exports","BUTTON_TYPE","BUTTON_SIZE","BUTTON_TOOLTIP_ALIGNMENT","BUTTON_TOOLTIP_POSITION"],"sources":["components/button/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * Button kind.\n */\nexport enum BUTTON_KIND {\n /**\n * Primary button.\n */\n PRIMARY = 'primary',\n\n /**\n * Secondary button.\n */\n SECONDARY = 'secondary',\n\n /**\n * Tertiary button.\n */\n TERTIARY = 'tertiary',\n\n /**\n * Ghost button.\n */\n GHOST = 'ghost',\n\n /**\n * Danger button.\n */\n DANGER = 'danger',\n\n /**\n * Danger primary button.\n */\n DANGER_PRIMARY = 'danger-primary',\n\n /**\n * Danger tertiary button.\n */\n DANGER_TERTIARY = 'danger-tertiary',\n\n /**\n * Danger ghost button,\n */\n DANGER_GHOST = 'danger-ghost',\n}\n\n/**\n * Button type.\n */\nexport enum BUTTON_TYPE {\n /**\n * Default button type.\n */\n BUTTON = 'button',\n\n /**\n * Reset button type.\n */\n RESET = 'reset',\n\n /**\n * Submit button type.\n */\n SUBMIT = 'submit',\n}\n\n/**\n * Button size.\n */\nexport enum BUTTON_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n /**\n * X-Large size.\n */\n EXTRA_LARGE = 'xl',\n\n /**\n * 2X-Large size.\n */\n EXTRA_EXTRA_LARGE = '2xl',\n}\n\n/**\n * Button tooltip alignment.\n */\nexport enum BUTTON_TOOLTIP_ALIGNMENT {\n /**\n * Aligned to the start.\n */\n START = 'left',\n\n /**\n * Aligned to the center.\n */\n CENTER = '',\n\n /**\n * Aligned to the end.\n */\n END = 'right',\n}\n\n/**\n * Button tooltip position.\n */\nexport enum BUTTON_TOOLTIP_POSITION {\n /**\n * Positioned on the top.\n */\n TOP = 'top',\n\n /**\n * Positioned on the right.\n */\n RIGHT = 'right',\n\n /**\n * Positioned on the bottom.\n */\n BOTTOM = 'bottom',\n\n /**\n * Positined on the left.\n */\n LEFT = 'left',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,WAAW;AA0CvB;AACA;AACA;AAFAC,OAAA,CAAAD,WAAA,GAAAA,WAAA;AAAA,WA1CYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAC,OAAA,CAAAD,WAAA,GAAXA,WAAW;AAAA,IA6CXE,WAAW;AAiBvB;AACA;AACA;AAFAD,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAA,WAjBYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAD,OAAA,CAAAC,WAAA,GAAXA,WAAW;AAAA,IAoBXC,WAAW;AA2BvB;AACA;AACA;AAFAF,OAAA,CAAAE,WAAA,GAAAA,WAAA;AAAA,WA3BYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAF,OAAA,CAAAE,WAAA,GAAXA,WAAW;AAAA,IA8BXC,wBAAwB;AAiBpC;AACA;AACA;AAFAH,OAAA,CAAAG,wBAAA,GAAAA,wBAAA;AAAA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAH,OAAA,CAAAG,wBAAA,GAAxBA,wBAAwB;AAAA,IAoBxBC,uBAAuB;AAAAJ,OAAA,CAAAI,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAJ,OAAA,CAAAI,uBAAA,GAAvBA,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["BUTTON_KIND","exports","BUTTON_TYPE","BUTTON_SIZE","BUTTON_TOOLTIP_ALIGNMENT","BUTTON_TOOLTIP_POSITION"],"sources":["components/button/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * Button kind.\n */\nexport enum BUTTON_KIND {\n /**\n * Primary button.\n */\n PRIMARY = 'primary',\n\n /**\n * Secondary button.\n */\n SECONDARY = 'secondary',\n\n /**\n * Tertiary button.\n */\n TERTIARY = 'tertiary',\n\n /**\n * Ghost button.\n */\n GHOST = 'ghost',\n\n /**\n * Danger button.\n */\n DANGER = 'danger',\n\n /**\n * Danger primary button.\n */\n DANGER_PRIMARY = 'danger-primary',\n\n /**\n * Danger tertiary button.\n */\n DANGER_TERTIARY = 'danger-tertiary',\n\n /**\n * Danger ghost button,\n */\n DANGER_GHOST = 'danger-ghost',\n}\n\n/**\n * Button type.\n */\nexport enum BUTTON_TYPE {\n /**\n * Default button type.\n */\n BUTTON = 'button',\n\n /**\n * Reset button type.\n */\n RESET = 'reset',\n\n /**\n * Submit button type.\n */\n SUBMIT = 'submit',\n}\n\n/**\n * Button size.\n */\nexport enum BUTTON_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n /**\n * X-Large size.\n */\n EXTRA_LARGE = 'xl',\n\n /**\n * 2X-Large size.\n */\n EXTRA_EXTRA_LARGE = '2xl',\n}\n\n/**\n * Button tooltip alignment.\n */\nexport enum BUTTON_TOOLTIP_ALIGNMENT {\n /**\n * Aligned to the start.\n */\n START = 'left',\n\n /**\n * Aligned to the center.\n */\n CENTER = '',\n\n /**\n * Aligned to the end.\n */\n END = 'right',\n}\n\n/**\n * Button tooltip position.\n */\nexport enum BUTTON_TOOLTIP_POSITION {\n /**\n * Positioned on the top.\n */\n TOP = 'top',\n\n /**\n * Positioned on the right.\n */\n RIGHT = 'right',\n\n /**\n * Positioned on the bottom.\n */\n BOTTOM = 'bottom',\n\n /**\n * Positined on the left.\n */\n LEFT = 'left',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,WAAW;AA0CvB;AACA;AACA;AAFAC,OAAA,CAAAD,WAAA,GAAAA,WAAA;AAAA,WA1CYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAC,OAAA,CAAAD,WAAA,GAAXA,WAAW;AAAA,IA6CXE,WAAW;AAiBvB;AACA;AACA;AAFAD,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAA,WAjBYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAD,OAAA,CAAAC,WAAA,GAAXA,WAAW;AAAA,IAoBXC,WAAW;AA2BvB;AACA;AACA;AAFAF,OAAA,CAAAE,WAAA,GAAAA,WAAA;AAAA,WA3BYA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAAF,OAAA,CAAAE,WAAA,GAAXA,WAAW;AAAA,IA8BXC,wBAAwB;AAiBpC;AACA;AACA;AAFAH,OAAA,CAAAG,wBAAA,GAAAA,wBAAA;AAAA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAH,OAAA,CAAAG,wBAAA,GAAxBA,wBAAwB;AAAA,IAoBxBC,uBAAuB;AAAAJ,OAAA,CAAAI,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAJ,OAAA,CAAAI,uBAAA,GAAvBA,uBAAuB"}
|
|
@@ -14,7 +14,7 @@ var _sharedEnums = require("../../globals/shared-enums");
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
*
|
|
17
|
-
* Copyright IBM Corp. 2020
|
|
17
|
+
* Copyright IBM Corp. 2020, 2022
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["_sharedEnums","require","CODE_SNIPPET_TYPE","exports"],"sources":["components/code-snippet/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020\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\nexport { FORM_ELEMENT_COLOR_SCHEME as CODE_SNIPPET_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Code snippet types.\n */\nexport enum CODE_SNIPPET_TYPE {\n /**\n * Single variant.\n */\n SINGLE = 'single',\n\n /**\n * Inline variant.\n */\n INLINE = 'inline',\n\n /**\n * Multi-line variant.\n */\n MULTI = 'multi',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,iBAAiB;AAAAC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAAA,WAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAAC,OAAA,CAAAD,iBAAA,GAAjBA,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["_sharedEnums","require","CODE_SNIPPET_TYPE","exports"],"sources":["components/code-snippet/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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\nexport { FORM_ELEMENT_COLOR_SCHEME as CODE_SNIPPET_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Code snippet types.\n */\nexport enum CODE_SNIPPET_TYPE {\n /**\n * Single variant.\n */\n SINGLE = 'single',\n\n /**\n * Inline variant.\n */\n INLINE = 'inline',\n\n /**\n * Multi-line variant.\n */\n MULTI = 'multi',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,iBAAiB;AAAAC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAAA,WAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAAC,OAAA,CAAAD,iBAAA,GAAjBA,iBAAiB"}
|
|
@@ -7,7 +7,7 @@ exports.NAVIGATION_DIRECTION = exports.CONTENT_SWITCHER_SIZE = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["NAVIGATION_DIRECTION","Left","ArrowLeft","Right","ArrowRight","exports","CONTENT_SWITCHER_SIZE"],"sources":["components/content-switcher/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * Navigation direction, associated with key symbols.\n */\nexport const NAVIGATION_DIRECTION = {\n Left: -1,\n ArrowLeft: -1,\n Right: 1,\n ArrowRight: 1,\n};\n\n/**\n * Button size.\n */\nexport enum CONTENT_SWITCHER_SIZE {\n /**\n * Regular size.\n */\n REGULAR = '',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n // TODO: deprecate\n /**\n * X-Large size.\n */\n EXTRA_LARGE = 'xl',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAG;EAClCC,IAAI,EAAE,CAAC,CAAC;EACRC,SAAS,EAAE,CAAC,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAL,oBAAA,GAAAA,oBAAA;AAAA,IAGYM,qBAAqB;AAAAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAAA,WAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;AAAA,GAArBA,qBAAqB,KAAAD,OAAA,CAAAC,qBAAA,GAArBA,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["NAVIGATION_DIRECTION","Left","ArrowLeft","Right","ArrowRight","exports","CONTENT_SWITCHER_SIZE"],"sources":["components/content-switcher/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * Navigation direction, associated with key symbols.\n */\nexport const NAVIGATION_DIRECTION = {\n Left: -1,\n ArrowLeft: -1,\n Right: 1,\n ArrowRight: 1,\n};\n\n/**\n * Button size.\n */\nexport enum CONTENT_SWITCHER_SIZE {\n /**\n * Regular size.\n */\n REGULAR = '',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n // TODO: deprecate\n /**\n * X-Large size.\n */\n EXTRA_LARGE = 'xl',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAG;EAClCC,IAAI,EAAE,CAAC,CAAC;EACRC,SAAS,EAAE,CAAC,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAL,oBAAA,GAAAA,oBAAA;AAAA,IAGYM,qBAAqB;AAAAD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAAA,WAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;AAAA,GAArBA,qBAAqB,KAAAD,OAAA,CAAAC,qBAAA,GAArBA,qBAAqB"}
|
|
@@ -14,7 +14,7 @@ var _sharedEnums = require("../../globals/shared-enums");
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
*
|
|
17
|
-
* Copyright IBM Corp. 2020, 2023
|
|
17
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["_sharedEnums","require","DATE_PICKER_INPUT_KIND","exports"],"sources":["components/date-picker/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\nexport { FORM_ELEMENT_COLOR_SCHEME as DATE_PICKER_INPUT_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Date picker input kinds.\n */\nexport enum DATE_PICKER_INPUT_KIND {\n /**\n * One for simple variant of date picker, comes without the calendar dropdown.\n */\n SIMPLE = 'simple',\n\n /**\n * One for single variant of date picker.\n */\n SINGLE = 'single',\n\n /**\n * One for the start date for the range variant.\n */\n FROM = 'from',\n\n /**\n * One for the end date for the range variant.\n */\n TO = 'to',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,sBAAsB;AAAAC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAAC,OAAA,CAAAD,sBAAA,GAAtBA,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["_sharedEnums","require","DATE_PICKER_INPUT_KIND","exports"],"sources":["components/date-picker/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\nexport { FORM_ELEMENT_COLOR_SCHEME as DATE_PICKER_INPUT_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Date picker input kinds.\n */\nexport enum DATE_PICKER_INPUT_KIND {\n /**\n * One for simple variant of date picker, comes without the calendar dropdown.\n */\n SIMPLE = 'simple',\n\n /**\n * One for single variant of date picker.\n */\n SINGLE = 'single',\n\n /**\n * One for the start date for the range variant.\n */\n FROM = 'from',\n\n /**\n * One for the end date for the range variant.\n */\n TO = 'to',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,sBAAsB;AAAAC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAAC,OAAA,CAAAD,sBAAA,GAAtBA,sBAAsB"}
|
|
@@ -14,7 +14,7 @@ var _sharedEnums = require("../../globals/shared-enums");
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
*
|
|
17
|
-
* Copyright IBM Corp. 2020, 2023
|
|
17
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["_sharedEnums","require","NAVIGATION_DIRECTION","Up","ArrowUp","Down","ArrowDown","exports","DROPDOWN_KEYBOARD_ACTION","DROPDOWN_SIZE","DROPDOWN_TYPE","DROPDOWN_DIRECTION"],"sources":["components/dropdown/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\nexport { FORM_ELEMENT_COLOR_SCHEME as DROPDOWN_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Navigation direction, associated with key symbols.\n */\nexport const NAVIGATION_DIRECTION = {\n Up: -1,\n ArrowUp: -1,\n Down: 1,\n ArrowDown: 1,\n};\n\n/**\n * The keyboard action categories for dropdown.\n */\nexport enum DROPDOWN_KEYBOARD_ACTION {\n /**\n * Not doing any action.\n */\n NONE = 'none',\n\n /**\n * Keyboard action to close menu.\n */\n CLOSING = 'closing',\n\n /**\n * Keyboard action to navigate back/forward.\n */\n NAVIGATING = 'navigating',\n\n /**\n * Keyboard action to open/close menu on the trigger button or select/deselect a menu item.\n */\n TRIGGERING = 'triggering',\n}\n\n/**\n * Dropdown size.\n */\nexport enum DROPDOWN_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n\n/**\n * Dropdown types.\n */\nexport enum DROPDOWN_TYPE {\n /**\n * Default type.\n */\n DEFAULT = '',\n\n /**\n * Inline type.\n */\n INLINE = 'inline',\n}\n\n/**\n * Dropdown direction.\n */\nexport enum DROPDOWN_DIRECTION {\n /**\n * Top.\n */\n TOP = 'top',\n\n /**\n * Bottom.\n */\n BOTTOM = 'bottom',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG;EAClCC,EAAE,EAAE,CAAC,CAAC;EACNC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAE,CAAC;EACPC,SAAS,EAAE;AACb,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAL,oBAAA,GAAAA,oBAAA;AAAA,IAGYM,wBAAwB;AAsBpC;AACA;AACA;AAFAD,OAAA,CAAAC,wBAAA,GAAAA,wBAAA;AAAA,WAtBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAD,OAAA,CAAAC,wBAAA,GAAxBA,wBAAwB;AAAA,IAyBxBC,aAAa;AAiBzB;AACA;AACA;AAFAF,OAAA,CAAAE,aAAA,GAAAA,aAAA;AAAA,WAjBYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAF,OAAA,CAAAE,aAAA,GAAbA,aAAa;AAAA,IAoBbC,aAAa;AAYzB;AACA;AACA;AAFAH,OAAA,CAAAG,aAAA,GAAAA,aAAA;AAAA,WAZYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAH,OAAA,CAAAG,aAAA,GAAbA,aAAa;AAAA,IAebC,kBAAkB;AAAAJ,OAAA,CAAAI,kBAAA,GAAAA,kBAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAAJ,OAAA,CAAAI,kBAAA,GAAlBA,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["_sharedEnums","require","NAVIGATION_DIRECTION","Up","ArrowUp","Down","ArrowDown","exports","DROPDOWN_KEYBOARD_ACTION","DROPDOWN_SIZE","DROPDOWN_TYPE","DROPDOWN_DIRECTION"],"sources":["components/dropdown/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\nexport { FORM_ELEMENT_COLOR_SCHEME as DROPDOWN_COLOR_SCHEME } from '../../globals/shared-enums';\n\n/**\n * Navigation direction, associated with key symbols.\n */\nexport const NAVIGATION_DIRECTION = {\n Up: -1,\n ArrowUp: -1,\n Down: 1,\n ArrowDown: 1,\n};\n\n/**\n * The keyboard action categories for dropdown.\n */\nexport enum DROPDOWN_KEYBOARD_ACTION {\n /**\n * Not doing any action.\n */\n NONE = 'none',\n\n /**\n * Keyboard action to close menu.\n */\n CLOSING = 'closing',\n\n /**\n * Keyboard action to navigate back/forward.\n */\n NAVIGATING = 'navigating',\n\n /**\n * Keyboard action to open/close menu on the trigger button or select/deselect a menu item.\n */\n TRIGGERING = 'triggering',\n}\n\n/**\n * Dropdown size.\n */\nexport enum DROPDOWN_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n\n/**\n * Dropdown types.\n */\nexport enum DROPDOWN_TYPE {\n /**\n * Default type.\n */\n DEFAULT = '',\n\n /**\n * Inline type.\n */\n INLINE = 'inline',\n}\n\n/**\n * Dropdown direction.\n */\nexport enum DROPDOWN_DIRECTION {\n /**\n * Top.\n */\n TOP = 'top',\n\n /**\n * Bottom.\n */\n BOTTOM = 'bottom',\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG;EAClCC,EAAE,EAAE,CAAC,CAAC;EACNC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAE,CAAC;EACPC,SAAS,EAAE;AACb,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAL,oBAAA,GAAAA,oBAAA;AAAA,IAGYM,wBAAwB;AAsBpC;AACA;AACA;AAFAD,OAAA,CAAAC,wBAAA,GAAAA,wBAAA;AAAA,WAtBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAD,OAAA,CAAAC,wBAAA,GAAxBA,wBAAwB;AAAA,IAyBxBC,aAAa;AAiBzB;AACA;AACA;AAFAF,OAAA,CAAAE,aAAA,GAAAA,aAAA;AAAA,WAjBYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAF,OAAA,CAAAE,aAAA,GAAbA,aAAa;AAAA,IAoBbC,aAAa;AAYzB;AACA;AACA;AAFAH,OAAA,CAAAG,aAAA,GAAAA,aAAA;AAAA,WAZYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAH,OAAA,CAAAG,aAAA,GAAbA,aAAa;AAAA,IAebC,kBAAkB;AAAAJ,OAAA,CAAAI,kBAAA,GAAAA,kBAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAAJ,OAAA,CAAAI,kBAAA,GAAlBA,kBAAkB"}
|
|
@@ -7,7 +7,7 @@ exports.FILE_UPLOADER_ITEM_STATE = exports.FILE_UPLOADER_ITEM_SIZE = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["FILE_UPLOADER_ITEM_STATE","exports","FILE_UPLOADER_ITEM_SIZE"],"sources":["components/file-uploader/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * The state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n COMPLETE = 'complete',\n\n /**\n * Editing.\n */\n EDIT = 'edit',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,wBAAwB;AAiBpC;AACA;AACA;AAFAC,OAAA,CAAAD,wBAAA,GAAAA,wBAAA;AAAA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAC,OAAA,CAAAD,wBAAA,GAAxBA,wBAAwB;AAAA,IAoBxBE,uBAAuB;AAAAD,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAD,OAAA,CAAAC,uBAAA,GAAvBA,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["FILE_UPLOADER_ITEM_STATE","exports","FILE_UPLOADER_ITEM_SIZE"],"sources":["components/file-uploader/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * The state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n COMPLETE = 'complete',\n\n /**\n * Editing.\n */\n EDIT = 'edit',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,wBAAwB;AAiBpC;AACA;AACA;AAFAC,OAAA,CAAAD,wBAAA,GAAAA,wBAAA;AAAA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAAC,OAAA,CAAAD,wBAAA,GAAxBA,wBAAwB;AAAA,IAoBxBE,uBAAuB;AAAAD,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAD,OAAA,CAAAC,uBAAA,GAAvBA,uBAAuB"}
|
|
@@ -7,7 +7,7 @@ exports.FLOATING_MENU_POSITION_DIRECTION = exports.FLOATING_MENU_DIRECTION = voi
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["FLOATING_MENU_POSITION_DIRECTION","exports","FLOATING_MENU_DIRECTION"],"sources":["components/floating-menu/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * The LTR/RTL direction used for positioning floating menu.\n */\nexport enum FLOATING_MENU_POSITION_DIRECTION {\n /**\n * LTR.\n */\n LTR = 'ltr',\n\n /**\n * RTL.\n */\n RTL = 'rtl',\n}\n\n/**\n * The direction/positioning/orientation choices of floating menu.\n */\nexport enum FLOATING_MENU_DIRECTION {\n /**\n * Put menu body at the top of its trigger button.\n */\n TOP = 'top',\n\n /**\n * Put menu body at the bottom of its trigger button.\n */\n BOTTOM = 'bottom',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,gCAAgC;AAY5C;AACA;AACA;AAFAC,OAAA,CAAAD,gCAAA,GAAAA,gCAAA;AAAA,WAZYA,gCAAgC;EAAhCA,gCAAgC;EAAhCA,gCAAgC;AAAA,GAAhCA,gCAAgC,KAAAC,OAAA,CAAAD,gCAAA,GAAhCA,gCAAgC;AAAA,IAehCE,uBAAuB;AAAAD,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAD,OAAA,CAAAC,uBAAA,GAAvBA,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["FLOATING_MENU_POSITION_DIRECTION","exports","FLOATING_MENU_DIRECTION"],"sources":["components/floating-menu/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * The LTR/RTL direction used for positioning floating menu.\n */\nexport enum FLOATING_MENU_POSITION_DIRECTION {\n /**\n * LTR.\n */\n LTR = 'ltr',\n\n /**\n * RTL.\n */\n RTL = 'rtl',\n}\n\n/**\n * The direction/positioning/orientation choices of floating menu.\n */\nexport enum FLOATING_MENU_DIRECTION {\n /**\n * Put menu body at the top of its trigger button.\n */\n TOP = 'top',\n\n /**\n * Put menu body at the bottom of its trigger button.\n */\n BOTTOM = 'bottom',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,gCAAgC;AAY5C;AACA;AACA;AAFAC,OAAA,CAAAD,gCAAA,GAAAA,gCAAA;AAAA,WAZYA,gCAAgC;EAAhCA,gCAAgC;EAAhCA,gCAAgC;AAAA,GAAhCA,gCAAgC,KAAAC,OAAA,CAAAD,gCAAA,GAAhCA,gCAAgC;AAAA,IAehCE,uBAAuB;AAAAD,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAAD,OAAA,CAAAC,uBAAA,GAAvBA,uBAAuB"}
|
|
@@ -7,7 +7,7 @@ exports.INLINE_LOADING_STATE = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["INLINE_LOADING_STATE","exports"],"sources":["components/inline-loading/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020\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\n/**\n * Loading state for inline loading spinner.\n */\nexport enum INLINE_LOADING_STATE {\n /**\n * Inactive state.\n */\n INACTIVE = 'inactive',\n\n /**\n * State for loading in progress.\n */\n ACTIVE = 'active',\n\n /**\n * State for loading successful.\n */\n FINISHED = 'finished',\n\n /**\n * State for loading failure.\n */\n ERROR = 'error',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,oBAAoB;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAAAC,OAAA,CAAAD,oBAAA,GAApBA,oBAAoB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["INLINE_LOADING_STATE","exports"],"sources":["components/inline-loading/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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\n/**\n * Loading state for inline loading spinner.\n */\nexport enum INLINE_LOADING_STATE {\n /**\n * Inactive state.\n */\n INACTIVE = 'inactive',\n\n /**\n * State for loading in progress.\n */\n ACTIVE = 'active',\n\n /**\n * State for loading successful.\n */\n FINISHED = 'finished',\n\n /**\n * State for loading failure.\n */\n ERROR = 'error',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,oBAAoB;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAAAC,OAAA,CAAAD,oBAAA,GAApBA,oBAAoB"}
|
|
@@ -7,7 +7,7 @@ exports.LOADING_TYPE = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["LOADING_TYPE","exports"],"sources":["components/loading/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * Spinner types.\n */\nexport enum LOADING_TYPE {\n /**\n * Regular spinner.\n */\n REGULAR = 'regular',\n\n /**\n * Small spinner.\n */\n SMALL = 'small',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,YAAY;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAAC,OAAA,CAAAD,YAAA,GAAZA,YAAY"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["LOADING_TYPE","exports"],"sources":["components/loading/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * Spinner types.\n */\nexport enum LOADING_TYPE {\n /**\n * Regular spinner.\n */\n REGULAR = 'regular',\n\n /**\n * Small spinner.\n */\n SMALL = 'small',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,YAAY;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAAC,OAAA,CAAAD,YAAA,GAAZA,YAAY"}
|
|
@@ -7,7 +7,7 @@ exports.MODAL_SIZE = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2020, 2023
|
|
10
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["MODAL_SIZE","exports"],"sources":["components/modal/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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\n/**\n * Modal size.\n */\nexport enum MODAL_SIZE {\n /**\n * Extra small size.\n */\n EXTRA_SMALL = 'xs',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,UAAU;AAAAC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,KAAAC,OAAA,CAAAD,UAAA,GAAVA,UAAU"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["MODAL_SIZE","exports"],"sources":["components/modal/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022, 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\n/**\n * Modal size.\n */\nexport enum MODAL_SIZE {\n /**\n * Extra small size.\n */\n EXTRA_SMALL = 'xs',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAGYA,UAAU;AAAAC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,KAAAC,OAAA,CAAAD,UAAA,GAAVA,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["_layout","require","STACK_ORIENTATION","exports","SPACING_STEPS","Array","from","length","spacing","map","_","step"],"sources":["components/stack/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 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 { spacing } from '@carbon/layout';\n\n/**\n * Stack orientation\n */\nexport enum STACK_ORIENTATION {\n /**\n * Default vertical orientation.\n */\n VERTICAL = 'vertical',\n\n /**\n * Horizontal.\n */\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * The steps in the spacing scale\n *\n * @type {Array<number>}\n */\nexport const SPACING_STEPS = Array.from({ length: spacing.length - 1 }).map(\n (_, step) => {\n return step + 1;\n }\n);\n"],"mappings":";;;;;;AASA,IAAAA,OAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,iBAAiB;AAY7B;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAAA,WAZYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAAC,OAAA,CAAAD,iBAAA,GAAjBA,iBAAiB;AAiBtB,MAAME,aAAa,GAAGC,KAAK,CAACC,IAAI,CAAC;EAAEC,MAAM,EAAEC,eAAO,CAACD,MAAM,GAAG;AAAE,CAAC,CAAC,CAACE,GAAG,CACzE,CAACC,CAAC,EAAEC,IAAI,KAAK;EACX,OAAOA,IAAI,GAAG,CAAC;AACjB,CAAC
|
|
1
|
+
{"version":3,"file":"defs.js","names":["_layout","require","STACK_ORIENTATION","exports","SPACING_STEPS","Array","from","length","spacing","map","_","step"],"sources":["components/stack/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 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 { spacing } from '@carbon/layout';\n\n/**\n * Stack orientation\n */\nexport enum STACK_ORIENTATION {\n /**\n * Default vertical orientation.\n */\n VERTICAL = 'vertical',\n\n /**\n * Horizontal.\n */\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * The steps in the spacing scale\n *\n * @type {Array<number>}\n */\nexport const SPACING_STEPS = Array.from({ length: spacing.length - 1 }).map(\n (_, step) => {\n return step + 1;\n }\n);\n"],"mappings":";;;;;;AASA,IAAAA,OAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAFA,IAGYC,iBAAiB;AAY7B;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAAA,WAZYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAAC,OAAA,CAAAD,iBAAA,GAAjBA,iBAAiB;AAiBtB,MAAME,aAAa,GAAGC,KAAK,CAACC,IAAI,CAAC;EAAEC,MAAM,EAAEC,eAAO,CAACD,MAAM,GAAG;AAAE,CAAC,CAAC,CAACE,GAAG,CACzE,CAACC,CAAC,EAAEC,IAAI,KAAK;EACX,OAAOA,IAAI,GAAG,CAAC;AACjB,CACF,CAAC;AAACR,OAAA,CAAAC,aAAA,GAAAA,aAAA"}
|
|
@@ -19,6 +19,22 @@ var _on = _interopRequireDefault(require("../mixins/on"));
|
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* A descriptor for a React event prop of a custom element.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A descriptor for a React prop for an attribute of a custom element.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A descriptor for a set of React props for attributes of a custom element.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* React props for the component `createCustomElementType()` generates.
|
|
36
|
+
*/
|
|
37
|
+
|
|
22
38
|
/**
|
|
23
39
|
* @param refs List of React refs to merge.
|
|
24
40
|
* @returns Merged React ref.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReactCustomElementType.js","names":["_react","require","_on","_interopRequireDefault","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread2","default","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","on","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","Component","constructor","args","_defineProperty2","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties2","mergedRef","_handleElemRef","createElement","forwardRef","booleanSerializer","exports","numberSerializer","String","objectSerializer","JSON","stringify","_default"],"sources":["globals/wrappers/createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from '../mixins/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomEl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AAS,GAAKjD,YAAY,CAACC,KAAK,EAAEL,UAAU,CAAC,GACpDkD,QAAQ,CACT;IACH;EACF;EAEA,OAAO,IAAAM,iBAAU,EAAsC,CAACnD,KAAK,EAAEV,GAAG,KAChE,IAAA4D,oBAAa,EAACxB,iBAAiB,MAAAlB,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAAOT,KAAK;IAAE8C,QAAQ,EAAExD;EAAG,GAAG,CAC9D;AACH,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAM8D,iBAAiB,GAAIZ,KAAK,IAAM,CAACA,KAAK,GAAG1C,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AAHAuD,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAIO,MAAME,gBAAgB,GAAId,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGe,MAAM,CAACf,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AAHAa,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAIO,MAAME,gBAAgB,GAAIhB,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGiB,IAAI,CAACC,SAAS,CAAClB,KAAK,CAAC;AAACa,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAAA,IAAAG,QAAA,GAEjCpC,4BAA4B;AAAA8B,OAAA,CAAA5C,OAAA,GAAAkD,QAAA"}
|
|
1
|
+
{"version":3,"file":"createReactCustomElementType.js","names":["_react","require","_on","_interopRequireDefault","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread2","default","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","on","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","Component","constructor","args","_defineProperty2","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties2","mergedRef","_handleElemRef","createElement","forwardRef","booleanSerializer","exports","numberSerializer","String","objectSerializer","JSON","stringify","_default"],"sources":["globals/wrappers/createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from '../mixins/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"],"mappings":";;;;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAaA;AACA;AACA;;AAkBA;AACA;AACA;;AAKA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GACb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xB,iBAAiB,MAAAlB,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAAOT,KAAK;IAAE8C,QAAQ,EAAExD;EAAG,EAAE,CAC9D,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAM8D,iBAAiB,GAAIZ,KAAK,IAAM,CAACA,KAAK,GAAG1C,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AAHAuD,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAIO,MAAME,gBAAgB,GAAId,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGe,MAAM,CAACf,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AAHAa,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAIO,MAAME,gBAAgB,GAAIhB,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGiB,IAAI,CAACC,SAAS,CAAClB,KAAK,CAAC;AAACa,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAAA,IAAAG,QAAA,GAEjCpC,4BAA4B;AAAA8B,OAAA,CAAA5C,OAAA,GAAAkD,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/web-components",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"./package.json": "./package.json"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
+
"prebuild": "node tools/fix-carbon-sass-imports.js",
|
|
33
34
|
"build": "gulp build && yarn wca",
|
|
34
35
|
"build:dist": "gulp build:dist",
|
|
35
36
|
"build:dist:dev": "gulp build:dist:dev",
|
|
@@ -68,9 +69,9 @@
|
|
|
68
69
|
],
|
|
69
70
|
"dependencies": {
|
|
70
71
|
"@babel/runtime": "^7.16.3",
|
|
71
|
-
"@carbon/styles": "^1.
|
|
72
|
+
"@carbon/styles": "^1.34.1",
|
|
72
73
|
"flatpickr": "4.6.1",
|
|
73
|
-
"lit": "^2.6
|
|
74
|
+
"lit": "^2.7.6",
|
|
74
75
|
"lodash-es": "^4.17.21"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
@@ -82,15 +83,15 @@
|
|
|
82
83
|
"@babel/plugin-proposal-optional-chaining": "~7.12.0",
|
|
83
84
|
"@babel/plugin-syntax-decorators": "~7.12.0",
|
|
84
85
|
"@babel/plugin-transform-modules-commonjs": "~7.12.0",
|
|
85
|
-
"@babel/plugin-transform-runtime": "
|
|
86
|
+
"@babel/plugin-transform-runtime": "7.18.5",
|
|
86
87
|
"@babel/plugin-transform-template-literals": "~7.12.0",
|
|
87
88
|
"@babel/plugin-transform-typescript": "~7.12.0",
|
|
88
89
|
"@babel/preset-env": "~7.12.0",
|
|
89
|
-
"@babel/preset-modules": "
|
|
90
|
+
"@babel/preset-modules": "^0.1.5",
|
|
90
91
|
"@babel/template": "~7.12.0",
|
|
91
92
|
"@babel/traverse": "~7.12.0",
|
|
92
|
-
"@carbon/icon-helpers": "^10.
|
|
93
|
-
"@carbon/icons": "^11.
|
|
93
|
+
"@carbon/icon-helpers": "^10.43.1",
|
|
94
|
+
"@carbon/icons": "^11.23.1",
|
|
94
95
|
"@open-wc/semantic-dom-diff": "~0.18.0",
|
|
95
96
|
"@percy-io/in-percy": "^0.1.11",
|
|
96
97
|
"@percy/cli": "^1.8.1",
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
"@rollup/plugin-commonjs": "^21.0.3",
|
|
101
102
|
"@rollup/plugin-node-resolve": "^8.4.0",
|
|
102
103
|
"@rollup/plugin-replace": "^4.0.0",
|
|
104
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
103
105
|
"@rollup/pluginutils": "^4.2.0",
|
|
104
106
|
"@storybook/addon-a11y": "^6.5.15",
|
|
105
107
|
"@storybook/addon-actions": "^6.5.15",
|
|
@@ -122,12 +124,12 @@
|
|
|
122
124
|
"@webcomponents/webcomponents-platform": "^1.0.1",
|
|
123
125
|
"async-done": "^1.3.0",
|
|
124
126
|
"autoprefixer": "^9.8.8",
|
|
125
|
-
"babel-eslint": "^10.0
|
|
126
|
-
"babel-loader": "^8.0.
|
|
127
|
+
"babel-eslint": "^10.1.0",
|
|
128
|
+
"babel-loader": "^8.0.4",
|
|
127
129
|
"babel-plugin-template-html-minifier": "^4.1.0",
|
|
128
130
|
"cache-loader": "^4.1.0",
|
|
129
131
|
"child-process-promise": "^2.2.1",
|
|
130
|
-
"commander": "^
|
|
132
|
+
"commander": "^4.1.0",
|
|
131
133
|
"core-js": "^3.19.1",
|
|
132
134
|
"cross-env": "^7.0.0",
|
|
133
135
|
"css-loader": "^5.2.0",
|
|
@@ -168,10 +170,10 @@
|
|
|
168
170
|
"karma-firefox-launcher": "^2.1.2",
|
|
169
171
|
"karma-jasmine": "^4.0.1",
|
|
170
172
|
"karma-snapshot": "^0.6.0",
|
|
171
|
-
"karma-sourcemap-loader": "^0.
|
|
173
|
+
"karma-sourcemap-loader": "^0.4.0",
|
|
172
174
|
"karma-spec-reporter": "0.0.36",
|
|
173
175
|
"karma-webpack": "^4.0.2",
|
|
174
|
-
"magic-string": "^0.
|
|
176
|
+
"magic-string": "^0.30.0",
|
|
175
177
|
"mini-css-extract-plugin": "~2.7.0",
|
|
176
178
|
"mkdirp": "^0.5.0",
|
|
177
179
|
"null-loader": "^4.0.0",
|
|
@@ -180,7 +182,7 @@
|
|
|
180
182
|
"postcss": "^8.2.10",
|
|
181
183
|
"postcss-loader": "^3.0.0",
|
|
182
184
|
"postcss-selector-parser": "^6.0.0",
|
|
183
|
-
"prop-types": "^15.7.
|
|
185
|
+
"prop-types": "^15.7.2",
|
|
184
186
|
"puppeteer": "^13.0.0",
|
|
185
187
|
"react": "16.14.0",
|
|
186
188
|
"react-dom": "16.14.0",
|
|
@@ -190,9 +192,8 @@
|
|
|
190
192
|
"resize-observer-polyfill": "^1.5.0",
|
|
191
193
|
"rollup": "^2.55.1",
|
|
192
194
|
"rollup-plugin-multi-input": "^1.3.1",
|
|
193
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
194
195
|
"rtlcss": "^3.0.0",
|
|
195
|
-
"sass": "~1.
|
|
196
|
+
"sass": "~1.62.0",
|
|
196
197
|
"sass-loader": "^10.0.0",
|
|
197
198
|
"strip-comments": "^1.0.0",
|
|
198
199
|
"style-loader": "^2.0.0",
|
|
@@ -206,7 +207,7 @@
|
|
|
206
207
|
"web-component-analyzer": "1.2.0-next.0",
|
|
207
208
|
"webpack": "^4.46.0",
|
|
208
209
|
"webpack-dev-server": "^4.0.0",
|
|
209
|
-
"zone.js": "~0.
|
|
210
|
+
"zone.js": "~0.13.0"
|
|
210
211
|
},
|
|
211
212
|
"typings": "es/index.d.ts"
|
|
212
213
|
}
|
|
@@ -11,14 +11,13 @@ $css--plex: true !default;
|
|
|
11
11
|
@use '@carbon/styles/scss/spacing' as *;
|
|
12
12
|
@use '@carbon/styles/scss/type' as *;
|
|
13
13
|
@use '@carbon/styles/scss/utilities/convert' as *;
|
|
14
|
-
@use '@carbon/styles/scss/layer/layer-tokens';
|
|
15
14
|
@use '@carbon/styles/scss/components/accordion';
|
|
15
|
+
@use '../../globals/mixins/temp-layout' as *;
|
|
16
16
|
|
|
17
17
|
:host(#{$prefix}-accordion),
|
|
18
18
|
:host(#{$prefix}-accordion-skeleton) {
|
|
19
19
|
@extend .#{$prefix}--accordion;
|
|
20
|
-
|
|
21
|
-
@include layer-tokens.emit-layer-tokens(1);
|
|
20
|
+
@include emit-layout-tokens();
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
:host(#{$prefix}-accordion-item),
|
|
@@ -40,12 +39,18 @@ $css--plex: true !default;
|
|
|
40
39
|
|
|
41
40
|
:host(#{$prefix}-accordion-item[size='sm']),
|
|
42
41
|
:host(#{$prefix}-accordion-item-skeleton[size='sm']) {
|
|
43
|
-
|
|
42
|
+
button {
|
|
43
|
+
@extend .#{$prefix}--layout--size-sm;
|
|
44
|
+
min-height: var(--cds-layout-size-height-context);
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
:host(#{$prefix}-accordion-item[size='lg']),
|
|
47
49
|
:host(#{$prefix}-accordion-item-skeleton[size='lg']) {
|
|
48
|
-
|
|
50
|
+
button {
|
|
51
|
+
@extend .#{$prefix}--layout--size-lg;
|
|
52
|
+
min-height: var(--cds-layout-size-height-context);
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
:host(#{$prefix}-accordion-item[alignment='start']),
|