@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.
Files changed (249) hide show
  1. package/README.md +47 -7
  2. package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
  3. package/dist/cjs/components/accordion/daikin-accordion.d.ts +40 -0
  4. package/dist/cjs/components/accordion/index.cjs +7 -0
  5. package/dist/cjs/components/accordion/index.d.ts +1 -0
  6. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +177 -0
  7. package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  8. package/dist/cjs/components/accordion-item/index.cjs +7 -0
  9. package/dist/cjs/components/accordion-item/index.d.ts +1 -0
  10. package/dist/cjs/components/button/daikin-button.cjs +25 -7
  11. package/dist/cjs/components/button/daikin-button.d.ts +21 -3
  12. package/dist/cjs/components/button/index.cjs +7 -0
  13. package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +11 -1
  14. package/dist/cjs/components/checkbox/index.cjs +7 -0
  15. package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
  16. package/dist/cjs/components/icon/daikin-icon.d.ts +49 -0
  17. package/dist/cjs/components/icon/icons.json.cjs +29 -0
  18. package/dist/cjs/components/icon/icons.json.d.ts +31 -0
  19. package/dist/cjs/components/icon/index.cjs +8 -0
  20. package/dist/cjs/components/icon/index.d.ts +1 -0
  21. package/dist/cjs/components/index.cjs +73 -0
  22. package/dist/cjs/components/index.d.ts +7 -0
  23. package/dist/cjs/components/input-group/daikin-input-group.d.ts +27 -1
  24. package/dist/cjs/components/input-group/index.cjs +7 -0
  25. package/dist/cjs/components/notification/daikin-notification.cjs +15 -33
  26. package/dist/cjs/components/notification/daikin-notification.d.ts +21 -7
  27. package/dist/cjs/components/notification/index.cjs +7 -0
  28. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
  29. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  30. package/dist/cjs/components/panel-switcher/index.cjs +7 -0
  31. package/dist/cjs/components/panel-switcher/index.d.ts +1 -0
  32. package/dist/cjs/components/radio/daikin-radio.d.ts +11 -1
  33. package/dist/cjs/components/radio/index.cjs +7 -0
  34. package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
  35. package/dist/cjs/components/tab/daikin-tab.d.ts +55 -0
  36. package/dist/cjs/components/tab/index.cjs +7 -0
  37. package/dist/cjs/components/tab/index.d.ts +1 -0
  38. package/dist/cjs/components/tab-group/daikin-tab-group.cjs +211 -0
  39. package/dist/cjs/components/tab-group/daikin-tab-group.d.ts +105 -0
  40. package/dist/cjs/components/tab-group/index.cjs +7 -0
  41. package/dist/cjs/components/tab-group/index.d.ts +1 -0
  42. package/dist/cjs/components/tab-group/scroller.cjs +65 -0
  43. package/dist/cjs/components/tab-group/scroller.d.ts +25 -0
  44. package/dist/cjs/components/text-input/daikin-text-input.d.ts +16 -1
  45. package/dist/cjs/components/text-input/index.cjs +7 -0
  46. package/dist/cjs/components/textarea/daikin-textarea.d.ts +16 -1
  47. package/dist/cjs/components/textarea/index.cjs +7 -0
  48. package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
  49. package/dist/cjs/components/toggle/daikin-toggle.d.ts +61 -0
  50. package/dist/cjs/components/toggle/index.cjs +7 -0
  51. package/dist/cjs/components/toggle/index.d.ts +1 -0
  52. package/dist/cjs/index.cjs +36 -0
  53. package/dist/cjs/tailwind.css.cjs +1 -1
  54. package/dist/cjs-dev/colors.cjs +80 -0
  55. package/dist/cjs-dev/colors.d.ts +69 -0
  56. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
  57. package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +40 -0
  58. package/dist/cjs-dev/components/accordion/index.cjs +7 -0
  59. package/dist/cjs-dev/components/accordion/index.d.ts +1 -0
  60. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +177 -0
  61. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  62. package/dist/cjs-dev/components/accordion-item/index.cjs +7 -0
  63. package/dist/cjs-dev/components/accordion-item/index.d.ts +1 -0
  64. package/dist/cjs-dev/components/button/daikin-button.cjs +215 -0
  65. package/dist/cjs-dev/components/button/daikin-button.d.ts +77 -0
  66. package/dist/cjs-dev/components/button/index.cjs +7 -0
  67. package/dist/cjs-dev/components/button/index.d.ts +1 -0
  68. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +183 -0
  69. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
  70. package/dist/cjs-dev/components/checkbox/index.cjs +7 -0
  71. package/dist/cjs-dev/components/checkbox/index.d.ts +1 -0
  72. package/dist/cjs-dev/components/icon/daikin-icon.cjs +96 -0
  73. package/dist/cjs-dev/components/icon/daikin-icon.d.ts +49 -0
  74. package/dist/cjs-dev/components/icon/icons.json.cjs +29 -0
  75. package/dist/cjs-dev/components/icon/icons.json.d.ts +31 -0
  76. package/dist/cjs-dev/components/icon/index.cjs +8 -0
  77. package/dist/cjs-dev/components/icon/index.d.ts +1 -0
  78. package/dist/cjs-dev/components/index.cjs +73 -0
  79. package/dist/cjs-dev/components/index.d.ts +14 -0
  80. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +119 -0
  81. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +73 -0
  82. package/dist/cjs-dev/components/input-group/index.cjs +7 -0
  83. package/dist/cjs-dev/components/input-group/index.d.ts +1 -0
  84. package/dist/cjs-dev/components/notification/daikin-notification.cjs +191 -0
  85. package/dist/cjs-dev/components/notification/daikin-notification.d.ts +76 -0
  86. package/dist/cjs-dev/components/notification/index.cjs +7 -0
  87. package/dist/cjs-dev/components/notification/index.d.ts +1 -0
  88. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.cjs +62 -0
  89. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  90. package/dist/cjs-dev/components/panel-switcher/index.cjs +7 -0
  91. package/dist/cjs-dev/components/panel-switcher/index.d.ts +1 -0
  92. package/dist/cjs-dev/components/radio/daikin-radio.cjs +150 -0
  93. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +76 -0
  94. package/dist/cjs-dev/components/radio/index.cjs +7 -0
  95. package/dist/cjs-dev/components/radio/index.d.ts +1 -0
  96. package/dist/cjs-dev/components/tab/daikin-tab.cjs +126 -0
  97. package/dist/cjs-dev/components/tab/daikin-tab.d.ts +55 -0
  98. package/dist/cjs-dev/components/tab/index.cjs +7 -0
  99. package/dist/cjs-dev/components/tab/index.d.ts +1 -0
  100. package/dist/cjs-dev/components/tab-group/daikin-tab-group.cjs +221 -0
  101. package/dist/cjs-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
  102. package/dist/cjs-dev/components/tab-group/index.cjs +7 -0
  103. package/dist/cjs-dev/components/tab-group/index.d.ts +1 -0
  104. package/dist/cjs-dev/components/tab-group/scroller.cjs +65 -0
  105. package/dist/cjs-dev/components/tab-group/scroller.d.ts +25 -0
  106. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +137 -0
  107. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +69 -0
  108. package/dist/cjs-dev/components/text-input/index.cjs +7 -0
  109. package/dist/cjs-dev/components/text-input/index.d.ts +1 -0
  110. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +168 -0
  111. package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +71 -0
  112. package/dist/cjs-dev/components/textarea/index.cjs +7 -0
  113. package/dist/cjs-dev/components/textarea/index.d.ts +1 -0
  114. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +132 -0
  115. package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +61 -0
  116. package/dist/cjs-dev/components/toggle/index.cjs +7 -0
  117. package/dist/cjs-dev/components/toggle/index.d.ts +1 -0
  118. package/dist/cjs-dev/constants/events.cjs +4 -0
  119. package/dist/cjs-dev/constants/events.d.ts +1 -0
  120. package/dist/cjs-dev/index.cjs +75 -0
  121. package/dist/cjs-dev/index.d.ts +3 -0
  122. package/dist/cjs-dev/lit-analyzer-types.d.ts +112 -0
  123. package/dist/cjs-dev/tailwind.css.cjs +6 -0
  124. package/dist/cjs-dev/type-utils.d.ts +25 -0
  125. package/dist/es/components/accordion/daikin-accordion.d.ts +40 -0
  126. package/dist/es/components/accordion/daikin-accordion.js +38 -0
  127. package/dist/es/components/accordion/index.d.ts +1 -0
  128. package/dist/es/components/accordion/index.js +4 -0
  129. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  130. package/dist/es/components/accordion-item/daikin-accordion-item.js +178 -0
  131. package/dist/es/components/accordion-item/index.d.ts +1 -0
  132. package/dist/es/components/accordion-item/index.js +4 -0
  133. package/dist/es/components/button/daikin-button.d.ts +21 -3
  134. package/dist/es/components/button/daikin-button.js +25 -7
  135. package/dist/es/components/button/index.js +4 -0
  136. package/dist/es/components/checkbox/daikin-checkbox.d.ts +11 -1
  137. package/dist/es/components/checkbox/index.js +4 -0
  138. package/dist/es/components/icon/daikin-icon.d.ts +49 -0
  139. package/dist/es/components/icon/daikin-icon.js +88 -0
  140. package/dist/es/components/icon/icons.json.d.ts +31 -0
  141. package/dist/es/components/icon/icons.json.js +29 -0
  142. package/dist/es/components/icon/index.d.ts +1 -0
  143. package/dist/es/components/icon/index.js +5 -0
  144. package/dist/es/components/index.d.ts +7 -0
  145. package/dist/es/components/index.js +31 -0
  146. package/dist/es/components/input-group/daikin-input-group.d.ts +27 -1
  147. package/dist/es/components/input-group/index.js +4 -0
  148. package/dist/es/components/notification/daikin-notification.d.ts +21 -7
  149. package/dist/es/components/notification/daikin-notification.js +15 -33
  150. package/dist/es/components/notification/index.js +4 -0
  151. package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  152. package/dist/es/components/panel-switcher/daikin-panel-switcher.js +56 -0
  153. package/dist/es/components/panel-switcher/index.d.ts +1 -0
  154. package/dist/es/components/panel-switcher/index.js +4 -0
  155. package/dist/es/components/radio/daikin-radio.d.ts +11 -1
  156. package/dist/es/components/radio/index.js +4 -0
  157. package/dist/es/components/tab/daikin-tab.d.ts +55 -0
  158. package/dist/es/components/tab/daikin-tab.js +127 -0
  159. package/dist/es/components/tab/index.d.ts +1 -0
  160. package/dist/es/components/tab/index.js +4 -0
  161. package/dist/es/components/tab-group/daikin-tab-group.d.ts +105 -0
  162. package/dist/es/components/tab-group/daikin-tab-group.js +212 -0
  163. package/dist/es/components/tab-group/index.d.ts +1 -0
  164. package/dist/es/components/tab-group/index.js +4 -0
  165. package/dist/es/components/tab-group/scroller.d.ts +25 -0
  166. package/dist/es/components/tab-group/scroller.js +65 -0
  167. package/dist/es/components/text-input/daikin-text-input.d.ts +16 -1
  168. package/dist/es/components/text-input/index.js +4 -0
  169. package/dist/es/components/textarea/daikin-textarea.d.ts +16 -1
  170. package/dist/es/components/textarea/index.js +4 -0
  171. package/dist/es/components/toggle/daikin-toggle.d.ts +61 -0
  172. package/dist/es/components/toggle/daikin-toggle.js +133 -0
  173. package/dist/es/components/toggle/index.d.ts +1 -0
  174. package/dist/es/components/toggle/index.js +4 -0
  175. package/dist/es/index.js +16 -1
  176. package/dist/es/tailwind.css.js +1 -1
  177. package/dist/es-dev/colors.d.ts +69 -0
  178. package/dist/es-dev/colors.js +80 -0
  179. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +40 -0
  180. package/dist/es-dev/components/accordion/daikin-accordion.js +38 -0
  181. package/dist/es-dev/components/accordion/index.d.ts +1 -0
  182. package/dist/es-dev/components/accordion/index.js +4 -0
  183. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  184. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +178 -0
  185. package/dist/es-dev/components/accordion-item/index.d.ts +1 -0
  186. package/dist/es-dev/components/accordion-item/index.js +4 -0
  187. package/dist/es-dev/components/button/daikin-button.d.ts +77 -0
  188. package/dist/es-dev/components/button/daikin-button.js +216 -0
  189. package/dist/es-dev/components/button/index.d.ts +1 -0
  190. package/dist/es-dev/components/button/index.js +4 -0
  191. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
  192. package/dist/es-dev/components/checkbox/daikin-checkbox.js +184 -0
  193. package/dist/es-dev/components/checkbox/index.d.ts +1 -0
  194. package/dist/es-dev/components/checkbox/index.js +4 -0
  195. package/dist/es-dev/components/icon/daikin-icon.d.ts +49 -0
  196. package/dist/es-dev/components/icon/daikin-icon.js +97 -0
  197. package/dist/es-dev/components/icon/icons.json.d.ts +31 -0
  198. package/dist/es-dev/components/icon/icons.json.js +29 -0
  199. package/dist/es-dev/components/icon/index.d.ts +1 -0
  200. package/dist/es-dev/components/icon/index.js +5 -0
  201. package/dist/es-dev/components/index.d.ts +14 -0
  202. package/dist/es-dev/components/index.js +31 -0
  203. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +73 -0
  204. package/dist/es-dev/components/input-group/daikin-input-group.js +120 -0
  205. package/dist/es-dev/components/input-group/index.d.ts +1 -0
  206. package/dist/es-dev/components/input-group/index.js +4 -0
  207. package/dist/es-dev/components/notification/daikin-notification.d.ts +76 -0
  208. package/dist/es-dev/components/notification/daikin-notification.js +192 -0
  209. package/dist/es-dev/components/notification/index.d.ts +1 -0
  210. package/dist/es-dev/components/notification/index.js +4 -0
  211. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  212. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.js +63 -0
  213. package/dist/es-dev/components/panel-switcher/index.d.ts +1 -0
  214. package/dist/es-dev/components/panel-switcher/index.js +4 -0
  215. package/dist/es-dev/components/radio/daikin-radio.d.ts +76 -0
  216. package/dist/es-dev/components/radio/daikin-radio.js +151 -0
  217. package/dist/es-dev/components/radio/index.d.ts +1 -0
  218. package/dist/es-dev/components/radio/index.js +4 -0
  219. package/dist/es-dev/components/tab/daikin-tab.d.ts +55 -0
  220. package/dist/es-dev/components/tab/daikin-tab.js +127 -0
  221. package/dist/es-dev/components/tab/index.d.ts +1 -0
  222. package/dist/es-dev/components/tab/index.js +4 -0
  223. package/dist/es-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
  224. package/dist/es-dev/components/tab-group/daikin-tab-group.js +222 -0
  225. package/dist/es-dev/components/tab-group/index.d.ts +1 -0
  226. package/dist/es-dev/components/tab-group/index.js +4 -0
  227. package/dist/es-dev/components/tab-group/scroller.d.ts +25 -0
  228. package/dist/es-dev/components/tab-group/scroller.js +65 -0
  229. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +69 -0
  230. package/dist/es-dev/components/text-input/daikin-text-input.js +138 -0
  231. package/dist/es-dev/components/text-input/index.d.ts +1 -0
  232. package/dist/es-dev/components/text-input/index.js +4 -0
  233. package/dist/es-dev/components/textarea/daikin-textarea.d.ts +71 -0
  234. package/dist/es-dev/components/textarea/daikin-textarea.js +169 -0
  235. package/dist/es-dev/components/textarea/index.d.ts +1 -0
  236. package/dist/es-dev/components/textarea/index.js +4 -0
  237. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +61 -0
  238. package/dist/es-dev/components/toggle/daikin-toggle.js +133 -0
  239. package/dist/es-dev/components/toggle/index.d.ts +1 -0
  240. package/dist/es-dev/components/toggle/index.js +4 -0
  241. package/dist/es-dev/constants/events.d.ts +1 -0
  242. package/dist/es-dev/constants/events.js +4 -0
  243. package/dist/es-dev/index.d.ts +3 -0
  244. package/dist/es-dev/index.js +33 -0
  245. package/dist/es-dev/lit-analyzer-types.d.ts +112 -0
  246. package/dist/es-dev/tailwind.css.js +6 -0
  247. package/dist/es-dev/type-utils.d.ts +25 -0
  248. package/icons/accordion-chevron-up.svg +3 -0
  249. package/package.json +58 -27
