@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
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { unsafeCSS, css, html, nothing } from "lit";
|
|
3
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
4
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
6
|
+
import "../../base/dds-form-element.js";
|
|
7
|
+
import { property, oneOf } from "../../base/dds-property.js";
|
|
8
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
9
|
+
import "../../base/define.js";
|
|
10
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
11
|
+
import "../badge/daikin-badge.js";
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result) __defProp(target, key, result);
|
|
20
|
+
return result;
|
|
21
|
+
};
|
|
22
|
+
const cvaHeader = cva(
|
|
23
|
+
[
|
|
24
|
+
"flex",
|
|
25
|
+
"relative",
|
|
26
|
+
"items-start",
|
|
27
|
+
"gap-2",
|
|
28
|
+
"w-full",
|
|
29
|
+
"min-h-12",
|
|
30
|
+
"px-4",
|
|
31
|
+
"py-3",
|
|
32
|
+
"font-bold",
|
|
33
|
+
"text-left",
|
|
34
|
+
"natural-break"
|
|
35
|
+
],
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
type: {
|
|
39
|
+
link: [
|
|
40
|
+
"focus-visible:outline-hidden",
|
|
41
|
+
"focus-visible:before:absolute",
|
|
42
|
+
"focus-visible:before:-inset-1",
|
|
43
|
+
"focus-visible:before:z-1",
|
|
44
|
+
"focus-visible:before:border-2",
|
|
45
|
+
"focus-visible:before:border-ddt-color-common-border-focus"
|
|
46
|
+
],
|
|
47
|
+
menu: [
|
|
48
|
+
"focus-visible:outline-hidden",
|
|
49
|
+
"focus-visible:before:absolute",
|
|
50
|
+
"focus-visible:before:-inset-1",
|
|
51
|
+
"focus-visible:before:z-1",
|
|
52
|
+
"focus-visible:before:border-2",
|
|
53
|
+
"focus-visible:before:border-ddt-color-common-border-focus"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
disabled: {
|
|
57
|
+
false: ["text-ddt-color-common-neutral-default"],
|
|
58
|
+
true: ["text-ddt-color-common-disabled"]
|
|
59
|
+
},
|
|
60
|
+
current: {
|
|
61
|
+
false: [],
|
|
62
|
+
true: []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
compoundVariants: [
|
|
66
|
+
{
|
|
67
|
+
type: ["link", "menu"],
|
|
68
|
+
disabled: false,
|
|
69
|
+
class: [
|
|
70
|
+
"hover:text-ddt-color-common-neutral-hover",
|
|
71
|
+
"active:text-ddt-color-common-neutral-press"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "menu",
|
|
76
|
+
disabled: false,
|
|
77
|
+
class: ["cursor-pointer"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "link",
|
|
81
|
+
disabled: true,
|
|
82
|
+
class: ["pointer-events-none"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: ["link", "menu"],
|
|
86
|
+
disabled: false,
|
|
87
|
+
current: false,
|
|
88
|
+
class: [
|
|
89
|
+
"link-enabled:hover:bg-ddt-color-common-surface-hover",
|
|
90
|
+
"link-enabled:active:bg-ddt-color-common-surface-press"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: ["link", "menu"],
|
|
95
|
+
disabled: false,
|
|
96
|
+
current: true,
|
|
97
|
+
class: [
|
|
98
|
+
"link-enabled:hover:bg-ddt-color-common-surface-brand-hover",
|
|
99
|
+
"link-enabled:active:bg-ddt-color-common-surface-brand-press"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
const cvaChevron = cva(
|
|
106
|
+
["size-6", "transition-all", "icon-[daikin--chevron-down]", "flex-none"],
|
|
107
|
+
{
|
|
108
|
+
variants: {
|
|
109
|
+
open: {
|
|
110
|
+
false: ["rotate-0"],
|
|
111
|
+
true: ["rotate-180"]
|
|
112
|
+
},
|
|
113
|
+
disabled: {
|
|
114
|
+
false: [],
|
|
115
|
+
true: ["text-ddt-color-common-disabled"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
const cvaIndicator = cva(["absolute", "left-0", "inset-y-0", "w-1", "z-1"], {
|
|
121
|
+
variants: {
|
|
122
|
+
disabled: {
|
|
123
|
+
false: ["bg-ddt-color-common-brand-default"],
|
|
124
|
+
true: ["bg-ddt-color-common-disabled"]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const cvaContent = cva(["grid", "duration-150", "ease-in-out"], {
|
|
129
|
+
variants: {
|
|
130
|
+
open: {
|
|
131
|
+
false: ["grid-rows-[0fr]"],
|
|
132
|
+
true: ["grid-rows-[1fr]", "pb-1"]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
let DaikinVerticalNavigationItem = class extends DDSElement {
|
|
137
|
+
constructor() {
|
|
138
|
+
super();
|
|
139
|
+
this._triggerRef = createRef();
|
|
140
|
+
this.href = null;
|
|
141
|
+
this.open = false;
|
|
142
|
+
this.current = false;
|
|
143
|
+
this.badgeMessage = null;
|
|
144
|
+
this.disabled = false;
|
|
145
|
+
this.addEventListener("click", (event) => {
|
|
146
|
+
if (this.disabled || this.type === "link" && this.href == null) {
|
|
147
|
+
event.stopImmediatePropagation();
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* _Internal use._
|
|
153
|
+
* Returns the navigation target information.
|
|
154
|
+
* Used by navigation handling utilities.
|
|
155
|
+
*
|
|
156
|
+
* @returns Navigation target information or `null` if not navigable.
|
|
157
|
+
*
|
|
158
|
+
* @private
|
|
159
|
+
*/
|
|
160
|
+
getDDSNavigationTarget() {
|
|
161
|
+
if (this.type === "menu" || this.href == null || this.disabled) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
href: this.href,
|
|
166
|
+
target: null
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
_handleTriggerClick(event) {
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
if (this.disabled) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this.dispatchEvent(new Event("toggle", event));
|
|
175
|
+
}
|
|
176
|
+
_getSlottedItems() {
|
|
177
|
+
var _a;
|
|
178
|
+
const slot = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("slot:not([name])");
|
|
179
|
+
if (!slot) return [];
|
|
180
|
+
return slot.assignedElements({ flatten: true }).filter((el) => el.localName === "daikin-vertical-navigation-menu-item");
|
|
181
|
+
}
|
|
182
|
+
_propagateDisabledToChildren() {
|
|
183
|
+
for (const item of this._getSlottedItems()) {
|
|
184
|
+
if (this.disabled) {
|
|
185
|
+
if (!item.hasAttribute("disabled")) {
|
|
186
|
+
item.setAttribute("disabled", "");
|
|
187
|
+
item.setAttribute("data-disabled-by-parent", "");
|
|
188
|
+
}
|
|
189
|
+
} else {
|
|
190
|
+
if (item.hasAttribute("data-disabled-by-parent")) {
|
|
191
|
+
item.removeAttribute("disabled");
|
|
192
|
+
item.removeAttribute("data-disabled-by-parent");
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
updated(changedProperties) {
|
|
198
|
+
super.updated(changedProperties);
|
|
199
|
+
if (changedProperties.has("disabled")) {
|
|
200
|
+
this._propagateDisabledToChildren();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
_handleMenuSlotChange() {
|
|
204
|
+
this._propagateDisabledToChildren();
|
|
205
|
+
}
|
|
206
|
+
render() {
|
|
207
|
+
const open = this.open;
|
|
208
|
+
const indicator = this.current ? html`<div class=${cvaIndicator({ disabled: this.disabled })}></div>` : nothing;
|
|
209
|
+
const leftIconSlot = html`<slot
|
|
210
|
+
name="left-icon"
|
|
211
|
+
class="icon-size-6 flex-none slotted:flex-none"
|
|
212
|
+
></slot>`;
|
|
213
|
+
const badgeEl = this.badge !== "none" ? html`<daikin-badge
|
|
214
|
+
mode="standalone"
|
|
215
|
+
type="dot"
|
|
216
|
+
size="large"
|
|
217
|
+
color=${this.badge}
|
|
218
|
+
></daikin-badge>
|
|
219
|
+
${this.badgeMessage ? html`<span class="sr-only">${this.badgeMessage}</span>` : nothing}` : nothing;
|
|
220
|
+
if (this.type === "link") {
|
|
221
|
+
const disabled = this.disabled || this.href == null;
|
|
222
|
+
return html`<div class="w-full relative" role="listitem">
|
|
223
|
+
${indicator}
|
|
224
|
+
<a
|
|
225
|
+
${ref(this._triggerRef)}
|
|
226
|
+
class=${cvaHeader({
|
|
227
|
+
type: "link",
|
|
228
|
+
disabled,
|
|
229
|
+
current: this.current
|
|
230
|
+
})}
|
|
231
|
+
href=${ifDefined(!disabled ? this.href ?? void 0 : void 0)}
|
|
232
|
+
role=${ifDefined(disabled ? "link" : void 0)}
|
|
233
|
+
aria-disabled=${ifDefined(disabled ? "true" : void 0)}
|
|
234
|
+
aria-current=${ifDefined(this.current ? "page" : void 0)}
|
|
235
|
+
tabindex=${disabled ? -1 : 0}
|
|
236
|
+
@click=${(event) => {
|
|
237
|
+
if (disabled) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
this.dispatchEvent(new Event("toggle", event));
|
|
241
|
+
}}
|
|
242
|
+
>
|
|
243
|
+
${leftIconSlot}
|
|
244
|
+
<span class="flex-1 min-w-0 mt-0.5"><slot name="label"></slot></span>
|
|
245
|
+
<span class="flex items-center gap-1 flex-none">
|
|
246
|
+
<span class="size-3 flex-none flex items-center justify-center"
|
|
247
|
+
>${badgeEl}</span
|
|
248
|
+
>
|
|
249
|
+
<span class="size-6 flex-none"></span>
|
|
250
|
+
</span>
|
|
251
|
+
</a>
|
|
252
|
+
</div>`;
|
|
253
|
+
}
|
|
254
|
+
return html`<div class="w-full" role="listitem">
|
|
255
|
+
<div class="relative">
|
|
256
|
+
${indicator}
|
|
257
|
+
<button
|
|
258
|
+
id="menu-button"
|
|
259
|
+
type="button"
|
|
260
|
+
${ref(this._triggerRef)}
|
|
261
|
+
class=${cvaHeader({
|
|
262
|
+
type: "menu",
|
|
263
|
+
disabled: this.disabled,
|
|
264
|
+
current: this.current
|
|
265
|
+
})}
|
|
266
|
+
?disabled=${this.disabled}
|
|
267
|
+
aria-current=${ifDefined(this.current ? "page" : void 0)}
|
|
268
|
+
aria-expanded=${open}
|
|
269
|
+
aria-controls="content"
|
|
270
|
+
tabindex=${this.disabled ? -1 : 0}
|
|
271
|
+
@click=${this._handleTriggerClick}
|
|
272
|
+
>
|
|
273
|
+
${leftIconSlot}
|
|
274
|
+
<span class="flex-1 min-w-0 mt-0.5"><slot name="label"></slot></span>
|
|
275
|
+
<span class="flex items-center gap-1 flex-none">
|
|
276
|
+
<span class="size-3 flex-none flex items-center justify-center"
|
|
277
|
+
>${badgeEl}</span
|
|
278
|
+
>
|
|
279
|
+
<span class=${cvaChevron({ open, disabled: this.disabled })}></span>
|
|
280
|
+
</span>
|
|
281
|
+
</button>
|
|
282
|
+
</div>
|
|
283
|
+
<div
|
|
284
|
+
id="content"
|
|
285
|
+
role="region"
|
|
286
|
+
class=${cvaContent({ open })}
|
|
287
|
+
aria-labelledby="menu-button"
|
|
288
|
+
?inert=${!open}
|
|
289
|
+
>
|
|
290
|
+
<div class="overflow-hidden" role="list">
|
|
291
|
+
<slot @slotchange=${this._handleMenuSlotChange}></slot>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>`;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Focuses on the inner link or menu button.
|
|
298
|
+
* Has no effect when `disabled` is `true` or `href` is not provided for a link.
|
|
299
|
+
* @param options focus options
|
|
300
|
+
*/
|
|
301
|
+
focus(options) {
|
|
302
|
+
var _a;
|
|
303
|
+
const isDisabled = this.disabled || this.type === "link" && this.href == null;
|
|
304
|
+
if (isDisabled) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
(_a = this._triggerRef.value) == null ? void 0 : _a.focus(options);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
DaikinVerticalNavigationItem.styles = css`
|
|
311
|
+
${unsafeCSS(tailwindStyles)}
|
|
312
|
+
|
|
313
|
+
:host {
|
|
314
|
+
display: block;
|
|
315
|
+
position: relative;
|
|
316
|
+
--divider-bottom-display: none;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
:host::after {
|
|
320
|
+
content: "";
|
|
321
|
+
display: var(--divider-bottom-display, none);
|
|
322
|
+
position: absolute;
|
|
323
|
+
inset: 0;
|
|
324
|
+
top: auto;
|
|
325
|
+
width: 100%;
|
|
326
|
+
height: 1px;
|
|
327
|
+
background: var(--dds-color-divider);
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
__decorateClass([
|
|
331
|
+
property({
|
|
332
|
+
type: String,
|
|
333
|
+
reflect: true,
|
|
334
|
+
fallbackValue: "link",
|
|
335
|
+
isAllowedValue: oneOf([
|
|
336
|
+
"link",
|
|
337
|
+
"menu"
|
|
338
|
+
])
|
|
339
|
+
})
|
|
340
|
+
], DaikinVerticalNavigationItem.prototype, "type", 2);
|
|
341
|
+
__decorateClass([
|
|
342
|
+
property({ type: String, reflect: true })
|
|
343
|
+
], DaikinVerticalNavigationItem.prototype, "href", 2);
|
|
344
|
+
__decorateClass([
|
|
345
|
+
property({ type: String, reflect: true, fallbackValue: "" })
|
|
346
|
+
], DaikinVerticalNavigationItem.prototype, "name", 2);
|
|
347
|
+
__decorateClass([
|
|
348
|
+
property({ type: Boolean, reflect: true })
|
|
349
|
+
], DaikinVerticalNavigationItem.prototype, "open", 2);
|
|
350
|
+
__decorateClass([
|
|
351
|
+
property({ type: Boolean, reflect: true })
|
|
352
|
+
], DaikinVerticalNavigationItem.prototype, "current", 2);
|
|
353
|
+
__decorateClass([
|
|
354
|
+
property({
|
|
355
|
+
type: String,
|
|
356
|
+
reflect: true,
|
|
357
|
+
fallbackValue: "none",
|
|
358
|
+
isAllowedValue: oneOf([
|
|
359
|
+
"none",
|
|
360
|
+
"negative",
|
|
361
|
+
"alarm",
|
|
362
|
+
"warning",
|
|
363
|
+
"positive",
|
|
364
|
+
"information"
|
|
365
|
+
])
|
|
366
|
+
})
|
|
367
|
+
], DaikinVerticalNavigationItem.prototype, "badge", 2);
|
|
368
|
+
__decorateClass([
|
|
369
|
+
property({ type: String, reflect: true, attribute: "badge-message" })
|
|
370
|
+
], DaikinVerticalNavigationItem.prototype, "badgeMessage", 2);
|
|
371
|
+
__decorateClass([
|
|
372
|
+
property({ type: Boolean, reflect: true })
|
|
373
|
+
], DaikinVerticalNavigationItem.prototype, "disabled", 2);
|
|
374
|
+
DaikinVerticalNavigationItem = __decorateClass([
|
|
375
|
+
ddsElement("daikin-vertical-navigation-item")
|
|
376
|
+
], DaikinVerticalNavigationItem);
|
|
377
|
+
export {
|
|
378
|
+
DaikinVerticalNavigationItem
|
|
379
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-vertical-navigation-item.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { DDSElement, DDSNavigable, NavigationTarget } from "../../base/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A sub-menu item designed specifically for use inside `daikin-vertical-navigation-item`.
|
|
4
|
+
* It renders as a link and embeds the visual style of a `daikin-list-item` in the vertical-navigation context,
|
|
5
|
+
* so no wrapper `daikin-list` component is needed.
|
|
6
|
+
*
|
|
7
|
+
* Place multiple `daikin-vertical-navigation-menu-item` elements directly in the default slot of
|
|
8
|
+
* `daikin-vertical-navigation-item` (type="menu") instead of wrapping them in `daikin-list`.
|
|
9
|
+
*
|
|
10
|
+
* Hierarchy:
|
|
11
|
+
* - `daikin-vertical-navigation` > `daikin-vertical-navigation-item` > `daikin-vertical-navigation-menu-item`
|
|
12
|
+
*
|
|
13
|
+
* @slot - A slot for the menu item label text.
|
|
14
|
+
* @slot left-icon - An optional slot for an icon placed to the left of the label. Place `daikin-icon` here.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/vertical-navigation-item/index.js";
|
|
20
|
+
* import "@daikin-oss/design-system-web-components/components/vertical-navigation-menu-item/index.js";
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <daikin-vertical-navigation-item type="menu" name="settings">
|
|
25
|
+
* <span slot="label">Settings</span>
|
|
26
|
+
* <daikin-vertical-navigation-menu-item href="/settings/general">
|
|
27
|
+
* General
|
|
28
|
+
* </daikin-vertical-navigation-menu-item>
|
|
29
|
+
* <daikin-vertical-navigation-menu-item href="/settings/security" badge="alarm">
|
|
30
|
+
* Security
|
|
31
|
+
* </daikin-vertical-navigation-menu-item>
|
|
32
|
+
* <daikin-vertical-navigation-menu-item href="/settings/billing" disabled>
|
|
33
|
+
* Billing
|
|
34
|
+
* </daikin-vertical-navigation-menu-item>
|
|
35
|
+
* </daikin-vertical-navigation-item>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare class DaikinVerticalNavigationMenuItem extends DDSElement implements DDSNavigable {
|
|
39
|
+
static readonly styles: import('lit').CSSResult;
|
|
40
|
+
/**
|
|
41
|
+
* The link `href`. When omitted, the item is rendered as a placeholder link in the disabled visual state.
|
|
42
|
+
*/
|
|
43
|
+
href: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the menu item is disabled.
|
|
46
|
+
* A disabled item cannot be clicked or focused.
|
|
47
|
+
*/
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Badge to display on the right side of the item.
|
|
51
|
+
* Uses `daikin-badge` in standalone dot mode. Set to `"none"` (default) to hide the badge.
|
|
52
|
+
* Supported colors: `"negative"`, `"alarm"`, `"warning"`, `"positive"`, `"information"`.
|
|
53
|
+
*
|
|
54
|
+
* @default "none"
|
|
55
|
+
*/
|
|
56
|
+
badge: "none" | "negative" | "alarm" | "warning" | "positive" | "information";
|
|
57
|
+
/**
|
|
58
|
+
* The badge message for assistive technologies. Only used when `badge` is not `"none"`.
|
|
59
|
+
*/
|
|
60
|
+
badgeMessage: string | null;
|
|
61
|
+
private get _disabled();
|
|
62
|
+
/**
|
|
63
|
+
* _Internal use._
|
|
64
|
+
* Returns the navigation target information.
|
|
65
|
+
* Used by navigation handling utilities.
|
|
66
|
+
*
|
|
67
|
+
* @returns Navigation target information or `null` if not navigable.
|
|
68
|
+
*
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
getDDSNavigationTarget(): NavigationTarget | null;
|
|
72
|
+
constructor();
|
|
73
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
74
|
+
/**
|
|
75
|
+
* Focuses on the inner link element.
|
|
76
|
+
* Has no effect when `disabled` is `true` or `href` is not provided.
|
|
77
|
+
* @param options focus options
|
|
78
|
+
*/
|
|
79
|
+
focus(options?: FocusOptions): void;
|
|
80
|
+
}
|
|
81
|
+
declare global {
|
|
82
|
+
interface HTMLElementTagNameMap {
|
|
83
|
+
"daikin-vertical-navigation-menu-item": DaikinVerticalNavigationMenuItem;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export default DaikinVerticalNavigationMenuItem;
|
package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
3
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
4
|
+
import { DDSElement } from "../../base/dds-element.js";
|
|
5
|
+
import "../../base/dds-form-element.js";
|
|
6
|
+
import { property, oneOf } from "../../base/dds-property.js";
|
|
7
|
+
import { ddsElement } from "../../base/decorators.js";
|
|
8
|
+
import "../../base/define.js";
|
|
9
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
10
|
+
import "../badge/daikin-badge.js";
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result) __defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
const cvaInner = cva(
|
|
22
|
+
[
|
|
23
|
+
"text-left",
|
|
24
|
+
// Hover/active background overlay
|
|
25
|
+
"before:absolute",
|
|
26
|
+
"before:inset-0",
|
|
27
|
+
"before:w-full",
|
|
28
|
+
"before:h-full",
|
|
29
|
+
// Focus ring overlay (separate from hover bg so it can be raised above the divider)
|
|
30
|
+
"after:absolute",
|
|
31
|
+
"after:inset-0",
|
|
32
|
+
"after:w-full",
|
|
33
|
+
"after:h-full",
|
|
34
|
+
"focus-visible:outline-hidden",
|
|
35
|
+
"focus-visible:after:outline-solid",
|
|
36
|
+
"focus-visible:after:outline-2",
|
|
37
|
+
"focus-visible:after:-outline-offset-2",
|
|
38
|
+
"focus-visible:after:outline-ddt-color-common-border-focus",
|
|
39
|
+
"focus-visible:after:z-1",
|
|
40
|
+
// Background on hover/press (link-enabled = <a> with href)
|
|
41
|
+
"not-active:group-hover:link-enabled:before:bg-ddt-color-common-surface-hover",
|
|
42
|
+
"active:link-enabled:before:bg-ddt-color-common-surface-press"
|
|
43
|
+
],
|
|
44
|
+
{
|
|
45
|
+
variants: {
|
|
46
|
+
disabled: {
|
|
47
|
+
false: [
|
|
48
|
+
// Vertical navigation neutral text colors (hard-coded for this component)
|
|
49
|
+
"text-ddt-color-common-neutral-default",
|
|
50
|
+
"group-hover:text-ddt-color-common-neutral-hover",
|
|
51
|
+
"active:text-ddt-color-common-neutral-press"
|
|
52
|
+
],
|
|
53
|
+
true: ["text-ddt-color-common-disabled", "pointer-events-none"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
let DaikinVerticalNavigationMenuItem = class extends DDSElement {
|
|
59
|
+
constructor() {
|
|
60
|
+
super();
|
|
61
|
+
this.href = null;
|
|
62
|
+
this.disabled = false;
|
|
63
|
+
this.badgeMessage = null;
|
|
64
|
+
this.addEventListener("click", (event) => {
|
|
65
|
+
if (this._disabled) {
|
|
66
|
+
event.stopImmediatePropagation();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
get _disabled() {
|
|
71
|
+
return this.disabled || this.href == null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* _Internal use._
|
|
75
|
+
* Returns the navigation target information.
|
|
76
|
+
* Used by navigation handling utilities.
|
|
77
|
+
*
|
|
78
|
+
* @returns Navigation target information or `null` if not navigable.
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
getDDSNavigationTarget() {
|
|
83
|
+
if (this.href == null || this.disabled) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
href: this.href,
|
|
88
|
+
target: null
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
const disabled = this._disabled;
|
|
93
|
+
return html`
|
|
94
|
+
<div
|
|
95
|
+
class="group flex justify-between items-start w-full min-h-12 py-3 px-11 text-left relative natural-break"
|
|
96
|
+
role="listitem"
|
|
97
|
+
>
|
|
98
|
+
<a
|
|
99
|
+
class=${cvaInner({ disabled })}
|
|
100
|
+
href=${ifDefined(!disabled ? this.href ?? void 0 : void 0)}
|
|
101
|
+
role=${ifDefined(disabled ? "link" : void 0)}
|
|
102
|
+
aria-disabled=${ifDefined(disabled ? "true" : void 0)}
|
|
103
|
+
tabindex=${disabled ? -1 : 0}
|
|
104
|
+
>
|
|
105
|
+
<span class="flex items-start w-full relative">
|
|
106
|
+
<slot
|
|
107
|
+
name="left-icon"
|
|
108
|
+
class="icon-size-6 slotted:flex-none z-1 slotted:text-inherit"
|
|
109
|
+
>
|
|
110
|
+
<span class="flex-none block -ml-1"></span>
|
|
111
|
+
</slot>
|
|
112
|
+
<slot class="block pl-2 pr-2 mt-0.5 text-left"></slot>
|
|
113
|
+
</span>
|
|
114
|
+
${this.badgeMessage && this.badge !== "none" ? html`<span class="sr-only">${this.badgeMessage}</span>` : nothing}
|
|
115
|
+
</a>
|
|
116
|
+
<span class="flex items-start mt-1.5 z-1 pointer-events-none">
|
|
117
|
+
${this.badge !== "none" ? html`<daikin-badge
|
|
118
|
+
mode="standalone"
|
|
119
|
+
type="dot"
|
|
120
|
+
size="large"
|
|
121
|
+
color=${this.badge}
|
|
122
|
+
></daikin-badge>` : html`<span class="block -mr-1 w-3"></span>`}
|
|
123
|
+
</span>
|
|
124
|
+
</div>
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Focuses on the inner link element.
|
|
129
|
+
* Has no effect when `disabled` is `true` or `href` is not provided.
|
|
130
|
+
* @param options focus options
|
|
131
|
+
*/
|
|
132
|
+
focus(options) {
|
|
133
|
+
var _a, _b;
|
|
134
|
+
if (this._disabled) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
(_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("a")) == null ? void 0 : _b.focus(options);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
DaikinVerticalNavigationMenuItem.styles = css`
|
|
141
|
+
${unsafeCSS(tailwindStyles)}
|
|
142
|
+
|
|
143
|
+
:host {
|
|
144
|
+
display: block;
|
|
145
|
+
width: 100%;
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
__decorateClass([
|
|
149
|
+
property({ type: String, reflect: true })
|
|
150
|
+
], DaikinVerticalNavigationMenuItem.prototype, "href", 2);
|
|
151
|
+
__decorateClass([
|
|
152
|
+
property({ type: Boolean, reflect: true })
|
|
153
|
+
], DaikinVerticalNavigationMenuItem.prototype, "disabled", 2);
|
|
154
|
+
__decorateClass([
|
|
155
|
+
property({
|
|
156
|
+
type: String,
|
|
157
|
+
reflect: true,
|
|
158
|
+
fallbackValue: "none",
|
|
159
|
+
isAllowedValue: oneOf([
|
|
160
|
+
"none",
|
|
161
|
+
"negative",
|
|
162
|
+
"alarm",
|
|
163
|
+
"warning",
|
|
164
|
+
"positive",
|
|
165
|
+
"information"
|
|
166
|
+
])
|
|
167
|
+
})
|
|
168
|
+
], DaikinVerticalNavigationMenuItem.prototype, "badge", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
property({ type: String, reflect: true, attribute: "badge-message" })
|
|
171
|
+
], DaikinVerticalNavigationMenuItem.prototype, "badgeMessage", 2);
|
|
172
|
+
DaikinVerticalNavigationMenuItem = __decorateClass([
|
|
173
|
+
ddsElement("daikin-vertical-navigation-menu-item")
|
|
174
|
+
], DaikinVerticalNavigationMenuItem);
|
|
175
|
+
export {
|
|
176
|
+
DaikinVerticalNavigationMenuItem
|
|
177
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./daikin-vertical-navigation-menu-item.js";
|