@carbon/web-components 2.0.0-alpha.0 → 2.0.0-beta.1
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/README.md +19 -19
- package/custom-elements.json +3557 -1387
- package/es/components/accordion/accordion-item-skeleton.d.ts +20 -0
- package/es/components/accordion/accordion-item-skeleton.d.ts.map +1 -0
- package/es/components/accordion/accordion-item-skeleton.js +60 -0
- package/es/components/accordion/accordion-item-skeleton.js.map +1 -0
- package/es/components/accordion/accordion-item.d.ts +5 -4
- package/es/components/accordion/accordion-item.d.ts.map +1 -1
- package/es/components/accordion/accordion-item.js +24 -9
- package/es/components/accordion/accordion-item.js.map +1 -1
- package/es/components/accordion/accordion-skeleton.d.ts +40 -0
- package/es/components/accordion/accordion-skeleton.d.ts.map +1 -0
- package/es/components/accordion/accordion-skeleton.js +166 -0
- package/es/components/accordion/accordion-skeleton.js.map +1 -0
- package/es/components/accordion/accordion.css.js +1 -1
- package/es/components/accordion/accordion.d.ts +2 -2
- package/es/components/accordion/accordion.d.ts.map +1 -1
- package/es/components/accordion/accordion.js +5 -5
- package/es/components/accordion/accordion.js.map +1 -1
- package/es/components/accordion/accordion.rtl.css.js +1 -1
- package/es/components/accordion/index.d.ts +3 -1
- package/es/components/accordion/index.d.ts.map +1 -1
- package/es/components/accordion/index.js +3 -1
- package/es/components/accordion/index.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/es/components/breadcrumb/breadcrumb-item.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-item.js +5 -5
- package/es/components/breadcrumb/breadcrumb-item.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.d.ts +4 -3
- package/es/components/breadcrumb/breadcrumb-link.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-link.js +20 -6
- package/es/components/breadcrumb/breadcrumb-link.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts +3 -3
- package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js +6 -6
- package/es/components/breadcrumb/breadcrumb-overflow-menu.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb-skeleton.d.ts +19 -0
- package/es/components/breadcrumb/breadcrumb-skeleton.d.ts.map +1 -0
- package/es/components/breadcrumb/breadcrumb-skeleton.js +59 -0
- package/es/components/breadcrumb/breadcrumb-skeleton.js.map +1 -0
- package/es/components/breadcrumb/breadcrumb.css.js +1 -1
- package/es/components/breadcrumb/breadcrumb.d.ts +6 -2
- package/es/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/es/components/breadcrumb/breadcrumb.js +30 -10
- 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 +2 -1
- package/es/components/breadcrumb/index.d.ts.map +1 -1
- package/es/components/breadcrumb/index.js +2 -1
- package/es/components/breadcrumb/index.js.map +1 -1
- package/es/components/button/button-set.d.ts +32 -0
- package/es/components/button/button-set.d.ts.map +1 -0
- package/es/components/button/button-set.js +92 -0
- package/es/components/button/button-set.js.map +1 -0
- package/es/components/button/button-skeleton.d.ts +3 -3
- package/es/components/button/button-skeleton.d.ts.map +1 -1
- package/es/components/button/button-skeleton.js +6 -6
- 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 +52 -13
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +192 -39
- 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 +60 -14
- package/es/components/button/defs.d.ts.map +1 -1
- package/es/components/button/defs.js +34 -11
- package/es/components/button/defs.js.map +1 -1
- package/es/components/button/index.d.ts +2 -1
- package/es/components/button/index.d.ts.map +1 -1
- package/es/components/button/index.js +2 -1
- package/es/components/button/index.js.map +1 -1
- package/es/components/{tooltip/tooltip-footer.d.ts → checkbox/checkbox-skeleton.d.ts} +4 -4
- package/es/components/checkbox/checkbox-skeleton.d.ts.map +1 -0
- package/es/components/{tooltip/tooltip-footer.js → checkbox/checkbox-skeleton.js} +15 -9
- package/es/components/checkbox/checkbox-skeleton.js.map +1 -0
- package/es/components/checkbox/checkbox.css.js +1 -1
- package/es/components/checkbox/checkbox.d.ts +21 -8
- package/es/components/checkbox/checkbox.d.ts.map +1 -1
- package/es/components/checkbox/checkbox.js +65 -17
- 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 +2 -1
- package/es/components/checkbox/index.d.ts.map +1 -1
- package/es/components/checkbox/index.js +2 -1
- package/es/components/checkbox/index.js.map +1 -1
- package/es/components/code-snippet/code-snippet.css.js +1 -1
- package/es/components/code-snippet/code-snippet.d.ts +0 -8
- package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
- package/es/components/code-snippet/code-snippet.js +20 -56
- 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/combo-box/combo-box-item.d.ts +3 -3
- package/es/components/combo-box/combo-box-item.d.ts.map +1 -1
- package/es/components/combo-box/combo-box-item.js +6 -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 +11 -11
- package/es/components/combo-box/combo-box.d.ts.map +1 -1
- package/es/components/combo-box/combo-box.js +40 -19
- 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/content-switcher/content-switcher.css.js +1 -1
- package/es/components/content-switcher/content-switcher.rtl.css.js +1 -1
- package/es/components/copy/copy.d.ts +49 -0
- package/es/components/copy/copy.d.ts.map +1 -0
- package/es/components/copy/copy.js +183 -0
- package/es/components/copy/copy.js.map +1 -0
- package/es/components/copy-button/copy-button.css.js +1 -1
- package/es/components/copy-button/copy-button.d.ts +8 -53
- package/es/components/copy-button/copy-button.d.ts.map +1 -1
- package/es/components/copy-button/copy-button.js +22 -150
- 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/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/table-header-cell.d.ts.map +1 -1
- package/es/components/data-table/table-header-cell.js +2 -2
- package/es/components/data-table/table-header-cell.js.map +1 -1
- package/es/components/data-table/table-toolbar-search.d.ts +3 -3
- package/es/components/data-table/table-toolbar-search.d.ts.map +1 -1
- package/es/components/data-table/table-toolbar-search.js +3 -3
- package/es/components/data-table/table-toolbar-search.js.map +1 -1
- package/es/components/date-picker/date-picker-input-skeleton.d.ts +2 -2
- package/es/components/date-picker/date-picker-input-skeleton.d.ts.map +1 -1
- package/es/components/date-picker/date-picker-input-skeleton.js +4 -4
- package/es/components/date-picker/date-picker-input-skeleton.js.map +1 -1
- package/es/components/date-picker/date-picker-input.d.ts +38 -352
- package/es/components/date-picker/date-picker-input.d.ts.map +1 -1
- package/es/components/date-picker/date-picker-input.js +138 -97
- 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 +23 -3
- package/es/components/date-picker/date-picker.d.ts.map +1 -1
- package/es/components/date-picker/date-picker.js +100 -24
- 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 -14
- package/es/components/date-picker/defs.d.ts.map +1 -1
- package/es/components/date-picker/defs.js +1 -10
- package/es/components/date-picker/defs.js.map +1 -1
- package/es/components/date-picker/fix-events-plugin.d.ts +6 -6
- package/es/components/date-picker/fix-events-plugin.d.ts.map +1 -1
- package/es/components/date-picker/fix-events-plugin.js +7 -7
- package/es/components/date-picker/fix-events-plugin.js.map +1 -1
- package/es/components/date-picker/focus-plugin.d.ts +9 -9
- package/es/components/date-picker/focus-plugin.d.ts.map +1 -1
- package/es/components/date-picker/focus-plugin.js +16 -16
- package/es/components/date-picker/focus-plugin.js.map +1 -1
- package/es/components/date-picker/shadow-dom-events-plugin.d.ts +2 -2
- package/es/components/date-picker/shadow-dom-events-plugin.d.ts.map +1 -1
- package/es/components/date-picker/shadow-dom-events-plugin.js +4 -4
- package/es/components/date-picker/shadow-dom-events-plugin.js.map +1 -1
- package/es/components/date-picker/state-handshake-plugin.d.ts +2 -2
- package/es/components/date-picker/state-handshake-plugin.d.ts.map +1 -1
- package/es/components/date-picker/state-handshake-plugin.js.map +1 -1
- package/es/components/dropdown/defs.d.ts +16 -3
- package/es/components/dropdown/defs.d.ts.map +1 -1
- package/es/components/dropdown/defs.js +11 -2
- package/es/components/dropdown/defs.js.map +1 -1
- package/es/components/dropdown/dropdown-item.d.ts +2 -2
- package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-item.js +4 -4
- package/es/components/dropdown/dropdown-item.js.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.d.ts +2 -2
- package/es/components/dropdown/dropdown-skeleton.d.ts.map +1 -1
- package/es/components/dropdown/dropdown-skeleton.js +4 -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 +45 -20
- package/es/components/dropdown/dropdown.d.ts.map +1 -1
- package/es/components/dropdown/dropdown.js +156 -65
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/dropdown/dropdown.rtl.css.js +1 -1
- package/es/components/file-uploader/file-uploader.css.js +1 -1
- package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
- package/es/components/form/form-item.css.js +1 -1
- package/es/components/form/form-item.rtl.css.js +1 -1
- package/es/components/icon-button/defs.d.ts +64 -0
- package/es/components/icon-button/defs.d.ts.map +1 -0
- package/es/components/icon-button/defs.js +34 -0
- package/es/components/icon-button/defs.js.map +1 -0
- package/es/components/icon-button/icon-button.css.js +12 -0
- package/es/components/icon-button/icon-button.d.ts +50 -0
- package/es/components/icon-button/icon-button.d.ts.map +1 -0
- package/es/components/icon-button/icon-button.js +176 -0
- package/es/components/icon-button/icon-button.js.map +1 -0
- package/es/components/icon-button/icon-button.rtl.css.js +12 -0
- package/es/components/icon-button/index.d.ts +11 -0
- package/es/components/icon-button/index.d.ts.map +1 -0
- package/es/components/icon-button/index.js +11 -0
- package/es/components/icon-button/index.js.map +1 -0
- package/es/components/inline-loading/inline-loading.d.ts +6 -2
- package/es/components/inline-loading/inline-loading.d.ts.map +1 -1
- package/es/components/inline-loading/inline-loading.js +20 -5
- package/es/components/inline-loading/inline-loading.js.map +1 -1
- package/es/components/input/defs.d.ts +1 -1
- package/es/components/input/defs.d.ts.map +1 -1
- package/es/components/input/defs.js +1 -1
- package/es/components/input/defs.js.map +1 -1
- package/es/components/input/input.css.js +1 -1
- package/es/components/input/input.d.ts +31 -7
- package/es/components/input/input.d.ts.map +1 -1
- package/es/components/input/input.js +88 -11
- package/es/components/input/input.js.map +1 -1
- package/es/components/input/input.rtl.css.js +1 -1
- package/es/components/layer/index.d.ts +11 -0
- package/es/components/layer/index.d.ts.map +1 -0
- package/es/components/layer/index.js +11 -0
- package/es/components/layer/index.js.map +1 -0
- package/es/components/layer/layer.css.js +12 -0
- package/es/components/layer/layer.d.ts +36 -0
- package/es/components/layer/layer.d.ts.map +1 -0
- package/es/components/layer/layer.js +117 -0
- package/es/components/layer/layer.js.map +1 -0
- package/es/components/layer/layer.rtl.css.js +12 -0
- package/es/components/link/link.d.ts +16 -8
- package/es/components/link/link.d.ts.map +1 -1
- package/es/components/link/link.js +41 -9
- package/es/components/link/link.js.map +1 -1
- package/es/components/list/list.css.js +1 -1
- package/es/components/list/list.rtl.css.js +1 -1
- package/es/components/list/ordered-list.d.ts +3 -3
- package/es/components/list/ordered-list.d.ts.map +1 -1
- package/es/components/list/ordered-list.js +6 -6
- package/es/components/list/ordered-list.js.map +1 -1
- package/es/components/list/unordered-list.d.ts +2 -2
- package/es/components/list/unordered-list.d.ts.map +1 -1
- package/es/components/list/unordered-list.js +5 -5
- package/es/components/list/unordered-list.js.map +1 -1
- package/es/components/loading/loading.css.js +1 -1
- package/es/components/loading/loading.d.ts +2 -2
- package/es/components/loading/loading.d.ts.map +1 -1
- package/es/components/loading/loading.js +4 -4
- package/es/components/loading/loading.js.map +1 -1
- package/es/components/loading/loading.rtl.css.js +1 -1
- package/es/components/modal/modal-footer-button.d.ts +3 -3
- package/es/components/modal/modal-footer-button.d.ts.map +1 -1
- package/es/components/modal/modal-footer-button.js +6 -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 +1 -1
- package/es/components/modal/modal-footer.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 -2
- 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 +3 -3
- package/es/components/multi-select/multi-select-item.d.ts.map +1 -1
- package/es/components/multi-select/multi-select-item.js +6 -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 +9 -9
- package/es/components/multi-select/multi-select.d.ts.map +1 -1
- package/es/components/multi-select/multi-select.js +17 -17
- 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.d.ts +21 -0
- package/es/components/notification/actionable-notification-button.d.ts.map +1 -0
- package/es/components/notification/actionable-notification-button.js +56 -0
- package/es/components/notification/actionable-notification-button.js.map +1 -0
- package/es/components/notification/actionable-notification.css.js +12 -0
- package/es/components/notification/actionable-notification.d.ts +370 -0
- package/es/components/notification/actionable-notification.d.ts.map +1 -0
- package/es/components/notification/actionable-notification.js +281 -0
- package/es/components/notification/actionable-notification.js.map +1 -0
- package/es/components/notification/actionable-notification.rtl.css.js +12 -0
- package/es/components/notification/defs.d.ts +17 -1
- package/es/components/notification/defs.d.ts.map +1 -1
- package/es/components/notification/defs.js +3 -0
- package/es/components/notification/defs.js.map +1 -1
- package/es/components/notification/index.d.ts +2 -0
- package/es/components/notification/index.d.ts.map +1 -1
- package/es/components/notification/index.js +2 -0
- package/es/components/notification/index.js.map +1 -1
- package/es/components/notification/inline-notification.css.js +1 -1
- package/es/components/notification/inline-notification.d.ts +8 -8
- package/es/components/notification/inline-notification.d.ts.map +1 -1
- package/es/components/notification/inline-notification.js +23 -18
- 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 +4 -4
- package/es/components/notification/toast-notification.d.ts.map +1 -1
- package/es/components/notification/toast-notification.js +7 -7
- 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/index.d.ts +2 -1
- package/es/components/number-input/index.d.ts.map +1 -1
- package/es/components/number-input/index.js +2 -1
- package/es/components/number-input/index.js.map +1 -1
- package/es/components/number-input/number-input-skeleton.d.ts +2 -2
- package/es/components/number-input/number-input-skeleton.d.ts.map +1 -1
- package/es/components/number-input/number-input-skeleton.js +4 -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 +12 -25
- package/es/components/number-input/number-input.d.ts.map +1 -1
- package/es/components/number-input/number-input.js +85 -106
- 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/pagination/pagination.css.js +1 -1
- package/es/components/pagination/pagination.rtl.css.js +1 -1
- package/es/components/popover/defs.d.ts +63 -0
- package/es/components/popover/defs.d.ts.map +1 -0
- package/es/components/popover/defs.js +28 -0
- package/es/components/popover/defs.js.map +1 -0
- package/es/components/popover/index.d.ts +12 -0
- package/es/components/popover/index.d.ts.map +1 -0
- package/es/components/popover/index.js +12 -0
- package/es/components/popover/index.js.map +1 -0
- package/es/components/popover/popover-content.d.ts +45 -0
- package/es/components/popover/popover-content.d.ts.map +1 -0
- package/es/components/popover/popover-content.js +141 -0
- package/es/components/popover/popover-content.js.map +1 -0
- package/es/components/popover/popover.css.js +12 -0
- package/es/components/popover/popover.d.ts +54 -0
- package/es/components/popover/popover.d.ts.map +1 -0
- package/es/components/popover/popover.js +201 -0
- package/es/components/popover/popover.js.map +1 -0
- package/es/components/popover/popover.rtl.css.js +12 -0
- package/es/components/progress-indicator/progress-indicator.css.js +1 -1
- package/es/components/progress-indicator/progress-indicator.rtl.css.js +1 -1
- package/es/components/radio-button/radio-button-group.d.ts +16 -4
- package/es/components/radio-button/radio-button-group.d.ts.map +1 -1
- package/es/components/radio-button/radio-button-group.js +55 -8
- package/es/components/radio-button/radio-button-group.js.map +1 -1
- package/es/components/radio-button/radio-button.css.js +1 -1
- package/es/components/radio-button/radio-button.d.ts +12 -4
- package/es/components/radio-button/radio-button.d.ts.map +1 -1
- package/es/components/radio-button/radio-button.js +44 -12
- 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 +3 -3
- package/es/components/search/search-skeleton.d.ts.map +1 -1
- package/es/components/search/search-skeleton.js +6 -6
- 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 +361 -19
- package/es/components/search/search.d.ts.map +1 -1
- package/es/components/search/search.js +136 -29
- package/es/components/search/search.js.map +1 -1
- package/es/components/search/search.rtl.css.js +1 -1
- package/es/components/select/index.d.ts +2 -1
- package/es/components/select/index.d.ts.map +1 -1
- package/es/components/select/index.js +2 -1
- package/es/components/select/index.js.map +1 -1
- package/es/components/select/select-item-group.d.ts +2 -2
- package/es/components/select/select-item-group.d.ts.map +1 -1
- package/es/components/select/select-item-group.js +4 -4
- package/es/components/select/select-item-group.js.map +1 -1
- package/es/components/select/select-item.d.ts +2 -2
- package/es/components/select/select-item.d.ts.map +1 -1
- package/es/components/select/select-item.js +4 -4
- package/es/components/select/select-item.js.map +1 -1
- package/es/components/select/select-skeleton.d.ts +23 -0
- package/es/components/select/select-skeleton.d.ts.map +1 -0
- package/es/components/select/select-skeleton.js +72 -0
- package/es/components/select/select-skeleton.js.map +1 -0
- package/es/components/select/select.css.js +1 -1
- package/es/components/select/select.d.ts +29 -331
- package/es/components/select/select.d.ts.map +1 -1
- package/es/components/select/select.js +151 -74
- 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 +2 -2
- package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts.map +1 -1
- package/es/components/skeleton-placeholder/skeleton-placeholder.js +4 -4
- package/es/components/skeleton-placeholder/skeleton-placeholder.js.map +1 -1
- package/es/components/skeleton-text/defs.d.ts +2 -6
- package/es/components/skeleton-text/defs.d.ts.map +1 -1
- package/es/components/skeleton-text/defs.js +1 -2
- package/es/components/skeleton-text/defs.js.map +1 -1
- package/es/components/skeleton-text/skeleton-text.css.js +1 -1
- package/es/components/skeleton-text/skeleton-text.d.ts +2 -2
- package/es/components/skeleton-text/skeleton-text.d.ts.map +1 -1
- package/es/components/skeleton-text/skeleton-text.js +4 -4
- package/es/components/skeleton-text/skeleton-text.js.map +1 -1
- package/es/components/skeleton-text/skeleton-text.rtl.css.js +1 -1
- package/es/components/slider/slider-input.d.ts +11 -9
- package/es/components/slider/slider-input.d.ts.map +1 -1
- package/es/components/slider/slider-input.js +36 -18
- package/es/components/slider/slider-input.js.map +1 -1
- package/es/components/slider/slider-skeleton.d.ts +2 -2
- package/es/components/slider/slider-skeleton.d.ts.map +1 -1
- package/es/components/slider/slider-skeleton.js +4 -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 +38 -20
- package/es/components/slider/slider.d.ts.map +1 -1
- package/es/components/slider/slider.js +119 -54
- package/es/components/slider/slider.js.map +1 -1
- package/es/components/slider/slider.rtl.css.js +1 -1
- package/es/components/structured-list/structured-list.css.js +1 -1
- package/es/components/structured-list/structured-list.rtl.css.js +1 -1
- package/es/components/tabs/tabs.css.js +1 -1
- package/es/components/tabs/tabs.rtl.css.js +1 -1
- package/es/components/tag/defs.d.ts +3 -3
- package/es/components/tag/defs.d.ts.map +1 -1
- package/es/components/tag/defs.js +2 -2
- package/es/components/tag/defs.js.map +1 -1
- package/es/components/tag/index.d.ts +1 -2
- package/es/components/tag/index.d.ts.map +1 -1
- package/es/components/tag/index.js +1 -2
- package/es/components/tag/index.js.map +1 -1
- package/es/components/tag/tag.css.js +1 -1
- package/es/components/tag/tag.d.ts +660 -3
- package/es/components/tag/tag.d.ts.map +1 -1
- package/es/components/tag/tag.js +160 -13
- package/es/components/tag/tag.js.map +1 -1
- package/es/components/tag/tag.rtl.css.js +1 -1
- package/es/components/text-input/defs.d.ts +44 -0
- package/es/components/text-input/defs.d.ts.map +1 -0
- package/es/components/text-input/defs.js +36 -0
- package/es/components/text-input/defs.js.map +1 -0
- package/es/components/text-input/index.d.ts +12 -0
- package/es/components/text-input/index.d.ts.map +1 -0
- package/es/components/text-input/index.js +12 -0
- package/es/components/text-input/index.js.map +1 -0
- package/es/components/text-input/text-input-skeleton.d.ts +23 -0
- package/es/components/text-input/text-input-skeleton.d.ts.map +1 -0
- package/es/components/text-input/text-input-skeleton.js +72 -0
- package/es/components/text-input/text-input-skeleton.js.map +1 -0
- package/es/components/text-input/text-input.css.js +12 -0
- package/es/components/text-input/text-input.d.ts +786 -0
- package/es/components/text-input/text-input.d.ts.map +1 -0
- package/es/components/text-input/text-input.js +657 -0
- package/es/components/text-input/text-input.js.map +1 -0
- package/es/components/text-input/text-input.rtl.css.js +12 -0
- package/es/components/textarea/textarea-skeleton.d.ts +2 -2
- package/es/components/textarea/textarea-skeleton.d.ts.map +1 -1
- package/es/components/textarea/textarea-skeleton.js +4 -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 +6 -681
- package/es/components/textarea/textarea.d.ts.map +1 -1
- package/es/components/textarea/textarea.js +63 -197
- package/es/components/textarea/textarea.js.map +1 -1
- package/es/components/textarea/textarea.rtl.css.js +1 -1
- package/es/components/tile/expandable-tile.d.ts +5 -5
- package/es/components/tile/expandable-tile.d.ts.map +1 -1
- package/es/components/tile/expandable-tile.js +54 -36
- package/es/components/tile/expandable-tile.js.map +1 -1
- package/es/components/tile/radio-tile.d.ts +6 -338
- package/es/components/tile/radio-tile.d.ts.map +1 -1
- package/es/components/tile/radio-tile.js +36 -127
- package/es/components/tile/radio-tile.js.map +1 -1
- package/es/components/tile/selectable-tile.d.ts +322 -1
- package/es/components/tile/selectable-tile.d.ts.map +1 -1
- package/es/components/tile/selectable-tile.js +26 -10
- package/es/components/tile/selectable-tile.js.map +1 -1
- package/es/components/tile/tile-group.d.ts +380 -3
- package/es/components/tile/tile-group.d.ts.map +1 -1
- package/es/components/tile/tile-group.js +336 -19
- package/es/components/tile/tile-group.js.map +1 -1
- package/es/components/tile/tile.css.js +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 +13 -5
- package/es/components/toggle/toggle.d.ts.map +1 -1
- package/es/components/toggle/toggle.js +46 -15
- 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.d.ts +7 -3
- package/es/components/toggle-tip/toggletip.d.ts.map +1 -1
- package/es/components/toggle-tip/toggletip.js +14 -14
- 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/index.d.ts +1 -3
- package/es/components/tooltip/index.d.ts.map +1 -1
- package/es/components/tooltip/index.js +1 -3
- package/es/components/tooltip/index.js.map +1 -1
- package/es/components/tooltip/tooltip-content.d.ts +20 -0
- package/es/components/tooltip/tooltip-content.d.ts.map +1 -0
- package/es/components/tooltip/tooltip-content.js +62 -0
- package/es/components/tooltip/tooltip-content.js.map +1 -0
- package/es/components/tooltip/tooltip.css.js +1 -1
- package/es/components/tooltip/tooltip.d.ts +36 -26
- package/es/components/tooltip/tooltip.d.ts.map +1 -1
- package/es/components/tooltip/tooltip.js +114 -121
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/components/tooltip/tooltip.rtl.css.js +1 -1
- package/es/components-react/accordion/accordion-item-skeleton.d.ts +15 -0
- package/es/components-react/accordion/accordion-item-skeleton.js +21 -0
- package/es/components-react/accordion/accordion-item.d.ts +2 -2
- package/es/components-react/accordion/accordion-skeleton.d.ts +15 -0
- package/es/components-react/accordion/accordion-skeleton.js +21 -0
- package/es/components-react/accordion/accordion.d.ts +2 -2
- package/es/components-react/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/es/components-react/breadcrumb/breadcrumb-link.d.ts +2 -2
- package/es/components-react/breadcrumb/breadcrumb-overflow-menu.d.ts +2 -2
- package/es/components-react/breadcrumb/breadcrumb-skeleton.d.ts +15 -0
- package/es/components-react/breadcrumb/breadcrumb-skeleton.js +21 -0
- package/es/components-react/breadcrumb/breadcrumb.d.ts +2 -2
- package/es/components-react/{tooltip/tooltip-footer.d.ts → button/button-set.d.ts} +2 -2
- package/es/components-react/{tooltip/tooltip-footer.js → button/button-set.js} +2 -2
- package/es/components-react/button/button-skeleton.d.ts +2 -2
- package/es/components-react/button/button-skeleton.js +1 -1
- package/es/components-react/button/button.d.ts +2 -2
- package/es/components-react/button/button.js +8 -2
- package/es/components-react/checkbox/checkbox-skeleton.d.ts +15 -0
- package/es/components-react/checkbox/checkbox-skeleton.js +21 -0
- package/es/components-react/checkbox/checkbox.d.ts +2 -2
- package/es/components-react/combo-box/combo-box-item.d.ts +2 -2
- package/es/components-react/combo-box/combo-box.d.ts +2 -2
- package/es/components-react/combo-box/combo-box.js +1 -5
- package/es/components-react/copy/copy.d.ts +14 -0
- package/es/components-react/copy/copy.js +23 -0
- package/es/components-react/copy-button/copy-button.d.ts +2 -2
- package/es/components-react/date-picker/date-picker-input-skeleton.d.ts +2 -2
- package/es/components-react/date-picker/date-picker-input.d.ts +2 -2
- package/es/components-react/date-picker/date-picker-input.js +0 -1
- package/es/components-react/date-picker/date-picker.d.ts +2 -2
- package/es/components-react/dropdown/dropdown-item.d.ts +2 -2
- package/es/components-react/dropdown/dropdown-skeleton.d.ts +2 -2
- package/es/components-react/dropdown/dropdown.d.ts +2 -2
- package/es/components-react/dropdown/dropdown.js +1 -1
- package/es/components-react/icon-button/defs.js +9 -0
- package/es/components-react/{tooltip/tooltip-body.d.ts → icon-button/icon-button.d.ts} +3 -3
- package/es/components-react/icon-button/icon-button.js +24 -0
- package/es/components-react/{slider/defs.js → icon-button/index.js} +0 -1
- package/es/components-react/inline-loading/inline-loading.d.ts +2 -2
- package/es/components-react/input/input.d.ts +2 -2
- package/es/components-react/layer/index.d.ts +14 -0
- package/es/components-react/layer/index.js +8 -0
- package/es/components-react/layer/layer.d.ts +19 -0
- package/es/components-react/{tag/filter-tag.js → layer/layer.js} +5 -10
- package/es/components-react/link/link.d.ts +2 -2
- package/es/components-react/list/ordered-list.d.ts +2 -2
- package/es/components-react/list/unordered-list.d.ts +2 -2
- package/es/components-react/loading/loading.d.ts +2 -2
- package/es/components-react/modal/modal-footer-button.d.ts +2 -2
- package/es/components-react/multi-select/multi-select-item.d.ts +2 -2
- package/es/components-react/multi-select/multi-select.d.ts +2 -2
- package/es/components-react/multi-select/multi-select.js +1 -5
- package/es/components-react/notification/actionable-notification-button.d.ts +15 -0
- package/es/components-react/notification/actionable-notification-button.js +23 -0
- package/es/components-react/notification/actionable-notification.d.ts +14 -0
- package/es/components-react/notification/actionable-notification.js +23 -0
- package/es/components-react/notification/inline-notification.d.ts +2 -2
- package/es/components-react/notification/toast-notification.d.ts +2 -2
- package/es/components-react/number-input/number-input-skeleton.d.ts +2 -2
- package/es/components-react/number-input/number-input.d.ts +3 -3
- package/es/components-react/number-input/number-input.js +3 -6
- package/es/components-react/popover/defs.d.ts +14 -0
- package/es/components-react/{tooltip → popover}/defs.js +1 -1
- package/es/components-react/popover/index.d.ts +14 -0
- package/es/components-react/popover/index.js +8 -0
- package/es/components-react/popover/popover-content.d.ts +15 -0
- package/es/components-react/popover/popover-content.js +21 -0
- package/es/components-react/popover/popover.d.ts +15 -0
- package/es/components-react/popover/popover.js +21 -0
- package/es/components-react/radio-button/radio-button-group.d.ts +2 -2
- package/es/components-react/radio-button/radio-button.d.ts +2 -2
- package/es/components-react/search/search-skeleton.d.ts +2 -2
- package/es/components-react/search/search.d.ts +2 -2
- package/es/components-react/search/search.js +0 -1
- package/es/components-react/select/select-item-group.d.ts +2 -2
- package/es/components-react/select/select-item.d.ts +2 -2
- package/es/components-react/select/select-skeleton.d.ts +15 -0
- package/es/components-react/select/select-skeleton.js +21 -0
- package/es/components-react/select/select.d.ts +2 -2
- package/es/components-react/select/select.js +0 -1
- package/es/components-react/skeleton-placeholder/skeleton-placeholder.d.ts +2 -2
- package/es/components-react/skeleton-text/skeleton-text.d.ts +2 -2
- package/es/components-react/slider/slider-input.d.ts +2 -2
- package/es/components-react/slider/slider-input.js +0 -1
- package/es/components-react/slider/slider-skeleton.d.ts +2 -2
- package/es/components-react/slider/slider.d.ts +2 -2
- package/es/components-react/tag/tag.d.ts +11 -2
- package/es/components-react/tag/tag.js +12 -2
- package/es/components-react/text-input/defs.d.ts +14 -0
- package/es/components-react/text-input/defs.js +9 -0
- package/es/components-react/text-input/index.d.ts +14 -0
- package/es/components-react/text-input/index.js +8 -0
- package/es/components-react/text-input/text-input-skeleton.d.ts +15 -0
- package/es/components-react/text-input/text-input-skeleton.js +21 -0
- package/es/components-react/text-input/text-input.d.ts +15 -0
- package/es/components-react/text-input/text-input.js +22 -0
- package/es/components-react/textarea/textarea-skeleton.d.ts +2 -2
- package/es/components-react/textarea/textarea.d.ts +4 -5
- package/es/components-react/textarea/textarea.js +4 -3
- package/es/components-react/tile/radio-tile.d.ts +8 -3
- package/es/components-react/tile/radio-tile.js +8 -2
- package/es/components-react/tile/tile-group.d.ts +10 -2
- package/es/components-react/tile/tile-group.js +12 -2
- package/es/components-react/toggle/toggle.d.ts +2 -2
- package/es/components-react/tooltip/tooltip-content.d.ts +14 -0
- package/es/components-react/tooltip/{tooltip-body.js → tooltip-content.js} +4 -4
- package/es/components-react/tooltip/tooltip.d.ts +4 -5
- package/es/components-react/tooltip/tooltip.js +4 -2
- package/es/globals/internal/radio-group-manager.d.ts +3 -2
- package/es/globals/internal/radio-group-manager.d.ts.map +1 -1
- package/es/globals/internal/radio-group-manager.js +5 -4
- package/es/globals/internal/radio-group-manager.js.map +1 -1
- package/es/globals/settings.d.ts.map +1 -1
- package/es/globals/settings.js +1 -1
- package/es/globals/settings.js.map +1 -1
- package/es/globals/wrappers/createReactCustomElementType.d.ts +3 -3
- package/es/globals/wrappers/createReactCustomElementType.d.ts.map +1 -1
- package/es/globals/wrappers/createReactCustomElementType.js +3 -3
- package/es/globals/wrappers/createReactCustomElementType.js.map +1 -1
- package/es/icons/add/16.js +1 -1
- package/es/icons/arrows/16.js +1 -1
- package/es/icons/arrows--vertical/16.js +1 -1
- package/es/icons/caret--down/16.js +1 -1
- package/es/icons/caret--up/16.js +1 -1
- package/es/icons/information/16.js +1 -1
- package/es/icons/information--filled/20.js +1 -1
- package/es/icons/information--square--filled/20.js +1 -1
- package/es/icons/subtract/16.js +1 -1
- package/es/icons/warning--alt--filled/16.js +1 -1
- package/es/icons/warning--alt--filled/20.js +1 -1
- package/es/index.d.ts +110 -109
- package/es/index.d.ts.map +1 -1
- package/es/index.js +110 -109
- package/es/index.js.map +1 -1
- package/lib/components/button/defs.js +36 -13
- package/lib/components/button/defs.js.map +1 -1
- package/lib/components/date-picker/defs.js +2 -11
- package/lib/components/date-picker/defs.js.map +1 -1
- package/lib/components/dropdown/defs.js +12 -3
- package/lib/components/dropdown/defs.js.map +1 -1
- package/lib/components/icon-button/defs.js +40 -0
- package/lib/components/icon-button/defs.js.map +1 -0
- package/lib/components/input/defs.js +1 -1
- package/lib/components/input/defs.js.map +1 -1
- package/lib/components/notification/defs.js +3 -0
- package/lib/components/notification/defs.js.map +1 -1
- package/lib/components/popover/defs.js +34 -0
- package/lib/components/popover/defs.js.map +1 -0
- package/lib/components/skeleton-text/defs.js +1 -2
- package/lib/components/skeleton-text/defs.js.map +1 -1
- package/lib/components/tag/defs.js +2 -2
- package/lib/components/tag/defs.js.map +1 -1
- package/lib/components/text-input/defs.js +47 -0
- package/lib/components/text-input/defs.js.map +1 -0
- package/lib/components-react-node/{tooltip/tooltip-body.js → accordion/accordion-item-skeleton.js} +3 -4
- package/lib/components-react-node/accordion/accordion-skeleton.js +36 -0
- package/lib/components-react-node/breadcrumb/breadcrumb-skeleton.js +36 -0
- package/lib/components-react-node/{tooltip/tooltip-footer.js → button/button-set.js} +1 -1
- package/lib/components-react-node/button/button-skeleton.js +1 -1
- package/lib/components-react-node/button/button.js +19 -7
- package/lib/components-react-node/checkbox/checkbox-skeleton.js +36 -0
- package/lib/components-react-node/combo-box/combo-box.js +2 -8
- package/lib/components-react-node/copy/copy.js +37 -0
- package/lib/components-react-node/date-picker/date-picker-input.js +0 -6
- package/lib/components-react-node/dropdown/dropdown.js +2 -2
- package/lib/components-react-node/icon-button/defs.js +24 -0
- package/lib/components-react-node/icon-button/icon-button.js +50 -0
- package/lib/components-react-node/icon-button/index.js +9 -0
- package/lib/components-react-node/layer/index.js +9 -0
- package/lib/components-react-node/layer/layer.js +42 -0
- package/lib/components-react-node/multi-select/multi-select.js +0 -6
- package/lib/components-react-node/notification/actionable-notification-button.js +37 -0
- package/lib/components-react-node/notification/actionable-notification.js +37 -0
- package/lib/components-react-node/number-input/number-input.js +3 -9
- package/lib/components-react-node/{slider → popover}/defs.js +1 -1
- package/lib/components-react-node/popover/index.js +9 -0
- package/lib/components-react-node/popover/popover-content.js +36 -0
- package/lib/components-react-node/popover/popover.js +36 -0
- package/lib/components-react-node/search/search.js +0 -7
- package/lib/components-react-node/select/select-skeleton.js +36 -0
- package/lib/components-react-node/select/select.js +0 -7
- package/lib/components-react-node/slider/slider-input.js +0 -7
- package/lib/components-react-node/tag/tag.js +12 -2
- package/lib/components-react-node/{tooltip → text-input}/defs.js +1 -1
- package/lib/components-react-node/text-input/index.js +9 -0
- package/lib/components-react-node/text-input/text-input-skeleton.js +36 -0
- package/lib/components-react-node/{tag/filter-tag.js → text-input/text-input.js} +13 -17
- package/lib/components-react-node/textarea/textarea.js +3 -9
- package/lib/components-react-node/tile/radio-tile.js +8 -2
- package/lib/components-react-node/tile/tile-group.js +12 -2
- package/lib/components-react-node/tooltip/tooltip-content.js +37 -0
- package/lib/components-react-node/tooltip/tooltip.js +3 -2
- package/lib/globals/settings.js +1 -1
- package/lib/globals/settings.js.map +1 -1
- package/lib/globals/wrappers/createReactCustomElementType.js +3 -3
- package/lib/globals/wrappers/createReactCustomElementType.js.map +1 -1
- package/package.json +10 -11
- package/scss/components/accordion/accordion.scss +24 -10
- package/scss/components/breadcrumb/breadcrumb.scss +6 -3
- package/scss/components/button/button.scss +17 -35
- package/scss/components/checkbox/checkbox.scss +9 -1
- package/scss/components/combo-box/combo-box.scss +51 -43
- package/scss/components/copy-button/copy-button.scss +20 -0
- package/scss/components/date-picker/date-picker.scss +28 -14
- package/scss/components/dropdown/dropdown.scss +87 -34
- package/scss/components/icon-button/icon-button.scss +14 -0
- package/scss/components/layer/layer.scss +23 -0
- package/scss/components/list/list.scss +0 -5
- package/scss/components/loading/loading.scss +1 -0
- package/scss/components/modal/modal.scss +2 -2
- package/scss/components/notification/actionable-notification.scss +170 -0
- package/scss/components/notification/inline-notification.scss +26 -0
- package/scss/components/notification/toast-notification.scss +26 -0
- package/scss/components/number-input/number-input.scss +13 -0
- package/scss/components/popover/popover.scss +122 -0
- package/scss/components/radio-button/radio-button.scss +6 -6
- package/scss/components/search/search.scss +54 -21
- package/scss/components/select/select.scss +20 -4
- package/scss/components/skeleton-text/skeleton-text.scss +4 -0
- package/scss/components/slider/slider.scss +9 -1
- package/scss/components/tag/tag.scss +69 -72
- package/scss/components/text-input/text-input.scss +38 -0
- package/scss/components/textarea/textarea.scss +7 -0
- package/scss/components/tile/tile.scss +42 -16
- package/scss/components/toggle/toggle.scss +4 -0
- package/scss/components/tooltip/tooltip.scss +5 -135
- package/CHANGELOG.md +0 -87
- package/es/components/slider/defs.d.ts +0 -11
- package/es/components/slider/defs.d.ts.map +0 -1
- package/es/components/slider/defs.js +0 -11
- package/es/components/slider/defs.js.map +0 -1
- package/es/components/tag/filter-tag.d.ts +0 -680
- package/es/components/tag/filter-tag.d.ts.map +0 -1
- package/es/components/tag/filter-tag.js +0 -194
- package/es/components/tag/filter-tag.js.map +0 -1
- package/es/components/tooltip/defs.d.ts +0 -84
- package/es/components/tooltip/defs.d.ts.map +0 -1
- package/es/components/tooltip/defs.js +0 -39
- package/es/components/tooltip/defs.js.map +0 -1
- package/es/components/tooltip/tooltip-body.d.ts +0 -40
- package/es/components/tooltip/tooltip-body.d.ts.map +0 -1
- package/es/components/tooltip/tooltip-body.js +0 -179
- package/es/components/tooltip/tooltip-body.js.map +0 -1
- package/es/components/tooltip/tooltip-footer.d.ts.map +0 -1
- package/es/components/tooltip/tooltip-footer.js.map +0 -1
- package/es/components-react/tag/filter-tag.d.ts +0 -24
- package/lib/components/slider/defs.js +0 -21
- package/lib/components/slider/defs.js.map +0 -1
- package/lib/components/tooltip/defs.js +0 -45
- package/lib/components/tooltip/defs.js.map +0 -1
- /package/es/components-react/{slider → icon-button}/defs.d.ts +0 -0
- /package/es/components-react/{tooltip/defs.d.ts → icon-button/index.d.ts} +0 -0
|
@@ -11,8 +11,18 @@ import createReactCustomElementType from '../../globals/wrappers/createReactCust
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
13
13
|
var prefix = settings.prefix;
|
|
14
|
-
export var descriptor = {
|
|
15
|
-
|
|
14
|
+
export var descriptor = {
|
|
15
|
+
onCurrentRadioTileSelection: {
|
|
16
|
+
event: ''.concat(prefix, '-current-radio-tile-selection'),
|
|
17
|
+
},
|
|
18
|
+
onCurrentSelectableTilesSelection: {
|
|
19
|
+
event: ''.concat(prefix, '-current-selectable-tile-selections'),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export var propTypes = {
|
|
23
|
+
onCurrentRadioTileSelection: PropTypes.func,
|
|
24
|
+
onCurrentSelectableTilesSelection: PropTypes.func,
|
|
25
|
+
};
|
|
16
26
|
const Component = createReactCustomElementType(
|
|
17
27
|
''.concat(prefix, '-tile-group'),
|
|
18
28
|
descriptor
|
|
@@ -15,5 +15,5 @@ export interface ComponentProps extends ParentComponentProps {
|
|
|
15
15
|
onChange?: (event: CustomEvent) => void;
|
|
16
16
|
}
|
|
17
17
|
/*[object Object]*/
|
|
18
|
-
declare class
|
|
19
|
-
export default
|
|
18
|
+
declare class CDSToggle extends Component<ComponentProps> {}
|
|
19
|
+
export default CDSToggle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2019, 2020
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { Component } from 'react';
|
|
10
|
+
import { ComponentProps as ParentComponentProps } from '../popover/popover-content';
|
|
11
|
+
export interface ComponentProps extends ParentComponentProps {}
|
|
12
|
+
/*[object Object]*/
|
|
13
|
+
declare class CDSTooltipContent extends Component<ComponentProps> {}
|
|
14
|
+
export default CDSTooltipContent;
|
|
@@ -6,9 +6,9 @@
|
|
|
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
|
-
import { descriptor as parentDescriptor } from '../
|
|
10
|
-
import { propTypes as parentPropTypes } from '../
|
|
11
|
-
export { default as CustomElement } from '../../components/tooltip/tooltip-
|
|
9
|
+
import { descriptor as parentDescriptor } from '../popover/popover-content.js';
|
|
10
|
+
import { propTypes as parentPropTypes } from '../popover/popover-content.js';
|
|
11
|
+
export { default as CustomElement } from '../../components/tooltip/tooltip-content.js';
|
|
12
12
|
import createReactCustomElementType from '../../globals/wrappers/createReactCustomElementType.js';
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
@@ -16,7 +16,7 @@ var prefix = settings.prefix;
|
|
|
16
16
|
export var descriptor = Object.assign({}, parentDescriptor, {});
|
|
17
17
|
export var propTypes = Object.assign({}, parentPropTypes, {});
|
|
18
18
|
const Component = createReactCustomElementType(
|
|
19
|
-
''.concat(prefix, '-tooltip-
|
|
19
|
+
''.concat(prefix, '-tooltip-content'),
|
|
20
20
|
descriptor
|
|
21
21
|
);
|
|
22
22
|
Component.propTypes = propTypes;
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { Component } from 'react';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
10
|
+
import { ComponentProps as ParentComponentProps } from '../popover/popover';
|
|
11
|
+
export interface ComponentProps extends ParentComponentProps {}
|
|
13
12
|
/*[object Object]*/
|
|
14
|
-
declare class
|
|
15
|
-
export default
|
|
13
|
+
declare class CDSTooltip extends Component<ComponentProps> {}
|
|
14
|
+
export default CDSTooltip;
|
|
@@ -6,13 +6,15 @@
|
|
|
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
|
+
import { descriptor as parentDescriptor } from '../popover/popover.js';
|
|
10
|
+
import { propTypes as parentPropTypes } from '../popover/popover.js';
|
|
9
11
|
export { default as CustomElement } from '../../components/tooltip/tooltip.js';
|
|
10
12
|
import createReactCustomElementType from '../../globals/wrappers/createReactCustomElementType.js';
|
|
11
13
|
import PropTypes from 'prop-types';
|
|
12
14
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
13
15
|
var prefix = settings.prefix;
|
|
14
|
-
export var descriptor = {};
|
|
15
|
-
export var propTypes = {};
|
|
16
|
+
export var descriptor = Object.assign({}, parentDescriptor, {});
|
|
17
|
+
export var propTypes = Object.assign({}, parentPropTypes, {});
|
|
16
18
|
const Component = createReactCustomElementType(
|
|
17
19
|
''.concat(prefix, '-tooltip'),
|
|
18
20
|
descriptor
|
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
@@ -87,8 +87,9 @@ declare class RadioGroupManager {
|
|
|
87
87
|
* Selects or focuses on a radio button.
|
|
88
88
|
*
|
|
89
89
|
* @param radio The radio button to select.
|
|
90
|
+
* @param readOnly optional if radio button has readOnly.
|
|
90
91
|
*/
|
|
91
|
-
select(radio: ManagedRadioButton): void;
|
|
92
|
+
select(radio: ManagedRadioButton, readOnly?: boolean): void;
|
|
92
93
|
/**
|
|
93
94
|
* @param radio The currently selected radio button.
|
|
94
95
|
* @param direction The direction to navigate to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["globals/internal/radio-group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C;IAEnE;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf;AAED,aAAK,kBAAkB,GAAG,gBAAgB,GAAG,0BAA0B,CAAC;AAExE;;;GAGG;AACH,cAAM,iBAAiB;IACrB;;OAEG;IACH,OAAO,CAAC,OAAO,CAAmD;IAElE,OAAO;IAOP;;;;;;OAMG;IACH,iBAAiB,CAAC,KAAK,EAAE,kBAAkB;IAgB3C;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,kBAAkB;IA2BxC;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,kBAAkB;IAY7B;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,GAAE,MAAmB;IAK3D;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,OAAO;IAgBpD;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,oBAAoB;IAWnE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU,CAAiB;IAE1C;;;OAGG;IACH,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ;CAI9B;AAED,eAAe,iBAAiB,CAAC","file":"radio-group-manager.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/**\n * The navigation direction.\n */\nexport enum NAVIGATION_DIRECTION {\n /**\n * Navigating backward.\n */\n BACKWARD = -1,\n\n /**\n * Navigating forward.\n */\n FORWARD = 1,\n}\n\nexport interface ManagedRadioButtonDelegate {\n /**\n * `true` if this radio button is selected.\n */\n checked: boolean;\n\n /**\n * The tab index.\n */\n tabIndex: number;\n\n /**\n * The name of the radio group.\n */\n name: string;\n\n /**\n * @param other A node to compare this radio button's DOM position in document with.\n * @returns\n * An integer value, the same format as `Node.compareDocumentPosition` does,\n * whose bits represent the calling this radio button's relationship to the given node within the document.\n */\n compareDocumentPosition(other: ManagedRadioButtonDelegate): number;\n\n /**\n * Focuses on the radio button.\n */\n focus(): void;\n}\n\ntype ManagedRadioButton = HTMLInputElement | ManagedRadioButtonDelegate;\n\n/**\n * An object that manages radio groups in a document.\n * There must be only one instance for one document.\n */\nclass RadioGroupManager {\n /**\n * Radio groups, keyed by their names.\n */\n private _groups: { [name: string]: Set<ManagedRadioButton> } = {};\n\n private constructor(document: Document) {\n (this.constructor as typeof RadioGroupManager)._instances.set(\n document,\n this\n );\n }\n\n /**\n * @param radio A radio button.\n * @returns\n * `true` if the given radio button should be focusable, which is either:\n * - The radio button is selected\n * - No radio button is selected and the radio button is first one in the radio group\n */\n shouldBeFocusable(radio: ManagedRadioButton) {\n if (radio.checked) {\n return true;\n }\n const { name } = radio;\n const group = this._groups[name];\n const hasSelectedItemInGroup =\n group && Array.from(group).some((item) => item.checked);\n if (hasSelectedItemInGroup) {\n return false;\n }\n const isFirstInGroup =\n !group || group.size === 1 || this.getSortedGroup(radio)[0] === radio;\n return isFirstInGroup;\n }\n\n /**\n * @param radio A radio button.\n * @returns The sorted radio group the given radio button is in.\n */\n getSortedGroup(radio: ManagedRadioButton) {\n const group = this._groups[radio.name];\n return (\n group &&\n Array.from(group).sort((lhs, rhs) => {\n const comparisonResult = (\n lhs as ManagedRadioButtonDelegate\n ).compareDocumentPosition(rhs as ManagedRadioButtonDelegate);\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_FOLLOWING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return -1;\n }\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_PRECEDING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINS\n ) {\n return 1;\n }\n return 0;\n })\n );\n }\n\n /**\n * Manages a radio button.\n *\n * @param radio The radio button to manage.\n * @returns This object.\n */\n add(radio: ManagedRadioButton) {\n const { name } = radio;\n if (name) {\n const groups = this._groups;\n if (!groups[name]) {\n groups[name] = new Set<ManagedRadioButton>();\n }\n groups[name].add(radio);\n }\n return this;\n }\n\n /**\n * Unmanages a radio button.\n *\n * @param radio The radio button to unmanage.\n * @param name The old name of the radio button to unmanage.\n * @returns `true` if `element` was actually managed.\n */\n delete(radio: ManagedRadioButton, name: string = radio.name) {\n const group = this._groups[name];\n return !group ? false : group.delete(radio);\n }\n\n /**\n * Selects or focuses on a radio button.\n *\n * @param radio The radio button to select.\n * @param readOnly optional if radio button has readOnly.\n */\n select(radio: ManagedRadioButton, readOnly?: boolean) {\n const group = this._groups[radio.name];\n if (group) {\n // Updates the state of the one being selected up-front to avoid the state of no radio button is selected\n radio.checked = !readOnly || true;\n radio.tabIndex = 0;\n radio.focus();\n group.forEach((item) => {\n if (radio !== item) {\n item.checked = readOnly || false;\n item.tabIndex = -1;\n }\n });\n }\n }\n\n /**\n * @param radio The currently selected radio button.\n * @param direction The direction to navigate to.\n * @returns The radio button that should be selected next.\n */\n navigate(radio: ManagedRadioButton, direction: NAVIGATION_DIRECTION) {\n const sortedGroup = this.getSortedGroup(radio);\n let newIndex = sortedGroup.indexOf(radio) + direction;\n if (newIndex < 0) {\n newIndex = sortedGroup.length - 1;\n } else if (newIndex >= sortedGroup.length) {\n newIndex = 0;\n }\n return sortedGroup[newIndex];\n }\n\n /**\n * `RadioGroupManager` instances associated with documents.\n */\n private static _instances = new WeakMap();\n\n /**\n * @param document A document element.\n * @returns The `RadioGroupManager` instance associated with the given document.\n */\n static get(document: Document) {\n const found = this._instances.get(document);\n return found || new RadioGroupManager(document);\n }\n}\n\nexport default RadioGroupManager;\n"]}
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
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.
|
|
@@ -109,17 +109,18 @@ class RadioGroupManager {
|
|
|
109
109
|
* Selects or focuses on a radio button.
|
|
110
110
|
*
|
|
111
111
|
* @param radio The radio button to select.
|
|
112
|
+
* @param readOnly optional if radio button has readOnly.
|
|
112
113
|
*/
|
|
113
|
-
select(radio) {
|
|
114
|
+
select(radio, readOnly) {
|
|
114
115
|
const group = this._groups[radio.name];
|
|
115
116
|
if (group) {
|
|
116
117
|
// Updates the state of the one being selected up-front to avoid the state of no radio button is selected
|
|
117
|
-
radio.checked = true;
|
|
118
|
+
radio.checked = !readOnly || true;
|
|
118
119
|
radio.tabIndex = 0;
|
|
119
120
|
radio.focus();
|
|
120
121
|
group.forEach(item => {
|
|
121
122
|
if (radio !== item) {
|
|
122
|
-
item.checked = false;
|
|
123
|
+
item.checked = readOnly || false;
|
|
123
124
|
item.tabIndex = -1;
|
|
124
125
|
}
|
|
125
126
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-manager.js","names":["NAVIGATION_DIRECTION","RadioGroupManager","constructor","document","_defineProperty","_instances","set","shouldBeFocusable","radio","checked","name","group","_groups","hasSelectedItemInGroup","Array","from","some","item","isFirstInGroup","size","getSortedGroup","sort","lhs","rhs","comparisonResult","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","add","groups","Set","delete","select","tabIndex","focus","forEach","navigate","direction","sortedGroup","newIndex","indexOf","length","get","found","WeakMap"],"sources":["globals/internal/radio-group-manager.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019,
|
|
1
|
+
{"version":3,"file":"radio-group-manager.js","names":["NAVIGATION_DIRECTION","RadioGroupManager","constructor","document","_defineProperty","_instances","set","shouldBeFocusable","radio","checked","name","group","_groups","hasSelectedItemInGroup","Array","from","some","item","isFirstInGroup","size","getSortedGroup","sort","lhs","rhs","comparisonResult","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","add","groups","Set","delete","select","readOnly","tabIndex","focus","forEach","navigate","direction","sortedGroup","newIndex","indexOf","length","get","found","WeakMap"],"sources":["globals/internal/radio-group-manager.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/**\n * The navigation direction.\n */\nexport enum NAVIGATION_DIRECTION {\n /**\n * Navigating backward.\n */\n BACKWARD = -1,\n\n /**\n * Navigating forward.\n */\n FORWARD = 1,\n}\n\nexport interface ManagedRadioButtonDelegate {\n /**\n * `true` if this radio button is selected.\n */\n checked: boolean;\n\n /**\n * The tab index.\n */\n tabIndex: number;\n\n /**\n * The name of the radio group.\n */\n name: string;\n\n /**\n * @param other A node to compare this radio button's DOM position in document with.\n * @returns\n * An integer value, the same format as `Node.compareDocumentPosition` does,\n * whose bits represent the calling this radio button's relationship to the given node within the document.\n */\n compareDocumentPosition(other: ManagedRadioButtonDelegate): number;\n\n /**\n * Focuses on the radio button.\n */\n focus(): void;\n}\n\ntype ManagedRadioButton = HTMLInputElement | ManagedRadioButtonDelegate;\n\n/**\n * An object that manages radio groups in a document.\n * There must be only one instance for one document.\n */\nclass RadioGroupManager {\n /**\n * Radio groups, keyed by their names.\n */\n private _groups: { [name: string]: Set<ManagedRadioButton> } = {};\n\n private constructor(document: Document) {\n (this.constructor as typeof RadioGroupManager)._instances.set(\n document,\n this\n );\n }\n\n /**\n * @param radio A radio button.\n * @returns\n * `true` if the given radio button should be focusable, which is either:\n * - The radio button is selected\n * - No radio button is selected and the radio button is first one in the radio group\n */\n shouldBeFocusable(radio: ManagedRadioButton) {\n if (radio.checked) {\n return true;\n }\n const { name } = radio;\n const group = this._groups[name];\n const hasSelectedItemInGroup =\n group && Array.from(group).some((item) => item.checked);\n if (hasSelectedItemInGroup) {\n return false;\n }\n const isFirstInGroup =\n !group || group.size === 1 || this.getSortedGroup(radio)[0] === radio;\n return isFirstInGroup;\n }\n\n /**\n * @param radio A radio button.\n * @returns The sorted radio group the given radio button is in.\n */\n getSortedGroup(radio: ManagedRadioButton) {\n const group = this._groups[radio.name];\n return (\n group &&\n Array.from(group).sort((lhs, rhs) => {\n const comparisonResult = (\n lhs as ManagedRadioButtonDelegate\n ).compareDocumentPosition(rhs as ManagedRadioButtonDelegate);\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_FOLLOWING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return -1;\n }\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_PRECEDING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINS\n ) {\n return 1;\n }\n return 0;\n })\n );\n }\n\n /**\n * Manages a radio button.\n *\n * @param radio The radio button to manage.\n * @returns This object.\n */\n add(radio: ManagedRadioButton) {\n const { name } = radio;\n if (name) {\n const groups = this._groups;\n if (!groups[name]) {\n groups[name] = new Set<ManagedRadioButton>();\n }\n groups[name].add(radio);\n }\n return this;\n }\n\n /**\n * Unmanages a radio button.\n *\n * @param radio The radio button to unmanage.\n * @param name The old name of the radio button to unmanage.\n * @returns `true` if `element` was actually managed.\n */\n delete(radio: ManagedRadioButton, name: string = radio.name) {\n const group = this._groups[name];\n return !group ? false : group.delete(radio);\n }\n\n /**\n * Selects or focuses on a radio button.\n *\n * @param radio The radio button to select.\n * @param readOnly optional if radio button has readOnly.\n */\n select(radio: ManagedRadioButton, readOnly?: boolean) {\n const group = this._groups[radio.name];\n if (group) {\n // Updates the state of the one being selected up-front to avoid the state of no radio button is selected\n radio.checked = !readOnly || true;\n radio.tabIndex = 0;\n radio.focus();\n group.forEach((item) => {\n if (radio !== item) {\n item.checked = readOnly || false;\n item.tabIndex = -1;\n }\n });\n }\n }\n\n /**\n * @param radio The currently selected radio button.\n * @param direction The direction to navigate to.\n * @returns The radio button that should be selected next.\n */\n navigate(radio: ManagedRadioButton, direction: NAVIGATION_DIRECTION) {\n const sortedGroup = this.getSortedGroup(radio);\n let newIndex = sortedGroup.indexOf(radio) + direction;\n if (newIndex < 0) {\n newIndex = sortedGroup.length - 1;\n } else if (newIndex >= sortedGroup.length) {\n newIndex = 0;\n }\n return sortedGroup[newIndex];\n }\n\n /**\n * `RadioGroupManager` instances associated with documents.\n */\n private static _instances = new WeakMap();\n\n /**\n * @param document A document element.\n * @returns The `RadioGroupManager` instance associated with the given document.\n */\n static get(document: Document) {\n const found = this._instances.get(document);\n return found || new RadioGroupManager(document);\n }\n}\n\nexport default RadioGroupManager;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,oBAAoB;AAU/B,WAVWA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AA4ChC;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,CAAC;EACtB;AACF;AACA;;EAGUC,WAAWA,CAACC,QAAkB,EAAE;IAAAC,eAAA,kBAFuB,CAAC,CAAC;IAG9D,IAAI,CAACF,WAAW,CAA8BG,UAAU,CAACC,GAAG,CAC3DH,QAAQ,EACR,IAAI,CACL;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEI,iBAAiBA,CAACC,KAAyB,EAAE;IAC3C,IAAIA,KAAK,CAACC,OAAO,EAAE;MACjB,OAAO,IAAI;IACb;IACA,MAAM;MAAEC;IAAK,CAAC,GAAGF,KAAK;IACtB,MAAMG,KAAK,GAAG,IAAI,CAACC,OAAO,CAACF,IAAI,CAAC;IAChC,MAAMG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IACnC,CAAC,MAAM,IAAIF,QAAQ,IAAID,WAAW,CAACG,MAAM,EAAE;MACzCF,QAAQ,GAAG,CAAC;IACd;IACA,OAAOD,WAAW,CAACC,QAAQ,CAAC;EAC9B;;EAEA;AACF;AACA;;EAGE;AACF;AACA;AACA;EACE,OAAOG,GAAGA,CAAC3C,QAAkB,EAAE;IAC7B,MAAM4C,KAAK,GAAG,IAAI,CAAC1C,UAAU,CAACyC,GAAG,CAAC3C,QAAQ,CAAC;IAC3C,OAAO4C,KAAK,IAAI,IAAI9C,iBAAiB,CAACE,QAAQ,CAAC;EACjD;AACF;AAACC,eAAA,CApJKH,iBAAiB,gBA0IO,IAAI+C,OAAO,EAAE;AAY3C,eAAe/C,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["globals/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,QAAA,MAAM,MAAM,QAAQ,CAAC;AAErB;;;GAGG;AACH,QAAA,MAAM,gBAAgB,QAuDrB,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC","file":"settings.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\nconst prefix = 'cds';\n\n/**\n * A selector selecting tabbable nodes.\n * Borrowed from `carbon-angular`. tabbable === focusable.\n */\nconst selectorTabbable = `\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true],\n ${prefix}-accordion-item,\n ${prefix}-
|
|
1
|
+
{"version":3,"sources":["globals/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,QAAA,MAAM,MAAM,QAAQ,CAAC;AAErB;;;GAGG;AACH,QAAA,MAAM,gBAAgB,QAuDrB,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC","file":"settings.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\nconst prefix = 'cds';\n\n/**\n * A selector selecting tabbable nodes.\n * Borrowed from `carbon-angular`. tabbable === focusable.\n */\nconst selectorTabbable = `\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true],\n ${prefix}-accordion-item,\n ${prefix}-button,\n ${prefix}-breadcrumb-link,\n ${prefix}-checkbox,\n ${prefix}-code-snippet,\n ${prefix}-combo-box,\n ${prefix}-content-switcher-item,\n ${prefix}-copy-button,\n ${prefix}-table-header-row,\n ${prefix}-table-row,\n ${prefix}-table-toolbar-search,\n ${prefix}-date-picker-input,\n ${prefix}-dropdown,\n ${prefix}-input,\n ${prefix}-link,\n ${prefix}-number-input,\n ${prefix}-modal,\n ${prefix}-modal-close-button,\n ${prefix}-multi-select,\n ${prefix}-inline-notification,\n ${prefix}-toast-notification,\n ${prefix}-overflow-menu,\n ${prefix}-overflow-menu-item,\n ${prefix}-page-sizes-select,\n ${prefix}-pages-select,\n ${prefix}-progress-step,\n ${prefix}-radio-button,\n ${prefix}-search,\n ${prefix}-slider,\n ${prefix}-slider-input,\n ${prefix}-structured-list,\n ${prefix}-tab,\n ${prefix}-filter-tag,\n ${prefix}-textarea,\n ${prefix}-clickable-tile,\n ${prefix}-expandable-tile,\n ${prefix}-radio-tile,\n ${prefix}-selectable-tile,\n ${prefix}-toggle,\n ${prefix}-tooltip,\n ${prefix}-tooltip-definition,\n ${prefix}-tooltip-icon,\n ${prefix}-header-menu,\n ${prefix}-header-menu-button,\n ${prefix}-header-menu-item,\n ${prefix}-header-name,\n ${prefix}-header-nav-item,\n ${prefix}-side-nav-link,\n ${prefix}-side-nav-menu,\n ${prefix}-side-nav-menu-item\n`;\n\n// Because we're going to have a bunch of exports\nexport { prefix, selectorTabbable };\n"]}
|
package/es/globals/settings.js
CHANGED
|
@@ -19,7 +19,7 @@ const selectorTabbable = `
|
|
|
19
19
|
textarea:not([disabled]):not([tabindex='-1']),
|
|
20
20
|
iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true],
|
|
21
21
|
${prefix}-accordion-item,
|
|
22
|
-
${prefix}-
|
|
22
|
+
${prefix}-button,
|
|
23
23
|
${prefix}-breadcrumb-link,
|
|
24
24
|
${prefix}-checkbox,
|
|
25
25
|
${prefix}-code-snippet,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","names":["prefix","selectorTabbable"],"sources":["globals/settings.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\nconst prefix = 'cds';\n\n/**\n * A selector selecting tabbable nodes.\n * Borrowed from `carbon-angular`. tabbable === focusable.\n */\nconst selectorTabbable = `\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true],\n ${prefix}-accordion-item,\n ${prefix}-
|
|
1
|
+
{"version":3,"file":"settings.js","names":["prefix","selectorTabbable"],"sources":["globals/settings.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\nconst prefix = 'cds';\n\n/**\n * A selector selecting tabbable nodes.\n * Borrowed from `carbon-angular`. tabbable === focusable.\n */\nconst selectorTabbable = `\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true],\n ${prefix}-accordion-item,\n ${prefix}-button,\n ${prefix}-breadcrumb-link,\n ${prefix}-checkbox,\n ${prefix}-code-snippet,\n ${prefix}-combo-box,\n ${prefix}-content-switcher-item,\n ${prefix}-copy-button,\n ${prefix}-table-header-row,\n ${prefix}-table-row,\n ${prefix}-table-toolbar-search,\n ${prefix}-date-picker-input,\n ${prefix}-dropdown,\n ${prefix}-input,\n ${prefix}-link,\n ${prefix}-number-input,\n ${prefix}-modal,\n ${prefix}-modal-close-button,\n ${prefix}-multi-select,\n ${prefix}-inline-notification,\n ${prefix}-toast-notification,\n ${prefix}-overflow-menu,\n ${prefix}-overflow-menu-item,\n ${prefix}-page-sizes-select,\n ${prefix}-pages-select,\n ${prefix}-progress-step,\n ${prefix}-radio-button,\n ${prefix}-search,\n ${prefix}-slider,\n ${prefix}-slider-input,\n ${prefix}-structured-list,\n ${prefix}-tab,\n ${prefix}-filter-tag,\n ${prefix}-textarea,\n ${prefix}-clickable-tile,\n ${prefix}-expandable-tile,\n ${prefix}-radio-tile,\n ${prefix}-selectable-tile,\n ${prefix}-toggle,\n ${prefix}-tooltip,\n ${prefix}-tooltip-definition,\n ${prefix}-tooltip-icon,\n ${prefix}-header-menu,\n ${prefix}-header-menu-button,\n ${prefix}-header-menu-item,\n ${prefix}-header-name,\n ${prefix}-header-nav-item,\n ${prefix}-side-nav-link,\n ${prefix}-side-nav-menu,\n ${prefix}-side-nav-menu-item\n`;\n\n// Because we're going to have a bunch of exports\nexport { prefix, selectorTabbable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,MAAM,GAAG,KAAK;;AAEpB;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAI;AAC1B;AACA;AACA;AACA;AACA,IAAID,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,IAAIA,MAAO;AACX,CAAC;;AAED;AACA,SAASA,MAAM,EAAEC,gBAAgB"}
|
|
@@ -64,7 +64,7 @@ interface CustomElementTypeProps {
|
|
|
64
64
|
* import { render } from 'react-dom';
|
|
65
65
|
* import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';
|
|
66
66
|
*
|
|
67
|
-
* const
|
|
67
|
+
* const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {
|
|
68
68
|
* disabled: {
|
|
69
69
|
* // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise
|
|
70
70
|
* serialize: booleanSerializer,
|
|
@@ -81,14 +81,14 @@ interface CustomElementTypeProps {
|
|
|
81
81
|
*
|
|
82
82
|
* render(
|
|
83
83
|
* (
|
|
84
|
-
* <
|
|
84
|
+
* <CDSDropdown
|
|
85
85
|
* disabled={true}
|
|
86
86
|
* helperText="some-helper-text"
|
|
87
87
|
* onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>
|
|
88
88
|
* <cds-dropdown-item value="all">Option 1</cds-dropdown-item>
|
|
89
89
|
* <cds-dropdown-item value="cloudFoundry">Option 2</cds-dropdown-item>
|
|
90
90
|
* <cds-dropdown-item value="staging">Option 3</cds-dropdown-item>
|
|
91
|
-
* </
|
|
91
|
+
* </CDSDropdown>
|
|
92
92
|
* )
|
|
93
93
|
* document.body
|
|
94
94
|
* );
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["globals/wrappers/createReactCustomElementType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE;;GAEG;AACH,UAAU,4BAA4B;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,CAAC;CAC1C;AAED;;GAEG;AACH,UAAU,2BAA2B;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,4BAA4B,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED;;GAEG;AACH,UAAU,4BAA4B;IACpC,CAAC,QAAQ,EAAE,MAAM,GAAG,2BAA2B,CAAC;CACjD;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;OAEG;IACH,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;IAExB;;OAEG;IAEH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA4GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,QAAA,MAAM,4BAA4B,SAC1B,MAAM,cACA,4BAA4B,4GAiGzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gCAAuC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,qBACU,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,qBACkB,CAAC;AAEhD,eAAe,4BAA4B,CAAC","file":"createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const BXDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <BXDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </BXDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"]}
|
|
1
|
+
{"version":3,"sources":["globals/wrappers/createReactCustomElementType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE;;GAEG;AACH,UAAU,4BAA4B;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,CAAC;CAC1C;AAED;;GAEG;AACH,UAAU,2BAA2B;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,4BAA4B,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED;;GAEG;AACH,UAAU,4BAA4B;IACpC,CAAC,QAAQ,EAAE,MAAM,GAAG,2BAA2B,CAAC;CACjD;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;OAEG;IACH,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;IAExB;;OAEG;IAEH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA4GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,QAAA,MAAM,4BAA4B,SAC1B,MAAM,cACA,4BAA4B,4GAiGzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gCAAuC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,qBACU,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,qBACkB,CAAC;AAEhD,eAAe,4BAA4B,CAAC","file":"createReactCustomElementType.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 React, { Component, createElement, forwardRef } from 'react';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"]}
|
|
@@ -109,7 +109,7 @@ const attachEventListeners = (elem, descriptor, callback) => {
|
|
|
109
109
|
* import { render } from 'react-dom';
|
|
110
110
|
* import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';
|
|
111
111
|
*
|
|
112
|
-
* const
|
|
112
|
+
* const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {
|
|
113
113
|
* disabled: {
|
|
114
114
|
* // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise
|
|
115
115
|
* serialize: booleanSerializer,
|
|
@@ -126,14 +126,14 @@ const attachEventListeners = (elem, descriptor, callback) => {
|
|
|
126
126
|
*
|
|
127
127
|
* render(
|
|
128
128
|
* (
|
|
129
|
-
* <
|
|
129
|
+
* <CDSDropdown
|
|
130
130
|
* disabled={true}
|
|
131
131
|
* helperText="some-helper-text"
|
|
132
132
|
* onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>
|
|
133
133
|
* <cds-dropdown-item value="all">Option 1</cds-dropdown-item>
|
|
134
134
|
* <cds-dropdown-item value="cloudFoundry">Option 2</cds-dropdown-item>
|
|
135
135
|
* <cds-dropdown-item value="staging">Option 3</cds-dropdown-item>
|
|
136
|
-
* </
|
|
136
|
+
* </CDSDropdown>
|
|
137
137
|
* )
|
|
138
138
|
* document.body
|
|
139
139
|
* );
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReactCustomElementType.js","names":["Component","createElement","forwardRef","on","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","constructor","args","_defineProperty","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties","mergedRef","_handleElemRef","booleanSerializer","numberSerializer","String","objectSerializer","JSON","stringify"],"sources":["globals/wrappers/createReactCustomElementType.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport React, { Component, createElement, forwardRef } from 'react';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const BXDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <BXDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </BXDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAgBA,SAAS,EAAEC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AACnE,OAAOC,EAAE,MAAM,yCAAyC;AA6DxD;AACA;AACA;AACA;AACA,MAAMC,SAAS,GACbA,CAAI,GAAGC,IAAoB,KAC1BC,EAAE,IAAK;EACND,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB;IACA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,EAAE,CAAC;IACT,CAAC,MAAM,IAAIG,MAAM,CAACD,GAAG,CAAC,KAAKA,GAAG,EAAE;MAC9B;MACCA,GAAG,CAAoBE,OAAO,GAAGJ,EAAE;IACtC;EACF,CAAC,CAAC;AACJ,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA,MAAMK,WAAW,GAAGA,CAACC,IAAS,EAAEC,UAAuC,KAAK;EAC1E,IAAI,CAACA,UAAU,EAAE;IACf,OAAOD,IAAI;EACb;EACA,MAAM;IAAEE,KAAK;IAAEC;EAAU,CAAC,GAAGF,UAAU;EACvC,IAAIC,KAAK,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CAACD,WAAW,CAACC,SAAS,CAAC;IAC7B;IAEAK,MAAMA,CAAA,EAAG;MACP;MACA,MAAAC,WAAA,GAAyC,IAAI,CAACzC,KAAK;QAA7C;UAAE0C,QAAQ;UAAEC;QAAmB,CAAC,GAAAF,WAAA;QAAPzC,KAAK,GAAA4C,wBAAA,CAAAH,WAAA;MACpC,MAAMI,SAAS,GAAG3D,SAAS,CAAcyD,QAAQ,EAAE,IAAI,CAACG,cAAc,CAAC;MACvE,OAAO/D,aAAa,CAClBgC,IAAI,EAAAP,aAAA;QACFlB,GAAG,EAAEuD;MAAS,GAAK9C,YAAY,CAACC,KAAK,EAAEL,UAAU,CAAC,GACpD+C,QAAQ,CACT;IACH;EACF;EAEA,OAAO1D,UAAU,CAAsC,CAACgB,KAAK,EAAEV,GAAG,KAChEP,aAAa,CAACyC,iBAAiB,EAAAhB,aAAA,CAAAA,aAAA,KAAOR,KAAK;IAAE2C,QAAQ,EAAErD;EAAG,GAAG,CAC9D;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMyD,iBAAiB,GAAIV,KAAK,IAAM,CAACA,KAAK,GAAGvC,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMkD,gBAAgB,GAAIX,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGY,MAAM,CAACZ,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMa,gBAAgB,GAAIb,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGc,IAAI,CAACC,SAAS,CAACf,KAAK,CAAC;AAE/C,eAAehB,4BAA4B"}
|
|
1
|
+
{"version":3,"file":"createReactCustomElementType.js","names":["Component","createElement","forwardRef","on","mergeRefs","refs","el","forEach","ref","Object","current","convertProp","prop","descriptor","event","serialize","undefined","convertProps","props","keys","reduce","acc","propName","descriptorItem","converted","attribute","_objectSpread","attachEventListeners","elem","callback","handles","Set","eventDescriptor","name","options","add","release","handle","delete","createReactCustomElementType","nonAttributeProps","filter","CustomElementType","constructor","args","_defineProperty","listener","call","currentTarget","_elem","_eventListenersHandle","_handleEvent","updateProps","prevProps","prevValue","value","componentDidMount","componentDidUpdate","render","_this$props","children","innerRef","_objectWithoutProperties","mergedRef","_handleElemRef","booleanSerializer","numberSerializer","String","objectSerializer","JSON","stringify"],"sources":["globals/wrappers/createReactCustomElementType.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport React, { Component, createElement, forwardRef } from 'react';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../internal/handle';\n\n/**\n * A descriptor for a React event prop of a custom element.\n */\ninterface CustomElementEventDescriptor {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * A boolean to detemine usage of capture mode or the event options.\n */\n options?: boolean | EventListenerOptions;\n}\n\n/**\n * A descriptor for a React prop for an attribute of a custom element.\n */\ninterface CustomElementPropDescriptor {\n /**\n * The attribute name for the prop.\n */\n attribute?: string | false;\n\n /**\n * The event name (or descriptor) for the prop.\n */\n event?: string | CustomElementEventDescriptor;\n\n /**\n * A function that takes a property value and returns the corresponding attribute value.\n */\n serialize?: (value: any) => string | void;\n}\n\n/**\n * A descriptor for a set of React props for attributes of a custom element.\n */\ninterface CustomElementPropsDescriptor {\n [propName: string]: CustomElementPropDescriptor;\n}\n\n/**\n * React props for the component `createCustomElementType()` generates.\n */\ninterface CustomElementTypeProps {\n /**\n * Ordinal prop.\n */\n [propName: string]: any;\n\n /**\n * Child nodes.\n */\n // eslint-disable-next-line react/no-unused-prop-types\n children?: React.ReactNode;\n}\n\n/**\n * @param refs List of React refs to merge.\n * @returns Merged React ref.\n */\nconst mergeRefs =\n <T>(...refs: React.Ref<T>[]) =>\n (el) => {\n refs.forEach((ref) => {\n // https://github.com/facebook/react/issues/13029#issuecomment-410002316\n if (typeof ref === 'function') {\n ref(el);\n } else if (Object(ref) === ref) {\n // `React.Ref.current` is read-only for regular use case, but we update it here\n (ref as { current: T }).current = el;\n }\n });\n };\n\n/**\n * @param prop A prop value.\n * @param descriptor A React prop descriptor.\n * @returns The corresponding attribute value for the given prop value.\n */\nconst convertProp = (prop: any, descriptor: CustomElementPropDescriptor) => {\n if (!descriptor) {\n return prop;\n }\n const { event, serialize } = descriptor;\n if (event) {\n // Events are not set as props, we use DOM `addEventListener()` instead\n return undefined;\n }\n return !serialize ? prop : serialize(prop);\n};\n\n/**\n * @param props A set of React props.\n * @param descriptor A set of React prop desciptor.\n * @returns The set of React props to set to a custom element, corresponding to the given React props.\n */\nconst convertProps = (\n props: CustomElementTypeProps,\n descriptor: CustomElementPropsDescriptor\n) =>\n Object.keys(props).reduce((acc, propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const converted = convertProp(props[propName], descriptorItem);\n const { attribute } = descriptorItem ?? {};\n return attribute === false\n ? acc\n : {\n ...acc,\n [attribute || propName]: converted,\n };\n }, {});\n\n/**\n * Attaches listeners of custom events, to a custom element.\n *\n * @param elem The custom element.\n * @param descriptor An object, keyed by prop name, of data that may have custom event names.\n * @param callback A callback function that runs as the custom events fire.\n * @returns A handle that allows to release all event listeners attached.\n */\nconst attachEventListeners = (\n elem: HTMLElement,\n descriptor: CustomElementPropsDescriptor,\n callback: (name: string, event: Event) => void\n): Handle => {\n const handles = new Set<Handle>();\n Object.keys(descriptor).forEach((propName) => {\n if (descriptor[propName]) {\n const { event: eventDescriptor } = descriptor[propName];\n const name =\n Object(eventDescriptor) !== eventDescriptor\n ? (eventDescriptor as string)\n : (eventDescriptor as CustomElementEventDescriptor).name;\n const options =\n Object(eventDescriptor) !== eventDescriptor\n ? undefined\n : (eventDescriptor as CustomElementEventDescriptor).options;\n if (name) {\n handles.add(\n on(\n elem,\n name,\n (event) => {\n callback(propName, event);\n },\n options\n )\n );\n }\n }\n });\n return {\n release() {\n handles.forEach((handle) => {\n handle.release();\n handles.delete(handle);\n });\n return null;\n },\n };\n};\n\n/**\n * @param name The tag name of the custom element.\n * @param descriptor A descriptor for a set of React props for attributes of a custom element.\n * @returns A React component working as a wrapper for the given custom element.\n * @example\n * import { render } from 'react-dom';\n * import createCustomElementType, { booleanSerializer } from '/path/to/createCustomElementType';\n *\n * const CDSDropdown = createCustomElementType(`${prefix}-dropdown`, {\n * disabled: {\n * // Sets `disabled` attribute when the React prop value is truthy, unsets otherwise\n * serialize: booleanSerializer,\n * },\n * helperText: {\n * // Maps `helperText` React prop to `helper-text` attribute\n * attribute: 'helper-text',\n * },\n * onBeforeSelect: {\n * // Sets `onBeforeSelect` React prop value as a listener of `cds-dropdown-beingselected` custom event\n * event: `${prefix}-dropdown-beingselected`,\n * },\n * });\n *\n * render(\n * (\n * <CDSDropdown\n * disabled={true}\n * helperText=\"some-helper-text\"\n * onBeforeSelect={event => { console.log(`${prefix}-dropdown-beingselected is fired!`, event); }}>\n * <cds-dropdown-item value=\"all\">Option 1</cds-dropdown-item>\n * <cds-dropdown-item value=\"cloudFoundry\">Option 2</cds-dropdown-item>\n * <cds-dropdown-item value=\"staging\">Option 3</cds-dropdown-item>\n * </CDSDropdown>\n * )\n * document.body\n * );\n */\nconst createReactCustomElementType = (\n name: string,\n descriptor: CustomElementPropsDescriptor\n) => {\n /**\n * Array of React prop names that should be mapped to DOM properties instead of attributes.\n */\n const nonAttributeProps = Object.keys(descriptor).filter((propName) => {\n const { [propName]: descriptorItem } = descriptor;\n const { attribute } = descriptorItem ?? {};\n return attribute === false;\n });\n\n /**\n * A React component working as a wrapper for the custom element.\n */\n class CustomElementType extends Component<CustomElementTypeProps> {\n /**\n * The element.\n */\n private _elem: HTMLElement | null = null;\n\n /**\n * The handle that allows to release all event listeners attached to this custom element.\n */\n private _eventListenersHandle: Handle | null = null;\n\n /**\n * The callback function that runs as the custom events fire.\n *\n * @param propName The React prop name associated with the event listener.\n * @param event The event.\n */\n private _handleEvent = (propName: string, event: Event) => {\n const { [propName]: listener } = this.props;\n if (listener) {\n listener.call(event.currentTarget, event);\n }\n };\n\n /**\n * Handles getting/losing the React `ref` object of this custom element.\n *\n * @param elem The custom element.\n */\n private _handleElemRef = (elem: HTMLElement) => {\n this._elem = elem;\n if (this._eventListenersHandle) {\n this._eventListenersHandle.release();\n this._eventListenersHandle = null;\n }\n if (elem) {\n this._eventListenersHandle = attachEventListeners(\n elem,\n descriptor,\n this._handleEvent\n );\n }\n };\n\n /**\n * Reflects change in React props to DOM properties.\n *\n * @param prevProps The previous props.\n */\n updateProps(prevProps: { [key: string]: any } = {}) {\n const { props, _elem: elem } = this;\n nonAttributeProps.forEach((propName) => {\n const { [propName]: prevValue } = prevProps;\n const { [propName]: value } = props;\n if (prevValue !== value) {\n elem![propName] = value;\n }\n });\n }\n\n componentDidMount() {\n this.updateProps();\n }\n\n componentDidUpdate(prevProps) {\n this.updateProps(prevProps);\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { children, innerRef, ...props } = this.props;\n const mergedRef = mergeRefs<HTMLElement>(innerRef, this._handleElemRef);\n return createElement(\n name,\n { ref: mergedRef, ...convertProps(props, descriptor) },\n children\n );\n }\n }\n\n return forwardRef<HTMLElement, CustomElementTypeProps>((props, ref) =>\n createElement(CustomElementType, { ...props, innerRef: ref })\n );\n};\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a boolean attribute in a custom element.\n */\nexport const booleanSerializer = (value) => (!value ? undefined : '');\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a number attribute in a custom element.\n */\nexport const numberSerializer = (value) =>\n value == null ? value : String(value);\n\n/**\n * @param value A React prop value.\n * @returns Serialized version of React prop value, as a object attribute in a custom element.\n */\nexport const objectSerializer = (value) =>\n value == null ? value : JSON.stringify(value);\n\nexport default createReactCustomElementType;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAgBA,SAAS,EAAEC,aAAa,EAAEC,UAAU,QAAQ,OAAO;A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ED;AACA;AACA;AACA;AACA,OAAO,MAAMyD,iBAAiB,GAAIV,KAAK,IAAM,CAACA,KAAK,GAAGvC,SAAS,GAAG,EAAG;;AAErE;AACA;AACA;AACA;AACA,OAAO,MAAMkD,gBAAgB,GAAIX,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGY,MAAM,CAACZ,KAAK,CAAC;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMa,gBAAgB,GAAIb,KAAK,IACpCA,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGc,IAAI,CAACC,SAAS,CAACf,KAAK,CAAC;AAE/C,eAAehB,4BAA4B"}
|
package/es/icons/add/16.js
CHANGED
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}${children}${children}<path d="M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
package/es/icons/arrows/16.js
CHANGED
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}${children}${children}<path d="M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M24 12L16 22 8 12z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
package/es/icons/caret--up/16.js
CHANGED
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M8 20L16 10 24 20z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16">${children}
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16">${children}<path d="M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"></path><path d="M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}<path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}${children}${children}<path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}<path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}${children}${children}<path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
package/es/icons/subtract/16.js
CHANGED
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path d="M8 15H24V17H8z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}${children}${children}<path d="M8 15H24V17H8z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}<path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="16" height="16" viewBox="0 0 32 32">${children}${children}${children}<path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|
|
@@ -11,5 +11,5 @@ import spread from '../../globals/directives/spread';
|
|
|
11
11
|
const svgResultCarbonIcon = ({ children, ...attrs } = {}) =>
|
|
12
12
|
svg`<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" ...="${spread(
|
|
13
13
|
attrs
|
|
14
|
-
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}<path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>`;
|
|
14
|
+
)}" aria-hidden="true" width="20" height="20" viewBox="0 0 32 32">${children}${children}${children}<path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>`;
|
|
15
15
|
export default svgResultCarbonIcon;
|