@daikin-oss/design-system-web-components 1.6.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +184 -0
- package/custom-elements.json +2639 -1328
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +25 -8
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.cts +1 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +1 -1
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +9 -6
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +1 -0
- package/dist/cjs/components/calendar/daikin-calendar.cjs +73 -26
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +13 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +190 -52
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +18 -0
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +7 -1
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +5 -0
- package/dist/cjs/components/chip/daikin-chip.cjs +195 -93
- package/dist/cjs/components/chip/daikin-chip.d.cts +20 -0
- package/dist/cjs/components/combobox/daikin-combobox.cjs +111 -33
- package/dist/cjs/components/combobox/daikin-combobox.d.cts +10 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +243 -65
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +37 -2
- package/dist/cjs/components/drawer/daikin-drawer.cjs +1 -1
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +164 -32
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +13 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +13 -6
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +2 -0
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +2 -0
- package/dist/cjs/components/index.cjs +2 -2
- package/dist/cjs/components/input-group/daikin-input-group.cjs +88 -30
- package/dist/cjs/components/input-group/daikin-input-group.d.cts +10 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +21 -10
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +9 -0
- package/dist/cjs/components/logo/daikin-logo.cjs +1 -1
- package/dist/cjs/components/logo/daikin-logo.d.cts +2 -2
- package/dist/cjs/components/menu/daikin-menu.cjs +2 -2
- package/dist/cjs/components/modal-header/daikin-modal-header.cjs +10 -4
- package/dist/cjs/components/modal-header/daikin-modal-header.d.cts +1 -0
- package/dist/cjs/components/navigation/daikin-navigation.cjs +21 -0
- package/dist/cjs/components/navigation/daikin-navigation.d.cts +9 -0
- package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +18 -14
- package/dist/cjs/components/pagination/daikin-pagination.cjs +60 -19
- package/dist/cjs/components/pagination/daikin-pagination.d.cts +11 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +27 -19
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.cts +1 -0
- package/dist/cjs/components/radio/daikin-radio.cjs +160 -35
- package/dist/cjs/components/radio/daikin-radio.d.cts +26 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +10 -1
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +4 -0
- package/dist/cjs/components/select/daikin-select.cjs +128 -21
- package/dist/cjs/components/select/daikin-select.d.cts +11 -0
- package/dist/cjs/components/slider/daikin-slider.cjs +61 -16
- package/dist/cjs/components/slider/daikin-slider.d.cts +4 -0
- package/dist/cjs/components/status-message/daikin-status-message.cjs +1 -0
- package/dist/cjs/components/status-message/daikin-status-message.d.cts +2 -0
- package/dist/cjs/components/table/daikin-table.cjs +108 -16
- package/dist/cjs/components/table/daikin-table.d.cts +58 -1
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +3 -4
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +21 -15
- package/dist/cjs/components/tag/daikin-tag.cjs +99 -20
- package/dist/cjs/components/tag/daikin-tag.d.cts +14 -0
- package/dist/cjs/components/text-area/daikin-text-area.cjs +22 -2
- package/dist/cjs/components/text-field/daikin-text-field.cjs +96 -50
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +9 -0
- package/dist/cjs/components/text-field/number-utils.cjs +51 -19
- package/dist/cjs/components/text-field/number-utils.d.cts +7 -0
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +31 -7
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +325 -108
- package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +57 -14
- package/dist/cjs/components/time-picker/index.cjs +2 -2
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs/components/toggle/daikin-toggle.cjs +110 -35
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +5 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +1 -1
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +24 -8
- package/dist/cjs/components/tree-item/daikin-tree-item.d.cts +1 -0
- package/dist/cjs/components/tree-section/daikin-tree-section.cjs +7 -1
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +1 -0
- package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +1 -1
- package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +248 -38
- package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +17 -7
- package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +103 -33
- package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +6 -1
- package/dist/cjs/controllers/custom-readonly.cjs +59 -0
- package/dist/cjs/controllers/custom-readonly.d.cts +28 -0
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/calendar-common.cjs +6 -2
- package/dist/cjs/utils/calendar-common.d.cts +1 -1
- package/dist/cjs/utils/extract-half-width-digits.cjs +11 -0
- package/dist/cjs/utils/extract-half-width-digits.d.cts +15 -0
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +25 -8
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.cts +1 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +1 -1
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +9 -6
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +1 -0
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +73 -26
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +13 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +190 -52
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +18 -0
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +7 -1
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +5 -0
- package/dist/cjs-dev/components/chip/daikin-chip.cjs +195 -93
- package/dist/cjs-dev/components/chip/daikin-chip.d.cts +20 -0
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +111 -33
- package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +10 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +243 -65
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +37 -2
- package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +1 -1
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +164 -32
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +13 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +13 -6
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +2 -0
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +2 -0
- package/dist/cjs-dev/components/index.cjs +2 -2
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +88 -30
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +10 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +21 -10
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +9 -0
- package/dist/cjs-dev/components/logo/daikin-logo.cjs +1 -1
- package/dist/cjs-dev/components/logo/daikin-logo.d.cts +2 -2
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +2 -2
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +10 -4
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.d.cts +1 -0
- package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +21 -0
- package/dist/cjs-dev/components/navigation/daikin-navigation.d.cts +9 -0
- package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +18 -14
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +60 -19
- package/dist/cjs-dev/components/pagination/daikin-pagination.d.cts +11 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +27 -19
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.cts +1 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +160 -35
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +26 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +10 -1
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +4 -0
- package/dist/cjs-dev/components/select/daikin-select.cjs +128 -21
- package/dist/cjs-dev/components/select/daikin-select.d.cts +11 -0
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +61 -16
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +4 -0
- package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +1 -0
- package/dist/cjs-dev/components/status-message/daikin-status-message.d.cts +2 -0
- package/dist/cjs-dev/components/table/daikin-table.cjs +108 -16
- package/dist/cjs-dev/components/table/daikin-table.d.cts +58 -1
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +3 -4
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +21 -15
- package/dist/cjs-dev/components/tag/daikin-tag.cjs +99 -20
- package/dist/cjs-dev/components/tag/daikin-tag.d.cts +14 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +22 -2
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +96 -50
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +9 -0
- package/dist/cjs-dev/components/text-field/number-utils.cjs +51 -19
- package/dist/cjs-dev/components/text-field/number-utils.d.cts +7 -0
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +31 -7
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +325 -108
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +57 -14
- package/dist/cjs-dev/components/time-picker/index.cjs +2 -2
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +110 -35
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +5 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +1 -1
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +24 -8
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.d.cts +1 -0
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +7 -1
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +1 -0
- package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +1 -1
- package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +248 -38
- package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +17 -7
- package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +103 -33
- package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +6 -1
- package/dist/cjs-dev/controllers/custom-readonly.cjs +59 -0
- package/dist/cjs-dev/controllers/custom-readonly.d.cts +28 -0
- package/dist/cjs-dev/index.cjs +2 -2
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/calendar-common.cjs +6 -2
- package/dist/cjs-dev/utils/calendar-common.d.cts +1 -1
- package/dist/cjs-dev/utils/extract-half-width-digits.cjs +11 -0
- package/dist/cjs-dev/utils/extract-half-width-digits.d.cts +15 -0
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +1 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.js +25 -8
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +1 -1
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +1 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +9 -6
- package/dist/es/components/calendar/daikin-calendar.d.ts +13 -0
- package/dist/es/components/calendar/daikin-calendar.js +73 -26
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +18 -0
- package/dist/es/components/checkbox/daikin-checkbox.js +190 -52
- package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +5 -0
- package/dist/es/components/checkbox-group/daikin-checkbox-group.js +7 -1
- package/dist/es/components/chip/daikin-chip.d.ts +20 -0
- package/dist/es/components/chip/daikin-chip.js +195 -93
- package/dist/es/components/combobox/daikin-combobox.d.ts +10 -0
- package/dist/es/components/combobox/daikin-combobox.js +111 -33
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +37 -2
- package/dist/es/components/date-picker/daikin-date-picker.js +243 -65
- package/dist/es/components/drawer/daikin-drawer.js +1 -1
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +13 -0
- package/dist/es/components/dropdown/daikin-dropdown.js +164 -32
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +13 -6
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +2 -0
- package/dist/es/components/icon-button/daikin-icon-button.js +2 -0
- package/dist/es/components/index.js +4 -4
- package/dist/es/components/input-group/daikin-input-group.d.ts +10 -0
- package/dist/es/components/input-group/daikin-input-group.js +89 -31
- package/dist/es/components/list-item/daikin-list-item.d.ts +9 -0
- package/dist/es/components/list-item/daikin-list-item.js +21 -10
- package/dist/es/components/logo/daikin-logo.d.ts +2 -2
- package/dist/es/components/logo/daikin-logo.js +1 -1
- package/dist/es/components/menu/daikin-menu.js +2 -2
- package/dist/es/components/modal-header/daikin-modal-header.d.ts +1 -0
- package/dist/es/components/modal-header/daikin-modal-header.js +10 -4
- package/dist/es/components/navigation/daikin-navigation.d.ts +9 -0
- package/dist/es/components/navigation/daikin-navigation.js +22 -1
- package/dist/es/components/navigation-item/daikin-navigation-item.js +18 -14
- package/dist/es/components/pagination/daikin-pagination.d.ts +11 -0
- package/dist/es/components/pagination/daikin-pagination.js +61 -20
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +1 -0
- package/dist/es/components/progress-bar/daikin-progress-bar.js +27 -19
- package/dist/es/components/radio/daikin-radio.d.ts +26 -0
- package/dist/es/components/radio/daikin-radio.js +160 -35
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +4 -0
- package/dist/es/components/radio-group/daikin-radio-group.js +10 -1
- package/dist/es/components/select/daikin-select.d.ts +11 -0
- package/dist/es/components/select/daikin-select.js +128 -21
- package/dist/es/components/slider/daikin-slider.d.ts +4 -0
- package/dist/es/components/slider/daikin-slider.js +61 -16
- package/dist/es/components/status-message/daikin-status-message.d.ts +2 -0
- package/dist/es/components/status-message/daikin-status-message.js +1 -0
- package/dist/es/components/table/daikin-table.d.ts +58 -1
- package/dist/es/components/table/daikin-table.js +109 -17
- package/dist/es/components/table-cell/daikin-table-cell.js +3 -4
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +21 -15
- package/dist/es/components/tag/daikin-tag.d.ts +14 -0
- package/dist/es/components/tag/daikin-tag.js +100 -21
- package/dist/es/components/text-area/daikin-text-area.js +22 -2
- package/dist/es/components/text-field/daikin-text-field.d.ts +9 -0
- package/dist/es/components/text-field/daikin-text-field.js +97 -51
- package/dist/es/components/text-field/number-utils.d.ts +7 -0
- package/dist/es/components/text-field/number-utils.js +51 -19
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +31 -7
- package/dist/es/components/time-picker/daikin-time-picker.d.ts +57 -14
- package/dist/es/components/time-picker/daikin-time-picker.js +327 -110
- package/dist/es/components/time-picker/index.js +4 -4
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +1 -1
- package/dist/es/components/toggle/daikin-toggle.d.ts +5 -0
- package/dist/es/components/toggle/daikin-toggle.js +110 -35
- package/dist/es/components/tooltip/daikin-tooltip.js +1 -1
- package/dist/es/components/tree-item/daikin-tree-item.d.ts +1 -0
- package/dist/es/components/tree-item/daikin-tree-item.js +24 -8
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +1 -0
- package/dist/es/components/tree-section/daikin-tree-section.js +7 -1
- package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +1 -1
- package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +17 -7
- package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +248 -38
- package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +6 -1
- package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +104 -34
- package/dist/es/controllers/custom-readonly.d.ts +28 -0
- package/dist/es/controllers/custom-readonly.js +59 -0
- package/dist/es/index.js +4 -4
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/calendar-common.d.ts +1 -1
- package/dist/es/utils/calendar-common.js +6 -2
- package/dist/es/utils/extract-half-width-digits.d.ts +15 -0
- package/dist/es/utils/extract-half-width-digits.js +11 -0
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +1 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +25 -8
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +1 -1
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +1 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +9 -6
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +13 -0
- package/dist/es-dev/components/calendar/daikin-calendar.js +73 -26
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +18 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +190 -52
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +5 -0
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +7 -1
- package/dist/es-dev/components/chip/daikin-chip.d.ts +20 -0
- package/dist/es-dev/components/chip/daikin-chip.js +195 -93
- package/dist/es-dev/components/combobox/daikin-combobox.d.ts +10 -0
- package/dist/es-dev/components/combobox/daikin-combobox.js +111 -33
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +37 -2
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +243 -65
- package/dist/es-dev/components/drawer/daikin-drawer.js +1 -1
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +13 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +164 -32
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +13 -6
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +2 -0
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +2 -0
- package/dist/es-dev/components/index.js +4 -4
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +10 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +89 -31
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +9 -0
- package/dist/es-dev/components/list-item/daikin-list-item.js +21 -10
- package/dist/es-dev/components/logo/daikin-logo.d.ts +2 -2
- package/dist/es-dev/components/logo/daikin-logo.js +1 -1
- package/dist/es-dev/components/menu/daikin-menu.js +2 -2
- package/dist/es-dev/components/modal-header/daikin-modal-header.d.ts +1 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.js +10 -4
- package/dist/es-dev/components/navigation/daikin-navigation.d.ts +9 -0
- package/dist/es-dev/components/navigation/daikin-navigation.js +22 -1
- package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +18 -14
- package/dist/es-dev/components/pagination/daikin-pagination.d.ts +11 -0
- package/dist/es-dev/components/pagination/daikin-pagination.js +61 -20
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +1 -0
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +27 -19
- package/dist/es-dev/components/radio/daikin-radio.d.ts +26 -0
- package/dist/es-dev/components/radio/daikin-radio.js +160 -35
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +4 -0
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +10 -1
- package/dist/es-dev/components/select/daikin-select.d.ts +11 -0
- package/dist/es-dev/components/select/daikin-select.js +128 -21
- package/dist/es-dev/components/slider/daikin-slider.d.ts +4 -0
- package/dist/es-dev/components/slider/daikin-slider.js +61 -16
- package/dist/es-dev/components/status-message/daikin-status-message.d.ts +2 -0
- package/dist/es-dev/components/status-message/daikin-status-message.js +1 -0
- package/dist/es-dev/components/table/daikin-table.d.ts +58 -1
- package/dist/es-dev/components/table/daikin-table.js +109 -17
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +3 -4
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +21 -15
- package/dist/es-dev/components/tag/daikin-tag.d.ts +14 -0
- package/dist/es-dev/components/tag/daikin-tag.js +100 -21
- package/dist/es-dev/components/text-area/daikin-text-area.js +22 -2
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +9 -0
- package/dist/es-dev/components/text-field/daikin-text-field.js +97 -51
- package/dist/es-dev/components/text-field/number-utils.d.ts +7 -0
- package/dist/es-dev/components/text-field/number-utils.js +51 -19
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +31 -7
- package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +57 -14
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +327 -110
- package/dist/es-dev/components/time-picker/index.js +4 -4
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +1 -1
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +5 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +110 -35
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +1 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.d.ts +1 -0
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +24 -8
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +1 -0
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +7 -1
- package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +1 -1
- package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +17 -7
- package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +248 -38
- package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +6 -1
- package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +104 -34
- package/dist/es-dev/controllers/custom-readonly.d.ts +28 -0
- package/dist/es-dev/controllers/custom-readonly.js +59 -0
- package/dist/es-dev/index.js +4 -4
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/calendar-common.d.ts +1 -1
- package/dist/es-dev/utils/calendar-common.js +6 -2
- package/dist/es-dev/utils/extract-half-width-digits.d.ts +15 -0
- package/dist/es-dev/utils/extract-half-width-digits.js +11 -0
- package/icons/logo-negative.svg +16 -9
- package/icons/logo-positive.svg +16 -9
- package/package.json +6 -5
|
@@ -14,6 +14,7 @@ import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-au
|
|
|
14
14
|
import { FocusTrapController } from "../../controllers/focus-trap.js";
|
|
15
15
|
import tailwindStyles from "../../tailwind.css.js";
|
|
16
16
|
import { tryParseDateFromProperty, parseDateFromProperty, DEFAULT_MIN_DATE, DEFAULT_MAX_DATE, formatDateForProperty, isDateOutOfRange, cvaIconButton, countDaysForYearMonth } from "../../utils/calendar-common.js";
|
|
17
|
+
import { extractHalfWidthDigits } from "../../utils/extract-half-width-digits.js";
|
|
17
18
|
import { reDispatch } from "../../utils/re-dispatch.js";
|
|
18
19
|
import "../calendar/daikin-calendar.js";
|
|
19
20
|
import "../icon-button/daikin-icon-button.js";
|
|
@@ -28,18 +29,18 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
28
29
|
return result;
|
|
29
30
|
};
|
|
30
31
|
const dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
|
|
31
|
-
function getSafeDateTimeFormatParts(
|
|
32
|
+
function getSafeDateTimeFormatParts(inputLocale) {
|
|
32
33
|
const options = {
|
|
33
34
|
year: "numeric",
|
|
34
35
|
month: "numeric",
|
|
35
36
|
day: "numeric"
|
|
36
37
|
};
|
|
37
|
-
const key =
|
|
38
|
+
const key = inputLocale ?? "__DEFAULT__";
|
|
38
39
|
const cached = dateTimeFormatPartsCache.get(key);
|
|
39
40
|
if (cached) return cached;
|
|
40
41
|
try {
|
|
41
42
|
const parts = new Intl.DateTimeFormat(
|
|
42
|
-
|
|
43
|
+
inputLocale ?? void 0,
|
|
43
44
|
options
|
|
44
45
|
).formatToParts(0);
|
|
45
46
|
dateTimeFormatPartsCache.set(key, parts);
|
|
@@ -50,8 +51,8 @@ function getSafeDateTimeFormatParts(locale) {
|
|
|
50
51
|
return parts;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function getDateOrderAndSeparator(
|
|
54
|
-
const parts = getSafeDateTimeFormatParts(
|
|
54
|
+
function getDateOrderAndSeparator(inputLocale) {
|
|
55
|
+
const parts = getSafeDateTimeFormatParts(inputLocale ?? void 0);
|
|
55
56
|
const order = parts.filter(
|
|
56
57
|
(p) => ["year", "month", "day"].includes(p.type)
|
|
57
58
|
).map((p) => p.type);
|
|
@@ -68,8 +69,8 @@ function getDateOrderAndSeparator(locale) {
|
|
|
68
69
|
}
|
|
69
70
|
return { order, sep };
|
|
70
71
|
}
|
|
71
|
-
function getDateItems(
|
|
72
|
-
const { order, sep } = getDateOrderAndSeparator(
|
|
72
|
+
function getDateItems(inputLocale) {
|
|
73
|
+
const { order, sep } = getDateOrderAndSeparator(inputLocale);
|
|
73
74
|
const lengths = { year: 4, month: 2, day: 2 };
|
|
74
75
|
const items = order.map((key, i) => {
|
|
75
76
|
const type = key;
|
|
@@ -88,9 +89,10 @@ const cvaField = cva(
|
|
|
88
89
|
"flex",
|
|
89
90
|
"items-center",
|
|
90
91
|
"size-full",
|
|
92
|
+
"min-h-(--dds-input-height)",
|
|
91
93
|
"bg-ddt-color-common-background-default",
|
|
92
|
-
"pl-
|
|
93
|
-
"pr-10",
|
|
94
|
+
"pl-[calc(var(--dds-padding-30)+0.25rem)]",
|
|
95
|
+
"pr-[calc((var(--dds-gap-10))+var(--dds-icon-button)+0.5rem)]",
|
|
94
96
|
"rounded-sm",
|
|
95
97
|
"truncate",
|
|
96
98
|
"outline-solid",
|
|
@@ -126,25 +128,25 @@ const cvaField = cva(
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
);
|
|
129
|
-
function parsePartsFromUIValue(value,
|
|
130
|
-
const { order, sep } = getDateOrderAndSeparator(
|
|
131
|
+
function parsePartsFromUIValue(value, inputLocale) {
|
|
132
|
+
const { order, sep } = getDateOrderAndSeparator(inputLocale);
|
|
131
133
|
const parts = value.split(sep);
|
|
132
134
|
return Object.fromEntries(
|
|
133
135
|
order.map((key, i) => [key, parts[i] ?? ""])
|
|
134
136
|
);
|
|
135
137
|
}
|
|
136
|
-
function formatPartsForUI(parts,
|
|
137
|
-
const { order, sep } = getDateOrderAndSeparator(
|
|
138
|
+
function formatPartsForUI(parts, inputLocale) {
|
|
139
|
+
const { order, sep } = getDateOrderAndSeparator(inputLocale);
|
|
138
140
|
return order.map((k) => parts[k]).join(sep);
|
|
139
141
|
}
|
|
140
|
-
function getPlaceholderAll(
|
|
142
|
+
function getPlaceholderAll(inputLocale) {
|
|
141
143
|
return formatPartsForUI(
|
|
142
144
|
{ year: PLACEHOLDER_YEAR, month: PLACEHOLDER_MONTH, day: PLACEHOLDER_DAY },
|
|
143
|
-
|
|
145
|
+
inputLocale
|
|
144
146
|
);
|
|
145
147
|
}
|
|
146
|
-
function tryParseDateFromUIValue(value,
|
|
147
|
-
const { year, month, day } = parsePartsFromUIValue(value,
|
|
148
|
+
function tryParseDateFromUIValue(value, inputLocale) {
|
|
149
|
+
const { year, month, day } = parsePartsFromUIValue(value, inputLocale);
|
|
148
150
|
if (
|
|
149
151
|
// Prevent treating incomplete year entries (such as 0202) as valid.
|
|
150
152
|
// This also means that dates less than 1000 years ago cannot be handled.
|
|
@@ -158,18 +160,18 @@ function tryParseDateFromUIValue(value, locale) {
|
|
|
158
160
|
}
|
|
159
161
|
return date;
|
|
160
162
|
}
|
|
161
|
-
function formatDateForUI(date,
|
|
163
|
+
function formatDateForUI(date, inputLocale) {
|
|
162
164
|
return formatPartsForUI(
|
|
163
165
|
{
|
|
164
166
|
year: String(date.getUTCFullYear()).padStart(4, "0"),
|
|
165
167
|
month: String(date.getUTCMonth() + 1).padStart(2, "0"),
|
|
166
168
|
day: String(date.getUTCDate()).padStart(2, "0")
|
|
167
169
|
},
|
|
168
|
-
|
|
170
|
+
inputLocale
|
|
169
171
|
);
|
|
170
172
|
}
|
|
171
|
-
function getDateItemInSelection(selectionStart, selectionEnd,
|
|
172
|
-
for (const { type, range } of getDateItems(
|
|
173
|
+
function getDateItemInSelection(selectionStart, selectionEnd, inputLocale) {
|
|
174
|
+
for (const { type, range } of getDateItems(inputLocale)) {
|
|
173
175
|
if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
|
|
174
176
|
return type;
|
|
175
177
|
}
|
|
@@ -285,13 +287,19 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
285
287
|
this.open = false;
|
|
286
288
|
this.defaultValue = null;
|
|
287
289
|
this.locale = null;
|
|
290
|
+
this.inputLocale = null;
|
|
288
291
|
this._label = null;
|
|
289
292
|
this._currentSelection = "month";
|
|
293
|
+
this._preCompositionValue = "";
|
|
294
|
+
this._inputValue = "";
|
|
295
|
+
this._monthDigitIndex = 0;
|
|
296
|
+
this._dayDigitIndex = 0;
|
|
297
|
+
this._yearDigitIndex = 0;
|
|
290
298
|
this._autoUpdateController = new FloatingUIAutoUpdateController(this);
|
|
291
299
|
this._dateInputElement = createRef();
|
|
292
300
|
this._calendarElement = createRef();
|
|
293
301
|
this._calendarButtonElement = createRef();
|
|
294
|
-
this._getLocale = () => this.
|
|
302
|
+
this._getLocale = () => this.inputLocale ?? null;
|
|
295
303
|
this._getDateItems = () => getDateItems(this._getLocale());
|
|
296
304
|
this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
|
|
297
305
|
this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
|
|
@@ -315,9 +323,29 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
315
323
|
static getDefaultPlaceholder(element) {
|
|
316
324
|
return getPlaceholderAll(element._getLocale());
|
|
317
325
|
}
|
|
318
|
-
get
|
|
326
|
+
get _dateValue() {
|
|
319
327
|
return tryParseDateFromProperty(this.value);
|
|
320
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Returns the string to bind to the <input> element's .value property.
|
|
331
|
+
*
|
|
332
|
+
* - When this.value holds a valid date, show the locale-formatted date.
|
|
333
|
+
* - When _inputValue contains partial or invalid content (placeholders / impossible
|
|
334
|
+
* dates like 02/31), return it so the user's in-progress entry is preserved
|
|
335
|
+
* across Lit re-renders.
|
|
336
|
+
* - Otherwise (e.g. this.value was cleared externally while _inputValue still
|
|
337
|
+
* holds a now-stale complete valid date string) return "" so the CSS placeholder
|
|
338
|
+
* text is visible instead.
|
|
339
|
+
*/
|
|
340
|
+
get _displayValue() {
|
|
341
|
+
if (this._dateValue) {
|
|
342
|
+
return this._formatDateForUI(this._dateValue);
|
|
343
|
+
}
|
|
344
|
+
if (this._inputValue && !this._tryParseDateFromUIValue(this._inputValue)) {
|
|
345
|
+
return this._inputValue;
|
|
346
|
+
}
|
|
347
|
+
return "";
|
|
348
|
+
}
|
|
321
349
|
get _min() {
|
|
322
350
|
return tryParseDateFromProperty(this.min) ?? parseDateFromProperty(DEFAULT_MIN_DATE);
|
|
323
351
|
}
|
|
@@ -347,10 +375,11 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
347
375
|
const target = event.target;
|
|
348
376
|
if (target.value === this._getPlaceholderAll()) {
|
|
349
377
|
target.value = "";
|
|
378
|
+
this._inputValue = "";
|
|
350
379
|
}
|
|
351
380
|
}
|
|
352
381
|
_handleChange(event) {
|
|
353
|
-
this._updateValue(event);
|
|
382
|
+
this._updateValue(event.target);
|
|
354
383
|
}
|
|
355
384
|
_handleMouseUp(event) {
|
|
356
385
|
var _a, _b;
|
|
@@ -369,14 +398,104 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
369
398
|
this._updateSelection(dateItemInSelection);
|
|
370
399
|
}
|
|
371
400
|
}
|
|
401
|
+
// Saves the input's display value when IME composition starts so that
|
|
402
|
+
// `_handleCompositionEnd` can restore it if the browser inserted raw IME text.
|
|
403
|
+
_handleCompositionStart(event) {
|
|
404
|
+
this._preCompositionValue = event.target.value;
|
|
405
|
+
}
|
|
406
|
+
// Handle compositionend to support full-width and half-width digit input via IME.
|
|
407
|
+
// Full-width digits are converted to half-width, then each digit is applied as if
|
|
408
|
+
// the user had typed them one by one using the existing handleDigitInput logic.
|
|
409
|
+
_handleCompositionEnd(event) {
|
|
410
|
+
const target = event.target;
|
|
411
|
+
const composedText = event.data;
|
|
412
|
+
target.value = this._preCompositionValue || this._getPlaceholderAll();
|
|
413
|
+
const digits = extractHalfWidthDigits(composedText);
|
|
414
|
+
if (digits.length === 0) {
|
|
415
|
+
this._updateInputSelection(target);
|
|
416
|
+
this._updateValue(target);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
this._applyDigits(target, digits);
|
|
420
|
+
}
|
|
421
|
+
// Applies a single digit to the given date part, incorporating fresh-entry
|
|
422
|
+
// tracking for month and day. Extracted from _applyDigits to keep complexity low.
|
|
423
|
+
_applyDigitToPart(parts, item, digit) {
|
|
424
|
+
if (item === "month") {
|
|
425
|
+
const monthDigitIndex = this._monthDigitIndex;
|
|
426
|
+
if (monthDigitIndex === 0) {
|
|
427
|
+
this._monthDigitIndex = 1;
|
|
428
|
+
if (digit === "0") {
|
|
429
|
+
return { parts: { ...parts, month: "00" }, done: false };
|
|
430
|
+
}
|
|
431
|
+
return {
|
|
432
|
+
parts: { ...parts, month: `0${digit}` },
|
|
433
|
+
done: digit !== "1"
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
this._monthDigitIndex = 0;
|
|
437
|
+
if (parts.month === "00") {
|
|
438
|
+
if (digit === "0") return null;
|
|
439
|
+
return { parts: { ...parts, month: `0${digit}` }, done: true };
|
|
440
|
+
}
|
|
441
|
+
} else if (item === "day") {
|
|
442
|
+
const dayDigitIndex = this._dayDigitIndex;
|
|
443
|
+
if (dayDigitIndex === 0) {
|
|
444
|
+
this._dayDigitIndex = 1;
|
|
445
|
+
if (digit === "0") {
|
|
446
|
+
return { parts: { ...parts, day: "00" }, done: false };
|
|
447
|
+
}
|
|
448
|
+
return {
|
|
449
|
+
parts: { ...parts, day: `0${digit}` },
|
|
450
|
+
done: !["1", "2", "3"].includes(digit)
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
this._dayDigitIndex = 0;
|
|
454
|
+
if (parts.day === "00") {
|
|
455
|
+
if (digit === "0") return null;
|
|
456
|
+
return { parts: { ...parts, day: `0${digit}` }, done: true };
|
|
457
|
+
}
|
|
458
|
+
} else if (this._yearDigitIndex === 0) {
|
|
459
|
+
this._yearDigitIndex = 1;
|
|
460
|
+
return { parts: { ...parts, year: `000${digit}` }, done: false };
|
|
461
|
+
}
|
|
462
|
+
return handleDigitInput(parts, item, digit);
|
|
463
|
+
}
|
|
464
|
+
// Applies a sequence of digit characters to the input starting from the currently
|
|
465
|
+
// selected date item, then commits the result to this.value.
|
|
466
|
+
// Shared by _handleKeyDown (single digit) and _handleCompositionEnd (multiple digits).
|
|
467
|
+
_applyDigits(target, digits) {
|
|
468
|
+
const items = this._getDateItems();
|
|
469
|
+
let parts = this._parsePartsFromUIValue(target.value);
|
|
470
|
+
let currentItem = this._currentSelection;
|
|
471
|
+
for (const digit of digits) {
|
|
472
|
+
const currentIndex = items.findIndex(({ type }) => type === currentItem);
|
|
473
|
+
if (currentIndex < 0) break;
|
|
474
|
+
const newState = this._applyDigitToPart(parts, currentItem, digit);
|
|
475
|
+
if (!newState) continue;
|
|
476
|
+
parts = newState.parts;
|
|
477
|
+
if (!newState.done) continue;
|
|
478
|
+
const nextIndex = Math.min(currentIndex + 1, items.length - 1);
|
|
479
|
+
currentItem = items[nextIndex].type;
|
|
480
|
+
this._monthDigitIndex = 0;
|
|
481
|
+
this._dayDigitIndex = 0;
|
|
482
|
+
this._yearDigitIndex = 0;
|
|
483
|
+
}
|
|
484
|
+
target.value = this._formatPartsForUI(parts);
|
|
485
|
+
this._updateSelection(currentItem);
|
|
486
|
+
this._updateValue(target);
|
|
487
|
+
}
|
|
372
488
|
_handleKeyDown(event) {
|
|
373
489
|
if (this.readonly) {
|
|
374
490
|
return;
|
|
375
491
|
}
|
|
492
|
+
if (event.isComposing || event.key === "Process" || event.keyCode === 229) {
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
376
495
|
const target = event.target;
|
|
377
496
|
const key = event.key;
|
|
378
497
|
const parts = this._parsePartsFromUIValue(target.value);
|
|
379
|
-
if (key === "Backspace") {
|
|
498
|
+
if (key === "Backspace" || key === "Delete") {
|
|
380
499
|
event.preventDefault();
|
|
381
500
|
const itemToRemove = this._currentSelection;
|
|
382
501
|
const placeholder = {
|
|
@@ -391,24 +510,12 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
391
510
|
});
|
|
392
511
|
this._updateSelection(itemToRemove);
|
|
393
512
|
}
|
|
394
|
-
this._updateValue(
|
|
513
|
+
this._updateValue(target);
|
|
395
514
|
return;
|
|
396
515
|
}
|
|
397
516
|
if (/^\d$/.test(key)) {
|
|
398
517
|
event.preventDefault();
|
|
399
|
-
|
|
400
|
-
if (newState) {
|
|
401
|
-
target.value = this._formatPartsForUI(newState.parts);
|
|
402
|
-
const items = this._getDateItems();
|
|
403
|
-
const currentIndex = items.findIndex(
|
|
404
|
-
({ type }) => type === this._currentSelection
|
|
405
|
-
);
|
|
406
|
-
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, items.length - 1) : -1;
|
|
407
|
-
this._updateSelection(
|
|
408
|
-
newState.done && nextIndex >= 0 ? items[nextIndex].type : this._currentSelection
|
|
409
|
-
);
|
|
410
|
-
}
|
|
411
|
-
this._updateValue(event);
|
|
518
|
+
this._applyDigits(target, [key]);
|
|
412
519
|
return;
|
|
413
520
|
}
|
|
414
521
|
const moveOffset = {
|
|
@@ -443,7 +550,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
443
550
|
target.value = this._formatPartsForUI(newParts);
|
|
444
551
|
this._updateSelection(this._currentSelection);
|
|
445
552
|
}
|
|
446
|
-
this._updateValue(
|
|
553
|
+
this._updateValue(target);
|
|
447
554
|
return;
|
|
448
555
|
}
|
|
449
556
|
if (key.length <= 1) {
|
|
@@ -452,10 +559,15 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
452
559
|
}
|
|
453
560
|
}
|
|
454
561
|
// Depending on the PC settings, a period may be entered when the space key is pressed repeatedly, so this is stopped.
|
|
455
|
-
// When this happens, the selection range changes, so this is also reset.
|
|
562
|
+
// When this happens, the selection range changes, so this is also reset to the current item.
|
|
563
|
+
// Note: _updateInputSelection is intentionally NOT used here because it always moves focus to the
|
|
564
|
+
// first item, which would break IME input on non-first fields (e.g. compositionend would always
|
|
565
|
+
// edit the first date part instead of the one the user is on).
|
|
456
566
|
_handleBeforeInput(event) {
|
|
457
567
|
event.preventDefault();
|
|
458
|
-
|
|
568
|
+
if (!event.isComposing) {
|
|
569
|
+
this._updateSelection(this._currentSelection);
|
|
570
|
+
}
|
|
459
571
|
}
|
|
460
572
|
_handleSelect(event) {
|
|
461
573
|
event.stopPropagation();
|
|
@@ -465,8 +577,10 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
465
577
|
}
|
|
466
578
|
const target = this._dateInputElement.value;
|
|
467
579
|
const value = parseDateFromProperty(calendar.value);
|
|
580
|
+
const formattedForUI = this._formatDateForUI(value);
|
|
468
581
|
this.value = formatDateForProperty(value);
|
|
469
|
-
target.value =
|
|
582
|
+
target.value = formattedForUI;
|
|
583
|
+
this._inputValue = formattedForUI;
|
|
470
584
|
this.error = false;
|
|
471
585
|
if (event.type === "select") {
|
|
472
586
|
this.open = false;
|
|
@@ -502,19 +616,46 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
502
616
|
}
|
|
503
617
|
}
|
|
504
618
|
}
|
|
505
|
-
|
|
506
|
-
|
|
619
|
+
/**
|
|
620
|
+
* Returns true if all date parts (year/month/day) in the input are filled with
|
|
621
|
+
* digits and no placeholder text (YYYY, MM, DD) remains.
|
|
622
|
+
*/
|
|
623
|
+
_isInputComplete(value) {
|
|
624
|
+
const parts = this._parsePartsFromUIValue(value);
|
|
625
|
+
return /^\d{4}$/.test(parts.year) && /^\d{2}$/.test(parts.month) && /^\d{2}$/.test(parts.day);
|
|
626
|
+
}
|
|
627
|
+
_updateValue(target) {
|
|
628
|
+
this._inputValue = target.value;
|
|
507
629
|
if (target.value === this._getPlaceholderAll()) {
|
|
508
630
|
this.error = false;
|
|
631
|
+
this.value = "";
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
if (!this._isInputComplete(target.value)) {
|
|
635
|
+
this.error = true;
|
|
636
|
+
this.value = "";
|
|
509
637
|
return;
|
|
510
638
|
}
|
|
511
639
|
const newDate = this._tryParseDateFromUIValue(target.value);
|
|
512
|
-
if (!newDate
|
|
640
|
+
if (!newDate) {
|
|
641
|
+
this.error = true;
|
|
642
|
+
this.value = "";
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
const newValue = formatDateForProperty(newDate);
|
|
646
|
+
if (isDateOutOfRange(newDate, this._min, this._max)) {
|
|
513
647
|
this.error = true;
|
|
648
|
+
if (this.value !== newValue) {
|
|
649
|
+
this.value = newValue;
|
|
650
|
+
this._emitSelect();
|
|
651
|
+
}
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
if (!this.error && !this.open && this.value === newValue) {
|
|
514
655
|
return;
|
|
515
656
|
}
|
|
516
657
|
this.error = false;
|
|
517
|
-
this.value =
|
|
658
|
+
this.value = newValue;
|
|
518
659
|
this.open = false;
|
|
519
660
|
this._emitSelect();
|
|
520
661
|
}
|
|
@@ -526,12 +667,16 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
526
667
|
}
|
|
527
668
|
if (target.value === "") {
|
|
528
669
|
target.value = this._getPlaceholderAll();
|
|
670
|
+
this._inputValue = this._getPlaceholderAll();
|
|
529
671
|
}
|
|
530
672
|
const itemInfo = this._getDateItems()[0];
|
|
531
673
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
532
674
|
itemInfo.range[0],
|
|
533
675
|
itemInfo.range[1]
|
|
534
676
|
);
|
|
677
|
+
this._monthDigitIndex = 0;
|
|
678
|
+
this._dayDigitIndex = 0;
|
|
679
|
+
this._yearDigitIndex = 0;
|
|
535
680
|
this._currentSelection = itemInfo.type;
|
|
536
681
|
}
|
|
537
682
|
_updateSelection(dateItem) {
|
|
@@ -542,6 +687,11 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
542
687
|
}
|
|
543
688
|
const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
|
|
544
689
|
if (itemInfo) {
|
|
690
|
+
if (dateItem !== this._currentSelection) {
|
|
691
|
+
if (dateItem === "month") this._monthDigitIndex = 0;
|
|
692
|
+
if (dateItem === "day") this._dayDigitIndex = 0;
|
|
693
|
+
if (dateItem === "year") this._yearDigitIndex = 0;
|
|
694
|
+
}
|
|
545
695
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
546
696
|
itemInfo.range[0],
|
|
547
697
|
itemInfo.range[1]
|
|
@@ -574,28 +724,30 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
574
724
|
?disabled=${this.disabled}
|
|
575
725
|
?readonly=${this.readonly}
|
|
576
726
|
?required=${this.required}
|
|
577
|
-
.value=${this.
|
|
727
|
+
.value=${this._displayValue}
|
|
578
728
|
@change=${this._handleChange}
|
|
729
|
+
@compositionstart=${this._handleCompositionStart}
|
|
730
|
+
@compositionend=${this._handleCompositionEnd}
|
|
579
731
|
@focusin=${this._handleFocusIn}
|
|
580
732
|
@focusout=${this._handleFocusOut}
|
|
581
733
|
@keydown=${this._handleKeyDown}
|
|
582
734
|
@beforeinput=${this._handleBeforeInput}
|
|
583
735
|
@mouseup=${this._handleMouseUp}
|
|
584
736
|
/>
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
737
|
+
${this.readonly && !this.disabled ? nothing : html`<daikin-icon-button
|
|
738
|
+
${ref(this._calendarButtonElement)}
|
|
739
|
+
class="absolute size-(--dds-icon-button) top-0 bottom-0 right-2 m-auto"
|
|
740
|
+
type="button"
|
|
741
|
+
color="neutral"
|
|
742
|
+
variant="ghost"
|
|
743
|
+
button-aria-label="Open the date picker"
|
|
744
|
+
?disabled=${this.disabled}
|
|
745
|
+
@pointerdown=${this._handlePointerDown}
|
|
746
|
+
@pointerup=${this._handlePointerUp}
|
|
747
|
+
@keydown=${this._handleCalendarKeyDown}
|
|
748
|
+
>
|
|
749
|
+
<span class=${cvaIconButton({ intent: "calender" })}></span>
|
|
750
|
+
</daikin-icon-button>`}
|
|
599
751
|
<span class="sr-only" aria-live="polite"
|
|
600
752
|
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
601
753
|
</span>
|
|
@@ -604,11 +756,12 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
604
756
|
${ref(this._calendarElement)}
|
|
605
757
|
${this._focusTrapController.refContainer()}
|
|
606
758
|
id="calendar"
|
|
607
|
-
value=${this.
|
|
759
|
+
value=${this._dateValue ? formatDateForProperty(this._dateValue) : nothing}
|
|
608
760
|
min=${formatDateForProperty(min)}
|
|
609
761
|
max=${formatDateForProperty(max)}
|
|
610
762
|
default-value=${ifDefined(this.defaultValue)}
|
|
611
|
-
|
|
763
|
+
locale=${ifDefined(this.locale)}
|
|
764
|
+
.popover=${"manual"}
|
|
612
765
|
class="absolute left-(--floating-x,0) top-(--floating-y,0)"
|
|
613
766
|
@toggle=${this._handleToggle}
|
|
614
767
|
@select=${this._handleSelect}
|
|
@@ -682,6 +835,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
682
835
|
reflectInputGroup(inputGroup) {
|
|
683
836
|
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
684
837
|
this.disabled = !!inputGroup.disabled;
|
|
838
|
+
this.readonly = !!inputGroup.readonly;
|
|
685
839
|
this.required = !!inputGroup.required;
|
|
686
840
|
this.error = isError;
|
|
687
841
|
this._label = inputGroup.label;
|
|
@@ -693,7 +847,28 @@ DaikinDatePicker.styles = css`
|
|
|
693
847
|
:host {
|
|
694
848
|
display: flex;
|
|
695
849
|
align-items: center;
|
|
696
|
-
height: 3rem;
|
|
850
|
+
height: var(--dds-input-height, 3rem);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
:host([readonly]:not([disabled])) input {
|
|
854
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
855
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
:host([readonly]:not([disabled])) input:hover,
|
|
859
|
+
:host([readonly]:not([disabled])) input:active {
|
|
860
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
861
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
:host([readonly]:not([disabled])) input:focus-visible {
|
|
865
|
+
--color-base: var(--dds-color-common-border-focus);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
:host([readonly][error]:not([disabled])) input,
|
|
869
|
+
:host([readonly][error]:not([disabled])) input:hover,
|
|
870
|
+
:host([readonly][error]:not([disabled])) input:active {
|
|
871
|
+
--color-base: var(--dds-color-common-danger-default);
|
|
697
872
|
}
|
|
698
873
|
|
|
699
874
|
daikin-calendar[popover] {
|
|
@@ -738,6 +913,9 @@ __decorateClass([
|
|
|
738
913
|
__decorateClass([
|
|
739
914
|
property({ type: String, reflect: true })
|
|
740
915
|
], DaikinDatePicker.prototype, "locale", 2);
|
|
916
|
+
__decorateClass([
|
|
917
|
+
property({ type: String, reflect: true, attribute: "input-locale" })
|
|
918
|
+
], DaikinDatePicker.prototype, "inputLocale", 2);
|
|
741
919
|
__decorateClass([
|
|
742
920
|
state()
|
|
743
921
|
], DaikinDatePicker.prototype, "_label", 2);
|
|
@@ -142,7 +142,7 @@ let DaikinDrawer = class extends DDSElement {
|
|
|
142
142
|
render() {
|
|
143
143
|
return html`<div
|
|
144
144
|
class=${cvaBackDrop({ open: this.open, placement: this.placement })}
|
|
145
|
-
|
|
145
|
+
.inert=${!this.open}
|
|
146
146
|
aria-hidden=${ifDefined(!this.open ? "true" : void 0)}
|
|
147
147
|
@click=${this._handleBackdropClick}
|
|
148
148
|
>
|
|
@@ -19,6 +19,7 @@ import { DaikinInputGroup } from "../input-group/index.js";
|
|
|
19
19
|
* @fires toggle - A custom event emitted when the dropdown menu opens or closes.
|
|
20
20
|
*
|
|
21
21
|
* @slot - Dropdown item list slot. Place `daikin-dropdown-item` elements here.
|
|
22
|
+
* @slot left-icon - A slot for an icon to be placed to the left of the text. Place `daikin-icon` or something similar.
|
|
22
23
|
*
|
|
23
24
|
* @example
|
|
24
25
|
*
|
|
@@ -36,6 +37,7 @@ import { DaikinInputGroup } from "../input-group/index.js";
|
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
38
39
|
export declare class DaikinDropdown extends DDSFormElement {
|
|
40
|
+
private static _activeOpenByRoot;
|
|
39
41
|
static readonly styles: import('lit').CSSResult;
|
|
40
42
|
/**
|
|
41
43
|
* Placeholder text of the dropdown.
|
|
@@ -45,6 +47,10 @@ export declare class DaikinDropdown extends DDSFormElement {
|
|
|
45
47
|
* Whether the dropdown is disabled.
|
|
46
48
|
*/
|
|
47
49
|
disabled: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the dropdown is readonly.
|
|
52
|
+
*/
|
|
53
|
+
readonly: boolean;
|
|
48
54
|
/**
|
|
49
55
|
* Whether the dropdown is required.
|
|
50
56
|
*/
|
|
@@ -84,6 +90,8 @@ export declare class DaikinDropdown extends DDSFormElement {
|
|
|
84
90
|
private get _selectionLabels();
|
|
85
91
|
private _initialUpdateCompleted;
|
|
86
92
|
private _autoUpdateController;
|
|
93
|
+
private readonly _readonlyController;
|
|
94
|
+
private _clickOutsideController;
|
|
87
95
|
private _willBeFocusedByPress;
|
|
88
96
|
/**
|
|
89
97
|
* Last focused dropdown item.
|
|
@@ -91,6 +99,8 @@ export declare class DaikinDropdown extends DDSFormElement {
|
|
|
91
99
|
*/
|
|
92
100
|
private _lastFocusedItem;
|
|
93
101
|
private _dropdownRef;
|
|
102
|
+
private get _isMenuOpen();
|
|
103
|
+
private _syncSingleOpenState;
|
|
94
104
|
private _searchItem;
|
|
95
105
|
private _moveFocus;
|
|
96
106
|
private _updateFormValue;
|
|
@@ -106,6 +116,8 @@ export declare class DaikinDropdown extends DDSFormElement {
|
|
|
106
116
|
*/
|
|
107
117
|
private _handleSelectOption;
|
|
108
118
|
private _handleFocusOut;
|
|
119
|
+
private _closeDropdownByBlur;
|
|
120
|
+
private _onClickOutside;
|
|
109
121
|
/**
|
|
110
122
|
* Removes the last selected option.
|
|
111
123
|
*
|
|
@@ -141,6 +153,7 @@ export declare class DaikinDropdown extends DDSFormElement {
|
|
|
141
153
|
focus(options?: FocusOptions): void;
|
|
142
154
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
143
155
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
156
|
+
disconnectedCallback(): void;
|
|
144
157
|
/**
|
|
145
158
|
* This method is used by `daikin-input-group` to reflect it's attributes to this component.
|
|
146
159
|
* @private
|