@daikin-oss/design-system-web-components 0.3.2 → 0.4.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 +63 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +105 -59
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/cjs/components/button/daikin-button.cjs +89 -128
- package/dist/cjs/components/button/daikin-button.d.ts +30 -27
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +99 -119
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs/components/icon/icons.json.cjs +20 -0
- package/dist/cjs/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs/components/index.cjs +18 -8
- package/dist/cjs/components/index.d.ts +4 -2
- package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/cjs/components/list/daikin-list.cjs +24 -0
- package/dist/cjs/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs/components/list/index.cjs +7 -0
- package/dist/cjs/components/list/index.d.ts +1 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +125 -0
- package/dist/cjs/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs/components/list-item/index.cjs +7 -0
- package/dist/cjs/components/list-item/index.d.ts +1 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs/components/notification/daikin-notification.d.ts +13 -11
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +53 -29
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/cjs/components/radio/daikin-radio.cjs +73 -92
- package/dist/cjs/components/radio/daikin-radio.d.ts +23 -39
- package/dist/cjs/components/tab/daikin-tab.cjs +41 -46
- package/dist/cjs/components/tab/daikin-tab.d.ts +12 -12
- package/dist/cjs/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +8 -8
- package/dist/{cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts → cjs/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
- package/dist/cjs/components/tab-panels/index.cjs +7 -0
- package/dist/cjs/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +29 -35
- package/dist/cjs/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -21
- package/dist/cjs/components/tabs/index.cjs +7 -0
- package/dist/cjs/components/tabs/index.d.ts +1 -0
- package/dist/cjs/components/text-input/daikin-text-input.cjs +4 -3
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/cjs/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +4 -0
- package/dist/cjs/index.cjs +18 -8
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +105 -59
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/cjs-dev/components/button/daikin-button.cjs +89 -128
- package/dist/cjs-dev/components/button/daikin-button.d.ts +30 -27
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +99 -119
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +20 -0
- package/dist/cjs-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs-dev/components/index.cjs +18 -8
- package/dist/cjs-dev/components/index.d.ts +4 -2
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/cjs-dev/components/list/daikin-list.cjs +24 -0
- package/dist/cjs-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs-dev/components/list/index.cjs +7 -0
- package/dist/cjs-dev/components/list/index.d.ts +1 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +125 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs-dev/components/list-item/index.cjs +7 -0
- package/dist/cjs-dev/components/list-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs-dev/components/notification/daikin-notification.d.ts +13 -11
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +53 -29
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +73 -92
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +23 -39
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +41 -46
- package/dist/cjs-dev/components/tab/daikin-tab.d.ts +12 -12
- package/dist/cjs-dev/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +9 -9
- package/dist/{cjs/components/panel-switcher/daikin-panel-switcher.d.ts → cjs-dev/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
- package/dist/cjs-dev/components/tab-panels/index.cjs +7 -0
- package/dist/cjs-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs-dev/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +31 -37
- package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -21
- package/dist/cjs-dev/components/tabs/index.cjs +7 -0
- package/dist/cjs-dev/components/tabs/index.d.ts +1 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +4 -3
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +4 -0
- package/dist/cjs-dev/index.cjs +18 -8
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/es/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es/components/accordion/daikin-accordion.js +32 -7
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/es/components/accordion-item/daikin-accordion-item.js +106 -60
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +3 -6
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
- package/dist/es/components/button/daikin-button.d.ts +30 -27
- package/dist/es/components/button/daikin-button.js +90 -129
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/es/components/checkbox/daikin-checkbox.js +101 -121
- package/dist/es/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es/components/icon/icons.json.d.ts +20 -0
- package/dist/es/components/icon/icons.json.js +20 -0
- package/dist/es/components/index.d.ts +4 -2
- package/dist/es/components/index.js +8 -4
- package/dist/es/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/es/components/input-group/daikin-input-group.js +1 -1
- package/dist/es/components/list/daikin-list.d.ts +28 -0
- package/dist/es/components/list/daikin-list.js +25 -0
- package/dist/es/components/list/index.d.ts +1 -0
- package/dist/es/components/list/index.js +4 -0
- package/dist/es/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es/components/list-item/daikin-list-item.js +126 -0
- package/dist/es/components/list-item/index.d.ts +1 -0
- package/dist/es/components/list-item/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +13 -11
- package/dist/es/components/notification/daikin-notification.js +15 -16
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/es/components/progress-bar/daikin-progress-bar.js +53 -29
- package/dist/es/components/radio/daikin-radio.d.ts +23 -39
- package/dist/es/components/radio/daikin-radio.js +74 -93
- package/dist/es/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es/components/tab/daikin-tab.js +42 -47
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +9 -9
- package/dist/es/components/tab-panels/index.d.ts +1 -0
- package/dist/es/components/tab-panels/index.js +4 -0
- package/dist/es/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -21
- package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +30 -36
- package/dist/es/components/tabs/index.d.ts +1 -0
- package/dist/es/components/tabs/index.js +4 -0
- package/dist/es/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/es/components/text-input/daikin-text-input.js +4 -3
- package/dist/es/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/es/components/textarea/daikin-textarea.js +3 -3
- package/dist/es/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/es/components/toggle/daikin-toggle.js +45 -69
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +4 -0
- package/dist/es/index.js +8 -4
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es-dev/components/accordion/daikin-accordion.js +32 -7
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +106 -60
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +3 -6
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
- package/dist/es-dev/components/button/daikin-button.d.ts +30 -27
- package/dist/es-dev/components/button/daikin-button.js +90 -129
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +101 -121
- package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/es-dev/components/icon/icons.json.js +20 -0
- package/dist/es-dev/components/index.d.ts +4 -2
- package/dist/es-dev/components/index.js +8 -4
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
- package/dist/es-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/es-dev/components/list/daikin-list.js +25 -0
- package/dist/es-dev/components/list/index.d.ts +1 -0
- package/dist/es-dev/components/list/index.js +4 -0
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es-dev/components/list-item/daikin-list-item.js +126 -0
- package/dist/es-dev/components/list-item/index.d.ts +1 -0
- package/dist/es-dev/components/list-item/index.js +4 -0
- package/dist/es-dev/components/notification/daikin-notification.d.ts +13 -11
- package/dist/es-dev/components/notification/daikin-notification.js +15 -16
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +53 -29
- package/dist/es-dev/components/radio/daikin-radio.d.ts +23 -39
- package/dist/es-dev/components/radio/daikin-radio.js +74 -93
- package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es-dev/components/tab/daikin-tab.js +42 -47
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +10 -10
- package/dist/es-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/es-dev/components/tab-panels/index.js +4 -0
- package/dist/{cjs-dev/components/tab-group/daikin-tab-group.d.ts → es-dev/components/tabs/daikin-tabs.d.ts} +27 -21
- package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +32 -38
- package/dist/es-dev/components/tabs/index.d.ts +1 -0
- package/dist/es-dev/components/tabs/index.js +4 -0
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/es-dev/components/text-input/daikin-text-input.js +4 -3
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/es-dev/components/textarea/daikin-textarea.js +3 -3
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/es-dev/components/toggle/daikin-toggle.js +45 -69
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +4 -0
- package/dist/es-dev/index.js +8 -4
- package/dist/es-dev/tailwind.css.js +1 -1
- package/icons/checkbox-indeterminate.svg +2 -2
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/status-error.svg +3 -0
- package/package.json +2 -1
- package/dist/cjs/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs/components/tab-group/index.cjs +0 -7
- package/dist/cjs/components/tab-group/index.d.ts +0 -1
- package/dist/cjs-dev/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs-dev/components/tab-group/index.cjs +0 -7
- package/dist/cjs-dev/components/tab-group/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/index.js +0 -4
- package/dist/es/components/tab-group/index.d.ts +0 -1
- package/dist/es/components/tab-group/index.js +0 -4
- package/dist/es-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/es-dev/components/panel-switcher/index.js +0 -4
- package/dist/es-dev/components/tab-group/index.d.ts +0 -1
- package/dist/es-dev/components/tab-group/index.js +0 -4
- package/icons/accordion-chevron-up.svg +0 -3
- package/icons/radio-checked.svg +0 -4
- package/icons/radio-unchecked.svg +0 -4
- package/icons/status-negative.svg +0 -11
- /package/dist/cjs/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.js +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
3
|
-
import {
|
|
2
|
+
import { css, unsafeCSS, LitElement, html, nothing } from "lit";
|
|
3
|
+
import { property, customElement } from "lit/decorators.js";
|
|
4
4
|
import tailwindStyles from "../../tailwind.css.js";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -12,125 +12,117 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
12
12
|
if (kind && result) __defProp(target, key, result);
|
|
13
13
|
return result;
|
|
14
14
|
};
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
15
|
+
const CHECKBOX_CLASS_NAME = cva([
|
|
16
|
+
"block",
|
|
17
|
+
"size-4",
|
|
18
|
+
"relative",
|
|
19
|
+
"bg-white",
|
|
20
|
+
"border-daikinNeutral-600",
|
|
21
|
+
"border-2",
|
|
22
|
+
"rounded-sm",
|
|
23
|
+
"appearance-none",
|
|
24
|
+
"before:text-white",
|
|
25
|
+
"before:absolute",
|
|
26
|
+
"before:m-auto",
|
|
27
|
+
"before:inset-0",
|
|
28
|
+
"checked:before:i-daikin-checkbox-checked",
|
|
29
|
+
"indeterminate:before:i-daikin-checkbox-indeterminate",
|
|
30
|
+
"indeterminate:before:size-2.5",
|
|
31
|
+
"focus-visible:outline",
|
|
32
|
+
"focus-visible:outline-1",
|
|
33
|
+
"focus-visible:outline-offset-1",
|
|
34
|
+
"focus-visible:outline-daikinBlue-700",
|
|
35
|
+
"enabled:group-hover:border-daikinNeutral-400",
|
|
36
|
+
"enabled:group-active:border-daikinNeutral-700",
|
|
37
|
+
"enabled:checked:border-daikinBlue-500",
|
|
38
|
+
"enabled:checked:bg-daikinBlue-500",
|
|
39
|
+
"enabled:checked:group-hover:bg-daikinBlue-300",
|
|
40
|
+
"enabled:checked:group-hover:border-daikinBlue-300",
|
|
41
|
+
"enabled:checked:group-hover:before:text-white",
|
|
42
|
+
"enabled:checked:group-active:bg-daikinBlue-600",
|
|
43
|
+
"enabled:checked:group-active:border-daikinBlue-600",
|
|
44
|
+
"enabled:checked:group-active:before:text-white",
|
|
45
|
+
"enabled:indeterminate:bg-daikinBlue-500",
|
|
46
|
+
"enabled:indeterminate:border-daikinBlue-500",
|
|
47
|
+
"enabled:indeterminate:group-hover:bg-daikinBlue-300",
|
|
48
|
+
"enabled:indeterminate:group-hover:border-daikinBlue-300",
|
|
49
|
+
"enabled:indeterminate:group-hover:before:text-white",
|
|
50
|
+
"enabled:indeterminate:group-active:bg-daikinBlue-600",
|
|
51
|
+
"enabled:indeterminate:group-active:border-daikinBlue-600",
|
|
52
|
+
"enabled:indeterminate:group-active:before:text-white",
|
|
53
|
+
"disabled:border-daikinNeutral-200",
|
|
54
|
+
"disabled:bg-white",
|
|
55
|
+
"disabled:checked:bg-daikinNeutral-200",
|
|
56
|
+
"disabled:indeterminate:bg-daikinNeutral-200"
|
|
57
|
+
])();
|
|
58
|
+
const cvaLabel = cva([], {
|
|
59
|
+
variants: {
|
|
60
|
+
disabled: {
|
|
61
|
+
false: [],
|
|
62
|
+
true: ["text-daikinNeutral-200"]
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
);
|
|
64
|
-
const cvaLabel = cva(
|
|
65
|
-
["leading-8", "not-italic", "font-normal", "align-middle"],
|
|
66
|
-
{
|
|
67
|
-
variants: {
|
|
68
|
-
size: {
|
|
69
|
-
small: ["text-sm"],
|
|
70
|
-
large: ["text-base"]
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
defaultVariants: {
|
|
74
|
-
size: "small"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
);
|
|
65
|
+
});
|
|
78
66
|
let DaikinCheckbox = class extends LitElement {
|
|
79
67
|
constructor() {
|
|
80
68
|
super(...arguments);
|
|
81
|
-
this.
|
|
69
|
+
this.name = "";
|
|
70
|
+
this.value = "";
|
|
82
71
|
this.label = "";
|
|
83
|
-
this.size = "small";
|
|
84
72
|
this.labelPosition = "right";
|
|
85
|
-
this.disabled = false;
|
|
86
|
-
this.readonly = false;
|
|
87
73
|
this.checkState = "unchecked";
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.error = false;
|
|
74
|
+
this.disabled = false;
|
|
75
|
+
this._internals = this.attachInternals();
|
|
91
76
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
77
|
+
get checked() {
|
|
78
|
+
return this.checkState === "checked";
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A property-only accessor for `checkState` provided for convenience.
|
|
82
|
+
* _Getter_: Returns `true` when `checkState` is `"checked"`, and `false` otherwise.
|
|
83
|
+
* _Setter_: If `true` is set, it updates `checkState` to `"checked"`, and if `false` is set, it updates `checkState` to `"unchecked"`.
|
|
84
|
+
*/
|
|
85
|
+
set checked(value) {
|
|
86
|
+
this.checkState = value ? "checked" : "unchecked";
|
|
96
87
|
}
|
|
97
88
|
_updateFormValue() {
|
|
98
89
|
this._internals.setFormValue(this.checked ? this.value : null);
|
|
99
90
|
}
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
_handleClick(event) {
|
|
92
|
+
if (this.disabled) {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
}
|
|
102
95
|
}
|
|
103
96
|
_handleChange(event) {
|
|
104
|
-
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
this.checkState = this._input.checked ? "checked" : "unchecked";
|
|
97
|
+
this.checkState = event.target.checked ? "checked" : "unchecked";
|
|
108
98
|
this._updateFormValue();
|
|
109
99
|
this.dispatchEvent(new Event("change", event));
|
|
110
100
|
}
|
|
111
101
|
render() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
102
|
+
return html`<label class="group flex gap-2 items-center font-daikinSerif">
|
|
103
|
+
<div class="p-2">
|
|
104
|
+
<input
|
|
105
|
+
class=${CHECKBOX_CLASS_NAME}
|
|
106
|
+
type="checkbox"
|
|
107
|
+
name=${this.name}
|
|
108
|
+
value=${this.value}
|
|
109
|
+
aria-label=${this.labelPosition === "hidden" ? this.label : nothing}
|
|
110
|
+
.indeterminate=${this.checkState === "indeterminate"}
|
|
111
|
+
.checked=${this.checked}
|
|
112
|
+
?disabled=${this.disabled}
|
|
113
|
+
@change=${this._handleChange}
|
|
114
|
+
@click=${this._handleClick}
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
<span
|
|
118
|
+
class=${cvaLabel({
|
|
119
|
+
disabled: this.disabled
|
|
120
|
+
})}
|
|
121
|
+
?hidden=${this.labelPosition === "hidden"}
|
|
122
|
+
>
|
|
123
|
+
${this.label}
|
|
124
|
+
</span>
|
|
125
|
+
</label>`;
|
|
134
126
|
}
|
|
135
127
|
updated(changedProperties) {
|
|
136
128
|
if (changedProperties.has("checkState")) {
|
|
@@ -142,40 +134,28 @@ DaikinCheckbox.styles = css`
|
|
|
142
134
|
${unsafeCSS(tailwindStyles)}
|
|
143
135
|
|
|
144
136
|
:host {
|
|
145
|
-
display: inline-
|
|
137
|
+
display: inline-flex;
|
|
146
138
|
}
|
|
147
139
|
`;
|
|
148
140
|
DaikinCheckbox.formAssociated = true;
|
|
149
141
|
__decorateClass([
|
|
150
|
-
|
|
151
|
-
], DaikinCheckbox.prototype, "
|
|
142
|
+
property({ type: String, reflect: true })
|
|
143
|
+
], DaikinCheckbox.prototype, "name", 2);
|
|
152
144
|
__decorateClass([
|
|
153
|
-
property({ type: String })
|
|
154
|
-
], DaikinCheckbox.prototype, "
|
|
145
|
+
property({ type: String, reflect: true })
|
|
146
|
+
], DaikinCheckbox.prototype, "value", 2);
|
|
155
147
|
__decorateClass([
|
|
156
148
|
property({ type: String })
|
|
157
|
-
], DaikinCheckbox.prototype, "
|
|
149
|
+
], DaikinCheckbox.prototype, "label", 2);
|
|
158
150
|
__decorateClass([
|
|
159
151
|
property({ type: String, attribute: "label-position" })
|
|
160
152
|
], DaikinCheckbox.prototype, "labelPosition", 2);
|
|
161
|
-
__decorateClass([
|
|
162
|
-
property({ type: Boolean, reflect: true })
|
|
163
|
-
], DaikinCheckbox.prototype, "disabled", 2);
|
|
164
|
-
__decorateClass([
|
|
165
|
-
property({ type: Boolean, reflect: true })
|
|
166
|
-
], DaikinCheckbox.prototype, "readonly", 2);
|
|
167
153
|
__decorateClass([
|
|
168
154
|
property({ type: String, reflect: true, attribute: "check-state" })
|
|
169
155
|
], DaikinCheckbox.prototype, "checkState", 2);
|
|
170
|
-
__decorateClass([
|
|
171
|
-
property({ type: String, reflect: true })
|
|
172
|
-
], DaikinCheckbox.prototype, "name", 2);
|
|
173
|
-
__decorateClass([
|
|
174
|
-
property({ type: String, reflect: true })
|
|
175
|
-
], DaikinCheckbox.prototype, "value", 2);
|
|
176
156
|
__decorateClass([
|
|
177
157
|
property({ type: Boolean, reflect: true })
|
|
178
|
-
], DaikinCheckbox.prototype, "
|
|
158
|
+
], DaikinCheckbox.prototype, "disabled", 2);
|
|
179
159
|
DaikinCheckbox = __decorateClass([
|
|
180
160
|
customElement("daikin-checkbox")
|
|
181
161
|
], DaikinCheckbox);
|
|
@@ -20,6 +20,10 @@ export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
*
|
|
23
|
+
* ```js
|
|
24
|
+
* import "@daikin-oss/design-system-web-components/components/icon/index.js";
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
23
27
|
* ```html
|
|
24
28
|
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
25
29
|
* ```
|
|
@@ -23,6 +23,26 @@ declare const _default: {
|
|
|
23
23
|
"warning": {
|
|
24
24
|
"class": "i-daikin-notification-status-warning",
|
|
25
25
|
"color": null
|
|
26
|
+
},
|
|
27
|
+
"error": {
|
|
28
|
+
"class": "i-daikin-status-error",
|
|
29
|
+
"color": "#ff4949"
|
|
30
|
+
},
|
|
31
|
+
"chevron-up": {
|
|
32
|
+
"class": "i-daikin-chevron-up",
|
|
33
|
+
"color": null
|
|
34
|
+
},
|
|
35
|
+
"chevron-down": {
|
|
36
|
+
"class": "i-daikin-chevron-down",
|
|
37
|
+
"color": null
|
|
38
|
+
},
|
|
39
|
+
"chevron-left": {
|
|
40
|
+
"class": "i-daikin-chevron-left",
|
|
41
|
+
"color": null
|
|
42
|
+
},
|
|
43
|
+
"chevron-right": {
|
|
44
|
+
"class": "i-daikin-chevron-right",
|
|
45
|
+
"color": null
|
|
26
46
|
}
|
|
27
47
|
}
|
|
28
48
|
}
|
|
@@ -22,6 +22,26 @@ const icons = {
|
|
|
22
22
|
warning: {
|
|
23
23
|
"class": "i-daikin-notification-status-warning",
|
|
24
24
|
color: null
|
|
25
|
+
},
|
|
26
|
+
error: {
|
|
27
|
+
"class": "i-daikin-status-error",
|
|
28
|
+
color: "#ff4949"
|
|
29
|
+
},
|
|
30
|
+
"chevron-up": {
|
|
31
|
+
"class": "i-daikin-chevron-up",
|
|
32
|
+
color: null
|
|
33
|
+
},
|
|
34
|
+
"chevron-down": {
|
|
35
|
+
"class": "i-daikin-chevron-down",
|
|
36
|
+
color: null
|
|
37
|
+
},
|
|
38
|
+
"chevron-left": {
|
|
39
|
+
"class": "i-daikin-chevron-left",
|
|
40
|
+
color: null
|
|
41
|
+
},
|
|
42
|
+
"chevron-right": {
|
|
43
|
+
"class": "i-daikin-chevron-right",
|
|
44
|
+
color: null
|
|
25
45
|
}
|
|
26
46
|
};
|
|
27
47
|
export {
|
|
@@ -6,12 +6,14 @@ export * from './button';
|
|
|
6
6
|
export * from './checkbox';
|
|
7
7
|
export * from './icon';
|
|
8
8
|
export * from './input-group';
|
|
9
|
+
export * from './list';
|
|
10
|
+
export * from './list-item';
|
|
9
11
|
export * from './notification';
|
|
10
|
-
export * from './panel-switcher';
|
|
11
12
|
export * from './progress-bar';
|
|
12
13
|
export * from './radio';
|
|
13
14
|
export * from './tab';
|
|
14
|
-
export * from './tab-
|
|
15
|
+
export * from './tab-panels';
|
|
16
|
+
export * from './tabs';
|
|
15
17
|
export * from './text-input';
|
|
16
18
|
export * from './textarea';
|
|
17
19
|
export * from './toggle';
|
|
@@ -6,12 +6,14 @@ import { DaikinButton } from "./button/daikin-button.js";
|
|
|
6
6
|
import { DaikinCheckbox } from "./checkbox/daikin-checkbox.js";
|
|
7
7
|
import { DaikinIcon, iconList } from "./icon/daikin-icon.js";
|
|
8
8
|
import { DaikinInputGroup } from "./input-group/daikin-input-group.js";
|
|
9
|
+
import { DaikinList } from "./list/daikin-list.js";
|
|
10
|
+
import { DaikinListItem } from "./list-item/daikin-list-item.js";
|
|
9
11
|
import { DaikinNotification } from "./notification/daikin-notification.js";
|
|
10
|
-
import { DaikinPanelSwitcher } from "./panel-switcher/daikin-panel-switcher.js";
|
|
11
12
|
import { DaikinProgressBar } from "./progress-bar/daikin-progress-bar.js";
|
|
12
13
|
import { DaikinRadio } from "./radio/daikin-radio.js";
|
|
13
14
|
import { DaikinTab } from "./tab/daikin-tab.js";
|
|
14
|
-
import {
|
|
15
|
+
import { DaikinTabPanels } from "./tab-panels/daikin-tab-panels.js";
|
|
16
|
+
import { DaikinTabs } from "./tabs/daikin-tabs.js";
|
|
15
17
|
import { DaikinTextInput } from "./text-input/daikin-text-input.js";
|
|
16
18
|
import { DaikinTextarea } from "./textarea/daikin-textarea.js";
|
|
17
19
|
import { DaikinToggle } from "./toggle/daikin-toggle.js";
|
|
@@ -25,12 +27,14 @@ export {
|
|
|
25
27
|
DaikinCheckbox,
|
|
26
28
|
DaikinIcon,
|
|
27
29
|
DaikinInputGroup,
|
|
30
|
+
DaikinList,
|
|
31
|
+
DaikinListItem,
|
|
28
32
|
DaikinNotification,
|
|
29
|
-
DaikinPanelSwitcher,
|
|
30
33
|
DaikinProgressBar,
|
|
31
34
|
DaikinRadio,
|
|
32
35
|
DaikinTab,
|
|
33
|
-
|
|
36
|
+
DaikinTabPanels,
|
|
37
|
+
DaikinTabs,
|
|
34
38
|
DaikinTextInput,
|
|
35
39
|
DaikinTextarea,
|
|
36
40
|
DaikinToggle,
|
|
@@ -15,6 +15,12 @@ type ControlElement = DaikinTextInput | DaikinTextarea;
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/input-group/index.js";
|
|
20
|
+
* import "@daikin-oss/design-system-web-components/components/text-input/index.js";
|
|
21
|
+
* import "@daikin-oss/design-system-web-components/components/textarea/index.js";
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
18
24
|
* With Text Input:
|
|
19
25
|
*
|
|
20
26
|
* ```html
|
|
@@ -68,7 +68,7 @@ let DaikinInputGroup = class extends LitElement {
|
|
|
68
68
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
69
69
|
${this.helper && !this.error ? html`<span class=${inputGroupHelperClassName}>${this.helper}</span>` : null}
|
|
70
70
|
${!this.disabled && !!this.error ? html`<span
|
|
71
|
-
class="flex gap-2 text-[--input-group-border-color-error] leading-[22px] before:i-daikin-status-
|
|
71
|
+
class="flex gap-2 text-[--input-group-border-color-error] leading-[22px] before:i-daikin-status-error before:block before:w-[16px] before:h-[22px]"
|
|
72
72
|
>${this.error}</span
|
|
73
73
|
>` : null}
|
|
74
74
|
</label>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The list component is used to list items using the list item component.
|
|
4
|
+
*
|
|
5
|
+
* Hierarchy:
|
|
6
|
+
* - `daikin-list` > `daikin-list-item`
|
|
7
|
+
*
|
|
8
|
+
* @slot - A slot for the list items. Place `daikin-list-item` elements here.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```html
|
|
13
|
+
* <daikin-list>
|
|
14
|
+
* <daikin-list-item>List item label 1</daikin-list-item>
|
|
15
|
+
* <daikin-list-item>List item label 2</daikin-list-item>
|
|
16
|
+
* <daikin-list-item>List item label 3</daikin-list-item>
|
|
17
|
+
* </daikin-list>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class DaikinList extends LitElement {
|
|
21
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
"daikin-list": DaikinList;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default DaikinList;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { customElement } from "lit/decorators.js";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
7
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
|
+
if (decorator = decorators[i])
|
|
9
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
let DaikinList = class extends LitElement {
|
|
14
|
+
render() {
|
|
15
|
+
return html`<div role="list">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
DaikinList = __decorateClass([
|
|
21
|
+
customElement("daikin-list")
|
|
22
|
+
], DaikinList);
|
|
23
|
+
export {
|
|
24
|
+
DaikinList
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-list';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The list item component is used to represent a single item in a list. Please use it within the `daikin-list` component.
|
|
4
|
+
*
|
|
5
|
+
* The following types are available:
|
|
6
|
+
*
|
|
7
|
+
* - `button`: Uses `<button>` tag.
|
|
8
|
+
* - `link`: Uses `<a>` tag.
|
|
9
|
+
* - `text`: Uses `<span>` tag.
|
|
10
|
+
*
|
|
11
|
+
* Hierarchy:
|
|
12
|
+
* - `daikin-list` > `daikin-list-item`
|
|
13
|
+
*
|
|
14
|
+
* @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event). Suppressed if `disabled` is true.
|
|
15
|
+
*
|
|
16
|
+
* @slot - A slot for the list item label content.
|
|
17
|
+
* @slot action - An optional slot for an interaction item to be placed to the right of the text. Place `daikin-checkbox`, `daikin-toggle`, or something similar.
|
|
18
|
+
* @slot left-icon - An optional slot for an icon to be placed to the left of the text. Place `daikin-icon` or something similar.
|
|
19
|
+
* @slot right-icon - An optional slot for an icon to be placed to the left of the text. Ignored if `action` slot is used. Place `daikin-icon` or something similar.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <daikin-list-item>List item label</daikin-list-item>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class DaikinListItem extends LitElement {
|
|
28
|
+
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
/**
|
|
30
|
+
* Type of the list item.
|
|
31
|
+
* - `button` (default): The list item will be rendered as a `<button>` element.
|
|
32
|
+
* - `link`: The list item will be rendered as an `<a>` element.
|
|
33
|
+
* - `text`: The list item will be rendered as a `<span>` element. Use this if the list itself has no action.
|
|
34
|
+
*/
|
|
35
|
+
type: "button" | "link" | "text";
|
|
36
|
+
/**
|
|
37
|
+
* Link `href`.
|
|
38
|
+
* Only used if the `type` is `"link"`.
|
|
39
|
+
* If omitted with `type="link"`, the link will be treated as [a placeholder link](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:~:text=If%20the%20a%20element%20has%20no%20href%20attribute) and rendered as disabled state.
|
|
40
|
+
*/
|
|
41
|
+
href: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the list item is disabled.
|
|
44
|
+
* Ignored if the `type` is `"text"`.
|
|
45
|
+
*/
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
private _focusableElement;
|
|
48
|
+
private get _disabled();
|
|
49
|
+
private _handleClickAction;
|
|
50
|
+
constructor();
|
|
51
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
52
|
+
/**
|
|
53
|
+
* Focuses on the inner button or link.
|
|
54
|
+
* It will have no effect if the `type` is "text" or `disabled` is `true`.
|
|
55
|
+
* @param options focus options
|
|
56
|
+
*/
|
|
57
|
+
focus(options?: FocusOptions): void;
|
|
58
|
+
}
|
|
59
|
+
declare global {
|
|
60
|
+
interface HTMLElementTagNameMap {
|
|
61
|
+
"daikin-list-item": DaikinListItem;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export default DaikinListItem;
|