@daikin-oss/design-system-web-components 0.4.0 → 0.5.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 (293) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/components/accordion/daikin-accordion.cjs +3 -10
  3. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +15 -14
  4. package/dist/cjs/components/button/daikin-button.cjs +13 -13
  5. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +35 -34
  6. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +367 -0
  7. package/dist/cjs/components/dropdown/daikin-dropdown.d.ts +100 -0
  8. package/dist/cjs/components/dropdown/index.cjs +7 -0
  9. package/dist/cjs/components/dropdown/index.d.ts +1 -0
  10. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
  11. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
  12. package/dist/cjs/components/dropdown-item/index.cjs +7 -0
  13. package/dist/cjs/components/dropdown-item/index.d.ts +1 -0
  14. package/dist/cjs/components/icon/icons.json.cjs +10 -6
  15. package/dist/cjs/components/icon/icons.json.d.ts +10 -6
  16. package/dist/cjs/components/index.cjs +31 -6
  17. package/dist/cjs/components/index.d.ts +7 -2
  18. package/dist/cjs/components/input-group/daikin-input-group.cjs +103 -46
  19. package/dist/cjs/components/input-group/daikin-input-group.d.ts +65 -27
  20. package/dist/cjs/components/list-item/daikin-list-item.cjs +16 -10
  21. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +1 -1
  22. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +75 -0
  23. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
  24. package/dist/cjs/components/progress-indicator/index.cjs +7 -0
  25. package/dist/cjs/components/progress-indicator/index.d.ts +1 -0
  26. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
  27. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
  28. package/dist/cjs/components/progress-indicator-item/index.cjs +7 -0
  29. package/dist/cjs/components/progress-indicator-item/index.d.ts +1 -0
  30. package/dist/cjs/components/radio/daikin-radio.cjs +38 -17
  31. package/dist/cjs/components/radio/daikin-radio.d.ts +14 -0
  32. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +144 -0
  33. package/dist/cjs/components/radio-group/daikin-radio-group.d.ts +82 -0
  34. package/dist/cjs/components/radio-group/index.cjs +7 -0
  35. package/dist/cjs/components/radio-group/index.d.ts +1 -0
  36. package/dist/cjs/components/select/daikin-select.cjs +160 -0
  37. package/dist/cjs/components/select/daikin-select.d.ts +60 -0
  38. package/dist/cjs/components/select/index.cjs +7 -0
  39. package/dist/cjs/components/select/index.d.ts +1 -0
  40. package/dist/cjs/components/tab/daikin-tab.cjs +27 -22
  41. package/dist/cjs/components/tab-panels/daikin-tab-panels.d.ts +3 -3
  42. package/dist/cjs/components/tabs/daikin-tabs.cjs +6 -1
  43. package/dist/cjs/components/tabs/daikin-tabs.d.ts +1 -5
  44. package/dist/cjs/components/text-area/daikin-text-area.cjs +164 -0
  45. package/dist/{es/components/textarea/daikin-textarea.d.ts → cjs/components/text-area/daikin-text-area.d.ts} +31 -24
  46. package/dist/cjs/components/text-area/index.cjs +7 -0
  47. package/dist/cjs/components/text-area/index.d.ts +1 -0
  48. package/dist/cjs/components/text-field/daikin-text-field.cjs +211 -0
  49. package/dist/cjs/components/text-field/daikin-text-field.d.ts +94 -0
  50. package/dist/cjs/components/text-field/index.cjs +7 -0
  51. package/dist/cjs/components/text-field/index.d.ts +1 -0
  52. package/dist/cjs/components/toggle/daikin-toggle.cjs +12 -12
  53. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +77 -70
  54. package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +35 -15
  55. package/dist/cjs/controllers/click-outside.cjs +29 -0
  56. package/dist/cjs/controllers/click-outside.d.ts +37 -0
  57. package/dist/cjs/controllers/floating-ui-auto-update.cjs +75 -0
  58. package/dist/cjs/controllers/floating-ui-auto-update.d.ts +22 -0
  59. package/dist/cjs/controllers/helpers/controller-directive.cjs +50 -0
  60. package/dist/cjs/controllers/helpers/controller-directive.d.ts +12 -0
  61. package/dist/cjs/index.cjs +31 -6
  62. package/dist/cjs/tailwind.css.cjs +1 -1
  63. package/dist/cjs/utils/reDispatch.cjs +10 -0
  64. package/dist/cjs/utils/reDispatch.d.ts +1 -0
  65. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +3 -10
  66. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +15 -14
  67. package/dist/cjs-dev/components/button/daikin-button.cjs +13 -13
  68. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +35 -34
  69. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +367 -0
  70. package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
  71. package/dist/cjs-dev/components/dropdown/index.cjs +7 -0
  72. package/dist/cjs-dev/components/dropdown/index.d.ts +1 -0
  73. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
  74. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
  75. package/dist/cjs-dev/components/dropdown-item/index.cjs +7 -0
  76. package/dist/cjs-dev/components/dropdown-item/index.d.ts +1 -0
  77. package/dist/cjs-dev/components/icon/icons.json.cjs +10 -6
  78. package/dist/cjs-dev/components/icon/icons.json.d.ts +10 -6
  79. package/dist/cjs-dev/components/index.cjs +31 -6
  80. package/dist/cjs-dev/components/index.d.ts +7 -2
  81. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +103 -46
  82. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +65 -27
  83. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +16 -10
  84. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +1 -1
  85. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +85 -0
  86. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
  87. package/dist/cjs-dev/components/progress-indicator/index.cjs +7 -0
  88. package/dist/cjs-dev/components/progress-indicator/index.d.ts +1 -0
  89. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
  90. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
  91. package/dist/cjs-dev/components/progress-indicator-item/index.cjs +7 -0
  92. package/dist/cjs-dev/components/progress-indicator-item/index.d.ts +1 -0
  93. package/dist/cjs-dev/components/radio/daikin-radio.cjs +38 -17
  94. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +14 -0
  95. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +144 -0
  96. package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
  97. package/dist/cjs-dev/components/radio-group/index.cjs +7 -0
  98. package/dist/cjs-dev/components/radio-group/index.d.ts +1 -0
  99. package/dist/cjs-dev/components/select/daikin-select.cjs +160 -0
  100. package/dist/cjs-dev/components/select/daikin-select.d.ts +60 -0
  101. package/dist/cjs-dev/components/select/index.cjs +7 -0
  102. package/dist/cjs-dev/components/select/index.d.ts +1 -0
  103. package/dist/cjs-dev/components/tab/daikin-tab.cjs +27 -22
  104. package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.d.ts +3 -3
  105. package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +6 -1
  106. package/dist/cjs-dev/components/tabs/daikin-tabs.d.ts +1 -5
  107. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +164 -0
  108. package/dist/{es-dev/components/textarea/daikin-textarea.d.ts → cjs-dev/components/text-area/daikin-text-area.d.ts} +31 -24
  109. package/dist/cjs-dev/components/text-area/index.cjs +7 -0
  110. package/dist/cjs-dev/components/text-area/index.d.ts +1 -0
  111. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +211 -0
  112. package/dist/cjs-dev/components/text-field/daikin-text-field.d.ts +94 -0
  113. package/dist/cjs-dev/components/text-field/index.cjs +7 -0
  114. package/dist/cjs-dev/components/text-field/index.d.ts +1 -0
  115. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +12 -12
  116. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +77 -70
  117. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +35 -15
  118. package/dist/cjs-dev/controllers/click-outside.cjs +29 -0
  119. package/dist/cjs-dev/controllers/click-outside.d.ts +37 -0
  120. package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +82 -0
  121. package/dist/cjs-dev/controllers/floating-ui-auto-update.d.ts +22 -0
  122. package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +50 -0
  123. package/dist/cjs-dev/controllers/helpers/controller-directive.d.ts +12 -0
  124. package/dist/cjs-dev/index.cjs +31 -6
  125. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  126. package/dist/cjs-dev/utils/reDispatch.cjs +10 -0
  127. package/dist/cjs-dev/utils/reDispatch.d.ts +1 -0
  128. package/dist/es/components/accordion/daikin-accordion.js +3 -10
  129. package/dist/es/components/accordion-item/daikin-accordion-item.js +15 -14
  130. package/dist/es/components/button/daikin-button.js +13 -13
  131. package/dist/es/components/checkbox/daikin-checkbox.js +35 -34
  132. package/dist/es/components/dropdown/daikin-dropdown.d.ts +100 -0
  133. package/dist/es/components/dropdown/daikin-dropdown.js +368 -0
  134. package/dist/es/components/dropdown/index.d.ts +1 -0
  135. package/dist/es/components/dropdown/index.js +4 -0
  136. package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
  137. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +113 -0
  138. package/dist/es/components/dropdown-item/index.d.ts +1 -0
  139. package/dist/es/components/dropdown-item/index.js +4 -0
  140. package/dist/es/components/icon/icons.json.d.ts +10 -6
  141. package/dist/es/components/icon/icons.json.js +10 -6
  142. package/dist/es/components/index.d.ts +7 -2
  143. package/dist/es/components/index.js +14 -4
  144. package/dist/es/components/input-group/daikin-input-group.d.ts +65 -27
  145. package/dist/es/components/input-group/daikin-input-group.js +105 -48
  146. package/dist/es/components/list-item/daikin-list-item.js +16 -10
  147. package/dist/es/components/progress-bar/daikin-progress-bar.js +1 -1
  148. package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
  149. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +76 -0
  150. package/dist/es/components/progress-indicator/index.d.ts +1 -0
  151. package/dist/es/components/progress-indicator/index.js +4 -0
  152. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
  153. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
  154. package/dist/es/components/progress-indicator-item/index.d.ts +1 -0
  155. package/dist/es/components/progress-indicator-item/index.js +4 -0
  156. package/dist/es/components/radio/daikin-radio.d.ts +14 -0
  157. package/dist/es/components/radio/daikin-radio.js +39 -18
  158. package/dist/es/components/radio-group/daikin-radio-group.d.ts +82 -0
  159. package/dist/es/components/radio-group/daikin-radio-group.js +145 -0
  160. package/dist/es/components/radio-group/index.d.ts +1 -0
  161. package/dist/es/components/radio-group/index.js +4 -0
  162. package/dist/es/components/select/daikin-select.d.ts +60 -0
  163. package/dist/es/components/select/daikin-select.js +161 -0
  164. package/dist/es/components/select/index.d.ts +1 -0
  165. package/dist/es/components/select/index.js +4 -0
  166. package/dist/es/components/tab/daikin-tab.js +27 -22
  167. package/dist/es/components/tab-panels/daikin-tab-panels.d.ts +3 -3
  168. package/dist/es/components/tabs/daikin-tabs.d.ts +1 -5
  169. package/dist/es/components/tabs/daikin-tabs.js +6 -1
  170. package/dist/{cjs/components/textarea/daikin-textarea.d.ts → es/components/text-area/daikin-text-area.d.ts} +31 -24
  171. package/dist/es/components/text-area/daikin-text-area.js +165 -0
  172. package/dist/es/components/text-area/index.d.ts +1 -0
  173. package/dist/es/components/text-area/index.js +4 -0
  174. package/dist/es/components/text-field/daikin-text-field.d.ts +94 -0
  175. package/dist/es/components/text-field/daikin-text-field.js +212 -0
  176. package/dist/es/components/text-field/index.d.ts +1 -0
  177. package/dist/es/components/text-field/index.js +4 -0
  178. package/dist/es/components/toggle/daikin-toggle.js +12 -12
  179. package/dist/es/components/tooltip/daikin-tooltip.d.ts +35 -15
  180. package/dist/es/components/tooltip/daikin-tooltip.js +78 -71
  181. package/dist/es/controllers/click-outside.d.ts +37 -0
  182. package/dist/es/controllers/click-outside.js +29 -0
  183. package/dist/es/controllers/floating-ui-auto-update.d.ts +22 -0
  184. package/dist/es/controllers/floating-ui-auto-update.js +75 -0
  185. package/dist/es/controllers/helpers/controller-directive.d.ts +12 -0
  186. package/dist/es/controllers/helpers/controller-directive.js +50 -0
  187. package/dist/es/index.js +14 -4
  188. package/dist/es/tailwind.css.js +1 -1
  189. package/dist/es/utils/reDispatch.d.ts +1 -0
  190. package/dist/es/utils/reDispatch.js +10 -0
  191. package/dist/es-dev/components/accordion/daikin-accordion.js +3 -10
  192. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +15 -14
  193. package/dist/es-dev/components/button/daikin-button.js +13 -13
  194. package/dist/es-dev/components/checkbox/daikin-checkbox.js +35 -34
  195. package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
  196. package/dist/es-dev/components/dropdown/daikin-dropdown.js +368 -0
  197. package/dist/es-dev/components/dropdown/index.d.ts +1 -0
  198. package/dist/es-dev/components/dropdown/index.js +4 -0
  199. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
  200. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +113 -0
  201. package/dist/es-dev/components/dropdown-item/index.d.ts +1 -0
  202. package/dist/es-dev/components/dropdown-item/index.js +4 -0
  203. package/dist/es-dev/components/icon/icons.json.d.ts +10 -6
  204. package/dist/es-dev/components/icon/icons.json.js +10 -6
  205. package/dist/es-dev/components/index.d.ts +7 -2
  206. package/dist/es-dev/components/index.js +14 -4
  207. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +65 -27
  208. package/dist/es-dev/components/input-group/daikin-input-group.js +105 -48
  209. package/dist/es-dev/components/list-item/daikin-list-item.js +16 -10
  210. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +1 -1
  211. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
  212. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +86 -0
  213. package/dist/es-dev/components/progress-indicator/index.d.ts +1 -0
  214. package/dist/es-dev/components/progress-indicator/index.js +4 -0
  215. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
  216. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
  217. package/dist/es-dev/components/progress-indicator-item/index.d.ts +1 -0
  218. package/dist/es-dev/components/progress-indicator-item/index.js +4 -0
  219. package/dist/es-dev/components/radio/daikin-radio.d.ts +14 -0
  220. package/dist/es-dev/components/radio/daikin-radio.js +39 -18
  221. package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
  222. package/dist/es-dev/components/radio-group/daikin-radio-group.js +145 -0
  223. package/dist/es-dev/components/radio-group/index.d.ts +1 -0
  224. package/dist/es-dev/components/radio-group/index.js +4 -0
  225. package/dist/es-dev/components/select/daikin-select.d.ts +60 -0
  226. package/dist/es-dev/components/select/daikin-select.js +161 -0
  227. package/dist/es-dev/components/select/index.d.ts +1 -0
  228. package/dist/es-dev/components/select/index.js +4 -0
  229. package/dist/es-dev/components/tab/daikin-tab.js +27 -22
  230. package/dist/es-dev/components/tab-panels/daikin-tab-panels.d.ts +3 -3
  231. package/dist/es-dev/components/tabs/daikin-tabs.d.ts +1 -5
  232. package/dist/es-dev/components/tabs/daikin-tabs.js +6 -1
  233. package/dist/{cjs-dev/components/textarea/daikin-textarea.d.ts → es-dev/components/text-area/daikin-text-area.d.ts} +31 -24
  234. package/dist/es-dev/components/text-area/daikin-text-area.js +165 -0
  235. package/dist/es-dev/components/text-area/index.d.ts +1 -0
  236. package/dist/es-dev/components/text-area/index.js +4 -0
  237. package/dist/es-dev/components/text-field/daikin-text-field.d.ts +94 -0
  238. package/dist/es-dev/components/text-field/daikin-text-field.js +212 -0
  239. package/dist/es-dev/components/text-field/index.d.ts +1 -0
  240. package/dist/es-dev/components/text-field/index.js +4 -0
  241. package/dist/es-dev/components/toggle/daikin-toggle.js +12 -12
  242. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +35 -15
  243. package/dist/es-dev/components/tooltip/daikin-tooltip.js +78 -71
  244. package/dist/es-dev/controllers/click-outside.d.ts +37 -0
  245. package/dist/es-dev/controllers/click-outside.js +29 -0
  246. package/dist/es-dev/controllers/floating-ui-auto-update.d.ts +22 -0
  247. package/dist/es-dev/controllers/floating-ui-auto-update.js +82 -0
  248. package/dist/es-dev/controllers/helpers/controller-directive.d.ts +12 -0
  249. package/dist/es-dev/controllers/helpers/controller-directive.js +50 -0
  250. package/dist/es-dev/index.js +14 -4
  251. package/dist/es-dev/tailwind.css.js +1 -1
  252. package/dist/es-dev/utils/reDispatch.d.ts +1 -0
  253. package/dist/es-dev/utils/reDispatch.js +10 -0
  254. package/icons/dropdown-check.svg +3 -0
  255. package/icons/dropdown-chevron-down.svg +3 -0
  256. package/icons/required.svg +3 -0
  257. package/icons/status-error.svg +1 -1
  258. package/icons/{notification-status-negative.svg → status-negative.svg} +1 -1
  259. package/icons/status-positive.svg +4 -14
  260. package/icons/status-success.svg +6 -0
  261. package/package.json +2 -2
  262. package/dist/cjs/components/text-input/daikin-text-input.cjs +0 -138
  263. package/dist/cjs/components/text-input/daikin-text-input.d.ts +0 -73
  264. package/dist/cjs/components/text-input/index.cjs +0 -7
  265. package/dist/cjs/components/text-input/index.d.ts +0 -1
  266. package/dist/cjs/components/textarea/daikin-textarea.cjs +0 -168
  267. package/dist/cjs/components/textarea/index.cjs +0 -7
  268. package/dist/cjs/components/textarea/index.d.ts +0 -1
  269. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +0 -138
  270. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +0 -73
  271. package/dist/cjs-dev/components/text-input/index.cjs +0 -7
  272. package/dist/cjs-dev/components/text-input/index.d.ts +0 -1
  273. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +0 -168
  274. package/dist/cjs-dev/components/textarea/index.cjs +0 -7
  275. package/dist/cjs-dev/components/textarea/index.d.ts +0 -1
  276. package/dist/es/components/text-input/daikin-text-input.d.ts +0 -73
  277. package/dist/es/components/text-input/daikin-text-input.js +0 -139
  278. package/dist/es/components/text-input/index.d.ts +0 -1
  279. package/dist/es/components/text-input/index.js +0 -4
  280. package/dist/es/components/textarea/daikin-textarea.js +0 -169
  281. package/dist/es/components/textarea/index.d.ts +0 -1
  282. package/dist/es/components/textarea/index.js +0 -4
  283. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +0 -73
  284. package/dist/es-dev/components/text-input/daikin-text-input.js +0 -139
  285. package/dist/es-dev/components/text-input/index.d.ts +0 -1
  286. package/dist/es-dev/components/text-input/index.js +0 -4
  287. package/dist/es-dev/components/textarea/daikin-textarea.js +0 -169
  288. package/dist/es-dev/components/textarea/index.d.ts +0 -1
  289. package/dist/es-dev/components/textarea/index.js +0 -4
  290. package/icons/notification-status-positive.svg +0 -5
  291. /package/icons/{notification-status-alarm.svg → status-alarm.svg} +0 -0
  292. /package/icons/{notification-status-information.svg → status-information.svg} +0 -0
  293. /package/icons/{notification-status-warning.svg → status-warning.svg} +0 -0
