@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
|
@@ -20,35 +20,53 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
20
20
|
if (kind && result) __defProp(target, key, result);
|
|
21
21
|
return result;
|
|
22
22
|
};
|
|
23
|
-
const cvaWrapper = classVarianceAuthority.cva(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
const cvaWrapper = classVarianceAuthority.cva(
|
|
24
|
+
[
|
|
25
|
+
"flex",
|
|
26
|
+
"items-center",
|
|
27
|
+
"justify-between",
|
|
28
|
+
"rounded",
|
|
29
|
+
"overflow-hidden",
|
|
30
|
+
"size-full",
|
|
31
|
+
"gap-1",
|
|
32
|
+
"bg-(--bg-color-base)"
|
|
33
|
+
],
|
|
34
|
+
{
|
|
35
|
+
variants: {
|
|
36
|
+
elevated: {
|
|
37
|
+
true: [
|
|
38
|
+
"shadow-[0px_1px_2px_1px_var(--dds-color-common-background-overlay)]"
|
|
39
|
+
],
|
|
40
|
+
false: []
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
);
|
|
33
45
|
const cvaRemoveButton = classVarianceAuthority.cva([
|
|
34
46
|
"mr-1",
|
|
47
|
+
"flex-none",
|
|
48
|
+
"relative",
|
|
35
49
|
"w-6",
|
|
36
50
|
"h-6",
|
|
37
51
|
"flex",
|
|
38
|
-
"flex-none",
|
|
39
52
|
"items-center",
|
|
40
53
|
"justify-center",
|
|
41
54
|
"rounded-full",
|
|
42
55
|
"overflow-hidden",
|
|
43
|
-
"focus-visible:outline
|
|
56
|
+
"focus-visible:outline",
|
|
44
57
|
"focus-visible:outline-2",
|
|
58
|
+
"after:absolute",
|
|
59
|
+
"after:bg-transparent",
|
|
60
|
+
"after:size-6",
|
|
61
|
+
"after:top-1/2",
|
|
62
|
+
"after:left-1/2",
|
|
63
|
+
"after:-translate-x-1/2",
|
|
64
|
+
"after:-translate-y-1/2",
|
|
65
|
+
"after:rounded-full",
|
|
45
66
|
"focus-visible:outline-ddt-color-common-border-focus",
|
|
46
|
-
"enabled:[--color-primary:var(--dds-color-common-
|
|
47
|
-
"enabled:hover:[--color-
|
|
48
|
-
"enabled:active:[--color-
|
|
49
|
-
"enabled:[--color-secondary:var(--dds-color-common-surface-secondary-default)]",
|
|
50
|
-
"enabled:hover:[--color-secondary:var(--dds-color-common-surface-secondary-hover)]",
|
|
51
|
-
"enabled:active:[--color-secondary:var(--dds-color-common-surface-secondary-press)]",
|
|
67
|
+
"enabled:[--color-primary:var(--dds-color-common-text-primary)]",
|
|
68
|
+
"enabled:hover:[--color-secondary:var(--dds-color-common-surface-neutral-overlay-hover)]",
|
|
69
|
+
"enabled:active:[--color-secondary:var(--dds-color-common-surface-neutral-overlay-press)]",
|
|
52
70
|
"text-(--color-primary)",
|
|
53
71
|
"bg-(--color-secondary)"
|
|
54
72
|
]);
|
|
@@ -57,6 +75,7 @@ exports.DaikinTag = class DaikinTag extends ddsElement.DDSElement {
|
|
|
57
75
|
super(...arguments);
|
|
58
76
|
this.hideRemoveButton = false;
|
|
59
77
|
this.tagAriaLabel = null;
|
|
78
|
+
this.elevated = false;
|
|
60
79
|
this.removeButtonAriaLabel = null;
|
|
61
80
|
}
|
|
62
81
|
_handleRemoveClick(event) {
|
|
@@ -66,9 +85,10 @@ exports.DaikinTag = class DaikinTag extends ddsElement.DDSElement {
|
|
|
66
85
|
render() {
|
|
67
86
|
return lit.html`
|
|
68
87
|
<div
|
|
88
|
+
part="tag"
|
|
69
89
|
role="group"
|
|
70
90
|
aria-label=${ifDefined_js.ifDefined(this.tagAriaLabel ?? void 0)}
|
|
71
|
-
class=${cvaWrapper()}
|
|
91
|
+
class=${cvaWrapper({ elevated: this.elevated })}
|
|
72
92
|
>
|
|
73
93
|
<span
|
|
74
94
|
class="text-ddt-color-common-text-primary p-2 text-(length:--dds-font-size-350) natural-break"
|
|
@@ -82,7 +102,9 @@ exports.DaikinTag = class DaikinTag extends ddsElement.DDSElement {
|
|
|
82
102
|
aria-label=${ifDefined_js.ifDefined(this.removeButtonAriaLabel ?? "Remove")}
|
|
83
103
|
@click=${this._handleRemoveClick}
|
|
84
104
|
>
|
|
85
|
-
<span
|
|
105
|
+
<span
|
|
106
|
+
class="icon-[daikin--close] text-(--color-primary) size-6 flex-none"
|
|
107
|
+
></span>
|
|
86
108
|
</button>
|
|
87
109
|
`}
|
|
88
110
|
</div>
|
|
@@ -103,6 +125,52 @@ exports.DaikinTag.styles = lit.css`
|
|
|
103
125
|
:host {
|
|
104
126
|
display: block;
|
|
105
127
|
width: fit-content;
|
|
128
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-gray);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:host([color="gray"]) {
|
|
132
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-gray);
|
|
133
|
+
}
|
|
134
|
+
:host([color="red"]) {
|
|
135
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-red);
|
|
136
|
+
}
|
|
137
|
+
:host([color="blue"]) {
|
|
138
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-blue);
|
|
139
|
+
}
|
|
140
|
+
:host([color="yellow"]) {
|
|
141
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-yellow);
|
|
142
|
+
}
|
|
143
|
+
:host([color="green"]) {
|
|
144
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-green);
|
|
145
|
+
}
|
|
146
|
+
:host([color="orange"]) {
|
|
147
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-orange);
|
|
148
|
+
}
|
|
149
|
+
:host([color="purple"]) {
|
|
150
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-base-purple);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:host([elevated]),
|
|
154
|
+
:host([elevated][color="gray"]) {
|
|
155
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-gray);
|
|
156
|
+
}
|
|
157
|
+
:host([elevated][color="red"]) {
|
|
158
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-red);
|
|
159
|
+
}
|
|
160
|
+
:host([elevated][color="blue"]) {
|
|
161
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-blue);
|
|
162
|
+
}
|
|
163
|
+
:host([elevated][color="yellow"]) {
|
|
164
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-yellow);
|
|
165
|
+
}
|
|
166
|
+
:host([elevated][color="green"]) {
|
|
167
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-green);
|
|
168
|
+
}
|
|
169
|
+
:host([elevated][color="orange"]) {
|
|
170
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-orange);
|
|
171
|
+
}
|
|
172
|
+
:host([elevated][color="purple"]) {
|
|
173
|
+
--bg-color-base: var(--dds-color-common-accent-lv2-elevated-purple);
|
|
106
174
|
}
|
|
107
175
|
`;
|
|
108
176
|
__decorateClass([
|
|
@@ -111,6 +179,17 @@ __decorateClass([
|
|
|
111
179
|
__decorateClass([
|
|
112
180
|
ddsProperty.property({ type: String, reflect: true, attribute: "tag-aria-label" })
|
|
113
181
|
], exports.DaikinTag.prototype, "tagAriaLabel", 2);
|
|
182
|
+
__decorateClass([
|
|
183
|
+
ddsProperty.property({
|
|
184
|
+
type: String,
|
|
185
|
+
reflect: true,
|
|
186
|
+
fallbackValue: "gray",
|
|
187
|
+
isAllowedValue: ddsProperty.oneOf(["gray", "red", "blue", "yellow", "green", "orange", "purple"])
|
|
188
|
+
})
|
|
189
|
+
], exports.DaikinTag.prototype, "color", 2);
|
|
190
|
+
__decorateClass([
|
|
191
|
+
ddsProperty.property({ type: Boolean, reflect: true })
|
|
192
|
+
], exports.DaikinTag.prototype, "elevated", 2);
|
|
114
193
|
__decorateClass([
|
|
115
194
|
ddsProperty.property({
|
|
116
195
|
type: String,
|
|
@@ -4,6 +4,8 @@ import { DDSElement } from "../../base/index.cjs";
|
|
|
4
4
|
*
|
|
5
5
|
* @fires remove - A custom event emitted when a user clicks the remove button.
|
|
6
6
|
*
|
|
7
|
+
* @csspart tag - Targets the internal <span> element wrapping the tag. This is typically used to control the tag's styling and interactivity. For example, you can adjust spacing and customize the cursor appearance during dragging: daikin-tag::part(tag) { margin: -4px; padding: 4px; cursor: grab; } daikin-tag::part(tag):active { cursor: grabbing; }
|
|
8
|
+
*
|
|
7
9
|
* @slot - A slot for the tag content.
|
|
8
10
|
*
|
|
9
11
|
* @example
|
|
@@ -26,6 +28,18 @@ export declare class DaikinTag extends DDSElement {
|
|
|
26
28
|
* Provides an accessible name of the tag.
|
|
27
29
|
*/
|
|
28
30
|
tagAriaLabel: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Specify the color of the tag.
|
|
33
|
+
*
|
|
34
|
+
* @default "gray"
|
|
35
|
+
*/
|
|
36
|
+
color: "gray" | "red" | "blue" | "yellow" | "green" | "orange" | "purple";
|
|
37
|
+
/**
|
|
38
|
+
* Whether the tag has a shadow to indicate elevation.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
elevated: boolean;
|
|
29
43
|
/**
|
|
30
44
|
* Provides an accessible name of the remove button.
|
|
31
45
|
*/
|
|
@@ -23,8 +23,9 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
23
23
|
};
|
|
24
24
|
const cvaTextArea = classVarianceAuthority.cva(
|
|
25
25
|
[
|
|
26
|
+
"block",
|
|
26
27
|
"w-full",
|
|
27
|
-
"
|
|
28
|
+
"box-border",
|
|
28
29
|
"bg-ddt-color-common-background-default",
|
|
29
30
|
"px-4",
|
|
30
31
|
"py-3",
|
|
@@ -105,6 +106,7 @@ exports.DaikinTextArea = class DaikinTextArea extends ddsFormElement.DDSFormElem
|
|
|
105
106
|
error: !this.disabled && this.error,
|
|
106
107
|
resize: this.resizable
|
|
107
108
|
})}
|
|
109
|
+
style="height: inherit; min-height: inherit;"
|
|
108
110
|
name=${ifDefined_js.ifDefined(this.getBackingProperty("name"))}
|
|
109
111
|
placeholder=${ifDefined_js.ifDefined(this.getBackingProperty("placeholder"))}
|
|
110
112
|
autocomplete=${ifDefined_js.ifDefined(this.getBackingProperty("autocomplete"))}
|
|
@@ -132,6 +134,7 @@ exports.DaikinTextArea = class DaikinTextArea extends ddsFormElement.DDSFormElem
|
|
|
132
134
|
reflectInputGroup(inputGroup) {
|
|
133
135
|
const isError = !inputGroup.disabled && (!!inputGroup.error || !!inputGroup.textareaLimitExceeded);
|
|
134
136
|
this.disabled = !!inputGroup.disabled;
|
|
137
|
+
this.readonly = !!inputGroup.readonly;
|
|
135
138
|
this.required = !!inputGroup.required;
|
|
136
139
|
this.error = isError;
|
|
137
140
|
this._label = inputGroup.label;
|
|
@@ -142,9 +145,26 @@ exports.DaikinTextArea.styles = lit.css`
|
|
|
142
145
|
|
|
143
146
|
:host {
|
|
144
147
|
display: block;
|
|
145
|
-
height: 5.5rem;
|
|
148
|
+
min-height: 5.5rem;
|
|
146
149
|
position: relative;
|
|
147
150
|
}
|
|
151
|
+
|
|
152
|
+
:host([readonly]:not([disabled])) textarea {
|
|
153
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
154
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([readonly]:not([disabled])) textarea:hover,
|
|
158
|
+
:host([readonly]:not([disabled])) textarea:active {
|
|
159
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
160
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host([readonly][error]:not([disabled])) textarea,
|
|
164
|
+
:host([readonly][error]:not([disabled])) textarea:hover,
|
|
165
|
+
:host([readonly][error]:not([disabled])) textarea:active {
|
|
166
|
+
--color-base: var(--dds-color-common-danger-default);
|
|
167
|
+
}
|
|
148
168
|
`;
|
|
149
169
|
__decorateClass([
|
|
150
170
|
ddsProperty.property({ type: String, reflect: true, fallbackValue: "" })
|
|
@@ -30,12 +30,13 @@ const cvaInput = classVarianceAuthority.cva(
|
|
|
30
30
|
"items-center",
|
|
31
31
|
"w-full",
|
|
32
32
|
"h-full",
|
|
33
|
-
"pl-(--pl,
|
|
34
|
-
"pr-(--pr,
|
|
33
|
+
"pl-(--pl,calc(var(--dds-padding-30)+0.25rem))",
|
|
34
|
+
"pr-(--pr,calc(var(--dds-padding-30)+0.25rem))",
|
|
35
35
|
"bg-ddt-color-common-background-default",
|
|
36
36
|
"relative",
|
|
37
37
|
"rounded-sm",
|
|
38
38
|
"overflow-hidden",
|
|
39
|
+
"text-(length:--dds-font-size-400)",
|
|
39
40
|
"outline-solid",
|
|
40
41
|
"outline-(--color-border)",
|
|
41
42
|
"outline-0",
|
|
@@ -70,22 +71,30 @@ const cvaInput = classVarianceAuthority.cva(
|
|
|
70
71
|
},
|
|
71
72
|
leftIcon: {
|
|
72
73
|
false: [],
|
|
73
|
-
true: [
|
|
74
|
+
true: [
|
|
75
|
+
"[--pl:calc(var(--dds-padding-30)+var(--dds-icon)+var(--dds-gap-10)+var(--dds-space-100))]"
|
|
76
|
+
]
|
|
74
77
|
},
|
|
75
78
|
rightIcon: {
|
|
76
79
|
false: [],
|
|
77
|
-
true: [
|
|
80
|
+
true: [
|
|
81
|
+
"[--pr:calc(var(--dds-padding-30)+var(--dds-icon)+var(--dds-gap-10))]"
|
|
82
|
+
]
|
|
78
83
|
},
|
|
79
84
|
type: {
|
|
80
85
|
text: [],
|
|
81
|
-
number: [
|
|
82
|
-
|
|
86
|
+
number: [
|
|
87
|
+
"[--pr:calc(var(--dds-icon-button)*2+0.25rem+var(--dds-padding-20))]"
|
|
88
|
+
],
|
|
89
|
+
password: [
|
|
90
|
+
"[--pr:calc(var(--dds-gap-20)+var(--dds-icon-button)+var(--dds-padding-20))]"
|
|
91
|
+
],
|
|
83
92
|
email: [],
|
|
84
93
|
tel: [],
|
|
85
94
|
search: [
|
|
86
95
|
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
87
|
-
"[--pl:
|
|
88
|
-
"[--pr:
|
|
96
|
+
"[--pl:calc(var(--dds-padding-30)+var(--dds-icon)+var(--dds-gap-10)+0.25rem)]",
|
|
97
|
+
"[--pr:calc(0.25rem+var(--dds-padding-30)+1.5rem)]"
|
|
89
98
|
]
|
|
90
99
|
}
|
|
91
100
|
},
|
|
@@ -108,8 +117,8 @@ const cvaIcon = classVarianceAuthority.cva(
|
|
|
108
117
|
{
|
|
109
118
|
variants: {
|
|
110
119
|
icon: {
|
|
111
|
-
left: ["left-
|
|
112
|
-
right: ["right-
|
|
120
|
+
left: ["left-(--dds-padding-30)"],
|
|
121
|
+
right: ["right-(--dds-padding-30)"]
|
|
113
122
|
},
|
|
114
123
|
disabled: {
|
|
115
124
|
false: ["text-ddt-color-common-text-primary"],
|
|
@@ -118,7 +127,7 @@ const cvaIcon = classVarianceAuthority.cva(
|
|
|
118
127
|
}
|
|
119
128
|
}
|
|
120
129
|
);
|
|
121
|
-
const cvaShowPasswordIcon = classVarianceAuthority.cva(["size-
|
|
130
|
+
const cvaShowPasswordIcon = classVarianceAuthority.cva(["size-(--dds-icon)"], {
|
|
122
131
|
variants: {
|
|
123
132
|
showPassword: {
|
|
124
133
|
false: ["icon-[daikin--password-hidden]"],
|
|
@@ -136,6 +145,7 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
136
145
|
this.minlength = null;
|
|
137
146
|
this.maxlength = null;
|
|
138
147
|
this.step = null;
|
|
148
|
+
this.stepMode = "free";
|
|
139
149
|
this.min = null;
|
|
140
150
|
this.max = null;
|
|
141
151
|
this.pattern = null;
|
|
@@ -221,8 +231,9 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
221
231
|
}
|
|
222
232
|
}
|
|
223
233
|
_updateNumberValue(sign) {
|
|
224
|
-
const newValue = numberUtils.updateNumberValue(this.value
|
|
234
|
+
const newValue = numberUtils.updateNumberValue(this.value, sign, {
|
|
225
235
|
step: this.step,
|
|
236
|
+
stepMode: this.stepMode,
|
|
226
237
|
min: this.min,
|
|
227
238
|
max: this.max
|
|
228
239
|
});
|
|
@@ -251,7 +262,7 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
251
262
|
>
|
|
252
263
|
<slot
|
|
253
264
|
name="left-icon"
|
|
254
|
-
class="icon-size-
|
|
265
|
+
class="icon-size-token"
|
|
255
266
|
@slotchange=${this._handleSlotChange}
|
|
256
267
|
></slot>
|
|
257
268
|
</span>`;
|
|
@@ -263,48 +274,56 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
263
274
|
>
|
|
264
275
|
<slot
|
|
265
276
|
name="right-icon"
|
|
266
|
-
class="icon-size-
|
|
277
|
+
class="icon-size-token"
|
|
267
278
|
@slotchange=${this._handleSlotChange}
|
|
268
279
|
></slot>
|
|
269
280
|
</span>`;
|
|
270
281
|
switch (this.type) {
|
|
271
282
|
case "number":
|
|
272
283
|
return lit.html`${leftIconSlot}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
${this.readonly && !this.disabled ? lit.nothing : lit.html`<span class="inline-flex items-center gap-1 absolute right-2">
|
|
285
|
+
<daikin-icon-button
|
|
286
|
+
class="size-(--dds-icon-button)"
|
|
287
|
+
color="neutral"
|
|
288
|
+
variant="ghost"
|
|
289
|
+
?disabled=${this.disabled}
|
|
290
|
+
button-aria-label="Decrease"
|
|
291
|
+
tabindex="-1"
|
|
292
|
+
@click=${() => this._updateNumberValue(-1)}
|
|
293
|
+
>
|
|
294
|
+
<span
|
|
295
|
+
class="icon-[daikin--number-minus] size-(--dds-icon)"
|
|
296
|
+
></span>
|
|
297
|
+
</daikin-icon-button>
|
|
298
|
+
<daikin-icon-button
|
|
299
|
+
class="size-(--dds-icon-button)"
|
|
300
|
+
color="neutral"
|
|
301
|
+
variant="ghost"
|
|
302
|
+
?disabled=${this.disabled}
|
|
303
|
+
button-aria-label="Increase"
|
|
304
|
+
tabindex="-1"
|
|
305
|
+
@click=${() => this._updateNumberValue(1)}
|
|
306
|
+
>
|
|
307
|
+
<span
|
|
308
|
+
class="icon-[daikin--number-plus] size-(--dds-icon)"
|
|
309
|
+
></span>
|
|
310
|
+
</daikin-icon-button>
|
|
311
|
+
</span>`}`;
|
|
312
|
+
case "password":
|
|
313
|
+
return lit.html`${leftIconSlot}${this.readonly && !this.disabled ? lit.nothing : lit.html`<daikin-icon-button
|
|
285
314
|
color="neutral"
|
|
286
315
|
variant="ghost"
|
|
287
316
|
?disabled=${this.disabled}
|
|
288
|
-
button-aria-label
|
|
289
|
-
|
|
290
|
-
@click=${
|
|
317
|
+
button-aria-label=${this.showPassword ? "Hide password" : "Show password"}
|
|
318
|
+
class="absolute right-(--dds-padding-20) size-(--dds-icon-button)"
|
|
319
|
+
@click=${this._handleShowPasswordClick}
|
|
291
320
|
>
|
|
292
|
-
<span
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
variant="ghost"
|
|
299
|
-
?disabled=${this.disabled}
|
|
300
|
-
button-aria-label=${this.showPassword ? "Hide password" : "Show password"}
|
|
301
|
-
class="absolute right-3"
|
|
302
|
-
@click=${this._handleShowPasswordClick}
|
|
303
|
-
>
|
|
304
|
-
<span
|
|
305
|
-
class=${cvaShowPasswordIcon({ showPassword: this.showPassword })}
|
|
306
|
-
></span>
|
|
307
|
-
</daikin-icon-button>`;
|
|
321
|
+
<span
|
|
322
|
+
class=${cvaShowPasswordIcon({
|
|
323
|
+
showPassword: this.showPassword
|
|
324
|
+
})}
|
|
325
|
+
></span>
|
|
326
|
+
</daikin-icon-button>`}`;
|
|
308
327
|
case "search":
|
|
309
328
|
return lit.html`<span
|
|
310
329
|
class=${cvaIcon({
|
|
@@ -312,17 +331,17 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
312
331
|
disabled: this.disabled
|
|
313
332
|
})}
|
|
314
333
|
>
|
|
315
|
-
<span class="icon-[daikin--search] size-
|
|
334
|
+
<span class="icon-[daikin--search] size-(--dds-icon)"></span>
|
|
316
335
|
</span>
|
|
317
|
-
${!!this.value && !!this.value.length ? lit.html`<daikin-icon-button
|
|
336
|
+
${!!this.value && !!this.value.length && !this.readonly ? lit.html`<daikin-icon-button
|
|
318
337
|
color="neutral"
|
|
319
338
|
variant="ghost"
|
|
320
339
|
?disabled=${this.disabled}
|
|
321
340
|
button-aria-label="Clear"
|
|
322
|
-
class="absolute right-
|
|
341
|
+
class="absolute right-(--dds-padding-30) size-6"
|
|
323
342
|
@click=${this._handleClearClick}
|
|
324
343
|
>
|
|
325
|
-
<span class="icon-[daikin--close] size-
|
|
344
|
+
<span class="icon-[daikin--close] size-(--dds-icon)"></span>
|
|
326
345
|
</daikin-icon-button>` : lit.nothing}`;
|
|
327
346
|
default:
|
|
328
347
|
return lit.html`${leftIconSlot}${rightIconSlot}`;
|
|
@@ -388,6 +407,7 @@ exports.DaikinTextField = class DaikinTextField extends ddsFormElement.DDSFormEl
|
|
|
388
407
|
reflectInputGroup(inputGroup) {
|
|
389
408
|
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
390
409
|
this.disabled = !!inputGroup.disabled;
|
|
410
|
+
this.readonly = !!inputGroup.readonly;
|
|
391
411
|
this.required = !!inputGroup.required;
|
|
392
412
|
this.error = isError;
|
|
393
413
|
this._label = inputGroup.label;
|
|
@@ -399,7 +419,7 @@ exports.DaikinTextField.styles = lit.css`
|
|
|
399
419
|
:host {
|
|
400
420
|
display: flex;
|
|
401
421
|
align-items: center;
|
|
402
|
-
height: 3rem;
|
|
422
|
+
height: var(--dds-input-height, 3rem);
|
|
403
423
|
position: relative;
|
|
404
424
|
}
|
|
405
425
|
|
|
@@ -410,6 +430,23 @@ exports.DaikinTextField.styles = lit.css`
|
|
|
410
430
|
input::-ms-clear {
|
|
411
431
|
display: none !important;
|
|
412
432
|
}
|
|
433
|
+
|
|
434
|
+
:host([readonly]:not([disabled])) input {
|
|
435
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
436
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
:host([readonly]:not([disabled])) input:hover,
|
|
440
|
+
:host([readonly]:not([disabled])) input:active {
|
|
441
|
+
--color-base: var(--dds-color-common-surface-secondary);
|
|
442
|
+
background-color: var(--dds-color-common-surface-secondary);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
:host([readonly][error]:not([disabled])) input,
|
|
446
|
+
:host([readonly][error]:not([disabled])) input:hover,
|
|
447
|
+
:host([readonly][error]:not([disabled])) input:active {
|
|
448
|
+
--color-base: var(--dds-color-common-danger-default);
|
|
449
|
+
}
|
|
413
450
|
`;
|
|
414
451
|
__decorateClass([
|
|
415
452
|
ddsProperty.property({ type: String, reflect: true, fallbackValue: "text" })
|
|
@@ -438,6 +475,15 @@ __decorateClass([
|
|
|
438
475
|
__decorateClass([
|
|
439
476
|
ddsProperty.property({ type: String, reflect: true })
|
|
440
477
|
], exports.DaikinTextField.prototype, "step", 2);
|
|
478
|
+
__decorateClass([
|
|
479
|
+
ddsProperty.property({
|
|
480
|
+
type: String,
|
|
481
|
+
reflect: true,
|
|
482
|
+
fallbackValue: "free",
|
|
483
|
+
isAllowedValue: ddsProperty.oneOf(["free", "snap"]),
|
|
484
|
+
attribute: "step-mode"
|
|
485
|
+
})
|
|
486
|
+
], exports.DaikinTextField.prototype, "stepMode", 2);
|
|
441
487
|
__decorateClass([
|
|
442
488
|
ddsProperty.property({ type: String, reflect: true })
|
|
443
489
|
], exports.DaikinTextField.prototype, "min", 2);
|
|
@@ -97,6 +97,15 @@ export declare class DaikinTextField extends DDSFormElement {
|
|
|
97
97
|
* Interval between values. This is valid when `type="number"`.
|
|
98
98
|
*/
|
|
99
99
|
step: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* When `type="number"`, whether to allow free input or snap to step boundaries.
|
|
102
|
+
* - `"free"`: Do not snap to step boundaries; increment/decrement relative to the current value.
|
|
103
|
+
* - `"snap"`: If the current value is off a step boundary, snap to the next/previous step boundary in the given direction (and finish without applying an extra step).
|
|
104
|
+
* Note that step boundaries are aligned to the `min` value if specified; otherwise, they are aligned to `0`. For example, with `step="3"`, boundaries are `..., -3, 0, 3, 6, ...`. If `min="-4"` is also set, the boundaries become `-4, -1, 2, 5, ...`.
|
|
105
|
+
*
|
|
106
|
+
* @default "free"
|
|
107
|
+
*/
|
|
108
|
+
stepMode: "free" | "snap";
|
|
100
109
|
/**
|
|
101
110
|
* The minimum value. This is valid when `type="number"`.
|
|
102
111
|
*/
|
|
@@ -2,14 +2,40 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const Big = require("big.js");
|
|
4
4
|
function updateNumberValue(currentValue, direction, options) {
|
|
5
|
-
const { step, min, max } = options;
|
|
5
|
+
const { step, stepMode = "free", min, max } = options;
|
|
6
|
+
const getDecimalPlaces = (value) => {
|
|
7
|
+
if (value == null || value === "") {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
const stringValue = typeof value === "number" ? `${value}` : value;
|
|
11
|
+
const decimalPart = stringValue.split(".")[1];
|
|
12
|
+
return decimalPart ? decimalPart.length : 0;
|
|
13
|
+
};
|
|
14
|
+
const currentDecimalPlaces = getDecimalPlaces(currentValue);
|
|
15
|
+
const stepDecimalPlaces = getDecimalPlaces(step);
|
|
16
|
+
const minDecimalPlaces = getDecimalPlaces(min);
|
|
17
|
+
const maxDecimalPlaces = getDecimalPlaces(max);
|
|
18
|
+
const outputDecimalPlaces = Math.max(currentDecimalPlaces, stepDecimalPlaces);
|
|
6
19
|
try {
|
|
7
20
|
const current = new Big(currentValue || "0");
|
|
8
21
|
const stepBig = new Big(step || "1");
|
|
9
22
|
const minBig = min != null && min !== "" ? new Big(min) : null;
|
|
10
23
|
const maxBig = max != null && max !== "" ? new Big(max) : null;
|
|
24
|
+
const isEmptyCurrentValue = currentValue.trim() === "";
|
|
25
|
+
const formatResult = (value) => {
|
|
26
|
+
if (minBig !== null && value.eq(minBig)) {
|
|
27
|
+
return value.toFixed(minDecimalPlaces);
|
|
28
|
+
}
|
|
29
|
+
if (maxBig !== null && value.eq(maxBig)) {
|
|
30
|
+
return value.toFixed(maxDecimalPlaces);
|
|
31
|
+
}
|
|
32
|
+
return value.toFixed(outputDecimalPlaces);
|
|
33
|
+
};
|
|
34
|
+
if (isEmptyCurrentValue && direction === -1 && minBig) {
|
|
35
|
+
return formatResult(minBig);
|
|
36
|
+
}
|
|
11
37
|
if (minBig && maxBig && maxBig.lt(minBig)) {
|
|
12
|
-
return direction === 1 ? minBig
|
|
38
|
+
return direction === 1 ? formatResult(minBig) : formatResult(maxBig);
|
|
13
39
|
}
|
|
14
40
|
const isOnStepBoundary = (value) => {
|
|
15
41
|
const diff = value.sub(minBig ?? 0);
|
|
@@ -19,22 +45,21 @@ function updateNumberValue(currentValue, direction, options) {
|
|
|
19
45
|
const base = minBig || new Big(0);
|
|
20
46
|
const offset = value.sub(base);
|
|
21
47
|
const steps = offset.div(stepBig);
|
|
48
|
+
const truncated = steps.round(0, Big.roundDown);
|
|
22
49
|
let targetSteps;
|
|
23
50
|
if (dir === 1) {
|
|
24
|
-
targetSteps =
|
|
51
|
+
targetSteps = truncated.lt(steps) ? truncated.add(1) : truncated;
|
|
25
52
|
} else {
|
|
26
|
-
targetSteps =
|
|
53
|
+
targetSteps = truncated.gt(steps) ? truncated.sub(1) : truncated;
|
|
27
54
|
}
|
|
28
55
|
return base.add(targetSteps.mul(stepBig));
|
|
29
56
|
};
|
|
30
57
|
const isInRange = (!minBig || current.gte(minBig)) && (!maxBig || current.lte(maxBig));
|
|
31
|
-
if (!isInRange
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return currentValue;
|
|
37
|
-
}
|
|
58
|
+
if (!isInRange) {
|
|
59
|
+
const isBelowMin = minBig && current.lt(minBig);
|
|
60
|
+
const isAboveMax = maxBig && current.gt(maxBig);
|
|
61
|
+
if (isBelowMin && direction === -1 || isAboveMax && direction === 1) {
|
|
62
|
+
return currentValue;
|
|
38
63
|
}
|
|
39
64
|
let nearestStep = findNearestStepInDirection(current, direction);
|
|
40
65
|
if (minBig && nearestStep.lt(minBig)) {
|
|
@@ -43,17 +68,24 @@ function updateNumberValue(currentValue, direction, options) {
|
|
|
43
68
|
if (maxBig && nearestStep.gt(maxBig)) {
|
|
44
69
|
nearestStep = maxBig;
|
|
45
70
|
}
|
|
46
|
-
return nearestStep
|
|
71
|
+
return formatResult(nearestStep);
|
|
47
72
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
const steppedValue = direction === 1 ? current.add(stepBig) : current.sub(stepBig);
|
|
74
|
+
if (minBig && steppedValue.lt(minBig) || maxBig && steppedValue.gt(maxBig)) {
|
|
75
|
+
return currentValue;
|
|
76
|
+
}
|
|
77
|
+
if (!isOnStepBoundary(current) && stepMode === "snap") {
|
|
78
|
+
const nearestStep = findNearestStepInDirection(current, direction);
|
|
79
|
+
if (minBig && nearestStep.lt(minBig) || maxBig && nearestStep.gt(maxBig)) {
|
|
80
|
+
return currentValue;
|
|
81
|
+
}
|
|
82
|
+
return formatResult(nearestStep);
|
|
52
83
|
}
|
|
53
|
-
|
|
54
|
-
|
|
84
|
+
const newValue = direction === 1 ? current.add(stepBig) : current.sub(stepBig);
|
|
85
|
+
if (minBig && newValue.lt(minBig) || maxBig && newValue.gt(maxBig)) {
|
|
86
|
+
return currentValue;
|
|
55
87
|
}
|
|
56
|
-
return
|
|
88
|
+
return formatResult(newValue);
|
|
57
89
|
} catch (error) {
|
|
58
90
|
{
|
|
59
91
|
console.warn("Number update operation failed:", error);
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
export interface NumberUpdateOptions {
|
|
5
5
|
/** Step increment/decrement amount */
|
|
6
6
|
step?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Step mode determines how the value is adjusted when it is not on a step boundary.
|
|
9
|
+
* - "free": Do not snap to step boundaries; increment/decrement relative to the current value.
|
|
10
|
+
* - "snap": If the current value is off a step boundary, snap to the next/previous step boundary in the given direction (and finish without applying an extra step).
|
|
11
|
+
* Defaults to "free".
|
|
12
|
+
*/
|
|
13
|
+
stepMode?: "free" | "snap";
|
|
7
14
|
/** Minimum allowed value */
|
|
8
15
|
min?: string | null;
|
|
9
16
|
/** Maximum allowed value */
|