@daikin-oss/design-system-web-components 0.2.0 → 0.3.2

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 (328) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +47 -7
  3. package/dist/cjs/components/accordion/daikin-accordion.cjs +37 -0
  4. package/dist/cjs/components/accordion/daikin-accordion.d.ts +39 -0
  5. package/dist/cjs/components/accordion/index.cjs +7 -0
  6. package/dist/cjs/components/accordion/index.d.ts +1 -0
  7. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +177 -0
  8. package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +55 -0
  9. package/dist/cjs/components/accordion-item/index.cjs +7 -0
  10. package/dist/cjs/components/accordion-item/index.d.ts +1 -0
  11. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +124 -0
  12. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
  13. package/dist/cjs/components/breadcrumb/index.cjs +7 -0
  14. package/dist/cjs/components/breadcrumb/index.d.ts +1 -0
  15. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +116 -0
  16. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -0
  17. package/dist/cjs/components/breadcrumb-item/index.cjs +7 -0
  18. package/dist/cjs/components/breadcrumb-item/index.d.ts +1 -0
  19. package/dist/cjs/components/button/daikin-button.cjs +25 -7
  20. package/dist/cjs/components/button/daikin-button.d.ts +21 -4
  21. package/dist/cjs/components/button/index.cjs +7 -0
  22. package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +11 -2
  23. package/dist/cjs/components/checkbox/index.cjs +7 -0
  24. package/dist/cjs/components/icon/daikin-icon.cjs +87 -0
  25. package/dist/cjs/components/icon/daikin-icon.d.ts +48 -0
  26. package/dist/cjs/components/icon/icons.json.cjs +29 -0
  27. package/dist/cjs/components/icon/icons.json.d.ts +31 -0
  28. package/dist/cjs/components/icon/index.cjs +8 -0
  29. package/dist/cjs/components/icon/index.d.ts +1 -0
  30. package/dist/cjs/components/index.cjs +93 -0
  31. package/dist/cjs/components/index.d.ts +11 -0
  32. package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
  33. package/dist/cjs/components/input-group/daikin-input-group.d.ts +27 -2
  34. package/dist/cjs/components/input-group/index.cjs +7 -0
  35. package/dist/cjs/components/notification/daikin-notification.cjs +15 -33
  36. package/dist/cjs/components/notification/daikin-notification.d.ts +21 -8
  37. package/dist/cjs/components/notification/index.cjs +7 -0
  38. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.cjs +55 -0
  39. package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
  40. package/dist/cjs/components/panel-switcher/index.cjs +7 -0
  41. package/dist/cjs/components/panel-switcher/index.d.ts +1 -0
  42. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +137 -0
  43. package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +47 -0
  44. package/dist/cjs/components/progress-bar/index.cjs +7 -0
  45. package/dist/cjs/components/progress-bar/index.d.ts +1 -0
  46. package/dist/cjs/components/radio/daikin-radio.d.ts +11 -2
  47. package/dist/cjs/components/radio/index.cjs +7 -0
  48. package/dist/cjs/components/tab/daikin-tab.cjs +126 -0
  49. package/dist/cjs/components/tab/daikin-tab.d.ts +54 -0
  50. package/dist/cjs/components/tab/index.cjs +7 -0
  51. package/dist/cjs/components/tab/index.d.ts +1 -0
  52. package/dist/cjs/components/tab-group/daikin-tab-group.cjs +211 -0
  53. package/dist/cjs/components/tab-group/daikin-tab-group.d.ts +104 -0
  54. package/dist/cjs/components/tab-group/index.cjs +7 -0
  55. package/dist/cjs/components/tab-group/index.d.ts +1 -0
  56. package/dist/cjs/components/tab-group/scroller.cjs +65 -0
  57. package/dist/cjs/components/tab-group/scroller.d.ts +25 -0
  58. package/dist/cjs/components/text-input/daikin-text-input.d.ts +16 -2
  59. package/dist/cjs/components/text-input/index.cjs +7 -0
  60. package/dist/cjs/components/textarea/daikin-textarea.d.ts +16 -2
  61. package/dist/cjs/components/textarea/index.cjs +7 -0
  62. package/dist/cjs/components/toggle/daikin-toggle.cjs +132 -0
  63. package/dist/cjs/components/toggle/daikin-toggle.d.ts +60 -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/components/tooltip/daikin-tooltip.cjs +223 -0
  67. package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +76 -0
  68. package/dist/cjs/components/tooltip/index.cjs +7 -0
  69. package/dist/cjs/components/tooltip/index.d.ts +1 -0
  70. package/dist/cjs/index.cjs +56 -0
  71. package/dist/cjs/is-client.cjs +5 -0
  72. package/dist/cjs/is-client.d.ts +1 -0
  73. package/dist/cjs/tailwind.css.cjs +2 -2
  74. package/dist/cjs/type-utils.d.ts +0 -1
  75. package/dist/cjs-dev/colors.cjs +80 -0
  76. package/dist/cjs-dev/colors.d.ts +69 -0
  77. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +37 -0
  78. package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +39 -0
  79. package/dist/cjs-dev/components/accordion/index.cjs +7 -0
  80. package/dist/cjs-dev/components/accordion/index.d.ts +1 -0
  81. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +177 -0
  82. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +55 -0
  83. package/dist/cjs-dev/components/accordion-item/index.cjs +7 -0
  84. package/dist/cjs-dev/components/accordion-item/index.d.ts +1 -0
  85. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +124 -0
  86. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
  87. package/dist/cjs-dev/components/breadcrumb/index.cjs +7 -0
  88. package/dist/cjs-dev/components/breadcrumb/index.d.ts +1 -0
  89. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +116 -0
  90. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -0
  91. package/dist/cjs-dev/components/breadcrumb-item/index.cjs +7 -0
  92. package/dist/cjs-dev/components/breadcrumb-item/index.d.ts +1 -0
  93. package/dist/cjs-dev/components/button/daikin-button.cjs +215 -0
  94. package/dist/cjs-dev/components/button/daikin-button.d.ts +76 -0
  95. package/dist/cjs-dev/components/button/index.cjs +7 -0
  96. package/dist/cjs-dev/components/button/index.d.ts +1 -0
  97. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +183 -0
  98. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +77 -0
  99. package/dist/cjs-dev/components/checkbox/index.cjs +7 -0
  100. package/dist/cjs-dev/components/checkbox/index.d.ts +1 -0
  101. package/dist/cjs-dev/components/icon/daikin-icon.cjs +96 -0
  102. package/dist/cjs-dev/components/icon/daikin-icon.d.ts +48 -0
  103. package/dist/cjs-dev/components/icon/icons.json.cjs +29 -0
  104. package/dist/cjs-dev/components/icon/icons.json.d.ts +31 -0
  105. package/dist/cjs-dev/components/icon/index.cjs +8 -0
  106. package/dist/cjs-dev/components/icon/index.d.ts +1 -0
  107. package/dist/cjs-dev/components/index.cjs +93 -0
  108. package/dist/cjs-dev/components/index.d.ts +18 -0
  109. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +119 -0
  110. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +72 -0
  111. package/dist/cjs-dev/components/input-group/index.cjs +7 -0
  112. package/dist/cjs-dev/components/input-group/index.d.ts +1 -0
  113. package/dist/cjs-dev/components/notification/daikin-notification.cjs +191 -0
  114. package/dist/cjs-dev/components/notification/daikin-notification.d.ts +75 -0
  115. package/dist/cjs-dev/components/notification/index.cjs +7 -0
  116. package/dist/cjs-dev/components/notification/index.d.ts +1 -0
  117. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.cjs +62 -0
  118. package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
  119. package/dist/cjs-dev/components/panel-switcher/index.cjs +7 -0
  120. package/dist/cjs-dev/components/panel-switcher/index.d.ts +1 -0
  121. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +152 -0
  122. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +47 -0
  123. package/dist/cjs-dev/components/progress-bar/index.cjs +7 -0
  124. package/dist/cjs-dev/components/progress-bar/index.d.ts +1 -0
  125. package/dist/cjs-dev/components/radio/daikin-radio.cjs +150 -0
  126. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +75 -0
  127. package/dist/cjs-dev/components/radio/index.cjs +7 -0
  128. package/dist/cjs-dev/components/radio/index.d.ts +1 -0
  129. package/dist/cjs-dev/components/tab/daikin-tab.cjs +126 -0
  130. package/dist/cjs-dev/components/tab/daikin-tab.d.ts +54 -0
  131. package/dist/cjs-dev/components/tab/index.cjs +7 -0
  132. package/dist/cjs-dev/components/tab/index.d.ts +1 -0
  133. package/dist/cjs-dev/components/tab-group/daikin-tab-group.cjs +221 -0
  134. package/dist/cjs-dev/components/tab-group/daikin-tab-group.d.ts +104 -0
  135. package/dist/cjs-dev/components/tab-group/index.cjs +7 -0
  136. package/dist/cjs-dev/components/tab-group/index.d.ts +1 -0
  137. package/dist/cjs-dev/components/tab-group/scroller.cjs +65 -0
  138. package/dist/cjs-dev/components/tab-group/scroller.d.ts +25 -0
  139. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +137 -0
  140. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +68 -0
  141. package/dist/cjs-dev/components/text-input/index.cjs +7 -0
  142. package/dist/cjs-dev/components/text-input/index.d.ts +1 -0
  143. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +168 -0
  144. package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +70 -0
  145. package/dist/cjs-dev/components/textarea/index.cjs +7 -0
  146. package/dist/cjs-dev/components/textarea/index.d.ts +1 -0
  147. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +132 -0
  148. package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +60 -0
  149. package/dist/cjs-dev/components/toggle/index.cjs +7 -0
  150. package/dist/cjs-dev/components/toggle/index.d.ts +1 -0
  151. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +223 -0
  152. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +76 -0
  153. package/dist/cjs-dev/components/tooltip/index.cjs +7 -0
  154. package/dist/cjs-dev/components/tooltip/index.d.ts +1 -0
  155. package/dist/cjs-dev/constants/events.cjs +4 -0
  156. package/dist/cjs-dev/constants/events.d.ts +1 -0
  157. package/dist/cjs-dev/index.cjs +95 -0
  158. package/dist/cjs-dev/index.d.ts +3 -0
  159. package/dist/cjs-dev/is-client.cjs +5 -0
  160. package/dist/cjs-dev/is-client.d.ts +1 -0
  161. package/dist/cjs-dev/lit-analyzer-types.d.ts +112 -0
  162. package/dist/cjs-dev/tailwind.css.cjs +6 -0
  163. package/dist/cjs-dev/type-utils.d.ts +24 -0
  164. package/dist/es/components/accordion/daikin-accordion.d.ts +39 -0
  165. package/dist/es/components/accordion/daikin-accordion.js +38 -0
  166. package/dist/es/components/accordion/index.d.ts +1 -0
  167. package/dist/es/components/accordion/index.js +4 -0
  168. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +55 -0
  169. package/dist/es/components/accordion-item/daikin-accordion-item.js +178 -0
  170. package/dist/es/components/accordion-item/index.d.ts +1 -0
  171. package/dist/es/components/accordion-item/index.js +4 -0
  172. package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
  173. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +125 -0
  174. package/dist/es/components/breadcrumb/index.d.ts +1 -0
  175. package/dist/es/components/breadcrumb/index.js +4 -0
  176. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -0
  177. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +117 -0
  178. package/dist/es/components/breadcrumb-item/index.d.ts +1 -0
  179. package/dist/es/components/breadcrumb-item/index.js +4 -0
  180. package/dist/es/components/button/daikin-button.d.ts +21 -4
  181. package/dist/es/components/button/daikin-button.js +25 -7
  182. package/dist/es/components/button/index.js +4 -0
  183. package/dist/es/components/checkbox/daikin-checkbox.d.ts +11 -2
  184. package/dist/es/components/checkbox/index.js +4 -0
  185. package/dist/es/components/icon/daikin-icon.d.ts +48 -0
  186. package/dist/es/components/icon/daikin-icon.js +88 -0
  187. package/dist/es/components/icon/icons.json.d.ts +31 -0
  188. package/dist/es/components/icon/icons.json.js +29 -0
  189. package/dist/es/components/icon/index.d.ts +1 -0
  190. package/dist/es/components/icon/index.js +5 -0
  191. package/dist/es/components/index.d.ts +11 -0
  192. package/dist/es/components/index.js +39 -0
  193. package/dist/es/components/input-group/daikin-input-group.d.ts +27 -2
  194. package/dist/es/components/input-group/daikin-input-group.js +1 -1
  195. package/dist/es/components/input-group/index.js +4 -0
  196. package/dist/es/components/notification/daikin-notification.d.ts +21 -8
  197. package/dist/es/components/notification/daikin-notification.js +15 -33
  198. package/dist/es/components/notification/index.js +4 -0
  199. package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
  200. package/dist/es/components/panel-switcher/daikin-panel-switcher.js +56 -0
  201. package/dist/es/components/panel-switcher/index.d.ts +1 -0
  202. package/dist/es/components/panel-switcher/index.js +4 -0
  203. package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +47 -0
  204. package/dist/es/components/progress-bar/daikin-progress-bar.js +138 -0
  205. package/dist/es/components/progress-bar/index.d.ts +1 -0
  206. package/dist/es/components/progress-bar/index.js +4 -0
  207. package/dist/es/components/radio/daikin-radio.d.ts +11 -2
  208. package/dist/es/components/radio/index.js +4 -0
  209. package/dist/es/components/tab/daikin-tab.d.ts +54 -0
  210. package/dist/es/components/tab/daikin-tab.js +127 -0
  211. package/dist/es/components/tab/index.d.ts +1 -0
  212. package/dist/es/components/tab/index.js +4 -0
  213. package/dist/es/components/tab-group/daikin-tab-group.d.ts +104 -0
  214. package/dist/es/components/tab-group/daikin-tab-group.js +212 -0
  215. package/dist/es/components/tab-group/index.d.ts +1 -0
  216. package/dist/es/components/tab-group/index.js +4 -0
  217. package/dist/es/components/tab-group/scroller.d.ts +25 -0
  218. package/dist/es/components/tab-group/scroller.js +65 -0
  219. package/dist/es/components/text-input/daikin-text-input.d.ts +16 -2
  220. package/dist/es/components/text-input/index.js +4 -0
  221. package/dist/es/components/textarea/daikin-textarea.d.ts +16 -2
  222. package/dist/es/components/textarea/index.js +4 -0
  223. package/dist/es/components/toggle/daikin-toggle.d.ts +60 -0
  224. package/dist/es/components/toggle/daikin-toggle.js +133 -0
  225. package/dist/es/components/toggle/index.d.ts +1 -0
  226. package/dist/es/components/toggle/index.js +4 -0
  227. package/dist/es/components/tooltip/daikin-tooltip.d.ts +76 -0
  228. package/dist/es/components/tooltip/daikin-tooltip.js +224 -0
  229. package/dist/es/components/tooltip/index.d.ts +1 -0
  230. package/dist/es/components/tooltip/index.js +4 -0
  231. package/dist/es/index.js +24 -1
  232. package/dist/es/is-client.d.ts +1 -0
  233. package/dist/es/is-client.js +5 -0
  234. package/dist/es/tailwind.css.js +2 -2
  235. package/dist/es/type-utils.d.ts +0 -1
  236. package/dist/es-dev/colors.d.ts +69 -0
  237. package/dist/es-dev/colors.js +80 -0
  238. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +39 -0
  239. package/dist/es-dev/components/accordion/daikin-accordion.js +38 -0
  240. package/dist/es-dev/components/accordion/index.d.ts +1 -0
  241. package/dist/es-dev/components/accordion/index.js +4 -0
  242. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +55 -0
  243. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +178 -0
  244. package/dist/es-dev/components/accordion-item/index.d.ts +1 -0
  245. package/dist/es-dev/components/accordion-item/index.js +4 -0
  246. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +52 -0
  247. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +125 -0
  248. package/dist/es-dev/components/breadcrumb/index.d.ts +1 -0
  249. package/dist/es-dev/components/breadcrumb/index.js +4 -0
  250. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +62 -0
  251. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +117 -0
  252. package/dist/es-dev/components/breadcrumb-item/index.d.ts +1 -0
  253. package/dist/es-dev/components/breadcrumb-item/index.js +4 -0
  254. package/dist/es-dev/components/button/daikin-button.d.ts +76 -0
  255. package/dist/es-dev/components/button/daikin-button.js +216 -0
  256. package/dist/es-dev/components/button/index.d.ts +1 -0
  257. package/dist/es-dev/components/button/index.js +4 -0
  258. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +77 -0
  259. package/dist/es-dev/components/checkbox/daikin-checkbox.js +184 -0
  260. package/dist/es-dev/components/checkbox/index.d.ts +1 -0
  261. package/dist/es-dev/components/checkbox/index.js +4 -0
  262. package/dist/es-dev/components/icon/daikin-icon.d.ts +48 -0
  263. package/dist/es-dev/components/icon/daikin-icon.js +97 -0
  264. package/dist/es-dev/components/icon/icons.json.d.ts +31 -0
  265. package/dist/es-dev/components/icon/icons.json.js +29 -0
  266. package/dist/es-dev/components/icon/index.d.ts +1 -0
  267. package/dist/es-dev/components/icon/index.js +5 -0
  268. package/dist/es-dev/components/index.d.ts +18 -0
  269. package/dist/es-dev/components/index.js +39 -0
  270. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +72 -0
  271. package/dist/es-dev/components/input-group/daikin-input-group.js +120 -0
  272. package/dist/es-dev/components/input-group/index.d.ts +1 -0
  273. package/dist/es-dev/components/input-group/index.js +4 -0
  274. package/dist/es-dev/components/notification/daikin-notification.d.ts +75 -0
  275. package/dist/es-dev/components/notification/daikin-notification.js +192 -0
  276. package/dist/es-dev/components/notification/index.d.ts +1 -0
  277. package/dist/es-dev/components/notification/index.js +4 -0
  278. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +50 -0
  279. package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.js +63 -0
  280. package/dist/es-dev/components/panel-switcher/index.d.ts +1 -0
  281. package/dist/es-dev/components/panel-switcher/index.js +4 -0
  282. package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +47 -0
  283. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +153 -0
  284. package/dist/es-dev/components/progress-bar/index.d.ts +1 -0
  285. package/dist/es-dev/components/progress-bar/index.js +4 -0
  286. package/dist/es-dev/components/radio/daikin-radio.d.ts +75 -0
  287. package/dist/es-dev/components/radio/daikin-radio.js +151 -0
  288. package/dist/es-dev/components/radio/index.d.ts +1 -0
  289. package/dist/es-dev/components/radio/index.js +4 -0
  290. package/dist/es-dev/components/tab/daikin-tab.d.ts +54 -0
  291. package/dist/es-dev/components/tab/daikin-tab.js +127 -0
  292. package/dist/es-dev/components/tab/index.d.ts +1 -0
  293. package/dist/es-dev/components/tab/index.js +4 -0
  294. package/dist/es-dev/components/tab-group/daikin-tab-group.d.ts +104 -0
  295. package/dist/es-dev/components/tab-group/daikin-tab-group.js +222 -0
  296. package/dist/es-dev/components/tab-group/index.d.ts +1 -0
  297. package/dist/es-dev/components/tab-group/index.js +4 -0
  298. package/dist/es-dev/components/tab-group/scroller.d.ts +25 -0
  299. package/dist/es-dev/components/tab-group/scroller.js +65 -0
  300. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +68 -0
  301. package/dist/es-dev/components/text-input/daikin-text-input.js +138 -0
  302. package/dist/es-dev/components/text-input/index.d.ts +1 -0
  303. package/dist/es-dev/components/text-input/index.js +4 -0
  304. package/dist/es-dev/components/textarea/daikin-textarea.d.ts +70 -0
  305. package/dist/es-dev/components/textarea/daikin-textarea.js +169 -0
  306. package/dist/es-dev/components/textarea/index.d.ts +1 -0
  307. package/dist/es-dev/components/textarea/index.js +4 -0
  308. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +60 -0
  309. package/dist/es-dev/components/toggle/daikin-toggle.js +133 -0
  310. package/dist/es-dev/components/toggle/index.d.ts +1 -0
  311. package/dist/es-dev/components/toggle/index.js +4 -0
  312. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +76 -0
  313. package/dist/es-dev/components/tooltip/daikin-tooltip.js +224 -0
  314. package/dist/es-dev/components/tooltip/index.d.ts +1 -0
  315. package/dist/es-dev/components/tooltip/index.js +4 -0
  316. package/dist/es-dev/constants/events.d.ts +1 -0
  317. package/dist/es-dev/constants/events.js +4 -0
  318. package/dist/es-dev/index.d.ts +3 -0
  319. package/dist/es-dev/index.js +41 -0
  320. package/dist/es-dev/is-client.d.ts +1 -0
  321. package/dist/es-dev/is-client.js +5 -0
  322. package/dist/es-dev/lit-analyzer-types.d.ts +112 -0
  323. package/dist/es-dev/tailwind.css.js +6 -0
  324. package/dist/es-dev/type-utils.d.ts +24 -0
  325. package/icons/accordion-chevron-up.svg +3 -0
  326. package/icons/status-positive.svg +15 -0
  327. package/package.json +83 -50
  328. /package/icons/{input-group-error.svg → status-negative.svg} +0 -0
