@daikin-oss/design-system-web-components 1.5.2 → 1.6.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 +178 -0
- package/custom-elements.json +4499 -2442
- 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
|
@@ -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
|
/**
|
|
@@ -38,9 +38,7 @@ const cvaInput = cva(
|
|
|
38
38
|
"pr-16",
|
|
39
39
|
"rounded-sm",
|
|
40
40
|
"overflow-hidden",
|
|
41
|
-
"font-daikinSerif",
|
|
42
41
|
"text-left",
|
|
43
|
-
"leading-[130%]",
|
|
44
42
|
"relative",
|
|
45
43
|
"outline-solid",
|
|
46
44
|
"outline-1",
|
|
@@ -80,8 +78,6 @@ const cvaOption = cva(
|
|
|
80
78
|
"size-full",
|
|
81
79
|
"min-h-12",
|
|
82
80
|
"p-3",
|
|
83
|
-
"font-daikinSerif",
|
|
84
|
-
"leading-[130%]",
|
|
85
81
|
"text-left",
|
|
86
82
|
"relative",
|
|
87
83
|
"data-focus:outline-solid",
|
|
@@ -540,6 +536,17 @@ let DaikinCombobox = class extends DDSFormElement {
|
|
|
540
536
|
this.focus();
|
|
541
537
|
}
|
|
542
538
|
}
|
|
539
|
+
if (changedProperties.has("open")) {
|
|
540
|
+
const wasOpen = changedProperties.get("open");
|
|
541
|
+
if (wasOpen !== void 0) {
|
|
542
|
+
this.dispatchEvent(
|
|
543
|
+
new ToggleEvent("toggle", {
|
|
544
|
+
oldState: wasOpen ? "open" : "closed",
|
|
545
|
+
newState: this.open ? "open" : "closed"
|
|
546
|
+
})
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
543
550
|
if (changedProperties.has("_currentFocusItemIndex")) {
|
|
544
551
|
const focusedItem = this.renderRoot.querySelector("[data-focus]");
|
|
545
552
|
focusedItem == null ? void 0 : focusedItem.scrollIntoView({ block: "nearest" });
|
|
@@ -9,9 +9,10 @@ import { DaikinInputGroup } from "../input-group/daikin-input-group.js";
|
|
|
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.js";
|
|
|
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();
|
|
@@ -27,28 +27,62 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
27
27
|
if (kind && result) __defProp(target, key, result);
|
|
28
28
|
return result;
|
|
29
29
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
const dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
|
|
31
|
+
function getSafeDateTimeFormatParts(locale) {
|
|
32
|
+
const options = {
|
|
33
|
+
year: "numeric",
|
|
34
|
+
month: "numeric",
|
|
35
|
+
day: "numeric"
|
|
36
|
+
};
|
|
37
|
+
const key = locale ?? "__DEFAULT__";
|
|
38
|
+
const cached = dateTimeFormatPartsCache.get(key);
|
|
39
|
+
if (cached) return cached;
|
|
40
|
+
try {
|
|
41
|
+
const parts = new Intl.DateTimeFormat(
|
|
42
|
+
locale ?? void 0,
|
|
43
|
+
options
|
|
44
|
+
).formatToParts(0);
|
|
45
|
+
dateTimeFormatPartsCache.set(key, parts);
|
|
46
|
+
return parts;
|
|
47
|
+
} catch {
|
|
48
|
+
const parts = new Intl.DateTimeFormat(void 0, options).formatToParts(0);
|
|
49
|
+
dateTimeFormatPartsCache.set(key, parts);
|
|
50
|
+
return parts;
|
|
42
51
|
}
|
|
43
|
-
|
|
52
|
+
}
|
|
53
|
+
function getDateOrderAndSeparator(locale) {
|
|
54
|
+
const parts = getSafeDateTimeFormatParts(locale ?? void 0);
|
|
55
|
+
const order = parts.filter(
|
|
56
|
+
(p) => ["year", "month", "day"].includes(p.type)
|
|
57
|
+
).map((p) => p.type);
|
|
58
|
+
const literals = parts.filter((p) => p.type === "literal");
|
|
59
|
+
const sep = literals.length >= 2 && literals[0].value === literals[1].value ? literals[0].value : "/";
|
|
60
|
+
const requiredParts = ["year", "month", "day"];
|
|
61
|
+
const isValidOrder = order.length === 3 && requiredParts.every((part) => order.includes(part));
|
|
62
|
+
const isValidSep = sep.length > 0 && /^\D+$/.test(sep);
|
|
63
|
+
if (!isValidOrder || !isValidSep) {
|
|
64
|
+
return {
|
|
65
|
+
order: ["month", "day", "year"],
|
|
66
|
+
sep: "/"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return { order, sep };
|
|
70
|
+
}
|
|
71
|
+
function getDateItems(locale) {
|
|
72
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
73
|
+
const lengths = { year: 4, month: 2, day: 2 };
|
|
74
|
+
const items = order.map((key, i) => {
|
|
75
|
+
const type = key;
|
|
76
|
+
const len = lengths[type];
|
|
77
|
+
const start = order.slice(0, i).reduce((sum, k) => sum + lengths[k], 0) + i * sep.length;
|
|
78
|
+
const end = start + len;
|
|
79
|
+
return { type, range: [start, end] };
|
|
80
|
+
});
|
|
81
|
+
return items;
|
|
82
|
+
}
|
|
44
83
|
const PLACEHOLDER_YEAR = "YYYY";
|
|
45
84
|
const PLACEHOLDER_MONTH = "MM";
|
|
46
85
|
const PLACEHOLDER_DAY = "DD";
|
|
47
|
-
const PLACEHOLDER_ALL = formatPartsForUI({
|
|
48
|
-
year: PLACEHOLDER_YEAR,
|
|
49
|
-
month: PLACEHOLDER_MONTH,
|
|
50
|
-
day: PLACEHOLDER_DAY
|
|
51
|
-
});
|
|
52
86
|
const cvaField = cva(
|
|
53
87
|
[
|
|
54
88
|
"flex",
|
|
@@ -92,15 +126,25 @@ const cvaField = cva(
|
|
|
92
126
|
}
|
|
93
127
|
}
|
|
94
128
|
);
|
|
95
|
-
function parsePartsFromUIValue(value) {
|
|
96
|
-
const
|
|
97
|
-
|
|
129
|
+
function parsePartsFromUIValue(value, locale) {
|
|
130
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
131
|
+
const parts = value.split(sep);
|
|
132
|
+
return Object.fromEntries(
|
|
133
|
+
order.map((key, i) => [key, parts[i] ?? ""])
|
|
134
|
+
);
|
|
98
135
|
}
|
|
99
|
-
function formatPartsForUI(
|
|
100
|
-
|
|
136
|
+
function formatPartsForUI(parts, locale) {
|
|
137
|
+
const { order, sep } = getDateOrderAndSeparator(locale);
|
|
138
|
+
return order.map((k) => parts[k]).join(sep);
|
|
101
139
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
140
|
+
function getPlaceholderAll(locale) {
|
|
141
|
+
return formatPartsForUI(
|
|
142
|
+
{ year: PLACEHOLDER_YEAR, month: PLACEHOLDER_MONTH, day: PLACEHOLDER_DAY },
|
|
143
|
+
locale
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function tryParseDateFromUIValue(value, locale) {
|
|
147
|
+
const { year, month, day } = parsePartsFromUIValue(value, locale);
|
|
104
148
|
if (
|
|
105
149
|
// Prevent treating incomplete year entries (such as 0202) as valid.
|
|
106
150
|
// This also means that dates less than 1000 years ago cannot be handled.
|
|
@@ -114,15 +158,18 @@ function tryParseDateFromUIValue(value) {
|
|
|
114
158
|
}
|
|
115
159
|
return date;
|
|
116
160
|
}
|
|
117
|
-
function formatDateForUI(date) {
|
|
118
|
-
return formatPartsForUI(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
161
|
+
function formatDateForUI(date, locale) {
|
|
162
|
+
return formatPartsForUI(
|
|
163
|
+
{
|
|
164
|
+
year: String(date.getUTCFullYear()).padStart(4, "0"),
|
|
165
|
+
month: String(date.getUTCMonth() + 1).padStart(2, "0"),
|
|
166
|
+
day: String(date.getUTCDate()).padStart(2, "0")
|
|
167
|
+
},
|
|
168
|
+
locale
|
|
169
|
+
);
|
|
123
170
|
}
|
|
124
|
-
function getDateItemInSelection(selectionStart, selectionEnd) {
|
|
125
|
-
for (const { type, range } of
|
|
171
|
+
function getDateItemInSelection(selectionStart, selectionEnd, locale) {
|
|
172
|
+
for (const { type, range } of getDateItems(locale)) {
|
|
126
173
|
if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
|
|
127
174
|
return type;
|
|
128
175
|
}
|
|
@@ -237,12 +284,21 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
237
284
|
this.error = false;
|
|
238
285
|
this.open = false;
|
|
239
286
|
this.defaultValue = null;
|
|
287
|
+
this.locale = null;
|
|
240
288
|
this._label = null;
|
|
241
289
|
this._currentSelection = "month";
|
|
242
290
|
this._autoUpdateController = new FloatingUIAutoUpdateController(this);
|
|
243
291
|
this._dateInputElement = createRef();
|
|
244
292
|
this._calendarElement = createRef();
|
|
245
293
|
this._calendarButtonElement = createRef();
|
|
294
|
+
this._getLocale = () => this.locale ?? null;
|
|
295
|
+
this._getDateItems = () => getDateItems(this._getLocale());
|
|
296
|
+
this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
|
|
297
|
+
this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
|
|
298
|
+
this._tryParseDateFromUIValue = (v) => tryParseDateFromUIValue(v, this._getLocale());
|
|
299
|
+
this._formatDateForUI = (d) => formatDateForUI(d, this._getLocale());
|
|
300
|
+
this._getPlaceholderAll = () => getPlaceholderAll(this._getLocale());
|
|
301
|
+
this._getDateItemInSelection = (s, e) => getDateItemInSelection(s, e, this._getLocale());
|
|
246
302
|
this._ignoreCloseByFocusTrap = false;
|
|
247
303
|
this._handleCloseCalendar = () => {
|
|
248
304
|
var _a;
|
|
@@ -256,6 +312,9 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
256
312
|
);
|
|
257
313
|
this.label = null;
|
|
258
314
|
}
|
|
315
|
+
static getDefaultPlaceholder(element) {
|
|
316
|
+
return getPlaceholderAll(element._getLocale());
|
|
317
|
+
}
|
|
259
318
|
get _value() {
|
|
260
319
|
return tryParseDateFromProperty(this.value);
|
|
261
320
|
}
|
|
@@ -286,7 +345,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
286
345
|
}
|
|
287
346
|
_handleFocusOut(event) {
|
|
288
347
|
const target = event.target;
|
|
289
|
-
if (target.value ===
|
|
348
|
+
if (target.value === this._getPlaceholderAll()) {
|
|
290
349
|
target.value = "";
|
|
291
350
|
}
|
|
292
351
|
}
|
|
@@ -298,11 +357,11 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
298
357
|
event.preventDefault();
|
|
299
358
|
const selectionStart = ((_a = this._dateInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
|
|
300
359
|
const selectionEnd = ((_b = this._dateInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
|
|
301
|
-
const dateItemInSelection =
|
|
360
|
+
const dateItemInSelection = this._getDateItemInSelection(
|
|
302
361
|
selectionStart,
|
|
303
362
|
selectionEnd
|
|
304
363
|
);
|
|
305
|
-
if (event.target.value ===
|
|
364
|
+
if (event.target.value === this._getPlaceholderAll() && !dateItemInSelection) {
|
|
306
365
|
this._updateSelection("month");
|
|
307
366
|
return;
|
|
308
367
|
}
|
|
@@ -316,7 +375,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
316
375
|
}
|
|
317
376
|
const target = event.target;
|
|
318
377
|
const key = event.key;
|
|
319
|
-
const parts =
|
|
378
|
+
const parts = this._parsePartsFromUIValue(target.value);
|
|
320
379
|
if (key === "Backspace") {
|
|
321
380
|
event.preventDefault();
|
|
322
381
|
const itemToRemove = this._currentSelection;
|
|
@@ -326,7 +385,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
326
385
|
day: PLACEHOLDER_DAY
|
|
327
386
|
}[itemToRemove];
|
|
328
387
|
if (parts[itemToRemove] !== placeholder) {
|
|
329
|
-
target.value =
|
|
388
|
+
target.value = this._formatPartsForUI({
|
|
330
389
|
...parts,
|
|
331
390
|
[itemToRemove]: placeholder
|
|
332
391
|
});
|
|
@@ -339,13 +398,14 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
339
398
|
event.preventDefault();
|
|
340
399
|
const newState = handleDigitInput(parts, this._currentSelection, key);
|
|
341
400
|
if (newState) {
|
|
342
|
-
target.value =
|
|
343
|
-
const
|
|
401
|
+
target.value = this._formatPartsForUI(newState.parts);
|
|
402
|
+
const items = this._getDateItems();
|
|
403
|
+
const currentIndex = items.findIndex(
|
|
344
404
|
({ type }) => type === this._currentSelection
|
|
345
405
|
);
|
|
346
|
-
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1,
|
|
406
|
+
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, items.length - 1) : -1;
|
|
347
407
|
this._updateSelection(
|
|
348
|
-
newState.done && nextIndex >= 0 ?
|
|
408
|
+
newState.done && nextIndex >= 0 ? items[nextIndex].type : this._currentSelection
|
|
349
409
|
);
|
|
350
410
|
}
|
|
351
411
|
this._updateValue(event);
|
|
@@ -357,14 +417,12 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
357
417
|
}[key];
|
|
358
418
|
if (moveOffset) {
|
|
359
419
|
event.preventDefault();
|
|
360
|
-
const
|
|
420
|
+
const items = this._getDateItems();
|
|
421
|
+
const currentIndex = items.findIndex(
|
|
361
422
|
({ type }) => type === this._currentSelection
|
|
362
423
|
);
|
|
363
|
-
const newIndex = currentIndex >= 0 ? Math.min(
|
|
364
|
-
|
|
365
|
-
DATE_ITEMS.length - 1
|
|
366
|
-
) : 0;
|
|
367
|
-
this._updateSelection(DATE_ITEMS[newIndex].type);
|
|
424
|
+
const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), items.length - 1) : 0;
|
|
425
|
+
this._updateSelection(items[newIndex].type);
|
|
368
426
|
return;
|
|
369
427
|
}
|
|
370
428
|
const countOffset = {
|
|
@@ -382,7 +440,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
382
440
|
this._max
|
|
383
441
|
);
|
|
384
442
|
if (newParts) {
|
|
385
|
-
target.value =
|
|
443
|
+
target.value = this._formatPartsForUI(newParts);
|
|
386
444
|
this._updateSelection(this._currentSelection);
|
|
387
445
|
}
|
|
388
446
|
this._updateValue(event);
|
|
@@ -408,7 +466,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
408
466
|
const target = this._dateInputElement.value;
|
|
409
467
|
const value = parseDateFromProperty(calendar.value);
|
|
410
468
|
this.value = formatDateForProperty(value);
|
|
411
|
-
target.value =
|
|
469
|
+
target.value = this._formatDateForUI(value);
|
|
412
470
|
this.error = false;
|
|
413
471
|
if (event.type === "select") {
|
|
414
472
|
this.open = false;
|
|
@@ -446,11 +504,11 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
446
504
|
}
|
|
447
505
|
_updateValue(event) {
|
|
448
506
|
const target = event.target;
|
|
449
|
-
if (target.value ===
|
|
507
|
+
if (target.value === this._getPlaceholderAll()) {
|
|
450
508
|
this.error = false;
|
|
451
509
|
return;
|
|
452
510
|
}
|
|
453
|
-
const newDate =
|
|
511
|
+
const newDate = this._tryParseDateFromUIValue(target.value);
|
|
454
512
|
if (!newDate || isDateOutOfRange(newDate, this._min, this._max)) {
|
|
455
513
|
this.error = true;
|
|
456
514
|
return;
|
|
@@ -467,9 +525,9 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
467
525
|
return;
|
|
468
526
|
}
|
|
469
527
|
if (target.value === "") {
|
|
470
|
-
target.value =
|
|
528
|
+
target.value = this._getPlaceholderAll();
|
|
471
529
|
}
|
|
472
|
-
const itemInfo =
|
|
530
|
+
const itemInfo = this._getDateItems()[0];
|
|
473
531
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
474
532
|
itemInfo.range[0],
|
|
475
533
|
itemInfo.range[1]
|
|
@@ -482,7 +540,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
482
540
|
if (!selection) {
|
|
483
541
|
return;
|
|
484
542
|
}
|
|
485
|
-
const itemInfo =
|
|
543
|
+
const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
|
|
486
544
|
if (itemInfo) {
|
|
487
545
|
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
488
546
|
itemInfo.range[0],
|
|
@@ -503,7 +561,7 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
503
561
|
const min = this._min;
|
|
504
562
|
const max = this._max;
|
|
505
563
|
return html`<div
|
|
506
|
-
class="size-full relative
|
|
564
|
+
class="size-full relative"
|
|
507
565
|
${this._autoUpdateController.refReference()}
|
|
508
566
|
>
|
|
509
567
|
<input
|
|
@@ -511,12 +569,12 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
511
569
|
class=${cvaField({ error: this.error })}
|
|
512
570
|
type="text"
|
|
513
571
|
name=${ifDefined(this.getBackingProperty("name"))}
|
|
514
|
-
placeholder=${ifDefined(this.
|
|
572
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
515
573
|
aria-label=${ifDefined(this._label ?? this.label ?? "Date Picker")}
|
|
516
574
|
?disabled=${this.disabled}
|
|
517
575
|
?readonly=${this.readonly}
|
|
518
576
|
?required=${this.required}
|
|
519
|
-
.value=${this._value ?
|
|
577
|
+
.value=${this._value ? this._formatDateForUI(this._value) : ""}
|
|
520
578
|
@change=${this._handleChange}
|
|
521
579
|
@focusin=${this._handleFocusIn}
|
|
522
580
|
@focusout=${this._handleFocusOut}
|
|
@@ -538,6 +596,9 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
538
596
|
>
|
|
539
597
|
<span class=${cvaIconButton({ intent: "calender" })}></span>
|
|
540
598
|
</daikin-icon-button>
|
|
599
|
+
<span class="sr-only" aria-live="polite"
|
|
600
|
+
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
601
|
+
</span>
|
|
541
602
|
</div>
|
|
542
603
|
<daikin-calendar
|
|
543
604
|
${ref(this._calendarElement)}
|
|
@@ -555,9 +616,6 @@ let DaikinDatePicker = class extends DDSFormElement {
|
|
|
555
616
|
${this._autoUpdateController.refFloating()}
|
|
556
617
|
>
|
|
557
618
|
</daikin-calendar>
|
|
558
|
-
<span class="sr-only" aria-live="polite"
|
|
559
|
-
>${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
|
|
560
|
-
</span>
|
|
561
619
|
${// Activate auto update only when the tooltip is open.
|
|
562
620
|
// TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
|
|
563
621
|
guard(
|
|
@@ -636,7 +694,11 @@ DaikinDatePicker.styles = css`
|
|
|
636
694
|
}
|
|
637
695
|
`;
|
|
638
696
|
__decorateClass([
|
|
639
|
-
property({
|
|
697
|
+
property({
|
|
698
|
+
type: String,
|
|
699
|
+
reflect: true,
|
|
700
|
+
fallbackValue: DaikinDatePicker.getDefaultPlaceholder
|
|
701
|
+
})
|
|
640
702
|
], DaikinDatePicker.prototype, "placeholder", 2);
|
|
641
703
|
__decorateClass([
|
|
642
704
|
property({ type: String, reflect: true, fallbackValue: "1900-01-01" })
|
|
@@ -662,6 +724,9 @@ __decorateClass([
|
|
|
662
724
|
__decorateClass([
|
|
663
725
|
property({ type: String, reflect: true, attribute: "default-value" })
|
|
664
726
|
], DaikinDatePicker.prototype, "defaultValue", 2);
|
|
727
|
+
__decorateClass([
|
|
728
|
+
property({ type: String, reflect: true })
|
|
729
|
+
], DaikinDatePicker.prototype, "locale", 2);
|
|
665
730
|
__decorateClass([
|
|
666
731
|
state()
|
|
667
732
|
], DaikinDatePicker.prototype, "_label", 2);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DDSElement } from "../../base/index.js";
|
|
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,43 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { unsafeCSS, css, html } from "lit";
|
|
3
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
4
|
+
import "../../base/dds-form-element.js";
|
|
5
|
+
import "lit/decorators.js";
|
|
6
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
7
|
+
import "../../base/define.js";
|
|
8
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = decorator(result) || result;
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
const DIVIDER_CLASS_NAME = cva([
|
|
18
|
+
"w-full",
|
|
19
|
+
"m-0",
|
|
20
|
+
"border-t",
|
|
21
|
+
"border-ddt-color-divider"
|
|
22
|
+
])();
|
|
23
|
+
let DaikinDivider = class extends DDSElement {
|
|
24
|
+
render() {
|
|
25
|
+
return html`<hr
|
|
26
|
+
class=${DIVIDER_CLASS_NAME}
|
|
27
|
+
aria-orientation="horizontal"
|
|
28
|
+
/>`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
DaikinDivider.styles = css`
|
|
32
|
+
${unsafeCSS(tailwindStyles)}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
DaikinDivider = __decorateClass([
|
|
39
|
+
ddsElement("daikin-divider")
|
|
40
|
+
], DaikinDivider);
|
|
41
|
+
export {
|
|
42
|
+
DaikinDivider
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-divider.js";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { DDSElement } from "../../base/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* `daikin-drawer` is an overlay panel that slides in from the edge of the screen. It is used to display content without navigating away from the current page, providing a smooth user experience. The drawer can be placed at the top, right, bottom, or left of the screen and can contain a header, body, and footer. When the drawer is open, it traps focus within itself and prevents background content from scrolling.
|
|
4
|
+
*
|
|
5
|
+
* ### Scroll Lock
|
|
6
|
+
*
|
|
7
|
+
* When the drawer is open, it sets the CSS custom property `--ddc-scroll-lock: hidden` on the `<html>` element and removes it when the drawer is closed.
|
|
8
|
+
* To enable scroll locking, add the following CSS. If you use a custom scroll container instead of `body`, replace the selector accordingly:
|
|
9
|
+
*
|
|
10
|
+
* ```css
|
|
11
|
+
* body {
|
|
12
|
+
* overflow: var(--ddc-scroll-lock, auto);
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* When no drawer is open, `--ddc-scroll-lock` is absent and the fallback value (`auto`) takes effect.
|
|
17
|
+
* When a drawer opens, it is set to `hidden`, locking scroll on every element that uses it.
|
|
18
|
+
*
|
|
19
|
+
* ## Multiple drawers and modals
|
|
20
|
+
*
|
|
21
|
+
* If multiple `daikin-drawer` or `daikin-modal` instances are open at the same time, the component tracks them with an internal reference count.
|
|
22
|
+
* `--ddc-scroll-lock` is only removed from `<html>` once **every** open drawer or modal has been closed — closing one drawer or modal while others remain open will not unlock scroll.
|
|
23
|
+
* This means your CSS declaration requires no extra logic to handle concurrent drawers or modals correctly.
|
|
24
|
+
*
|
|
25
|
+
* > **Note:** The `--ddc-scroll-lock` property is set on `<html>` and inherits through the entire document,
|
|
26
|
+
* > so the CSS declaration above works on any element regardless of its position in the DOM tree.
|
|
27
|
+
*
|
|
28
|
+
* Hierarchy:
|
|
29
|
+
* - `daikin-drawer` > `daikin-drawer-header`
|
|
30
|
+
* - `daikin-drawer` > `daikin-drawer-footer`
|
|
31
|
+
*
|
|
32
|
+
* @slot - A slot for drawer header, body, drawer footer. Place `daikin-drawer-header`, custom body content, `daikin-drawer-footer` here in order.
|
|
33
|
+
*
|
|
34
|
+
* @fires close - A custom event emitted when the drawer is closed, including when a user clicks the header close button, clicks the backdrop, or dismisses the drawer with the Escape key.
|
|
35
|
+
*
|
|
36
|
+
* @csspart drawer - CSS styles applied to the drawer panel container. By default, the panel uses content-based content width fit or height fit and is clamped by responsive min/max width and height constraints so it does not touch the viewport edges. Use `::part(drawer)` to customize its width, height, or padding; the built-in min/max constraints remain in effect unless you override them with more specific rules.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
*
|
|
40
|
+
* ```js
|
|
41
|
+
* import "@daikin-oss/design-system-web-components/components/drawer/index.js";
|
|
42
|
+
* import "@daikin-oss/design-system-web-components/components/drawer-footer/index.js";
|
|
43
|
+
* import "@daikin-oss/design-system-web-components/components/drawer-header/index.js";
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* ```html
|
|
47
|
+
* <daikin-drawer>
|
|
48
|
+
* <daikin-drawer-header>
|
|
49
|
+
* <span>Drawer Title</span>
|
|
50
|
+
* </daikin-drawer-header>
|
|
51
|
+
* <p>Drawer body.</p>
|
|
52
|
+
* <daikin-drawer-footer>
|
|
53
|
+
* <daikin-button size="small">Button</daikin-button>
|
|
54
|
+
* </daikin-drawer-footer>
|
|
55
|
+
* </daikin-drawer>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare class DaikinDrawer extends DDSElement {
|
|
59
|
+
static styles: import('lit').CSSResult;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the drawer is open.
|
|
62
|
+
* When controlling this property externally, listen to the `close` event and set your state to `false` to keep it in sync.
|
|
63
|
+
*/
|
|
64
|
+
open: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* ARIA role of the drawer. Choose the appropriate role for your drawer based on its usage scenario.
|
|
67
|
+
*
|
|
68
|
+
* @default "dialog"
|
|
69
|
+
*/
|
|
70
|
+
drawerRole: "dialog" | "alertdialog";
|
|
71
|
+
/**
|
|
72
|
+
* The aria-label of the drawer.
|
|
73
|
+
*/
|
|
74
|
+
drawerAriaLabel: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* The placement of the drawer. The default value is `right`, which means the drawer will slide in from the right side of the screen. You can set it to `top`, `bottom`, or `left` to have the drawer slide in from the corresponding side.
|
|
77
|
+
* Note: The slide-in animation is based on CSS transform, so it can still work when the drawer is placed at the top or bottom of the screen, providing a smooth user experience.
|
|
78
|
+
* @default "right"
|
|
79
|
+
*/
|
|
80
|
+
placement: "top" | "right" | "bottom" | "left";
|
|
81
|
+
private readonly _blockScrollController;
|
|
82
|
+
private readonly _handleClose;
|
|
83
|
+
private readonly _focusTrapController;
|
|
84
|
+
private readonly _handleBackdropClick;
|
|
85
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
86
|
+
}
|
|
87
|
+
declare global {
|
|
88
|
+
interface HTMLElementTagNameMap {
|
|
89
|
+
"daikin-drawer": DaikinDrawer;
|
|
90
|
+
}
|
|
91
|
+
}
|