@daikin-oss/design-system-web-components 1.0.0 → 1.2.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 (512) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/LICENSE +1 -1
  3. package/dist/cjs/base/dds-element.cjs +1 -1
  4. package/dist/cjs/base/dds-form-element.cjs +139 -0
  5. package/dist/cjs/base/dds-form-element.d.cts +100 -0
  6. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +6 -3
  7. package/dist/cjs/components/avatar/daikin-avatar.cjs +160 -0
  8. package/dist/cjs/components/avatar/daikin-avatar.d.cts +67 -0
  9. package/dist/cjs/components/avatar/index.cjs +7 -0
  10. package/dist/cjs/components/avatar/index.d.cts +1 -0
  11. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
  12. package/dist/cjs/components/button/daikin-button.cjs +35 -13
  13. package/dist/cjs/components/button/daikin-button.d.cts +20 -10
  14. package/dist/cjs/components/calendar/daikin-calendar.cjs +547 -0
  15. package/dist/cjs/components/calendar/daikin-calendar.d.cts +87 -0
  16. package/dist/cjs/components/calendar/index.cjs +7 -0
  17. package/dist/cjs/components/calendar/index.d.cts +1 -0
  18. package/dist/cjs/components/card/daikin-card.cjs +1 -1
  19. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +13 -16
  20. package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +13 -12
  21. package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
  22. package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
  23. package/dist/cjs/components/checkbox-group/index.cjs +7 -0
  24. package/dist/cjs/components/checkbox-group/index.d.cts +1 -0
  25. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +611 -0
  26. package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +105 -0
  27. package/dist/cjs/components/date-picker/index.cjs +7 -0
  28. package/dist/cjs/components/date-picker/index.d.cts +1 -0
  29. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +181 -86
  30. package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +48 -18
  31. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +97 -36
  32. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.cts +6 -1
  33. package/dist/cjs/components/icon/icons.json.cjs +1 -1
  34. package/dist/cjs/components/icon/icons.json.d.cts +30 -14
  35. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +18 -2
  36. package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +12 -2
  37. package/dist/cjs/components/index.cjs +55 -0
  38. package/dist/cjs/components/index.d.cts +11 -0
  39. package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +13 -18
  40. package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +3 -1
  41. package/dist/cjs/components/input-group/daikin-input-group.cjs +4 -4
  42. package/dist/cjs/components/input-group/daikin-input-group.d.cts +22 -0
  43. package/dist/cjs/components/list/daikin-list.cjs +75 -3
  44. package/dist/cjs/components/list/daikin-list.d.cts +16 -0
  45. package/dist/cjs/components/list-item/daikin-list-item.cjs +25 -5
  46. package/dist/cjs/components/list-item/daikin-list-item.d.cts +9 -3
  47. package/dist/cjs/components/loading/daikin-loading.cjs +91 -0
  48. package/dist/cjs/components/loading/daikin-loading.d.cts +33 -0
  49. package/dist/cjs/components/loading/index.cjs +7 -0
  50. package/dist/cjs/components/loading/index.d.cts +1 -0
  51. package/dist/cjs/components/logo/daikin-logo.cjs +105 -0
  52. package/dist/cjs/components/logo/daikin-logo.d.cts +54 -0
  53. package/dist/cjs/components/logo/index.cjs +7 -0
  54. package/dist/cjs/components/logo/index.d.cts +1 -0
  55. package/dist/cjs/components/menu/daikin-menu.cjs +205 -0
  56. package/dist/cjs/components/menu/daikin-menu.d.cts +89 -0
  57. package/dist/cjs/components/menu/index.cjs +7 -0
  58. package/dist/cjs/components/menu/index.d.cts +1 -0
  59. package/dist/cjs/components/modal/daikin-modal.cjs +115 -0
  60. package/dist/cjs/components/modal/daikin-modal.d.cts +61 -0
  61. package/dist/cjs/components/modal/index.cjs +7 -0
  62. package/dist/cjs/components/modal/index.d.cts +1 -0
  63. package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +40 -0
  64. package/dist/cjs/components/modal-footer/daikin-modal-footer.d.cts +33 -0
  65. package/dist/cjs/components/modal-footer/index.cjs +7 -0
  66. package/dist/cjs/components/modal-footer/index.d.cts +1 -0
  67. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +96 -0
  68. package/dist/cjs/components/modal-header/daikin-modal-header.d.cts +43 -0
  69. package/dist/cjs/components/modal-header/index.cjs +7 -0
  70. package/dist/cjs/components/modal-header/index.d.cts +1 -0
  71. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +2 -2
  72. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
  73. package/dist/cjs/components/radio/daikin-radio.cjs +4 -13
  74. package/dist/cjs/components/radio/daikin-radio.d.cts +2 -12
  75. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +1 -1
  76. package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +2 -1
  77. package/dist/cjs/components/slider/daikin-slider.cjs +263 -0
  78. package/dist/cjs/components/slider/daikin-slider.d.cts +67 -0
  79. package/dist/cjs/components/slider/index.cjs +7 -0
  80. package/dist/cjs/components/slider/index.d.cts +1 -0
  81. package/dist/cjs/components/slider/slider-utils.cjs +57 -0
  82. package/dist/cjs/components/slider/slider-utils.d.cts +37 -0
  83. package/dist/cjs/components/table/daikin-table.cjs +42 -4
  84. package/dist/cjs/components/table/daikin-table.d.cts +5 -0
  85. package/dist/cjs/components/table-cell/daikin-table-cell.cjs +2 -1
  86. package/dist/cjs/components/table-cell/daikin-table-cell.d.cts +1 -1
  87. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +1 -1
  88. package/dist/cjs/components/tabs/daikin-tabs.cjs +2 -2
  89. package/dist/cjs/components/text-area/daikin-text-area.cjs +4 -13
  90. package/dist/cjs/components/text-area/daikin-text-area.d.cts +2 -12
  91. package/dist/cjs/components/text-field/daikin-text-field.cjs +149 -52
  92. package/dist/cjs/components/text-field/daikin-text-field.d.cts +28 -18
  93. package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +10 -7
  94. package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +2 -0
  95. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
  96. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
  97. package/dist/cjs/components/toggle/daikin-toggle.cjs +4 -13
  98. package/dist/cjs/components/toggle/daikin-toggle.d.cts +2 -12
  99. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +12 -6
  100. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +3 -2
  101. package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +2 -0
  102. package/dist/cjs/controllers/click-outside.cjs +3 -1
  103. package/dist/cjs/controllers/focus-trap.cjs +42 -0
  104. package/dist/cjs/controllers/focus-trap.d.cts +10 -0
  105. package/dist/cjs/index.cjs +55 -0
  106. package/dist/cjs/tailwind.css.cjs +1 -1
  107. package/dist/cjs/utils/calendar-common.cjs +151 -0
  108. package/dist/cjs/utils/calendar-common.d.cts +64 -0
  109. package/dist/cjs/utils/is-similar-to-click.cjs +4 -0
  110. package/dist/cjs/utils/is-similar-to-click.d.cts +1 -0
  111. package/dist/cjs/utils/notification-common.cjs +19 -15
  112. package/dist/cjs/utils/notification-common.d.cts +1 -1
  113. package/dist/cjs/{components/tabs → utils}/scroller.cjs +20 -12
  114. package/dist/cjs/{components/tabs → utils}/scroller.d.cts +2 -2
  115. package/dist/cjs-dev/base/dds-element.cjs +1 -1
  116. package/dist/cjs-dev/base/dds-form-element.cjs +139 -0
  117. package/dist/cjs-dev/base/dds-form-element.d.cts +100 -0
  118. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +6 -3
  119. package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +160 -0
  120. package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +67 -0
  121. package/dist/cjs-dev/components/avatar/index.cjs +7 -0
  122. package/dist/cjs-dev/components/avatar/index.d.cts +1 -0
  123. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
  124. package/dist/cjs-dev/components/button/daikin-button.cjs +35 -13
  125. package/dist/cjs-dev/components/button/daikin-button.d.cts +20 -10
  126. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +558 -0
  127. package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +87 -0
  128. package/dist/cjs-dev/components/calendar/index.cjs +7 -0
  129. package/dist/cjs-dev/components/calendar/index.d.cts +1 -0
  130. package/dist/cjs-dev/components/card/daikin-card.cjs +1 -1
  131. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +13 -16
  132. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +13 -12
  133. package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
  134. package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
  135. package/dist/cjs-dev/components/checkbox-group/index.cjs +7 -0
  136. package/dist/cjs-dev/components/checkbox-group/index.d.cts +1 -0
  137. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +622 -0
  138. package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +105 -0
  139. package/dist/cjs-dev/components/date-picker/index.cjs +7 -0
  140. package/dist/cjs-dev/components/date-picker/index.d.cts +1 -0
  141. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +181 -86
  142. package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +48 -18
  143. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +97 -36
  144. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.cts +6 -1
  145. package/dist/cjs-dev/components/icon/icons.json.cjs +1 -1
  146. package/dist/cjs-dev/components/icon/icons.json.d.cts +30 -14
  147. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +18 -2
  148. package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +12 -2
  149. package/dist/cjs-dev/components/index.cjs +55 -0
  150. package/dist/cjs-dev/components/index.d.cts +11 -0
  151. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +13 -18
  152. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +3 -1
  153. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +4 -4
  154. package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +22 -0
  155. package/dist/cjs-dev/components/list/daikin-list.cjs +75 -3
  156. package/dist/cjs-dev/components/list/daikin-list.d.cts +16 -0
  157. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +25 -5
  158. package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +9 -3
  159. package/dist/cjs-dev/components/loading/daikin-loading.cjs +91 -0
  160. package/dist/cjs-dev/components/loading/daikin-loading.d.cts +33 -0
  161. package/dist/cjs-dev/components/loading/index.cjs +7 -0
  162. package/dist/cjs-dev/components/loading/index.d.cts +1 -0
  163. package/dist/cjs-dev/components/logo/daikin-logo.cjs +105 -0
  164. package/dist/cjs-dev/components/logo/daikin-logo.d.cts +54 -0
  165. package/dist/cjs-dev/components/logo/index.cjs +7 -0
  166. package/dist/cjs-dev/components/logo/index.d.cts +1 -0
  167. package/dist/cjs-dev/components/menu/daikin-menu.cjs +205 -0
  168. package/dist/cjs-dev/components/menu/daikin-menu.d.cts +89 -0
  169. package/dist/cjs-dev/components/menu/index.cjs +7 -0
  170. package/dist/cjs-dev/components/menu/index.d.cts +1 -0
  171. package/dist/cjs-dev/components/modal/daikin-modal.cjs +115 -0
  172. package/dist/cjs-dev/components/modal/daikin-modal.d.cts +61 -0
  173. package/dist/cjs-dev/components/modal/index.cjs +7 -0
  174. package/dist/cjs-dev/components/modal/index.d.cts +1 -0
  175. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +40 -0
  176. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.d.cts +33 -0
  177. package/dist/cjs-dev/components/modal-footer/index.cjs +7 -0
  178. package/dist/cjs-dev/components/modal-footer/index.d.cts +1 -0
  179. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +96 -0
  180. package/dist/cjs-dev/components/modal-header/daikin-modal-header.d.cts +43 -0
  181. package/dist/cjs-dev/components/modal-header/index.cjs +7 -0
  182. package/dist/cjs-dev/components/modal-header/index.d.cts +1 -0
  183. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +2 -2
  184. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
  185. package/dist/cjs-dev/components/radio/daikin-radio.cjs +4 -13
  186. package/dist/cjs-dev/components/radio/daikin-radio.d.cts +2 -12
  187. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +1 -1
  188. package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +2 -1
  189. package/dist/cjs-dev/components/slider/daikin-slider.cjs +263 -0
  190. package/dist/cjs-dev/components/slider/daikin-slider.d.cts +67 -0
  191. package/dist/cjs-dev/components/slider/index.cjs +7 -0
  192. package/dist/cjs-dev/components/slider/index.d.cts +1 -0
  193. package/dist/cjs-dev/components/slider/slider-utils.cjs +57 -0
  194. package/dist/cjs-dev/components/slider/slider-utils.d.cts +37 -0
  195. package/dist/cjs-dev/components/table/daikin-table.cjs +42 -4
  196. package/dist/cjs-dev/components/table/daikin-table.d.cts +5 -0
  197. package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +2 -1
  198. package/dist/cjs-dev/components/table-cell/daikin-table-cell.d.cts +1 -1
  199. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +1 -1
  200. package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +2 -2
  201. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +4 -13
  202. package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +2 -12
  203. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +149 -52
  204. package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +28 -18
  205. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +10 -7
  206. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +2 -0
  207. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
  208. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
  209. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +4 -13
  210. package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +2 -12
  211. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +12 -6
  212. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +3 -2
  213. package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +2 -0
  214. package/dist/cjs-dev/controllers/click-outside.cjs +3 -1
  215. package/dist/cjs-dev/controllers/focus-trap.cjs +42 -0
  216. package/dist/cjs-dev/controllers/focus-trap.d.cts +10 -0
  217. package/dist/cjs-dev/index.cjs +55 -0
  218. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  219. package/dist/cjs-dev/utils/calendar-common.cjs +151 -0
  220. package/dist/cjs-dev/utils/calendar-common.d.cts +64 -0
  221. package/dist/cjs-dev/utils/is-similar-to-click.cjs +4 -0
  222. package/dist/cjs-dev/utils/is-similar-to-click.d.cts +1 -0
  223. package/dist/cjs-dev/utils/notification-common.cjs +19 -15
  224. package/dist/cjs-dev/utils/notification-common.d.cts +1 -1
  225. package/dist/cjs-dev/{components/tabs → utils}/scroller.cjs +20 -12
  226. package/dist/cjs-dev/{components/tabs → utils}/scroller.d.cts +2 -2
  227. package/dist/es/base/dds-element.js +1 -1
  228. package/dist/es/base/dds-form-element.d.ts +100 -0
  229. package/dist/es/base/dds-form-element.js +139 -0
  230. package/dist/es/components/accordion/daikin-accordion.js +1 -1
  231. package/dist/es/components/accordion-item/daikin-accordion-item.js +7 -4
  232. package/dist/es/components/avatar/daikin-avatar.d.ts +67 -0
  233. package/dist/es/components/avatar/daikin-avatar.js +161 -0
  234. package/dist/es/components/avatar/index.d.ts +1 -0
  235. package/dist/es/components/avatar/index.js +4 -0
  236. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +1 -1
  237. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
  238. package/dist/es/components/button/daikin-button.d.ts +20 -10
  239. package/dist/es/components/button/daikin-button.js +36 -14
  240. package/dist/es/components/calendar/daikin-calendar.d.ts +87 -0
  241. package/dist/es/components/calendar/daikin-calendar.js +548 -0
  242. package/dist/es/components/calendar/index.d.ts +1 -0
  243. package/dist/es/components/calendar/index.js +4 -0
  244. package/dist/es/components/card/daikin-card.js +2 -2
  245. package/dist/es/components/card-footer/daikin-card-footer.js +1 -1
  246. package/dist/es/components/card-header/daikin-card-header.js +1 -1
  247. package/dist/es/components/carousel/daikin-carousel.js +1 -1
  248. package/dist/es/components/carousel-item/daikin-carousel-item.js +1 -1
  249. package/dist/es/components/checkbox/daikin-checkbox.d.ts +13 -12
  250. package/dist/es/components/checkbox/daikin-checkbox.js +14 -17
  251. package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
  252. package/dist/es/components/checkbox-group/daikin-checkbox-group.js +95 -0
  253. package/dist/es/components/checkbox-group/index.d.ts +1 -0
  254. package/dist/es/components/checkbox-group/index.js +4 -0
  255. package/dist/es/components/date-picker/daikin-date-picker.d.ts +105 -0
  256. package/dist/es/components/date-picker/daikin-date-picker.js +612 -0
  257. package/dist/es/components/date-picker/index.d.ts +1 -0
  258. package/dist/es/components/date-picker/index.js +4 -0
  259. package/dist/es/components/dropdown/daikin-dropdown.d.ts +48 -18
  260. package/dist/es/components/dropdown/daikin-dropdown.js +182 -87
  261. package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +6 -1
  262. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +98 -37
  263. package/dist/es/components/icon/daikin-icon.js +1 -1
  264. package/dist/es/components/icon/icons.json.d.ts +30 -14
  265. package/dist/es/components/icon/icons.json.js +1 -1
  266. package/dist/es/components/icon-button/daikin-icon-button.d.ts +12 -2
  267. package/dist/es/components/icon-button/daikin-icon-button.js +19 -3
  268. package/dist/es/components/index.d.ts +11 -0
  269. package/dist/es/components/index.js +22 -0
  270. package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +3 -1
  271. package/dist/es/components/inline-notification/daikin-inline-notification.js +14 -19
  272. package/dist/es/components/input-group/daikin-input-group.d.ts +22 -0
  273. package/dist/es/components/input-group/daikin-input-group.js +5 -5
  274. package/dist/es/components/link/daikin-link.js +1 -1
  275. package/dist/es/components/list/daikin-list.d.ts +16 -0
  276. package/dist/es/components/list/daikin-list.js +76 -4
  277. package/dist/es/components/list-item/daikin-list-item.d.ts +9 -3
  278. package/dist/es/components/list-item/daikin-list-item.js +26 -6
  279. package/dist/es/components/loading/daikin-loading.d.ts +33 -0
  280. package/dist/es/components/loading/daikin-loading.js +92 -0
  281. package/dist/es/components/loading/index.d.ts +1 -0
  282. package/dist/es/components/loading/index.js +4 -0
  283. package/dist/es/components/logo/daikin-logo.d.ts +54 -0
  284. package/dist/es/components/logo/daikin-logo.js +106 -0
  285. package/dist/es/components/logo/index.d.ts +1 -0
  286. package/dist/es/components/logo/index.js +4 -0
  287. package/dist/es/components/menu/daikin-menu.d.ts +89 -0
  288. package/dist/es/components/menu/daikin-menu.js +206 -0
  289. package/dist/es/components/menu/index.d.ts +1 -0
  290. package/dist/es/components/menu/index.js +4 -0
  291. package/dist/es/components/modal/daikin-modal.d.ts +61 -0
  292. package/dist/es/components/modal/daikin-modal.js +116 -0
  293. package/dist/es/components/modal/index.d.ts +1 -0
  294. package/dist/es/components/modal/index.js +4 -0
  295. package/dist/es/components/modal-footer/daikin-modal-footer.d.ts +33 -0
  296. package/dist/es/components/modal-footer/daikin-modal-footer.js +41 -0
  297. package/dist/es/components/modal-footer/index.d.ts +1 -0
  298. package/dist/es/components/modal-footer/index.js +4 -0
  299. package/dist/es/components/modal-header/daikin-modal-header.d.ts +43 -0
  300. package/dist/es/components/modal-header/daikin-modal-header.js +97 -0
  301. package/dist/es/components/modal-header/index.d.ts +1 -0
  302. package/dist/es/components/modal-header/index.js +4 -0
  303. package/dist/es/components/pagination/daikin-pagination.js +1 -1
  304. package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -3
  305. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -1
  306. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
  307. package/dist/es/components/radio/daikin-radio.d.ts +2 -12
  308. package/dist/es/components/radio/daikin-radio.js +5 -14
  309. package/dist/es/components/radio-group/daikin-radio-group.d.ts +2 -1
  310. package/dist/es/components/radio-group/daikin-radio-group.js +2 -2
  311. package/dist/es/components/select/daikin-select.js +1 -1
  312. package/dist/es/components/slider/daikin-slider.d.ts +67 -0
  313. package/dist/es/components/slider/daikin-slider.js +264 -0
  314. package/dist/es/components/slider/index.d.ts +1 -0
  315. package/dist/es/components/slider/index.js +4 -0
  316. package/dist/es/components/slider/slider-utils.d.ts +37 -0
  317. package/dist/es/components/slider/slider-utils.js +57 -0
  318. package/dist/es/components/tab/daikin-tab.js +1 -1
  319. package/dist/es/components/tab-panels/daikin-tab-panels.js +1 -1
  320. package/dist/es/components/table/daikin-table.d.ts +5 -0
  321. package/dist/es/components/table/daikin-table.js +43 -5
  322. package/dist/es/components/table-cell/daikin-table-cell.d.ts +1 -1
  323. package/dist/es/components/table-cell/daikin-table-cell.js +3 -2
  324. package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +1 -1
  325. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +1 -1
  326. package/dist/es/components/tabs/daikin-tabs.js +3 -3
  327. package/dist/es/components/text-area/daikin-text-area.d.ts +2 -12
  328. package/dist/es/components/text-area/daikin-text-area.js +5 -14
  329. package/dist/es/components/text-field/daikin-text-field.d.ts +28 -18
  330. package/dist/es/components/text-field/daikin-text-field.js +150 -53
  331. package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +2 -0
  332. package/dist/es/components/toast-notification/daikin-toast-notification.js +11 -8
  333. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
  334. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
  335. package/dist/es/components/toggle/daikin-toggle.d.ts +2 -12
  336. package/dist/es/components/toggle/daikin-toggle.js +5 -14
  337. package/dist/es/components/tooltip/daikin-tooltip.d.ts +3 -2
  338. package/dist/es/components/tooltip/daikin-tooltip.js +13 -7
  339. package/dist/es/components/tree/daikin-tree.js +1 -1
  340. package/dist/es/components/tree-item/daikin-tree-item.js +1 -1
  341. package/dist/es/components/tree-section/daikin-tree-section.d.ts +2 -0
  342. package/dist/es/components/tree-section/daikin-tree-section.js +1 -1
  343. package/dist/es/controllers/click-outside.js +3 -1
  344. package/dist/es/controllers/focus-trap.d.ts +10 -0
  345. package/dist/es/controllers/focus-trap.js +42 -0
  346. package/dist/es/index.js +22 -0
  347. package/dist/es/tailwind.css.js +1 -1
  348. package/dist/es/utils/calendar-common.d.ts +64 -0
  349. package/dist/es/utils/calendar-common.js +151 -0
  350. package/dist/es/utils/is-similar-to-click.d.ts +1 -0
  351. package/dist/es/utils/is-similar-to-click.js +4 -0
  352. package/dist/es/utils/notification-common.d.ts +1 -1
  353. package/dist/es/utils/notification-common.js +19 -15
  354. package/dist/es/{components/tabs → utils}/scroller.d.ts +2 -2
  355. package/dist/es/{components/tabs → utils}/scroller.js +20 -12
  356. package/dist/es-dev/base/dds-element.js +1 -1
  357. package/dist/es-dev/base/dds-form-element.d.ts +100 -0
  358. package/dist/es-dev/base/dds-form-element.js +139 -0
  359. package/dist/es-dev/components/accordion/daikin-accordion.js +1 -1
  360. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +7 -4
  361. package/dist/es-dev/components/avatar/daikin-avatar.d.ts +67 -0
  362. package/dist/es-dev/components/avatar/daikin-avatar.js +161 -0
  363. package/dist/es-dev/components/avatar/index.d.ts +1 -0
  364. package/dist/es-dev/components/avatar/index.js +4 -0
  365. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +1 -1
  366. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
  367. package/dist/es-dev/components/button/daikin-button.d.ts +20 -10
  368. package/dist/es-dev/components/button/daikin-button.js +36 -14
  369. package/dist/es-dev/components/calendar/daikin-calendar.d.ts +87 -0
  370. package/dist/es-dev/components/calendar/daikin-calendar.js +559 -0
  371. package/dist/es-dev/components/calendar/index.d.ts +1 -0
  372. package/dist/es-dev/components/calendar/index.js +4 -0
  373. package/dist/es-dev/components/card/daikin-card.js +2 -2
  374. package/dist/es-dev/components/card-footer/daikin-card-footer.js +1 -1
  375. package/dist/es-dev/components/card-header/daikin-card-header.js +1 -1
  376. package/dist/es-dev/components/carousel/daikin-carousel.js +1 -1
  377. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +1 -1
  378. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +13 -12
  379. package/dist/es-dev/components/checkbox/daikin-checkbox.js +14 -17
  380. package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
  381. package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +95 -0
  382. package/dist/es-dev/components/checkbox-group/index.d.ts +1 -0
  383. package/dist/es-dev/components/checkbox-group/index.js +4 -0
  384. package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +105 -0
  385. package/dist/es-dev/components/date-picker/daikin-date-picker.js +623 -0
  386. package/dist/es-dev/components/date-picker/index.d.ts +1 -0
  387. package/dist/es-dev/components/date-picker/index.js +4 -0
  388. package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +48 -18
  389. package/dist/es-dev/components/dropdown/daikin-dropdown.js +182 -87
  390. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +6 -1
  391. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +98 -37
  392. package/dist/es-dev/components/icon/daikin-icon.js +1 -1
  393. package/dist/es-dev/components/icon/icons.json.d.ts +30 -14
  394. package/dist/es-dev/components/icon/icons.json.js +1 -1
  395. package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +12 -2
  396. package/dist/es-dev/components/icon-button/daikin-icon-button.js +19 -3
  397. package/dist/es-dev/components/index.d.ts +11 -0
  398. package/dist/es-dev/components/index.js +22 -0
  399. package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +3 -1
  400. package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +14 -19
  401. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +22 -0
  402. package/dist/es-dev/components/input-group/daikin-input-group.js +5 -5
  403. package/dist/es-dev/components/link/daikin-link.js +1 -1
  404. package/dist/es-dev/components/list/daikin-list.d.ts +16 -0
  405. package/dist/es-dev/components/list/daikin-list.js +76 -4
  406. package/dist/es-dev/components/list-item/daikin-list-item.d.ts +9 -3
  407. package/dist/es-dev/components/list-item/daikin-list-item.js +26 -6
  408. package/dist/es-dev/components/loading/daikin-loading.d.ts +33 -0
  409. package/dist/es-dev/components/loading/daikin-loading.js +92 -0
  410. package/dist/es-dev/components/loading/index.d.ts +1 -0
  411. package/dist/es-dev/components/loading/index.js +4 -0
  412. package/dist/es-dev/components/logo/daikin-logo.d.ts +54 -0
  413. package/dist/es-dev/components/logo/daikin-logo.js +106 -0
  414. package/dist/es-dev/components/logo/index.d.ts +1 -0
  415. package/dist/es-dev/components/logo/index.js +4 -0
  416. package/dist/es-dev/components/menu/daikin-menu.d.ts +89 -0
  417. package/dist/es-dev/components/menu/daikin-menu.js +206 -0
  418. package/dist/es-dev/components/menu/index.d.ts +1 -0
  419. package/dist/es-dev/components/menu/index.js +4 -0
  420. package/dist/es-dev/components/modal/daikin-modal.d.ts +61 -0
  421. package/dist/es-dev/components/modal/daikin-modal.js +116 -0
  422. package/dist/es-dev/components/modal/index.d.ts +1 -0
  423. package/dist/es-dev/components/modal/index.js +4 -0
  424. package/dist/es-dev/components/modal-footer/daikin-modal-footer.d.ts +33 -0
  425. package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +41 -0
  426. package/dist/es-dev/components/modal-footer/index.d.ts +1 -0
  427. package/dist/es-dev/components/modal-footer/index.js +4 -0
  428. package/dist/es-dev/components/modal-header/daikin-modal-header.d.ts +43 -0
  429. package/dist/es-dev/components/modal-header/daikin-modal-header.js +97 -0
  430. package/dist/es-dev/components/modal-header/index.d.ts +1 -0
  431. package/dist/es-dev/components/modal-header/index.js +4 -0
  432. package/dist/es-dev/components/pagination/daikin-pagination.js +1 -1
  433. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -3
  434. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -1
  435. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
  436. package/dist/es-dev/components/radio/daikin-radio.d.ts +2 -12
  437. package/dist/es-dev/components/radio/daikin-radio.js +5 -14
  438. package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +2 -1
  439. package/dist/es-dev/components/radio-group/daikin-radio-group.js +2 -2
  440. package/dist/es-dev/components/select/daikin-select.js +1 -1
  441. package/dist/es-dev/components/slider/daikin-slider.d.ts +67 -0
  442. package/dist/es-dev/components/slider/daikin-slider.js +264 -0
  443. package/dist/es-dev/components/slider/index.d.ts +1 -0
  444. package/dist/es-dev/components/slider/index.js +4 -0
  445. package/dist/es-dev/components/slider/slider-utils.d.ts +37 -0
  446. package/dist/es-dev/components/slider/slider-utils.js +57 -0
  447. package/dist/es-dev/components/tab/daikin-tab.js +1 -1
  448. package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +1 -1
  449. package/dist/es-dev/components/table/daikin-table.d.ts +5 -0
  450. package/dist/es-dev/components/table/daikin-table.js +43 -5
  451. package/dist/es-dev/components/table-cell/daikin-table-cell.d.ts +1 -1
  452. package/dist/es-dev/components/table-cell/daikin-table-cell.js +3 -2
  453. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +1 -1
  454. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +1 -1
  455. package/dist/es-dev/components/tabs/daikin-tabs.js +3 -3
  456. package/dist/es-dev/components/text-area/daikin-text-area.d.ts +2 -12
  457. package/dist/es-dev/components/text-area/daikin-text-area.js +5 -14
  458. package/dist/es-dev/components/text-field/daikin-text-field.d.ts +28 -18
  459. package/dist/es-dev/components/text-field/daikin-text-field.js +150 -53
  460. package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +2 -0
  461. package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +11 -8
  462. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
  463. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
  464. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +2 -12
  465. package/dist/es-dev/components/toggle/daikin-toggle.js +5 -14
  466. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +3 -2
  467. package/dist/es-dev/components/tooltip/daikin-tooltip.js +13 -7
  468. package/dist/es-dev/components/tree/daikin-tree.js +1 -1
  469. package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -1
  470. package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +2 -0
  471. package/dist/es-dev/components/tree-section/daikin-tree-section.js +1 -1
  472. package/dist/es-dev/controllers/click-outside.js +3 -1
  473. package/dist/es-dev/controllers/focus-trap.d.ts +10 -0
  474. package/dist/es-dev/controllers/focus-trap.js +42 -0
  475. package/dist/es-dev/index.js +22 -0
  476. package/dist/es-dev/tailwind.css.js +1 -1
  477. package/dist/es-dev/utils/calendar-common.d.ts +64 -0
  478. package/dist/es-dev/utils/calendar-common.js +151 -0
  479. package/dist/es-dev/utils/is-similar-to-click.d.ts +1 -0
  480. package/dist/es-dev/utils/is-similar-to-click.js +4 -0
  481. package/dist/es-dev/utils/notification-common.d.ts +1 -1
  482. package/dist/es-dev/utils/notification-common.js +19 -15
  483. package/dist/es-dev/{components/tabs → utils}/scroller.d.ts +2 -2
  484. package/dist/es-dev/{components/tabs → utils}/scroller.js +20 -12
  485. package/icons/alarm.svg +3 -0
  486. package/icons/calendar.svg +3 -0
  487. package/icons/chevron-down.svg +3 -3
  488. package/icons/chevron-left.svg +2 -2
  489. package/icons/chevron-right.svg +2 -2
  490. package/icons/chevron-up.svg +2 -2
  491. package/icons/close.svg +3 -0
  492. package/icons/dropdown-chevron-down.svg +3 -3
  493. package/icons/error.svg +3 -0
  494. package/icons/information.svg +3 -0
  495. package/icons/logo-negative.svg +10 -0
  496. package/icons/logo-positive.svg +10 -0
  497. package/icons/password-hidden.svg +3 -0
  498. package/icons/password-visible.svg +3 -0
  499. package/icons/profile.svg +4 -0
  500. package/icons/pulldown-down.svg +3 -0
  501. package/icons/search.svg +3 -0
  502. package/icons/success.svg +3 -0
  503. package/icons/warning.svg +3 -0
  504. package/package.json +7 -3
  505. package/icons/cross.svg +0 -3
  506. package/icons/notification-close.svg +0 -5
  507. package/icons/status-alarm.svg +0 -5
  508. package/icons/status-error.svg +0 -3
  509. package/icons/status-information.svg +0 -5
  510. package/icons/status-negative.svg +0 -5
  511. package/icons/status-positive.svg +0 -5
  512. package/icons/status-warning.svg +0 -3
