@daikin-oss/design-system-web-components 0.6.0 → 0.7.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 +58 -0
- package/README.md +40 -23
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +8 -8
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +19 -80
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +11 -23
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +25 -77
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +14 -23
- package/dist/cjs/components/button/daikin-button.cjs +16 -15
- package/dist/cjs/components/button/daikin-button.d.cts +2 -2
- package/dist/cjs/components/card/daikin-card.cjs +63 -0
- package/dist/cjs/components/card/daikin-card.d.cts +42 -0
- package/dist/cjs/components/card/index.cjs +7 -0
- package/dist/cjs/components/card/index.d.cts +1 -0
- package/dist/cjs/components/card-footer/daikin-card-footer.cjs +33 -0
- package/dist/cjs/components/card-footer/daikin-card-footer.d.cts +29 -0
- package/dist/cjs/components/card-footer/index.cjs +7 -0
- package/dist/cjs/components/card-footer/index.d.cts +1 -0
- package/dist/cjs/components/card-header/daikin-card-header.cjs +59 -0
- package/dist/cjs/components/card-header/daikin-card-header.d.cts +31 -0
- package/dist/cjs/components/card-header/index.cjs +7 -0
- package/dist/cjs/components/card-header/index.d.cts +1 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +29 -29
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +14 -14
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +9 -9
- package/dist/cjs/components/icon/daikin-icon.cjs +8 -8
- package/dist/cjs/components/icon/daikin-icon.d.cts +3 -3
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +21 -20
- package/dist/cjs/components/index.cjs +31 -0
- package/dist/cjs/components/index.d.cts +6 -0
- package/dist/cjs/components/input-group/daikin-input-group.cjs +61 -45
- package/dist/cjs/components/input-group/daikin-input-group.d.cts +10 -1
- package/dist/cjs/components/link/daikin-link.cjs +32 -50
- package/dist/cjs/components/list-item/daikin-list-item.cjs +8 -8
- package/dist/cjs/components/notification/daikin-notification.cjs +18 -19
- package/dist/cjs/components/pagination/daikin-pagination.cjs +22 -24
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +22 -12
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +1 -6
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +12 -12
- package/dist/cjs/components/radio/daikin-radio.cjs +12 -10
- package/dist/cjs/components/select/daikin-select.cjs +11 -11
- package/dist/cjs/components/tab/daikin-tab.cjs +13 -13
- package/dist/cjs/components/table/daikin-table.cjs +6 -6
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +2 -2
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +4 -5
- package/dist/cjs/components/tabs/daikin-tabs.cjs +1 -1
- package/dist/cjs/components/text-area/daikin-text-area.cjs +16 -14
- package/dist/cjs/components/text-field/daikin-text-field.cjs +14 -13
- package/dist/cjs/components/toggle/daikin-toggle.cjs +10 -10
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +3 -3
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +1 -1
- package/dist/cjs/components/tree/common.cjs +90 -0
- package/dist/cjs/components/tree/common.d.cts +32 -0
- package/dist/cjs/components/tree/daikin-tree.cjs +109 -0
- package/dist/cjs/components/tree/daikin-tree.d.cts +74 -0
- package/dist/cjs/components/tree/index.cjs +7 -0
- package/dist/cjs/components/tree/index.d.cts +1 -0
- package/dist/cjs/components/tree-item/daikin-tree-item.cjs +197 -0
- package/dist/cjs/components/tree-item/daikin-tree-item.d.cts +95 -0
- package/dist/cjs/components/tree-item/index.cjs +8 -0
- package/dist/cjs/components/tree-item/index.d.cts +1 -0
- package/dist/cjs/components/tree-section/daikin-tree-section.cjs +245 -0
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +119 -0
- package/dist/cjs/components/tree-section/index.cjs +7 -0
- package/dist/cjs/components/tree-section/index.d.cts +1 -0
- package/dist/cjs/index.cjs +31 -2
- package/dist/cjs/index.d.cts +0 -1
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/is-simple-key.cjs +6 -0
- package/dist/cjs/utils/is-simple-key.d.cts +7 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +8 -8
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +19 -80
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +11 -23
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +25 -77
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +14 -23
- package/dist/cjs-dev/components/button/daikin-button.cjs +16 -15
- package/dist/cjs-dev/components/button/daikin-button.d.cts +2 -2
- package/dist/cjs-dev/components/card/daikin-card.cjs +63 -0
- package/dist/cjs-dev/components/card/daikin-card.d.cts +42 -0
- package/dist/cjs-dev/components/card/index.cjs +7 -0
- package/dist/cjs-dev/components/card/index.d.cts +1 -0
- package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +33 -0
- package/dist/cjs-dev/components/card-footer/daikin-card-footer.d.cts +29 -0
- package/dist/cjs-dev/components/card-footer/index.cjs +7 -0
- package/dist/cjs-dev/components/card-footer/index.d.cts +1 -0
- package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +59 -0
- package/dist/cjs-dev/components/card-header/daikin-card-header.d.cts +31 -0
- package/dist/cjs-dev/components/card-header/index.cjs +7 -0
- package/dist/cjs-dev/components/card-header/index.d.cts +1 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +29 -29
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +14 -14
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +9 -9
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +8 -8
- package/dist/cjs-dev/components/icon/daikin-icon.d.cts +3 -3
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +21 -20
- package/dist/cjs-dev/components/index.cjs +31 -0
- package/dist/cjs-dev/components/index.d.cts +6 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +61 -45
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +10 -1
- package/dist/cjs-dev/components/link/daikin-link.cjs +32 -50
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +8 -8
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +18 -19
- package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +22 -24
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +22 -12
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +1 -6
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +12 -12
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +12 -10
- package/dist/cjs-dev/components/select/daikin-select.cjs +11 -11
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +13 -13
- package/dist/cjs-dev/components/table/daikin-table.cjs +6 -6
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +2 -2
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +4 -5
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +1 -1
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +16 -14
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +14 -13
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +10 -10
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +3 -3
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +1 -1
- package/dist/cjs-dev/components/tree/common.cjs +90 -0
- package/dist/cjs-dev/components/tree/common.d.cts +32 -0
- package/dist/cjs-dev/components/tree/daikin-tree.cjs +109 -0
- package/dist/cjs-dev/components/tree/daikin-tree.d.cts +74 -0
- package/dist/cjs-dev/components/tree/index.cjs +7 -0
- package/dist/cjs-dev/components/tree/index.d.cts +1 -0
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +197 -0
- package/dist/cjs-dev/components/tree-item/daikin-tree-item.d.cts +95 -0
- package/dist/cjs-dev/components/tree-item/index.cjs +8 -0
- package/dist/cjs-dev/components/tree-item/index.d.cts +1 -0
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +245 -0
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +119 -0
- package/dist/cjs-dev/components/tree-section/index.cjs +7 -0
- package/dist/cjs-dev/components/tree-section/index.d.cts +1 -0
- package/dist/cjs-dev/index.cjs +31 -2
- package/dist/cjs-dev/index.d.cts +0 -1
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/is-simple-key.cjs +6 -0
- package/dist/cjs-dev/utils/is-simple-key.d.cts +7 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.js +8 -8
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +11 -23
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +20 -81
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +14 -23
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +26 -78
- package/dist/es/components/button/daikin-button.d.ts +2 -2
- package/dist/es/components/button/daikin-button.js +16 -15
- package/dist/es/components/card/daikin-card.d.ts +42 -0
- package/dist/es/components/card/daikin-card.js +64 -0
- package/dist/es/components/card/index.d.ts +1 -0
- package/dist/es/components/card/index.js +4 -0
- package/dist/es/components/card-footer/daikin-card-footer.d.ts +29 -0
- package/dist/es/components/card-footer/daikin-card-footer.js +34 -0
- package/dist/es/components/card-footer/index.d.ts +1 -0
- package/dist/es/components/card-footer/index.js +4 -0
- package/dist/es/components/card-header/daikin-card-header.d.ts +31 -0
- package/dist/es/components/card-header/daikin-card-header.js +60 -0
- package/dist/es/components/card-header/index.d.ts +1 -0
- package/dist/es/components/card-header/index.js +4 -0
- package/dist/es/components/checkbox/daikin-checkbox.js +29 -29
- package/dist/es/components/dropdown/daikin-dropdown.js +14 -14
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +9 -9
- package/dist/es/components/icon/daikin-icon.d.ts +3 -3
- package/dist/es/components/icon/daikin-icon.js +8 -8
- package/dist/es/components/icon-button/daikin-icon-button.js +21 -20
- package/dist/es/components/index.d.ts +6 -0
- package/dist/es/components/index.js +13 -0
- package/dist/es/components/input-group/daikin-input-group.d.ts +10 -1
- package/dist/es/components/input-group/daikin-input-group.js +61 -45
- package/dist/es/components/link/daikin-link.js +32 -50
- package/dist/es/components/list-item/daikin-list-item.js +8 -8
- package/dist/es/components/notification/daikin-notification.js +18 -19
- package/dist/es/components/pagination/daikin-pagination.js +22 -24
- package/dist/es/components/progress-bar/daikin-progress-bar.js +22 -12
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -6
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +12 -12
- package/dist/es/components/radio/daikin-radio.js +12 -10
- package/dist/es/components/select/daikin-select.js +11 -11
- package/dist/es/components/tab/daikin-tab.js +13 -13
- package/dist/es/components/table/daikin-table.js +6 -6
- package/dist/es/components/table-cell/daikin-table-cell.js +2 -2
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +4 -5
- package/dist/es/components/tabs/daikin-tabs.js +1 -1
- package/dist/es/components/text-area/daikin-text-area.js +16 -14
- package/dist/es/components/text-field/daikin-text-field.js +14 -13
- package/dist/es/components/toggle/daikin-toggle.js +10 -10
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +1 -1
- package/dist/es/components/tooltip/daikin-tooltip.js +3 -3
- package/dist/es/components/tree/common.d.ts +32 -0
- package/dist/es/components/tree/common.js +90 -0
- package/dist/es/components/tree/daikin-tree.d.ts +74 -0
- package/dist/es/components/tree/daikin-tree.js +110 -0
- package/dist/es/components/tree/index.d.ts +1 -0
- package/dist/es/components/tree/index.js +4 -0
- package/dist/es/components/tree-item/daikin-tree-item.d.ts +95 -0
- package/dist/es/components/tree-item/daikin-tree-item.js +198 -0
- package/dist/es/components/tree-item/index.d.ts +1 -0
- package/dist/es/components/tree-item/index.js +5 -0
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +119 -0
- package/dist/es/components/tree-section/daikin-tree-section.js +246 -0
- package/dist/es/components/tree-section/index.d.ts +1 -0
- package/dist/es/components/tree-section/index.js +4 -0
- package/dist/es/index.d.ts +0 -1
- package/dist/es/index.js +13 -2
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/is-simple-key.d.ts +7 -0
- package/dist/es/utils/is-simple-key.js +6 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +8 -8
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +11 -23
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +20 -81
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +14 -23
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +26 -78
- package/dist/es-dev/components/button/daikin-button.d.ts +2 -2
- package/dist/es-dev/components/button/daikin-button.js +16 -15
- package/dist/es-dev/components/card/daikin-card.d.ts +42 -0
- package/dist/es-dev/components/card/daikin-card.js +64 -0
- package/dist/es-dev/components/card/index.d.ts +1 -0
- package/dist/es-dev/components/card/index.js +4 -0
- package/dist/es-dev/components/card-footer/daikin-card-footer.d.ts +29 -0
- package/dist/es-dev/components/card-footer/daikin-card-footer.js +34 -0
- package/dist/es-dev/components/card-footer/index.d.ts +1 -0
- package/dist/es-dev/components/card-footer/index.js +4 -0
- package/dist/es-dev/components/card-header/daikin-card-header.d.ts +31 -0
- package/dist/es-dev/components/card-header/daikin-card-header.js +60 -0
- package/dist/es-dev/components/card-header/index.d.ts +1 -0
- package/dist/es-dev/components/card-header/index.js +4 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +29 -29
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +14 -14
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +9 -9
- package/dist/es-dev/components/icon/daikin-icon.d.ts +3 -3
- package/dist/es-dev/components/icon/daikin-icon.js +8 -8
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +21 -20
- package/dist/es-dev/components/index.d.ts +6 -0
- package/dist/es-dev/components/index.js +13 -0
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +10 -1
- package/dist/es-dev/components/input-group/daikin-input-group.js +61 -45
- package/dist/es-dev/components/link/daikin-link.js +32 -50
- package/dist/es-dev/components/list-item/daikin-list-item.js +8 -8
- package/dist/es-dev/components/notification/daikin-notification.js +18 -19
- package/dist/es-dev/components/pagination/daikin-pagination.js +22 -24
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +22 -12
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -6
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +12 -12
- package/dist/es-dev/components/radio/daikin-radio.js +12 -10
- package/dist/es-dev/components/select/daikin-select.js +11 -11
- package/dist/es-dev/components/tab/daikin-tab.js +13 -13
- package/dist/es-dev/components/table/daikin-table.js +6 -6
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +2 -2
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +4 -5
- package/dist/es-dev/components/tabs/daikin-tabs.js +1 -1
- package/dist/es-dev/components/text-area/daikin-text-area.js +16 -14
- package/dist/es-dev/components/text-field/daikin-text-field.js +14 -13
- package/dist/es-dev/components/toggle/daikin-toggle.js +10 -10
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +1 -1
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +3 -3
- package/dist/es-dev/components/tree/common.d.ts +32 -0
- package/dist/es-dev/components/tree/common.js +90 -0
- package/dist/es-dev/components/tree/daikin-tree.d.ts +74 -0
- package/dist/es-dev/components/tree/daikin-tree.js +110 -0
- package/dist/es-dev/components/tree/index.d.ts +1 -0
- package/dist/es-dev/components/tree/index.js +4 -0
- package/dist/es-dev/components/tree-item/daikin-tree-item.d.ts +95 -0
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +198 -0
- package/dist/es-dev/components/tree-item/index.d.ts +1 -0
- package/dist/es-dev/components/tree-item/index.js +5 -0
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +119 -0
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +246 -0
- package/dist/es-dev/components/tree-section/index.d.ts +1 -0
- package/dist/es-dev/components/tree-section/index.js +4 -0
- package/dist/es-dev/index.d.ts +0 -1
- package/dist/es-dev/index.js +13 -2
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/is-simple-key.d.ts +7 -0
- package/dist/es-dev/utils/is-simple-key.js +6 -0
- package/icons/sort.svg +1 -1
- package/icons/status-error.svg +1 -1
- package/package.json +8 -3
- package/dist/cjs/colors.cjs +0 -80
- package/dist/cjs/colors.d.cts +0 -69
- package/dist/cjs-dev/colors.cjs +0 -80
- package/dist/cjs-dev/colors.d.cts +0 -69
- package/dist/es/colors.d.ts +0 -69
- package/dist/es/colors.js +0 -80
- package/dist/es-dev/colors.d.ts +0 -69
- package/dist/es-dev/colors.js +0 -80
|
@@ -17,12 +17,12 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
17
17
|
const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
|
|
18
18
|
"block",
|
|
19
19
|
"size-4",
|
|
20
|
-
"border-
|
|
20
|
+
"border-ddt-color-common-neutral-default",
|
|
21
21
|
"border-2",
|
|
22
22
|
"rounded-sm",
|
|
23
23
|
"relative",
|
|
24
24
|
"appearance-none",
|
|
25
|
-
"before:text-
|
|
25
|
+
"before:text-ddt-color-common-text-inverse",
|
|
26
26
|
"before:absolute",
|
|
27
27
|
"before:m-auto",
|
|
28
28
|
"before:inset-0",
|
|
@@ -32,37 +32,37 @@ const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
|
|
|
32
32
|
"focus-visible:outline",
|
|
33
33
|
"focus-visible:outline-2",
|
|
34
34
|
"focus-visible:outline-offset-2",
|
|
35
|
-
"focus-visible:outline-
|
|
36
|
-
"enabled:group-hover:border-
|
|
37
|
-
"enabled:group-hover:bg-
|
|
38
|
-
"enabled:group-active:border-
|
|
39
|
-
"enabled:group-active:bg-
|
|
40
|
-
"enabled:checked:border-
|
|
41
|
-
"enabled:checked:bg-
|
|
42
|
-
"enabled:checked:group-hover:bg-
|
|
43
|
-
"enabled:checked:group-hover:border-
|
|
44
|
-
"enabled:checked:group-hover:before:text-
|
|
45
|
-
"enabled:checked:group-active:bg-
|
|
46
|
-
"enabled:checked:group-active:border-
|
|
47
|
-
"enabled:checked:group-active:before:text-
|
|
48
|
-
"enabled:indeterminate:bg-
|
|
49
|
-
"enabled:indeterminate:border-
|
|
50
|
-
"enabled:indeterminate:group-hover:bg-
|
|
51
|
-
"enabled:indeterminate:group-hover:border-
|
|
52
|
-
"enabled:indeterminate:group-hover:before:text-
|
|
53
|
-
"enabled:indeterminate:group-active:bg-
|
|
54
|
-
"enabled:indeterminate:group-active:border-
|
|
55
|
-
"enabled:indeterminate:group-active:before:text-
|
|
56
|
-
"disabled:border-
|
|
57
|
-
"disabled:bg-
|
|
58
|
-
"disabled:checked:bg-
|
|
59
|
-
"disabled:indeterminate:bg-
|
|
35
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
36
|
+
"enabled:group-hover:border-ddt-color-common-neutral-hover",
|
|
37
|
+
"enabled:group-hover:bg-ddt-color-common-surface-hover",
|
|
38
|
+
"enabled:group-active:border-ddt-color-common-neutral-press",
|
|
39
|
+
"enabled:group-active:bg-ddt-color-common-surface-press",
|
|
40
|
+
"enabled:checked:border-ddt-color-common-brand-default",
|
|
41
|
+
"enabled:checked:bg-ddt-color-common-brand-default",
|
|
42
|
+
"enabled:checked:group-hover:bg-ddt-color-common-brand-hover",
|
|
43
|
+
"enabled:checked:group-hover:border-ddt-color-common-brand-hover",
|
|
44
|
+
"enabled:checked:group-hover:before:text-ddt-color-common-text-inverse",
|
|
45
|
+
"enabled:checked:group-active:bg-ddt-color-common-brand-press",
|
|
46
|
+
"enabled:checked:group-active:border-ddt-color-common-brand-press",
|
|
47
|
+
"enabled:checked:group-active:before:text-ddt-color-common-text-inverse",
|
|
48
|
+
"enabled:indeterminate:bg-ddt-color-common-brand-default",
|
|
49
|
+
"enabled:indeterminate:border-ddt-color-common-brand-default",
|
|
50
|
+
"enabled:indeterminate:group-hover:bg-ddt-color-common-brand-hover",
|
|
51
|
+
"enabled:indeterminate:group-hover:border-ddt-color-common-brand-hover",
|
|
52
|
+
"enabled:indeterminate:group-hover:before:text-ddt-color-common-text-inverse",
|
|
53
|
+
"enabled:indeterminate:group-active:bg-ddt-color-common-brand-press",
|
|
54
|
+
"enabled:indeterminate:group-active:border-ddt-color-common-brand-press",
|
|
55
|
+
"enabled:indeterminate:group-active:before:text-ddt-color-common-text-inverse",
|
|
56
|
+
"disabled:border-ddt-color-common-disabled",
|
|
57
|
+
"disabled:bg-ddt-color-common-text-inverse",
|
|
58
|
+
"disabled:checked:bg-ddt-color-common-disabled",
|
|
59
|
+
"disabled:indeterminate:bg-ddt-color-common-disabled"
|
|
60
60
|
])();
|
|
61
61
|
const cvaLabel = classVarianceAuthority.cva(["pr-2"], {
|
|
62
62
|
variants: {
|
|
63
63
|
disabled: {
|
|
64
|
-
false: ["text-
|
|
65
|
-
true: ["text-
|
|
64
|
+
false: ["text-ddt-color-common-text-primary"],
|
|
65
|
+
true: ["text-ddt-color-common-disabled"]
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
});
|
|
@@ -26,7 +26,7 @@ const cvaButton = classVarianceAuthority.cva(
|
|
|
26
26
|
"w-full",
|
|
27
27
|
"h-full",
|
|
28
28
|
"min-h-12",
|
|
29
|
-
"bg-
|
|
29
|
+
"bg-ddt-color-common-background-default",
|
|
30
30
|
"p-3",
|
|
31
31
|
"border",
|
|
32
32
|
"border-[--color-base]",
|
|
@@ -41,8 +41,8 @@ const cvaButton = classVarianceAuthority.cva(
|
|
|
41
41
|
"-outline-offset-2",
|
|
42
42
|
"focus-visible:outline-2",
|
|
43
43
|
"focus-visible:outline-[--color-focus]",
|
|
44
|
-
"disabled:text-
|
|
45
|
-
"disabled:border-
|
|
44
|
+
"disabled:text-ddt-color-common-disabled",
|
|
45
|
+
"disabled:border-ddt-color-common-disabled",
|
|
46
46
|
"after:i-daikin-dropdown-chevron-down",
|
|
47
47
|
"after:w-6",
|
|
48
48
|
"after:h-6",
|
|
@@ -51,31 +51,31 @@ const cvaButton = classVarianceAuthority.cva(
|
|
|
51
51
|
"after:top-0",
|
|
52
52
|
"after:bottom-0",
|
|
53
53
|
"after:right-3",
|
|
54
|
-
"enabled:after:text-
|
|
55
|
-
"disabled:after:text-
|
|
54
|
+
"enabled:after:text-ddt-color-common-text-primary",
|
|
55
|
+
"disabled:after:text-ddt-color-common-disabled"
|
|
56
56
|
],
|
|
57
57
|
{
|
|
58
58
|
variants: {
|
|
59
59
|
open: {
|
|
60
60
|
false: [
|
|
61
|
-
"enabled:hover:bg-
|
|
62
|
-
"enabled:active:bg-
|
|
61
|
+
"enabled:hover:bg-ddt-color-common-surface-hover",
|
|
62
|
+
"enabled:active:bg-ddt-color-common-surface-press"
|
|
63
63
|
],
|
|
64
|
-
true: ["enabled:bg-
|
|
64
|
+
true: ["enabled:bg-ddt-color-common-surface-press"]
|
|
65
65
|
},
|
|
66
66
|
error: {
|
|
67
67
|
false: [
|
|
68
|
-
"var-color-
|
|
69
|
-
"var-color-
|
|
68
|
+
"var-color-ddt-color-common-neutral-default/color-base",
|
|
69
|
+
"var-color-ddt-color-common-border-focus/color-focus"
|
|
70
70
|
],
|
|
71
71
|
true: [
|
|
72
|
-
"var-color-
|
|
73
|
-
"var-color-
|
|
72
|
+
"var-color-ddt-color-common-danger-default/color-base",
|
|
73
|
+
"var-color-ddt-color-common-danger-default/color-focus"
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
placeholder: {
|
|
77
|
-
false: ["text-
|
|
78
|
-
true: ["text-
|
|
77
|
+
false: ["text-ddt-color-common-text-primary"],
|
|
78
|
+
true: ["text-ddt-color-common-text-secondary"]
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -21,8 +21,8 @@ const cvaOption = classVarianceAuthority.cva(
|
|
|
21
21
|
"justify-between",
|
|
22
22
|
"w-full",
|
|
23
23
|
"min-h-12",
|
|
24
|
-
"text-
|
|
25
|
-
"bg-
|
|
24
|
+
"text-ddt-color-common-text-primary",
|
|
25
|
+
"bg-ddt-color-common-background-default",
|
|
26
26
|
"p-3",
|
|
27
27
|
"font-daikinSerif",
|
|
28
28
|
"leading-5",
|
|
@@ -30,20 +30,20 @@ const cvaOption = classVarianceAuthority.cva(
|
|
|
30
30
|
"focus-visible:outline",
|
|
31
31
|
"focus-visible:outline-2",
|
|
32
32
|
"focus-visible:-outline-offset-2",
|
|
33
|
-
"focus-visible:outline-
|
|
34
|
-
"disabled:text-
|
|
33
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
34
|
+
"disabled:text-ddt-color-common-disabled"
|
|
35
35
|
],
|
|
36
36
|
{
|
|
37
37
|
variants: {
|
|
38
38
|
selected: {
|
|
39
39
|
false: [
|
|
40
|
-
"enabled:hover:bg-
|
|
41
|
-
"enabled:active:bg-
|
|
40
|
+
"enabled:hover:bg-ddt-color-common-surface-hover",
|
|
41
|
+
"enabled:active:bg-ddt-color-common-surface-press"
|
|
42
42
|
],
|
|
43
43
|
true: [
|
|
44
|
-
"enabled:bg-
|
|
45
|
-
"enabled:hover:bg-
|
|
46
|
-
"enabled:active:bg-
|
|
44
|
+
"enabled:bg-ddt-color-common-surface-selected-default",
|
|
45
|
+
"enabled:hover:bg-ddt-color-common-surface-selected-hover",
|
|
46
|
+
"enabled:active:bg-ddt-color-common-surface-selected-press",
|
|
47
47
|
"after:i-daikin-dropdown-check",
|
|
48
48
|
"after:size-6"
|
|
49
49
|
]
|
|
@@ -23,8 +23,8 @@ const cvaIcon = classVarianceAuthority.cva(["block"], {
|
|
|
23
23
|
variants: {
|
|
24
24
|
icon: iconClassMap,
|
|
25
25
|
color: {
|
|
26
|
-
black: ["text-
|
|
27
|
-
white: ["text-
|
|
26
|
+
black: ["text-ddt-color-common-background-overlay"],
|
|
27
|
+
white: ["text-ddt-color-common-text-inverse"],
|
|
28
28
|
default: ["text-[--default-color]"],
|
|
29
29
|
current: []
|
|
30
30
|
// uses `currentColor`
|
|
@@ -65,24 +65,24 @@ exports.DaikinIcon.styles = lit.css`
|
|
|
65
65
|
|
|
66
66
|
:host {
|
|
67
67
|
display: inline-block;
|
|
68
|
-
width: var(--
|
|
69
|
-
height: var(--
|
|
68
|
+
width: var(--ddc-icon-size, 100%);
|
|
69
|
+
height: var(--ddc-icon-size, 100%);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
:host([size="s"]) {
|
|
73
|
-
--
|
|
73
|
+
--ddc-icon-size: 12px;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
:host([size="m"]) {
|
|
77
|
-
--
|
|
77
|
+
--ddc-icon-size: 16px;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
:host([size="l"]) {
|
|
81
|
-
--
|
|
81
|
+
--ddc-icon-size: 20px;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
:host([size="xl"]) {
|
|
85
|
-
--
|
|
85
|
+
--ddc-icon-size: 24px;
|
|
86
86
|
}
|
|
87
87
|
`;
|
|
88
88
|
__decorateClass([
|
|
@@ -5,7 +5,7 @@ export declare const iconList: string[];
|
|
|
5
5
|
export type IconType = keyof typeof icons;
|
|
6
6
|
declare const cvaIcon: (props?: ({
|
|
7
7
|
icon?: string | number | null | undefined;
|
|
8
|
-
color?: "
|
|
8
|
+
color?: "current" | "default" | "black" | "white" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
11
11
|
/**
|
|
@@ -17,7 +17,7 @@ export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
|
17
17
|
* If you try to use an icon that does not exist, a blank space will be displayed.
|
|
18
18
|
* In the development build, warnings will be displayed in the console, so please check there if you encounter any unexpected behavior.
|
|
19
19
|
*
|
|
20
|
-
* @cssprop [--
|
|
20
|
+
* @cssprop [--ddc-icon-size] - Icon size. If a value other than "current" is set for the `size` property, it will be overwritten automatically. This may be set by the parent component such as `daikin-icon-button`.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
*
|
|
@@ -41,7 +41,7 @@ export declare class DaikinIcon extends LitElement {
|
|
|
41
41
|
color: IconVariantProps["color"];
|
|
42
42
|
/**
|
|
43
43
|
* Specify the size of the icon.
|
|
44
|
-
* If "current" is set, `--
|
|
44
|
+
* If "current" is set, `--ddc-icon-size` CSS variable will be used. `--ddc-icon-size` may be set by the parent component such as `daikin-icon-button`.
|
|
45
45
|
*/
|
|
46
46
|
size: "s" | "m" | "l" | "xl" | "current";
|
|
47
47
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -21,8 +21,7 @@ const cvaIconButton = classVarianceAuthority.cva(
|
|
|
21
21
|
"inline-flex",
|
|
22
22
|
"justify-center",
|
|
23
23
|
"items-center",
|
|
24
|
-
"
|
|
25
|
-
"h-8",
|
|
24
|
+
"size-full",
|
|
26
25
|
"font-daikinSerif",
|
|
27
26
|
"font-bold",
|
|
28
27
|
"rounded",
|
|
@@ -32,37 +31,37 @@ const cvaIconButton = classVarianceAuthority.cva(
|
|
|
32
31
|
"focus-visible:outline",
|
|
33
32
|
"focus-visible:outline-2",
|
|
34
33
|
"focus-visible:outline-offset-2",
|
|
35
|
-
"focus-visible:outline-
|
|
34
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
36
35
|
"var-color-transparent/color-secondary",
|
|
37
|
-
"link-disabled:var-color-
|
|
36
|
+
"link-disabled:var-color-ddt-color-common-disabled/color-primary"
|
|
38
37
|
],
|
|
39
38
|
{
|
|
40
39
|
variants: {
|
|
41
40
|
color: {
|
|
42
41
|
default: [
|
|
43
|
-
"link-enabled:var-color-
|
|
44
|
-
"link-enabled:hover:var-color-
|
|
45
|
-
"link-enabled:hover:var-color-
|
|
46
|
-
"link-enabled:active:var-color-
|
|
47
|
-
"link-enabled:active:var-color-
|
|
42
|
+
"link-enabled:var-color-ddt-color-common-brand-default/color-primary",
|
|
43
|
+
"link-enabled:hover:var-color-ddt-color-common-brand-hover/color-primary",
|
|
44
|
+
"link-enabled:hover:var-color-ddt-color-common-surface-brand-hover/color-secondary",
|
|
45
|
+
"link-enabled:active:var-color-ddt-color-common-brand-press/color-primary",
|
|
46
|
+
"link-enabled:active:var-color-ddt-color-common-surface-brand-press/color-secondary"
|
|
48
47
|
],
|
|
49
48
|
neutral: [
|
|
50
|
-
"link-enabled:var-color-
|
|
51
|
-
"link-enabled:hover:var-color-
|
|
52
|
-
"link-enabled:hover:var-color-
|
|
53
|
-
"link-enabled:active:var-color-
|
|
54
|
-
"link-enabled:active:var-color-
|
|
49
|
+
"link-enabled:var-color-ddt-color-common-neutral-default/color-primary",
|
|
50
|
+
"link-enabled:hover:var-color-ddt-color-common-neutral-hover/color-primary",
|
|
51
|
+
"link-enabled:hover:var-color-ddt-color-common-surface-neutral-hover/color-secondary",
|
|
52
|
+
"link-enabled:active:var-color-ddt-color-common-neutral-press/color-primary",
|
|
53
|
+
"link-enabled:active:var-color-ddt-color-common-surface-neutral-press/color-secondary"
|
|
55
54
|
],
|
|
56
55
|
danger: [
|
|
57
|
-
"link-enabled:var-color-
|
|
58
|
-
"link-enabled:hover:var-color-
|
|
59
|
-
"link-enabled:hover:var-color-
|
|
60
|
-
"link-enabled:active:var-color-
|
|
61
|
-
"link-enabled:active:var-color-
|
|
56
|
+
"link-enabled:var-color-ddt-color-common-danger-default/color-primary",
|
|
57
|
+
"link-enabled:hover:var-color-ddt-color-common-danger-hover/color-primary",
|
|
58
|
+
"link-enabled:hover:var-color-ddt-color-common-surface-danger-hover/color-secondary",
|
|
59
|
+
"link-enabled:active:var-color-ddt-color-common-danger-press/color-primary",
|
|
60
|
+
"link-enabled:active:var-color-ddt-color-common-surface-danger-press/color-secondary"
|
|
62
61
|
]
|
|
63
62
|
},
|
|
64
63
|
variant: {
|
|
65
|
-
fill: ["text-
|
|
64
|
+
fill: ["text-ddt-color-common-text-inverse", "bg-[--color-primary]"],
|
|
66
65
|
outline: [
|
|
67
66
|
"border",
|
|
68
67
|
"text-[--color-primary]",
|
|
@@ -134,6 +133,8 @@ exports.DaikinIconButton.styles = lit.css`
|
|
|
134
133
|
|
|
135
134
|
:host {
|
|
136
135
|
display: inline-block;
|
|
136
|
+
width: 2rem;
|
|
137
|
+
height: 2rem;
|
|
137
138
|
}
|
|
138
139
|
`;
|
|
139
140
|
__decorateClass([
|
|
@@ -5,6 +5,9 @@ const daikinAccordionItem = require("./accordion-item/daikin-accordion-item.cjs"
|
|
|
5
5
|
const daikinBreadcrumb = require("./breadcrumb/daikin-breadcrumb.cjs");
|
|
6
6
|
const daikinBreadcrumbItem = require("./breadcrumb-item/daikin-breadcrumb-item.cjs");
|
|
7
7
|
const daikinButton = require("./button/daikin-button.cjs");
|
|
8
|
+
const daikinCard = require("./card/daikin-card.cjs");
|
|
9
|
+
const daikinCardFooter = require("./card-footer/daikin-card-footer.cjs");
|
|
10
|
+
const daikinCardHeader = require("./card-header/daikin-card-header.cjs");
|
|
8
11
|
const daikinCheckbox = require("./checkbox/daikin-checkbox.cjs");
|
|
9
12
|
const daikinDropdown = require("./dropdown/daikin-dropdown.cjs");
|
|
10
13
|
const daikinDropdownItem = require("./dropdown-item/daikin-dropdown-item.cjs");
|
|
@@ -31,6 +34,9 @@ const daikinTextArea = require("./text-area/daikin-text-area.cjs");
|
|
|
31
34
|
const daikinTextField = require("./text-field/daikin-text-field.cjs");
|
|
32
35
|
const daikinToggle = require("./toggle/daikin-toggle.cjs");
|
|
33
36
|
const daikinTooltip = require("./tooltip/daikin-tooltip.cjs");
|
|
37
|
+
const daikinTree = require("./tree/daikin-tree.cjs");
|
|
38
|
+
const daikinTreeItem = require("./tree-item/daikin-tree-item.cjs");
|
|
39
|
+
const daikinTreeSection = require("./tree-section/daikin-tree-section.cjs");
|
|
34
40
|
Object.defineProperty(exports, "DaikinAccordion", {
|
|
35
41
|
enumerable: true,
|
|
36
42
|
get: () => daikinAccordion.DaikinAccordion
|
|
@@ -51,6 +57,18 @@ Object.defineProperty(exports, "DaikinButton", {
|
|
|
51
57
|
enumerable: true,
|
|
52
58
|
get: () => daikinButton.DaikinButton
|
|
53
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "DaikinCard", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: () => daikinCard.DaikinCard
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "DaikinCardFooter", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: () => daikinCardFooter.DaikinCardFooter
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "DaikinCardHeader", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: () => daikinCardHeader.DaikinCardHeader
|
|
71
|
+
});
|
|
54
72
|
Object.defineProperty(exports, "DaikinCheckbox", {
|
|
55
73
|
enumerable: true,
|
|
56
74
|
get: () => daikinCheckbox.DaikinCheckbox
|
|
@@ -156,3 +174,16 @@ Object.defineProperty(exports, "DaikinTooltip", {
|
|
|
156
174
|
enumerable: true,
|
|
157
175
|
get: () => daikinTooltip.DaikinTooltip
|
|
158
176
|
});
|
|
177
|
+
Object.defineProperty(exports, "DaikinTree", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: () => daikinTree.DaikinTree
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(exports, "DaikinTreeItem", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: () => daikinTreeItem.DaikinTreeItem
|
|
184
|
+
});
|
|
185
|
+
exports.cvaTreeChildren = daikinTreeItem.cvaTreeChildren;
|
|
186
|
+
Object.defineProperty(exports, "DaikinTreeSection", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: () => daikinTreeSection.DaikinTreeSection
|
|
189
|
+
});
|
|
@@ -3,6 +3,9 @@ export * from "./accordion-item/index.cjs";
|
|
|
3
3
|
export * from "./breadcrumb/index.cjs";
|
|
4
4
|
export * from "./breadcrumb-item/index.cjs";
|
|
5
5
|
export * from "./button/index.cjs";
|
|
6
|
+
export * from "./card/index.cjs";
|
|
7
|
+
export * from "./card-footer/index.cjs";
|
|
8
|
+
export * from "./card-header/index.cjs";
|
|
6
9
|
export * from "./checkbox/index.cjs";
|
|
7
10
|
export * from "./dropdown/index.cjs";
|
|
8
11
|
export * from "./dropdown-item/index.cjs";
|
|
@@ -29,3 +32,6 @@ export * from "./text-area/index.cjs";
|
|
|
29
32
|
export * from "./text-field/index.cjs";
|
|
30
33
|
export * from "./toggle/index.cjs";
|
|
31
34
|
export * from "./tooltip/index.cjs";
|
|
35
|
+
export * from "./tree/index.cjs";
|
|
36
|
+
export * from "./tree-item/index.cjs";
|
|
37
|
+
export * from "./tree-section/index.cjs";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const variables_js = require("@daikin-oss/dds-tokens/js/daikin/Light/variables.js");
|
|
4
3
|
const classVarianceAuthority = require("class-variance-authority");
|
|
5
4
|
const lit = require("lit");
|
|
6
5
|
const decorators_js = require("lit/decorators.js");
|
|
@@ -19,41 +18,42 @@ const cvaLabel = classVarianceAuthority.cva(["flex", "items-center", "font-bold"
|
|
|
19
18
|
variants: {
|
|
20
19
|
disabled: {
|
|
21
20
|
false: [],
|
|
22
|
-
true: ["text-
|
|
21
|
+
true: ["text-ddt-color-common-disabled"]
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
const cvaHelper = classVarianceAuthority.cva(
|
|
27
|
-
["flex", "gap-1", "items-center", "leading-5", "text-sm"],
|
|
26
|
+
["flex", "gap-1", "items-center", "min-h-5", "leading-5", "text-sm"],
|
|
28
27
|
{
|
|
29
28
|
variants: {
|
|
30
29
|
type: {
|
|
31
30
|
helper: [],
|
|
32
|
-
helperDisabled: ["text-
|
|
31
|
+
helperDisabled: ["text-ddt-color-common-disabled"],
|
|
33
32
|
error: [
|
|
34
|
-
"text-
|
|
33
|
+
"text-ddt-color-common-danger-default",
|
|
35
34
|
"font-bold",
|
|
36
35
|
"before:size-4",
|
|
37
|
-
"before:i-daikin-status-error"
|
|
36
|
+
"before:i-daikin-status-error",
|
|
37
|
+
"before:flex-none"
|
|
38
|
+
],
|
|
39
|
+
textareaLimitExceedError: [
|
|
40
|
+
"text-ddt-color-common-danger-default",
|
|
41
|
+
"font-bold",
|
|
42
|
+
"before:size-4",
|
|
43
|
+
"before:i-daikin-status-error",
|
|
44
|
+
"before:flex-none"
|
|
38
45
|
],
|
|
39
46
|
none: ["hidden"]
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
);
|
|
44
|
-
const cvaCounter = classVarianceAuthority.cva(["text-sm", "font-bold"], {
|
|
51
|
+
const cvaCounter = classVarianceAuthority.cva(["text-sm", "font-bold", "ml-auto"], {
|
|
45
52
|
variants: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const cvaCounterValueLength = classVarianceAuthority.cva([], {
|
|
53
|
-
variants: {
|
|
54
|
-
error: {
|
|
55
|
-
false: [],
|
|
56
|
-
true: ["text-system-state-error-active"]
|
|
53
|
+
variant: {
|
|
54
|
+
normal: ["text-ddt-color-common-text-secondary"],
|
|
55
|
+
disabled: ["text-ddt-color-common-disabled"],
|
|
56
|
+
error: ["text-ddt-color-common-danger-default"]
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -66,8 +66,12 @@ exports.DaikinInputGroup = class DaikinInputGroup extends lit.LitElement {
|
|
|
66
66
|
this.error = null;
|
|
67
67
|
this.disabled = false;
|
|
68
68
|
this.textareaMaxCount = null;
|
|
69
|
+
this.textareaLimitExceedError = null;
|
|
69
70
|
this._textareaCount = null;
|
|
70
71
|
}
|
|
72
|
+
get textareaLimitExceeded() {
|
|
73
|
+
return this.textareaMaxCount != null && this._textareaCount != null && this.textareaMaxCount < this._textareaCount;
|
|
74
|
+
}
|
|
71
75
|
_handleSlotChange() {
|
|
72
76
|
this._reflectSlotProperties();
|
|
73
77
|
const textarea = this._textareas[0];
|
|
@@ -84,40 +88,41 @@ exports.DaikinInputGroup = class DaikinInputGroup extends lit.LitElement {
|
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
render() {
|
|
87
|
-
const
|
|
91
|
+
const helperTextVariant = (() => {
|
|
92
|
+
if (this.textareaLimitExceeded && !!this.textareaLimitExceedError && !this.disabled) {
|
|
93
|
+
return "textareaLimitExceedError";
|
|
94
|
+
} else if (!!this.error && !this.disabled) {
|
|
95
|
+
return "error";
|
|
96
|
+
} else if (!!this.helper && this.disabled) {
|
|
97
|
+
return "helperDisabled";
|
|
98
|
+
} else if (this.helper) {
|
|
99
|
+
return "helper";
|
|
100
|
+
} else {
|
|
101
|
+
return "none";
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
88
104
|
const helperText = {
|
|
89
|
-
error: this.error,
|
|
90
105
|
helper: this.helper,
|
|
91
106
|
helperDisabled: this.helper,
|
|
107
|
+
error: this.error,
|
|
108
|
+
textareaLimitExceedError: this.textareaLimitExceedError,
|
|
92
109
|
none: ""
|
|
93
|
-
}[
|
|
110
|
+
}[helperTextVariant];
|
|
94
111
|
return lit.html`<fieldset class="content" ?disabled=${this.disabled}>
|
|
95
112
|
<label
|
|
96
|
-
class="flex flex-col justify-center gap-2 w-full text-
|
|
113
|
+
class="flex flex-col justify-center gap-2 w-full text-ddt-color-common-text-primary font-daikinSerif"
|
|
97
114
|
>
|
|
98
|
-
<div class="flex
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</span>` : lit.nothing}
|
|
106
|
-
</div>
|
|
107
|
-
${this.textareaMaxCount != null && this._textareaCount != null ? lit.html`
|
|
108
|
-
<span class=${cvaCounter({ disabled: this.disabled })}>
|
|
109
|
-
<span
|
|
110
|
-
class=${cvaCounterValueLength({
|
|
111
|
-
error: this.textareaMaxCount < this._textareaCount
|
|
112
|
-
})}
|
|
113
|
-
>${this._textareaCount}</span
|
|
114
|
-
><span>/</span><span>${this.textareaMaxCount}</span>
|
|
115
|
-
</span>
|
|
116
|
-
` : lit.nothing}
|
|
115
|
+
<div class="flex items-center gap-1 font-bold">
|
|
116
|
+
${this.label ? lit.html`<span class=${cvaLabel({ disabled: this.disabled })}>
|
|
117
|
+
${this.label}
|
|
118
|
+
</span>` : lit.nothing}
|
|
119
|
+
${this.required && !this.disabled ? lit.html`<span class="text-ddt-color-common-danger-default text-xs">
|
|
120
|
+
${this.required}
|
|
121
|
+
</span>` : lit.nothing}
|
|
117
122
|
</div>
|
|
118
123
|
<span
|
|
119
|
-
class=${cvaHelper({ type:
|
|
120
|
-
aria-live=${
|
|
124
|
+
class=${cvaHelper({ type: helperTextVariant })}
|
|
125
|
+
aria-live=${helperTextVariant === "error" ? "polite" : "off"}
|
|
121
126
|
>
|
|
122
127
|
${helperText}
|
|
123
128
|
</span>
|
|
@@ -125,6 +130,12 @@ exports.DaikinInputGroup = class DaikinInputGroup extends lit.LitElement {
|
|
|
125
130
|
@slotchange=${this._handleSlotChange}
|
|
126
131
|
@input=${this._handleInput}
|
|
127
132
|
></slot>
|
|
133
|
+
${this.textareaMaxCount != null && this._textareaCount != null ? lit.html`<span
|
|
134
|
+
class=${cvaCounter({
|
|
135
|
+
variant: this.disabled ? "disabled" : this.textareaLimitExceeded ? "error" : "normal"
|
|
136
|
+
})}
|
|
137
|
+
>${this._textareaCount}/${this.textareaMaxCount}</span
|
|
138
|
+
>` : lit.nothing}
|
|
128
139
|
</label>
|
|
129
140
|
</fieldset>`;
|
|
130
141
|
}
|
|
@@ -136,8 +147,6 @@ exports.DaikinInputGroup.styles = lit.css`
|
|
|
136
147
|
${lit.unsafeCSS(tailwind.default)}
|
|
137
148
|
|
|
138
149
|
:host {
|
|
139
|
-
--input-group-border-color-error: ${lit.unsafeCSS(variables_js.colorFeedbackNegative)};
|
|
140
|
-
|
|
141
150
|
display: block;
|
|
142
151
|
width: 100%;
|
|
143
152
|
}
|
|
@@ -160,6 +169,13 @@ __decorateClass([
|
|
|
160
169
|
__decorateClass([
|
|
161
170
|
decorators_js.property({ type: Number, reflect: true, attribute: "textarea-max-count" })
|
|
162
171
|
], exports.DaikinInputGroup.prototype, "textareaMaxCount", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
decorators_js.property({
|
|
174
|
+
type: String,
|
|
175
|
+
reflect: true,
|
|
176
|
+
attribute: "textarea-limit-exceed-error"
|
|
177
|
+
})
|
|
178
|
+
], exports.DaikinInputGroup.prototype, "textareaLimitExceedError", 2);
|
|
163
179
|
__decorateClass([
|
|
164
180
|
decorators_js.queryAssignedElements({ selector: "daikin-text-area" })
|
|
165
181
|
], exports.DaikinInputGroup.prototype, "_textareas", 2);
|
|
@@ -111,12 +111,21 @@ export declare class DaikinInputGroup extends LitElement {
|
|
|
111
111
|
*/
|
|
112
112
|
disabled: boolean;
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* The maximum number of characters that can be input into the text area.
|
|
115
|
+
* If set, a counter will be displayed at the bottom of the text area.
|
|
116
|
+
* Users can enter more characters than the limit, but in that case the counter will turn red and an error message will be displayed (if specified) to indicate that the limit has been exceeded.
|
|
115
117
|
*/
|
|
116
118
|
textareaMaxCount: number | null;
|
|
119
|
+
/**
|
|
120
|
+
* An error message displayed when the number of characters in the text area exceeds the limit (optional).
|
|
121
|
+
* When the number of characters in the text area exceeds the limit, this is displayed below the label by overriding `helper` and `error`.
|
|
122
|
+
* Only used when a text area is assigned to a slot and `textareaMaxCount` is set.
|
|
123
|
+
*/
|
|
124
|
+
textareaLimitExceedError: string | null;
|
|
117
125
|
private readonly _textareas;
|
|
118
126
|
private readonly _controls;
|
|
119
127
|
private _textareaCount;
|
|
128
|
+
get textareaLimitExceeded(): boolean;
|
|
120
129
|
private _handleSlotChange;
|
|
121
130
|
private _handleInput;
|
|
122
131
|
private _reflectSlotProperties;
|