@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
|
@@ -24,17 +24,18 @@ const cvaSummary = classVarianceAuthority.cva(
|
|
|
24
24
|
"flex",
|
|
25
25
|
"justify-between",
|
|
26
26
|
"items-center",
|
|
27
|
-
"gap-
|
|
27
|
+
"gap-(--dds-padding-30)",
|
|
28
28
|
"w-full",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"px-(--dds-padding-30)",
|
|
30
|
+
"py-(--dds-padding-30)",
|
|
31
|
+
"text-(length:--dds-font-size-label-text)",
|
|
31
32
|
"natural-break",
|
|
32
33
|
"text-left",
|
|
33
34
|
"focus-visible:outline-solid",
|
|
34
35
|
"focus-visible:outline-2",
|
|
35
36
|
"focus-visible:-outline-offset-2",
|
|
36
37
|
"focus-visible:outline-ddt-color-common-border-focus",
|
|
37
|
-
"after:size-
|
|
38
|
+
"after:size-(--dds-icon)",
|
|
38
39
|
"after:transition-all",
|
|
39
40
|
"after:icon-[daikin--chevron-down]",
|
|
40
41
|
"after:flex-none",
|
|
@@ -61,7 +62,13 @@ const cvaSummary = classVarianceAuthority.cva(
|
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
64
|
const cvaContent = classVarianceAuthority.cva(
|
|
64
|
-
[
|
|
65
|
+
[
|
|
66
|
+
"grid",
|
|
67
|
+
"duration-250",
|
|
68
|
+
"ease-in-out",
|
|
69
|
+
"leading-normal",
|
|
70
|
+
"text-(length:--dds-font-size-label-text)"
|
|
71
|
+
],
|
|
65
72
|
{
|
|
66
73
|
variants: {
|
|
67
74
|
open: {
|
|
@@ -122,7 +129,15 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends ddsElement.DDSEl
|
|
|
122
129
|
@click=${this._handleSummaryClick}
|
|
123
130
|
@keydown=${this._handleKeyDown}
|
|
124
131
|
>
|
|
125
|
-
<
|
|
132
|
+
<div class="flex items-start gap-1">
|
|
133
|
+
<slot
|
|
134
|
+
name="left-icon"
|
|
135
|
+
class="slotted:shrink-0 size-(--dds-icon) slotted:size-(--dds-icon)"
|
|
136
|
+
></slot
|
|
137
|
+
><span class="pl-(--dds-space-100) pt-(--dds-padding-05)"
|
|
138
|
+
><slot name="summary"></slot
|
|
139
|
+
></span>
|
|
140
|
+
</div>
|
|
126
141
|
</button>
|
|
127
142
|
<div
|
|
128
143
|
${ref_js.ref(this._contentRef)}
|
|
@@ -130,10 +145,12 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends ddsElement.DDSEl
|
|
|
130
145
|
role="region"
|
|
131
146
|
class=${cvaContent({ open })}
|
|
132
147
|
aria-labelledby="summary"
|
|
133
|
-
|
|
148
|
+
.inert=${!open}
|
|
134
149
|
>
|
|
135
150
|
<div class="overflow-hidden">
|
|
136
|
-
<div
|
|
151
|
+
<div
|
|
152
|
+
class="pt-(--dds-padding-20) px-(--dds-padding-40) pb-(--dds-padding-30)"
|
|
153
|
+
>
|
|
137
154
|
<slot class="slotted:natural-break"></slot>
|
|
138
155
|
</div>
|
|
139
156
|
</div>
|
|
@@ -11,6 +11,7 @@ import { DDSElement } from "../../base/index.cjs";
|
|
|
11
11
|
*
|
|
12
12
|
* @slot - A slot for the accordion item content.
|
|
13
13
|
* @slot summary - A slot for the accordion item summary content.
|
|
14
|
+
* @slot left-icon - A slot for an icon to be placed to the left of the summary text. Place `daikin-icon` or something similar.
|
|
14
15
|
*
|
|
15
16
|
* @cssprop [--divider-top-display=none] - The `display` property of the top divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
16
17
|
* @cssprop [--divider-bottom-display=none] - The `display` property of the bottom divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
@@ -37,7 +37,7 @@ import { DDSElement } from "../../base/index.cjs";
|
|
|
37
37
|
* <!-- Menu width can be set on the slotted <daikin-list slot="menu">, or via daikin-menu::part(menu). See the menu documentation for details. -->
|
|
38
38
|
* <daikin-menu placement="bottom-start">
|
|
39
39
|
* <daikin-breadcrumb-item></daikin-breadcrumb-item>
|
|
40
|
-
* <daikin-list
|
|
40
|
+
* <daikin-list slot="menu" style="width: 10rem">
|
|
41
41
|
* <daikin-list-item type="link" href="#">
|
|
42
42
|
* Breadcrumb 2
|
|
43
43
|
* </daikin-list-item>
|
|
@@ -78,9 +78,10 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends ddsElement.DDS
|
|
|
78
78
|
target=${ifDefined_js.ifDefined(this.target)}
|
|
79
79
|
?no-underline=${true}
|
|
80
80
|
?show-visited=${this.showVisited}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
><span slot="left-icon" class="inline-block -translate-y-px"
|
|
82
|
+
><slot name="left-icon"></slot></span
|
|
83
|
+
><slot></slot
|
|
84
|
+
></daikin-link>` : this.variant === "ellipsis" ? lit.html`<button
|
|
84
85
|
${ref_js.ref(this._focusableRef)}
|
|
85
86
|
type="button"
|
|
86
87
|
class=${LINK_CLASS_NAME}
|
|
@@ -95,9 +96,11 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends ddsElement.DDS
|
|
|
95
96
|
aria-current="true"
|
|
96
97
|
target=${ifDefined_js.ifDefined(this.target)}
|
|
97
98
|
role="link"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
><span class="inline-flex mr-0.5 align-sub -translate-y-px"
|
|
100
|
+
><slot name="left-icon" class="icon-size-4"
|
|
101
|
+
><span class="-mr-0.5"></span></slot></span
|
|
102
|
+
><slot></slot
|
|
103
|
+
></a>`;
|
|
101
104
|
const divider = this.appendDivider ? lit.html`<span
|
|
102
105
|
class="text-ddt-color-common-text-primary mx-2 text-sm"
|
|
103
106
|
aria-hidden="true"
|
|
@@ -6,6 +6,7 @@ import { DDSElement, DDSNavigable, NavigationTarget } from "../../base/index.cjs
|
|
|
6
6
|
* - `daikin-breadcrumb` > `daikin-breadcrumb-item`
|
|
7
7
|
*
|
|
8
8
|
* @slot - A slot for the breadcrumb item content.
|
|
9
|
+
* @slot left-icon - A slot for an icon to be placed to the left of the content. Place `daikin-icon` or something similar. This will only be displayed when `variant="normal"` or `variant="current"`.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
*
|
|
@@ -24,29 +24,56 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
24
24
|
if (kind && result) __defProp(target, key, result);
|
|
25
25
|
return result;
|
|
26
26
|
};
|
|
27
|
-
const MONTHS =
|
|
28
|
-
[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]
|
|
27
|
+
const MONTHS = {
|
|
28
|
+
en: [
|
|
29
|
+
["Jan", "January"],
|
|
30
|
+
["Feb", "February"],
|
|
31
|
+
["Mar", "March"],
|
|
32
|
+
["Apr", "April"],
|
|
33
|
+
["May", "May"],
|
|
34
|
+
["Jun", "June"],
|
|
35
|
+
["Jul", "July"],
|
|
36
|
+
["Aug", "August"],
|
|
37
|
+
["Sep", "September"],
|
|
38
|
+
["Oct", "October"],
|
|
39
|
+
["Nov", "November"],
|
|
40
|
+
["Dec", "December"]
|
|
41
|
+
],
|
|
42
|
+
ja: [
|
|
43
|
+
["1月", "1月"],
|
|
44
|
+
["2月", "2月"],
|
|
45
|
+
["3月", "3月"],
|
|
46
|
+
["4月", "4月"],
|
|
47
|
+
["5月", "5月"],
|
|
48
|
+
["6月", "6月"],
|
|
49
|
+
["7月", "7月"],
|
|
50
|
+
["8月", "8月"],
|
|
51
|
+
["9月", "9月"],
|
|
52
|
+
["10月", "10月"],
|
|
53
|
+
["11月", "11月"],
|
|
54
|
+
["12月", "12月"]
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
const DAYS = {
|
|
58
|
+
en: [
|
|
59
|
+
["Sun", "Sunday"],
|
|
60
|
+
["Mon", "Monday"],
|
|
61
|
+
["Tue", "Tuesday"],
|
|
62
|
+
["Wed", "Wednesday"],
|
|
63
|
+
["Thu", "Thursday"],
|
|
64
|
+
["Fri", "Friday"],
|
|
65
|
+
["Sat", "Saturday"]
|
|
66
|
+
],
|
|
67
|
+
ja: [
|
|
68
|
+
["日", "日曜日"],
|
|
69
|
+
["月", "月曜日"],
|
|
70
|
+
["火", "火曜日"],
|
|
71
|
+
["水", "水曜日"],
|
|
72
|
+
["木", "木曜日"],
|
|
73
|
+
["金", "金曜日"],
|
|
74
|
+
["土", "土曜日"]
|
|
75
|
+
]
|
|
76
|
+
};
|
|
50
77
|
const cvaContentButton = classVarianceAuthority.cva(
|
|
51
78
|
[
|
|
52
79
|
"flex",
|
|
@@ -129,11 +156,22 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
129
156
|
super(...arguments);
|
|
130
157
|
this.value = "";
|
|
131
158
|
this.defaultValue = null;
|
|
159
|
+
this.locale = null;
|
|
132
160
|
this.view = "day";
|
|
133
161
|
this._lastFocusedDate = null;
|
|
134
162
|
this._dateToBeFocused = null;
|
|
135
163
|
this._viewDate = getToday();
|
|
136
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* The locale used for calendar text.
|
|
167
|
+
* If not provided, the component uses the browser locale and falls back to English for unsupported locales.
|
|
168
|
+
* Currently, only English (`en`) and Japanese (`ja`) are supported.
|
|
169
|
+
*/
|
|
170
|
+
get _locale() {
|
|
171
|
+
const raw = String(this.locale ?? navigator.language);
|
|
172
|
+
const base = raw.split("-")[0].toLowerCase();
|
|
173
|
+
return base === "ja" ? "ja" : "en";
|
|
174
|
+
}
|
|
137
175
|
get _value() {
|
|
138
176
|
return calendarCommon.tryParseDateFromProperty(this.value);
|
|
139
177
|
}
|
|
@@ -248,6 +286,11 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
248
286
|
const newIndex = (focusedIndex + offset + buttons.length) % buttons.length;
|
|
249
287
|
buttons[newIndex].focus();
|
|
250
288
|
}
|
|
289
|
+
_createCalendarHeaderLabel(month, year) {
|
|
290
|
+
const locale = this._locale;
|
|
291
|
+
const monthLabel = MONTHS[locale][month][1];
|
|
292
|
+
return locale === "ja" ? `${year}年 ${monthLabel}` : `${monthLabel} ${year}`;
|
|
293
|
+
}
|
|
251
294
|
_createYearAndMonthPickerContainer(children) {
|
|
252
295
|
return lit.html`<div class="w-full h-72">
|
|
253
296
|
<div
|
|
@@ -334,7 +377,7 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
334
377
|
const focusableMonth = selectedMonth ?? todayMonth ?? (calendarCommon.isSameYearMonth(min, viewDate) ? min.getUTCMonth() : 0);
|
|
335
378
|
return this._createYearAndMonthPickerContainer(
|
|
336
379
|
lit.html`${repeat_js.repeat(
|
|
337
|
-
MONTHS,
|
|
380
|
+
MONTHS[this._locale],
|
|
338
381
|
([abbr]) => abbr,
|
|
339
382
|
([abbr, full], month) => {
|
|
340
383
|
const date = calendarCommon.createDateClamped(
|
|
@@ -383,7 +426,7 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
383
426
|
return lit.html`<div class="flex flex-col gap-2 w-full h-72" role="grid">
|
|
384
427
|
<div class="flex gap-1 flex-wrap w-full px-4" role="row">
|
|
385
428
|
${repeat_js.repeat(
|
|
386
|
-
DAYS,
|
|
429
|
+
DAYS[this._locale],
|
|
387
430
|
([abbr]) => abbr,
|
|
388
431
|
([abbr, full]) => lit.html`<div
|
|
389
432
|
class="flex justify-center items-center size-8 text-ddt-color-common-text-secondary text-xs font-bold leading-[1.3]"
|
|
@@ -435,6 +478,7 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
435
478
|
const view = this.view;
|
|
436
479
|
const year = viewDate.getUTCFullYear();
|
|
437
480
|
const month = viewDate.getUTCMonth();
|
|
481
|
+
const headerLabel = this._createCalendarHeaderLabel(month, year);
|
|
438
482
|
const pulldownLabel = {
|
|
439
483
|
year: "Switch to month view",
|
|
440
484
|
month: "Switch to year view",
|
|
@@ -460,7 +504,7 @@ exports.DaikinCalendar = class DaikinCalendar extends ddsElement.DDSElement {
|
|
|
460
504
|
class="text-ddt-color-common-text-primary font-bold"
|
|
461
505
|
aria-live="polite"
|
|
462
506
|
>
|
|
463
|
-
${
|
|
507
|
+
${headerLabel}
|
|
464
508
|
</span>
|
|
465
509
|
<daikin-icon-button
|
|
466
510
|
type="button"
|
|
@@ -559,6 +603,9 @@ __decorateClass([
|
|
|
559
603
|
__decorateClass([
|
|
560
604
|
ddsProperty.property({ type: String, reflect: true, attribute: "default-value" })
|
|
561
605
|
], exports.DaikinCalendar.prototype, "defaultValue", 2);
|
|
606
|
+
__decorateClass([
|
|
607
|
+
ddsProperty.property({ type: String, reflect: true })
|
|
608
|
+
], exports.DaikinCalendar.prototype, "locale", 2);
|
|
562
609
|
__decorateClass([
|
|
563
610
|
ddsProperty.property({ type: String, attribute: false })
|
|
564
611
|
], exports.DaikinCalendar.prototype, "view", 2);
|
|
@@ -41,6 +41,12 @@ export declare class DaikinCalendar extends DDSElement {
|
|
|
41
41
|
* If there is a `value` attribute, this is ignored.
|
|
42
42
|
*/
|
|
43
43
|
defaultValue: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The locale used for calendar formatting.
|
|
46
|
+
* If not provided, the browser's default locale will be used.
|
|
47
|
+
* The component automatically adapts the calendar text to the user's locale. Currently, only English and Japanese are supported.
|
|
48
|
+
*/
|
|
49
|
+
locale: "en" | "ja" | null;
|
|
44
50
|
/**
|
|
45
51
|
* _Internal use._
|
|
46
52
|
*
|
|
@@ -60,6 +66,12 @@ export declare class DaikinCalendar extends DDSElement {
|
|
|
60
66
|
* Used to set focus on a date that is not in the current view (year and month).
|
|
61
67
|
*/
|
|
62
68
|
private _dateToBeFocused;
|
|
69
|
+
/**
|
|
70
|
+
* The locale used for calendar text.
|
|
71
|
+
* If not provided, the component uses the browser locale and falls back to English for unsupported locales.
|
|
72
|
+
* Currently, only English (`en`) and Japanese (`ja`) are supported.
|
|
73
|
+
*/
|
|
74
|
+
private get _locale();
|
|
63
75
|
private get _value();
|
|
64
76
|
private get _min();
|
|
65
77
|
private get _max();
|
|
@@ -83,6 +95,7 @@ export declare class DaikinCalendar extends DDSElement {
|
|
|
83
95
|
private _handleYearAndMonthPickerClick;
|
|
84
96
|
private _handleCalendarKeyDown;
|
|
85
97
|
private _handleYearAndMonthPickerKeyDown;
|
|
98
|
+
private _createCalendarHeaderLabel;
|
|
86
99
|
private _createYearAndMonthPickerContainer;
|
|
87
100
|
private _createYearAndMonthPickerButton;
|
|
88
101
|
private _createYearPicker;
|
|
@@ -25,60 +25,159 @@ const cvaWrapper = classVarianceAuthority.cva(
|
|
|
25
25
|
{
|
|
26
26
|
variants: {
|
|
27
27
|
disabled: {
|
|
28
|
-
false: [
|
|
28
|
+
false: [],
|
|
29
|
+
true: []
|
|
30
|
+
},
|
|
31
|
+
readonly: {
|
|
32
|
+
false: [],
|
|
29
33
|
true: []
|
|
30
34
|
}
|
|
31
|
-
}
|
|
35
|
+
},
|
|
36
|
+
compoundVariants: [
|
|
37
|
+
{
|
|
38
|
+
disabled: false,
|
|
39
|
+
readonly: false,
|
|
40
|
+
class: ["cursor-pointer"]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva(
|
|
46
|
+
[
|
|
47
|
+
"block",
|
|
48
|
+
"size-4",
|
|
49
|
+
"rounded-xs",
|
|
50
|
+
"relative",
|
|
51
|
+
"appearance-none",
|
|
52
|
+
"before:absolute",
|
|
53
|
+
"before:m-auto",
|
|
54
|
+
"before:inset-0",
|
|
55
|
+
"focus-visible:outline-solid",
|
|
56
|
+
"focus-visible:outline-2",
|
|
57
|
+
"focus-visible:outline-offset-2",
|
|
58
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
59
|
+
"disabled:border-ddt-color-common-disabled",
|
|
60
|
+
"disabled:bg-ddt-color-common-text-inverse",
|
|
61
|
+
"disabled:checked:bg-ddt-color-common-disabled",
|
|
62
|
+
"disabled:indeterminate:bg-ddt-color-common-disabled"
|
|
63
|
+
],
|
|
64
|
+
{
|
|
65
|
+
variants: {
|
|
66
|
+
disabled: {
|
|
67
|
+
false: [],
|
|
68
|
+
true: []
|
|
69
|
+
},
|
|
70
|
+
readonly: {
|
|
71
|
+
false: [],
|
|
72
|
+
true: []
|
|
73
|
+
},
|
|
74
|
+
checkState: {
|
|
75
|
+
unchecked: [],
|
|
76
|
+
checked: [],
|
|
77
|
+
indeterminate: []
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
compoundVariants: [
|
|
81
|
+
{
|
|
82
|
+
disabled: false,
|
|
83
|
+
readonly: false,
|
|
84
|
+
class: ["cursor-pointer"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
readonly: false,
|
|
88
|
+
checkState: "unchecked",
|
|
89
|
+
class: [
|
|
90
|
+
"border-2",
|
|
91
|
+
"border-ddt-color-common-neutral-default",
|
|
92
|
+
"group-hover:enabled:border-ddt-color-common-neutral-hover",
|
|
93
|
+
"group-hover:enabled:bg-ddt-color-common-surface-hover",
|
|
94
|
+
"group-active:enabled:border-ddt-color-common-neutral-press",
|
|
95
|
+
"group-active:enabled:bg-ddt-color-common-surface-press"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
readonly: false,
|
|
100
|
+
checkState: "checked",
|
|
101
|
+
class: [
|
|
102
|
+
"border-2",
|
|
103
|
+
"before:text-ddt-color-common-text-inverse",
|
|
104
|
+
"before:icon-[daikin--checkbox-checked]",
|
|
105
|
+
"before:size-3",
|
|
106
|
+
"enabled:checked:border-ddt-color-common-brand-default",
|
|
107
|
+
"enabled:checked:bg-ddt-color-common-brand-default",
|
|
108
|
+
"group-hover:checked:enabled:bg-ddt-color-common-brand-hover",
|
|
109
|
+
"group-hover:checked:enabled:border-ddt-color-common-brand-hover",
|
|
110
|
+
"group-hover:checked:enabled:before:text-ddt-color-common-text-inverse",
|
|
111
|
+
"group-active:checked:enabled:bg-ddt-color-common-brand-press",
|
|
112
|
+
"group-active:checked:enabled:border-ddt-color-common-brand-press",
|
|
113
|
+
"group-active:checked:enabled:before:text-ddt-color-common-text-inverse"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
readonly: false,
|
|
118
|
+
checkState: "indeterminate",
|
|
119
|
+
class: [
|
|
120
|
+
"border-2",
|
|
121
|
+
"before:text-ddt-color-common-text-inverse",
|
|
122
|
+
"before:icon-[daikin--checkbox-indeterminate]",
|
|
123
|
+
"before:size-2.5",
|
|
124
|
+
"enabled:indeterminate:bg-ddt-color-common-brand-default",
|
|
125
|
+
"enabled:indeterminate:border-ddt-color-common-brand-default",
|
|
126
|
+
"group-hover:indeterminate:enabled:bg-ddt-color-common-brand-hover",
|
|
127
|
+
"group-hover:indeterminate:enabled:border-ddt-color-common-brand-hover",
|
|
128
|
+
"group-hover:indeterminate:enabled:before:text-ddt-color-common-text-inverse",
|
|
129
|
+
"group-active:indeterminate:enabled:bg-ddt-color-common-brand-press",
|
|
130
|
+
"group-active:indeterminate:enabled:border-ddt-color-common-brand-press",
|
|
131
|
+
"group-active:indeterminate:enabled:before:text-ddt-color-common-text-inverse"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
readonly: true,
|
|
136
|
+
checkState: "unchecked",
|
|
137
|
+
class: [
|
|
138
|
+
"border",
|
|
139
|
+
"border-ddt-color-common-disabled",
|
|
140
|
+
"bg-(--dds-color-common-surface-secondary)"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
readonly: true,
|
|
145
|
+
checkState: "checked",
|
|
146
|
+
class: [
|
|
147
|
+
"border",
|
|
148
|
+
"border-ddt-color-common-neutral-default",
|
|
149
|
+
"bg-(--dds-color-common-surface-secondary)",
|
|
150
|
+
"before:text-ddt-color-common-neutral-default",
|
|
151
|
+
"before:icon-[daikin--checkbox-checked]",
|
|
152
|
+
"before:size-3"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
readonly: true,
|
|
157
|
+
checkState: "indeterminate",
|
|
158
|
+
class: [
|
|
159
|
+
"border",
|
|
160
|
+
"border-ddt-color-common-neutral-default",
|
|
161
|
+
"bg-(--dds-color-common-surface-secondary)",
|
|
162
|
+
"before:text-ddt-color-common-neutral-default",
|
|
163
|
+
"before:icon-[daikin--checkbox-indeterminate]",
|
|
164
|
+
"before:size-2.5"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
32
168
|
}
|
|
33
169
|
);
|
|
34
|
-
const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
|
|
35
|
-
"block",
|
|
36
|
-
"size-4",
|
|
37
|
-
"border-ddt-color-common-neutral-default",
|
|
38
|
-
"border-2",
|
|
39
|
-
"rounded-xs",
|
|
40
|
-
"relative",
|
|
41
|
-
"appearance-none",
|
|
42
|
-
"before:text-ddt-color-common-text-inverse",
|
|
43
|
-
"before:absolute",
|
|
44
|
-
"before:m-auto",
|
|
45
|
-
"before:inset-0",
|
|
46
|
-
"checked:before:icon-[daikin--checkbox-checked]",
|
|
47
|
-
"checked:before:size-3",
|
|
48
|
-
"indeterminate:before:icon-[daikin--checkbox-indeterminate]",
|
|
49
|
-
"indeterminate:before:size-2.5",
|
|
50
|
-
"focus-visible:outline-solid",
|
|
51
|
-
"focus-visible:outline-2",
|
|
52
|
-
"focus-visible:outline-offset-2",
|
|
53
|
-
"focus-visible:outline-ddt-color-common-border-focus",
|
|
54
|
-
"group-hover:enabled:border-ddt-color-common-neutral-hover",
|
|
55
|
-
"group-hover:enabled:bg-ddt-color-common-surface-hover",
|
|
56
|
-
"group-active:enabled:border-ddt-color-common-neutral-press",
|
|
57
|
-
"group-active:enabled:bg-ddt-color-common-surface-press",
|
|
58
|
-
"enabled:checked:border-ddt-color-common-brand-default",
|
|
59
|
-
"enabled:checked:bg-ddt-color-common-brand-default",
|
|
60
|
-
"enabled:cursor-pointer",
|
|
61
|
-
"group-hover:checked:enabled:bg-ddt-color-common-brand-hover",
|
|
62
|
-
"group-hover:checked:enabled:border-ddt-color-common-brand-hover",
|
|
63
|
-
"group-hover:checked:enabled:before:text-ddt-color-common-text-inverse",
|
|
64
|
-
"group-active:checked:enabled:bg-ddt-color-common-brand-press",
|
|
65
|
-
"group-active:checked:enabled:border-ddt-color-common-brand-press",
|
|
66
|
-
"group-active:checked:enabled:before:text-ddt-color-common-text-inverse",
|
|
67
|
-
"enabled:indeterminate:bg-ddt-color-common-brand-default",
|
|
68
|
-
"enabled:indeterminate:border-ddt-color-common-brand-default",
|
|
69
|
-
"group-hover:indeterminate:enabled:bg-ddt-color-common-brand-hover",
|
|
70
|
-
"group-hover:indeterminate:enabled:border-ddt-color-common-brand-hover",
|
|
71
|
-
"group-hover:indeterminate:enabled:before:text-ddt-color-common-text-inverse",
|
|
72
|
-
"group-active:indeterminate:enabled:bg-ddt-color-common-brand-press",
|
|
73
|
-
"group-active:indeterminate:enabled:border-ddt-color-common-brand-press",
|
|
74
|
-
"group-active:indeterminate:enabled:before:text-ddt-color-common-text-inverse",
|
|
75
|
-
"disabled:border-ddt-color-common-disabled",
|
|
76
|
-
"disabled:bg-ddt-color-common-text-inverse",
|
|
77
|
-
"disabled:checked:bg-ddt-color-common-disabled",
|
|
78
|
-
"disabled:indeterminate:bg-ddt-color-common-disabled"
|
|
79
|
-
])();
|
|
80
170
|
const cvaLabel = classVarianceAuthority.cva(["natural-break"], {
|
|
81
171
|
variants: {
|
|
172
|
+
checkState: {
|
|
173
|
+
unchecked: [],
|
|
174
|
+
checked: [],
|
|
175
|
+
indeterminate: []
|
|
176
|
+
},
|
|
177
|
+
readonly: {
|
|
178
|
+
false: [],
|
|
179
|
+
true: []
|
|
180
|
+
},
|
|
82
181
|
disabled: {
|
|
83
182
|
false: ["text-ddt-color-common-text-primary"],
|
|
84
183
|
true: ["text-ddt-color-common-disabled"]
|
|
@@ -87,13 +186,24 @@ const cvaLabel = classVarianceAuthority.cva(["natural-break"], {
|
|
|
87
186
|
false: ["inline-block"],
|
|
88
187
|
true: ["hidden"]
|
|
89
188
|
}
|
|
90
|
-
}
|
|
189
|
+
},
|
|
190
|
+
compoundVariants: [
|
|
191
|
+
{
|
|
192
|
+
readonly: true,
|
|
193
|
+
checkState: "unchecked",
|
|
194
|
+
disabled: false,
|
|
195
|
+
hidden: false,
|
|
196
|
+
class: ["text-ddt-color-common-disabled!"]
|
|
197
|
+
}
|
|
198
|
+
]
|
|
91
199
|
});
|
|
92
200
|
exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElement {
|
|
93
201
|
constructor() {
|
|
94
202
|
super(...arguments);
|
|
95
203
|
this.disabled = false;
|
|
204
|
+
this.readonly = false;
|
|
96
205
|
this.disabledByParent = false;
|
|
206
|
+
this.readonlyByParent = false;
|
|
97
207
|
this._inputRef = ref_js.createRef();
|
|
98
208
|
}
|
|
99
209
|
/**
|
|
@@ -105,6 +215,15 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
|
|
|
105
215
|
get _disabled() {
|
|
106
216
|
return this.disabled || this.disabledByParent;
|
|
107
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* The effective readonly state of the checkbox.
|
|
220
|
+
* Returns `true` if either `readonly` or `readonlyByParent` is `true`.
|
|
221
|
+
*
|
|
222
|
+
* @private
|
|
223
|
+
*/
|
|
224
|
+
get _readonly() {
|
|
225
|
+
return this.readonly || this.readonlyByParent;
|
|
226
|
+
}
|
|
108
227
|
/**
|
|
109
228
|
* Focuses on the inner checkbox.
|
|
110
229
|
* @param options focus options
|
|
@@ -132,7 +251,7 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
|
|
|
132
251
|
}
|
|
133
252
|
_handleClick(event) {
|
|
134
253
|
var _a;
|
|
135
|
-
if (this._disabled) {
|
|
254
|
+
if (this._disabled || this._readonly) {
|
|
136
255
|
event.preventDefault();
|
|
137
256
|
}
|
|
138
257
|
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT") {
|
|
@@ -140,20 +259,31 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
|
|
|
140
259
|
}
|
|
141
260
|
}
|
|
142
261
|
_handleChange(event) {
|
|
262
|
+
if (this._readonly) {
|
|
263
|
+
event.preventDefault();
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
143
266
|
this.checkState = event.target.checked ? "checked" : "unchecked";
|
|
144
267
|
this._updateFormValue();
|
|
145
268
|
this.dispatchEvent(new Event("change", event));
|
|
146
269
|
}
|
|
147
270
|
render() {
|
|
148
271
|
return lit.html`<label
|
|
149
|
-
class=${cvaWrapper({
|
|
272
|
+
class=${cvaWrapper({
|
|
273
|
+
disabled: this._disabled,
|
|
274
|
+
readonly: this._readonly
|
|
275
|
+
})}
|
|
150
276
|
part="label"
|
|
151
277
|
@click=${this._handleClick}
|
|
152
278
|
>
|
|
153
279
|
<span class="p-2">
|
|
154
280
|
<input
|
|
155
281
|
${ref_js.ref(this._inputRef)}
|
|
156
|
-
class=${CHECKBOX_CLASS_NAME
|
|
282
|
+
class=${CHECKBOX_CLASS_NAME({
|
|
283
|
+
disabled: this._disabled,
|
|
284
|
+
readonly: this._readonly && !this._disabled,
|
|
285
|
+
checkState: this.checkState
|
|
286
|
+
})}
|
|
157
287
|
type="checkbox"
|
|
158
288
|
name=${ifDefined_js.ifDefined(this.getBackingProperty("name"))}
|
|
159
289
|
?disabled=${this._disabled}
|
|
@@ -167,6 +297,8 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
|
|
|
167
297
|
<slot
|
|
168
298
|
class=${cvaLabel({
|
|
169
299
|
disabled: this._disabled,
|
|
300
|
+
readonly: this._readonly && !this._disabled,
|
|
301
|
+
checkState: this.checkState,
|
|
170
302
|
hidden: this._labelHidden
|
|
171
303
|
})}
|
|
172
304
|
?hidden=${this._labelHidden}
|
|
@@ -216,9 +348,15 @@ __decorateClass([
|
|
|
216
348
|
__decorateClass([
|
|
217
349
|
ddsProperty.property({ type: Boolean, reflect: true })
|
|
218
350
|
], exports.DaikinCheckbox.prototype, "disabled", 2);
|
|
351
|
+
__decorateClass([
|
|
352
|
+
ddsProperty.property({ type: Boolean, reflect: true })
|
|
353
|
+
], exports.DaikinCheckbox.prototype, "readonly", 2);
|
|
219
354
|
__decorateClass([
|
|
220
355
|
ddsProperty.property({ type: Boolean, reflect: true, attribute: false })
|
|
221
356
|
], exports.DaikinCheckbox.prototype, "disabledByParent", 2);
|
|
357
|
+
__decorateClass([
|
|
358
|
+
ddsProperty.property({ type: Boolean, reflect: true, attribute: false })
|
|
359
|
+
], exports.DaikinCheckbox.prototype, "readonlyByParent", 2);
|
|
222
360
|
exports.DaikinCheckbox = __decorateClass([
|
|
223
361
|
decorators.ddsElement("daikin-checkbox")
|
|
224
362
|
], exports.DaikinCheckbox);
|
|
@@ -53,6 +53,10 @@ export declare class DaikinCheckbox extends DDSFormElement {
|
|
|
53
53
|
* Specify the checkbox disabled state.
|
|
54
54
|
*/
|
|
55
55
|
disabled: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the checkbox is readonly.
|
|
58
|
+
*/
|
|
59
|
+
readonly: boolean;
|
|
56
60
|
/**
|
|
57
61
|
* Specify the checkbox disabled state controlled by the parent component.
|
|
58
62
|
* Controlled by `daikin-checkbox-group`.
|
|
@@ -60,6 +64,13 @@ export declare class DaikinCheckbox extends DDSFormElement {
|
|
|
60
64
|
* @private
|
|
61
65
|
*/
|
|
62
66
|
disabledByParent: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Specify the checkbox readonly state controlled by the parent component.
|
|
69
|
+
* Controlled by `daikin-checkbox-group`.
|
|
70
|
+
*
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
readonlyByParent: boolean;
|
|
63
74
|
/**
|
|
64
75
|
* The effective disabled state of the checkbox.
|
|
65
76
|
* Returns `true` if either `disabled` or `disabledByParent` is `true`.
|
|
@@ -67,6 +78,13 @@ export declare class DaikinCheckbox extends DDSFormElement {
|
|
|
67
78
|
* @private
|
|
68
79
|
*/
|
|
69
80
|
private get _disabled();
|
|
81
|
+
/**
|
|
82
|
+
* The effective readonly state of the checkbox.
|
|
83
|
+
* Returns `true` if either `readonly` or `readonlyByParent` is `true`.
|
|
84
|
+
*
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
private get _readonly();
|
|
70
88
|
private readonly _inputRef;
|
|
71
89
|
/**
|
|
72
90
|
* Focuses on the inner checkbox.
|