@daikin-oss/design-system-web-components 1.5.2 → 1.6.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 (483) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/custom-elements.json +4499 -2442
  3. package/dist/cjs/base/dds-element.cjs +3 -2
  4. package/dist/cjs/base/dds-form-element.d.cts +1 -0
  5. package/dist/cjs/base/dds-property.d.cts +2 -2
  6. package/dist/cjs/components/accordion/daikin-accordion.cjs +1 -0
  7. package/dist/cjs/components/accordion/daikin-accordion.d.cts +4 -0
  8. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +13 -11
  9. package/dist/cjs/components/accordion-item/daikin-accordion-item.d.cts +1 -1
  10. package/dist/cjs/components/badge/daikin-badge.cjs +72 -7
  11. package/dist/cjs/components/badge/daikin-badge.d.cts +25 -4
  12. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +1 -0
  13. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +1 -4
  14. package/dist/cjs/components/button/daikin-button.cjs +4 -6
  15. package/dist/cjs/components/button/daikin-button.d.cts +2 -2
  16. package/dist/cjs/components/calendar/daikin-calendar.cjs +3 -1
  17. package/dist/cjs/components/calendar/daikin-calendar.d.cts +2 -0
  18. package/dist/cjs/components/card-header/daikin-card-header.cjs +0 -2
  19. package/dist/cjs/components/carousel/daikin-carousel.d.cts +1 -0
  20. package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +3 -3
  21. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +25 -5
  22. package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +9 -1
  23. package/dist/cjs/components/chip/daikin-chip.cjs +2 -4
  24. package/dist/cjs/components/chip/daikin-chip.d.cts +1 -0
  25. package/dist/cjs/components/combobox/daikin-combobox.cjs +11 -4
  26. package/dist/cjs/components/combobox/daikin-combobox.d.cts +3 -1
  27. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +127 -62
  28. package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +19 -1
  29. package/dist/cjs/components/divider/daikin-divider.cjs +42 -0
  30. package/dist/cjs/components/divider/daikin-divider.d.cts +23 -0
  31. package/dist/cjs/components/divider/index.cjs +7 -0
  32. package/dist/cjs/components/divider/index.d.cts +1 -0
  33. package/dist/cjs/components/drawer/daikin-drawer.cjs +229 -0
  34. package/dist/cjs/components/drawer/daikin-drawer.d.cts +91 -0
  35. package/dist/cjs/components/drawer/index.cjs +7 -0
  36. package/dist/cjs/components/drawer/index.d.cts +1 -0
  37. package/dist/cjs/components/drawer-footer/daikin-drawer-footer.cjs +36 -0
  38. package/dist/cjs/components/drawer-footer/daikin-drawer-footer.d.cts +33 -0
  39. package/dist/cjs/components/drawer-footer/index.cjs +7 -0
  40. package/dist/cjs/components/drawer-footer/index.d.cts +1 -0
  41. package/dist/cjs/components/drawer-header/daikin-drawer-header.cjs +83 -0
  42. package/dist/cjs/components/drawer-header/daikin-drawer-header.d.cts +41 -0
  43. package/dist/cjs/components/drawer-header/index.cjs +7 -0
  44. package/dist/cjs/components/drawer-header/index.d.cts +1 -0
  45. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +11 -2
  46. package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +3 -1
  47. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +0 -2
  48. package/dist/cjs/components/empty-state/daikin-empty-state.cjs +2 -2
  49. package/dist/cjs/components/icon/daikin-icon.cjs +1 -2
  50. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +0 -1
  51. package/dist/cjs/components/index.cjs +35 -0
  52. package/dist/cjs/components/index.d.cts +7 -0
  53. package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +1 -7
  54. package/dist/cjs/components/input-group/daikin-input-group.cjs +16 -11
  55. package/dist/cjs/components/link/daikin-link.cjs +26 -23
  56. package/dist/cjs/components/list/daikin-list.cjs +12 -0
  57. package/dist/cjs/components/list/daikin-list.d.cts +8 -0
  58. package/dist/cjs/components/list-item/daikin-list-item.cjs +30 -9
  59. package/dist/cjs/components/menu/daikin-menu.cjs +85 -11
  60. package/dist/cjs/components/menu/daikin-menu.d.cts +23 -5
  61. package/dist/cjs/components/modal/daikin-modal.cjs +18 -1
  62. package/dist/cjs/components/modal/daikin-modal.d.cts +25 -0
  63. package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +1 -1
  64. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +0 -2
  65. package/dist/cjs/components/navigation/daikin-navigation.cjs +2 -1
  66. package/dist/cjs/components/navigation/daikin-navigation.d.cts +1 -0
  67. package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +6 -7
  68. package/dist/cjs/components/pagination/daikin-pagination.cjs +13 -6
  69. package/dist/cjs/components/pagination/daikin-pagination.d.cts +4 -1
  70. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +2 -3
  71. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +1 -1
  72. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.cts +4 -4
  73. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +7 -5
  74. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +1 -1
  75. package/dist/cjs/components/radio/daikin-radio.cjs +14 -2
  76. package/dist/cjs/components/radio/daikin-radio.d.cts +1 -0
  77. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +2 -0
  78. package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +2 -1
  79. package/dist/cjs/components/select/daikin-select.cjs +0 -1
  80. package/dist/cjs/components/slider/daikin-slider.cjs +14 -4
  81. package/dist/cjs/components/slider/daikin-slider.d.cts +1 -1
  82. package/dist/cjs/components/status-message/daikin-status-message.cjs +3 -4
  83. package/dist/cjs/components/tab/daikin-tab.cjs +0 -2
  84. package/dist/cjs/components/table/daikin-table.cjs +1 -1
  85. package/dist/cjs/components/table/daikin-table.d.cts +2 -0
  86. package/dist/cjs/components/tabs/daikin-tabs.d.cts +1 -0
  87. package/dist/cjs/components/tag/daikin-tag.cjs +1 -1
  88. package/dist/cjs/components/text-area/daikin-text-area.cjs +0 -1
  89. package/dist/cjs/components/text-area/daikin-text-area.d.cts +1 -1
  90. package/dist/cjs/components/text-field/daikin-text-field.cjs +0 -1
  91. package/dist/cjs/components/text-field/daikin-text-field.d.cts +1 -1
  92. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +0 -1
  93. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +1 -1
  94. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +1 -1
  95. package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +1 -1
  96. package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +2 -3
  97. package/dist/cjs/components/toggle/daikin-toggle.d.cts +1 -0
  98. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +2 -4
  99. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +9 -2
  100. package/dist/cjs/components/tree/daikin-tree.cjs +2 -0
  101. package/dist/cjs/components/tree/daikin-tree.d.cts +4 -0
  102. package/dist/cjs/components/tree-item/daikin-tree-item.cjs +1 -2
  103. package/dist/cjs/components/tree-section/daikin-tree-section.cjs +7 -3
  104. package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +115 -0
  105. package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.d.cts +77 -0
  106. package/dist/cjs/components/vertical-navigation/index.cjs +7 -0
  107. package/dist/cjs/components/vertical-navigation/index.d.cts +1 -0
  108. package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +378 -0
  109. package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +121 -0
  110. package/dist/cjs/components/vertical-navigation-item/index.cjs +7 -0
  111. package/dist/cjs/components/vertical-navigation-item/index.d.cts +1 -0
  112. package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +176 -0
  113. package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +86 -0
  114. package/dist/cjs/components/vertical-navigation-menu-item/index.cjs +7 -0
  115. package/dist/cjs/components/vertical-navigation-menu-item/index.d.cts +1 -0
  116. package/dist/cjs/controllers/block-scroll.cjs +43 -0
  117. package/dist/cjs/controllers/block-scroll.d.cts +48 -0
  118. package/dist/cjs/controllers/focus-trap.cjs +33 -17
  119. package/dist/cjs/controllers/focus-trap.d.cts +1 -1
  120. package/dist/cjs/index.cjs +35 -0
  121. package/dist/cjs/tailwind.css.cjs +1 -1
  122. package/dist/cjs/utils/notification-common.cjs +1 -1
  123. package/dist/cjs-dev/base/dds-element.cjs +3 -2
  124. package/dist/cjs-dev/base/dds-form-element.d.cts +1 -0
  125. package/dist/cjs-dev/base/dds-property.d.cts +2 -2
  126. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +1 -0
  127. package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +4 -0
  128. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +13 -11
  129. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.cts +1 -1
  130. package/dist/cjs-dev/components/badge/daikin-badge.cjs +72 -7
  131. package/dist/cjs-dev/components/badge/daikin-badge.d.cts +25 -4
  132. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +1 -0
  133. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +1 -4
  134. package/dist/cjs-dev/components/button/daikin-button.cjs +4 -6
  135. package/dist/cjs-dev/components/button/daikin-button.d.cts +2 -2
  136. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +3 -1
  137. package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +2 -0
  138. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +0 -2
  139. package/dist/cjs-dev/components/carousel/daikin-carousel.d.cts +1 -0
  140. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +3 -3
  141. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +25 -5
  142. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +9 -1
  143. package/dist/cjs-dev/components/chip/daikin-chip.cjs +2 -4
  144. package/dist/cjs-dev/components/chip/daikin-chip.d.cts +1 -0
  145. package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +11 -4
  146. package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +3 -1
  147. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +127 -62
  148. package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +19 -1
  149. package/dist/cjs-dev/components/divider/daikin-divider.cjs +42 -0
  150. package/dist/cjs-dev/components/divider/daikin-divider.d.cts +23 -0
  151. package/dist/cjs-dev/components/divider/index.cjs +7 -0
  152. package/dist/cjs-dev/components/divider/index.d.cts +1 -0
  153. package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +229 -0
  154. package/dist/cjs-dev/components/drawer/daikin-drawer.d.cts +91 -0
  155. package/dist/cjs-dev/components/drawer/index.cjs +7 -0
  156. package/dist/cjs-dev/components/drawer/index.d.cts +1 -0
  157. package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.cjs +36 -0
  158. package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.d.cts +33 -0
  159. package/dist/cjs-dev/components/drawer-footer/index.cjs +7 -0
  160. package/dist/cjs-dev/components/drawer-footer/index.d.cts +1 -0
  161. package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.cjs +83 -0
  162. package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.d.cts +41 -0
  163. package/dist/cjs-dev/components/drawer-header/index.cjs +7 -0
  164. package/dist/cjs-dev/components/drawer-header/index.d.cts +1 -0
  165. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +11 -2
  166. package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +3 -1
  167. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +0 -2
  168. package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +2 -2
  169. package/dist/cjs-dev/components/icon/daikin-icon.cjs +1 -2
  170. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +0 -1
  171. package/dist/cjs-dev/components/index.cjs +35 -0
  172. package/dist/cjs-dev/components/index.d.cts +7 -0
  173. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +1 -7
  174. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +16 -11
  175. package/dist/cjs-dev/components/link/daikin-link.cjs +26 -23
  176. package/dist/cjs-dev/components/list/daikin-list.cjs +12 -0
  177. package/dist/cjs-dev/components/list/daikin-list.d.cts +8 -0
  178. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +30 -9
  179. package/dist/cjs-dev/components/menu/daikin-menu.cjs +85 -11
  180. package/dist/cjs-dev/components/menu/daikin-menu.d.cts +23 -5
  181. package/dist/cjs-dev/components/modal/daikin-modal.cjs +18 -1
  182. package/dist/cjs-dev/components/modal/daikin-modal.d.cts +25 -0
  183. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +1 -1
  184. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +0 -2
  185. package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +2 -1
  186. package/dist/cjs-dev/components/navigation/daikin-navigation.d.cts +1 -0
  187. package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +6 -7
  188. package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +13 -6
  189. package/dist/cjs-dev/components/pagination/daikin-pagination.d.cts +4 -1
  190. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +2 -3
  191. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +1 -1
  192. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.cts +4 -4
  193. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +7 -5
  194. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.cts +1 -1
  195. package/dist/cjs-dev/components/radio/daikin-radio.cjs +14 -2
  196. package/dist/cjs-dev/components/radio/daikin-radio.d.cts +1 -0
  197. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +2 -0
  198. package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +2 -1
  199. package/dist/cjs-dev/components/select/daikin-select.cjs +0 -1
  200. package/dist/cjs-dev/components/slider/daikin-slider.cjs +14 -4
  201. package/dist/cjs-dev/components/slider/daikin-slider.d.cts +1 -1
  202. package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +3 -4
  203. package/dist/cjs-dev/components/tab/daikin-tab.cjs +0 -2
  204. package/dist/cjs-dev/components/table/daikin-table.cjs +1 -1
  205. package/dist/cjs-dev/components/table/daikin-table.d.cts +2 -0
  206. package/dist/cjs-dev/components/tabs/daikin-tabs.d.cts +1 -0
  207. package/dist/cjs-dev/components/tag/daikin-tag.cjs +1 -1
  208. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +0 -1
  209. package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +1 -1
  210. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +0 -1
  211. package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +1 -1
  212. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +0 -1
  213. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +1 -1
  214. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +1 -1
  215. package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +1 -1
  216. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +2 -3
  217. package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +1 -0
  218. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +2 -4
  219. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +9 -2
  220. package/dist/cjs-dev/components/tree/daikin-tree.cjs +2 -0
  221. package/dist/cjs-dev/components/tree/daikin-tree.d.cts +4 -0
  222. package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +1 -2
  223. package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +7 -3
  224. package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +127 -0
  225. package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.d.cts +77 -0
  226. package/dist/cjs-dev/components/vertical-navigation/index.cjs +7 -0
  227. package/dist/cjs-dev/components/vertical-navigation/index.d.cts +1 -0
  228. package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +378 -0
  229. package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.cts +121 -0
  230. package/dist/cjs-dev/components/vertical-navigation-item/index.cjs +7 -0
  231. package/dist/cjs-dev/components/vertical-navigation-item/index.d.cts +1 -0
  232. package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +176 -0
  233. package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.cts +86 -0
  234. package/dist/cjs-dev/components/vertical-navigation-menu-item/index.cjs +7 -0
  235. package/dist/cjs-dev/components/vertical-navigation-menu-item/index.d.cts +1 -0
  236. package/dist/cjs-dev/controllers/block-scroll.cjs +43 -0
  237. package/dist/cjs-dev/controllers/block-scroll.d.cts +48 -0
  238. package/dist/cjs-dev/controllers/focus-trap.cjs +33 -17
  239. package/dist/cjs-dev/controllers/focus-trap.d.cts +1 -1
  240. package/dist/cjs-dev/index.cjs +35 -0
  241. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  242. package/dist/cjs-dev/utils/notification-common.cjs +1 -1
  243. package/dist/es/base/dds-element.js +3 -2
  244. package/dist/es/base/dds-form-element.d.ts +1 -0
  245. package/dist/es/base/dds-property.d.ts +2 -2
  246. package/dist/es/components/accordion/daikin-accordion.d.ts +4 -0
  247. package/dist/es/components/accordion/daikin-accordion.js +1 -0
  248. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +1 -1
  249. package/dist/es/components/accordion-item/daikin-accordion-item.js +13 -11
  250. package/dist/es/components/badge/daikin-badge.d.ts +25 -4
  251. package/dist/es/components/badge/daikin-badge.js +72 -7
  252. package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +1 -0
  253. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +1 -4
  254. package/dist/es/components/button/daikin-button.d.ts +2 -2
  255. package/dist/es/components/button/daikin-button.js +4 -6
  256. package/dist/es/components/calendar/daikin-calendar.d.ts +2 -0
  257. package/dist/es/components/calendar/daikin-calendar.js +3 -1
  258. package/dist/es/components/card-header/daikin-card-header.js +0 -2
  259. package/dist/es/components/carousel/daikin-carousel.d.ts +1 -0
  260. package/dist/es/components/carousel-item/daikin-carousel-item.js +3 -3
  261. package/dist/es/components/checkbox/daikin-checkbox.d.ts +9 -1
  262. package/dist/es/components/checkbox/daikin-checkbox.js +25 -5
  263. package/dist/es/components/chip/daikin-chip.d.ts +1 -0
  264. package/dist/es/components/chip/daikin-chip.js +2 -4
  265. package/dist/es/components/combobox/daikin-combobox.d.ts +3 -1
  266. package/dist/es/components/combobox/daikin-combobox.js +11 -4
  267. package/dist/es/components/date-picker/daikin-date-picker.d.ts +19 -1
  268. package/dist/es/components/date-picker/daikin-date-picker.js +127 -62
  269. package/dist/es/components/divider/daikin-divider.d.ts +23 -0
  270. package/dist/es/components/divider/daikin-divider.js +43 -0
  271. package/dist/es/components/divider/index.d.ts +1 -0
  272. package/dist/es/components/divider/index.js +4 -0
  273. package/dist/es/components/drawer/daikin-drawer.d.ts +91 -0
  274. package/dist/es/components/drawer/daikin-drawer.js +230 -0
  275. package/dist/es/components/drawer/index.d.ts +1 -0
  276. package/dist/es/components/drawer/index.js +4 -0
  277. package/dist/es/components/drawer-footer/daikin-drawer-footer.d.ts +33 -0
  278. package/dist/es/components/drawer-footer/daikin-drawer-footer.js +37 -0
  279. package/dist/es/components/drawer-footer/index.d.ts +1 -0
  280. package/dist/es/components/drawer-footer/index.js +4 -0
  281. package/dist/es/components/drawer-header/daikin-drawer-header.d.ts +41 -0
  282. package/dist/es/components/drawer-header/daikin-drawer-header.js +84 -0
  283. package/dist/es/components/drawer-header/index.d.ts +1 -0
  284. package/dist/es/components/drawer-header/index.js +4 -0
  285. package/dist/es/components/dropdown/daikin-dropdown.d.ts +3 -1
  286. package/dist/es/components/dropdown/daikin-dropdown.js +11 -2
  287. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +0 -2
  288. package/dist/es/components/empty-state/daikin-empty-state.js +2 -2
  289. package/dist/es/components/icon/daikin-icon.js +1 -2
  290. package/dist/es/components/icon-button/daikin-icon-button.js +0 -1
  291. package/dist/es/components/index.d.ts +7 -0
  292. package/dist/es/components/index.js +14 -0
  293. package/dist/es/components/inline-notification/daikin-inline-notification.js +1 -7
  294. package/dist/es/components/input-group/daikin-input-group.js +16 -11
  295. package/dist/es/components/link/daikin-link.js +26 -23
  296. package/dist/es/components/list/daikin-list.d.ts +8 -0
  297. package/dist/es/components/list/daikin-list.js +13 -1
  298. package/dist/es/components/list-item/daikin-list-item.js +30 -9
  299. package/dist/es/components/menu/daikin-menu.d.ts +23 -5
  300. package/dist/es/components/menu/daikin-menu.js +85 -11
  301. package/dist/es/components/modal/daikin-modal.d.ts +25 -0
  302. package/dist/es/components/modal/daikin-modal.js +18 -1
  303. package/dist/es/components/modal-footer/daikin-modal-footer.js +1 -1
  304. package/dist/es/components/modal-header/daikin-modal-header.js +0 -2
  305. package/dist/es/components/navigation/daikin-navigation.d.ts +1 -0
  306. package/dist/es/components/navigation/daikin-navigation.js +2 -1
  307. package/dist/es/components/navigation-item/daikin-navigation-item.js +6 -7
  308. package/dist/es/components/pagination/daikin-pagination.d.ts +4 -1
  309. package/dist/es/components/pagination/daikin-pagination.js +13 -6
  310. package/dist/es/components/progress-bar/daikin-progress-bar.js +2 -3
  311. package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +4 -4
  312. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -1
  313. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +1 -1
  314. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +7 -5
  315. package/dist/es/components/radio/daikin-radio.d.ts +1 -0
  316. package/dist/es/components/radio/daikin-radio.js +14 -2
  317. package/dist/es/components/radio-group/daikin-radio-group.d.ts +2 -1
  318. package/dist/es/components/radio-group/daikin-radio-group.js +2 -0
  319. package/dist/es/components/select/daikin-select.js +0 -1
  320. package/dist/es/components/slider/daikin-slider.d.ts +1 -1
  321. package/dist/es/components/slider/daikin-slider.js +14 -4
  322. package/dist/es/components/status-message/daikin-status-message.js +3 -4
  323. package/dist/es/components/tab/daikin-tab.js +0 -2
  324. package/dist/es/components/table/daikin-table.d.ts +2 -0
  325. package/dist/es/components/table/daikin-table.js +1 -1
  326. package/dist/es/components/tabs/daikin-tabs.d.ts +1 -0
  327. package/dist/es/components/tag/daikin-tag.js +1 -1
  328. package/dist/es/components/text-area/daikin-text-area.d.ts +1 -1
  329. package/dist/es/components/text-area/daikin-text-area.js +0 -1
  330. package/dist/es/components/text-field/daikin-text-field.d.ts +1 -1
  331. package/dist/es/components/text-field/daikin-text-field.js +0 -1
  332. package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +1 -1
  333. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +0 -1
  334. package/dist/es/components/time-picker/daikin-time-picker.d.ts +1 -1
  335. package/dist/es/components/time-picker/daikin-time-picker.js +1 -1
  336. package/dist/es/components/toast-notification/daikin-toast-notification.js +2 -3
  337. package/dist/es/components/toggle/daikin-toggle.d.ts +1 -0
  338. package/dist/es/components/tooltip/daikin-tooltip.d.ts +9 -2
  339. package/dist/es/components/tooltip/daikin-tooltip.js +2 -4
  340. package/dist/es/components/tree/daikin-tree.d.ts +4 -0
  341. package/dist/es/components/tree/daikin-tree.js +2 -0
  342. package/dist/es/components/tree-item/daikin-tree-item.js +1 -2
  343. package/dist/es/components/tree-section/daikin-tree-section.js +7 -3
  344. package/dist/es/components/vertical-navigation/daikin-vertical-navigation.d.ts +77 -0
  345. package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +116 -0
  346. package/dist/es/components/vertical-navigation/index.d.ts +1 -0
  347. package/dist/es/components/vertical-navigation/index.js +4 -0
  348. package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +121 -0
  349. package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +379 -0
  350. package/dist/es/components/vertical-navigation-item/index.d.ts +1 -0
  351. package/dist/es/components/vertical-navigation-item/index.js +4 -0
  352. package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +86 -0
  353. package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +177 -0
  354. package/dist/es/components/vertical-navigation-menu-item/index.d.ts +1 -0
  355. package/dist/es/components/vertical-navigation-menu-item/index.js +4 -0
  356. package/dist/es/controllers/block-scroll.d.ts +48 -0
  357. package/dist/es/controllers/block-scroll.js +43 -0
  358. package/dist/es/controllers/focus-trap.d.ts +1 -1
  359. package/dist/es/controllers/focus-trap.js +33 -17
  360. package/dist/es/index.js +14 -0
  361. package/dist/es/tailwind.css.js +1 -1
  362. package/dist/es/utils/notification-common.js +1 -1
  363. package/dist/es-dev/base/dds-element.js +3 -2
  364. package/dist/es-dev/base/dds-form-element.d.ts +1 -0
  365. package/dist/es-dev/base/dds-property.d.ts +2 -2
  366. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +4 -0
  367. package/dist/es-dev/components/accordion/daikin-accordion.js +1 -0
  368. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +1 -1
  369. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +13 -11
  370. package/dist/es-dev/components/badge/daikin-badge.d.ts +25 -4
  371. package/dist/es-dev/components/badge/daikin-badge.js +72 -7
  372. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +1 -0
  373. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +1 -4
  374. package/dist/es-dev/components/button/daikin-button.d.ts +2 -2
  375. package/dist/es-dev/components/button/daikin-button.js +4 -6
  376. package/dist/es-dev/components/calendar/daikin-calendar.d.ts +2 -0
  377. package/dist/es-dev/components/calendar/daikin-calendar.js +3 -1
  378. package/dist/es-dev/components/card-header/daikin-card-header.js +0 -2
  379. package/dist/es-dev/components/carousel/daikin-carousel.d.ts +1 -0
  380. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +3 -3
  381. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +9 -1
  382. package/dist/es-dev/components/checkbox/daikin-checkbox.js +25 -5
  383. package/dist/es-dev/components/chip/daikin-chip.d.ts +1 -0
  384. package/dist/es-dev/components/chip/daikin-chip.js +2 -4
  385. package/dist/es-dev/components/combobox/daikin-combobox.d.ts +3 -1
  386. package/dist/es-dev/components/combobox/daikin-combobox.js +11 -4
  387. package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +19 -1
  388. package/dist/es-dev/components/date-picker/daikin-date-picker.js +127 -62
  389. package/dist/es-dev/components/divider/daikin-divider.d.ts +23 -0
  390. package/dist/es-dev/components/divider/daikin-divider.js +43 -0
  391. package/dist/es-dev/components/divider/index.d.ts +1 -0
  392. package/dist/es-dev/components/divider/index.js +4 -0
  393. package/dist/es-dev/components/drawer/daikin-drawer.d.ts +91 -0
  394. package/dist/es-dev/components/drawer/daikin-drawer.js +230 -0
  395. package/dist/es-dev/components/drawer/index.d.ts +1 -0
  396. package/dist/es-dev/components/drawer/index.js +4 -0
  397. package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.d.ts +33 -0
  398. package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.js +37 -0
  399. package/dist/es-dev/components/drawer-footer/index.d.ts +1 -0
  400. package/dist/es-dev/components/drawer-footer/index.js +4 -0
  401. package/dist/es-dev/components/drawer-header/daikin-drawer-header.d.ts +41 -0
  402. package/dist/es-dev/components/drawer-header/daikin-drawer-header.js +84 -0
  403. package/dist/es-dev/components/drawer-header/index.d.ts +1 -0
  404. package/dist/es-dev/components/drawer-header/index.js +4 -0
  405. package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +3 -1
  406. package/dist/es-dev/components/dropdown/daikin-dropdown.js +11 -2
  407. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +0 -2
  408. package/dist/es-dev/components/empty-state/daikin-empty-state.js +2 -2
  409. package/dist/es-dev/components/icon/daikin-icon.js +1 -2
  410. package/dist/es-dev/components/icon-button/daikin-icon-button.js +0 -1
  411. package/dist/es-dev/components/index.d.ts +7 -0
  412. package/dist/es-dev/components/index.js +14 -0
  413. package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +1 -7
  414. package/dist/es-dev/components/input-group/daikin-input-group.js +16 -11
  415. package/dist/es-dev/components/link/daikin-link.js +26 -23
  416. package/dist/es-dev/components/list/daikin-list.d.ts +8 -0
  417. package/dist/es-dev/components/list/daikin-list.js +13 -1
  418. package/dist/es-dev/components/list-item/daikin-list-item.js +30 -9
  419. package/dist/es-dev/components/menu/daikin-menu.d.ts +23 -5
  420. package/dist/es-dev/components/menu/daikin-menu.js +85 -11
  421. package/dist/es-dev/components/modal/daikin-modal.d.ts +25 -0
  422. package/dist/es-dev/components/modal/daikin-modal.js +18 -1
  423. package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +1 -1
  424. package/dist/es-dev/components/modal-header/daikin-modal-header.js +0 -2
  425. package/dist/es-dev/components/navigation/daikin-navigation.d.ts +1 -0
  426. package/dist/es-dev/components/navigation/daikin-navigation.js +2 -1
  427. package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +6 -7
  428. package/dist/es-dev/components/pagination/daikin-pagination.d.ts +4 -1
  429. package/dist/es-dev/components/pagination/daikin-pagination.js +13 -6
  430. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +2 -3
  431. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +4 -4
  432. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -1
  433. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +1 -1
  434. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +7 -5
  435. package/dist/es-dev/components/radio/daikin-radio.d.ts +1 -0
  436. package/dist/es-dev/components/radio/daikin-radio.js +14 -2
  437. package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +2 -1
  438. package/dist/es-dev/components/radio-group/daikin-radio-group.js +2 -0
  439. package/dist/es-dev/components/select/daikin-select.js +0 -1
  440. package/dist/es-dev/components/slider/daikin-slider.d.ts +1 -1
  441. package/dist/es-dev/components/slider/daikin-slider.js +14 -4
  442. package/dist/es-dev/components/status-message/daikin-status-message.js +3 -4
  443. package/dist/es-dev/components/tab/daikin-tab.js +0 -2
  444. package/dist/es-dev/components/table/daikin-table.d.ts +2 -0
  445. package/dist/es-dev/components/table/daikin-table.js +1 -1
  446. package/dist/es-dev/components/tabs/daikin-tabs.d.ts +1 -0
  447. package/dist/es-dev/components/tag/daikin-tag.js +1 -1
  448. package/dist/es-dev/components/text-area/daikin-text-area.d.ts +1 -1
  449. package/dist/es-dev/components/text-area/daikin-text-area.js +0 -1
  450. package/dist/es-dev/components/text-field/daikin-text-field.d.ts +1 -1
  451. package/dist/es-dev/components/text-field/daikin-text-field.js +0 -1
  452. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +1 -1
  453. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +0 -1
  454. package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +1 -1
  455. package/dist/es-dev/components/time-picker/daikin-time-picker.js +1 -1
  456. package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +2 -3
  457. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +1 -0
  458. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +9 -2
  459. package/dist/es-dev/components/tooltip/daikin-tooltip.js +2 -4
  460. package/dist/es-dev/components/tree/daikin-tree.d.ts +4 -0
  461. package/dist/es-dev/components/tree/daikin-tree.js +2 -0
  462. package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -2
  463. package/dist/es-dev/components/tree-section/daikin-tree-section.js +7 -3
  464. package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.d.ts +77 -0
  465. package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +128 -0
  466. package/dist/es-dev/components/vertical-navigation/index.d.ts +1 -0
  467. package/dist/es-dev/components/vertical-navigation/index.js +4 -0
  468. package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.d.ts +121 -0
  469. package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +379 -0
  470. package/dist/es-dev/components/vertical-navigation-item/index.d.ts +1 -0
  471. package/dist/es-dev/components/vertical-navigation-item/index.js +4 -0
  472. package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.d.ts +86 -0
  473. package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +177 -0
  474. package/dist/es-dev/components/vertical-navigation-menu-item/index.d.ts +1 -0
  475. package/dist/es-dev/components/vertical-navigation-menu-item/index.js +4 -0
  476. package/dist/es-dev/controllers/block-scroll.d.ts +48 -0
  477. package/dist/es-dev/controllers/block-scroll.js +43 -0
  478. package/dist/es-dev/controllers/focus-trap.d.ts +1 -1
  479. package/dist/es-dev/controllers/focus-trap.js +33 -17
  480. package/dist/es-dev/index.js +14 -0
  481. package/dist/es-dev/tailwind.css.js +1 -1
  482. package/dist/es-dev/utils/notification-common.js +1 -1
  483. package/package.json +3 -3
