@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,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
2
|
+
import { css, unsafeCSS, LitElement, html, nothing } from "lit";
|
|
3
3
|
import { property, customElement } from "lit/decorators.js";
|
|
4
4
|
import tailwindStyles from "../../tailwind.css.js";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -12,100 +12,90 @@ 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
|
-
|
|
15
|
+
const RADIO_CLASS_NAME = cva([
|
|
16
|
+
"flex",
|
|
17
|
+
"justify-center",
|
|
18
|
+
"items-center",
|
|
19
|
+
"size-4",
|
|
20
|
+
"bg-white",
|
|
21
|
+
"rounded-full",
|
|
22
|
+
"relative",
|
|
23
|
+
"appearance-none",
|
|
24
|
+
"focus-visible:outline",
|
|
25
|
+
"focus-visible:outline-1",
|
|
26
|
+
"focus-visible:outline-offset-1",
|
|
27
|
+
"focus-visible:outline-daikinBlue-700",
|
|
28
|
+
"unchecked:border-2",
|
|
29
|
+
"enabled:unchecked:border-daikinNeutral-600",
|
|
30
|
+
"enabled:unchecked:hover:border-daikinNeutral-400",
|
|
31
|
+
"enabled:unchecked:active:border-daikinNeutral-700",
|
|
32
|
+
"checked:border-[5px]",
|
|
33
|
+
"enabled:checked:border-daikinBlue-500",
|
|
34
|
+
"enabled:checked:group-hover:border-daikinBlue-300",
|
|
35
|
+
"enabled:checked:group-active:border-daikinBlue-600",
|
|
36
|
+
"disabled:border-daikinNeutral-200"
|
|
37
|
+
])();
|
|
38
|
+
const cvaLabel = cva([], {
|
|
39
|
+
variants: {
|
|
40
|
+
disabled: {
|
|
41
|
+
false: [],
|
|
42
|
+
true: ["text-daikinNeutral-200"]
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
|
-
);
|
|
43
|
-
const cvaLabel = cva(
|
|
44
|
-
["leading-8", "not-italic", "font-normal", "align-middle"],
|
|
45
|
-
{
|
|
46
|
-
variants: {
|
|
47
|
-
size: {
|
|
48
|
-
small: ["text-sm"],
|
|
49
|
-
large: ["text-base"]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
);
|
|
45
|
+
});
|
|
54
46
|
let DaikinRadio = class extends LitElement {
|
|
55
47
|
constructor() {
|
|
56
48
|
super(...arguments);
|
|
57
|
-
this.
|
|
49
|
+
this.name = "";
|
|
50
|
+
this.value = "";
|
|
58
51
|
this.label = "";
|
|
59
|
-
this.size = "small";
|
|
60
52
|
this.labelPosition = "right";
|
|
61
|
-
this.disabled = false;
|
|
62
|
-
this.readonly = false;
|
|
63
53
|
this.checked = false;
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.error = false;
|
|
67
|
-
}
|
|
68
|
-
_handleClick(event) {
|
|
69
|
-
if (this.readonly || this.disabled) {
|
|
70
|
-
event.preventDefault();
|
|
71
|
-
}
|
|
54
|
+
this.disabled = false;
|
|
55
|
+
this._internals = this.attachInternals();
|
|
72
56
|
}
|
|
73
57
|
_updateFormValue() {
|
|
74
58
|
this._internals.setFormValue(this.checked ? this.value : null);
|
|
75
59
|
}
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
|
|
60
|
+
_handleClick(event) {
|
|
61
|
+
if (this.disabled) {
|
|
62
|
+
event.preventDefault();
|
|
79
63
|
}
|
|
80
64
|
}
|
|
81
65
|
_handleChange(event) {
|
|
82
|
-
|
|
83
|
-
const input = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("input");
|
|
84
|
-
this.checked = input.checked;
|
|
66
|
+
this.checked = event.target.checked;
|
|
85
67
|
this._updateFormValue();
|
|
86
|
-
|
|
87
|
-
this.dispatchEvent(newEvent);
|
|
68
|
+
this.dispatchEvent(new Event("change", event));
|
|
88
69
|
}
|
|
89
70
|
render() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
71
|
+
return html`<label class="group flex gap-2 items-center font-daikinSerif">
|
|
72
|
+
<div class="p-2">
|
|
73
|
+
<input
|
|
74
|
+
class=${RADIO_CLASS_NAME}
|
|
75
|
+
type="radio"
|
|
76
|
+
name=${this.name}
|
|
77
|
+
value=${this.value}
|
|
78
|
+
aria-label=${this.labelPosition === "hidden" ? this.label : nothing}
|
|
79
|
+
?disabled=${this.disabled}
|
|
80
|
+
.checked=${this.checked}
|
|
81
|
+
@click=${this._handleClick}
|
|
82
|
+
@change=${this._handleChange}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
<span
|
|
86
|
+
class=${cvaLabel({
|
|
87
|
+
disabled: this.disabled
|
|
88
|
+
})}
|
|
89
|
+
?hidden=${this.labelPosition === "hidden"}
|
|
90
|
+
>
|
|
91
|
+
${this.label}
|
|
92
|
+
</span>
|
|
93
|
+
</label>`;
|
|
94
|
+
}
|
|
95
|
+
updated(changedProperties) {
|
|
96
|
+
if (changedProperties.has("checked")) {
|
|
97
|
+
this._updateFormValue();
|
|
98
|
+
}
|
|
109
99
|
}
|
|
110
100
|
};
|
|
111
101
|
DaikinRadio.styles = css`
|
|
@@ -117,32 +107,23 @@ DaikinRadio.styles = css`
|
|
|
117
107
|
`;
|
|
118
108
|
DaikinRadio.formAssociated = true;
|
|
119
109
|
__decorateClass([
|
|
120
|
-
property({ type: String })
|
|
121
|
-
], DaikinRadio.prototype, "
|
|
110
|
+
property({ type: String, reflect: true })
|
|
111
|
+
], DaikinRadio.prototype, "name", 2);
|
|
112
|
+
__decorateClass([
|
|
113
|
+
property({ type: String, reflect: true })
|
|
114
|
+
], DaikinRadio.prototype, "value", 2);
|
|
122
115
|
__decorateClass([
|
|
123
116
|
property({ type: String })
|
|
124
|
-
], DaikinRadio.prototype, "
|
|
117
|
+
], DaikinRadio.prototype, "label", 2);
|
|
125
118
|
__decorateClass([
|
|
126
119
|
property({ type: String, attribute: "label-position" })
|
|
127
120
|
], DaikinRadio.prototype, "labelPosition", 2);
|
|
128
|
-
__decorateClass([
|
|
129
|
-
property({ type: Boolean, reflect: true })
|
|
130
|
-
], DaikinRadio.prototype, "disabled", 2);
|
|
131
|
-
__decorateClass([
|
|
132
|
-
property({ type: Boolean, reflect: true })
|
|
133
|
-
], DaikinRadio.prototype, "readonly", 2);
|
|
134
121
|
__decorateClass([
|
|
135
122
|
property({ type: Boolean, reflect: true })
|
|
136
123
|
], DaikinRadio.prototype, "checked", 2);
|
|
137
|
-
__decorateClass([
|
|
138
|
-
property({ type: String, reflect: true })
|
|
139
|
-
], DaikinRadio.prototype, "name", 2);
|
|
140
|
-
__decorateClass([
|
|
141
|
-
property({ type: String, reflect: true })
|
|
142
|
-
], DaikinRadio.prototype, "value", 2);
|
|
143
124
|
__decorateClass([
|
|
144
125
|
property({ type: Boolean, reflect: true })
|
|
145
|
-
], DaikinRadio.prototype, "
|
|
126
|
+
], DaikinRadio.prototype, "disabled", 2);
|
|
146
127
|
DaikinRadio = __decorateClass([
|
|
147
128
|
customElement("daikin-radio")
|
|
148
129
|
], DaikinRadio);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
|
-
* The tab component is a child element within the `daikin-
|
|
3
|
+
* The tab component is a child element within the `daikin-tabs` component, representing a clickable button or label that users interact with to switch between different panels of content.
|
|
4
4
|
* Each tab corresponds to a specific panel and is typically labeled to indicate the content it reveals.
|
|
5
5
|
*
|
|
6
6
|
* Hierarchy:
|
|
7
|
-
* - `daikin-
|
|
7
|
+
* - `daikin-tabs` > `daikin-tab`
|
|
8
8
|
*
|
|
9
9
|
* @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) emitted from the inner `<button>` element. Suppressed if `disabled` is true,
|
|
10
10
|
*
|
|
@@ -12,8 +12,12 @@ import { LitElement } from 'lit';
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
*
|
|
15
|
+
* ```js
|
|
16
|
+
* import "@daikin-oss/design-system-web-components/components/tab/index.js";
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
15
19
|
* ```html
|
|
16
|
-
* <!-- See `daikin-
|
|
20
|
+
* <!-- See `daikin-tabs` component for complete example. -->
|
|
17
21
|
* <daikin-tab value="foo">Foo tab</daikin-tab>
|
|
18
22
|
* ```
|
|
19
23
|
*/
|
|
@@ -21,30 +25,26 @@ export declare class DaikinTab extends LitElement {
|
|
|
21
25
|
static readonly styles: import('lit').CSSResult;
|
|
22
26
|
/**
|
|
23
27
|
* A unique string that identifies a tab.
|
|
24
|
-
* Must be unique within the `daikin-
|
|
28
|
+
* Must be unique within the `daikin-tabs` component.
|
|
25
29
|
*/
|
|
26
30
|
value: string;
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
size: "default" | "condensed";
|
|
31
|
-
/**
|
|
32
|
-
* Whether to show the disabled state.
|
|
32
|
+
* Whether the tab is disabled.
|
|
33
33
|
*/
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Whether to show the active (selected) state.
|
|
37
37
|
* Ignored if `disabled` is `true`.
|
|
38
|
-
* Set automatically by `daikin-
|
|
38
|
+
* Set automatically by `daikin-tabs` component.
|
|
39
39
|
*/
|
|
40
40
|
active: boolean;
|
|
41
|
-
private
|
|
41
|
+
private _button;
|
|
42
42
|
constructor();
|
|
43
43
|
/**
|
|
44
44
|
* Focuses on the inner button.
|
|
45
45
|
* @param options focus options
|
|
46
46
|
*/
|
|
47
|
-
focus(options?: FocusOptions
|
|
47
|
+
focus(options?: FocusOptions): void;
|
|
48
48
|
render(): import('lit-html').TemplateResult<1>;
|
|
49
49
|
}
|
|
50
50
|
declare global {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
3
|
-
import { property, customElement } from "lit/decorators.js";
|
|
3
|
+
import { property, query, 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;
|
|
@@ -19,38 +19,44 @@ const cvaTab = cva(
|
|
|
19
19
|
"h-full",
|
|
20
20
|
"items-center",
|
|
21
21
|
"justify-center",
|
|
22
|
+
"px-4",
|
|
23
|
+
"pt-2",
|
|
24
|
+
"pb-3",
|
|
25
|
+
"text-base",
|
|
26
|
+
"font-bold",
|
|
22
27
|
"text-center",
|
|
23
|
-
"relative",
|
|
24
28
|
"font-daikinSerif",
|
|
25
|
-
"
|
|
29
|
+
"relative",
|
|
26
30
|
"tracking-wide",
|
|
27
31
|
"whitespace-nowrap",
|
|
28
32
|
"contain-paint",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"text-daikinBlue-500",
|
|
38
|
-
"hover:text-daikinBlue-400",
|
|
39
|
-
"active:text-daikinBlue-600",
|
|
40
|
-
"focus-visible:text-daikinBlue-700",
|
|
41
|
-
"disabled:text-daikinNeutral-300",
|
|
42
|
-
"aria-selected:after:h-1",
|
|
43
|
-
"aria-selected:after:bg-daikinBlue-500",
|
|
44
|
-
"hover:aria-selected:after:bg-daikinBlue-400",
|
|
45
|
-
"active:aria-selected:after:bg-daikinBlue-600",
|
|
46
|
-
"focus-visible:aria-selected:after:bg-daikinBlue-700",
|
|
47
|
-
"disabled:after:bg-daikinNeutral-300"
|
|
33
|
+
"focus-visible:outline-none",
|
|
34
|
+
"focus-visible:before:w-full",
|
|
35
|
+
"focus-visible:before:h-[calc(100%_-_4px)]",
|
|
36
|
+
"focus-visible:before:border",
|
|
37
|
+
"focus-visible:before:border-daikinBlue-700",
|
|
38
|
+
"focus-visible:before:absolute",
|
|
39
|
+
"focus-visible:before:top-0",
|
|
40
|
+
"disabled:text-daikinNeutral-200"
|
|
48
41
|
],
|
|
49
42
|
{
|
|
50
43
|
variants: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
active: {
|
|
45
|
+
false: [
|
|
46
|
+
"hover:text-daikinNeutral-500",
|
|
47
|
+
"active:text-daikinNeutral-700"
|
|
48
|
+
],
|
|
49
|
+
true: [
|
|
50
|
+
"text-daikinBlue-500",
|
|
51
|
+
"hover:text-daikinBlue-300",
|
|
52
|
+
"active:text-daikinBlue-600",
|
|
53
|
+
"after:w-full",
|
|
54
|
+
"after:h-1",
|
|
55
|
+
"after:absolute",
|
|
56
|
+
"after:bottom-0",
|
|
57
|
+
"enabled:after:bg-daikinBlue-500",
|
|
58
|
+
"disabled:after:bg-daikinNeutral-200"
|
|
59
|
+
]
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
@@ -59,31 +65,26 @@ let DaikinTab = class extends LitElement {
|
|
|
59
65
|
constructor() {
|
|
60
66
|
super();
|
|
61
67
|
this.value = "";
|
|
62
|
-
this.size = "default";
|
|
63
68
|
this.disabled = false;
|
|
64
69
|
this.active = false;
|
|
65
|
-
this.addEventListener("click",
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
70
|
+
this.addEventListener("click", (event) => {
|
|
71
|
+
if (this.disabled) {
|
|
72
|
+
event.stopImmediatePropagation();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* Focuses on the inner button.
|
|
74
78
|
* @param options focus options
|
|
75
79
|
*/
|
|
76
80
|
focus(options) {
|
|
77
|
-
var _a
|
|
78
|
-
(
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = this._button) == null ? void 0 : _a.focus(options);
|
|
79
83
|
}
|
|
80
84
|
render() {
|
|
81
|
-
const cn = cvaTab({
|
|
82
|
-
size: this.size
|
|
83
|
-
});
|
|
84
85
|
return html`
|
|
85
86
|
<button
|
|
86
|
-
class=${
|
|
87
|
+
class=${cvaTab({ active: this.active })}
|
|
87
88
|
?disabled=${this.disabled}
|
|
88
89
|
role="tab"
|
|
89
90
|
aria-selected=${!this.disabled && this.active}
|
|
@@ -99,26 +100,20 @@ DaikinTab.styles = css`
|
|
|
99
100
|
|
|
100
101
|
:host {
|
|
101
102
|
display: inline-block;
|
|
102
|
-
width: fit-content;
|
|
103
|
-
height: 48px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:host([size="condensed"]) {
|
|
107
|
-
height: 40px;
|
|
108
103
|
}
|
|
109
104
|
`;
|
|
110
105
|
__decorateClass([
|
|
111
106
|
property({ type: String, reflect: true })
|
|
112
107
|
], DaikinTab.prototype, "value", 2);
|
|
113
|
-
__decorateClass([
|
|
114
|
-
property({ type: String, reflect: true })
|
|
115
|
-
], DaikinTab.prototype, "size", 2);
|
|
116
108
|
__decorateClass([
|
|
117
109
|
property({ type: Boolean, reflect: true })
|
|
118
110
|
], DaikinTab.prototype, "disabled", 2);
|
|
119
111
|
__decorateClass([
|
|
120
112
|
property({ type: Boolean, reflect: true })
|
|
121
113
|
], DaikinTab.prototype, "active", 2);
|
|
114
|
+
__decorateClass([
|
|
115
|
+
query("button")
|
|
116
|
+
], DaikinTab.prototype, "_button", 2);
|
|
122
117
|
DaikinTab = __decorateClass([
|
|
123
118
|
customElement("daikin-tab")
|
|
124
119
|
], DaikinTab);
|
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { ARIARole } from '../../lit-analyzer-types';
|
|
3
3
|
/**
|
|
4
|
-
* The panel switcher component is a child element within the `daikin-
|
|
4
|
+
* The panel switcher component is a child element within the `daikin-tabs` that controls the display of the content panels associated with each tab.
|
|
5
5
|
* When a user selects a tab, the panel switcher component ensures the corresponding content panel is shown while hiding the others.
|
|
6
6
|
*
|
|
7
7
|
* Hierarchy:
|
|
8
|
-
* - `daikin-
|
|
8
|
+
* - `daikin-tabs` > `daikin-tab-panels` ("panels" slot)
|
|
9
9
|
*
|
|
10
10
|
* @slot panel:\<name\> - A slot for each panel content.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
*
|
|
14
|
+
* ```js
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/panel-switcher/index.js";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
14
18
|
* ```html
|
|
15
19
|
* <!-- Note that `panels` must be set via property. -->
|
|
16
|
-
* <daikin-
|
|
20
|
+
* <daikin-tab-panels
|
|
17
21
|
* class="block w-full h-full"
|
|
18
|
-
*
|
|
22
|
+
* panel-role="tabpanel"
|
|
19
23
|
* value="foo"
|
|
20
|
-
*
|
|
24
|
+
* .panels="${['foo', 'bar', 'baz']}"
|
|
21
25
|
* >
|
|
22
26
|
* <div slot="panel:foo">Foo Panel (visible)</div>
|
|
23
27
|
* <div slot="panel:bar">Bar Panel (hidden)</div>
|
|
24
28
|
* <div slot="panel:baz">Baz Panel (hidden)</div>
|
|
25
|
-
* </daikin-
|
|
29
|
+
* </daikin-tab-panels>
|
|
26
30
|
* ```
|
|
27
31
|
*/
|
|
28
|
-
export declare class
|
|
32
|
+
export declare class DaikinTabPanels extends LitElement {
|
|
29
33
|
static readonly styles: import('lit').CSSResult;
|
|
30
34
|
/**
|
|
31
35
|
* The panel to be displayed.
|
|
32
|
-
* Set automatically by `daikin-
|
|
36
|
+
* Set automatically by `daikin-tabs` if used within it.
|
|
33
37
|
*/
|
|
34
38
|
value: string;
|
|
35
39
|
/**
|
|
36
|
-
*
|
|
40
|
+
* A list of panel names.
|
|
41
|
+
* This is used as the slot name for panels (`panel:<name>`).
|
|
42
|
+
* Set automatically by `daikin-tabs` if used within it.
|
|
37
43
|
*/
|
|
38
44
|
panels: string[];
|
|
39
45
|
/**
|
|
40
46
|
* `role` attribute of the container.
|
|
41
|
-
* Set to "tablist" automatically by `daikin-
|
|
47
|
+
* Set to "tablist" automatically by `daikin-tabs` if used within it.
|
|
42
48
|
*/
|
|
43
49
|
panelRole: ARIARole | null;
|
|
44
50
|
render(): unknown;
|
|
45
51
|
}
|
|
46
52
|
declare global {
|
|
47
53
|
interface HTMLElementTagNameMap {
|
|
48
|
-
"daikin-
|
|
54
|
+
"daikin-tab-panels": DaikinTabPanels;
|
|
49
55
|
}
|
|
50
56
|
}
|
|
@@ -12,7 +12,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
12
12
|
if (kind && result) __defProp(target, key, result);
|
|
13
13
|
return result;
|
|
14
14
|
};
|
|
15
|
-
let
|
|
15
|
+
let DaikinTabPanels = class extends LitElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.value = "";
|
|
@@ -33,24 +33,24 @@ let DaikinPanelSwitcher = class extends LitElement {
|
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
DaikinTabPanels.styles = css`
|
|
37
37
|
${unsafeCSS(tailwindStyles)}
|
|
38
38
|
`;
|
|
39
39
|
__decorateClass([
|
|
40
40
|
property({ type: String, reflect: true })
|
|
41
|
-
],
|
|
41
|
+
], DaikinTabPanels.prototype, "value", 2);
|
|
42
42
|
__decorateClass([
|
|
43
43
|
property({
|
|
44
44
|
type: Array,
|
|
45
45
|
hasChanged: (newValue, oldValue) => JSON.stringify(newValue) !== JSON.stringify(oldValue)
|
|
46
46
|
})
|
|
47
|
-
],
|
|
47
|
+
], DaikinTabPanels.prototype, "panels", 2);
|
|
48
48
|
__decorateClass([
|
|
49
49
|
property({ type: String, reflect: true, attribute: "panel-role" })
|
|
50
|
-
],
|
|
51
|
-
|
|
52
|
-
customElement("daikin-
|
|
53
|
-
],
|
|
50
|
+
], DaikinTabPanels.prototype, "panelRole", 2);
|
|
51
|
+
DaikinTabPanels = __decorateClass([
|
|
52
|
+
customElement("daikin-tab-panels")
|
|
53
|
+
], DaikinTabPanels);
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
DaikinTabPanels
|
|
56
56
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-tab-panels';
|
|
@@ -9,34 +9,40 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
9
9
|
* > Otherwise, unexpected behavior may be encountered.
|
|
10
10
|
*
|
|
11
11
|
* Hierarchies:
|
|
12
|
-
* - `daikin-
|
|
13
|
-
* - `daikin-
|
|
12
|
+
* - `daikin-tabs` > `daikin-tab`
|
|
13
|
+
* - `daikin-tabs` > `daikin-tab-panels` ("panels" slot)
|
|
14
14
|
*
|
|
15
|
-
* @fires beforechange - _Cancellable._ A custom event emitted when the current tab is about to be changed by user interaction.
|
|
16
|
-
* @fires change - A custom event emitted when the current tab is changed.
|
|
15
|
+
* @fires beforechange - _Cancellable._ A custom event emitted when the current tab is about to be changed by user interaction. The current value can be obtained with `event.target.value` and the new value with `event.detail.newTab.value`.
|
|
16
|
+
* @fires change - A custom event emitted when the current tab is changed. The new value can be obtained with `event.target.value`.
|
|
17
17
|
*
|
|
18
18
|
* @slot - A slot for tab buttons. Place `daikin-tab` elements here.
|
|
19
|
-
* @slot panels - A slot for
|
|
19
|
+
* @slot panels - A slot for tab panels component. Place a `daikin-tab-panels` element here.
|
|
20
20
|
*
|
|
21
21
|
* @csspart tablist - The container element for the default (tab list) slot. Has "tablist" role.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
*
|
|
25
|
+
* ```js
|
|
26
|
+
* import "@daikin-oss/design-system-web-components/components/tab/index.js";
|
|
27
|
+
* import "@daikin-oss/design-system-web-components/components/tab-group/index.js";
|
|
28
|
+
* import "@daikin-oss/design-system-web-components/components/panel-switcher/index.js";
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
25
31
|
* ```html
|
|
26
32
|
* <!-- See storybook for styling tab group. You'll need `::part(tablist)` to style the tab container. -->
|
|
27
|
-
* <daikin-
|
|
33
|
+
* <daikin-tabs value="foo">
|
|
28
34
|
* <daikin-tab value="foo">Foo tab</daikin-tab>
|
|
29
35
|
* <daikin-tab value="bar">Bar tab</daikin-tab>
|
|
30
|
-
* <!-- At least one "daikin-
|
|
31
|
-
* <daikin-
|
|
36
|
+
* <!-- At least one "daikin-tab-panels" is needed to switch the content. -->
|
|
37
|
+
* <daikin-tab-panels slot="panels">
|
|
32
38
|
* <!-- Mind the "panel:" prefix. -->
|
|
33
39
|
* <p slot="panel:foo">Foo tab content.</p>
|
|
34
40
|
* <p slot="panel:bar">Bar tab content.</p>
|
|
35
|
-
* </daikin-
|
|
36
|
-
* </daikin-
|
|
41
|
+
* </daikin-tab-panels>
|
|
42
|
+
* </daikin-tabs>
|
|
37
43
|
* ```
|
|
38
44
|
*/
|
|
39
|
-
export declare class
|
|
45
|
+
export declare class DaikinTabs extends LitElement {
|
|
40
46
|
static readonly styles: import('lit').CSSResult;
|
|
41
47
|
/**
|
|
42
48
|
* `value` of the currently selected tab (`daikin-tab`).
|
|
@@ -45,26 +51,26 @@ export declare class DaikinTabGroup extends LitElement {
|
|
|
45
51
|
/**
|
|
46
52
|
* Tab(s) in the default slot.
|
|
47
53
|
*/
|
|
48
|
-
private _tabs;
|
|
54
|
+
private readonly _tabs;
|
|
49
55
|
/**
|
|
50
56
|
* Panel switcher(s) in the `panels` slot.
|
|
51
57
|
*/
|
|
52
|
-
private _panelSwitchers;
|
|
58
|
+
private readonly _panelSwitchers;
|
|
53
59
|
/**
|
|
54
60
|
* Emits `beforechange` event if necessary and returns whether we should proceed.
|
|
55
61
|
*
|
|
56
|
-
* 1. Check if `
|
|
62
|
+
* 1. Check if `newTab.value` is different from `value`.
|
|
57
63
|
* 2. Emit "beforechange" event.
|
|
58
|
-
* 3. Check
|
|
64
|
+
* 3. Check and return whether the event is canceled.
|
|
59
65
|
*
|
|
60
|
-
* @param
|
|
66
|
+
* @param newTab The newly active tab element.
|
|
61
67
|
* @returns `true` if we should proceed (event is emitted and not canceled). `false` otherwise.
|
|
62
68
|
*/
|
|
63
69
|
private _emitBeforeChange;
|
|
64
70
|
/**
|
|
65
71
|
* Updates `this.value` and emit "change" event.
|
|
66
72
|
*
|
|
67
|
-
* @param
|
|
73
|
+
* @param newTab The newly active tab element.
|
|
68
74
|
*/
|
|
69
75
|
private _updateValue;
|
|
70
76
|
/**
|
|
@@ -76,14 +82,14 @@ export declare class DaikinTabGroup extends LitElement {
|
|
|
76
82
|
*/
|
|
77
83
|
private _updateTabs;
|
|
78
84
|
/**
|
|
79
|
-
* Updates `daikin-
|
|
85
|
+
* Updates `daikin-tab-panels` component(s)' properties in the slot.
|
|
80
86
|
*
|
|
81
87
|
* Invoke when:
|
|
82
88
|
* - `this.value` is changed.
|
|
83
89
|
* - the default slot's content is changed.
|
|
84
90
|
* - the panel slot's content is changed.
|
|
85
91
|
*/
|
|
86
|
-
private
|
|
92
|
+
private _updateTabPanels;
|
|
87
93
|
/**
|
|
88
94
|
* Handles "click" event emitted by `daikin-tab` component.
|
|
89
95
|
*/
|
|
@@ -93,12 +99,12 @@ export declare class DaikinTabGroup extends LitElement {
|
|
|
93
99
|
*/
|
|
94
100
|
private _handleKeyDown;
|
|
95
101
|
private _handleSlotChange;
|
|
96
|
-
private
|
|
102
|
+
private _handleTabPanelsSlotChange;
|
|
97
103
|
render(): import('lit-html').TemplateResult<1>;
|
|
98
104
|
updated(changedProperties: PropertyValues<this>): void;
|
|
99
105
|
}
|
|
100
106
|
declare global {
|
|
101
107
|
interface HTMLElementTagNameMap {
|
|
102
|
-
"daikin-
|
|
108
|
+
"daikin-tabs": DaikinTabs;
|
|
103
109
|
}
|
|
104
110
|
}
|