@daikin-oss/design-system-web-components 0.1.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 (420) hide show
  1. package/README.md +139 -60
  2. package/dist/cjs/colors.cjs +80 -0
  3. package/dist/{colors.d.ts → cjs/colors.d.ts} +0 -1
  4. package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
  5. package/dist/cjs/components/accordion/daikin-accordion.d.ts +40 -0
  6. package/dist/cjs/components/accordion/index.cjs +7 -0
  7. package/dist/cjs/components/accordion/index.d.ts +1 -0
  8. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +177 -0
  9. package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  10. package/dist/cjs/components/accordion-item/index.cjs +7 -0
  11. package/dist/cjs/components/accordion-item/index.d.ts +1 -0
  12. package/dist/cjs/components/button/daikin-button.cjs +215 -0
  13. package/dist/cjs/components/button/daikin-button.d.ts +77 -0
  14. package/dist/cjs/components/button/index.cjs +7 -0
  15. package/dist/cjs/components/button/index.d.ts +1 -0
  16. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +183 -0
  17. package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +78 -0
  18. package/dist/cjs/components/checkbox/index.cjs +7 -0
  19. package/dist/cjs/components/checkbox/index.d.ts +1 -0
  20. package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
  21. package/dist/cjs/components/icon/daikin-icon.d.ts +49 -0
  22. package/dist/cjs/components/icon/icons.json.cjs +29 -0
  23. package/dist/cjs/components/icon/icons.json.d.ts +31 -0
  24. package/dist/cjs/components/icon/index.cjs +8 -0
  25. package/dist/cjs/components/icon/index.d.ts +1 -0
  26. package/dist/cjs/components/index.cjs +73 -0
  27. package/dist/cjs/components/index.d.ts +14 -0
  28. package/dist/cjs/components/input-group/daikin-input-group.cjs +119 -0
  29. package/dist/cjs/components/input-group/daikin-input-group.d.ts +73 -0
  30. package/dist/cjs/components/input-group/index.cjs +7 -0
  31. package/dist/cjs/components/input-group/index.d.ts +1 -0
  32. package/dist/cjs/components/notification/daikin-notification.cjs +191 -0
  33. package/dist/cjs/components/notification/daikin-notification.d.ts +76 -0
  34. package/dist/cjs/components/notification/index.cjs +7 -0
  35. package/dist/cjs/components/notification/index.d.ts +1 -0
  36. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
  37. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  38. package/dist/cjs/components/panel-switcher/index.cjs +7 -0
  39. package/dist/cjs/components/panel-switcher/index.d.ts +1 -0
  40. package/dist/cjs/components/radio/daikin-radio.cjs +150 -0
  41. package/dist/cjs/components/radio/daikin-radio.d.ts +76 -0
  42. package/dist/cjs/components/radio/index.cjs +7 -0
  43. package/dist/cjs/components/radio/index.d.ts +1 -0
  44. package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
  45. package/dist/cjs/components/tab/daikin-tab.d.ts +55 -0
  46. package/dist/cjs/components/tab/index.cjs +7 -0
  47. package/dist/cjs/components/tab/index.d.ts +1 -0
  48. package/dist/cjs/components/tab-group/daikin-tab-group.cjs +211 -0
  49. package/dist/cjs/components/tab-group/daikin-tab-group.d.ts +105 -0
  50. package/dist/cjs/components/tab-group/index.cjs +7 -0
  51. package/dist/cjs/components/tab-group/index.d.ts +1 -0
  52. package/dist/cjs/components/tab-group/scroller.cjs +65 -0
  53. package/dist/cjs/components/tab-group/scroller.d.ts +25 -0
  54. package/dist/cjs/components/text-input/daikin-text-input.cjs +137 -0
  55. package/dist/cjs/components/text-input/daikin-text-input.d.ts +69 -0
  56. package/dist/cjs/components/text-input/index.cjs +7 -0
  57. package/dist/cjs/components/text-input/index.d.ts +1 -0
  58. package/dist/cjs/components/textarea/daikin-textarea.cjs +168 -0
  59. package/dist/cjs/components/textarea/daikin-textarea.d.ts +71 -0
  60. package/dist/cjs/components/textarea/index.cjs +7 -0
  61. package/dist/cjs/components/textarea/index.d.ts +1 -0
  62. package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
  63. package/dist/cjs/components/toggle/daikin-toggle.d.ts +61 -0
  64. package/dist/cjs/components/toggle/index.cjs +7 -0
  65. package/dist/cjs/components/toggle/index.d.ts +1 -0
  66. package/dist/cjs/constants/events.cjs +4 -0
  67. package/dist/cjs/constants/events.d.ts +1 -0
  68. package/dist/cjs/index.cjs +75 -0
  69. package/dist/cjs/index.d.ts +3 -0
  70. package/dist/cjs/lit-analyzer-types.d.ts +112 -0
  71. package/dist/cjs/tailwind.css.cjs +6 -0
  72. package/dist/cjs/type-utils.d.ts +25 -0
  73. package/dist/cjs-dev/colors.cjs +80 -0
  74. package/{lib → dist/cjs-dev}/colors.d.ts +0 -1
  75. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
  76. package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +40 -0
  77. package/dist/cjs-dev/components/accordion/index.cjs +7 -0
  78. package/dist/cjs-dev/components/accordion/index.d.ts +1 -0
  79. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +177 -0
  80. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  81. package/dist/cjs-dev/components/accordion-item/index.cjs +7 -0
  82. package/dist/cjs-dev/components/accordion-item/index.d.ts +1 -0
  83. package/dist/cjs-dev/components/button/daikin-button.cjs +215 -0
  84. package/dist/cjs-dev/components/button/daikin-button.d.ts +77 -0
  85. package/dist/cjs-dev/components/button/index.cjs +7 -0
  86. package/dist/cjs-dev/components/button/index.d.ts +1 -0
  87. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +183 -0
  88. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
  89. package/dist/cjs-dev/components/checkbox/index.cjs +7 -0
  90. package/dist/cjs-dev/components/checkbox/index.d.ts +1 -0
  91. package/dist/cjs-dev/components/icon/daikin-icon.cjs +96 -0
  92. package/dist/cjs-dev/components/icon/daikin-icon.d.ts +49 -0
  93. package/dist/cjs-dev/components/icon/icons.json.cjs +29 -0
  94. package/dist/cjs-dev/components/icon/icons.json.d.ts +31 -0
  95. package/dist/cjs-dev/components/icon/index.cjs +8 -0
  96. package/dist/cjs-dev/components/icon/index.d.ts +1 -0
  97. package/dist/cjs-dev/components/index.cjs +73 -0
  98. package/dist/cjs-dev/components/index.d.ts +14 -0
  99. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +119 -0
  100. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +73 -0
  101. package/dist/cjs-dev/components/input-group/index.cjs +7 -0
  102. package/dist/cjs-dev/components/input-group/index.d.ts +1 -0
  103. package/dist/cjs-dev/components/notification/daikin-notification.cjs +191 -0
  104. package/dist/cjs-dev/components/notification/daikin-notification.d.ts +76 -0
  105. package/dist/cjs-dev/components/notification/index.cjs +7 -0
  106. package/dist/cjs-dev/components/notification/index.d.ts +1 -0
  107. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.cjs +62 -0
  108. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  109. package/dist/cjs-dev/components/panel-switcher/index.cjs +7 -0
  110. package/dist/cjs-dev/components/panel-switcher/index.d.ts +1 -0
  111. package/dist/cjs-dev/components/radio/daikin-radio.cjs +150 -0
  112. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +76 -0
  113. package/dist/cjs-dev/components/radio/index.cjs +7 -0
  114. package/dist/cjs-dev/components/radio/index.d.ts +1 -0
  115. package/dist/cjs-dev/components/tab/daikin-tab.cjs +126 -0
  116. package/dist/cjs-dev/components/tab/daikin-tab.d.ts +55 -0
  117. package/dist/cjs-dev/components/tab/index.cjs +7 -0
  118. package/dist/cjs-dev/components/tab/index.d.ts +1 -0
  119. package/dist/cjs-dev/components/tab-group/daikin-tab-group.cjs +221 -0
  120. package/dist/cjs-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
  121. package/dist/cjs-dev/components/tab-group/index.cjs +7 -0
  122. package/dist/cjs-dev/components/tab-group/index.d.ts +1 -0
  123. package/dist/cjs-dev/components/tab-group/scroller.cjs +65 -0
  124. package/dist/cjs-dev/components/tab-group/scroller.d.ts +25 -0
  125. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +137 -0
  126. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +69 -0
  127. package/dist/cjs-dev/components/text-input/index.cjs +7 -0
  128. package/dist/cjs-dev/components/text-input/index.d.ts +1 -0
  129. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +168 -0
  130. package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +71 -0
  131. package/dist/cjs-dev/components/textarea/index.cjs +7 -0
  132. package/dist/cjs-dev/components/textarea/index.d.ts +1 -0
  133. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +132 -0
  134. package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +61 -0
  135. package/dist/cjs-dev/components/toggle/index.cjs +7 -0
  136. package/dist/cjs-dev/components/toggle/index.d.ts +1 -0
  137. package/dist/cjs-dev/constants/events.cjs +4 -0
  138. package/dist/cjs-dev/constants/events.d.ts +1 -0
  139. package/dist/cjs-dev/index.cjs +75 -0
  140. package/dist/cjs-dev/index.d.ts +3 -0
  141. package/dist/cjs-dev/lit-analyzer-types.d.ts +112 -0
  142. package/dist/cjs-dev/tailwind.css.cjs +6 -0
  143. package/dist/cjs-dev/type-utils.d.ts +25 -0
  144. package/dist/es/colors.d.ts +69 -0
  145. package/dist/es/colors.js +80 -0
  146. package/dist/es/components/accordion/daikin-accordion.d.ts +40 -0
  147. package/dist/es/components/accordion/daikin-accordion.js +38 -0
  148. package/dist/es/components/accordion/index.d.ts +1 -0
  149. package/dist/es/components/accordion/index.js +4 -0
  150. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  151. package/dist/es/components/accordion-item/daikin-accordion-item.js +178 -0
  152. package/dist/es/components/accordion-item/index.d.ts +1 -0
  153. package/dist/es/components/accordion-item/index.js +4 -0
  154. package/dist/es/components/button/daikin-button.d.ts +77 -0
  155. package/dist/es/components/button/daikin-button.js +216 -0
  156. package/dist/es/components/button/index.d.ts +1 -0
  157. package/dist/es/components/button/index.js +4 -0
  158. package/dist/es/components/checkbox/daikin-checkbox.d.ts +78 -0
  159. package/dist/es/components/checkbox/daikin-checkbox.js +184 -0
  160. package/dist/es/components/checkbox/index.d.ts +1 -0
  161. package/dist/es/components/checkbox/index.js +4 -0
  162. package/dist/es/components/icon/daikin-icon.d.ts +49 -0
  163. package/dist/es/components/icon/daikin-icon.js +88 -0
  164. package/dist/es/components/icon/icons.json.d.ts +31 -0
  165. package/dist/es/components/icon/icons.json.js +29 -0
  166. package/dist/es/components/icon/index.d.ts +1 -0
  167. package/dist/es/components/icon/index.js +5 -0
  168. package/dist/es/components/index.d.ts +14 -0
  169. package/dist/es/components/index.js +31 -0
  170. package/dist/es/components/input-group/daikin-input-group.d.ts +73 -0
  171. package/dist/es/components/input-group/daikin-input-group.js +120 -0
  172. package/dist/es/components/input-group/index.d.ts +1 -0
  173. package/dist/es/components/input-group/index.js +4 -0
  174. package/dist/es/components/notification/daikin-notification.d.ts +76 -0
  175. package/dist/es/components/notification/daikin-notification.js +192 -0
  176. package/dist/es/components/notification/index.d.ts +1 -0
  177. package/dist/es/components/notification/index.js +4 -0
  178. package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  179. package/dist/es/components/panel-switcher/daikin-panel-switcher.js +56 -0
  180. package/dist/es/components/panel-switcher/index.d.ts +1 -0
  181. package/dist/es/components/panel-switcher/index.js +4 -0
  182. package/dist/es/components/radio/daikin-radio.d.ts +76 -0
  183. package/dist/es/components/radio/daikin-radio.js +151 -0
  184. package/dist/es/components/radio/index.d.ts +1 -0
  185. package/dist/es/components/radio/index.js +4 -0
  186. package/dist/es/components/tab/daikin-tab.d.ts +55 -0
  187. package/dist/es/components/tab/daikin-tab.js +127 -0
  188. package/dist/es/components/tab/index.d.ts +1 -0
  189. package/dist/es/components/tab/index.js +4 -0
  190. package/dist/es/components/tab-group/daikin-tab-group.d.ts +105 -0
  191. package/dist/es/components/tab-group/daikin-tab-group.js +212 -0
  192. package/dist/es/components/tab-group/index.d.ts +1 -0
  193. package/dist/es/components/tab-group/index.js +4 -0
  194. package/dist/es/components/tab-group/scroller.d.ts +25 -0
  195. package/dist/es/components/tab-group/scroller.js +65 -0
  196. package/dist/es/components/text-input/daikin-text-input.d.ts +69 -0
  197. package/dist/es/components/text-input/daikin-text-input.js +138 -0
  198. package/dist/es/components/text-input/index.d.ts +1 -0
  199. package/dist/es/components/text-input/index.js +4 -0
  200. package/dist/es/components/textarea/daikin-textarea.d.ts +71 -0
  201. package/dist/es/components/textarea/daikin-textarea.js +169 -0
  202. package/dist/es/components/textarea/index.d.ts +1 -0
  203. package/dist/es/components/textarea/index.js +4 -0
  204. package/dist/es/components/toggle/daikin-toggle.d.ts +61 -0
  205. package/dist/es/components/toggle/daikin-toggle.js +133 -0
  206. package/dist/es/components/toggle/index.d.ts +1 -0
  207. package/dist/es/components/toggle/index.js +4 -0
  208. package/dist/es/constants/events.d.ts +1 -0
  209. package/dist/es/constants/events.js +4 -0
  210. package/dist/es/index.d.ts +3 -0
  211. package/dist/es/index.js +33 -0
  212. package/dist/es/lit-analyzer-types.d.ts +112 -0
  213. package/dist/es/tailwind.css.js +6 -0
  214. package/dist/es/type-utils.d.ts +25 -0
  215. package/dist/es-dev/colors.d.ts +69 -0
  216. package/dist/es-dev/colors.js +80 -0
  217. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +40 -0
  218. package/dist/es-dev/components/accordion/daikin-accordion.js +38 -0
  219. package/dist/es-dev/components/accordion/index.d.ts +1 -0
  220. package/dist/es-dev/components/accordion/index.js +4 -0
  221. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +56 -0
  222. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +178 -0
  223. package/dist/es-dev/components/accordion-item/index.d.ts +1 -0
  224. package/dist/es-dev/components/accordion-item/index.js +4 -0
  225. package/dist/es-dev/components/button/daikin-button.d.ts +77 -0
  226. package/dist/es-dev/components/button/daikin-button.js +216 -0
  227. package/dist/es-dev/components/button/index.d.ts +1 -0
  228. package/dist/es-dev/components/button/index.js +4 -0
  229. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +78 -0
  230. package/dist/es-dev/components/checkbox/daikin-checkbox.js +184 -0
  231. package/dist/es-dev/components/checkbox/index.d.ts +1 -0
  232. package/dist/es-dev/components/checkbox/index.js +4 -0
  233. package/dist/es-dev/components/icon/daikin-icon.d.ts +49 -0
  234. package/dist/es-dev/components/icon/daikin-icon.js +97 -0
  235. package/dist/es-dev/components/icon/icons.json.d.ts +31 -0
  236. package/dist/es-dev/components/icon/icons.json.js +29 -0
  237. package/dist/es-dev/components/icon/index.d.ts +1 -0
  238. package/dist/es-dev/components/icon/index.js +5 -0
  239. package/dist/es-dev/components/index.d.ts +14 -0
  240. package/dist/es-dev/components/index.js +31 -0
  241. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +73 -0
  242. package/dist/es-dev/components/input-group/daikin-input-group.js +120 -0
  243. package/dist/es-dev/components/input-group/index.d.ts +1 -0
  244. package/dist/es-dev/components/input-group/index.js +4 -0
  245. package/dist/es-dev/components/notification/daikin-notification.d.ts +76 -0
  246. package/dist/es-dev/components/notification/daikin-notification.js +192 -0
  247. package/dist/es-dev/components/notification/index.d.ts +1 -0
  248. package/dist/es-dev/components/notification/index.js +4 -0
  249. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +51 -0
  250. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.js +63 -0
  251. package/dist/es-dev/components/panel-switcher/index.d.ts +1 -0
  252. package/dist/es-dev/components/panel-switcher/index.js +4 -0
  253. package/dist/es-dev/components/radio/daikin-radio.d.ts +76 -0
  254. package/dist/es-dev/components/radio/daikin-radio.js +151 -0
  255. package/dist/es-dev/components/radio/index.d.ts +1 -0
  256. package/dist/es-dev/components/radio/index.js +4 -0
  257. package/dist/es-dev/components/tab/daikin-tab.d.ts +55 -0
  258. package/dist/es-dev/components/tab/daikin-tab.js +127 -0
  259. package/dist/es-dev/components/tab/index.d.ts +1 -0
  260. package/dist/es-dev/components/tab/index.js +4 -0
  261. package/dist/es-dev/components/tab-group/daikin-tab-group.d.ts +105 -0
  262. package/dist/es-dev/components/tab-group/daikin-tab-group.js +222 -0
  263. package/dist/es-dev/components/tab-group/index.d.ts +1 -0
  264. package/dist/es-dev/components/tab-group/index.js +4 -0
  265. package/dist/es-dev/components/tab-group/scroller.d.ts +25 -0
  266. package/dist/es-dev/components/tab-group/scroller.js +65 -0
  267. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +69 -0
  268. package/dist/es-dev/components/text-input/daikin-text-input.js +138 -0
  269. package/dist/es-dev/components/text-input/index.d.ts +1 -0
  270. package/dist/es-dev/components/text-input/index.js +4 -0
  271. package/dist/es-dev/components/textarea/daikin-textarea.d.ts +71 -0
  272. package/dist/es-dev/components/textarea/daikin-textarea.js +169 -0
  273. package/dist/es-dev/components/textarea/index.d.ts +1 -0
  274. package/dist/es-dev/components/textarea/index.js +4 -0
  275. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +61 -0
  276. package/dist/es-dev/components/toggle/daikin-toggle.js +133 -0
  277. package/dist/es-dev/components/toggle/index.d.ts +1 -0
  278. package/dist/es-dev/components/toggle/index.js +4 -0
  279. package/dist/es-dev/constants/events.d.ts +1 -0
  280. package/dist/es-dev/constants/events.js +4 -0
  281. package/dist/es-dev/index.d.ts +3 -0
  282. package/dist/es-dev/index.js +33 -0
  283. package/dist/es-dev/lit-analyzer-types.d.ts +112 -0
  284. package/dist/es-dev/tailwind.css.js +6 -0
  285. package/dist/es-dev/type-utils.d.ts +25 -0
  286. package/icons/accordion-chevron-up.svg +3 -0
  287. package/icons/checkbox-checked.svg +4 -0
  288. package/icons/checkbox-indeterminate.svg +3 -0
  289. package/icons/input-group-error.svg +11 -0
  290. package/icons/notification-close.svg +5 -0
  291. package/icons/notification-status-alarm.svg +5 -0
  292. package/icons/notification-status-information.svg +5 -0
  293. package/icons/notification-status-negative.svg +3 -0
  294. package/icons/notification-status-positive.svg +5 -0
  295. package/icons/notification-status-warning.svg +5 -0
  296. package/icons/radio-checked.svg +4 -0
  297. package/icons/radio-unchecked.svg +4 -0
  298. package/package.json +146 -88
  299. package/dist/_virtual/_tslib.js +0 -31
  300. package/dist/_virtual/_tslib.js.map +0 -1
  301. package/dist/colors.d.ts.map +0 -1
  302. package/dist/colors.js +0 -81
  303. package/dist/colors.js.map +0 -1
  304. package/dist/components/button/button.css.js +0 -7
  305. package/dist/components/button/button.css.js.map +0 -1
  306. package/dist/components/button/daikin-button.d.ts +0 -75
  307. package/dist/components/button/daikin-button.d.ts.map +0 -1
  308. package/dist/components/button/daikin-button.js +0 -200
  309. package/dist/components/button/daikin-button.js.map +0 -1
  310. package/dist/components/button/index.d.ts +0 -2
  311. package/dist/components/button/index.d.ts.map +0 -1
  312. package/dist/components/button/index.js +0 -2
  313. package/dist/components/button/index.js.map +0 -1
  314. package/dist/components/button/stories/common.d.ts +0 -15
  315. package/dist/components/button/stories/common.d.ts.map +0 -1
  316. package/dist/components/index.d.ts +0 -2
  317. package/dist/components/index.d.ts.map +0 -1
  318. package/dist/components/index.js +0 -2
  319. package/dist/components/index.js.map +0 -1
  320. package/dist/index.d.ts +0 -3
  321. package/dist/index.d.ts.map +0 -1
  322. package/dist/index.js +0 -3
  323. package/dist/index.js.map +0 -1
  324. package/dist/lit-workaround-types.d.ts +0 -3
  325. package/dist/lit-workaround-types.d.ts.map +0 -1
  326. package/dist/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js +0 -66
  327. package/dist/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
  328. package/dist/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js +0 -66
  329. package/dist/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
  330. package/dist/node_modules/@lit/reactive-element/node/css-tag.js +0 -9
  331. package/dist/node_modules/@lit/reactive-element/node/css-tag.js.map +0 -1
  332. package/dist/node_modules/@lit/reactive-element/node/decorators/custom-element.js +0 -9
  333. package/dist/node_modules/@lit/reactive-element/node/decorators/custom-element.js.map +0 -1
  334. package/dist/node_modules/@lit/reactive-element/node/decorators/property.js +0 -9
  335. package/dist/node_modules/@lit/reactive-element/node/decorators/property.js.map +0 -1
  336. package/dist/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js +0 -6
  337. package/dist/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js.map +0 -1
  338. package/dist/node_modules/@lit/reactive-element/node/reactive-element.js +0 -12
  339. package/dist/node_modules/@lit/reactive-element/node/reactive-element.js.map +0 -1
  340. package/dist/node_modules/@lit-labs/ssr-dom-shim/index.js +0 -122
  341. package/dist/node_modules/@lit-labs/ssr-dom-shim/index.js.map +0 -1
  342. package/dist/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js +0 -85
  343. package/dist/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map +0 -1
  344. package/dist/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js +0 -13
  345. package/dist/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js.map +0 -1
  346. package/dist/node_modules/class-variance-authority/dist/index.js +0 -47
  347. package/dist/node_modules/class-variance-authority/dist/index.js.map +0 -1
  348. package/dist/node_modules/clsx/dist/clsx.js +0 -4
  349. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  350. package/dist/node_modules/lit-element/lit-element.js +0 -13
  351. package/dist/node_modules/lit-element/lit-element.js.map +0 -1
  352. package/dist/node_modules/lit-html/node/lit-html.js +0 -9
  353. package/dist/node_modules/lit-html/node/lit-html.js.map +0 -1
  354. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -29
  355. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  356. package/dist/tailwind.css.js +0 -7
  357. package/dist/tailwind.css.js.map +0 -1
  358. package/dist/typeUtils.d.ts +0 -4
  359. package/dist/typeUtils.d.ts.map +0 -1
  360. package/lib/_virtual/_tslib.js +0 -33
  361. package/lib/_virtual/_tslib.js.map +0 -1
  362. package/lib/colors.d.ts.map +0 -1
  363. package/lib/colors.js +0 -83
  364. package/lib/colors.js.map +0 -1
  365. package/lib/components/button/button.css.js +0 -9
  366. package/lib/components/button/button.css.js.map +0 -1
  367. package/lib/components/button/daikin-button.d.ts +0 -75
  368. package/lib/components/button/daikin-button.d.ts.map +0 -1
  369. package/lib/components/button/daikin-button.js +0 -202
  370. package/lib/components/button/daikin-button.js.map +0 -1
  371. package/lib/components/button/index.d.ts +0 -2
  372. package/lib/components/button/index.d.ts.map +0 -1
  373. package/lib/components/button/index.js +0 -8
  374. package/lib/components/button/index.js.map +0 -1
  375. package/lib/components/button/stories/common.d.ts +0 -15
  376. package/lib/components/button/stories/common.d.ts.map +0 -1
  377. package/lib/components/index.d.ts +0 -2
  378. package/lib/components/index.d.ts.map +0 -1
  379. package/lib/components/index.js +0 -5
  380. package/lib/components/index.js.map +0 -1
  381. package/lib/index.d.ts +0 -3
  382. package/lib/index.d.ts.map +0 -1
  383. package/lib/index.js +0 -9
  384. package/lib/index.js.map +0 -1
  385. package/lib/lit-workaround-types.d.ts +0 -3
  386. package/lib/lit-workaround-types.d.ts.map +0 -1
  387. package/lib/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js +0 -125
  388. package/lib/node_modules/@daikin-oss/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
  389. package/lib/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js +0 -125
  390. package/lib/node_modules/@daikinlab/dds-tokens/build/js/DKN/Light/variables.js.map +0 -1
  391. package/lib/node_modules/@lit/reactive-element/node/css-tag.js +0 -16
  392. package/lib/node_modules/@lit/reactive-element/node/css-tag.js.map +0 -1
  393. package/lib/node_modules/@lit/reactive-element/node/decorators/custom-element.js +0 -11
  394. package/lib/node_modules/@lit/reactive-element/node/decorators/custom-element.js.map +0 -1
  395. package/lib/node_modules/@lit/reactive-element/node/decorators/property.js +0 -11
  396. package/lib/node_modules/@lit/reactive-element/node/decorators/property.js.map +0 -1
  397. package/lib/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js +0 -8
  398. package/lib/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js.map +0 -1
  399. package/lib/node_modules/@lit/reactive-element/node/reactive-element.js +0 -21
  400. package/lib/node_modules/@lit/reactive-element/node/reactive-element.js.map +0 -1
  401. package/lib/node_modules/@lit-labs/ssr-dom-shim/index.js +0 -126
  402. package/lib/node_modules/@lit-labs/ssr-dom-shim/index.js.map +0 -1
  403. package/lib/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js +0 -87
  404. package/lib/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map +0 -1
  405. package/lib/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js +0 -15
  406. package/lib/node_modules/@netlify/classnames-template-literals/dist/classnames-template-literals.esm.js.map +0 -1
  407. package/lib/node_modules/class-variance-authority/dist/index.js +0 -50
  408. package/lib/node_modules/class-variance-authority/dist/index.js.map +0 -1
  409. package/lib/node_modules/clsx/dist/clsx.js +0 -9
  410. package/lib/node_modules/clsx/dist/clsx.js.map +0 -1
  411. package/lib/node_modules/lit-element/lit-element.js +0 -20
  412. package/lib/node_modules/lit-element/lit-element.js.map +0 -1
  413. package/lib/node_modules/lit-html/node/lit-html.js +0 -14
  414. package/lib/node_modules/lit-html/node/lit-html.js.map +0 -1
  415. package/lib/node_modules/style-inject/dist/style-inject.es.js +0 -31
  416. package/lib/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  417. package/lib/tailwind.css.js +0 -9
  418. package/lib/tailwind.css.js.map +0 -1
  419. package/lib/typeUtils.d.ts +0 -4
  420. package/lib/typeUtils.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,30 +1,73 @@
