@daikin-oss/design-system-web-components 0.1.0 → 0.3.1
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/README.md +139 -60
- package/dist/cjs/colors.cjs +80 -0
- package/dist/{colors.d.ts → cjs/colors.d.ts} +0 -1
- package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +40 -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 +56 -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/button/daikin-button.cjs +215 -0
- package/dist/cjs/components/button/daikin-button.d.ts +77 -0
- package/dist/cjs/components/button/index.cjs +7 -0
- package/dist/cjs/components/button/index.d.ts +1 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +183 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +78 -0
- package/dist/cjs/components/checkbox/index.cjs +7 -0
- package/dist/cjs/components/checkbox/index.d.ts +1 -0
- package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
- package/dist/cjs/components/icon/daikin-icon.d.ts +49 -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 +73 -0
- package/dist/cjs/components/index.d.ts +14 -0
- package/dist/cjs/components/input-group/daikin-input-group.cjs +119 -0
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +73 -0
- package/dist/cjs/components/input-group/index.cjs +7 -0
- package/dist/cjs/components/input-group/index.d.ts +1 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +191 -0
- package/dist/cjs/components/notification/daikin-notification.d.ts +76 -0
- package/dist/cjs/components/notification/index.cjs +7 -0
- package/dist/cjs/components/notification/index.d.ts +1 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +51 -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/radio/daikin-radio.cjs +150 -0
- package/dist/cjs/components/radio/daikin-radio.d.ts +76 -0
- package/dist/cjs/components/radio/index.cjs +7 -0
- package/dist/cjs/components/radio/index.d.ts +1 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
- package/dist/cjs/components/tab/daikin-tab.d.ts +55 -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 +105 -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.cjs +137 -0
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +69 -0
- package/dist/cjs/components/text-input/index.cjs +7 -0
- package/dist/cjs/components/text-input/index.d.ts +1 -0
- package/dist/cjs/components/textarea/daikin-textarea.cjs +168 -0
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +71 -0
- package/dist/cjs/components/textarea/index.cjs +7 -0
- package/dist/cjs/components/textarea/index.d.ts +1 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +61 -0
- package/dist/cjs/components/toggle/index.cjs +7 -0
- package/dist/cjs/components/toggle/index.d.ts +1 -0
- package/dist/cjs/constants/events.cjs +4 -0
- package/dist/cjs/constants/events.d.ts +1 -0
- package/dist/cjs/index.cjs +75 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/lit-analyzer-types.d.ts +112 -0
- package/dist/cjs/tailwind.css.cjs +6 -0
- package/dist/cjs/type-utils.d.ts +25 -0
- package/dist/cjs-dev/colors.cjs +80 -0
- package/{lib → dist/cjs-dev}/colors.d.ts +0 -1
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +40 -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 +56 -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/button/daikin-button.cjs +215 -0
- package/dist/cjs-dev/components/button/daikin-button.d.ts +77 -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 +78 -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 +49 -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 +73 -0
- package/dist/cjs-dev/components/index.d.ts +14 -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 +73 -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 +76 -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 +51 -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/radio/daikin-radio.cjs +150 -0
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +76 -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 +55 -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 +105 -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 +69 -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 +71 -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 +61 -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/constants/events.cjs +4 -0
- package/dist/cjs-dev/constants/events.d.ts +1 -0
- package/dist/cjs-dev/index.cjs +75 -0
- package/dist/cjs-dev/index.d.ts +3 -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 +25 -0
- package/dist/es/colors.d.ts +69 -0
- package/dist/es/colors.js +80 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +40 -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 +56 -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/button/daikin-button.d.ts +77 -0
- package/dist/es/components/button/daikin-button.js +216 -0
- package/dist/es/components/button/index.d.ts +1 -0
- package/dist/es/components/button/index.js +4 -0
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +78 -0
- package/dist/es/components/checkbox/daikin-checkbox.js +184 -0
- package/dist/es/components/checkbox/index.d.ts +1 -0
- package/dist/es/components/checkbox/index.js +4 -0
- package/dist/es/components/icon/daikin-icon.d.ts +49 -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 +14 -0
- package/dist/es/components/index.js +31 -0
- package/dist/es/components/input-group/daikin-input-group.d.ts +73 -0
- package/dist/es/components/input-group/daikin-input-group.js +120 -0
- package/dist/es/components/input-group/index.d.ts +1 -0
- package/dist/es/components/input-group/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +76 -0
- package/dist/es/components/notification/daikin-notification.js +192 -0
- package/dist/es/components/notification/index.d.ts +1 -0
- package/dist/es/components/notification/index.js +4 -0
- package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +51 -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/radio/daikin-radio.d.ts +76 -0
- package/dist/es/components/radio/daikin-radio.js +151 -0
- package/dist/es/components/radio/index.d.ts +1 -0
- package/dist/es/components/radio/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.d.ts +55 -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 +105 -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 +69 -0
- package/dist/es/components/text-input/daikin-text-input.js +138 -0
- package/dist/es/components/text-input/index.d.ts +1 -0
- package/dist/es/components/text-input/index.js +4 -0
- package/dist/es/components/textarea/daikin-textarea.d.ts +71 -0
- package/dist/es/components/textarea/daikin-textarea.js +169 -0
- package/dist/es/components/textarea/index.d.ts +1 -0
- package/dist/es/components/textarea/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +61 -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/constants/events.d.ts +1 -0
- package/dist/es/constants/events.js +4 -0
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.js +33 -0
- package/dist/es/lit-analyzer-types.d.ts +112 -0
- package/dist/es/tailwind.css.js +6 -0
- package/dist/es/type-utils.d.ts +25 -0
- 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 +40 -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 +56 -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/button/daikin-button.d.ts +77 -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 +78 -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 +49 -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 +14 -0
- package/dist/es-dev/components/index.js +31 -0
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +73 -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 +76 -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 +51 -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/radio/daikin-radio.d.ts +76 -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 +55 -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 +105 -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 +69 -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 +71 -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 +61 -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/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 +33 -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 +25 -0
- package/icons/accordion-chevron-up.svg +3 -0
- package/icons/checkbox-checked.svg +4 -0
- package/icons/checkbox-indeterminate.svg +3 -0
- package/icons/input-group-error.svg +11 -0
- package/icons/notification-close.svg +5 -0
- package/icons/notification-status-alarm.svg +5 -0
- package/icons/notification-status-information.svg +5 -0
- package/icons/notification-status-negative.svg +3 -0
- package/icons/notification-status-positive.svg +5 -0
- package/icons/notification-status-warning.svg +5 -0
- package/icons/radio-checked.svg +4 -0
- package/icons/radio-unchecked.svg +4 -0
- package/package.json +146 -88
- package/dist/_virtual/_tslib.js +0 -31
- package/dist/_virtual/_tslib.js.map +0 -1
- package/dist/colors.d.ts.map +0 -1
- package/dist/colors.js +0 -81
- package/dist/colors.js.map +0 -1
- package/dist/components/button/button.css.js +0 -7
- package/dist/components/button/button.css.js.map +0 -1
- package/dist/components/button/daikin-button.d.ts +0 -75
- package/dist/components/button/daikin-button.d.ts.map +0 -1
- package/dist/components/button/daikin-button.js +0 -200
- package/dist/components/button/daikin-button.js.map +0 -1
- package/dist/components/button/index.d.ts +0 -2
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js +0 -2
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button/stories/common.d.ts +0 -15
- package/dist/components/button/stories/common.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -2
- package/dist/components/index.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/lit-workaround-types.d.ts +0 -3
- package/dist/lit-workaround-types.d.ts.map +0 -1
- package/dist/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js +0 -66
- package/dist/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
- package/dist/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js +0 -66
- package/dist/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
- package/dist/node_modules/@lit/reactive-element/node/css-tag.js +0 -9
- package/dist/node_modules/@lit/reactive-element/node/css-tag.js.map +0 -1
- package/dist/node_modules/@lit/reactive-element/node/decorators/custom-element.js +0 -9
- package/dist/node_modules/@lit/reactive-element/node/decorators/custom-element.js.map +0 -1
- package/dist/node_modules/@lit/reactive-element/node/decorators/property.js +0 -9
- package/dist/node_modules/@lit/reactive-element/node/decorators/property.js.map +0 -1
- package/dist/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js +0 -6
- package/dist/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js.map +0 -1
- package/dist/node_modules/@lit/reactive-element/node/reactive-element.js +0 -12
- package/dist/node_modules/@lit/reactive-element/node/reactive-element.js.map +0 -1
- package/dist/node_modules/@lit-labs/ssr-dom-shim/index.js +0 -122
- package/dist/node_modules/@lit-labs/ssr-dom-shim/index.js.map +0 -1
- package/dist/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js +0 -85
- package/dist/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map +0 -1
- package/dist/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js +0 -13
- package/dist/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js.map +0 -1
- package/dist/node_modules/class-variance-authority/dist/index.js +0 -47
- package/dist/node_modules/class-variance-authority/dist/index.js.map +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -4
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/lit-element/lit-element.js +0 -13
- package/dist/node_modules/lit-element/lit-element.js.map +0 -1
- package/dist/node_modules/lit-html/node/lit-html.js +0 -9
- package/dist/node_modules/lit-html/node/lit-html.js.map +0 -1
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -29
- package/dist/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
- package/dist/tailwind.css.js +0 -7
- package/dist/tailwind.css.js.map +0 -1
- package/dist/typeUtils.d.ts +0 -4
- package/dist/typeUtils.d.ts.map +0 -1
- package/lib/_virtual/_tslib.js +0 -33
- package/lib/_virtual/_tslib.js.map +0 -1
- package/lib/colors.d.ts.map +0 -1
- package/lib/colors.js +0 -83
- package/lib/colors.js.map +0 -1
- package/lib/components/button/button.css.js +0 -9
- package/lib/components/button/button.css.js.map +0 -1
- package/lib/components/button/daikin-button.d.ts +0 -75
- package/lib/components/button/daikin-button.d.ts.map +0 -1
- package/lib/components/button/daikin-button.js +0 -202
- package/lib/components/button/daikin-button.js.map +0 -1
- package/lib/components/button/index.d.ts +0 -2
- package/lib/components/button/index.d.ts.map +0 -1
- package/lib/components/button/index.js +0 -8
- package/lib/components/button/index.js.map +0 -1
- package/lib/components/button/stories/common.d.ts +0 -15
- package/lib/components/button/stories/common.d.ts.map +0 -1
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.d.ts.map +0 -1
- package/lib/components/index.js +0 -5
- package/lib/components/index.js.map +0 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -9
- package/lib/index.js.map +0 -1
- package/lib/lit-workaround-types.d.ts +0 -3
- package/lib/lit-workaround-types.d.ts.map +0 -1
- package/lib/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js +0 -125
- package/lib/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
- package/lib/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js +0 -125
- package/lib/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
- package/lib/node_modules/@lit/reactive-element/node/css-tag.js +0 -16
- package/lib/node_modules/@lit/reactive-element/node/css-tag.js.map +0 -1
- package/lib/node_modules/@lit/reactive-element/node/decorators/custom-element.js +0 -11
- package/lib/node_modules/@lit/reactive-element/node/decorators/custom-element.js.map +0 -1
- package/lib/node_modules/@lit/reactive-element/node/decorators/property.js +0 -11
- package/lib/node_modules/@lit/reactive-element/node/decorators/property.js.map +0 -1
- package/lib/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js +0 -8
- package/lib/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js.map +0 -1
- package/lib/node_modules/@lit/reactive-element/node/reactive-element.js +0 -21
- package/lib/node_modules/@lit/reactive-element/node/reactive-element.js.map +0 -1
- package/lib/node_modules/@lit-labs/ssr-dom-shim/index.js +0 -126
- package/lib/node_modules/@lit-labs/ssr-dom-shim/index.js.map +0 -1
- package/lib/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js +0 -87
- package/lib/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map +0 -1
- package/lib/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js +0 -15
- package/lib/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js.map +0 -1
- package/lib/node_modules/class-variance-authority/dist/index.js +0 -50
- package/lib/node_modules/class-variance-authority/dist/index.js.map +0 -1
- package/lib/node_modules/clsx/dist/clsx.js +0 -9
- package/lib/node_modules/clsx/dist/clsx.js.map +0 -1
- package/lib/node_modules/lit-element/lit-element.js +0 -20
- package/lib/node_modules/lit-element/lit-element.js.map +0 -1
- package/lib/node_modules/lit-html/node/lit-html.js +0 -14
- package/lib/node_modules/lit-html/node/lit-html.js.map +0 -1
- package/lib/node_modules/style-inject/dist/style-inject.es.js +0 -31
- package/lib/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
- package/lib/tailwind.css.js +0 -9
- package/lib/tailwind.css.js.map +0 -1
- package/lib/typeUtils.d.ts +0 -4
- package/lib/typeUtils.d.ts.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The accordion item component is a child element within the `daikin-accordion` component.
|
|
5
|
+
* It functions similarly to the HTML `<details>` and `<summary>` tag, allowing users to expand or collapse the associated content by clicking on the header.
|
|
6
|
+
* This component is responsible for displaying the specific content within the accordion and allowing users to interact with each section independently.
|
|
7
|
+
*
|
|
8
|
+
* Hierarchy:
|
|
9
|
+
* - `daikin-accordion` > `daikin-accordion-item`
|
|
10
|
+
*
|
|
11
|
+
* @slot - A slot for the accordion item content.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <daikin-accordion-item title="The first accordion item">
|
|
17
|
+
* Accordion 1 content.
|
|
18
|
+
* </daikin-accordion-item>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class DaikinAccordionItem extends LitElement {
|
|
22
|
+
static readonly styles: import('lit').CSSResult;
|
|
23
|
+
private _contentRef;
|
|
24
|
+
/**
|
|
25
|
+
* Heading of accordion
|
|
26
|
+
*/
|
|
27
|
+
title: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the accordion is open
|
|
30
|
+
*/
|
|
31
|
+
open: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the accordion is disabled
|
|
34
|
+
*/
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Open attribute of the actual details element
|
|
38
|
+
*
|
|
39
|
+
* The default `open` attribute of the default details element does not allow the display of content to have transitions.
|
|
40
|
+
* To solve this, the `open` property that `daikin-accordion-item` receives manages the opening and closing of items independently of the open attribute.
|
|
41
|
+
*
|
|
42
|
+
* The `open` attribute, which should be present, is taken over by `_detailsOpen`.
|
|
43
|
+
*/
|
|
44
|
+
private _detailsOpen;
|
|
45
|
+
private _contentAnimate;
|
|
46
|
+
private _handleSummaryClick;
|
|
47
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
48
|
+
protected firstUpdated(): void;
|
|
49
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
50
|
+
}
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
"daikin-accordion-item": DaikinAccordionItem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
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,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);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ARIARole } from '../../lit-analyzer-types';
|
|
3
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
4
|
+
import { IconType } from '../icon/daikin-icon';
|
|
5
|
+
|
|
6
|
+
declare const cvaButton: (props?: ({
|
|
7
|
+
intent?: "primary" | "secondary" | "tertiary" | "primaryDanger" | null | undefined;
|
|
8
|
+
size?: "default" | "condensed" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
type ButtonVariantProps = MergeVariantProps<typeof cvaButton>;
|
|
11
|
+
/**
|
|
12
|
+
* The button component is a versatile UI element that triggers actions or submits forms when clicked.
|
|
13
|
+
* It functions similarly to the HTML `<button>` tag, allowing users to initiate various operations such as submitting data, opening dialogs, or navigating to different sections of an application.
|
|
14
|
+
*
|
|
15
|
+
* @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) emitted from the inner `<button>` element. Suppressed if `disabled` is true,
|
|
16
|
+
*
|
|
17
|
+
* @slot - A slot for the button content.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
* <daikin-button>
|
|
23
|
+
* Button label
|
|
24
|
+
* </daikin-button>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class DaikinButton extends LitElement {
|
|
28
|
+
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
/**
|
|
30
|
+
* Type of variant.
|
|
31
|
+
*/
|
|
32
|
+
variant: ButtonVariantProps["intent"];
|
|
33
|
+
/**
|
|
34
|
+
* `true` if the button should be disabled.
|
|
35
|
+
*/
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Set a icon in the right of button label.
|
|
39
|
+
*/
|
|
40
|
+
rightIcon: IconType | null;
|
|
41
|
+
/**
|
|
42
|
+
* Set a icon in the left of button label.
|
|
43
|
+
*/
|
|
44
|
+
leftIcon: IconType | null;
|
|
45
|
+
/**
|
|
46
|
+
* Link `href`. If present, this button is rendered as `<a>`.
|
|
47
|
+
*/
|
|
48
|
+
href: string;
|
|
49
|
+
/**
|
|
50
|
+
* Specify the button size.
|
|
51
|
+
*/
|
|
52
|
+
size: ButtonVariantProps["size"];
|
|
53
|
+
/**
|
|
54
|
+
* Specify the button type.
|
|
55
|
+
*/
|
|
56
|
+
type: "button" | "submit" | "reset";
|
|
57
|
+
/**
|
|
58
|
+
* Specify the button role.
|
|
59
|
+
*/
|
|
60
|
+
role: ARIARole;
|
|
61
|
+
/**
|
|
62
|
+
* Specify whether the button is loading.
|
|
63
|
+
*/
|
|
64
|
+
isLoading: boolean;
|
|
65
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
66
|
+
/**
|
|
67
|
+
* Focuses on the inner button.
|
|
68
|
+
* @param options focus options
|
|
69
|
+
*/
|
|
70
|
+
focus(options?: FocusOptions | undefined): void;
|
|
71
|
+
}
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
"daikin-button": DaikinButton;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-button';
|
|
@@ -0,0 +1,183 @@
|
|
|
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 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
|
+
const cvaCheckbox = classVarianceAuthority.cva(
|
|
18
|
+
[
|
|
19
|
+
"appearance-none",
|
|
20
|
+
"inline-block",
|
|
21
|
+
"relative",
|
|
22
|
+
"rounded-sm",
|
|
23
|
+
"border-solid",
|
|
24
|
+
"border-2",
|
|
25
|
+
"after:absolute",
|
|
26
|
+
"after:text-white",
|
|
27
|
+
"checked:after:i-daikin-checkbox-checked",
|
|
28
|
+
"indeterminate:after:i-daikin-checkbox-indeterminate",
|
|
29
|
+
"focus-visible:outline-none",
|
|
30
|
+
"border-daikinNeutral-400",
|
|
31
|
+
"enabled:indeterminate:border-daikinBlue-600",
|
|
32
|
+
"enabled:indeterminate:bg-daikinBlue-600",
|
|
33
|
+
"enabled:checked:border-daikinBlue-600",
|
|
34
|
+
"enabled:checked:bg-daikinBlue-600",
|
|
35
|
+
"aria-controllable:focus-visible:border-daikinBlue-700",
|
|
36
|
+
"aria-controllable:hover:border-daikinBlue-300",
|
|
37
|
+
"aria-controllable:active:border-daikinBlue-600",
|
|
38
|
+
"aria-controllable:checked:focus-visible:border-daikinBlue-700",
|
|
39
|
+
"aria-controllable:checked:focus-visible:border-daikinBlue-700",
|
|
40
|
+
"aria-controllable:checked:focus-visible:bg-daikinBlue-700",
|
|
41
|
+
"aria-controllable:checked:focus-visible:bg-daikinBlue-700",
|
|
42
|
+
"aria-controllable:checked:hover:border-daikinBlue-300",
|
|
43
|
+
"aria-controllable:checked:hover:bg-daikinBlue-300",
|
|
44
|
+
"aria-controllable:checked:active:border-daikinBlue-600",
|
|
45
|
+
"aria-controllable:checked:active:bg-daikinBlue-600",
|
|
46
|
+
"aria-controllable:indeterminate:active:border-daikinBlue-600",
|
|
47
|
+
"aria-controllable:indeterminate:active:bg-daikinBlue-600",
|
|
48
|
+
"aria-controllable:indeterminate:hover:border-daikinBlue-300",
|
|
49
|
+
"aria-controllable:indeterminate:hover:bg-daikinBlue-300",
|
|
50
|
+
"aria-controllable:indeterminate:focus-visible:border-daikinBlue-700",
|
|
51
|
+
"aria-controllable:indeterminate:focus-visible:bg-daikinBlue-700",
|
|
52
|
+
"disabled:border-daikinNeutral-200",
|
|
53
|
+
"disabled:bg-white",
|
|
54
|
+
"disabled:indeterminate:bg-daikinNeutral-200",
|
|
55
|
+
"disabled:checked:bg-daikinNeutral-200"
|
|
56
|
+
],
|
|
57
|
+
{
|
|
58
|
+
variants: {
|
|
59
|
+
size: {
|
|
60
|
+
small: ["w-[18px]", "h-[18px]"],
|
|
61
|
+
large: ["w-5", "h-5"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
const cvaLabel = classVarianceAuthority.cva(
|
|
67
|
+
["leading-8", "not-italic", "font-normal", "align-middle"],
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
size: {
|
|
71
|
+
small: ["text-sm"],
|
|
72
|
+
large: ["text-base"]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
size: "small"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
exports.DaikinCheckbox = class DaikinCheckbox extends lit.LitElement {
|
|
81
|
+
constructor() {
|
|
82
|
+
super(...arguments);
|
|
83
|
+
this._internals = this.attachInternals();
|
|
84
|
+
this.label = "";
|
|
85
|
+
this.size = "small";
|
|
86
|
+
this.labelPosition = "right";
|
|
87
|
+
this.disabled = false;
|
|
88
|
+
this.readonly = false;
|
|
89
|
+
this.checkState = "unchecked";
|
|
90
|
+
this.name = "";
|
|
91
|
+
this.value = "";
|
|
92
|
+
this.error = false;
|
|
93
|
+
}
|
|
94
|
+
_handleClick(event) {
|
|
95
|
+
if (this.readonly || this.disabled) {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
_updateFormValue() {
|
|
100
|
+
this._internals.setFormValue(this.checked ? this.value : null);
|
|
101
|
+
}
|
|
102
|
+
get checked() {
|
|
103
|
+
return this.checkState === "checked";
|
|
104
|
+
}
|
|
105
|
+
_handleChange(event) {
|
|
106
|
+
if (!this._input) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.checkState = this._input.checked ? "checked" : "unchecked";
|
|
110
|
+
this._updateFormValue();
|
|
111
|
+
this.dispatchEvent(new Event("change", event));
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
const checkboxClassName = cvaCheckbox({ size: this.size });
|
|
115
|
+
const labelClassName = cvaLabel({ size: this.size });
|
|
116
|
+
const isIndeterminate = this.checkState === "indeterminate";
|
|
117
|
+
const labelText = this.label ? lit.html`<span class=${labelClassName}>${this.label}</span>` : lit.html``;
|
|
118
|
+
const inputTag = lit.html`<input
|
|
119
|
+
class=${checkboxClassName}
|
|
120
|
+
type="checkbox"
|
|
121
|
+
name=${this.name}
|
|
122
|
+
value=${this.value}
|
|
123
|
+
aria-readonly=${this.readonly}
|
|
124
|
+
.indeterminate=${isIndeterminate}
|
|
125
|
+
.checked=${this.checked}
|
|
126
|
+
?readonly=${this.readonly}
|
|
127
|
+
?disabled=${this.disabled}
|
|
128
|
+
@change=${this._handleChange}
|
|
129
|
+
@click=${this._handleClick}
|
|
130
|
+
/>`;
|
|
131
|
+
const content = this.labelPosition === "left" ? lit.html`${labelText}${inputTag}` : lit.html`${inputTag}${labelText}`;
|
|
132
|
+
return lit.html`<label
|
|
133
|
+
class="inline-flex gap-[10px] items-center font-daikinSerif"
|
|
134
|
+
>${content}</label
|
|
135
|
+
>`;
|
|
136
|
+
}
|
|
137
|
+
updated(changedProperties) {
|
|
138
|
+
if (changedProperties.has("checkState")) {
|
|
139
|
+
this._updateFormValue();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
exports.DaikinCheckbox.styles = lit.css`
|
|
144
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
145
|
+
|
|
146
|
+
:host {
|
|
147
|
+
display: inline-block;
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
exports.DaikinCheckbox.formAssociated = true;
|
|
151
|
+
__decorateClass([
|
|
152
|
+
decorators_js.query("input")
|
|
153
|
+
], exports.DaikinCheckbox.prototype, "_input", 2);
|
|
154
|
+
__decorateClass([
|
|
155
|
+
decorators_js.property({ type: String })
|
|
156
|
+
], exports.DaikinCheckbox.prototype, "label", 2);
|
|
157
|
+
__decorateClass([
|
|
158
|
+
decorators_js.property({ type: String })
|
|
159
|
+
], exports.DaikinCheckbox.prototype, "size", 2);
|
|
160
|
+
__decorateClass([
|
|
161
|
+
decorators_js.property({ type: String, attribute: "label-position" })
|
|
162
|
+
], exports.DaikinCheckbox.prototype, "labelPosition", 2);
|
|
163
|
+
__decorateClass([
|
|
164
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
165
|
+
], exports.DaikinCheckbox.prototype, "disabled", 2);
|
|
166
|
+
__decorateClass([
|
|
167
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
168
|
+
], exports.DaikinCheckbox.prototype, "readonly", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
decorators_js.property({ type: String, reflect: true, attribute: "check-state" })
|
|
171
|
+
], exports.DaikinCheckbox.prototype, "checkState", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
decorators_js.property({ type: String, reflect: true })
|
|
174
|
+
], exports.DaikinCheckbox.prototype, "name", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
decorators_js.property({ type: String, reflect: true })
|
|
177
|
+
], exports.DaikinCheckbox.prototype, "value", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
180
|
+
], exports.DaikinCheckbox.prototype, "error", 2);
|
|
181
|
+
exports.DaikinCheckbox = __decorateClass([
|
|
182
|
+
decorators_js.customElement("daikin-checkbox")
|
|
183
|
+
], exports.DaikinCheckbox);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
|
|
4
|
+
declare const cvaCheckbox: (props?: ({
|
|
5
|
+
size?: "small" | "large" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare const cvaLabel: (props?: ({
|
|
8
|
+
size?: "small" | "large" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
type CheckboxVariantProps = MergeVariantProps<typeof cvaCheckbox | typeof cvaLabel>;
|
|
11
|
+
/**
|
|
12
|
+
* The checkbox component is a UI element that allows users to select one or more options from a list of choices.
|
|
13
|
+
* It functions similarly to the HTML `<input type="checkbox">` tag, enabling users to toggle the selection of each option independently.
|
|
14
|
+
* This component is ideal for cases where multiple selections are allowed or required.
|
|
15
|
+
*
|
|
16
|
+
* @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.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```html
|
|
21
|
+
* <daikin-checkbox label="Checkbox label" name="name" value="value"></daikin-checkbox>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class DaikinCheckbox extends LitElement {
|
|
25
|
+
static readonly styles: import('lit').CSSResult;
|
|
26
|
+
private _handleClick;
|
|
27
|
+
static readonly formAssociated = true;
|
|
28
|
+
private _internals;
|
|
29
|
+
private _updateFormValue;
|
|
30
|
+
private _input;
|
|
31
|
+
get checked(): boolean;
|
|
32
|
+
private _handleChange;
|
|
33
|
+
/**
|
|
34
|
+
* Specify the label text for check box
|
|
35
|
+
*/
|
|
36
|
+
label: string;
|
|
37
|
+
/**
|
|
38
|
+
* Specify the component size
|
|
39
|
+
*/
|
|
40
|
+
size: CheckboxVariantProps["size"];
|
|
41
|
+
/**
|
|
42
|
+
* Specify the label position
|
|
43
|
+
* when `left` the label will be in left of checkbox, when `right` label will be in right of checkbox
|
|
44
|
+
*/
|
|
45
|
+
labelPosition: "left" | "right";
|
|
46
|
+
/**
|
|
47
|
+
* Specify whether the Checkbox should be disabled
|
|
48
|
+
*/
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Specify whether the checkbox is read only
|
|
52
|
+
*/
|
|
53
|
+
readonly: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Specify whether the checkbox is be checked
|
|
56
|
+
*/
|
|
57
|
+
checkState: "unchecked" | "indeterminate" | "checked";
|
|
58
|
+
/**
|
|
59
|
+
* The form name.
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* The value.
|
|
64
|
+
*/
|
|
65
|
+
value: string;
|
|
66
|
+
/**
|
|
67
|
+
* Specify whether the Checkbox is in a error state
|
|
68
|
+
*/
|
|
69
|
+
error: boolean;
|
|
70
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
71
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
72
|
+
}
|
|
73
|
+
declare global {
|
|
74
|
+
interface HTMLElementTagNameMap {
|
|
75
|
+
"daikin-checkbox": DaikinCheckbox;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinCheckbox = require("./daikin-checkbox.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinCheckbox", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinCheckbox.DaikinCheckbox
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-checkbox';
|