@@ -23,10 +23,11 @@ export declare function defaultFilterFn(items: readonly ComboboxItem[], value: s
23
23
  * @attr value - The initial form value, submitted as a name/value pair when submitting the form.
24
24
  * @prop {String} formAttr - The form the component belongs to.
25
25
  * @prop {String} name - The form name, submitted as a name/value pair when submitting the form.
26
- * @prop {String} value - The form value, submitted as a name/value pair when submitting the form.
26
+ * @prop {String} value - The form value, submitted as a name/value pair when submitting the form. To keep external state in sync, listen to the `change` event.
27
27
  *
28
28
  * @fires change - A custom event emitted when a user selects a combobox item or inputs a custom value.
29
29
  * @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event). Triggered when the user types in the input field, clicks clear button, or selects from dropdown options.
30
+ * @fires toggle - A custom event emitted when the combobox menu opens or closes.
30
31
  *
31
32
  * @example
32
33
  *
@@ -63,6 +64,7 @@ export declare class DaikinCombobox extends DDSFormElement {
63
64
  error: boolean;
64
65
  /**
65
66
  * Whether the combobox menu is opened.
67
+ * When controlling this property externally, listen to the `toggle` event and sync your state based on `event.newState` to keep it in sync.
66
68
  */
67
69
  open: boolean;
68
70
  /**
@@ -38,9 +38,7 @@ const cvaInput = cva(
38
38
  "pr-16",
39
39
  "rounded-sm",
40
40
  "overflow-hidden",
41
- "font-daikinSerif",
42
41
  "text-left",
43
- "leading-[130%]",
44
42
  "relative",
45
43
  "outline-solid",
46
44
  "outline-1",
@@ -80,8 +78,6 @@ const cvaOption = cva(
80
78
  "size-full",
81
79
  "min-h-12",
82
80
  "p-3",
83
- "font-daikinSerif",
84
- "leading-[130%]",
85
81
  "text-left",
86
82
  "relative",
87
83
  "data-focus:outline-solid",
@@ -540,6 +536,17 @@ let DaikinCombobox = class extends DDSFormElement {
540
536
  this.focus();
541
537
  }
542
538
  }
539
+ if (changedProperties.has("open")) {
540
+ const wasOpen = changedProperties.get("open");
541
+ if (wasOpen !== void 0) {
542
+ this.dispatchEvent(
543
+ new ToggleEvent("toggle", {
544
+ oldState: wasOpen ? "open" : "closed",
545
+ newState: this.open ? "open" : "closed"
546
+ })
547
+ );
548
+ }
549
+ }
543
550
  if (changedProperties.has("_currentFocusItemIndex")) {
544
551
  const focusedItem = this.renderRoot.querySelector("[data-focus]");
545
552
  focusedItem == null ? void 0 : focusedItem.scrollIntoView({ block: "nearest" });
@@ -9,9 +9,10 @@ import { DaikinInputGroup } from "../input-group/daikin-input-group.js";
9
9
  * @attr value - The initial form value, submitted as a name/value pair when submitting the form.
10
10
  * @prop {String} formAttr - The form the component belongs to.
11
11
  * @prop {String} name - The form name, submitted as a name/value pair when submitting the form.
12
- * @prop {String} value - The form value, submitted as a name/value pair when submitting the form.
12
+ * @prop {String} value - The form value, submitted as a name/value pair when submitting the form. To keep external state in sync, listen to the `select` event.
13
13
  *
14
14
  * @fires select - Fires when the date is selected.
15
+ * @fires toggle - A custom event emitted when the calendar picker opens or closes.
15
16
  *
16
17
  * @example
17
18
  *
@@ -25,6 +26,7 @@ import { DaikinInputGroup } from "../input-group/daikin-input-group.js";
25
26
  */
26
27
  export declare class DaikinDatePicker extends DDSFormElement {
27
28
  static readonly styles: import('lit').CSSResult;
29
+ private static getDefaultPlaceholder;
28
30
  /**
29
31
  * The placeholder text.
30
32
  */
@@ -63,6 +65,7 @@ export declare class DaikinDatePicker extends DDSFormElement {
63
65
  error: boolean;
64
66
  /**
65
67
  * Whether the date picker is open.
68
+ * When controlling this property externally, listen to the `toggle` event and sync your state based on `event.newState` to keep it in sync.
66
69
  */
67
70
  open: boolean;
68
71
  /**
@@ -70,6 +73,13 @@ export declare class DaikinDatePicker extends DDSFormElement {
70
73
  * If there is a `value` attribute, this is ignored.
71
74
  */
72
75
  defaultValue: string | null;
76
+ /**
77
+ * The locale used for date formatting.
78
+ * If not provided, the browser's default locale will be used. It is usually not necessary to specify it explicitly.
79
+ *
80
+ * @private
81
+ */
82
+ locale: string | null;
73
83
  /**
74
84
  * The label text used as the value of aria-label.
75
85
  * Set automatically by `reflectInputGroup` method.
@@ -80,6 +90,14 @@ export declare class DaikinDatePicker extends DDSFormElement {
80
90
  private _dateInputElement;
81
91
  private _calendarElement;
82
92
  private _calendarButtonElement;
93
+ private _getLocale;
94
+ private _getDateItems;
95
+ private _parsePartsFromUIValue;
96
+ private _formatPartsForUI;
97
+ private _tryParseDateFromUIValue;
98
+ private _formatDateForUI;
99
+ private _getPlaceholderAll;
100
+ private _getDateItemInSelection;
83
101
  private get _value();
84
102
  private get _min();
85
103
  private get _max();
@@ -27,28 +27,62 @@ var __decorateClass = (decorators, target, key, kind) => {
27
27
  if (kind && result) __defProp(target, key, result);
28
28
  return result;
29
29
  };
30
- const DATE_ITEMS = [
31
- {
32
- type: "month",
33
- range: [0, 2]
34
- },
35
- {
36
- type: "day",
37
- range: [3, 5]
38
- },
39
- {
40
- type: "year",
41
- range: [6, 10]
30
+ const dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
31
+ function getSafeDateTimeFormatParts(locale) {
32
+ const options = {
33
+ year: "numeric",
34
+ month: "numeric",
35
+ day: "numeric"
36
+ };
37
+ const key = locale ?? "__DEFAULT__";
38
+ const cached = dateTimeFormatPartsCache.get(key);
39
+ if (cached) return cached;
40
+ try {
41
+ const parts = new Intl.DateTimeFormat(
42
+ locale ?? void 0,
43
+ options
44
+ ).formatToParts(0);
45
+ dateTimeFormatPartsCache.set(key, parts);
46
+ return parts;
47
+ } catch {
48
+ const parts = new Intl.DateTimeFormat(void 0, options).formatToParts(0);
49
+ dateTimeFormatPartsCache.set(key, parts);
50
+ return parts;
42
51
  }
43
- ];
52
+ }
53
+ function getDateOrderAndSeparator(locale) {
54
+ const parts = getSafeDateTimeFormatParts(locale ?? void 0);
55
+ const order = parts.filter(
56
+ (p) => ["year", "month", "day"].includes(p.type)
57
+ ).map((p) => p.type);
58
+ const literals = parts.filter((p) => p.type === "literal");
59
+ const sep = literals.length >= 2 && literals[0].value === literals[1].value ? literals[0].value : "/";
60
+ const requiredParts = ["year", "month", "day"];
61
+ const isValidOrder = order.length === 3 && requiredParts.every((part) => order.includes(part));
62
+ const isValidSep = sep.length > 0 && /^\D+$/.test(sep);
63
+ if (!isValidOrder || !isValidSep) {
64
+ return {
65
+ order: ["month", "day", "year"],
66
+ sep: "/"
67
+ };
68
+ }
69
+ return { order, sep };
70
+ }
71
+ function getDateItems(locale) {
72
+ const { order, sep } = getDateOrderAndSeparator(locale);
73
+ const lengths = { year: 4, month: 2, day: 2 };
74
+ const items = order.map((key, i) => {
75
+ const type = key;
76
+ const len = lengths[type];
77
+ const start = order.slice(0, i).reduce((sum, k) => sum + lengths[k], 0) + i * sep.length;
78
+ const end = start + len;
79
+ return { type, range: [start, end] };
80
+ });
81
+ return items;
82
+ }
44
83
  const PLACEHOLDER_YEAR = "YYYY";
45
84
  const PLACEHOLDER_MONTH = "MM";
46
85
  const PLACEHOLDER_DAY = "DD";
47
- const PLACEHOLDER_ALL = formatPartsForUI({
48
- year: PLACEHOLDER_YEAR,
49
- month: PLACEHOLDER_MONTH,
50
- day: PLACEHOLDER_DAY
51
- });
52
86
  const cvaField = cva(
53
87
  [
54
88
  "flex",
@@ -92,15 +126,25 @@ const cvaField = cva(
92
126
  }
93
127
  }
94
128
  );
95
- function parsePartsFromUIValue(value) {
96
- const [month, day, year] = value.split("/");
97
- return { year, month, day };
129
+ function parsePartsFromUIValue(value, locale) {
130
+ const { order, sep } = getDateOrderAndSeparator(locale);
131
+ const parts = value.split(sep);
132
+ return Object.fromEntries(
133
+ order.map((key, i) => [key, parts[i] ?? ""])
134
+ );
98
135
  }
99
- function formatPartsForUI({ year, month, day }) {
100
- return `${month}/${day}/${year}`;
136
+ function formatPartsForUI(parts, locale) {
137
+ const { order, sep } = getDateOrderAndSeparator(locale);
138
+ return order.map((k) => parts[k]).join(sep);
101
139
  }
102
- function tryParseDateFromUIValue(value) {
103
- const { year, month, day } = parsePartsFromUIValue(value);
140
+ function getPlaceholderAll(locale) {
141
+ return formatPartsForUI(
142
+ { year: PLACEHOLDER_YEAR, month: PLACEHOLDER_MONTH, day: PLACEHOLDER_DAY },
143
+ locale
144
+ );
145
+ }
146
+ function tryParseDateFromUIValue(value, locale) {
147
+ const { year, month, day } = parsePartsFromUIValue(value, locale);
104
148
  if (
105
149
  // Prevent treating incomplete year entries (such as 0202) as valid.
106
150
  // This also means that dates less than 1000 years ago cannot be handled.
@@ -114,15 +158,18 @@ function tryParseDateFromUIValue(value) {
114
158
  }
115
159
  return date;
116
160
  }
117
- function formatDateForUI(date) {
118
- return formatPartsForUI({
119
- year: String(date.getUTCFullYear()).padStart(4, "0"),
120
- month: String(date.getUTCMonth() + 1).padStart(2, "0"),
121
- day: String(date.getUTCDate()).padStart(2, "0")
122
- });
161
+ function formatDateForUI(date, locale) {
162
+ return formatPartsForUI(
163
+ {
164
+ year: String(date.getUTCFullYear()).padStart(4, "0"),
165
+ month: String(date.getUTCMonth() + 1).padStart(2, "0"),
166
+ day: String(date.getUTCDate()).padStart(2, "0")
167
+ },
168
+ locale
169
+ );
123
170
  }
124
- function getDateItemInSelection(selectionStart, selectionEnd) {
125
- for (const { type, range } of DATE_ITEMS) {
171
+ function getDateItemInSelection(selectionStart, selectionEnd, locale) {
172
+ for (const { type, range } of getDateItems(locale)) {
126
173
  if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
127
174
  return type;
128
175
  }
@@ -237,12 +284,21 @@ let DaikinDatePicker = class extends DDSFormElement {
237
284
  this.error = false;
238
285
  this.open = false;
239
286
  this.defaultValue = null;
287
+ this.locale = null;
240
288
  this._label = null;
241
289
  this._currentSelection = "month";
242
290
  this._autoUpdateController = new FloatingUIAutoUpdateController(this);
243
291
  this._dateInputElement = createRef();
244
292
  this._calendarElement = createRef();
245
293
  this._calendarButtonElement = createRef();
294
+ this._getLocale = () => this.locale ?? null;
295
+ this._getDateItems = () => getDateItems(this._getLocale());
296
+ this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
297
+ this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
298
+ this._tryParseDateFromUIValue = (v) => tryParseDateFromUIValue(v, this._getLocale());
299
+ this._formatDateForUI = (d) => formatDateForUI(d, this._getLocale());
300
+ this._getPlaceholderAll = () => getPlaceholderAll(this._getLocale());
301
+ this._getDateItemInSelection = (s, e) => getDateItemInSelection(s, e, this._getLocale());
246
302
  this._ignoreCloseByFocusTrap = false;
247
303
  this._handleCloseCalendar = () => {
248
304
  var _a;
@@ -256,6 +312,9 @@ let DaikinDatePicker = class extends DDSFormElement {
256
312
  );
257
313
  this.label = null;
258
314
  }
315
+ static getDefaultPlaceholder(element) {
316
+ return getPlaceholderAll(element._getLocale());
317
+ }
259
318
  get _value() {
260
319
  return tryParseDateFromProperty(this.value);
261
320
  }
@@ -286,7 +345,7 @@ let DaikinDatePicker = class extends DDSFormElement {
286
345
  }
287
346
  _handleFocusOut(event) {
288
347
  const target = event.target;
289
- if (target.value === PLACEHOLDER_ALL) {
348
+ if (target.value === this._getPlaceholderAll()) {
290
349
  target.value = "";
291
350
  }
292
351
  }
@@ -298,11 +357,11 @@ let DaikinDatePicker = class extends DDSFormElement {
298
357
  event.preventDefault();
299
358
  const selectionStart = ((_a = this._dateInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
300
359
  const selectionEnd = ((_b = this._dateInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
301
- const dateItemInSelection = getDateItemInSelection(
360
+ const dateItemInSelection = this._getDateItemInSelection(
302
361
  selectionStart,
303
362
  selectionEnd
304
363
  );
305
- if (event.target.value === PLACEHOLDER_ALL && !dateItemInSelection) {
364
+ if (event.target.value === this._getPlaceholderAll() && !dateItemInSelection) {
306
365
  this._updateSelection("month");
307
366
  return;
308
367
  }
@@ -316,7 +375,7 @@ let DaikinDatePicker = class extends DDSFormElement {
316
375
  }
317
376
  const target = event.target;
318
377
  const key = event.key;
319
- const parts = parsePartsFromUIValue(target.value);
378
+ const parts = this._parsePartsFromUIValue(target.value);
320
379
  if (key === "Backspace") {
321
380
  event.preventDefault();
322
381
  const itemToRemove = this._currentSelection;
@@ -326,7 +385,7 @@ let DaikinDatePicker = class extends DDSFormElement {
326
385
  day: PLACEHOLDER_DAY
327
386
  }[itemToRemove];
328
387
  if (parts[itemToRemove] !== placeholder) {
329
- target.value = formatPartsForUI({
388
+ target.value = this._formatPartsForUI({
330
389
  ...parts,
331
390
  [itemToRemove]: placeholder
332
391
  });
@@ -339,13 +398,14 @@ let DaikinDatePicker = class extends DDSFormElement {
339
398
  event.preventDefault();
340
399
  const newState = handleDigitInput(parts, this._currentSelection, key);
341
400
  if (newState) {
342
- target.value = formatPartsForUI(newState.parts);
343
- const currentIndex = DATE_ITEMS.findIndex(
401
+ target.value = this._formatPartsForUI(newState.parts);
402
+ const items = this._getDateItems();
403
+ const currentIndex = items.findIndex(
344
404
  ({ type }) => type === this._currentSelection
345
405
  );
346
- const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, DATE_ITEMS.length - 1) : -1;
406
+ const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, items.length - 1) : -1;
347
407
  this._updateSelection(
348
- newState.done && nextIndex >= 0 ? DATE_ITEMS[nextIndex].type : this._currentSelection
408
+ newState.done && nextIndex >= 0 ? items[nextIndex].type : this._currentSelection
349
409
  );
350
410
  }
351
411
  this._updateValue(event);
@@ -357,14 +417,12 @@ let DaikinDatePicker = class extends DDSFormElement {
357
417
  }[key];
358
418
  if (moveOffset) {
359
419
  event.preventDefault();
360
- const currentIndex = DATE_ITEMS.findIndex(
420
+ const items = this._getDateItems();
421
+ const currentIndex = items.findIndex(
361
422
  ({ type }) => type === this._currentSelection
362
423
  );
363
- const newIndex = currentIndex >= 0 ? Math.min(
364
- Math.max(currentIndex + moveOffset, 0),
365
- DATE_ITEMS.length - 1
366
- ) : 0;
367
- this._updateSelection(DATE_ITEMS[newIndex].type);
424
+ const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), items.length - 1) : 0;
425
+ this._updateSelection(items[newIndex].type);
368
426
  return;
369
427
  }
370
428
  const countOffset = {
@@ -382,7 +440,7 @@ let DaikinDatePicker = class extends DDSFormElement {
382
440
  this._max
383
441
  );
384
442
  if (newParts) {
385
- target.value = formatPartsForUI(newParts);
443
+ target.value = this._formatPartsForUI(newParts);
386
444
  this._updateSelection(this._currentSelection);
387
445
  }
388
446
  this._updateValue(event);
@@ -408,7 +466,7 @@ let DaikinDatePicker = class extends DDSFormElement {
408
466
  const target = this._dateInputElement.value;
409
467
  const value = parseDateFromProperty(calendar.value);
410
468
  this.value = formatDateForProperty(value);
411
- target.value = formatDateForUI(value);
469
+ target.value = this._formatDateForUI(value);
412
470
  this.error = false;
413
471
  if (event.type === "select") {
414
472
  this.open = false;
@@ -446,11 +504,11 @@ let DaikinDatePicker = class extends DDSFormElement {
446
504
  }
447
505
  _updateValue(event) {
448
506
  const target = event.target;
449
- if (target.value === PLACEHOLDER_ALL) {
507
+ if (target.value === this._getPlaceholderAll()) {
450
508
  this.error = false;
451
509
  return;
452
510
  }
453
- const newDate = tryParseDateFromUIValue(target.value);
511
+ const newDate = this._tryParseDateFromUIValue(target.value);
454
512
  if (!newDate || isDateOutOfRange(newDate, this._min, this._max)) {
455
513
  this.error = true;
456
514
  return;
@@ -467,9 +525,9 @@ let DaikinDatePicker = class extends DDSFormElement {
467
525
  return;
468
526
  }
469
527
  if (target.value === "") {
470
- target.value = PLACEHOLDER_ALL;
528
+ target.value = this._getPlaceholderAll();
471
529
  }
472
- const itemInfo = DATE_ITEMS[0];
530
+ const itemInfo = this._getDateItems()[0];
473
531
  (_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
474
532
  itemInfo.range[0],
475
533
  itemInfo.range[1]
@@ -482,7 +540,7 @@ let DaikinDatePicker = class extends DDSFormElement {
482
540
  if (!selection) {
483
541
  return;
484
542
  }
485
- const itemInfo = DATE_ITEMS.find(({ type }) => type === dateItem);
543
+ const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
486
544
  if (itemInfo) {
487
545
  (_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
488
546
  itemInfo.range[0],
@@ -503,7 +561,7 @@ let DaikinDatePicker = class extends DDSFormElement {
503
561
  const min = this._min;
504
562
  const max = this._max;
505
563
  return html`<div
506
- class="size-full relative font-daikinSerif"
564
+ class="size-full relative"
507
565
  ${this._autoUpdateController.refReference()}
508
566
  >
509
567
  <input
@@ -511,12 +569,12 @@ let DaikinDatePicker = class extends DDSFormElement {
511
569
  class=${cvaField({ error: this.error })}
512
570
  type="text"
513
571
  name=${ifDefined(this.getBackingProperty("name"))}
514
- placeholder=${ifDefined(this.getBackingProperty("placeholder"))}
572
+ placeholder=${ifDefined(this.placeholder)}
515
573
  aria-label=${ifDefined(this._label ?? this.label ?? "Date Picker")}
516
574
  ?disabled=${this.disabled}
517
575
  ?readonly=${this.readonly}
518
576
  ?required=${this.required}
519
- .value=${this._value ? formatDateForUI(this._value) : ""}
577
+ .value=${this._value ? this._formatDateForUI(this._value) : ""}
520
578
  @change=${this._handleChange}
521
579
  @focusin=${this._handleFocusIn}
522
580
  @focusout=${this._handleFocusOut}
@@ -538,6 +596,9 @@ let DaikinDatePicker = class extends DDSFormElement {
538
596
  >
539
597
  <span class=${cvaIconButton({ intent: "calender" })}></span>
540
598
  </daikin-icon-button>
599
+ <span class="sr-only" aria-live="polite"
600
+ >${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
601
+ </span>
541
602
  </div>
542
603
  <daikin-calendar
543
604
  ${ref(this._calendarElement)}
@@ -555,9 +616,6 @@ let DaikinDatePicker = class extends DDSFormElement {
555
616
  ${this._autoUpdateController.refFloating()}
556
617
  >
557
618
  </daikin-calendar>
558
- <span class="sr-only" aria-live="polite"
559
- >${this.value ? `${this._label ?? ""} Selected: ${this.value}` : ""}
560
- </span>
561
619
  ${// Activate auto update only when the tooltip is open.
562
620
  // TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
563
621
  guard(
@@ -647,7 +705,11 @@ DaikinDatePicker.styles = css`
647
705
  }
648
706
  `;
649
707
  __decorateClass([
650
- property({ type: String, reflect: true, fallbackValue: "" })
708
+ property({
709
+ type: String,
710
+ reflect: true,
711
+ fallbackValue: DaikinDatePicker.getDefaultPlaceholder
712
+ })
651
713
  ], DaikinDatePicker.prototype, "placeholder", 2);
652
714
  __decorateClass([
653
715
  property({ type: String, reflect: true, fallbackValue: "1900-01-01" })
@@ -673,6 +735,9 @@ __decorateClass([
673
735
  __decorateClass([
674
736
  property({ type: String, reflect: true, attribute: "default-value" })
675
737
  ], DaikinDatePicker.prototype, "defaultValue", 2);
738
+ __decorateClass([
739
+ property({ type: String, reflect: true })
740
+ ], DaikinDatePicker.prototype, "locale", 2);
676
741
  __decorateClass([
677
742
  state()
678
743
  ], DaikinDatePicker.prototype, "_label", 2);
@@ -0,0 +1,23 @@
1
+ import { DDSElement } from "../../base/index.js";
2
+ /**
3
+ * The divider is a UI element that represents a thematic break between paragraph-level elements. It can be used to separate content in a list, or to divide sections of a page.
4
+ *
5
+ * @example
6
+ *
7
+ * ```js
8
+ * import "@daikin-oss/design-system-web-components/components/divider/index.js";
9
+ * ```
10
+ *
11
+ * ```html
12
+ * <daikin-divider></daikin-divider>
13
+ * ```
14
+ */
15
+ export declare class DaikinDivider extends DDSElement {
16
+ static readonly styles: import('lit').CSSResult;
17
+ render(): import('lit-html').TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ "daikin-divider": DaikinDivider;
22
+ }
23
+ }
@@ -0,0 +1,43 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { unsafeCSS, css, html } from "lit";
3
+ import { DDSElement } from "../../base/dds-element.js";
4
+ import "../../base/dds-form-element.js";
5
+ import "lit/decorators.js";
6
+ import { ddsElement } from "../../base/decorators.js";
7
+ import "../../base/define.js";
8
+ import tailwindStyles from "../../tailwind.css.js";
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 = decorator(result) || result;
15
+ return result;
16
+ };
17
+ const DIVIDER_CLASS_NAME = cva([
18
+ "w-full",
19
+ "m-0",
20
+ "border-t",
21
+ "border-ddt-color-divider"
22
+ ])();
23
+ let DaikinDivider = class extends DDSElement {
24
+ render() {
25
+ return html`<hr
26
+ class=${DIVIDER_CLASS_NAME}
27
+ aria-orientation="horizontal"
28
+ />`;
29
+ }
30
+ };
31
+ DaikinDivider.styles = css`
32
+ ${unsafeCSS(tailwindStyles)}
33
+
34
+ :host {
35
+ display: block;
36
+ }
37
+ `;
38
+ DaikinDivider = __decorateClass([
39
+ ddsElement("daikin-divider")
40
+ ], DaikinDivider);
41
+ export {
42
+ DaikinDivider
43
+ };
@@ -0,0 +1 @@
1
+ export * from "./daikin-divider.js";
@@ -0,0 +1,4 @@
1
+ import { DaikinDivider } from "./daikin-divider.js";
2
+ export {
3
+ DaikinDivider
4
+ };
@@ -0,0 +1,91 @@
1
+ import { DDSElement } from "../../base/index.js";
2
+ /**
3
+ * `daikin-drawer` is an overlay panel that slides in from the edge of the screen. It is used to display content without navigating away from the current page, providing a smooth user experience. The drawer can be placed at the top, right, bottom, or left of the screen and can contain a header, body, and footer. When the drawer is open, it traps focus within itself and prevents background content from scrolling.
4
+ *
5
+ * ### Scroll Lock
6
+ *
7
+ * When the drawer is open, it sets the CSS custom property `--ddc-scroll-lock: hidden` on the `<html>` element and removes it when the drawer is closed.
8
+ * To enable scroll locking, add the following CSS. If you use a custom scroll container instead of `body`, replace the selector accordingly:
9
+ *
10
+ * ```css
11
+ * body {
12
+ * overflow: var(--ddc-scroll-lock, auto);
13
+ * }
14
+ * ```
15
+ *
16
+ * When no drawer is open, `--ddc-scroll-lock` is absent and the fallback value (`auto`) takes effect.
17
+ * When a drawer opens, it is set to `hidden`, locking scroll on every element that uses it.
18
+ *
19
+ * ## Multiple drawers and modals
20
+ *
21
+ * If multiple `daikin-drawer` or `daikin-modal` instances are open at the same time, the component tracks them with an internal reference count.
22
+ * `--ddc-scroll-lock` is only removed from `<html>` once **every** open drawer or modal has been closed — closing one drawer or modal while others remain open will not unlock scroll.
23
+ * This means your CSS declaration requires no extra logic to handle concurrent drawers or modals correctly.
24
+ *
25
+ * > **Note:** The `--ddc-scroll-lock` property is set on `<html>` and inherits through the entire document,
26
+ * > so the CSS declaration above works on any element regardless of its position in the DOM tree.
27
+ *
28
+ * Hierarchy:
29
+ * - `daikin-drawer` > `daikin-drawer-header`
30
+ * - `daikin-drawer` > `daikin-drawer-footer`
31
+ *
32
+ * @slot - A slot for drawer header, body, drawer footer. Place `daikin-drawer-header`, custom body content, `daikin-drawer-footer` here in order.
33
+ *
34
+ * @fires close - A custom event emitted when the drawer is closed, including when a user clicks the header close button, clicks the backdrop, or dismisses the drawer with the Escape key.
35
+ *
36
+ * @csspart drawer - CSS styles applied to the drawer panel container. By default, the panel uses content-based content width fit or height fit and is clamped by responsive min/max width and height constraints so it does not touch the viewport edges. Use `::part(drawer)` to customize its width, height, or padding; the built-in min/max constraints remain in effect unless you override them with more specific rules.
37
+ *
38
+ * @example
39
+ *
40
+ * ```js
41
+ * import "@daikin-oss/design-system-web-components/components/drawer/index.js";
42
+ * import "@daikin-oss/design-system-web-components/components/drawer-footer/index.js";
43
+ * import "@daikin-oss/design-system-web-components/components/drawer-header/index.js";
44
+ * ```
45
+ *
46
+ * ```html
47
+ * <daikin-drawer>
48
+ * <daikin-drawer-header>
49
+ * <span>Drawer Title</span>
50
+ * </daikin-drawer-header>
51
+ * <p>Drawer body.</p>
52
+ * <daikin-drawer-footer>
53
+ * <daikin-button size="small">Button</daikin-button>
54
+ * </daikin-drawer-footer>
55
+ * </daikin-drawer>
56
+ * ```
57
+ */
58
+ export declare class DaikinDrawer extends DDSElement {
59
+ static styles: import('lit').CSSResult;
60
+ /**
61
+ * Whether the drawer is open.
62
+ * When controlling this property externally, listen to the `close` event and set your state to `false` to keep it in sync.
63
+ */
64
+ open: boolean;
65
+ /**
66
+ * ARIA role of the drawer. Choose the appropriate role for your drawer based on its usage scenario.
67
+ *
68
+ * @default "dialog"
69
+ */
70
+ drawerRole: "dialog" | "alertdialog";
71
+ /**
72
+ * The aria-label of the drawer.
73
+ */
74
+ drawerAriaLabel: string | null;
75
+ /**
76
+ * The placement of the drawer. The default value is `right`, which means the drawer will slide in from the right side of the screen. You can set it to `top`, `bottom`, or `left` to have the drawer slide in from the corresponding side.
77
+ * Note: The slide-in animation is based on CSS transform, so it can still work when the drawer is placed at the top or bottom of the screen, providing a smooth user experience.
78
+ * @default "right"
79
+ */
80
+ placement: "top" | "right" | "bottom" | "left";
81
+ private readonly _blockScrollController;
82
+ private readonly _handleClose;
83
+ private readonly _focusTrapController;
84
+ private readonly _handleBackdropClick;
85
+ render(): import('lit-html').TemplateResult<1>;
86
+ }
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ "daikin-drawer": DaikinDrawer;
90
+ }
91
+ }