@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
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { unsafeCSS, css, html } from "lit";
|
|
3
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
+
import { DDSFormElement } from "../../base/dds-form-element.js";
|
|
7
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
8
|
+
import "../dropdown-item/daikin-dropdown-item.js";
|
|
9
|
+
import "../dropdown/daikin-dropdown.js";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result) __defProp(target, key, result);
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
const VALUE_TIME_REGEX = /^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/;
|
|
21
|
+
const DEFAULT_MIN_TIME = "00:00";
|
|
22
|
+
const DEFAULT_MAX_TIME = "23:59";
|
|
23
|
+
function to24HourFormat(time, meridiem) {
|
|
24
|
+
const [hourInit, minute] = time.split(":").map(Number);
|
|
25
|
+
let hour = hourInit;
|
|
26
|
+
if (meridiem === "AM") {
|
|
27
|
+
if (hour === 12) hour = 0;
|
|
28
|
+
} else {
|
|
29
|
+
if (hour !== 12) hour += 12;
|
|
30
|
+
}
|
|
31
|
+
return `${hour.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}`;
|
|
32
|
+
}
|
|
33
|
+
function from24HourFormat(time) {
|
|
34
|
+
const [hour, minute] = time.split(":").map(Number);
|
|
35
|
+
const meridiem = hour >= 12 ? "PM" : "AM";
|
|
36
|
+
let hour12 = hour % 12;
|
|
37
|
+
if (hour12 === 0) hour12 = 12;
|
|
38
|
+
return {
|
|
39
|
+
time: `${hour12.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}`,
|
|
40
|
+
meridiem
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function isValidValueTime(str) {
|
|
44
|
+
return VALUE_TIME_REGEX.test(str);
|
|
45
|
+
}
|
|
46
|
+
function isTimeOutOfRange(time, min, max) {
|
|
47
|
+
const toMinutes = (s) => {
|
|
48
|
+
const [h, m] = s.split(":").map(Number);
|
|
49
|
+
return h * 60 + m;
|
|
50
|
+
};
|
|
51
|
+
const v = toMinutes(time);
|
|
52
|
+
const vMin = toMinutes(min);
|
|
53
|
+
const vMax = toMinutes(max);
|
|
54
|
+
return v < vMin || v > vMax;
|
|
55
|
+
}
|
|
56
|
+
const TIME_ITEMS = [
|
|
57
|
+
{
|
|
58
|
+
type: "hour",
|
|
59
|
+
range: [0, 2]
|
|
60
|
+
// 0-2 exclusive, selects "hh"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "minute",
|
|
64
|
+
range: [3, 5]
|
|
65
|
+
// 3-5 exclusive, selects "mm"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
const PLACEHOLDER_HOUR = "hh";
|
|
69
|
+
const PLACEHOLDER_MINUTE = "mm";
|
|
70
|
+
const PLACEHOLDER_ALL = formatPartsForUI({
|
|
71
|
+
hour: PLACEHOLDER_HOUR,
|
|
72
|
+
minute: PLACEHOLDER_MINUTE
|
|
73
|
+
});
|
|
74
|
+
function formatPartsForUI({
|
|
75
|
+
hour,
|
|
76
|
+
minute
|
|
77
|
+
}) {
|
|
78
|
+
return `${hour}:${minute}`;
|
|
79
|
+
}
|
|
80
|
+
function parsePartsFromUIValue(value) {
|
|
81
|
+
const [hour, minute] = value.split(":");
|
|
82
|
+
return { hour: hour || "hh", minute: minute || "mm" };
|
|
83
|
+
}
|
|
84
|
+
function tryParseTimeFromUIValue(value) {
|
|
85
|
+
const { hour, minute } = parsePartsFromUIValue(value);
|
|
86
|
+
if (!/^(0\d|1\d|2[0-3])$/.test(hour) || !/^[0-5]\d$/.test(minute)) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
const formattedHour = hour !== "hh" ? hour.padStart(2, "0") : "hh";
|
|
90
|
+
const formattedMinute = minute !== "mm" ? minute.padStart(2, "0") : "mm";
|
|
91
|
+
const timeString = `${formattedHour}:${formattedMinute}`;
|
|
92
|
+
return timeString;
|
|
93
|
+
}
|
|
94
|
+
function formatTimeForUI(timeString) {
|
|
95
|
+
const [hour, minute] = timeString.split(":");
|
|
96
|
+
return formatPartsForUI({
|
|
97
|
+
hour: hour.padStart(2, "0"),
|
|
98
|
+
minute: minute.padStart(2, "0")
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function getTimeItemInSelection(selectionStart, selectionEnd) {
|
|
102
|
+
for (const { type, range } of TIME_ITEMS) {
|
|
103
|
+
if (selectionStart >= range[0] && selectionStart <= range[1] && selectionEnd >= range[0] && selectionEnd <= range[1]) {
|
|
104
|
+
return type;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
function calcDigitInput(parts, item, digit, hourDigitIndex) {
|
|
110
|
+
if (!/^\d$/.test(digit)) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
switch (item) {
|
|
114
|
+
case "hour": {
|
|
115
|
+
if (parts.hour === "01" && ["0", "1", "2"].includes(digit)) {
|
|
116
|
+
return {
|
|
117
|
+
parts: { ...parts, hour: `1${digit}` },
|
|
118
|
+
done: true
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
if (parts.hour === "00") {
|
|
122
|
+
return {
|
|
123
|
+
parts: { ...parts, hour: `0${digit}` },
|
|
124
|
+
done: hourDigitIndex === 1
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
parts: { ...parts, hour: `0${digit}` },
|
|
129
|
+
done: digit > "1"
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
case "minute": {
|
|
133
|
+
if (["01", "02", "03", "04", "05"].includes(parts.minute)) {
|
|
134
|
+
return {
|
|
135
|
+
parts: { ...parts, minute: `${parts.minute[1]}${digit}` },
|
|
136
|
+
done: true
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
parts: { ...parts, minute: `0${digit}` },
|
|
141
|
+
done: digit > "5"
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const cvaField = cva(
|
|
147
|
+
[
|
|
148
|
+
"flex",
|
|
149
|
+
"items-center",
|
|
150
|
+
"size-full",
|
|
151
|
+
"w-[94px]",
|
|
152
|
+
"bg-ddt-color-common-background-default",
|
|
153
|
+
"p-3",
|
|
154
|
+
"rounded",
|
|
155
|
+
"overflow-hidden",
|
|
156
|
+
"outline",
|
|
157
|
+
"outline-[--color-border]",
|
|
158
|
+
"outline-0",
|
|
159
|
+
"-outline-offset-2",
|
|
160
|
+
"placeholder:text-ddt-color-common-text-secondary",
|
|
161
|
+
"define-[--color-state-focus,--color-base]/color-border",
|
|
162
|
+
"border",
|
|
163
|
+
"border-[--color-border]",
|
|
164
|
+
"enabled:text-ddt-color-common-text-primary",
|
|
165
|
+
"enabled:hover:bg-ddt-color-common-surface-hover",
|
|
166
|
+
"enabled:active:bg-ddt-color-common-surface-press",
|
|
167
|
+
"focus-visible:outline-2",
|
|
168
|
+
"disabled:var-color-ddt-color-common-disabled/color-base",
|
|
169
|
+
"disabled:text-ddt-color-common-disabled",
|
|
170
|
+
"disabled:bg-ddt-color-common-background-default",
|
|
171
|
+
"disabled:placeholder:text-ddt-color-common-disabled"
|
|
172
|
+
],
|
|
173
|
+
{
|
|
174
|
+
variants: {
|
|
175
|
+
error: {
|
|
176
|
+
false: [
|
|
177
|
+
"enabled:var-color-ddt-color-common-neutral-default/color-base",
|
|
178
|
+
"focus-visible:var-color-ddt-color-common-border-focus/color-state-focus"
|
|
179
|
+
],
|
|
180
|
+
true: ["enabled:var-color-ddt-color-common-danger-default/color-base"]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
let DaikinTimePicker = class extends DDSFormElement {
|
|
186
|
+
constructor() {
|
|
187
|
+
super(...arguments);
|
|
188
|
+
this.placeholder = "hh:mm";
|
|
189
|
+
this.min = DEFAULT_MIN_TIME;
|
|
190
|
+
this.max = DEFAULT_MAX_TIME;
|
|
191
|
+
this.disabled = false;
|
|
192
|
+
this.required = false;
|
|
193
|
+
this.error = false;
|
|
194
|
+
this.minutesStep = "1";
|
|
195
|
+
this._label = null;
|
|
196
|
+
this._inputValue = "";
|
|
197
|
+
this._currentSelection = "hour";
|
|
198
|
+
this._meridiem = "";
|
|
199
|
+
this._timeInputElement = createRef();
|
|
200
|
+
this._hourDigitIndex = 0;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Returns the value to display in the input field (from _inputValue state).
|
|
204
|
+
*/
|
|
205
|
+
get _timeValue() {
|
|
206
|
+
return this._inputValue;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Syncs the AM/PM value with the current value (24-hour) if value changes externally.
|
|
210
|
+
*/
|
|
211
|
+
_syncMeridiemWithValue() {
|
|
212
|
+
if (this.value) {
|
|
213
|
+
const { meridiem } = from24HourFormat(this.value);
|
|
214
|
+
this._meridiem = meridiem;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
get _min() {
|
|
218
|
+
return this.min || DEFAULT_MIN_TIME;
|
|
219
|
+
}
|
|
220
|
+
get _max() {
|
|
221
|
+
return this.max || DEFAULT_MAX_TIME;
|
|
222
|
+
}
|
|
223
|
+
_convertZeroHourToTwelve() {
|
|
224
|
+
const minutes = this._inputValue.split(":")[1];
|
|
225
|
+
this._inputValue = `12:${minutes}`;
|
|
226
|
+
if (this._timeInputElement.value) {
|
|
227
|
+
this._timeInputElement.value.value = this._inputValue;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
_handleFocusIn(event) {
|
|
231
|
+
const target = event.target;
|
|
232
|
+
this._updateInputSelection(target);
|
|
233
|
+
if (!this._inputValue) {
|
|
234
|
+
this._inputValue = PLACEHOLDER_ALL;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
_handleFocusOut(event) {
|
|
238
|
+
const target = event.target;
|
|
239
|
+
if (target.value === PLACEHOLDER_ALL) {
|
|
240
|
+
this._inputValue = "";
|
|
241
|
+
target.value = "";
|
|
242
|
+
}
|
|
243
|
+
if (target.value.startsWith("00")) {
|
|
244
|
+
this._convertZeroHourToTwelve();
|
|
245
|
+
}
|
|
246
|
+
this._hourDigitIndex = 0;
|
|
247
|
+
}
|
|
248
|
+
_handleChange(event) {
|
|
249
|
+
const target = event.target;
|
|
250
|
+
this._inputValue = target.value;
|
|
251
|
+
this._updateValue(event);
|
|
252
|
+
}
|
|
253
|
+
_handleMouseUp(event) {
|
|
254
|
+
var _a, _b;
|
|
255
|
+
event.preventDefault();
|
|
256
|
+
const selectionStart = ((_a = this._timeInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
|
|
257
|
+
const selectionEnd = ((_b = this._timeInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
|
|
258
|
+
const timeItemInSelection = getTimeItemInSelection(
|
|
259
|
+
selectionStart,
|
|
260
|
+
selectionEnd
|
|
261
|
+
);
|
|
262
|
+
if (event.target.value === PLACEHOLDER_ALL && !timeItemInSelection) {
|
|
263
|
+
this._updateSelection("hour");
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (timeItemInSelection) {
|
|
267
|
+
this._updateSelection(timeItemInSelection);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
_handleDigitInput(parts, item, digit, hourDigitIndex) {
|
|
271
|
+
if (this._currentSelection === "hour") {
|
|
272
|
+
if (hourDigitIndex === 1) {
|
|
273
|
+
this._hourDigitIndex = 0;
|
|
274
|
+
} else {
|
|
275
|
+
this._hourDigitIndex = 1;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return calcDigitInput(parts, item, digit, hourDigitIndex);
|
|
279
|
+
}
|
|
280
|
+
_handleKeyDown(event) {
|
|
281
|
+
const target = event.target;
|
|
282
|
+
const key = event.key;
|
|
283
|
+
const parts = parsePartsFromUIValue(target.value);
|
|
284
|
+
if (key === "Backspace") {
|
|
285
|
+
event.preventDefault();
|
|
286
|
+
const itemToRemove = this._currentSelection;
|
|
287
|
+
const placeholder = {
|
|
288
|
+
hour: PLACEHOLDER_HOUR,
|
|
289
|
+
minute: PLACEHOLDER_MINUTE
|
|
290
|
+
}[itemToRemove];
|
|
291
|
+
if (parts[itemToRemove] !== placeholder) {
|
|
292
|
+
const newVal = formatPartsForUI({
|
|
293
|
+
...parts,
|
|
294
|
+
[itemToRemove]: placeholder
|
|
295
|
+
});
|
|
296
|
+
this._inputValue = newVal;
|
|
297
|
+
target.value = newVal;
|
|
298
|
+
this._updateSelection(itemToRemove);
|
|
299
|
+
}
|
|
300
|
+
this._updateValue(event);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
if (/^\d$/.test(key)) {
|
|
304
|
+
event.preventDefault();
|
|
305
|
+
const newState = this._handleDigitInput(
|
|
306
|
+
parts,
|
|
307
|
+
this._currentSelection,
|
|
308
|
+
key,
|
|
309
|
+
this._hourDigitIndex
|
|
310
|
+
);
|
|
311
|
+
if (newState) {
|
|
312
|
+
const newVal = formatPartsForUI(newState.parts);
|
|
313
|
+
this._inputValue = newVal;
|
|
314
|
+
target.value = newVal;
|
|
315
|
+
const currentIndex = TIME_ITEMS.findIndex(
|
|
316
|
+
({ type }) => type === this._currentSelection
|
|
317
|
+
);
|
|
318
|
+
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, TIME_ITEMS.length - 1) : -1;
|
|
319
|
+
this._updateSelection(
|
|
320
|
+
newState.done && nextIndex >= 0 ? TIME_ITEMS[nextIndex].type : this._currentSelection
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
this._updateValue(event);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const moveOffset = {
|
|
327
|
+
ArrowLeft: -1,
|
|
328
|
+
ArrowRight: 1
|
|
329
|
+
}[key];
|
|
330
|
+
if (moveOffset) {
|
|
331
|
+
event.preventDefault();
|
|
332
|
+
const currentIndex = TIME_ITEMS.findIndex(
|
|
333
|
+
({ type }) => type === this._currentSelection
|
|
334
|
+
);
|
|
335
|
+
const newIndex = currentIndex >= 0 ? Math.min(
|
|
336
|
+
Math.max(currentIndex + moveOffset, 0),
|
|
337
|
+
TIME_ITEMS.length - 1
|
|
338
|
+
) : 0;
|
|
339
|
+
this._updateSelection(TIME_ITEMS[newIndex].type);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const countOffset = {
|
|
343
|
+
ArrowUp: 1,
|
|
344
|
+
ArrowDown: -1
|
|
345
|
+
}[key];
|
|
346
|
+
if (countOffset) {
|
|
347
|
+
event.preventDefault();
|
|
348
|
+
this._updateSelection(this._currentSelection);
|
|
349
|
+
this._updateTimeByOffset(countOffset);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (key.length <= 1) {
|
|
353
|
+
event.preventDefault();
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
_updateTimeByOffset(offset) {
|
|
358
|
+
const target = this._timeInputElement.value;
|
|
359
|
+
if (!target) return;
|
|
360
|
+
const currentTime = target.value;
|
|
361
|
+
if (!currentTime) return;
|
|
362
|
+
const [hourStr, minuteStr] = currentTime.split(":");
|
|
363
|
+
let hour = parseInt(hourStr, 10);
|
|
364
|
+
let minute = parseInt(minuteStr, 10);
|
|
365
|
+
if (this._currentSelection === "hour") {
|
|
366
|
+
if (isNaN(hour)) hour = 0;
|
|
367
|
+
hour = (hour + offset + 11) % 12 + 1;
|
|
368
|
+
} else {
|
|
369
|
+
if (isNaN(minute)) minute = 0;
|
|
370
|
+
minute = (minute + offset * Number(this.minutesStep) + 60) % 60;
|
|
371
|
+
}
|
|
372
|
+
const newTime = `${isNaN(hour) ? "hh" : String(hour).padStart(2, "0")}:${isNaN(minute) ? "mm" : String(minute).padStart(2, "0")}`;
|
|
373
|
+
this._inputValue = formatTimeForUI(newTime);
|
|
374
|
+
target.value = this._inputValue;
|
|
375
|
+
this._updateSelection(this._currentSelection);
|
|
376
|
+
this._updateValue();
|
|
377
|
+
}
|
|
378
|
+
_handleBeforeInput(event) {
|
|
379
|
+
event.preventDefault();
|
|
380
|
+
this._updateInputSelection(event.target);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Updates the value in 24-hour format if the input is valid, keeps UI in 12-hour format.
|
|
384
|
+
*/
|
|
385
|
+
_updateValue(event) {
|
|
386
|
+
const target = (event == null ? void 0 : event.target) || this._timeInputElement.value;
|
|
387
|
+
if (!target) return;
|
|
388
|
+
this._inputValue = target.value;
|
|
389
|
+
if (target.value === PLACEHOLDER_ALL) {
|
|
390
|
+
this.error = false;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (this._meridiem === "") {
|
|
394
|
+
this.error = true;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const newTime = tryParseTimeFromUIValue(target.value);
|
|
398
|
+
const newValue = newTime != null ? to24HourFormat(newTime, this._meridiem) : "";
|
|
399
|
+
this.error = !newValue || isTimeOutOfRange(newValue, this._min, this._max);
|
|
400
|
+
const changed = newValue !== this.value;
|
|
401
|
+
this.value = newValue;
|
|
402
|
+
if (changed) {
|
|
403
|
+
if (newValue) {
|
|
404
|
+
this.dispatchEvent(
|
|
405
|
+
new Event("input", {
|
|
406
|
+
bubbles: true,
|
|
407
|
+
composed: true
|
|
408
|
+
})
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
this.dispatchEvent(
|
|
412
|
+
new Event("change", {
|
|
413
|
+
bubbles: true,
|
|
414
|
+
composed: true
|
|
415
|
+
})
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
_updateInputSelection(target) {
|
|
420
|
+
var _a;
|
|
421
|
+
if (target.value === "") {
|
|
422
|
+
target.value = PLACEHOLDER_ALL;
|
|
423
|
+
}
|
|
424
|
+
const itemInfo = TIME_ITEMS[0];
|
|
425
|
+
(_a = this._timeInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
426
|
+
itemInfo.range[0],
|
|
427
|
+
itemInfo.range[1]
|
|
428
|
+
);
|
|
429
|
+
this._currentSelection = itemInfo.type;
|
|
430
|
+
}
|
|
431
|
+
_updateSelection(timeItem) {
|
|
432
|
+
var _a;
|
|
433
|
+
const selection = window.getSelection();
|
|
434
|
+
if (!selection) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const itemInfo = TIME_ITEMS.find(({ type }) => type === timeItem);
|
|
438
|
+
if (itemInfo) {
|
|
439
|
+
if (itemInfo.type === "minute") {
|
|
440
|
+
if (this._inputValue.startsWith("00")) {
|
|
441
|
+
this._convertZeroHourToTwelve();
|
|
442
|
+
}
|
|
443
|
+
this._hourDigitIndex = 0;
|
|
444
|
+
}
|
|
445
|
+
(_a = this._timeInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
446
|
+
itemInfo.range[0],
|
|
447
|
+
itemInfo.range[1]
|
|
448
|
+
);
|
|
449
|
+
this._currentSelection = itemInfo.type;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
_handleDropdownChange(event) {
|
|
453
|
+
const target = event.target;
|
|
454
|
+
this._meridiem = target.value;
|
|
455
|
+
const input = this._timeInputElement.value;
|
|
456
|
+
if (input && input.value && tryParseTimeFromUIValue(input.value)) {
|
|
457
|
+
this._updateValue();
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
render() {
|
|
461
|
+
return html`<div
|
|
462
|
+
role="group"
|
|
463
|
+
aria-label=${ifDefined(this._label ?? void 0)}
|
|
464
|
+
class="flex flex-row h-full gap-2 font-daikinSerif"
|
|
465
|
+
>
|
|
466
|
+
<input
|
|
467
|
+
${ref(this._timeInputElement)}
|
|
468
|
+
class=${cvaField({ error: this.error })}
|
|
469
|
+
type="text"
|
|
470
|
+
placeholder=${ifDefined(this.placeholder ?? void 0)}
|
|
471
|
+
name=${this.name}
|
|
472
|
+
.value=${this._timeValue}
|
|
473
|
+
?disabled=${this.disabled}
|
|
474
|
+
?required=${this.required}
|
|
475
|
+
@change=${this._handleChange}
|
|
476
|
+
@focusin=${this._handleFocusIn}
|
|
477
|
+
@focusout=${this._handleFocusOut}
|
|
478
|
+
@keydown=${this._handleKeyDown}
|
|
479
|
+
@beforeinput=${this._handleBeforeInput}
|
|
480
|
+
@mouseup=${this._handleMouseUp}
|
|
481
|
+
/>
|
|
482
|
+
<daikin-dropdown
|
|
483
|
+
class="w-[88px]"
|
|
484
|
+
placeholder="--"
|
|
485
|
+
.error=${this.error}
|
|
486
|
+
.value=${this._meridiem}
|
|
487
|
+
?disabled=${this.disabled}
|
|
488
|
+
@change=${this._handleDropdownChange}
|
|
489
|
+
>
|
|
490
|
+
<daikin-dropdown-item value="AM">AM</daikin-dropdown-item>
|
|
491
|
+
<daikin-dropdown-item value="PM">PM</daikin-dropdown-item>
|
|
492
|
+
</daikin-dropdown>
|
|
493
|
+
</div>`;
|
|
494
|
+
}
|
|
495
|
+
willUpdate(changedProperties) {
|
|
496
|
+
if (changedProperties.has("value")) {
|
|
497
|
+
this._syncMeridiemWithValue();
|
|
498
|
+
if (this.value) {
|
|
499
|
+
const { time } = from24HourFormat(this.value);
|
|
500
|
+
this._inputValue = time;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
updated(changedProperties) {
|
|
505
|
+
if (changedProperties.has("value")) {
|
|
506
|
+
this.setFormValue(this.value);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* This method is used by `daikin-input-group` to reflect it's attributes to this component.
|
|
511
|
+
* @private
|
|
512
|
+
*/
|
|
513
|
+
reflectInputGroup(inputGroup) {
|
|
514
|
+
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
515
|
+
this.disabled = !!inputGroup.disabled;
|
|
516
|
+
this.required = !!inputGroup.required;
|
|
517
|
+
this.error = isError;
|
|
518
|
+
this._label = inputGroup.label ?? null;
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
DaikinTimePicker.styles = css`
|
|
522
|
+
${unsafeCSS(tailwindStyles)}
|
|
523
|
+
|
|
524
|
+
:host {
|
|
525
|
+
display: flex;
|
|
526
|
+
align-items: center;
|
|
527
|
+
height: 3rem;
|
|
528
|
+
}
|
|
529
|
+
`;
|
|
530
|
+
__decorateClass([
|
|
531
|
+
property({ type: String, reflect: true })
|
|
532
|
+
], DaikinTimePicker.prototype, "placeholder", 2);
|
|
533
|
+
__decorateClass([
|
|
534
|
+
property({ type: String, reflect: true })
|
|
535
|
+
], DaikinTimePicker.prototype, "min", 2);
|
|
536
|
+
__decorateClass([
|
|
537
|
+
property({ type: String, reflect: true })
|
|
538
|
+
], DaikinTimePicker.prototype, "max", 2);
|
|
539
|
+
__decorateClass([
|
|
540
|
+
property({ type: Boolean, reflect: true })
|
|
541
|
+
], DaikinTimePicker.prototype, "disabled", 2);
|
|
542
|
+
__decorateClass([
|
|
543
|
+
property({ type: Boolean, reflect: true })
|
|
544
|
+
], DaikinTimePicker.prototype, "required", 2);
|
|
545
|
+
__decorateClass([
|
|
546
|
+
property({ type: Boolean, reflect: true })
|
|
547
|
+
], DaikinTimePicker.prototype, "error", 2);
|
|
548
|
+
__decorateClass([
|
|
549
|
+
property({ type: String, reflect: true, attribute: "minutes-step" })
|
|
550
|
+
], DaikinTimePicker.prototype, "minutesStep", 2);
|
|
551
|
+
__decorateClass([
|
|
552
|
+
state()
|
|
553
|
+
], DaikinTimePicker.prototype, "_label", 2);
|
|
554
|
+
__decorateClass([
|
|
555
|
+
state()
|
|
556
|
+
], DaikinTimePicker.prototype, "_inputValue", 2);
|
|
557
|
+
__decorateClass([
|
|
558
|
+
state()
|
|
559
|
+
], DaikinTimePicker.prototype, "_currentSelection", 2);
|
|
560
|
+
__decorateClass([
|
|
561
|
+
state()
|
|
562
|
+
], DaikinTimePicker.prototype, "_meridiem", 2);
|
|
563
|
+
DaikinTimePicker = __decorateClass([
|
|
564
|
+
customElement("daikin-time-picker")
|
|
565
|
+
], DaikinTimePicker);
|
|
566
|
+
export {
|
|
567
|
+
DaikinTimePicker,
|
|
568
|
+
calcDigitInput,
|
|
569
|
+
formatPartsForUI,
|
|
570
|
+
formatTimeForUI,
|
|
571
|
+
from24HourFormat,
|
|
572
|
+
getTimeItemInSelection,
|
|
573
|
+
isTimeOutOfRange,
|
|
574
|
+
isValidValueTime,
|
|
575
|
+
parsePartsFromUIValue,
|
|
576
|
+
to24HourFormat,
|
|
577
|
+
tryParseTimeFromUIValue
|
|
578
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-time-picker.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DaikinTimePicker, calcDigitInput, formatPartsForUI, formatTimeForUI, from24HourFormat, getTimeItemInSelection, isTimeOutOfRange, isValidValueTime, parsePartsFromUIValue, to24HourFormat, tryParseTimeFromUIValue } from "./daikin-time-picker.js";
|
|
2
|
+
export {
|
|
3
|
+
DaikinTimePicker,
|
|
4
|
+
calcDigitInput,
|
|
5
|
+
formatPartsForUI,
|
|
6
|
+
formatTimeForUI,
|
|
7
|
+
from24HourFormat,
|
|
8
|
+
getTimeItemInSelection,
|
|
9
|
+
isTimeOutOfRange,
|
|
10
|
+
isValidValueTime,
|
|
11
|
+
parsePartsFromUIValue,
|
|
12
|
+
to24HourFormat,
|
|
13
|
+
tryParseTimeFromUIValue
|
|
14
|
+
};
|
|
@@ -11,6 +11,8 @@ export type ToastNotificationVariantProps = MergeVariantProps<typeof cvaContaine
|
|
|
11
11
|
* Hierarchy:
|
|
12
12
|
* - `daikin-toast-notification-manager` > `daikin-toast-notification`
|
|
13
13
|
*
|
|
14
|
+
* @tokenImports ../../utils/notification-common.ts
|
|
15
|
+
*
|
|
14
16
|
* @fires close - A custom event emitted when a user clicks the close button.
|
|
15
17
|
*
|
|
16
18
|
* @slot A slot for the toast notification description content.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css,
|
|
1
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
3
|
import { DDSElement } from "../../base/dds-element.js";
|
|
4
4
|
import { ddsElement } from "../../base/decorators.js";
|
|
@@ -39,10 +39,7 @@ let DaikinToastNotification = class extends DDSElement {
|
|
|
39
39
|
>
|
|
40
40
|
<div class=${cvaContent({ layout: this.layout })}>
|
|
41
41
|
<slot class=${cvaTitle({ layout: this.layout })} name="title"></slot>
|
|
42
|
-
<slot
|
|
43
|
-
class=${cvaDescription({ layout: this.layout })}
|
|
44
|
-
name="description"
|
|
45
|
-
></slot>
|
|
42
|
+
<slot class=${cvaDescription({ layout: this.layout })}></slot>
|
|
46
43
|
${this.timestamp ? html`<span class=${cvaTimestamp({ layout: this.layout })}
|
|
47
44
|
>${formatDate(this.timestamp)}</span
|
|
48
45
|
>` : nothing}
|
|
@@ -54,7 +51,7 @@ let DaikinToastNotification = class extends DDSElement {
|
|
|
54
51
|
@click=${this._handleClickClose}
|
|
55
52
|
>
|
|
56
53
|
<span
|
|
57
|
-
class="flex size-6 text-ddt-color-common-text-secondary relative i-daikin-
|
|
54
|
+
class="flex size-6 text-ddt-color-common-text-secondary relative i-daikin-close"
|
|
58
55
|
></span>
|
|
59
56
|
</daikin-icon-button>` : nothing}
|
|
60
57
|
</div>`;
|
|
@@ -65,18 +62,24 @@ DaikinToastNotification.styles = css`
|
|
|
65
62
|
|
|
66
63
|
:host {
|
|
67
64
|
display: block;
|
|
65
|
+
width: fit-content;
|
|
66
|
+
max-width: 100%;
|
|
68
67
|
|
|
69
68
|
--ddc-toast-animation-duration: ${unsafeCSS(TOAST_ANIMATION_DURATION)}ms;
|
|
70
69
|
}
|
|
70
|
+
|
|
71
|
+
:host([layout="horizontal"]) {
|
|
72
|
+
height: 4rem;
|
|
73
|
+
}
|
|
71
74
|
`;
|
|
72
75
|
__decorateClass([
|
|
73
76
|
property({ type: String, reflect: true })
|
|
74
77
|
], DaikinToastNotification.prototype, "name", 2);
|
|
75
78
|
__decorateClass([
|
|
76
|
-
property({ type: String })
|
|
79
|
+
property({ type: String, reflect: true })
|
|
77
80
|
], DaikinToastNotification.prototype, "status", 2);
|
|
78
81
|
__decorateClass([
|
|
79
|
-
property({ type: String })
|
|
82
|
+
property({ type: String, reflect: true })
|
|
80
83
|
], DaikinToastNotification.prototype, "layout", 2);
|
|
81
84
|
__decorateClass([
|
|
82
85
|
property({ type: Boolean, reflect: true })
|
|
@@ -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, queryAssignedElements } from "lit/decorators.js";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { DDSElement } from "../../base/dds-element.js";
|
|
@@ -26,7 +26,7 @@ const cvaContainer = cva(
|
|
|
26
26
|
[
|
|
27
27
|
"flex",
|
|
28
28
|
"gap-2",
|
|
29
|
-
"w-
|
|
29
|
+
"w-[calc(100vw_-_2rem)]",
|
|
30
30
|
"fixed",
|
|
31
31
|
"transition-transform",
|
|
32
32
|
"translate-y-[var(--container-move-offset-y,0)]",
|