@daikin-oss/design-system-web-components 1.4.1 → 1.5.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 +136 -0
- package/custom-elements.json +25044 -0
- package/dist/THIRDPARTY.txt +1 -0
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/base/dds-navigable.d.cts +16 -0
- package/dist/cjs/base/index.d.cts +1 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +28 -5
- package/dist/cjs/components/accordion/daikin-accordion.d.cts +14 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +4 -4
- package/dist/cjs/components/avatar/daikin-avatar.cjs +24 -6
- package/dist/cjs/components/avatar/daikin-avatar.d.cts +13 -3
- package/dist/cjs/components/badge/daikin-badge.cjs +2 -2
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +0 -5
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +37 -1
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +23 -3
- package/dist/cjs/components/button/daikin-button.cjs +37 -19
- package/dist/cjs/components/button/daikin-button.d.cts +13 -3
- package/dist/cjs/components/calendar/daikin-calendar.cjs +12 -12
- package/dist/cjs/components/card/daikin-card.d.cts +1 -0
- package/dist/cjs/components/carousel/daikin-carousel.cjs +5 -5
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +20 -20
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +1 -1
- package/dist/cjs/components/chip/daikin-chip.cjs +261 -51
- package/dist/cjs/components/chip/daikin-chip.d.cts +45 -3
- package/dist/cjs/components/combobox/daikin-combobox.cjs +27 -30
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +10 -10
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +10 -10
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +10 -10
- package/dist/cjs/components/empty-state/daikin-empty-state.cjs +49 -0
- package/dist/cjs/components/empty-state/daikin-empty-state.d.cts +34 -0
- package/dist/cjs/components/empty-state/index.cjs +7 -0
- package/dist/cjs/components/empty-state/index.d.cts +1 -0
- package/dist/cjs/components/icon/daikin-icon.cjs +6 -12
- package/dist/cjs/components/icon/daikin-icon.d.cts +4 -0
- package/dist/cjs/components/icon/icons.json.cjs +1 -1
- package/dist/cjs/components/icon/icons.json.d.cts +26 -22
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +42 -24
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +13 -3
- package/dist/cjs/components/index.cjs +20 -0
- package/dist/cjs/components/index.d.cts +4 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +13 -10
- package/dist/cjs/components/input-group/daikin-input-group.cjs +2 -2
- package/dist/cjs/components/link/daikin-link.cjs +29 -10
- package/dist/cjs/components/link/daikin-link.d.cts +12 -2
- package/dist/cjs/components/list-item/daikin-list-item.cjs +23 -5
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +13 -3
- package/dist/cjs/components/loading/daikin-loading.cjs +2 -2
- package/dist/cjs/components/logo/daikin-logo.cjs +22 -4
- package/dist/cjs/components/logo/daikin-logo.d.cts +13 -3
- package/dist/cjs/components/menu/daikin-menu.cjs +18 -4
- package/dist/cjs/components/menu/daikin-menu.d.cts +3 -1
- package/dist/cjs/components/modal/daikin-modal.cjs +15 -8
- package/dist/cjs/components/modal/daikin-modal.d.cts +2 -0
- package/dist/cjs/components/navigation/daikin-navigation.cjs +47 -0
- package/dist/cjs/components/navigation/daikin-navigation.d.cts +56 -0
- package/dist/cjs/components/navigation/index.cjs +7 -0
- package/dist/cjs/components/navigation/index.d.cts +1 -0
- package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +219 -0
- package/dist/cjs/components/navigation-item/daikin-navigation-item.d.cts +89 -0
- package/dist/cjs/components/navigation-item/index.cjs +7 -0
- package/dist/cjs/components/navigation-item/index.d.cts +1 -0
- package/dist/cjs/components/pagination/daikin-pagination.cjs +7 -7
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +3 -3
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +2 -2
- package/dist/cjs/components/radio/daikin-radio.cjs +7 -7
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +1 -1
- package/dist/cjs/components/select/daikin-select.cjs +34 -34
- package/dist/cjs/components/slider/daikin-slider.cjs +4 -4
- package/dist/cjs/components/status-message/daikin-status-message.cjs +4 -4
- package/dist/cjs/components/tab/daikin-tab.cjs +3 -3
- package/dist/cjs/components/table/daikin-table.cjs +12 -5
- package/dist/cjs/components/table/daikin-table.d.cts +2 -0
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +4 -4
- package/dist/cjs/components/tabs/daikin-tabs.cjs +1 -1
- package/dist/cjs/components/tabs/daikin-tabs.d.cts +2 -2
- package/dist/cjs/components/tag/daikin-tag.cjs +126 -0
- package/dist/cjs/components/tag/daikin-tag.d.cts +46 -0
- package/dist/cjs/components/tag/index.cjs +7 -0
- package/dist/cjs/components/tag/index.d.cts +1 -0
- package/dist/cjs/components/text-area/daikin-text-area.cjs +11 -11
- package/dist/cjs/components/text-field/daikin-text-field.cjs +20 -20
- package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +12 -12
- package/dist/cjs/components/time-picker/daikin-time-picker.cjs +11 -11
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +28 -36
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +2 -2
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +3 -3
- package/dist/cjs/components/toggle/daikin-toggle.cjs +3 -3
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +3 -3
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +11 -10
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/navigation.cjs +62 -0
- package/dist/cjs/navigation.d.cts +33 -0
- package/dist/cjs/tailwind.css.cjs +3 -2
- package/dist/cjs/utils/calendar-common.cjs +15 -10
- package/dist/cjs/utils/calendar-common.d.cts +8 -3
- package/dist/cjs/utils/notification-common.d.cts +1 -1
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/base/dds-navigable.d.cts +16 -0
- package/dist/cjs-dev/base/index.d.cts +1 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +28 -5
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +14 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +4 -4
- package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +24 -6
- package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +13 -3
- package/dist/cjs-dev/components/badge/daikin-badge.cjs +2 -2
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +0 -5
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +37 -1
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +23 -3
- package/dist/cjs-dev/components/button/daikin-button.cjs +37 -19
- package/dist/cjs-dev/components/button/daikin-button.d.cts +13 -3
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +12 -12
- package/dist/cjs-dev/components/card/daikin-card.d.cts +1 -0
- package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +5 -5
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +20 -20
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +1 -1
- package/dist/cjs-dev/components/chip/daikin-chip.cjs +261 -51
- package/dist/cjs-dev/components/chip/daikin-chip.d.cts +45 -3
- package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +27 -30
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +10 -10
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +10 -10
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +10 -10
- package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +49 -0
- package/dist/cjs-dev/components/empty-state/daikin-empty-state.d.cts +34 -0
- package/dist/cjs-dev/components/empty-state/index.cjs +7 -0
- package/dist/cjs-dev/components/empty-state/index.d.cts +1 -0
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +6 -12
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +4 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +1 -1
- package/dist/cjs-dev/components/icon/icons.json.d.cts +26 -22
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +42 -24
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +13 -3
- package/dist/cjs-dev/components/index.cjs +20 -0
- package/dist/cjs-dev/components/index.d.cts +4 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +13 -10
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +2 -2
- package/dist/cjs-dev/components/link/daikin-link.cjs +29 -10
- package/dist/cjs-dev/components/link/daikin-link.d.cts +12 -2
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +23 -5
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +13 -3
- package/dist/cjs-dev/components/loading/daikin-loading.cjs +2 -2
- package/dist/cjs-dev/components/logo/daikin-logo.cjs +22 -4
- package/dist/cjs-dev/components/logo/daikin-logo.d.cts +13 -3
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +18 -4
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +3 -1
- package/dist/cjs-dev/components/modal/daikin-modal.cjs +15 -8
- package/dist/cjs-dev/components/modal/daikin-modal.d.cts +2 -0
- package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +47 -0
- package/dist/cjs-dev/components/navigation/daikin-navigation.d.cts +56 -0
- package/dist/cjs-dev/components/navigation/index.cjs +7 -0
- package/dist/cjs-dev/components/navigation/index.d.cts +1 -0
- package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +219 -0
- package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.d.cts +89 -0
- package/dist/cjs-dev/components/navigation-item/index.cjs +7 -0
- package/dist/cjs-dev/components/navigation-item/index.d.cts +1 -0
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +7 -7
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +3 -3
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +2 -2
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +7 -7
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +1 -1
- package/dist/cjs-dev/components/select/daikin-select.cjs +34 -34
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +4 -4
- package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +4 -4
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +3 -3
- package/dist/cjs-dev/components/table/daikin-table.cjs +12 -5
- package/dist/cjs-dev/components/table/daikin-table.d.cts +2 -0
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +4 -4
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +1 -1
- package/dist/cjs-dev/components/tabs/daikin-tabs.d.cts +2 -2
- package/dist/cjs-dev/components/tag/daikin-tag.cjs +126 -0
- package/dist/cjs-dev/components/tag/daikin-tag.d.cts +46 -0
- package/dist/cjs-dev/components/tag/index.cjs +7 -0
- package/dist/cjs-dev/components/tag/index.d.cts +1 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +11 -11
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +20 -20
- package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +12 -12
- package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +11 -11
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +28 -36
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +2 -2
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +3 -3
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +3 -3
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +3 -3
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +11 -10
- package/dist/cjs-dev/index.cjs +25 -0
- package/dist/cjs-dev/index.d.cts +1 -0
- package/dist/cjs-dev/navigation.cjs +62 -0
- package/dist/cjs-dev/navigation.d.cts +33 -0
- package/dist/cjs-dev/tailwind.css.cjs +3 -2
- package/dist/cjs-dev/utils/calendar-common.cjs +15 -10
- package/dist/cjs-dev/utils/calendar-common.d.cts +8 -3
- package/dist/cjs-dev/utils/notification-common.d.cts +1 -1
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/base/dds-navigable.d.ts +16 -0
- package/dist/es/base/index.d.ts +1 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +14 -0
- package/dist/es/components/accordion/daikin-accordion.js +29 -6
- package/dist/es/components/accordion-item/daikin-accordion-item.js +4 -4
- package/dist/es/components/avatar/daikin-avatar.d.ts +13 -3
- package/dist/es/components/avatar/daikin-avatar.js +24 -6
- package/dist/es/components/badge/daikin-badge.js +2 -2
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +0 -5
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +23 -3
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +37 -1
- package/dist/es/components/button/daikin-button.d.ts +13 -3
- package/dist/es/components/button/daikin-button.js +37 -19
- package/dist/es/components/calendar/daikin-calendar.js +13 -13
- package/dist/es/components/card/daikin-card.d.ts +1 -0
- package/dist/es/components/carousel/daikin-carousel.js +5 -5
- package/dist/es/components/checkbox/daikin-checkbox.js +20 -20
- package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +1 -1
- package/dist/es/components/chip/daikin-chip.d.ts +45 -3
- package/dist/es/components/chip/daikin-chip.js +263 -53
- package/dist/es/components/combobox/daikin-combobox.js +27 -30
- package/dist/es/components/date-picker/daikin-date-picker.js +10 -10
- package/dist/es/components/dropdown/daikin-dropdown.js +10 -10
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +10 -10
- package/dist/es/components/empty-state/daikin-empty-state.d.ts +34 -0
- package/dist/es/components/empty-state/daikin-empty-state.js +50 -0
- package/dist/es/components/empty-state/index.d.ts +1 -0
- package/dist/es/components/empty-state/index.js +4 -0
- package/dist/es/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es/components/icon/daikin-icon.js +6 -12
- package/dist/es/components/icon/icons.json.d.ts +26 -22
- package/dist/es/components/icon/icons.json.js +1 -1
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +13 -3
- package/dist/es/components/icon-button/daikin-icon-button.js +42 -24
- package/dist/es/components/index.d.ts +4 -0
- package/dist/es/components/index.js +8 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.js +13 -10
- package/dist/es/components/input-group/daikin-input-group.js +2 -2
- package/dist/es/components/link/daikin-link.d.ts +12 -2
- package/dist/es/components/link/daikin-link.js +29 -10
- package/dist/es/components/list-item/daikin-list-item.d.ts +13 -3
- package/dist/es/components/list-item/daikin-list-item.js +23 -5
- package/dist/es/components/loading/daikin-loading.js +2 -2
- package/dist/es/components/logo/daikin-logo.d.ts +13 -3
- package/dist/es/components/logo/daikin-logo.js +22 -4
- package/dist/es/components/menu/daikin-menu.d.ts +3 -1
- package/dist/es/components/menu/daikin-menu.js +18 -4
- package/dist/es/components/modal/daikin-modal.d.ts +2 -0
- package/dist/es/components/modal/daikin-modal.js +15 -8
- package/dist/es/components/navigation/daikin-navigation.d.ts +56 -0
- package/dist/es/components/navigation/daikin-navigation.js +48 -0
- package/dist/es/components/navigation/index.d.ts +1 -0
- package/dist/es/components/navigation/index.js +4 -0
- package/dist/es/components/navigation-item/daikin-navigation-item.d.ts +89 -0
- package/dist/es/components/navigation-item/daikin-navigation-item.js +220 -0
- package/dist/es/components/navigation-item/index.d.ts +1 -0
- package/dist/es/components/navigation-item/index.js +4 -0
- package/dist/es/components/pagination/daikin-pagination.js +7 -7
- package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -3
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es/components/radio/daikin-radio.js +7 -7
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +1 -1
- package/dist/es/components/select/daikin-select.js +34 -34
- package/dist/es/components/slider/daikin-slider.js +4 -4
- package/dist/es/components/status-message/daikin-status-message.js +4 -4
- package/dist/es/components/tab/daikin-tab.js +3 -3
- package/dist/es/components/table/daikin-table.d.ts +2 -0
- package/dist/es/components/table/daikin-table.js +12 -5
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +4 -4
- package/dist/es/components/tabs/daikin-tabs.d.ts +2 -2
- package/dist/es/components/tabs/daikin-tabs.js +1 -1
- package/dist/es/components/tag/daikin-tag.d.ts +46 -0
- package/dist/es/components/tag/daikin-tag.js +127 -0
- package/dist/es/components/tag/index.d.ts +1 -0
- package/dist/es/components/tag/index.js +4 -0
- package/dist/es/components/text-area/daikin-text-area.js +11 -11
- package/dist/es/components/text-field/daikin-text-field.js +20 -20
- package/dist/es/components/text-masked-field/daikin-text-masked-field.js +12 -12
- package/dist/es/components/time-picker/daikin-time-picker.js +11 -11
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +2 -2
- package/dist/es/components/toast-notification/daikin-toast-notification.js +28 -36
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +3 -3
- package/dist/es/components/toggle/daikin-toggle.js +3 -3
- package/dist/es/components/tooltip/daikin-tooltip.js +3 -3
- package/dist/es/components/tree-item/daikin-tree-item.js +11 -10
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +13 -0
- package/dist/es/navigation.d.ts +33 -0
- package/dist/es/navigation.js +62 -0
- package/dist/es/tailwind.css.js +3 -2
- package/dist/es/utils/calendar-common.d.ts +8 -3
- package/dist/es/utils/calendar-common.js +15 -10
- package/dist/es/utils/notification-common.d.ts +1 -1
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/base/dds-navigable.d.ts +16 -0
- package/dist/es-dev/base/index.d.ts +1 -0
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +14 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +29 -6
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +4 -4
- package/dist/es-dev/components/avatar/daikin-avatar.d.ts +13 -3
- package/dist/es-dev/components/avatar/daikin-avatar.js +24 -6
- package/dist/es-dev/components/badge/daikin-badge.js +2 -2
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +0 -5
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +23 -3
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +37 -1
- package/dist/es-dev/components/button/daikin-button.d.ts +13 -3
- package/dist/es-dev/components/button/daikin-button.js +37 -19
- package/dist/es-dev/components/calendar/daikin-calendar.js +13 -13
- package/dist/es-dev/components/card/daikin-card.d.ts +1 -0
- package/dist/es-dev/components/carousel/daikin-carousel.js +5 -5
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +20 -20
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +1 -1
- package/dist/es-dev/components/chip/daikin-chip.d.ts +45 -3
- package/dist/es-dev/components/chip/daikin-chip.js +263 -53
- package/dist/es-dev/components/combobox/daikin-combobox.js +27 -30
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +10 -10
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +10 -10
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +10 -10
- package/dist/es-dev/components/empty-state/daikin-empty-state.d.ts +34 -0
- package/dist/es-dev/components/empty-state/daikin-empty-state.js +50 -0
- package/dist/es-dev/components/empty-state/index.d.ts +1 -0
- package/dist/es-dev/components/empty-state/index.js +4 -0
- package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es-dev/components/icon/daikin-icon.js +6 -12
- package/dist/es-dev/components/icon/icons.json.d.ts +26 -22
- package/dist/es-dev/components/icon/icons.json.js +1 -1
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +13 -3
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +42 -24
- package/dist/es-dev/components/index.d.ts +4 -0
- package/dist/es-dev/components/index.js +8 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +13 -10
- package/dist/es-dev/components/input-group/daikin-input-group.js +2 -2
- package/dist/es-dev/components/link/daikin-link.d.ts +12 -2
- package/dist/es-dev/components/link/daikin-link.js +29 -10
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +13 -3
- package/dist/es-dev/components/list-item/daikin-list-item.js +23 -5
- package/dist/es-dev/components/loading/daikin-loading.js +2 -2
- package/dist/es-dev/components/logo/daikin-logo.d.ts +13 -3
- package/dist/es-dev/components/logo/daikin-logo.js +22 -4
- package/dist/es-dev/components/menu/daikin-menu.d.ts +3 -1
- package/dist/es-dev/components/menu/daikin-menu.js +18 -4
- package/dist/es-dev/components/modal/daikin-modal.d.ts +2 -0
- package/dist/es-dev/components/modal/daikin-modal.js +15 -8
- package/dist/es-dev/components/navigation/daikin-navigation.d.ts +56 -0
- package/dist/es-dev/components/navigation/daikin-navigation.js +48 -0
- package/dist/es-dev/components/navigation/index.d.ts +1 -0
- package/dist/es-dev/components/navigation/index.js +4 -0
- package/dist/es-dev/components/navigation-item/daikin-navigation-item.d.ts +89 -0
- package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +220 -0
- package/dist/es-dev/components/navigation-item/index.d.ts +1 -0
- package/dist/es-dev/components/navigation-item/index.js +4 -0
- package/dist/es-dev/components/pagination/daikin-pagination.js +7 -7
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -3
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es-dev/components/radio/daikin-radio.js +7 -7
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +1 -1
- package/dist/es-dev/components/select/daikin-select.js +34 -34
- package/dist/es-dev/components/slider/daikin-slider.js +4 -4
- package/dist/es-dev/components/status-message/daikin-status-message.js +4 -4
- package/dist/es-dev/components/tab/daikin-tab.js +3 -3
- package/dist/es-dev/components/table/daikin-table.d.ts +2 -0
- package/dist/es-dev/components/table/daikin-table.js +12 -5
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +4 -4
- package/dist/es-dev/components/tabs/daikin-tabs.d.ts +2 -2
- package/dist/es-dev/components/tabs/daikin-tabs.js +1 -1
- package/dist/es-dev/components/tag/daikin-tag.d.ts +46 -0
- package/dist/es-dev/components/tag/daikin-tag.js +127 -0
- package/dist/es-dev/components/tag/index.d.ts +1 -0
- package/dist/es-dev/components/tag/index.js +4 -0
- package/dist/es-dev/components/text-area/daikin-text-area.js +11 -11
- package/dist/es-dev/components/text-field/daikin-text-field.js +20 -20
- package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +12 -12
- package/dist/es-dev/components/time-picker/daikin-time-picker.js +11 -11
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +2 -2
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +28 -36
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +3 -3
- package/dist/es-dev/components/toggle/daikin-toggle.js +3 -3
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +3 -3
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +11 -10
- package/dist/es-dev/index.d.ts +1 -0
- package/dist/es-dev/index.js +13 -0
- package/dist/es-dev/navigation.d.ts +33 -0
- package/dist/es-dev/navigation.js +62 -0
- package/dist/es-dev/tailwind.css.js +3 -2
- package/dist/es-dev/utils/calendar-common.d.ts +8 -3
- package/dist/es-dev/utils/calendar-common.js +15 -10
- package/dist/es-dev/utils/notification-common.d.ts +1 -1
- package/icons/check.svg +3 -0
- package/package.json +26 -9
|
@@ -9,7 +9,7 @@ import { property } from "../../base/dds-property.js";
|
|
|
9
9
|
import { ddsElement } from "../../base/decorators.js";
|
|
10
10
|
import "../../base/define.js";
|
|
11
11
|
import tailwindStyles from "../../tailwind.css.js";
|
|
12
|
-
import { tryParseDateFromProperty, parseDateFromProperty, cloneDate, isMonthOutOfRange, getDateByMonthOffsetClamped, formatDateForProperty, clampDate, isSameYearMonth, createDateClamped, calcWeeksOnCalendar, toFirstDayOfMonth, isDateOutOfRange, cvaIconButton,
|
|
12
|
+
import { tryParseDateFromProperty, parseDateFromProperty, cloneDate, isMonthOutOfRange, getDateByMonthOffsetClamped, formatDateForProperty, clampDate, isSameYearMonth, createDateClamped, calcWeeksOnCalendar, toFirstDayOfMonth, isDateOutOfRange, cvaIconButton, getTodayForProperty, DEFAULT_MIN_DATE, DEFAULT_MAX_DATE } from "../../utils/calendar-common.js";
|
|
13
13
|
import { scrollIntoViewOnlyParent } from "../../utils/scroller.js";
|
|
14
14
|
import "../icon-button/daikin-icon-button.js";
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -52,18 +52,18 @@ const cvaContentButton = cva(
|
|
|
52
52
|
"justify-center",
|
|
53
53
|
"rounded-full",
|
|
54
54
|
"text-sm",
|
|
55
|
-
"outline",
|
|
55
|
+
"outline-solid",
|
|
56
56
|
"outline-2",
|
|
57
57
|
"outline-offset-2",
|
|
58
58
|
"outline-transparent",
|
|
59
59
|
"focus-visible:outline-ddt-color-common-border-focus",
|
|
60
|
-
"enabled:bg-
|
|
60
|
+
"enabled:bg-(--color-primary)",
|
|
61
61
|
"disabled:text-ddt-color-common-disabled"
|
|
62
62
|
],
|
|
63
63
|
{
|
|
64
64
|
variants: {
|
|
65
65
|
date: {
|
|
66
|
-
false: ["w-[calc((100
|
|
66
|
+
false: ["w-[calc((100%-3rem)/3)]", "h-8", "px-2"],
|
|
67
67
|
true: ["size-8"]
|
|
68
68
|
},
|
|
69
69
|
variant: {
|
|
@@ -71,14 +71,14 @@ const cvaContentButton = cva(
|
|
|
71
71
|
"enabled:text-ddt-color-common-neutral-default",
|
|
72
72
|
"enabled:hover:text-ddt-color-common-neutral-hover",
|
|
73
73
|
"enabled:active:text-ddt-color-common-neutral-press",
|
|
74
|
-
"enabled:hover:
|
|
75
|
-
"enabled:active:
|
|
74
|
+
"enabled:hover:[--color-primary:var(--dds-color-common-surface-neutral-hover)]",
|
|
75
|
+
"enabled:active:[--color-primary:var(--dds-color-common-surface-neutral-press)]"
|
|
76
76
|
],
|
|
77
77
|
selected: [
|
|
78
78
|
"enabled:text-ddt-color-common-text-inverse",
|
|
79
|
-
"
|
|
80
|
-
"hover:
|
|
81
|
-
"active:
|
|
79
|
+
"[--color-primary:var(--dds-color-common-brand-default)]",
|
|
80
|
+
"hover:[--color-primary:var(--dds-color-common-brand-hover)]",
|
|
81
|
+
"active:[--color-primary:var(--dds-color-common-brand-press)]"
|
|
82
82
|
],
|
|
83
83
|
today: [
|
|
84
84
|
"enabled:text-ddt-color-common-neutral-default",
|
|
@@ -86,15 +86,15 @@ const cvaContentButton = cva(
|
|
|
86
86
|
"enabled:active:text-ddt-color-common-neutral-press",
|
|
87
87
|
"enabled:border",
|
|
88
88
|
"enabled:border-ddt-color-common-neutral-default",
|
|
89
|
-
"enabled:hover:
|
|
90
|
-
"enabled:active:
|
|
89
|
+
"enabled:hover:[--color-primary:var(--dds-color-common-surface-neutral-hover)]",
|
|
90
|
+
"enabled:active:[--color-primary:var(--dds-color-common-surface-neutral-press)]"
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
function getToday() {
|
|
97
|
-
return
|
|
97
|
+
return parseDateFromProperty(getTodayForProperty());
|
|
98
98
|
}
|
|
99
99
|
function getNextFocusDateByKey(date, event) {
|
|
100
100
|
const cloned = cloneDate(date);
|
|
@@ -448,7 +448,7 @@ let DaikinCalendar = class extends DDSElement {
|
|
|
448
448
|
day: this._createDatePicker
|
|
449
449
|
}[view].call(this, renderState);
|
|
450
450
|
return html`<div
|
|
451
|
-
class="flex items-stretch flex-col gap-2 w-
|
|
451
|
+
class="flex items-stretch flex-col gap-2 w-70 h-max pt-3 bg-ddt-color-common-background-default outline-solid outline-1 -outline-offset-1 outline-ddt-color-divider rounded-sm font-daikinSerif"
|
|
452
452
|
>
|
|
453
453
|
<div class="flex justify-between items-center pl-4 pr-3">
|
|
454
454
|
<div class="flex items-center gap-2">
|
|
@@ -5,6 +5,7 @@ import { DDSElement } from "../../base/index.js";
|
|
|
5
5
|
* Hierarchy:
|
|
6
6
|
* - `daikin-card` > `daikin-card-header`
|
|
7
7
|
* - `daikin-card` > `daikin-card-footer`
|
|
8
|
+
* - `daikin-card` > `daikin-empty-state`
|
|
8
9
|
*
|
|
9
10
|
* @slot - A slot for card header, body, card footer. Place `daikin-card-header`, custom body content, `daikin-card-footer` here in order.
|
|
10
11
|
*
|
|
@@ -33,8 +33,8 @@ const cvaButton = cva(
|
|
|
33
33
|
{
|
|
34
34
|
variants: {
|
|
35
35
|
intent: {
|
|
36
|
-
previous: ["
|
|
37
|
-
next: ["
|
|
36
|
+
previous: ["icon-[daikin--chevron-left]"],
|
|
37
|
+
next: ["icon-[daikin--chevron-right]"]
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -56,7 +56,7 @@ const INDICATOR_CLASS_NAME = cva([
|
|
|
56
56
|
"aria-selected:after:bg-ddt-color-common-brand-default",
|
|
57
57
|
"aria-selected:after:absolute",
|
|
58
58
|
"aria-selected:after:rounded-full",
|
|
59
|
-
"aria-selected:focus-visible:after:outline",
|
|
59
|
+
"aria-selected:focus-visible:after:outline-solid",
|
|
60
60
|
"aria-selected:focus-visible:after:outline-1",
|
|
61
61
|
"aria-selected:focus-visible:after:outline-offset-1",
|
|
62
62
|
"aria-selected:focus-visible:after:outline-ddt-color-common-border-focus"
|
|
@@ -153,11 +153,11 @@ let DaikinCarousel = class extends DDSElement {
|
|
|
153
153
|
<span class=${cvaButton({ intent: "previous" })}></span>
|
|
154
154
|
</daikin-icon-button>
|
|
155
155
|
<div
|
|
156
|
-
class="w-full overflow-clip relative focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ddt-color-common-border-focus
|
|
156
|
+
class="w-full overflow-clip relative focus-within:outline-solid focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ddt-color-common-border-focus @container"
|
|
157
157
|
aria-live="polite"
|
|
158
158
|
>
|
|
159
159
|
<div
|
|
160
|
-
class="flex w-[calc(100cqw*var(--total))] transition-transform translate-x-[calc(-100%*var(--current)/var(--total))] duration-
|
|
160
|
+
class="flex w-[calc(100cqw*var(--total))] transition-transform translate-x-[calc(-100%*var(--current)/var(--total))] duration-(--ddc-transition-duration)"
|
|
161
161
|
>
|
|
162
162
|
<slot
|
|
163
163
|
class="slotted:w-[calc(100%/var(--total))]"
|
|
@@ -22,41 +22,41 @@ const CHECKBOX_CLASS_NAME = cva([
|
|
|
22
22
|
"size-4",
|
|
23
23
|
"border-ddt-color-common-neutral-default",
|
|
24
24
|
"border-2",
|
|
25
|
-
"rounded-
|
|
25
|
+
"rounded-xs",
|
|
26
26
|
"relative",
|
|
27
27
|
"appearance-none",
|
|
28
28
|
"before:text-ddt-color-common-text-inverse",
|
|
29
29
|
"before:absolute",
|
|
30
30
|
"before:m-auto",
|
|
31
31
|
"before:inset-0",
|
|
32
|
-
"checked:before:
|
|
32
|
+
"checked:before:icon-[daikin--checkbox-checked]",
|
|
33
33
|
"checked:before:size-3",
|
|
34
|
-
"indeterminate:before:
|
|
34
|
+
"indeterminate:before:icon-[daikin--checkbox-indeterminate]",
|
|
35
35
|
"indeterminate:before:size-2.5",
|
|
36
|
-
"focus-visible:outline",
|
|
36
|
+
"focus-visible:outline-solid",
|
|
37
37
|
"focus-visible:outline-2",
|
|
38
38
|
"focus-visible:outline-offset-2",
|
|
39
39
|
"focus-visible:outline-ddt-color-common-border-focus",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
40
|
+
"group-hover:enabled:border-ddt-color-common-neutral-hover",
|
|
41
|
+
"group-hover:enabled:bg-ddt-color-common-surface-hover",
|
|
42
|
+
"group-active:enabled:border-ddt-color-common-neutral-press",
|
|
43
|
+
"group-active:enabled:bg-ddt-color-common-surface-press",
|
|
44
44
|
"enabled:checked:border-ddt-color-common-brand-default",
|
|
45
45
|
"enabled:checked:bg-ddt-color-common-brand-default",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
46
|
+
"group-hover:checked:enabled:bg-ddt-color-common-brand-hover",
|
|
47
|
+
"group-hover:checked:enabled:border-ddt-color-common-brand-hover",
|
|
48
|
+
"group-hover:checked:enabled:before:text-ddt-color-common-text-inverse",
|
|
49
|
+
"group-active:checked:enabled:bg-ddt-color-common-brand-press",
|
|
50
|
+
"group-active:checked:enabled:border-ddt-color-common-brand-press",
|
|
51
|
+
"group-active:checked:enabled:before:text-ddt-color-common-text-inverse",
|
|
52
52
|
"enabled:indeterminate:bg-ddt-color-common-brand-default",
|
|
53
53
|
"enabled:indeterminate:border-ddt-color-common-brand-default",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
54
|
+
"group-hover:indeterminate:enabled:bg-ddt-color-common-brand-hover",
|
|
55
|
+
"group-hover:indeterminate:enabled:border-ddt-color-common-brand-hover",
|
|
56
|
+
"group-hover:indeterminate:enabled:before:text-ddt-color-common-text-inverse",
|
|
57
|
+
"group-active:indeterminate:enabled:bg-ddt-color-common-brand-press",
|
|
58
|
+
"group-active:indeterminate:enabled:border-ddt-color-common-brand-press",
|
|
59
|
+
"group-active:indeterminate:enabled:before:text-ddt-color-common-text-inverse",
|
|
60
60
|
"disabled:border-ddt-color-common-disabled",
|
|
61
61
|
"disabled:bg-ddt-color-common-text-inverse",
|
|
62
62
|
"disabled:checked:bg-ddt-color-common-disabled",
|
|
@@ -2,7 +2,7 @@ import { DDSElement } from "../../base/index.js";
|
|
|
2
2
|
import { MergeVariantProps } from "../../type-utils.js";
|
|
3
3
|
import { DaikinInputGroup } from "../input-group/index.js";
|
|
4
4
|
declare const cvaCheckboxGroup: (props?: ({
|
|
5
|
-
orientation?: "
|
|
5
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type CheckboxGroupProps = MergeVariantProps<typeof cvaCheckboxGroup>;
|
|
8
8
|
/**
|
|
@@ -2,7 +2,12 @@ import { DDSElement } from "../../base/index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* A chip is a small UI component that represents a single piece of information, a filter, or a contact. Think of it as a compact tag or a small, clickable token.
|
|
4
4
|
*
|
|
5
|
-
* @fires remove -
|
|
5
|
+
* @fires remove - When type is "input", a custom event emitted when a user clicks the remove button.
|
|
6
|
+
* @fires before-select - When type is "filter", a cancelable custom event emitted before changing the selected state of a filter type chip. Listeners can call `event.preventDefault()` to prevent the state change.
|
|
7
|
+
* @fires select - When type is "filter", a custom event emitted after the selected state of a filter type chip has changed. The new selected state is provided in `event.detail.checked`.
|
|
8
|
+
*
|
|
9
|
+
* @slot - A slot for the chip content.
|
|
10
|
+
* @slot left-icon - When type is "input", a slot for an icon to be placed to the left of the text. Place `daikin-icon` or something similar.
|
|
6
11
|
*
|
|
7
12
|
* @example
|
|
8
13
|
*
|
|
@@ -17,14 +22,51 @@ import { DDSElement } from "../../base/index.js";
|
|
|
17
22
|
export declare class DaikinChip extends DDSElement {
|
|
18
23
|
static readonly styles: import('lit').CSSResult;
|
|
19
24
|
/**
|
|
20
|
-
*
|
|
25
|
+
* Type of the chip.
|
|
26
|
+
*
|
|
27
|
+
* @default "input"
|
|
28
|
+
*/
|
|
29
|
+
type: "input" | "filter";
|
|
30
|
+
/**
|
|
31
|
+
* Specify the variant of the chip when type is "input".
|
|
32
|
+
*
|
|
33
|
+
* @default "outline"
|
|
34
|
+
*/
|
|
35
|
+
variant: "fill" | "outline";
|
|
36
|
+
/**
|
|
37
|
+
* Specify the chip is selected when type is "filter".
|
|
38
|
+
*/
|
|
39
|
+
checked: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Specify the chip disabled state when type is "filter".
|
|
42
|
+
*/
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Specify the chip with a left checked icon when type is "filter".
|
|
46
|
+
*/
|
|
47
|
+
withCheckedIcon: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Provides an accessible name of the chip when type is "input".
|
|
21
50
|
*/
|
|
22
51
|
chipAriaLabel: string | null;
|
|
23
52
|
private _focusableElement;
|
|
24
53
|
private _handleRemoveClick;
|
|
54
|
+
/**
|
|
55
|
+
* Emits `before-select` event if necessary and returns whether we should proceed.
|
|
56
|
+
*
|
|
57
|
+
* 1. Emit "before-select" event.
|
|
58
|
+
* 2. Check and return whether the event is canceled.
|
|
59
|
+
*
|
|
60
|
+
* @returns `true` if we should proceed (event is emitted and not canceled). `false` otherwise.
|
|
61
|
+
*/
|
|
62
|
+
private _emitBeforeSelect;
|
|
63
|
+
/**
|
|
64
|
+
* Handles "click" event emitted by `daikin-chip` component when "filter" type is used.
|
|
65
|
+
*/
|
|
66
|
+
private _handleChipClick;
|
|
25
67
|
render(): import('lit-html').TemplateResult<1>;
|
|
26
68
|
/**
|
|
27
|
-
* Focuses on the inner remove button
|
|
69
|
+
* Focuses on the inner remove button or the chip button depending on the type.
|
|
28
70
|
* @param options focus options
|
|
29
71
|
*/
|
|
30
72
|
focus(options?: FocusOptions): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import { unsafeCSS, css, html } from "lit";
|
|
2
|
+
import { unsafeCSS, css, nothing, html } from "lit";
|
|
3
3
|
import { query } from "lit/decorators.js";
|
|
4
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
5
|
import { DDSElement } from "../../base/dds-element.js";
|
|
6
6
|
import "../../base/dds-form-element.js";
|
|
7
|
-
import { property } from "../../base/dds-property.js";
|
|
7
|
+
import { property, oneOf } from "../../base/dds-property.js";
|
|
8
8
|
import { ddsElement } from "../../base/decorators.js";
|
|
9
9
|
import "../../base/define.js";
|
|
10
10
|
import tailwindStyles from "../../tailwind.css.js";
|
|
@@ -18,71 +18,255 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
18
18
|
if (kind && result) __defProp(target, key, result);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
21
|
+
const cvaInputChipWrapper = cva(
|
|
22
|
+
[
|
|
23
|
+
"flex",
|
|
24
|
+
"items-center",
|
|
25
|
+
"rounded-full",
|
|
26
|
+
"size-full",
|
|
27
|
+
"border",
|
|
28
|
+
"py-0.5",
|
|
29
|
+
"px-1"
|
|
30
|
+
],
|
|
31
|
+
{
|
|
32
|
+
variants: {
|
|
33
|
+
variant: {
|
|
34
|
+
fill: [
|
|
35
|
+
"border-ddt-color-common-brand-default",
|
|
36
|
+
"bg-ddt-color-common-brand-default"
|
|
37
|
+
],
|
|
38
|
+
outline: ["border-ddt-color-common-neutral-default"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
const cvaInputChipIcon = cva(["icon-size-4", "slotted:flex-none"], {
|
|
44
|
+
variants: {
|
|
45
|
+
variant: {
|
|
46
|
+
fill: ["text-ddt-color-common-text-inverse"],
|
|
47
|
+
outline: ["text-ddt-color-common-text-primary"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const cvaInputChipText = cva(
|
|
52
|
+
[
|
|
53
|
+
"text-sm",
|
|
54
|
+
"font-daikinSerif",
|
|
55
|
+
"leading-[130%]",
|
|
56
|
+
"px-1",
|
|
57
|
+
"mr-0.5",
|
|
58
|
+
"overflow-hidden",
|
|
59
|
+
"whitespace-nowrap",
|
|
60
|
+
"flex-1"
|
|
61
|
+
],
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
variant: {
|
|
65
|
+
fill: ["text-ddt-color-common-text-inverse"],
|
|
66
|
+
outline: ["text-ddt-color-common-text-primary"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
const cvaRemoveButton = cva(
|
|
72
|
+
[
|
|
73
|
+
"flex-none",
|
|
74
|
+
"relative",
|
|
75
|
+
"w-4",
|
|
76
|
+
"h-4",
|
|
77
|
+
"flex",
|
|
78
|
+
"items-center",
|
|
79
|
+
"justify-center",
|
|
80
|
+
"rounded-full",
|
|
81
|
+
"focus-visible:outline",
|
|
82
|
+
"focus-visible:outline-2",
|
|
83
|
+
"text-(--color-primary)",
|
|
84
|
+
"bg-(--color-secondary)",
|
|
85
|
+
"after:absolute",
|
|
86
|
+
"after:bg-transparent",
|
|
87
|
+
"after:size-6",
|
|
88
|
+
"after:top-1/2",
|
|
89
|
+
"after:left-1/2",
|
|
90
|
+
"after:-translate-x-1/2",
|
|
91
|
+
"after:-translate-y-1/2",
|
|
92
|
+
"after:rounded-full"
|
|
93
|
+
],
|
|
94
|
+
{
|
|
95
|
+
variants: {
|
|
96
|
+
variant: {
|
|
97
|
+
fill: [
|
|
98
|
+
"text-ddt-color-common-text-inverse",
|
|
99
|
+
"focus-visible:outline-ddt-color-common-border-inverse",
|
|
100
|
+
"enabled:hover:[--color-secondary:var(--dds-color-common-brand-hover)]",
|
|
101
|
+
"enabled:active:[--color-secondary:var(--dds-color-common-brand-press)]"
|
|
102
|
+
],
|
|
103
|
+
outline: [
|
|
104
|
+
"text-ddt-color-common-neutral-default",
|
|
105
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
106
|
+
"enabled:[--color-primary:var(--dds-color-common-neutral-default)]",
|
|
107
|
+
"enabled:hover:[--color-primary:var(--dds-color-common-neutral-hover)]",
|
|
108
|
+
"enabled:hover:[--color-secondary:var(--dds-color-common-surface-neutral-hover)]",
|
|
109
|
+
"enabled:active:[--color-primary:var(--dds-color-common-neutral-press)]",
|
|
110
|
+
"enabled:active:[--color-secondary:var(--dds-color-common-surface-neutral-press)]"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
const cvaFilterChipWrapper = cva(
|
|
117
|
+
[
|
|
118
|
+
"flex",
|
|
119
|
+
"items-center",
|
|
120
|
+
"rounded-full",
|
|
121
|
+
"overflow-hidden",
|
|
122
|
+
"size-full",
|
|
123
|
+
"border",
|
|
124
|
+
"py-0.5",
|
|
125
|
+
"px-1",
|
|
126
|
+
"min-h-6",
|
|
127
|
+
"focus-visible:outline",
|
|
128
|
+
"focus-visible:outline-2",
|
|
129
|
+
"focus-visible:outline-offset-2",
|
|
130
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
131
|
+
"text-(--color-primary)",
|
|
132
|
+
"bg-(--color-secondary)",
|
|
133
|
+
"border-(--color-tertiary)"
|
|
134
|
+
],
|
|
135
|
+
{
|
|
136
|
+
variants: {
|
|
137
|
+
checked: {
|
|
138
|
+
true: [
|
|
139
|
+
"enabled:[--color-primary:var(--dds-color-common-text-inverse)]",
|
|
140
|
+
"enabled:[--color-secondary:var(--dds-color-common-brand-default)]",
|
|
141
|
+
"enabled:hover:[--color-secondary:var(--dds-color-common-brand-hover)]",
|
|
142
|
+
"enabled:active:[--color-secondary:var(--dds-color-common-brand-press)]",
|
|
143
|
+
"enabled:[--color-tertiary:var(--dds-color-common-brand-default)]",
|
|
144
|
+
"enabled:hover:[--color-tertiary:var(--dds-color-common-brand-hover)]",
|
|
145
|
+
"enabled:active:[--color-tertiary:var(--dds-color-common-brand-press)]",
|
|
146
|
+
"disabled:[--color-primary:var(--dds-color-common-text-inverse)]",
|
|
147
|
+
"disabled:[--color-secondary:var(--dds-color-common-disabled)]",
|
|
148
|
+
"disabled:[--color-tertiary:var(--dds-color-common-disabled)]"
|
|
149
|
+
],
|
|
150
|
+
false: [
|
|
151
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
152
|
+
"enabled:[--color-primary:var(--dds-color-common-brand-default)]",
|
|
153
|
+
"enabled:[--color-tertiary:var(--dds-color-common-brand-default)]",
|
|
154
|
+
"enabled:hover:[--color-primary:var(--dds-color-common-brand-hover)]",
|
|
155
|
+
"enabled:hover:[--color-secondary:var(--dds-color-common-surface-brand-hover)]",
|
|
156
|
+
"enabled:hover:[--color-tertiary:var(--dds-color-common-brand-hover)]",
|
|
157
|
+
"enabled:active:[--color-primary:var(--dds-color-common-brand-press)]",
|
|
158
|
+
"enabled:active:[--color-secondary:var(--dds-color-common-surface-brand-press)]",
|
|
159
|
+
"enabled:active:[--color-tertiary:var(--dds-color-common-brand-press)]",
|
|
160
|
+
"disabled:[--color-primary:var(--dds-color-common-disabled)]",
|
|
161
|
+
"disabled:[--color-tertiary:var(--dds-color-common-disabled)]"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
const cvaFilterChipText = cva(
|
|
168
|
+
["text-sm", "font-daikinSerif", "leading-[130%]", "px-1", "mr-0.5"],
|
|
169
|
+
{
|
|
170
|
+
variants: {
|
|
171
|
+
checked: {
|
|
172
|
+
true: ["text-ddt-color-common-text-inverse"],
|
|
173
|
+
false: ["text-(--color-primary)"]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
);
|
|
50
178
|
let DaikinChip = class extends DDSElement {
|
|
51
179
|
constructor() {
|
|
52
180
|
super(...arguments);
|
|
181
|
+
this.checked = false;
|
|
182
|
+
this.disabled = false;
|
|
183
|
+
this.withCheckedIcon = false;
|
|
53
184
|
this.chipAriaLabel = null;
|
|
54
185
|
}
|
|
55
186
|
_handleRemoveClick(event) {
|
|
56
187
|
event.stopPropagation();
|
|
57
188
|
this.dispatchEvent(new Event("remove", { bubbles: true, composed: true }));
|
|
58
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Emits `before-select` event if necessary and returns whether we should proceed.
|
|
192
|
+
*
|
|
193
|
+
* 1. Emit "before-select" event.
|
|
194
|
+
* 2. Check and return whether the event is canceled.
|
|
195
|
+
*
|
|
196
|
+
* @returns `true` if we should proceed (event is emitted and not canceled). `false` otherwise.
|
|
197
|
+
*/
|
|
198
|
+
_emitBeforeSelect() {
|
|
199
|
+
return this.dispatchEvent(
|
|
200
|
+
new CustomEvent("before-select", {
|
|
201
|
+
bubbles: true,
|
|
202
|
+
cancelable: true
|
|
203
|
+
})
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Handles "click" event emitted by `daikin-chip` component when "filter" type is used.
|
|
208
|
+
*/
|
|
209
|
+
_handleChipClick(event) {
|
|
210
|
+
event.stopImmediatePropagation();
|
|
211
|
+
if (!this._emitBeforeSelect()) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.checked = !this.checked;
|
|
215
|
+
this.dispatchEvent(
|
|
216
|
+
new CustomEvent("select", {
|
|
217
|
+
detail: { checked: this.checked },
|
|
218
|
+
bubbles: true,
|
|
219
|
+
composed: true
|
|
220
|
+
})
|
|
221
|
+
);
|
|
222
|
+
}
|
|
59
223
|
render() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
224
|
+
switch (this.type) {
|
|
225
|
+
case "input":
|
|
226
|
+
return html`
|
|
227
|
+
<div
|
|
228
|
+
role="group"
|
|
229
|
+
class=${cvaInputChipWrapper({ variant: this.variant })}
|
|
230
|
+
aria-label=${ifDefined(this.chipAriaLabel)}
|
|
231
|
+
>
|
|
232
|
+
<slot
|
|
233
|
+
name="left-icon"
|
|
234
|
+
class=${cvaInputChipIcon({ variant: this.variant })}
|
|
235
|
+
></slot>
|
|
236
|
+
<span class=${cvaInputChipText({ variant: this.variant })}>
|
|
237
|
+
<slot></slot>
|
|
238
|
+
</span>
|
|
239
|
+
<button
|
|
240
|
+
type="button"
|
|
241
|
+
class=${cvaRemoveButton({ variant: this.variant })}
|
|
242
|
+
aria-label="Remove"
|
|
243
|
+
@click=${this._handleRemoveClick}
|
|
244
|
+
>
|
|
245
|
+
<span
|
|
246
|
+
class="icon-[daikin--close] text-(--color-primary) size-4 flex-none"
|
|
247
|
+
></span>
|
|
248
|
+
</button>
|
|
249
|
+
</div>
|
|
250
|
+
`;
|
|
251
|
+
case "filter":
|
|
252
|
+
return html`<button
|
|
74
253
|
type="button"
|
|
75
|
-
class=${
|
|
76
|
-
aria-
|
|
77
|
-
|
|
254
|
+
class=${cvaFilterChipWrapper({ checked: this.checked })}
|
|
255
|
+
aria-pressed=${this.checked}
|
|
256
|
+
?disabled=${this.disabled}
|
|
257
|
+
@click=${this._handleChipClick}
|
|
78
258
|
>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
259
|
+
${this.withCheckedIcon && this.checked ? html`<span
|
|
260
|
+
class="icon-[daikin--check] text-(--color-primary) size-4 flex-none"
|
|
261
|
+
></span>` : nothing}
|
|
262
|
+
<span class=${cvaFilterChipText({ checked: this.checked })}>
|
|
263
|
+
<slot></slot>
|
|
264
|
+
</span>
|
|
265
|
+
</button>`;
|
|
266
|
+
}
|
|
83
267
|
}
|
|
84
268
|
/**
|
|
85
|
-
* Focuses on the inner remove button
|
|
269
|
+
* Focuses on the inner remove button or the chip button depending on the type.
|
|
86
270
|
* @param options focus options
|
|
87
271
|
*/
|
|
88
272
|
focus(options) {
|
|
@@ -96,8 +280,34 @@ DaikinChip.styles = css`
|
|
|
96
280
|
:host {
|
|
97
281
|
display: inline-flex;
|
|
98
282
|
width: max-content;
|
|
283
|
+
vertical-align: middle;
|
|
99
284
|
}
|
|
100
285
|
`;
|
|
286
|
+
__decorateClass([
|
|
287
|
+
property({
|
|
288
|
+
type: String,
|
|
289
|
+
reflect: true,
|
|
290
|
+
fallbackValue: "input",
|
|
291
|
+
isAllowedValue: oneOf(["input", "filter"])
|
|
292
|
+
})
|
|
293
|
+
], DaikinChip.prototype, "type", 2);
|
|
294
|
+
__decorateClass([
|
|
295
|
+
property({
|
|
296
|
+
type: String,
|
|
297
|
+
reflect: true,
|
|
298
|
+
fallbackValue: "outline",
|
|
299
|
+
isAllowedValue: oneOf(["fill", "outline"])
|
|
300
|
+
})
|
|
301
|
+
], DaikinChip.prototype, "variant", 2);
|
|
302
|
+
__decorateClass([
|
|
303
|
+
property({ type: Boolean, reflect: true })
|
|
304
|
+
], DaikinChip.prototype, "checked", 2);
|
|
305
|
+
__decorateClass([
|
|
306
|
+
property({ type: Boolean, reflect: true })
|
|
307
|
+
], DaikinChip.prototype, "disabled", 2);
|
|
308
|
+
__decorateClass([
|
|
309
|
+
property({ type: Boolean, reflect: true, attribute: "with-checked-icon" })
|
|
310
|
+
], DaikinChip.prototype, "withCheckedIcon", 2);
|
|
101
311
|
__decorateClass([
|
|
102
312
|
property({ type: String, reflect: true, attribute: "chip-aria-label" })
|
|
103
313
|
], DaikinChip.prototype, "chipAriaLabel", 2);
|