@daikin-oss/design-system-web-components 1.5.2 → 1.6.0-next.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 +89 -0
- package/custom-elements.json +4753 -2696
- package/dist/cjs/base/dds-element.cjs +3 -2
- package/dist/cjs/base/dds-form-element.d.cts +1 -0
- package/dist/cjs/base/dds-property.d.cts +2 -2
- package/dist/cjs/components/accordion/daikin-accordion.cjs +1 -0
- package/dist/cjs/components/accordion/daikin-accordion.d.cts +4 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +13 -11
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.cts +1 -1
- package/dist/cjs/components/badge/daikin-badge.cjs +72 -7
- package/dist/cjs/components/badge/daikin-badge.d.cts +25 -4
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +1 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +1 -4
- package/dist/cjs/components/button/daikin-button.cjs +4 -6
- package/dist/cjs/components/button/daikin-button.d.cts +2 -2
- package/dist/cjs/components/calendar/daikin-calendar.cjs +3 -1
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +2 -0
- package/dist/cjs/components/card-header/daikin-card-header.cjs +0 -2
- package/dist/cjs/components/carousel/daikin-carousel.d.cts +1 -0
- package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +3 -3
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +25 -5
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +9 -1
- package/dist/cjs/components/chip/daikin-chip.cjs +2 -4
- package/dist/cjs/components/chip/daikin-chip.d.cts +1 -0
- package/dist/cjs/components/combobox/daikin-combobox.cjs +11 -4
- package/dist/cjs/components/combobox/daikin-combobox.d.cts +3 -1
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +127 -62
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +19 -1
- package/dist/cjs/components/divider/daikin-divider.cjs +42 -0
- package/dist/cjs/components/divider/daikin-divider.d.cts +23 -0
- package/dist/cjs/components/divider/index.cjs +7 -0
- package/dist/cjs/components/divider/index.d.cts +1 -0
- package/dist/cjs/components/drawer/daikin-drawer.cjs +229 -0
- package/dist/cjs/components/drawer/daikin-drawer.d.cts +91 -0
- package/dist/cjs/components/drawer/index.cjs +7 -0
- package/dist/cjs/components/drawer/index.d.cts +1 -0
- package/dist/cjs/components/drawer-footer/daikin-drawer-footer.cjs +36 -0
- package/dist/cjs/components/drawer-footer/daikin-drawer-footer.d.cts +33 -0
- package/dist/cjs/components/drawer-footer/index.cjs +7 -0
- package/dist/cjs/components/drawer-footer/index.d.cts +1 -0
- package/dist/cjs/components/drawer-header/daikin-drawer-header.cjs +83 -0
- package/dist/cjs/components/drawer-header/daikin-drawer-header.d.cts +41 -0
- package/dist/cjs/components/drawer-header/index.cjs +7 -0
- package/dist/cjs/components/drawer-header/index.d.cts +1 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +11 -2
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +3 -1
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +0 -2
- package/dist/cjs/components/empty-state/daikin-empty-state.cjs +2 -2
- package/dist/cjs/components/icon/daikin-icon.cjs +1 -2
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +0 -1
- package/dist/cjs/components/index.cjs +35 -0
- package/dist/cjs/components/index.d.cts +7 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +1 -7
- package/dist/cjs/components/input-group/daikin-input-group.cjs +16 -11
- package/dist/cjs/components/link/daikin-link.cjs +26 -23
- package/dist/cjs/components/list/daikin-list.cjs +12 -0
- package/dist/cjs/components/list/daikin-list.d.cts +8 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +30 -9
- package/dist/cjs/components/menu/daikin-menu.cjs +85 -11
- package/dist/cjs/components/menu/daikin-menu.d.cts +23 -5
- package/dist/cjs/components/modal/daikin-modal.cjs +18 -1
- package/dist/cjs/components/modal/daikin-modal.d.cts +25 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +1 -1
- package/dist/cjs/components/modal-header/daikin-modal-header.cjs +0 -2
- package/dist/cjs/components/navigation/daikin-navigation.cjs +2 -1
- package/dist/cjs/components/navigation/daikin-navigation.d.cts +1 -0
- package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +6 -7
- package/dist/cjs/components/pagination/daikin-pagination.cjs +13 -6
- package/dist/cjs/components/pagination/daikin-pagination.d.cts +4 -1
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +2 -3
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +1 -1
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.cts +4 -4
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +7 -5
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +1 -1
- package/dist/cjs/components/radio/daikin-radio.cjs +14 -2
- package/dist/cjs/components/radio/daikin-radio.d.cts +1 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +2 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs/components/select/daikin-select.cjs +0 -1
- package/dist/cjs/components/slider/daikin-slider.cjs +14 -4
- package/dist/cjs/components/slider/daikin-slider.d.cts +1 -1
- package/dist/cjs/components/status-message/daikin-status-message.cjs +3 -4
- package/dist/cjs/components/tab/daikin-tab.cjs +0 -2
- package/dist/cjs/components/table/daikin-table.cjs +1 -1
- package/dist/cjs/components/table/daikin-table.d.cts +2 -0
- package/dist/cjs/components/tabs/daikin-tabs.d.cts +1 -0
- package/dist/cjs/components/tag/daikin-tag.cjs +1 -1
- package/dist/cjs/components/text-area/daikin-text-area.cjs +0 -1
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +1 -1
- package/dist/cjs/components/text-field/daikin-text-field.cjs +0 -1
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +1 -1
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +0 -1
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +1 -1
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +1 -1
- package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +1 -1
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +2 -3
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +1 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +2 -4
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +9 -2
- package/dist/cjs/components/tree/daikin-tree.cjs +2 -0
- package/dist/cjs/components/tree/daikin-tree.d.cts +4 -0
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +1 -2
- package/dist/cjs/components/tree-section/daikin-tree-section.cjs +7 -3
- package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +115 -0
- package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.d.cts +77 -0
- package/dist/cjs/components/vertical-navigation/index.cjs +7 -0
- package/dist/cjs/components/vertical-navigation/index.d.cts +1 -0
- package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +378 -0
- package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +121 -0
- package/dist/cjs/components/vertical-navigation-item/index.cjs +7 -0
- package/dist/cjs/components/vertical-navigation-item/index.d.cts +1 -0
- package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +176 -0
- package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +86 -0
- package/dist/cjs/components/vertical-navigation-menu-item/index.cjs +7 -0
- package/dist/cjs/components/vertical-navigation-menu-item/index.d.cts +1 -0
- package/dist/cjs/controllers/block-scroll.cjs +43 -0
- package/dist/cjs/controllers/block-scroll.d.cts +48 -0
- package/dist/cjs/controllers/focus-trap.cjs +33 -17
- package/dist/cjs/controllers/focus-trap.d.cts +1 -1
- package/dist/cjs/index.cjs +35 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/notification-common.cjs +1 -1
- package/dist/cjs-dev/base/dds-element.cjs +3 -2
- package/dist/cjs-dev/base/dds-form-element.d.cts +1 -0
- package/dist/cjs-dev/base/dds-property.d.cts +2 -2
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +1 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +4 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +13 -11
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.cts +1 -1
- package/dist/cjs-dev/components/badge/daikin-badge.cjs +72 -7
- package/dist/cjs-dev/components/badge/daikin-badge.d.cts +25 -4
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +1 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +1 -4
- package/dist/cjs-dev/components/button/daikin-button.cjs +4 -6
- package/dist/cjs-dev/components/button/daikin-button.d.cts +2 -2
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +3 -1
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +2 -0
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +0 -2
- package/dist/cjs-dev/components/carousel/daikin-carousel.d.cts +1 -0
- package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +3 -3
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +25 -5
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +9 -1
- package/dist/cjs-dev/components/chip/daikin-chip.cjs +2 -4
- package/dist/cjs-dev/components/chip/daikin-chip.d.cts +1 -0
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +11 -4
- package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +3 -1
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +127 -62
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +19 -1
- package/dist/cjs-dev/components/divider/daikin-divider.cjs +42 -0
- package/dist/cjs-dev/components/divider/daikin-divider.d.cts +23 -0
- package/dist/cjs-dev/components/divider/index.cjs +7 -0
- package/dist/cjs-dev/components/divider/index.d.cts +1 -0
- package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +229 -0
- package/dist/cjs-dev/components/drawer/daikin-drawer.d.cts +91 -0
- package/dist/cjs-dev/components/drawer/index.cjs +7 -0
- package/dist/cjs-dev/components/drawer/index.d.cts +1 -0
- package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.cjs +36 -0
- package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.d.cts +33 -0
- package/dist/cjs-dev/components/drawer-footer/index.cjs +7 -0
- package/dist/cjs-dev/components/drawer-footer/index.d.cts +1 -0
- package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.cjs +83 -0
- package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.d.cts +41 -0
- package/dist/cjs-dev/components/drawer-header/index.cjs +7 -0
- package/dist/cjs-dev/components/drawer-header/index.d.cts +1 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +11 -2
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +3 -1
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +0 -2
- package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +2 -2
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +1 -2
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +0 -1
- package/dist/cjs-dev/components/index.cjs +35 -0
- package/dist/cjs-dev/components/index.d.cts +7 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +1 -7
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +16 -11
- package/dist/cjs-dev/components/link/daikin-link.cjs +26 -23
- package/dist/cjs-dev/components/list/daikin-list.cjs +12 -0
- package/dist/cjs-dev/components/list/daikin-list.d.cts +8 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +30 -9
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +85 -11
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +23 -5
- package/dist/cjs-dev/components/modal/daikin-modal.cjs +18 -1
- package/dist/cjs-dev/components/modal/daikin-modal.d.cts +25 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +1 -1
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +0 -2
- package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +2 -1
- package/dist/cjs-dev/components/navigation/daikin-navigation.d.cts +1 -0
- package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +6 -7
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +13 -6
- package/dist/cjs-dev/components/pagination/daikin-pagination.d.cts +4 -1
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +2 -3
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +1 -1
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.cts +4 -4
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +7 -5
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +1 -1
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +14 -2
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +1 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +2 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs-dev/components/select/daikin-select.cjs +0 -1
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +14 -4
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +1 -1
- package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +3 -4
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +0 -2
- package/dist/cjs-dev/components/table/daikin-table.cjs +1 -1
- package/dist/cjs-dev/components/table/daikin-table.d.cts +2 -0
- package/dist/cjs-dev/components/tabs/daikin-tabs.d.cts +1 -0
- package/dist/cjs-dev/components/tag/daikin-tag.cjs +1 -1
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +0 -1
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +1 -1
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +0 -1
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +1 -1
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +0 -1
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +1 -1
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +1 -1
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +1 -1
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +2 -3
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +1 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +2 -4
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +9 -2
- package/dist/cjs-dev/components/tree/daikin-tree.cjs +2 -0
- package/dist/cjs-dev/components/tree/daikin-tree.d.cts +4 -0
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +1 -2
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +7 -3
- package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +127 -0
- package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.d.cts +77 -0
- package/dist/cjs-dev/components/vertical-navigation/index.cjs +7 -0
- package/dist/cjs-dev/components/vertical-navigation/index.d.cts +1 -0
- package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +378 -0
- package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +121 -0
- package/dist/cjs-dev/components/vertical-navigation-item/index.cjs +7 -0
- package/dist/cjs-dev/components/vertical-navigation-item/index.d.cts +1 -0
- package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +176 -0
- package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +86 -0
- package/dist/cjs-dev/components/vertical-navigation-menu-item/index.cjs +7 -0
- package/dist/cjs-dev/components/vertical-navigation-menu-item/index.d.cts +1 -0
- package/dist/cjs-dev/controllers/block-scroll.cjs +43 -0
- package/dist/cjs-dev/controllers/block-scroll.d.cts +48 -0
- package/dist/cjs-dev/controllers/focus-trap.cjs +33 -17
- package/dist/cjs-dev/controllers/focus-trap.d.cts +1 -1
- package/dist/cjs-dev/index.cjs +35 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/notification-common.cjs +1 -1
- package/dist/es/base/dds-element.js +3 -2
- package/dist/es/base/dds-form-element.d.ts +1 -0
- package/dist/es/base/dds-property.d.ts +2 -2
- package/dist/es/components/accordion/daikin-accordion.d.ts +4 -0
- package/dist/es/components/accordion/daikin-accordion.js +1 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +1 -1
- package/dist/es/components/accordion-item/daikin-accordion-item.js +13 -11
- package/dist/es/components/badge/daikin-badge.d.ts +25 -4
- package/dist/es/components/badge/daikin-badge.js +72 -7
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +1 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +1 -4
- package/dist/es/components/button/daikin-button.d.ts +2 -2
- package/dist/es/components/button/daikin-button.js +4 -6
- package/dist/es/components/calendar/daikin-calendar.d.ts +2 -0
- package/dist/es/components/calendar/daikin-calendar.js +3 -1
- package/dist/es/components/card-header/daikin-card-header.js +0 -2
- package/dist/es/components/carousel/daikin-carousel.d.ts +1 -0
- package/dist/es/components/carousel-item/daikin-carousel-item.js +3 -3
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +9 -1
- package/dist/es/components/checkbox/daikin-checkbox.js +25 -5
- package/dist/es/components/chip/daikin-chip.d.ts +1 -0
- package/dist/es/components/chip/daikin-chip.js +2 -4
- package/dist/es/components/combobox/daikin-combobox.d.ts +3 -1
- package/dist/es/components/combobox/daikin-combobox.js +11 -4
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +19 -1
- package/dist/es/components/date-picker/daikin-date-picker.js +127 -62
- package/dist/es/components/divider/daikin-divider.d.ts +23 -0
- package/dist/es/components/divider/daikin-divider.js +43 -0
- package/dist/es/components/divider/index.d.ts +1 -0
- package/dist/es/components/divider/index.js +4 -0
- package/dist/es/components/drawer/daikin-drawer.d.ts +91 -0
- package/dist/es/components/drawer/daikin-drawer.js +230 -0
- package/dist/es/components/drawer/index.d.ts +1 -0
- package/dist/es/components/drawer/index.js +4 -0
- package/dist/es/components/drawer-footer/daikin-drawer-footer.d.ts +33 -0
- package/dist/es/components/drawer-footer/daikin-drawer-footer.js +37 -0
- package/dist/es/components/drawer-footer/index.d.ts +1 -0
- package/dist/es/components/drawer-footer/index.js +4 -0
- package/dist/es/components/drawer-header/daikin-drawer-header.d.ts +41 -0
- package/dist/es/components/drawer-header/daikin-drawer-header.js +84 -0
- package/dist/es/components/drawer-header/index.d.ts +1 -0
- package/dist/es/components/drawer-header/index.js +4 -0
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +3 -1
- package/dist/es/components/dropdown/daikin-dropdown.js +11 -2
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +0 -2
- package/dist/es/components/empty-state/daikin-empty-state.js +2 -2
- package/dist/es/components/icon/daikin-icon.js +1 -2
- package/dist/es/components/icon-button/daikin-icon-button.js +0 -1
- package/dist/es/components/index.d.ts +7 -0
- package/dist/es/components/index.js +14 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.js +1 -7
- package/dist/es/components/input-group/daikin-input-group.js +16 -11
- package/dist/es/components/link/daikin-link.js +26 -23
- package/dist/es/components/list/daikin-list.d.ts +8 -0
- package/dist/es/components/list/daikin-list.js +13 -1
- package/dist/es/components/list-item/daikin-list-item.js +30 -9
- package/dist/es/components/menu/daikin-menu.d.ts +23 -5
- package/dist/es/components/menu/daikin-menu.js +85 -11
- package/dist/es/components/modal/daikin-modal.d.ts +25 -0
- package/dist/es/components/modal/daikin-modal.js +18 -1
- package/dist/es/components/modal-footer/daikin-modal-footer.js +1 -1
- package/dist/es/components/modal-header/daikin-modal-header.js +0 -2
- package/dist/es/components/navigation/daikin-navigation.d.ts +1 -0
- package/dist/es/components/navigation/daikin-navigation.js +2 -1
- package/dist/es/components/navigation-item/daikin-navigation-item.js +6 -7
- package/dist/es/components/pagination/daikin-pagination.d.ts +4 -1
- package/dist/es/components/pagination/daikin-pagination.js +13 -6
- package/dist/es/components/progress-bar/daikin-progress-bar.js +2 -3
- package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +4 -4
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +1 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +7 -5
- package/dist/es/components/radio/daikin-radio.d.ts +1 -0
- package/dist/es/components/radio/daikin-radio.js +14 -2
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es/components/radio-group/daikin-radio-group.js +2 -0
- package/dist/es/components/select/daikin-select.js +0 -1
- package/dist/es/components/slider/daikin-slider.d.ts +1 -1
- package/dist/es/components/slider/daikin-slider.js +14 -4
- package/dist/es/components/status-message/daikin-status-message.js +3 -4
- package/dist/es/components/tab/daikin-tab.js +0 -2
- package/dist/es/components/table/daikin-table.d.ts +2 -0
- package/dist/es/components/table/daikin-table.js +1 -1
- package/dist/es/components/tabs/daikin-tabs.d.ts +1 -0
- package/dist/es/components/tag/daikin-tag.js +1 -1
- package/dist/es/components/text-area/daikin-text-area.d.ts +1 -1
- package/dist/es/components/text-area/daikin-text-area.js +0 -1
- package/dist/es/components/text-field/daikin-text-field.d.ts +1 -1
- package/dist/es/components/text-field/daikin-text-field.js +0 -1
- package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +1 -1
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +0 -1
- package/dist/es/components/time-picker/daikin-time-picker.d.ts +1 -1
- package/dist/es/components/time-picker/daikin-time-picker.js +1 -1
- package/dist/es/components/toast-notification/daikin-toast-notification.js +2 -3
- package/dist/es/components/toggle/daikin-toggle.d.ts +1 -0
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +9 -2
- package/dist/es/components/tooltip/daikin-tooltip.js +2 -4
- package/dist/es/components/tree/daikin-tree.d.ts +4 -0
- package/dist/es/components/tree/daikin-tree.js +2 -0
- package/dist/es/components/tree-item/daikin-tree-item.js +1 -2
- package/dist/es/components/tree-section/daikin-tree-section.js +7 -3
- package/dist/es/components/vertical-navigation/daikin-vertical-navigation.d.ts +77 -0
- package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +116 -0
- package/dist/es/components/vertical-navigation/index.d.ts +1 -0
- package/dist/es/components/vertical-navigation/index.js +4 -0
- package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +121 -0
- package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +379 -0
- package/dist/es/components/vertical-navigation-item/index.d.ts +1 -0
- package/dist/es/components/vertical-navigation-item/index.js +4 -0
- package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +86 -0
- package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +177 -0
- package/dist/es/components/vertical-navigation-menu-item/index.d.ts +1 -0
- package/dist/es/components/vertical-navigation-menu-item/index.js +4 -0
- package/dist/es/controllers/block-scroll.d.ts +48 -0
- package/dist/es/controllers/block-scroll.js +43 -0
- package/dist/es/controllers/focus-trap.d.ts +1 -1
- package/dist/es/controllers/focus-trap.js +33 -17
- package/dist/es/index.js +14 -0
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/notification-common.js +1 -1
- package/dist/es-dev/base/dds-element.js +3 -2
- package/dist/es-dev/base/dds-form-element.d.ts +1 -0
- package/dist/es-dev/base/dds-property.d.ts +2 -2
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +4 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +1 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +1 -1
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +13 -11
- package/dist/es-dev/components/badge/daikin-badge.d.ts +25 -4
- package/dist/es-dev/components/badge/daikin-badge.js +72 -7
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +1 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +1 -4
- package/dist/es-dev/components/button/daikin-button.d.ts +2 -2
- package/dist/es-dev/components/button/daikin-button.js +4 -6
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +2 -0
- package/dist/es-dev/components/calendar/daikin-calendar.js +3 -1
- package/dist/es-dev/components/card-header/daikin-card-header.js +0 -2
- package/dist/es-dev/components/carousel/daikin-carousel.d.ts +1 -0
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +3 -3
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +9 -1
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +25 -5
- package/dist/es-dev/components/chip/daikin-chip.d.ts +1 -0
- package/dist/es-dev/components/chip/daikin-chip.js +2 -4
- package/dist/es-dev/components/combobox/daikin-combobox.d.ts +3 -1
- package/dist/es-dev/components/combobox/daikin-combobox.js +11 -4
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +19 -1
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +127 -62
- package/dist/es-dev/components/divider/daikin-divider.d.ts +23 -0
- package/dist/es-dev/components/divider/daikin-divider.js +43 -0
- package/dist/es-dev/components/divider/index.d.ts +1 -0
- package/dist/es-dev/components/divider/index.js +4 -0
- package/dist/es-dev/components/drawer/daikin-drawer.d.ts +91 -0
- package/dist/es-dev/components/drawer/daikin-drawer.js +230 -0
- package/dist/es-dev/components/drawer/index.d.ts +1 -0
- package/dist/es-dev/components/drawer/index.js +4 -0
- package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.d.ts +33 -0
- package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.js +37 -0
- package/dist/es-dev/components/drawer-footer/index.d.ts +1 -0
- package/dist/es-dev/components/drawer-footer/index.js +4 -0
- package/dist/es-dev/components/drawer-header/daikin-drawer-header.d.ts +41 -0
- package/dist/es-dev/components/drawer-header/daikin-drawer-header.js +84 -0
- package/dist/es-dev/components/drawer-header/index.d.ts +1 -0
- package/dist/es-dev/components/drawer-header/index.js +4 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +3 -1
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +11 -2
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +0 -2
- package/dist/es-dev/components/empty-state/daikin-empty-state.js +2 -2
- package/dist/es-dev/components/icon/daikin-icon.js +1 -2
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +0 -1
- package/dist/es-dev/components/index.d.ts +7 -0
- package/dist/es-dev/components/index.js +14 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +1 -7
- package/dist/es-dev/components/input-group/daikin-input-group.js +16 -11
- package/dist/es-dev/components/link/daikin-link.js +26 -23
- package/dist/es-dev/components/list/daikin-list.d.ts +8 -0
- package/dist/es-dev/components/list/daikin-list.js +13 -1
- package/dist/es-dev/components/list-item/daikin-list-item.js +30 -9
- package/dist/es-dev/components/menu/daikin-menu.d.ts +23 -5
- package/dist/es-dev/components/menu/daikin-menu.js +85 -11
- package/dist/es-dev/components/modal/daikin-modal.d.ts +25 -0
- package/dist/es-dev/components/modal/daikin-modal.js +18 -1
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +1 -1
- package/dist/es-dev/components/modal-header/daikin-modal-header.js +0 -2
- package/dist/es-dev/components/navigation/daikin-navigation.d.ts +1 -0
- package/dist/es-dev/components/navigation/daikin-navigation.js +2 -1
- package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +6 -7
- package/dist/es-dev/components/pagination/daikin-pagination.d.ts +4 -1
- package/dist/es-dev/components/pagination/daikin-pagination.js +13 -6
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +2 -3
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +4 -4
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +1 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +7 -5
- package/dist/es-dev/components/radio/daikin-radio.d.ts +1 -0
- package/dist/es-dev/components/radio/daikin-radio.js +14 -2
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +2 -0
- package/dist/es-dev/components/select/daikin-select.js +0 -1
- package/dist/es-dev/components/slider/daikin-slider.d.ts +1 -1
- package/dist/es-dev/components/slider/daikin-slider.js +14 -4
- package/dist/es-dev/components/status-message/daikin-status-message.js +3 -4
- package/dist/es-dev/components/tab/daikin-tab.js +0 -2
- package/dist/es-dev/components/table/daikin-table.d.ts +2 -0
- package/dist/es-dev/components/table/daikin-table.js +1 -1
- package/dist/es-dev/components/tabs/daikin-tabs.d.ts +1 -0
- package/dist/es-dev/components/tag/daikin-tag.js +1 -1
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +1 -1
- package/dist/es-dev/components/text-area/daikin-text-area.js +0 -1
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +1 -1
- package/dist/es-dev/components/text-field/daikin-text-field.js +0 -1
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +1 -1
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +0 -1
- package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +1 -1
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +1 -1
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +2 -3
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +1 -0
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +9 -2
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +2 -4
- package/dist/es-dev/components/tree/daikin-tree.d.ts +4 -0
- package/dist/es-dev/components/tree/daikin-tree.js +2 -0
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -2
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +7 -3
- package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.d.ts +77 -0
- package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +128 -0
- package/dist/es-dev/components/vertical-navigation/index.d.ts +1 -0
- package/dist/es-dev/components/vertical-navigation/index.js +4 -0
- package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +121 -0
- package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +379 -0
- package/dist/es-dev/components/vertical-navigation-item/index.d.ts +1 -0
- package/dist/es-dev/components/vertical-navigation-item/index.js +4 -0
- package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +86 -0
- package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +177 -0
- package/dist/es-dev/components/vertical-navigation-menu-item/index.d.ts +1 -0
- package/dist/es-dev/components/vertical-navigation-menu-item/index.js +4 -0
- package/dist/es-dev/controllers/block-scroll.d.ts +48 -0
- package/dist/es-dev/controllers/block-scroll.js +43 -0
- package/dist/es-dev/controllers/focus-trap.d.ts +1 -1
- package/dist/es-dev/controllers/focus-trap.js +33 -17
- package/dist/es-dev/index.js +14 -0
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/notification-common.js +1 -1
- package/package.json +3 -3
|
@@ -40,9 +40,7 @@ const cvaInput = classVarianceAuthority.cva(
|
|
|
40
40
|
"pr-16",
|
|
41
41
|
"rounded-sm",
|
|
42
42
|
"overflow-hidden",
|
|
43
|
-
"font-daikinSerif",
|
|
44
43
|
"text-left",
|
|
45
|
-
"leading-[130%]",
|
|
46
44
|
"relative",
|
|
47
45
|
"outline-solid",
|
|
48
46
|
"outline-1",
|
|
@@ -82,8 +80,6 @@ const cvaOption = classVarianceAuthority.cva(
|
|
|
82
80
|
"size-full",
|
|
83
81
|
"min-h-12",
|
|
84
82
|
"p-3",
|
|
85
|
-
"font-daikinSerif",
|
|
86
|
-
"leading-[130%]",
|
|
87
83
|
"text-left",
|
|
88
84
|
"relative",
|
|
89
85
|
"data-focus:outline-solid",
|
|
@@ -542,6 +538,17 @@ exports.DaikinCombobox = class DaikinCombobox extends ddsFormElement.DDSFormElem
|
|
|
542
538
|
this.focus();
|
|
543
539
|
}
|
|
544
540
|
}
|
|
541
|
+
if (changedProperties.has("open")) {
|
|
542
|
+
const wasOpen = changedProperties.get("open");
|
|
543
|
+
if (wasOpen !== void 0) {
|
|
544
|
+
this.dispatchEvent(
|
|
545
|
+
new ToggleEvent("toggle", {
|
|
546
|
+
oldState: wasOpen ? "open" : "closed",
|
|
547
|
+
newState: this.open ? "open" : "closed"
|
|
548
|
+
})
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
545
552
|
if (changedProperties.has("_currentFocusItemIndex")) {
|
|
546
553
|
const focusedItem = this.renderRoot.querySelector("[data-focus]");
|
|
547
554
|
focusedItem == null ? void 0 : focusedItem.scrollIntoView({ block: "nearest" });
|
|
@@ -23,10 +23,11 @@ export declare function defaultFilterFn(items: readonly ComboboxItem[], value: s
|
|
|
23
23
|
* @attr value - The initial form value, submitted as a name/value pair when submitting the form.
|
|
24
24
|
* @prop {String} formAttr - The form the component belongs to.
|
|
25
25
|
* @prop {String} name - The form name, submitted as a name/value pair when submitting the form.
|
|
26
|
-
* @prop {String} value - The form value, submitted as a name/value pair when submitting the form.
|
|
26
|
+
* @prop {String} value - The form value, submitted as a name/value pair when submitting the form. To keep external state in sync, listen to the `change` event.
|
|
27
27
|
*
|
|
28
28
|
* @fires change - A custom event emitted when a user selects a combobox item or inputs a custom value.
|
|
29
29
|
* @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event). Triggered when the user types in the input field, clicks clear button, or selects from dropdown options.
|
|
30
|
+
* @fires toggle - A custom event emitted when the combobox menu opens or closes.
|
|
30
31
|
*
|
|
31
32
|
* @example
|
|
32
33
|
*
|
|
@@ -63,6 +64,7 @@ export declare class DaikinCombobox extends DDSFormElement {
|
|
|
63
64
|
error: boolean;
|
|
64
65
|
/**
|
|
65
66
|
* Whether the combobox menu is opened.
|
|
67
|
+
* When controlling this property externally, listen to the `toggle` event and sync your state based on `event.newState` to keep it in sync.
|
|
66
68
|
*/
|
|
67
69
|
open: boolean;
|
|
68
70
|
/**
|
|
@@ -29,28 +29,62 @@ var __decorateClass = (decorators2, target, key, kind) => {
|
|
|
29
29
|
if (kind && result) __defProp(target, key, result);
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
const dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
|
|
33
|
+
function getSafeDateTimeFormatParts(locale) {
|
|
34
|
+
const options = {
|
|
35
|
+
year: "numeric",
|
|
36
|
+
month: "numeric",
|
|
37
|
+
day: "numeric"
|
|
38
|
+
};
|
|
39
|
+
const key = locale ?? "__DEFAULT__";
|
|
40
|
+
const cached = dateTimeFormatPartsCache.get(key);
|
|
41
|
+
if (cached) return cached;
|
|
42
|
+
try {
|
|
43
|
+
const parts = new Intl.DateTimeFormat(
|
|
44
|
+
locale ?? void 0,
|
|
45
|
+
options
|
|
46
|
+
).formatToParts(0);
|
|
47
|
+
dateTimeFormatPartsCache.set(key, parts);
|
|
48
|
+
return parts;
|
|
49
|
+
} catch {
|
|
50
|
+
const parts = new Intl.DateTimeFormat(void 0, options).formatToParts(0);
|
|
51
|
+
dateTimeFormatPartsCache.set(key, parts);
|
|
52
|
+
return parts;
|
|
44
53
|
}
|
|
45
|
-
|
|
54
|
+
}
|
|
55
|
+
function getDateOrderAndSeparator(locale) {
|
|
56
|
+
const parts = getSafeDateTimeFormatParts(locale ?? void 0);
|
|
57
|
+
const order = parts.filter(
|
|
58
|
+
(p) => ["year", "month", "day"].includes(p.type)
|
|
59
|
+
).map((p) => p.type);
|
|
60
|
+
const literals = parts.filter((p) => p.type === "literal");
|
|
61
|
+
const sep = literals.length >= 2 && literals[0].value === literals[1].value ? literals[0].value : "/";
|
|
62
|
+
const requiredParts = ["year", "month", "day"];
|
|
63
|
+
const isValidOrder = order.length === 3 && requiredParts.every((part) => order.includes(part));
|
|
64
|
+
const isValidSep = sep.length > 0 && /^\D+$/.test(sep);
|
|
65
|
+
if (!isValidOrder || !isValidSep) {
|
|
66
|
+
return {
|
|
67
|
+
order: ["month", "day", "year"],
|
|
68
|
+
sep: "/"
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return { order, sep };
|
|
72
|
+
}
|
|
73
|
+
function getDateItems(locale) {
|
|
74
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
75
|
+
const lengths = { year: 4, month: 2, day: 2 };
|
|
76
|
+
const items = order.map((key, i) => {
|
|
77
|
+
const type = key;
|
|
78
|
+
const len = lengths[type];
|
|
79
|
+
const start = order.slice(0, i).reduce((sum, k) => sum + lengths[k], 0) + i * sep.length;
|
|
80
|
+
const end = start + len;
|
|
81
|
+
return { type, range: [start, end] };
|
|
82
|
+
});
|
|
83
|
+
return items;
|
|
84
|
+
}
|
|
46
85
|
const PLACEHOLDER_YEAR = "YYYY";
|
|
47
86
|
const PLACEHOLDER_MONTH = "MM";
|
|
48
87
|
const PLACEHOLDER_DAY = "DD";
|
|
49
|
-
const PLACEHOLDER_ALL = formatPartsForUI({
|
|
50
|
-
year: PLACEHOLDER_YEAR,
|
|
51
|
-
month: PLACEHOLDER_MONTH,
|
|
52
|
-
day: PLACEHOLDER_DAY
|
|
53
|
-
});
|
|
54
88
|
const cvaField = classVarianceAuthority.cva(
|
|
55
89
|
[
|
|
56
90
|
"flex",
|
|
@@ -94,15 +128,25 @@ const cvaField = classVarianceAuthority.cva(
|
|
|
94
128
|
}
|
|
95
129
|
}
|
|
96
130
|
);
|
|
97
|
-
function parsePartsFromUIValue(value) {
|
|
98
|
-
const
|
|
99
|
-
|
|
131
|
+
function parsePartsFromUIValue(value, locale) {
|
|
132
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
133
|
+
const parts = value.split(sep);
|
|
134
|
+
return Object.fromEntries(
|
|
135
|
+
order.map((key, i) => [key, parts[i] ?? ""])
|
|
136
|
+
);
|
|
100
137
|
}
|
|
101
|
-
function formatPartsForUI(
|
|
102
|
-
|
|
138
|
+
function formatPartsForUI(parts, locale) {
|
|
139
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
140
|
+
return order.map((k) => parts[k]).join(sep);
|
|
103
141
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
142
|
+
function getPlaceholderAll(locale) {
|
|
143
|
+
return formatPartsForUI(
|
|
144
|
+
{ year: PLACEHOLDER_YEAR, month: PLACEHOLDER_MONTH, day: PLACEHOLDER_DAY },
|
|
145
|
+
locale
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function tryParseDateFromUIValue(value, locale) {
|
|
149
|
+
const { year, month, day } = parsePartsFromUIValue(value, locale);
|
|
106
150
|
if (
|
|
107
151
|
// Prevent treating incomplete year entries (such as 0202) as valid.
|
|
108
152
|
// This also means that dates less than 1000 years ago cannot be handled.
|
|
@@ -116,15 +160,18 @@ function tryParseDateFromUIValue(value) {
|
|
|
116
160
|
}
|
|
117
161
|
return date;
|
|
118
162
|
}
|
|
119
|
-
function formatDateForUI(date) {
|
|
120
|
-
return formatPartsForUI(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
163
|
+
function formatDateForUI(date, locale) {
|
|
164
|
+
return formatPartsForUI(
|
|
165
|
+
{
|
|
166
|
+
year: String(date.getUTCFullYear()).padStart(4, "0"),
|
|
167
|
+
month: String(date.getUTCMonth() + 1).padStart(2, "0"),
|
|
168
|
+
day: String(date.getUTCDate()).padStart(2, "0")
|
|
169
|
+
},
|
|
170
|
+
locale
|
|
171
|
+
);
|
|
125
172
|
}
|
|
126
|
-
function getDateItemInSelection(selectionStart, selectionEnd) {
|
|
127
|
-
for (const { type, range } of
|
|
173
|
+
function getDateItemInSelection(selectionStart, selectionEnd, locale) {
|
|
174
|
+
for (const { type, range } of getDateItems(locale)) {
|
|
128
175
|
if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
|
|
129
176
|
return type;
|
|
130
177
|
}
|
|
@@ -239,12 +286,21 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
239
286
|
this.error = false;
|
|
240
287
|
this.open = false;
|
|
241
288
|
this.defaultValue = null;
|
|
289
|
+
this.locale = null;
|
|
242
290
|
this._label = null;
|
|
243
291
|
this._currentSelection = "month";
|
|
244
292
|
this._autoUpdateController = new floatingUiAutoUpdate.FloatingUIAutoUpdateController(this);
|
|
245
293
|
this._dateInputElement = ref_js.createRef();
|
|
246
294
|
this._calendarElement = ref_js.createRef();
|
|
247
295
|
this._calendarButtonElement = ref_js.createRef();
|
|
296
|
+
this._getLocale = () => this.locale ?? null;
|
|
297
|
+
this._getDateItems = () => getDateItems(this._getLocale());
|
|
298
|
+
this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
|
|
299
|
+
this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
|
|
300
|
+
this._tryParseDateFromUIValue = (v) => tryParseDateFromUIValue(v, this._getLocale());
|
|
301
|
+
this._formatDateForUI = (d) => formatDateForUI(d, this._getLocale());
|
|
302
|
+
this._getPlaceholderAll = () => getPlaceholderAll(this._getLocale());
|
|
303
|
+
this._getDateItemInSelection = (s, e) => getDateItemInSelection(s, e, this._getLocale());
|
|
248
304
|
this._ignoreCloseByFocusTrap = false;
|
|
249
305
|
this._handleCloseCalendar = () => {
|
|
250
306
|
var _a;
|
|
@@ -258,6 +314,9 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
258
314
|
);
|
|
259
315
|
this.label = null;
|
|
260
316
|
}
|
|
317
|
+
static getDefaultPlaceholder(element) {
|
|
318
|
+
return getPlaceholderAll(element._getLocale());
|
|
319
|
+
}
|
|
261
320
|
get _value() {
|
|
262
321
|
return calendarCommon.tryParseDateFromProperty(this.value);
|
|
263
322
|
}
|
|
@@ -288,7 +347,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
288
347
|
}
|
|
289
348
|
_handleFocusOut(event) {
|
|
290
349
|
const target = event.target;
|
|
291
|
-
if (target.value ===
|
|
350
|
+
if (target.value === this._getPlaceholderAll()) {
|
|
292
351
|
target.value = "";
|
|
293
352
|
}
|
|
294
353
|
}
|
|
@@ -300,11 +359,11 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
300
359
|
event.preventDefault();
|
|
301
360
|
const selectionStart = ((_a = this._dateInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
|
|
302
361
|
const selectionEnd = ((_b = this._dateInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
|
|
303
|
-
const dateItemInSelection =
|
|
362
|
+
const dateItemInSelection = this._getDateItemInSelection(
|
|
304
363
|
selectionStart,
|
|
305
364
|
selectionEnd
|
|
306
365
|
);
|
|
307
|
-
if (event.target.value ===
|
|
366
|
+
if (event.target.value === this._getPlaceholderAll() && !dateItemInSelection) {
|
|
308
367
|
this._updateSelection("month");
|
|
309
368
|
return;
|
|
310
369
|
}
|
|
@@ -318,7 +377,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
318
377
|
}
|
|
319
378
|
const target = event.target;
|
|
320
379
|
const key = event.key;
|
|
321
|
-
const parts =
|
|
380
|
+
const parts = this._parsePartsFromUIValue(target.value);
|
|
322
381
|
if (key === "Backspace") {
|
|
323
382
|
event.preventDefault();
|
|
324
383
|
const itemToRemove = this._currentSelection;
|
|
@@ -328,7 +387,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
328
387
|
day: PLACEHOLDER_DAY
|
|
329
388
|
}[itemToRemove];
|
|
330
389
|
if (parts[itemToRemove] !== placeholder) {
|
|
331
|
-
target.value =
|
|
390
|
+
target.value = this._formatPartsForUI({
|
|
332
391
|
...parts,
|
|
333
392
|
[itemToRemove]: placeholder
|
|
334
393
|
});
|
|
@@ -341,13 +400,14 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
341
400
|
event.preventDefault();
|
|
342
401
|
const newState = handleDigitInput(parts, this._currentSelection, key);
|
|
343
402
|
if (newState) {
|
|
344
|
-
target.value =
|
|
345
|
-
const
|
|
403
|
+
target.value = this._formatPartsForUI(newState.parts);
|
|
404
|
+
const items = this._getDateItems();
|
|
405
|
+
const currentIndex = items.findIndex(
|
|
346
406
|
({ type }) => type === this._currentSelection
|
|
347
407
|
);
|
|
348
|
-
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1,
|
|
408
|
+
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, items.length - 1) : -1;
|
|
349
409
|
this._updateSelection(
|
|
350
|
-
newState.done && nextIndex >= 0 ?
|
|
410
|
+
newState.done && nextIndex >= 0 ? items[nextIndex].type : this._currentSelection
|
|
351
411
|
);
|
|
352
412
|
}
|
|
353
413
|
this._updateValue(event);
|
|
@@ -359,14 +419,12 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
359
419
|
}[key];
|
|
360
420
|
if (moveOffset) {
|
|
361
421
|
event.preventDefault();
|
|
362
|
-
const
|
|
422
|
+
const items = this._getDateItems();
|
|
423
|
+
const currentIndex = items.findIndex(
|
|
363
424
|
({ type }) => type === this._currentSelection
|
|
364
425
|
);
|
|
365
|
-
const newIndex = currentIndex >= 0 ? Math.min(
|
|
366
|
-
|
|
367
|
-
DATE_ITEMS.length - 1
|
|
368
|
-
) : 0;
|
|
369
|
-
this._updateSelection(DATE_ITEMS[newIndex].type);
|
|
426
|
+
const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), items.length - 1) : 0;
|
|
427
|
+
this._updateSelection(items[newIndex].type);
|
|
370
428
|
return;
|
|
371
429
|
}
|
|
372
430
|
const countOffset = {
|
|
@@ -384,7 +442,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
384
442
|
this._max
|
|
385
443
|
);
|
|
386
444
|
if (newParts) {
|
|
387
|
-
target.value =
|
|
445
|
+
target.value = this._formatPartsForUI(newParts);
|
|
388
446
|
this._updateSelection(this._currentSelection);
|
|
389
447
|
}
|
|
390
448
|
this._updateValue(event);
|
|
@@ -410,7 +468,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
410
468
|
const target = this._dateInputElement.value;
|
|
411
469
|
const value = calendarCommon.parseDateFromProperty(calendar.value);
|
|
412
470
|
this.value = calendarCommon.formatDateForProperty(value);
|
|
413
|
-
target.value =
|
|
471
|
+
target.value = this._formatDateForUI(value);
|
|
414
472
|
this.error = false;
|
|
415
473
|
if (event.type === "select") {
|
|
416
474
|
this.open = false;
|
|
@@ -448,11 +506,11 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
448
506
|
}
|
|
449
507
|
_updateValue(event) {
|
|
450
508
|
const target = event.target;
|
|
451
|
-
if (target.value ===
|
|
509
|
+
if (target.value === this._getPlaceholderAll()) {
|
|
452
510
|
this.error = false;
|
|
453
511
|
return;
|
|
454
512
|
}
|
|
455
|
-
const newDate =
|
|
513
|
+
const newDate = this._tryParseDateFromUIValue(target.value);
|
|
456
514
|
if (!newDate || calendarCommon.isDateOutOfRange(newDate, this._min, this._max)) {
|
|
457
515
|
this.error = true;
|
|
458
516
|
return;
|
|
@@ -469,9 +527,9 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
469
527
|
return;
|
|
470
528
|
}
|
|
471
529
|
if (target.value === "") {
|
|
472
|
-
target.value =
|
|
530
|
+
target.value = this._getPlaceholderAll();
|
|
473
531
|
}
|
|
474
|
-
const itemInfo =
|
|
532
|
+
const itemInfo = this._getDateItems()[0];
|
|
475
533
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
476
534
|
itemInfo.range[0],
|
|
477
535
|
itemInfo.range[1]
|
|
@@ -484,7 +542,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
484
542
|
if (!selection) {
|
|
485
543
|
return;
|
|
486
544
|
}
|
|
487
|
-
const itemInfo =
|
|
545
|
+
const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
|
|
488
546
|
if (itemInfo) {
|
|
489
547
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
490
548
|
itemInfo.range[0],
|
|
@@ -505,7 +563,7 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
505
563
|
const min = this._min;
|
|
506
564
|
const max = this._max;
|
|
507
565
|
return lit.html`<div
|
|
508
|
-
class="size-full relative
|
|
566
|
+
class="size-full relative"
|
|
509
567
|
${this._autoUpdateController.refReference()}
|
|
510
568
|
>
|
|
511
569
|
<input
|
|
@@ -513,12 +571,12 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
513
571
|
class=${cvaField({ error: this.error })}
|
|
514
572
|
type="text"
|
|
515
573
|
name=${ifDefined_js.ifDefined(this.getBackingProperty("name"))}
|
|
516
|
-
placeholder=${ifDefined_js.ifDefined(this.
|
|
574
|
+
placeholder=${ifDefined_js.ifDefined(this.placeholder)}
|
|
517
575
|
aria-label=${ifDefined_js.ifDefined(this._label ?? this.label ?? "Date Picker")}
|
|
518
576
|
?disabled=${this.disabled}
|
|
519
577
|
?readonly=${this.readonly}
|
|
520
578
|
?required=${this.required}
|
|
521
|
-
.value=${this._value ?
|
|
579
|
+
.value=${this._value ? this._formatDateForUI(this._value) : ""}
|
|
522
580
|
@change=${this._handleChange}
|
|
523
581
|
@focusin=${this._handleFocusIn}
|
|
524
582
|
@focusout=${this._handleFocusOut}
|
|
@@ -540,6 +598,9 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
540
598
|
>
|
|
541
599
|
<span class=${calendarCommon.cvaIconButton({ intent: "calender" })}></span>
|
|
542
600
|
</daikin-icon-button>
|
|
601
|
+
<span class="sr-only" aria-live="polite"
|
|
602
|
+
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
603
|
+
</span>
|
|
543
604
|
</div>
|
|
544
605
|
<daikin-calendar
|
|
545
606
|
${ref_js.ref(this._calendarElement)}
|
|
@@ -557,9 +618,6 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
|
|
|
557
618
|
${this._autoUpdateController.refFloating()}
|
|
558
619
|
>
|
|
559
620
|
</daikin-calendar>
|
|
560
|
-
<span class="sr-only" aria-live="polite"
|
|
561
|
-
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
562
|
-
</span>
|
|
563
621
|
${// Activate auto update only when the tooltip is open.
|
|
564
622
|
// TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
|
|
565
623
|
guard_js.guard(
|
|
@@ -638,7 +696,11 @@ exports.DaikinDatePicker.styles = lit.css`
|
|
|
638
696
|
}
|
|
639
697
|
`;
|
|
640
698
|
__decorateClass([
|
|
641
|
-
ddsProperty.property({
|
|
699
|
+
ddsProperty.property({
|
|
700
|
+
type: String,
|
|
701
|
+
reflect: true,
|
|
702
|
+
fallbackValue: exports.DaikinDatePicker.getDefaultPlaceholder
|
|
703
|
+
})
|
|
642
704
|
], exports.DaikinDatePicker.prototype, "placeholder", 2);
|
|
643
705
|
__decorateClass([
|
|
644
706
|
ddsProperty.property({ type: String, reflect: true, fallbackValue: "1900-01-01" })
|
|
@@ -664,6 +726,9 @@ __decorateClass([
|
|
|
664
726
|
__decorateClass([
|
|
665
727
|
ddsProperty.property({ type: String, reflect: true, attribute: "default-value" })
|
|
666
728
|
], exports.DaikinDatePicker.prototype, "defaultValue", 2);
|
|
729
|
+
__decorateClass([
|
|
730
|
+
ddsProperty.property({ type: String, reflect: true })
|
|
731
|
+
], exports.DaikinDatePicker.prototype, "locale", 2);
|
|
667
732
|
__decorateClass([
|
|
668
733
|
decorators_js.state()
|
|
669
734
|
], exports.DaikinDatePicker.prototype, "_label", 2);
|
|
@@ -9,9 +9,10 @@ import { DaikinInputGroup } from "../input-group/daikin-input-group.cjs";
|
|
|
9
9
|
* @attr value - The initial form value, submitted as a name/value pair when submitting the form.
|
|
10
10
|
* @prop {String} formAttr - The form the component belongs to.
|
|
11
11
|
* @prop {String} name - The form name, submitted as a name/value pair when submitting the form.
|
|
12
|
-
* @prop {String} value - The form value, submitted as a name/value pair when submitting the form.
|
|
12
|
+
* @prop {String} value - The form value, submitted as a name/value pair when submitting the form. To keep external state in sync, listen to the `select` event.
|
|
13
13
|
*
|
|
14
14
|
* @fires select - Fires when the date is selected.
|
|
15
|
+
* @fires toggle - A custom event emitted when the calendar picker opens or closes.
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
*
|
|
@@ -25,6 +26,7 @@ import { DaikinInputGroup } from "../input-group/daikin-input-group.cjs";
|
|
|
25
26
|
*/
|
|
26
27
|
export declare class DaikinDatePicker extends DDSFormElement {
|
|
27
28
|
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
private static getDefaultPlaceholder;
|
|
28
30
|
/**
|
|
29
31
|
* The placeholder text.
|
|
30
32
|
*/
|
|
@@ -63,6 +65,7 @@ export declare class DaikinDatePicker extends DDSFormElement {
|
|
|
63
65
|
error: boolean;
|
|
64
66
|
/**
|
|
65
67
|
* Whether the date picker is open.
|
|
68
|
+
* When controlling this property externally, listen to the `toggle` event and sync your state based on `event.newState` to keep it in sync.
|
|
66
69
|
*/
|
|
67
70
|
open: boolean;
|
|
68
71
|
/**
|
|
@@ -70,6 +73,13 @@ export declare class DaikinDatePicker extends DDSFormElement {
|
|
|
70
73
|
* If there is a `value` attribute, this is ignored.
|
|
71
74
|
*/
|
|
72
75
|
defaultValue: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* The locale used for date formatting.
|
|
78
|
+
* If not provided, the browser's default locale will be used. It is usually not necessary to specify it explicitly.
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
locale: string | null;
|
|
73
83
|
/**
|
|
74
84
|
* The label text used as the value of aria-label.
|
|
75
85
|
* Set automatically by `reflectInputGroup` method.
|
|
@@ -80,6 +90,14 @@ export declare class DaikinDatePicker extends DDSFormElement {
|
|
|
80
90
|
private _dateInputElement;
|
|
81
91
|
private _calendarElement;
|
|
82
92
|
private _calendarButtonElement;
|
|
93
|
+
private _getLocale;
|
|
94
|
+
private _getDateItems;
|
|
95
|
+
private _parsePartsFromUIValue;
|
|
96
|
+
private _formatPartsForUI;
|
|
97
|
+
private _tryParseDateFromUIValue;
|
|
98
|
+
private _formatDateForUI;
|
|
99
|
+
private _getPlaceholderAll;
|
|
100
|
+
private _getDateItemInSelection;
|
|
83
101
|
private get _value();
|
|
84
102
|
private get _min();
|
|
85
103
|
private get _max();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const ddsElement = require("../../base/dds-element.cjs");
|
|
6
|
+
require("../../base/dds-form-element.cjs");
|
|
7
|
+
require("lit/decorators.js");
|
|
8
|
+
const decorators = require("../../base/decorators.cjs");
|
|
9
|
+
require("../../base/define.cjs");
|
|
10
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators2, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators2.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators2[i])
|
|
16
|
+
result = decorator(result) || result;
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const DIVIDER_CLASS_NAME = classVarianceAuthority.cva([
|
|
20
|
+
"w-full",
|
|
21
|
+
"m-0",
|
|
22
|
+
"border-t",
|
|
23
|
+
"border-ddt-color-divider"
|
|
24
|
+
])();
|
|
25
|
+
exports.DaikinDivider = class DaikinDivider extends ddsElement.DDSElement {
|
|
26
|
+
render() {
|
|
27
|
+
return lit.html`<hr
|
|
28
|
+
class=${DIVIDER_CLASS_NAME}
|
|
29
|
+
aria-orientation="horizontal"
|
|
30
|
+
/>`;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.DaikinDivider.styles = lit.css`
|
|
34
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
35
|
+
|
|
36
|
+
:host {
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
exports.DaikinDivider = __decorateClass([
|
|
41
|
+
decorators.ddsElement("daikin-divider")
|
|
42
|
+
], exports.DaikinDivider);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DDSElement } from "../../base/index.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* The divider is a UI element that represents a thematic break between paragraph-level elements. It can be used to separate content in a list, or to divide sections of a page.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import "@daikin-oss/design-system-web-components/components/divider/index.js";
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <daikin-divider></daikin-divider>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class DaikinDivider extends DDSElement {
|
|
16
|
+
static readonly styles: import('lit').CSSResult;
|
|
17
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
"daikin-divider": DaikinDivider;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-divider.cjs";
|