@daikin-oss/design-system-web-components 0.2.0 → 0.3.1
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/README.md +47 -7
- package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +40 -0
- package/dist/cjs/components/accordion/index.cjs +7 -0
- package/dist/cjs/components/accordion/index.d.ts +1 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +177 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +56 -0
- package/dist/cjs/components/accordion-item/index.cjs +7 -0
- package/dist/cjs/components/accordion-item/index.d.ts +1 -0
- package/dist/cjs/components/button/daikin-button.cjs +25 -7
- package/dist/cjs/components/button/daikin-button.d.ts +21 -3
- package/dist/cjs/components/button/index.cjs +7 -0
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +11 -1
- package/dist/cjs/components/checkbox/index.cjs +7 -0
- package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
- package/dist/cjs/components/icon/daikin-icon.d.ts +49 -0
- package/dist/cjs/components/icon/icons.json.cjs +29 -0
- package/dist/cjs/components/icon/icons.json.d.ts +31 -0
- package/dist/cjs/components/icon/index.cjs +8 -0
- package/dist/cjs/components/icon/index.d.ts +1 -0
- package/dist/cjs/components/index.cjs +73 -0
- package/dist/cjs/components/index.d.ts +7 -0
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +27 -1
- package/dist/cjs/components/input-group/index.cjs +7 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +15 -33
- package/dist/cjs/components/notification/daikin-notification.d.ts +21 -7
- package/dist/cjs/components/notification/index.cjs +7 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
- package/dist/cjs/components/panel-switcher/index.cjs +7 -0
- package/dist/cjs/components/panel-switcher/index.d.ts +1 -0
- package/dist/cjs/components/radio/daikin-radio.d.ts +11 -1
- package/dist/cjs/components/radio/index.cjs +7 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
- package/dist/cjs/components/tab/daikin-tab.d.ts +55 -0
- package/dist/cjs/components/tab/index.cjs +7 -0
- package/dist/cjs/components/tab/index.d.ts +1 -0
- package/dist/cjs/components/tab-group/daikin-tab-group.cjs +211 -0
- package/dist/cjs/components/tab-group/daikin-tab-group.d.ts +105 -0
- package/dist/cjs/components/tab-group/index.cjs +7 -0
- package/dist/cjs/components/tab-group/index.d.ts +1 -0
- package/dist/cjs/components/tab-group/scroller.cjs +65 -0
- package/dist/cjs/components/tab-group/scroller.d.ts +25 -0
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +16 -1
- package/dist/cjs/components/text-input/index.cjs +7 -0
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +16 -1
- package/dist/cjs/components/textarea/index.cjs +7 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +61 -0
- package/dist/cjs/components/toggle/index.cjs +7 -0
- package/dist/cjs/components/toggle/index.d.ts +1 -0
- package/dist/cjs/index.cjs +36 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/colors.cjs +80 -0
- package/dist/cjs-dev/colors.d.ts +69 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +40 -0
- package/dist/cjs-dev/components/accordion/index.cjs +7 -0
- package/dist/cjs-dev/components/accordion/index.d.ts +1 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +177 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
- package/dist/cjs-dev/components/accordion-item/index.cjs +7 -0
- package/dist/cjs-dev/components/accordion-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/button/daikin-button.cjs +215 -0
- package/dist/cjs-dev/components/button/daikin-button.d.ts +77 -0
- package/dist/cjs-dev/components/button/index.cjs +7 -0
- package/dist/cjs-dev/components/button/index.d.ts +1 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +183 -0
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
- package/dist/cjs-dev/components/checkbox/index.cjs +7 -0
- package/dist/cjs-dev/components/checkbox/index.d.ts +1 -0
- package/dist/cjs-dev/components/icon/daikin-icon.cjs +96 -0
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +49 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +29 -0
- package/dist/cjs-dev/components/icon/icons.json.d.ts +31 -0
- package/dist/cjs-dev/components/icon/index.cjs +8 -0
- package/dist/cjs-dev/components/icon/index.d.ts +1 -0
- package/dist/cjs-dev/components/index.cjs +73 -0
- package/dist/cjs-dev/components/index.d.ts +14 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +119 -0
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +73 -0
- package/dist/cjs-dev/components/input-group/index.cjs +7 -0
- package/dist/cjs-dev/components/input-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +191 -0
- package/dist/cjs-dev/components/notification/daikin-notification.d.ts +76 -0
- package/dist/cjs-dev/components/notification/index.cjs +7 -0
- package/dist/cjs-dev/components/notification/index.d.ts +1 -0
- package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.cjs +62 -0
- package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
- package/dist/cjs-dev/components/panel-switcher/index.cjs +7 -0
- package/dist/cjs-dev/components/panel-switcher/index.d.ts +1 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +150 -0
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +76 -0
- package/dist/cjs-dev/components/radio/index.cjs +7 -0
- package/dist/cjs-dev/components/radio/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +126 -0
- package/dist/cjs-dev/components/tab/daikin-tab.d.ts +55 -0
- package/dist/cjs-dev/components/tab/index.cjs +7 -0
- package/dist/cjs-dev/components/tab/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab-group/daikin-tab-group.cjs +221 -0
- package/dist/cjs-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
- package/dist/cjs-dev/components/tab-group/index.cjs +7 -0
- package/dist/cjs-dev/components/tab-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab-group/scroller.cjs +65 -0
- package/dist/cjs-dev/components/tab-group/scroller.d.ts +25 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +137 -0
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +69 -0
- package/dist/cjs-dev/components/text-input/index.cjs +7 -0
- package/dist/cjs-dev/components/text-input/index.d.ts +1 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +168 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +71 -0
- package/dist/cjs-dev/components/textarea/index.cjs +7 -0
- package/dist/cjs-dev/components/textarea/index.d.ts +1 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +132 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +61 -0
- package/dist/cjs-dev/components/toggle/index.cjs +7 -0
- package/dist/cjs-dev/components/toggle/index.d.ts +1 -0
- package/dist/cjs-dev/constants/events.cjs +4 -0
- package/dist/cjs-dev/constants/events.d.ts +1 -0
- package/dist/cjs-dev/index.cjs +75 -0
- package/dist/cjs-dev/index.d.ts +3 -0
- package/dist/cjs-dev/lit-analyzer-types.d.ts +112 -0
- package/dist/cjs-dev/tailwind.css.cjs +6 -0
- package/dist/cjs-dev/type-utils.d.ts +25 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +40 -0
- package/dist/es/components/accordion/daikin-accordion.js +38 -0
- package/dist/es/components/accordion/index.d.ts +1 -0
- package/dist/es/components/accordion/index.js +4 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +56 -0
- package/dist/es/components/accordion-item/daikin-accordion-item.js +178 -0
- package/dist/es/components/accordion-item/index.d.ts +1 -0
- package/dist/es/components/accordion-item/index.js +4 -0
- package/dist/es/components/button/daikin-button.d.ts +21 -3
- package/dist/es/components/button/daikin-button.js +25 -7
- package/dist/es/components/button/index.js +4 -0
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +11 -1
- package/dist/es/components/checkbox/index.js +4 -0
- package/dist/es/components/icon/daikin-icon.d.ts +49 -0
- package/dist/es/components/icon/daikin-icon.js +88 -0
- package/dist/es/components/icon/icons.json.d.ts +31 -0
- package/dist/es/components/icon/icons.json.js +29 -0
- package/dist/es/components/icon/index.d.ts +1 -0
- package/dist/es/components/icon/index.js +5 -0
- package/dist/es/components/index.d.ts +7 -0
- package/dist/es/components/index.js +31 -0
- package/dist/es/components/input-group/daikin-input-group.d.ts +27 -1
- package/dist/es/components/input-group/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +21 -7
- package/dist/es/components/notification/daikin-notification.js +15 -33
- package/dist/es/components/notification/index.js +4 -0
- package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
- package/dist/es/components/panel-switcher/daikin-panel-switcher.js +56 -0
- package/dist/es/components/panel-switcher/index.d.ts +1 -0
- package/dist/es/components/panel-switcher/index.js +4 -0
- package/dist/es/components/radio/daikin-radio.d.ts +11 -1
- package/dist/es/components/radio/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.d.ts +55 -0
- package/dist/es/components/tab/daikin-tab.js +127 -0
- package/dist/es/components/tab/index.d.ts +1 -0
- package/dist/es/components/tab/index.js +4 -0
- package/dist/es/components/tab-group/daikin-tab-group.d.ts +105 -0
- package/dist/es/components/tab-group/daikin-tab-group.js +212 -0
- package/dist/es/components/tab-group/index.d.ts +1 -0
- package/dist/es/components/tab-group/index.js +4 -0
- package/dist/es/components/tab-group/scroller.d.ts +25 -0
- package/dist/es/components/tab-group/scroller.js +65 -0
- package/dist/es/components/text-input/daikin-text-input.d.ts +16 -1
- package/dist/es/components/text-input/index.js +4 -0
- package/dist/es/components/textarea/daikin-textarea.d.ts +16 -1
- package/dist/es/components/textarea/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +61 -0
- package/dist/es/components/toggle/daikin-toggle.js +133 -0
- package/dist/es/components/toggle/index.d.ts +1 -0
- package/dist/es/components/toggle/index.js +4 -0
- package/dist/es/index.js +16 -1
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es-dev/colors.d.ts +69 -0
- package/dist/es-dev/colors.js +80 -0
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +40 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +38 -0
- package/dist/es-dev/components/accordion/index.d.ts +1 -0
- package/dist/es-dev/components/accordion/index.js +4 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +178 -0
- package/dist/es-dev/components/accordion-item/index.d.ts +1 -0
- package/dist/es-dev/components/accordion-item/index.js +4 -0
- package/dist/es-dev/components/button/daikin-button.d.ts +77 -0
- package/dist/es-dev/components/button/daikin-button.js +216 -0
- package/dist/es-dev/components/button/index.d.ts +1 -0
- package/dist/es-dev/components/button/index.js +4 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +184 -0
- package/dist/es-dev/components/checkbox/index.d.ts +1 -0
- package/dist/es-dev/components/checkbox/index.js +4 -0
- package/dist/es-dev/components/icon/daikin-icon.d.ts +49 -0
- package/dist/es-dev/components/icon/daikin-icon.js +97 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +31 -0
- package/dist/es-dev/components/icon/icons.json.js +29 -0
- package/dist/es-dev/components/icon/index.d.ts +1 -0
- package/dist/es-dev/components/icon/index.js +5 -0
- package/dist/es-dev/components/index.d.ts +14 -0
- package/dist/es-dev/components/index.js +31 -0
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +73 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +120 -0
- package/dist/es-dev/components/input-group/index.d.ts +1 -0
- package/dist/es-dev/components/input-group/index.js +4 -0
- package/dist/es-dev/components/notification/daikin-notification.d.ts +76 -0
- package/dist/es-dev/components/notification/daikin-notification.js +192 -0
- package/dist/es-dev/components/notification/index.d.ts +1 -0
- package/dist/es-dev/components/notification/index.js +4 -0
- package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
- package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.js +63 -0
- package/dist/es-dev/components/panel-switcher/index.d.ts +1 -0
- package/dist/es-dev/components/panel-switcher/index.js +4 -0
- package/dist/es-dev/components/radio/daikin-radio.d.ts +76 -0
- package/dist/es-dev/components/radio/daikin-radio.js +151 -0
- package/dist/es-dev/components/radio/index.d.ts +1 -0
- package/dist/es-dev/components/radio/index.js +4 -0
- package/dist/es-dev/components/tab/daikin-tab.d.ts +55 -0
- package/dist/es-dev/components/tab/daikin-tab.js +127 -0
- package/dist/es-dev/components/tab/index.d.ts +1 -0
- package/dist/es-dev/components/tab/index.js +4 -0
- package/dist/es-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
- package/dist/es-dev/components/tab-group/daikin-tab-group.js +222 -0
- package/dist/es-dev/components/tab-group/index.d.ts +1 -0
- package/dist/es-dev/components/tab-group/index.js +4 -0
- package/dist/es-dev/components/tab-group/scroller.d.ts +25 -0
- package/dist/es-dev/components/tab-group/scroller.js +65 -0
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +69 -0
- package/dist/es-dev/components/text-input/daikin-text-input.js +138 -0
- package/dist/es-dev/components/text-input/index.d.ts +1 -0
- package/dist/es-dev/components/text-input/index.js +4 -0
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +71 -0
- package/dist/es-dev/components/textarea/daikin-textarea.js +169 -0
- package/dist/es-dev/components/textarea/index.d.ts +1 -0
- package/dist/es-dev/components/textarea/index.js +4 -0
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +61 -0
- package/dist/es-dev/components/toggle/daikin-toggle.js +133 -0
- package/dist/es-dev/components/toggle/index.d.ts +1 -0
- package/dist/es-dev/components/toggle/index.js +4 -0
- package/dist/es-dev/constants/events.d.ts +1 -0
- package/dist/es-dev/constants/events.js +4 -0
- package/dist/es-dev/index.d.ts +3 -0
- package/dist/es-dev/index.js +33 -0
- package/dist/es-dev/lit-analyzer-types.d.ts +112 -0
- package/dist/es-dev/tailwind.css.js +6 -0
- package/dist/es-dev/type-utils.d.ts +25 -0
- package/icons/accordion-chevron-up.svg +3 -0
- package/package.json +58 -27
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
import { icons } from './icons.json';
|
|
4
|
+
|
|
5
|
+
export declare const iconList: string[];
|
|
6
|
+
export type IconType = keyof typeof icons;
|
|
7
|
+
declare const cvaIcon: (props?: ({
|
|
8
|
+
icon?: string | number | null | undefined;
|
|
9
|
+
size?: "s" | "m" | "l" | "xl" | null | undefined;
|
|
10
|
+
color?: "black" | "white" | "default" | "current" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
export type IconVariantProps = MergeVariantProps<typeof cvaIcon>;
|
|
13
|
+
/**
|
|
14
|
+
* The icon component is a versatile UI element used to display small graphical symbols or images that represent actions, objects, or concepts within an application.
|
|
15
|
+
* The icon set is provided by DDS.
|
|
16
|
+
*
|
|
17
|
+
* To use an arbitrary color, specify `"current"` for the `color` property and set the `color` CSS property to the color you want to use.
|
|
18
|
+
*
|
|
19
|
+
* If you try to use an icon that does not exist, a blank space will be displayed.
|
|
20
|
+
* In the development build, warnings will be displayed in the console, so please check there if you encounter any unexpected behavior.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
*
|
|
24
|
+
* ```html
|
|
25
|
+
* <daikin-icon icon="information" color="black" size="m"></daikin-icon>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class DaikinIcon extends LitElement {
|
|
29
|
+
static readonly styles: import('lit').CSSResult;
|
|
30
|
+
/**
|
|
31
|
+
* Specify the name of the icon
|
|
32
|
+
*/
|
|
33
|
+
icon: IconType | null;
|
|
34
|
+
/**
|
|
35
|
+
* Specify icon color
|
|
36
|
+
*/
|
|
37
|
+
color: IconVariantProps["color"];
|
|
38
|
+
/**
|
|
39
|
+
* Specify the height and width of the icon
|
|
40
|
+
*/
|
|
41
|
+
size: IconVariantProps["size"];
|
|
42
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
"daikin-icon": DaikinIcon;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export default DaikinIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const icons = {
|
|
4
|
+
alarm: {
|
|
5
|
+
"class": "i-daikin-notification-status-alarm",
|
|
6
|
+
color: null
|
|
7
|
+
},
|
|
8
|
+
close: {
|
|
9
|
+
"class": "i-daikin-notification-close",
|
|
10
|
+
color: "#a0a0a0"
|
|
11
|
+
},
|
|
12
|
+
information: {
|
|
13
|
+
"class": "i-daikin-notification-status-information",
|
|
14
|
+
color: null
|
|
15
|
+
},
|
|
16
|
+
negative: {
|
|
17
|
+
"class": "i-daikin-notification-status-negative",
|
|
18
|
+
color: null
|
|
19
|
+
},
|
|
20
|
+
positive: {
|
|
21
|
+
"class": "i-daikin-notification-status-positive",
|
|
22
|
+
color: null
|
|
23
|
+
},
|
|
24
|
+
warning: {
|
|
25
|
+
"class": "i-daikin-notification-status-warning",
|
|
26
|
+
color: null
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.icons = icons;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"icons": {
|
|
3
|
+
"alarm": {
|
|
4
|
+
"class": "i-daikin-notification-status-alarm",
|
|
5
|
+
"color": null
|
|
6
|
+
},
|
|
7
|
+
"close": {
|
|
8
|
+
"class": "i-daikin-notification-close",
|
|
9
|
+
"color": "#a0a0a0"
|
|
10
|
+
},
|
|
11
|
+
"information": {
|
|
12
|
+
"class": "i-daikin-notification-status-information",
|
|
13
|
+
"color": null
|
|
14
|
+
},
|
|
15
|
+
"negative": {
|
|
16
|
+
"class": "i-daikin-notification-status-negative",
|
|
17
|
+
"color": null
|
|
18
|
+
},
|
|
19
|
+
"positive": {
|
|
20
|
+
"class": "i-daikin-notification-status-positive",
|
|
21
|
+
"color": null
|
|
22
|
+
},
|
|
23
|
+
"warning": {
|
|
24
|
+
"class": "i-daikin-notification-status-warning",
|
|
25
|
+
"color": null
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
;
|
|
30
|
+
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinIcon = require("./daikin-icon.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinIcon", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinIcon.DaikinIcon
|
|
7
|
+
});
|
|
8
|
+
exports.iconList = daikinIcon.iconList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-icon';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinAccordion = require("./accordion/daikin-accordion.cjs");
|
|
4
|
+
const daikinAccordionItem = require("./accordion-item/daikin-accordion-item.cjs");
|
|
5
|
+
const daikinButton = require("./button/daikin-button.cjs");
|
|
6
|
+
const daikinCheckbox = require("./checkbox/daikin-checkbox.cjs");
|
|
7
|
+
const daikinIcon = require("./icon/daikin-icon.cjs");
|
|
8
|
+
const daikinInputGroup = require("./input-group/daikin-input-group.cjs");
|
|
9
|
+
const daikinNotification = require("./notification/daikin-notification.cjs");
|
|
10
|
+
const daikinPanelSwitcher = require("./panel-switcher/daikin-panel-switcher.cjs");
|
|
11
|
+
const daikinRadio = require("./radio/daikin-radio.cjs");
|
|
12
|
+
const daikinTab = require("./tab/daikin-tab.cjs");
|
|
13
|
+
const daikinTabGroup = require("./tab-group/daikin-tab-group.cjs");
|
|
14
|
+
const daikinTextInput = require("./text-input/daikin-text-input.cjs");
|
|
15
|
+
const daikinTextarea = require("./textarea/daikin-textarea.cjs");
|
|
16
|
+
const daikinToggle = require("./toggle/daikin-toggle.cjs");
|
|
17
|
+
Object.defineProperty(exports, "DaikinAccordion", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => daikinAccordion.DaikinAccordion
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "DaikinAccordionItem", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: () => daikinAccordionItem.DaikinAccordionItem
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "DaikinButton", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: () => daikinButton.DaikinButton
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "DaikinCheckbox", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: () => daikinCheckbox.DaikinCheckbox
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "DaikinIcon", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: () => daikinIcon.DaikinIcon
|
|
36
|
+
});
|
|
37
|
+
exports.iconList = daikinIcon.iconList;
|
|
38
|
+
Object.defineProperty(exports, "DaikinInputGroup", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: () => daikinInputGroup.DaikinInputGroup
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "DaikinNotification", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: () => daikinNotification.DaikinNotification
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "DaikinPanelSwitcher", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: () => daikinPanelSwitcher.DaikinPanelSwitcher
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "DaikinRadio", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: () => daikinRadio.DaikinRadio
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "DaikinTab", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: () => daikinTab.DaikinTab
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "DaikinTabGroup", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: () => daikinTabGroup.DaikinTabGroup
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "DaikinTextInput", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: () => daikinTextInput.DaikinTextInput
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "DaikinTextarea", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: () => daikinTextarea.DaikinTextarea
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "DaikinToggle", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: () => daikinToggle.DaikinToggle
|
|
73
|
+
});
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './accordion-item';
|
|
1
3
|
export * from './button';
|
|
2
4
|
export * from './checkbox';
|
|
5
|
+
export * from './icon';
|
|
3
6
|
export * from './input-group';
|
|
4
7
|
export * from './notification';
|
|
8
|
+
export * from './panel-switcher';
|
|
5
9
|
export * from './radio';
|
|
10
|
+
export * from './tab';
|
|
11
|
+
export * from './tab-group';
|
|
6
12
|
export * from './text-input';
|
|
7
13
|
export * from './textarea';
|
|
14
|
+
export * from './toggle';
|
|
@@ -4,7 +4,33 @@ import { DaikinTextarea } from '../textarea/daikin-textarea';
|
|
|
4
4
|
|
|
5
5
|
type ControlElement = DaikinTextInput | DaikinTextarea;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* The input group component serves as a wrapper for a `daikin-text-input` or `daikin-textarea` component, providing additional elements such as labels, helper texts, or a counter.
|
|
8
|
+
* It enhances the user experience by associating supplementary information or functionality directly with the input field.
|
|
9
|
+
* This component is particularly useful for creating complex forms where clear communication and guidance are essential.
|
|
10
|
+
*
|
|
11
|
+
* Hierarchies:
|
|
12
|
+
* - `daikin-input-group` > `daikin-text-input`
|
|
13
|
+
* - `daikin-input-group` > `daikin-textarea`
|
|
14
|
+
*
|
|
15
|
+
* @slot - A slot for a input component. Place a `daikin-text-input` or `daikin-textarea` element here.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* With Text Input:
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
* <daikin-input-group>
|
|
23
|
+
* <daikin-text-input value="Content of Text Input"></daikin-text-input>
|
|
24
|
+
* </daikin-input-group>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* With Textarea:
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <daikin-input-group>
|
|
31
|
+
* <daikin-textarea value="Content of Textarea"></daikin-textarea>
|
|
32
|
+
* </daikin-input-group>
|
|
33
|
+
* ```
|
|
8
34
|
*/
|
|
9
35
|
export declare class DaikinInputGroup extends LitElement {
|
|
10
36
|
static readonly styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinInputGroup = require("./daikin-input-group.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinInputGroup", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinInputGroup.DaikinInputGroup
|
|
7
|
+
});
|
|
@@ -6,6 +6,7 @@ const lit = require("lit");
|
|
|
6
6
|
const decorators_js = require("lit/decorators.js");
|
|
7
7
|
const events = require("../../constants/events.cjs");
|
|
8
8
|
const tailwind = require("../../tailwind.css.cjs");
|
|
9
|
+
require("../icon/daikin-icon.cjs");
|
|
9
10
|
var __defProp = Object.defineProperty;
|
|
10
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
12
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -60,31 +61,6 @@ const cvaIconContainer = classVarianceAuthority.cva(
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
const cvaIcon = classVarianceAuthority.cva(
|
|
64
|
-
[
|
|
65
|
-
"flex",
|
|
66
|
-
"justify-center",
|
|
67
|
-
"items-center",
|
|
68
|
-
"w-[24px]",
|
|
69
|
-
"h-[24px]",
|
|
70
|
-
"flex-none",
|
|
71
|
-
"text-white"
|
|
72
|
-
],
|
|
73
|
-
{
|
|
74
|
-
variants: {
|
|
75
|
-
status: {
|
|
76
|
-
positive: ["i-daikin-notification-status-positive"],
|
|
77
|
-
negative: ["i-daikin-notification-status-negative"],
|
|
78
|
-
warning: ["i-daikin-notification-status-warning"],
|
|
79
|
-
alarm: ["i-daikin-notification-status-alarm"],
|
|
80
|
-
information: ["i-daikin-notification-status-information"]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
defaultVariants: {
|
|
84
|
-
status: "positive"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
64
|
const cvaContent = classVarianceAuthority.cva(
|
|
89
65
|
["flex", "justify-center", "gap-1", "w-fit", "flex-none"],
|
|
90
66
|
{
|
|
@@ -130,11 +106,11 @@ exports.DaikinNotification = class DaikinNotification extends lit.LitElement {
|
|
|
130
106
|
status: this.status
|
|
131
107
|
})}
|
|
132
108
|
>
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
></
|
|
109
|
+
<daikin-icon
|
|
110
|
+
icon=${this.status}
|
|
111
|
+
color="white"
|
|
112
|
+
size="xl"
|
|
113
|
+
></daikin-icon>
|
|
138
114
|
</div>
|
|
139
115
|
<div
|
|
140
116
|
class="flex justify-between items-center gap-5 p-5 flex-[1_0_auto]"
|
|
@@ -153,9 +129,15 @@ exports.DaikinNotification = class DaikinNotification extends lit.LitElement {
|
|
|
153
129
|
<div class="flex items-center gap-5">
|
|
154
130
|
<button
|
|
155
131
|
aria-label="Close"
|
|
156
|
-
class="relative flex w-5 h-5
|
|
157
|
-
@click=${
|
|
158
|
-
|
|
132
|
+
class="relative flex w-5 h-5"
|
|
133
|
+
@click=${this._handleClickClose}
|
|
134
|
+
>
|
|
135
|
+
<daikin-icon
|
|
136
|
+
icon="close"
|
|
137
|
+
size="l"
|
|
138
|
+
color="default"
|
|
139
|
+
></daikin-icon>
|
|
140
|
+
</button>
|
|
159
141
|
</div>
|
|
160
142
|
` : null}
|
|
161
143
|
</div>
|
|
@@ -3,20 +3,34 @@ import { MergeVariantProps } from '../../type-utils';
|
|
|
3
3
|
|
|
4
4
|
declare const cvaContainer: (props?: ({
|
|
5
5
|
variant?: "toast" | "inline" | null | undefined;
|
|
6
|
-
status?: "
|
|
6
|
+
status?: "alarm" | "information" | "negative" | "positive" | "warning" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
declare const cvaIconContainer: (props?: ({
|
|
9
|
-
status?: "
|
|
10
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
-
declare const cvaIcon: (props?: ({
|
|
12
|
-
status?: "positive" | "negative" | "warning" | "alarm" | "information" | null | undefined;
|
|
9
|
+
status?: "alarm" | "information" | "negative" | "positive" | "warning" | null | undefined;
|
|
13
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
11
|
declare const cvaContent: (props?: ({
|
|
15
12
|
line?: "single" | "multi" | null | undefined;
|
|
16
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
|
-
type NotificationVariantProps = MergeVariantProps<typeof cvaContainer | typeof cvaIconContainer | typeof
|
|
14
|
+
type NotificationVariantProps = MergeVariantProps<typeof cvaContainer | typeof cvaIconContainer | typeof cvaContent>;
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
16
|
+
* The notification component is a UI element used to inform users about important updates, alerts, or messages within an application.
|
|
17
|
+
*
|
|
18
|
+
* There are two variants of notification components: `toast` and `inline`.
|
|
19
|
+
*
|
|
20
|
+
* Toast notifications are brief messages that should appear temporarily at the edge of the screen, typically in the bottom or top corner.
|
|
21
|
+
* Toast notifications are ideal for conveying transient information that does not require user interaction, such as success messages, warnings, or alerts. \
|
|
22
|
+
* Please note that **currently we don't support automatic placement or stacking of toast notifications**.
|
|
23
|
+
*
|
|
24
|
+
* Inline notifications appear within the content of the application, usually embedded directly within a page or section.
|
|
25
|
+
* Inline notifications are more persistent and are used to highlight important information or status updates that should remain visible to the user until they are acknowledged or the issue is resolved.
|
|
26
|
+
*
|
|
27
|
+
* @fires close - A custom event emitted when a user clicks the close button.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
*
|
|
31
|
+
* ```html
|
|
32
|
+
* </daikin-notification title="Notification title" description="Notification description."></daikin-notification>
|
|
33
|
+
* ```
|
|
20
34
|
*/
|
|
21
35
|
export declare class DaikinNotification extends LitElement {
|
|
22
36
|
static readonly styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinNotification = require("./daikin-notification.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinNotification", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinNotification.DaikinNotification
|
|
7
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const lit = require("lit");
|
|
4
|
+
const decorators_js = require("lit/decorators.js");
|
|
5
|
+
const repeat_js = require("lit/directives/repeat.js");
|
|
6
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
exports.DaikinPanelSwitcher = class DaikinPanelSwitcher extends lit.LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.value = "";
|
|
21
|
+
this.panels = [];
|
|
22
|
+
this.panelRole = null;
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return repeat_js.repeat(
|
|
26
|
+
this.panels,
|
|
27
|
+
(value) => lit.html`<div
|
|
28
|
+
class=${this.value === value ? "contents" : "hidden"}
|
|
29
|
+
role=${// HACK: Workaround lit-analyzer not recognizing `nothing` (runem/lit-analyzer#207).
|
|
30
|
+
this.panelRole ?? lit.nothing}
|
|
31
|
+
?hidden=${this.value !== value}
|
|
32
|
+
>
|
|
33
|
+
<slot name=${`panel:${value}`}></slot>
|
|
34
|
+
</div>`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.DaikinPanelSwitcher.styles = lit.css`
|
|
39
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
40
|
+
`;
|
|
41
|
+
__decorateClass([
|
|
42
|
+
decorators_js.property({ type: String, reflect: true })
|
|
43
|
+
], exports.DaikinPanelSwitcher.prototype, "value", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
decorators_js.property({
|
|
46
|
+
type: Array,
|
|
47
|
+
hasChanged: (newValue, oldValue) => JSON.stringify(newValue) !== JSON.stringify(oldValue)
|
|
48
|
+
})
|
|
49
|
+
], exports.DaikinPanelSwitcher.prototype, "panels", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
decorators_js.property({ type: String, reflect: true, attribute: "panel-role" })
|
|
52
|
+
], exports.DaikinPanelSwitcher.prototype, "panelRole", 2);
|
|
53
|
+
exports.DaikinPanelSwitcher = __decorateClass([
|
|
54
|
+
decorators_js.customElement("daikin-panel-switcher")
|
|
55
|
+
], exports.DaikinPanelSwitcher);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ARIARole } from '../../lit-analyzer-types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The panel switcher component is a child element within the `daikin-tab-group` that controls the display of the content panels associated with each tab.
|
|
6
|
+
* When a user selects a tab, the panel switcher component ensures the corresponding content panel is shown while hiding the others.
|
|
7
|
+
*
|
|
8
|
+
* Hierarchy:
|
|
9
|
+
* - `daikin-tab-group` > `daikin-panel-switcher` ("panels" slot)
|
|
10
|
+
*
|
|
11
|
+
* @slot panel:\<name\> - A slot for each panel content.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <!-- Note that `panels` must be set via property. -->
|
|
17
|
+
* <daikin-panel-switcher
|
|
18
|
+
* class="block w-full h-full"
|
|
19
|
+
* .panels="${['foo', 'bar', 'baz']}"
|
|
20
|
+
* value="foo"
|
|
21
|
+
* panelRole="tabpanel"
|
|
22
|
+
* >
|
|
23
|
+
* <div slot="panel:foo">Foo Panel (visible)</div>
|
|
24
|
+
* <div slot="panel:bar">Bar Panel (hidden)</div>
|
|
25
|
+
* <div slot="panel:baz">Baz Panel (hidden)</div>
|
|
26
|
+
* </daikin-panel-switcher>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class DaikinPanelSwitcher extends LitElement {
|
|
30
|
+
static readonly styles: import('lit').CSSResult;
|
|
31
|
+
/**
|
|
32
|
+
* The panel to be displayed.
|
|
33
|
+
* Set automatically by `daikin-tab-group` if used within it.
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
/**
|
|
37
|
+
* Set automatically by `daikin-tab-group` if used within it.
|
|
38
|
+
*/
|
|
39
|
+
panels: string[];
|
|
40
|
+
/**
|
|
41
|
+
* `role` attribute of the container.
|
|
42
|
+
* Set to "tablist" automatically by `daikin-tab-group` if used within it.
|
|
43
|
+
*/
|
|
44
|
+
panelRole: ARIARole | null;
|
|
45
|
+
render(): unknown;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
"daikin-panel-switcher": DaikinPanelSwitcher;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinPanelSwitcher = require("./daikin-panel-switcher.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinPanelSwitcher", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinPanelSwitcher.DaikinPanelSwitcher
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-panel-switcher';
|
|
@@ -9,7 +9,17 @@ declare const cvaLabel: (props?: ({
|
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
type RadioVariantProps = MergeVariantProps<typeof cvaRadio | typeof cvaLabel>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The radio button component is a UI element that allows users to select one options from a set of choices.
|
|
13
|
+
* It functions similarly to the HTML `<input type="radio">` tag. \
|
|
14
|
+
* Please note that **a radio group component is not yet available**, so you'll need to manually group radio buttons when using multiple instances.
|
|
15
|
+
*
|
|
16
|
+
* @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<input type="radio">` element.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```html
|
|
21
|
+
* <daikin-radio name="name" value="value" label="Radio button label"></daikin-radio>
|
|
22
|
+
* ```
|
|
13
23
|
*/
|
|
14
24
|
export declare class DaikinRadio extends LitElement {
|
|
15
25
|
static readonly styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
const cvaTab = classVarianceAuthority.cva(
|
|
18
|
+
[
|
|
19
|
+
"flex",
|
|
20
|
+
"w-full",
|
|
21
|
+
"h-full",
|
|
22
|
+
"items-center",
|
|
23
|
+
"justify-center",
|
|
24
|
+
"text-center",
|
|
25
|
+
"relative",
|
|
26
|
+
"font-daikinSerif",
|
|
27
|
+
"text-base",
|
|
28
|
+
"tracking-wide",
|
|
29
|
+
"whitespace-nowrap",
|
|
30
|
+
"contain-paint",
|
|
31
|
+
"disabled:cursor-default",
|
|
32
|
+
"after:content-['']",
|
|
33
|
+
"after:z-1",
|
|
34
|
+
"after:absolute",
|
|
35
|
+
"after:bottom-0",
|
|
36
|
+
"after:left-0",
|
|
37
|
+
"after:right-0",
|
|
38
|
+
"after:w-full",
|
|
39
|
+
"text-daikinBlue-500",
|
|
40
|
+
"hover:text-daikinBlue-400",
|
|
41
|
+
"active:text-daikinBlue-600",
|
|
42
|
+
"focus-visible:text-daikinBlue-700",
|
|
43
|
+
"disabled:text-daikinNeutral-300",
|
|
44
|
+
"aria-selected:after:h-1",
|
|
45
|
+
"aria-selected:after:bg-daikinBlue-500",
|
|
46
|
+
"hover:aria-selected:after:bg-daikinBlue-400",
|
|
47
|
+
"active:aria-selected:after:bg-daikinBlue-600",
|
|
48
|
+
"focus-visible:aria-selected:after:bg-daikinBlue-700",
|
|
49
|
+
"disabled:after:bg-daikinNeutral-300"
|
|
50
|
+
],
|
|
51
|
+
{
|
|
52
|
+
variants: {
|
|
53
|
+
size: {
|
|
54
|
+
default: ["px-4"],
|
|
55
|
+
condensed: ["px-[10px]"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
exports.DaikinTab = class DaikinTab extends lit.LitElement {
|
|
61
|
+
constructor() {
|
|
62
|
+
super();
|
|
63
|
+
this.value = "";
|
|
64
|
+
this.size = "default";
|
|
65
|
+
this.disabled = false;
|
|
66
|
+
this.active = false;
|
|
67
|
+
this.addEventListener("click", this._handleClick);
|
|
68
|
+
}
|
|
69
|
+
_handleClick(event) {
|
|
70
|
+
if (this.disabled) {
|
|
71
|
+
event.stopImmediatePropagation();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Focuses on the inner button.
|
|
76
|
+
* @param options focus options
|
|
77
|
+
*/
|
|
78
|
+
focus(options) {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
(_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus(options);
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
const cn = cvaTab({
|
|
84
|
+
size: this.size
|
|
85
|
+
});
|
|
86
|
+
return lit.html`
|
|
87
|
+
<button
|
|
88
|
+
class=${cn}
|
|
89
|
+
?disabled=${this.disabled}
|
|
90
|
+
role="tab"
|
|
91
|
+
aria-selected=${!this.disabled && this.active}
|
|
92
|
+
tabindex=${this.active ? 0 : -1}
|
|
93
|
+
>
|
|
94
|
+
<slot></slot>
|
|
95
|
+
</button>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.DaikinTab.styles = lit.css`
|
|
100
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
101
|
+
|
|
102
|
+
:host {
|
|
103
|
+
display: inline-block;
|
|
104
|
+
width: fit-content;
|
|
105
|
+
height: 48px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([size="condensed"]) {
|
|
109
|
+
height: 40px;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
__decorateClass([
|
|
113
|
+
decorators_js.property({ type: String, reflect: true })
|
|
114
|
+
], exports.DaikinTab.prototype, "value", 2);
|
|
115
|
+
__decorateClass([
|
|
116
|
+
decorators_js.property({ type: String, reflect: true })
|
|
117
|
+
], exports.DaikinTab.prototype, "size", 2);
|
|
118
|
+
__decorateClass([
|
|
119
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
120
|
+
], exports.DaikinTab.prototype, "disabled", 2);
|
|
121
|
+
__decorateClass([
|
|
122
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
123
|
+
], exports.DaikinTab.prototype, "active", 2);
|
|
124
|
+
exports.DaikinTab = __decorateClass([
|
|
125
|
+
decorators_js.customElement("daikin-tab")
|
|
126
|
+
], exports.DaikinTab);
|