@daikin-oss/design-system-web-components 1.1.0 → 1.3.0-next.2
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 +145 -0
- package/LICENSE +1 -1
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/base/dds-form-element.cjs +139 -0
- package/dist/cjs/base/dds-form-element.d.cts +100 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +7 -3
- package/dist/cjs/components/avatar/daikin-avatar.cjs +1 -0
- package/dist/cjs/components/avatar/daikin-avatar.d.cts +3 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
- package/dist/cjs/components/button/daikin-button.cjs +35 -13
- package/dist/cjs/components/button/daikin-button.d.cts +20 -10
- package/dist/cjs/components/calendar/daikin-calendar.cjs +549 -0
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +87 -0
- package/dist/cjs/components/calendar/index.cjs +7 -0
- package/dist/cjs/components/calendar/index.d.cts +1 -0
- package/dist/cjs/components/card/daikin-card.cjs +1 -1
- package/dist/cjs/components/card-header/daikin-card-header.cjs +1 -1
- package/dist/cjs/components/carousel/daikin-carousel.cjs +7 -3
- package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +2 -2
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +12 -16
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +9 -12
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
- package/dist/cjs/components/checkbox-group/index.cjs +7 -0
- package/dist/cjs/components/checkbox-group/index.d.cts +1 -0
- package/dist/cjs/components/chip/daikin-chip.cjs +106 -0
- package/dist/cjs/components/chip/daikin-chip.d.cts +36 -0
- package/dist/cjs/components/chip/index.cjs +7 -0
- package/dist/cjs/components/chip/index.d.cts +1 -0
- package/dist/cjs/components/combobox/daikin-combobox.cjs +604 -0
- package/dist/cjs/components/combobox/daikin-combobox.d.cts +134 -0
- package/dist/cjs/components/combobox/index.cjs +8 -0
- package/dist/cjs/components/combobox/index.d.cts +1 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +626 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +106 -0
- package/dist/cjs/components/date-picker/index.cjs +7 -0
- package/dist/cjs/components/date-picker/index.d.cts +1 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +91 -57
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +7 -15
- package/dist/cjs/components/icon/daikin-icon.cjs +117 -12
- package/dist/cjs/components/icon/daikin-icon.d.cts +129 -9
- package/dist/cjs/components/icon/icons.json.cjs +6 -2
- package/dist/cjs/components/icon/icons.json.d.cts +16 -16
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +30 -4
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +20 -2
- package/dist/cjs/components/index.cjs +81 -0
- package/dist/cjs/components/index.d.cts +14 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +13 -18
- package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +3 -1
- package/dist/cjs/components/input-group/daikin-input-group.cjs +4 -4
- package/dist/cjs/components/input-group/daikin-input-group.d.cts +50 -1
- package/dist/cjs/components/list/daikin-list.cjs +75 -3
- package/dist/cjs/components/list/daikin-list.d.cts +16 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +27 -7
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +9 -3
- package/dist/cjs/components/loading/daikin-loading.cjs +1 -1
- package/dist/cjs/components/loading/daikin-loading.d.cts +1 -0
- package/dist/cjs/components/logo/daikin-logo.cjs +105 -0
- package/dist/cjs/components/logo/daikin-logo.d.cts +54 -0
- package/dist/cjs/components/logo/index.cjs +7 -0
- package/dist/cjs/components/logo/index.d.cts +1 -0
- package/dist/cjs/components/menu/daikin-menu.cjs +205 -0
- package/dist/cjs/components/menu/daikin-menu.d.cts +89 -0
- package/dist/cjs/components/menu/index.cjs +7 -0
- package/dist/cjs/components/menu/index.d.cts +1 -0
- package/dist/cjs/components/modal/daikin-modal.cjs +115 -0
- package/dist/cjs/components/modal/daikin-modal.d.cts +61 -0
- package/dist/cjs/components/modal/index.cjs +7 -0
- package/dist/cjs/components/modal/index.d.cts +1 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +40 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.d.cts +33 -0
- package/dist/cjs/components/modal-footer/index.cjs +7 -0
- package/dist/cjs/components/modal-footer/index.d.cts +1 -0
- package/dist/cjs/components/modal-header/daikin-modal-header.cjs +96 -0
- package/dist/cjs/components/modal-header/daikin-modal-header.d.cts +43 -0
- package/dist/cjs/components/modal-header/index.cjs +7 -0
- package/dist/cjs/components/modal-header/index.d.cts +1 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +5 -5
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs/components/radio/daikin-radio.cjs +4 -13
- package/dist/cjs/components/radio/daikin-radio.d.cts +2 -12
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +1 -1
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs/components/select/daikin-select.cjs +6 -1
- package/dist/cjs/components/slider/daikin-slider.cjs +263 -0
- package/dist/cjs/components/slider/daikin-slider.d.cts +67 -0
- package/dist/cjs/components/slider/index.cjs +7 -0
- package/dist/cjs/components/slider/index.d.cts +1 -0
- package/dist/cjs/components/slider/slider-utils.cjs +57 -0
- package/dist/cjs/components/slider/slider-utils.d.cts +37 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +1 -0
- package/dist/cjs/components/table/daikin-table.cjs +74 -15
- package/dist/cjs/components/table/daikin-table.d.cts +72 -34
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +2 -1
- package/dist/cjs/components/table-cell/daikin-table-cell.d.cts +1 -1
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +31 -6
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +8 -1
- package/dist/cjs/components/tabs/daikin-tabs.cjs +2 -2
- package/dist/cjs/components/text-area/daikin-text-area.cjs +4 -13
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +2 -12
- package/dist/cjs/components/text-field/daikin-text-field.cjs +289 -57
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +57 -18
- package/dist/cjs/components/text-field/number-utils.cjs +61 -0
- package/dist/cjs/components/text-field/number-utils.d.cts +26 -0
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +312 -0
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +136 -0
- package/dist/cjs/components/text-masked-field/index.cjs +7 -0
- package/dist/cjs/components/text-masked-field/index.d.cts +1 -0
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +577 -0
- package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +165 -0
- package/dist/cjs/components/time-picker/index.cjs +17 -0
- package/dist/cjs/components/time-picker/index.d.cts +1 -0
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +10 -7
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +2 -0
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs/components/toggle/daikin-toggle.cjs +4 -13
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +2 -12
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +24 -8
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +11 -3
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +2 -0
- package/dist/cjs/controllers/click-outside.cjs +3 -1
- package/dist/cjs/controllers/floating-ui-auto-update.cjs +22 -4
- package/dist/cjs/controllers/floating-ui-auto-update.d.cts +12 -0
- package/dist/cjs/controllers/focus-trap.cjs +42 -0
- package/dist/cjs/controllers/focus-trap.d.cts +10 -0
- package/dist/cjs/icon-registry.cjs +170 -0
- package/dist/cjs/icon-registry.d.cts +120 -0
- package/dist/cjs/index.cjs +84 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/calendar-common.cjs +151 -0
- package/dist/cjs/utils/calendar-common.d.cts +64 -0
- package/dist/cjs/utils/notification-common.cjs +19 -15
- package/dist/cjs/utils/notification-common.d.cts +2 -2
- package/dist/cjs/{components/tabs → utils}/scroller.cjs +20 -12
- package/dist/cjs/{components/tabs → utils}/scroller.d.cts +2 -2
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/base/dds-form-element.cjs +139 -0
- package/dist/cjs-dev/base/dds-form-element.d.cts +100 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +7 -3
- package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +1 -0
- package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +3 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
- package/dist/cjs-dev/components/button/daikin-button.cjs +35 -13
- package/dist/cjs-dev/components/button/daikin-button.d.cts +20 -10
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +560 -0
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +87 -0
- package/dist/cjs-dev/components/calendar/index.cjs +7 -0
- package/dist/cjs-dev/components/calendar/index.d.cts +1 -0
- package/dist/cjs-dev/components/card/daikin-card.cjs +1 -1
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +1 -1
- package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +7 -3
- package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +2 -2
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +12 -16
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +9 -12
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
- package/dist/cjs-dev/components/checkbox-group/index.cjs +7 -0
- package/dist/cjs-dev/components/checkbox-group/index.d.cts +1 -0
- package/dist/cjs-dev/components/chip/daikin-chip.cjs +106 -0
- package/dist/cjs-dev/components/chip/daikin-chip.d.cts +36 -0
- package/dist/cjs-dev/components/chip/index.cjs +7 -0
- package/dist/cjs-dev/components/chip/index.d.cts +1 -0
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +604 -0
- package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +134 -0
- package/dist/cjs-dev/components/combobox/index.cjs +8 -0
- package/dist/cjs-dev/components/combobox/index.d.cts +1 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +637 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +106 -0
- package/dist/cjs-dev/components/date-picker/index.cjs +7 -0
- package/dist/cjs-dev/components/date-picker/index.d.cts +1 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +91 -57
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +7 -15
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +141 -16
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +129 -9
- package/dist/cjs-dev/components/icon/icons.json.cjs +6 -2
- package/dist/cjs-dev/components/icon/icons.json.d.cts +16 -16
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +30 -4
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +20 -2
- package/dist/cjs-dev/components/index.cjs +81 -0
- package/dist/cjs-dev/components/index.d.cts +14 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +13 -18
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +3 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +4 -4
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +50 -1
- package/dist/cjs-dev/components/list/daikin-list.cjs +75 -3
- package/dist/cjs-dev/components/list/daikin-list.d.cts +16 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +27 -7
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +9 -3
- package/dist/cjs-dev/components/loading/daikin-loading.cjs +1 -1
- package/dist/cjs-dev/components/loading/daikin-loading.d.cts +1 -0
- package/dist/cjs-dev/components/logo/daikin-logo.cjs +105 -0
- package/dist/cjs-dev/components/logo/daikin-logo.d.cts +54 -0
- package/dist/cjs-dev/components/logo/index.cjs +7 -0
- package/dist/cjs-dev/components/logo/index.d.cts +1 -0
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +205 -0
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +89 -0
- package/dist/cjs-dev/components/menu/index.cjs +7 -0
- package/dist/cjs-dev/components/menu/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal/daikin-modal.cjs +115 -0
- package/dist/cjs-dev/components/modal/daikin-modal.d.cts +61 -0
- package/dist/cjs-dev/components/modal/index.cjs +7 -0
- package/dist/cjs-dev/components/modal/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +40 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.d.cts +33 -0
- package/dist/cjs-dev/components/modal-footer/index.cjs +7 -0
- package/dist/cjs-dev/components/modal-footer/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +96 -0
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.d.cts +43 -0
- package/dist/cjs-dev/components/modal-header/index.cjs +7 -0
- package/dist/cjs-dev/components/modal-header/index.d.cts +1 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +5 -5
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +4 -13
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +2 -12
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +1 -1
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs-dev/components/select/daikin-select.cjs +6 -1
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +263 -0
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +67 -0
- package/dist/cjs-dev/components/slider/index.cjs +7 -0
- package/dist/cjs-dev/components/slider/index.d.cts +1 -0
- package/dist/cjs-dev/components/slider/slider-utils.cjs +57 -0
- package/dist/cjs-dev/components/slider/slider-utils.d.cts +37 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +1 -0
- package/dist/cjs-dev/components/table/daikin-table.cjs +77 -18
- package/dist/cjs-dev/components/table/daikin-table.d.cts +72 -34
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +2 -1
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.d.cts +1 -1
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +31 -6
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +8 -1
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +2 -2
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +4 -13
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +2 -12
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +289 -57
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +57 -18
- package/dist/cjs-dev/components/text-field/number-utils.cjs +64 -0
- package/dist/cjs-dev/components/text-field/number-utils.d.cts +26 -0
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +312 -0
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +136 -0
- package/dist/cjs-dev/components/text-masked-field/index.cjs +7 -0
- package/dist/cjs-dev/components/text-masked-field/index.d.cts +1 -0
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +589 -0
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +165 -0
- package/dist/cjs-dev/components/time-picker/index.cjs +17 -0
- package/dist/cjs-dev/components/time-picker/index.d.cts +1 -0
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +10 -7
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +2 -0
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +4 -13
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +2 -12
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +24 -8
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +11 -3
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +2 -0
- package/dist/cjs-dev/controllers/click-outside.cjs +3 -1
- package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +22 -4
- package/dist/cjs-dev/controllers/floating-ui-auto-update.d.cts +12 -0
- package/dist/cjs-dev/controllers/focus-trap.cjs +42 -0
- package/dist/cjs-dev/controllers/focus-trap.d.cts +10 -0
- package/dist/cjs-dev/icon-registry.cjs +170 -0
- package/dist/cjs-dev/icon-registry.d.cts +120 -0
- package/dist/cjs-dev/index.cjs +84 -0
- package/dist/cjs-dev/index.d.cts +1 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/calendar-common.cjs +151 -0
- package/dist/cjs-dev/utils/calendar-common.d.cts +64 -0
- package/dist/cjs-dev/utils/notification-common.cjs +19 -15
- package/dist/cjs-dev/utils/notification-common.d.cts +2 -2
- package/dist/cjs-dev/{components/tabs → utils}/scroller.cjs +20 -12
- package/dist/cjs-dev/{components/tabs → utils}/scroller.d.cts +2 -2
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/base/dds-form-element.d.ts +100 -0
- package/dist/es/base/dds-form-element.js +139 -0
- package/dist/es/components/accordion/daikin-accordion.js +1 -1
- package/dist/es/components/accordion-item/daikin-accordion-item.js +8 -4
- package/dist/es/components/avatar/daikin-avatar.d.ts +3 -0
- package/dist/es/components/avatar/daikin-avatar.js +2 -1
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +1 -1
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
- package/dist/es/components/button/daikin-button.d.ts +20 -10
- package/dist/es/components/button/daikin-button.js +36 -14
- package/dist/es/components/calendar/daikin-calendar.d.ts +87 -0
- package/dist/es/components/calendar/daikin-calendar.js +550 -0
- package/dist/es/components/calendar/index.d.ts +1 -0
- package/dist/es/components/calendar/index.js +4 -0
- package/dist/es/components/card/daikin-card.js +2 -2
- package/dist/es/components/card-footer/daikin-card-footer.js +1 -1
- package/dist/es/components/card-header/daikin-card-header.js +2 -2
- package/dist/es/components/carousel/daikin-carousel.js +8 -4
- package/dist/es/components/carousel-item/daikin-carousel-item.js +3 -3
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +9 -12
- package/dist/es/components/checkbox/daikin-checkbox.js +13 -17
- package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
- package/dist/es/components/checkbox-group/daikin-checkbox-group.js +95 -0
- package/dist/es/components/checkbox-group/index.d.ts +1 -0
- package/dist/es/components/checkbox-group/index.js +4 -0
- package/dist/es/components/chip/daikin-chip.d.ts +36 -0
- package/dist/es/components/chip/daikin-chip.js +107 -0
- package/dist/es/components/chip/index.d.ts +1 -0
- package/dist/es/components/chip/index.js +4 -0
- package/dist/es/components/combobox/daikin-combobox.d.ts +134 -0
- package/dist/es/components/combobox/daikin-combobox.js +605 -0
- package/dist/es/components/combobox/index.d.ts +1 -0
- package/dist/es/components/combobox/index.js +5 -0
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +106 -0
- package/dist/es/components/date-picker/daikin-date-picker.js +627 -0
- package/dist/es/components/date-picker/index.d.ts +1 -0
- package/dist/es/components/date-picker/index.js +4 -0
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +7 -15
- package/dist/es/components/dropdown/daikin-dropdown.js +92 -58
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +1 -1
- package/dist/es/components/icon/daikin-icon.d.ts +129 -9
- package/dist/es/components/icon/daikin-icon.js +119 -14
- package/dist/es/components/icon/icons.json.d.ts +16 -16
- package/dist/es/components/icon/icons.json.js +5 -1
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +20 -2
- package/dist/es/components/icon-button/daikin-icon-button.js +31 -5
- package/dist/es/components/index.d.ts +14 -0
- package/dist/es/components/index.js +40 -1
- package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +3 -1
- package/dist/es/components/inline-notification/daikin-inline-notification.js +14 -19
- package/dist/es/components/input-group/daikin-input-group.d.ts +50 -1
- package/dist/es/components/input-group/daikin-input-group.js +5 -5
- package/dist/es/components/link/daikin-link.js +1 -1
- package/dist/es/components/list/daikin-list.d.ts +16 -0
- package/dist/es/components/list/daikin-list.js +76 -4
- package/dist/es/components/list-item/daikin-list-item.d.ts +9 -3
- package/dist/es/components/list-item/daikin-list-item.js +28 -8
- package/dist/es/components/loading/daikin-loading.d.ts +1 -0
- package/dist/es/components/loading/daikin-loading.js +2 -2
- package/dist/es/components/logo/daikin-logo.d.ts +54 -0
- package/dist/es/components/logo/daikin-logo.js +106 -0
- package/dist/es/components/logo/index.d.ts +1 -0
- package/dist/es/components/logo/index.js +4 -0
- package/dist/es/components/menu/daikin-menu.d.ts +89 -0
- package/dist/es/components/menu/daikin-menu.js +206 -0
- package/dist/es/components/menu/index.d.ts +1 -0
- package/dist/es/components/menu/index.js +4 -0
- package/dist/es/components/modal/daikin-modal.d.ts +61 -0
- package/dist/es/components/modal/daikin-modal.js +116 -0
- package/dist/es/components/modal/index.d.ts +1 -0
- package/dist/es/components/modal/index.js +4 -0
- package/dist/es/components/modal-footer/daikin-modal-footer.d.ts +33 -0
- package/dist/es/components/modal-footer/daikin-modal-footer.js +41 -0
- package/dist/es/components/modal-footer/index.d.ts +1 -0
- package/dist/es/components/modal-footer/index.js +4 -0
- package/dist/es/components/modal-header/daikin-modal-header.d.ts +43 -0
- package/dist/es/components/modal-header/daikin-modal-header.js +97 -0
- package/dist/es/components/modal-header/index.d.ts +1 -0
- package/dist/es/components/modal-header/index.js +4 -0
- package/dist/es/components/pagination/daikin-pagination.js +1 -1
- package/dist/es/components/progress-bar/daikin-progress-bar.js +6 -6
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es/components/radio/daikin-radio.d.ts +2 -12
- package/dist/es/components/radio/daikin-radio.js +5 -14
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es/components/radio-group/daikin-radio-group.js +2 -2
- package/dist/es/components/select/daikin-select.js +7 -2
- package/dist/es/components/slider/daikin-slider.d.ts +67 -0
- package/dist/es/components/slider/daikin-slider.js +264 -0
- package/dist/es/components/slider/index.d.ts +1 -0
- package/dist/es/components/slider/index.js +4 -0
- package/dist/es/components/slider/slider-utils.d.ts +37 -0
- package/dist/es/components/slider/slider-utils.js +57 -0
- package/dist/es/components/tab/daikin-tab.js +2 -1
- package/dist/es/components/tab-panels/daikin-tab-panels.js +1 -1
- package/dist/es/components/table/daikin-table.d.ts +72 -34
- package/dist/es/components/table/daikin-table.js +75 -16
- package/dist/es/components/table-cell/daikin-table-cell.d.ts +1 -1
- package/dist/es/components/table-cell/daikin-table-cell.js +3 -2
- package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +8 -1
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +32 -7
- package/dist/es/components/tabs/daikin-tabs.js +3 -3
- package/dist/es/components/text-area/daikin-text-area.d.ts +2 -12
- package/dist/es/components/text-area/daikin-text-area.js +5 -14
- package/dist/es/components/text-field/daikin-text-field.d.ts +57 -18
- package/dist/es/components/text-field/daikin-text-field.js +290 -58
- package/dist/es/components/text-field/number-utils.d.ts +26 -0
- package/dist/es/components/text-field/number-utils.js +61 -0
- package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +136 -0
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +313 -0
- package/dist/es/components/text-masked-field/index.d.ts +1 -0
- package/dist/es/components/text-masked-field/index.js +4 -0
- package/dist/es/components/time-picker/daikin-time-picker.d.ts +165 -0
- package/dist/es/components/time-picker/daikin-time-picker.js +578 -0
- package/dist/es/components/time-picker/index.d.ts +1 -0
- package/dist/es/components/time-picker/index.js +14 -0
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +2 -0
- package/dist/es/components/toast-notification/daikin-toast-notification.js +11 -8
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
- package/dist/es/components/toggle/daikin-toggle.d.ts +2 -12
- package/dist/es/components/toggle/daikin-toggle.js +5 -14
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +11 -3
- package/dist/es/components/tooltip/daikin-tooltip.js +25 -9
- package/dist/es/components/tree/daikin-tree.js +1 -1
- package/dist/es/components/tree-item/daikin-tree-item.js +1 -1
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +2 -0
- package/dist/es/components/tree-section/daikin-tree-section.js +1 -1
- package/dist/es/controllers/click-outside.js +3 -1
- package/dist/es/controllers/floating-ui-auto-update.d.ts +12 -0
- package/dist/es/controllers/floating-ui-auto-update.js +22 -4
- package/dist/es/controllers/focus-trap.d.ts +10 -0
- package/dist/es/controllers/focus-trap.js +42 -0
- package/dist/es/icon-registry.d.ts +120 -0
- package/dist/es/icon-registry.js +170 -0
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +43 -1
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/calendar-common.d.ts +64 -0
- package/dist/es/utils/calendar-common.js +151 -0
- package/dist/es/utils/notification-common.d.ts +2 -2
- package/dist/es/utils/notification-common.js +19 -15
- package/dist/es/{components/tabs → utils}/scroller.d.ts +2 -2
- package/dist/es/{components/tabs → utils}/scroller.js +20 -12
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/base/dds-form-element.d.ts +100 -0
- package/dist/es-dev/base/dds-form-element.js +139 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +1 -1
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +8 -4
- package/dist/es-dev/components/avatar/daikin-avatar.d.ts +3 -0
- package/dist/es-dev/components/avatar/daikin-avatar.js +2 -1
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +1 -1
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
- package/dist/es-dev/components/button/daikin-button.d.ts +20 -10
- package/dist/es-dev/components/button/daikin-button.js +36 -14
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +87 -0
- package/dist/es-dev/components/calendar/daikin-calendar.js +561 -0
- package/dist/es-dev/components/calendar/index.d.ts +1 -0
- package/dist/es-dev/components/calendar/index.js +4 -0
- package/dist/es-dev/components/card/daikin-card.js +2 -2
- package/dist/es-dev/components/card-footer/daikin-card-footer.js +1 -1
- package/dist/es-dev/components/card-header/daikin-card-header.js +2 -2
- package/dist/es-dev/components/carousel/daikin-carousel.js +8 -4
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +3 -3
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +9 -12
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +13 -17
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +95 -0
- package/dist/es-dev/components/checkbox-group/index.d.ts +1 -0
- package/dist/es-dev/components/checkbox-group/index.js +4 -0
- package/dist/es-dev/components/chip/daikin-chip.d.ts +36 -0
- package/dist/es-dev/components/chip/daikin-chip.js +107 -0
- package/dist/es-dev/components/chip/index.d.ts +1 -0
- package/dist/es-dev/components/chip/index.js +4 -0
- package/dist/es-dev/components/combobox/daikin-combobox.d.ts +134 -0
- package/dist/es-dev/components/combobox/daikin-combobox.js +605 -0
- package/dist/es-dev/components/combobox/index.d.ts +1 -0
- package/dist/es-dev/components/combobox/index.js +5 -0
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +106 -0
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +638 -0
- package/dist/es-dev/components/date-picker/index.d.ts +1 -0
- package/dist/es-dev/components/date-picker/index.js +4 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +7 -15
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +92 -58
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +1 -1
- package/dist/es-dev/components/icon/daikin-icon.d.ts +129 -9
- package/dist/es-dev/components/icon/daikin-icon.js +143 -18
- package/dist/es-dev/components/icon/icons.json.d.ts +16 -16
- package/dist/es-dev/components/icon/icons.json.js +5 -1
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +20 -2
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +31 -5
- package/dist/es-dev/components/index.d.ts +14 -0
- package/dist/es-dev/components/index.js +40 -1
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +3 -1
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +14 -19
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +50 -1
- package/dist/es-dev/components/input-group/daikin-input-group.js +5 -5
- package/dist/es-dev/components/link/daikin-link.js +1 -1
- package/dist/es-dev/components/list/daikin-list.d.ts +16 -0
- package/dist/es-dev/components/list/daikin-list.js +76 -4
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +9 -3
- package/dist/es-dev/components/list-item/daikin-list-item.js +28 -8
- package/dist/es-dev/components/loading/daikin-loading.d.ts +1 -0
- package/dist/es-dev/components/loading/daikin-loading.js +2 -2
- package/dist/es-dev/components/logo/daikin-logo.d.ts +54 -0
- package/dist/es-dev/components/logo/daikin-logo.js +106 -0
- package/dist/es-dev/components/logo/index.d.ts +1 -0
- package/dist/es-dev/components/logo/index.js +4 -0
- package/dist/es-dev/components/menu/daikin-menu.d.ts +89 -0
- package/dist/es-dev/components/menu/daikin-menu.js +206 -0
- package/dist/es-dev/components/menu/index.d.ts +1 -0
- package/dist/es-dev/components/menu/index.js +4 -0
- package/dist/es-dev/components/modal/daikin-modal.d.ts +61 -0
- package/dist/es-dev/components/modal/daikin-modal.js +116 -0
- package/dist/es-dev/components/modal/index.d.ts +1 -0
- package/dist/es-dev/components/modal/index.js +4 -0
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.d.ts +33 -0
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +41 -0
- package/dist/es-dev/components/modal-footer/index.d.ts +1 -0
- package/dist/es-dev/components/modal-footer/index.js +4 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.d.ts +43 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.js +97 -0
- package/dist/es-dev/components/modal-header/index.d.ts +1 -0
- package/dist/es-dev/components/modal-header/index.js +4 -0
- package/dist/es-dev/components/pagination/daikin-pagination.js +1 -1
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +6 -6
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es-dev/components/radio/daikin-radio.d.ts +2 -12
- package/dist/es-dev/components/radio/daikin-radio.js +5 -14
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +2 -2
- package/dist/es-dev/components/select/daikin-select.js +7 -2
- package/dist/es-dev/components/slider/daikin-slider.d.ts +67 -0
- package/dist/es-dev/components/slider/daikin-slider.js +264 -0
- package/dist/es-dev/components/slider/index.d.ts +1 -0
- package/dist/es-dev/components/slider/index.js +4 -0
- package/dist/es-dev/components/slider/slider-utils.d.ts +37 -0
- package/dist/es-dev/components/slider/slider-utils.js +57 -0
- package/dist/es-dev/components/tab/daikin-tab.js +2 -1
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +1 -1
- package/dist/es-dev/components/table/daikin-table.d.ts +72 -34
- package/dist/es-dev/components/table/daikin-table.js +78 -19
- package/dist/es-dev/components/table-cell/daikin-table-cell.d.ts +1 -1
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +3 -2
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +8 -1
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +32 -7
- package/dist/es-dev/components/tabs/daikin-tabs.js +3 -3
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +2 -12
- package/dist/es-dev/components/text-area/daikin-text-area.js +5 -14
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +57 -18
- package/dist/es-dev/components/text-field/daikin-text-field.js +290 -58
- package/dist/es-dev/components/text-field/number-utils.d.ts +26 -0
- package/dist/es-dev/components/text-field/number-utils.js +64 -0
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +136 -0
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +313 -0
- package/dist/es-dev/components/text-masked-field/index.d.ts +1 -0
- package/dist/es-dev/components/text-masked-field/index.js +4 -0
- package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +165 -0
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +590 -0
- package/dist/es-dev/components/time-picker/index.d.ts +1 -0
- package/dist/es-dev/components/time-picker/index.js +14 -0
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +2 -0
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +11 -8
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +2 -12
- package/dist/es-dev/components/toggle/daikin-toggle.js +5 -14
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +11 -3
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +25 -9
- package/dist/es-dev/components/tree/daikin-tree.js +1 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -1
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +2 -0
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +1 -1
- package/dist/es-dev/controllers/click-outside.js +3 -1
- package/dist/es-dev/controllers/floating-ui-auto-update.d.ts +12 -0
- package/dist/es-dev/controllers/floating-ui-auto-update.js +22 -4
- package/dist/es-dev/controllers/focus-trap.d.ts +10 -0
- package/dist/es-dev/controllers/focus-trap.js +42 -0
- package/dist/es-dev/icon-registry.d.ts +120 -0
- package/dist/es-dev/icon-registry.js +170 -0
- package/dist/es-dev/index.d.ts +1 -0
- package/dist/es-dev/index.js +43 -1
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/calendar-common.d.ts +64 -0
- package/dist/es-dev/utils/calendar-common.js +151 -0
- package/dist/es-dev/utils/notification-common.d.ts +2 -2
- package/dist/es-dev/utils/notification-common.js +19 -15
- package/dist/es-dev/{components/tabs → utils}/scroller.d.ts +2 -2
- package/dist/es-dev/{components/tabs → utils}/scroller.js +20 -12
- package/icons/alarm.svg +3 -0
- package/icons/calendar.svg +3 -0
- package/icons/chevron-down.svg +3 -3
- package/icons/chevron-left.svg +2 -2
- package/icons/chevron-right.svg +2 -2
- package/icons/chevron-up.svg +2 -2
- package/icons/close.svg +3 -0
- package/icons/error.svg +3 -0
- package/icons/information.svg +3 -0
- package/icons/logo-negative.svg +10 -0
- package/icons/logo-positive.svg +10 -0
- package/icons/{dropdown-chevron-down.svg → number-minus.svg} +3 -1
- package/icons/number-plus.svg +5 -0
- package/icons/password-hidden.svg +3 -0
- package/icons/password-visible.svg +3 -0
- package/icons/pulldown-down.svg +3 -0
- package/icons/search.svg +3 -0
- package/icons/success.svg +3 -0
- package/icons/warning.svg +3 -0
- package/package.json +20 -6
- package/icons/cross.svg +0 -3
- package/icons/notification-close.svg +0 -5
- package/icons/status-alarm.svg +0 -5
- package/icons/status-error.svg +0 -3
- package/icons/status-information.svg +0 -5
- package/icons/status-negative.svg +0 -5
- package/icons/status-positive.svg +0 -5
- package/icons/status-warning.svg +0 -3
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { flip, offset, size } from "@floating-ui/dom";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import {
|
|
3
|
+
import { unsafeCSS, css, html } from "lit";
|
|
4
4
|
import { property, queryAssignedElements, query, state } from "lit/decorators.js";
|
|
5
5
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import
|
|
7
|
+
import "../../base/dds-element.js";
|
|
8
8
|
import { ddsElement } from "../../base/decorators.js";
|
|
9
9
|
import "../../base/define.js";
|
|
10
|
-
import {
|
|
10
|
+
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
11
11
|
import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-auto-update.js";
|
|
12
12
|
import tailwindStyles from "../../tailwind.css.js";
|
|
13
13
|
import { isSimpleKeyEvent } from "../../utils/is-simple-key.js";
|
|
14
|
+
import "../dropdown-item/daikin-dropdown-item.js";
|
|
14
15
|
var __defProp = Object.defineProperty;
|
|
15
16
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
17
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -43,12 +44,13 @@ const cvaButton = cva(
|
|
|
43
44
|
"outline",
|
|
44
45
|
"outline-1",
|
|
45
46
|
"-outline-offset-1",
|
|
47
|
+
"break-all",
|
|
46
48
|
"focus-visible:outline-2",
|
|
47
49
|
"focus-visible:-outline-offset-2",
|
|
48
50
|
"enabled:outline-[--color-base]",
|
|
49
51
|
"disabled:text-ddt-color-common-disabled",
|
|
50
52
|
"disabled:outline-ddt-color-common-disabled",
|
|
51
|
-
"after:i-daikin-
|
|
53
|
+
"after:i-daikin-chevron-down",
|
|
52
54
|
"after:size-6",
|
|
53
55
|
"after:flex-none",
|
|
54
56
|
"after:ml-auto",
|
|
@@ -98,11 +100,9 @@ const floatingPositionOptions = {
|
|
|
98
100
|
})
|
|
99
101
|
]
|
|
100
102
|
};
|
|
101
|
-
let DaikinDropdown = class extends
|
|
103
|
+
let DaikinDropdown = class extends DDSFormElement {
|
|
102
104
|
constructor() {
|
|
103
105
|
super(...arguments);
|
|
104
|
-
this._internals = this.attachInternals();
|
|
105
|
-
this.value = null;
|
|
106
106
|
this.placeholder = "";
|
|
107
107
|
this.disabled = false;
|
|
108
108
|
this.required = false;
|
|
@@ -114,10 +114,7 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
114
114
|
this._label = null;
|
|
115
115
|
this._initialUpdateCompleted = false;
|
|
116
116
|
this._autoUpdateController = new FloatingUIAutoUpdateController(this);
|
|
117
|
-
this.
|
|
118
|
-
this,
|
|
119
|
-
this._onClickOutside
|
|
120
|
-
);
|
|
117
|
+
this._willBeFocusedByPress = false;
|
|
121
118
|
this._lastFocusedItem = null;
|
|
122
119
|
this._dropdownRef = createRef();
|
|
123
120
|
}
|
|
@@ -130,9 +127,6 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
130
127
|
}
|
|
131
128
|
);
|
|
132
129
|
}
|
|
133
|
-
_onClickOutside() {
|
|
134
|
-
this.open = false;
|
|
135
|
-
}
|
|
136
130
|
_searchItem(prefix) {
|
|
137
131
|
const items = this._items.filter(
|
|
138
132
|
(item) => {
|
|
@@ -159,24 +153,18 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
159
153
|
this.open = true;
|
|
160
154
|
return;
|
|
161
155
|
}
|
|
162
|
-
const items = this._items;
|
|
163
|
-
const
|
|
164
|
-
|
|
156
|
+
const items = this._items.filter(({ disabled }) => !disabled);
|
|
157
|
+
const focusedItemIndex = items.findIndex(
|
|
158
|
+
(item2) => item2.matches(":focus-within")
|
|
159
|
+
);
|
|
165
160
|
if (focusedItemIndex === -1) {
|
|
166
161
|
moveOffset = 1;
|
|
167
162
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const item = items[index];
|
|
171
|
-
if (item.disabled) {
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
item.focus();
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
163
|
+
const item = items[Math.max(0, Math.min(focusedItemIndex + moveOffset, items.length - 1))];
|
|
164
|
+
item.focus();
|
|
177
165
|
}
|
|
178
166
|
_updateFormValue() {
|
|
179
|
-
this.
|
|
167
|
+
this.setFormValue(this.value);
|
|
180
168
|
}
|
|
181
169
|
_updateItemsSelectable() {
|
|
182
170
|
for (const item of this._items) {
|
|
@@ -184,7 +172,7 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
184
172
|
}
|
|
185
173
|
}
|
|
186
174
|
_updateValueBySelectedOptions() {
|
|
187
|
-
this.value = this.selectedOptions.at(-1) ??
|
|
175
|
+
this.value = this.selectedOptions.at(-1) ?? "";
|
|
188
176
|
}
|
|
189
177
|
_updateSelectedOptionsByValue() {
|
|
190
178
|
this.selectedOptions = this.value ? [this.value] : [];
|
|
@@ -199,6 +187,15 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
199
187
|
_handleSelectOption(value) {
|
|
200
188
|
this.value = value;
|
|
201
189
|
this.selectedOptions = this.multiple ? this.selectedOptions.includes(value) ? this.selectedOptions.filter((option) => option != value) : [...this.selectedOptions, value] : [value];
|
|
190
|
+
this.dispatchEvent(new Event("change"));
|
|
191
|
+
}
|
|
192
|
+
_handleFocusOut(event) {
|
|
193
|
+
if (!event.relatedTarget && !this._willBeFocusedByPress) {
|
|
194
|
+
if (!this.multiple && this._lastFocusedItem) {
|
|
195
|
+
this._handleSelectOption(this._lastFocusedItem.value);
|
|
196
|
+
}
|
|
197
|
+
this.open = false;
|
|
198
|
+
}
|
|
202
199
|
}
|
|
203
200
|
/**
|
|
204
201
|
* Removes the last selected option.
|
|
@@ -209,19 +206,23 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
209
206
|
_removeLastSelection() {
|
|
210
207
|
if (this.multiple) {
|
|
211
208
|
this.selectedOptions = this.selectedOptions.slice(0, -1);
|
|
212
|
-
this.value = this.selectedOptions.at(-1) ??
|
|
209
|
+
this.value = this.selectedOptions.at(-1) ?? "";
|
|
213
210
|
} else {
|
|
214
211
|
this.selectedOptions = [];
|
|
215
|
-
this.value =
|
|
212
|
+
this.value = "";
|
|
216
213
|
}
|
|
217
214
|
}
|
|
218
|
-
|
|
219
|
-
if (
|
|
215
|
+
_handleKeyDown(event) {
|
|
216
|
+
if (event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
|
|
217
|
+
if (event.key === "ArrowDown") {
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
this.open = true;
|
|
220
|
+
} else if (event.key === "ArrowUp") {
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
this.open = false;
|
|
223
|
+
}
|
|
220
224
|
return;
|
|
221
225
|
}
|
|
222
|
-
this.open = !this.open;
|
|
223
|
-
}
|
|
224
|
-
_handleKeyDown(event) {
|
|
225
226
|
if (!isSimpleKeyEvent(event)) {
|
|
226
227
|
return;
|
|
227
228
|
}
|
|
@@ -234,6 +235,8 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
234
235
|
const operation = {
|
|
235
236
|
ArrowDown: "down",
|
|
236
237
|
ArrowUp: "up",
|
|
238
|
+
PageDown: "pageDown",
|
|
239
|
+
PageUp: "pageUp",
|
|
237
240
|
Escape: "close"
|
|
238
241
|
}[event.key];
|
|
239
242
|
switch (operation) {
|
|
@@ -242,6 +245,11 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
242
245
|
event.preventDefault();
|
|
243
246
|
this._moveFocus(operation === "up" ? -1 : 1);
|
|
244
247
|
break;
|
|
248
|
+
case "pageDown":
|
|
249
|
+
case "pageUp":
|
|
250
|
+
event.preventDefault();
|
|
251
|
+
this._moveFocus(operation === "pageUp" ? -10 : 10);
|
|
252
|
+
break;
|
|
245
253
|
case "close":
|
|
246
254
|
event.preventDefault();
|
|
247
255
|
this._handleKeyDownEscape();
|
|
@@ -265,6 +273,28 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
265
273
|
}
|
|
266
274
|
this._lastFocusedItem = target;
|
|
267
275
|
}
|
|
276
|
+
_handlePointerDown() {
|
|
277
|
+
if (this.open) {
|
|
278
|
+
this._willBeFocusedByPress = true;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
_handlePointerUp() {
|
|
282
|
+
if (this.disabled) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
this._willBeFocusedByPress = false;
|
|
286
|
+
this.open = !this.open;
|
|
287
|
+
}
|
|
288
|
+
_handleButtonKeyDown(event) {
|
|
289
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
290
|
+
event.preventDefault();
|
|
291
|
+
event.stopPropagation();
|
|
292
|
+
if (this.disabled) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
this.open = !this.open;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
268
298
|
/**
|
|
269
299
|
* Handle `floating-ready` event dispatched by `FloatingUIAutoUpdateController`.
|
|
270
300
|
* The dropdown menu opens after the Floating UI has finished calculating its position, so there is a slight time lag between the change to `this.open` and the actual display.
|
|
@@ -273,7 +303,9 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
273
303
|
_handleFloatingReady() {
|
|
274
304
|
const items = this._items;
|
|
275
305
|
const item = items.find((item2) => item2 === this._lastFocusedItem) ?? items.find((item2) => item2.value === this.value) ?? items.at(0);
|
|
276
|
-
|
|
306
|
+
setTimeout(() => {
|
|
307
|
+
item == null ? void 0 : item.focus();
|
|
308
|
+
}, 100);
|
|
277
309
|
}
|
|
278
310
|
/**
|
|
279
311
|
* Handle `select` event from `daikin-dropdown-item`.
|
|
@@ -283,13 +315,13 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
283
315
|
if (!this.multiple) {
|
|
284
316
|
this.open = false;
|
|
285
317
|
}
|
|
286
|
-
this.dispatchEvent(new Event("change"));
|
|
287
318
|
}
|
|
288
319
|
_handleSlotChange() {
|
|
289
320
|
this._updateItemsSelectable();
|
|
290
321
|
}
|
|
291
322
|
render() {
|
|
292
|
-
|
|
323
|
+
const fallbackLabel = this.open && !this.disabled ? "Close dropdown" : this.selectedOptions.length ? `Selected: ${this._selectionLabels.join(", ")}` : "Open dropdown";
|
|
324
|
+
return html`<div class="w-full" @keydown=${this._handleKeyDown}>
|
|
293
325
|
<button
|
|
294
326
|
${ref(this._dropdownRef)}
|
|
295
327
|
type="button"
|
|
@@ -299,32 +331,40 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
299
331
|
placeholder: !this.selectedOptions.length
|
|
300
332
|
})}
|
|
301
333
|
?disabled=${this.disabled}
|
|
302
|
-
|
|
303
|
-
aria-label=${ifDefined(this._label ?? void 0)}
|
|
334
|
+
aria-label=${this._label ?? fallbackLabel}
|
|
304
335
|
aria-expanded=${this.open && !this.disabled}
|
|
305
336
|
aria-disabled=${this.disabled}
|
|
306
337
|
aria-controls="dropdown-items"
|
|
307
|
-
aria-autocomplete="list"
|
|
308
338
|
aria-required=${this.required}
|
|
309
|
-
|
|
339
|
+
aria-haspopup="listbox"
|
|
340
|
+
@pointerup=${this._handlePointerUp}
|
|
341
|
+
@pointerdown=${this._handlePointerDown}
|
|
342
|
+
@keydown=${this._handleButtonKeyDown}
|
|
310
343
|
${this._autoUpdateController.refReference()}
|
|
311
344
|
>
|
|
312
|
-
|
|
345
|
+
<span class="truncate">
|
|
346
|
+
${this.selectedOptions.length ? this.multiple && this.selectedOptions.length > (this.maxLabels ?? 0) ? this.selectedOptions.length === 1 ? `one item selected` : `${this.selectedOptions.length} items selected` : this._selectionLabels.join(", ") : this.placeholder}
|
|
347
|
+
</span>
|
|
313
348
|
</button>
|
|
314
349
|
<div
|
|
315
350
|
id="dropdown-items"
|
|
316
|
-
popover
|
|
317
|
-
class="floating-unready:hidden absolute left-[--floating-x,0] top-[--floating-y,0] min-w-[--floating-width] max-h-[12.5rem] border border-ddt-color-divider
|
|
318
|
-
aria-label=${ifDefined(this._label ?? void 0)}
|
|
319
|
-
role="listbox"
|
|
351
|
+
popover="manual"
|
|
352
|
+
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"
|
|
320
353
|
@floating-ready=${this._handleFloatingReady}
|
|
321
354
|
${this._autoUpdateController.refFloating()}
|
|
322
355
|
>
|
|
323
|
-
<
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
356
|
+
<div
|
|
357
|
+
class="flex-1 overflow-y-auto break-all"
|
|
358
|
+
aria-label=${ifDefined(this._label ?? void 0)}
|
|
359
|
+
role="listbox"
|
|
360
|
+
>
|
|
361
|
+
<slot
|
|
362
|
+
@slotchange=${this._handleSlotChange}
|
|
363
|
+
@select=${this._handleSelect}
|
|
364
|
+
@focusin=${this._handleFocusIn}
|
|
365
|
+
@focusout=${this._handleFocusOut}
|
|
366
|
+
></slot>
|
|
367
|
+
</div>
|
|
328
368
|
</div>
|
|
329
369
|
${// Activate auto update only when the dropdown is open.
|
|
330
370
|
// TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
|
|
@@ -332,8 +372,6 @@ let DaikinDropdown = class extends DDSElement {
|
|
|
332
372
|
floatingPositionOptions,
|
|
333
373
|
this.open && !this.disabled
|
|
334
374
|
)}
|
|
335
|
-
${// Listen to click outside only when the dropdown is open.
|
|
336
|
-
this._clickOutsideController.directive(this.open && !this.disabled)}
|
|
337
375
|
</div>`;
|
|
338
376
|
}
|
|
339
377
|
/**
|
|
@@ -410,10 +448,6 @@ DaikinDropdown.styles = css`
|
|
|
410
448
|
width: 100%;
|
|
411
449
|
}
|
|
412
450
|
`;
|
|
413
|
-
DaikinDropdown.formAssociated = true;
|
|
414
|
-
__decorateClass([
|
|
415
|
-
property({ type: String, reflect: true })
|
|
416
|
-
], DaikinDropdown.prototype, "value", 2);
|
|
417
451
|
__decorateClass([
|
|
418
452
|
property({ type: String, reflect: true })
|
|
419
453
|
], DaikinDropdown.prototype, "placeholder", 2);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import {
|
|
2
|
+
import { unsafeCSS, css, html } from "lit";
|
|
3
3
|
import { property, query } from "lit/decorators.js";
|
|
4
4
|
import { DDSElement } from "../../base/dds-element.js";
|
|
5
5
|
import { ddsElement } from "../../base/decorators.js";
|
|
@@ -1,23 +1,103 @@
|
|
|
1
1
|
import { DDSElement } from "../../base/index.js";
|
|
2
|
+
import { IconRegistry } from "../../icon-registry.js";
|
|
2
3
|
import { MergeVariantProps } from "../../type-utils.js";
|
|
3
|
-
|
|
4
|
+
declare const icons: {
|
|
5
|
+
"logo-positive": {
|
|
6
|
+
class: string;
|
|
7
|
+
color: null;
|
|
8
|
+
};
|
|
9
|
+
"logo-negative": {
|
|
10
|
+
class: string;
|
|
11
|
+
color: null;
|
|
12
|
+
};
|
|
13
|
+
alarm: {
|
|
14
|
+
class: string;
|
|
15
|
+
color: null;
|
|
16
|
+
};
|
|
17
|
+
close: {
|
|
18
|
+
class: string;
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
information: {
|
|
22
|
+
class: string;
|
|
23
|
+
color: null;
|
|
24
|
+
};
|
|
25
|
+
error: {
|
|
26
|
+
class: string;
|
|
27
|
+
color: null;
|
|
28
|
+
};
|
|
29
|
+
success: {
|
|
30
|
+
class: string;
|
|
31
|
+
color: null;
|
|
32
|
+
};
|
|
33
|
+
warning: {
|
|
34
|
+
class: string;
|
|
35
|
+
color: null;
|
|
36
|
+
};
|
|
37
|
+
"pagination-chevron-left": {
|
|
38
|
+
class: string;
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
"pagination-chevron-right": {
|
|
42
|
+
class: string;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
profile: {
|
|
46
|
+
class: string;
|
|
47
|
+
color: null;
|
|
48
|
+
};
|
|
49
|
+
"chevron-up": {
|
|
50
|
+
class: string;
|
|
51
|
+
color: null;
|
|
52
|
+
};
|
|
53
|
+
"chevron-down": {
|
|
54
|
+
class: string;
|
|
55
|
+
color: null;
|
|
56
|
+
};
|
|
57
|
+
"chevron-left": {
|
|
58
|
+
class: string;
|
|
59
|
+
color: null;
|
|
60
|
+
};
|
|
61
|
+
"chevron-right": {
|
|
62
|
+
class: string;
|
|
63
|
+
color: null;
|
|
64
|
+
};
|
|
65
|
+
sort: {
|
|
66
|
+
class: string;
|
|
67
|
+
color: null;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
4
70
|
export declare const iconList: string[];
|
|
5
71
|
export type IconType = keyof typeof icons;
|
|
6
72
|
declare const cvaIcon: (props?: ({
|
|
7
|
-
icon?: string | number | null | undefined;
|
|
8
73
|
color?: "current" | "default" | "black" | "white" | null | undefined;
|
|
74
|
+
mode?: "mask" | "background" | "inline" | "static" | null | undefined;
|
|
9
75
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
76
|
export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
11
77
|
/**
|
|
12
78
|
* The icon component is a versatile UI element used to display small graphical symbols or images that represent actions, objects, or concepts within an application.
|
|
13
|
-
* The icon set is provided by DDS.
|
|
79
|
+
* The icon set is provided by DDS, and it also supports custom icons via the icon registry.
|
|
14
80
|
*
|
|
15
|
-
*
|
|
81
|
+
* For static DDS icons, the component uses the predefined icon set.
|
|
82
|
+
* For custom icons, it can dynamically load icons from various sources using the icon registry.
|
|
16
83
|
*
|
|
17
|
-
*
|
|
18
|
-
* In the development build, warnings will be displayed in the console, so please check there if you encounter any unexpected behavior.
|
|
84
|
+
* This component supports multiple rendering modes for enhanced security when using custom icons:
|
|
19
85
|
*
|
|
20
|
-
*
|
|
86
|
+
* - **mask** (default for custom icons): Uses CSS mask-image for secure rendering with color customization
|
|
87
|
+
* - **background**: Uses CSS background-image for secure rendering without color customization
|
|
88
|
+
* - **inline**: Traditional SVG rendering using innerHTML (use with caution)
|
|
89
|
+
* - **static** (for DDS icons): Uses predefined CSS classes from the DDS icon set
|
|
90
|
+
*
|
|
91
|
+
* **Security Note**: When using custom icons, especially with `inline` mode, ensure that the SVG content comes from trusted sources only.
|
|
92
|
+
* Untrusted input may lead to XSS vulnerabilities. Consider using `mask` or `background` modes for better security.
|
|
93
|
+
*
|
|
94
|
+
* To use a custom color, set the `color` property to `"current"` and apply the desired color using the CSS `color` property.
|
|
95
|
+
* 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.
|
|
96
|
+
*
|
|
97
|
+
* If an icon cannot be loaded, a blank space will be displayed.
|
|
98
|
+
* In development builds, warnings will be shown in the console for debugging.
|
|
99
|
+
*
|
|
100
|
+
* @cssprop [--ddc-icon-size] - Icon size. If a value other than "current" is set for the `size` property, it will be automatically overwritten. This may also be set by a parent component such as `daikin-icon-button`.
|
|
21
101
|
*
|
|
22
102
|
* @example
|
|
23
103
|
*
|
|
@@ -26,15 +106,51 @@ export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
|
26
106
|
* ```
|
|
27
107
|
*
|
|
28
108
|
* ```html
|
|
109
|
+
* <!-- Using a DDS static icon -->
|
|
29
110
|
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
111
|
+
*
|
|
112
|
+
* <!-- Using a custom icon -->
|
|
113
|
+
* <daikin-icon icon="my-custom-icon" color="black" size="m"></daikin-icon>
|
|
114
|
+
*
|
|
115
|
+
* <script>
|
|
116
|
+
* import { iconRegistry } from "@daikin-oss/design-system-web-components/icon-registry.js";
|
|
117
|
+
*
|
|
118
|
+
* // Register with mask mode for secure rendering
|
|
119
|
+
* iconRegistry.register({
|
|
120
|
+
* name: "my-custom-icon",
|
|
121
|
+
* svg: {
|
|
122
|
+
* svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">...</svg>',
|
|
123
|
+
* mode: "mask",
|
|
124
|
+
* defaultColor: "#0066cc"
|
|
125
|
+
* },
|
|
126
|
+
* });
|
|
127
|
+
*
|
|
128
|
+
* // Register dynamic custom icons
|
|
129
|
+
* iconRegistry.register({
|
|
130
|
+
* match: /^custom-/,
|
|
131
|
+
* async fetch: (name) => {
|
|
132
|
+
* const response = await fetch(`/path/to/custom/icons/${name}.svg`);
|
|
133
|
+
* if (!response.ok) {
|
|
134
|
+
* throw new Error(`Failed to load custom icon "${name}"`);
|
|
135
|
+
* }
|
|
136
|
+
* return response.text();
|
|
137
|
+
* },
|
|
138
|
+
* });
|
|
139
|
+
* </script>
|
|
30
140
|
* ```
|
|
31
141
|
*/
|
|
32
142
|
export declare class DaikinIcon extends DDSElement {
|
|
33
143
|
static readonly styles: import('lit').CSSResult;
|
|
34
144
|
/**
|
|
35
|
-
* Specify
|
|
145
|
+
* Specify icon registry instance.
|
|
146
|
+
* Default is the global icon registry.
|
|
147
|
+
*/
|
|
148
|
+
registry: IconRegistry;
|
|
149
|
+
/**
|
|
150
|
+
* Specify the name of the icon.
|
|
151
|
+
* Can be a static DDS icon name or a custom icon name registered in the icon registry.
|
|
36
152
|
*/
|
|
37
|
-
icon:
|
|
153
|
+
icon: string | null;
|
|
38
154
|
/**
|
|
39
155
|
* Specify icon color
|
|
40
156
|
*/
|
|
@@ -44,6 +160,10 @@ export declare class DaikinIcon extends DDSElement {
|
|
|
44
160
|
* If "current" is set, `--ddc-icon-size` CSS variable will be used. `--ddc-icon-size` may be set by the parent component such as `daikin-icon-button`.
|
|
45
161
|
*/
|
|
46
162
|
size: "s" | "m" | "l" | "xl" | "current";
|
|
163
|
+
private _iconData;
|
|
164
|
+
connectedCallback(): void;
|
|
165
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
166
|
+
private loadIcon;
|
|
47
167
|
render(): import('lit-html').TemplateResult<1>;
|
|
48
168
|
}
|
|
49
169
|
declare global {
|