@daikin-oss/design-system-web-components 0.3.1 → 0.4.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 +107 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -10
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +105 -59
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +28 -14
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +121 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
- package/dist/cjs/components/breadcrumb/index.cjs +7 -0
- package/dist/cjs/components/breadcrumb/index.d.ts +1 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +124 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
- package/dist/cjs/components/breadcrumb-item/index.cjs +7 -0
- package/dist/cjs/components/breadcrumb-item/index.d.ts +1 -0
- package/dist/cjs/components/button/daikin-button.cjs +89 -128
- package/dist/cjs/components/button/daikin-button.d.ts +30 -28
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +99 -119
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -39
- package/dist/cjs/components/icon/daikin-icon.d.ts +4 -1
- package/dist/cjs/components/icon/icons.json.cjs +20 -0
- package/dist/cjs/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs/components/index.cjs +36 -6
- package/dist/cjs/components/index.d.ts +8 -2
- package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +6 -1
- package/dist/cjs/components/list/daikin-list.cjs +24 -0
- package/dist/cjs/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs/components/list/index.cjs +7 -0
- package/dist/cjs/components/list/index.d.ts +1 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +125 -0
- package/dist/cjs/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs/components/list-item/index.cjs +7 -0
- package/dist/cjs/components/list-item/index.d.ts +1 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs/components/notification/daikin-notification.d.ts +13 -12
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +161 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +69 -0
- package/dist/cjs/components/progress-bar/index.cjs +7 -0
- package/dist/cjs/components/progress-bar/index.d.ts +1 -0
- package/dist/cjs/components/radio/daikin-radio.cjs +73 -92
- package/dist/cjs/components/radio/daikin-radio.d.ts +23 -40
- package/dist/cjs/components/tab/daikin-tab.cjs +41 -46
- package/dist/cjs/components/tab/daikin-tab.d.ts +12 -13
- package/dist/cjs/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +8 -8
- package/dist/{cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts → cjs/components/tab-panels/daikin-tab-panels.d.ts} +17 -12
- package/dist/cjs/components/tab-panels/index.cjs +7 -0
- package/dist/cjs/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +29 -35
- package/dist/cjs/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -22
- package/dist/cjs/components/tabs/index.cjs +7 -0
- package/dist/cjs/components/tabs/index.d.ts +1 -0
- package/dist/cjs/components/text-input/daikin-text-input.cjs +4 -3
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +5 -1
- package/dist/cjs/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +5 -1
- package/dist/cjs/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +15 -27
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +223 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +80 -0
- package/dist/cjs/components/tooltip/index.cjs +7 -0
- package/dist/cjs/components/tooltip/index.d.ts +1 -0
- package/dist/cjs/index.cjs +36 -6
- package/dist/cjs/is-client.cjs +5 -0
- package/dist/cjs/is-client.d.ts +1 -0
- package/dist/cjs/tailwind.css.cjs +2 -2
- package/dist/cjs/type-utils.d.ts +0 -1
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -10
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +105 -59
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -14
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +121 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
- package/dist/cjs-dev/components/breadcrumb/index.cjs +7 -0
- package/dist/cjs-dev/components/breadcrumb/index.d.ts +1 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +124 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
- package/dist/cjs-dev/components/breadcrumb-item/index.cjs +7 -0
- package/dist/cjs-dev/components/breadcrumb-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/button/daikin-button.cjs +89 -128
- package/dist/cjs-dev/components/button/daikin-button.d.ts +30 -28
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +99 -119
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -39
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -1
- package/dist/cjs-dev/components/icon/icons.json.cjs +20 -0
- package/dist/cjs-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs-dev/components/index.cjs +36 -6
- package/dist/cjs-dev/components/index.d.ts +8 -2
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +6 -1
- package/dist/cjs-dev/components/list/daikin-list.cjs +24 -0
- package/dist/cjs-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs-dev/components/list/index.cjs +7 -0
- package/dist/cjs-dev/components/list/index.d.ts +1 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +125 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs-dev/components/list-item/index.cjs +7 -0
- package/dist/cjs-dev/components/list-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs-dev/components/notification/daikin-notification.d.ts +13 -12
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +176 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +69 -0
- package/dist/cjs-dev/components/progress-bar/index.cjs +7 -0
- package/dist/cjs-dev/components/progress-bar/index.d.ts +1 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +73 -92
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +23 -40
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +41 -46
- package/dist/cjs-dev/components/tab/daikin-tab.d.ts +12 -13
- package/dist/cjs-dev/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +9 -9
- package/dist/{cjs/components/panel-switcher/daikin-panel-switcher.d.ts → cjs-dev/components/tab-panels/daikin-tab-panels.d.ts} +17 -12
- package/dist/cjs-dev/components/tab-panels/index.cjs +7 -0
- package/dist/cjs-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs-dev/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +31 -37
- package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -22
- package/dist/cjs-dev/components/tabs/index.cjs +7 -0
- package/dist/cjs-dev/components/tabs/index.d.ts +1 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +4 -3
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +5 -1
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +5 -1
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +15 -27
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +223 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +80 -0
- package/dist/cjs-dev/components/tooltip/index.cjs +7 -0
- package/dist/cjs-dev/components/tooltip/index.d.ts +1 -0
- package/dist/cjs-dev/index.cjs +36 -6
- package/dist/cjs-dev/is-client.cjs +5 -0
- package/dist/cjs-dev/is-client.d.ts +1 -0
- package/dist/cjs-dev/tailwind.css.cjs +2 -2
- package/dist/cjs-dev/type-utils.d.ts +0 -1
- package/dist/es/components/accordion/daikin-accordion.d.ts +15 -10
- package/dist/es/components/accordion/daikin-accordion.js +32 -7
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -14
- package/dist/es/components/accordion-item/daikin-accordion-item.js +106 -60
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +122 -0
- package/dist/es/components/breadcrumb/index.d.ts +1 -0
- package/dist/es/components/breadcrumb/index.js +4 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +125 -0
- package/dist/es/components/breadcrumb-item/index.d.ts +1 -0
- package/dist/es/components/breadcrumb-item/index.js +4 -0
- package/dist/es/components/button/daikin-button.d.ts +30 -28
- package/dist/es/components/button/daikin-button.js +90 -129
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +27 -39
- package/dist/es/components/checkbox/daikin-checkbox.js +101 -121
- package/dist/es/components/icon/daikin-icon.d.ts +4 -1
- package/dist/es/components/icon/icons.json.d.ts +20 -0
- package/dist/es/components/icon/icons.json.js +20 -0
- package/dist/es/components/index.d.ts +8 -2
- package/dist/es/components/index.js +16 -4
- package/dist/es/components/input-group/daikin-input-group.d.ts +6 -1
- package/dist/es/components/input-group/daikin-input-group.js +1 -1
- package/dist/es/components/list/daikin-list.d.ts +28 -0
- package/dist/es/components/list/daikin-list.js +25 -0
- package/dist/es/components/list/index.d.ts +1 -0
- package/dist/es/components/list/index.js +4 -0
- package/dist/es/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es/components/list-item/daikin-list-item.js +126 -0
- package/dist/es/components/list-item/index.d.ts +1 -0
- package/dist/es/components/list-item/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +13 -12
- package/dist/es/components/notification/daikin-notification.js +15 -16
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +69 -0
- package/dist/es/components/progress-bar/daikin-progress-bar.js +162 -0
- package/dist/es/components/progress-bar/index.d.ts +1 -0
- package/dist/es/components/progress-bar/index.js +4 -0
- package/dist/es/components/radio/daikin-radio.d.ts +23 -40
- package/dist/es/components/radio/daikin-radio.js +74 -93
- package/dist/es/components/tab/daikin-tab.d.ts +12 -13
- package/dist/es/components/tab/daikin-tab.js +42 -47
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -12
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +9 -9
- package/dist/es/components/tab-panels/index.d.ts +1 -0
- package/dist/es/components/tab-panels/index.js +4 -0
- package/dist/es/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -22
- package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +30 -36
- package/dist/es/components/tabs/index.d.ts +1 -0
- package/dist/es/components/tabs/index.js +4 -0
- package/dist/es/components/text-input/daikin-text-input.d.ts +5 -1
- package/dist/es/components/text-input/daikin-text-input.js +4 -3
- package/dist/es/components/textarea/daikin-textarea.d.ts +5 -1
- package/dist/es/components/textarea/daikin-textarea.js +3 -3
- package/dist/es/components/toggle/daikin-toggle.d.ts +15 -27
- package/dist/es/components/toggle/daikin-toggle.js +45 -69
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +80 -0
- package/dist/es/components/tooltip/daikin-tooltip.js +224 -0
- package/dist/es/components/tooltip/index.d.ts +1 -0
- package/dist/es/components/tooltip/index.js +4 -0
- package/dist/es/index.js +16 -4
- package/dist/es/is-client.d.ts +1 -0
- package/dist/es/is-client.js +5 -0
- package/dist/es/tailwind.css.js +2 -2
- package/dist/es/type-utils.d.ts +0 -1
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -10
- package/dist/es-dev/components/accordion/daikin-accordion.js +32 -7
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -14
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +106 -60
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +122 -0
- package/dist/es-dev/components/breadcrumb/index.d.ts +1 -0
- package/dist/es-dev/components/breadcrumb/index.js +4 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +125 -0
- package/dist/es-dev/components/breadcrumb-item/index.d.ts +1 -0
- package/dist/es-dev/components/breadcrumb-item/index.js +4 -0
- package/dist/es-dev/components/button/daikin-button.d.ts +30 -28
- package/dist/es-dev/components/button/daikin-button.js +90 -129
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +27 -39
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +101 -121
- package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -1
- package/dist/es-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/es-dev/components/icon/icons.json.js +20 -0
- package/dist/es-dev/components/index.d.ts +8 -2
- package/dist/es-dev/components/index.js +16 -4
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +6 -1
- package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
- package/dist/es-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/es-dev/components/list/daikin-list.js +25 -0
- package/dist/es-dev/components/list/index.d.ts +1 -0
- package/dist/es-dev/components/list/index.js +4 -0
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es-dev/components/list-item/daikin-list-item.js +126 -0
- package/dist/es-dev/components/list-item/index.d.ts +1 -0
- package/dist/es-dev/components/list-item/index.js +4 -0
- package/dist/es-dev/components/notification/daikin-notification.d.ts +13 -12
- package/dist/es-dev/components/notification/daikin-notification.js +15 -16
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +69 -0
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +177 -0
- package/dist/es-dev/components/progress-bar/index.d.ts +1 -0
- package/dist/es-dev/components/progress-bar/index.js +4 -0
- package/dist/es-dev/components/radio/daikin-radio.d.ts +23 -40
- package/dist/es-dev/components/radio/daikin-radio.js +74 -93
- package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -13
- package/dist/es-dev/components/tab/daikin-tab.js +42 -47
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -12
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +10 -10
- package/dist/es-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/es-dev/components/tab-panels/index.js +4 -0
- package/dist/{cjs-dev/components/tab-group/daikin-tab-group.d.ts → es-dev/components/tabs/daikin-tabs.d.ts} +27 -22
- package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +32 -38
- package/dist/es-dev/components/tabs/index.d.ts +1 -0
- package/dist/es-dev/components/tabs/index.js +4 -0
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +5 -1
- package/dist/es-dev/components/text-input/daikin-text-input.js +4 -3
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +5 -1
- package/dist/es-dev/components/textarea/daikin-textarea.js +3 -3
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +15 -27
- package/dist/es-dev/components/toggle/daikin-toggle.js +45 -69
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +80 -0
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +224 -0
- package/dist/es-dev/components/tooltip/index.d.ts +1 -0
- package/dist/es-dev/components/tooltip/index.js +4 -0
- package/dist/es-dev/index.js +16 -4
- package/dist/es-dev/is-client.d.ts +1 -0
- package/dist/es-dev/is-client.js +5 -0
- package/dist/es-dev/tailwind.css.js +2 -2
- package/dist/es-dev/type-utils.d.ts +0 -1
- package/icons/checkbox-indeterminate.svg +2 -2
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/status-error.svg +3 -0
- package/icons/status-positive.svg +15 -0
- package/package.json +47 -44
- package/dist/cjs/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs/components/tab-group/index.cjs +0 -7
- package/dist/cjs/components/tab-group/index.d.ts +0 -1
- package/dist/cjs-dev/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs-dev/components/tab-group/index.cjs +0 -7
- package/dist/cjs-dev/components/tab-group/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/index.js +0 -4
- package/dist/es/components/tab-group/index.d.ts +0 -1
- package/dist/es/components/tab-group/index.js +0 -4
- package/dist/es-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/es-dev/components/panel-switcher/index.js +0 -4
- package/dist/es-dev/components/tab-group/index.d.ts +0 -1
- package/dist/es-dev/components/tab-group/index.js +0 -4
- package/icons/accordion-chevron-up.svg +0 -3
- package/icons/input-group-error.svg +0 -11
- package/icons/radio-checked.svg +0 -4
- package/icons/radio-unchecked.svg +0 -4
- /package/dist/cjs/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.js +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.js +0 -0
|
@@ -14,9 +14,27 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
16
|
exports.DaikinAccordion = class DaikinAccordion extends lit.LitElement {
|
|
17
|
+
_handleMoveFocus(event) {
|
|
18
|
+
const moveOffset = event.detail.direction === "up" ? -1 : 1;
|
|
19
|
+
const items = this._items;
|
|
20
|
+
const activeElement = document.activeElement;
|
|
21
|
+
const focusedItemIndex = activeElement ? items.findIndex((item) => item === activeElement) : -1;
|
|
22
|
+
if (focusedItemIndex < 0) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
for (let index = focusedItemIndex + moveOffset, i = 0; i < items.length; index += moveOffset, i++) {
|
|
26
|
+
index = Math.sign(index % items.length) === -1 ? items.length - 1 : index % items.length;
|
|
27
|
+
const item = items[index];
|
|
28
|
+
if (item.disabled) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
item.focus();
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
17
35
|
render() {
|
|
18
|
-
return lit.html`<div class="w-full
|
|
19
|
-
<slot></slot>
|
|
36
|
+
return lit.html`<div class="w-full">
|
|
37
|
+
<slot @accordion-move-focus=${this._handleMoveFocus}></slot>
|
|
20
38
|
</div>`;
|
|
21
39
|
}
|
|
22
40
|
};
|
|
@@ -24,14 +42,21 @@ exports.DaikinAccordion.styles = lit.css`
|
|
|
24
42
|
${lit.unsafeCSS(tailwind.default)}
|
|
25
43
|
|
|
26
44
|
:host {
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
min-width: 160px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
::slotted(daikin-accordion-item) {
|
|
49
|
+
--divider-top-display: block;
|
|
50
|
+
--divider-bottom-display: none;
|
|
29
51
|
}
|
|
30
52
|
|
|
31
|
-
::slotted(daikin-accordion-item:
|
|
32
|
-
|
|
53
|
+
::slotted(daikin-accordion-item:last-child) {
|
|
54
|
+
--divider-bottom-display: block;
|
|
33
55
|
}
|
|
34
56
|
`;
|
|
57
|
+
__decorateClass([
|
|
58
|
+
decorators_js.queryAssignedElements({ selector: "daikin-accordion-item" })
|
|
59
|
+
], exports.DaikinAccordion.prototype, "_items", 2);
|
|
35
60
|
exports.DaikinAccordion = __decorateClass([
|
|
36
61
|
decorators_js.customElement("daikin-accordion")
|
|
37
62
|
], exports.DaikinAccordion);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* The accordion component serves as the parent element that organizes and manages the overall structure of the accordion.
|
|
5
4
|
* Currently it only provides appropriate styles for individual accordion items.
|
|
@@ -11,25 +10,31 @@ import { LitElement } from 'lit';
|
|
|
11
10
|
*
|
|
12
11
|
* @example
|
|
13
12
|
*
|
|
13
|
+
* ```js
|
|
14
|
+
* import "@daikin-oss/design-system-web-components/components/accordion/index.js";
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
14
17
|
* ```html
|
|
15
18
|
* <daikin-accordion>
|
|
16
|
-
* <daikin-accordion-item
|
|
17
|
-
* Accordion 1
|
|
18
|
-
*
|
|
19
|
-
* <daikin-accordion-item title="The second accordion item" open>
|
|
20
|
-
* Accordion 2 content.
|
|
19
|
+
* <daikin-accordion-item>
|
|
20
|
+
* <span slot="summary">Accordion summary 1</span>
|
|
21
|
+
* Accordion content 1
|
|
21
22
|
* </daikin-accordion-item>
|
|
22
|
-
* <daikin-accordion-item
|
|
23
|
-
* Accordion
|
|
23
|
+
* <daikin-accordion-item open>
|
|
24
|
+
* <span slot="summary">Accordion summary 2</span>
|
|
25
|
+
* Accordion content 2
|
|
24
26
|
* </daikin-accordion-item>
|
|
25
|
-
* <daikin-accordion-item
|
|
26
|
-
* Accordion
|
|
27
|
+
* <daikin-accordion-item disabled>
|
|
28
|
+
* <span slot="summary">Accordion summary 3</span>
|
|
29
|
+
* Accordion content 3
|
|
27
30
|
* </daikin-accordion-item>
|
|
28
31
|
* </daikin-accordion>
|
|
29
32
|
* ```
|
|
30
33
|
*/
|
|
31
34
|
export declare class DaikinAccordion extends LitElement {
|
|
32
35
|
static readonly styles: import('lit').CSSResult;
|
|
36
|
+
private readonly _items;
|
|
37
|
+
private _handleMoveFocus;
|
|
33
38
|
render(): import('lit-html').TemplateResult<1>;
|
|
34
39
|
}
|
|
35
40
|
declare global {
|
|
@@ -15,55 +15,38 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
15
|
if (kind && result) __defProp(target, key, result);
|
|
16
16
|
return result;
|
|
17
17
|
};
|
|
18
|
-
const cvaDetails = classVarianceAuthority.cva(
|
|
19
|
-
["flex", "w-full", "h-max", "bg-white", "font-daikinSerif", "overflow-clip"],
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
status: {
|
|
23
|
-
enabled: [],
|
|
24
|
-
disabled: ["text-[#DCDCDC]"]
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
18
|
const cvaSummary = classVarianceAuthority.cva(
|
|
30
19
|
[
|
|
31
20
|
"flex",
|
|
21
|
+
"justify-between",
|
|
32
22
|
"items-center",
|
|
23
|
+
"gap-2",
|
|
33
24
|
"w-full",
|
|
34
|
-
"h-12",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"after:
|
|
43
|
-
"after:
|
|
44
|
-
"after:
|
|
45
|
-
"after:absolute",
|
|
46
|
-
"after:i-daikin-accordion-chevron-up",
|
|
47
|
-
"after:transition-all"
|
|
25
|
+
"min-h-12",
|
|
26
|
+
"py-3",
|
|
27
|
+
"pr-3",
|
|
28
|
+
"pl-4",
|
|
29
|
+
"focus-visible:outline",
|
|
30
|
+
"focus-visible:outline-2",
|
|
31
|
+
"focus-visible:-outline-offset-2",
|
|
32
|
+
"focus-visible:outline-daikinBlue-700",
|
|
33
|
+
"after:size-6",
|
|
34
|
+
"after:transition-all",
|
|
35
|
+
"after:i-daikin-chevron-down"
|
|
48
36
|
],
|
|
49
37
|
{
|
|
50
38
|
variants: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
open: {
|
|
40
|
+
false: ["after:rotate-0"],
|
|
41
|
+
true: ["after:rotate-180"]
|
|
54
42
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"hover:bg-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"focus-visible:outline",
|
|
61
|
-
"focus-visible:outline-[2px]",
|
|
62
|
-
"focus-visible:outline-[#0097E0]",
|
|
63
|
-
"focus-visible:outline-offset-[-2px]",
|
|
64
|
-
"after:text-[#828282]"
|
|
43
|
+
disabled: {
|
|
44
|
+
false: [
|
|
45
|
+
"hover:bg-daikinNeutral-100",
|
|
46
|
+
"cursor-pointer",
|
|
47
|
+
"active:bg-daikinNeutral-200"
|
|
65
48
|
],
|
|
66
|
-
|
|
49
|
+
true: ["text-daikinNeutral-200", "after:text-daikinNeutral-200"]
|
|
67
50
|
}
|
|
68
51
|
}
|
|
69
52
|
}
|
|
@@ -82,7 +65,6 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
82
65
|
constructor() {
|
|
83
66
|
super(...arguments);
|
|
84
67
|
this._contentRef = ref_js.createRef();
|
|
85
|
-
this.title = "";
|
|
86
68
|
this.open = false;
|
|
87
69
|
this.disabled = false;
|
|
88
70
|
this._detailsOpen = false;
|
|
@@ -108,36 +90,69 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
108
90
|
};
|
|
109
91
|
}
|
|
110
92
|
}
|
|
111
|
-
_handleSummaryClick(
|
|
112
|
-
|
|
93
|
+
_handleSummaryClick(event) {
|
|
94
|
+
event.preventDefault();
|
|
113
95
|
if (this.disabled) {
|
|
114
96
|
return;
|
|
115
97
|
}
|
|
116
98
|
this.open = !this.open;
|
|
117
99
|
}
|
|
100
|
+
_handleKeyDown(event) {
|
|
101
|
+
const direction = {
|
|
102
|
+
ArrowDown: "down",
|
|
103
|
+
ArrowUp: "up"
|
|
104
|
+
}[event.key];
|
|
105
|
+
if (!direction) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
this.dispatchEvent(
|
|
110
|
+
new CustomEvent("accordion-move-focus", {
|
|
111
|
+
detail: {
|
|
112
|
+
direction
|
|
113
|
+
},
|
|
114
|
+
bubbles: true
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
// When using the in-page search, the `<details>` element may open without clicking on the `<summary>`.
|
|
119
|
+
// In order to handle such cases, it is necessary to respond to the "toggle" event.
|
|
120
|
+
_handleToggle(event) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
if (this.disabled) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.open = event.newState === "open";
|
|
126
|
+
}
|
|
118
127
|
render() {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
});
|
|
122
|
-
const accordionSummaryClassName = cvaSummary({
|
|
123
|
-
status: this.disabled ? "disabled" : "enabled",
|
|
124
|
-
visible: this.open ? "open" : "close"
|
|
125
|
-
});
|
|
128
|
+
const detailsOpen = !this.disabled && this._detailsOpen;
|
|
129
|
+
const open = !this.disabled && this.open;
|
|
126
130
|
return lit.html`<details
|
|
127
|
-
class
|
|
128
|
-
?open=${
|
|
129
|
-
?data-open=${
|
|
131
|
+
class="flex w-full bg-white font-daikinSerif overflow-clip"
|
|
132
|
+
?open=${detailsOpen}
|
|
133
|
+
?data-open=${open}
|
|
130
134
|
aria-disabled=${this.disabled}
|
|
135
|
+
@toggle=${this._handleToggle}
|
|
131
136
|
>
|
|
132
137
|
<summary
|
|
133
|
-
|
|
138
|
+
id="summary"
|
|
139
|
+
class=${cvaSummary({
|
|
140
|
+
open,
|
|
141
|
+
disabled: this.disabled
|
|
142
|
+
})}
|
|
134
143
|
tabindex=${this.disabled ? -1 : 0}
|
|
135
144
|
@click=${this._handleSummaryClick}
|
|
145
|
+
@keydown=${this._handleKeyDown}
|
|
136
146
|
>
|
|
137
|
-
|
|
147
|
+
<slot name="summary"></slot>
|
|
138
148
|
</summary>
|
|
139
|
-
<div
|
|
140
|
-
|
|
149
|
+
<div
|
|
150
|
+
${ref_js.ref(this._contentRef)}
|
|
151
|
+
role="region"
|
|
152
|
+
aria-labelledby="summary"
|
|
153
|
+
?hidden=${this.disabled}
|
|
154
|
+
>
|
|
155
|
+
<div class="pt-2 pr-3 pb-3 pl-4">
|
|
141
156
|
<slot></slot>
|
|
142
157
|
</div>
|
|
143
158
|
</div>
|
|
@@ -151,24 +166,55 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
151
166
|
this._contentAnimate();
|
|
152
167
|
}
|
|
153
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Focuses on the inner summary.
|
|
171
|
+
* @param options focus options
|
|
172
|
+
*/
|
|
173
|
+
focus(options) {
|
|
174
|
+
var _a;
|
|
175
|
+
(_a = this._summary) == null ? void 0 : _a.focus(options);
|
|
176
|
+
}
|
|
154
177
|
};
|
|
155
178
|
exports.DaikinAccordionItem.styles = lit.css`
|
|
156
179
|
${lit.unsafeCSS(tailwind.default)}
|
|
157
180
|
|
|
158
181
|
:host {
|
|
182
|
+
--divider-top-display: none;
|
|
183
|
+
--divider-bottom-display: none;
|
|
184
|
+
|
|
159
185
|
display: block;
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host::before {
|
|
190
|
+
content: "";
|
|
191
|
+
display: var(--divider-top-display, none);
|
|
160
192
|
width: 100%;
|
|
193
|
+
height: 1px;
|
|
194
|
+
background: #828282;
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:host::after {
|
|
200
|
+
content: "";
|
|
201
|
+
display: var(--divider-bottom-display, none);
|
|
202
|
+
width: 100%;
|
|
203
|
+
height: 1px;
|
|
204
|
+
background: #828282;
|
|
205
|
+
position: absolute;
|
|
206
|
+
bottom: 0;
|
|
161
207
|
}
|
|
162
208
|
`;
|
|
163
|
-
__decorateClass([
|
|
164
|
-
decorators_js.property({ type: String })
|
|
165
|
-
], exports.DaikinAccordionItem.prototype, "title", 2);
|
|
166
209
|
__decorateClass([
|
|
167
210
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
168
211
|
], exports.DaikinAccordionItem.prototype, "open", 2);
|
|
169
212
|
__decorateClass([
|
|
170
213
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
171
214
|
], exports.DaikinAccordionItem.prototype, "disabled", 2);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
decorators_js.query("summary")
|
|
217
|
+
], exports.DaikinAccordionItem.prototype, "_summary", 2);
|
|
172
218
|
__decorateClass([
|
|
173
219
|
decorators_js.state()
|
|
174
220
|
], exports.DaikinAccordionItem.prototype, "_detailsOpen", 2);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* The accordion item component is a child element within the `daikin-accordion` component.
|
|
5
4
|
* It functions similarly to the HTML `<details>` and `<summary>` tag, allowing users to expand or collapse the associated content by clicking on the header.
|
|
@@ -9,12 +8,21 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
9
8
|
* - `daikin-accordion` > `daikin-accordion-item`
|
|
10
9
|
*
|
|
11
10
|
* @slot - A slot for the accordion item content.
|
|
11
|
+
* @slot summary - A slot for the accordion item summary content.
|
|
12
|
+
*
|
|
13
|
+
* @cssprop [--divider-top-display=none] - The `display` property of the top divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
14
|
+
* @cssprop [--divider-bottom-display=none] - The `display` property of the bottom divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
12
15
|
*
|
|
13
16
|
* @example
|
|
14
17
|
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/accordion-item/index.js";
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
15
22
|
* ```html
|
|
16
|
-
* <daikin-accordion-item
|
|
17
|
-
* Accordion
|
|
23
|
+
* <daikin-accordion-item>
|
|
24
|
+
* <span slot="Accordion summary">
|
|
25
|
+
* Accordion content
|
|
18
26
|
* </daikin-accordion-item>
|
|
19
27
|
* ```
|
|
20
28
|
*/
|
|
@@ -22,31 +30,37 @@ export declare class DaikinAccordionItem extends LitElement {
|
|
|
22
30
|
static readonly styles: import('lit').CSSResult;
|
|
23
31
|
private _contentRef;
|
|
24
32
|
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
title: string;
|
|
28
|
-
/**
|
|
29
|
-
* Whether the accordion is open
|
|
33
|
+
* Whether the accordion item is open.
|
|
34
|
+
* Ignored if `disabled` is `true`.
|
|
30
35
|
*/
|
|
31
36
|
open: boolean;
|
|
32
37
|
/**
|
|
33
|
-
* Whether the accordion is disabled
|
|
38
|
+
* Whether the accordion item is disabled.
|
|
39
|
+
* If this is set to `true`, the accordion item will always be closed.
|
|
34
40
|
*/
|
|
35
41
|
disabled: boolean;
|
|
42
|
+
private _summary;
|
|
36
43
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* The default `open` attribute of the default details element does not allow the display of content to have transitions.
|
|
40
|
-
* To solve this, the `open` property that `daikin-accordion-item` receives manages the opening and closing of items independently of the open attribute.
|
|
44
|
+
* Actual presence of `open` attribute of the `<details>` element.
|
|
41
45
|
*
|
|
42
|
-
* The
|
|
46
|
+
* The `<details>` element does not support animation on changing the `open` attribute.
|
|
47
|
+
* In other words, the content is hidden immediately when the `open` attribute is removed.
|
|
48
|
+
* To enable animation for an accordion, we need to run the animation while maintaining the `open` attribute, and then remove the `open` attribute at the end of the animation.
|
|
49
|
+
* Treated as `false` if `disabled` is `true`.
|
|
43
50
|
*/
|
|
44
51
|
private _detailsOpen;
|
|
45
52
|
private _contentAnimate;
|
|
46
53
|
private _handleSummaryClick;
|
|
54
|
+
private _handleKeyDown;
|
|
55
|
+
private _handleToggle;
|
|
47
56
|
render(): import('lit-html').TemplateResult<1>;
|
|
48
57
|
protected firstUpdated(): void;
|
|
49
58
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Focuses on the inner summary.
|
|
61
|
+
* @param options focus options
|
|
62
|
+
*/
|
|
63
|
+
focus(options?: FocusOptions | undefined): void;
|
|
50
64
|
}
|
|
51
65
|
declare global {
|
|
52
66
|
interface HTMLElementTagNameMap {
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const lit = require("lit");
|
|
4
|
+
const decorators_js = require("lit/decorators.js");
|
|
5
|
+
const ref_js = require("lit/directives/ref.js");
|
|
6
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
exports.DaikinBreadcrumb = class DaikinBreadcrumb extends lit.LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
21
|
+
this._omit();
|
|
22
|
+
});
|
|
23
|
+
this._divWrapRef = ref_js.createRef();
|
|
24
|
+
this.trailingSlash = false;
|
|
25
|
+
this.overflow = "visible";
|
|
26
|
+
this._expandedContentWidth = 0;
|
|
27
|
+
this.omitted = false;
|
|
28
|
+
}
|
|
29
|
+
get _isEllipsis() {
|
|
30
|
+
return this.overflow === "ellipsis";
|
|
31
|
+
}
|
|
32
|
+
_omit() {
|
|
33
|
+
const shouldOmit = this._isEllipsis && this.offsetWidth < this._expandedContentWidth;
|
|
34
|
+
if (this.omitted === shouldOmit) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
this.omitted = shouldOmit;
|
|
38
|
+
const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
|
|
39
|
+
for (const [index, item] of daikinBreadCrumbItems.entries()) {
|
|
40
|
+
let mode = "normal";
|
|
41
|
+
if (shouldOmit) {
|
|
42
|
+
if (index === 0 || index >= daikinBreadCrumbItems.length - 2) {
|
|
43
|
+
continue;
|
|
44
|
+
} else if (index === 1) {
|
|
45
|
+
mode = "ellipsis";
|
|
46
|
+
} else {
|
|
47
|
+
mode = "hidden";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
item.hidden = mode === "hidden";
|
|
51
|
+
item.variant = mode === "ellipsis" ? "ellipsis" : "normal";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_updateBreadcrumbs() {
|
|
55
|
+
const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
|
|
56
|
+
for (const [index, item] of daikinBreadCrumbItems.entries()) {
|
|
57
|
+
const isLast = index === daikinBreadCrumbItems.length - 1;
|
|
58
|
+
item.trailingSlash = !isLast || this.trailingSlash;
|
|
59
|
+
item.last = isLast;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
_handleChange() {
|
|
63
|
+
this._updateBreadcrumbs();
|
|
64
|
+
}
|
|
65
|
+
_handleResizeObserver() {
|
|
66
|
+
if (this._isEllipsis) {
|
|
67
|
+
this.resizeObserver.observe(this);
|
|
68
|
+
} else {
|
|
69
|
+
this.resizeObserver.disconnect();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return lit.html`
|
|
74
|
+
<div class="flex gap-2" ${ref_js.ref(this._divWrapRef)}>
|
|
75
|
+
<slot @slotchange=${this._handleChange}></slot>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
updated(changedProperties) {
|
|
80
|
+
if (changedProperties.has("trailingSlash")) {
|
|
81
|
+
this._updateBreadcrumbs();
|
|
82
|
+
}
|
|
83
|
+
if (changedProperties.has("overflow")) {
|
|
84
|
+
this._omit();
|
|
85
|
+
this._handleResizeObserver();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
firstUpdated() {
|
|
89
|
+
this._updateBreadcrumbs();
|
|
90
|
+
this._omit();
|
|
91
|
+
this._handleResizeObserver();
|
|
92
|
+
this.updateComplete.then(() => {
|
|
93
|
+
const divElement = this._divWrapRef.value;
|
|
94
|
+
if (!divElement) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this._expandedContentWidth = divElement.offsetWidth;
|
|
98
|
+
}).catch(() => {
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.DaikinBreadcrumb.styles = lit.css`
|
|
103
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
104
|
+
|
|
105
|
+
:host {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
__decorateClass([
|
|
111
|
+
decorators_js.queryAssignedElements()
|
|
112
|
+
], exports.DaikinBreadcrumb.prototype, "_slottedDaikinBreadCrumbItems", 2);
|
|
113
|
+
__decorateClass([
|
|
114
|
+
decorators_js.property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
|
|
115
|
+
], exports.DaikinBreadcrumb.prototype, "trailingSlash", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
decorators_js.property({ type: String, reflect: true })
|
|
118
|
+
], exports.DaikinBreadcrumb.prototype, "overflow", 2);
|
|
119
|
+
exports.DaikinBreadcrumb = __decorateClass([
|
|
120
|
+
decorators_js.customElement("daikin-breadcrumb")
|
|
121
|
+
], exports.DaikinBreadcrumb);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* `daikin-breadcrumb` is a component for representing a breadcrumb list, and is used together with the `daikin-breadcrumb-item` component.
|
|
4
|
+
*
|
|
5
|
+
* Hierarchy:
|
|
6
|
+
* - `daikin-breadcrumb` > `daikin-breadcrumb-item`
|
|
7
|
+
*
|
|
8
|
+
* @slot - A slot for breadcrumb items. Place `breadcrumb-item` elements here.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```js
|
|
13
|
+
* import "@daikin-oss/design-system-web-components/components/breadcrumb/index.js";
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <daikin-breadcrumb>
|
|
18
|
+
* <daikin-breadcrumb-item href="#">
|
|
19
|
+
* Breadcrumb Item 1
|
|
20
|
+
* </daikin-breadcrumb-item>
|
|
21
|
+
* <daikin-breadcrumb-item href="#">
|
|
22
|
+
* Breadcrumb Item 2
|
|
23
|
+
* </daikin-breadcrumb-item>
|
|
24
|
+
* </daikin-breadcrumb>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class DaikinBreadcrumb extends LitElement {
|
|
28
|
+
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
private resizeObserver;
|
|
30
|
+
private _slottedDaikinBreadCrumbItems;
|
|
31
|
+
private _divWrapRef;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the last breadcrumb item should have trailing slash.
|
|
34
|
+
*/
|
|
35
|
+
trailingSlash: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Specifies overflow.
|
|
38
|
+
* If `ellipsis`, some breadcrumb items will be omitted when the total width exceeds the container width.
|
|
39
|
+
*/
|
|
40
|
+
overflow: "visible" | "ellipsis";
|
|
41
|
+
private _expandedContentWidth;
|
|
42
|
+
private omitted;
|
|
43
|
+
get _isEllipsis(): boolean;
|
|
44
|
+
private _omit;
|
|
45
|
+
private _updateBreadcrumbs;
|
|
46
|
+
private _handleChange;
|
|
47
|
+
private _handleResizeObserver;
|
|
48
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
49
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
50
|
+
firstUpdated(): void;
|
|
51
|
+
}
|
|
52
|
+
declare global {
|
|
53
|
+
interface HTMLElementTagNameMap {
|
|
54
|
+
"daikin-breadcrumb": DaikinBreadcrumb;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinBreadcrumb = require("./daikin-breadcrumb.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinBreadcrumb", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinBreadcrumb.DaikinBreadcrumb
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-breadcrumb';
|