@carbon/web-components 2.0.0-rc.1 → 2.0.0-rc.3
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 +307 -79
- 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 +1 -1
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +12 -9
- 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 +4 -0
- package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
- package/es/components/code-snippet/code-snippet.js +20 -9
- 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.d.ts.map +1 -1
- package/es/components/copy/copy.js +3 -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.d.ts +1 -1
- package/es/components/copy-button/copy-button.d.ts.map +1 -1
- package/es/components/copy-button/copy-button.js +7 -7
- 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.d.ts.map +1 -1
- package/es/components/icon-button/icon-button.js +3 -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 +6 -8
- 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 +14 -8
- 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 +1 -1
- package/es/components/tile/tile-group.d.ts.map +1 -1
- package/es/components/tile/tile-group.js +7 -8
- 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 -3
- 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 +29 -6
- 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 +235 -0
- package/es/globals/decorators/carbon-element.d.ts.map +1 -0
- package/es/globals/decorators/carbon-element.js +429 -0
- package/es/globals/decorators/carbon-element.js.map +1 -0
- package/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 +12 -0
- package/scss/components/button/button.scss +16 -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":"icon-plugin.js","names":["render","ChevronLeft16","ChevronRight16","fp","setIcon","prevMonthNav","nextMonthNav","parseConfig","config","prevArrow","nextArrow","register","loadedPlugins","push","onParseConfig","onReady"],"sources":["components/date-picker/icon-plugin.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 { render } from 'lit';\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport ChevronLeft16 from '@carbon/icons/lib/chevron--left/16';\nimport ChevronRight16 from '@carbon/icons/lib/chevron--right/16';\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to set the right icons in the design system.\n */\nexport default (): Plugin => (fp: FlatpickrInstance) => {\n /**\n * Sets the icon in the design system.\n */\n const setIcon = () => {\n const { prevMonthNav, nextMonthNav } = fp;\n render(ChevronLeft16(), prevMonthNav);\n render(ChevronRight16(), nextMonthNav);\n };\n\n /**\n * Sets empty arrow icon contents as we render those icons after initialization.\n */\n const parseConfig = () => {\n const { config } = fp;\n config.prevArrow = '';\n config.nextArrow = '';\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrIconPlugin');\n };\n\n return {\n onParseConfig: parseConfig,\n onReady: [register, setIcon],\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,KAAK;AAG5B,OAAOC,aAAa,MAAM,8BAAoC;AAC9D,OAAOC,cAAc,MAAM,+BAAqC;;AAEhE;AACA;AACA;AACA,GAHA;AACA;AACA;AACA;AACA,gBAAe,MAAeC,EAAqB,IAAK;EACtD;AACF;AACA;EACE,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpB,MAAM;MAAEC,YAAY;MAAEC;IAAa,CAAC,GAAGH,EAAE;IACzCH,MAAM,CAACC,aAAa,
|
|
1
|
+
{"version":3,"file":"icon-plugin.js","names":["render","ChevronLeft16","ChevronRight16","fp","setIcon","prevMonthNav","nextMonthNav","parseConfig","config","prevArrow","nextArrow","register","loadedPlugins","push","onParseConfig","onReady"],"sources":["components/date-picker/icon-plugin.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 { render } from 'lit';\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport ChevronLeft16 from '@carbon/icons/lib/chevron--left/16';\nimport ChevronRight16 from '@carbon/icons/lib/chevron--right/16';\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to set the right icons in the design system.\n */\nexport default (): Plugin => (fp: FlatpickrInstance) => {\n /**\n * Sets the icon in the design system.\n */\n const setIcon = () => {\n const { prevMonthNav, nextMonthNav } = fp;\n render(ChevronLeft16(), prevMonthNav);\n render(ChevronRight16(), nextMonthNav);\n };\n\n /**\n * Sets empty arrow icon contents as we render those icons after initialization.\n */\n const parseConfig = () => {\n const { config } = fp;\n config.prevArrow = '';\n config.nextArrow = '';\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrIconPlugin');\n };\n\n return {\n onParseConfig: parseConfig,\n onReady: [register, setIcon],\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,KAAK;AAG5B,OAAOC,aAAa,MAAM,8BAAoC;AAC9D,OAAOC,cAAc,MAAM,+BAAqC;;AAEhE;AACA;AACA;AACA,GAHA;AACA;AACA;AACA;AACA,gBAAe,MAAeC,EAAqB,IAAK;EACtD;AACF;AACA;EACE,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpB,MAAM;MAAEC,YAAY;MAAEC;IAAa,CAAC,GAAGH,EAAE;IACzCH,MAAM,CAACC,aAAa,CAAC,CAAC,EAAEI,YAAY,CAAC;IACrCL,MAAM,CAACE,cAAc,CAAC,CAAC,EAAEI,YAAY,CAAC;EACxC,CAAC;;EAED;AACF;AACA;EACE,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAM;MAAEC;IAAO,CAAC,GAAGL,EAAE;IACrBK,MAAM,CAACC,SAAS,GAAG,EAAE;IACrBD,MAAM,CAACE,SAAS,GAAG,EAAE;EACvB,CAAC;;EAED;AACF;AACA;AACA;AACA;EACE,MAAMC,QAAQ,GAAGA,CAAA,KAAM;IACrBR,EAAE,CAACS,aAAa,CAACC,IAAI,CAAC,2BAA2B,CAAC;EACpD,CAAC;EAED,OAAO;IACLC,aAAa,EAAEP,WAAW;IAC1BQ,OAAO,EAAE,CAACJ,QAAQ,EAAEP,OAAO;EAC7B,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/date-picker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,8BAA8B,CAAC","file":"index.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021\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 './date-picker';\nimport './date-picker-input';\nimport './date-picker-input-skeleton';\n"]}
|
|
1
|
+
{"version":3,"sources":["components/date-picker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,8BAA8B,CAAC","file":"index.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 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\nimport './date-picker';\nimport './date-picker-input';\nimport './date-picker-input-skeleton';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["components/date-picker/index.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021\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 './date-picker';\nimport './date-picker-input';\nimport './date-picker-input-skeleton';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,eAAe;AACtB,OAAO,qBAAqB;AAC5B,OAAO,8BAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["components/date-picker/index.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 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\nimport './date-picker';\nimport './date-picker-input';\nimport './date-picker-input-skeleton';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,eAAe;AACtB,OAAO,qBAAqB;AAC5B,OAAO,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso-date.js","names":["getISODateString","date","Date","UTC","getFullYear","getMonth","getDate","toISOString","split","parseISODateString","s","utcDate","parse","getUTCFullYear","getUTCMonth","getUTCDate"],"sources":["components/date-picker/iso-date.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\n/**\n * @param date A date.\n * @returns Date portion of the ISO8601 string of the given date, based on the local timezone.\n */\nexport const getISODateString = (date: Date) =>\n new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))\n .toISOString()\n .split('T')[0];\n\n/**\n * @param s A date portion of an ISO8601 string, based on the local timezone.\n * @returns The date object corresponding to the given ISO8601 string.\n */\nexport const parseISODateString = (s: string) => {\n const utcDate = new Date(Date.parse(s));\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAIC,IAAU,IACzC,IAAIC,IAAI,CAACA,IAAI,CAACC,GAAG,CAACF,IAAI,CAACG,WAAW,
|
|
1
|
+
{"version":3,"file":"iso-date.js","names":["getISODateString","date","Date","UTC","getFullYear","getMonth","getDate","toISOString","split","parseISODateString","s","utcDate","parse","getUTCFullYear","getUTCMonth","getUTCDate"],"sources":["components/date-picker/iso-date.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\n/**\n * @param date A date.\n * @returns Date portion of the ISO8601 string of the given date, based on the local timezone.\n */\nexport const getISODateString = (date: Date) =>\n new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))\n .toISOString()\n .split('T')[0];\n\n/**\n * @param s A date portion of an ISO8601 string, based on the local timezone.\n * @returns The date object corresponding to the given ISO8601 string.\n */\nexport const parseISODateString = (s: string) => {\n const utcDate = new Date(Date.parse(s));\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAIC,IAAU,IACzC,IAAIC,IAAI,CAACA,IAAI,CAACC,GAAG,CAACF,IAAI,CAACG,WAAW,CAAC,CAAC,EAAEH,IAAI,CAACI,QAAQ,CAAC,CAAC,EAAEJ,IAAI,CAACK,OAAO,CAAC,CAAC,CAAC,CAAC,CACpEC,WAAW,CAAC,CAAC,CACbC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;;AAElB;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAIC,CAAS,IAAK;EAC/C,MAAMC,OAAO,GAAG,IAAIT,IAAI,CAACA,IAAI,CAACU,KAAK,CAACF,CAAC,CAAC,CAAC;EACvC,OAAO,IAAIR,IAAI,CACbS,OAAO,CAACE,cAAc,CAAC,CAAC,EACxBF,OAAO,CAACG,WAAW,CAAC,CAAC,EACrBH,OAAO,CAACI,UAAU,CAAC,CACrB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"month-select-plugin.js","names":["forEach","monthToStr","monthNumber","shorthand","locale","months","config","fp","setupElements","monthElements","yearElements","currentMonth","l10n","_createElement","createElement","selectorFlatpickrMonthYearContainer","selectorFlatpickrYearContainer","classFlatpickrCurrentMonth","elem","parentNode","removeChild","splice","length","map","monthElement","textContent","monthYearContainer","closest","insertBefore","updateCurrentMonth","selectorFlatpickrCurrentMonth","monthStr","currentMonthContainer","querySelectorAll","register","loadedPlugins","push","onMonthChange","onValueUpdate","onOpen","onReady"],"sources":["components/date-picker/month-select-plugin.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\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Locale } from 'flatpickr/dist/types/locale';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport { forEach } from '../../globals/internal/collection-helpers';\n\n/**\n * @param monthNumber The month number.\n * @param shorthand `true` to use shorthand month.\n * @param locale The Flatpickr locale data.\n * @returns The month string.\n */\nconst monthToStr = (monthNumber: number, shorthand: boolean, locale: Locale) =>\n locale.months[shorthand ? 'shorthand' : 'longhand'][monthNumber];\n\n/**\n * The configuration for the Flatpickr plugin to use text instead of `<select>` for month picker.\n */\nexport interface DatePickerMonthSelectPluginConfig {\n /**\n * `true` to use shorthand month.\n */\n shorthand?: boolean;\n\n /**\n * The CSS selector for the container of month/year selection UI.\n */\n selectorFlatpickrMonthYearContainer: string;\n\n /**\n * The CSS selector for the container of year selection UI.\n */\n selectorFlatpickrYearContainer: string;\n\n /**\n * The CSS selector for the text-based month selection UI.\n */\n selectorFlatpickrCurrentMonth: string;\n\n /**\n * The CSS class for the text-based month selection UI.\n */\n classFlatpickrCurrentMonth: string;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to use text instead of `<select>` for month picker.\n */\nexport default (config: DatePickerMonthSelectPluginConfig): Plugin =>\n (fp: FlatpickrInstance) => {\n /**\n * Replaces `<select>` for month with text content.\n */\n const setupElements = () => {\n const {\n monthElements,\n yearElements,\n currentMonth,\n l10n,\n _createElement: createElement,\n } = fp;\n if (!monthElements) {\n return;\n }\n const {\n shorthand,\n selectorFlatpickrMonthYearContainer,\n selectorFlatpickrYearContainer,\n classFlatpickrCurrentMonth,\n } = config;\n monthElements.forEach((elem) => {\n if (!elem.parentNode) return;\n elem.parentNode.removeChild(elem);\n });\n monthElements.splice(\n 0,\n monthElements.length,\n ...monthElements.map(() => {\n const monthElement = createElement(\n 'span',\n classFlatpickrCurrentMonth\n );\n monthElement.textContent = monthToStr(\n currentMonth,\n shorthand === true,\n l10n\n );\n const monthYearContainer = yearElements[0].closest(\n selectorFlatpickrMonthYearContainer\n );\n if (monthYearContainer) {\n monthYearContainer.insertBefore(\n monthElement,\n yearElements[0].closest(selectorFlatpickrYearContainer)\n );\n }\n return monthElement;\n })\n );\n };\n\n /**\n * Updates the text-based month UI with the latest selected date.\n */\n const updateCurrentMonth = () => {\n const { yearElements, currentMonth, l10n } = fp;\n const {\n shorthand,\n selectorFlatpickrMonthYearContainer,\n selectorFlatpickrCurrentMonth,\n } = config;\n const monthStr = monthToStr(currentMonth, shorthand === true, l10n);\n yearElements.forEach((elem) => {\n const currentMonthContainer = elem.closest(\n selectorFlatpickrMonthYearContainer\n );\n if (currentMonthContainer) {\n forEach(\n currentMonthContainer.querySelectorAll(\n selectorFlatpickrCurrentMonth\n ),\n (monthElement) => {\n monthElement.textContent = monthStr;\n }\n );\n }\n });\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrMonthSelectPlugin');\n };\n\n return {\n onMonthChange: updateCurrentMonth,\n onValueUpdate: updateCurrentMonth,\n onOpen: updateCurrentMonth,\n onReady: [setupElements, updateCurrentMonth, register],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,OAAO,QAAQ,2CAA2C;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAGA,CAACC,WAAmB,EAAEC,SAAkB,EAAEC,MAAc,KACzEA,MAAM,CAACC,MAAM,CAACF,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC,CAACD,WAAW,CAAC;;AAElE;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA,gBAAgBI,MAAyC,IACtDC,EAAqB,IAAK;EACzB;AACJ;AACA;EACI,MAAMC,aAAa,GAAGA,CAAA,KAAM;IAC1B,MAAM;MACJC,aAAa;MACbC,YAAY;MACZC,YAAY;MACZC,IAAI;MACJC,cAAc,EAAEC;IAClB,CAAC,GAAGP,EAAE;IACN,IAAI,CAACE,aAAa,EAAE;MAClB;IACF;IACA,MAAM;MACJN,SAAS;MACTY,mCAAmC;MACnCC,8BAA8B;MAC9BC;IACF,CAAC,GAAGX,MAAM;IACVG,aAAa,CAACT,OAAO,CAAEkB,IAAI,IAAK;MAC9B,IAAI,CAACA,IAAI,CAACC,UAAU,EAAE;MACtBD,IAAI,CAACC,UAAU,CAACC,WAAW,CAACF,IAAI,CAAC;IACnC,CAAC,CAAC;IACFT,aAAa,CAACY,MAAM,CAClB,CAAC,EACDZ,aAAa,CAACa,MAAM,EACpB,GAAGb,aAAa,CAACc,GAAG,CAAC,MAAM;MACzB,MAAMC,YAAY,GAAGV,aAAa,CAChC,MAAM,EACNG,
|
|
1
|
+
{"version":3,"file":"month-select-plugin.js","names":["forEach","monthToStr","monthNumber","shorthand","locale","months","config","fp","setupElements","monthElements","yearElements","currentMonth","l10n","_createElement","createElement","selectorFlatpickrMonthYearContainer","selectorFlatpickrYearContainer","classFlatpickrCurrentMonth","elem","parentNode","removeChild","splice","length","map","monthElement","textContent","monthYearContainer","closest","insertBefore","updateCurrentMonth","selectorFlatpickrCurrentMonth","monthStr","currentMonthContainer","querySelectorAll","register","loadedPlugins","push","onMonthChange","onValueUpdate","onOpen","onReady"],"sources":["components/date-picker/month-select-plugin.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\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Locale } from 'flatpickr/dist/types/locale';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport { forEach } from '../../globals/internal/collection-helpers';\n\n/**\n * @param monthNumber The month number.\n * @param shorthand `true` to use shorthand month.\n * @param locale The Flatpickr locale data.\n * @returns The month string.\n */\nconst monthToStr = (monthNumber: number, shorthand: boolean, locale: Locale) =>\n locale.months[shorthand ? 'shorthand' : 'longhand'][monthNumber];\n\n/**\n * The configuration for the Flatpickr plugin to use text instead of `<select>` for month picker.\n */\nexport interface DatePickerMonthSelectPluginConfig {\n /**\n * `true` to use shorthand month.\n */\n shorthand?: boolean;\n\n /**\n * The CSS selector for the container of month/year selection UI.\n */\n selectorFlatpickrMonthYearContainer: string;\n\n /**\n * The CSS selector for the container of year selection UI.\n */\n selectorFlatpickrYearContainer: string;\n\n /**\n * The CSS selector for the text-based month selection UI.\n */\n selectorFlatpickrCurrentMonth: string;\n\n /**\n * The CSS class for the text-based month selection UI.\n */\n classFlatpickrCurrentMonth: string;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to use text instead of `<select>` for month picker.\n */\nexport default (config: DatePickerMonthSelectPluginConfig): Plugin =>\n (fp: FlatpickrInstance) => {\n /**\n * Replaces `<select>` for month with text content.\n */\n const setupElements = () => {\n const {\n monthElements,\n yearElements,\n currentMonth,\n l10n,\n _createElement: createElement,\n } = fp;\n if (!monthElements) {\n return;\n }\n const {\n shorthand,\n selectorFlatpickrMonthYearContainer,\n selectorFlatpickrYearContainer,\n classFlatpickrCurrentMonth,\n } = config;\n monthElements.forEach((elem) => {\n if (!elem.parentNode) return;\n elem.parentNode.removeChild(elem);\n });\n monthElements.splice(\n 0,\n monthElements.length,\n ...monthElements.map(() => {\n const monthElement = createElement(\n 'span',\n classFlatpickrCurrentMonth\n );\n monthElement.textContent = monthToStr(\n currentMonth,\n shorthand === true,\n l10n\n );\n const monthYearContainer = yearElements[0].closest(\n selectorFlatpickrMonthYearContainer\n );\n if (monthYearContainer) {\n monthYearContainer.insertBefore(\n monthElement,\n yearElements[0].closest(selectorFlatpickrYearContainer)\n );\n }\n return monthElement;\n })\n );\n };\n\n /**\n * Updates the text-based month UI with the latest selected date.\n */\n const updateCurrentMonth = () => {\n const { yearElements, currentMonth, l10n } = fp;\n const {\n shorthand,\n selectorFlatpickrMonthYearContainer,\n selectorFlatpickrCurrentMonth,\n } = config;\n const monthStr = monthToStr(currentMonth, shorthand === true, l10n);\n yearElements.forEach((elem) => {\n const currentMonthContainer = elem.closest(\n selectorFlatpickrMonthYearContainer\n );\n if (currentMonthContainer) {\n forEach(\n currentMonthContainer.querySelectorAll(\n selectorFlatpickrCurrentMonth\n ),\n (monthElement) => {\n monthElement.textContent = monthStr;\n }\n );\n }\n });\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrMonthSelectPlugin');\n };\n\n return {\n onMonthChange: updateCurrentMonth,\n onValueUpdate: updateCurrentMonth,\n onOpen: updateCurrentMonth,\n onReady: [setupElements, updateCurrentMonth, register],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,OAAO,QAAQ,2CAA2C;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAGA,CAACC,WAAmB,EAAEC,SAAkB,EAAEC,MAAc,KACzEA,MAAM,CAACC,MAAM,CAACF,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC,CAACD,WAAW,CAAC;;AAElE;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA,gBAAgBI,MAAyC,IACtDC,EAAqB,IAAK;EACzB;AACJ;AACA;EACI,MAAMC,aAAa,GAAGA,CAAA,KAAM;IAC1B,MAAM;MACJC,aAAa;MACbC,YAAY;MACZC,YAAY;MACZC,IAAI;MACJC,cAAc,EAAEC;IAClB,CAAC,GAAGP,EAAE;IACN,IAAI,CAACE,aAAa,EAAE;MAClB;IACF;IACA,MAAM;MACJN,SAAS;MACTY,mCAAmC;MACnCC,8BAA8B;MAC9BC;IACF,CAAC,GAAGX,MAAM;IACVG,aAAa,CAACT,OAAO,CAAEkB,IAAI,IAAK;MAC9B,IAAI,CAACA,IAAI,CAACC,UAAU,EAAE;MACtBD,IAAI,CAACC,UAAU,CAACC,WAAW,CAACF,IAAI,CAAC;IACnC,CAAC,CAAC;IACFT,aAAa,CAACY,MAAM,CAClB,CAAC,EACDZ,aAAa,CAACa,MAAM,EACpB,GAAGb,aAAa,CAACc,GAAG,CAAC,MAAM;MACzB,MAAMC,YAAY,GAAGV,aAAa,CAChC,MAAM,EACNG,0BACF,CAAC;MACDO,YAAY,CAACC,WAAW,GAAGxB,UAAU,CACnCU,YAAY,EACZR,SAAS,KAAK,IAAI,EAClBS,IACF,CAAC;MACD,MAAMc,kBAAkB,GAAGhB,YAAY,CAAC,CAAC,CAAC,CAACiB,OAAO,CAChDZ,mCACF,CAAC;MACD,IAAIW,kBAAkB,EAAE;QACtBA,kBAAkB,CAACE,YAAY,CAC7BJ,YAAY,EACZd,YAAY,CAAC,CAAC,CAAC,CAACiB,OAAO,CAACX,8BAA8B,CACxD,CAAC;MACH;MACA,OAAOQ,YAAY;IACrB,CAAC,CACH,CAAC;EACH,CAAC;;EAED;AACJ;AACA;EACI,MAAMK,kBAAkB,GAAGA,CAAA,KAAM;IAC/B,MAAM;MAAEnB,YAAY;MAAEC,YAAY;MAAEC;IAAK,CAAC,GAAGL,EAAE;IAC/C,MAAM;MACJJ,SAAS;MACTY,mCAAmC;MACnCe;IACF,CAAC,GAAGxB,MAAM;IACV,MAAMyB,QAAQ,GAAG9B,UAAU,CAACU,YAAY,EAAER,SAAS,KAAK,IAAI,EAAES,IAAI,CAAC;IACnEF,YAAY,CAACV,OAAO,CAAEkB,IAAI,IAAK;MAC7B,MAAMc,qBAAqB,GAAGd,IAAI,CAACS,OAAO,CACxCZ,mCACF,CAAC;MACD,IAAIiB,qBAAqB,EAAE;QACzBhC,OAAO,CACLgC,qBAAqB,CAACC,gBAAgB,CACpCH,6BACF,CAAC,EACAN,YAAY,IAAK;UAChBA,YAAY,CAACC,WAAW,GAAGM,QAAQ;QACrC,CACF,CAAC;MACH;IACF,CAAC,CAAC;EACJ,CAAC;;EAED;AACJ;AACA;EACI,MAAMG,QAAQ,GAAGA,CAAA,KAAM;IACrB3B,EAAE,CAAC4B,aAAa,CAACC,IAAI,CAAC,kCAAkC,CAAC;EAC3D,CAAC;EAED,OAAO;IACLC,aAAa,EAAER,kBAAkB;IACjCS,aAAa,EAAET,kBAAkB;IACjCU,MAAM,EAAEV,kBAAkB;IAC1BW,OAAO,EAAE,CAAChC,aAAa,EAAEqB,kBAAkB,EAAEK,QAAQ;EACvD,CAAC;AACH,CAAC"}
|
|
@@ -1,28 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2019,
|
|
4
|
+
* Copyright IBM Corp. 2019, 2023
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { Config } from 'flatpickr/dist/plugins/rangePlugin';
|
|
10
|
+
import { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';
|
|
10
11
|
import { Plugin } from 'flatpickr/dist/types/options';
|
|
12
|
+
import Handle from '../../globals/internal/handle';
|
|
13
|
+
/**
|
|
14
|
+
* `FlatpickrInstance` with additional properties used for `range` plugin.
|
|
15
|
+
*/
|
|
16
|
+
export interface ExtendedFlatpickrInstanceRangePlugin extends FlatpickrInstance {
|
|
17
|
+
/**
|
|
18
|
+
* The handle for `blur` event handler for from date range input.
|
|
19
|
+
*/
|
|
20
|
+
_hBXCEDatePickerRangePluginOnBlurFrom?: Handle | null;
|
|
21
|
+
/**
|
|
22
|
+
* The handle for `blur` event handler for to date range input.
|
|
23
|
+
*/
|
|
24
|
+
_hBXCEDatePickerRangePluginOnBlurTo?: Handle | null;
|
|
25
|
+
}
|
|
11
26
|
/**
|
|
12
27
|
* @param config Plugin configuration.
|
|
13
28
|
* @returns
|
|
14
29
|
* An extension of Flatpickr `rangePlugin` that does the following:
|
|
15
30
|
*
|
|
16
|
-
*
|
|
31
|
+
* Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.
|
|
17
32
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1944
|
|
18
|
-
*
|
|
33
|
+
* Disables the logic in Flatpickr `rangePlugin` that calculates the new range with the old selected date
|
|
19
34
|
* when user selects a date from calendar dropdown.
|
|
20
35
|
* We'd like to reset the selection when user re-opens calendar dropdown and re-selects a date.
|
|
21
36
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1958
|
|
22
|
-
*
|
|
23
|
-
* when it's
|
|
37
|
+
* Disables the logic in Flatpickr `rangePlugin` that closes the calendar dropdown
|
|
38
|
+
* when it's launched from the `<input>` for the end date and user selects a date.
|
|
24
39
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1958
|
|
25
|
-
*
|
|
40
|
+
* Ensures that the `<input>` in shadow DOM is treated as part of Flatpickr UI,
|
|
26
41
|
* by ensuring such `<input>` hits `.contains()` search from `fp.config.ignoredFocusElements`.
|
|
27
42
|
* Without that, Flatpickr clears the `<input>` when end date hasn't been selected yet (which we don't want).
|
|
28
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/date-picker/range-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"sources":["components/date-picker/range-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAoB,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,oCACf,SAAQ,iBAAiB;IACzB;;OAEG;IACH,qCAAqC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,mCAAmC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;GAiBG;iCACqB,MAAM,KAAG,MAAM;AAAvC,wBA4FE","file":"range-plugin.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// @ts-nocheck\nimport rangePlugin, { Config } from 'flatpickr/dist/plugins/rangePlugin';\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../../globals/internal/handle';\n\n/**\n * `FlatpickrInstance` with additional properties used for `range` plugin.\n */\nexport interface ExtendedFlatpickrInstanceRangePlugin\n extends FlatpickrInstance {\n /**\n * The handle for `blur` event handler for from date range input.\n */\n _hBXCEDatePickerRangePluginOnBlurFrom?: Handle | null;\n\n /**\n * The handle for `blur` event handler for to date range input.\n */\n _hBXCEDatePickerRangePluginOnBlurTo?: Handle | null;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns\n * An extension of Flatpickr `rangePlugin` that does the following:\n *\n * Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1944\n * Disables the logic in Flatpickr `rangePlugin` that calculates the new range with the old selected date\n * when user selects a date from calendar dropdown.\n * We'd like to reset the selection when user re-opens calendar dropdown and re-selects a date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1958\n * Disables the logic in Flatpickr `rangePlugin` that closes the calendar dropdown\n * when it's launched from the `<input>` for the end date and user selects a date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1958\n * Ensures that the `<input>` in shadow DOM is treated as part of Flatpickr UI,\n * by ensuring such `<input>` hits `.contains()` search from `fp.config.ignoredFocusElements`.\n * Without that, Flatpickr clears the `<input>` when end date hasn't been selected yet (which we don't want).\n */\nexport default (config: Config): Plugin => {\n const factory = rangePlugin({ position: 'left', ...config });\n return (fp: ExtendedFlatpickrInstanceRangePlugin) => {\n const origRangePlugin = factory(fp);\n const { onReady: origOnReady } = origRangePlugin;\n\n const getDateStrFromInputs = (dates: Array<string>) => {\n return dates\n .filter((value) => value)\n .filter(\n (d, i, arr) =>\n fp.config.mode !== 'range' ||\n fp.config.enableTime ||\n arr.indexOf(d) === i\n )\n .join(\n fp.config.mode !== 'range'\n ? fp.config.conjunction\n : fp.l10n.rangeSeparator\n );\n };\n\n const handleBlur = (event: FocusEvent) => {\n event.stopPropagation();\n const firstInput = fp._input;\n const secondInput = config.input as HTMLInputElement;\n const isInput =\n event.target === firstInput || event.target === secondInput;\n const valueChanged =\n getDateStrFromInputs([firstInput.value, secondInput.value]) !==\n fp.getDateStr();\n const relatedTargetIsCalendar =\n event.relatedTarget &&\n event.relatedTarget instanceof Node &&\n fp.calendarContainer.contains(event.relatedTarget);\n\n if (isInput && valueChanged && !relatedTargetIsCalendar) {\n fp.setDate(\n [firstInput.value, secondInput.value],\n true,\n firstInput === fp.altInput\n ? fp.config.altFormat\n : fp.config.dateFormat\n );\n }\n };\n\n const release = () => {\n if (fp._hBXCEDatePickerRangePluginOnBlurFrom) {\n fp._hBXCEDatePickerRangePluginOnBlurFrom =\n fp._hBXCEDatePickerRangePluginOnBlurFrom.release();\n }\n if (fp._hBXCEDatePickerRangePluginOnBlurTo) {\n fp._hBXCEDatePickerRangePluginOnBlurTo =\n fp._hBXCEDatePickerRangePluginOnBlurTo.release();\n }\n };\n\n return Object.assign(origRangePlugin, {\n onReady() {\n (origOnReady as Function).call(this);\n const { ignoredFocusElements } = fp.config;\n ignoredFocusElements.push(\n ...ignoredFocusElements\n .map((elem) => elem.shadowRoot as any)\n .filter(Boolean)\n );\n\n // Setup event listeners for the blur even on both inputs. In the case\n // of the first input, we're overriding the blur event handler from\n // the library to fix it by setting it on the capture phase and then\n // stopping propagation. This is necessary b/c the library does not take\n // the range plugin into consideration when it calls setDate.\n // Workaround for: https://github.com/flatpickr/flatpickr/issues/2918\n release();\n if (fp.config.allowInput) {\n fp._hBXCEDatePickerRangePluginOnBlurFrom = on(\n fp._input,\n 'blur',\n handleBlur,\n { capture: true }\n );\n fp._hBXCEDatePickerRangePluginOnBlurTo = on(\n config.input as HTMLInputElement,\n 'blur',\n handleBlur,\n { capture: true }\n );\n }\n },\n });\n };\n};\n"]}
|
|
@@ -2,28 +2,35 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
*
|
|
5
|
-
* Copyright IBM Corp. 2019,
|
|
5
|
+
* Copyright IBM Corp. 2019, 2023
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
// @ts-nocheck
|
|
11
12
|
import rangePlugin from 'flatpickr/dist/plugins/rangePlugin';
|
|
13
|
+
import on from 'carbon-components/es/globals/js/misc/on';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `FlatpickrInstance` with additional properties used for `range` plugin.
|
|
17
|
+
*/
|
|
18
|
+
|
|
12
19
|
/**
|
|
13
20
|
* @param config Plugin configuration.
|
|
14
21
|
* @returns
|
|
15
22
|
* An extension of Flatpickr `rangePlugin` that does the following:
|
|
16
23
|
*
|
|
17
|
-
*
|
|
24
|
+
* Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.
|
|
18
25
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1944
|
|
19
|
-
*
|
|
26
|
+
* Disables the logic in Flatpickr `rangePlugin` that calculates the new range with the old selected date
|
|
20
27
|
* when user selects a date from calendar dropdown.
|
|
21
28
|
* We'd like to reset the selection when user re-opens calendar dropdown and re-selects a date.
|
|
22
29
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1958
|
|
23
|
-
*
|
|
24
|
-
* when it's
|
|
30
|
+
* Disables the logic in Flatpickr `rangePlugin` that closes the calendar dropdown
|
|
31
|
+
* when it's launched from the `<input>` for the end date and user selects a date.
|
|
25
32
|
* Workaround for: https://github.com/flatpickr/flatpickr/issues/1958
|
|
26
|
-
*
|
|
33
|
+
* Ensures that the `<input>` in shadow DOM is treated as part of Flatpickr UI,
|
|
27
34
|
* by ensuring such `<input>` hits `.contains()` search from `fp.config.ignoredFocusElements`.
|
|
28
35
|
* Without that, Flatpickr clears the `<input>` when end date hasn't been selected yet (which we don't want).
|
|
29
36
|
*/
|
|
@@ -36,24 +43,51 @@ export default (config => {
|
|
|
36
43
|
const {
|
|
37
44
|
onReady: origOnReady
|
|
38
45
|
} = origRangePlugin;
|
|
46
|
+
const getDateStrFromInputs = dates => {
|
|
47
|
+
return dates.filter(value => value).filter((d, i, arr) => fp.config.mode !== 'range' || fp.config.enableTime || arr.indexOf(d) === i).join(fp.config.mode !== 'range' ? fp.config.conjunction : fp.l10n.rangeSeparator);
|
|
48
|
+
};
|
|
49
|
+
const handleBlur = event => {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
const firstInput = fp._input;
|
|
52
|
+
const secondInput = config.input;
|
|
53
|
+
const isInput = event.target === firstInput || event.target === secondInput;
|
|
54
|
+
const valueChanged = getDateStrFromInputs([firstInput.value, secondInput.value]) !== fp.getDateStr();
|
|
55
|
+
const relatedTargetIsCalendar = event.relatedTarget && event.relatedTarget instanceof Node && fp.calendarContainer.contains(event.relatedTarget);
|
|
56
|
+
if (isInput && valueChanged && !relatedTargetIsCalendar) {
|
|
57
|
+
fp.setDate([firstInput.value, secondInput.value], true, firstInput === fp.altInput ? fp.config.altFormat : fp.config.dateFormat);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const release = () => {
|
|
61
|
+
if (fp._hBXCEDatePickerRangePluginOnBlurFrom) {
|
|
62
|
+
fp._hBXCEDatePickerRangePluginOnBlurFrom = fp._hBXCEDatePickerRangePluginOnBlurFrom.release();
|
|
63
|
+
}
|
|
64
|
+
if (fp._hBXCEDatePickerRangePluginOnBlurTo) {
|
|
65
|
+
fp._hBXCEDatePickerRangePluginOnBlurTo = fp._hBXCEDatePickerRangePluginOnBlurTo.release();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
39
68
|
return Object.assign(origRangePlugin, {
|
|
40
|
-
onChange() {},
|
|
41
|
-
onPreCalendarPosition() {},
|
|
42
|
-
onValueUpdate(selectedDates) {
|
|
43
|
-
const [startDateFormatted, endDateFormatted] = selectedDates.map(item => fp.formatDate(item, fp.config.dateFormat));
|
|
44
|
-
if (startDateFormatted) {
|
|
45
|
-
fp._input.value = startDateFormatted;
|
|
46
|
-
}
|
|
47
|
-
if (endDateFormatted) {
|
|
48
|
-
config.input.value = endDateFormatted;
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
69
|
onReady() {
|
|
52
70
|
origOnReady.call(this);
|
|
53
71
|
const {
|
|
54
72
|
ignoredFocusElements
|
|
55
73
|
} = fp.config;
|
|
56
74
|
ignoredFocusElements.push(...ignoredFocusElements.map(elem => elem.shadowRoot).filter(Boolean));
|
|
75
|
+
|
|
76
|
+
// Setup event listeners for the blur even on both inputs. In the case
|
|
77
|
+
// of the first input, we're overriding the blur event handler from
|
|
78
|
+
// the library to fix it by setting it on the capture phase and then
|
|
79
|
+
// stopping propagation. This is necessary b/c the library does not take
|
|
80
|
+
// the range plugin into consideration when it calls setDate.
|
|
81
|
+
// Workaround for: https://github.com/flatpickr/flatpickr/issues/2918
|
|
82
|
+
release();
|
|
83
|
+
if (fp.config.allowInput) {
|
|
84
|
+
fp._hBXCEDatePickerRangePluginOnBlurFrom = on(fp._input, 'blur', handleBlur, {
|
|
85
|
+
capture: true
|
|
86
|
+
});
|
|
87
|
+
fp._hBXCEDatePickerRangePluginOnBlurTo = on(config.input, 'blur', handleBlur, {
|
|
88
|
+
capture: true
|
|
89
|
+
});
|
|
90
|
+
}
|
|
57
91
|
}
|
|
58
92
|
});
|
|
59
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-plugin.js","names":["rangePlugin","config","factory","_objectSpread","position","fp","origRangePlugin","onReady","origOnReady","
|
|
1
|
+
{"version":3,"file":"range-plugin.js","names":["rangePlugin","on","config","factory","_objectSpread","position","fp","origRangePlugin","onReady","origOnReady","getDateStrFromInputs","dates","filter","value","d","i","arr","mode","enableTime","indexOf","join","conjunction","l10n","rangeSeparator","handleBlur","event","stopPropagation","firstInput","_input","secondInput","input","isInput","target","valueChanged","getDateStr","relatedTargetIsCalendar","relatedTarget","Node","calendarContainer","contains","setDate","altInput","altFormat","dateFormat","release","_hBXCEDatePickerRangePluginOnBlurFrom","_hBXCEDatePickerRangePluginOnBlurTo","Object","assign","call","ignoredFocusElements","push","map","elem","shadowRoot","Boolean","allowInput","capture"],"sources":["components/date-picker/range-plugin.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\n// @ts-nocheck\nimport rangePlugin, { Config } from 'flatpickr/dist/plugins/rangePlugin';\nimport { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../../globals/internal/handle';\n\n/**\n * `FlatpickrInstance` with additional properties used for `range` plugin.\n */\nexport interface ExtendedFlatpickrInstanceRangePlugin\n extends FlatpickrInstance {\n /**\n * The handle for `blur` event handler for from date range input.\n */\n _hBXCEDatePickerRangePluginOnBlurFrom?: Handle | null;\n\n /**\n * The handle for `blur` event handler for to date range input.\n */\n _hBXCEDatePickerRangePluginOnBlurTo?: Handle | null;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns\n * An extension of Flatpickr `rangePlugin` that does the following:\n *\n * Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1944\n * Disables the logic in Flatpickr `rangePlugin` that calculates the new range with the old selected date\n * when user selects a date from calendar dropdown.\n * We'd like to reset the selection when user re-opens calendar dropdown and re-selects a date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1958\n * Disables the logic in Flatpickr `rangePlugin` that closes the calendar dropdown\n * when it's launched from the `<input>` for the end date and user selects a date.\n * Workaround for: https://github.com/flatpickr/flatpickr/issues/1958\n * Ensures that the `<input>` in shadow DOM is treated as part of Flatpickr UI,\n * by ensuring such `<input>` hits `.contains()` search from `fp.config.ignoredFocusElements`.\n * Without that, Flatpickr clears the `<input>` when end date hasn't been selected yet (which we don't want).\n */\nexport default (config: Config): Plugin => {\n const factory = rangePlugin({ position: 'left', ...config });\n return (fp: ExtendedFlatpickrInstanceRangePlugin) => {\n const origRangePlugin = factory(fp);\n const { onReady: origOnReady } = origRangePlugin;\n\n const getDateStrFromInputs = (dates: Array<string>) => {\n return dates\n .filter((value) => value)\n .filter(\n (d, i, arr) =>\n fp.config.mode !== 'range' ||\n fp.config.enableTime ||\n arr.indexOf(d) === i\n )\n .join(\n fp.config.mode !== 'range'\n ? fp.config.conjunction\n : fp.l10n.rangeSeparator\n );\n };\n\n const handleBlur = (event: FocusEvent) => {\n event.stopPropagation();\n const firstInput = fp._input;\n const secondInput = config.input as HTMLInputElement;\n const isInput =\n event.target === firstInput || event.target === secondInput;\n const valueChanged =\n getDateStrFromInputs([firstInput.value, secondInput.value]) !==\n fp.getDateStr();\n const relatedTargetIsCalendar =\n event.relatedTarget &&\n event.relatedTarget instanceof Node &&\n fp.calendarContainer.contains(event.relatedTarget);\n\n if (isInput && valueChanged && !relatedTargetIsCalendar) {\n fp.setDate(\n [firstInput.value, secondInput.value],\n true,\n firstInput === fp.altInput\n ? fp.config.altFormat\n : fp.config.dateFormat\n );\n }\n };\n\n const release = () => {\n if (fp._hBXCEDatePickerRangePluginOnBlurFrom) {\n fp._hBXCEDatePickerRangePluginOnBlurFrom =\n fp._hBXCEDatePickerRangePluginOnBlurFrom.release();\n }\n if (fp._hBXCEDatePickerRangePluginOnBlurTo) {\n fp._hBXCEDatePickerRangePluginOnBlurTo =\n fp._hBXCEDatePickerRangePluginOnBlurTo.release();\n }\n };\n\n return Object.assign(origRangePlugin, {\n onReady() {\n (origOnReady as Function).call(this);\n const { ignoredFocusElements } = fp.config;\n ignoredFocusElements.push(\n ...ignoredFocusElements\n .map((elem) => elem.shadowRoot as any)\n .filter(Boolean)\n );\n\n // Setup event listeners for the blur even on both inputs. In the case\n // of the first input, we're overriding the blur event handler from\n // the library to fix it by setting it on the capture phase and then\n // stopping propagation. This is necessary b/c the library does not take\n // the range plugin into consideration when it calls setDate.\n // Workaround for: https://github.com/flatpickr/flatpickr/issues/2918\n release();\n if (fp.config.allowInput) {\n fp._hBXCEDatePickerRangePluginOnBlurFrom = on(\n fp._input,\n 'blur',\n handleBlur,\n { capture: true }\n );\n fp._hBXCEDatePickerRangePluginOnBlurTo = on(\n config.input as HTMLInputElement,\n 'blur',\n handleBlur,\n { capture: true }\n );\n }\n },\n });\n };\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-dom-events-plugin.js","names":["on","find","moveDateForKeys","ArrowLeft","Left","ArrowUp","Up","ArrowRight","Right","ArrowDown","Down","moveMonthForKeys","MILLISECONDS_IN_DAY","adjustDate","localDate","date","moveDate","utcDate","Date","UTC","getFullYear","getMonth","getDate","getUTCFullYear","getUTCMonth","getUTCDate","fp","getDateElem","daysContainer","firstElementChild","children","dateObj","getTime","handleKeydown","event","ctrlKey","key","target","dispatchEvent","Object","assign","CustomEvent","bubbles","which","movedDate","movedDateElem","focus","innerDaysContainer","changeMonth","lastElementChild","preventDefault","release","_hCDSCEDatePickerShadowDOMEventsPluginKeydown","init","calendarContainer","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from '../../globals/mixins/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,EAAE,MAAM,yBAAyB;AAExC,SAASC,IAAI,QAAQ,2CAA2C;;AAEhE;AACA;AACA;;AASA;AACA;AACA;AACA,MAAMC,eAAe,GAAG;EACtBC,SAAS,EAAE,CAAC,CAAC;EACbC,IAAI,EAAE,CAAC,CAAC;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,EAAE,EAAE,CAAC,CAAC;EACNC,UAAU,EAAE,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG;EACvBR,SAAS,EAAE,CAAC,CAAC;EACbC,IAAI,EAAE,CAAC,CAAC;EACRC,OAAO,EAAE,CAAC,EAAE;EACZC,EAAE,EAAE,CAAC,EAAE;EACPC,UAAU,EAAE,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,EAAE;EACbC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA,MAAME,mBAAmB,GAAG,QAAQ;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAGA,CACjBC,SAAe,EACf;EAAEC,IAAI,EAAEC,QAAQ,GAAG;AAAqB,CAAC,KACtC;EACH,MAAMC,OAAO,GAAG,IAAIC,IAAI,CACtBA,IAAI,CAACC,GAAG,CACNL,SAAS,CAACM,WAAW,
|
|
1
|
+
{"version":3,"file":"shadow-dom-events-plugin.js","names":["on","find","moveDateForKeys","ArrowLeft","Left","ArrowUp","Up","ArrowRight","Right","ArrowDown","Down","moveMonthForKeys","MILLISECONDS_IN_DAY","adjustDate","localDate","date","moveDate","utcDate","Date","UTC","getFullYear","getMonth","getDate","getUTCFullYear","getUTCMonth","getUTCDate","fp","getDateElem","daysContainer","firstElementChild","children","dateObj","getTime","handleKeydown","event","ctrlKey","key","target","dispatchEvent","Object","assign","CustomEvent","bubbles","which","movedDate","movedDateElem","focus","innerDaysContainer","changeMonth","lastElementChild","preventDefault","release","_hCDSCEDatePickerShadowDOMEventsPluginKeydown","init","calendarContainer","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from '../../globals/mixins/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-handshake-plugin.js","names":["datePicker","fp","setOpen","open","setClosed","handleChange","selectedDates","eventChange","constructor","dispatchEvent","CustomEvent","bubbles","cancelable","composed","detail","register","_selectedDates","_value","calendar","loadedPlugins","push","onOpen","onClose","onChange","onReady"],"sources":["components/date-picker/state-handshake-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport CDSDatePicker from './date-picker';\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to handshake states with `<cds-date-picker>`.\n */\nexport default (datePicker: CDSDatePicker): Plugin =>\n (fp: FlatpickrInstance) => {\n /**\n * Sets open state.\n */\n const setOpen = () => {\n datePicker.open = true;\n };\n\n /**\n * Sets closed state.\n */\n const setClosed = () => {\n datePicker.open = false;\n };\n\n /**\n * Propagates Flatpickr's `onChange` event to `<cds-date-picker>`.\n *\n * @param selectedDates The latest selected dates.\n */\n const handleChange = (selectedDates: Date[]) => {\n const { eventChange } = datePicker.constructor as typeof CDSDatePicker;\n datePicker.dispatchEvent(\n new CustomEvent(eventChange, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n selectedDates,\n },\n })\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = (_selectedDates, _value, calendar: FlatpickrInstance) => {\n datePicker.calendar = calendar;\n fp.loadedPlugins.push('carbonFlatpickrStateHandshakePlugin');\n };\n\n return {\n onOpen: setOpen,\n onClose: setClosed,\n onChange: handleChange,\n onReady: [register],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,gBAAgBA,UAAyB,IACtCC,EAAqB,IAAK;EACzB;AACJ;AACA;EACI,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpBF,UAAU,CAACG,IAAI,GAAG,IAAI;EACxB,CAAC;;EAED;AACJ;AACA;EACI,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtBJ,UAAU,CAACG,IAAI,GAAG,KAAK;EACzB,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,MAAME,YAAY,GAAIC,aAAqB,IAAK;IAC9C,MAAM;MAAEC;IAAY,CAAC,GAAGP,UAAU,CAACQ,WAAmC;IACtER,UAAU,CAACS,aAAa,CACtB,IAAIC,WAAW,CAACH,WAAW,EAAE;MAC3BI,OAAO,EAAE,IAAI;MACbC,UAAU,EAAE,IAAI;MAChBC,QAAQ,EAAE,IAAI;MACdC,MAAM,EAAE;QACNR;MACF;IACF,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"state-handshake-plugin.js","names":["datePicker","fp","setOpen","open","setClosed","handleChange","selectedDates","eventChange","constructor","dispatchEvent","CustomEvent","bubbles","cancelable","composed","detail","register","_selectedDates","_value","calendar","loadedPlugins","push","onOpen","onClose","onChange","onReady"],"sources":["components/date-picker/state-handshake-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport CDSDatePicker from './date-picker';\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to handshake states with `<cds-date-picker>`.\n */\nexport default (datePicker: CDSDatePicker): Plugin =>\n (fp: FlatpickrInstance) => {\n /**\n * Sets open state.\n */\n const setOpen = () => {\n datePicker.open = true;\n };\n\n /**\n * Sets closed state.\n */\n const setClosed = () => {\n datePicker.open = false;\n };\n\n /**\n * Propagates Flatpickr's `onChange` event to `<cds-date-picker>`.\n *\n * @param selectedDates The latest selected dates.\n */\n const handleChange = (selectedDates: Date[]) => {\n const { eventChange } = datePicker.constructor as typeof CDSDatePicker;\n datePicker.dispatchEvent(\n new CustomEvent(eventChange, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n selectedDates,\n },\n })\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = (_selectedDates, _value, calendar: FlatpickrInstance) => {\n datePicker.calendar = calendar;\n fp.loadedPlugins.push('carbonFlatpickrStateHandshakePlugin');\n };\n\n return {\n onOpen: setOpen,\n onClose: setClosed,\n onChange: handleChange,\n onReady: [register],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,gBAAgBA,UAAyB,IACtCC,EAAqB,IAAK;EACzB;AACJ;AACA;EACI,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpBF,UAAU,CAACG,IAAI,GAAG,IAAI;EACxB,CAAC;;EAED;AACJ;AACA;EACI,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtBJ,UAAU,CAACG,IAAI,GAAG,KAAK;EACzB,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,MAAME,YAAY,GAAIC,aAAqB,IAAK;IAC9C,MAAM;MAAEC;IAAY,CAAC,GAAGP,UAAU,CAACQ,WAAmC;IACtER,UAAU,CAACS,aAAa,CACtB,IAAIC,WAAW,CAACH,WAAW,EAAE;MAC3BI,OAAO,EAAE,IAAI;MACbC,UAAU,EAAE,IAAI;MAChBC,QAAQ,EAAE,IAAI;MACdC,MAAM,EAAE;QACNR;MACF;IACF,CAAC,CACH,CAAC;EACH,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,MAAMS,QAAQ,GAAGA,CAACC,cAAc,EAAEC,MAAM,EAAEC,QAA2B,KAAK;IACxElB,UAAU,CAACkB,QAAQ,GAAGA,QAAQ;IAC9BjB,EAAE,CAACkB,aAAa,CAACC,IAAI,CAAC,qCAAqC,CAAC;EAC9D,CAAC;EAED,OAAO;IACLC,MAAM,EAAEnB,OAAO;IACfoB,OAAO,EAAElB,SAAS;IAClBmB,QAAQ,EAAElB,YAAY;IACtBmB,OAAO,EAAE,CAACT,QAAQ;EACpB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/dropdown/defs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,yBAAyB,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF;;GAEG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,KAAK,OAAO;IAEZ;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,KAAK,OAAO;CACb;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,OAAO,KAAK;IAEZ;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,MAAM,WAAW;CAClB","file":"defs.d.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"]}
|
|
1
|
+
{"version":3,"sources":["components/dropdown/defs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,yBAAyB,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF;;GAEG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,KAAK,OAAO;IAEZ;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,KAAK,OAAO;CACb;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,OAAO,KAAK;IAEZ;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,MAAM,WAAW;CAClB","file":"defs.d.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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["FORM_ELEMENT_COLOR_SCHEME","DROPDOWN_COLOR_SCHEME","NAVIGATION_DIRECTION","Up","ArrowUp","Down","ArrowDown","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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,yBAAyB,IAAIC,qBAAqB,QAAQ,4BAA4B;;AAE/F;AACA;AACA;AACA,OAAO,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;AACA,WAAYC,wBAAwB;;AAsBpC;AACA;AACA;AAFA,WAtBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB;AAyBpC,WAAYC,aAAa;;AAiBzB;AACA;AACA;AAFA,WAjBYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAoBzB,WAAYC,aAAa;;AAYzB;AACA;AACA;AAFA,WAZYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAezB,WAAYC,kBAAkB;AAU7B,WAVWA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"defs.js","names":["FORM_ELEMENT_COLOR_SCHEME","DROPDOWN_COLOR_SCHEME","NAVIGATION_DIRECTION","Up","ArrowUp","Down","ArrowDown","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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,yBAAyB,IAAIC,qBAAqB,QAAQ,4BAA4B;;AAE/F;AACA;AACA;AACA,OAAO,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;AACA,WAAYC,wBAAwB;;AAsBpC;AACA;AACA;AAFA,WAtBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB;AAyBpC,WAAYC,aAAa;;AAiBzB;AACA;AACA;AAFA,WAjBYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAoBzB,WAAYC,aAAa;;AAYzB;AACA;AACA;AAFA,WAZYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAezB,WAAYC,kBAAkB;AAU7B,WAVWA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/dropdown/dropdown-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"sources":["components/dropdown/dropdown-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;;GAKG;AACH,cACM,eAAgB,SAAQ,UAAU;IACtC;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;;;;OAKG;IAEH,WAAW,UAAS;IAEpB;;;;OAIG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,IAAI,gBAAwB;IAE5B;;OAEG;IAEH,KAAK,SAAM;IAEX,MAAM;IAeN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,eAAe,CAAC","file":"dropdown-item.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport Checkmark16 from '@carbon/icons/lib/checkmark/16';\nimport { prefix } from '../../globals/settings';\nimport { DROPDOWN_SIZE } from './dropdown';\nimport styles from './dropdown.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Dropdown item.\n *\n * @element cds-dropdown-item\n * @csspart selected-icon The selected icon.\n */\n@customElement(`${prefix}-dropdown-item`)\nclass CDSDropdownItem extends LitElement {\n /**\n * `true` if this dropdown item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if this dropdown item should be highlighted.\n * If `true`, parent `<dropdown>` selects/deselects this dropdown item upon keyboard interaction.\n *\n * @private\n */\n @property({ type: Boolean, reflect: true })\n highlighted = false;\n\n /**\n * `true` if this dropdown item should be selected.\n *\n * @private\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Dropdown size.\n */\n @property({ reflect: true })\n size = DROPDOWN_SIZE.MEDIUM;\n\n /**\n * The `value` attribute that is set to the parent `<cds-dropdown>` when this dropdown item is selected.\n */\n @property()\n value = '';\n\n render() {\n const { selected } = this;\n return html`\n <div class=\"${prefix}--list-box__menu-item__option\">\n <slot></slot>\n ${!selected\n ? undefined\n : Checkmark16({\n part: 'selected-icon',\n class: `${prefix}--list-box__menu-item__selected-icon`,\n })}\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSDropdownItem;\n"]}
|
|
@@ -11,23 +11,19 @@ let _ = t => t,
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { LitElement, html } from 'lit';
|
|
14
|
-
import { property
|
|
14
|
+
import { property } from 'lit/decorators.js';
|
|
15
15
|
import Checkmark16 from "../../icons/checkmark/16";
|
|
16
16
|
import { prefix } from '../../globals/settings';
|
|
17
17
|
import { DROPDOWN_SIZE } from './dropdown';
|
|
18
18
|
import styles from "././dropdown.css.js";
|
|
19
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Dropdown item.
|
|
22
23
|
*
|
|
23
24
|
* @element cds-dropdown-item
|
|
24
25
|
* @csspart selected-icon The selected icon.
|
|
25
|
-
*/
|
|
26
|
-
* Dropdown item.
|
|
27
|
-
*
|
|
28
|
-
* @element cds-dropdown-item
|
|
29
|
-
* @csspart selected-icon The selected icon.
|
|
30
|
-
*/
|
|
26
|
+
*/
|
|
31
27
|
let CDSDropdownItem = _decorate([customElement(`${prefix}-dropdown-item`)], function (_initialize, _LitElement) {
|
|
32
28
|
class CDSDropdownItem extends _LitElement {
|
|
33
29
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-item.js","names":["LitElement","html","property","
|
|
1
|
+
{"version":3,"file":"dropdown-item.js","names":["LitElement","html","property","Checkmark16","prefix","DROPDOWN_SIZE","styles","carbonElement","customElement","CDSDropdownItem","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","decorators","type","Boolean","reflect","key","value","MEDIUM","render","selected","_t","_","undefined","part","class","static"],"sources":["components/dropdown/dropdown-item.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 { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport Checkmark16 from '@carbon/icons/lib/checkmark/16';\nimport { prefix } from '../../globals/settings';\nimport { DROPDOWN_SIZE } from './dropdown';\nimport styles from './dropdown.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Dropdown item.\n *\n * @element cds-dropdown-item\n * @csspart selected-icon The selected icon.\n */\n@customElement(`${prefix}-dropdown-item`)\nclass CDSDropdownItem extends LitElement {\n /**\n * `true` if this dropdown item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if this dropdown item should be highlighted.\n * If `true`, parent `<dropdown>` selects/deselects this dropdown item upon keyboard interaction.\n *\n * @private\n */\n @property({ type: Boolean, reflect: true })\n highlighted = false;\n\n /**\n * `true` if this dropdown item should be selected.\n *\n * @private\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Dropdown size.\n */\n @property({ reflect: true })\n size = DROPDOWN_SIZE.MEDIUM;\n\n /**\n * The `value` attribute that is set to the parent `<cds-dropdown>` when this dropdown item is selected.\n */\n @property()\n value = '';\n\n render() {\n const { selected } = this;\n return html`\n <div class=\"${prefix}--list-box__menu-item__option\">\n <slot></slot>\n ${!selected\n ? undefined\n : Checkmark16({\n part: 'selected-icon',\n class: `${prefix}--list-box__menu-item__selected-icon`,\n })}\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSDropdownItem;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,OAAOC,WAAW,MAAM,0BAAgC;AACxD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,aAAa,QAAQ,YAAY;AAC1C,OAAOC,MAAM,MAAM,qBAAiB;AACpC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;;AAExF;AACA;AACA;AACA;AACA;AACA;AALA,IAOMC,eAAe,GAAAC,SAAA,EADpBF,aAAa,CAAE,GAAEJ,MAAO,gBAAe,CAAC,aAAAO,WAAA,EAAAC,WAAA;EAAzC,MACMH,eAAe,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAoDzC;EAAC;IAAAI,CAAA,EApDKN,eAAe;IAAAO,CAAA;MAAAC,IAAA;MAAAC,UAAA,GAIlBhB,QAAQ,CAAC;QAAEiB,IAAI,EAAEC,OAAO;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MAAAC,GAAA;MAAAC,MAAA;QAAA,OAChC,KAAK;MAAA;IAAA;MAAAN,IAAA;MAAAC,UAAA,GAQfhB,QAAQ,CAAC;QAAEiB,IAAI,EAAEC,OAAO;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MAAAC,GAAA;MAAAC,MAAA;QAAA,OAC7B,KAAK;MAAA;IAAA;MAAAN,IAAA;MAAAC,UAAA,GAOlBhB,QAAQ,CAAC;QAAEiB,IAAI,EAAEC,OAAO;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MAAAC,GAAA;MAAAC,MAAA;QAAA,OAChC,KAAK;MAAA;IAAA;MAAAN,IAAA;MAAAC,UAAA,GAKfhB,QAAQ,CAAC;QAAEmB,OAAO,EAAE;MAAK,CAAC,CAAC;MAAAC,GAAA;MAAAC,MAAA;QAAA,OACrBlB,aAAa,CAACmB,MAAM;MAAA;IAAA;MAAAP,IAAA;MAAAC,UAAA,GAK1BhB,QAAQ,CAAC,CAAC;MAAAoB,GAAA;MAAAC,MAAA;QAAA,OACH,EAAE;MAAA;IAAA;MAAAN,IAAA;MAAAK,GAAA;MAAAC,KAAA;MAjCV;AACF;AACA;;MAIE;AACF;AACA;AACA;AACA;AACA;;MAIE;AACF;AACA;AACA;AACA;;MAIE;AACF;AACA;;MAIE;AACF;AACA;;MAIE,SAAAE,OAAA,EAAS;QACP,MAAM;UAAEC;QAAS,CAAC,GAAG,IAAI;QACzB,OAAOzB,IAAI,CAAA0B,EAAA,KAAAA,EAAA,GAAAC,CAAC;AAChB,oBAAkB,CAAS;AAC3B;AACA,UAAQ,CAKO;AACf;AACA,KAAI,GATgBxB,MAAM,EAEhB,CAACsB,QAAQ,GACPG,SAAS,GACT1B,WAAW,CAAC;UACV2B,IAAI,EAAE,eAAe;UACrBC,KAAK,EAAG,GAAE3B,MAAO;QACnB,CAAC,CAAC;MAGZ;IAAC;MAAAa,IAAA;MAAAe,MAAA;MAAAV,GAAA;MAAAC,MAAA;QAAA,OAEejB,MAAM;MAAA;IAAA;EAAA;AAAA,GAnDMN,UAAU;AAsDxC,eAAeS,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/dropdown/dropdown-skeleton.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,cACM,mBAAoB,SAAQ,UAAU;IAC1C,MAAM;IAWN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,mBAAmB,CAAC","file":"dropdown-skeleton.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport {
|
|
1
|
+
{"version":3,"sources":["components/dropdown/dropdown-skeleton.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;GAEG;AACH,cACM,mBAAoB,SAAQ,UAAU;IAC1C,MAAM;IAWN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,mBAAmB,CAAC","file":"dropdown-skeleton.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { prefix } from '../../globals/settings';\nimport styles from './dropdown.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Skeleton version of dropdown.\n */\n@customElement(`${prefix}-dropdown-skeleton`)\nclass CDSDropdownSkeleton extends LitElement {\n render() {\n return html`\n <div\n class=\"${prefix}--skeleton ${prefix}--dropdown-v2 ${prefix}--list-box ${prefix}--form-item\">\n <div class=\"${prefix}--list-box__field\">\n <span class=\"${prefix}--list-box__label\"></span>\n </div>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSDropdownSkeleton;\n"]}
|
|
@@ -11,15 +11,13 @@ let _ = t => t,
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { LitElement, html } from 'lit';
|
|
14
|
-
import { customElement } from 'lit/decorators.js';
|
|
15
14
|
import { prefix } from '../../globals/settings';
|
|
16
15
|
import styles from "././dropdown.css.js";
|
|
16
|
+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Skeleton version of dropdown.
|
|
20
|
-
*/
|
|
21
|
-
* Skeleton version of dropdown.
|
|
22
|
-
*/
|
|
20
|
+
*/
|
|
23
21
|
let CDSDropdownSkeleton = _decorate([customElement(`${prefix}-dropdown-skeleton`)], function (_initialize, _LitElement) {
|
|
24
22
|
class CDSDropdownSkeleton extends _LitElement {
|
|
25
23
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-skeleton.js","names":["LitElement","html","
|
|
1
|
+
{"version":3,"file":"dropdown-skeleton.js","names":["LitElement","html","prefix","styles","carbonElement","customElement","CDSDropdownSkeleton","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","render","_t","_","static"],"sources":["components/dropdown/dropdown-skeleton.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 { LitElement, html } from 'lit';\nimport { prefix } from '../../globals/settings';\nimport styles from './dropdown.scss';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Skeleton version of dropdown.\n */\n@customElement(`${prefix}-dropdown-skeleton`)\nclass CDSDropdownSkeleton extends LitElement {\n render() {\n return html`\n <div\n class=\"${prefix}--skeleton ${prefix}--dropdown-v2 ${prefix}--list-box ${prefix}--form-item\">\n <div class=\"${prefix}--list-box__field\">\n <span class=\"${prefix}--list-box__label\"></span>\n </div>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSDropdownSkeleton;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,qBAAiB;AACpC,SAASC,aAAa,IAAIC,aAAa,QAAQ,yCAAyC;;AAExF;AACA;AACA;AAFA,IAIMC,mBAAmB,GAAAC,SAAA,EADxBF,aAAa,CAAE,GAAEH,MAAO,oBAAmB,CAAC,aAAAM,WAAA,EAAAC,WAAA;EAA7C,MACMH,mBAAmB,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAa7C;EAAC;IAAAI,CAAA,EAbKN,mBAAmB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EACvB,SAAAC,OAAA,EAAS;QACP,OAAOhB,IAAI,CAAAiB,EAAA,KAAAA,EAAA,GAAAC,CAAC;AAChB;AACA,iBAAe,CAAS,cAAW,CAAS,iBAAc,CAAS,cAAW,CAAS;AACvF,sBAAoB,CAAS;AAC7B,yBAAuB,CAAS;AAChC;AACA;AACA,KAAI,GALajB,MAAM,EAAcA,MAAM,EAAiBA,MAAM,EAAcA,MAAM,EAChEA,MAAM,EACHA,MAAM;MAI7B;IAAC;MAAAY,IAAA;MAAAM,MAAA;MAAAL,GAAA;MAAAC,MAAA;QAAA,OAEeb,MAAM;MAAA;IAAA;EAAA;AAAA,GAZUH,UAAU;AAe5C,eAAeM,mBAAmB"}
|