1
1
  # Daikin Design System - Web Components
2
2
 
3
- This project is an implementation of the Daikin Design Kit using web components.
3
+ This project is an implementation of the Daikin Design Kit using Web Components.
4
4
 
5
5
  ---
6
+
6
7
  ## Usage
7
8
 
8
9
  Start by installing the package:
9
10
 
10
- ```bash
11
- npm i @daikin-oss/design-system-web-components
11
+ ```sh
12
+ npm install @daikin-oss/design-system-web-components
12
13
  ```
13
14
 
14
- You can then import necessary components in your bundle:
15
+ You can then import necessary components in your bundle (the .js extension is optional):
15
16
 
16
- ```javascript
17
- import '@daikin-oss/design-system-web-components/dist/components/button/index.js';
17
+ ```js
18
+ import "@daikin-oss/design-system-web-components/components/button/index.js";
18
19
  ```
19
20
 
20
21
  By default, out-of-the-box, the styles are for Daikin brand in light mode.
21
22
 
23
+ ### Fonts
24
+
25
+ We use Roboto as the font for our UI components.
26
+ This font is not included in our package, so developers will need to include it in their apps.
27
+
28
+ The required weights and variants are as follows:
29
+
30
+ - Regular (400), Normal
31
+ - Bold (700), Normal
32
+
33
+ #### With Google Fonts
34
+
35
+ If you can use an external CDN, you can use Google Fonts to load it.
36
+
37
+ ```html
38
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
39
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
40
+ <link
41
+ href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"
42
+ rel="stylesheet"
43
+ />
44
+ ```
45
+
46
+ #### With Fontsource
47
+
48
+ If you want to deliver fonts within your app without relying on an external CDN, you can use a package like [Fontsource](https://fontsource.org/fonts/roboto) to do this.
49
+
50
+ Install the package with:
51
+
52
+ ```sh
53
+ npm install @fontsource/roboto
54
+ ```
55
+
56
+ Then import it in your app:
57
+
58
+ ```js
59
+ import "@fontsource/roboto/400.css";
60
+ import "@fontsource/roboto/700.css";
61
+ ```
62
+
22
63
  ### Dark Mode and Brands/Themes
23
64
 
65
+ _Due to the encapsulation of styles by the Web Components specification, how themes are applied may change in the future._
66
+
24
67
  For dark-mode support and non-daikin brands, you need to add the `tokens` package and include the CSS reference in your html:
25
68
 
26
- ```bash
27
- npm install '@daikin-oss/dds-tokens
69
+ ```sh
70
+ npm install @daikin-oss/dds-tokens
28
71
  ```
29
72
 
30
73
  #### Dark Mode
@@ -32,15 +75,18 @@ npm install '@daikin-oss/dds-tokens
32
75
  Reference the CSS in HTML:
33
76
 
34
77
  ```html
35
- <link rel="stylesheet" href="node_modules/@daikin-oss/dds-tokens/build/css/DKN/Dark/buttons.css" media="(prefers-color-scheme: dark)">
78
+ <link
79
+ rel="stylesheet"
80
+ href="node_modules/@daikin-oss/dds-tokens/build/css/DKN/Dark/buttons.css"
81
+ media="(prefers-color-scheme: dark)"
82
+ />
36
83
  ```
37
84
 
38
85
  Using CSS `@import` with `prefers-color-scheme`:
39
86
 
40
87
  ```css
41
- @import '@daikin-oss/dds-tokens/css/daikin/Dark/buttons.css'
42
- (prefers-color-scheme: dark);
43
-
88
+ @import "@daikin-oss/dds-tokens/css/daikin/Dark/buttons.css"
89
+ (prefers-color-scheme: dark);
44
90
  ```
45
91
 
46
92
  #### Other brands/themes
@@ -48,21 +94,30 @@ Using CSS `@import` with `prefers-color-scheme`:
48
94
  Reference the CSS in HTML:
49
95
 
50
96
  ```html
51
- <link rel="stylesheet" href="node_modules/@daikin-oss/dds-tokens/build/css/AAF/Dark/buttons.css" media="(prefers-color-scheme: light)">
52
- <link rel="stylesheet" href="node_modules/@daikin-oss/dds-tokens/build/css/AAF/Dark/buttons.css" media="(prefers-color-scheme: dark)">
97
+ <link
98
+ rel="stylesheet"
99
+ href="node_modules/@daikin-oss/dds-tokens/build/css/AAF/Dark/buttons.css"
100
+ media="(prefers-color-scheme: light)"
101
+ />
102
+ <link
103
+ rel="stylesheet"
104
+ href="node_modules/@daikin-oss/dds-tokens/build/css/AAF/Dark/buttons.css"
105
+ media="(prefers-color-scheme: dark)"
106
+ />
53
107
  ```
54
108
 
55
109
  Using CSS `@import` with `prefers-color-scheme`:
56
110
 
57
111
  ```css
58
- @import '@daikin-oss/dds-tokens/css/aaf/Light/buttons.css'
59
- (prefers-color-scheme: light);
60
- @import '@daikin-oss/dds-tokens/css/aaf/Dark/buttons.css'
61
- (prefers-color-scheme: dark);
112
+ @import "@daikin-oss/dds-tokens/css/aaf/Light/buttons.css"
113
+ (prefers-color-scheme: light);
114
+ @import "@daikin-oss/dds-tokens/css/aaf/Dark/buttons.css"
115
+ (prefers-color-scheme: dark);
62
116
  ```
63
117
 
64
118
  ---
65
- ## Contributors
119
+
120
+ ## Contribution
66
121
 
67
122
  The following are instructions for package contributors.
68
123
 
@@ -73,7 +128,12 @@ Clone and install dependencies:
73
128
  ```bash
74
129
  git clone https://github.com/dsv-rp/DDS.git
75
130
  cd DDS
131
+
132
+ # install dependencies
76
133
  npm i
134
+
135
+ # install Playwright browsers
136
+ npx playwright install
77
137
  ```
78
138
 
79
139
  ### Build
@@ -84,22 +144,25 @@ To build files for production:
84
144
  npm run build
85
145
  ```
86
146
 
87
- Rollup is used to transform TypeScript code into JavaScript that runs in modern browsers.
88
- Tailwind classes are also purged.
147
+ Vite is used to transform TypeScript code into JavaScript that runs in modern browsers.
89
148
 
90
- Build components and output in /dist:
149
+ The built files are written to `/dist`.
91
150
 
92
151
  ### Documentation
93
152
 
94
153
  Storybook is used to document design system components/tools/examples.
95
154
 
96
- To run in development:
155
+ To run in development mode:
97
156
 
98
157
  ```bash
158
+ # Web Components version
99
159
  npm run storybook
160
+
161
+ # or React version
162
+ npm run storybook:react
100
163
  ```
101
164
 
102
- To produce distributable files in /storybook-static folder:
165
+ To produce distributable files in `/storybook-static/web-components` and `/storybook-static/react` folder:
103
166
 
104
167
  ```bash
105
168
  npm run build-storybook
@@ -107,69 +170,85 @@ npm run build-storybook
107
170
 
108
171
  ### Testing
109
172
 
110
- Visual regression testing is done by a combination of jest and puppeteer.
111
- Currently, web components has full support in most major frameworks [except for React](https://custom-elements-everywhere.com/).
112
- As such, we test both web components by themselves, and also test when imported by React:
173
+ There are currently two test suites: VRT (Visual Regression Test) and Interaction Test.
174
+
175
+ Visual regression testing, placed in `*.visual.test.ts`, is done by Playwright running in a container.
176
+ To eliminate rendering differences between environments, the browser which takes the screenshots must run on a container.
177
+
178
+ Currently, Web Components has full support in most major frameworks [except for React](https://custom-elements-everywhere.com/).
179
+ As such, we test both Web Components by themselves, and also test when imported by React:
113
180
 
114
181
  ```bash
115
- npm run test
182
+ # start a container for running the browsers
183
+ docker compose up -d
184
+
185
+ # run VRT for Web Components and React versions
186
+ npm run test:visual
187
+
188
+ # stop the container
189
+ docker compose down
116
190
  ```
117
191
 
118
- ### Linting
192
+ For Podman users, use `podman-compose -f compose.podman.yaml` or `podman compose -f compose.podman.yaml` instead of `docker compose`.
193
+
194
+ To update snapshots, use `npm run test:visual-update`
119
195
 
120
- Linting is done by ESLint for general linting of TypeScript and JavaScript, and [lit-analyzer](https://www.npmjs.com/package/lit-analyzer) to type check bindings in lit-html templates.
196
+ ---
121
197
 
122
- To lint the project run:
198
+ Interaction testing, placed in `*.stories.ts`, is performed by Storybook, which also uses Playwright internally.
199
+ Interaction tests do not use containers since rendering differences between environments do not matter.
200
+
201
+ ```bash
202
+ npm run test:interaction
203
+ ```
204
+
205
+ ### Linting and Type checking
206
+
207
+ Linting is performed by ESLint for general linting of JavaScript and TypeScript, and [lit-analyzer](https://www.npmjs.com/package/lit-analyzer) to type check bindings in lit-html templates.
208
+ [cSpell](https://cspell.org/) is used for spell checking.
209
+ [ls-lint](https://ls-lint.org/) is also used to ensure that consistent filenames are used.
210
+
211
+ To lint the project, run:
123
212
 
124
213
  ```bash
125
214
  npm run lint
215
+ npx tsc -b
126
216
  ```
127
217
 
218
+ If you encounter an `Unknown word` error, add the word to the `cspell-dictionary.txt`.
219
+
128
220
  ### Design Tokens
129
221
 
222
+ _We are looking for a more efficient way to import tokens._
223
+
130
224
  1. **Source of Truth**: The `tokens` we use is the foundation of our design styles and was grabbed from https://github.com/dsv-rp/dds-tokens/tree/main.
131
225
 
132
226
  2. **Using in Components**: For the most part, we use the js variables to apply as the default style:
133
227
 
134
228
  ```javascript
135
229
  import {
136
- buttonColorBackgroundPrimaryActive
230
+ buttonColorBackgroundPrimaryActive
137
231
  } from '@daikin-oss/dds-tokens/js/daikin/Light/variables.js';
138
232
 
139
233
  class DaikinButton extends LitElement implements DaikinButtonProps {
140
- static styles = css`
141
- :host {
142
- --defaultButtonColorBackgroundPrimaryActive: ${unsafeCSS(
143
- buttonColorBackgroundPrimaryActive
144
- )};
145
- }
146
- `;
147
-
148
- ...rest of the code
234
+ static styles = css`
235
+ :host {
236
+ --defaultButtonColorBackgroundPrimaryActive: ${unsafeCSS(
237
+ buttonColorBackgroundPrimaryActive
238
+ )};
239
+ }
240
+ `;
241
+
242
+ /* ...rest of the code */
149
243
  }
150
244
  ```
151
245
 
152
- ### Tailwind
246
+ ### TailwindCSS
153
247
 
154
- There is a custom `daikinPlugin` managed [here](https://github.com/dsv-rp/tailwind)
248
+ There is a custom `daikinPlugin` managed [here](https://github.com/dsv-rp/tailwind).
155
249
 
156
- ### Using with VSCode
157
-
158
- If you are using VSCode, there is a great [extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) you can use for auto-complete
159
-
160
- Add the following to your VSCode `settings.json` file:
161
-
162
- ```json
163
- {
164
- "editor.quickSuggestions": {
165
- "other": true,
166
- "comments": false,
167
- "strings": true
168
- },
169
- "tailwindCSS.experimental.classRegex": ["ctl[(]`([^`]*)"]
170
- }
171
- ```
250
+ ### Developing with VSCode
172
251
 
173
- You may need to set the regex if using a library like [classnames-template-literals](https://github.com/netlify/classnames-template-literals)
252
+ This project provides recommended extensions and workspace settings for VSCode.
174
253
 
175
254
  References [Daikin Design Kit](https://www.figma.com/file/VyaaU8Ta9yzyf0PsURWSSf/DDS%3A-Design-Kit?node-id=2421%3A7943)
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const variables_js = require("@daikin-oss/dds-tokens/js/daikin/Light/variables.js");
4
+ const DAIKIN_PRIMARY_BLUE = variables_js.colorBrandPrimary;
5
+ const DAIKIN_SECONDARY_BLUE = variables_js.colorBlue40;
6
+ const DAIKIN_DARK_GREY = variables_js.colorGrey90;
7
+ const DAIKIN_MEDIUM_GREY = variables_js.colorGrey70;
8
+ const DAIKIN_NEGATIVE = variables_js.colorRed60;
9
+ const DAIKIN_WARNING = variables_js.colorYellow50;
10
+ const DAIKIN_POSITIVE = variables_js.colorGreen60;
11
+ const colors = {
12
+ daikinBlue: {
13
+ 50: variables_js.colorBlue10,
14
+ 100: variables_js.colorBlue20,
15
+ 200: variables_js.colorBlue30,
16
+ 300: DAIKIN_SECONDARY_BLUE,
17
+ 400: variables_js.colorBlue50,
18
+ 500: DAIKIN_PRIMARY_BLUE,
19
+ 600: variables_js.colorBlue70,
20
+ 700: variables_js.colorBlue80,
21
+ 800: variables_js.colorBlue90,
22
+ 900: variables_js.colorBlue100,
23
+ DEFAULT: DAIKIN_PRIMARY_BLUE
24
+ },
25
+ daikinNeutral: {
26
+ 50: variables_js.colorGrey10,
27
+ 100: variables_js.colorGrey20,
28
+ 200: variables_js.colorGrey30,
29
+ 300: variables_js.colorGrey40,
30
+ 400: variables_js.colorGrey50,
31
+ 500: variables_js.colorGrey60,
32
+ 600: DAIKIN_MEDIUM_GREY,
33
+ 700: variables_js.colorGrey80,
34
+ 800: DAIKIN_DARK_GREY,
35
+ 900: variables_js.colorGrey100
36
+ },
37
+ daikinRed: {
38
+ 50: variables_js.colorRed10,
39
+ 100: variables_js.colorRed20,
40
+ 200: variables_js.colorRed30,
41
+ 300: variables_js.colorRed40,
42
+ 400: variables_js.colorRed50,
43
+ 500: DAIKIN_NEGATIVE,
44
+ 600: variables_js.colorRed70,
45
+ 700: variables_js.colorRed80,
46
+ 800: variables_js.colorRed90,
47
+ 900: variables_js.colorRed100,
48
+ 1e3: variables_js.colorRed110,
49
+ DEFAULT: DAIKIN_NEGATIVE
50
+ },
51
+ daikinYellow: {
52
+ 50: variables_js.colorYellow10,
53
+ 100: variables_js.colorYellow20,
54
+ 200: variables_js.colorYellow30,
55
+ 300: variables_js.colorYellow40,
56
+ 400: DAIKIN_WARNING,
57
+ 500: variables_js.colorYellow60,
58
+ 600: variables_js.colorYellow70,
59
+ 700: variables_js.colorYellow80,
60
+ 800: variables_js.colorYellow90,
61
+ 900: variables_js.colorYellow100,
62
+ 1e3: variables_js.colorYellow110,
63
+ DEFAULT: DAIKIN_WARNING
64
+ },
65
+ daikinGreen: {
66
+ 50: variables_js.colorGreen10,
67
+ 100: variables_js.colorGreen20,
68
+ 200: variables_js.colorGreen30,
69
+ 300: variables_js.colorGreen40,
70
+ 400: variables_js.colorGreen50,
71
+ 500: DAIKIN_POSITIVE,
72
+ 600: variables_js.colorGreen70,
73
+ 700: variables_js.colorGreen80,
74
+ 800: variables_js.colorGreen90,
75
+ 900: variables_js.colorGreen100,
76
+ 1e3: variables_js.colorGreen110,
77
+ DEFAULT: DAIKIN_POSITIVE
78
+ }
79
+ };
80
+ exports.colors = colors;
@@ -67,4 +67,3 @@ export declare const colors: {
67
67
  DEFAULT: string;
68
68
  };
69
69
  };
70
- //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const lit = require("lit");
4
+ const decorators_js = require("lit/decorators.js");
5
+ const tailwind = require("../../tailwind.css.cjs");
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
+ exports.DaikinAccordion = class DaikinAccordion extends lit.LitElement {
17
+ render() {
18
+ return lit.html`<div class="w-full border-y-[1px] border-y-[#CECECE]">
19
+ <slot></slot>
20
+ </div>`;
21
+ }
22
+ };
23
+ exports.DaikinAccordion.styles = lit.css`
24
+ ${lit.unsafeCSS(tailwind.default)}
25
+
26
+ :host {
27
+ display: block;
28
+ width: 100%;
29
+ }
30
+
31
+ ::slotted(daikin-accordion-item:not(:last-child)) {
32
+ border-bottom: 1px solid #cecece;
33
+ }
34
+ `;
35
+ exports.DaikinAccordion = __decorateClass([
36
+ decorators_js.customElement("daikin-accordion")
37
+ ], exports.DaikinAccordion);
@@ -0,0 +1,40 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ /**
4
+ * The accordion component serves as the parent element that organizes and manages the overall structure of the accordion.
5
+ * Currently it only provides appropriate styles for individual accordion items.
6
+ *
7
+ * Hierarchy:
8
+ * - `daikin-accordion` > `daikin-accordion-item`
9
+ *
10
+ * @slot - A slot for the accordion items. Place `daikin-accordion-item` elements here.
11
+ *
12
+ * @example
13
+ *
14
+ * ```html
15
+ * <daikin-accordion>
16
+ * <daikin-accordion-item title="The first accordion item">
17
+ * Accordion 1 content.
18
+ * </daikin-accordion-item>
19
+ * <daikin-accordion-item title="The second accordion item" open>
20
+ * Accordion 2 content.
21
+ * </daikin-accordion-item>
22
+ * <daikin-accordion-item title="The third accordion item" disabled>
23
+ * Accordion 3 content.
24
+ * </daikin-accordion-item>
25
+ * <daikin-accordion-item title="The fourth accordion item" open disabled>
26
+ * Accordion 4 content.
27
+ * </daikin-accordion-item>
28
+ * </daikin-accordion>
29
+ * ```
30
+ */
31
+ export declare class DaikinAccordion extends LitElement {
32
+ static readonly styles: import('lit').CSSResult;
33
+ render(): import('lit-html').TemplateResult<1>;
34
+ }
35
+ declare global {
36
+ interface HTMLElementTagNameMap {
37
+ "daikin-accordion": DaikinAccordion;
38
+ }
39
+ }
40
+ export default DaikinAccordion;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const daikinAccordion = require("./daikin-accordion.cjs");
4
+ Object.defineProperty(exports, "DaikinAccordion", {
5
+ enumerable: true,
6
+ get: () => daikinAccordion.DaikinAccordion
7
+ });
@@ -0,0 +1 @@
1
+ export * from './daikin-accordion';
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const classVarianceAuthority = require("class-variance-authority");
4
+ const lit = require("lit");
5
+ const decorators_js = require("lit/decorators.js");
6
+ const ref_js = require("lit/directives/ref.js");
7
+ const tailwind = require("../../tailwind.css.cjs");
8
+ var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __decorateClass = (decorators, target, key, kind) => {
11
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
13
+ if (decorator = decorators[i])
14
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15
+ if (kind && result) __defProp(target, key, result);
16
+ return result;
17
+ };
18
+ const cvaDetails = classVarianceAuthority.cva(
19
+ ["flex", "w-full", "h-max", "bg-white", "font-daikinSerif", "overflow-clip"],
20
+ {
21
+ variants: {
22
+ status: {
23
+ enabled: [],
24
+ disabled: ["text-[#DCDCDC]"]
25
+ }
26
+ }
27
+ }
28
+ );
29
+ const cvaSummary = classVarianceAuthority.cva(
30
+ [
31
+ "flex",
32
+ "items-center",
33
+ "w-full",
34
+ "h-12",
35
+ "px-5",
36
+ "outline-none",
37
+ "relative",
38
+ "after:block",
39
+ "after:w-5",
40
+ "after:h-5",
41
+ "after:m-auto",
42
+ "after:top-0",
43
+ "after:right-4",
44
+ "after:bottom-0",
45
+ "after:absolute",
46
+ "after:i-daikin-accordion-chevron-up",
47
+ "after:transition-all"
48
+ ],
49
+ {
50
+ variants: {
51
+ visible: {
52
+ open: ["after:rotate-0"],
53
+ close: ["after:-rotate-180"]
54
+ },
55
+ status: {
56
+ enabled: [
57
+ "hover:bg-[#DCDCDC]",
58
+ "hover:bg-[#DCDCDC]",
59
+ "hover:cursor-pointer",
60
+ "focus-visible:outline",
61
+ "focus-visible:outline-[2px]",
62
+ "focus-visible:outline-[#0097E0]",
63
+ "focus-visible:outline-offset-[-2px]",
64
+ "after:text-[#828282]"
65
+ ],
66
+ disabled: ["text-[#DCDCDC]", "after:text-[#DCDCDC]"]
67
+ }
68
+ }
69
+ }
70
+ );
71
+ const animationOption = {
72
+ duration: 250,
73
+ easing: "ease-in-out"
74
+ };
75
+ const contentCloseKeyframe = {
76
+ height: 0
77
+ };
78
+ const getContentOpenKeyframe = (content) => ({
79
+ height: `${content.offsetHeight}px`
80
+ });
81
+ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
82
+ constructor() {
83
+ super(...arguments);
84
+ this._contentRef = ref_js.createRef();
85
+ this.title = "";
86
+ this.open = false;
87
+ this.disabled = false;
88
+ this._detailsOpen = false;
89
+ }
90
+ _contentAnimate() {
91
+ const content = this._contentRef.value;
92
+ if (!content || this.open === this._detailsOpen) {
93
+ return;
94
+ }
95
+ if (this.open) {
96
+ this._detailsOpen = this.open;
97
+ content.animate(
98
+ [contentCloseKeyframe, getContentOpenKeyframe(content)],
99
+ animationOption
100
+ );
101
+ } else {
102
+ const animation = content.animate(
103
+ [getContentOpenKeyframe(content), contentCloseKeyframe],
104
+ animationOption
105
+ );
106
+ animation.onfinish = () => {
107
+ this._detailsOpen = this.open;
108
+ };
109
+ }
110
+ }
111
+ _handleSummaryClick(e) {
112
+ e.preventDefault();
113
+ if (this.disabled) {
114
+ return;
115
+ }
116
+ this.open = !this.open;
117
+ }
118
+ render() {
119
+ const accordionDetailsClassName = cvaDetails({
120
+ status: this.disabled ? "disabled" : "enabled"
121
+ });
122
+ const accordionSummaryClassName = cvaSummary({
123
+ status: this.disabled ? "disabled" : "enabled",
124
+ visible: this.open ? "open" : "close"
125
+ });
126
+ return lit.html`<details
127
+ class=${accordionDetailsClassName}
128
+ ?open=${this._detailsOpen}
129
+ ?data-open=${this.open}
130
+ aria-disabled=${this.disabled}
131
+ >
132
+ <summary
133
+ class=${accordionSummaryClassName}
134
+ tabindex=${this.disabled ? -1 : 0}
135
+ @click=${this._handleSummaryClick}
136
+ >
137
+ ${this.title}
138
+ </summary>
139
+ <div ${ref_js.ref(this._contentRef)}>
140
+ <div class="pt-2 pb-6 px-5 text-sm">
141
+ <slot></slot>
142
+ </div>
143
+ </div>
144
+ </details>`;
145
+ }
146
+ firstUpdated() {
147
+ this._detailsOpen = this.open;
148
+ }
149
+ updated(changedProperties) {
150
+ if (changedProperties.has("open")) {
151
+ this._contentAnimate();
152
+ }
153
+ }
154
+ };
155
+ exports.DaikinAccordionItem.styles = lit.css`
156
+ ${lit.unsafeCSS(tailwind.default)}
157
+
158
+ :host {
159
+ display: block;
160
+ width: 100%;
161
+ }
162
+ `;
163
+ __decorateClass([
164
+ decorators_js.property({ type: String })
165
+ ], exports.DaikinAccordionItem.prototype, "title", 2);
166
+ __decorateClass([
167
+ decorators_js.property({ type: Boolean, reflect: true })
168
+ ], exports.DaikinAccordionItem.prototype, "open", 2);
169
+ __decorateClass([
170
+ decorators_js.property({ type: Boolean, reflect: true })
171
+ ], exports.DaikinAccordionItem.prototype, "disabled", 2);
172
+ __decorateClass([
173
+ decorators_js.state()
174
+ ], exports.DaikinAccordionItem.prototype, "_detailsOpen", 2);
175
+ exports.DaikinAccordionItem = __decorateClass([
176
+ decorators_js.customElement("daikin-accordion-item")
177
+ ], exports.DaikinAccordionItem);