@daikin-oss/design-system-web-components 0.3.1 → 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 (293) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/cjs/components/accordion/daikin-accordion.cjs +31 -6
  3. package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -10
  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 -14
  6. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +121 -0
  7. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
  8. package/dist/cjs/components/breadcrumb/index.cjs +7 -0
  9. package/dist/cjs/components/breadcrumb/index.d.ts +1 -0
  10. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +124 -0
  11. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
  12. package/dist/cjs/components/breadcrumb-item/index.cjs +7 -0
  13. package/dist/cjs/components/breadcrumb-item/index.d.ts +1 -0
  14. package/dist/cjs/components/button/daikin-button.cjs +89 -128
  15. package/dist/cjs/components/button/daikin-button.d.ts +30 -28
  16. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +99 -119
  17. package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -39
  18. package/dist/cjs/components/icon/daikin-icon.d.ts +4 -1
  19. package/dist/cjs/components/icon/icons.json.cjs +20 -0
  20. package/dist/cjs/components/icon/icons.json.d.ts +20 -0
  21. package/dist/cjs/components/index.cjs +36 -6
  22. package/dist/cjs/components/index.d.ts +8 -2
  23. package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
  24. package/dist/cjs/components/input-group/daikin-input-group.d.ts +6 -1
  25. package/dist/cjs/components/list/daikin-list.cjs +24 -0
  26. package/dist/cjs/components/list/daikin-list.d.ts +28 -0
  27. package/dist/cjs/components/list/index.cjs +7 -0
  28. package/dist/cjs/components/list/index.d.ts +1 -0
  29. package/dist/cjs/components/list-item/daikin-list-item.cjs +125 -0
  30. package/dist/cjs/components/list-item/daikin-list-item.d.ts +64 -0
  31. package/dist/cjs/components/list-item/index.cjs +7 -0
  32. package/dist/cjs/components/list-item/index.d.ts +1 -0
  33. package/dist/cjs/components/notification/daikin-notification.cjs +14 -15
  34. package/dist/cjs/components/notification/daikin-notification.d.ts +13 -12
  35. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +161 -0
  36. package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +69 -0
  37. package/dist/cjs/components/progress-bar/index.cjs +7 -0
  38. package/dist/cjs/components/progress-bar/index.d.ts +1 -0
  39. package/dist/cjs/components/radio/daikin-radio.cjs +73 -92
  40. package/dist/cjs/components/radio/daikin-radio.d.ts +23 -40
  41. package/dist/cjs/components/tab/daikin-tab.cjs +41 -46
  42. package/dist/cjs/components/tab/daikin-tab.d.ts +12 -13
  43. package/dist/cjs/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +8 -8
  44. package/dist/{cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts → cjs/components/tab-panels/daikin-tab-panels.d.ts} +17 -12
  45. package/dist/cjs/components/tab-panels/index.cjs +7 -0
  46. package/dist/cjs/components/tab-panels/index.d.ts +1 -0
  47. package/dist/cjs/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +29 -35
  48. package/dist/cjs/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -22
  49. package/dist/cjs/components/tabs/index.cjs +7 -0
  50. package/dist/cjs/components/tabs/index.d.ts +1 -0
  51. package/dist/cjs/components/text-input/daikin-text-input.cjs +4 -3
  52. package/dist/cjs/components/text-input/daikin-text-input.d.ts +5 -1
  53. package/dist/cjs/components/textarea/daikin-textarea.cjs +3 -3
  54. package/dist/cjs/components/textarea/daikin-textarea.d.ts +5 -1
  55. package/dist/cjs/components/toggle/daikin-toggle.cjs +44 -68
  56. package/dist/cjs/components/toggle/daikin-toggle.d.ts +15 -27
  57. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +223 -0
  58. package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +80 -0
  59. package/dist/cjs/components/tooltip/index.cjs +7 -0
  60. package/dist/cjs/components/tooltip/index.d.ts +1 -0
  61. package/dist/cjs/index.cjs +36 -6
  62. package/dist/cjs/is-client.cjs +5 -0
  63. package/dist/cjs/is-client.d.ts +1 -0
  64. package/dist/cjs/tailwind.css.cjs +2 -2
  65. package/dist/cjs/type-utils.d.ts +0 -1
  66. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +31 -6
  67. package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -10
  68. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +105 -59
  69. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -14
  70. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +121 -0
  71. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
  72. package/dist/cjs-dev/components/breadcrumb/index.cjs +7 -0
  73. package/dist/cjs-dev/components/breadcrumb/index.d.ts +1 -0
  74. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +124 -0
  75. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
  76. package/dist/cjs-dev/components/breadcrumb-item/index.cjs +7 -0
  77. package/dist/cjs-dev/components/breadcrumb-item/index.d.ts +1 -0
  78. package/dist/cjs-dev/components/button/daikin-button.cjs +89 -128
  79. package/dist/cjs-dev/components/button/daikin-button.d.ts +30 -28
  80. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +99 -119
  81. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -39
  82. package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -1
  83. package/dist/cjs-dev/components/icon/icons.json.cjs +20 -0
  84. package/dist/cjs-dev/components/icon/icons.json.d.ts +20 -0
  85. package/dist/cjs-dev/components/index.cjs +36 -6
  86. package/dist/cjs-dev/components/index.d.ts +8 -2
  87. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
  88. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +6 -1
  89. package/dist/cjs-dev/components/list/daikin-list.cjs +24 -0
  90. package/dist/cjs-dev/components/list/daikin-list.d.ts +28 -0
  91. package/dist/cjs-dev/components/list/index.cjs +7 -0
  92. package/dist/cjs-dev/components/list/index.d.ts +1 -0
  93. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +125 -0
  94. package/dist/cjs-dev/components/list-item/daikin-list-item.d.ts +64 -0
  95. package/dist/cjs-dev/components/list-item/index.cjs +7 -0
  96. package/dist/cjs-dev/components/list-item/index.d.ts +1 -0
  97. package/dist/cjs-dev/components/notification/daikin-notification.cjs +14 -15
  98. package/dist/cjs-dev/components/notification/daikin-notification.d.ts +13 -12
  99. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +176 -0
  100. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +69 -0
  101. package/dist/cjs-dev/components/progress-bar/index.cjs +7 -0
  102. package/dist/cjs-dev/components/progress-bar/index.d.ts +1 -0
  103. package/dist/cjs-dev/components/radio/daikin-radio.cjs +73 -92
  104. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +23 -40
  105. package/dist/cjs-dev/components/tab/daikin-tab.cjs +41 -46
  106. package/dist/cjs-dev/components/tab/daikin-tab.d.ts +12 -13
  107. package/dist/cjs-dev/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +9 -9
  108. package/dist/{cjs/components/panel-switcher/daikin-panel-switcher.d.ts → cjs-dev/components/tab-panels/daikin-tab-panels.d.ts} +17 -12
  109. package/dist/cjs-dev/components/tab-panels/index.cjs +7 -0
  110. package/dist/cjs-dev/components/tab-panels/index.d.ts +1 -0
  111. package/dist/cjs-dev/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +31 -37
  112. package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -22
  113. package/dist/cjs-dev/components/tabs/index.cjs +7 -0
  114. package/dist/cjs-dev/components/tabs/index.d.ts +1 -0
  115. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +4 -3
  116. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +5 -1
  117. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +3 -3
  118. package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +5 -1
  119. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +44 -68
  120. package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +15 -27
  121. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +223 -0
  122. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +80 -0
  123. package/dist/cjs-dev/components/tooltip/index.cjs +7 -0
  124. package/dist/cjs-dev/components/tooltip/index.d.ts +1 -0
  125. package/dist/cjs-dev/index.cjs +36 -6
  126. package/dist/cjs-dev/is-client.cjs +5 -0
  127. package/dist/cjs-dev/is-client.d.ts +1 -0
  128. package/dist/cjs-dev/tailwind.css.cjs +2 -2
  129. package/dist/cjs-dev/type-utils.d.ts +0 -1
  130. package/dist/es/components/accordion/daikin-accordion.d.ts +15 -10
  131. package/dist/es/components/accordion/daikin-accordion.js +32 -7
  132. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -14
  133. package/dist/es/components/accordion-item/daikin-accordion-item.js +106 -60
  134. package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
  135. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +122 -0
  136. package/dist/es/components/breadcrumb/index.d.ts +1 -0
  137. package/dist/es/components/breadcrumb/index.js +4 -0
  138. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
  139. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +125 -0
  140. package/dist/es/components/breadcrumb-item/index.d.ts +1 -0
  141. package/dist/es/components/breadcrumb-item/index.js +4 -0
  142. package/dist/es/components/button/daikin-button.d.ts +30 -28
  143. package/dist/es/components/button/daikin-button.js +90 -129
  144. package/dist/es/components/checkbox/daikin-checkbox.d.ts +27 -39
  145. package/dist/es/components/checkbox/daikin-checkbox.js +101 -121
  146. package/dist/es/components/icon/daikin-icon.d.ts +4 -1
  147. package/dist/es/components/icon/icons.json.d.ts +20 -0
  148. package/dist/es/components/icon/icons.json.js +20 -0
  149. package/dist/es/components/index.d.ts +8 -2
  150. package/dist/es/components/index.js +16 -4
  151. package/dist/es/components/input-group/daikin-input-group.d.ts +6 -1
  152. package/dist/es/components/input-group/daikin-input-group.js +1 -1
  153. package/dist/es/components/list/daikin-list.d.ts +28 -0
  154. package/dist/es/components/list/daikin-list.js +25 -0
  155. package/dist/es/components/list/index.d.ts +1 -0
  156. package/dist/es/components/list/index.js +4 -0
  157. package/dist/es/components/list-item/daikin-list-item.d.ts +64 -0
  158. package/dist/es/components/list-item/daikin-list-item.js +126 -0
  159. package/dist/es/components/list-item/index.d.ts +1 -0
  160. package/dist/es/components/list-item/index.js +4 -0
  161. package/dist/es/components/notification/daikin-notification.d.ts +13 -12
  162. package/dist/es/components/notification/daikin-notification.js +15 -16
  163. package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +69 -0
  164. package/dist/es/components/progress-bar/daikin-progress-bar.js +162 -0
  165. package/dist/es/components/progress-bar/index.d.ts +1 -0
  166. package/dist/es/components/progress-bar/index.js +4 -0
  167. package/dist/es/components/radio/daikin-radio.d.ts +23 -40
  168. package/dist/es/components/radio/daikin-radio.js +74 -93
  169. package/dist/es/components/tab/daikin-tab.d.ts +12 -13
  170. package/dist/es/components/tab/daikin-tab.js +42 -47
  171. package/dist/es/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -12
  172. package/dist/es/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +9 -9
  173. package/dist/es/components/tab-panels/index.d.ts +1 -0
  174. package/dist/es/components/tab-panels/index.js +4 -0
  175. package/dist/es/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -22
  176. package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +30 -36
  177. package/dist/es/components/tabs/index.d.ts +1 -0
  178. package/dist/es/components/tabs/index.js +4 -0
  179. package/dist/es/components/text-input/daikin-text-input.d.ts +5 -1
  180. package/dist/es/components/text-input/daikin-text-input.js +4 -3
  181. package/dist/es/components/textarea/daikin-textarea.d.ts +5 -1
  182. package/dist/es/components/textarea/daikin-textarea.js +3 -3
  183. package/dist/es/components/toggle/daikin-toggle.d.ts +15 -27
  184. package/dist/es/components/toggle/daikin-toggle.js +45 -69
  185. package/dist/es/components/tooltip/daikin-tooltip.d.ts +80 -0
  186. package/dist/es/components/tooltip/daikin-tooltip.js +224 -0
  187. package/dist/es/components/tooltip/index.d.ts +1 -0
  188. package/dist/es/components/tooltip/index.js +4 -0
  189. package/dist/es/index.js +16 -4
  190. package/dist/es/is-client.d.ts +1 -0
  191. package/dist/es/is-client.js +5 -0
  192. package/dist/es/tailwind.css.js +2 -2
  193. package/dist/es/type-utils.d.ts +0 -1
  194. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -10
  195. package/dist/es-dev/components/accordion/daikin-accordion.js +32 -7
  196. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -14
  197. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +106 -60
  198. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +56 -0
  199. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +122 -0
  200. package/dist/es-dev/components/breadcrumb/index.d.ts +1 -0
  201. package/dist/es-dev/components/breadcrumb/index.js +4 -0
  202. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +72 -0
  203. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +125 -0
  204. package/dist/es-dev/components/breadcrumb-item/index.d.ts +1 -0
  205. package/dist/es-dev/components/breadcrumb-item/index.js +4 -0
  206. package/dist/es-dev/components/button/daikin-button.d.ts +30 -28
  207. package/dist/es-dev/components/button/daikin-button.js +90 -129
  208. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +27 -39
  209. package/dist/es-dev/components/checkbox/daikin-checkbox.js +101 -121
  210. package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -1
  211. package/dist/es-dev/components/icon/icons.json.d.ts +20 -0
  212. package/dist/es-dev/components/icon/icons.json.js +20 -0
  213. package/dist/es-dev/components/index.d.ts +8 -2
  214. package/dist/es-dev/components/index.js +16 -4
  215. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +6 -1
  216. package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
  217. package/dist/es-dev/components/list/daikin-list.d.ts +28 -0
  218. package/dist/es-dev/components/list/daikin-list.js +25 -0
  219. package/dist/es-dev/components/list/index.d.ts +1 -0
  220. package/dist/es-dev/components/list/index.js +4 -0
  221. package/dist/es-dev/components/list-item/daikin-list-item.d.ts +64 -0
  222. package/dist/es-dev/components/list-item/daikin-list-item.js +126 -0
  223. package/dist/es-dev/components/list-item/index.d.ts +1 -0
  224. package/dist/es-dev/components/list-item/index.js +4 -0
  225. package/dist/es-dev/components/notification/daikin-notification.d.ts +13 -12
  226. package/dist/es-dev/components/notification/daikin-notification.js +15 -16
  227. package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +69 -0
  228. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +177 -0
  229. package/dist/es-dev/components/progress-bar/index.d.ts +1 -0
  230. package/dist/es-dev/components/progress-bar/index.js +4 -0
  231. package/dist/es-dev/components/radio/daikin-radio.d.ts +23 -40
  232. package/dist/es-dev/components/radio/daikin-radio.js +74 -93
  233. package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -13
  234. package/dist/es-dev/components/tab/daikin-tab.js +42 -47
  235. package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -12
  236. package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +10 -10
  237. package/dist/es-dev/components/tab-panels/index.d.ts +1 -0
  238. package/dist/es-dev/components/tab-panels/index.js +4 -0
  239. package/dist/{cjs-dev/components/tab-group/daikin-tab-group.d.ts → es-dev/components/tabs/daikin-tabs.d.ts} +27 -22
  240. package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +32 -38
  241. package/dist/es-dev/components/tabs/index.d.ts +1 -0
  242. package/dist/es-dev/components/tabs/index.js +4 -0
  243. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +5 -1
  244. package/dist/es-dev/components/text-input/daikin-text-input.js +4 -3
  245. package/dist/es-dev/components/textarea/daikin-textarea.d.ts +5 -1
  246. package/dist/es-dev/components/textarea/daikin-textarea.js +3 -3
  247. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +15 -27
  248. package/dist/es-dev/components/toggle/daikin-toggle.js +45 -69
  249. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +80 -0
  250. package/dist/es-dev/components/tooltip/daikin-tooltip.js +224 -0
  251. package/dist/es-dev/components/tooltip/index.d.ts +1 -0
  252. package/dist/es-dev/components/tooltip/index.js +4 -0
  253. package/dist/es-dev/index.js +16 -4
  254. package/dist/es-dev/is-client.d.ts +1 -0
  255. package/dist/es-dev/is-client.js +5 -0
  256. package/dist/es-dev/tailwind.css.js +2 -2
  257. package/dist/es-dev/type-utils.d.ts +0 -1
  258. package/icons/checkbox-indeterminate.svg +2 -2
  259. package/icons/chevron-down.svg +3 -0
  260. package/icons/chevron-left.svg +3 -0
  261. package/icons/chevron-right.svg +3 -0
  262. package/icons/chevron-up.svg +3 -0
  263. package/icons/status-error.svg +3 -0
  264. package/icons/status-positive.svg +15 -0
  265. package/package.json +47 -44
  266. package/dist/cjs/components/panel-switcher/index.cjs +0 -7
  267. package/dist/cjs/components/panel-switcher/index.d.ts +0 -1
  268. package/dist/cjs/components/tab-group/index.cjs +0 -7
  269. package/dist/cjs/components/tab-group/index.d.ts +0 -1
  270. package/dist/cjs-dev/components/panel-switcher/index.cjs +0 -7
  271. package/dist/cjs-dev/components/panel-switcher/index.d.ts +0 -1
  272. package/dist/cjs-dev/components/tab-group/index.cjs +0 -7
  273. package/dist/cjs-dev/components/tab-group/index.d.ts +0 -1
  274. package/dist/es/components/panel-switcher/index.d.ts +0 -1
  275. package/dist/es/components/panel-switcher/index.js +0 -4
  276. package/dist/es/components/tab-group/index.d.ts +0 -1
  277. package/dist/es/components/tab-group/index.js +0 -4
  278. package/dist/es-dev/components/panel-switcher/index.d.ts +0 -1
  279. package/dist/es-dev/components/panel-switcher/index.js +0 -4
  280. package/dist/es-dev/components/tab-group/index.d.ts +0 -1
  281. package/dist/es-dev/components/tab-group/index.js +0 -4
  282. package/icons/accordion-chevron-up.svg +0 -3
  283. package/icons/input-group-error.svg +0 -11
  284. package/icons/radio-checked.svg +0 -4
  285. package/icons/radio-unchecked.svg +0 -4
  286. /package/dist/cjs/components/{tab-group → tabs}/scroller.cjs +0 -0
  287. /package/dist/cjs/components/{tab-group → tabs}/scroller.d.ts +0 -0
  288. /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.cjs +0 -0
  289. /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
  290. /package/dist/es/components/{tab-group → tabs}/scroller.d.ts +0 -0
  291. /package/dist/es/components/{tab-group → tabs}/scroller.js +0 -0
  292. /package/dist/es-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
  293. /package/dist/es-dev/components/{tab-group → tabs}/scroller.js +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,107 @@
