@daikin-oss/design-system-web-components 0.7.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -12
- package/README.md +2 -2
- package/dist/cjs/base/dds-element.cjs +8 -0
- package/dist/cjs/base/dds-element.d.cts +4 -0
- package/dist/cjs/base/decorators.cjs +13 -0
- package/dist/cjs/base/decorators.d.cts +2 -0
- package/dist/cjs/base/define.cjs +18 -0
- package/dist/cjs/base/define.d.cts +1 -0
- package/dist/cjs/base/index.cjs +8 -0
- package/dist/cjs/base/index.d.cts +3 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +39 -6
- package/dist/cjs/components/accordion/daikin-accordion.d.cts +15 -2
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +37 -77
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.cts +10 -16
- package/dist/cjs/components/avatar/daikin-avatar.cjs +160 -0
- package/dist/cjs/components/avatar/daikin-avatar.d.cts +64 -0
- package/dist/cjs/components/avatar/index.cjs +7 -0
- package/dist/cjs/components/avatar/index.d.cts +1 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +8 -5
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +2 -2
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +8 -5
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +2 -2
- package/dist/cjs/components/button/daikin-button.cjs +20 -8
- package/dist/cjs/components/button/daikin-button.d.cts +6 -3
- package/dist/cjs/components/card/daikin-card.cjs +11 -7
- package/dist/cjs/components/card/daikin-card.d.cts +8 -2
- package/dist/cjs/components/card-footer/daikin-card-footer.cjs +9 -9
- package/dist/cjs/components/card-footer/daikin-card-footer.d.cts +6 -2
- package/dist/cjs/components/card-header/daikin-card-header.cjs +10 -10
- package/dist/cjs/components/card-header/daikin-card-header.d.cts +6 -2
- package/dist/cjs/components/carousel/daikin-carousel.cjs +217 -0
- package/dist/cjs/components/carousel/daikin-carousel.d.cts +56 -0
- package/dist/cjs/components/carousel/index.cjs +7 -0
- package/dist/cjs/components/carousel/index.d.cts +1 -0
- package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +80 -0
- package/dist/cjs/components/carousel-item/daikin-carousel-item.d.cts +50 -0
- package/dist/cjs/components/carousel-item/index.cjs +7 -0
- package/dist/cjs/components/carousel-item/index.d.cts +1 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +35 -16
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +8 -2
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +161 -74
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +64 -11
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +109 -41
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.cts +16 -3
- package/dist/cjs/components/icon/daikin-icon.cjs +8 -5
- package/dist/cjs/components/icon/daikin-icon.d.cts +2 -2
- package/dist/cjs/components/icon/icons.json.cjs +1 -70
- package/dist/cjs/components/icon/icons.json.d.cts +4 -8
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +8 -5
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +2 -2
- package/dist/cjs/components/index.cjs +33 -3
- package/dist/cjs/components/index.d.cts +7 -1
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +92 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +55 -0
- package/dist/cjs/components/inline-notification/index.cjs +7 -0
- package/dist/cjs/components/inline-notification/index.d.cts +1 -0
- package/dist/cjs/components/input-group/daikin-input-group.cjs +12 -9
- package/dist/cjs/components/input-group/daikin-input-group.d.cts +15 -7
- package/dist/cjs/components/link/daikin-link.cjs +9 -6
- package/dist/cjs/components/link/daikin-link.d.cts +2 -2
- package/dist/cjs/components/list/daikin-list.cjs +9 -9
- package/dist/cjs/components/list/daikin-list.d.cts +7 -2
- package/dist/cjs/components/list-item/daikin-list-item.cjs +8 -5
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +6 -2
- package/dist/cjs/components/loading/daikin-loading.cjs +91 -0
- package/dist/cjs/components/loading/daikin-loading.d.cts +32 -0
- package/dist/cjs/components/loading/index.cjs +7 -0
- package/dist/cjs/components/loading/index.d.cts +1 -0
- package/dist/cjs/components/pagination/daikin-pagination.cjs +22 -13
- package/dist/cjs/components/pagination/daikin-pagination.d.cts +6 -2
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +13 -8
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.cts +3 -2
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +16 -20
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.cts +12 -5
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +24 -25
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +8 -4
- package/dist/cjs/components/radio/daikin-radio.cjs +45 -23
- package/dist/cjs/components/radio/daikin-radio.d.cts +18 -8
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +31 -11
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +20 -14
- package/dist/cjs/components/select/daikin-select.cjs +15 -6
- package/dist/cjs/components/select/daikin-select.d.cts +11 -2
- package/dist/cjs/components/tab/daikin-tab.cjs +25 -10
- package/dist/cjs/components/tab/daikin-tab.d.cts +7 -2
- package/dist/cjs/components/tab-panels/daikin-tab-panels.cjs +9 -7
- package/dist/cjs/components/tab-panels/daikin-tab-panels.d.cts +2 -2
- package/dist/cjs/components/table/daikin-table.cjs +9 -6
- package/dist/cjs/components/table/daikin-table.d.cts +9 -2
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +8 -5
- package/dist/cjs/components/table-cell/daikin-table-cell.d.cts +6 -2
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +8 -5
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +6 -2
- package/dist/cjs/components/tabs/daikin-tabs.cjs +25 -10
- package/dist/cjs/components/tabs/daikin-tabs.d.cts +8 -2
- package/dist/cjs/components/text-area/daikin-text-area.cjs +16 -7
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +7 -2
- package/dist/cjs/components/text-field/daikin-text-field.cjs +16 -7
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +7 -2
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +94 -0
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +69 -0
- package/dist/cjs/components/toast-notification/index.cjs +7 -0
- package/dist/cjs/components/toast-notification/index.d.cts +1 -0
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +192 -0
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +67 -0
- package/dist/cjs/components/toast-notification-manager/index.cjs +7 -0
- package/dist/cjs/components/toast-notification-manager/index.d.cts +1 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +8 -5
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +3 -2
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +42 -30
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +16 -6
- package/dist/cjs/components/tree/daikin-tree.cjs +36 -37
- package/dist/cjs/components/tree/daikin-tree.d.cts +13 -14
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +22 -18
- package/dist/cjs/components/tree-item/daikin-tree-item.d.cts +9 -9
- package/dist/cjs/components/tree-section/daikin-tree-section.cjs +26 -41
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +10 -20
- package/dist/cjs/controllers/click-outside.d.cts +1 -1
- package/dist/cjs/index.cjs +33 -3
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/is-similar-to-click.cjs +4 -0
- package/dist/cjs/utils/is-similar-to-click.d.cts +1 -0
- package/dist/cjs/utils/notification-common.cjs +121 -0
- package/dist/cjs/utils/notification-common.d.cts +19 -0
- package/dist/cjs-dev/base/dds-element.cjs +8 -0
- package/dist/cjs-dev/base/dds-element.d.cts +4 -0
- package/dist/cjs-dev/base/decorators.cjs +13 -0
- package/dist/cjs-dev/base/decorators.d.cts +2 -0
- package/dist/cjs-dev/base/define.cjs +18 -0
- package/dist/cjs-dev/base/define.d.cts +1 -0
- package/dist/cjs-dev/base/index.cjs +8 -0
- package/dist/cjs-dev/base/index.d.cts +3 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +46 -6
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +15 -2
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +37 -77
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.cts +10 -16
- package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +160 -0
- package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +64 -0
- package/dist/cjs-dev/components/avatar/index.cjs +7 -0
- package/dist/cjs-dev/components/avatar/index.d.cts +1 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +8 -5
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +2 -2
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +8 -5
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +2 -2
- package/dist/cjs-dev/components/button/daikin-button.cjs +20 -8
- package/dist/cjs-dev/components/button/daikin-button.d.cts +6 -3
- package/dist/cjs-dev/components/card/daikin-card.cjs +11 -7
- package/dist/cjs-dev/components/card/daikin-card.d.cts +8 -2
- package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +9 -9
- package/dist/cjs-dev/components/card-footer/daikin-card-footer.d.cts +6 -2
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +10 -10
- package/dist/cjs-dev/components/card-header/daikin-card-header.d.cts +6 -2
- package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +227 -0
- package/dist/cjs-dev/components/carousel/daikin-carousel.d.cts +56 -0
- package/dist/cjs-dev/components/carousel/index.cjs +7 -0
- package/dist/cjs-dev/components/carousel/index.d.cts +1 -0
- package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +80 -0
- package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.d.cts +50 -0
- package/dist/cjs-dev/components/carousel-item/index.cjs +7 -0
- package/dist/cjs-dev/components/carousel-item/index.d.cts +1 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +35 -16
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +8 -2
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +161 -74
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +64 -11
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +109 -41
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.cts +16 -3
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +8 -5
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +2 -2
- package/dist/cjs-dev/components/icon/icons.json.cjs +1 -70
- package/dist/cjs-dev/components/icon/icons.json.d.cts +4 -8
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +8 -5
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +2 -2
- package/dist/cjs-dev/components/index.cjs +33 -3
- package/dist/cjs-dev/components/index.d.cts +7 -1
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +92 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +55 -0
- package/dist/cjs-dev/components/inline-notification/index.cjs +7 -0
- package/dist/cjs-dev/components/inline-notification/index.d.cts +1 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +12 -9
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +15 -7
- package/dist/cjs-dev/components/link/daikin-link.cjs +9 -6
- package/dist/cjs-dev/components/link/daikin-link.d.cts +2 -2
- package/dist/cjs-dev/components/list/daikin-list.cjs +9 -9
- package/dist/cjs-dev/components/list/daikin-list.d.cts +7 -2
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +8 -5
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +6 -2
- package/dist/cjs-dev/components/loading/daikin-loading.cjs +91 -0
- package/dist/cjs-dev/components/loading/daikin-loading.d.cts +32 -0
- package/dist/cjs-dev/components/loading/index.cjs +7 -0
- package/dist/cjs-dev/components/loading/index.d.cts +1 -0
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +22 -13
- package/dist/cjs-dev/components/pagination/daikin-pagination.d.cts +6 -2
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +13 -8
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.cts +3 -2
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +16 -30
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.cts +12 -5
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +24 -25
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +8 -4
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +45 -23
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +18 -8
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +31 -11
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +20 -14
- package/dist/cjs-dev/components/select/daikin-select.cjs +15 -6
- package/dist/cjs-dev/components/select/daikin-select.d.cts +11 -2
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +25 -10
- package/dist/cjs-dev/components/tab/daikin-tab.d.cts +7 -2
- package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.cjs +9 -7
- package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.d.cts +2 -2
- package/dist/cjs-dev/components/table/daikin-table.cjs +9 -6
- package/dist/cjs-dev/components/table/daikin-table.d.cts +9 -2
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +8 -5
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.d.cts +6 -2
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +8 -5
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +6 -2
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +25 -10
- package/dist/cjs-dev/components/tabs/daikin-tabs.d.cts +8 -2
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +16 -7
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +7 -2
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +16 -7
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +7 -2
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +94 -0
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +69 -0
- package/dist/cjs-dev/components/toast-notification/index.cjs +7 -0
- package/dist/cjs-dev/components/toast-notification/index.d.cts +1 -0
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +192 -0
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +67 -0
- package/dist/cjs-dev/components/toast-notification-manager/index.cjs +7 -0
- package/dist/cjs-dev/components/toast-notification-manager/index.d.cts +1 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +8 -5
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +3 -2
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +42 -30
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +16 -6
- package/dist/cjs-dev/components/tree/daikin-tree.cjs +36 -37
- package/dist/cjs-dev/components/tree/daikin-tree.d.cts +13 -14
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +22 -18
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.d.cts +9 -9
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +26 -41
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +10 -20
- package/dist/cjs-dev/controllers/click-outside.d.cts +1 -1
- package/dist/cjs-dev/index.cjs +33 -3
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/is-similar-to-click.cjs +4 -0
- package/dist/cjs-dev/utils/is-similar-to-click.d.cts +1 -0
- package/dist/cjs-dev/utils/notification-common.cjs +124 -0
- package/dist/cjs-dev/utils/notification-common.d.cts +19 -0
- package/dist/es/base/dds-element.d.ts +4 -0
- package/dist/es/base/dds-element.js +8 -0
- package/dist/es/base/decorators.d.ts +2 -0
- package/dist/es/base/decorators.js +13 -0
- package/dist/es/base/define.d.ts +1 -0
- package/dist/es/base/define.js +18 -0
- package/dist/es/base/index.d.ts +3 -0
- package/dist/es/base/index.js +8 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +15 -2
- package/dist/es/components/accordion/daikin-accordion.js +38 -5
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +10 -16
- package/dist/es/components/accordion-item/daikin-accordion-item.js +36 -76
- package/dist/es/components/avatar/daikin-avatar.d.ts +64 -0
- package/dist/es/components/avatar/daikin-avatar.js +161 -0
- package/dist/es/components/avatar/index.d.ts +1 -0
- package/dist/es/components/avatar/index.js +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +2 -2
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +7 -4
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +2 -2
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +7 -4
- package/dist/es/components/button/daikin-button.d.ts +6 -3
- package/dist/es/components/button/daikin-button.js +19 -7
- package/dist/es/components/card/daikin-card.d.ts +8 -2
- package/dist/es/components/card/daikin-card.js +10 -6
- package/dist/es/components/card-footer/daikin-card-footer.d.ts +6 -2
- package/dist/es/components/card-footer/daikin-card-footer.js +7 -7
- package/dist/es/components/card-header/daikin-card-header.d.ts +6 -2
- package/dist/es/components/card-header/daikin-card-header.js +8 -8
- package/dist/es/components/carousel/daikin-carousel.d.ts +56 -0
- package/dist/es/components/carousel/daikin-carousel.js +218 -0
- package/dist/es/components/carousel/index.d.ts +1 -0
- package/dist/es/components/carousel/index.js +4 -0
- package/dist/es/components/carousel-item/daikin-carousel-item.d.ts +50 -0
- package/dist/es/components/carousel-item/daikin-carousel-item.js +81 -0
- package/dist/es/components/carousel-item/index.d.ts +1 -0
- package/dist/es/components/carousel-item/index.js +4 -0
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +8 -2
- package/dist/es/components/checkbox/daikin-checkbox.js +34 -15
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +64 -11
- package/dist/es/components/dropdown/daikin-dropdown.js +160 -73
- package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +16 -3
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +108 -40
- package/dist/es/components/icon/daikin-icon.d.ts +2 -2
- package/dist/es/components/icon/daikin-icon.js +7 -4
- package/dist/es/components/icon/icons.json.d.ts +4 -8
- package/dist/es/components/icon/icons.json.js +1 -70
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +2 -2
- package/dist/es/components/icon-button/daikin-icon-button.js +7 -4
- package/dist/es/components/index.d.ts +7 -1
- package/dist/es/components/index.js +14 -2
- package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +55 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.js +93 -0
- package/dist/es/components/inline-notification/index.d.ts +1 -0
- package/dist/es/components/inline-notification/index.js +4 -0
- package/dist/es/components/input-group/daikin-input-group.d.ts +15 -7
- package/dist/es/components/input-group/daikin-input-group.js +11 -8
- package/dist/es/components/link/daikin-link.d.ts +2 -2
- package/dist/es/components/link/daikin-link.js +8 -5
- package/dist/es/components/list/daikin-list.d.ts +7 -2
- package/dist/es/components/list/daikin-list.js +7 -7
- package/dist/es/components/list-item/daikin-list-item.d.ts +6 -2
- package/dist/es/components/list-item/daikin-list-item.js +7 -4
- package/dist/es/components/loading/daikin-loading.d.ts +32 -0
- package/dist/es/components/loading/daikin-loading.js +92 -0
- package/dist/es/components/loading/index.d.ts +1 -0
- package/dist/es/components/loading/index.js +4 -0
- package/dist/es/components/pagination/daikin-pagination.d.ts +6 -2
- package/dist/es/components/pagination/daikin-pagination.js +21 -12
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +3 -2
- package/dist/es/components/progress-bar/daikin-progress-bar.js +12 -7
- package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +12 -5
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +15 -19
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +8 -4
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +23 -24
- package/dist/es/components/radio/daikin-radio.d.ts +18 -8
- package/dist/es/components/radio/daikin-radio.js +44 -22
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +20 -14
- package/dist/es/components/radio-group/daikin-radio-group.js +30 -10
- package/dist/es/components/select/daikin-select.d.ts +11 -2
- package/dist/es/components/select/daikin-select.js +14 -5
- package/dist/es/components/tab/daikin-tab.d.ts +7 -2
- package/dist/es/components/tab/daikin-tab.js +24 -9
- package/dist/es/components/tab-panels/daikin-tab-panels.d.ts +2 -2
- package/dist/es/components/tab-panels/daikin-tab-panels.js +8 -6
- package/dist/es/components/table/daikin-table.d.ts +9 -2
- package/dist/es/components/table/daikin-table.js +8 -5
- package/dist/es/components/table-cell/daikin-table-cell.d.ts +6 -2
- package/dist/es/components/table-cell/daikin-table-cell.js +7 -4
- package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +6 -2
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +7 -4
- package/dist/es/components/tabs/daikin-tabs.d.ts +8 -2
- package/dist/es/components/tabs/daikin-tabs.js +24 -9
- package/dist/es/components/text-area/daikin-text-area.d.ts +7 -2
- package/dist/es/components/text-area/daikin-text-area.js +15 -6
- package/dist/es/components/text-field/daikin-text-field.d.ts +7 -2
- package/dist/es/components/text-field/daikin-text-field.js +15 -6
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +69 -0
- package/dist/es/components/toast-notification/daikin-toast-notification.js +95 -0
- package/dist/es/components/toast-notification/index.d.ts +1 -0
- package/dist/es/components/toast-notification/index.js +4 -0
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +67 -0
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +193 -0
- package/dist/es/components/toast-notification-manager/index.d.ts +1 -0
- package/dist/es/components/toast-notification-manager/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +3 -2
- package/dist/es/components/toggle/daikin-toggle.js +7 -4
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +16 -6
- package/dist/es/components/tooltip/daikin-tooltip.js +41 -29
- package/dist/es/components/tree/daikin-tree.d.ts +13 -14
- package/dist/es/components/tree/daikin-tree.js +35 -36
- package/dist/es/components/tree-item/daikin-tree-item.d.ts +9 -9
- package/dist/es/components/tree-item/daikin-tree-item.js +21 -17
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +10 -20
- package/dist/es/components/tree-section/daikin-tree-section.js +25 -40
- package/dist/es/controllers/click-outside.d.ts +1 -1
- package/dist/es/index.js +14 -2
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/is-similar-to-click.d.ts +1 -0
- package/dist/es/utils/is-similar-to-click.js +4 -0
- package/dist/es/utils/notification-common.d.ts +19 -0
- package/dist/es/utils/notification-common.js +121 -0
- package/dist/es-dev/base/dds-element.d.ts +4 -0
- package/dist/es-dev/base/dds-element.js +8 -0
- package/dist/es-dev/base/decorators.d.ts +2 -0
- package/dist/es-dev/base/decorators.js +13 -0
- package/dist/es-dev/base/define.d.ts +1 -0
- package/dist/es-dev/base/define.js +18 -0
- package/dist/es-dev/base/index.d.ts +3 -0
- package/dist/es-dev/base/index.js +8 -0
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -2
- package/dist/es-dev/components/accordion/daikin-accordion.js +45 -5
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +10 -16
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +36 -76
- package/dist/es-dev/components/avatar/daikin-avatar.d.ts +64 -0
- package/dist/es-dev/components/avatar/daikin-avatar.js +161 -0
- package/dist/es-dev/components/avatar/index.d.ts +1 -0
- package/dist/es-dev/components/avatar/index.js +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +2 -2
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +7 -4
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +2 -2
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +7 -4
- package/dist/es-dev/components/button/daikin-button.d.ts +6 -3
- package/dist/es-dev/components/button/daikin-button.js +19 -7
- package/dist/es-dev/components/card/daikin-card.d.ts +8 -2
- package/dist/es-dev/components/card/daikin-card.js +10 -6
- package/dist/es-dev/components/card-footer/daikin-card-footer.d.ts +6 -2
- package/dist/es-dev/components/card-footer/daikin-card-footer.js +7 -7
- package/dist/es-dev/components/card-header/daikin-card-header.d.ts +6 -2
- package/dist/es-dev/components/card-header/daikin-card-header.js +8 -8
- package/dist/es-dev/components/carousel/daikin-carousel.d.ts +56 -0
- package/dist/es-dev/components/carousel/daikin-carousel.js +228 -0
- package/dist/es-dev/components/carousel/index.d.ts +1 -0
- package/dist/es-dev/components/carousel/index.js +4 -0
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.d.ts +50 -0
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +81 -0
- package/dist/es-dev/components/carousel-item/index.d.ts +1 -0
- package/dist/es-dev/components/carousel-item/index.js +4 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +8 -2
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +34 -15
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +64 -11
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +160 -73
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +16 -3
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +108 -40
- package/dist/es-dev/components/icon/daikin-icon.d.ts +2 -2
- package/dist/es-dev/components/icon/daikin-icon.js +7 -4
- package/dist/es-dev/components/icon/icons.json.d.ts +4 -8
- package/dist/es-dev/components/icon/icons.json.js +1 -70
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +2 -2
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +7 -4
- package/dist/es-dev/components/index.d.ts +7 -1
- package/dist/es-dev/components/index.js +14 -2
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +55 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +93 -0
- package/dist/es-dev/components/inline-notification/index.d.ts +1 -0
- package/dist/es-dev/components/inline-notification/index.js +4 -0
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +15 -7
- package/dist/es-dev/components/input-group/daikin-input-group.js +11 -8
- package/dist/es-dev/components/link/daikin-link.d.ts +2 -2
- package/dist/es-dev/components/link/daikin-link.js +8 -5
- package/dist/es-dev/components/list/daikin-list.d.ts +7 -2
- package/dist/es-dev/components/list/daikin-list.js +7 -7
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +6 -2
- package/dist/es-dev/components/list-item/daikin-list-item.js +7 -4
- package/dist/es-dev/components/loading/daikin-loading.d.ts +32 -0
- package/dist/es-dev/components/loading/daikin-loading.js +92 -0
- package/dist/es-dev/components/loading/index.d.ts +1 -0
- package/dist/es-dev/components/loading/index.js +4 -0
- package/dist/es-dev/components/pagination/daikin-pagination.d.ts +6 -2
- package/dist/es-dev/components/pagination/daikin-pagination.js +21 -12
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +3 -2
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +12 -7
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +12 -5
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +15 -29
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +8 -4
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +23 -24
- package/dist/es-dev/components/radio/daikin-radio.d.ts +18 -8
- package/dist/es-dev/components/radio/daikin-radio.js +44 -22
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +20 -14
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +30 -10
- package/dist/es-dev/components/select/daikin-select.d.ts +11 -2
- package/dist/es-dev/components/select/daikin-select.js +14 -5
- package/dist/es-dev/components/tab/daikin-tab.d.ts +7 -2
- package/dist/es-dev/components/tab/daikin-tab.js +24 -9
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.d.ts +2 -2
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +8 -6
- package/dist/es-dev/components/table/daikin-table.d.ts +9 -2
- package/dist/es-dev/components/table/daikin-table.js +8 -5
- package/dist/es-dev/components/table-cell/daikin-table-cell.d.ts +6 -2
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +7 -4
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +6 -2
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +7 -4
- package/dist/es-dev/components/tabs/daikin-tabs.d.ts +8 -2
- package/dist/es-dev/components/tabs/daikin-tabs.js +24 -9
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +7 -2
- package/dist/es-dev/components/text-area/daikin-text-area.js +15 -6
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +7 -2
- package/dist/es-dev/components/text-field/daikin-text-field.js +15 -6
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +69 -0
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +95 -0
- package/dist/es-dev/components/toast-notification/index.d.ts +1 -0
- package/dist/es-dev/components/toast-notification/index.js +4 -0
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +67 -0
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +193 -0
- package/dist/es-dev/components/toast-notification-manager/index.d.ts +1 -0
- package/dist/es-dev/components/toast-notification-manager/index.js +4 -0
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +3 -2
- package/dist/es-dev/components/toggle/daikin-toggle.js +7 -4
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +16 -6
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +41 -29
- package/dist/es-dev/components/tree/daikin-tree.d.ts +13 -14
- package/dist/es-dev/components/tree/daikin-tree.js +35 -36
- package/dist/es-dev/components/tree-item/daikin-tree-item.d.ts +9 -9
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +21 -17
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +10 -20
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +25 -40
- package/dist/es-dev/controllers/click-outside.d.ts +1 -1
- package/dist/es-dev/index.js +14 -2
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/is-similar-to-click.d.ts +1 -0
- package/dist/es-dev/utils/is-similar-to-click.js +4 -0
- package/dist/es-dev/utils/notification-common.d.ts +19 -0
- package/dist/es-dev/utils/notification-common.js +124 -0
- package/icons/checkbox-checked.svg +2 -3
- package/icons/profile.svg +4 -0
- package/icons/status-negative.svg +4 -2
- package/icons/status-warning.svg +2 -4
- package/package.json +54 -50
- package/dist/cjs/components/notification/daikin-notification.cjs +0 -196
- package/dist/cjs/components/notification/daikin-notification.d.cts +0 -77
- package/dist/cjs/components/notification/index.cjs +0 -7
- package/dist/cjs/components/notification/index.d.cts +0 -1
- package/dist/cjs/constants/events.cjs +0 -4
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +0 -196
- package/dist/cjs-dev/components/notification/daikin-notification.d.cts +0 -77
- package/dist/cjs-dev/components/notification/index.cjs +0 -7
- package/dist/cjs-dev/components/notification/index.d.cts +0 -1
- package/dist/cjs-dev/constants/events.cjs +0 -4
- package/dist/es/components/notification/daikin-notification.d.ts +0 -77
- package/dist/es/components/notification/daikin-notification.js +0 -197
- package/dist/es/components/notification/index.d.ts +0 -1
- package/dist/es/components/notification/index.js +0 -4
- package/dist/es/constants/events.js +0 -4
- package/dist/es-dev/components/notification/daikin-notification.d.ts +0 -77
- package/dist/es-dev/components/notification/daikin-notification.js +0 -197
- package/dist/es-dev/components/notification/index.d.ts +0 -1
- package/dist/es-dev/components/notification/index.js +0 -4
- package/dist/es-dev/constants/events.js +0 -4
- package/icons/arrow-up.svg +0 -3
- package/icons/status-success.svg +0 -6
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { flip, offset, size } from "@floating-ui/dom";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { css, unsafeCSS,
|
|
4
|
-
import { property, queryAssignedElements, query, state
|
|
3
|
+
import { css, unsafeCSS, html } from "lit";
|
|
4
|
+
import { property, queryAssignedElements, query, state } from "lit/decorators.js";
|
|
5
5
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
6
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
8
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
9
|
+
import "../../base/define.js";
|
|
6
10
|
import { ClickOutsideController } from "../../controllers/click-outside.js";
|
|
7
11
|
import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-auto-update.js";
|
|
8
12
|
import tailwindStyles from "../../tailwind.css.js";
|
|
13
|
+
import { isSimpleKeyEvent } from "../../utils/is-simple-key.js";
|
|
9
14
|
var __defProp = Object.defineProperty;
|
|
10
15
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
16
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -19,36 +24,34 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
19
24
|
const cvaButton = cva(
|
|
20
25
|
[
|
|
21
26
|
"flex",
|
|
27
|
+
"justify-between",
|
|
22
28
|
"items-center",
|
|
23
29
|
"gap-2",
|
|
24
30
|
"w-full",
|
|
25
31
|
"h-full",
|
|
26
32
|
"min-h-12",
|
|
27
33
|
"bg-ddt-color-common-background-default",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
34
|
+
"py-3",
|
|
35
|
+
"pl-4",
|
|
36
|
+
"pr-3",
|
|
31
37
|
"rounded",
|
|
32
38
|
"overflow-hidden",
|
|
33
39
|
"font-daikinSerif",
|
|
34
40
|
"text-left",
|
|
35
|
-
"leading-
|
|
41
|
+
"leading-[130%]",
|
|
36
42
|
"relative",
|
|
37
43
|
"outline",
|
|
38
|
-
"outline-
|
|
39
|
-
"-outline-offset-
|
|
44
|
+
"outline-1",
|
|
45
|
+
"-outline-offset-1",
|
|
40
46
|
"focus-visible:outline-2",
|
|
41
|
-
"focus-visible
|
|
47
|
+
"focus-visible:-outline-offset-2",
|
|
48
|
+
"enabled:outline-[--color-base]",
|
|
42
49
|
"disabled:text-ddt-color-common-disabled",
|
|
43
|
-
"disabled:
|
|
50
|
+
"disabled:outline-ddt-color-common-disabled",
|
|
44
51
|
"after:i-daikin-dropdown-chevron-down",
|
|
45
|
-
"after:
|
|
46
|
-
"after:
|
|
47
|
-
"after:
|
|
48
|
-
"after:m-auto",
|
|
49
|
-
"after:top-0",
|
|
50
|
-
"after:bottom-0",
|
|
51
|
-
"after:right-3",
|
|
52
|
+
"after:size-6",
|
|
53
|
+
"after:flex-none",
|
|
54
|
+
"after:ml-auto",
|
|
52
55
|
"enabled:after:text-ddt-color-common-text-primary",
|
|
53
56
|
"disabled:after:text-ddt-color-common-disabled"
|
|
54
57
|
],
|
|
@@ -59,17 +62,19 @@ const cvaButton = cva(
|
|
|
59
62
|
"enabled:hover:bg-ddt-color-common-surface-hover",
|
|
60
63
|
"enabled:active:bg-ddt-color-common-surface-press"
|
|
61
64
|
],
|
|
62
|
-
true: [
|
|
65
|
+
true: [
|
|
66
|
+
"enabled:bg-ddt-color-common-surface-press",
|
|
67
|
+
"after:scale-y-[-1]"
|
|
68
|
+
]
|
|
63
69
|
},
|
|
64
70
|
error: {
|
|
65
71
|
false: [
|
|
66
72
|
"var-color-ddt-color-common-neutral-default/color-base",
|
|
67
|
-
"var-color-ddt-color-common-
|
|
73
|
+
"hover:var-color-ddt-color-common-neutral-hover/color-base",
|
|
74
|
+
"active:var-color-ddt-color-common-neutral-press/color-base",
|
|
75
|
+
"focus-visible:var-color-ddt-color-common-border-focus/color-base"
|
|
68
76
|
],
|
|
69
|
-
true: [
|
|
70
|
-
"var-color-ddt-color-common-danger-default/color-base",
|
|
71
|
-
"var-color-ddt-color-common-danger-default/color-focus"
|
|
72
|
-
]
|
|
77
|
+
true: ["var-color-ddt-color-common-danger-default/color-base"]
|
|
73
78
|
},
|
|
74
79
|
placeholder: {
|
|
75
80
|
false: ["text-ddt-color-common-text-primary"],
|
|
@@ -93,7 +98,7 @@ const floatingPositionOptions = {
|
|
|
93
98
|
})
|
|
94
99
|
]
|
|
95
100
|
};
|
|
96
|
-
let DaikinDropdown = class extends
|
|
101
|
+
let DaikinDropdown = class extends DDSElement {
|
|
97
102
|
constructor() {
|
|
98
103
|
super(...arguments);
|
|
99
104
|
this._internals = this.attachInternals();
|
|
@@ -103,37 +108,31 @@ let DaikinDropdown = class extends LitElement {
|
|
|
103
108
|
this.required = false;
|
|
104
109
|
this.error = false;
|
|
105
110
|
this.open = false;
|
|
111
|
+
this.multiple = false;
|
|
112
|
+
this.selectedOptions = [];
|
|
113
|
+
this.maxLabels = null;
|
|
106
114
|
this._label = null;
|
|
107
|
-
this.
|
|
108
|
-
this._selectedItemLabel = "";
|
|
115
|
+
this._initialUpdateCompleted = false;
|
|
109
116
|
this._autoUpdateController = new FloatingUIAutoUpdateController(this);
|
|
110
117
|
this._clickOutsideController = new ClickOutsideController(
|
|
111
118
|
this,
|
|
112
119
|
this._onClickOutside
|
|
113
120
|
);
|
|
114
121
|
this._lastFocusedItem = null;
|
|
122
|
+
this._dropdownRef = createRef();
|
|
115
123
|
}
|
|
116
|
-
|
|
117
|
-
this.
|
|
124
|
+
get _selectionLabels() {
|
|
125
|
+
const items = this._items;
|
|
126
|
+
return this.selectedOptions.map(
|
|
127
|
+
(value) => {
|
|
128
|
+
var _a;
|
|
129
|
+
return ((_a = items.find((item) => item.value === value)) == null ? void 0 : _a.textContent) ?? "";
|
|
130
|
+
}
|
|
131
|
+
);
|
|
118
132
|
}
|
|
119
133
|
_onClickOutside() {
|
|
120
134
|
this.open = false;
|
|
121
135
|
}
|
|
122
|
-
_reflectItemsAndLabel() {
|
|
123
|
-
const items = this._items;
|
|
124
|
-
const selectedItem = items.find((item) => item.value === this.value);
|
|
125
|
-
for (const item of items) {
|
|
126
|
-
item.selected = item === selectedItem;
|
|
127
|
-
}
|
|
128
|
-
this._hasSelectedItem = !!selectedItem;
|
|
129
|
-
this._selectedItemLabel = (selectedItem == null ? void 0 : selectedItem.textContent) ?? "";
|
|
130
|
-
}
|
|
131
|
-
_handleClick() {
|
|
132
|
-
if (this.disabled) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
this.open = !this.open;
|
|
136
|
-
}
|
|
137
136
|
_searchItem(prefix) {
|
|
138
137
|
const items = this._items.filter(
|
|
139
138
|
(item) => {
|
|
@@ -155,13 +154,6 @@ let DaikinDropdown = class extends LitElement {
|
|
|
155
154
|
this.open = true;
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
|
-
_handleKeyDownEscape() {
|
|
159
|
-
if (this.open) {
|
|
160
|
-
this.open = false;
|
|
161
|
-
} else {
|
|
162
|
-
this.value = null;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
157
|
_moveFocus(moveOffset) {
|
|
166
158
|
if (!this.open) {
|
|
167
159
|
this.open = true;
|
|
@@ -183,7 +175,56 @@ let DaikinDropdown = class extends LitElement {
|
|
|
183
175
|
break;
|
|
184
176
|
}
|
|
185
177
|
}
|
|
178
|
+
_updateFormValue() {
|
|
179
|
+
this._internals.setFormValue(JSON.stringify(this.value));
|
|
180
|
+
}
|
|
181
|
+
_updateItemsSelectable() {
|
|
182
|
+
for (const item of this._items) {
|
|
183
|
+
item.selectable = this.multiple;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
_updateValueBySelectedOptions() {
|
|
187
|
+
this.value = this.selectedOptions.at(-1) ?? null;
|
|
188
|
+
}
|
|
189
|
+
_updateSelectedOptionsByValue() {
|
|
190
|
+
this.selectedOptions = this.value ? [this.value] : [];
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Handling for when an option is selected.
|
|
194
|
+
* If multiple selection is enabled, the specified option is added to or removed from the array of selected options.
|
|
195
|
+
* If multiple selection is disabled, the current value is set to the specified option. The selection is not cleared.
|
|
196
|
+
*
|
|
197
|
+
* @param value The value of selected option.
|
|
198
|
+
*/
|
|
199
|
+
_handleSelectOption(value) {
|
|
200
|
+
this.value = value;
|
|
201
|
+
this.selectedOptions = this.multiple ? this.selectedOptions.includes(value) ? this.selectedOptions.filter((option) => option != value) : [...this.selectedOptions, value] : [value];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Removes the last selected option.
|
|
205
|
+
*
|
|
206
|
+
* If multiple selection is enabled, remove the last selected option and the array will eventually become empty.
|
|
207
|
+
* If multiple selection is disabled, directly empty the selected options.
|
|
208
|
+
*/
|
|
209
|
+
_removeLastSelection() {
|
|
210
|
+
if (this.multiple) {
|
|
211
|
+
this.selectedOptions = this.selectedOptions.slice(0, -1);
|
|
212
|
+
this.value = this.selectedOptions.at(-1) ?? null;
|
|
213
|
+
} else {
|
|
214
|
+
this.selectedOptions = [];
|
|
215
|
+
this.value = null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
_handleClick() {
|
|
219
|
+
if (this.disabled) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.open = !this.open;
|
|
223
|
+
}
|
|
186
224
|
_handleKeyDown(event) {
|
|
225
|
+
if (!isSimpleKeyEvent(event)) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
187
228
|
const printableCharacter = event.key.trim().length === 1 ? event.key : null;
|
|
188
229
|
if (printableCharacter) {
|
|
189
230
|
event.preventDefault();
|
|
@@ -207,19 +248,12 @@ let DaikinDropdown = class extends LitElement {
|
|
|
207
248
|
break;
|
|
208
249
|
}
|
|
209
250
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
if (!target || !this._items.includes(target)) {
|
|
216
|
-
return;
|
|
251
|
+
_handleKeyDownEscape() {
|
|
252
|
+
if (this.open) {
|
|
253
|
+
this.open = false;
|
|
254
|
+
} else {
|
|
255
|
+
this._removeLastSelection();
|
|
217
256
|
}
|
|
218
|
-
this._hasSelectedItem = true;
|
|
219
|
-
this._selectedItemLabel = target.textContent ?? "";
|
|
220
|
-
this.value = target.value;
|
|
221
|
-
this.open = false;
|
|
222
|
-
this.dispatchEvent(new Event("change"));
|
|
223
257
|
}
|
|
224
258
|
/**
|
|
225
259
|
* Handle `focusin` event to remember last focused item.
|
|
@@ -241,14 +275,28 @@ let DaikinDropdown = class extends LitElement {
|
|
|
241
275
|
const item = items.find((item2) => item2 === this._lastFocusedItem) ?? items.find((item2) => item2.value === this.value) ?? items.at(0);
|
|
242
276
|
item == null ? void 0 : item.focus();
|
|
243
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Handle `select` event from `daikin-dropdown-item`.
|
|
280
|
+
*/
|
|
281
|
+
_handleSelect(event) {
|
|
282
|
+
this._handleSelectOption(event.target.value);
|
|
283
|
+
if (!this.multiple) {
|
|
284
|
+
this.open = false;
|
|
285
|
+
}
|
|
286
|
+
this.dispatchEvent(new Event("change"));
|
|
287
|
+
}
|
|
288
|
+
_handleSlotChange() {
|
|
289
|
+
this._updateItemsSelectable();
|
|
290
|
+
}
|
|
244
291
|
render() {
|
|
245
292
|
return html`<div class="w-full relative" @keydown=${this._handleKeyDown}>
|
|
246
293
|
<button
|
|
294
|
+
${ref(this._dropdownRef)}
|
|
247
295
|
type="button"
|
|
248
296
|
class=${cvaButton({
|
|
249
297
|
open: this.open,
|
|
250
298
|
error: this.error,
|
|
251
|
-
placeholder: !this.
|
|
299
|
+
placeholder: !this.selectedOptions.length
|
|
252
300
|
})}
|
|
253
301
|
?disabled=${this.disabled}
|
|
254
302
|
role="combobox"
|
|
@@ -261,18 +309,19 @@ let DaikinDropdown = class extends LitElement {
|
|
|
261
309
|
@click=${this._handleClick}
|
|
262
310
|
${this._autoUpdateController.refReference()}
|
|
263
311
|
>
|
|
264
|
-
${this.
|
|
312
|
+
${this.selectedOptions.length ? this.multiple && this.selectedOptions.length > (this.maxLabels ?? 0) ? `${this.selectedOptions.length} items selected` : this._selectionLabels.join(", ") : this.placeholder}
|
|
265
313
|
</button>
|
|
266
314
|
<div
|
|
267
315
|
id="dropdown-items"
|
|
268
316
|
popover
|
|
269
|
-
class="floating-unready:hidden absolute left-[--floating-x,0] top-[--floating-y,0] min-w-[--floating-width] max-h-[12.5rem] overflow-y-auto opacity-1 transition-[opacity] rounded
|
|
317
|
+
class="floating-unready:hidden absolute left-[--floating-x,0] top-[--floating-y,0] min-w-[--floating-width] max-h-[12.5rem] border border-ddt-color-divider overflow-y-auto opacity-1 transition-[opacity] rounded"
|
|
270
318
|
aria-label=${ifDefined(this._label ?? void 0)}
|
|
271
319
|
role="listbox"
|
|
272
320
|
@floating-ready=${this._handleFloatingReady}
|
|
273
321
|
${this._autoUpdateController.refFloating()}
|
|
274
322
|
>
|
|
275
323
|
<slot
|
|
324
|
+
@slotchange=${this._handleSlotChange}
|
|
276
325
|
@select=${this._handleSelect}
|
|
277
326
|
@focusin=${this._handleFocusIn}
|
|
278
327
|
></slot>
|
|
@@ -287,15 +336,37 @@ let DaikinDropdown = class extends LitElement {
|
|
|
287
336
|
this._clickOutsideController.directive(this.open && !this.disabled)}
|
|
288
337
|
</div>`;
|
|
289
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Focuses on the inner button.
|
|
341
|
+
* @param options focus options
|
|
342
|
+
*/
|
|
290
343
|
focus(options) {
|
|
291
344
|
var _a;
|
|
292
345
|
(_a = this._button) == null ? void 0 : _a.focus(options);
|
|
293
346
|
}
|
|
347
|
+
willUpdate(changedProperties) {
|
|
348
|
+
if (!this._initialUpdateCompleted) {
|
|
349
|
+
if (!!this.selectedOptions.length && (!this.value || !this.selectedOptions.includes(this.value))) {
|
|
350
|
+
this._updateValueBySelectedOptions();
|
|
351
|
+
} else if (!!this.value && !this.selectedOptions.length) {
|
|
352
|
+
this.selectedOptions = [this.value];
|
|
353
|
+
}
|
|
354
|
+
this._initialUpdateCompleted = true;
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const hasChangedValue = changedProperties.has("value");
|
|
358
|
+
const hasChangedSelectedOptions = changedProperties.has("selectedOptions");
|
|
359
|
+
if (hasChangedValue && !hasChangedSelectedOptions) {
|
|
360
|
+
this._updateSelectedOptionsByValue();
|
|
361
|
+
}
|
|
362
|
+
if (!hasChangedValue && hasChangedSelectedOptions) {
|
|
363
|
+
this._updateValueBySelectedOptions();
|
|
364
|
+
}
|
|
365
|
+
}
|
|
294
366
|
updated(changedProperties) {
|
|
295
367
|
var _a;
|
|
296
368
|
if (changedProperties.has("value")) {
|
|
297
369
|
this._updateFormValue();
|
|
298
|
-
this._reflectItemsAndLabel();
|
|
299
370
|
}
|
|
300
371
|
if (changedProperties.has("open") || changedProperties.has("disabled")) {
|
|
301
372
|
(_a = this._autoUpdateController.floatingElement) == null ? void 0 : _a.togglePopover(
|
|
@@ -305,7 +376,20 @@ let DaikinDropdown = class extends LitElement {
|
|
|
305
376
|
this.focus();
|
|
306
377
|
}
|
|
307
378
|
}
|
|
379
|
+
if (changedProperties.has("selectedOptions")) {
|
|
380
|
+
const items = this._items;
|
|
381
|
+
for (const item of items) {
|
|
382
|
+
item.selected = this.selectedOptions.includes(item.value);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (changedProperties.has("multiple")) {
|
|
386
|
+
this._updateItemsSelectable();
|
|
387
|
+
}
|
|
308
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* This method is used by `daikin-input-group` to reflect it's attributes to this component.
|
|
391
|
+
* @private
|
|
392
|
+
*/
|
|
309
393
|
reflectInputGroup(inputGroup) {
|
|
310
394
|
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
311
395
|
this.disabled = !!inputGroup.disabled;
|
|
@@ -345,6 +429,15 @@ __decorateClass([
|
|
|
345
429
|
__decorateClass([
|
|
346
430
|
property({ type: Boolean, reflect: true })
|
|
347
431
|
], DaikinDropdown.prototype, "open", 2);
|
|
432
|
+
__decorateClass([
|
|
433
|
+
property({ type: Boolean, reflect: true })
|
|
434
|
+
], DaikinDropdown.prototype, "multiple", 2);
|
|
435
|
+
__decorateClass([
|
|
436
|
+
property({ type: Array, attribute: false })
|
|
437
|
+
], DaikinDropdown.prototype, "selectedOptions", 2);
|
|
438
|
+
__decorateClass([
|
|
439
|
+
property({ type: Number, reflect: true, attribute: "max-labels" })
|
|
440
|
+
], DaikinDropdown.prototype, "maxLabels", 2);
|
|
348
441
|
__decorateClass([
|
|
349
442
|
queryAssignedElements({ selector: "daikin-dropdown-item" })
|
|
350
443
|
], DaikinDropdown.prototype, "_items", 2);
|
|
@@ -354,14 +447,8 @@ __decorateClass([
|
|
|
354
447
|
__decorateClass([
|
|
355
448
|
state()
|
|
356
449
|
], DaikinDropdown.prototype, "_label", 2);
|
|
357
|
-
__decorateClass([
|
|
358
|
-
state()
|
|
359
|
-
], DaikinDropdown.prototype, "_hasSelectedItem", 2);
|
|
360
|
-
__decorateClass([
|
|
361
|
-
state()
|
|
362
|
-
], DaikinDropdown.prototype, "_selectedItemLabel", 2);
|
|
363
450
|
DaikinDropdown = __decorateClass([
|
|
364
|
-
|
|
451
|
+
ddsElement("daikin-dropdown")
|
|
365
452
|
], DaikinDropdown);
|
|
366
453
|
export {
|
|
367
454
|
DaikinDropdown
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DDSElement } from "../../base/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* The dropdown item (option) component that can be used within `daikin-dropdown` component.
|
|
4
4
|
*
|
|
@@ -11,11 +11,15 @@ import { LitElement } from 'lit';
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
*
|
|
14
|
+
* ```js
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/dropdown-item/index.js";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
14
18
|
* ```html
|
|
15
19
|
* <daikin-dropdown-item value="value">Dropdown item</daikin-dropdown-item>
|
|
16
20
|
* ```
|
|
17
21
|
*/
|
|
18
|
-
export declare class DaikinDropdownItem extends
|
|
22
|
+
export declare class DaikinDropdownItem extends DDSElement {
|
|
19
23
|
static readonly styles: import('lit').CSSResult;
|
|
20
24
|
/**
|
|
21
25
|
* Form value of the dropdown item.
|
|
@@ -30,9 +34,18 @@ export declare class DaikinDropdownItem extends LitElement {
|
|
|
30
34
|
* Set automatically by `daikin-dropdown` component.
|
|
31
35
|
*/
|
|
32
36
|
selected: boolean;
|
|
33
|
-
|
|
37
|
+
selectable: boolean;
|
|
38
|
+
private _focusableElement;
|
|
34
39
|
private _handleClick;
|
|
40
|
+
private _handleChange;
|
|
41
|
+
private _handleKeydown;
|
|
42
|
+
private _handleMousedown;
|
|
43
|
+
private _emitSelect;
|
|
35
44
|
render(): import('lit-html').TemplateResult<1>;
|
|
45
|
+
/**
|
|
46
|
+
* Focuses on the inner button.
|
|
47
|
+
* @param options focus options
|
|
48
|
+
*/
|
|
36
49
|
focus(options?: FocusOptions): void;
|
|
37
50
|
}
|
|
38
51
|
declare global {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import { css, unsafeCSS,
|
|
3
|
-
import { property, query
|
|
2
|
+
import { css, unsafeCSS, html } from "lit";
|
|
3
|
+
import { property, query } from "lit/decorators.js";
|
|
4
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
5
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
6
|
+
import "../../base/define.js";
|
|
4
7
|
import tailwindStyles from "../../tailwind.css.js";
|
|
8
|
+
import { isSimilarToClick } from "../../utils/is-similar-to-click.js";
|
|
9
|
+
import "../checkbox/daikin-checkbox.js";
|
|
5
10
|
var __defProp = Object.defineProperty;
|
|
6
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
12
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -16,73 +21,133 @@ const cvaOption = cva(
|
|
|
16
21
|
[
|
|
17
22
|
"flex",
|
|
18
23
|
"items-center",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
24
|
+
"gap-1",
|
|
25
|
+
"size-full",
|
|
21
26
|
"min-h-12",
|
|
22
|
-
"text-ddt-color-common-text-primary",
|
|
23
|
-
"bg-ddt-color-common-background-default",
|
|
24
|
-
"p-3",
|
|
25
27
|
"font-daikinSerif",
|
|
26
|
-
"leading-
|
|
28
|
+
"leading-[130%]",
|
|
27
29
|
"text-left",
|
|
30
|
+
"relative",
|
|
28
31
|
"focus-visible:outline",
|
|
29
32
|
"focus-visible:outline-2",
|
|
30
33
|
"focus-visible:-outline-offset-2",
|
|
31
|
-
"focus-visible:outline-ddt-color-common-border-focus"
|
|
32
|
-
"disabled:text-ddt-color-common-disabled"
|
|
34
|
+
"focus-visible:outline-ddt-color-common-border-focus"
|
|
33
35
|
],
|
|
34
36
|
{
|
|
35
37
|
variants: {
|
|
36
38
|
selected: {
|
|
37
39
|
false: [
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
+
"var-color-ddt-color-common-background-default/color-primary",
|
|
41
|
+
"hover:var-color-ddt-color-common-surface-hover/color-primary",
|
|
42
|
+
"active:var-color-ddt-color-common-surface-press/color-primary"
|
|
40
43
|
],
|
|
41
44
|
true: [
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
+
"var-color-ddt-color-common-surface-selected-default/color-primary",
|
|
46
|
+
"hover:var-color-ddt-color-common-surface-selected-hover/color-primary",
|
|
47
|
+
"active:var-color-ddt-color-common-surface-selected-press/color-primary",
|
|
45
48
|
"after:i-daikin-dropdown-check",
|
|
46
|
-
"after:size-6"
|
|
49
|
+
"after:size-6",
|
|
50
|
+
"after:flex-none"
|
|
47
51
|
]
|
|
52
|
+
},
|
|
53
|
+
disabled: {
|
|
54
|
+
false: [
|
|
55
|
+
"text-ddt-color-common-text-primary",
|
|
56
|
+
"bg-[--color-primary]",
|
|
57
|
+
"cursor-pointer"
|
|
58
|
+
],
|
|
59
|
+
true: [
|
|
60
|
+
"text-ddt-color-common-disabled",
|
|
61
|
+
"bg-ddt-color-common-background-default"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
multiple: {
|
|
65
|
+
false: ["justify-between", "p-3"],
|
|
66
|
+
true: ["after:hidden"]
|
|
48
67
|
}
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
70
|
);
|
|
52
|
-
let DaikinDropdownItem = class extends
|
|
71
|
+
let DaikinDropdownItem = class extends DDSElement {
|
|
53
72
|
constructor() {
|
|
54
73
|
super(...arguments);
|
|
55
74
|
this.value = "";
|
|
56
75
|
this.disabled = false;
|
|
57
76
|
this.selected = false;
|
|
77
|
+
this.selectable = false;
|
|
58
78
|
}
|
|
59
|
-
_handleClick() {
|
|
60
|
-
if (this.disabled) {
|
|
79
|
+
_handleClick(event) {
|
|
80
|
+
if (this.disabled || event.target.tagName === "DAIKIN-CHECKBOX") {
|
|
61
81
|
return;
|
|
62
82
|
}
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
);
|
|
83
|
+
this._emitSelect();
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
}
|
|
86
|
+
_handleChange(event) {
|
|
87
|
+
this._emitSelect();
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
}
|
|
90
|
+
_handleKeydown(event) {
|
|
91
|
+
if (!isSimilarToClick(event.key) || this.disabled) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this._emitSelect();
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
}
|
|
97
|
+
_handleMousedown(event) {
|
|
98
|
+
if (event.detail === 2) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_emitSelect() {
|
|
103
|
+
this.dispatchEvent(new Event("select", { bubbles: true }));
|
|
68
104
|
}
|
|
69
105
|
render() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
const optionClassName = cvaOption({
|
|
107
|
+
selected: this.selected,
|
|
108
|
+
disabled: this.disabled,
|
|
109
|
+
multiple: this.selectable
|
|
110
|
+
});
|
|
111
|
+
return this.selectable ? html`<span
|
|
112
|
+
class=${optionClassName}
|
|
113
|
+
data-value=${this.value}
|
|
114
|
+
role="option"
|
|
115
|
+
aria-selected=${this.selected}
|
|
116
|
+
tabindex="-1"
|
|
117
|
+
aria-disabled=${this.disabled}
|
|
118
|
+
@click=${this._handleClick}
|
|
119
|
+
@keydown=${this._handleKeydown}
|
|
120
|
+
@mousedown=${this._handleMousedown}
|
|
121
|
+
>
|
|
122
|
+
<daikin-checkbox
|
|
123
|
+
class="size-full part-[label]:p-2 part-[label]:cursor-pointer"
|
|
124
|
+
check-state=${this.selected ? "checked" : "unchecked"}
|
|
125
|
+
tabindex="-1"
|
|
126
|
+
?disabled=${this.disabled}
|
|
127
|
+
@change=${this._handleChange}
|
|
128
|
+
>
|
|
129
|
+
<slot></slot>
|
|
130
|
+
</daikin-checkbox>
|
|
131
|
+
</span>` : html`<button
|
|
132
|
+
type="button"
|
|
133
|
+
class=${optionClassName}
|
|
134
|
+
data-value=${this.value}
|
|
135
|
+
role="option"
|
|
136
|
+
aria-selected=${this.selected}
|
|
137
|
+
tabindex="-1"
|
|
138
|
+
?disabled=${this.disabled}
|
|
139
|
+
@click=${this._handleClick}
|
|
140
|
+
>
|
|
141
|
+
<slot></slot>
|
|
142
|
+
</button>`;
|
|
82
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Focuses on the inner button.
|
|
146
|
+
* @param options focus options
|
|
147
|
+
*/
|
|
83
148
|
focus(options) {
|
|
84
149
|
var _a;
|
|
85
|
-
(_a = this.
|
|
150
|
+
(_a = this._focusableElement) == null ? void 0 : _a.focus(options);
|
|
86
151
|
}
|
|
87
152
|
};
|
|
88
153
|
DaikinDropdownItem.styles = css`
|
|
@@ -103,10 +168,13 @@ __decorateClass([
|
|
|
103
168
|
property({ type: Boolean, reflect: true })
|
|
104
169
|
], DaikinDropdownItem.prototype, "selected", 2);
|
|
105
170
|
__decorateClass([
|
|
106
|
-
|
|
107
|
-
], DaikinDropdownItem.prototype, "
|
|
171
|
+
property({ type: Boolean, reflect: true })
|
|
172
|
+
], DaikinDropdownItem.prototype, "selectable", 2);
|
|
173
|
+
__decorateClass([
|
|
174
|
+
query("button,span[role=option]")
|
|
175
|
+
], DaikinDropdownItem.prototype, "_focusableElement", 2);
|
|
108
176
|
DaikinDropdownItem = __decorateClass([
|
|
109
|
-
|
|
177
|
+
ddsElement("daikin-dropdown-item")
|
|
110
178
|
], DaikinDropdownItem);
|
|
111
179
|
export {
|
|
112
180
|
DaikinDropdownItem
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DDSElement } from "../../base/index.js";
|
|
2
2
|
import { MergeVariantProps } from "../../type-utils.js";
|
|
3
3
|
import { icons } from "./icons.json.js";
|
|
4
4
|
export declare const iconList: string[];
|
|
@@ -29,7 +29,7 @@ export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
|
29
29
|
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export declare class DaikinIcon extends
|
|
32
|
+
export declare class DaikinIcon extends DDSElement {
|
|
33
33
|
static readonly styles: import('lit').CSSResult;
|
|
34
34
|
/**
|
|
35
35
|
* Specify the name of the icon
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import { css, unsafeCSS,
|
|
3
|
-
import { property
|
|
2
|
+
import { css, unsafeCSS, html } from "lit";
|
|
3
|
+
import { property } from "lit/decorators.js";
|
|
4
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
5
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
6
|
+
import "../../base/define.js";
|
|
4
7
|
import tailwindStyles from "../../tailwind.css.js";
|
|
5
8
|
import { icons } from "./icons.json.js";
|
|
6
9
|
var __defProp = Object.defineProperty;
|
|
@@ -29,7 +32,7 @@ const cvaIcon = cva(["block"], {
|
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
|
-
let DaikinIcon = class extends
|
|
35
|
+
let DaikinIcon = class extends DDSElement {
|
|
33
36
|
constructor() {
|
|
34
37
|
super(...arguments);
|
|
35
38
|
this.icon = null;
|
|
@@ -84,7 +87,7 @@ __decorateClass([
|
|
|
84
87
|
property({ type: String, reflect: true })
|
|
85
88
|
], DaikinIcon.prototype, "size", 2);
|
|
86
89
|
DaikinIcon = __decorateClass([
|
|
87
|
-
|
|
90
|
+
ddsElement("daikin-icon")
|
|
88
91
|
], DaikinIcon);
|
|
89
92
|
export {
|
|
90
93
|
DaikinIcon,
|