@daikin-oss/design-system-web-components 1.3.2 → 1.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +217 -0
- package/dist/cjs/base/dds-element.cjs +82 -1
- package/dist/cjs/base/dds-element.d.cts +40 -0
- package/dist/cjs/base/dds-form-element.cjs +15 -6
- package/dist/cjs/base/dds-form-element.d.cts +2 -2
- package/dist/cjs/base/dds-property.cjs +11 -0
- package/dist/cjs/base/dds-property.d.cts +92 -0
- package/dist/cjs/base/index.cjs +3 -0
- package/dist/cjs/base/index.d.cts +1 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +3 -2
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +6 -7
- package/dist/cjs/components/avatar/daikin-avatar.cjs +20 -15
- package/dist/cjs/components/avatar/daikin-avatar.d.cts +3 -1
- package/dist/cjs/components/badge/daikin-badge.cjs +154 -0
- package/dist/cjs/components/badge/daikin-badge.d.cts +91 -0
- package/dist/cjs/components/badge/index.cjs +7 -0
- package/dist/cjs/components/badge/index.d.cts +1 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +33 -7
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +38 -6
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +52 -19
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +3 -1
- package/dist/cjs/components/button/daikin-button.cjs +57 -16
- package/dist/cjs/components/button/daikin-button.d.cts +18 -2
- package/dist/cjs/components/calendar/daikin-calendar.cjs +36 -15
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +14 -3
- package/dist/cjs/components/card/daikin-card.cjs +2 -2
- package/dist/cjs/components/card-footer/daikin-card-footer.cjs +1 -0
- package/dist/cjs/components/card-header/daikin-card-header.cjs +1 -0
- package/dist/cjs/components/carousel/daikin-carousel.cjs +2 -1
- package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +3 -2
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +24 -10
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +12 -1
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +12 -3
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +2 -0
- package/dist/cjs/components/chip/daikin-chip.cjs +2 -1
- package/dist/cjs/components/combobox/daikin-combobox.cjs +34 -25
- package/dist/cjs/components/combobox/daikin-combobox.d.cts +9 -2
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +64 -26
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +18 -4
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +17 -19
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +7 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +5 -4
- package/dist/cjs/components/icon/daikin-icon.cjs +24 -11
- package/dist/cjs/components/icon/daikin-icon.d.cts +96 -39
- package/dist/cjs/components/icon/icons.json.cjs +1 -1
- package/dist/cjs/components/icon/icons.json.d.cts +12 -0
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +58 -15
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +17 -3
- package/dist/cjs/components/index.cjs +10 -0
- package/dist/cjs/components/index.d.cts +2 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +112 -11
- package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +8 -1
- package/dist/cjs/components/input-group/daikin-input-group.cjs +29 -13
- package/dist/cjs/components/link/daikin-link.cjs +28 -8
- package/dist/cjs/components/link/daikin-link.d.cts +11 -0
- package/dist/cjs/components/list/daikin-list.cjs +6 -2
- package/dist/cjs/components/list-item/daikin-list-item.cjs +19 -8
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +4 -0
- package/dist/cjs/components/loading/daikin-loading.cjs +8 -3
- package/dist/cjs/components/logo/daikin-logo.cjs +18 -10
- package/dist/cjs/components/logo/daikin-logo.d.cts +4 -0
- package/dist/cjs/components/menu/daikin-menu.cjs +79 -28
- package/dist/cjs/components/menu/daikin-menu.d.cts +29 -2
- package/dist/cjs/components/modal/daikin-modal.cjs +11 -6
- package/dist/cjs/components/modal/daikin-modal.d.cts +2 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +1 -0
- package/dist/cjs/components/modal-header/daikin-modal-header.cjs +3 -3
- package/dist/cjs/components/pagination/daikin-pagination.cjs +6 -5
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +21 -9
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.cts +4 -0
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +2 -1
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +13 -8
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +2 -0
- package/dist/cjs/components/radio/daikin-radio.cjs +14 -9
- package/dist/cjs/components/radio/daikin-radio.d.cts +9 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +15 -8
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +3 -1
- package/dist/cjs/components/select/daikin-select.cjs +4 -3
- package/dist/cjs/components/slider/daikin-slider.cjs +11 -9
- package/dist/cjs/components/slider/daikin-slider.d.cts +15 -0
- package/dist/cjs/components/status-message/daikin-status-message.cjs +123 -0
- package/dist/cjs/components/status-message/daikin-status-message.d.cts +55 -0
- package/dist/cjs/components/status-message/index.cjs +7 -0
- package/dist/cjs/components/status-message/index.d.cts +1 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +10 -4
- package/dist/cjs/components/tab-panels/daikin-tab-panels.cjs +4 -4
- package/dist/cjs/components/table/daikin-table.cjs +11 -10
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +12 -7
- package/dist/cjs/components/table-cell/daikin-table-cell.d.cts +5 -3
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +13 -5
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +6 -2
- package/dist/cjs/components/tabs/daikin-tabs.cjs +9 -3
- package/dist/cjs/components/tabs/daikin-tabs.d.cts +2 -0
- package/dist/cjs/components/text-area/daikin-text-area.cjs +15 -12
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +9 -2
- package/dist/cjs/components/text-field/daikin-text-field.cjs +28 -31
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +11 -2
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +22 -19
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +9 -2
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +40 -19
- package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +23 -1
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +118 -13
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +15 -2
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +14 -2
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +3 -1
- package/dist/cjs/components/toggle/daikin-toggle.cjs +7 -6
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +7 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +37 -12
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +9 -1
- package/dist/cjs/components/tree/daikin-tree.cjs +3 -2
- package/dist/cjs/components/tree/daikin-tree.d.cts +2 -1
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +6 -5
- package/dist/cjs/components/tree-item/daikin-tree-item.d.cts +8 -1
- package/dist/cjs/components/tree-section/daikin-tree-section.cjs +6 -5
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +6 -1
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/calendar-common.cjs +6 -0
- package/dist/cjs/utils/calendar-common.d.cts +7 -0
- package/dist/cjs/utils/notification-common.cjs +0 -94
- package/dist/cjs/utils/notification-common.d.cts +0 -13
- package/dist/cjs-dev/base/dds-element.cjs +92 -1
- package/dist/cjs-dev/base/dds-element.d.cts +40 -0
- package/dist/cjs-dev/base/dds-form-element.cjs +15 -6
- package/dist/cjs-dev/base/dds-form-element.d.cts +2 -2
- package/dist/cjs-dev/base/dds-property.cjs +11 -0
- package/dist/cjs-dev/base/dds-property.d.cts +92 -0
- package/dist/cjs-dev/base/index.cjs +3 -0
- package/dist/cjs-dev/base/index.d.cts +1 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +3 -2
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +6 -7
- package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +20 -15
- package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +3 -1
- package/dist/cjs-dev/components/badge/daikin-badge.cjs +154 -0
- package/dist/cjs-dev/components/badge/daikin-badge.d.cts +91 -0
- package/dist/cjs-dev/components/badge/index.cjs +7 -0
- package/dist/cjs-dev/components/badge/index.d.cts +1 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +33 -7
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +38 -6
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +52 -19
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +3 -1
- package/dist/cjs-dev/components/button/daikin-button.cjs +57 -16
- package/dist/cjs-dev/components/button/daikin-button.d.cts +18 -2
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +36 -15
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +14 -3
- package/dist/cjs-dev/components/card/daikin-card.cjs +2 -2
- package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +1 -0
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +1 -0
- package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +2 -1
- package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +3 -2
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +24 -10
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +12 -1
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +12 -3
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +2 -0
- package/dist/cjs-dev/components/chip/daikin-chip.cjs +2 -1
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +34 -25
- package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +9 -2
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +64 -26
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +18 -4
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +17 -19
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +7 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +5 -4
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +24 -11
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +96 -39
- package/dist/cjs-dev/components/icon/icons.json.cjs +1 -1
- package/dist/cjs-dev/components/icon/icons.json.d.cts +12 -0
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +58 -15
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +17 -3
- package/dist/cjs-dev/components/index.cjs +10 -0
- package/dist/cjs-dev/components/index.d.cts +2 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +112 -11
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +8 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +29 -13
- package/dist/cjs-dev/components/link/daikin-link.cjs +28 -8
- package/dist/cjs-dev/components/link/daikin-link.d.cts +11 -0
- package/dist/cjs-dev/components/list/daikin-list.cjs +6 -2
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +19 -8
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +4 -0
- package/dist/cjs-dev/components/loading/daikin-loading.cjs +8 -3
- package/dist/cjs-dev/components/logo/daikin-logo.cjs +18 -10
- package/dist/cjs-dev/components/logo/daikin-logo.d.cts +4 -0
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +79 -28
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +29 -2
- package/dist/cjs-dev/components/modal/daikin-modal.cjs +11 -6
- package/dist/cjs-dev/components/modal/daikin-modal.d.cts +2 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +1 -0
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +3 -3
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +6 -5
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +21 -9
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.cts +4 -0
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +2 -1
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +13 -8
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +2 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +14 -9
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +9 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +15 -8
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +3 -1
- package/dist/cjs-dev/components/select/daikin-select.cjs +4 -3
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +11 -9
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +15 -0
- package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +123 -0
- package/dist/cjs-dev/components/status-message/daikin-status-message.d.cts +55 -0
- package/dist/cjs-dev/components/status-message/index.cjs +7 -0
- package/dist/cjs-dev/components/status-message/index.d.cts +1 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +10 -4
- package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.cjs +4 -4
- package/dist/cjs-dev/components/table/daikin-table.cjs +11 -10
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +12 -7
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.d.cts +5 -3
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +13 -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 +9 -3
- package/dist/cjs-dev/components/tabs/daikin-tabs.d.cts +2 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +15 -12
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +9 -2
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +28 -31
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +11 -2
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +22 -19
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +9 -2
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +40 -19
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +23 -1
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +118 -13
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +15 -2
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +14 -2
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +3 -1
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +7 -6
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +7 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +37 -12
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +9 -1
- package/dist/cjs-dev/components/tree/daikin-tree.cjs +3 -2
- package/dist/cjs-dev/components/tree/daikin-tree.d.cts +2 -1
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +6 -5
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.d.cts +8 -1
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +6 -5
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +6 -1
- package/dist/cjs-dev/index.cjs +10 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/calendar-common.cjs +6 -0
- package/dist/cjs-dev/utils/calendar-common.d.cts +7 -0
- package/dist/cjs-dev/utils/notification-common.cjs +0 -94
- package/dist/cjs-dev/utils/notification-common.d.cts +0 -13
- package/dist/es/base/dds-element.d.ts +40 -0
- package/dist/es/base/dds-element.js +82 -1
- package/dist/es/base/dds-form-element.d.ts +2 -2
- package/dist/es/base/dds-form-element.js +15 -6
- package/dist/es/base/dds-property.d.ts +92 -0
- package/dist/es/base/dds-property.js +11 -0
- package/dist/es/base/index.d.ts +1 -0
- package/dist/es/base/index.js +4 -1
- package/dist/es/components/accordion/daikin-accordion.js +2 -1
- package/dist/es/components/accordion-item/daikin-accordion-item.js +4 -5
- package/dist/es/components/avatar/daikin-avatar.d.ts +3 -1
- package/dist/es/components/avatar/daikin-avatar.js +18 -13
- package/dist/es/components/badge/daikin-badge.d.ts +91 -0
- package/dist/es/components/badge/daikin-badge.js +155 -0
- package/dist/es/components/badge/index.d.ts +1 -0
- package/dist/es/components/badge/index.js +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +38 -6
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +33 -7
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +3 -1
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +48 -15
- package/dist/es/components/button/daikin-button.d.ts +18 -2
- package/dist/es/components/button/daikin-button.js +54 -13
- package/dist/es/components/calendar/daikin-calendar.d.ts +14 -3
- package/dist/es/components/calendar/daikin-calendar.js +36 -15
- package/dist/es/components/card/daikin-card.js +1 -1
- package/dist/es/components/card-footer/daikin-card-footer.js +1 -0
- package/dist/es/components/card-header/daikin-card-header.js +1 -0
- package/dist/es/components/carousel/daikin-carousel.js +2 -1
- package/dist/es/components/carousel-item/daikin-carousel-item.js +2 -1
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +12 -1
- package/dist/es/components/checkbox/daikin-checkbox.js +22 -8
- package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +2 -0
- package/dist/es/components/checkbox-group/daikin-checkbox-group.js +11 -2
- package/dist/es/components/chip/daikin-chip.js +2 -1
- package/dist/es/components/combobox/daikin-combobox.d.ts +9 -2
- package/dist/es/components/combobox/daikin-combobox.js +29 -20
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +18 -4
- package/dist/es/components/date-picker/daikin-date-picker.js +61 -23
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +7 -0
- package/dist/es/components/dropdown/daikin-dropdown.js +12 -14
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +2 -1
- package/dist/es/components/icon/daikin-icon.d.ts +96 -39
- package/dist/es/components/icon/daikin-icon.js +24 -11
- package/dist/es/components/icon/icons.json.d.ts +12 -0
- package/dist/es/components/icon/icons.json.js +1 -1
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +17 -3
- package/dist/es/components/icon-button/daikin-icon-button.js +54 -11
- package/dist/es/components/index.d.ts +2 -0
- package/dist/es/components/index.js +4 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +8 -1
- package/dist/es/components/inline-notification/daikin-inline-notification.js +109 -8
- package/dist/es/components/input-group/daikin-input-group.js +23 -7
- package/dist/es/components/link/daikin-link.d.ts +11 -0
- package/dist/es/components/link/daikin-link.js +24 -4
- package/dist/es/components/list/daikin-list.js +6 -2
- package/dist/es/components/list-item/daikin-list-item.d.ts +4 -0
- package/dist/es/components/list-item/daikin-list-item.js +17 -6
- package/dist/es/components/loading/daikin-loading.js +7 -2
- package/dist/es/components/logo/daikin-logo.d.ts +4 -0
- package/dist/es/components/logo/daikin-logo.js +17 -9
- package/dist/es/components/menu/daikin-menu.d.ts +29 -2
- package/dist/es/components/menu/daikin-menu.js +79 -28
- package/dist/es/components/modal/daikin-modal.d.ts +2 -0
- package/dist/es/components/modal/daikin-modal.js +8 -3
- package/dist/es/components/modal-footer/daikin-modal-footer.js +1 -0
- package/dist/es/components/modal-header/daikin-modal-header.js +2 -2
- package/dist/es/components/pagination/daikin-pagination.js +3 -2
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +4 -0
- package/dist/es/components/progress-bar/daikin-progress-bar.js +19 -7
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +2 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +2 -0
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +13 -8
- package/dist/es/components/radio/daikin-radio.d.ts +9 -0
- package/dist/es/components/radio/daikin-radio.js +11 -6
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +3 -1
- package/dist/es/components/radio-group/daikin-radio-group.js +14 -7
- package/dist/es/components/select/daikin-select.js +2 -1
- package/dist/es/components/slider/daikin-slider.d.ts +15 -0
- package/dist/es/components/slider/daikin-slider.js +11 -9
- package/dist/es/components/status-message/daikin-status-message.d.ts +55 -0
- package/dist/es/components/status-message/daikin-status-message.js +124 -0
- package/dist/es/components/status-message/index.d.ts +1 -0
- package/dist/es/components/status-message/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.js +9 -3
- package/dist/es/components/tab-panels/daikin-tab-panels.js +2 -2
- package/dist/es/components/table/daikin-table.js +4 -3
- package/dist/es/components/table-cell/daikin-table-cell.d.ts +5 -3
- package/dist/es/components/table-cell/daikin-table-cell.js +12 -7
- 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 +11 -3
- package/dist/es/components/tabs/daikin-tabs.d.ts +2 -0
- package/dist/es/components/tabs/daikin-tabs.js +10 -4
- package/dist/es/components/text-area/daikin-text-area.d.ts +9 -2
- package/dist/es/components/text-area/daikin-text-area.js +11 -8
- package/dist/es/components/text-field/daikin-text-field.d.ts +11 -2
- package/dist/es/components/text-field/daikin-text-field.js +18 -21
- package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +9 -2
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +15 -12
- package/dist/es/components/time-picker/daikin-time-picker.d.ts +23 -1
- package/dist/es/components/time-picker/daikin-time-picker.js +38 -17
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +15 -2
- package/dist/es/components/toast-notification/daikin-toast-notification.js +112 -7
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +3 -1
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +15 -3
- package/dist/es/components/toggle/daikin-toggle.d.ts +7 -0
- package/dist/es/components/toggle/daikin-toggle.js +5 -4
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +9 -1
- package/dist/es/components/tooltip/daikin-tooltip.js +36 -11
- package/dist/es/components/tree/daikin-tree.d.ts +2 -1
- package/dist/es/components/tree/daikin-tree.js +2 -1
- package/dist/es/components/tree-item/daikin-tree-item.d.ts +8 -1
- package/dist/es/components/tree-item/daikin-tree-item.js +2 -1
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +6 -1
- package/dist/es/components/tree-section/daikin-tree-section.js +2 -1
- package/dist/es/index.js +4 -0
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/calendar-common.d.ts +7 -0
- package/dist/es/utils/calendar-common.js +6 -0
- package/dist/es/utils/notification-common.d.ts +0 -13
- package/dist/es/utils/notification-common.js +0 -94
- package/dist/es-dev/base/dds-element.d.ts +40 -0
- package/dist/es-dev/base/dds-element.js +92 -1
- package/dist/es-dev/base/dds-form-element.d.ts +2 -2
- package/dist/es-dev/base/dds-form-element.js +15 -6
- package/dist/es-dev/base/dds-property.d.ts +92 -0
- package/dist/es-dev/base/dds-property.js +11 -0
- package/dist/es-dev/base/index.d.ts +1 -0
- package/dist/es-dev/base/index.js +4 -1
- package/dist/es-dev/components/accordion/daikin-accordion.js +2 -1
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +4 -5
- package/dist/es-dev/components/avatar/daikin-avatar.d.ts +3 -1
- package/dist/es-dev/components/avatar/daikin-avatar.js +18 -13
- package/dist/es-dev/components/badge/daikin-badge.d.ts +91 -0
- package/dist/es-dev/components/badge/daikin-badge.js +155 -0
- package/dist/es-dev/components/badge/index.d.ts +1 -0
- package/dist/es-dev/components/badge/index.js +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +38 -6
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +33 -7
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +3 -1
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +48 -15
- package/dist/es-dev/components/button/daikin-button.d.ts +18 -2
- package/dist/es-dev/components/button/daikin-button.js +54 -13
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +14 -3
- package/dist/es-dev/components/calendar/daikin-calendar.js +36 -15
- package/dist/es-dev/components/card/daikin-card.js +1 -1
- package/dist/es-dev/components/card-footer/daikin-card-footer.js +1 -0
- package/dist/es-dev/components/card-header/daikin-card-header.js +1 -0
- package/dist/es-dev/components/carousel/daikin-carousel.js +2 -1
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +2 -1
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +12 -1
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +22 -8
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +2 -0
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +11 -2
- package/dist/es-dev/components/chip/daikin-chip.js +2 -1
- package/dist/es-dev/components/combobox/daikin-combobox.d.ts +9 -2
- package/dist/es-dev/components/combobox/daikin-combobox.js +29 -20
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +18 -4
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +61 -23
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +7 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +12 -14
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +2 -1
- package/dist/es-dev/components/icon/daikin-icon.d.ts +96 -39
- package/dist/es-dev/components/icon/daikin-icon.js +24 -11
- package/dist/es-dev/components/icon/icons.json.d.ts +12 -0
- package/dist/es-dev/components/icon/icons.json.js +1 -1
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +17 -3
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +54 -11
- package/dist/es-dev/components/index.d.ts +2 -0
- package/dist/es-dev/components/index.js +4 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +8 -1
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +109 -8
- package/dist/es-dev/components/input-group/daikin-input-group.js +23 -7
- package/dist/es-dev/components/link/daikin-link.d.ts +11 -0
- package/dist/es-dev/components/link/daikin-link.js +24 -4
- package/dist/es-dev/components/list/daikin-list.js +6 -2
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +4 -0
- package/dist/es-dev/components/list-item/daikin-list-item.js +17 -6
- package/dist/es-dev/components/loading/daikin-loading.js +7 -2
- package/dist/es-dev/components/logo/daikin-logo.d.ts +4 -0
- package/dist/es-dev/components/logo/daikin-logo.js +17 -9
- package/dist/es-dev/components/menu/daikin-menu.d.ts +29 -2
- package/dist/es-dev/components/menu/daikin-menu.js +79 -28
- package/dist/es-dev/components/modal/daikin-modal.d.ts +2 -0
- package/dist/es-dev/components/modal/daikin-modal.js +8 -3
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +1 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.js +2 -2
- package/dist/es-dev/components/pagination/daikin-pagination.js +3 -2
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +4 -0
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +19 -7
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +2 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +2 -0
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +13 -8
- package/dist/es-dev/components/radio/daikin-radio.d.ts +9 -0
- package/dist/es-dev/components/radio/daikin-radio.js +11 -6
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +3 -1
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +14 -7
- package/dist/es-dev/components/select/daikin-select.js +2 -1
- package/dist/es-dev/components/slider/daikin-slider.d.ts +15 -0
- package/dist/es-dev/components/slider/daikin-slider.js +11 -9
- package/dist/es-dev/components/status-message/daikin-status-message.d.ts +55 -0
- package/dist/es-dev/components/status-message/daikin-status-message.js +124 -0
- package/dist/es-dev/components/status-message/index.d.ts +1 -0
- package/dist/es-dev/components/status-message/index.js +4 -0
- package/dist/es-dev/components/tab/daikin-tab.js +9 -3
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +2 -2
- package/dist/es-dev/components/table/daikin-table.js +4 -3
- package/dist/es-dev/components/table-cell/daikin-table-cell.d.ts +5 -3
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +12 -7
- 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 +11 -3
- package/dist/es-dev/components/tabs/daikin-tabs.d.ts +2 -0
- package/dist/es-dev/components/tabs/daikin-tabs.js +10 -4
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +9 -2
- package/dist/es-dev/components/text-area/daikin-text-area.js +11 -8
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +11 -2
- package/dist/es-dev/components/text-field/daikin-text-field.js +18 -21
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +9 -2
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +15 -12
- package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +23 -1
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +38 -17
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +15 -2
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +112 -7
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +3 -1
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +15 -3
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +7 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +5 -4
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +9 -1
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +36 -11
- package/dist/es-dev/components/tree/daikin-tree.d.ts +2 -1
- package/dist/es-dev/components/tree/daikin-tree.js +2 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.d.ts +8 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +2 -1
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +6 -1
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +2 -1
- package/dist/es-dev/index.js +4 -0
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/calendar-common.d.ts +7 -0
- package/dist/es-dev/utils/calendar-common.js +6 -0
- package/dist/es-dev/utils/notification-common.d.ts +0 -13
- package/dist/es-dev/utils/notification-common.js +0 -94
- package/icons/download.svg +3 -0
- package/icons/neutral.svg +3 -0
- package/icons/notification.svg +3 -0
- package/package.json +18 -17
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { offset, flip, shift } from "@floating-ui/dom";
|
|
1
|
+
import { offset, flip, shift, size } from "@floating-ui/dom";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { unsafeCSS, css, html } from "lit";
|
|
4
|
-
import {
|
|
3
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
4
|
+
import { state } from "lit/decorators.js";
|
|
5
5
|
import { guard } from "lit/directives/guard.js";
|
|
6
6
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
8
8
|
import "../../base/dds-element.js";
|
|
9
9
|
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
10
|
+
import { property } from "../../base/dds-property.js";
|
|
10
11
|
import { ddsElement } from "../../base/decorators.js";
|
|
11
12
|
import "../../base/define.js";
|
|
12
13
|
import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-auto-update.js";
|
|
14
|
+
import { FocusTrapController } from "../../controllers/focus-trap.js";
|
|
13
15
|
import tailwindStyles from "../../tailwind.css.js";
|
|
14
16
|
import { tryParseDateFromProperty, parseDateFromProperty, DEFAULT_MIN_DATE, DEFAULT_MAX_DATE, formatDateForProperty, isDateOutOfRange, cvaIconButton, countDaysForYearMonth } from "../../utils/calendar-common.js";
|
|
15
17
|
import { reDispatch } from "../../utils/re-dispatch.js";
|
|
@@ -56,7 +58,7 @@ const cvaField = cva(
|
|
|
56
58
|
"pl-4",
|
|
57
59
|
"pr-10",
|
|
58
60
|
"rounded",
|
|
59
|
-
"
|
|
61
|
+
"truncate",
|
|
60
62
|
"outline",
|
|
61
63
|
"outline-[--color-border]",
|
|
62
64
|
"outline-0",
|
|
@@ -229,9 +231,6 @@ function handleOffsetInput(parts, item, offset2, viewDate, minDate, maxDate) {
|
|
|
229
231
|
let DaikinDatePicker = class extends DDSFormElement {
|
|
230
232
|
constructor() {
|
|
231
233
|
super(...arguments);
|
|
232
|
-
this.placeholder = null;
|
|
233
|
-
this.min = "";
|
|
234
|
-
this.max = "";
|
|
235
234
|
this.readonly = false;
|
|
236
235
|
this.disabled = false;
|
|
237
236
|
this.required = false;
|
|
@@ -243,6 +242,19 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
243
242
|
this._autoUpdateController = new FloatingUIAutoUpdateController(this);
|
|
244
243
|
this._dateInputElement = createRef();
|
|
245
244
|
this._calendarElement = createRef();
|
|
245
|
+
this._calendarButtonElement = createRef();
|
|
246
|
+
this._ignoreCloseByFocusTrap = false;
|
|
247
|
+
this._handleCloseCalendar = () => {
|
|
248
|
+
var _a;
|
|
249
|
+
if (this._ignoreCloseByFocusTrap) return;
|
|
250
|
+
this.open = false;
|
|
251
|
+
(_a = this._calendarButtonElement.value) == null ? void 0 : _a.focus();
|
|
252
|
+
};
|
|
253
|
+
this._focusTrapController = new FocusTrapController(
|
|
254
|
+
this,
|
|
255
|
+
this._handleCloseCalendar
|
|
256
|
+
);
|
|
257
|
+
this.label = null;
|
|
246
258
|
}
|
|
247
259
|
get _value() {
|
|
248
260
|
return tryParseDateFromProperty(this.value);
|
|
@@ -253,9 +265,6 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
253
265
|
get _max() {
|
|
254
266
|
return tryParseDateFromProperty(this.max) ?? parseDateFromProperty(DEFAULT_MAX_DATE);
|
|
255
267
|
}
|
|
256
|
-
get _defaultValue() {
|
|
257
|
-
return tryParseDateFromProperty(this.defaultValue ?? "");
|
|
258
|
-
}
|
|
259
268
|
get _viewDate() {
|
|
260
269
|
var _a;
|
|
261
270
|
return ((_a = this._calendarElement.value) == null ? void 0 : _a.viewDate) ?? null;
|
|
@@ -406,7 +415,11 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
406
415
|
}
|
|
407
416
|
this._emitSelect();
|
|
408
417
|
}
|
|
418
|
+
_handlePointerDown() {
|
|
419
|
+
this._ignoreCloseByFocusTrap = true;
|
|
420
|
+
}
|
|
409
421
|
_handlePointerUp() {
|
|
422
|
+
this._ignoreCloseByFocusTrap = false;
|
|
410
423
|
if (this.disabled || this.readonly) {
|
|
411
424
|
return;
|
|
412
425
|
}
|
|
@@ -489,13 +502,13 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
489
502
|
${ref(this._dateInputElement)}
|
|
490
503
|
class=${cvaField({ error: this.error })}
|
|
491
504
|
type="text"
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
aria-label=${ifDefined(this._label ??
|
|
495
|
-
.value=${this._value ? formatDateForUI(this._value) : ""}
|
|
505
|
+
name=${ifDefined(this.getBackingProperty("name"))}
|
|
506
|
+
placeholder=${ifDefined(this.getBackingProperty("placeholder"))}
|
|
507
|
+
aria-label=${ifDefined(this._label ?? this.label ?? "Date Picker")}
|
|
496
508
|
?disabled=${this.disabled}
|
|
497
509
|
?readonly=${this.readonly}
|
|
498
510
|
?required=${this.required}
|
|
511
|
+
.value=${this._value ? formatDateForUI(this._value) : ""}
|
|
499
512
|
@change=${this._handleChange}
|
|
500
513
|
@focusin=${this._handleFocusIn}
|
|
501
514
|
@focusout=${this._handleFocusOut}
|
|
@@ -504,12 +517,14 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
504
517
|
@mouseup=${this._handleMouseUp}
|
|
505
518
|
/>
|
|
506
519
|
<daikin-icon-button
|
|
520
|
+
${ref(this._calendarButtonElement)}
|
|
507
521
|
class="absolute top-0 bottom-0 right-2 m-auto"
|
|
508
522
|
type="button"
|
|
509
523
|
color="neutral"
|
|
510
524
|
variant="ghost"
|
|
511
525
|
button-aria-label="Open the date picker"
|
|
512
526
|
?disabled=${this.disabled}
|
|
527
|
+
@pointerdown=${this._handlePointerDown}
|
|
513
528
|
@pointerup=${this._handlePointerUp}
|
|
514
529
|
@keydown=${this._handleCalendarKeyDown}
|
|
515
530
|
>
|
|
@@ -518,14 +533,13 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
518
533
|
</div>
|
|
519
534
|
<daikin-calendar
|
|
520
535
|
${ref(this._calendarElement)}
|
|
536
|
+
${this._focusTrapController.refContainer()}
|
|
521
537
|
id="calendar"
|
|
522
|
-
|
|
538
|
+
value=${this._value ? formatDateForProperty(this._value) : nothing}
|
|
523
539
|
min=${formatDateForProperty(min)}
|
|
524
540
|
max=${formatDateForProperty(max)}
|
|
525
|
-
default-value=${ifDefined(
|
|
526
|
-
|
|
527
|
-
)}
|
|
528
|
-
popover="auto"
|
|
541
|
+
default-value=${ifDefined(this.defaultValue)}
|
|
542
|
+
popover="manual"
|
|
529
543
|
class="absolute left-[--floating-x,0] top-[--floating-y,0]"
|
|
530
544
|
@toggle=${this._handleToggle}
|
|
531
545
|
@select=${this._handleSelect}
|
|
@@ -533,6 +547,9 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
533
547
|
${this._autoUpdateController.refFloating()}
|
|
534
548
|
>
|
|
535
549
|
</daikin-calendar>
|
|
550
|
+
<span class="sr-only" aria-live="polite"
|
|
551
|
+
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
552
|
+
</span>
|
|
536
553
|
${// Activate auto update only when the tooltip is open.
|
|
537
554
|
// TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
|
|
538
555
|
guard(
|
|
@@ -540,10 +557,25 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
540
557
|
() => this._autoUpdateController.directive(
|
|
541
558
|
{
|
|
542
559
|
placement: "bottom-start",
|
|
543
|
-
middleware: [
|
|
560
|
+
middleware: [
|
|
561
|
+
offset({ mainAxis: 0 }),
|
|
562
|
+
flip(),
|
|
563
|
+
shift(),
|
|
564
|
+
size({
|
|
565
|
+
apply({ availableHeight, elements }) {
|
|
566
|
+
Object.assign(elements.floating.style, {
|
|
567
|
+
maxHeight: `${availableHeight}px`
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
})
|
|
571
|
+
]
|
|
544
572
|
},
|
|
545
573
|
this.open
|
|
546
574
|
)
|
|
575
|
+
)}
|
|
576
|
+
${guard(
|
|
577
|
+
[this.open],
|
|
578
|
+
() => this._focusTrapController.directive(this.open)
|
|
547
579
|
)}`;
|
|
548
580
|
}
|
|
549
581
|
willUpdate(changedProperties) {
|
|
@@ -561,6 +593,12 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
561
593
|
}
|
|
562
594
|
}
|
|
563
595
|
}
|
|
596
|
+
if (changedProperties.has("value")) {
|
|
597
|
+
if (tryParseDateFromProperty(this.value)) {
|
|
598
|
+
const newDate = parseDateFromProperty(this.value);
|
|
599
|
+
this.error = isDateOutOfRange(newDate, this._min, this._max);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
564
602
|
}
|
|
565
603
|
updated(changedProperties) {
|
|
566
604
|
var _a;
|
|
@@ -601,13 +639,13 @@ DaikinDatePicker.styles = css`
|
|
|
601
639
|
}
|
|
602
640
|
`;
|
|
603
641
|
__decorateClass([
|
|
604
|
-
property({ type: String, reflect: true })
|
|
642
|
+
property({ type: String, reflect: true, fallbackValue: "" })
|
|
605
643
|
], DaikinDatePicker.prototype, "placeholder", 2);
|
|
606
644
|
__decorateClass([
|
|
607
|
-
property({ type: String, reflect: true })
|
|
645
|
+
property({ type: String, reflect: true, fallbackValue: "1900-01-01" })
|
|
608
646
|
], DaikinDatePicker.prototype, "min", 2);
|
|
609
647
|
__decorateClass([
|
|
610
|
-
property({ type: String, reflect: true })
|
|
648
|
+
property({ type: String, reflect: true, fallbackValue: "2099-12-31" })
|
|
611
649
|
], DaikinDatePicker.prototype, "max", 2);
|
|
612
650
|
__decorateClass([
|
|
613
651
|
property({ type: Boolean, reflect: true })
|
|
@@ -8,6 +8,13 @@ import { DaikinInputGroup } from "../input-group/index.js";
|
|
|
8
8
|
* - `daikin-dropdown` > `daikin-dropdown-item`
|
|
9
9
|
* - `daikin-input-group` > `daikin-dropdown` > `daikin-dropdown-item`
|
|
10
10
|
*
|
|
11
|
+
* @attr form - The form the component belongs to.
|
|
12
|
+
* @attr name - The form name, submitted as a name/value pair when submitting the form.
|
|
13
|
+
* @attr value - The initial form value, submitted as a name/value pair when submitting the form.
|
|
14
|
+
* @prop {String} formAttr - The form the component belongs to.
|
|
15
|
+
* @prop {String} name - The form name, submitted as a name/value pair when submitting the form.
|
|
16
|
+
* @prop {String} value - The form value, submitted as a name/value pair when submitting the form.
|
|
17
|
+
*
|
|
11
18
|
* @fires change - A custom event emitted when a user selects a dropdown item.
|
|
12
19
|
*
|
|
13
20
|
* @slot - Dropdown item list slot. Place `daikin-dropdown-item` elements here.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { flip, offset, size } from "@floating-ui/dom";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { unsafeCSS, css, html } from "lit";
|
|
4
|
-
import {
|
|
5
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
4
|
+
import { queryAssignedElements, query, state } from "lit/decorators.js";
|
|
6
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
6
|
import "../../base/dds-element.js";
|
|
8
7
|
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
8
|
+
import { property } from "../../base/dds-property.js";
|
|
9
9
|
import { ddsElement } from "../../base/decorators.js";
|
|
10
10
|
import "../../base/define.js";
|
|
11
11
|
import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-auto-update.js";
|
|
@@ -44,7 +44,7 @@ const cvaButton = cva(
|
|
|
44
44
|
"outline",
|
|
45
45
|
"outline-1",
|
|
46
46
|
"-outline-offset-1",
|
|
47
|
-
"break
|
|
47
|
+
"natural-break",
|
|
48
48
|
"focus-visible:outline-2",
|
|
49
49
|
"focus-visible:-outline-offset-2",
|
|
50
50
|
"enabled:outline-[--color-base]",
|
|
@@ -103,7 +103,6 @@ const floatingPositionOptions = {
|
|
|
103
103
|
let DaikinDropdown = class extends DDSFormElement {
|
|
104
104
|
constructor() {
|
|
105
105
|
super(...arguments);
|
|
106
|
-
this.placeholder = "";
|
|
107
106
|
this.disabled = false;
|
|
108
107
|
this.required = false;
|
|
109
108
|
this.error = false;
|
|
@@ -320,10 +319,11 @@ let DaikinDropdown = class extends DDSFormElement {
|
|
|
320
319
|
this._updateItemsSelectable();
|
|
321
320
|
}
|
|
322
321
|
render() {
|
|
323
|
-
const fallbackLabel = this.open && !this.disabled ? "Close dropdown" : this.selectedOptions.length ? `Selected: ${this._selectionLabels.join(", ")}` : "Open dropdown";
|
|
322
|
+
const fallbackLabel = this.open && !this.disabled ? "Close dropdown" : this.selectedOptions.length ? `Selected: ${this._selectionLabels.join(", ")}` : this.value ? `Selected: ${this.value}` : "Open dropdown";
|
|
324
323
|
return html`<div class="w-full" @keydown=${this._handleKeyDown}>
|
|
325
324
|
<button
|
|
326
325
|
${ref(this._dropdownRef)}
|
|
326
|
+
id="dropdown-button"
|
|
327
327
|
type="button"
|
|
328
328
|
class=${cvaButton({
|
|
329
329
|
open: this.open,
|
|
@@ -331,10 +331,10 @@ let DaikinDropdown = class extends DDSFormElement {
|
|
|
331
331
|
placeholder: !this.selectedOptions.length
|
|
332
332
|
})}
|
|
333
333
|
?disabled=${this.disabled}
|
|
334
|
-
aria-label=${this._label ?? fallbackLabel}
|
|
334
|
+
aria-label=${`${this._label ?? ""} ${fallbackLabel}`}
|
|
335
335
|
aria-expanded=${this.open && !this.disabled}
|
|
336
336
|
aria-disabled=${this.disabled}
|
|
337
|
-
aria-controls
|
|
337
|
+
aria-controls=${this.open ? "dropdown-items" : nothing}
|
|
338
338
|
aria-required=${this.required}
|
|
339
339
|
aria-haspopup="listbox"
|
|
340
340
|
@pointerup=${this._handlePointerUp}
|
|
@@ -348,16 +348,14 @@ let DaikinDropdown = class extends DDSFormElement {
|
|
|
348
348
|
</button>
|
|
349
349
|
<div
|
|
350
350
|
id="dropdown-items"
|
|
351
|
+
role="listbox"
|
|
351
352
|
popover="manual"
|
|
352
353
|
class="flex flex-col overflow-hidden 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 opacity-1 transition-[opacity] rounded max-w-min"
|
|
354
|
+
aria-labelledby="dropdown-button"
|
|
353
355
|
@floating-ready=${this._handleFloatingReady}
|
|
354
356
|
${this._autoUpdateController.refFloating()}
|
|
355
357
|
>
|
|
356
|
-
<div
|
|
357
|
-
class="flex-1 overflow-y-auto break-all"
|
|
358
|
-
aria-label=${ifDefined(this._label ?? void 0)}
|
|
359
|
-
role="listbox"
|
|
360
|
-
>
|
|
358
|
+
<div class="flex-1 overflow-y-auto natural-break">
|
|
361
359
|
<slot
|
|
362
360
|
@slotchange=${this._handleSlotChange}
|
|
363
361
|
@select=${this._handleSelect}
|
|
@@ -449,7 +447,7 @@ DaikinDropdown.styles = css`
|
|
|
449
447
|
}
|
|
450
448
|
`;
|
|
451
449
|
__decorateClass([
|
|
452
|
-
property({ type: String, reflect: true })
|
|
450
|
+
property({ type: String, reflect: true, fallbackValue: "" })
|
|
453
451
|
], DaikinDropdown.prototype, "placeholder", 2);
|
|
454
452
|
__decorateClass([
|
|
455
453
|
property({ type: Boolean, reflect: true })
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { unsafeCSS, css, html } from "lit";
|
|
3
|
-
import {
|
|
3
|
+
import { query } from "lit/decorators.js";
|
|
4
4
|
import { DDSElement } from "../../base/dds-element.js";
|
|
5
5
|
import "../../base/dds-form-element.js";
|
|
6
|
+
import { property } from "../../base/dds-property.js";
|
|
6
7
|
import { ddsElement } from "../../base/decorators.js";
|
|
7
8
|
import "../../base/define.js";
|
|
8
9
|
import tailwindStyles from "../../tailwind.css.js";
|
|
@@ -78,6 +78,18 @@ declare const icons: {
|
|
|
78
78
|
class: string;
|
|
79
79
|
color: null;
|
|
80
80
|
};
|
|
81
|
+
notification: {
|
|
82
|
+
class: string;
|
|
83
|
+
color: null;
|
|
84
|
+
};
|
|
85
|
+
neutral: {
|
|
86
|
+
class: string;
|
|
87
|
+
color: null;
|
|
88
|
+
};
|
|
89
|
+
download: {
|
|
90
|
+
class: string;
|
|
91
|
+
color: null;
|
|
92
|
+
};
|
|
81
93
|
};
|
|
82
94
|
export declare const iconList: string[];
|
|
83
95
|
export type IconType = keyof typeof icons;
|
|
@@ -87,47 +99,44 @@ declare const cvaIcon: (props?: ({
|
|
|
87
99
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
88
100
|
export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
89
101
|
/**
|
|
90
|
-
*
|
|
91
|
-
* The icon set
|
|
102
|
+
* A versatile UI element that displays small graphical symbols or images representing actions, objects, or concepts within an application.
|
|
103
|
+
* The component uses the predefined DDS icon set by default but also supports custom icons via the icon registry.
|
|
92
104
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
105
|
+
* Predefined DDS icons are automatically rendered using optimized CSS classes.
|
|
106
|
+
* Custom icons can be dynamically loaded from various sources using the icon registry.
|
|
95
107
|
*
|
|
96
|
-
*
|
|
108
|
+
* If an icon cannot be loaded, a blank space is displayed.
|
|
109
|
+
* In development builds, warnings are logged to the console for debugging.
|
|
97
110
|
*
|
|
98
|
-
*
|
|
99
|
-
* - **background**: Uses CSS background-image for secure rendering without color customization
|
|
100
|
-
* - **inline**: Traditional SVG rendering using innerHTML (use with caution)
|
|
101
|
-
* - **static** (for DDS icons): Uses predefined CSS classes from the DDS icon set
|
|
111
|
+
* ### Using Custom Icons
|
|
102
112
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
113
|
+
* Custom icons must be registered with the icon registry before use.
|
|
114
|
+
* They can be registered individually or in bulk using pattern matching, with support for multiple rendering modes.
|
|
105
115
|
*
|
|
106
|
-
*
|
|
107
|
-
* This works out-of-the-box for mask and static modes, and can be achieved for inline mode with additional effort. The background mode does not support custom colors.
|
|
116
|
+
* #### Rendering Modes
|
|
108
117
|
*
|
|
109
|
-
*
|
|
110
|
-
* In development builds, warnings will be shown in the console for debugging.
|
|
118
|
+
* Custom icons support multiple rendering modes, each with different characteristics:
|
|
111
119
|
*
|
|
112
|
-
*
|
|
120
|
+
* - **mask** (default): Uses CSS `mask-image` to render the icon.
|
|
121
|
+
* - Secure rendering method (SVG is converted to data URL).
|
|
122
|
+
* - Supports color customization via the `color` property or CSS `color`.
|
|
123
|
+
* - Best choice for most use cases with custom icons.
|
|
124
|
+
* - **background**: Uses CSS `background-image` to render the icon.
|
|
125
|
+
* - Secure rendering method (SVG is converted to data URL).
|
|
126
|
+
* - Does NOT support color customization; the icon is rendered with its original colors.
|
|
127
|
+
* - Use this mode when you need to preserve the original colors of multi-color SVG icons.
|
|
128
|
+
* - **inline**: Traditional SVG rendering using `innerHTML`.
|
|
129
|
+
* - Renders the raw SVG markup directly in the DOM.
|
|
130
|
+
* - Supports color customization if the SVG uses `currentColor` or inheritable properties.
|
|
131
|
+
* - ⚠️ **Security Warning**: Only use this mode with SVG content from trusted sources. Untrusted SVG content may lead to XSS vulnerabilities.
|
|
132
|
+
* - Use `mask` or `background` modes for better security.
|
|
113
133
|
*
|
|
114
|
-
*
|
|
134
|
+
* #### Registration Examples
|
|
115
135
|
*
|
|
116
136
|
* ```js
|
|
117
|
-
* import "@daikin-oss/design-system-web-components/components/icon/index.js";
|
|
118
|
-
* ```
|
|
119
|
-
*
|
|
120
|
-
* ```html
|
|
121
|
-
* <!-- Using a DDS static icon -->
|
|
122
|
-
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
123
|
-
*
|
|
124
|
-
* <!-- Using a custom icon -->
|
|
125
|
-
* <daikin-icon icon="my-custom-icon" color="black" size="m"></daikin-icon>
|
|
126
|
-
*
|
|
127
|
-
* <script>
|
|
128
137
|
* import { iconRegistry } from "@daikin-oss/design-system-web-components/icon-registry.js";
|
|
129
138
|
*
|
|
130
|
-
* // Register
|
|
139
|
+
* // Register a single custom icon using mask mode for secure rendering and color customization
|
|
131
140
|
* iconRegistry.register({
|
|
132
141
|
* name: "my-custom-icon",
|
|
133
142
|
* svg: {
|
|
@@ -137,39 +146,87 @@ export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
|
137
146
|
* },
|
|
138
147
|
* });
|
|
139
148
|
*
|
|
140
|
-
* // Register
|
|
149
|
+
* // Register multiple custom icons dynamically using pattern matching
|
|
141
150
|
* iconRegistry.register({
|
|
142
|
-
* match: /^custom-/,
|
|
151
|
+
* match: /^dynamic-custom-/,
|
|
143
152
|
* async fetch: (name) => {
|
|
144
153
|
* const response = await fetch(`/path/to/custom/icons/${name}.svg`);
|
|
145
154
|
* if (!response.ok) {
|
|
146
155
|
* throw new Error(`Failed to load custom icon "${name}"`);
|
|
147
156
|
* }
|
|
157
|
+
* // You can return just the SVG content as a string (defaults to mask mode)
|
|
158
|
+
* // Or return an object with `svg`, `defaultColor` (optional), and `mode` (optional) for more control
|
|
148
159
|
* return response.text();
|
|
149
160
|
* },
|
|
150
161
|
* });
|
|
151
|
-
*
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* Once registered, you can use your custom icons in components:
|
|
165
|
+
*
|
|
166
|
+
* ```html
|
|
167
|
+
* <daikin-icon icon="my-custom-icon" color="current" size="m"></daikin-icon>
|
|
168
|
+
* <daikin-icon icon="dynamic-custom-icon-123" color="current" size="m"></daikin-icon>
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* ### Changing Icon Color
|
|
172
|
+
*
|
|
173
|
+
* To use a custom color, set the `color` property to `"current"` and apply the desired color using the CSS `color` property:
|
|
174
|
+
*
|
|
175
|
+
* ```html
|
|
176
|
+
* <daikin-icon icon="information" color="current" style="color: red;"></daikin-icon>
|
|
177
|
+
* <!-- or you can inherit the color from a parent element -->
|
|
178
|
+
* <div style="color: blue;">
|
|
179
|
+
* <daikin-icon icon="information" color="current"></daikin-icon>
|
|
180
|
+
* </div>
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* This behavior is supported natively for DDS icons and `mask` mode (the default for custom icons).
|
|
184
|
+
* In `inline` mode, color inheritance works only if the SVG uses `currentColor` or inheritable properties.
|
|
185
|
+
* Note that `background` mode does not support custom colors.
|
|
186
|
+
*
|
|
187
|
+
* @cssprop [--ddc-icon-size] - The size of the icon. If you set a value other than "current" for the `size` property, this will be automatically overwritten.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
*
|
|
191
|
+
* ```js
|
|
192
|
+
* import "@daikin-oss/design-system-web-components/components/icon/index.js";
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* ```html
|
|
196
|
+
* <!-- Using a DDS static icon -->
|
|
197
|
+
* <daikin-icon icon="information" color="current" size="m"></daikin-icon>
|
|
198
|
+
*
|
|
199
|
+
* <!-- Using a custom icon -->
|
|
200
|
+
* <daikin-icon icon="my-custom-icon" color="current" size="m"></daikin-icon>
|
|
152
201
|
* ```
|
|
153
202
|
*/
|
|
154
203
|
export declare class DaikinIcon extends DDSElement {
|
|
155
204
|
static readonly styles: import('lit').CSSResult;
|
|
156
205
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
206
|
+
* The icon registry instance to use.
|
|
207
|
+
* Defaults to the global icon registry.
|
|
159
208
|
*/
|
|
160
209
|
registry: IconRegistry;
|
|
161
210
|
/**
|
|
162
|
-
*
|
|
211
|
+
* The name of the icon to display.
|
|
163
212
|
* Can be a static DDS icon name or a custom icon name registered in the icon registry.
|
|
164
213
|
*/
|
|
165
|
-
icon: string
|
|
214
|
+
icon: string;
|
|
166
215
|
/**
|
|
167
|
-
*
|
|
216
|
+
* The color of the icon.
|
|
217
|
+
* Use `"current"` for most cases.
|
|
218
|
+
*
|
|
219
|
+
* **This property will be removed in a future release.**
|
|
220
|
+
* To prepare for this change, start using `color="current"` and set icon colors via the CSS `color` property instead of using predefined color values.
|
|
221
|
+
*
|
|
222
|
+
* @default "default"
|
|
168
223
|
*/
|
|
169
224
|
color: IconVariantProps["color"];
|
|
170
225
|
/**
|
|
171
|
-
*
|
|
172
|
-
* If "current"
|
|
226
|
+
* The size of the icon.
|
|
227
|
+
* If set to "current", the `--ddc-icon-size` CSS variable will be used. `--ddc-icon-size` may be set by a parent component such as `daikin-icon-button`.
|
|
228
|
+
*
|
|
229
|
+
* @default "current"
|
|
173
230
|
*/
|
|
174
231
|
size: "s" | "m" | "l" | "xl" | "current";
|
|
175
232
|
private _iconData;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { unsafeCSS, css, html } from "lit";
|
|
3
|
-
import {
|
|
3
|
+
import { state } from "lit/decorators.js";
|
|
4
4
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
5
5
|
import { DDSElement } from "../../base/dds-element.js";
|
|
6
6
|
import "../../base/dds-form-element.js";
|
|
7
|
+
import { property, oneOf } from "../../base/dds-property.js";
|
|
7
8
|
import { ddsElement } from "../../base/decorators.js";
|
|
8
9
|
import "../../base/define.js";
|
|
9
10
|
import { iconRegistry } from "../../icon-registry.js";
|
|
@@ -61,9 +62,6 @@ let DaikinIcon = class extends DDSElement {
|
|
|
61
62
|
constructor() {
|
|
62
63
|
super(...arguments);
|
|
63
64
|
this.registry = iconRegistry;
|
|
64
|
-
this.icon = null;
|
|
65
|
-
this.color = "default";
|
|
66
|
-
this.size = "current";
|
|
67
65
|
this._iconData = null;
|
|
68
66
|
}
|
|
69
67
|
connectedCallback() {
|
|
@@ -191,32 +189,47 @@ DaikinIcon.styles = css`
|
|
|
191
189
|
}
|
|
192
190
|
|
|
193
191
|
:host([size="s"]) {
|
|
194
|
-
--ddc-icon-size:
|
|
192
|
+
--ddc-icon-size: 16px;
|
|
195
193
|
}
|
|
196
194
|
|
|
197
195
|
:host([size="m"]) {
|
|
198
|
-
--ddc-icon-size:
|
|
196
|
+
--ddc-icon-size: 24px;
|
|
199
197
|
}
|
|
200
198
|
|
|
201
199
|
:host([size="l"]) {
|
|
202
|
-
--ddc-icon-size:
|
|
200
|
+
--ddc-icon-size: 32px;
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
:host([size="xl"]) {
|
|
206
|
-
--ddc-icon-size:
|
|
204
|
+
--ddc-icon-size: 40px;
|
|
207
205
|
}
|
|
208
206
|
`;
|
|
209
207
|
__decorateClass([
|
|
210
208
|
property({ attribute: false })
|
|
211
209
|
], DaikinIcon.prototype, "registry", 2);
|
|
212
210
|
__decorateClass([
|
|
213
|
-
property({ type: String, reflect: true })
|
|
211
|
+
property({ type: String, reflect: true, fallbackValue: "" })
|
|
214
212
|
], DaikinIcon.prototype, "icon", 2);
|
|
215
213
|
__decorateClass([
|
|
216
|
-
property({
|
|
214
|
+
property({
|
|
215
|
+
type: String,
|
|
216
|
+
reflect: true,
|
|
217
|
+
fallbackValue: "default",
|
|
218
|
+
isAllowedValue: oneOf([
|
|
219
|
+
"default",
|
|
220
|
+
"current",
|
|
221
|
+
"black",
|
|
222
|
+
"white"
|
|
223
|
+
])
|
|
224
|
+
})
|
|
217
225
|
], DaikinIcon.prototype, "color", 2);
|
|
218
226
|
__decorateClass([
|
|
219
|
-
property({
|
|
227
|
+
property({
|
|
228
|
+
type: String,
|
|
229
|
+
reflect: true,
|
|
230
|
+
fallbackValue: "current",
|
|
231
|
+
isAllowedValue: oneOf(["s", "m", "l", "xl", "current"])
|
|
232
|
+
})
|
|
220
233
|
], DaikinIcon.prototype, "size", 2);
|
|
221
234
|
__decorateClass([
|
|
222
235
|
state()
|
|
@@ -75,6 +75,18 @@ declare const _default: {
|
|
|
75
75
|
"cross": {
|
|
76
76
|
"class": "i-daikin-close",
|
|
77
77
|
"color": null
|
|
78
|
+
},
|
|
79
|
+
"notification": {
|
|
80
|
+
"class": "i-daikin-notification",
|
|
81
|
+
"color": null
|
|
82
|
+
},
|
|
83
|
+
"neutral": {
|
|
84
|
+
"class": "i-daikin-neutral",
|
|
85
|
+
"color": null
|
|
86
|
+
},
|
|
87
|
+
"download": {
|
|
88
|
+
"class": "i-daikin-download",
|
|
89
|
+
"color": null
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const icons = { "logo-positive": { "class": "i-daikin-logo-positive", "color": null }, "logo-negative": { "class": "i-daikin-logo-negative", "color": null }, "alarm": { "class": "i-daikin-alarm", "color": null }, "close": { "class": "i-daikin-close", "color": "#a0a0a0" }, "information": { "class": "i-daikin-information", "color": null }, "error": { "class": "i-daikin-error", "color": null }, "success": { "class": "i-daikin-success", "color": null }, "warning": { "class": "i-daikin-warning", "color": null }, "pagination-chevron-left": { "class": "i-daikin-pagination-chevron-left", "color": "#414141" }, "pagination-chevron-right": { "class": "i-daikin-pagination-chevron-right", "color": "#414141" }, "profile": { "class": "i-daikin-profile", "color": null }, "chevron-up": { "class": "i-daikin-chevron-up", "color": null }, "chevron-down": { "class": "i-daikin-chevron-down", "color": null }, "chevron-left": { "class": "i-daikin-chevron-left", "color": null }, "chevron-right": { "class": "i-daikin-chevron-right", "color": null }, "sort": { "class": "i-daikin-sort", "color": null }, "negative": { "class": "i-daikin-error", "color": null }, "positive": { "class": "i-daikin-success", "color": null }, "cross": { "class": "i-daikin-close", "color": null } };
|
|
1
|
+
const icons = { "logo-positive": { "class": "i-daikin-logo-positive", "color": null }, "logo-negative": { "class": "i-daikin-logo-negative", "color": null }, "alarm": { "class": "i-daikin-alarm", "color": null }, "close": { "class": "i-daikin-close", "color": "#a0a0a0" }, "information": { "class": "i-daikin-information", "color": null }, "error": { "class": "i-daikin-error", "color": null }, "success": { "class": "i-daikin-success", "color": null }, "warning": { "class": "i-daikin-warning", "color": null }, "pagination-chevron-left": { "class": "i-daikin-pagination-chevron-left", "color": "#414141" }, "pagination-chevron-right": { "class": "i-daikin-pagination-chevron-right", "color": "#414141" }, "profile": { "class": "i-daikin-profile", "color": null }, "chevron-up": { "class": "i-daikin-chevron-up", "color": null }, "chevron-down": { "class": "i-daikin-chevron-down", "color": null }, "chevron-left": { "class": "i-daikin-chevron-left", "color": null }, "chevron-right": { "class": "i-daikin-chevron-right", "color": null }, "sort": { "class": "i-daikin-sort", "color": null }, "negative": { "class": "i-daikin-error", "color": null }, "positive": { "class": "i-daikin-success", "color": null }, "cross": { "class": "i-daikin-close", "color": null }, "notification": { "class": "i-daikin-notification", "color": null }, "neutral": { "class": "i-daikin-neutral", "color": null }, "download": { "class": "i-daikin-download", "color": null } };
|
|
2
2
|
const iconsJson = {
|
|
3
3
|
icons
|
|
4
4
|
};
|
|
@@ -14,6 +14,9 @@ type IconButtonVariantProps = MergeVariantProps<typeof cvaIconButton>;
|
|
|
14
14
|
* - About fill color - The icon should be able to accept the CSS `color` property.
|
|
15
15
|
* - About size - The recommended width of the icon is 24px * 24px. Please make sure that the size of the icon you insert conforms to this, or please set the `width` and `height` properties of the icon to 100%.
|
|
16
16
|
*
|
|
17
|
+
* @attr form - The form the component belongs to.
|
|
18
|
+
* @prop {String} formAttr - The form the component belongs to.
|
|
19
|
+
*
|
|
17
20
|
* @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) emitted from the inner `<button>` element. Suppressed if `disabled` is true,
|
|
18
21
|
*
|
|
19
22
|
* @slot - A slot for an icon. Place a daikin-icon element or something similar.
|
|
@@ -36,10 +39,14 @@ export declare class DaikinIconButton extends DDSFormSubmitElement {
|
|
|
36
39
|
static readonly styles: import('lit').CSSResult;
|
|
37
40
|
/**
|
|
38
41
|
* Variant of the button.
|
|
42
|
+
*
|
|
43
|
+
* @default "fill"
|
|
39
44
|
*/
|
|
40
45
|
variant: IconButtonVariantProps["variant"];
|
|
41
46
|
/**
|
|
42
47
|
* Color of the button.
|
|
48
|
+
*
|
|
49
|
+
* @default "default"
|
|
43
50
|
*/
|
|
44
51
|
color: IconButtonVariantProps["color"];
|
|
45
52
|
/**
|
|
@@ -55,6 +62,8 @@ export declare class DaikinIconButton extends DDSFormSubmitElement {
|
|
|
55
62
|
/**
|
|
56
63
|
* Type of the button.
|
|
57
64
|
* If `"link"` is specified, the button will be rendered as an `<a>` element.
|
|
65
|
+
*
|
|
66
|
+
* @default "button"
|
|
58
67
|
*/
|
|
59
68
|
type: "button" | "submit" | "reset" | "link";
|
|
60
69
|
/**
|
|
@@ -74,13 +83,18 @@ export declare class DaikinIconButton extends DDSFormSubmitElement {
|
|
|
74
83
|
* The aria-expanded of icon button when `type="button"`.
|
|
75
84
|
* When used within a daikin-menu component, this property will be controlled by daikin-menu, so you don't need to specify it explicitly.
|
|
76
85
|
*/
|
|
77
|
-
buttonAriaExpanded:
|
|
86
|
+
buttonAriaExpanded: "true" | "false" | "undefined" | null;
|
|
87
|
+
/**
|
|
88
|
+
* The `tabindex` of the button.
|
|
89
|
+
* If omitted or set to 0, the button follows the default tab flow.
|
|
90
|
+
* Setting it to -1 makes the button unreachable via the Tab key.
|
|
91
|
+
* This is useful when the button is part of a composite widget and accessible via other keys.
|
|
92
|
+
*/
|
|
93
|
+
buttonTabIndex: number;
|
|
78
94
|
/**
|
|
79
95
|
* Size of the button.
|
|
80
96
|
* - `s`: 32px * 32px
|
|
81
97
|
* - `m`: 48px * 48px
|
|
82
|
-
*
|
|
83
|
-
* Default is `s`.
|
|
84
98
|
*/
|
|
85
99
|
size: "s" | "m";
|
|
86
100
|
private _button;
|