@@ -0,0 +1,77 @@
1
+ import { LitElement } from 'lit';
2
+ import { ARIARole } from '../../lit-analyzer-types';
3
+ import { MergeVariantProps } from '../../type-utils';
4
+ import { IconType } from '../icon/daikin-icon';
5
+
6
+ declare const cvaButton: (props?: ({
7
+ intent?: "primary" | "secondary" | "tertiary" | "primaryDanger" | null | undefined;
8
+ size?: "default" | "condensed" | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ type ButtonVariantProps = MergeVariantProps<typeof cvaButton>;
11
+ /**
12
+ * The button component is a versatile UI element that triggers actions or submits forms when clicked.
13
+ * It functions similarly to the HTML `<button>` tag, allowing users to initiate various operations such as submitting data, opening dialogs, or navigating to different sections of an application.
14
+ *
15
+ * @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,
16
+ *
17
+ * @slot - A slot for the button content.
18
+ *
19
+ * @example
20
+ *
21
+ * ```html
22
+ * <daikin-button>
23
+ * Button label
24
+ * </daikin-button>
25
+ * ```
26
+ */
27
+ export declare class DaikinButton extends LitElement {
28
+ static readonly styles: import('lit').CSSResult;
29
+ /**
30
+ * Type of variant.
31
+ */
32
+ variant: ButtonVariantProps["intent"];
33
+ /**
34
+ * `true` if the button should be disabled.
35
+ */
36
+ disabled: boolean;
37
+ /**
38
+ * Set a icon in the right of button label.
39
+ */
40
+ rightIcon: IconType | null;
41
+ /**
42
+ * Set a icon in the left of button label.
43
+ */
44
+ leftIcon: IconType | null;
45
+ /**
46
+ * Link `href`. If present, this button is rendered as `<a>`.
47
+ */
48
+ href: string;
49
+ /**
50
+ * Specify the button size.
51
+ */
52
+ size: ButtonVariantProps["size"];
53
+ /**
54
+ * Specify the button type.
55
+ */
56
+ type: "button" | "submit" | "reset";
57
+ /**
58
+ * Specify the button role.
59
+ */
60
+ role: ARIARole;
61
+ /**
62
+ * Specify whether the button is loading.
63
+ */
64
+ isLoading: boolean;
65
+ render(): import('lit-html').TemplateResult<1>;
66
+ /**
67
+ * Focuses on the inner button.
68
+ * @param options focus options
69
+ */
70
+ focus(options?: FocusOptions | undefined): void;
71
+ }
72
+ declare global {
73
+ interface HTMLElementTagNameMap {
74
+ "daikin-button": DaikinButton;
75
+ }
76
+ }
77
+ export {};
@@ -0,0 +1,216 @@
1
+ import { buttonColorBackgroundPrimaryActive, buttonColorBackgroundPrimaryFocus, buttonColorBackgroundPrimaryHover, buttonColorBackgroundPrimaryPress, buttonColorBackgroundPrimaryDisabled } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
2
+ import { cva } from "class-variance-authority";
3
+ import { css, unsafeCSS, LitElement, html } from "lit";
4
+ import { property, customElement } from "lit/decorators.js";
5
+ import tailwindStyles from "../../tailwind.css.js";
6
+ import "../icon/daikin-icon.js";
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 BUTTON_ICON_SIZE_MAP = {
18
+ default: "m",
19
+ condensed: "s"
20
+ };
21
+ const cvaButton = cva(
22
+ [
23
+ "inline-flex",
24
+ "justify-center",
25
+ "items-center",
26
+ "gap-2",
27
+ "font-daikinSerif",
28
+ "font-bold",
29
+ "rounded-lg",
30
+ "tracking-wide",
31
+ "text-nowrap",
32
+ "disabled:cursor-default",
33
+ "w-full",
34
+ "h-full"
35
+ ],
36
+ {
37
+ variants: {
38
+ intent: {
39
+ primary: [
40
+ "text-white",
41
+ "bg-[--buttonColorBackgroundPrimaryActive]",
42
+ "enabled:focus-visible:bg-[--buttonColorBackgroundPrimaryFocus]",
43
+ "enabled:hover:bg-[--buttonColorBackgroundPrimaryHover]",
44
+ "enabled:active:bg-[--buttonColorBackgroundPrimaryPress]",
45
+ "disabled:bg-[--buttonColorBackgroundPrimaryDisabled]",
46
+ "focus-visible:outline-none"
47
+ ],
48
+ secondary: [
49
+ "border-2",
50
+ "bg-white",
51
+ "text-daikinBlue-500",
52
+ "border-daikinBlue-500",
53
+ "enabled:hover:text-daikinBlue-300",
54
+ "enabled:hover:border-daikinBlue-300",
55
+ "enabled:active:text-daikinBlue-600",
56
+ "enabled:active:border-daikinBlue-600",
57
+ "enabled:focus-visible:text-daikinBlue-700",
58
+ "enabled:focus-visible:border-daikinBlue-700",
59
+ "disabled:border-daikinNeutral-300",
60
+ "disabled:text-daikinNeutral-400",
61
+ "disabled:border",
62
+ "focus-visible:outline-none"
63
+ ],
64
+ tertiary: [
65
+ "text-daikinBlue-400",
66
+ "bg-none",
67
+ "border-none",
68
+ "shadow-none",
69
+ "enabled:hover:bg-daikinNeutral-100",
70
+ "disabled:bg-transparent",
71
+ "disabled:text-daikinNeutral-400"
72
+ ],
73
+ primaryDanger: [
74
+ "bg-daikinRed",
75
+ "text-white",
76
+ "enabled:hover:bg-daikinRed-400",
77
+ "enabled:focus-visible:bg-daikinRed-700",
78
+ "enabled:active:bg-daikinRed-700",
79
+ "disabled:bg-daikinNeutral-300",
80
+ "focus-visible:outline-none"
81
+ ]
82
+ },
83
+ size: {
84
+ default: ["px-4", "text-[14px]"],
85
+ condensed: ["px-[10px]", "text-[12px]"]
86
+ }
87
+ },
88
+ defaultVariants: {
89
+ intent: "primary",
90
+ size: "condensed"
91
+ }
92
+ }
93
+ );
94
+ let DaikinButton = class extends LitElement {
95
+ constructor() {
96
+ super(...arguments);
97
+ this.variant = "primary";
98
+ this.disabled = false;
99
+ this.rightIcon = null;
100
+ this.leftIcon = null;
101
+ this.href = "";
102
+ this.size = "default";
103
+ this.type = "button";
104
+ this.role = "button";
105
+ this.isLoading = false;
106
+ }
107
+ render() {
108
+ const buttonClassName = cvaButton({
109
+ intent: this.variant,
110
+ size: this.size
111
+ });
112
+ const content = html`
113
+ ${this.leftIcon ? html`<daikin-icon
114
+ icon=${this.leftIcon}
115
+ size=${BUTTON_ICON_SIZE_MAP[this.size]}
116
+ color="current"
117
+ ></daikin-icon>` : null}
118
+ <slot></slot>
119
+ ${this.rightIcon ? html`<daikin-icon
120
+ icon=${this.rightIcon}
121
+ size=${BUTTON_ICON_SIZE_MAP[this.size]}
122
+ color="current"
123
+ ></daikin-icon>` : null}
124
+ `;
125
+ if (this.href) {
126
+ return html`<a
127
+ href="${this.href}"
128
+ class="${buttonClassName}"
129
+ role="${this.role}"
130
+ >
131
+ ${content}
132
+ </a>`;
133
+ }
134
+ return html`
135
+ <button
136
+ class="${buttonClassName}"
137
+ ?disabled="${this.disabled}"
138
+ type="${this.type}"
139
+ role="${this.role}"
140
+ >
141
+ ${content}
142
+ </button>
143
+ `;
144
+ }
145
+ /**
146
+ * Focuses on the inner button.
147
+ * @param options focus options
148
+ */
149
+ focus(options) {
150
+ var _a, _b;
151
+ (_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus(options);
152
+ }
153
+ };
154
+ DaikinButton.styles = css`
155
+ ${unsafeCSS(tailwindStyles)}
156
+
157
+ :host {
158
+ --buttonColorBackgroundPrimaryActive: ${unsafeCSS(
159
+ buttonColorBackgroundPrimaryActive
160
+ )};
161
+ --buttonColorBackgroundPrimaryFocus: ${unsafeCSS(
162
+ buttonColorBackgroundPrimaryFocus
163
+ )};
164
+ --buttonColorBackgroundPrimaryHover: ${unsafeCSS(
165
+ buttonColorBackgroundPrimaryHover
166
+ )};
167
+ --buttonColorBackgroundPrimaryPress: ${unsafeCSS(
168
+ buttonColorBackgroundPrimaryPress
169
+ )};
170
+ --buttonColorBackgroundPrimaryDisabled: ${unsafeCSS(
171
+ buttonColorBackgroundPrimaryDisabled
172
+ )};
173
+
174
+ display: inline-block;
175
+ width: fit-content;
176
+ min-height: 42px;
177
+ height: 1px;
178
+ }
179
+
180
+ :host([size="condensed"]) {
181
+ min-height: 32px;
182
+ }
183
+ `;
184
+ __decorateClass([
185
+ property({ type: String })
186
+ ], DaikinButton.prototype, "variant", 2);
187
+ __decorateClass([
188
+ property({ type: Boolean, reflect: true })
189
+ ], DaikinButton.prototype, "disabled", 2);
190
+ __decorateClass([
191
+ property({ type: String, reflect: true })
192
+ ], DaikinButton.prototype, "rightIcon", 2);
193
+ __decorateClass([
194
+ property({ type: String, reflect: true })
195
+ ], DaikinButton.prototype, "leftIcon", 2);
196
+ __decorateClass([
197
+ property({ type: String, reflect: true })
198
+ ], DaikinButton.prototype, "href", 2);
199
+ __decorateClass([
200
+ property({ type: String, reflect: true })
201
+ ], DaikinButton.prototype, "size", 2);
202
+ __decorateClass([
203
+ property({ type: String, reflect: true })
204
+ ], DaikinButton.prototype, "type", 2);
205
+ __decorateClass([
206
+ property({ type: String, reflect: true })
207
+ ], DaikinButton.prototype, "role", 2);
208
+ __decorateClass([
209
+ property({ type: Boolean })
210
+ ], DaikinButton.prototype, "isLoading", 2);
211
+ DaikinButton = __decorateClass([
212
+ customElement("daikin-button")
213
+ ], DaikinButton);
214
+ export {
215
+ DaikinButton
216
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-button';
@@ -0,0 +1,4 @@
1
+ import { DaikinButton } from "./daikin-button.js";
2
+ export {
3
+ DaikinButton
4
+ };
@@ -0,0 +1,78 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import { MergeVariantProps } from '../../type-utils';
3
+
4
+ declare const cvaCheckbox: (props?: ({
5
+ size?: "small" | "large" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare const cvaLabel: (props?: ({
8
+ size?: "small" | "large" | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ type CheckboxVariantProps = MergeVariantProps<typeof cvaCheckbox | typeof cvaLabel>;
11
+ /**
12
+ * The checkbox component is a UI element that allows users to select one or more options from a list of choices.
13
+ * It functions similarly to the HTML `<input type="checkbox">` tag, enabling users to toggle the selection of each option independently.
14
+ * This component is ideal for cases where multiple selections are allowed or required.
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="checkbox">` element.
17
+ *
18
+ * @example
19
+ *
20
+ * ```html
21
+ * <daikin-checkbox label="Checkbox label" name="name" value="value"></daikin-checkbox>
22
+ * ```
23
+ */
24
+ export declare class DaikinCheckbox extends LitElement {
25
+ static readonly styles: import('lit').CSSResult;
26
+ private _handleClick;
27
+ static readonly formAssociated = true;
28
+ private _internals;
29
+ private _updateFormValue;
30
+ private _input;
31
+ get checked(): boolean;
32
+ private _handleChange;
33
+ /**
34
+ * Specify the label text for check box
35
+ */
36
+ label: string;
37
+ /**
38
+ * Specify the component size
39
+ */
40
+ size: CheckboxVariantProps["size"];
41
+ /**
42
+ * Specify the label position
43
+ * when `left` the label will be in left of checkbox, when `right` label will be in right of checkbox
44
+ */
45
+ labelPosition: "left" | "right";
46
+ /**
47
+ * Specify whether the Checkbox should be disabled
48
+ */
49
+ disabled: boolean;
50
+ /**
51
+ * Specify whether the checkbox is read only
52
+ */
53
+ readonly: boolean;
54
+ /**
55
+ * Specify whether the checkbox is be checked
56
+ */
57
+ checkState: "unchecked" | "indeterminate" | "checked";
58
+ /**
59
+ * The form name.
60
+ */
61
+ name: string;
62
+ /**
63
+ * The value.
64
+ */
65
+ value: string;
66
+ /**
67
+ * Specify whether the Checkbox is in a error state
68
+ */
69
+ error: boolean;
70
+ render(): import('lit-html').TemplateResult<1>;
71
+ updated(changedProperties: PropertyValues<this>): void;
72
+ }
73
+ declare global {
74
+ interface HTMLElementTagNameMap {
75
+ "daikin-checkbox": DaikinCheckbox;
76
+ }
77
+ }
78
+ export {};
@@ -0,0 +1,184 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { css, unsafeCSS, LitElement, html } from "lit";
3
+ import { query, property, customElement } from "lit/decorators.js";
4
+ import tailwindStyles from "../../tailwind.css.js";
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __decorateClass = (decorators, target, key, kind) => {
8
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
+ if (decorator = decorators[i])
11
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
+ if (kind && result) __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ const cvaCheckbox = cva(
16
+ [
17
+ "appearance-none",
18
+ "inline-block",
19
+ "relative",
20
+ "rounded-sm",
21
+ "border-solid",
22
+ "border-2",
23
+ "after:absolute",
24
+ "after:text-white",
25
+ "checked:after:i-daikin-checkbox-checked",
26
+ "indeterminate:after:i-daikin-checkbox-indeterminate",
27
+ "focus-visible:outline-none",
28
+ "border-daikinNeutral-400",
29
+ "enabled:indeterminate:border-daikinBlue-600",
30
+ "enabled:indeterminate:bg-daikinBlue-600",
31
+ "enabled:checked:border-daikinBlue-600",
32
+ "enabled:checked:bg-daikinBlue-600",
33
+ "aria-controllable:focus-visible:border-daikinBlue-700",
34
+ "aria-controllable:hover:border-daikinBlue-300",
35
+ "aria-controllable:active:border-daikinBlue-600",
36
+ "aria-controllable:checked:focus-visible:border-daikinBlue-700",
37
+ "aria-controllable:checked:focus-visible:border-daikinBlue-700",
38
+ "aria-controllable:checked:focus-visible:bg-daikinBlue-700",
39
+ "aria-controllable:checked:focus-visible:bg-daikinBlue-700",
40
+ "aria-controllable:checked:hover:border-daikinBlue-300",
41
+ "aria-controllable:checked:hover:bg-daikinBlue-300",
42
+ "aria-controllable:checked:active:border-daikinBlue-600",
43
+ "aria-controllable:checked:active:bg-daikinBlue-600",
44
+ "aria-controllable:indeterminate:active:border-daikinBlue-600",
45
+ "aria-controllable:indeterminate:active:bg-daikinBlue-600",
46
+ "aria-controllable:indeterminate:hover:border-daikinBlue-300",
47
+ "aria-controllable:indeterminate:hover:bg-daikinBlue-300",
48
+ "aria-controllable:indeterminate:focus-visible:border-daikinBlue-700",
49
+ "aria-controllable:indeterminate:focus-visible:bg-daikinBlue-700",
50
+ "disabled:border-daikinNeutral-200",
51
+ "disabled:bg-white",
52
+ "disabled:indeterminate:bg-daikinNeutral-200",
53
+ "disabled:checked:bg-daikinNeutral-200"
54
+ ],
55
+ {
56
+ variants: {
57
+ size: {
58
+ small: ["w-[18px]", "h-[18px]"],
59
+ large: ["w-5", "h-5"]
60
+ }
61
+ }
62
+ }
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
+ );
78
+ let DaikinCheckbox = class extends LitElement {
79
+ constructor() {
80
+ super(...arguments);
81
+ this._internals = this.attachInternals();
82
+ this.label = "";
83
+ this.size = "small";
84
+ this.labelPosition = "right";
85
+ this.disabled = false;
86
+ this.readonly = false;
87
+ this.checkState = "unchecked";
88
+ this.name = "";
89
+ this.value = "";
90
+ this.error = false;
91
+ }
92
+ _handleClick(event) {
93
+ if (this.readonly || this.disabled) {
94
+ event.preventDefault();
95
+ }
96
+ }
97
+ _updateFormValue() {
98
+ this._internals.setFormValue(this.checked ? this.value : null);
99
+ }
100
+ get checked() {
101
+ return this.checkState === "checked";
102
+ }
103
+ _handleChange(event) {
104
+ if (!this._input) {
105
+ return;
106
+ }
107
+ this.checkState = this._input.checked ? "checked" : "unchecked";
108
+ this._updateFormValue();
109
+ this.dispatchEvent(new Event("change", event));
110
+ }
111
+ render() {
112
+ const checkboxClassName = cvaCheckbox({ size: this.size });
113
+ const labelClassName = cvaLabel({ size: this.size });
114
+ const isIndeterminate = this.checkState === "indeterminate";
115
+ const labelText = this.label ? html`<span class=${labelClassName}>${this.label}</span>` : html``;
116
+ const inputTag = html`<input
117
+ class=${checkboxClassName}
118
+ type="checkbox"
119
+ name=${this.name}
120
+ value=${this.value}
121
+ aria-readonly=${this.readonly}
122
+ .indeterminate=${isIndeterminate}
123
+ .checked=${this.checked}
124
+ ?readonly=${this.readonly}
125
+ ?disabled=${this.disabled}
126
+ @change=${this._handleChange}
127
+ @click=${this._handleClick}
128
+ />`;
129
+ const content = this.labelPosition === "left" ? html`${labelText}${inputTag}` : html`${inputTag}${labelText}`;
130
+ return html`<label
131
+ class="inline-flex gap-[10px] items-center font-daikinSerif"
132
+ >${content}</label
133
+ >`;
134
+ }
135
+ updated(changedProperties) {
136
+ if (changedProperties.has("checkState")) {
137
+ this._updateFormValue();
138
+ }
139
+ }
140
+ };
141
+ DaikinCheckbox.styles = css`
142
+ ${unsafeCSS(tailwindStyles)}
143
+
144
+ :host {
145
+ display: inline-block;
146
+ }
147
+ `;
148
+ DaikinCheckbox.formAssociated = true;
149
+ __decorateClass([
150
+ query("input")
151
+ ], DaikinCheckbox.prototype, "_input", 2);
152
+ __decorateClass([
153
+ property({ type: String })
154
+ ], DaikinCheckbox.prototype, "label", 2);
155
+ __decorateClass([
156
+ property({ type: String })
157
+ ], DaikinCheckbox.prototype, "size", 2);
158
+ __decorateClass([
159
+ property({ type: String, attribute: "label-position" })
160
+ ], 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
+ __decorateClass([
168
+ property({ type: String, reflect: true, attribute: "check-state" })
169
+ ], 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
+ __decorateClass([
177
+ property({ type: Boolean, reflect: true })
178
+ ], DaikinCheckbox.prototype, "error", 2);
179
+ DaikinCheckbox = __decorateClass([
180
+ customElement("daikin-checkbox")
181
+ ], DaikinCheckbox);
182
+ export {
183
+ DaikinCheckbox
184
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-checkbox';
@@ -0,0 +1,4 @@
1
+ import { DaikinCheckbox } from "./daikin-checkbox.js";
2
+ export {
3
+ DaikinCheckbox
4
+ };
@@ -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;