1
+ # @daikin-oss/design-system-web-components
2
+
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#72](https://github.com/dsv-rp/DDS/pull/72) [`70391aa`](https://github.com/dsv-rp/DDS/commit/70391aab75eaf72fcf2951b4cb2664d8afa4cbf4) Thanks [@poetrainy](https://github.com/poetrainy)! - Progress Bar: The `size` property has been added. (DDS-1385)
8
+ Progress Bar: Updated appearance. (DDS-1385)
9
+
10
+ - [#60](https://github.com/dsv-rp/DDS/pull/60) [`b6d7d9f`](https://github.com/dsv-rp/DDS/commit/b6d7d9f4bb5286bb9a8dc719628624dcca3c0f75) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Checkbox: The `readonly`, `size` and `error` property has been removed. (DDS-1288)
11
+ **BREAKING CHANGE** Checkbox: The `labelPosition` property now removed `"left"` value. (DDS-1288)
12
+ **BREAKING CHANGE** Checkbox: The `labelPosition` attribute (not property) has been renamed to `label-position`. (DDS-1288)
13
+ Checkbox: The `labelPosition` property now accepts `"hidden"` value. (DDS-1288)
14
+ Checkbox: Updated appearance. (DDS-1288)
15
+
16
+ - [#75](https://github.com/dsv-rp/DDS/pull/75) [`3922068`](https://github.com/dsv-rp/DDS/commit/3922068e28efcd5786f576435f68c35983f252c2) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Improve breadcrumb accessibility. (DDS-1482)
17
+ **BREAKING CHANGE** Remove `link` slot from `daikin-breadcrumb-item`.
18
+
19
+ - [#69](https://github.com/dsv-rp/DDS/pull/69) [`3fcbc38`](https://github.com/dsv-rp/DDS/commit/3fcbc38a1affb1f3d50dbfb4e1aeb1fd34f301a7) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Accordion: The `title` attribute has been removed and replaced with a `summary` slot. (DDS-1414)
20
+ Accordion: Updated appearance. (DDS-1414)
21
+ Accordion Item: Updated appearance. (DDS-1414)
22
+
23
+ - [#61](https://github.com/dsv-rp/DDS/pull/61) [`36ef955`](https://github.com/dsv-rp/DDS/commit/36ef9551a504de318a51a738b9b6b58edfb7f6f9) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Radio: The `readonly`, `size` and `error` properties have been removed. (DDS-1350)
24
+ **BREAKING CHANGE** Radio: The `labelPosition` property no longer supports `"left"`. Instead, it now supports `"hidden"`. (DDS-1350)
25
+ **BREAKING CHANGE** Radio: The `labelPosition` attribute (not property) has been renamed to `label-position`.
26
+ Radio: Updated appearance. (DDS-1350)
27
+
28
+ - [#56](https://github.com/dsv-rp/DDS/pull/56) [`a81916a`](https://github.com/dsv-rp/DDS/commit/a81916ac21c4fec5e85eb1e8bf9005137887a662) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Button: The `role` attribute/property is renamed to `button-role` attribute and `buttonRole` property to avoid conflicts with standard HTML attributes.
29
+ **BREAKING CHANGE** Button: The `variant` attribute now accepts values of `"fill"`, `"outline"` and `"ghost"`, instead of `"primary"`, `"secondary"`, `"tertiary"` and `"primaryDanger"`.
30
+ **BREAKING CHANGE** Button: The `isLoading` attribute has been removed.
31
+ **BREAKING CHANGE** Button: The `leftIcon` and `rightIcon` attributes have been renamed to `left-icon` and `right-icon` respectively.
32
+ **BREAKING CHANGE** Button: The `type` attribute now accepts `"link"`, and whether the button becomes a link is now determined by the `type` attribute, not by the presence of the `href` attribute. If `href` is omitted with `type="link"`, it is treated as a disabled state.
33
+ Button: Added `color` attribute that accepts values of `"default"` and `"danger"`.
34
+ Button: Updated appearance. (DDS-1284)
35
+
36
+ - [#50](https://github.com/dsv-rp/DDS/pull/50) [`4a34db7`](https://github.com/dsv-rp/DDS/commit/4a34db738bc08e347a790c0620bc602bbf1eac5b) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Notification: The `title` and `description` attributes have been removed, and their contents are now specified using slots with the same names.
37
+
38
+ - [#67](https://github.com/dsv-rp/DDS/pull/67) [`d377f50`](https://github.com/dsv-rp/DDS/commit/d377f5043f8d12c37a28772e44173b0e2a778003) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Tabs: The name of the component has been changed from `Tab Group` to `Tabs`. Use `<daikin-tabs>` instead of `<daikin-tab-group>`. (DDS-1450)
39
+ **BREAKING CHANGE** Tabs: The signatures of the `beforechange` and `change` events have been updated to match those of other components. (DDS-1450)
40
+ **BREAKING CHANGE** Tab Panels: The name of the component has been changed from `Panel Switcher` to `Tab panels`. Use `<daikin-tab-panels>` instead of `<daikin-panel-switcher>`. (DDS-1450)
41
+ **BREAKING CHANGE** Tab: The `size` property has been removed. (DDS-1450)
42
+ Tab: Updated appearance. (DDS-1450)
43
+
44
+ - [#63](https://github.com/dsv-rp/DDS/pull/63) [`535464e`](https://github.com/dsv-rp/DDS/commit/535464e625a3edb60e7e94ca867e16b390e3097e) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Toggle: The `size` and `error` properties has been removed. (DDS-1374)
45
+ Toggle: Updated appearance. (DDS-1374)
46
+
47
+ ### Patch Changes
48
+
49
+ - [#82](https://github.com/dsv-rp/DDS/pull/82) [`db7f9f3`](https://github.com/dsv-rp/DDS/commit/db7f9f331650d21d07d192d7032fd2689a849e3d) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Delete Stories area from component documentation page.
50
+
51
+ - [#77](https://github.com/dsv-rp/DDS/pull/77) [`dce6fa9`](https://github.com/dsv-rp/DDS/commit/dce6fa9128c84d55baf64b3d0ad8f35c4d8ea69c) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Add component import guideline to documentation.
52
+
53
+ - [#59](https://github.com/dsv-rp/DDS/pull/59) [`dcfaef3`](https://github.com/dsv-rp/DDS/commit/dcfaef3e5aabe47e61b3ed815d2c74fcb14afc68) Thanks [@yodas7](https://github.com/yodas7)! - Storybook: Improve the code displayed by "Show code".
54
+ Storybook: Added a common description of the event to the beginning of the Events section of the component documentation.
55
+
56
+ - [#55](https://github.com/dsv-rp/DDS/pull/55) [`5d5c051`](https://github.com/dsv-rp/DDS/commit/5d5c0513febb1c38a500850806c9eef0c210a756) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Toggle: Fix `checked` property not updated on `change` event. (DDS-1317)
57
+ Tab Group: Fix `value` property not updated on `change` event. (DDS-1317)
58
+
59
+ - [#45](https://github.com/dsv-rp/DDS/pull/45) [`42f6d1b`](https://github.com/dsv-rp/DDS/commit/42f6d1b27e4020db4e1c286f16d632aa305457d9) Thanks [@poetrainy](https://github.com/poetrainy)! - Text Input: Fixed an issue where the size of components could not be changed. (DDS-1279)
60
+ Textarea: Fixed an issue where the size of components could not be changed. (DDS-1279)
61
+
62
+ - [#78](https://github.com/dsv-rp/DDS/pull/78) [`fbd2adb`](https://github.com/dsv-rp/DDS/commit/fbd2adbd671a9d928fb92eec7d548260e5bbaa87) Thanks [@poetrainy](https://github.com/poetrainy)! - Toggle: Assign the `switch` role. (DDS-1531)
63
+
64
+ - [#70](https://github.com/dsv-rp/DDS/pull/70) [`144a2ad`](https://github.com/dsv-rp/DDS/commit/144a2adbe9043f345f88f42c80a0106fcb68f542) Thanks [@poetrainy](https://github.com/poetrainy)! - Add List Component.
65
+
66
+ ## 0.3.2
67
+
68
+ ### Patch Changes
69
+
70
+ - [#24](https://github.com/dsv-rp/DDS/pull/24) [`b2971f4`](https://github.com/dsv-rp/DDS/commit/b2971f4f4fff45d7615157e00314ea26ccc747f9) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Add Breadcrumbs Component
71
+
72
+ - [#42](https://github.com/dsv-rp/DDS/pull/42) [`7db6d0e`](https://github.com/dsv-rp/DDS/commit/7db6d0e0f2f823d9c0ff80e287060b92f32a89ff) Thanks [@yodas7](https://github.com/yodas7)! - Update dependencies.
73
+
74
+ - lit: ^3.1.4 -> ^3.2.0
75
+
76
+ - [#34](https://github.com/dsv-rp/DDS/pull/34) [`dc2640a`](https://github.com/dsv-rp/DDS/commit/dc2640a012c9fb8ab74b969c4721c15a3f814e2c) Thanks [@poetrainy](https://github.com/poetrainy)! - Add Progress Bar Component.
77
+
78
+ - [#40](https://github.com/dsv-rp/DDS/pull/40) [`d11ec1d`](https://github.com/dsv-rp/DDS/commit/d11ec1d49f9d8c7b9a32582954b9b3f96123c1ef) Thanks [@yodas7](https://github.com/yodas7)! - Include CHANGELOG.md in the package.
79
+
80
+ - [#29](https://github.com/dsv-rp/DDS/pull/29) [`38a7063`](https://github.com/dsv-rp/DDS/commit/38a706337a4008b163b05fe4f4b90b838b4be4fc) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Add Tooltip Component.
81
+
82
+ - [#52](https://github.com/dsv-rp/DDS/pull/52) [`d477bae`](https://github.com/dsv-rp/DDS/commit/d477baec057acf00c42038ebcbd7eeba5a13989e) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Add document to breadcrumb component.
83
+
84
+ ## 0.3.1
85
+
86
+ ### Patch Changes
87
+
88
+ - [#38](https://github.com/dsv-rp/DDS/pull/38) [`8be9351`](https://github.com/dsv-rp/DDS/commit/8be93513040a738f36c0ade2d3a7bb2dc7b0d91f) Thanks [@yodas7](https://github.com/yodas7)! - Fix package not released successfully due to the lack of repository field.
89
+
90
+ ## 0.3.0
91
+
92
+ ### Minor Changes
93
+
94
+ - [#7](https://github.com/dsv-rp/DDS/pull/7) Navigation Tab
95
+ - [#18](https://github.com/dsv-rp/DDS/pull/18) Icon
96
+ - [#20](https://github.com/dsv-rp/DDS/pull/20) Accordion
97
+ - [#30](https://github.com/dsv-rp/DDS/pull/30) Toggle Switch
98
+ - Add icon to button component
99
+ - Add icon to notification component
100
+
101
+ ### Patch Changes
102
+
103
+ - [#33](https://github.com/dsv-rp/DDS/pull/33) [`7dabcfc`](https://github.com/dsv-rp/DDS/commit/7dabcfc08dd3bf9f7dbcc368e0afc25b878f53d0) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Improve Storybook documents
104
+
105
+ - [#31](https://github.com/dsv-rp/DDS/pull/31) [`f72fbbd`](https://github.com/dsv-rp/DDS/commit/f72fbbd4791a0aad32fe9359ff30bc506d14afff) Thanks [@yodas7](https://github.com/yodas7)! - Introduce Changesets.
106
+
107
+ - [#35](https://github.com/dsv-rp/DDS/pull/35) Fix button text being wrapped
@@ -14,9 +14,27 @@ var __decorateClass = (decorators, target, key, kind) => {
14
14
  return result;
15
15
  };
16
16
  exports.DaikinAccordion = class DaikinAccordion extends lit.LitElement {
17
+ _handleMoveFocus(event) {
18
+ const moveOffset = event.detail.direction === "up" ? -1 : 1;
19
+ const items = this._items;
20
+ const activeElement = document.activeElement;
21
+ const focusedItemIndex = activeElement ? items.findIndex((item) => item === activeElement) : -1;
22
+ if (focusedItemIndex < 0) {
23
+ return;
24
+ }
25
+ for (let index = focusedItemIndex + moveOffset, i = 0; i < items.length; index += moveOffset, i++) {
26
+ index = Math.sign(index % items.length) === -1 ? items.length - 1 : index % items.length;
27
+ const item = items[index];
28
+ if (item.disabled) {
29
+ continue;
30
+ }
31
+ item.focus();
32
+ break;
33
+ }
34
+ }
17
35
  render() {
18
- return lit.html`<div class="w-full border-y-[1px] border-y-[#CECECE]">
19
- <slot></slot>
36
+ return lit.html`<div class="w-full">
37
+ <slot @accordion-move-focus=${this._handleMoveFocus}></slot>
20
38
  </div>`;
21
39
  }
22
40
  };
@@ -24,14 +42,21 @@ exports.DaikinAccordion.styles = lit.css`
24
42
  ${lit.unsafeCSS(tailwind.default)}
25
43
 
26
44
  :host {
27
- display: block;
28
- width: 100%;
45
+ min-width: 160px;
46
+ }
47
+
48
+ ::slotted(daikin-accordion-item) {
49
+ --divider-top-display: block;
50
+ --divider-bottom-display: none;
29
51
  }
30
52
 
31
- ::slotted(daikin-accordion-item:not(:last-child)) {
32
- border-bottom: 1px solid #cecece;
53
+ ::slotted(daikin-accordion-item:last-child) {
54
+ --divider-bottom-display: block;
33
55
  }
34
56
  `;
57
+ __decorateClass([
58
+ decorators_js.queryAssignedElements({ selector: "daikin-accordion-item" })
59
+ ], exports.DaikinAccordion.prototype, "_items", 2);
35
60
  exports.DaikinAccordion = __decorateClass([
36
61
  decorators_js.customElement("daikin-accordion")
37
62
  ], exports.DaikinAccordion);
@@ -1,5 +1,4 @@
1
1
  import { LitElement } from 'lit';
2
-
3
2
  /**
4
3
  * The accordion component serves as the parent element that organizes and manages the overall structure of the accordion.
5
4
  * Currently it only provides appropriate styles for individual accordion items.
@@ -11,25 +10,31 @@ import { LitElement } from 'lit';
11
10
  *
12
11
  * @example
13
12
  *
13
+ * ```js
14
+ * import "@daikin-oss/design-system-web-components/components/accordion/index.js";
15
+ * ```
16
+ *
14
17
  * ```html
15
18
  * <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.
19
+ * <daikin-accordion-item>
20
+ * <span slot="summary">Accordion summary 1</span>
21
+ * Accordion content 1
21
22
  * </daikin-accordion-item>
22
- * <daikin-accordion-item title="The third accordion item" disabled>
23
- * Accordion 3 content.
23
+ * <daikin-accordion-item open>
24
+ * <span slot="summary">Accordion summary 2</span>
25
+ * Accordion content 2
24
26
  * </daikin-accordion-item>
25
- * <daikin-accordion-item title="The fourth accordion item" open disabled>
26
- * Accordion 4 content.
27
+ * <daikin-accordion-item disabled>
28
+ * <span slot="summary">Accordion summary 3</span>
29
+ * Accordion content 3
27
30
  * </daikin-accordion-item>
28
31
  * </daikin-accordion>
29
32
  * ```
30
33
  */
31
34
  export declare class DaikinAccordion extends LitElement {
32
35
  static readonly styles: import('lit').CSSResult;
36
+ private readonly _items;
37
+ private _handleMoveFocus;
33
38
  render(): import('lit-html').TemplateResult<1>;
34
39
  }
35
40
  declare global {
@@ -15,55 +15,38 @@ var __decorateClass = (decorators, target, key, kind) => {
15
15
  if (kind && result) __defProp(target, key, result);
16
16
  return result;
17
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
18
  const cvaSummary = classVarianceAuthority.cva(
30
19
  [
31
20
  "flex",
21
+ "justify-between",
32
22
  "items-center",
23
+ "gap-2",
33
24
  "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"
25
+ "min-h-12",
26
+ "py-3",
27
+ "pr-3",
28
+ "pl-4",
29
+ "focus-visible:outline",
30
+ "focus-visible:outline-2",
31
+ "focus-visible:-outline-offset-2",
32
+ "focus-visible:outline-daikinBlue-700",
33
+ "after:size-6",
34
+ "after:transition-all",
35
+ "after:i-daikin-chevron-down"
48
36
  ],
49
37
  {
50
38
  variants: {
51
- visible: {
52
- open: ["after:rotate-0"],
53
- close: ["after:-rotate-180"]
39
+ open: {
40
+ false: ["after:rotate-0"],
41
+ true: ["after:rotate-180"]
54
42
  },
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]"
43
+ disabled: {
44
+ false: [
45
+ "hover:bg-daikinNeutral-100",
46
+ "cursor-pointer",
47
+ "active:bg-daikinNeutral-200"
65
48
  ],
66
- disabled: ["text-[#DCDCDC]", "after:text-[#DCDCDC]"]
49
+ true: ["text-daikinNeutral-200", "after:text-daikinNeutral-200"]
67
50
  }
68
51
  }
69
52
  }
@@ -82,7 +65,6 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
82
65
  constructor() {
83
66
  super(...arguments);
84
67
  this._contentRef = ref_js.createRef();
85
- this.title = "";
86
68
  this.open = false;
87
69
  this.disabled = false;
88
70
  this._detailsOpen = false;
@@ -108,36 +90,69 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
108
90
  };
109
91
  }
110
92
  }
111
- _handleSummaryClick(e) {
112
- e.preventDefault();
93
+ _handleSummaryClick(event) {
94
+ event.preventDefault();
113
95
  if (this.disabled) {
114
96
  return;
115
97
  }
116
98
  this.open = !this.open;
117
99
  }
100
+ _handleKeyDown(event) {
101
+ const direction = {
102
+ ArrowDown: "down",
103
+ ArrowUp: "up"
104
+ }[event.key];
105
+ if (!direction) {
106
+ return;
107
+ }
108
+ event.preventDefault();
109
+ this.dispatchEvent(
110
+ new CustomEvent("accordion-move-focus", {
111
+ detail: {
112
+ direction
113
+ },
114
+ bubbles: true
115
+ })
116
+ );
117
+ }
118
+ // When using the in-page search, the `<details>` element may open without clicking on the `<summary>`.
119
+ // In order to handle such cases, it is necessary to respond to the "toggle" event.
120
+ _handleToggle(event) {
121
+ event.preventDefault();
122
+ if (this.disabled) {
123
+ return;
124
+ }
125
+ this.open = event.newState === "open";
126
+ }
118
127
  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
- });
128
+ const detailsOpen = !this.disabled && this._detailsOpen;
129
+ const open = !this.disabled && this.open;
126
130
  return lit.html`<details
127
- class=${accordionDetailsClassName}
128
- ?open=${this._detailsOpen}
129
- ?data-open=${this.open}
131
+ class="flex w-full bg-white font-daikinSerif overflow-clip"
132
+ ?open=${detailsOpen}
133
+ ?data-open=${open}
130
134
  aria-disabled=${this.disabled}
135
+ @toggle=${this._handleToggle}
131
136
  >
132
137
  <summary
133
- class=${accordionSummaryClassName}
138
+ id="summary"
139
+ class=${cvaSummary({
140
+ open,
141
+ disabled: this.disabled
142
+ })}
134
143
  tabindex=${this.disabled ? -1 : 0}
135
144
  @click=${this._handleSummaryClick}
145
+ @keydown=${this._handleKeyDown}
136
146
  >
137
- ${this.title}
147
+ <slot name="summary"></slot>
138
148
  </summary>
139
- <div ${ref_js.ref(this._contentRef)}>
140
- <div class="pt-2 pb-6 px-5 text-sm">
149
+ <div
150
+ ${ref_js.ref(this._contentRef)}
151
+ role="region"
152
+ aria-labelledby="summary"
153
+ ?hidden=${this.disabled}
154
+ >
155
+ <div class="pt-2 pr-3 pb-3 pl-4">
141
156
  <slot></slot>
142
157
  </div>
143
158
  </div>
@@ -151,24 +166,55 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
151
166
  this._contentAnimate();
152
167
  }
153
168
  }
169
+ /**
170
+ * Focuses on the inner summary.
171
+ * @param options focus options
172
+ */
173
+ focus(options) {
174
+ var _a;
175
+ (_a = this._summary) == null ? void 0 : _a.focus(options);
176
+ }
154
177
  };
155
178
  exports.DaikinAccordionItem.styles = lit.css`
156
179
  ${lit.unsafeCSS(tailwind.default)}
157
180
 
158
181
  :host {
182
+ --divider-top-display: none;
183
+ --divider-bottom-display: none;
184
+
159
185
  display: block;
186
+ position: relative;
187
+ }
188
+
189
+ :host::before {
190
+ content: "";
191
+ display: var(--divider-top-display, none);
160
192
  width: 100%;
193
+ height: 1px;
194
+ background: #828282;
195
+ position: absolute;
196
+ top: 0;
197
+ }
198
+
199
+ :host::after {
200
+ content: "";
201
+ display: var(--divider-bottom-display, none);
202
+ width: 100%;
203
+ height: 1px;
204
+ background: #828282;
205
+ position: absolute;
206
+ bottom: 0;
161
207
  }
162
208
  `;
163
- __decorateClass([
164
- decorators_js.property({ type: String })
165
- ], exports.DaikinAccordionItem.prototype, "title", 2);
166
209
  __decorateClass([
167
210
  decorators_js.property({ type: Boolean, reflect: true })
168
211
  ], exports.DaikinAccordionItem.prototype, "open", 2);
169
212
  __decorateClass([
170
213
  decorators_js.property({ type: Boolean, reflect: true })
171
214
  ], exports.DaikinAccordionItem.prototype, "disabled", 2);
215
+ __decorateClass([
216
+ decorators_js.query("summary")
217
+ ], exports.DaikinAccordionItem.prototype, "_summary", 2);
172
218
  __decorateClass([
173
219
  decorators_js.state()
174
220
  ], exports.DaikinAccordionItem.prototype, "_detailsOpen", 2);
@@ -1,5 +1,4 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
-
3
2
  /**
4
3
  * The accordion item component is a child element within the `daikin-accordion` component.
5
4
  * It functions similarly to the HTML `<details>` and `<summary>` tag, allowing users to expand or collapse the associated content by clicking on the header.
@@ -9,12 +8,21 @@ import { LitElement, PropertyValues } from 'lit';
9
8
  * - `daikin-accordion` > `daikin-accordion-item`
10
9
  *
11
10
  * @slot - A slot for the accordion item content.
11
+ * @slot summary - A slot for the accordion item summary content.
12
+ *
13
+ * @cssprop [--divider-top-display=none] - The `display` property of the top divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
14
+ * @cssprop [--divider-bottom-display=none] - The `display` property of the bottom divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
12
15
  *
13
16
  * @example
14
17
  *
18
+ * ```js
19
+ * import "@daikin-oss/design-system-web-components/components/accordion-item/index.js";
20
+ * ```
21
+ *
15
22
  * ```html
16
- * <daikin-accordion-item title="The first accordion item">
17
- * Accordion 1 content.
23
+ * <daikin-accordion-item>
24
+ * <span slot="Accordion summary">
25
+ * Accordion content
18
26
  * </daikin-accordion-item>
19
27
  * ```
20
28
  */
@@ -22,31 +30,37 @@ export declare class DaikinAccordionItem extends LitElement {
22
30
  static readonly styles: import('lit').CSSResult;
23
31
  private _contentRef;
24
32
  /**
25
- * Heading of accordion
26
- */
27
- title: string;
28
- /**
29
- * Whether the accordion is open
33
+ * Whether the accordion item is open.
34
+ * Ignored if `disabled` is `true`.
30
35
  */
31
36
  open: boolean;
32
37
  /**
33
- * Whether the accordion is disabled
38
+ * Whether the accordion item is disabled.
39
+ * If this is set to `true`, the accordion item will always be closed.
34
40
  */
35
41
  disabled: boolean;
42
+ private _summary;
36
43
  /**
37
- * Open attribute of the actual details element
38
- *
39
- * The default `open` attribute of the default details element does not allow the display of content to have transitions.
40
- * To solve this, the `open` property that `daikin-accordion-item` receives manages the opening and closing of items independently of the open attribute.
44
+ * Actual presence of `open` attribute of the `<details>` element.
41
45
  *
42
- * The `open` attribute, which should be present, is taken over by `_detailsOpen`.
46
+ * The `<details>` element does not support animation on changing the `open` attribute.
47
+ * In other words, the content is hidden immediately when the `open` attribute is removed.
48
+ * To enable animation for an accordion, we need to run the animation while maintaining the `open` attribute, and then remove the `open` attribute at the end of the animation.
49
+ * Treated as `false` if `disabled` is `true`.
43
50
  */
44
51
  private _detailsOpen;
45
52
  private _contentAnimate;
46
53
  private _handleSummaryClick;
54
+ private _handleKeyDown;
55
+ private _handleToggle;
47
56
  render(): import('lit-html').TemplateResult<1>;
48
57
  protected firstUpdated(): void;
49
58
  protected updated(changedProperties: PropertyValues<this>): void;
59
+ /**
60
+ * Focuses on the inner summary.
61
+ * @param options focus options
62
+ */
63
+ focus(options?: FocusOptions | undefined): void;
50
64
  }
51
65
  declare global {
52
66
  interface HTMLElementTagNameMap {
@@ -0,0 +1,121 @@
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 ref_js = require("lit/directives/ref.js");
6
+ const tailwind = require("../../tailwind.css.cjs");
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __decorateClass = (decorators, target, key, kind) => {
10
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
11
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
12
+ if (decorator = decorators[i])
13
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14
+ if (kind && result) __defProp(target, key, result);
15
+ return result;
16
+ };
17
+ exports.DaikinBreadcrumb = class DaikinBreadcrumb extends lit.LitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.resizeObserver = new ResizeObserver(() => {
21
+ this._omit();
22
+ });
23
+ this._divWrapRef = ref_js.createRef();
24
+ this.trailingSlash = false;
25
+ this.overflow = "visible";
26
+ this._expandedContentWidth = 0;
27
+ this.omitted = false;
28
+ }
29
+ get _isEllipsis() {
30
+ return this.overflow === "ellipsis";
31
+ }
32
+ _omit() {
33
+ const shouldOmit = this._isEllipsis && this.offsetWidth < this._expandedContentWidth;
34
+ if (this.omitted === shouldOmit) {
35
+ return;
36
+ }
37
+ this.omitted = shouldOmit;
38
+ const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
39
+ for (const [index, item] of daikinBreadCrumbItems.entries()) {
40
+ let mode = "normal";
41
+ if (shouldOmit) {
42
+ if (index === 0 || index >= daikinBreadCrumbItems.length - 2) {
43
+ continue;
44
+ } else if (index === 1) {
45
+ mode = "ellipsis";
46
+ } else {
47
+ mode = "hidden";
48
+ }
49
+ }
50
+ item.hidden = mode === "hidden";
51
+ item.variant = mode === "ellipsis" ? "ellipsis" : "normal";
52
+ }
53
+ }
54
+ _updateBreadcrumbs() {
55
+ const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
56
+ for (const [index, item] of daikinBreadCrumbItems.entries()) {
57
+ const isLast = index === daikinBreadCrumbItems.length - 1;
58
+ item.trailingSlash = !isLast || this.trailingSlash;
59
+ item.last = isLast;
60
+ }
61
+ }
62
+ _handleChange() {
63
+ this._updateBreadcrumbs();
64
+ }
65
+ _handleResizeObserver() {
66
+ if (this._isEllipsis) {
67
+ this.resizeObserver.observe(this);
68
+ } else {
69
+ this.resizeObserver.disconnect();
70
+ }
71
+ }
72
+ render() {
73
+ return lit.html`
74
+ <div class="flex gap-2" ${ref_js.ref(this._divWrapRef)}>
75
+ <slot @slotchange=${this._handleChange}></slot>
76
+ </div>
77
+ `;
78
+ }
79
+ updated(changedProperties) {
80
+ if (changedProperties.has("trailingSlash")) {
81
+ this._updateBreadcrumbs();
82
+ }
83
+ if (changedProperties.has("overflow")) {
84
+ this._omit();
85
+ this._handleResizeObserver();
86
+ }
87
+ }
88
+ firstUpdated() {
89
+ this._updateBreadcrumbs();
90
+ this._omit();
91
+ this._handleResizeObserver();
92
+ this.updateComplete.then(() => {
93
+ const divElement = this._divWrapRef.value;
94
+ if (!divElement) {
95
+ return;
96
+ }
97
+ this._expandedContentWidth = divElement.offsetWidth;
98
+ }).catch(() => {
99
+ });
100
+ }
101
+ };
102
+ exports.DaikinBreadcrumb.styles = lit.css`
103
+ ${lit.unsafeCSS(tailwind.default)}
104
+
105
+ :host {
106
+ display: flex;
107
+ align-items: center;
108
+ }
109
+ `;
110
+ __decorateClass([
111
+ decorators_js.queryAssignedElements()
112
+ ], exports.DaikinBreadcrumb.prototype, "_slottedDaikinBreadCrumbItems", 2);
113
+ __decorateClass([
114
+ decorators_js.property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
115
+ ], exports.DaikinBreadcrumb.prototype, "trailingSlash", 2);
116
+ __decorateClass([
117
+ decorators_js.property({ type: String, reflect: true })
118
+ ], exports.DaikinBreadcrumb.prototype, "overflow", 2);
119
+ exports.DaikinBreadcrumb = __decorateClass([
120
+ decorators_js.customElement("daikin-breadcrumb")
121
+ ], exports.DaikinBreadcrumb);