@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
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const classVarianceAuthority = require("class-variance-authority");
|
|
4
4
|
const lit = require("lit");
|
|
5
|
-
const
|
|
5
|
+
const ddsElement = require("../../base/dds-element.cjs");
|
|
6
|
+
const decorators = require("../../base/decorators.cjs");
|
|
7
|
+
require("../../base/define.cjs");
|
|
6
8
|
const tailwind = require("../../tailwind.css.cjs");
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __decorateClass = (
|
|
10
|
+
var __decorateClass = (decorators2, target, key, kind) => {
|
|
10
11
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
-
for (var i =
|
|
12
|
-
if (decorator =
|
|
13
|
-
result =
|
|
14
|
-
if (kind && result) __defProp(target, key, result);
|
|
12
|
+
for (var i = decorators2.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators2[i])
|
|
14
|
+
result = decorator(result) || result;
|
|
15
15
|
return result;
|
|
16
16
|
};
|
|
17
17
|
const cvaTitle = classVarianceAuthority.cva([
|
|
@@ -32,14 +32,14 @@ const cvaDescription = classVarianceAuthority.cva([
|
|
|
32
32
|
"not-italic",
|
|
33
33
|
"font-normal"
|
|
34
34
|
])();
|
|
35
|
-
exports.DaikinCardHeader = class DaikinCardHeader extends
|
|
35
|
+
exports.DaikinCardHeader = class DaikinCardHeader extends ddsElement.DDSElement {
|
|
36
36
|
render() {
|
|
37
37
|
return lit.html`<div class="flex w-full gap-1">
|
|
38
38
|
<slot
|
|
39
39
|
name="left-icon"
|
|
40
40
|
class="flex-none icon-size-6 text-ddt-color-common-text-primary"
|
|
41
41
|
></slot>
|
|
42
|
-
<div class="flex-1 flex flex-col pt-0.5 gap-
|
|
42
|
+
<div class="flex-1 flex flex-col pt-0.5 gap-1">
|
|
43
43
|
<slot class=${cvaTitle}></slot>
|
|
44
44
|
<slot name="description" class=${cvaDescription}></slot>
|
|
45
45
|
</div>
|
|
@@ -55,5 +55,5 @@ exports.DaikinCardHeader.styles = lit.css`
|
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
exports.DaikinCardHeader = __decorateClass([
|
|
58
|
-
|
|
58
|
+
decorators.ddsElement("daikin-card-header")
|
|
59
59
|
], exports.DaikinCardHeader);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DDSElement } from "../../base/index.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* `daikin-card-header` is used to represent header of the card component, and is used as a child element of the `daikin-card` component.
|
|
4
4
|
*
|
|
@@ -11,6 +11,10 @@ import { LitElement } from 'lit';
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
*
|
|
14
|
+
* ```js
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/card-header/index.js";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
14
18
|
* ```html
|
|
15
19
|
* <!-- See `daikin-card` component for complete example. -->
|
|
16
20
|
* <daikin-card-header>
|
|
@@ -20,7 +24,7 @@ import { LitElement } from 'lit';
|
|
|
20
24
|
* </daikin-card-header>
|
|
21
25
|
* ```
|
|
22
26
|
*/
|
|
23
|
-
export declare class DaikinCardHeader extends
|
|
27
|
+
export declare class DaikinCardHeader extends DDSElement {
|
|
24
28
|
static styles: import('lit').CSSResult;
|
|
25
29
|
render(): import('lit-html').TemplateResult<1>;
|
|
26
30
|
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ref_js = require("lit/directives/ref.js");
|
|
7
|
+
const repeat_js = require("lit/directives/repeat.js");
|
|
8
|
+
const ddsElement = require("../../base/dds-element.cjs");
|
|
9
|
+
const decorators = require("../../base/decorators.cjs");
|
|
10
|
+
require("../../base/define.cjs");
|
|
11
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
12
|
+
require("../icon-button/daikin-icon-button.cjs");
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __decorateClass = (decorators2, target, key, kind) => {
|
|
16
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
17
|
+
for (var i = decorators2.length - 1, decorator; i >= 0; i--)
|
|
18
|
+
if (decorator = decorators2[i])
|
|
19
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
20
|
+
if (kind && result) __defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
const DEFAULT_TRANSITION_DURATION = "600ms";
|
|
24
|
+
const cvaButton = classVarianceAuthority.cva(
|
|
25
|
+
[
|
|
26
|
+
"flex",
|
|
27
|
+
"justify-center",
|
|
28
|
+
"items-center",
|
|
29
|
+
"flex-none",
|
|
30
|
+
"size-6",
|
|
31
|
+
"text-current"
|
|
32
|
+
],
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
intent: {
|
|
36
|
+
previous: ["i-daikin-chevron-left"],
|
|
37
|
+
next: ["i-daikin-chevron-right"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
const INDICATOR_CLASS_NAME = classVarianceAuthority.cva([
|
|
43
|
+
"flex",
|
|
44
|
+
"justify-center",
|
|
45
|
+
"items-center",
|
|
46
|
+
"size-3",
|
|
47
|
+
"m-0.5",
|
|
48
|
+
"rounded-full",
|
|
49
|
+
"transition",
|
|
50
|
+
"bg-ddt-color-common-neutral-default",
|
|
51
|
+
"relative",
|
|
52
|
+
"hover:bg-ddt-color-common-neutral-hover",
|
|
53
|
+
"active:bg-ddt-color-common-neutral-press",
|
|
54
|
+
"aria-selected:after:block",
|
|
55
|
+
"aria-selected:after:size-4",
|
|
56
|
+
"aria-selected:after:bg-ddt-color-common-brand-default",
|
|
57
|
+
"aria-selected:after:absolute",
|
|
58
|
+
"aria-selected:after:rounded-full",
|
|
59
|
+
"aria-selected:focus-visible:after:outline",
|
|
60
|
+
"aria-selected:focus-visible:after:outline-1",
|
|
61
|
+
"aria-selected:focus-visible:after:outline-offset-1",
|
|
62
|
+
"aria-selected:focus-visible:after:outline-ddt-color-common-border-focus"
|
|
63
|
+
])();
|
|
64
|
+
exports.DaikinCarousel = class DaikinCarousel extends ddsElement.DDSElement {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
this.currentIndex = 0;
|
|
68
|
+
this._itemCount = 0;
|
|
69
|
+
this._prevButton = ref_js.createRef();
|
|
70
|
+
this._nextButton = ref_js.createRef();
|
|
71
|
+
this._indicatorButtonsContainer = ref_js.createRef();
|
|
72
|
+
}
|
|
73
|
+
_emitSelect(operation, beforeCurrentIndex) {
|
|
74
|
+
this.dispatchEvent(
|
|
75
|
+
new CustomEvent("select", {
|
|
76
|
+
detail: { operation, beforeCurrentIndex }
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
_handleClickIndicator(index) {
|
|
81
|
+
const beforeCurrentIndex = this.currentIndex;
|
|
82
|
+
this.currentIndex = index;
|
|
83
|
+
this._emitSelect("indicator", beforeCurrentIndex);
|
|
84
|
+
}
|
|
85
|
+
_handleKeydownIndicator(event) {
|
|
86
|
+
var _a;
|
|
87
|
+
const moveOffset = {
|
|
88
|
+
ArrowRight: 1,
|
|
89
|
+
ArrowLeft: -1
|
|
90
|
+
}[event.key];
|
|
91
|
+
if (!moveOffset) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const buttons = [
|
|
95
|
+
...((_a = this._indicatorButtonsContainer.value) == null ? void 0 : _a.querySelectorAll("button")) ?? []
|
|
96
|
+
];
|
|
97
|
+
this._moveBy(moveOffset);
|
|
98
|
+
buttons[this.currentIndex].focus();
|
|
99
|
+
}
|
|
100
|
+
_handleSlotchange() {
|
|
101
|
+
const items = this._items;
|
|
102
|
+
this._itemCount = items.length;
|
|
103
|
+
for (const [index, item] of items.entries()) {
|
|
104
|
+
item.label = `${index + 1} of ${this._itemCount}`;
|
|
105
|
+
}
|
|
106
|
+
this._updateItemActive();
|
|
107
|
+
}
|
|
108
|
+
_moveBy(moveOffset) {
|
|
109
|
+
const newIndex = this.currentIndex + moveOffset;
|
|
110
|
+
if (newIndex < 0 || newIndex >= this._itemCount) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const oldIndex = this.currentIndex;
|
|
114
|
+
this.currentIndex = newIndex;
|
|
115
|
+
this._emitSelect(moveOffset === 1 ? "next" : "prev", oldIndex);
|
|
116
|
+
}
|
|
117
|
+
_updateItemActive() {
|
|
118
|
+
const items = this._items;
|
|
119
|
+
if (items.length - 1 < this.currentIndex) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (this.currentIndex < 0) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
for (const [index, item] of this._items.entries()) {
|
|
126
|
+
item.active = index === this.currentIndex;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
render() {
|
|
130
|
+
return lit.html`<div
|
|
131
|
+
class="flex justify-center items-center flex-col gap-8"
|
|
132
|
+
style=${`--total:${this._itemCount};--current:${this.currentIndex};`}
|
|
133
|
+
>
|
|
134
|
+
<div class="flex justify-center items-center w-full gap-4">
|
|
135
|
+
<daikin-icon-button
|
|
136
|
+
${ref_js.ref(this._prevButton)}
|
|
137
|
+
variant="ghost"
|
|
138
|
+
color="neutral"
|
|
139
|
+
button-aria-label="Previous"
|
|
140
|
+
?disabled=${this.currentIndex <= 0}
|
|
141
|
+
@click=${() => this._moveBy(-1)}
|
|
142
|
+
>
|
|
143
|
+
<span class=${cvaButton({ intent: "previous" })}></span>
|
|
144
|
+
</daikin-icon-button>
|
|
145
|
+
<div
|
|
146
|
+
class="w-full overflow-clip relative focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ddt-color-common-border-focus"
|
|
147
|
+
aria-live="polite"
|
|
148
|
+
>
|
|
149
|
+
<div
|
|
150
|
+
class="flex w-[calc(100%*var(--total))] transition-transform translate-x-[calc(-100%*var(--current)/var(--total))] duration-[--ddc-transition-duration]"
|
|
151
|
+
>
|
|
152
|
+
<slot @slotchange=${this._handleSlotchange}></slot>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
<daikin-icon-button
|
|
156
|
+
${ref_js.ref(this._nextButton)}
|
|
157
|
+
variant="ghost"
|
|
158
|
+
color="neutral"
|
|
159
|
+
button-aria-label="Next"
|
|
160
|
+
?disabled=${this.currentIndex >= this._itemCount - 1}
|
|
161
|
+
@click=${() => this._moveBy(1)}
|
|
162
|
+
>
|
|
163
|
+
<span class=${cvaButton({ intent: "next" })}></span>
|
|
164
|
+
</daikin-icon-button>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="flex gap-3">
|
|
167
|
+
<div
|
|
168
|
+
${ref_js.ref(this._indicatorButtonsContainer)}
|
|
169
|
+
class="flex items-center gap-4"
|
|
170
|
+
role="tablist"
|
|
171
|
+
@keydown=${this._handleKeydownIndicator}
|
|
172
|
+
>
|
|
173
|
+
${repeat_js.repeat(
|
|
174
|
+
this._items,
|
|
175
|
+
(_, index) => index,
|
|
176
|
+
(_, index) => lit.html`<button
|
|
177
|
+
class=${INDICATOR_CLASS_NAME}
|
|
178
|
+
aria-label="Slide ${index + 1}"
|
|
179
|
+
aria-selected=${this.currentIndex === index}
|
|
180
|
+
role="tab"
|
|
181
|
+
tabindex=${this.currentIndex === index ? 0 : -1}
|
|
182
|
+
@click=${() => this._handleClickIndicator(index)}
|
|
183
|
+
></button>`
|
|
184
|
+
)}
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>`;
|
|
188
|
+
}
|
|
189
|
+
updated(changedProperties) {
|
|
190
|
+
if (changedProperties.has("currentIndex")) {
|
|
191
|
+
this._updateItemActive();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
exports.DaikinCarousel.styles = lit.css`
|
|
196
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
197
|
+
|
|
198
|
+
:host {
|
|
199
|
+
display: block;
|
|
200
|
+
width: 100%;
|
|
201
|
+
position: relative;
|
|
202
|
+
|
|
203
|
+
--ddc-transition-duration: ${lit.unsafeCSS(DEFAULT_TRANSITION_DURATION)};
|
|
204
|
+
}
|
|
205
|
+
`;
|
|
206
|
+
__decorateClass([
|
|
207
|
+
decorators_js.property({ type: Number, reflect: true, attribute: "current-index" })
|
|
208
|
+
], exports.DaikinCarousel.prototype, "currentIndex", 2);
|
|
209
|
+
__decorateClass([
|
|
210
|
+
decorators_js.queryAssignedElements({ selector: "daikin-carousel-item" })
|
|
211
|
+
], exports.DaikinCarousel.prototype, "_items", 2);
|
|
212
|
+
__decorateClass([
|
|
213
|
+
decorators_js.state()
|
|
214
|
+
], exports.DaikinCarousel.prototype, "_itemCount", 2);
|
|
215
|
+
exports.DaikinCarousel = __decorateClass([
|
|
216
|
+
decorators.ddsElement("daikin-carousel")
|
|
217
|
+
], exports.DaikinCarousel);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { DDSElement } from "../../base/index.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* A carousel is a component that displays multiple pieces of information by sliding left and right within a fixed height area.
|
|
5
|
+
*
|
|
6
|
+
* The carousel component can be operated in several ways (Control, Indicator, and Swipe), but it is not possible to hide all of these, as this would prevent the user from being able to operate the carousel component.
|
|
7
|
+
*
|
|
8
|
+
* Hierarchy:
|
|
9
|
+
* - `daikin-carousel` > `daikin-carousel-item`
|
|
10
|
+
*
|
|
11
|
+
* @fires select - If an item in the carousel is selected in some way, the method used to select it, the index number of the item displayed before it, and the index number of the item currently displayed are passed.
|
|
12
|
+
*
|
|
13
|
+
* @slot - A slot for carousel items. Place `daikin-carousel-item` elements here.
|
|
14
|
+
*
|
|
15
|
+
* @cssprop [--ddc-transition-duration=600ms] - Specify the interval for the slide animation.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* ```js
|
|
20
|
+
* import "@daikin-oss/design-system-web-components/components/carousel/index.js";
|
|
21
|
+
* import "@daikin-oss/design-system-web-components/components/carousel-item/index.js";
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ```html
|
|
25
|
+
* <daikin-carousel>
|
|
26
|
+
* <daikin-carousel-item>Carousel item 1</daikin-carousel-item>
|
|
27
|
+
* <daikin-carousel-item>Carousel item 2</daikin-carousel-item>
|
|
28
|
+
* <daikin-carousel-item>Carousel item 3</daikin-carousel-item>
|
|
29
|
+
* </daikin-carousel>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare class DaikinCarousel extends DDSElement {
|
|
33
|
+
static readonly styles: import('lit').CSSResult;
|
|
34
|
+
/**
|
|
35
|
+
* The index number of the content currently being displayed.
|
|
36
|
+
*/
|
|
37
|
+
currentIndex: number;
|
|
38
|
+
private readonly _items;
|
|
39
|
+
private _itemCount;
|
|
40
|
+
private _prevButton;
|
|
41
|
+
private _nextButton;
|
|
42
|
+
private _indicatorButtonsContainer;
|
|
43
|
+
private _emitSelect;
|
|
44
|
+
private _handleClickIndicator;
|
|
45
|
+
private _handleKeydownIndicator;
|
|
46
|
+
private _handleSlotchange;
|
|
47
|
+
private _moveBy;
|
|
48
|
+
private _updateItemActive;
|
|
49
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
50
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
51
|
+
}
|
|
52
|
+
declare global {
|
|
53
|
+
interface HTMLElementTagNameMap {
|
|
54
|
+
"daikin-carousel": DaikinCarousel;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinCarousel = require("./daikin-carousel.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinCarousel", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinCarousel.DaikinCarousel
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-carousel.cjs";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const lit = require("lit");
|
|
4
|
+
const decorators_js = require("lit/decorators.js");
|
|
5
|
+
const ddsElement = require("../../base/dds-element.cjs");
|
|
6
|
+
const decorators = require("../../base/decorators.cjs");
|
|
7
|
+
require("../../base/define.cjs");
|
|
8
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __decorateClass = (decorators2, target, key, kind) => {
|
|
12
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13
|
+
for (var i = decorators2.length - 1, decorator; i >= 0; i--)
|
|
14
|
+
if (decorator = decorators2[i])
|
|
15
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
exports.DaikinCarouselItem = class DaikinCarouselItem extends ddsElement.DDSElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.label = "";
|
|
23
|
+
this.active = false;
|
|
24
|
+
this._hasTextContents = false;
|
|
25
|
+
}
|
|
26
|
+
_handleFooterSlotChange() {
|
|
27
|
+
this._hasTextContents = this._titleElements.length > 0 || this._descriptionElements.length > 0;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return lit.html`<div
|
|
31
|
+
class="flex flex-col flex-none gap-3 text-ddt-color-common-text-primary font-daikinSerif overflow-hidden"
|
|
32
|
+
role="tabpanel"
|
|
33
|
+
aria-label=${this.label}
|
|
34
|
+
aria-hidden=${!this.active}
|
|
35
|
+
>
|
|
36
|
+
<slot></slot>
|
|
37
|
+
<div
|
|
38
|
+
class="visible:flex flex-col gap-2"
|
|
39
|
+
?hidden=${!this._hasTextContents}
|
|
40
|
+
>
|
|
41
|
+
<slot
|
|
42
|
+
name="title"
|
|
43
|
+
class="leading-[130%] font-bold"
|
|
44
|
+
@slotchange=${this._handleFooterSlotChange}
|
|
45
|
+
></slot>
|
|
46
|
+
<slot
|
|
47
|
+
name="description"
|
|
48
|
+
class="text-sm"
|
|
49
|
+
@slotchange=${this._handleFooterSlotChange}
|
|
50
|
+
></slot>
|
|
51
|
+
</div>
|
|
52
|
+
</div>`;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.DaikinCarouselItem.styles = lit.css`
|
|
56
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
57
|
+
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
__decorateClass([
|
|
64
|
+
decorators_js.property({ type: String, attribute: false })
|
|
65
|
+
], exports.DaikinCarouselItem.prototype, "label", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
decorators_js.property({ type: Boolean, attribute: false })
|
|
68
|
+
], exports.DaikinCarouselItem.prototype, "active", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
decorators_js.queryAssignedElements({ slot: "title" })
|
|
71
|
+
], exports.DaikinCarouselItem.prototype, "_titleElements", 2);
|
|
72
|
+
__decorateClass([
|
|
73
|
+
decorators_js.queryAssignedElements({ slot: "description" })
|
|
74
|
+
], exports.DaikinCarouselItem.prototype, "_descriptionElements", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
decorators_js.state()
|
|
77
|
+
], exports.DaikinCarouselItem.prototype, "_hasTextContents", 2);
|
|
78
|
+
exports.DaikinCarouselItem = __decorateClass([
|
|
79
|
+
decorators.ddsElement("daikin-carousel-item")
|
|
80
|
+
], exports.DaikinCarouselItem);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DDSElement } from "../../base/index.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* The carousel item component is a child element within the `daikin-carousel` component.
|
|
4
|
+
*
|
|
5
|
+
* Hierarchy:
|
|
6
|
+
* - `daikin-carousel` > `daikin-carousel-item`
|
|
7
|
+
*
|
|
8
|
+
* @slot - A slot for an image or slide.
|
|
9
|
+
* @slot title - A slot for title text.
|
|
10
|
+
* @slot description - A slot for description text.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* ```js
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/carousel-item/index.js";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ```html
|
|
19
|
+
* <daikin-carousel-item>Carousel item</daikin-carousel-item>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class DaikinCarouselItem extends DDSElement {
|
|
23
|
+
static readonly styles: import('lit').CSSResult;
|
|
24
|
+
/**
|
|
25
|
+
* _Internal use._
|
|
26
|
+
* Item's aria label.
|
|
27
|
+
* Controlled by `daikin-carousel`.
|
|
28
|
+
*
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
label: string;
|
|
32
|
+
/**
|
|
33
|
+
* _Internal use._
|
|
34
|
+
* Whether this item is displayed in the carousel or not.
|
|
35
|
+
* Controlled by `daikin-carousel`.
|
|
36
|
+
*
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
active: boolean;
|
|
40
|
+
private readonly _titleElements;
|
|
41
|
+
private readonly _descriptionElements;
|
|
42
|
+
private _hasTextContents;
|
|
43
|
+
private _handleFooterSlotChange;
|
|
44
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
45
|
+
}
|
|
46
|
+
declare global {
|
|
47
|
+
interface HTMLElementTagNameMap {
|
|
48
|
+
"daikin-carousel-item": DaikinCarouselItem;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinCarouselItem = require("./daikin-carousel-item.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinCarouselItem", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinCarouselItem.DaikinCarouselItem
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-carousel-item.cjs";
|
|
@@ -3,13 +3,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const classVarianceAuthority = require("class-variance-authority");
|
|
4
4
|
const lit = require("lit");
|
|
5
5
|
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ddsElement = require("../../base/dds-element.cjs");
|
|
7
|
+
const decorators = require("../../base/decorators.cjs");
|
|
8
|
+
require("../../base/define.cjs");
|
|
6
9
|
const tailwind = require("../../tailwind.css.cjs");
|
|
7
10
|
var __defProp = Object.defineProperty;
|
|
8
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __decorateClass = (
|
|
12
|
+
var __decorateClass = (decorators2, target, key, kind) => {
|
|
10
13
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
-
for (var i =
|
|
12
|
-
if (decorator =
|
|
14
|
+
for (var i = decorators2.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators2[i])
|
|
13
16
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
17
|
if (kind && result) __defProp(target, key, result);
|
|
15
18
|
return result;
|
|
@@ -27,6 +30,7 @@ const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
|
|
|
27
30
|
"before:m-auto",
|
|
28
31
|
"before:inset-0",
|
|
29
32
|
"checked:before:i-daikin-checkbox-checked",
|
|
33
|
+
"checked:before:size-3",
|
|
30
34
|
"indeterminate:before:i-daikin-checkbox-indeterminate",
|
|
31
35
|
"indeterminate:before:size-2.5",
|
|
32
36
|
"focus-visible:outline",
|
|
@@ -58,15 +62,19 @@ const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
|
|
|
58
62
|
"disabled:checked:bg-ddt-color-common-disabled",
|
|
59
63
|
"disabled:indeterminate:bg-ddt-color-common-disabled"
|
|
60
64
|
])();
|
|
61
|
-
const cvaLabel = classVarianceAuthority.cva([
|
|
65
|
+
const cvaLabel = classVarianceAuthority.cva([], {
|
|
62
66
|
variants: {
|
|
63
67
|
disabled: {
|
|
64
68
|
false: ["text-ddt-color-common-text-primary"],
|
|
65
69
|
true: ["text-ddt-color-common-disabled"]
|
|
70
|
+
},
|
|
71
|
+
hidden: {
|
|
72
|
+
false: ["inline-block", "pr-2"],
|
|
73
|
+
true: ["hidden"]
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
});
|
|
69
|
-
exports.DaikinCheckbox = class DaikinCheckbox extends
|
|
77
|
+
exports.DaikinCheckbox = class DaikinCheckbox extends ddsElement.DDSElement {
|
|
70
78
|
constructor() {
|
|
71
79
|
super(...arguments);
|
|
72
80
|
this.name = "";
|
|
@@ -80,6 +88,9 @@ exports.DaikinCheckbox = class DaikinCheckbox extends lit.LitElement {
|
|
|
80
88
|
get checked() {
|
|
81
89
|
return this.checkState === "checked";
|
|
82
90
|
}
|
|
91
|
+
get _labelHidden() {
|
|
92
|
+
return this.labelPosition === "hidden";
|
|
93
|
+
}
|
|
83
94
|
/**
|
|
84
95
|
* A property-only accessor for `checkState` provided for convenience.
|
|
85
96
|
* _Getter_: Returns `true` when `checkState` is `"checked"`, and `false` otherwise.
|
|
@@ -92,9 +103,13 @@ exports.DaikinCheckbox = class DaikinCheckbox extends lit.LitElement {
|
|
|
92
103
|
this._internals.setFormValue(this.checked ? this.value : null);
|
|
93
104
|
}
|
|
94
105
|
_handleClick(event) {
|
|
106
|
+
var _a;
|
|
95
107
|
if (this.disabled) {
|
|
96
108
|
event.preventDefault();
|
|
97
109
|
}
|
|
110
|
+
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT") {
|
|
111
|
+
event.stopPropagation();
|
|
112
|
+
}
|
|
98
113
|
}
|
|
99
114
|
_handleChange(event) {
|
|
100
115
|
this.checkState = event.target.checked ? "checked" : "unchecked";
|
|
@@ -102,29 +117,33 @@ exports.DaikinCheckbox = class DaikinCheckbox extends lit.LitElement {
|
|
|
102
117
|
this.dispatchEvent(new Event("change", event));
|
|
103
118
|
}
|
|
104
119
|
render() {
|
|
105
|
-
return lit.html`<label
|
|
120
|
+
return lit.html`<label
|
|
121
|
+
class="group flex gap-2 items-center size-full font-daikinSerif"
|
|
122
|
+
part="label"
|
|
123
|
+
@click=${this._handleClick}
|
|
124
|
+
>
|
|
106
125
|
<span class="p-2">
|
|
107
126
|
<input
|
|
108
127
|
class=${CHECKBOX_CLASS_NAME}
|
|
109
128
|
type="checkbox"
|
|
110
129
|
name=${this.name}
|
|
111
|
-
aria-label=${this.
|
|
112
|
-
.value=${this.value}
|
|
113
|
-
.indeterminate=${this.checkState === "indeterminate"}
|
|
114
|
-
.checked=${this.checked}
|
|
130
|
+
aria-label=${this._labelHidden ? this.label : lit.nothing}
|
|
115
131
|
?disabled=${this.disabled}
|
|
132
|
+
.checked=${this.checked}
|
|
133
|
+
.indeterminate=${this.checkState === "indeterminate"}
|
|
134
|
+
.value=${this.value}
|
|
116
135
|
@change=${this._handleChange}
|
|
117
|
-
@click=${this._handleClick}
|
|
118
136
|
/>
|
|
119
137
|
</span>
|
|
120
|
-
<
|
|
138
|
+
<slot
|
|
121
139
|
class=${cvaLabel({
|
|
122
|
-
disabled: this.disabled
|
|
140
|
+
disabled: this.disabled,
|
|
141
|
+
hidden: this._labelHidden
|
|
123
142
|
})}
|
|
124
|
-
?hidden=${this.
|
|
143
|
+
?hidden=${this._labelHidden}
|
|
125
144
|
>
|
|
126
145
|
${this.label}
|
|
127
|
-
</
|
|
146
|
+
</slot>
|
|
128
147
|
</label>`;
|
|
129
148
|
}
|
|
130
149
|
updated(changedProperties) {
|
|
@@ -160,5 +179,5 @@ __decorateClass([
|
|
|
160
179
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
161
180
|
], exports.DaikinCheckbox.prototype, "disabled", 2);
|
|
162
181
|
exports.DaikinCheckbox = __decorateClass([
|
|
163
|
-
|
|
182
|
+
decorators.ddsElement("daikin-checkbox")
|
|
164
183
|
], exports.DaikinCheckbox);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { DDSElement } from "../../base/index.cjs";
|
|
2
3
|
/**
|
|
3
4
|
* The checkbox component is a UI element that allows users to select one or more options from a list of choices.
|
|
4
5
|
* It functions similarly to the HTML `<input type="checkbox">` tag, enabling users to toggle the selection of each option independently.
|
|
@@ -6,6 +7,10 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
6
7
|
*
|
|
7
8
|
* @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<input type="checkbox">` element.
|
|
8
9
|
*
|
|
10
|
+
* @slot - A slot for the checkbox label content.
|
|
11
|
+
*
|
|
12
|
+
* @csspart label - Change the style of checkbox label.
|
|
13
|
+
*
|
|
9
14
|
* @example
|
|
10
15
|
*
|
|
11
16
|
* ```js
|
|
@@ -16,7 +21,7 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
16
21
|
* <daikin-checkbox label="Checkbox label" name="name" value="value"></daikin-checkbox>
|
|
17
22
|
* ```
|
|
18
23
|
*/
|
|
19
|
-
export declare class DaikinCheckbox extends
|
|
24
|
+
export declare class DaikinCheckbox extends DDSElement {
|
|
20
25
|
static readonly styles: import('lit').CSSResult;
|
|
21
26
|
/**
|
|
22
27
|
* The form name, submitted as a name/value pair when submitting the form.
|
|
@@ -45,6 +50,7 @@ export declare class DaikinCheckbox extends LitElement {
|
|
|
45
50
|
*/
|
|
46
51
|
disabled: boolean;
|
|
47
52
|
get checked(): boolean;
|
|
53
|
+
private get _labelHidden();
|
|
48
54
|
/**
|
|
49
55
|
* A property-only accessor for `checkState` provided for convenience.
|
|
50
56
|
* _Getter_: Returns `true` when `checkState` is `"checked"`, and `false` otherwise.
|