@@ -0,0 +1,93 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { css, unsafeCSS, LitElement, html } from "lit";
3
+ import { property, customElement } from "lit/decorators.js";
4
+ import { ifDefined } from "lit/directives/if-defined.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 cvaContainer = cva(
18
+ [
19
+ "flex",
20
+ "flex-col",
21
+ "gap-1",
22
+ "w-full",
23
+ "text-system-element-text-primary",
24
+ "pt-1",
25
+ "border-t-4",
26
+ "font-daikinSerif"
27
+ ],
28
+ {
29
+ variants: {
30
+ status: {
31
+ unfinished: ["border-system-state-disabled"],
32
+ inprogress: ["border-system-state-primary-active"],
33
+ finished: ["border-system-state-primary-active"]
34
+ }
35
+ }
36
+ }
37
+ );
38
+ const cvaLabel = cva(
39
+ ["flex", "items-center", "gap-2", "font-bold", "leading-5"],
40
+ {
41
+ variants: {
42
+ status: {
43
+ unfinished: [],
44
+ inprogress: [],
45
+ finished: [
46
+ "after:size-4",
47
+ "after:i-daikin-status-success",
48
+ "after:text-system-state-primary-active"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ );
54
+ let DaikinProgressIndicatorItem = class extends LitElement {
55
+ constructor() {
56
+ super(...arguments);
57
+ this.status = "unfinished";
58
+ this.current = false;
59
+ }
60
+ render() {
61
+ return html`<div
62
+ class=${cvaContainer({
63
+ status: this.status
64
+ })}
65
+ role="listitem"
66
+ aria-current=${ifDefined(this.current ? "step" : void 0)}
67
+ >
68
+ <slot class=${cvaLabel({ status: this.status })}></slot>
69
+ <slot name="description" class="text-sm leading-[18px]"></slot>
70
+ </div>`;
71
+ }
72
+ };
73
+ DaikinProgressIndicatorItem.styles = css`
74
+ ${unsafeCSS(tailwindStyles)}
75
+
76
+ :host {
77
+ display: block;
78
+ width: 100%;
79
+ min-width: 142px;
80
+ }
81
+ `;
82
+ __decorateClass([
83
+ property({ type: String, reflect: true })
84
+ ], DaikinProgressIndicatorItem.prototype, "status", 2);
85
+ __decorateClass([
86
+ property({ type: Boolean, reflect: true })
87
+ ], DaikinProgressIndicatorItem.prototype, "current", 2);
88
+ DaikinProgressIndicatorItem = __decorateClass([
89
+ customElement("daikin-progress-indicator-item")
90
+ ], DaikinProgressIndicatorItem);
91
+ export {
92
+ DaikinProgressIndicatorItem
93
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-progress-indicator-item';
@@ -0,0 +1,4 @@
1
+ import { DaikinProgressIndicatorItem } from "./daikin-progress-indicator-item.js";
2
+ export {
3
+ DaikinProgressIndicatorItem
4
+ };
@@ -4,6 +4,9 @@ import { LitElement } from 'lit';
4
4
  * It functions similarly to the HTML `<input type="radio">` tag. \
5
5
  * Please note that **a radio group component is not yet available**, so you'll need to manually group radio buttons when using multiple instances.
6
6
  *
7
+ * Hierarchies:
8
+ * - `daikin-radio-group` > `daikin-radio`
9
+ *
7
10
  * @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.
8
11
  *
9
12
  * @example
@@ -44,7 +47,18 @@ export declare class DaikinRadio extends LitElement {
44
47
  * Whether the radio button is disabled.
45
48
  */
46
49
  disabled: boolean;
50
+ /**
51
+ * Whether the radio button can be focused.
52
+ * Automatically set by `daikin-radio-group` component.
53
+ */
54
+ skipTab: boolean;
47
55
  static readonly formAssociated = true;
56
+ private _radio;
57
+ /**
58
+ * Focuses on the inner radio.
59
+ * @param options focus options
60
+ */
61
+ focus(options?: FocusOptions): void;
48
62
  private _internals;
49
63
  private _updateFormValue;
50
64
  private _handleClick;
@@ -1,6 +1,7 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { css, unsafeCSS, LitElement, html, nothing } from "lit";
3
- import { property, customElement } from "lit/decorators.js";
3
+ import { property, query, customElement } from "lit/decorators.js";
4
+ import { ifDefined } from "lit/directives/if-defined.js";
4
5
  import tailwindStyles from "../../tailwind.css.js";
5
6
  var __defProp = Object.defineProperty;
6
7
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -17,29 +18,28 @@ const RADIO_CLASS_NAME = cva([
17
18
  "justify-center",
18
19
  "items-center",
19
20
  "size-4",
20
- "bg-white",
21
21
  "rounded-full",
22
22
  "relative",
23
23
  "appearance-none",
24
24
  "focus-visible:outline",
25
- "focus-visible:outline-1",
26
- "focus-visible:outline-offset-1",
27
- "focus-visible:outline-daikinBlue-700",
25
+ "focus-visible:outline-2",
26
+ "focus-visible:outline-offset-2",
27
+ "focus-visible:outline-system-state-focus",
28
28
  "unchecked:border-2",
29
- "enabled:unchecked:border-daikinNeutral-600",
30
- "enabled:unchecked:hover:border-daikinNeutral-400",
31
- "enabled:unchecked:active:border-daikinNeutral-700",
29
+ "enabled:unchecked:border-system-state-neutral-active",
30
+ "enabled:unchecked:hover:bg-system-background-surface-hover",
31
+ "enabled:unchecked:active:bg-system-background-surface-press",
32
32
  "checked:border-[5px]",
33
- "enabled:checked:border-daikinBlue-500",
34
- "enabled:checked:group-hover:border-daikinBlue-300",
35
- "enabled:checked:group-active:border-daikinBlue-600",
36
- "disabled:border-daikinNeutral-200"
33
+ "enabled:checked:border-system-state-primary-active",
34
+ "enabled:checked:group-hover:border-system-state-primary-hover",
35
+ "enabled:checked:group-active:border-system-state-primary-press",
36
+ "disabled:border-system-state-disabled"
37
37
  ])();
38
- const cvaLabel = cva([], {
38
+ const cvaLabel = cva(["pr-2"], {
39
39
  variants: {
40
40
  disabled: {
41
- false: [],
42
- true: ["text-daikinNeutral-200"]
41
+ false: ["text-system-element-text-primary"],
42
+ true: ["text-system-state-disabled"]
43
43
  }
44
44
  }
45
45
  });
@@ -52,8 +52,17 @@ let DaikinRadio = class extends LitElement {
52
52
  this.labelPosition = "right";
53
53
  this.checked = false;
54
54
  this.disabled = false;
55
+ this.skipTab = false;
55
56
  this._internals = this.attachInternals();
56
57
  }
58
+ /**
59
+ * Focuses on the inner radio.
60
+ * @param options focus options
61
+ */
62
+ focus(options) {
63
+ var _a;
64
+ (_a = this._radio) == null ? void 0 : _a.focus(options);
65
+ }
57
66
  _updateFormValue() {
58
67
  this._internals.setFormValue(this.checked ? this.value : null);
59
68
  }
@@ -65,11 +74,16 @@ let DaikinRadio = class extends LitElement {
65
74
  _handleChange(event) {
66
75
  this.checked = event.target.checked;
67
76
  this._updateFormValue();
68
- this.dispatchEvent(new Event("change", event));
77
+ this.dispatchEvent(
78
+ new Event("change", {
79
+ bubbles: true,
80
+ composed: true
81
+ })
82
+ );
69
83
  }
70
84
  render() {
71
85
  return html`<label class="group flex gap-2 items-center font-daikinSerif">
72
- <div class="p-2">
86
+ <span class="p-2">
73
87
  <input
74
88
  class=${RADIO_CLASS_NAME}
75
89
  type="radio"
@@ -80,8 +94,9 @@ let DaikinRadio = class extends LitElement {
80
94
  .checked=${this.checked}
81
95
  @click=${this._handleClick}
82
96
  @change=${this._handleChange}
97
+ tabindex=${ifDefined(this.skipTab ? "-1" : void 0)}
83
98
  />
84
- </div>
99
+ </span>
85
100
  <span
86
101
  class=${cvaLabel({
87
102
  disabled: this.disabled
@@ -124,6 +139,12 @@ __decorateClass([
124
139
  __decorateClass([
125
140
  property({ type: Boolean, reflect: true })
126
141
  ], DaikinRadio.prototype, "disabled", 2);
142
+ __decorateClass([
143
+ property({ type: Boolean, attribute: false })
144
+ ], DaikinRadio.prototype, "skipTab", 2);
145
+ __decorateClass([
146
+ query("input")
147
+ ], DaikinRadio.prototype, "_radio", 2);
127
148
  DaikinRadio = __decorateClass([
128
149
  customElement("daikin-radio")
129
150
  ], DaikinRadio);
@@ -0,0 +1,82 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import { MergeVariantProps } from '../../type-utils';
3
+ import { DaikinInputGroup } from '../input-group';
4
+ declare const radioGroupCN: (props?: ({
5
+ orientation?: "horizontal" | "vertical" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ type RadioGroupProps = MergeVariantProps<typeof radioGroupCN>;
8
+ /**
9
+ * Radio groups are used to group multiple radio buttons so that make sure that only one will be selected in the group
10
+ *
11
+ * Hierarchies:
12
+ * - `daikin-radio-group` > `daikin-radio`
13
+ * - `daikin-input-group` > `daikin-radio-group` > `daikin-radio`
14
+ *
15
+ * @fires change - A custom event emitted when current checked radio changed.
16
+ *
17
+ * @slot - A slot for radio buttons. Place `daikin-radio` elements here.
18
+ *
19
+ * @example
20
+ *
21
+ * ```html
22
+ * <daikin-radio-group name="name">
23
+ * <daikin-radio value="value1" label="Option1"></daikin-radio>
24
+ * <daikin-radio value="value2" label="Option2"></daikin-radio>
25
+ * <daikin-radio value="value3" label="Option3"></daikin-radio>
26
+ * </daikin-radio-group>
27
+ * ```
28
+ *
29
+ * ```html
30
+ * <daikin-input-group label="Label text" helper="Helper text">
31
+ * <daikin-radio-group name="name">
32
+ * <daikin-radio value="value1" label="Option1"></daikin-radio>
33
+ * <daikin-radio value="value2" label="Option2"></daikin-radio>
34
+ * <daikin-radio value="value3" label="Option3"></daikin-radio>
35
+ * </daikin-radio-group>
36
+ * </daikin-input-group>
37
+ * ```
38
+ */
39
+ export declare class DaikinRadioGroup extends LitElement {
40
+ static readonly styles: import('lit').CSSResult;
41
+ private readonly _radios;
42
+ /**
43
+ * Specify the radio group orientation
44
+ */
45
+ orientation: RadioGroupProps["orientation"];
46
+ /**
47
+ * The form name.
48
+ */
49
+ name: string;
50
+ /**
51
+ * `value` of the currently selected radio.
52
+ * see {@link DaikinRadio.value}
53
+ */
54
+ value: string;
55
+ /**
56
+ * Whether the radio group is required.
57
+ * Controlled by `daikin-input-group` when used within `daikin-input-group`.
58
+ */
59
+ required: boolean;
60
+ /**
61
+ * The label text used as the value of aria-label.
62
+ * Set automatically by `reflectInputGroup` method.
63
+ */
64
+ private _label;
65
+ private _updateRadios;
66
+ private readonly _handleRadioChange;
67
+ private _handleSlotChange;
68
+ /**
69
+ * Handles keyboard interactions in the radio list.
70
+ * https://www.w3.org/WAI/ARIA/apg/patterns/radio/
71
+ */
72
+ private _handleKeyDown;
73
+ render(): import('lit-html').TemplateResult<1>;
74
+ protected updated(changedProperties: PropertyValues<this>): void;
75
+ reflectInputGroup(inputGroup: DaikinInputGroup): void;
76
+ }
77
+ declare global {
78
+ interface HTMLElementTagNameMap {
79
+ "daikin-radio-group": DaikinRadioGroup;
80
+ }
81
+ }
82
+ export {};
@@ -0,0 +1,145 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { css, unsafeCSS, LitElement, html } from "lit";
3
+ import { queryAssignedElements, property, state, customElement } from "lit/decorators.js";
4
+ import { ifDefined } from "lit/directives/if-defined.js";
5
+ import tailwindStyles from "../../tailwind.css.js";
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result) __defProp(target, key, result);
14
+ return result;
15
+ };
16
+ const radioGroupCN = cva(["flex", "gap-2", "py-2", "pr-2"], {
17
+ variants: {
18
+ orientation: {
19
+ horizontal: ["flex-col"],
20
+ vertical: ["flex-row", "gap-3"]
21
+ }
22
+ }
23
+ });
24
+ let DaikinRadioGroup = class extends LitElement {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.orientation = "horizontal";
28
+ this.name = "";
29
+ this.value = "";
30
+ this.required = false;
31
+ this._label = null;
32
+ this._handleRadioChange = (event) => {
33
+ this.value = event.target.value;
34
+ };
35
+ }
36
+ _updateRadios() {
37
+ const radios = this._radios;
38
+ const selectedRadio = radios.find((radio) => radio.value === this.value);
39
+ const firstEnabledRadio = radios.find((radio) => !radio.disabled);
40
+ for (const daikinRadio of this._radios) {
41
+ if (this.name) {
42
+ daikinRadio.name = this.name;
43
+ }
44
+ const isSelected = daikinRadio === selectedRadio;
45
+ daikinRadio.checked = isSelected;
46
+ daikinRadio.skipTab = selectedRadio ? !isSelected : daikinRadio !== firstEnabledRadio;
47
+ }
48
+ }
49
+ _handleSlotChange() {
50
+ this._updateRadios();
51
+ }
52
+ /**
53
+ * Handles keyboard interactions in the radio list.
54
+ * https://www.w3.org/WAI/ARIA/apg/patterns/radio/
55
+ */
56
+ _handleKeyDown(event) {
57
+ const moveOffset = {
58
+ ArrowRight: 1,
59
+ ArrowDown: 1,
60
+ ArrowLeft: -1,
61
+ ArrowUp: -1
62
+ }[event.key];
63
+ if (!moveOffset) {
64
+ return;
65
+ }
66
+ event.preventDefault();
67
+ const enabledRadios = this._radios.filter(({ disabled }) => !disabled);
68
+ if (!enabledRadios.length) {
69
+ return;
70
+ }
71
+ const activeElement = document.activeElement;
72
+ const focusedRadioIndex = activeElement ? enabledRadios.findIndex((radio) => radio.contains(activeElement)) : -1;
73
+ if (focusedRadioIndex < 0) {
74
+ const activeRadio = enabledRadios.find((radio) => radio.checked) ?? enabledRadios[0];
75
+ this.value = activeRadio.value;
76
+ activeRadio.focus();
77
+ return;
78
+ }
79
+ const newIndex = (focusedRadioIndex + moveOffset + enabledRadios.length) % enabledRadios.length;
80
+ if (newIndex !== focusedRadioIndex) {
81
+ const newRadio = enabledRadios[newIndex];
82
+ this.value = newRadio.value;
83
+ newRadio.focus();
84
+ this.dispatchEvent(new Event("change"));
85
+ }
86
+ }
87
+ render() {
88
+ const radioGroupClassName = radioGroupCN({ orientation: this.orientation });
89
+ return html`<fieldset
90
+ role="radiogroup"
91
+ aria-label=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
92
+ ifDefined(this._label)}
93
+ aria-required=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
94
+ ifDefined(this.required)}
95
+ @keydown=${this._handleKeyDown}
96
+ >
97
+ <slot
98
+ class=${radioGroupClassName}
99
+ @slotchange=${this._handleSlotChange}
100
+ @change=${this._handleRadioChange}
101
+ >
102
+ </slot>
103
+ </fieldset>`;
104
+ }
105
+ updated(changedProperties) {
106
+ if (changedProperties.has("value") || changedProperties.has("name")) {
107
+ this._updateRadios();
108
+ }
109
+ }
110
+ reflectInputGroup(inputGroup) {
111
+ this._label = inputGroup.label;
112
+ this.required = !!inputGroup.required;
113
+ }
114
+ };
115
+ DaikinRadioGroup.styles = css`
116
+ ${unsafeCSS(tailwindStyles)}
117
+
118
+ :host {
119
+ display: inline-block;
120
+ }
121
+ `;
122
+ __decorateClass([
123
+ queryAssignedElements({ selector: "daikin-radio" })
124
+ ], DaikinRadioGroup.prototype, "_radios", 2);
125
+ __decorateClass([
126
+ property({ type: String })
127
+ ], DaikinRadioGroup.prototype, "orientation", 2);
128
+ __decorateClass([
129
+ property({ type: String, reflect: true })
130
+ ], DaikinRadioGroup.prototype, "name", 2);
131
+ __decorateClass([
132
+ property({ type: String, reflect: true })
133
+ ], DaikinRadioGroup.prototype, "value", 2);
134
+ __decorateClass([
135
+ property({ type: Boolean, reflect: true })
136
+ ], DaikinRadioGroup.prototype, "required", 2);
137
+ __decorateClass([
138
+ state()
139
+ ], DaikinRadioGroup.prototype, "_label", 2);
140
+ DaikinRadioGroup = __decorateClass([
141
+ customElement("daikin-radio-group")
142
+ ], DaikinRadioGroup);
143
+ export {
144
+ DaikinRadioGroup
145
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-radio-group';
@@ -0,0 +1,4 @@
1
+ import { DaikinRadioGroup } from "./daikin-radio-group.js";
2
+ export {
3
+ DaikinRadioGroup
4
+ };
@@ -0,0 +1,60 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import { DaikinInputGroup } from '../input-group';
3
+ /**
4
+ * A select component.
5
+ * This component accepts an HTML `<select>` element in the slot and applies styles to it.
6
+ * The `disabled` property of the component is also reflected in the `<select>` element in the slot.
7
+ *
8
+ * Hierarchy:
9
+ * - `daikin-input-group` > `daikin-select`
10
+ *
11
+ * @slot - A slot for an HTML `<select>` element which may contain `<option>` and `<optgroup>`.
12
+ *
13
+ * @example
14
+ *
15
+ * ```html
16
+ * <daikin-select>
17
+ * <select name="select">
18
+ * <option value="value1">Option 1</option>
19
+ * <option value="value2">Option 2</option>
20
+ * <optgroup label="Group">
21
+ * <option value="value3">Option 3</option>
22
+ * <option value="value4">Option 4</option>
23
+ * </optgroup>
24
+ * </select>
25
+ * </daikin-select>
26
+ * ```
27
+ */
28
+ export declare class DaikinSelect extends LitElement {
29
+ static readonly styles: import('lit').CSSResult;
30
+ /**
31
+ * Whether the select component is in an error state.
32
+ */
33
+ error: boolean;
34
+ /**
35
+ * Whether the select component is required.
36
+ */
37
+ required: boolean;
38
+ /**
39
+ * Whether the select component is disabled.
40
+ * This value will also be applied to the `disabled` property of the `<select>` element in the slot.
41
+ */
42
+ disabled: boolean;
43
+ private readonly _selects;
44
+ private get _select();
45
+ private _updateSelect;
46
+ private _handleSlotChange;
47
+ render(): import('lit-html').TemplateResult<1>;
48
+ protected updated(changedProperties: PropertyValues<this>): void;
49
+ reflectInputGroup(inputGroup: DaikinInputGroup): void;
50
+ /**
51
+ * Focuses on the `<select>` element in the slot.
52
+ * @param options focus options
53
+ */
54
+ focus(options?: FocusOptions): void;
55
+ }
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ "daikin-select": DaikinSelect;
59
+ }
60
+ }