@@ -0,0 +1,64 @@
1
+ export declare const DEFAULT_MIN_DATE = "1900-01-01";
2
+ export declare const DEFAULT_MAX_DATE = "2099-12-31";
3
+ export declare const cvaIconButton: (props?: ({
4
+ intent?: "previous" | "next" | "calender" | "pulldown" | null | undefined;
5
+ rotate?: "default" | "inverse" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ /**
8
+ * Determines whether the specified date is outside the range. Time information is ignored.
9
+ */
10
+ export declare function isDateOutOfRange(base: Date, min: Date, max: Date): boolean;
11
+ /**
12
+ * Determines whether the specified month and year are outside the range. Date and time information is ignored.
13
+ */
14
+ export declare function isMonthOutOfRange(base: Date, min: Date, max: Date): boolean;
15
+ /**
16
+ * Determines whether the year and month of two dates are the same.
17
+ */
18
+ export declare function isSameYearMonth(a: Date, b: Date): boolean;
19
+ /**
20
+ * Stringify the date in YYYY-MM-DD format.
21
+ */
22
+ export declare function formatDateForProperty(date: Date): string;
23
+ /**
24
+ * Parses the date in YYYY-MM-DD format and returns UTC date.
25
+ */
26
+ export declare function parseDateFromProperty(value: string): Date;
27
+ /**
28
+ * Try parsing the date in YYYY-MM-DD format and returns UTC date if available.
29
+ */
30
+ export declare function tryParseDateFromProperty(value: string): Date | null;
31
+ /**
32
+ * Normalizes the Date by stripping time information.
33
+ */
34
+ export declare function normalizeDate(base: Date): Date;
35
+ /**
36
+ * Clones the Date with stripping time information.
37
+ */
38
+ export declare function cloneDate(base: Date): Date;
39
+ /**
40
+ * Clamps the date to the specified range.
41
+ */
42
+ export declare function clampDate(base: Date, min: Date, max: Date): Date;
43
+ /**
44
+ * Retrieves the date specified by the year, month, and day.
45
+ * If the specified date does not exist in the month (e.g., 2/31), it is rounded to the closest date in the same month.
46
+ * The month is in the range 0 to 11.
47
+ */
48
+ export declare function createDateClamped(year: number, month: number, date: number): Date;
49
+ /**
50
+ * Retrieves the date of the same day in a different month with the specified offset.
51
+ * If that day does not exist in the month (such as February 31), it is rounded to the closest day in the month.
52
+ */
53
+ export declare function getDateByMonthOffsetClamped(base: Date, monthOffset: number): Date;
54
+ /**
55
+ * Calculates the sequence of weeks that exist on the calendar for the specified year and month.
56
+ * The array of weeks in each return value always starts with Sunday and contains seven dates.
57
+ */
58
+ export declare function calcWeeksOnCalendar(year: number, month: number): Date[][];
59
+ /**
60
+ * Return the number of days in the specified year and month.
61
+ * @param year year starting from 1.
62
+ * @param month month starting from 0 (0 means January).
63
+ */
64
+ export declare function countDaysForYearMonth(year: number, month: number): number;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const isSimilarToClick = (key) => ["Enter", " "].includes(key);
4
+ exports.isSimilarToClick = isSimilarToClick;
@@ -0,0 +1 @@
1
+ export declare const isSimilarToClick: (key: string) => boolean;
@@ -45,23 +45,20 @@ const cvaContainer = classVarianceAuthority.cva(
45
45
  status: {
46
46
  positive: [
47
47
  "before:text-ddt-color-common-success",
48
- "before:i-daikin-status-positive"
48
+ "before:i-daikin-success"
49
49
  ],
50
50
  negative: [
51
51
  "before:text-ddt-color-common-danger-default",
52
- "before:i-daikin-status-negative"
52
+ "before:i-daikin-error"
53
53
  ],
54
54
  warning: [
55
55
  "before:text-ddt-color-common-warning",
56
- "before:i-daikin-status-warning"
57
- ],
58
- alarm: [
59
- "before:text-ddt-color-common-alarm",
60
- "before:i-daikin-status-alarm"
56
+ "before:i-daikin-warning"
61
57
  ],
58
+ alarm: ["before:text-ddt-color-common-alarm", "before:i-daikin-alarm"],
62
59
  information: [
63
60
  "before:text-ddt-color-common-information",
64
- "before:i-daikin-status-information"
61
+ "before:i-daikin-information"
65
62
  ]
66
63
  }
67
64
  }
@@ -91,15 +88,22 @@ const cvaTimestamp = classVarianceAuthority.cva(
91
88
  }
92
89
  }
93
90
  );
94
- const cvaTitle = classVarianceAuthority.cva(["inline-block", "font-bold"], {
95
- variants: {
96
- layout: {
97
- vertical: [],
98
- horizontal: ["whitespace-nowrap", "overflow-hidden", "overflow-ellipsis"]
91
+ const cvaTitle = classVarianceAuthority.cva(
92
+ ["slotted:inline-block", "font-bold", "leading-[130%]"],
93
+ {
94
+ variants: {
95
+ layout: {
96
+ vertical: [],
97
+ horizontal: [
98
+ "slotted:whitespace-nowrap",
99
+ "slotted:overflow-hidden",
100
+ "slotted:overflow-ellipsis"
101
+ ]
102
+ }
99
103
  }
100
104
  }
101
- });
102
- const cvaDescription = classVarianceAuthority.cva(["inline-block"], {
105
+ );
106
+ const cvaDescription = classVarianceAuthority.cva(["inline-block", "leading-[130%]"], {
103
107
  variants: {
104
108
  layout: {
105
109
  vertical: [],
@@ -3,7 +3,7 @@ export declare const TOAST_ANIMATION_DURATION = 200;
3
3
  export declare function formatDate(date: Date): string | null;
4
4
  export declare const cvaContainer: (props?: ({
5
5
  variant?: "toast" | "inline" | null | undefined;
6
- status?: "alarm" | "information" | "negative" | "positive" | "warning" | null | undefined;
6
+ status?: "alarm" | "information" | "warning" | "negative" | "positive" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export declare const cvaContent: (props?: ({
9
9
  layout?: "horizontal" | "vertical" | null | undefined;
@@ -5,7 +5,7 @@ function getEffectiveParentElement(element) {
5
5
  return element.assignedSlot || element.parentElement || ((_a = element.parentNode) == null ? void 0 : _a.host);
6
6
  }
7
7
  function getBooleanForDirection(horizontal, vertical, direction) {
8
- return horizontal;
8
+ return direction === "horizontal" ? horizontal : direction === "vertical" ? vertical : horizontal || vertical;
9
9
  }
10
10
  function isScrollableOverflowValue(overflow) {
11
11
  return overflow !== "visible" && overflow !== "hidden" && overflow !== "clip";
@@ -17,43 +17,51 @@ function getFirstScrollableAncestor(element, direction) {
17
17
  }
18
18
  const overflow = getBooleanForDirection(
19
19
  parent.scrollWidth > parent.clientWidth,
20
- parent.scrollHeight > parent.clientHeight
20
+ parent.scrollHeight > parent.clientHeight,
21
+ direction
21
22
  );
22
23
  if (overflow) {
23
24
  const computedStyle = getComputedStyle(parent);
24
25
  const scrollableOverflow = getBooleanForDirection(
25
26
  isScrollableOverflowValue(computedStyle.overflowX),
26
- isScrollableOverflowValue(computedStyle.overflowY)
27
+ isScrollableOverflowValue(computedStyle.overflowY),
28
+ direction
27
29
  );
28
30
  if (scrollableOverflow) {
29
31
  return parent;
30
32
  }
31
33
  }
32
- return getFirstScrollableAncestor(parent);
34
+ return getFirstScrollableAncestor(parent, direction);
33
35
  }
34
- function calcScrollIntoViewOffset(target, container) {
36
+ function calcScrollIntoViewOffset(target, container, center) {
35
37
  const bBoxContainer = container.getBoundingClientRect();
36
38
  const bBoxTarget = target.getBoundingClientRect();
39
+ const xOffset = center ? (bBoxContainer.width - bBoxTarget.width) / 2 : 0;
40
+ const yOffset = center ? (bBoxContainer.height - bBoxTarget.height) / 2 : 0;
37
41
  const scrollByX = (
38
42
  // If the left end of the target is to the left of the container, align the left end of the target so that it is in the viewport.
39
- Math.min(bBoxTarget.left - bBoxContainer.left, 0) || // If the right end of the target is to the right of the container, align the right end of the target so that it is in the viewport.
40
- Math.max(bBoxTarget.right - bBoxContainer.right, 0)
43
+ Math.min(bBoxTarget.left - bBoxContainer.left - xOffset, 0) || // If the right end of the target is to the right of the container, align the right end of the target so that it is in the viewport.
44
+ Math.max(bBoxTarget.right - bBoxContainer.right + xOffset, 0)
41
45
  );
42
- const scrollByY = Math.min(bBoxTarget.top - bBoxContainer.top, 0) || Math.max(bBoxTarget.bottom - bBoxContainer.bottom, 0);
46
+ const scrollByY = Math.min(bBoxTarget.top - bBoxContainer.top - yOffset, 0) || Math.max(bBoxTarget.bottom - bBoxContainer.bottom + yOffset, 0);
43
47
  return [scrollByX, scrollByY];
44
48
  }
45
- function scrollIntoViewOnlyParent(target, direction) {
46
- const scrollableParent = getFirstScrollableAncestor(target);
49
+ function scrollIntoViewOnlyParent(target, direction, center) {
50
+ const scrollableParent = getFirstScrollableAncestor(target, direction);
47
51
  if (!scrollableParent) {
48
52
  return false;
49
53
  }
50
54
  let [scrollByX, scrollByY] = calcScrollIntoViewOffset(
51
55
  target,
52
- scrollableParent
56
+ scrollableParent,
57
+ center
53
58
  );
54
- {
59
+ if (direction === "horizontal") {
55
60
  scrollByY = 0;
56
61
  }
62
+ if (direction === "vertical") {
63
+ scrollByX = 0;
64
+ }
57
65
  if (scrollByX || scrollByY) {
58
66
  scrollableParent.scrollBy(scrollByX, scrollByY);
59
67
  }
@@ -14,7 +14,7 @@ export declare function getEffectiveParentElement(element: HTMLElement): HTMLEle
14
14
  * @returns the first scrollable ancestor element (if any)
15
15
  */
16
16
  export declare function getFirstScrollableAncestor(element: HTMLElement, direction: Direction): HTMLElement | null;
17
- export declare function calcScrollIntoViewOffset(target: HTMLElement, container: HTMLElement): [x: number, y: number];
17
+ export declare function calcScrollIntoViewOffset(target: HTMLElement, container: HTMLElement, center: boolean): [x: number, y: number];
18
18
  /**
19
19
  * An alternative `.scrollIntoView()` function which only scrolls the first scrollable ancestor element.
20
20
  *
@@ -22,4 +22,4 @@ export declare function calcScrollIntoViewOffset(target: HTMLElement, container:
22
22
  * @param direction direction
23
23
  * @returns `true` if success, `false` if scrollable parent not found
24
24
  */
25
- export declare function scrollIntoViewOnlyParent(target: HTMLElement, direction: Direction): boolean;
25
+ export declare function scrollIntoViewOnlyParent(target: HTMLElement, direction: Direction, center: boolean): boolean;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const lit = require("lit");
4
4
  const _DDSElement = class _DDSElement extends lit.LitElement {
5
5
  };
6
- _DDSElement.version = "1.0.0";
6
+ _DDSElement.version = "1.2.0";
7
7
  let DDSElement = _DDSElement;
8
8
  exports.DDSElement = DDSElement;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const decorators_js = require("lit/decorators.js");
4
+ const ddsElement = require("./dds-element.cjs");
5
+ var __defProp = Object.defineProperty;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = void 0;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = decorator(target, key, result) || result;
11
+ if (result) __defProp(target, key, result);
12
+ return result;
13
+ };
14
+ const _DDSFormElement = class _DDSFormElement extends ddsElement.DDSElement {
15
+ constructor() {
16
+ super();
17
+ this.name = "";
18
+ this.value = "";
19
+ this.internals = this.attachInternals();
20
+ }
21
+ /**
22
+ * Returns the form object associated with the element, or null if none exists.
23
+ * @private
24
+ */
25
+ get form() {
26
+ return this.internals ? this.internals.form : null;
27
+ }
28
+ /**
29
+ * Set the element's name and value within the current form.
30
+ * @private
31
+ */
32
+ setFormValue(value, state) {
33
+ var _a;
34
+ (_a = this.internals) == null ? void 0 : _a.setFormValue(value, state);
35
+ }
36
+ /**
37
+ * A function that maps to the form control's `reportValidity()` function.
38
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
39
+ * @private
40
+ */
41
+ reportValidity() {
42
+ var _a;
43
+ return (_a = this.internals) == null ? void 0 : _a.reportValidity();
44
+ }
45
+ /**
46
+ * A function that maps to the form control's `checkValidity()` function.
47
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
48
+ * @private
49
+ */
50
+ checkValidity() {
51
+ var _a;
52
+ return (_a = this.internals) == null ? void 0 : _a.checkValidity();
53
+ }
54
+ /**
55
+ * TODO Enhance these functions to bring our components closer to native form components.
56
+ * @private
57
+ */
58
+ hostConnected() {
59
+ }
60
+ /**
61
+ * TODO Enhance these functions to bring our components closer to native form components.
62
+ * @private
63
+ */
64
+ hostDisconnected() {
65
+ }
66
+ /**
67
+ * TODO Enhance these functions to bring our components closer to native form components.
68
+ * @private
69
+ */
70
+ hostUpdated() {
71
+ }
72
+ };
73
+ _DDSFormElement.formAssociated = true;
74
+ let DDSFormElement = _DDSFormElement;
75
+ __decorateClass([
76
+ decorators_js.property({ type: String, reflect: true })
77
+ ], DDSFormElement.prototype, "name");
78
+ __decorateClass([
79
+ decorators_js.property({ type: String, reflect: true })
80
+ ], DDSFormElement.prototype, "value");
81
+ __decorateClass([
82
+ decorators_js.property({ type: String, reflect: true, attribute: "form" })
83
+ ], DDSFormElement.prototype, "formAttr");
84
+ const _DDSFormSubmitElement = class _DDSFormSubmitElement extends ddsElement.DDSElement {
85
+ constructor() {
86
+ super();
87
+ this.internals = this.attachInternals();
88
+ }
89
+ /**
90
+ * Returns the form object associated with the element, or null if none exists.
91
+ * @private
92
+ */
93
+ get form() {
94
+ return this.internals ? this.internals.form : null;
95
+ }
96
+ /**
97
+ * A function that maps to the form control's `reportValidity()` function.
98
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
99
+ * @private
100
+ */
101
+ requestSubmit() {
102
+ var _a, _b;
103
+ (_b = (_a = this.internals) == null ? void 0 : _a.form) == null ? void 0 : _b.requestSubmit();
104
+ }
105
+ /**
106
+ * A function that maps to the form control's `checkValidity()` function.
107
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
108
+ * @private
109
+ */
110
+ reset() {
111
+ var _a, _b;
112
+ (_b = (_a = this.internals) == null ? void 0 : _a.form) == null ? void 0 : _b.reset();
113
+ }
114
+ /**
115
+ * TODO Enhance these functions to bring our components closer to native form components.
116
+ * @private
117
+ */
118
+ hostConnected() {
119
+ }
120
+ /**
121
+ * TODO Enhance these functions to bring our components closer to native form components.
122
+ * @private
123
+ */
124
+ hostDisconnected() {
125
+ }
126
+ /**
127
+ * TODO Enhance these functions to bring our components closer to native form components.
128
+ * @private
129
+ */
130
+ hostUpdated() {
131
+ }
132
+ };
133
+ _DDSFormSubmitElement.formAssociated = true;
134
+ let DDSFormSubmitElement = _DDSFormSubmitElement;
135
+ __decorateClass([
136
+ decorators_js.property({ type: String, reflect: true, attribute: "form" })
137
+ ], DDSFormSubmitElement.prototype, "formAttr");
138
+ exports.DDSFormElement = DDSFormElement;
139
+ exports.DDSFormSubmitElement = DDSFormSubmitElement;
@@ -0,0 +1,100 @@
1
+ import { DDSElement } from "./dds-element.cjs";
2
+ type FormValueType = string | File | FormData | null;
3
+ export declare class DDSFormElement extends DDSElement {
4
+ static readonly formAssociated = true;
5
+ /**
6
+ * The form name, submitted as a name/value pair when submitting the form.
7
+ */
8
+ name: string;
9
+ /**
10
+ * The form value, submitted as a name/value pair when submitting the form.
11
+ */
12
+ value: string;
13
+ /**
14
+ * The form attribute specifies the form the form component belongs to.
15
+ * The value of this attribute must be equal to the id attribute of a <form> element in the same document.
16
+ */
17
+ formAttr: string | undefined;
18
+ protected internals: ElementInternals | null | undefined;
19
+ constructor();
20
+ /**
21
+ * Returns the form object associated with the element, or null if none exists.
22
+ * @private
23
+ */
24
+ get form(): HTMLFormElement | null;
25
+ /**
26
+ * Set the element's name and value within the current form.
27
+ * @private
28
+ */
29
+ setFormValue(value: FormValueType, state?: FormValueType): void;
30
+ /**
31
+ * A function that maps to the form control's `reportValidity()` function.
32
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
33
+ * @private
34
+ */
35
+ reportValidity(): boolean | undefined;
36
+ /**
37
+ * A function that maps to the form control's `checkValidity()` function.
38
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
39
+ * @private
40
+ */
41
+ checkValidity(): boolean | undefined;
42
+ /**
43
+ * TODO Enhance these functions to bring our components closer to native form components.
44
+ * @private
45
+ */
46
+ hostConnected(): void;
47
+ /**
48
+ * TODO Enhance these functions to bring our components closer to native form components.
49
+ * @private
50
+ */
51
+ hostDisconnected(): void;
52
+ /**
53
+ * TODO Enhance these functions to bring our components closer to native form components.
54
+ * @private
55
+ */
56
+ hostUpdated(): void;
57
+ }
58
+ export declare class DDSFormSubmitElement extends DDSElement {
59
+ static readonly formAssociated = true;
60
+ /**
61
+ * The form attribute specifies the form the form component belongs to.
62
+ * The value of this attribute must be equal to the id attribute of a <form> element in the same document.
63
+ */
64
+ formAttr: string | undefined;
65
+ protected internals: ElementInternals | null | undefined;
66
+ constructor();
67
+ /**
68
+ * Returns the form object associated with the element, or null if none exists.
69
+ * @private
70
+ */
71
+ get form(): HTMLFormElement | null;
72
+ /**
73
+ * A function that maps to the form control's `reportValidity()` function.
74
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
75
+ * @private
76
+ */
77
+ requestSubmit(): void;
78
+ /**
79
+ * A function that maps to the form control's `checkValidity()` function.
80
+ * Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
81
+ * @private
82
+ */
83
+ reset(): void;
84
+ /**
85
+ * TODO Enhance these functions to bring our components closer to native form components.
86
+ * @private
87
+ */
88
+ hostConnected(): void;
89
+ /**
90
+ * TODO Enhance these functions to bring our components closer to native form components.
91
+ * @private
92
+ */
93
+ hostDisconnected(): void;
94
+ /**
95
+ * TODO Enhance these functions to bring our components closer to native form components.
96
+ * @private
97
+ */
98
+ hostUpdated(): void;
99
+ }
100
+ export {};
@@ -27,13 +27,16 @@ const cvaSummary = classVarianceAuthority.cva(
27
27
  "w-full",
28
28
  "min-h-12",
29
29
  "p-3",
30
+ "break-all",
31
+ "text-left",
30
32
  "focus-visible:outline",
31
33
  "focus-visible:outline-2",
32
34
  "focus-visible:-outline-offset-2",
33
35
  "focus-visible:outline-ddt-color-common-border-focus",
34
36
  "after:size-6",
35
37
  "after:transition-all",
36
- "after:i-daikin-chevron-down"
38
+ "after:i-daikin-chevron-down",
39
+ "after:flex-none"
37
40
  ],
38
41
  {
39
42
  variants: {
@@ -100,7 +103,7 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends ddsElement.DDSEl
100
103
  render() {
101
104
  const open = !this.disabled && this.open;
102
105
  return lit.html`<div
103
- class="w-full text-ddt-color-common-text-primary font-daikinSerif overflow-clip"
106
+ class="w-full text-ddt-color-common-text-primary font-daikinSerif"
104
107
  >
105
108
  <button
106
109
  id="summary"
@@ -128,7 +131,7 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends ddsElement.DDSEl
128
131
  >
129
132
  <div class="overflow-hidden">
130
133
  <div class="pt-2 px-3 pb-3">
131
- <slot></slot>
134
+ <slot class="slotted:break-all"></slot>
132
135
  </div>
133
136
  </div>
134
137
  </div>
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const classVarianceAuthority = require("class-variance-authority");
4
+ const lit = require("lit");
5
+ const decorators_js = require("lit/decorators.js");
6
+ const ifDefined_js = require("lit/directives/if-defined.js");
7
+ const tailwind = require("../../tailwind.css.cjs");
8
+ var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __decorateClass = (decorators, target, key, kind) => {
11
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
13
+ if (decorator = decorators[i])
14
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15
+ if (kind && result) __defProp(target, key, result);
16
+ return result;
17
+ };
18
+ const cvaWrapper = classVarianceAuthority.cva(
19
+ [
20
+ "inline-block",
21
+ "rounded-full",
22
+ "relative",
23
+ "overflow-hidden",
24
+ "box-border",
25
+ "size-full",
26
+ "focus-visible:outline",
27
+ "focus-visible:outline-2",
28
+ "focus-visible:outline-offset-2",
29
+ "focus-visible:outline-ddt-color-common-border-focus"
30
+ ],
31
+ {
32
+ variants: {
33
+ type: {
34
+ button: [
35
+ "enabled:bg-ddt-color-common-neutral-default",
36
+ "enabled:text-ddt-color-common-surface-default",
37
+ "enabled:hover:bg-ddt-color-common-neutral-hover",
38
+ "enabled:hover:text-ddt-color-common-surface-hover",
39
+ "enabled:active:bg-ddt-color-common-neutral-press",
40
+ "enabled:active:text-ddt-color-common-surface-press",
41
+ "disabled:bg-ddt-color-common-disabled",
42
+ "disabled:text-ddt-color-common-surface-default"
43
+ ],
44
+ icon: [
45
+ "bg-ddt-color-common-neutral-default",
46
+ "text-ddt-color-common-surface-default"
47
+ ],
48
+ link: [
49
+ "link-enabled:bg-ddt-color-common-neutral-default",
50
+ "link-enabled:text-ddt-color-common-surface-default",
51
+ "link-enabled:hover:bg-ddt-color-common-neutral-hover",
52
+ "link-enabled:hover:text-ddt-color-common-surface-hover",
53
+ "link-enabled:active:bg-ddt-color-common-neutral-press",
54
+ "link-enabled:active:text-ddt-color-common-surface-press",
55
+ "link-disabled:bg-ddt-color-common-disabled",
56
+ "link-disabled:text-ddt-color-common-surface-default"
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ );
62
+ exports.DaikinAvatar = class DaikinAvatar extends lit.LitElement {
63
+ constructor() {
64
+ super();
65
+ this.type = "icon";
66
+ this.href = null;
67
+ this.alt = null;
68
+ this.disabled = false;
69
+ this.avatarAriaHaspopup = null;
70
+ this.avatarAriaExpanded = null;
71
+ this.addEventListener("click", (event) => {
72
+ if (this.disabled || this.type === "link" && this.href == null) {
73
+ event.stopImmediatePropagation();
74
+ }
75
+ });
76
+ }
77
+ render() {
78
+ const icon = lit.html`
79
+ <span
80
+ class="i-daikin-profile"
81
+ >
82
+ </span>
83
+ </daikin-icon>`;
84
+ if (this.type === "icon") {
85
+ return lit.html`<span
86
+ class=${cvaWrapper({ type: "icon" })}
87
+ role="figure"
88
+ aria-label=${ifDefined_js.ifDefined(this.alt ?? void 0)}
89
+ >
90
+ ${icon}
91
+ </span>`;
92
+ } else if (this.type === "button") {
93
+ return lit.html`<button
94
+ class=${cvaWrapper({ type: "button" })}
95
+ aria-label=${ifDefined_js.ifDefined(this.alt ?? void 0)}
96
+ aria-haspopup=${ifDefined_js.ifDefined(this.avatarAriaHaspopup ?? void 0)}
97
+ aria-expanded=${ifDefined_js.ifDefined(this.avatarAriaExpanded ?? void 0)}
98
+ ?disabled=${this.disabled}
99
+ >
100
+ ${icon}
101
+ </button>`;
102
+ } else {
103
+ const linkDisabled = this.disabled || this.href == null;
104
+ return lit.html`<a
105
+ class=${cvaWrapper({ type: "link" })}
106
+ role=${ifDefined_js.ifDefined(linkDisabled ? "link" : void 0)}
107
+ aria-label=${ifDefined_js.ifDefined(this.alt ?? void 0)}
108
+ href=${ifDefined_js.ifDefined(!linkDisabled ? this.href ?? void 0 : void 0)}
109
+ aria-disabled=${ifDefined_js.ifDefined(linkDisabled ? "true" : void 0)}
110
+ >
111
+ ${icon}
112
+ </a>`;
113
+ }
114
+ }
115
+ /**
116
+ * Focuses on the inner button or link.
117
+ * @param options focus options
118
+ */
119
+ focus(options) {
120
+ var _a;
121
+ (_a = this._focusableElement) == null ? void 0 : _a.focus(options);
122
+ }
123
+ };
124
+ exports.DaikinAvatar.styles = lit.css`
125
+ ${lit.unsafeCSS(tailwind.default)}
126
+
127
+ :host {
128
+ display: inline-flex;
129
+ position: relative;
130
+ }
131
+
132
+ :host {
133
+ width: 2.5rem;
134
+ height: 2.5rem;
135
+ }
136
+ `;
137
+ __decorateClass([
138
+ decorators_js.property({ type: String, reflect: true })
139
+ ], exports.DaikinAvatar.prototype, "type", 2);
140
+ __decorateClass([
141
+ decorators_js.property({ type: String, reflect: true })
142
+ ], exports.DaikinAvatar.prototype, "href", 2);
143
+ __decorateClass([
144
+ decorators_js.property({ type: String, reflect: true })
145
+ ], exports.DaikinAvatar.prototype, "alt", 2);
146
+ __decorateClass([
147
+ decorators_js.property({ type: Boolean, reflect: true })
148
+ ], exports.DaikinAvatar.prototype, "disabled", 2);
149
+ __decorateClass([
150
+ decorators_js.property({ type: String, reflect: true, attribute: "avatar-aria-haspopup" })
151
+ ], exports.DaikinAvatar.prototype, "avatarAriaHaspopup", 2);
152
+ __decorateClass([
153
+ decorators_js.property({ type: Boolean, reflect: true, attribute: "avatar-aria-expanded" })
154
+ ], exports.DaikinAvatar.prototype, "avatarAriaExpanded", 2);
155
+ __decorateClass([
156
+ decorators_js.query("a,button")
157
+ ], exports.DaikinAvatar.prototype, "_focusableElement", 2);
158
+ exports.DaikinAvatar = __decorateClass([
159
+ decorators_js.customElement("daikin-avatar")
160
+ ], exports.DaikinAvatar);