@daikin-oss/design-system-web-components 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +3 -10
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +15 -14
- package/dist/cjs/components/button/daikin-button.cjs +13 -13
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +35 -34
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +367 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/cjs/components/dropdown/index.cjs +7 -0
- package/dist/cjs/components/dropdown/index.d.ts +1 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/cjs/components/dropdown-item/index.cjs +7 -0
- package/dist/cjs/components/dropdown-item/index.d.ts +1 -0
- package/dist/cjs/components/icon/icons.json.cjs +10 -6
- package/dist/cjs/components/icon/icons.json.d.ts +10 -6
- package/dist/cjs/components/index.cjs +31 -6
- package/dist/cjs/components/index.d.ts +7 -2
- package/dist/cjs/components/input-group/daikin-input-group.cjs +103 -46
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +65 -27
- package/dist/cjs/components/list-item/daikin-list-item.cjs +16 -10
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +1 -1
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +75 -0
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/cjs/components/progress-indicator/index.cjs +7 -0
- package/dist/cjs/components/progress-indicator/index.d.ts +1 -0
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/cjs/components/progress-indicator-item/index.cjs +7 -0
- package/dist/cjs/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/cjs/components/radio/daikin-radio.cjs +38 -17
- package/dist/cjs/components/radio/daikin-radio.d.ts +14 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +144 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/cjs/components/radio-group/index.cjs +7 -0
- package/dist/cjs/components/radio-group/index.d.ts +1 -0
- package/dist/cjs/components/select/daikin-select.cjs +160 -0
- package/dist/cjs/components/select/daikin-select.d.ts +60 -0
- package/dist/cjs/components/select/index.cjs +7 -0
- package/dist/cjs/components/select/index.d.ts +1 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +27 -22
- package/dist/cjs/components/tab-panels/daikin-tab-panels.d.ts +3 -3
- package/dist/cjs/components/tabs/daikin-tabs.cjs +6 -1
- package/dist/cjs/components/tabs/daikin-tabs.d.ts +1 -5
- package/dist/cjs/components/text-area/daikin-text-area.cjs +164 -0
- package/dist/{es/components/textarea/daikin-textarea.d.ts → cjs/components/text-area/daikin-text-area.d.ts} +31 -24
- package/dist/cjs/components/text-area/index.cjs +7 -0
- package/dist/cjs/components/text-area/index.d.ts +1 -0
- package/dist/cjs/components/text-field/daikin-text-field.cjs +211 -0
- package/dist/cjs/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/cjs/components/text-field/index.cjs +7 -0
- package/dist/cjs/components/text-field/index.d.ts +1 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +12 -12
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +77 -70
- package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +35 -15
- package/dist/cjs/controllers/click-outside.cjs +29 -0
- package/dist/cjs/controllers/click-outside.d.ts +37 -0
- package/dist/cjs/controllers/floating-ui-auto-update.cjs +75 -0
- package/dist/cjs/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/cjs/controllers/helpers/controller-directive.cjs +50 -0
- package/dist/cjs/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/cjs/index.cjs +31 -6
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/reDispatch.cjs +10 -0
- package/dist/cjs/utils/reDispatch.d.ts +1 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +3 -10
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +15 -14
- package/dist/cjs-dev/components/button/daikin-button.cjs +13 -13
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +35 -34
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +367 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/cjs-dev/components/dropdown/index.cjs +7 -0
- package/dist/cjs-dev/components/dropdown/index.d.ts +1 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/cjs-dev/components/dropdown-item/index.cjs +7 -0
- package/dist/cjs-dev/components/dropdown-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +10 -6
- package/dist/cjs-dev/components/icon/icons.json.d.ts +10 -6
- package/dist/cjs-dev/components/index.cjs +31 -6
- package/dist/cjs-dev/components/index.d.ts +7 -2
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +103 -46
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +65 -27
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +16 -10
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +1 -1
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +85 -0
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/cjs-dev/components/progress-indicator/index.cjs +7 -0
- package/dist/cjs-dev/components/progress-indicator/index.d.ts +1 -0
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/cjs-dev/components/progress-indicator-item/index.cjs +7 -0
- package/dist/cjs-dev/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +38 -17
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +14 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +144 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/cjs-dev/components/radio-group/index.cjs +7 -0
- package/dist/cjs-dev/components/radio-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/select/daikin-select.cjs +160 -0
- package/dist/cjs-dev/components/select/daikin-select.d.ts +60 -0
- package/dist/cjs-dev/components/select/index.cjs +7 -0
- package/dist/cjs-dev/components/select/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +27 -22
- package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.d.ts +3 -3
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +6 -1
- package/dist/cjs-dev/components/tabs/daikin-tabs.d.ts +1 -5
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +164 -0
- package/dist/{es-dev/components/textarea/daikin-textarea.d.ts → cjs-dev/components/text-area/daikin-text-area.d.ts} +31 -24
- package/dist/cjs-dev/components/text-area/index.cjs +7 -0
- package/dist/cjs-dev/components/text-area/index.d.ts +1 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +211 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/cjs-dev/components/text-field/index.cjs +7 -0
- package/dist/cjs-dev/components/text-field/index.d.ts +1 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +12 -12
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +77 -70
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +35 -15
- package/dist/cjs-dev/controllers/click-outside.cjs +29 -0
- package/dist/cjs-dev/controllers/click-outside.d.ts +37 -0
- package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +82 -0
- package/dist/cjs-dev/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +50 -0
- package/dist/cjs-dev/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/cjs-dev/index.cjs +31 -6
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/reDispatch.cjs +10 -0
- package/dist/cjs-dev/utils/reDispatch.d.ts +1 -0
- package/dist/es/components/accordion/daikin-accordion.js +3 -10
- package/dist/es/components/accordion-item/daikin-accordion-item.js +15 -14
- package/dist/es/components/button/daikin-button.js +13 -13
- package/dist/es/components/checkbox/daikin-checkbox.js +35 -34
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/es/components/dropdown/daikin-dropdown.js +368 -0
- package/dist/es/components/dropdown/index.d.ts +1 -0
- package/dist/es/components/dropdown/index.js +4 -0
- package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +113 -0
- package/dist/es/components/dropdown-item/index.d.ts +1 -0
- package/dist/es/components/dropdown-item/index.js +4 -0
- package/dist/es/components/icon/icons.json.d.ts +10 -6
- package/dist/es/components/icon/icons.json.js +10 -6
- package/dist/es/components/index.d.ts +7 -2
- package/dist/es/components/index.js +14 -4
- package/dist/es/components/input-group/daikin-input-group.d.ts +65 -27
- package/dist/es/components/input-group/daikin-input-group.js +105 -48
- package/dist/es/components/list-item/daikin-list-item.js +16 -10
- package/dist/es/components/progress-bar/daikin-progress-bar.js +1 -1
- package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +76 -0
- package/dist/es/components/progress-indicator/index.d.ts +1 -0
- package/dist/es/components/progress-indicator/index.js +4 -0
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
- package/dist/es/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/es/components/progress-indicator-item/index.js +4 -0
- package/dist/es/components/radio/daikin-radio.d.ts +14 -0
- package/dist/es/components/radio/daikin-radio.js +39 -18
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/es/components/radio-group/daikin-radio-group.js +145 -0
- package/dist/es/components/radio-group/index.d.ts +1 -0
- package/dist/es/components/radio-group/index.js +4 -0
- package/dist/es/components/select/daikin-select.d.ts +60 -0
- package/dist/es/components/select/daikin-select.js +161 -0
- package/dist/es/components/select/index.d.ts +1 -0
- package/dist/es/components/select/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.js +27 -22
- package/dist/es/components/tab-panels/daikin-tab-panels.d.ts +3 -3
- package/dist/es/components/tabs/daikin-tabs.d.ts +1 -5
- package/dist/es/components/tabs/daikin-tabs.js +6 -1
- package/dist/{cjs/components/textarea/daikin-textarea.d.ts → es/components/text-area/daikin-text-area.d.ts} +31 -24
- package/dist/es/components/text-area/daikin-text-area.js +165 -0
- package/dist/es/components/text-area/index.d.ts +1 -0
- package/dist/es/components/text-area/index.js +4 -0
- package/dist/es/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/es/components/text-field/daikin-text-field.js +212 -0
- package/dist/es/components/text-field/index.d.ts +1 -0
- package/dist/es/components/text-field/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.js +12 -12
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +35 -15
- package/dist/es/components/tooltip/daikin-tooltip.js +78 -71
- package/dist/es/controllers/click-outside.d.ts +37 -0
- package/dist/es/controllers/click-outside.js +29 -0
- package/dist/es/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/es/controllers/floating-ui-auto-update.js +75 -0
- package/dist/es/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/es/controllers/helpers/controller-directive.js +50 -0
- package/dist/es/index.js +14 -4
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/reDispatch.d.ts +1 -0
- package/dist/es/utils/reDispatch.js +10 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +3 -10
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +15 -14
- package/dist/es-dev/components/button/daikin-button.js +13 -13
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +35 -34
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +368 -0
- package/dist/es-dev/components/dropdown/index.d.ts +1 -0
- package/dist/es-dev/components/dropdown/index.js +4 -0
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +113 -0
- package/dist/es-dev/components/dropdown-item/index.d.ts +1 -0
- package/dist/es-dev/components/dropdown-item/index.js +4 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +10 -6
- package/dist/es-dev/components/icon/icons.json.js +10 -6
- package/dist/es-dev/components/index.d.ts +7 -2
- package/dist/es-dev/components/index.js +14 -4
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +65 -27
- package/dist/es-dev/components/input-group/daikin-input-group.js +105 -48
- package/dist/es-dev/components/list-item/daikin-list-item.js +16 -10
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +1 -1
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +86 -0
- package/dist/es-dev/components/progress-indicator/index.d.ts +1 -0
- package/dist/es-dev/components/progress-indicator/index.js +4 -0
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
- package/dist/es-dev/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/es-dev/components/progress-indicator-item/index.js +4 -0
- package/dist/es-dev/components/radio/daikin-radio.d.ts +14 -0
- package/dist/es-dev/components/radio/daikin-radio.js +39 -18
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +145 -0
- package/dist/es-dev/components/radio-group/index.d.ts +1 -0
- package/dist/es-dev/components/radio-group/index.js +4 -0
- package/dist/es-dev/components/select/daikin-select.d.ts +60 -0
- package/dist/es-dev/components/select/daikin-select.js +161 -0
- package/dist/es-dev/components/select/index.d.ts +1 -0
- package/dist/es-dev/components/select/index.js +4 -0
- package/dist/es-dev/components/tab/daikin-tab.js +27 -22
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.d.ts +3 -3
- package/dist/es-dev/components/tabs/daikin-tabs.d.ts +1 -5
- package/dist/es-dev/components/tabs/daikin-tabs.js +6 -1
- package/dist/{cjs-dev/components/textarea/daikin-textarea.d.ts → es-dev/components/text-area/daikin-text-area.d.ts} +31 -24
- package/dist/es-dev/components/text-area/daikin-text-area.js +165 -0
- package/dist/es-dev/components/text-area/index.d.ts +1 -0
- package/dist/es-dev/components/text-area/index.js +4 -0
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/es-dev/components/text-field/daikin-text-field.js +212 -0
- package/dist/es-dev/components/text-field/index.d.ts +1 -0
- package/dist/es-dev/components/text-field/index.js +4 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +12 -12
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +35 -15
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +78 -71
- package/dist/es-dev/controllers/click-outside.d.ts +37 -0
- package/dist/es-dev/controllers/click-outside.js +29 -0
- package/dist/es-dev/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/es-dev/controllers/floating-ui-auto-update.js +82 -0
- package/dist/es-dev/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/es-dev/controllers/helpers/controller-directive.js +50 -0
- package/dist/es-dev/index.js +14 -4
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/reDispatch.d.ts +1 -0
- package/dist/es-dev/utils/reDispatch.js +10 -0
- package/icons/dropdown-check.svg +3 -0
- package/icons/dropdown-chevron-down.svg +3 -0
- package/icons/required.svg +3 -0
- package/icons/status-error.svg +1 -1
- package/icons/{notification-status-negative.svg → status-negative.svg} +1 -1
- package/icons/status-positive.svg +4 -14
- package/icons/status-success.svg +6 -0
- package/package.json +2 -2
- package/dist/cjs/components/text-input/daikin-text-input.cjs +0 -138
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +0 -73
- package/dist/cjs/components/text-input/index.cjs +0 -7
- package/dist/cjs/components/text-input/index.d.ts +0 -1
- package/dist/cjs/components/textarea/daikin-textarea.cjs +0 -168
- package/dist/cjs/components/textarea/index.cjs +0 -7
- package/dist/cjs/components/textarea/index.d.ts +0 -1
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +0 -138
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +0 -73
- package/dist/cjs-dev/components/text-input/index.cjs +0 -7
- package/dist/cjs-dev/components/text-input/index.d.ts +0 -1
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +0 -168
- package/dist/cjs-dev/components/textarea/index.cjs +0 -7
- package/dist/cjs-dev/components/textarea/index.d.ts +0 -1
- package/dist/es/components/text-input/daikin-text-input.d.ts +0 -73
- package/dist/es/components/text-input/daikin-text-input.js +0 -139
- package/dist/es/components/text-input/index.d.ts +0 -1
- package/dist/es/components/text-input/index.js +0 -4
- package/dist/es/components/textarea/daikin-textarea.js +0 -169
- package/dist/es/components/textarea/index.d.ts +0 -1
- package/dist/es/components/textarea/index.js +0 -4
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +0 -73
- package/dist/es-dev/components/text-input/daikin-text-input.js +0 -139
- package/dist/es-dev/components/text-input/index.d.ts +0 -1
- package/dist/es-dev/components/text-input/index.js +0 -4
- package/dist/es-dev/components/textarea/daikin-textarea.js +0 -169
- package/dist/es-dev/components/textarea/index.d.ts +0 -1
- package/dist/es-dev/components/textarea/index.js +0 -4
- package/icons/notification-status-positive.svg +0 -5
- /package/icons/{notification-status-alarm.svg → status-alarm.svg} +0 -0
- /package/icons/{notification-status-information.svg → status-information.svg} +0 -0
- /package/icons/{notification-status-warning.svg → status-warning.svg} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
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 cvaSelect = classVarianceAuthority.cva(
|
|
18
|
+
[
|
|
19
|
+
"block",
|
|
20
|
+
"w-full",
|
|
21
|
+
"h-full",
|
|
22
|
+
"relative",
|
|
23
|
+
"after:i-daikin-dropdown-chevron-down",
|
|
24
|
+
"after:w-6",
|
|
25
|
+
"after:h-6",
|
|
26
|
+
"after:m-auto",
|
|
27
|
+
"after:absolute",
|
|
28
|
+
"after:top-0",
|
|
29
|
+
"after:bottom-0",
|
|
30
|
+
"after:right-3",
|
|
31
|
+
"after:pointer-events-none",
|
|
32
|
+
"slotted-[select]:!appearance-none",
|
|
33
|
+
"slotted-[select]:!flex",
|
|
34
|
+
"slotted-[select]:!items-center",
|
|
35
|
+
"slotted-[select]:!gap-2",
|
|
36
|
+
"slotted-[select]:!w-full",
|
|
37
|
+
"slotted-[select]:!h-full",
|
|
38
|
+
"slotted-[select]:!min-h-12",
|
|
39
|
+
"slotted-[select]:!pl-4",
|
|
40
|
+
"slotted-[select]:!pr-12",
|
|
41
|
+
"slotted-[select]:!text-base",
|
|
42
|
+
"slotted-[select]:!font-daikinSerif",
|
|
43
|
+
"slotted-[select]:!border",
|
|
44
|
+
"slotted-[select]:!border-[--color-base]",
|
|
45
|
+
"slotted-[select]:!rounded-md",
|
|
46
|
+
"slotted-[select]:!font-daikinSerif",
|
|
47
|
+
"slotted-[select]:!leading-5",
|
|
48
|
+
"slotted-[select]:!outline",
|
|
49
|
+
"slotted-[select]:!outline-0",
|
|
50
|
+
"slotted-[select]:!-outline-offset-2",
|
|
51
|
+
"slotted-[select:focus-visible]:!outline-2",
|
|
52
|
+
"slotted-[select:focus-visible]:!outline-[--color-focus]",
|
|
53
|
+
"slotted-[select:enabled]:!cursor-pointer",
|
|
54
|
+
"slotted-[select:enabled]:!text-daikinNeutral-800",
|
|
55
|
+
"slotted-[select:enabled:hover]:!bg-[#f2f2f2]",
|
|
56
|
+
"slotted-[select:enabled:active]:!bg-daikinNeutral-100",
|
|
57
|
+
"slotted-[select:disabled]:!text-daikinNeutral-200",
|
|
58
|
+
"slotted-[select:disabled]:!border-daikinNeutral-200"
|
|
59
|
+
],
|
|
60
|
+
{
|
|
61
|
+
variants: {
|
|
62
|
+
disabled: {
|
|
63
|
+
false: ["after:text-daikinNeutral-900"],
|
|
64
|
+
true: ["after:text-daikinNeutral-200"]
|
|
65
|
+
},
|
|
66
|
+
error: {
|
|
67
|
+
false: [
|
|
68
|
+
"var-color-daikinNeutral-600/color-base",
|
|
69
|
+
"var-color-daikinBlue-700/color-focus"
|
|
70
|
+
],
|
|
71
|
+
true: [
|
|
72
|
+
"var-color-daikinRed-500/color-base",
|
|
73
|
+
"var-color-daikinRed-500/color-focus"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
exports.DaikinSelect = class DaikinSelect extends lit.LitElement {
|
|
80
|
+
constructor() {
|
|
81
|
+
super(...arguments);
|
|
82
|
+
this.error = false;
|
|
83
|
+
this.required = false;
|
|
84
|
+
this.disabled = false;
|
|
85
|
+
}
|
|
86
|
+
get _select() {
|
|
87
|
+
return this._selects[0] ?? null;
|
|
88
|
+
}
|
|
89
|
+
_updateSelect() {
|
|
90
|
+
const select = this._select;
|
|
91
|
+
if (select) {
|
|
92
|
+
select.disabled = this.disabled;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
_handleSlotChange() {
|
|
96
|
+
this._updateSelect();
|
|
97
|
+
}
|
|
98
|
+
render() {
|
|
99
|
+
return lit.html`<slot
|
|
100
|
+
class=${cvaSelect({ disabled: this.disabled, error: this.error })}
|
|
101
|
+
@slotchange=${this._handleSlotChange}
|
|
102
|
+
></slot>`;
|
|
103
|
+
}
|
|
104
|
+
updated(changedProperties) {
|
|
105
|
+
if (changedProperties.has("disabled")) {
|
|
106
|
+
this._updateSelect();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
reflectInputGroup(inputGroup) {
|
|
110
|
+
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
111
|
+
this.disabled = !!inputGroup.disabled;
|
|
112
|
+
this.required = !!inputGroup.required;
|
|
113
|
+
this.error = isError;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Focuses on the `<select>` element in the slot.
|
|
117
|
+
* @param options focus options
|
|
118
|
+
*/
|
|
119
|
+
focus(options) {
|
|
120
|
+
var _a;
|
|
121
|
+
(_a = this._select) == null ? void 0 : _a.focus(options);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
exports.DaikinSelect.styles = lit.css`
|
|
125
|
+
::slotted(select) {
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
border: 0 solid;
|
|
130
|
+
|
|
131
|
+
font: inherit;
|
|
132
|
+
font-feature-settings: inherit;
|
|
133
|
+
font-variation-settings: inherit;
|
|
134
|
+
letter-spacing: inherit;
|
|
135
|
+
color: inherit;
|
|
136
|
+
background: transparent;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
140
|
+
|
|
141
|
+
:host {
|
|
142
|
+
display: block;
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
145
|
+
`;
|
|
146
|
+
__decorateClass([
|
|
147
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
148
|
+
], exports.DaikinSelect.prototype, "error", 2);
|
|
149
|
+
__decorateClass([
|
|
150
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
151
|
+
], exports.DaikinSelect.prototype, "required", 2);
|
|
152
|
+
__decorateClass([
|
|
153
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
154
|
+
], exports.DaikinSelect.prototype, "disabled", 2);
|
|
155
|
+
__decorateClass([
|
|
156
|
+
decorators_js.queryAssignedElements({ selector: "select" })
|
|
157
|
+
], exports.DaikinSelect.prototype, "_selects", 2);
|
|
158
|
+
exports.DaikinSelect = __decorateClass([
|
|
159
|
+
decorators_js.customElement("daikin-select")
|
|
160
|
+
], exports.DaikinSelect);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { DaikinInputGroup } from '../input-group';
|
|
3
|
+
/**
|
|
4
|
+
* A select component.
|
|
5
|
+
* This component accepts an HTML `<select>` element in the slot and applies styles to it.
|
|
6
|
+
* The `disabled` property of the component is also reflected in the `<select>` element in the slot.
|
|
7
|
+
*
|
|
8
|
+
* Hierarchy:
|
|
9
|
+
* - `daikin-input-group` > `daikin-select`
|
|
10
|
+
*
|
|
11
|
+
* @slot - A slot for an HTML `<select>` element which may contain `<option>` and `<optgroup>`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <daikin-select>
|
|
17
|
+
* <select name="select">
|
|
18
|
+
* <option value="value1">Option 1</option>
|
|
19
|
+
* <option value="value2">Option 2</option>
|
|
20
|
+
* <optgroup label="Group">
|
|
21
|
+
* <option value="value3">Option 3</option>
|
|
22
|
+
* <option value="value4">Option 4</option>
|
|
23
|
+
* </optgroup>
|
|
24
|
+
* </select>
|
|
25
|
+
* </daikin-select>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class DaikinSelect extends LitElement {
|
|
29
|
+
static readonly styles: import('lit').CSSResult;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the select component is in an error state.
|
|
32
|
+
*/
|
|
33
|
+
error: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the select component is required.
|
|
36
|
+
*/
|
|
37
|
+
required: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the select component is disabled.
|
|
40
|
+
* This value will also be applied to the `disabled` property of the `<select>` element in the slot.
|
|
41
|
+
*/
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
private readonly _selects;
|
|
44
|
+
private get _select();
|
|
45
|
+
private _updateSelect;
|
|
46
|
+
private _handleSlotChange;
|
|
47
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
48
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
49
|
+
reflectInputGroup(inputGroup: DaikinInputGroup): void;
|
|
50
|
+
/**
|
|
51
|
+
* Focuses on the `<select>` element in the slot.
|
|
52
|
+
* @param options focus options
|
|
53
|
+
*/
|
|
54
|
+
focus(options?: FocusOptions): void;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
"daikin-select": DaikinSelect;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-select';
|
|
@@ -18,46 +18,50 @@ const cvaTab = classVarianceAuthority.cva(
|
|
|
18
18
|
[
|
|
19
19
|
"flex",
|
|
20
20
|
"w-full",
|
|
21
|
-
"
|
|
21
|
+
"min-w-14",
|
|
22
|
+
"h-10",
|
|
22
23
|
"items-center",
|
|
23
24
|
"justify-center",
|
|
24
25
|
"px-4",
|
|
25
26
|
"pt-2",
|
|
26
27
|
"pb-3",
|
|
27
|
-
"text-base",
|
|
28
|
-
"font-bold",
|
|
29
28
|
"text-center",
|
|
30
29
|
"font-daikinSerif",
|
|
31
|
-
"relative",
|
|
32
30
|
"tracking-wide",
|
|
33
31
|
"whitespace-nowrap",
|
|
34
|
-
"
|
|
32
|
+
"relative",
|
|
35
33
|
"focus-visible:outline-none",
|
|
36
|
-
"focus-visible:before:w-full",
|
|
37
|
-
"focus-visible:before:h-[calc(100%_-_4px)]",
|
|
38
|
-
"focus-visible:before:border",
|
|
39
|
-
"focus-visible:before:border-daikinBlue-700",
|
|
40
34
|
"focus-visible:before:absolute",
|
|
41
|
-
"focus-visible:before
|
|
42
|
-
"
|
|
35
|
+
"focus-visible:before:-inset-[3px]",
|
|
36
|
+
"focus-visible:before:z-[1]",
|
|
37
|
+
"focus-visible:before:border",
|
|
38
|
+
"focus-visible:before:border-2",
|
|
39
|
+
"focus-visible:before:border-system-state-focus",
|
|
40
|
+
"disabled:text-system-state-disabled",
|
|
41
|
+
"after:absolute",
|
|
42
|
+
"after:inset-0",
|
|
43
|
+
"after:top-auto"
|
|
43
44
|
],
|
|
44
45
|
{
|
|
45
46
|
variants: {
|
|
46
47
|
active: {
|
|
47
48
|
false: [
|
|
48
|
-
"
|
|
49
|
-
"
|
|
49
|
+
"enabled:text-system-state-neutral-active",
|
|
50
|
+
"enabled:hover:text-system-state-neutral-hover",
|
|
51
|
+
"enabled:hover:bg-system-background-surface-hover",
|
|
52
|
+
"enabled:active:text-system-state-neutral-press",
|
|
53
|
+
"enabled:active:bg-system-background-surface-press",
|
|
54
|
+
"after:h-[1px]",
|
|
55
|
+
"after:bg-system-element-divider-secondary"
|
|
50
56
|
],
|
|
51
57
|
true: [
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
58
|
+
"font-bold",
|
|
59
|
+
"enabled:text-system-state-primary-active",
|
|
60
|
+
"enabled:hover:bg-system-state-primary-surface-hover",
|
|
61
|
+
"enabled:active:bg-system-state-primary-surface-press",
|
|
56
62
|
"after:h-1",
|
|
57
|
-
"after:
|
|
58
|
-
"after:
|
|
59
|
-
"enabled:after:bg-daikinBlue-500",
|
|
60
|
-
"disabled:after:bg-daikinNeutral-200"
|
|
63
|
+
"enabled:after:bg-system-state-primary-active",
|
|
64
|
+
"disabled:after:bg-system-state-disabled"
|
|
61
65
|
]
|
|
62
66
|
}
|
|
63
67
|
}
|
|
@@ -101,7 +105,8 @@ exports.DaikinTab.styles = lit.css`
|
|
|
101
105
|
${lit.unsafeCSS(tailwind.default)}
|
|
102
106
|
|
|
103
107
|
:host {
|
|
104
|
-
display:
|
|
108
|
+
display: block;
|
|
109
|
+
width: 100%;
|
|
105
110
|
}
|
|
106
111
|
`;
|
|
107
112
|
__decorateClass([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { ARIARole } from '../../lit-analyzer-types';
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
5
|
-
* When a user selects a tab, the
|
|
4
|
+
* The tab panels component is a child element within the `daikin-tabs` that controls the display of the content panels associated with each tab.
|
|
5
|
+
* When a user selects a tab, the tab panels component ensures the corresponding content panel is shown while hiding the others.
|
|
6
6
|
*
|
|
7
7
|
* Hierarchy:
|
|
8
8
|
* - `daikin-tabs` > `daikin-tab-panels` ("panels" slot)
|
|
@@ -12,7 +12,7 @@ import { ARIARole } from '../../lit-analyzer-types';
|
|
|
12
12
|
* @example
|
|
13
13
|
*
|
|
14
14
|
* ```js
|
|
15
|
-
* import "@daikin-oss/design-system-web-components/components/
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/tab-panels/index.js";
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* ```html
|
|
@@ -180,7 +180,7 @@ exports.DaikinTabs = class DaikinTabs extends lit.LitElement {
|
|
|
180
180
|
render() {
|
|
181
181
|
return lit.html`
|
|
182
182
|
<div
|
|
183
|
-
|
|
183
|
+
class="flex flex-nowrap w-full p-[3px] overflow-auto relative before:absolute before:h-[1px] before:inset-[3px] before:top-auto before:bg-system-element-divider-secondary"
|
|
184
184
|
role="tablist"
|
|
185
185
|
@click=${this._handleTabClick}
|
|
186
186
|
@keydown=${this._handleKeyDown}
|
|
@@ -200,6 +200,11 @@ exports.DaikinTabs = class DaikinTabs extends lit.LitElement {
|
|
|
200
200
|
};
|
|
201
201
|
exports.DaikinTabs.styles = lit.css`
|
|
202
202
|
${lit.unsafeCSS(tailwind.default)}
|
|
203
|
+
|
|
204
|
+
:host {
|
|
205
|
+
display: block;
|
|
206
|
+
width: 100%;
|
|
207
|
+
}
|
|
203
208
|
`;
|
|
204
209
|
__decorateClass([
|
|
205
210
|
decorators_js.property({ type: String, reflect: true })
|
|
@@ -2,7 +2,6 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
2
2
|
/**
|
|
3
3
|
* The tab group component manages a group of tabs and switches the content displayed using the panel switcher component.
|
|
4
4
|
* It allows users to navigate between different sections of content by clicking on individual tabs.
|
|
5
|
-
* Tab groups do not provide styles; developers must apply styles to the wrapper of the tabs (`tablist` part) and to the panel switcher(s).
|
|
6
5
|
*
|
|
7
6
|
* > [!WARNING]
|
|
8
7
|
* > At least one tab must be available (that means, the tab must be present and enabled).
|
|
@@ -18,18 +17,15 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
18
17
|
* @slot - A slot for tab buttons. Place `daikin-tab` elements here.
|
|
19
18
|
* @slot panels - A slot for tab panels component. Place a `daikin-tab-panels` element here.
|
|
20
19
|
*
|
|
21
|
-
* @csspart tablist - The container element for the default (tab list) slot. Has "tablist" role.
|
|
22
|
-
*
|
|
23
20
|
* @example
|
|
24
21
|
*
|
|
25
22
|
* ```js
|
|
26
23
|
* import "@daikin-oss/design-system-web-components/components/tab/index.js";
|
|
27
24
|
* import "@daikin-oss/design-system-web-components/components/tab-group/index.js";
|
|
28
|
-
* import "@daikin-oss/design-system-web-components/components/
|
|
25
|
+
* import "@daikin-oss/design-system-web-components/components/tab-panels/index.js";
|
|
29
26
|
* ```
|
|
30
27
|
*
|
|
31
28
|
* ```html
|
|
32
|
-
* <!-- See storybook for styling tab group. You'll need `::part(tablist)` to style the tab container. -->
|
|
33
29
|
* <daikin-tabs value="foo">
|
|
34
30
|
* <daikin-tab value="foo">Foo tab</daikin-tab>
|
|
35
31
|
* <daikin-tab value="bar">Bar tab</daikin-tab>
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
7
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
const cvaTextArea = classVarianceAuthority.cva(
|
|
19
|
+
[
|
|
20
|
+
"w-full",
|
|
21
|
+
"h-full",
|
|
22
|
+
"px-4",
|
|
23
|
+
"py-3",
|
|
24
|
+
"rounded-md",
|
|
25
|
+
"font-daikinSerif",
|
|
26
|
+
"outline",
|
|
27
|
+
"outline-[--color-border]",
|
|
28
|
+
"outline-0",
|
|
29
|
+
"-outline-offset-2",
|
|
30
|
+
"placeholder:text-system-element-text-secondary",
|
|
31
|
+
// Define `--color-border` as a CSS variable that references `--color-state-focus` and `--color-base` in that order.
|
|
32
|
+
// `--color-base` indicates the color of the border when the element is normal, hovered, or disabled.
|
|
33
|
+
"define-[--color-state-active,--color-state-focus,--color-base]/color-border",
|
|
34
|
+
"border",
|
|
35
|
+
"border-[--color-border]",
|
|
36
|
+
// Update `--color-base` depending on the state.
|
|
37
|
+
// The default `--color-base` and `--color-state-focus` values are defined in `variants.error` because they differ depending on whether or not the input has an error state.
|
|
38
|
+
"enabled:text-system-element-text-primary",
|
|
39
|
+
"enabled:hover:bg-system-background-surface-hover",
|
|
40
|
+
"enabled:active:bg-system-background-surface-press",
|
|
41
|
+
"focus-visible:outline-2",
|
|
42
|
+
"disabled:var-color-system-state-disabled/color-base",
|
|
43
|
+
"disabled:text-system-state-disabled",
|
|
44
|
+
"disabled:bg-white",
|
|
45
|
+
"disabled:placeholder:text-system-state-disabled"
|
|
46
|
+
],
|
|
47
|
+
{
|
|
48
|
+
variants: {
|
|
49
|
+
error: {
|
|
50
|
+
false: [
|
|
51
|
+
"enabled:var-color-system-state-neutral-hover/color-base",
|
|
52
|
+
"focus-visible:var-color-system-state-focus/color-state-focus"
|
|
53
|
+
],
|
|
54
|
+
true: ["enabled:var-color-system-state-error-active/color-base"]
|
|
55
|
+
},
|
|
56
|
+
resize: {
|
|
57
|
+
false: ["resize-none"],
|
|
58
|
+
true: ["resize-vertical"]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
exports.DaikinTextArea = class DaikinTextArea extends lit.LitElement {
|
|
64
|
+
constructor() {
|
|
65
|
+
super(...arguments);
|
|
66
|
+
this._internals = this.attachInternals();
|
|
67
|
+
this.value = "";
|
|
68
|
+
this.name = "";
|
|
69
|
+
this.placeholder = null;
|
|
70
|
+
this.disabled = false;
|
|
71
|
+
this.readonly = false;
|
|
72
|
+
this.required = false;
|
|
73
|
+
this.error = false;
|
|
74
|
+
this.resizable = false;
|
|
75
|
+
this._label = null;
|
|
76
|
+
}
|
|
77
|
+
get count() {
|
|
78
|
+
return this.value.length;
|
|
79
|
+
}
|
|
80
|
+
_updateValue(value) {
|
|
81
|
+
this._internals.setFormValue(value);
|
|
82
|
+
}
|
|
83
|
+
_handleInput(e) {
|
|
84
|
+
this.value = e.target.value;
|
|
85
|
+
this._updateValue(this.value);
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
return lit.html`<textarea
|
|
89
|
+
class=${cvaTextArea({
|
|
90
|
+
error: !this.disabled && this.error,
|
|
91
|
+
resize: this.resizable
|
|
92
|
+
})}
|
|
93
|
+
.value=${this.value}
|
|
94
|
+
placeholder=${ifDefined_js.ifDefined(this.placeholder ?? void 0)}
|
|
95
|
+
name=${this.name}
|
|
96
|
+
autocomplete=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
97
|
+
ifDefined_js.ifDefined(this.autocomplete)}
|
|
98
|
+
aria-label=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
99
|
+
ifDefined_js.ifDefined(this._label)}
|
|
100
|
+
?disabled=${this.disabled}
|
|
101
|
+
?readonly=${this.readonly}
|
|
102
|
+
?required=${this.required}
|
|
103
|
+
@change=${(e) => this.dispatchEvent(new Event("change", e))}
|
|
104
|
+
@input=${this._handleInput}
|
|
105
|
+
@keydown=${this._handleInput}
|
|
106
|
+
></textarea>`;
|
|
107
|
+
}
|
|
108
|
+
updated(changedProperties) {
|
|
109
|
+
if (!changedProperties.has("value")) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this._updateValue(this.value);
|
|
113
|
+
}
|
|
114
|
+
reflectInputGroup(inputGroup) {
|
|
115
|
+
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
116
|
+
this.disabled = !!inputGroup.disabled;
|
|
117
|
+
this.required = !!inputGroup.required;
|
|
118
|
+
this.error = isError;
|
|
119
|
+
this._label = inputGroup.label;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
exports.DaikinTextArea.styles = lit.css`
|
|
123
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
124
|
+
|
|
125
|
+
:host {
|
|
126
|
+
display: block;
|
|
127
|
+
height: 87px;
|
|
128
|
+
position: relative;
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
exports.DaikinTextArea.formAssociated = true;
|
|
132
|
+
__decorateClass([
|
|
133
|
+
decorators_js.property({ type: String })
|
|
134
|
+
], exports.DaikinTextArea.prototype, "value", 2);
|
|
135
|
+
__decorateClass([
|
|
136
|
+
decorators_js.property({ type: String, reflect: true })
|
|
137
|
+
], exports.DaikinTextArea.prototype, "name", 2);
|
|
138
|
+
__decorateClass([
|
|
139
|
+
decorators_js.property({ type: String, reflect: true })
|
|
140
|
+
], exports.DaikinTextArea.prototype, "placeholder", 2);
|
|
141
|
+
__decorateClass([
|
|
142
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
143
|
+
], exports.DaikinTextArea.prototype, "disabled", 2);
|
|
144
|
+
__decorateClass([
|
|
145
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
146
|
+
], exports.DaikinTextArea.prototype, "readonly", 2);
|
|
147
|
+
__decorateClass([
|
|
148
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
149
|
+
], exports.DaikinTextArea.prototype, "required", 2);
|
|
150
|
+
__decorateClass([
|
|
151
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
152
|
+
], exports.DaikinTextArea.prototype, "error", 2);
|
|
153
|
+
__decorateClass([
|
|
154
|
+
decorators_js.property({ type: String, reflect: true })
|
|
155
|
+
], exports.DaikinTextArea.prototype, "autocomplete", 2);
|
|
156
|
+
__decorateClass([
|
|
157
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
158
|
+
], exports.DaikinTextArea.prototype, "resizable", 2);
|
|
159
|
+
__decorateClass([
|
|
160
|
+
decorators_js.state()
|
|
161
|
+
], exports.DaikinTextArea.prototype, "_label", 2);
|
|
162
|
+
exports.DaikinTextArea = __decorateClass([
|
|
163
|
+
decorators_js.customElement("daikin-text-area")
|
|
164
|
+
], exports.DaikinTextArea);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { DaikinInputGroup } from '../input-group';
|
|
2
3
|
/**
|
|
3
|
-
* The
|
|
4
|
+
* The text area component is designed for multiline text input, similar to the HTML `<textarea>` tag.
|
|
4
5
|
* It is ideal for situations where users need to enter longer pieces of text, such as comments, descriptions, or messages.
|
|
5
6
|
* Can be used within `daikin-input-group` component.
|
|
6
7
|
*
|
|
7
8
|
* Hierarchies:
|
|
8
|
-
* - `daikin-
|
|
9
|
-
* - `daikin-input-group` > `daikin-
|
|
9
|
+
* - `daikin-text-area` (can be used solely)
|
|
10
|
+
* - `daikin-input-group` > `daikin-text-area`
|
|
10
11
|
*
|
|
11
12
|
* @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 `<textarea>` element.
|
|
12
13
|
* @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
|
|
@@ -14,62 +15,68 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
14
15
|
* @example
|
|
15
16
|
*
|
|
16
17
|
* ```js
|
|
17
|
-
* import "@daikin-oss/design-system-web-components/components/
|
|
18
|
+
* import "@daikin-oss/design-system-web-components/components/text-area/index.js";
|
|
18
19
|
* ```
|
|
19
20
|
*
|
|
20
21
|
* ```html
|
|
21
22
|
* <!-- See `daikin-input-group` component for complete example. -->
|
|
22
|
-
* <daikin-
|
|
23
|
+
* <daikin-text-area name="name"></daikin-text-area>
|
|
23
24
|
* ```
|
|
24
25
|
*/
|
|
25
|
-
export declare class
|
|
26
|
+
export declare class DaikinTextArea extends LitElement {
|
|
26
27
|
static readonly styles: import('lit').CSSResult;
|
|
27
28
|
static readonly formAssociated = true;
|
|
28
29
|
private _internals;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* Value of the text area.
|
|
31
32
|
*/
|
|
32
33
|
value: string;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Form name of the text area.
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
name: string;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* Placeholder text.
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
+
placeholder: string | null;
|
|
41
42
|
/**
|
|
42
|
-
* Whether the
|
|
43
|
+
* Whether the text area is disabled.
|
|
43
44
|
*/
|
|
44
|
-
|
|
45
|
+
disabled: boolean;
|
|
45
46
|
/**
|
|
46
|
-
* Whether the
|
|
47
|
+
* Whether the text area is readonly.
|
|
47
48
|
*/
|
|
48
49
|
readonly: boolean;
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* Whether the text area is required.
|
|
52
|
+
*/
|
|
53
|
+
required: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Error state. Ignored if the `disabled` is `true`.
|
|
51
56
|
*/
|
|
52
|
-
|
|
57
|
+
error: boolean;
|
|
53
58
|
/**
|
|
54
|
-
*
|
|
59
|
+
* Value of `autocomplete` attribute of the internal `<textarea>`.
|
|
55
60
|
*/
|
|
56
61
|
autocomplete?: HTMLInputElement["autocomplete"];
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
63
|
+
* Whether to allow resizing of the text area.
|
|
59
64
|
*/
|
|
60
|
-
|
|
65
|
+
resizable: boolean;
|
|
61
66
|
/**
|
|
62
|
-
*
|
|
67
|
+
* The label text used as the value of aria-label.
|
|
68
|
+
* Set automatically by `reflectInputGroup` method.
|
|
63
69
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
private
|
|
70
|
+
private _label;
|
|
71
|
+
get count(): number;
|
|
72
|
+
private _updateValue;
|
|
67
73
|
private _handleInput;
|
|
68
74
|
render(): import('lit-html').TemplateResult<1>;
|
|
69
75
|
updated(changedProperties: PropertyValues<this>): void;
|
|
76
|
+
reflectInputGroup(inputGroup: DaikinInputGroup): void;
|
|
70
77
|
}
|
|
71
78
|
declare global {
|
|
72
79
|
interface HTMLElementTagNameMap {
|
|
73
|
-
"daikin-
|
|
80
|
+
"daikin-text-area": DaikinTextArea;
|
|
74
81
|
}
|
|
75
82
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinTextArea = require("./daikin-text-area.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinTextArea", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinTextArea.DaikinTextArea
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-text-area';
|