@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,216 @@
|
|
|
1
|
+
import { buttonColorBackgroundPrimaryActive, buttonColorBackgroundPrimaryFocus, buttonColorBackgroundPrimaryHover, buttonColorBackgroundPrimaryPress, buttonColorBackgroundPrimaryDisabled } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
4
|
+
import { property, customElement } from "lit/decorators.js";
|
|
5
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
6
|
+
import "../icon/daikin-icon.js";
|
|
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
|
+
const BUTTON_ICON_SIZE_MAP = {
|
|
18
|
+
default: "m",
|
|
19
|
+
condensed: "s"
|
|
20
|
+
};
|
|
21
|
+
const cvaButton = cva(
|
|
22
|
+
[
|
|
23
|
+
"inline-flex",
|
|
24
|
+
"justify-center",
|
|
25
|
+
"items-center",
|
|
26
|
+
"gap-2",
|
|
27
|
+
"font-daikinSerif",
|
|
28
|
+
"font-bold",
|
|
29
|
+
"rounded-lg",
|
|
30
|
+
"tracking-wide",
|
|
31
|
+
"text-nowrap",
|
|
32
|
+
"disabled:cursor-default",
|
|
33
|
+
"w-full",
|
|
34
|
+
"h-full"
|
|
35
|
+
],
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
intent: {
|
|
39
|
+
primary: [
|
|
40
|
+
"text-white",
|
|
41
|
+
"bg-[--buttonColorBackgroundPrimaryActive]",
|
|
42
|
+
"enabled:focus-visible:bg-[--buttonColorBackgroundPrimaryFocus]",
|
|
43
|
+
"enabled:hover:bg-[--buttonColorBackgroundPrimaryHover]",
|
|
44
|
+
"enabled:active:bg-[--buttonColorBackgroundPrimaryPress]",
|
|
45
|
+
"disabled:bg-[--buttonColorBackgroundPrimaryDisabled]",
|
|
46
|
+
"focus-visible:outline-none"
|
|
47
|
+
],
|
|
48
|
+
secondary: [
|
|
49
|
+
"border-2",
|
|
50
|
+
"bg-white",
|
|
51
|
+
"text-daikinBlue-500",
|
|
52
|
+
"border-daikinBlue-500",
|
|
53
|
+
"enabled:hover:text-daikinBlue-300",
|
|
54
|
+
"enabled:hover:border-daikinBlue-300",
|
|
55
|
+
"enabled:active:text-daikinBlue-600",
|
|
56
|
+
"enabled:active:border-daikinBlue-600",
|
|
57
|
+
"enabled:focus-visible:text-daikinBlue-700",
|
|
58
|
+
"enabled:focus-visible:border-daikinBlue-700",
|
|
59
|
+
"disabled:border-daikinNeutral-300",
|
|
60
|
+
"disabled:text-daikinNeutral-400",
|
|
61
|
+
"disabled:border",
|
|
62
|
+
"focus-visible:outline-none"
|
|
63
|
+
],
|
|
64
|
+
tertiary: [
|
|
65
|
+
"text-daikinBlue-400",
|
|
66
|
+
"bg-none",
|
|
67
|
+
"border-none",
|
|
68
|
+
"shadow-none",
|
|
69
|
+
"enabled:hover:bg-daikinNeutral-100",
|
|
70
|
+
"disabled:bg-transparent",
|
|
71
|
+
"disabled:text-daikinNeutral-400"
|
|
72
|
+
],
|
|
73
|
+
primaryDanger: [
|
|
74
|
+
"bg-daikinRed",
|
|
75
|
+
"text-white",
|
|
76
|
+
"enabled:hover:bg-daikinRed-400",
|
|
77
|
+
"enabled:focus-visible:bg-daikinRed-700",
|
|
78
|
+
"enabled:active:bg-daikinRed-700",
|
|
79
|
+
"disabled:bg-daikinNeutral-300",
|
|
80
|
+
"focus-visible:outline-none"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
size: {
|
|
84
|
+
default: ["px-4", "text-[14px]"],
|
|
85
|
+
condensed: ["px-[10px]", "text-[12px]"]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
intent: "primary",
|
|
90
|
+
size: "condensed"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
let DaikinButton = class extends LitElement {
|
|
95
|
+
constructor() {
|
|
96
|
+
super(...arguments);
|
|
97
|
+
this.variant = "primary";
|
|
98
|
+
this.disabled = false;
|
|
99
|
+
this.rightIcon = null;
|
|
100
|
+
this.leftIcon = null;
|
|
101
|
+
this.href = "";
|
|
102
|
+
this.size = "default";
|
|
103
|
+
this.type = "button";
|
|
104
|
+
this.role = "button";
|
|
105
|
+
this.isLoading = false;
|
|
106
|
+
}
|
|
107
|
+
render() {
|
|
108
|
+
const buttonClassName = cvaButton({
|
|
109
|
+
intent: this.variant,
|
|
110
|
+
size: this.size
|
|
111
|
+
});
|
|
112
|
+
const content = html`
|
|
113
|
+
${this.leftIcon ? html`<daikin-icon
|
|
114
|
+
icon=${this.leftIcon}
|
|
115
|
+
size=${BUTTON_ICON_SIZE_MAP[this.size]}
|
|
116
|
+
color="current"
|
|
117
|
+
></daikin-icon>` : null}
|
|
118
|
+
<slot></slot>
|
|
119
|
+
${this.rightIcon ? html`<daikin-icon
|
|
120
|
+
icon=${this.rightIcon}
|
|
121
|
+
size=${BUTTON_ICON_SIZE_MAP[this.size]}
|
|
122
|
+
color="current"
|
|
123
|
+
></daikin-icon>` : null}
|
|
124
|
+
`;
|
|
125
|
+
if (this.href) {
|
|
126
|
+
return html`<a
|
|
127
|
+
href="${this.href}"
|
|
128
|
+
class="${buttonClassName}"
|
|
129
|
+
role="${this.role}"
|
|
130
|
+
>
|
|
131
|
+
${content}
|
|
132
|
+
</a>`;
|
|
133
|
+
}
|
|
134
|
+
return html`
|
|
135
|
+
<button
|
|
136
|
+
class="${buttonClassName}"
|
|
137
|
+
?disabled="${this.disabled}"
|
|
138
|
+
type="${this.type}"
|
|
139
|
+
role="${this.role}"
|
|
140
|
+
>
|
|
141
|
+
${content}
|
|
142
|
+
</button>
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Focuses on the inner button.
|
|
147
|
+
* @param options focus options
|
|
148
|
+
*/
|
|
149
|
+
focus(options) {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
(_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus(options);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
DaikinButton.styles = css`
|
|
155
|
+
${unsafeCSS(tailwindStyles)}
|
|
156
|
+
|
|
157
|
+
:host {
|
|
158
|
+
--buttonColorBackgroundPrimaryActive: ${unsafeCSS(
|
|
159
|
+
buttonColorBackgroundPrimaryActive
|
|
160
|
+
)};
|
|
161
|
+
--buttonColorBackgroundPrimaryFocus: ${unsafeCSS(
|
|
162
|
+
buttonColorBackgroundPrimaryFocus
|
|
163
|
+
)};
|
|
164
|
+
--buttonColorBackgroundPrimaryHover: ${unsafeCSS(
|
|
165
|
+
buttonColorBackgroundPrimaryHover
|
|
166
|
+
)};
|
|
167
|
+
--buttonColorBackgroundPrimaryPress: ${unsafeCSS(
|
|
168
|
+
buttonColorBackgroundPrimaryPress
|
|
169
|
+
)};
|
|
170
|
+
--buttonColorBackgroundPrimaryDisabled: ${unsafeCSS(
|
|
171
|
+
buttonColorBackgroundPrimaryDisabled
|
|
172
|
+
)};
|
|
173
|
+
|
|
174
|
+
display: inline-block;
|
|
175
|
+
width: fit-content;
|
|
176
|
+
min-height: 42px;
|
|
177
|
+
height: 1px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host([size="condensed"]) {
|
|
181
|
+
min-height: 32px;
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
184
|
+
__decorateClass([
|
|
185
|
+
property({ type: String })
|
|
186
|
+
], DaikinButton.prototype, "variant", 2);
|
|
187
|
+
__decorateClass([
|
|
188
|
+
property({ type: Boolean, reflect: true })
|
|
189
|
+
], DaikinButton.prototype, "disabled", 2);
|
|
190
|
+
__decorateClass([
|
|
191
|
+
property({ type: String, reflect: true })
|
|
192
|
+
], DaikinButton.prototype, "rightIcon", 2);
|
|
193
|
+
__decorateClass([
|
|
194
|
+
property({ type: String, reflect: true })
|
|
195
|
+
], DaikinButton.prototype, "leftIcon", 2);
|
|
196
|
+
__decorateClass([
|
|
197
|
+
property({ type: String, reflect: true })
|
|
198
|
+
], DaikinButton.prototype, "href", 2);
|
|
199
|
+
__decorateClass([
|
|
200
|
+
property({ type: String, reflect: true })
|
|
201
|
+
], DaikinButton.prototype, "size", 2);
|
|
202
|
+
__decorateClass([
|
|
203
|
+
property({ type: String, reflect: true })
|
|
204
|
+
], DaikinButton.prototype, "type", 2);
|
|
205
|
+
__decorateClass([
|
|
206
|
+
property({ type: String, reflect: true })
|
|
207
|
+
], DaikinButton.prototype, "role", 2);
|
|
208
|
+
__decorateClass([
|
|
209
|
+
property({ type: Boolean })
|
|
210
|
+
], DaikinButton.prototype, "isLoading", 2);
|
|
211
|
+
DaikinButton = __decorateClass([
|
|
212
|
+
customElement("daikin-button")
|
|
213
|
+
], DaikinButton);
|
|
214
|
+
export {
|
|
215
|
+
DaikinButton
|
|
216
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-button';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
declare const cvaCheckbox: (props?: ({
|
|
4
|
+
size?: "small" | "large" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const cvaLabel: (props?: ({
|
|
7
|
+
size?: "small" | "large" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
type CheckboxVariantProps = MergeVariantProps<typeof cvaCheckbox | typeof cvaLabel>;
|
|
10
|
+
/**
|
|
11
|
+
* The checkbox component is a UI element that allows users to select one or more options from a list of choices.
|
|
12
|
+
* It functions similarly to the HTML `<input type="checkbox">` tag, enabling users to toggle the selection of each option independently.
|
|
13
|
+
* This component is ideal for cases where multiple selections are allowed or required.
|
|
14
|
+
*
|
|
15
|
+
* @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<input type="checkbox">` element.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <daikin-checkbox label="Checkbox label" name="name" value="value"></daikin-checkbox>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class DaikinCheckbox extends LitElement {
|
|
24
|
+
static readonly styles: import('lit').CSSResult;
|
|
25
|
+
private _handleClick;
|
|
26
|
+
static readonly formAssociated = true;
|
|
27
|
+
private _internals;
|
|
28
|
+
private _updateFormValue;
|
|
29
|
+
private _input;
|
|
30
|
+
get checked(): boolean;
|
|
31
|
+
private _handleChange;
|
|
32
|
+
/**
|
|
33
|
+
* Specify the label text for check box
|
|
34
|
+
*/
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Specify the component size
|
|
38
|
+
*/
|
|
39
|
+
size: CheckboxVariantProps["size"];
|
|
40
|
+
/**
|
|
41
|
+
* Specify the label position
|
|
42
|
+
* when `left` the label will be in left of checkbox, when `right` label will be in right of checkbox
|
|
43
|
+
*/
|
|
44
|
+
labelPosition: "left" | "right";
|
|
45
|
+
/**
|
|
46
|
+
* Specify whether the Checkbox should be disabled
|
|
47
|
+
*/
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Specify whether the checkbox is read only
|
|
51
|
+
*/
|
|
52
|
+
readonly: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Specify whether the checkbox is be checked
|
|
55
|
+
*/
|
|
56
|
+
checkState: "unchecked" | "indeterminate" | "checked";
|
|
57
|
+
/**
|
|
58
|
+
* The form name.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* The value.
|
|
63
|
+
*/
|
|
64
|
+
value: string;
|
|
65
|
+
/**
|
|
66
|
+
* Specify whether the Checkbox is in a error state
|
|
67
|
+
*/
|
|
68
|
+
error: boolean;
|
|
69
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
70
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
71
|
+
}
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
"daikin-checkbox": DaikinCheckbox;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
3
|
+
import { query, property, customElement } from "lit/decorators.js";
|
|
4
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
const cvaCheckbox = cva(
|
|
16
|
+
[
|
|
17
|
+
"appearance-none",
|
|
18
|
+
"inline-block",
|
|
19
|
+
"relative",
|
|
20
|
+
"rounded-sm",
|
|
21
|
+
"border-solid",
|
|
22
|
+
"border-2",
|
|
23
|
+
"after:absolute",
|
|
24
|
+
"after:text-white",
|
|
25
|
+
"checked:after:i-daikin-checkbox-checked",
|
|
26
|
+
"indeterminate:after:i-daikin-checkbox-indeterminate",
|
|
27
|
+
"focus-visible:outline-none",
|
|
28
|
+
"border-daikinNeutral-400",
|
|
29
|
+
"enabled:indeterminate:border-daikinBlue-600",
|
|
30
|
+
"enabled:indeterminate:bg-daikinBlue-600",
|
|
31
|
+
"enabled:checked:border-daikinBlue-600",
|
|
32
|
+
"enabled:checked:bg-daikinBlue-600",
|
|
33
|
+
"aria-controllable:focus-visible:border-daikinBlue-700",
|
|
34
|
+
"aria-controllable:hover:border-daikinBlue-300",
|
|
35
|
+
"aria-controllable:active:border-daikinBlue-600",
|
|
36
|
+
"aria-controllable:checked:focus-visible:border-daikinBlue-700",
|
|
37
|
+
"aria-controllable:checked:focus-visible:border-daikinBlue-700",
|
|
38
|
+
"aria-controllable:checked:focus-visible:bg-daikinBlue-700",
|
|
39
|
+
"aria-controllable:checked:focus-visible:bg-daikinBlue-700",
|
|
40
|
+
"aria-controllable:checked:hover:border-daikinBlue-300",
|
|
41
|
+
"aria-controllable:checked:hover:bg-daikinBlue-300",
|
|
42
|
+
"aria-controllable:checked:active:border-daikinBlue-600",
|
|
43
|
+
"aria-controllable:checked:active:bg-daikinBlue-600",
|
|
44
|
+
"aria-controllable:indeterminate:active:border-daikinBlue-600",
|
|
45
|
+
"aria-controllable:indeterminate:active:bg-daikinBlue-600",
|
|
46
|
+
"aria-controllable:indeterminate:hover:border-daikinBlue-300",
|
|
47
|
+
"aria-controllable:indeterminate:hover:bg-daikinBlue-300",
|
|
48
|
+
"aria-controllable:indeterminate:focus-visible:border-daikinBlue-700",
|
|
49
|
+
"aria-controllable:indeterminate:focus-visible:bg-daikinBlue-700",
|
|
50
|
+
"disabled:border-daikinNeutral-200",
|
|
51
|
+
"disabled:bg-white",
|
|
52
|
+
"disabled:indeterminate:bg-daikinNeutral-200",
|
|
53
|
+
"disabled:checked:bg-daikinNeutral-200"
|
|
54
|
+
],
|
|
55
|
+
{
|
|
56
|
+
variants: {
|
|
57
|
+
size: {
|
|
58
|
+
small: ["w-[18px]", "h-[18px]"],
|
|
59
|
+
large: ["w-5", "h-5"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
const cvaLabel = cva(
|
|
65
|
+
["leading-8", "not-italic", "font-normal", "align-middle"],
|
|
66
|
+
{
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
small: ["text-sm"],
|
|
70
|
+
large: ["text-base"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
size: "small"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
let DaikinCheckbox = class extends LitElement {
|
|
79
|
+
constructor() {
|
|
80
|
+
super(...arguments);
|
|
81
|
+
this._internals = this.attachInternals();
|
|
82
|
+
this.label = "";
|
|
83
|
+
this.size = "small";
|
|
84
|
+
this.labelPosition = "right";
|
|
85
|
+
this.disabled = false;
|
|
86
|
+
this.readonly = false;
|
|
87
|
+
this.checkState = "unchecked";
|
|
88
|
+
this.name = "";
|
|
89
|
+
this.value = "";
|
|
90
|
+
this.error = false;
|
|
91
|
+
}
|
|
92
|
+
_handleClick(event) {
|
|
93
|
+
if (this.readonly || this.disabled) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
_updateFormValue() {
|
|
98
|
+
this._internals.setFormValue(this.checked ? this.value : null);
|
|
99
|
+
}
|
|
100
|
+
get checked() {
|
|
101
|
+
return this.checkState === "checked";
|
|
102
|
+
}
|
|
103
|
+
_handleChange(event) {
|
|
104
|
+
if (!this._input) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.checkState = this._input.checked ? "checked" : "unchecked";
|
|
108
|
+
this._updateFormValue();
|
|
109
|
+
this.dispatchEvent(new Event("change", event));
|
|
110
|
+
}
|
|
111
|
+
render() {
|
|
112
|
+
const checkboxClassName = cvaCheckbox({ size: this.size });
|
|
113
|
+
const labelClassName = cvaLabel({ size: this.size });
|
|
114
|
+
const isIndeterminate = this.checkState === "indeterminate";
|
|
115
|
+
const labelText = this.label ? html`<span class=${labelClassName}>${this.label}</span>` : html``;
|
|
116
|
+
const inputTag = html`<input
|
|
117
|
+
class=${checkboxClassName}
|
|
118
|
+
type="checkbox"
|
|
119
|
+
name=${this.name}
|
|
120
|
+
value=${this.value}
|
|
121
|
+
aria-readonly=${this.readonly}
|
|
122
|
+
.indeterminate=${isIndeterminate}
|
|
123
|
+
.checked=${this.checked}
|
|
124
|
+
?readonly=${this.readonly}
|
|
125
|
+
?disabled=${this.disabled}
|
|
126
|
+
@change=${this._handleChange}
|
|
127
|
+
@click=${this._handleClick}
|
|
128
|
+
/>`;
|
|
129
|
+
const content = this.labelPosition === "left" ? html`${labelText}${inputTag}` : html`${inputTag}${labelText}`;
|
|
130
|
+
return html`<label
|
|
131
|
+
class="inline-flex gap-[10px] items-center font-daikinSerif"
|
|
132
|
+
>${content}</label
|
|
133
|
+
>`;
|
|
134
|
+
}
|
|
135
|
+
updated(changedProperties) {
|
|
136
|
+
if (changedProperties.has("checkState")) {
|
|
137
|
+
this._updateFormValue();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
DaikinCheckbox.styles = css`
|
|
142
|
+
${unsafeCSS(tailwindStyles)}
|
|
143
|
+
|
|
144
|
+
:host {
|
|
145
|
+
display: inline-block;
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
DaikinCheckbox.formAssociated = true;
|
|
149
|
+
__decorateClass([
|
|
150
|
+
query("input")
|
|
151
|
+
], DaikinCheckbox.prototype, "_input", 2);
|
|
152
|
+
__decorateClass([
|
|
153
|
+
property({ type: String })
|
|
154
|
+
], DaikinCheckbox.prototype, "label", 2);
|
|
155
|
+
__decorateClass([
|
|
156
|
+
property({ type: String })
|
|
157
|
+
], DaikinCheckbox.prototype, "size", 2);
|
|
158
|
+
__decorateClass([
|
|
159
|
+
property({ type: String, attribute: "label-position" })
|
|
160
|
+
], DaikinCheckbox.prototype, "labelPosition", 2);
|
|
161
|
+
__decorateClass([
|
|
162
|
+
property({ type: Boolean, reflect: true })
|
|
163
|
+
], DaikinCheckbox.prototype, "disabled", 2);
|
|
164
|
+
__decorateClass([
|
|
165
|
+
property({ type: Boolean, reflect: true })
|
|
166
|
+
], DaikinCheckbox.prototype, "readonly", 2);
|
|
167
|
+
__decorateClass([
|
|
168
|
+
property({ type: String, reflect: true, attribute: "check-state" })
|
|
169
|
+
], DaikinCheckbox.prototype, "checkState", 2);
|
|
170
|
+
__decorateClass([
|
|
171
|
+
property({ type: String, reflect: true })
|
|
172
|
+
], DaikinCheckbox.prototype, "name", 2);
|
|
173
|
+
__decorateClass([
|
|
174
|
+
property({ type: String, reflect: true })
|
|
175
|
+
], DaikinCheckbox.prototype, "value", 2);
|
|
176
|
+
__decorateClass([
|
|
177
|
+
property({ type: Boolean, reflect: true })
|
|
178
|
+
], DaikinCheckbox.prototype, "error", 2);
|
|
179
|
+
DaikinCheckbox = __decorateClass([
|
|
180
|
+
customElement("daikin-checkbox")
|
|
181
|
+
], DaikinCheckbox);
|
|
182
|
+
export {
|
|
183
|
+
DaikinCheckbox
|
|
184
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-checkbox';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
import { icons } from './icons.json';
|
|
4
|
+
export declare const iconList: string[];
|
|
5
|
+
export type IconType = keyof typeof icons;
|
|
6
|
+
declare const cvaIcon: (props?: ({
|
|
7
|
+
icon?: string | number | null | undefined;
|
|
8
|
+
size?: "s" | "m" | "l" | "xl" | null | undefined;
|
|
9
|
+
color?: "black" | "white" | "default" | "current" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
12
|
+
/**
|
|
13
|
+
* The icon component is a versatile UI element used to display small graphical symbols or images that represent actions, objects, or concepts within an application.
|
|
14
|
+
* The icon set is provided by DDS.
|
|
15
|
+
*
|
|
16
|
+
* To use an arbitrary color, specify `"current"` for the `color` property and set the `color` CSS property to the color you want to use.
|
|
17
|
+
*
|
|
18
|
+
* If you try to use an icon that does not exist, a blank space will be displayed.
|
|
19
|
+
* In the development build, warnings will be displayed in the console, so please check there if you encounter any unexpected behavior.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class DaikinIcon extends LitElement {
|
|
28
|
+
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
/**
|
|
30
|
+
* Specify the name of the icon
|
|
31
|
+
*/
|
|
32
|
+
icon: IconType | null;
|
|
33
|
+
/**
|
|
34
|
+
* Specify icon color
|
|
35
|
+
*/
|
|
36
|
+
color: IconVariantProps["color"];
|
|
37
|
+
/**
|
|
38
|
+
* Specify the height and width of the icon
|
|
39
|
+
*/
|
|
40
|
+
size: IconVariantProps["size"];
|
|
41
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
42
|
+
}
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
"daikin-icon": DaikinIcon;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export default DaikinIcon;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { space12, space16, space20, space24 } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
4
|
+
import { property, customElement } from "lit/decorators.js";
|
|
5
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
6
|
+
import { icons } from "./icons.json.js";
|
|
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
|
+
const iconList = Object.keys(icons);
|
|
18
|
+
const iconClassMap = Object.fromEntries(
|
|
19
|
+
Object.entries(icons).map(([name, object]) => [name, object.class])
|
|
20
|
+
);
|
|
21
|
+
const cvaIcon = cva(["block"], {
|
|
22
|
+
variants: {
|
|
23
|
+
icon: iconClassMap,
|
|
24
|
+
size: {
|
|
25
|
+
s: [`w-[--size-s]`, `h-[--size-s]`],
|
|
26
|
+
m: [`w-[--size-m]`, `h-[--size-m]`],
|
|
27
|
+
l: [`w-[--size-l]`, `h-[--size-l]`],
|
|
28
|
+
xl: [`w-[--size-xl]`, `h-[--size-xl]`]
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
black: ["text-black"],
|
|
32
|
+
white: ["text-white"],
|
|
33
|
+
default: ["text-[--default-color]"],
|
|
34
|
+
current: []
|
|
35
|
+
// uses `currentColor`
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
let DaikinIcon = class extends LitElement {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.icon = null;
|
|
43
|
+
this.color = "default";
|
|
44
|
+
this.size = "m";
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
var _a;
|
|
48
|
+
const defaultColor = (_a = icons[this.icon ?? ""]) == null ? void 0 : _a.color;
|
|
49
|
+
{
|
|
50
|
+
if (!this.icon) {
|
|
51
|
+
console.warn("icon property is not specified");
|
|
52
|
+
} else if (!(this.icon in icons)) {
|
|
53
|
+
console.warn(`There is no icon named "${this.icon}".`);
|
|
54
|
+
} else if (this.color === "default" && !defaultColor) {
|
|
55
|
+
console.warn(`The icon "${this.icon}" does not have a default color.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return html`<span
|
|
59
|
+
class=${cvaIcon({
|
|
60
|
+
icon: this.icon,
|
|
61
|
+
color: this.color,
|
|
62
|
+
size: this.size
|
|
63
|
+
})}
|
|
64
|
+
style=${`--default-color:${defaultColor ?? "#000000"}`}
|
|
65
|
+
role="presentation"
|
|
66
|
+
></span>`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
DaikinIcon.styles = css`
|
|
70
|
+
${unsafeCSS(tailwindStyles)}
|
|
71
|
+
|
|
72
|
+
:host {
|
|
73
|
+
--size-s: ${unsafeCSS(space12)};
|
|
74
|
+
--size-m: ${unsafeCSS(space16)};
|
|
75
|
+
--size-l: ${unsafeCSS(space20)};
|
|
76
|
+
--size-xl: ${unsafeCSS(space24)};
|
|
77
|
+
|
|
78
|
+
display: block;
|
|
79
|
+
width: max-content;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
__decorateClass([
|
|
83
|
+
property({ type: String, reflect: true })
|
|
84
|
+
], DaikinIcon.prototype, "icon", 2);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
property({ type: String, reflect: true })
|
|
87
|
+
], DaikinIcon.prototype, "color", 2);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
property({ type: String, reflect: true })
|
|
90
|
+
], DaikinIcon.prototype, "size", 2);
|
|
91
|
+
DaikinIcon = __decorateClass([
|
|
92
|
+
customElement("daikin-icon")
|
|
93
|
+
], DaikinIcon);
|
|
94
|
+
export {
|
|
95
|
+
DaikinIcon,
|
|
96
|
+
iconList
|
|
97
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"icons": {
|
|
3
|
+
"alarm": {
|
|
4
|
+
"class": "i-daikin-notification-status-alarm",
|
|
5
|
+
"color": null
|
|
6
|
+
},
|
|
7
|
+
"close": {
|
|
8
|
+
"class": "i-daikin-notification-close",
|
|
9
|
+
"color": "#a0a0a0"
|
|
10
|
+
},
|
|
11
|
+
"information": {
|
|
12
|
+
"class": "i-daikin-notification-status-information",
|
|
13
|
+
"color": null
|
|
14
|
+
},
|
|
15
|
+
"negative": {
|
|
16
|
+
"class": "i-daikin-notification-status-negative",
|
|
17
|
+
"color": null
|
|
18
|
+
},
|
|
19
|
+
"positive": {
|
|
20
|
+
"class": "i-daikin-notification-status-positive",
|
|
21
|
+
"color": null
|
|
22
|
+
},
|
|
23
|
+
"warning": {
|
|
24
|
+
"class": "i-daikin-notification-status-warning",
|
|
25
|
+
"color": null
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
;
|
|
30
|
+
|
|
31
|
+
export default _default;
|