@@ -0,0 +1,178 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { css, unsafeCSS, LitElement, html } from "lit";
3
+ import { property, state, customElement } from "lit/decorators.js";
4
+ import { createRef, ref } from "lit/directives/ref.js";
5
+ import tailwindStyles from "../../tailwind.css.js";
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result) __defProp(target, key, result);
14
+ return result;
15
+ };
16
+ const cvaDetails = cva(
17
+ ["flex", "w-full", "h-max", "bg-white", "font-daikinSerif", "overflow-clip"],
18
+ {
19
+ variants: {
20
+ status: {
21
+ enabled: [],
22
+ disabled: ["text-[#DCDCDC]"]
23
+ }
24
+ }
25
+ }
26
+ );
27
+ const cvaSummary = cva(
28
+ [
29
+ "flex",
30
+ "items-center",
31
+ "w-full",
32
+ "h-12",
33
+ "px-5",
34
+ "outline-none",
35
+ "relative",
36
+ "after:block",
37
+ "after:w-5",
38
+ "after:h-5",
39
+ "after:m-auto",
40
+ "after:top-0",
41
+ "after:right-4",
42
+ "after:bottom-0",
43
+ "after:absolute",
44
+ "after:i-daikin-accordion-chevron-up",
45
+ "after:transition-all"
46
+ ],
47
+ {
48
+ variants: {
49
+ visible: {
50
+ open: ["after:rotate-0"],
51
+ close: ["after:-rotate-180"]
52
+ },
53
+ status: {
54
+ enabled: [
55
+ "hover:bg-[#DCDCDC]",
56
+ "hover:bg-[#DCDCDC]",
57
+ "hover:cursor-pointer",
58
+ "focus-visible:outline",
59
+ "focus-visible:outline-[2px]",
60
+ "focus-visible:outline-[#0097E0]",
61
+ "focus-visible:outline-offset-[-2px]",
62
+ "after:text-[#828282]"
63
+ ],
64
+ disabled: ["text-[#DCDCDC]", "after:text-[#DCDCDC]"]
65
+ }
66
+ }
67
+ }
68
+ );
69
+ const animationOption = {
70
+ duration: 250,
71
+ easing: "ease-in-out"
72
+ };
73
+ const contentCloseKeyframe = {
74
+ height: 0
75
+ };
76
+ const getContentOpenKeyframe = (content) => ({
77
+ height: `${content.offsetHeight}px`
78
+ });
79
+ let DaikinAccordionItem = class extends LitElement {
80
+ constructor() {
81
+ super(...arguments);
82
+ this._contentRef = createRef();
83
+ this.title = "";
84
+ this.open = false;
85
+ this.disabled = false;
86
+ this._detailsOpen = false;
87
+ }
88
+ _contentAnimate() {
89
+ const content = this._contentRef.value;
90
+ if (!content || this.open === this._detailsOpen) {
91
+ return;
92
+ }
93
+ if (this.open) {
94
+ this._detailsOpen = this.open;
95
+ content.animate(
96
+ [contentCloseKeyframe, getContentOpenKeyframe(content)],
97
+ animationOption
98
+ );
99
+ } else {
100
+ const animation = content.animate(
101
+ [getContentOpenKeyframe(content), contentCloseKeyframe],
102
+ animationOption
103
+ );
104
+ animation.onfinish = () => {
105
+ this._detailsOpen = this.open;
106
+ };
107
+ }
108
+ }
109
+ _handleSummaryClick(e) {
110
+ e.preventDefault();
111
+ if (this.disabled) {
112
+ return;
113
+ }
114
+ this.open = !this.open;
115
+ }
116
+ render() {
117
+ const accordionDetailsClassName = cvaDetails({
118
+ status: this.disabled ? "disabled" : "enabled"
119
+ });
120
+ const accordionSummaryClassName = cvaSummary({
121
+ status: this.disabled ? "disabled" : "enabled",
122
+ visible: this.open ? "open" : "close"
123
+ });
124
+ return html`<details
125
+ class=${accordionDetailsClassName}
126
+ ?open=${this._detailsOpen}
127
+ ?data-open=${this.open}
128
+ aria-disabled=${this.disabled}
129
+ >
130
+ <summary
131
+ class=${accordionSummaryClassName}
132
+ tabindex=${this.disabled ? -1 : 0}
133
+ @click=${this._handleSummaryClick}
134
+ >
135
+ ${this.title}
136
+ </summary>
137
+ <div ${ref(this._contentRef)}>
138
+ <div class="pt-2 pb-6 px-5 text-sm">
139
+ <slot></slot>
140
+ </div>
141
+ </div>
142
+ </details>`;
143
+ }
144
+ firstUpdated() {
145
+ this._detailsOpen = this.open;
146
+ }
147
+ updated(changedProperties) {
148
+ if (changedProperties.has("open")) {
149
+ this._contentAnimate();
150
+ }
151
+ }
152
+ };
153
+ DaikinAccordionItem.styles = css`
154
+ ${unsafeCSS(tailwindStyles)}
155
+
156
+ :host {
157
+ display: block;
158
+ width: 100%;
159
+ }
160
+ `;
161
+ __decorateClass([
162
+ property({ type: String })
163
+ ], DaikinAccordionItem.prototype, "title", 2);
164
+ __decorateClass([
165
+ property({ type: Boolean, reflect: true })
166
+ ], DaikinAccordionItem.prototype, "open", 2);
167
+ __decorateClass([
168
+ property({ type: Boolean, reflect: true })
169
+ ], DaikinAccordionItem.prototype, "disabled", 2);
170
+ __decorateClass([
171
+ state()
172
+ ], DaikinAccordionItem.prototype, "_detailsOpen", 2);
173
+ DaikinAccordionItem = __decorateClass([
174
+ customElement("daikin-accordion-item")
175
+ ], DaikinAccordionItem);
176
+ export {
177
+ DaikinAccordionItem
178
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-accordion-item';
@@ -0,0 +1,4 @@
1
+ import { DaikinAccordionItem } from "./daikin-accordion-item.js";
2
+ export {
3
+ DaikinAccordionItem
4
+ };
@@ -0,0 +1,52 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ /**
3
+ * `daikin-breadcrumb` is a component for representing a breadcrumb list, and is used together with the `daikin-breadcrumb-item` component.
4
+ *
5
+ * Hierarchy:
6
+ * - `daikin-breadcrumb` > `daikin-breadcrumb-item`
7
+ *
8
+ * @slot - A slot for breadcrumb items. Place `breadcrumb-item` elements here.
9
+ *
10
+ * @example
11
+ *
12
+ * ```html
13
+ * <daikin-breadcrumb>
14
+ * <daikin-breadcrumb-item href="#">
15
+ * Breadcrumb Item 1
16
+ * </daikin-breadcrumb-item>
17
+ * <daikin-breadcrumb-item href="#">
18
+ * Breadcrumb Item 2
19
+ * </daikin-breadcrumb-item>
20
+ * </daikin-breadcrumb>
21
+ * ```
22
+ */
23
+ export declare class DaikinBreadcrumb extends LitElement {
24
+ static readonly styles: import('lit').CSSResult;
25
+ private resizeObserver;
26
+ private _slottedDaikinBreadCrumbItems;
27
+ private _divWrapRef;
28
+ /**
29
+ * Whether the last breadcrumb item should have trailing slash.
30
+ */
31
+ trailingSlash: boolean;
32
+ /**
33
+ * Specifies overflow.
34
+ * If `ellipsis`, some breadcrumb items will be omitted when the total width exceeds the container width.
35
+ */
36
+ overflow: "visible" | "ellipsis";
37
+ private _expandedContentWidth;
38
+ private omitted;
39
+ get _isEllipsis(): boolean;
40
+ private _omit;
41
+ private _updateBreadcrumbs;
42
+ private _handleChange;
43
+ private _handleResizeObserver;
44
+ render(): import('lit-html').TemplateResult<1>;
45
+ updated(changedProperties: PropertyValues<this>): void;
46
+ firstUpdated(): void;
47
+ }
48
+ declare global {
49
+ interface HTMLElementTagNameMap {
50
+ "daikin-breadcrumb": DaikinBreadcrumb;
51
+ }
52
+ }
@@ -0,0 +1,125 @@
1
+ import { css, unsafeCSS, LitElement, html } from "lit";
2
+ import { queryAssignedElements, property, customElement } from "lit/decorators.js";
3
+ import { createRef, ref } from "lit/directives/ref.js";
4
+ import tailwindStyles from "../../tailwind.css.js";
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __decorateClass = (decorators, target, key, kind) => {
8
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
+ if (decorator = decorators[i])
11
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
+ if (kind && result) __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ let DaikinBreadcrumb = class extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.resizeObserver = new ResizeObserver(() => {
19
+ this._omit();
20
+ });
21
+ this._divWrapRef = createRef();
22
+ this.trailingSlash = false;
23
+ this.overflow = "visible";
24
+ this._expandedContentWidth = 0;
25
+ this.omitted = false;
26
+ }
27
+ get _isEllipsis() {
28
+ return this.overflow === "ellipsis";
29
+ }
30
+ _omit() {
31
+ const shouldOmit = this._isEllipsis && this.offsetWidth < this._expandedContentWidth;
32
+ if (this.omitted === shouldOmit) {
33
+ return;
34
+ }
35
+ this.omitted = shouldOmit;
36
+ const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
37
+ for (const [index, item] of daikinBreadCrumbItems.entries()) {
38
+ let mode = "normal";
39
+ if (shouldOmit) {
40
+ if (index === 0 || index >= daikinBreadCrumbItems.length - 2) {
41
+ continue;
42
+ } else if (index === 1) {
43
+ mode = "ellipsis";
44
+ } else {
45
+ mode = "hidden";
46
+ }
47
+ }
48
+ item.hidden = mode === "hidden";
49
+ item.variant = mode === "ellipsis" ? "ellipsis" : "normal";
50
+ }
51
+ }
52
+ _updateBreadcrumbs() {
53
+ const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
54
+ for (const [index, item] of daikinBreadCrumbItems.entries()) {
55
+ if (index === daikinBreadCrumbItems.length - 1) {
56
+ item.trailingSlash = this.trailingSlash;
57
+ item.disabled = true;
58
+ continue;
59
+ }
60
+ item.trailingSlash = true;
61
+ }
62
+ }
63
+ _handleChange() {
64
+ this._updateBreadcrumbs();
65
+ }
66
+ _handleResizeObserver() {
67
+ if (this._isEllipsis) {
68
+ this.resizeObserver.observe(this);
69
+ } else {
70
+ this.resizeObserver.disconnect();
71
+ }
72
+ }
73
+ render() {
74
+ return html`
75
+ <div class="flex gap-2" ${ref(this._divWrapRef)}>
76
+ <slot @slotchange=${this._handleChange}></slot>
77
+ </div>
78
+ `;
79
+ }
80
+ updated(changedProperties) {
81
+ if (changedProperties.has("trailingSlash")) {
82
+ this._updateBreadcrumbs();
83
+ }
84
+ if (changedProperties.has("overflow")) {
85
+ this._omit();
86
+ this._handleResizeObserver();
87
+ }
88
+ }
89
+ firstUpdated() {
90
+ this._updateBreadcrumbs();
91
+ this._omit();
92
+ this._handleResizeObserver();
93
+ this.updateComplete.then(() => {
94
+ const divElement = this._divWrapRef.value;
95
+ if (!divElement) {
96
+ return;
97
+ }
98
+ this._expandedContentWidth = divElement.offsetWidth;
99
+ }).catch(() => {
100
+ });
101
+ }
102
+ };
103
+ DaikinBreadcrumb.styles = css`
104
+ ${unsafeCSS(tailwindStyles)}
105
+
106
+ :host {
107
+ display: flex;
108
+ align-items: center;
109
+ }
110
+ `;
111
+ __decorateClass([
112
+ queryAssignedElements()
113
+ ], DaikinBreadcrumb.prototype, "_slottedDaikinBreadCrumbItems", 2);
114
+ __decorateClass([
115
+ property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
116
+ ], DaikinBreadcrumb.prototype, "trailingSlash", 2);
117
+ __decorateClass([
118
+ property({ type: String, reflect: true })
119
+ ], DaikinBreadcrumb.prototype, "overflow", 2);
120
+ DaikinBreadcrumb = __decorateClass([
121
+ customElement("daikin-breadcrumb")
122
+ ], DaikinBreadcrumb);
123
+ export {
124
+ DaikinBreadcrumb
125
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-breadcrumb';
@@ -0,0 +1,4 @@
1
+ import { DaikinBreadcrumb } from "./daikin-breadcrumb.js";
2
+ export {
3
+ DaikinBreadcrumb
4
+ };
@@ -0,0 +1,62 @@
1
+ import { LitElement } from 'lit';
2
+ import { MergeVariantProps } from '../../type-utils';
3
+ declare const cvaLinkSlot: (props?: ({
4
+ variant?: "normal" | "ellipsis" | null | undefined;
5
+ disabled?: boolean | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ type LinkVariantProps = MergeVariantProps<typeof cvaLinkSlot>;
8
+ /**
9
+ * The `daikin-breadcrumb-item` is a component used to represent each item of the breadcrumb list, and is used as a child element of the `daikin-breadcrumb` component.
10
+ *
11
+ * Hierarchy:
12
+ * - `daikin-breadcrumb` > `daikin-breadcrumb-item`
13
+ *
14
+ * @slot - A slot for the breadcrumb item content.
15
+ *
16
+ * @example
17
+ *
18
+ * ```html
19
+ * <!-- See `daikin-breadcrumb` component for complete example. -->
20
+ * <daikin-breadcrumb-item href="#">
21
+ * Breadcrumb Item 1
22
+ * </daikin-breadcrumb-item>
23
+ * ```
24
+ */
25
+ export declare class DaikinBreadcrumbItem extends LitElement {
26
+ static styles: import('lit').CSSResult;
27
+ /**
28
+ * Specify link href
29
+ */
30
+ href: string;
31
+ /**
32
+ * Specifies the display content.
33
+ * If `ellipsis`, the "..." will be displayed instead of the link.
34
+ * Set automatically by `daikin-breadcrumb`.
35
+ */
36
+ variant: LinkVariantProps["variant"];
37
+ /**
38
+ * Specify whether the link should be disabled
39
+ */
40
+ disabled: boolean;
41
+ /**
42
+ * Specify the link target
43
+ */
44
+ target: string | null;
45
+ /**
46
+ * Whether the slash after the link should shown.
47
+ * Set automatically by `daikin-breadcrumb`.
48
+ */
49
+ trailingSlash: boolean;
50
+ /**
51
+ * Whether the link should be hidden when ellipsis mode.
52
+ * Set automatically by `daikin-breadcrumb`.
53
+ */
54
+ hidden: boolean;
55
+ render(): import('lit-html').TemplateResult<1>;
56
+ }
57
+ declare global {
58
+ interface HTMLElementTagNameMap {
59
+ "daikin-breadcrumb-item": DaikinBreadcrumbItem;
60
+ }
61
+ }
62
+ export {};
@@ -0,0 +1,117 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { css, unsafeCSS, LitElement, html } from "lit";
3
+ import { property, customElement } from "lit/decorators.js";
4
+ import { ifDefined } from "lit/directives/if-defined.js";
5
+ import tailwindStyles from "../../tailwind.css.js";
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result) __defProp(target, key, result);
14
+ return result;
15
+ };
16
+ const cvaLinkSlot = cva(
17
+ [
18
+ "slotted:h-8",
19
+ "slotted:font-normal",
20
+ "slotted:not-italic",
21
+ "slotted:leading-8",
22
+ "slotted:text-sm",
23
+ "slotted:text-daikinBlue-500",
24
+ "slotted:outline-none",
25
+ "slotted:font-daikinSerif"
26
+ ],
27
+ {
28
+ variants: {
29
+ variant: {
30
+ normal: [
31
+ "slotted:hover:text-daikinBlue-300",
32
+ "slotted:active:text-daikinNeutral-800",
33
+ "slotted-[*:focus-visible]:text-daikinBlue-700"
34
+ ],
35
+ ellipsis: ["slotted:hover:text-daikinBlue-300"]
36
+ },
37
+ disabled: {
38
+ true: [
39
+ "slotted:!text-daikinNeutral-800",
40
+ "slotted:pointer-events-none",
41
+ "slotted:cursor-default",
42
+ "slotted-[*:focus-visible]:!text-daikinNeutral-800"
43
+ ],
44
+ false: []
45
+ }
46
+ }
47
+ }
48
+ );
49
+ let DaikinBreadcrumbItem = class extends LitElement {
50
+ constructor() {
51
+ super(...arguments);
52
+ this.href = "";
53
+ this.variant = "normal";
54
+ this.disabled = false;
55
+ this.target = null;
56
+ this.trailingSlash = false;
57
+ this.hidden = false;
58
+ }
59
+ render() {
60
+ const slash = this.trailingSlash ? html`<span class="text-daikinNeutral-800 font-daikinSerif">/</span>` : null;
61
+ return html`
62
+ ${this.variant === "normal" ? html`<slot name="link" class=${cvaLinkSlot(this)}>
63
+ <a
64
+ href=${ifDefined(this.href)}
65
+ target=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
66
+ ifDefined(this.target)}
67
+ >
68
+ <slot></slot>
69
+ </a>
70
+ </slot>` : (
71
+ // Though `cvaLinkSlot` is designed for slots, it contains "& > *" selector for fallback content so it can be used here.
72
+ html`<span class=${cvaLinkSlot(this)} aria-label="…">
73
+ <span>. . .</span>
74
+ </span> `
75
+ )}
76
+ ${slash}
77
+ `;
78
+ }
79
+ };
80
+ DaikinBreadcrumbItem.styles = css`
81
+ ${unsafeCSS(tailwindStyles)}
82
+
83
+ :host {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ gap: 8px;
87
+ flex-shrink: 0;
88
+ }
89
+
90
+ :host([hidden]) {
91
+ display: none;
92
+ }
93
+ `;
94
+ __decorateClass([
95
+ property({ type: String, reflect: true })
96
+ ], DaikinBreadcrumbItem.prototype, "href", 2);
97
+ __decorateClass([
98
+ property({ type: String, reflect: true })
99
+ ], DaikinBreadcrumbItem.prototype, "variant", 2);
100
+ __decorateClass([
101
+ property({ type: Boolean, reflect: true })
102
+ ], DaikinBreadcrumbItem.prototype, "disabled", 2);
103
+ __decorateClass([
104
+ property({ type: String, reflect: true })
105
+ ], DaikinBreadcrumbItem.prototype, "target", 2);
106
+ __decorateClass([
107
+ property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
108
+ ], DaikinBreadcrumbItem.prototype, "trailingSlash", 2);
109
+ __decorateClass([
110
+ property({ type: Boolean, reflect: true })
111
+ ], DaikinBreadcrumbItem.prototype, "hidden", 2);
112
+ DaikinBreadcrumbItem = __decorateClass([
113
+ customElement("daikin-breadcrumb-item")
114
+ ], DaikinBreadcrumbItem);
115
+ export {
116
+ DaikinBreadcrumbItem
117
+ };
@@ -0,0 +1 @@
1
+ export * from './daikin-breadcrumb-item';
@@ -0,0 +1,4 @@
1
+ import { DaikinBreadcrumbItem } from "./daikin-breadcrumb-item.js";
2
+ export {
3
+ DaikinBreadcrumbItem
4
+ };
@@ -1,14 +1,27 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { ARIARole } from '../../lit-analyzer-types';
3
3
  import { MergeVariantProps } from '../../type-utils';
4
-
4
+ import { IconType } from '../icon/daikin-icon';
5
5
  declare const cvaButton: (props?: ({
6
6
  intent?: "primary" | "secondary" | "tertiary" | "primaryDanger" | null | undefined;
7
7
  size?: "default" | "condensed" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  type ButtonVariantProps = MergeVariantProps<typeof cvaButton>;
10
10
  /**
11
- * Primary UI component for user interaction
11
+ * The button component is a versatile UI element that triggers actions or submits forms when clicked.
12
+ * It functions similarly to the HTML `<button>` tag, allowing users to initiate various operations such as submitting data, opening dialogs, or navigating to different sections of an application.
13
+ *
14
+ * @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) emitted from the inner `<button>` element. Suppressed if `disabled` is true,
15
+ *
16
+ * @slot - A slot for the button content.
17
+ *
18
+ * @example
19
+ *
20
+ * ```html
21
+ * <daikin-button>
22
+ * Button label
23
+ * </daikin-button>
24
+ * ```
12
25
  */
13
26
  export declare class DaikinButton extends LitElement {
14
27
  static readonly styles: import('lit').CSSResult;
@@ -23,11 +36,11 @@ export declare class DaikinButton extends LitElement {
23
36
  /**
24
37
  * Set a icon in the right of button label.
25
38
  */
26
- rightIcon: string;
39
+ rightIcon: IconType | null;
27
40
  /**
28
41
  * Set a icon in the left of button label.
29
42
  */
30
- leftIcon: string;
43
+ leftIcon: IconType | null;
31
44
  /**
32
45
  * Link `href`. If present, this button is rendered as `<a>`.
33
46
  */
@@ -49,6 +62,10 @@ export declare class DaikinButton extends LitElement {
49
62
  */
50
63
  isLoading: boolean;
51
64
  render(): import('lit-html').TemplateResult<1>;
65
+ /**
66
+ * Focuses on the inner button.
67
+ * @param options focus options
68
+ */
52
69
  focus(options?: FocusOptions | undefined): void;
53
70
  }
54
71
  declare global {
@@ -3,6 +3,7 @@ import { cva } from "class-variance-authority";
3
3
  import { css, unsafeCSS, LitElement, html } from "lit";
4
4
  import { property, customElement } from "lit/decorators.js";
5
5
  import tailwindStyles from "../../tailwind.css.js";
6
+ import "../icon/daikin-icon.js";
6
7
  var __defProp = Object.defineProperty;
7
8
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
9
  var __decorateClass = (decorators, target, key, kind) => {
@@ -13,16 +14,21 @@ var __decorateClass = (decorators, target, key, kind) => {
13
14
  if (kind && result) __defProp(target, key, result);
14
15
  return result;
15
16
  };
17
+ const BUTTON_ICON_SIZE_MAP = {
18
+ default: "m",
19
+ condensed: "s"
20
+ };
16
21
  const cvaButton = cva(
17
22
  [
18
23
  "inline-flex",
19
24
  "justify-center",
20
25
  "items-center",
26
+ "gap-2",
21
27
  "font-daikinSerif",
22
28
  "font-bold",
23
29
  "rounded-lg",
24
30
  "tracking-wide",
25
- "text-wrap",
31
+ "text-nowrap",
26
32
  "disabled:cursor-default",
27
33
  "w-full",
28
34
  "h-full"
@@ -90,8 +96,8 @@ let DaikinButton = class extends LitElement {
90
96
  super(...arguments);
91
97
  this.variant = "primary";
92
98
  this.disabled = false;
93
- this.rightIcon = "";
94
- this.leftIcon = "";
99
+ this.rightIcon = null;
100
+ this.leftIcon = null;
95
101
  this.href = "";
96
102
  this.size = "default";
97
103
  this.type = "button";
@@ -104,12 +110,20 @@ let DaikinButton = class extends LitElement {
104
110
  size: this.size
105
111
  });
106
112
  const content = html`
107
- <slot name="leftIcon"></slot>
108
- <span><slot></slot></span>
109
- <slot name="rightIcon"></slot>
113
+ ${this.leftIcon ? html`<daikin-icon
114
+ icon=${this.leftIcon}
115
+ size=${BUTTON_ICON_SIZE_MAP[this.size]}
116
+ color="current"
117
+ ></daikin-icon>` : null}
118
+ <slot></slot>
119
+ ${this.rightIcon ? html`<daikin-icon
120
+ icon=${this.rightIcon}
121
+ size=${BUTTON_ICON_SIZE_MAP[this.size]}
122
+ color="current"
123
+ ></daikin-icon>` : null}
110
124
  `;
111
125
  if (this.href) {
112
- return html` <a
126
+ return html`<a
113
127
  href="${this.href}"
114
128
  class="${buttonClassName}"
115
129
  role="${this.role}"
@@ -128,6 +142,10 @@ let DaikinButton = class extends LitElement {
128
142
  </button>
129
143
  `;
130
144
  }
145
+ /**
146
+ * Focuses on the inner button.
147
+ * @param options focus options
148
+ */
131
149
  focus(options) {
132
150
  var _a, _b;
133
151
  (_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("button")) == null ? void 0 : _b.focus(options);