@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
|
@@ -10,6 +10,7 @@ import { DaikinInputGroup } from "../input-group/index.cjs";
|
|
|
10
10
|
* - `daikin-input-group` > `daikin-select`
|
|
11
11
|
*
|
|
12
12
|
* @slot - A slot for an HTML `<select>` element which may contain `<option>` and `<optgroup>`.
|
|
13
|
+
* @slot left-icon - A slot for an icon to be placed to the left of the summary text. Place `daikin-icon` or something similar.
|
|
13
14
|
*
|
|
14
15
|
* @example
|
|
15
16
|
*
|
|
@@ -40,18 +41,28 @@ export declare class DaikinSelect extends DDSElement {
|
|
|
40
41
|
* Whether the select component is required.
|
|
41
42
|
*/
|
|
42
43
|
required: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the select is readonly.
|
|
46
|
+
*/
|
|
47
|
+
readonly: boolean;
|
|
43
48
|
/**
|
|
44
49
|
* Whether the select component is disabled.
|
|
45
50
|
* This value will also be applied to the `disabled` property of the `<select>` element in the slot.
|
|
46
51
|
*/
|
|
47
52
|
disabled: boolean;
|
|
48
53
|
private readonly _selects;
|
|
54
|
+
private _hasLeftIcon;
|
|
49
55
|
/**
|
|
50
56
|
* The label text used as the value of aria-label.
|
|
51
57
|
* Set automatically by `reflectInputGroup` method.
|
|
52
58
|
*/
|
|
53
59
|
private _label;
|
|
60
|
+
private _handleLeftIconSlotChange;
|
|
54
61
|
private get _select();
|
|
62
|
+
/**
|
|
63
|
+
* Native <select> elements do not support the readonly attribute, so a custom controller is used to achieve a similar readonly behavior.
|
|
64
|
+
*/
|
|
65
|
+
private readonly _readonlyController;
|
|
55
66
|
private _updateSelect;
|
|
56
67
|
private _handleSlotChange;
|
|
57
68
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -24,10 +24,21 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
24
24
|
const cvaWrapper = classVarianceAuthority.cva(["relative", "w-full", "h-6"], {
|
|
25
25
|
variants: {
|
|
26
26
|
disabled: {
|
|
27
|
-
false: [
|
|
27
|
+
false: [],
|
|
28
|
+
true: []
|
|
29
|
+
},
|
|
30
|
+
readonly: {
|
|
31
|
+
false: [],
|
|
28
32
|
true: []
|
|
29
33
|
}
|
|
30
|
-
}
|
|
34
|
+
},
|
|
35
|
+
compoundVariants: [
|
|
36
|
+
{
|
|
37
|
+
disabled: false,
|
|
38
|
+
readonly: false,
|
|
39
|
+
class: ["cursor-pointer"]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
31
42
|
});
|
|
32
43
|
const cvaSliderThumb = classVarianceAuthority.cva(
|
|
33
44
|
[
|
|
@@ -35,27 +46,42 @@ const cvaSliderThumb = classVarianceAuthority.cva(
|
|
|
35
46
|
"top-1/2",
|
|
36
47
|
"-translate-x-1/2",
|
|
37
48
|
"-translate-y-1/2",
|
|
38
|
-
"w-4",
|
|
39
|
-
"h-4",
|
|
40
|
-
"rounded-full",
|
|
41
49
|
"left-(--slider-ratio)"
|
|
42
50
|
],
|
|
43
51
|
{
|
|
44
52
|
variants: {
|
|
45
53
|
disabled: {
|
|
46
54
|
false: [
|
|
47
|
-
"[&:not([data-dragging])]:bg-ddt-color-common-brand-default",
|
|
48
|
-
"[&:not([data-dragging])]:hover:bg-ddt-color-common-brand-hover",
|
|
49
|
-
"[&:not([data-dragging])]:active:bg-ddt-color-common-brand-press",
|
|
50
|
-
"data-dragging:bg-ddt-color-common-brand-press",
|
|
51
55
|
"focus-visible:outline-solid",
|
|
52
56
|
"focus-visible:outline-2",
|
|
53
57
|
"focus-visible:outline-offset-2",
|
|
54
58
|
"focus-visible:outline-ddt-color-common-border-focus"
|
|
55
59
|
],
|
|
56
60
|
true: ["bg-ddt-color-common-disabled", "pointer-events-none"]
|
|
61
|
+
},
|
|
62
|
+
readonly: {
|
|
63
|
+
false: ["w-4", "h-4", "rounded-full"],
|
|
64
|
+
true: [
|
|
65
|
+
"w-1",
|
|
66
|
+
"h-3",
|
|
67
|
+
"rounded-xs",
|
|
68
|
+
"bg-ddt-color-common-neutral-default",
|
|
69
|
+
"pointer-events-none"
|
|
70
|
+
]
|
|
57
71
|
}
|
|
58
|
-
}
|
|
72
|
+
},
|
|
73
|
+
compoundVariants: [
|
|
74
|
+
{
|
|
75
|
+
disabled: false,
|
|
76
|
+
readonly: false,
|
|
77
|
+
class: [
|
|
78
|
+
"[&:not([data-dragging])]:bg-ddt-color-common-brand-default",
|
|
79
|
+
"[&:not([data-dragging])]:hover:bg-ddt-color-common-brand-hover",
|
|
80
|
+
"[&:not([data-dragging])]:active:bg-ddt-color-common-brand-press",
|
|
81
|
+
"data-dragging:bg-ddt-color-common-brand-press"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
59
85
|
}
|
|
60
86
|
);
|
|
61
87
|
const cvaSliderTrack = classVarianceAuthority.cva(
|
|
@@ -72,6 +98,10 @@ const cvaSliderTrack = classVarianceAuthority.cva(
|
|
|
72
98
|
disabled: {
|
|
73
99
|
false: ["bg-ddt-color-common-brand-default"],
|
|
74
100
|
true: ["bg-ddt-color-common-border-empty"]
|
|
101
|
+
},
|
|
102
|
+
readonly: {
|
|
103
|
+
false: [],
|
|
104
|
+
true: ["bg-ddt-color-common-neutral-default"]
|
|
75
105
|
}
|
|
76
106
|
}
|
|
77
107
|
}
|
|
@@ -80,6 +110,7 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
80
110
|
constructor() {
|
|
81
111
|
super();
|
|
82
112
|
this.disabled = false;
|
|
113
|
+
this.readonly = false;
|
|
83
114
|
this._dragging = false;
|
|
84
115
|
this._sliderRef = ref_js.createRef();
|
|
85
116
|
this._thumbRef = ref_js.createRef();
|
|
@@ -122,7 +153,7 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
122
153
|
}
|
|
123
154
|
// This function is called when an arrow key is pressed while the thumb is focused.
|
|
124
155
|
_handleKeyDown(event) {
|
|
125
|
-
if (this.disabled) {
|
|
156
|
+
if (this.disabled || this.readonly) {
|
|
126
157
|
return;
|
|
127
158
|
}
|
|
128
159
|
const value = sliderUtils.getValueByKeydown(this, event.key);
|
|
@@ -152,7 +183,7 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
152
183
|
_startDrag(event) {
|
|
153
184
|
var _a;
|
|
154
185
|
event.preventDefault();
|
|
155
|
-
if (this.disabled) {
|
|
186
|
+
if (this.disabled || this.readonly) {
|
|
156
187
|
return;
|
|
157
188
|
}
|
|
158
189
|
const controller = new AbortController();
|
|
@@ -180,7 +211,7 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
180
211
|
_startTouch(event) {
|
|
181
212
|
var _a;
|
|
182
213
|
event.preventDefault();
|
|
183
|
-
if (this.disabled) {
|
|
214
|
+
if (this.disabled || this.readonly) {
|
|
184
215
|
return;
|
|
185
216
|
}
|
|
186
217
|
const controller = new AbortController();
|
|
@@ -217,7 +248,10 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
217
248
|
return lit.html`
|
|
218
249
|
<span
|
|
219
250
|
${ref_js.ref(this._sliderRef)}
|
|
220
|
-
class=${cvaWrapper({
|
|
251
|
+
class=${cvaWrapper({
|
|
252
|
+
disabled: this.disabled,
|
|
253
|
+
readonly: this.readonly && !this.disabled
|
|
254
|
+
})}
|
|
221
255
|
style="--slider-ratio:${progress}%"
|
|
222
256
|
@mousedown=${this._startDrag}
|
|
223
257
|
@touchstart=${this._startTouch}
|
|
@@ -225,10 +259,18 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
|
|
|
225
259
|
<span
|
|
226
260
|
class="w-full absolute top-1/2 -translate-y-1/2 left-0 h-1 bg-ddt-color-common-border-empty"
|
|
227
261
|
></span>
|
|
228
|
-
<span
|
|
262
|
+
<span
|
|
263
|
+
class=${cvaSliderTrack({
|
|
264
|
+
disabled: this.disabled,
|
|
265
|
+
readonly: this.readonly && !this.disabled
|
|
266
|
+
})}
|
|
267
|
+
></span>
|
|
229
268
|
<span
|
|
230
269
|
${ref_js.ref(this._thumbRef)}
|
|
231
|
-
class=${cvaSliderThumb({
|
|
270
|
+
class=${cvaSliderThumb({
|
|
271
|
+
disabled: this.disabled,
|
|
272
|
+
readonly: this.readonly && !this.disabled
|
|
273
|
+
})}
|
|
232
274
|
tabindex=${this.disabled ? -1 : 0}
|
|
233
275
|
role="slider"
|
|
234
276
|
?data-dragging=${this._dragging}
|
|
@@ -270,6 +312,9 @@ __decorateClass([
|
|
|
270
312
|
__decorateClass([
|
|
271
313
|
ddsProperty.property({ type: Boolean, reflect: true })
|
|
272
314
|
], exports.DaikinSlider.prototype, "disabled", 2);
|
|
315
|
+
__decorateClass([
|
|
316
|
+
ddsProperty.property({ type: Boolean, reflect: true })
|
|
317
|
+
], exports.DaikinSlider.prototype, "readonly", 2);
|
|
273
318
|
__decorateClass([
|
|
274
319
|
ddsProperty.property({
|
|
275
320
|
type: String,
|
|
@@ -48,6 +48,10 @@ export declare class DaikinSlider extends DDSFormElement {
|
|
|
48
48
|
* Specify the slider disabled state.
|
|
49
49
|
*/
|
|
50
50
|
disabled: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the slider is readonly.
|
|
53
|
+
*/
|
|
54
|
+
readonly: boolean;
|
|
51
55
|
/**
|
|
52
56
|
* The aria-label of the slider.
|
|
53
57
|
* You should specify this value based on the slider's use case, such as "air conditioner temperature".
|
|
@@ -71,6 +71,7 @@ exports.DaikinStatusMessage = class DaikinStatusMessage extends ddsElement.DDSEl
|
|
|
71
71
|
render() {
|
|
72
72
|
return lit.html`
|
|
73
73
|
<div
|
|
74
|
+
part="status-message"
|
|
74
75
|
class=${cvaWrapper({ status: this.status, size: this.size })}
|
|
75
76
|
role=${ifDefined_js.ifDefined(this.statusMessageRole ?? void 0)}
|
|
76
77
|
>
|
|
@@ -2,6 +2,8 @@ import { DDSElement } from "../../base/index.cjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* A status message is a concise UI component for displaying status feedback, notifications, or contextual information to users. It typically indicates success, warning, error, or other states, helping users quickly understand the current state or important updates in the interface.
|
|
4
4
|
*
|
|
5
|
+
* @csspart status-message - CSS styles applied to the `status-message` part target the internal content container.
|
|
6
|
+
*
|
|
5
7
|
* @example
|
|
6
8
|
*
|
|
7
9
|
* ```js
|
|
@@ -25,11 +25,31 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
25
25
|
if (kind && result) __defProp(target, key, result);
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
|
+
const getColumnPartName = (key) => `column-${key.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
29
|
+
const getRowPartName = (id) => `row-${id.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
28
30
|
const defaultSort = (a, b, key) => String(a[key]).localeCompare(String(b[key]));
|
|
31
|
+
const cvaTableHeaderCell = classVarianceAuthority.cva(["h-full", "p-0"], {
|
|
32
|
+
variants: {
|
|
33
|
+
hoverEnabled: {
|
|
34
|
+
false: [],
|
|
35
|
+
true: ["hover:bg-ddt-color-common-surface-hover"]
|
|
36
|
+
},
|
|
37
|
+
sortable: {
|
|
38
|
+
false: [],
|
|
39
|
+
true: [
|
|
40
|
+
"active:bg-ddt-color-common-surface-press",
|
|
41
|
+
"focus-within:outline-solid",
|
|
42
|
+
"focus-within:outline-2",
|
|
43
|
+
"focus-within:-outline-offset-2",
|
|
44
|
+
"focus-within:outline-ddt-color-common-border-focus"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
29
49
|
const cvaRow = classVarianceAuthority.cva(
|
|
30
50
|
[
|
|
31
51
|
"border-b",
|
|
32
|
-
"border-b-
|
|
52
|
+
"border-b-(--ddc-table-border-color)",
|
|
33
53
|
"focus-visible:outline-solid",
|
|
34
54
|
"focus-visible:outline-2",
|
|
35
55
|
"focus-visible:-outline-offset-2",
|
|
@@ -39,6 +59,7 @@ const cvaRow = classVarianceAuthority.cva(
|
|
|
39
59
|
variants: {
|
|
40
60
|
selected: {
|
|
41
61
|
false: [
|
|
62
|
+
"bg-ddt-color-common-surface-default",
|
|
42
63
|
"hover:group-[:not([data-hover])]:bg-ddt-color-common-surface-hover",
|
|
43
64
|
"data-hover:bg-ddt-color-common-surface-hover"
|
|
44
65
|
],
|
|
@@ -58,6 +79,8 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
58
79
|
this.rows = [];
|
|
59
80
|
this.selectable = false;
|
|
60
81
|
this.sortable = false;
|
|
82
|
+
this.border = "underline";
|
|
83
|
+
this.stickyHeader = false;
|
|
61
84
|
this.selection = [];
|
|
62
85
|
this.sort = null;
|
|
63
86
|
this.order = null;
|
|
@@ -156,12 +179,19 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
156
179
|
this.headers,
|
|
157
180
|
({ key }) => key,
|
|
158
181
|
({ key, label, alignment, sortable }) => {
|
|
159
|
-
const
|
|
182
|
+
const isSortableHeader = this.sortable && sortable;
|
|
183
|
+
const isHeaderHoverEnabled = isSortableHeader;
|
|
184
|
+
const currentSort = isSortableHeader && this.sort === key ? this.order === "asc" ? "ascending" : "descending" : void 0;
|
|
160
185
|
return lit.html`<th
|
|
161
|
-
class
|
|
186
|
+
class=${cvaTableHeaderCell({
|
|
187
|
+
hoverEnabled: isHeaderHoverEnabled,
|
|
188
|
+
sortable: isSortableHeader
|
|
189
|
+
})}
|
|
190
|
+
part=${`header cell ${getColumnPartName(String(key))}`}
|
|
162
191
|
aria-sort=${ifDefined_js.ifDefined(currentSort)}
|
|
163
192
|
>
|
|
164
193
|
<slot
|
|
194
|
+
class="block h-full"
|
|
165
195
|
name=${`header:${key}`}
|
|
166
196
|
data-key=${key}
|
|
167
197
|
@change-sort=${(event) => this._handleClickSort(event, key)}
|
|
@@ -169,7 +199,7 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
169
199
|
>
|
|
170
200
|
<daikin-table-header-cell
|
|
171
201
|
alignment=${alignment ?? "left"}
|
|
172
|
-
?sortable=${
|
|
202
|
+
?sortable=${isSortableHeader}
|
|
173
203
|
order=${ifDefined_js.ifDefined(currentSort && this.order)}
|
|
174
204
|
>
|
|
175
205
|
${label}
|
|
@@ -178,10 +208,20 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
178
208
|
</th>`;
|
|
179
209
|
}
|
|
180
210
|
);
|
|
181
|
-
const createRow = (item) => repeat_js.repeat(
|
|
211
|
+
const createRow = (item, isOddRow, isSelectedRow) => repeat_js.repeat(
|
|
182
212
|
this.headers,
|
|
183
213
|
({ key }) => `${item.id}:${key}`,
|
|
184
|
-
({ key, alignment }) => lit.html`<td
|
|
214
|
+
({ key, alignment }) => lit.html`<td
|
|
215
|
+
class="h-full p-0"
|
|
216
|
+
part=${[
|
|
217
|
+
"body",
|
|
218
|
+
"cell",
|
|
219
|
+
getRowPartName(String(item.id)),
|
|
220
|
+
getColumnPartName(String(key)),
|
|
221
|
+
isSelectedRow ? "selected" : null,
|
|
222
|
+
isOddRow ? "odd" : null
|
|
223
|
+
].filter((partName) => !!partName).join(" ")}
|
|
224
|
+
>
|
|
185
225
|
<slot name=${`cell:${item.id}:${key}`}>
|
|
186
226
|
<daikin-table-cell alignment=${alignment ?? "left"}>
|
|
187
227
|
${item[key]}
|
|
@@ -196,10 +236,13 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
196
236
|
?data-hover=${this._currentTouchHoverRowId != null}
|
|
197
237
|
>
|
|
198
238
|
<thead>
|
|
199
|
-
<tr
|
|
239
|
+
<tr
|
|
240
|
+
class="border-b border-b-(--ddc-table-border-color)"
|
|
241
|
+
part="header row"
|
|
242
|
+
>
|
|
200
243
|
${this.selectable ? lit.html`<td class="w-12 p-0">
|
|
201
244
|
<span
|
|
202
|
-
class="flex items-center justify-center size-full min-h-
|
|
245
|
+
class="flex items-center justify-center size-full min-h-(--dds-input-height)"
|
|
203
246
|
>
|
|
204
247
|
<daikin-checkbox
|
|
205
248
|
name="allItem"
|
|
@@ -228,16 +271,35 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
228
271
|
${repeat_js.repeat(
|
|
229
272
|
this._currentView,
|
|
230
273
|
({ id }) => id,
|
|
231
|
-
(row) =>
|
|
274
|
+
(row, index) => {
|
|
275
|
+
const isOddRow = index % 2 === 0;
|
|
276
|
+
const isSelectedRow = this.selectable && this.selection.includes(row.id);
|
|
277
|
+
return lit.html`<tr
|
|
232
278
|
class=${cvaRow({
|
|
233
|
-
|
|
234
|
-
|
|
279
|
+
selected: isSelectedRow
|
|
280
|
+
})}
|
|
281
|
+
part=${[
|
|
282
|
+
"body",
|
|
283
|
+
"row",
|
|
284
|
+
getRowPartName(String(row.id)),
|
|
285
|
+
isSelectedRow ? "selected" : null
|
|
286
|
+
].filter((partName) => !!partName).join(" ")}
|
|
235
287
|
data-id=${row.id}
|
|
236
288
|
?data-hover=${this._currentTouchHoverRowId === row.id}
|
|
237
289
|
>
|
|
238
|
-
${this.selectable ? lit.html`<td
|
|
290
|
+
${this.selectable ? lit.html`<td
|
|
291
|
+
class="w-12 p-0"
|
|
292
|
+
part=${[
|
|
293
|
+
"body",
|
|
294
|
+
"cell",
|
|
295
|
+
"checkbox-cell",
|
|
296
|
+
getRowPartName(String(row.id)),
|
|
297
|
+
isSelectedRow ? "selected" : null,
|
|
298
|
+
isOddRow ? "odd" : null
|
|
299
|
+
].filter((partName) => !!partName).join(" ")}
|
|
300
|
+
>
|
|
239
301
|
<span
|
|
240
|
-
class="flex justify-center items-center size-full min-h-
|
|
302
|
+
class="flex justify-center items-center size-full min-h-(--dds-input-height)"
|
|
241
303
|
>
|
|
242
304
|
<daikin-checkbox
|
|
243
305
|
name=${row.id}
|
|
@@ -248,8 +310,9 @@ exports.DaikinTable = class DaikinTable extends ddsElement.DDSElement {
|
|
|
248
310
|
></daikin-checkbox>
|
|
249
311
|
</span>
|
|
250
312
|
</td>` : lit.nothing}
|
|
251
|
-
${createRow(row)}
|
|
252
|
-
</tr
|
|
313
|
+
${createRow(row, isOddRow, isSelectedRow)}
|
|
314
|
+
</tr>`;
|
|
315
|
+
}
|
|
253
316
|
)}
|
|
254
317
|
</tbody>
|
|
255
318
|
</table>
|
|
@@ -278,7 +341,25 @@ exports.DaikinTable.styles = lit.css`
|
|
|
278
341
|
:host {
|
|
279
342
|
display: block;
|
|
280
343
|
width: 100%;
|
|
281
|
-
overflow: auto;
|
|
344
|
+
overflow-x: auto;
|
|
345
|
+
overflow-y: visible;
|
|
346
|
+
--ddc-table-border-color: var(--dds-color-divider);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:host([border="none"]) {
|
|
350
|
+
--ddc-table-border-color: transparent;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:host([sticky-header]) {
|
|
354
|
+
overflow: visible;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
:host([sticky-header]) thead tr > th,
|
|
358
|
+
:host([sticky-header]) thead tr > td {
|
|
359
|
+
position: sticky;
|
|
360
|
+
top: var(--table-sticky-header-top, 0px);
|
|
361
|
+
z-index: 1;
|
|
362
|
+
background-color: var(--dds-color-common-surface-default);
|
|
282
363
|
}
|
|
283
364
|
`;
|
|
284
365
|
__decorateClass([
|
|
@@ -293,6 +374,17 @@ __decorateClass([
|
|
|
293
374
|
__decorateClass([
|
|
294
375
|
ddsProperty.property({ type: Boolean, reflect: true })
|
|
295
376
|
], exports.DaikinTable.prototype, "sortable", 2);
|
|
377
|
+
__decorateClass([
|
|
378
|
+
ddsProperty.property({
|
|
379
|
+
type: String,
|
|
380
|
+
reflect: true,
|
|
381
|
+
fallbackValue: "underline",
|
|
382
|
+
isAllowedValue: ddsProperty.oneOf(["none", "underline"])
|
|
383
|
+
})
|
|
384
|
+
], exports.DaikinTable.prototype, "border", 2);
|
|
385
|
+
__decorateClass([
|
|
386
|
+
ddsProperty.property({ type: Boolean, reflect: true, attribute: "sticky-header" })
|
|
387
|
+
], exports.DaikinTable.prototype, "stickyHeader", 2);
|
|
296
388
|
__decorateClass([
|
|
297
389
|
ddsProperty.property({ type: Array, attribute: false })
|
|
298
390
|
], exports.DaikinTable.prototype, "selection", 2);
|
|
@@ -29,6 +29,21 @@ export type HeaderType<T extends string = string> = {
|
|
|
29
29
|
* @slot cell:${rows[j].id}:${headers[i].key} - A slot for the data cell of a table. Use `daikin-table-cell` for the wrapper.
|
|
30
30
|
* @slot empty - A slot to define the content displayed when the table rows are empty. Typically, the `daikin-empty-state` component can be used.
|
|
31
31
|
*
|
|
32
|
+
* @csspart header - Targets the table header region.
|
|
33
|
+
* @csspart body - Targets the table body region.
|
|
34
|
+
* @csspart row - Targets all table rows.
|
|
35
|
+
* @csspart cell - Targets all table cells.
|
|
36
|
+
* @csspart row-${row.id} - Targets the specified body row.
|
|
37
|
+
* @csspart selected - Added to selected body rows and their body cells.
|
|
38
|
+
* @csspart odd - Added to body cells in odd-numbered rows (1st, 3rd, ...).
|
|
39
|
+
* @csspart checkbox-cell - Targets body cells in the selectable checkbox column.
|
|
40
|
+
* @csspart column-${header.key} - Targets both header and body cells for the specified column key. This is typically used to control a specific column's width and text wrapping. For example, you can allow the column to fit content by default, while enforcing min and max width: `daikin-table::part(column-name) { min-width: 12rem; max-width: 20rem; }` and optional truncation: `white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`.
|
|
41
|
+
*
|
|
42
|
+
* Background customization is also supported via CSS Parts. You can target an entire row (`row-${row.id} cell`), a specific column (`column-${header.key}`), or a row+column pair (`row-${row.id} column-${header.key}`), then apply design tokens for background colors. Example:
|
|
43
|
+
* `daikin-table::part(row-2 cell) { background-color: var(--dds-color-common-surface-danger-hover); }`
|
|
44
|
+
* `daikin-table::part(row-3 column-price) { background-color: var(--dds-color-common-warning); }`
|
|
45
|
+
* `daikin-table::part(row-2 cell):hover { background-color: var(--dds-color-common-surface-hover); }`
|
|
46
|
+
*
|
|
32
47
|
* @example
|
|
33
48
|
*
|
|
34
49
|
* ```js
|
|
@@ -38,7 +53,32 @@ export type HeaderType<T extends string = string> = {
|
|
|
38
53
|
* ```
|
|
39
54
|
*
|
|
40
55
|
* ```html
|
|
41
|
-
* <daikin-table
|
|
56
|
+
* <!-- Column width can be set on the slotted <daikin-table-header-cell>, or via daikin-table::part(column-${headers[i].key}). -->
|
|
57
|
+
* <style>
|
|
58
|
+
* daikin-table::part(column-price) {
|
|
59
|
+
* min-width: 8rem;
|
|
60
|
+
* max-width: 10rem;
|
|
61
|
+
* white-space: nowrap;
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* .table-status-color-sample::part(row-3 column-price) {
|
|
65
|
+
* background-color: var(--dds-color-common-warning);
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* .table-status-color-sample::part(row-2 row):hover {
|
|
69
|
+
* --row-2-hover-bg: var(--dds-color-common-surface-danger-press);
|
|
70
|
+
* }
|
|
71
|
+
*
|
|
72
|
+
* .table-status-color-sample::part(row-2 cell) {
|
|
73
|
+
* background-color: var(--row-2-hover-bg, var(--dds-color-common-surface-danger-hover));
|
|
74
|
+
* }
|
|
75
|
+
* </style>
|
|
76
|
+
*
|
|
77
|
+
* <daikin-table class="table-status-color-sample">
|
|
78
|
+
* <daikin-table-header-cell slot="header:name" style="min-width: 12rem; max-width: 20rem;">
|
|
79
|
+
* Name
|
|
80
|
+
* </daikin-table-header-cell>
|
|
81
|
+
*
|
|
42
82
|
* <!-- By using a slot, you can add a subtitle below the content in the name column for each row. -->
|
|
43
83
|
* <daikin-table-cell slot="cell:1:name">
|
|
44
84
|
* Apple
|
|
@@ -118,6 +158,23 @@ export declare class DaikinTable<T extends {
|
|
|
118
158
|
* When `true`, a sort button will be displayed to the right of each sortable header cell.
|
|
119
159
|
*/
|
|
120
160
|
sortable: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* The border style of the table row separators.
|
|
163
|
+
* - "none": Hide all table separator lines.
|
|
164
|
+
* - "underline": Show table separator lines.
|
|
165
|
+
*
|
|
166
|
+
* @default "underline"
|
|
167
|
+
*/
|
|
168
|
+
border: "none" | "underline";
|
|
169
|
+
/**
|
|
170
|
+
* Whether to keep the header row fixed while the body scrolls.
|
|
171
|
+
*
|
|
172
|
+
* When `true`, header cells become sticky relative to this component's
|
|
173
|
+
* nearest scroll container. This works with page scrolling, and also works
|
|
174
|
+
* with internal scrolling when the host has a constrained height and
|
|
175
|
+
* `overflow: auto`.
|
|
176
|
+
*/
|
|
177
|
+
stickyHeader: boolean;
|
|
121
178
|
/**
|
|
122
179
|
* An array of `id` values for the selected rows.
|
|
123
180
|
* When controlling this property externally, listen to the `change-check` event and read the updated `selection` from the component to keep your state in sync.
|
|
@@ -25,9 +25,9 @@ const cvaCell = classVarianceAuthority.cva(
|
|
|
25
25
|
"gap-1",
|
|
26
26
|
"justify-center",
|
|
27
27
|
"size-full",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"px-(--dds-space-400)",
|
|
29
|
+
"py-(--dds-padding-30)",
|
|
30
|
+
"text-(length:--dds-font-size-label-text)",
|
|
31
31
|
"text-ddt-color-common-text-primary",
|
|
32
32
|
"natural-break"
|
|
33
33
|
],
|
|
@@ -58,7 +58,6 @@ exports.DaikinTableCell.styles = lit.css`
|
|
|
58
58
|
:host {
|
|
59
59
|
display: block;
|
|
60
60
|
width: 100%;
|
|
61
|
-
min-height: 3rem;
|
|
62
61
|
}
|
|
63
62
|
`;
|
|
64
63
|
__decorateClass([
|
|
@@ -25,9 +25,10 @@ const cvaHeaderCell = classVarianceAuthority.cva(
|
|
|
25
25
|
"items-center",
|
|
26
26
|
"gap-2",
|
|
27
27
|
"size-full",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"px-(--dds-space-400)",
|
|
29
|
+
"py-(--dds-padding-30)",
|
|
30
|
+
"text-(length:--dds-font-size-label-text)",
|
|
31
|
+
"leading-normal",
|
|
31
32
|
"text-ddt-color-common-text-primary",
|
|
32
33
|
"font-bold",
|
|
33
34
|
"natural-break"
|
|
@@ -41,16 +42,7 @@ const cvaHeaderCell = classVarianceAuthority.cva(
|
|
|
41
42
|
},
|
|
42
43
|
sortable: {
|
|
43
44
|
false: [],
|
|
44
|
-
true: [
|
|
45
|
-
"hover:bg-ddt-color-common-surface-hover",
|
|
46
|
-
"active:bg-ddt-color-common-surface-press",
|
|
47
|
-
"focus-visible:outline-solid",
|
|
48
|
-
"focus-visible:outline-2",
|
|
49
|
-
"focus-visible:-outline-offset-2",
|
|
50
|
-
"focus-visible:outline-ddt-color-common-border-focus",
|
|
51
|
-
"after:flex-none",
|
|
52
|
-
"after:size-6"
|
|
53
|
-
]
|
|
45
|
+
true: ["after:flex-none", "after:size-(--dds-icon)"]
|
|
54
46
|
},
|
|
55
47
|
order: {
|
|
56
48
|
asc: [],
|
|
@@ -93,20 +85,34 @@ exports.DaikinTableHeaderCell = class DaikinTableHeaderCell extends ddsElement.D
|
|
|
93
85
|
(_a = this._focusableRef.value) == null ? void 0 : _a.focus(options);
|
|
94
86
|
}
|
|
95
87
|
render() {
|
|
88
|
+
const rootNode = this.getRootNode();
|
|
89
|
+
const rootHost = rootNode instanceof ShadowRoot ? rootNode.host : null;
|
|
90
|
+
const isInDaikinTable = !!this.closest("daikin-table") || (rootHost == null ? void 0 : rootHost.tagName) === "DAIKIN-TABLE";
|
|
96
91
|
const headerCellCN = cvaHeaderCell({
|
|
97
92
|
alignment: this.alignment,
|
|
98
93
|
sortable: this.sortable,
|
|
99
94
|
order: this.order === "asc" || this.order === "desc" ? this.order : null
|
|
100
95
|
});
|
|
96
|
+
const sortableInteractionCN = this.sortable && !isInDaikinTable ? "hover:bg-ddt-color-common-surface-hover active:bg-ddt-color-common-surface-press focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ddt-color-common-border-focus" : "";
|
|
97
|
+
const suppressNativeFocusRingCN = isInDaikinTable ? "focus:outline-none focus-visible:outline-none" : "";
|
|
101
98
|
const content = lit.html`<slot
|
|
102
99
|
name="left-icon"
|
|
103
|
-
class="flex-none slotted:flex-none icon-size-
|
|
100
|
+
class="flex-none slotted:flex-none icon-size-token"
|
|
104
101
|
></slot
|
|
105
102
|
><slot></slot>`;
|
|
106
103
|
return this.sortable ? lit.html`<button
|
|
107
104
|
${ref_js.ref(this._focusableRef)}
|
|
108
105
|
type="button"
|
|
109
|
-
class=${
|
|
106
|
+
class=${[
|
|
107
|
+
headerCellCN,
|
|
108
|
+
sortableInteractionCN,
|
|
109
|
+
suppressNativeFocusRingCN
|
|
110
|
+
].filter((className) => !!className).join(" ")}
|
|
111
|
+
@mousedown=${(event) => {
|
|
112
|
+
if (isInDaikinTable) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
}
|
|
115
|
+
}}
|
|
110
116
|
@click=${() => this.dispatchEvent(new Event("change-sort", { bubbles: true }))}
|
|
111
117
|
>
|
|
112
118
|
${content}
|