@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { colorFeedbackNegative } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { css, unsafeCSS, LitElement, html, nothing } from "lit";
|
|
4
3
|
import { property, queryAssignedElements, state, customElement } from "lit/decorators.js";
|
|
@@ -17,41 +16,42 @@ const cvaLabel = cva(["flex", "items-center", "font-bold", "leading-5"], {
|
|
|
17
16
|
variants: {
|
|
18
17
|
disabled: {
|
|
19
18
|
false: [],
|
|
20
|
-
true: ["text-
|
|
19
|
+
true: ["text-ddt-color-common-disabled"]
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
23
|
const cvaHelper = cva(
|
|
25
|
-
["flex", "gap-1", "items-center", "leading-5", "text-sm"],
|
|
24
|
+
["flex", "gap-1", "items-center", "min-h-5", "leading-5", "text-sm"],
|
|
26
25
|
{
|
|
27
26
|
variants: {
|
|
28
27
|
type: {
|
|
29
28
|
helper: [],
|
|
30
|
-
helperDisabled: ["text-
|
|
29
|
+
helperDisabled: ["text-ddt-color-common-disabled"],
|
|
31
30
|
error: [
|
|
32
|
-
"text-
|
|
31
|
+
"text-ddt-color-common-danger-default",
|
|
33
32
|
"font-bold",
|
|
34
33
|
"before:size-4",
|
|
35
|
-
"before:i-daikin-status-error"
|
|
34
|
+
"before:i-daikin-status-error",
|
|
35
|
+
"before:flex-none"
|
|
36
|
+
],
|
|
37
|
+
textareaLimitExceedError: [
|
|
38
|
+
"text-ddt-color-common-danger-default",
|
|
39
|
+
"font-bold",
|
|
40
|
+
"before:size-4",
|
|
41
|
+
"before:i-daikin-status-error",
|
|
42
|
+
"before:flex-none"
|
|
36
43
|
],
|
|
37
44
|
none: ["hidden"]
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
);
|
|
42
|
-
const cvaCounter = cva(["text-sm", "font-bold"], {
|
|
49
|
+
const cvaCounter = cva(["text-sm", "font-bold", "ml-auto"], {
|
|
43
50
|
variants: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
const cvaCounterValueLength = cva([], {
|
|
51
|
-
variants: {
|
|
52
|
-
error: {
|
|
53
|
-
false: [],
|
|
54
|
-
true: ["text-system-state-error-active"]
|
|
51
|
+
variant: {
|
|
52
|
+
normal: ["text-ddt-color-common-text-secondary"],
|
|
53
|
+
disabled: ["text-ddt-color-common-disabled"],
|
|
54
|
+
error: ["text-ddt-color-common-danger-default"]
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -64,8 +64,12 @@ let DaikinInputGroup = class extends LitElement {
|
|
|
64
64
|
this.error = null;
|
|
65
65
|
this.disabled = false;
|
|
66
66
|
this.textareaMaxCount = null;
|
|
67
|
+
this.textareaLimitExceedError = null;
|
|
67
68
|
this._textareaCount = null;
|
|
68
69
|
}
|
|
70
|
+
get textareaLimitExceeded() {
|
|
71
|
+
return this.textareaMaxCount != null && this._textareaCount != null && this.textareaMaxCount < this._textareaCount;
|
|
72
|
+
}
|
|
69
73
|
_handleSlotChange() {
|
|
70
74
|
this._reflectSlotProperties();
|
|
71
75
|
const textarea = this._textareas[0];
|
|
@@ -82,40 +86,41 @@ let DaikinInputGroup = class extends LitElement {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
render() {
|
|
85
|
-
const
|
|
89
|
+
const helperTextVariant = (() => {
|
|
90
|
+
if (this.textareaLimitExceeded && !!this.textareaLimitExceedError && !this.disabled) {
|
|
91
|
+
return "textareaLimitExceedError";
|
|
92
|
+
} else if (!!this.error && !this.disabled) {
|
|
93
|
+
return "error";
|
|
94
|
+
} else if (!!this.helper && this.disabled) {
|
|
95
|
+
return "helperDisabled";
|
|
96
|
+
} else if (this.helper) {
|
|
97
|
+
return "helper";
|
|
98
|
+
} else {
|
|
99
|
+
return "none";
|
|
100
|
+
}
|
|
101
|
+
})();
|
|
86
102
|
const helperText = {
|
|
87
|
-
error: this.error,
|
|
88
103
|
helper: this.helper,
|
|
89
104
|
helperDisabled: this.helper,
|
|
105
|
+
error: this.error,
|
|
106
|
+
textareaLimitExceedError: this.textareaLimitExceedError,
|
|
90
107
|
none: ""
|
|
91
|
-
}[
|
|
108
|
+
}[helperTextVariant];
|
|
92
109
|
return html`<fieldset class="content" ?disabled=${this.disabled}>
|
|
93
110
|
<label
|
|
94
|
-
class="flex flex-col justify-center gap-2 w-full text-
|
|
111
|
+
class="flex flex-col justify-center gap-2 w-full text-ddt-color-common-text-primary font-daikinSerif"
|
|
95
112
|
>
|
|
96
|
-
<div class="flex
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</span>` : nothing}
|
|
104
|
-
</div>
|
|
105
|
-
${this.textareaMaxCount != null && this._textareaCount != null ? html`
|
|
106
|
-
<span class=${cvaCounter({ disabled: this.disabled })}>
|
|
107
|
-
<span
|
|
108
|
-
class=${cvaCounterValueLength({
|
|
109
|
-
error: this.textareaMaxCount < this._textareaCount
|
|
110
|
-
})}
|
|
111
|
-
>${this._textareaCount}</span
|
|
112
|
-
><span>/</span><span>${this.textareaMaxCount}</span>
|
|
113
|
-
</span>
|
|
114
|
-
` : nothing}
|
|
113
|
+
<div class="flex items-center gap-1 font-bold">
|
|
114
|
+
${this.label ? html`<span class=${cvaLabel({ disabled: this.disabled })}>
|
|
115
|
+
${this.label}
|
|
116
|
+
</span>` : nothing}
|
|
117
|
+
${this.required && !this.disabled ? html`<span class="text-ddt-color-common-danger-default text-xs">
|
|
118
|
+
${this.required}
|
|
119
|
+
</span>` : nothing}
|
|
115
120
|
</div>
|
|
116
121
|
<span
|
|
117
|
-
class=${cvaHelper({ type:
|
|
118
|
-
aria-live=${
|
|
122
|
+
class=${cvaHelper({ type: helperTextVariant })}
|
|
123
|
+
aria-live=${helperTextVariant === "error" ? "polite" : "off"}
|
|
119
124
|
>
|
|
120
125
|
${helperText}
|
|
121
126
|
</span>
|
|
@@ -123,6 +128,12 @@ let DaikinInputGroup = class extends LitElement {
|
|
|
123
128
|
@slotchange=${this._handleSlotChange}
|
|
124
129
|
@input=${this._handleInput}
|
|
125
130
|
></slot>
|
|
131
|
+
${this.textareaMaxCount != null && this._textareaCount != null ? html`<span
|
|
132
|
+
class=${cvaCounter({
|
|
133
|
+
variant: this.disabled ? "disabled" : this.textareaLimitExceeded ? "error" : "normal"
|
|
134
|
+
})}
|
|
135
|
+
>${this._textareaCount}/${this.textareaMaxCount}</span
|
|
136
|
+
>` : nothing}
|
|
126
137
|
</label>
|
|
127
138
|
</fieldset>`;
|
|
128
139
|
}
|
|
@@ -134,8 +145,6 @@ DaikinInputGroup.styles = css`
|
|
|
134
145
|
${unsafeCSS(tailwindStyles)}
|
|
135
146
|
|
|
136
147
|
:host {
|
|
137
|
-
--input-group-border-color-error: ${unsafeCSS(colorFeedbackNegative)};
|
|
138
|
-
|
|
139
148
|
display: block;
|
|
140
149
|
width: 100%;
|
|
141
150
|
}
|
|
@@ -158,6 +167,13 @@ __decorateClass([
|
|
|
158
167
|
__decorateClass([
|
|
159
168
|
property({ type: Number, reflect: true, attribute: "textarea-max-count" })
|
|
160
169
|
], DaikinInputGroup.prototype, "textareaMaxCount", 2);
|
|
170
|
+
__decorateClass([
|
|
171
|
+
property({
|
|
172
|
+
type: String,
|
|
173
|
+
reflect: true,
|
|
174
|
+
attribute: "textarea-limit-exceed-error"
|
|
175
|
+
})
|
|
176
|
+
], DaikinInputGroup.prototype, "textareaLimitExceedError", 2);
|
|
161
177
|
__decorateClass([
|
|
162
178
|
queryAssignedElements({ selector: "daikin-text-area" })
|
|
163
179
|
], DaikinInputGroup.prototype, "_textareas", 2);
|
|
@@ -14,31 +14,20 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
16
|
const LINK_CLASS_NAME = cva([
|
|
17
|
-
"flex",
|
|
18
|
-
"justify-center",
|
|
19
|
-
"items-center",
|
|
20
|
-
"gap-0.5",
|
|
21
|
-
"size-fit",
|
|
22
17
|
"font-daikinSerif",
|
|
23
|
-
"rounded-[1px]",
|
|
24
18
|
"relative",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"link-enabled:
|
|
28
|
-
"link-enabled:
|
|
29
|
-
"link-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"focus-visible:
|
|
34
|
-
"focus-visible:
|
|
35
|
-
"focus-visible:
|
|
36
|
-
"focus-visible:
|
|
37
|
-
"focus-visible:before:outline-2",
|
|
38
|
-
"after:h-[1px]",
|
|
39
|
-
"after:absolute",
|
|
40
|
-
"after:inset-[auto_0_0_0]",
|
|
41
|
-
"after:bg-current"
|
|
19
|
+
"border-b",
|
|
20
|
+
"border-b-current",
|
|
21
|
+
"link-enabled:text-ddt-color-link-text-default",
|
|
22
|
+
"link-enabled:hover:text-ddt-color-link-text-hover",
|
|
23
|
+
"link-enabled:hover:bg-ddt-color-common-surface-brand-hover",
|
|
24
|
+
"link-enabled:active:text-ddt-color-link-text-press",
|
|
25
|
+
"link-enabled:active:bg-ddt-color-common-surface-brand-press",
|
|
26
|
+
"link-disabled:text-ddt-color-common-disabled",
|
|
27
|
+
"focus-visible:outline",
|
|
28
|
+
"focus-visible:outline-2",
|
|
29
|
+
"focus-visible:outline-ddt-color-common-border-focus",
|
|
30
|
+
"focus-visible:outline-offset-1"
|
|
42
31
|
])();
|
|
43
32
|
let DaikinLink = class extends LitElement {
|
|
44
33
|
constructor() {
|
|
@@ -49,43 +38,36 @@ let DaikinLink = class extends LitElement {
|
|
|
49
38
|
this.showVisited = false;
|
|
50
39
|
}
|
|
51
40
|
render() {
|
|
52
|
-
return html
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
return html`<a
|
|
42
|
+
class=${LINK_CLASS_NAME}
|
|
43
|
+
href=${ifDefined(this.disabled ? void 0 : this.href ?? void 0)}
|
|
44
|
+
target=${ifDefined(this.target ?? void 0)}
|
|
45
|
+
aria-disabled=${ifDefined(this.disabled ? "true" : void 0)}
|
|
46
|
+
><span class="inline-flex mr-[0.125rem] align-sub">
|
|
47
|
+
<slot name="left-icon" class="icon-size-4"
|
|
48
|
+
><span class="-mr-[0.125rem]"></span></slot></span
|
|
49
|
+
><slot></slot
|
|
50
|
+
><span class="inline-flex ml-[0.125rem] align-sub"
|
|
51
|
+
><slot name="right-icon" class="icon-size-4"
|
|
52
|
+
><span class="-ml-[0.125rem]"></span></slot></span
|
|
53
|
+
></a>`;
|
|
64
54
|
}
|
|
65
55
|
};
|
|
66
56
|
DaikinLink.styles = css`
|
|
67
57
|
${unsafeCSS(tailwindStyles)}
|
|
68
58
|
|
|
69
|
-
:host {
|
|
70
|
-
display: block;
|
|
71
|
-
width: fit-content;
|
|
72
|
-
height: fit-content;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
59
|
:host([show-visited]:not([disabled])) a:visited {
|
|
76
|
-
color:
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:host([show-visited]:not([disabled])) a:hover:visited {
|
|
80
|
-
color: #4a1c51; /* system-state-visited-hover */
|
|
60
|
+
color: var(--dds-color-link-text-visited-default);
|
|
81
61
|
}
|
|
82
62
|
|
|
83
|
-
:host([show-visited]:not([disabled])) a:hover
|
|
84
|
-
|
|
63
|
+
:host([show-visited]:not([disabled])) a:visited:hover {
|
|
64
|
+
color: var(--dds-color-link-text-visited-hover);
|
|
65
|
+
background-color: var(--dds-color-link-surface-visited-hover);
|
|
85
66
|
}
|
|
86
67
|
|
|
87
|
-
:host([show-visited]:not([disabled])) a:active
|
|
88
|
-
color:
|
|
68
|
+
:host([show-visited]:not([disabled])) a:visited:active {
|
|
69
|
+
color: var(--dds-color-link-text-visited-press);
|
|
70
|
+
background-color: var(--dds-color-link-surface-visited-press);
|
|
89
71
|
}
|
|
90
72
|
`;
|
|
91
73
|
__decorateClass([
|
|
@@ -23,18 +23,18 @@ const INNER_CN = cva([
|
|
|
23
23
|
"focus-visible:before:outline",
|
|
24
24
|
"focus-visible:before:outline-2",
|
|
25
25
|
"focus-visible:before:-outline-offset-2",
|
|
26
|
-
"focus-visible:before:outline-
|
|
26
|
+
"focus-visible:before:outline-ddt-color-common-border-focus",
|
|
27
27
|
// For buttons and links
|
|
28
|
-
"link-enabled:before:group-hover:[&:not(:active)]:bg-
|
|
29
|
-
"link-enabled:before:active:bg-
|
|
28
|
+
"link-enabled:before:group-hover:[&:not(:active)]:bg-ddt-color-common-surface-hover",
|
|
29
|
+
"link-enabled:before:active:bg-ddt-color-common-surface-press",
|
|
30
30
|
// For text
|
|
31
|
-
"[&:not(a,button)]:before:group-hover:bg-
|
|
31
|
+
"[&:not(a,button)]:before:group-hover:bg-ddt-color-common-surface-hover"
|
|
32
32
|
])();
|
|
33
33
|
const cvaContent = cva(["block", "pl-2", "pr-3", "text-left"], {
|
|
34
34
|
variants: {
|
|
35
35
|
disabled: {
|
|
36
|
-
false: ["text-
|
|
37
|
-
true: ["text-
|
|
36
|
+
false: ["text-ddt-color-common-text-primary"],
|
|
37
|
+
true: ["text-ddt-color-common-disabled"]
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
});
|
|
@@ -45,8 +45,8 @@ const cvaIcon = cva(["icon-size-6"], {
|
|
|
45
45
|
right: ["pointer-events-none"]
|
|
46
46
|
},
|
|
47
47
|
disabled: {
|
|
48
|
-
false: ["text-
|
|
49
|
-
true: ["text-
|
|
48
|
+
false: ["text-ddt-color-common-text-primary"],
|
|
49
|
+
true: ["text-ddt-color-common-disabled"]
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { colorFeedbackPositive, colorFeedbackWarning, colorFeedbackNegative } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { css, unsafeCSS, LitElement, html, nothing } from "lit";
|
|
4
3
|
import { property, customElement } from "lit/decorators.js";
|
|
@@ -15,7 +14,13 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
14
|
return result;
|
|
16
15
|
};
|
|
17
16
|
const cvaContainer = cva(
|
|
18
|
-
[
|
|
17
|
+
[
|
|
18
|
+
"flex",
|
|
19
|
+
"box-border",
|
|
20
|
+
"bg-ddt-color-common-background-default",
|
|
21
|
+
"overflow-hidden",
|
|
22
|
+
"font-daikinSerif"
|
|
23
|
+
],
|
|
19
24
|
{
|
|
20
25
|
variants: {
|
|
21
26
|
variant: {
|
|
@@ -28,11 +33,11 @@ const cvaContainer = cva(
|
|
|
28
33
|
inline: []
|
|
29
34
|
},
|
|
30
35
|
status: {
|
|
31
|
-
positive: ["border-
|
|
32
|
-
negative: ["border-
|
|
33
|
-
warning: ["border-
|
|
34
|
-
alarm: ["border-
|
|
35
|
-
information: ["border-
|
|
36
|
+
positive: ["border-ddt-color-common-success"],
|
|
37
|
+
negative: ["border-ddt-color-common-danger-default"],
|
|
38
|
+
warning: ["border-ddt-color-common-warning"],
|
|
39
|
+
alarm: ["border-ddt-color-common-alarm"],
|
|
40
|
+
information: ["border-ddt-color-common-information"]
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
43
|
defaultVariants: {
|
|
@@ -49,26 +54,26 @@ const cvaIconContainer = cva(
|
|
|
49
54
|
"items-center",
|
|
50
55
|
"w-[2.75rem]",
|
|
51
56
|
"after:size-6",
|
|
52
|
-
"after:text-
|
|
57
|
+
"after:text-ddt-color-common-background-default"
|
|
53
58
|
],
|
|
54
59
|
{
|
|
55
60
|
variants: {
|
|
56
61
|
status: {
|
|
57
62
|
positive: [
|
|
58
|
-
"bg-
|
|
63
|
+
"bg-ddt-color-common-success",
|
|
59
64
|
"after:i-daikin-status-positive"
|
|
60
65
|
],
|
|
61
66
|
negative: [
|
|
62
|
-
"bg-
|
|
67
|
+
"bg-ddt-color-common-danger-default",
|
|
63
68
|
"after:i-daikin-status-negative"
|
|
64
69
|
],
|
|
65
70
|
warning: [
|
|
66
|
-
"bg-
|
|
71
|
+
"bg-ddt-color-common-warning",
|
|
67
72
|
"after:i-daikin-status-warning"
|
|
68
73
|
],
|
|
69
|
-
alarm: ["bg-
|
|
74
|
+
alarm: ["bg-ddt-color-common-alarm", "after:i-daikin-status-alarm"],
|
|
70
75
|
information: [
|
|
71
|
-
"bg-
|
|
76
|
+
"bg-ddt-color-common-information",
|
|
72
77
|
"after:i-daikin-status-information"
|
|
73
78
|
]
|
|
74
79
|
}
|
|
@@ -158,12 +163,6 @@ DaikinNotification.styles = css`
|
|
|
158
163
|
${unsafeCSS(tailwindStyles)}
|
|
159
164
|
|
|
160
165
|
:host {
|
|
161
|
-
--colorFeedbackPositive: ${unsafeCSS(colorFeedbackPositive)};
|
|
162
|
-
--colorFeedbackWarning: ${unsafeCSS(colorFeedbackWarning)};
|
|
163
|
-
--colorFeedbackNegative: ${unsafeCSS(colorFeedbackNegative)};
|
|
164
|
-
--colorFeedbackAlarm: #f68c54;
|
|
165
|
-
--colorFeedbackInformation: #0097e0;
|
|
166
|
-
|
|
167
166
|
display: block;
|
|
168
167
|
}
|
|
169
168
|
|
|
@@ -32,20 +32,20 @@ const cvaPageButton = cva(
|
|
|
32
32
|
"focus-visible:outline",
|
|
33
33
|
"focus-visible:outline-2",
|
|
34
34
|
"focus-visible:outline-offset-1",
|
|
35
|
-
"focus-visible:outline-
|
|
35
|
+
"focus-visible:outline-ddt-color-common-border-focus"
|
|
36
36
|
],
|
|
37
37
|
{
|
|
38
38
|
variants: {
|
|
39
39
|
active: {
|
|
40
40
|
true: [
|
|
41
|
-
"text-
|
|
42
|
-
"focus-visible:text-
|
|
41
|
+
"text-ddt-color-common-brand-default",
|
|
42
|
+
"focus-visible:text-ddt-color-common-brand-default",
|
|
43
43
|
"font-bold",
|
|
44
|
-
"hover:text-
|
|
45
|
-
"hover:bg-
|
|
46
|
-
"active:text-
|
|
47
|
-
"active:bg-
|
|
48
|
-
"after:bg-
|
|
44
|
+
"hover:text-ddt-color-common-border-focus",
|
|
45
|
+
"hover:bg-ddt-color-common-surface-selected-default",
|
|
46
|
+
"active:text-ddt-color-common-brand-press",
|
|
47
|
+
"active:bg-ddt-color-common-surface-selected-press",
|
|
48
|
+
"after:bg-ddt-color-common-brand-default",
|
|
49
49
|
"after:content-['']",
|
|
50
50
|
"after:h-1",
|
|
51
51
|
"after:absolute",
|
|
@@ -53,13 +53,12 @@ const cvaPageButton = cva(
|
|
|
53
53
|
"after:top-auto"
|
|
54
54
|
],
|
|
55
55
|
false: [
|
|
56
|
-
"text-inherit",
|
|
57
56
|
"font-normal",
|
|
58
|
-
"text-
|
|
59
|
-
"active:bg-
|
|
60
|
-
"active:text-
|
|
61
|
-
"hover:bg-
|
|
62
|
-
"hover:text-
|
|
57
|
+
"text-ddt-color-common-neutral-default",
|
|
58
|
+
"active:bg-ddt-color-common-surface-neutral-press",
|
|
59
|
+
"active:text-ddt-color-common-text-primary",
|
|
60
|
+
"hover:bg-ddt-color-common-surface-neutral-hover",
|
|
61
|
+
"hover:text-ddt-color-common-neutral-hover"
|
|
63
62
|
]
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -67,7 +66,6 @@ const cvaPageButton = cva(
|
|
|
67
66
|
);
|
|
68
67
|
const cvaEllipsis = cva([
|
|
69
68
|
"relative",
|
|
70
|
-
"text-inherit",
|
|
71
69
|
"border-0",
|
|
72
70
|
"no-underline",
|
|
73
71
|
"flex",
|
|
@@ -79,10 +77,10 @@ const cvaEllipsis = cva([
|
|
|
79
77
|
"text-base",
|
|
80
78
|
"not-italic",
|
|
81
79
|
"font-normal",
|
|
82
|
-
"leading-6"
|
|
80
|
+
"leading-6",
|
|
81
|
+
"text-ddt-color-common-neutral-default"
|
|
83
82
|
]);
|
|
84
83
|
const cvaChevronButton = cva([
|
|
85
|
-
"text-inherit",
|
|
86
84
|
"border-0",
|
|
87
85
|
"no-underline",
|
|
88
86
|
"flex",
|
|
@@ -90,21 +88,21 @@ const cvaChevronButton = cva([
|
|
|
90
88
|
"justify-center",
|
|
91
89
|
"w-12",
|
|
92
90
|
"h-12",
|
|
93
|
-
"text-
|
|
91
|
+
"text-ddt-color-common-neutral-default",
|
|
94
92
|
"font-daikinSerif",
|
|
95
93
|
"text-base",
|
|
96
94
|
"not-italic",
|
|
97
95
|
"font-normal",
|
|
98
96
|
"leading-6",
|
|
99
|
-
"enabled:hover:bg-
|
|
100
|
-
"enabled:hover:text-
|
|
101
|
-
"enabled:active:bg-
|
|
102
|
-
"enabled:active:text-
|
|
103
|
-
"disabled:!text-
|
|
97
|
+
"enabled:hover:bg-ddt-color-common-surface-neutral-hover",
|
|
98
|
+
"enabled:hover:text-ddt-color-common-neutral-hover",
|
|
99
|
+
"enabled:active:bg-ddt-color-common-surface-neutral-press",
|
|
100
|
+
"enabled:active:text-ddt-color-common-neutral-press",
|
|
101
|
+
"disabled:!text-ddt-color-common-disabled",
|
|
104
102
|
"focus-visible:outline",
|
|
105
103
|
"focus-visible:outline-2",
|
|
106
104
|
"focus-visible:outline-offset-1",
|
|
107
|
-
"focus-visible:outline-
|
|
105
|
+
"focus-visible:outline-ddt-color-common-border-focus"
|
|
108
106
|
]);
|
|
109
107
|
let DaikinPagination = class extends LitElement {
|
|
110
108
|
constructor() {
|
|
@@ -15,7 +15,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
15
|
const cvaBar = cva(
|
|
16
16
|
[
|
|
17
17
|
"w-full",
|
|
18
|
-
"bg-
|
|
18
|
+
"bg-ddt-color-common-disabled",
|
|
19
19
|
"overflow-hidden",
|
|
20
20
|
"relative",
|
|
21
21
|
"after:block",
|
|
@@ -26,14 +26,17 @@ const cvaBar = cva(
|
|
|
26
26
|
{
|
|
27
27
|
variants: {
|
|
28
28
|
variant: {
|
|
29
|
-
inprogress: [
|
|
30
|
-
|
|
29
|
+
inprogress: [
|
|
30
|
+
"after:w-[--bar-width]",
|
|
31
|
+
"after:bg-ddt-color-common-brand-default"
|
|
32
|
+
],
|
|
33
|
+
completed: ["after:w-full", "after:bg-ddt-color-common-success"],
|
|
31
34
|
indeterminate: [
|
|
32
35
|
"after:w-1/2",
|
|
33
|
-
"after:bg-
|
|
36
|
+
"after:bg-ddt-color-common-brand-default",
|
|
34
37
|
"after:animate-[progress-bar-indeterminate_1200ms_linear_infinite]"
|
|
35
38
|
],
|
|
36
|
-
error: ["after:w-full", "after:bg-
|
|
39
|
+
error: ["after:w-full", "after:bg-ddt-color-common-danger-default"]
|
|
37
40
|
},
|
|
38
41
|
size: {
|
|
39
42
|
medium: ["h-1"],
|
|
@@ -43,20 +46,27 @@ const cvaBar = cva(
|
|
|
43
46
|
}
|
|
44
47
|
);
|
|
45
48
|
const cvaBarContainer = cva(
|
|
46
|
-
[
|
|
49
|
+
[
|
|
50
|
+
"flex",
|
|
51
|
+
"justify-between",
|
|
52
|
+
"items-center",
|
|
53
|
+
"text-ddt-color-common-text-primary",
|
|
54
|
+
"leading-5",
|
|
55
|
+
"font-bold"
|
|
56
|
+
],
|
|
47
57
|
{
|
|
48
58
|
variants: {
|
|
49
59
|
variant: {
|
|
50
60
|
inprogress: [],
|
|
51
61
|
completed: [
|
|
52
62
|
"after:size-4",
|
|
53
|
-
"after:
|
|
63
|
+
"after:bg-ddt-color-common-success",
|
|
54
64
|
"after:i-daikin-status-positive"
|
|
55
65
|
],
|
|
56
66
|
indeterminate: [],
|
|
57
67
|
error: [
|
|
58
68
|
"after:size-4",
|
|
59
|
-
"after:text-
|
|
69
|
+
"after:text-ddt-color-common-danger-default",
|
|
60
70
|
"after:i-daikin-status-error"
|
|
61
71
|
]
|
|
62
72
|
}
|
|
@@ -66,10 +76,10 @@ const cvaBarContainer = cva(
|
|
|
66
76
|
const cvaHelper = cva(["text-sm"], {
|
|
67
77
|
variants: {
|
|
68
78
|
variant: {
|
|
69
|
-
inprogress: [],
|
|
70
|
-
completed: [],
|
|
71
|
-
indeterminate: [],
|
|
72
|
-
error: ["text-
|
|
79
|
+
inprogress: ["text-ddt-color-common-text-primary"],
|
|
80
|
+
completed: ["text-ddt-color-common-text-primary"],
|
|
81
|
+
indeterminate: ["text-ddt-color-common-text-primary"],
|
|
82
|
+
error: ["text-ddt-color-common-danger-default", "font-bold"]
|
|
73
83
|
},
|
|
74
84
|
visible: {
|
|
75
85
|
false: ["hidden"],
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { colorFeedbackNegative } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
1
|
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
3
2
|
import { property, queryAssignedElements, customElement } from "lit/decorators.js";
|
|
4
3
|
import tailwindStyles from "../../tailwind.css.js";
|
|
@@ -35,7 +34,7 @@ let DaikinProgressIndicator = class extends LitElement {
|
|
|
35
34
|
}
|
|
36
35
|
render() {
|
|
37
36
|
return html`<div
|
|
38
|
-
class="flex justify-stretch items-start w-full font-daikinSerif"
|
|
37
|
+
class="flex justify-stretch items-start gap-2 w-full font-daikinSerif"
|
|
39
38
|
role="list"
|
|
40
39
|
>
|
|
41
40
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -54,10 +53,6 @@ DaikinProgressIndicator.styles = css`
|
|
|
54
53
|
${unsafeCSS(tailwindStyles)}
|
|
55
54
|
|
|
56
55
|
:host {
|
|
57
|
-
--progress-indicator-border-color-error: ${unsafeCSS(
|
|
58
|
-
colorFeedbackNegative
|
|
59
|
-
)};
|
|
60
|
-
|
|
61
56
|
display: block;
|
|
62
57
|
width: 100%;
|
|
63
58
|
}
|
|
@@ -20,17 +20,18 @@ const cvaContainer = cva(
|
|
|
20
20
|
"flex-col",
|
|
21
21
|
"gap-1",
|
|
22
22
|
"w-full",
|
|
23
|
-
"text-
|
|
24
|
-
"pt-
|
|
23
|
+
"text-ddt-color-common-text-primary",
|
|
24
|
+
"pt-2",
|
|
25
25
|
"border-t-[0.25rem]",
|
|
26
|
-
"font-daikinSerif"
|
|
26
|
+
"font-daikinSerif",
|
|
27
|
+
"leading-[130%]"
|
|
27
28
|
],
|
|
28
29
|
{
|
|
29
30
|
variants: {
|
|
30
31
|
status: {
|
|
31
|
-
unfinished: ["border-
|
|
32
|
-
inprogress: ["border-
|
|
33
|
-
finished: ["border-
|
|
32
|
+
unfinished: ["border-ddt-color-common-disabled"],
|
|
33
|
+
inprogress: ["border-ddt-color-common-brand-default"],
|
|
34
|
+
finished: ["border-ddt-color-common-brand-default"]
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -43,22 +44,21 @@ let DaikinProgressIndicatorItem = class extends LitElement {
|
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
46
|
return html`<div
|
|
46
|
-
class=${cvaContainer({
|
|
47
|
-
status: this.status
|
|
48
|
-
})}
|
|
47
|
+
class=${cvaContainer({ status: this.status })}
|
|
49
48
|
role="listitem"
|
|
50
49
|
aria-current=${ifDefined(this.current ? "step" : void 0)}
|
|
51
50
|
>
|
|
52
|
-
<div class="flex
|
|
51
|
+
<div class="flex justify-between gap-1 font-bold">
|
|
53
52
|
<slot></slot>
|
|
54
53
|
${this.status === "finished" ? html`
|
|
55
54
|
<span
|
|
56
|
-
|
|
55
|
+
role="img"
|
|
56
|
+
class="flex-none size-4 i-daikin-status-positive text-ddt-color-common-brand-default"
|
|
57
57
|
aria-label="Completed"
|
|
58
58
|
></span>
|
|
59
59
|
` : nothing}
|
|
60
60
|
</div>
|
|
61
|
-
<slot name="description" class="text-sm
|
|
61
|
+
<slot name="description" class="text-sm"></slot>
|
|
62
62
|
</div>`;
|
|
63
63
|
}
|
|
64
64
|
};
|