@daikin-oss/design-system-web-components 0.2.0 → 0.3.2
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 +44 -0
- package/README.md +47 -7
- package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +39 -0
- package/dist/cjs/components/accordion/index.cjs +7 -0
- package/dist/cjs/components/accordion/index.d.ts +1 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +177 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +55 -0
- package/dist/cjs/components/accordion-item/index.cjs +7 -0
- package/dist/cjs/components/accordion-item/index.d.ts +1 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +124 -0
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +52 -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 +116 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -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 +25 -7
- package/dist/cjs/components/button/daikin-button.d.ts +21 -4
- package/dist/cjs/components/button/index.cjs +7 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +11 -2
- package/dist/cjs/components/checkbox/index.cjs +7 -0
- package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
- package/dist/cjs/components/icon/daikin-icon.d.ts +48 -0
- package/dist/cjs/components/icon/icons.json.cjs +29 -0
- package/dist/cjs/components/icon/icons.json.d.ts +31 -0
- package/dist/cjs/components/icon/index.cjs +8 -0
- package/dist/cjs/components/icon/index.d.ts +1 -0
- package/dist/cjs/components/index.cjs +93 -0
- package/dist/cjs/components/index.d.ts +11 -0
- package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +27 -2
- package/dist/cjs/components/input-group/index.cjs +7 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +15 -33
- package/dist/cjs/components/notification/daikin-notification.d.ts +21 -8
- package/dist/cjs/components/notification/index.cjs +7 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
- package/dist/cjs/components/panel-switcher/index.cjs +7 -0
- package/dist/cjs/components/panel-switcher/index.d.ts +1 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +137 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +47 -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.d.ts +11 -2
- package/dist/cjs/components/radio/index.cjs +7 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
- package/dist/cjs/components/tab/daikin-tab.d.ts +54 -0
- package/dist/cjs/components/tab/index.cjs +7 -0
- package/dist/cjs/components/tab/index.d.ts +1 -0
- package/dist/cjs/components/tab-group/daikin-tab-group.cjs +211 -0
- package/dist/cjs/components/tab-group/daikin-tab-group.d.ts +104 -0
- package/dist/cjs/components/tab-group/index.cjs +7 -0
- package/dist/cjs/components/tab-group/index.d.ts +1 -0
- package/dist/cjs/components/tab-group/scroller.cjs +65 -0
- package/dist/cjs/components/tab-group/scroller.d.ts +25 -0
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +16 -2
- package/dist/cjs/components/text-input/index.cjs +7 -0
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +16 -2
- package/dist/cjs/components/textarea/index.cjs +7 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +60 -0
- package/dist/cjs/components/toggle/index.cjs +7 -0
- package/dist/cjs/components/toggle/index.d.ts +1 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +223 -0
- package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +76 -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 +56 -0
- 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/colors.cjs +80 -0
- package/dist/cjs-dev/colors.d.ts +69 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +39 -0
- package/dist/cjs-dev/components/accordion/index.cjs +7 -0
- package/dist/cjs-dev/components/accordion/index.d.ts +1 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +177 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +55 -0
- package/dist/cjs-dev/components/accordion-item/index.cjs +7 -0
- package/dist/cjs-dev/components/accordion-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +124 -0
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +52 -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 +116 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -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 +215 -0
- package/dist/cjs-dev/components/button/daikin-button.d.ts +76 -0
- package/dist/cjs-dev/components/button/index.cjs +7 -0
- package/dist/cjs-dev/components/button/index.d.ts +1 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +183 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +77 -0
- package/dist/cjs-dev/components/checkbox/index.cjs +7 -0
- package/dist/cjs-dev/components/checkbox/index.d.ts +1 -0
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +96 -0
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +48 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +29 -0
- package/dist/cjs-dev/components/icon/icons.json.d.ts +31 -0
- package/dist/cjs-dev/components/icon/index.cjs +8 -0
- package/dist/cjs-dev/components/icon/index.d.ts +1 -0
- package/dist/cjs-dev/components/index.cjs +93 -0
- package/dist/cjs-dev/components/index.d.ts +18 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +119 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +72 -0
- package/dist/cjs-dev/components/input-group/index.cjs +7 -0
- package/dist/cjs-dev/components/input-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +191 -0
- package/dist/cjs-dev/components/notification/daikin-notification.d.ts +75 -0
- package/dist/cjs-dev/components/notification/index.cjs +7 -0
- package/dist/cjs-dev/components/notification/index.d.ts +1 -0
- package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.cjs +62 -0
- package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
- package/dist/cjs-dev/components/panel-switcher/index.cjs +7 -0
- package/dist/cjs-dev/components/panel-switcher/index.d.ts +1 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +152 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +47 -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 +150 -0
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +75 -0
- package/dist/cjs-dev/components/radio/index.cjs +7 -0
- package/dist/cjs-dev/components/radio/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +126 -0
- package/dist/cjs-dev/components/tab/daikin-tab.d.ts +54 -0
- package/dist/cjs-dev/components/tab/index.cjs +7 -0
- package/dist/cjs-dev/components/tab/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab-group/daikin-tab-group.cjs +221 -0
- package/dist/cjs-dev/components/tab-group/daikin-tab-group.d.ts +104 -0
- package/dist/cjs-dev/components/tab-group/index.cjs +7 -0
- package/dist/cjs-dev/components/tab-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab-group/scroller.cjs +65 -0
- package/dist/cjs-dev/components/tab-group/scroller.d.ts +25 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +137 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +68 -0
- package/dist/cjs-dev/components/text-input/index.cjs +7 -0
- package/dist/cjs-dev/components/text-input/index.d.ts +1 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +168 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +70 -0
- package/dist/cjs-dev/components/textarea/index.cjs +7 -0
- package/dist/cjs-dev/components/textarea/index.d.ts +1 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +132 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +60 -0
- package/dist/cjs-dev/components/toggle/index.cjs +7 -0
- package/dist/cjs-dev/components/toggle/index.d.ts +1 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +223 -0
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +76 -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/constants/events.cjs +4 -0
- package/dist/cjs-dev/constants/events.d.ts +1 -0
- package/dist/cjs-dev/index.cjs +95 -0
- package/dist/cjs-dev/index.d.ts +3 -0
- package/dist/cjs-dev/is-client.cjs +5 -0
- package/dist/cjs-dev/is-client.d.ts +1 -0
- package/dist/cjs-dev/lit-analyzer-types.d.ts +112 -0
- package/dist/cjs-dev/tailwind.css.cjs +6 -0
- package/dist/cjs-dev/type-utils.d.ts +24 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +39 -0
- package/dist/es/components/accordion/daikin-accordion.js +38 -0
- package/dist/es/components/accordion/index.d.ts +1 -0
- package/dist/es/components/accordion/index.js +4 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +55 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.js +178 -0
- package/dist/es/components/accordion-item/index.d.ts +1 -0
- package/dist/es/components/accordion-item/index.js +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +125 -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 +62 -0
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +117 -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 +21 -4
- package/dist/es/components/button/daikin-button.js +25 -7
- package/dist/es/components/button/index.js +4 -0
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +11 -2
- package/dist/es/components/checkbox/index.js +4 -0
- package/dist/es/components/icon/daikin-icon.d.ts +48 -0
- package/dist/es/components/icon/daikin-icon.js +88 -0
- package/dist/es/components/icon/icons.json.d.ts +31 -0
- package/dist/es/components/icon/icons.json.js +29 -0
- package/dist/es/components/icon/index.d.ts +1 -0
- package/dist/es/components/icon/index.js +5 -0
- package/dist/es/components/index.d.ts +11 -0
- package/dist/es/components/index.js +39 -0
- package/dist/es/components/input-group/daikin-input-group.d.ts +27 -2
- package/dist/es/components/input-group/daikin-input-group.js +1 -1
- package/dist/es/components/input-group/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +21 -8
- package/dist/es/components/notification/daikin-notification.js +15 -33
- package/dist/es/components/notification/index.js +4 -0
- package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
- package/dist/es/components/panel-switcher/daikin-panel-switcher.js +56 -0
- package/dist/es/components/panel-switcher/index.d.ts +1 -0
- package/dist/es/components/panel-switcher/index.js +4 -0
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +47 -0
- package/dist/es/components/progress-bar/daikin-progress-bar.js +138 -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 +11 -2
- package/dist/es/components/radio/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.d.ts +54 -0
- package/dist/es/components/tab/daikin-tab.js +127 -0
- package/dist/es/components/tab/index.d.ts +1 -0
- package/dist/es/components/tab/index.js +4 -0
- package/dist/es/components/tab-group/daikin-tab-group.d.ts +104 -0
- package/dist/es/components/tab-group/daikin-tab-group.js +212 -0
- package/dist/es/components/tab-group/index.d.ts +1 -0
- package/dist/es/components/tab-group/index.js +4 -0
- package/dist/es/components/tab-group/scroller.d.ts +25 -0
- package/dist/es/components/tab-group/scroller.js +65 -0
- package/dist/es/components/text-input/daikin-text-input.d.ts +16 -2
- package/dist/es/components/text-input/index.js +4 -0
- package/dist/es/components/textarea/daikin-textarea.d.ts +16 -2
- package/dist/es/components/textarea/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +60 -0
- package/dist/es/components/toggle/daikin-toggle.js +133 -0
- package/dist/es/components/toggle/index.d.ts +1 -0
- package/dist/es/components/toggle/index.js +4 -0
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +76 -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 +24 -1
- 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/colors.d.ts +69 -0
- package/dist/es-dev/colors.js +80 -0
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +39 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +38 -0
- package/dist/es-dev/components/accordion/index.d.ts +1 -0
- package/dist/es-dev/components/accordion/index.js +4 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +55 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +178 -0
- package/dist/es-dev/components/accordion-item/index.d.ts +1 -0
- package/dist/es-dev/components/accordion-item/index.js +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +125 -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 +62 -0
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +117 -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 +76 -0
- package/dist/es-dev/components/button/daikin-button.js +216 -0
- package/dist/es-dev/components/button/index.d.ts +1 -0
- package/dist/es-dev/components/button/index.js +4 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +77 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +184 -0
- package/dist/es-dev/components/checkbox/index.d.ts +1 -0
- package/dist/es-dev/components/checkbox/index.js +4 -0
- package/dist/es-dev/components/icon/daikin-icon.d.ts +48 -0
- package/dist/es-dev/components/icon/daikin-icon.js +97 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +31 -0
- package/dist/es-dev/components/icon/icons.json.js +29 -0
- package/dist/es-dev/components/icon/index.d.ts +1 -0
- package/dist/es-dev/components/icon/index.js +5 -0
- package/dist/es-dev/components/index.d.ts +18 -0
- package/dist/es-dev/components/index.js +39 -0
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +72 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +120 -0
- package/dist/es-dev/components/input-group/index.d.ts +1 -0
- package/dist/es-dev/components/input-group/index.js +4 -0
- package/dist/es-dev/components/notification/daikin-notification.d.ts +75 -0
- package/dist/es-dev/components/notification/daikin-notification.js +192 -0
- package/dist/es-dev/components/notification/index.d.ts +1 -0
- package/dist/es-dev/components/notification/index.js +4 -0
- package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
- package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.js +63 -0
- package/dist/es-dev/components/panel-switcher/index.d.ts +1 -0
- package/dist/es-dev/components/panel-switcher/index.js +4 -0
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +47 -0
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +153 -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 +75 -0
- package/dist/es-dev/components/radio/daikin-radio.js +151 -0
- package/dist/es-dev/components/radio/index.d.ts +1 -0
- package/dist/es-dev/components/radio/index.js +4 -0
- package/dist/es-dev/components/tab/daikin-tab.d.ts +54 -0
- package/dist/es-dev/components/tab/daikin-tab.js +127 -0
- package/dist/es-dev/components/tab/index.d.ts +1 -0
- package/dist/es-dev/components/tab/index.js +4 -0
- package/dist/es-dev/components/tab-group/daikin-tab-group.d.ts +104 -0
- package/dist/es-dev/components/tab-group/daikin-tab-group.js +222 -0
- package/dist/es-dev/components/tab-group/index.d.ts +1 -0
- package/dist/es-dev/components/tab-group/index.js +4 -0
- package/dist/es-dev/components/tab-group/scroller.d.ts +25 -0
- package/dist/es-dev/components/tab-group/scroller.js +65 -0
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +68 -0
- package/dist/es-dev/components/text-input/daikin-text-input.js +138 -0
- package/dist/es-dev/components/text-input/index.d.ts +1 -0
- package/dist/es-dev/components/text-input/index.js +4 -0
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +70 -0
- package/dist/es-dev/components/textarea/daikin-textarea.js +169 -0
- package/dist/es-dev/components/textarea/index.d.ts +1 -0
- package/dist/es-dev/components/textarea/index.js +4 -0
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +60 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +133 -0
- package/dist/es-dev/components/toggle/index.d.ts +1 -0
- package/dist/es-dev/components/toggle/index.js +4 -0
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +76 -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/constants/events.d.ts +1 -0
- package/dist/es-dev/constants/events.js +4 -0
- package/dist/es-dev/index.d.ts +3 -0
- package/dist/es-dev/index.js +41 -0
- package/dist/es-dev/is-client.d.ts +1 -0
- package/dist/es-dev/is-client.js +5 -0
- package/dist/es-dev/lit-analyzer-types.d.ts +112 -0
- package/dist/es-dev/tailwind.css.js +6 -0
- package/dist/es-dev/type-utils.d.ts +24 -0
- package/icons/accordion-chevron-up.svg +3 -0
- package/icons/status-positive.svg +15 -0
- package/package.json +83 -50
- /package/icons/{input-group-error.svg → status-negative.svg} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The accordion item component is a child element within the `daikin-accordion` component.
|
|
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.
|
|
5
|
+
* This component is responsible for displaying the specific content within the accordion and allowing users to interact with each section independently.
|
|
6
|
+
*
|
|
7
|
+
* Hierarchy:
|
|
8
|
+
* - `daikin-accordion` > `daikin-accordion-item`
|
|
9
|
+
*
|
|
10
|
+
* @slot - A slot for the accordion item content.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* ```html
|
|
15
|
+
* <daikin-accordion-item title="The first accordion item">
|
|
16
|
+
* Accordion 1 content.
|
|
17
|
+
* </daikin-accordion-item>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class DaikinAccordionItem extends LitElement {
|
|
21
|
+
static readonly styles: import('lit').CSSResult;
|
|
22
|
+
private _contentRef;
|
|
23
|
+
/**
|
|
24
|
+
* Heading of accordion
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the accordion is open
|
|
29
|
+
*/
|
|
30
|
+
open: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the accordion is disabled
|
|
33
|
+
*/
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Open attribute of the actual details element
|
|
37
|
+
*
|
|
38
|
+
* The default `open` attribute of the default details element does not allow the display of content to have transitions.
|
|
39
|
+
* To solve this, the `open` property that `daikin-accordion-item` receives manages the opening and closing of items independently of the open attribute.
|
|
40
|
+
*
|
|
41
|
+
* The `open` attribute, which should be present, is taken over by `_detailsOpen`.
|
|
42
|
+
*/
|
|
43
|
+
private _detailsOpen;
|
|
44
|
+
private _contentAnimate;
|
|
45
|
+
private _handleSummaryClick;
|
|
46
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
47
|
+
protected firstUpdated(): void;
|
|
48
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
"daikin-accordion-item": DaikinAccordionItem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default DaikinAccordionItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinAccordionItem = require("./daikin-accordion-item.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinAccordionItem", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinAccordionItem.DaikinAccordionItem
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-accordion-item';
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
if (index === daikinBreadCrumbItems.length - 1) {
|
|
58
|
+
item.trailingSlash = this.trailingSlash;
|
|
59
|
+
item.disabled = true;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
item.trailingSlash = true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
_handleChange() {
|
|
66
|
+
this._updateBreadcrumbs();
|
|
67
|
+
}
|
|
68
|
+
_handleResizeObserver() {
|
|
69
|
+
if (this._isEllipsis) {
|
|
70
|
+
this.resizeObserver.observe(this);
|
|
71
|
+
} else {
|
|
72
|
+
this.resizeObserver.disconnect();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
return lit.html`
|
|
77
|
+
<div class="flex gap-2" ${ref_js.ref(this._divWrapRef)}>
|
|
78
|
+
<slot @slotchange=${this._handleChange}></slot>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
updated(changedProperties) {
|
|
83
|
+
if (changedProperties.has("trailingSlash")) {
|
|
84
|
+
this._updateBreadcrumbs();
|
|
85
|
+
}
|
|
86
|
+
if (changedProperties.has("overflow")) {
|
|
87
|
+
this._omit();
|
|
88
|
+
this._handleResizeObserver();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
firstUpdated() {
|
|
92
|
+
this._updateBreadcrumbs();
|
|
93
|
+
this._omit();
|
|
94
|
+
this._handleResizeObserver();
|
|
95
|
+
this.updateComplete.then(() => {
|
|
96
|
+
const divElement = this._divWrapRef.value;
|
|
97
|
+
if (!divElement) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this._expandedContentWidth = divElement.offsetWidth;
|
|
101
|
+
}).catch(() => {
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.DaikinBreadcrumb.styles = lit.css`
|
|
106
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
107
|
+
|
|
108
|
+
:host {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
}
|
|
112
|
+
`;
|
|
113
|
+
__decorateClass([
|
|
114
|
+
decorators_js.queryAssignedElements()
|
|
115
|
+
], exports.DaikinBreadcrumb.prototype, "_slottedDaikinBreadCrumbItems", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
decorators_js.property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
|
|
118
|
+
], exports.DaikinBreadcrumb.prototype, "trailingSlash", 2);
|
|
119
|
+
__decorateClass([
|
|
120
|
+
decorators_js.property({ type: String, reflect: true })
|
|
121
|
+
], exports.DaikinBreadcrumb.prototype, "overflow", 2);
|
|
122
|
+
exports.DaikinBreadcrumb = __decorateClass([
|
|
123
|
+
decorators_js.customElement("daikin-breadcrumb")
|
|
124
|
+
], exports.DaikinBreadcrumb);
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
* ```html
|
|
13
|
+
* <daikin-breadcrumb>
|
|
14
|
+
* <daikin-breadcrumb-item href="#">
|
|
15
|
+
* Breadcrumb Item 1
|
|
16
|
+
* </daikin-breadcrumb-item>
|
|
17
|
+
* <daikin-breadcrumb-item href="#">
|
|
18
|
+
* Breadcrumb Item 2
|
|
19
|
+
* </daikin-breadcrumb-item>
|
|
20
|
+
* </daikin-breadcrumb>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class DaikinBreadcrumb extends LitElement {
|
|
24
|
+
static readonly styles: import('lit').CSSResult;
|
|
25
|
+
private resizeObserver;
|
|
26
|
+
private _slottedDaikinBreadCrumbItems;
|
|
27
|
+
private _divWrapRef;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the last breadcrumb item should have trailing slash.
|
|
30
|
+
*/
|
|
31
|
+
trailingSlash: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies overflow.
|
|
34
|
+
* If `ellipsis`, some breadcrumb items will be omitted when the total width exceeds the container width.
|
|
35
|
+
*/
|
|
36
|
+
overflow: "visible" | "ellipsis";
|
|
37
|
+
private _expandedContentWidth;
|
|
38
|
+
private omitted;
|
|
39
|
+
get _isEllipsis(): boolean;
|
|
40
|
+
private _omit;
|
|
41
|
+
private _updateBreadcrumbs;
|
|
42
|
+
private _handleChange;
|
|
43
|
+
private _handleResizeObserver;
|
|
44
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
45
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
46
|
+
firstUpdated(): void;
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
"daikin-breadcrumb": DaikinBreadcrumb;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -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';
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
7
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
const cvaLinkSlot = classVarianceAuthority.cva(
|
|
19
|
+
[
|
|
20
|
+
"slotted:h-8",
|
|
21
|
+
"slotted:font-normal",
|
|
22
|
+
"slotted:not-italic",
|
|
23
|
+
"slotted:leading-8",
|
|
24
|
+
"slotted:text-sm",
|
|
25
|
+
"slotted:text-daikinBlue-500",
|
|
26
|
+
"slotted:outline-none",
|
|
27
|
+
"slotted:font-daikinSerif"
|
|
28
|
+
],
|
|
29
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
normal: [
|
|
33
|
+
"slotted:hover:text-daikinBlue-300",
|
|
34
|
+
"slotted:active:text-daikinNeutral-800",
|
|
35
|
+
"slotted-[*:focus-visible]:text-daikinBlue-700"
|
|
36
|
+
],
|
|
37
|
+
ellipsis: ["slotted:hover:text-daikinBlue-300"]
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
true: [
|
|
41
|
+
"slotted:!text-daikinNeutral-800",
|
|
42
|
+
"slotted:pointer-events-none",
|
|
43
|
+
"slotted:cursor-default",
|
|
44
|
+
"slotted-[*:focus-visible]:!text-daikinNeutral-800"
|
|
45
|
+
],
|
|
46
|
+
false: []
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends lit.LitElement {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
|
+
this.href = "";
|
|
55
|
+
this.variant = "normal";
|
|
56
|
+
this.disabled = false;
|
|
57
|
+
this.target = null;
|
|
58
|
+
this.trailingSlash = false;
|
|
59
|
+
this.hidden = false;
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
const slash = this.trailingSlash ? lit.html`<span class="text-daikinNeutral-800 font-daikinSerif">/</span>` : null;
|
|
63
|
+
return lit.html`
|
|
64
|
+
${this.variant === "normal" ? lit.html`<slot name="link" class=${cvaLinkSlot(this)}>
|
|
65
|
+
<a
|
|
66
|
+
href=${ifDefined_js.ifDefined(this.href)}
|
|
67
|
+
target=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
68
|
+
ifDefined_js.ifDefined(this.target)}
|
|
69
|
+
>
|
|
70
|
+
<slot></slot>
|
|
71
|
+
</a>
|
|
72
|
+
</slot>` : (
|
|
73
|
+
// Though `cvaLinkSlot` is designed for slots, it contains "& > *" selector for fallback content so it can be used here.
|
|
74
|
+
lit.html`<span class=${cvaLinkSlot(this)} aria-label="…">
|
|
75
|
+
<span>. . .</span>
|
|
76
|
+
</span> `
|
|
77
|
+
)}
|
|
78
|
+
${slash}
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports.DaikinBreadcrumbItem.styles = lit.css`
|
|
83
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
84
|
+
|
|
85
|
+
:host {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 8px;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([hidden]) {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
__decorateClass([
|
|
97
|
+
decorators_js.property({ type: String, reflect: true })
|
|
98
|
+
], exports.DaikinBreadcrumbItem.prototype, "href", 2);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
decorators_js.property({ type: String, reflect: true })
|
|
101
|
+
], exports.DaikinBreadcrumbItem.prototype, "variant", 2);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
104
|
+
], exports.DaikinBreadcrumbItem.prototype, "disabled", 2);
|
|
105
|
+
__decorateClass([
|
|
106
|
+
decorators_js.property({ type: String, reflect: true })
|
|
107
|
+
], exports.DaikinBreadcrumbItem.prototype, "target", 2);
|
|
108
|
+
__decorateClass([
|
|
109
|
+
decorators_js.property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
|
|
110
|
+
], exports.DaikinBreadcrumbItem.prototype, "trailingSlash", 2);
|
|
111
|
+
__decorateClass([
|
|
112
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
113
|
+
], exports.DaikinBreadcrumbItem.prototype, "hidden", 2);
|
|
114
|
+
exports.DaikinBreadcrumbItem = __decorateClass([
|
|
115
|
+
decorators_js.customElement("daikin-breadcrumb-item")
|
|
116
|
+
], exports.DaikinBreadcrumbItem);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
declare const cvaLinkSlot: (props?: ({
|
|
4
|
+
variant?: "normal" | "ellipsis" | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type LinkVariantProps = MergeVariantProps<typeof cvaLinkSlot>;
|
|
8
|
+
/**
|
|
9
|
+
* The `daikin-breadcrumb-item` is a component used to represent each item of the breadcrumb list, and is used as a child element of the `daikin-breadcrumb` component.
|
|
10
|
+
*
|
|
11
|
+
* Hierarchy:
|
|
12
|
+
* - `daikin-breadcrumb` > `daikin-breadcrumb-item`
|
|
13
|
+
*
|
|
14
|
+
* @slot - A slot for the breadcrumb item content.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* ```html
|
|
19
|
+
* <!-- See `daikin-breadcrumb` component for complete example. -->
|
|
20
|
+
* <daikin-breadcrumb-item href="#">
|
|
21
|
+
* Breadcrumb Item 1
|
|
22
|
+
* </daikin-breadcrumb-item>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class DaikinBreadcrumbItem extends LitElement {
|
|
26
|
+
static styles: import('lit').CSSResult;
|
|
27
|
+
/**
|
|
28
|
+
* Specify link href
|
|
29
|
+
*/
|
|
30
|
+
href: string;
|
|
31
|
+
/**
|
|
32
|
+
* Specifies the display content.
|
|
33
|
+
* If `ellipsis`, the "..." will be displayed instead of the link.
|
|
34
|
+
* Set automatically by `daikin-breadcrumb`.
|
|
35
|
+
*/
|
|
36
|
+
variant: LinkVariantProps["variant"];
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether the link should be disabled
|
|
39
|
+
*/
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Specify the link target
|
|
43
|
+
*/
|
|
44
|
+
target: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the slash after the link should shown.
|
|
47
|
+
* Set automatically by `daikin-breadcrumb`.
|
|
48
|
+
*/
|
|
49
|
+
trailingSlash: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the link should be hidden when ellipsis mode.
|
|
52
|
+
* Set automatically by `daikin-breadcrumb`.
|
|
53
|
+
*/
|
|
54
|
+
hidden: boolean;
|
|
55
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
56
|
+
}
|
|
57
|
+
declare global {
|
|
58
|
+
interface HTMLElementTagNameMap {
|
|
59
|
+
"daikin-breadcrumb-item": DaikinBreadcrumbItem;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinBreadcrumbItem = require("./daikin-breadcrumb-item.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinBreadcrumbItem", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinBreadcrumbItem.DaikinBreadcrumbItem
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-breadcrumb-item';
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const variables_js = require("@daikin-oss/dds-tokens/js/daikin/Light/variables.js");
|
|
4
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
5
|
+
const lit = require("lit");
|
|
6
|
+
const decorators_js = require("lit/decorators.js");
|
|
7
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
8
|
+
require("../icon/daikin-icon.cjs");
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
12
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
|
+
if (decorator = decorators[i])
|
|
15
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const BUTTON_ICON_SIZE_MAP = {
|
|
20
|
+
default: "m",
|
|
21
|
+
condensed: "s"
|
|
22
|
+
};
|
|
23
|
+
const cvaButton = classVarianceAuthority.cva(
|
|
24
|
+
[
|
|
25
|
+
"inline-flex",
|
|
26
|
+
"justify-center",
|
|
27
|
+
"items-center",
|
|
28
|
+
"gap-2",
|
|
29
|
+
"font-daikinSerif",
|
|
30
|
+
"font-bold",
|
|
31
|
+
"rounded-lg",
|
|
32
|
+
"tracking-wide",
|
|
33
|
+
"text-nowrap",
|
|
34
|
+
"disabled:cursor-default",
|
|
35
|
+
"w-full",
|
|
36
|
+
"h-full"
|
|
37
|
+
],
|
|
38
|
+
{
|
|
39
|
+
variants: {
|
|
40
|
+
intent: {
|
|
41
|
+
primary: [
|
|
42
|
+
"text-white",
|
|
43
|
+
"bg-[--buttonColorBackgroundPrimaryActive]",
|
|
44
|
+
"enabled:focus-visible:bg-[--buttonColorBackgroundPrimaryFocus]",
|
|
45
|
+
"enabled:hover:bg-[--buttonColorBackgroundPrimaryHover]",
|
|
46
|
+
"enabled:active:bg-[--buttonColorBackgroundPrimaryPress]",
|
|
47
|
+
"disabled:bg-[--buttonColorBackgroundPrimaryDisabled]",
|
|
48
|
+
"focus-visible:outline-none"
|
|
49
|
+
],
|
|
50
|
+
secondary: [
|
|
51
|
+
"border-2",
|
|
52
|
+
"bg-white",
|
|
53
|
+
"text-daikinBlue-500",
|
|
54
|
+
"border-daikinBlue-500",
|
|
55
|
+
"enabled:hover:text-daikinBlue-300",
|
|
56
|
+
"enabled:hover:border-daikinBlue-300",
|
|
57
|
+
"enabled:active:text-daikinBlue-600",
|
|
58
|
+
"enabled:active:border-daikinBlue-600",
|
|
59
|
+
"enabled:focus-visible:text-daikinBlue-700",
|
|
60
|
+
"enabled:focus-visible:border-daikinBlue-700",
|
|
61
|
+
"disabled:border-daikinNeutral-300",
|
|
62
|
+
"disabled:text-daikinNeutral-400",
|
|
63
|
+
"disabled:border",
|
|
64
|
+
"focus-visible:outline-none"
|
|
65
|
+
],
|
|
66
|
+
tertiary: [
|
|
67
|
+
"text-daikinBlue-400",
|
|
68
|
+
"bg-none",
|
|
69
|
+
"border-none",
|
|
70
|
+
"shadow-none",
|
|
71
|
+
"enabled:hover:bg-daikinNeutral-100",
|
|
72
|
+
"disabled:bg-transparent",
|
|
73
|
+
"disabled:text-daikinNeutral-400"
|
|
74
|
+
],
|
|
75
|
+
primaryDanger: [
|
|
76
|
+
"bg-daikinRed",
|
|
77
|
+
"text-white",
|
|
78
|
+
"enabled:hover:bg-daikinRed-400",
|
|
79
|
+
"enabled:focus-visible:bg-daikinRed-700",
|
|
80
|
+
"enabled:active:bg-daikinRed-700",
|
|
81
|
+
"disabled:bg-daikinNeutral-300",
|
|
82
|
+
"focus-visible:outline-none"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
size: {
|
|
86
|
+
default: ["px-4", "text-[14px]"],
|
|
87
|
+
condensed: ["px-[10px]", "text-[12px]"]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
intent: "primary",
|
|
92
|
+
size: "condensed"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
exports.DaikinButton = class DaikinButton extends lit.LitElement {
|
|
97
|
+
constructor() {
|
|
98
|
+
super(...arguments);
|
|
99
|
+
this.variant = "primary";
|
|
100
|
+
this.disabled = false;
|
|
101
|
+
this.rightIcon = null;
|
|
102
|
+
this.leftIcon = null;
|
|
103
|
+
this.href = "";
|
|
104
|
+
this.size = "default";
|
|
105
|
+
this.type = "button";
|
|
106
|
+
this.role = "button";
|
|
107
|
+
this.isLoading = false;
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
const buttonClassName = cvaButton({
|
|
111
|
+
intent: this.variant,
|
|
112
|
+
size: this.size
|
|
113
|
+
});
|
|
114
|
+
const content = lit.html`
|
|
115
|
+
${this.leftIcon ? lit.html`<daikin-icon
|
|
116
|
+
icon=${this.leftIcon}
|
|
117
|
+
size=${BUTTON_ICON_SIZE_MAP[this.size]}
|
|
118
|
+
color="current"
|
|
119
|
+
></daikin-icon>` : null}
|
|
120
|
+
<slot></slot>
|
|
121
|
+
${this.rightIcon ? lit.html`<daikin-icon
|
|
122
|
+
icon=${this.rightIcon}
|
|
123
|
+
size=${BUTTON_ICON_SIZE_MAP[this.size]}
|
|
124
|
+
color="current"
|
|
125
|
+
></daikin-icon>` : null}
|
|
126
|
+
`;
|
|
127
|
+
if (this.href) {
|
|
128
|
+
return lit.html`<a
|
|
129
|
+
href="${this.href}"
|
|
130
|
+
class="${buttonClassName}"
|
|
131
|
+
role="${this.role}"
|
|
132
|
+
>
|
|
133
|
+
${content}
|
|
134
|
+
</a>`;
|
|
135
|
+
}
|
|
136
|
+
return lit.html`
|
|
137
|
+
<button
|
|
138
|
+
class="${buttonClassName}"
|
|
139
|
+
?disabled="${this.disabled}"
|
|
140
|
+
type="${this.type}"
|
|
141
|
+
role="${this.role}"
|
|
142
|
+
>
|
|
143
|
+
${content}
|
|
144
|
+
</button>
|
|
145
|
+
`;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Focuses on the inner button.
|
|
149
|
+
* @param options focus options
|
|
150
|
+
*/
|
|
151
|
+
focus(options) {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
(_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus(options);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
exports.DaikinButton.styles = lit.css`
|
|
157
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
158
|
+
|
|
159
|
+
:host {
|
|
160
|
+
--buttonColorBackgroundPrimaryActive: ${lit.unsafeCSS(
|
|
161
|
+
variables_js.buttonColorBackgroundPrimaryActive
|
|
162
|
+
)};
|
|
163
|
+
--buttonColorBackgroundPrimaryFocus: ${lit.unsafeCSS(
|
|
164
|
+
variables_js.buttonColorBackgroundPrimaryFocus
|
|
165
|
+
)};
|
|
166
|
+
--buttonColorBackgroundPrimaryHover: ${lit.unsafeCSS(
|
|
167
|
+
variables_js.buttonColorBackgroundPrimaryHover
|
|
168
|
+
)};
|
|
169
|
+
--buttonColorBackgroundPrimaryPress: ${lit.unsafeCSS(
|
|
170
|
+
variables_js.buttonColorBackgroundPrimaryPress
|
|
171
|
+
)};
|
|
172
|
+
--buttonColorBackgroundPrimaryDisabled: ${lit.unsafeCSS(
|
|
173
|
+
variables_js.buttonColorBackgroundPrimaryDisabled
|
|
174
|
+
)};
|
|
175
|
+
|
|
176
|
+
display: inline-block;
|
|
177
|
+
width: fit-content;
|
|
178
|
+
min-height: 42px;
|
|
179
|
+
height: 1px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:host([size="condensed"]) {
|
|
183
|
+
min-height: 32px;
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
__decorateClass([
|
|
187
|
+
decorators_js.property({ type: String })
|
|
188
|
+
], exports.DaikinButton.prototype, "variant", 2);
|
|
189
|
+
__decorateClass([
|
|
190
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
191
|
+
], exports.DaikinButton.prototype, "disabled", 2);
|
|
192
|
+
__decorateClass([
|
|
193
|
+
decorators_js.property({ type: String, reflect: true })
|
|
194
|
+
], exports.DaikinButton.prototype, "rightIcon", 2);
|
|
195
|
+
__decorateClass([
|
|
196
|
+
decorators_js.property({ type: String, reflect: true })
|
|
197
|
+
], exports.DaikinButton.prototype, "leftIcon", 2);
|
|
198
|
+
__decorateClass([
|
|
199
|
+
decorators_js.property({ type: String, reflect: true })
|
|
200
|
+
], exports.DaikinButton.prototype, "href", 2);
|
|
201
|
+
__decorateClass([
|
|
202
|
+
decorators_js.property({ type: String, reflect: true })
|
|
203
|
+
], exports.DaikinButton.prototype, "size", 2);
|
|
204
|
+
__decorateClass([
|
|
205
|
+
decorators_js.property({ type: String, reflect: true })
|
|
206
|
+
], exports.DaikinButton.prototype, "type", 2);
|
|
207
|
+
__decorateClass([
|
|
208
|
+
decorators_js.property({ type: String, reflect: true })
|
|
209
|
+
], exports.DaikinButton.prototype, "role", 2);
|
|
210
|
+
__decorateClass([
|
|
211
|
+
decorators_js.property({ type: Boolean })
|
|
212
|
+
], exports.DaikinButton.prototype, "isLoading", 2);
|
|
213
|
+
exports.DaikinButton = __decorateClass([
|
|
214
|
+
decorators_js.customElement("daikin-button")
|
|
215
|
+
], exports.DaikinButton);
|