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