@daikin-oss/design-system-web-components 2.0.0 → 2.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (717) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/custom-elements.json +875 -689
  3. package/dist/cjs/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs +9 -0
  4. package/dist/cjs/_virtual/_rolldown/runtime.cjs +23 -0
  5. package/dist/cjs/base/dds-element.cjs +100 -86
  6. package/dist/cjs/base/dds-form-element.cjs +123 -144
  7. package/dist/cjs/base/dds-property.cjs +46 -5
  8. package/dist/cjs/base/dds-property.d.cts +1 -1
  9. package/dist/cjs/base/decorators.cjs +8 -11
  10. package/dist/cjs/base/define.cjs +11 -17
  11. package/dist/cjs/base/index.cjs +12 -13
  12. package/dist/cjs/components/accordion/daikin-accordion.cjs +77 -91
  13. package/dist/cjs/components/accordion/index.cjs +5 -4
  14. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +148 -172
  15. package/dist/cjs/components/accordion-item/index.cjs +5 -4
  16. package/dist/cjs/components/avatar/daikin-avatar.cjs +149 -163
  17. package/dist/cjs/components/avatar/index.cjs +5 -4
  18. package/dist/cjs/components/badge/daikin-badge.cjs +179 -199
  19. package/dist/cjs/components/badge/index.cjs +5 -4
  20. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +80 -88
  21. package/dist/cjs/components/breadcrumb/index.cjs +5 -4
  22. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +120 -127
  23. package/dist/cjs/components/breadcrumb-item/index.cjs +5 -4
  24. package/dist/cjs/components/button/daikin-button.cjs +269 -294
  25. package/dist/cjs/components/button/index.cjs +5 -4
  26. package/dist/cjs/components/calendar/daikin-calendar.cjs +421 -528
  27. package/dist/cjs/components/calendar/index.cjs +5 -4
  28. package/dist/cjs/components/card/daikin-card.cjs +52 -61
  29. package/dist/cjs/components/card/index.cjs +5 -4
  30. package/dist/cjs/components/card-footer/daikin-card-footer.cjs +24 -27
  31. package/dist/cjs/components/card-footer/index.cjs +5 -4
  32. package/dist/cjs/components/card-header/daikin-card-header.cjs +46 -49
  33. package/dist/cjs/components/card-header/index.cjs +5 -4
  34. package/dist/cjs/components/carousel/daikin-carousel.cjs +397 -192
  35. package/dist/cjs/components/carousel/daikin-carousel.d.cts +50 -7
  36. package/dist/cjs/components/carousel/index.cjs +5 -4
  37. package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +69 -61
  38. package/dist/cjs/components/carousel-item/daikin-carousel-item.d.cts +1 -5
  39. package/dist/cjs/components/carousel-item/index.cjs +5 -4
  40. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +324 -336
  41. package/dist/cjs/components/checkbox/index.cjs +5 -4
  42. package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  43. package/dist/cjs/components/checkbox-group/index.cjs +5 -4
  44. package/dist/cjs/components/chip/daikin-chip.cjs +331 -335
  45. package/dist/cjs/components/chip/daikin-chip.d.cts +2 -0
  46. package/dist/cjs/components/chip/index.cjs +5 -4
  47. package/dist/cjs/components/combobox/daikin-combobox.cjs +480 -593
  48. package/dist/cjs/components/combobox/daikin-combobox.d.cts +8 -0
  49. package/dist/cjs/components/combobox/index.cjs +6 -5
  50. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +809 -842
  51. package/dist/cjs/components/date-picker/index.cjs +5 -4
  52. package/dist/cjs/components/divider/daikin-divider.cjs +32 -36
  53. package/dist/cjs/components/divider/index.cjs +5 -4
  54. package/dist/cjs/components/drawer/daikin-drawer.cjs +200 -213
  55. package/dist/cjs/components/drawer/index.cjs +5 -4
  56. package/dist/cjs/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  57. package/dist/cjs/components/drawer-footer/index.cjs +5 -4
  58. package/dist/cjs/components/drawer-header/daikin-drawer-header.cjs +62 -67
  59. package/dist/cjs/components/drawer-header/index.cjs +5 -4
  60. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +479 -575
  61. package/dist/cjs/components/dropdown/index.cjs +5 -4
  62. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  63. package/dist/cjs/components/dropdown-item/index.cjs +5 -4
  64. package/dist/cjs/components/empty-state/daikin-empty-state.cjs +28 -31
  65. package/dist/cjs/components/empty-state/index.cjs +5 -4
  66. package/dist/cjs/components/icon/daikin-icon.cjs +159 -179
  67. package/dist/cjs/components/icon/icons.json.cjs +97 -6
  68. package/dist/cjs/components/icon/index.cjs +6 -5
  69. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +290 -274
  70. package/dist/cjs/components/icon-button/index.cjs +5 -4
  71. package/dist/cjs/components/index.cjs +435 -226
  72. package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +138 -162
  73. package/dist/cjs/components/inline-notification/index.cjs +5 -4
  74. package/dist/cjs/components/input-group/daikin-input-group.cjs +191 -235
  75. package/dist/cjs/components/input-group/index.cjs +5 -4
  76. package/dist/cjs/components/link/daikin-link.cjs +122 -132
  77. package/dist/cjs/components/link/index.cjs +5 -4
  78. package/dist/cjs/components/list/daikin-list.cjs +84 -101
  79. package/dist/cjs/components/list/index.cjs +5 -4
  80. package/dist/cjs/components/list-item/daikin-list-item.cjs +179 -196
  81. package/dist/cjs/components/list-item/index.cjs +5 -4
  82. package/dist/cjs/components/loading/daikin-loading.cjs +70 -84
  83. package/dist/cjs/components/loading/index.cjs +5 -4
  84. package/dist/cjs/components/logo/daikin-logo.cjs +115 -128
  85. package/dist/cjs/components/logo/index.cjs +5 -4
  86. package/dist/cjs/components/menu/daikin-menu.cjs +258 -322
  87. package/dist/cjs/components/menu/index.cjs +5 -4
  88. package/dist/cjs/components/modal/daikin-modal.cjs +107 -130
  89. package/dist/cjs/components/modal/index.cjs +5 -4
  90. package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +26 -29
  91. package/dist/cjs/components/modal-footer/index.cjs +5 -4
  92. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +70 -75
  93. package/dist/cjs/components/modal-header/index.cjs +5 -4
  94. package/dist/cjs/components/navigation/daikin-navigation.cjs +50 -54
  95. package/dist/cjs/components/navigation/index.cjs +5 -4
  96. package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +165 -188
  97. package/dist/cjs/components/navigation-item/index.cjs +5 -4
  98. package/dist/cjs/components/pagination/daikin-pagination.cjs +191 -221
  99. package/dist/cjs/components/pagination/index.cjs +5 -4
  100. package/dist/cjs/components/pagination/pagination-utils.cjs +76 -41
  101. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +136 -169
  102. package/dist/cjs/components/progress-bar/index.cjs +5 -4
  103. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  104. package/dist/cjs/components/progress-indicator/index.cjs +5 -4
  105. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  106. package/dist/cjs/components/progress-indicator-item/index.cjs +5 -4
  107. package/dist/cjs/components/radio/daikin-radio.cjs +273 -285
  108. package/dist/cjs/components/radio/index.cjs +5 -4
  109. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +149 -171
  110. package/dist/cjs/components/radio-group/index.cjs +5 -4
  111. package/dist/cjs/components/select/daikin-select.cjs +231 -264
  112. package/dist/cjs/components/select/index.cjs +5 -4
  113. package/dist/cjs/components/slider/daikin-slider.cjs +250 -301
  114. package/dist/cjs/components/slider/index.cjs +5 -4
  115. package/dist/cjs/components/slider/slider-utils.cjs +61 -45
  116. package/dist/cjs/components/status-message/daikin-status-message.cjs +115 -113
  117. package/dist/cjs/components/status-message/index.cjs +5 -4
  118. package/dist/cjs/components/tab/daikin-tab.cjs +112 -132
  119. package/dist/cjs/components/tab/index.cjs +5 -4
  120. package/dist/cjs/components/tab-panels/daikin-tab-panels.cjs +43 -52
  121. package/dist/cjs/components/tab-panels/index.cjs +5 -4
  122. package/dist/cjs/components/table/daikin-table.cjs +265 -318
  123. package/dist/cjs/components/table/index.cjs +5 -4
  124. package/dist/cjs/components/table-cell/daikin-table-cell.cjs +55 -69
  125. package/dist/cjs/components/table-cell/index.cjs +5 -4
  126. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  127. package/dist/cjs/components/table-header-cell/index.cjs +5 -4
  128. package/dist/cjs/components/tabs/daikin-tabs.cjs +178 -219
  129. package/dist/cjs/components/tabs/index.cjs +5 -4
  130. package/dist/cjs/components/tag/daikin-tag.cjs +150 -152
  131. package/dist/cjs/components/tag/index.cjs +5 -4
  132. package/dist/cjs/components/text-area/daikin-text-area.cjs +161 -175
  133. package/dist/cjs/components/text-area/index.cjs +5 -4
  134. package/dist/cjs/components/text-field/daikin-text-field.cjs +388 -438
  135. package/dist/cjs/components/text-field/index.cjs +5 -4
  136. package/dist/cjs/components/text-field/number-utils.cjs +77 -90
  137. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  138. package/dist/cjs/components/text-masked-field/index.cjs +5 -4
  139. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +689 -752
  140. package/dist/cjs/components/time-picker/index.cjs +15 -14
  141. package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +143 -170
  142. package/dist/cjs/components/toast-notification/index.cjs +5 -4
  143. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  144. package/dist/cjs/components/toast-notification-manager/index.cjs +5 -4
  145. package/dist/cjs/components/toggle/daikin-toggle.cjs +169 -178
  146. package/dist/cjs/components/toggle/index.cjs +5 -4
  147. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +165 -202
  148. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +2 -2
  149. package/dist/cjs/components/tooltip/index.cjs +5 -4
  150. package/dist/cjs/components/tree/common.cjs +74 -70
  151. package/dist/cjs/components/tree/daikin-tree.cjs +89 -103
  152. package/dist/cjs/components/tree/index.cjs +5 -4
  153. package/dist/cjs/components/tree-item/daikin-tree-item.cjs +178 -198
  154. package/dist/cjs/components/tree-item/index.cjs +6 -5
  155. package/dist/cjs/components/tree-section/daikin-tree-section.cjs +169 -215
  156. package/dist/cjs/components/tree-section/index.cjs +5 -4
  157. package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +84 -104
  158. package/dist/cjs/components/vertical-navigation/index.cjs +5 -4
  159. package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  160. package/dist/cjs/components/vertical-navigation-item/index.cjs +5 -4
  161. package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  162. package/dist/cjs/components/vertical-navigation-menu-item/index.cjs +5 -4
  163. package/dist/cjs/controllers/block-scroll.cjs +75 -41
  164. package/dist/cjs/controllers/click-outside.cjs +60 -30
  165. package/dist/cjs/controllers/click-outside.d.cts +3 -3
  166. package/dist/cjs/controllers/custom-readonly.cjs +52 -58
  167. package/dist/cjs/controllers/floating-ui-auto-update.cjs +76 -98
  168. package/dist/cjs/controllers/focus-trap.cjs +39 -57
  169. package/dist/cjs/controllers/helpers/controller-directive.cjs +46 -45
  170. package/dist/cjs/icon-registry.cjs +147 -161
  171. package/dist/cjs/index.cjs +374 -234
  172. package/dist/cjs/is-client.cjs +3 -4
  173. package/dist/cjs/navigation.cjs +66 -47
  174. package/dist/cjs/tailwind.css.cjs +4 -6
  175. package/dist/cjs/utils/calendar-common.cjs +156 -117
  176. package/dist/cjs/utils/extract-half-width-digits.cjs +17 -8
  177. package/dist/cjs/utils/is-similar-to-click.cjs +3 -3
  178. package/dist/cjs/utils/is-simple-key.cjs +9 -3
  179. package/dist/cjs/utils/notification-common.cjs +14 -27
  180. package/dist/cjs/utils/re-dispatch.cjs +6 -8
  181. package/dist/cjs/utils/scroller.cjs +44 -57
  182. package/dist/cjs-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs +9 -0
  183. package/dist/cjs-dev/_virtual/_rolldown/runtime.cjs +23 -0
  184. package/dist/cjs-dev/base/dds-element.cjs +101 -96
  185. package/dist/cjs-dev/base/dds-form-element.cjs +123 -144
  186. package/dist/cjs-dev/base/dds-property.cjs +46 -5
  187. package/dist/cjs-dev/base/dds-property.d.cts +1 -1
  188. package/dist/cjs-dev/base/decorators.cjs +8 -11
  189. package/dist/cjs-dev/base/define.cjs +11 -17
  190. package/dist/cjs-dev/base/index.cjs +12 -13
  191. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +78 -98
  192. package/dist/cjs-dev/components/accordion/index.cjs +5 -4
  193. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +148 -172
  194. package/dist/cjs-dev/components/accordion-item/index.cjs +5 -4
  195. package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +149 -163
  196. package/dist/cjs-dev/components/avatar/index.cjs +5 -4
  197. package/dist/cjs-dev/components/badge/daikin-badge.cjs +179 -199
  198. package/dist/cjs-dev/components/badge/index.cjs +5 -4
  199. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +80 -88
  200. package/dist/cjs-dev/components/breadcrumb/index.cjs +5 -4
  201. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +120 -127
  202. package/dist/cjs-dev/components/breadcrumb-item/index.cjs +5 -4
  203. package/dist/cjs-dev/components/button/daikin-button.cjs +269 -294
  204. package/dist/cjs-dev/components/button/index.cjs +5 -4
  205. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +429 -539
  206. package/dist/cjs-dev/components/calendar/index.cjs +5 -4
  207. package/dist/cjs-dev/components/card/daikin-card.cjs +52 -61
  208. package/dist/cjs-dev/components/card/index.cjs +5 -4
  209. package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +24 -27
  210. package/dist/cjs-dev/components/card-footer/index.cjs +5 -4
  211. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +46 -49
  212. package/dist/cjs-dev/components/card-header/index.cjs +5 -4
  213. package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +403 -202
  214. package/dist/cjs-dev/components/carousel/daikin-carousel.d.cts +50 -7
  215. package/dist/cjs-dev/components/carousel/index.cjs +5 -4
  216. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +69 -61
  217. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.d.cts +1 -5
  218. package/dist/cjs-dev/components/carousel-item/index.cjs +5 -4
  219. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +324 -336
  220. package/dist/cjs-dev/components/checkbox/index.cjs +5 -4
  221. package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  222. package/dist/cjs-dev/components/checkbox-group/index.cjs +5 -4
  223. package/dist/cjs-dev/components/chip/daikin-chip.cjs +331 -335
  224. package/dist/cjs-dev/components/chip/daikin-chip.d.cts +2 -0
  225. package/dist/cjs-dev/components/chip/index.cjs +5 -4
  226. package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +480 -593
  227. package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +8 -0
  228. package/dist/cjs-dev/components/combobox/index.cjs +6 -5
  229. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +817 -853
  230. package/dist/cjs-dev/components/date-picker/index.cjs +5 -4
  231. package/dist/cjs-dev/components/divider/daikin-divider.cjs +32 -36
  232. package/dist/cjs-dev/components/divider/index.cjs +5 -4
  233. package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +200 -213
  234. package/dist/cjs-dev/components/drawer/index.cjs +5 -4
  235. package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  236. package/dist/cjs-dev/components/drawer-footer/index.cjs +5 -4
  237. package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.cjs +62 -67
  238. package/dist/cjs-dev/components/drawer-header/index.cjs +5 -4
  239. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +479 -575
  240. package/dist/cjs-dev/components/dropdown/index.cjs +5 -4
  241. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  242. package/dist/cjs-dev/components/dropdown-item/index.cjs +5 -4
  243. package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +28 -31
  244. package/dist/cjs-dev/components/empty-state/index.cjs +5 -4
  245. package/dist/cjs-dev/components/icon/daikin-icon.cjs +167 -208
  246. package/dist/cjs-dev/components/icon/icons.json.cjs +97 -6
  247. package/dist/cjs-dev/components/icon/index.cjs +6 -5
  248. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +290 -274
  249. package/dist/cjs-dev/components/icon-button/index.cjs +5 -4
  250. package/dist/cjs-dev/components/index.cjs +435 -226
  251. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +138 -162
  252. package/dist/cjs-dev/components/inline-notification/index.cjs +5 -4
  253. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +191 -235
  254. package/dist/cjs-dev/components/input-group/index.cjs +5 -4
  255. package/dist/cjs-dev/components/link/daikin-link.cjs +122 -132
  256. package/dist/cjs-dev/components/link/index.cjs +5 -4
  257. package/dist/cjs-dev/components/list/daikin-list.cjs +84 -101
  258. package/dist/cjs-dev/components/list/index.cjs +5 -4
  259. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +179 -196
  260. package/dist/cjs-dev/components/list-item/index.cjs +5 -4
  261. package/dist/cjs-dev/components/loading/daikin-loading.cjs +70 -84
  262. package/dist/cjs-dev/components/loading/index.cjs +5 -4
  263. package/dist/cjs-dev/components/logo/daikin-logo.cjs +115 -128
  264. package/dist/cjs-dev/components/logo/index.cjs +5 -4
  265. package/dist/cjs-dev/components/menu/daikin-menu.cjs +258 -322
  266. package/dist/cjs-dev/components/menu/index.cjs +5 -4
  267. package/dist/cjs-dev/components/modal/daikin-modal.cjs +107 -130
  268. package/dist/cjs-dev/components/modal/index.cjs +5 -4
  269. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +26 -29
  270. package/dist/cjs-dev/components/modal-footer/index.cjs +5 -4
  271. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +70 -75
  272. package/dist/cjs-dev/components/modal-header/index.cjs +5 -4
  273. package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +50 -54
  274. package/dist/cjs-dev/components/navigation/index.cjs +5 -4
  275. package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +165 -188
  276. package/dist/cjs-dev/components/navigation-item/index.cjs +5 -4
  277. package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +191 -221
  278. package/dist/cjs-dev/components/pagination/index.cjs +5 -4
  279. package/dist/cjs-dev/components/pagination/pagination-utils.cjs +76 -41
  280. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +145 -184
  281. package/dist/cjs-dev/components/progress-bar/index.cjs +5 -4
  282. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  283. package/dist/cjs-dev/components/progress-indicator/index.cjs +5 -4
  284. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  285. package/dist/cjs-dev/components/progress-indicator-item/index.cjs +5 -4
  286. package/dist/cjs-dev/components/radio/daikin-radio.cjs +273 -285
  287. package/dist/cjs-dev/components/radio/index.cjs +5 -4
  288. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +149 -171
  289. package/dist/cjs-dev/components/radio-group/index.cjs +5 -4
  290. package/dist/cjs-dev/components/select/daikin-select.cjs +231 -264
  291. package/dist/cjs-dev/components/select/index.cjs +5 -4
  292. package/dist/cjs-dev/components/slider/daikin-slider.cjs +250 -301
  293. package/dist/cjs-dev/components/slider/index.cjs +5 -4
  294. package/dist/cjs-dev/components/slider/slider-utils.cjs +61 -45
  295. package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +115 -113
  296. package/dist/cjs-dev/components/status-message/index.cjs +5 -4
  297. package/dist/cjs-dev/components/tab/daikin-tab.cjs +112 -132
  298. package/dist/cjs-dev/components/tab/index.cjs +5 -4
  299. package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.cjs +44 -59
  300. package/dist/cjs-dev/components/tab-panels/index.cjs +5 -4
  301. package/dist/cjs-dev/components/table/daikin-table.cjs +271 -330
  302. package/dist/cjs-dev/components/table/index.cjs +5 -4
  303. package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +55 -69
  304. package/dist/cjs-dev/components/table-cell/index.cjs +5 -4
  305. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  306. package/dist/cjs-dev/components/table-header-cell/index.cjs +5 -4
  307. package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +184 -229
  308. package/dist/cjs-dev/components/tabs/index.cjs +5 -4
  309. package/dist/cjs-dev/components/tag/daikin-tag.cjs +150 -152
  310. package/dist/cjs-dev/components/tag/index.cjs +5 -4
  311. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +161 -175
  312. package/dist/cjs-dev/components/text-area/index.cjs +5 -4
  313. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +388 -438
  314. package/dist/cjs-dev/components/text-field/index.cjs +5 -4
  315. package/dist/cjs-dev/components/text-field/number-utils.cjs +78 -93
  316. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  317. package/dist/cjs-dev/components/text-masked-field/index.cjs +5 -4
  318. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +697 -764
  319. package/dist/cjs-dev/components/time-picker/index.cjs +15 -14
  320. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +143 -170
  321. package/dist/cjs-dev/components/toast-notification/index.cjs +5 -4
  322. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  323. package/dist/cjs-dev/components/toast-notification-manager/index.cjs +5 -4
  324. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +169 -178
  325. package/dist/cjs-dev/components/toggle/index.cjs +5 -4
  326. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +165 -202
  327. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +2 -2
  328. package/dist/cjs-dev/components/tooltip/index.cjs +5 -4
  329. package/dist/cjs-dev/components/tree/common.cjs +74 -70
  330. package/dist/cjs-dev/components/tree/daikin-tree.cjs +89 -103
  331. package/dist/cjs-dev/components/tree/index.cjs +5 -4
  332. package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +178 -198
  333. package/dist/cjs-dev/components/tree-item/index.cjs +6 -5
  334. package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +169 -215
  335. package/dist/cjs-dev/components/tree-section/index.cjs +5 -4
  336. package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +88 -116
  337. package/dist/cjs-dev/components/vertical-navigation/index.cjs +5 -4
  338. package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  339. package/dist/cjs-dev/components/vertical-navigation-item/index.cjs +5 -4
  340. package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  341. package/dist/cjs-dev/components/vertical-navigation-menu-item/index.cjs +5 -4
  342. package/dist/cjs-dev/controllers/block-scroll.cjs +75 -41
  343. package/dist/cjs-dev/controllers/click-outside.cjs +60 -30
  344. package/dist/cjs-dev/controllers/click-outside.d.cts +3 -3
  345. package/dist/cjs-dev/controllers/custom-readonly.cjs +52 -58
  346. package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +78 -105
  347. package/dist/cjs-dev/controllers/focus-trap.cjs +39 -57
  348. package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +46 -45
  349. package/dist/cjs-dev/icon-registry.cjs +147 -161
  350. package/dist/cjs-dev/index.cjs +374 -234
  351. package/dist/cjs-dev/is-client.cjs +3 -4
  352. package/dist/cjs-dev/navigation.cjs +66 -47
  353. package/dist/cjs-dev/tailwind.css.cjs +4 -6
  354. package/dist/cjs-dev/utils/calendar-common.cjs +156 -117
  355. package/dist/cjs-dev/utils/extract-half-width-digits.cjs +17 -8
  356. package/dist/cjs-dev/utils/is-similar-to-click.cjs +3 -3
  357. package/dist/cjs-dev/utils/is-simple-key.cjs +9 -3
  358. package/dist/cjs-dev/utils/notification-common.cjs +17 -30
  359. package/dist/cjs-dev/utils/re-dispatch.cjs +6 -8
  360. package/dist/cjs-dev/utils/scroller.cjs +44 -57
  361. package/dist/es/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  362. package/dist/es/base/dds-element.js +100 -86
  363. package/dist/es/base/dds-form-element.js +122 -144
  364. package/dist/es/base/dds-property.d.ts +1 -1
  365. package/dist/es/base/dds-property.js +48 -8
  366. package/dist/es/base/decorators.js +8 -11
  367. package/dist/es/base/define.js +12 -17
  368. package/dist/es/base/index.js +3 -11
  369. package/dist/es/components/accordion/daikin-accordion.js +69 -89
  370. package/dist/es/components/accordion/index.js +1 -3
  371. package/dist/es/components/accordion-item/daikin-accordion-item.js +138 -168
  372. package/dist/es/components/accordion-item/index.js +1 -3
  373. package/dist/es/components/avatar/daikin-avatar.js +136 -156
  374. package/dist/es/components/avatar/index.js +1 -3
  375. package/dist/es/components/badge/daikin-badge.js +173 -198
  376. package/dist/es/components/badge/index.js +1 -3
  377. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +73 -87
  378. package/dist/es/components/breadcrumb/index.js +1 -3
  379. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  380. package/dist/es/components/breadcrumb-item/index.js +1 -3
  381. package/dist/es/components/button/daikin-button.js +255 -286
  382. package/dist/es/components/button/index.js +1 -3
  383. package/dist/es/components/calendar/daikin-calendar.js +407 -520
  384. package/dist/es/components/calendar/index.js +1 -3
  385. package/dist/es/components/card/daikin-card.js +44 -58
  386. package/dist/es/components/card/index.js +1 -3
  387. package/dist/es/components/card-footer/daikin-card-footer.js +16 -25
  388. package/dist/es/components/card-footer/index.js +1 -3
  389. package/dist/es/components/card-header/daikin-card-header.js +39 -48
  390. package/dist/es/components/card-header/index.js +1 -3
  391. package/dist/es/components/carousel/daikin-carousel.d.ts +50 -7
  392. package/dist/es/components/carousel/daikin-carousel.js +387 -190
  393. package/dist/es/components/carousel/index.js +1 -3
  394. package/dist/es/components/carousel-item/daikin-carousel-item.d.ts +1 -5
  395. package/dist/es/components/carousel-item/daikin-carousel-item.js +62 -60
  396. package/dist/es/components/carousel-item/index.js +1 -3
  397. package/dist/es/components/checkbox/daikin-checkbox.js +315 -333
  398. package/dist/es/components/checkbox/index.js +1 -3
  399. package/dist/es/components/checkbox-group/daikin-checkbox-group.js +86 -106
  400. package/dist/es/components/checkbox-group/index.js +1 -3
  401. package/dist/es/components/chip/daikin-chip.d.ts +2 -0
  402. package/dist/es/components/chip/daikin-chip.js +323 -333
  403. package/dist/es/components/chip/index.js +1 -3
  404. package/dist/es/components/combobox/daikin-combobox.d.ts +8 -0
  405. package/dist/es/components/combobox/daikin-combobox.js +465 -585
  406. package/dist/es/components/combobox/index.js +1 -4
  407. package/dist/es/components/date-picker/daikin-date-picker.js +787 -826
  408. package/dist/es/components/date-picker/index.js +1 -3
  409. package/dist/es/components/divider/daikin-divider.js +25 -34
  410. package/dist/es/components/divider/index.js +1 -3
  411. package/dist/es/components/drawer/daikin-drawer.js +189 -208
  412. package/dist/es/components/drawer/index.js +1 -3
  413. package/dist/es/components/drawer-footer/daikin-drawer-footer.js +18 -27
  414. package/dist/es/components/drawer-footer/index.js +1 -3
  415. package/dist/es/components/drawer-header/daikin-drawer-header.js +53 -64
  416. package/dist/es/components/drawer-header/index.js +1 -3
  417. package/dist/es/components/dropdown/daikin-dropdown.js +468 -570
  418. package/dist/es/components/dropdown/index.js +1 -3
  419. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +124 -150
  420. package/dist/es/components/dropdown-item/index.js +1 -3
  421. package/dist/es/components/empty-state/daikin-empty-state.js +21 -30
  422. package/dist/es/components/empty-state/index.js +1 -3
  423. package/dist/es/components/icon/daikin-icon.js +150 -177
  424. package/dist/es/components/icon/icons.json.js +97 -7
  425. package/dist/es/components/icon/index.js +1 -4
  426. package/dist/es/components/icon-button/daikin-icon-button.js +277 -267
  427. package/dist/es/components/icon-button/index.js +1 -3
  428. package/dist/es/components/index.js +85 -99
  429. package/dist/es/components/inline-notification/daikin-inline-notification.js +130 -160
  430. package/dist/es/components/inline-notification/index.js +1 -3
  431. package/dist/es/components/input-group/daikin-input-group.js +184 -234
  432. package/dist/es/components/input-group/index.js +1 -3
  433. package/dist/es/components/link/daikin-link.js +111 -127
  434. package/dist/es/components/link/index.js +1 -3
  435. package/dist/es/components/list/daikin-list.js +77 -100
  436. package/dist/es/components/list/index.js +1 -3
  437. package/dist/es/components/list-item/daikin-list-item.js +168 -192
  438. package/dist/es/components/list-item/index.js +1 -3
  439. package/dist/es/components/loading/daikin-loading.js +62 -82
  440. package/dist/es/components/loading/index.js +1 -3
  441. package/dist/es/components/logo/daikin-logo.js +106 -125
  442. package/dist/es/components/logo/index.js +1 -3
  443. package/dist/es/components/menu/daikin-menu.js +246 -316
  444. package/dist/es/components/menu/index.js +1 -3
  445. package/dist/es/components/modal/daikin-modal.js +97 -126
  446. package/dist/es/components/modal/index.js +1 -3
  447. package/dist/es/components/modal-footer/daikin-modal-footer.js +18 -27
  448. package/dist/es/components/modal-footer/index.js +1 -3
  449. package/dist/es/components/modal-header/daikin-modal-header.js +61 -72
  450. package/dist/es/components/modal-header/index.js +1 -3
  451. package/dist/es/components/navigation/daikin-navigation.js +42 -52
  452. package/dist/es/components/navigation/index.js +1 -3
  453. package/dist/es/components/navigation-item/daikin-navigation-item.js +152 -181
  454. package/dist/es/components/navigation-item/index.js +1 -3
  455. package/dist/es/components/pagination/daikin-pagination.js +183 -219
  456. package/dist/es/components/pagination/index.js +1 -3
  457. package/dist/es/components/pagination/pagination-utils.js +77 -44
  458. package/dist/es/components/progress-bar/daikin-progress-bar.js +129 -168
  459. package/dist/es/components/progress-bar/index.js +1 -3
  460. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +47 -60
  461. package/dist/es/components/progress-indicator/index.js +1 -3
  462. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  463. package/dist/es/components/progress-indicator-item/index.js +1 -3
  464. package/dist/es/components/radio/daikin-radio.js +264 -282
  465. package/dist/es/components/radio/index.js +1 -3
  466. package/dist/es/components/radio-group/daikin-radio-group.js +142 -170
  467. package/dist/es/components/radio-group/index.js +1 -3
  468. package/dist/es/components/select/daikin-select.js +222 -261
  469. package/dist/es/components/select/index.js +1 -3
  470. package/dist/es/components/slider/daikin-slider.js +241 -298
  471. package/dist/es/components/slider/index.js +1 -3
  472. package/dist/es/components/slider/slider-utils.js +62 -49
  473. package/dist/es/components/status-message/daikin-status-message.js +107 -111
  474. package/dist/es/components/status-message/index.js +1 -3
  475. package/dist/es/components/tab/daikin-tab.js +105 -130
  476. package/dist/es/components/tab/index.js +1 -3
  477. package/dist/es/components/tab-panels/daikin-tab-panels.js +35 -50
  478. package/dist/es/components/tab-panels/index.js +1 -3
  479. package/dist/es/components/table/daikin-table.js +255 -314
  480. package/dist/es/components/table/index.js +1 -3
  481. package/dist/es/components/table-cell/daikin-table-cell.js +49 -68
  482. package/dist/es/components/table-cell/index.js +1 -3
  483. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +121 -137
  484. package/dist/es/components/table-header-cell/index.js +1 -3
  485. package/dist/es/components/tabs/daikin-tabs.js +170 -217
  486. package/dist/es/components/tabs/index.js +1 -3
  487. package/dist/es/components/tag/daikin-tag.js +142 -150
  488. package/dist/es/components/tag/index.js +1 -3
  489. package/dist/es/components/text-area/daikin-text-area.js +153 -173
  490. package/dist/es/components/text-area/index.js +1 -3
  491. package/dist/es/components/text-field/daikin-text-field.js +371 -427
  492. package/dist/es/components/text-field/index.js +1 -3
  493. package/dist/es/components/text-field/number-utils.js +75 -90
  494. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +279 -303
  495. package/dist/es/components/text-masked-field/index.js +1 -3
  496. package/dist/es/components/time-picker/daikin-time-picker.js +677 -756
  497. package/dist/es/components/time-picker/index.js +1 -13
  498. package/dist/es/components/toast-notification/daikin-toast-notification.js +134 -167
  499. package/dist/es/components/toast-notification/index.js +1 -3
  500. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  501. package/dist/es/components/toast-notification-manager/index.js +1 -3
  502. package/dist/es/components/toggle/daikin-toggle.js +160 -175
  503. package/dist/es/components/toggle/index.js +1 -3
  504. package/dist/es/components/tooltip/daikin-tooltip.d.ts +2 -2
  505. package/dist/es/components/tooltip/daikin-tooltip.js +156 -199
  506. package/dist/es/components/tooltip/index.js +1 -3
  507. package/dist/es/components/tree/common.js +75 -76
  508. package/dist/es/components/tree/daikin-tree.js +81 -101
  509. package/dist/es/components/tree/index.js +1 -3
  510. package/dist/es/components/tree-item/daikin-tree-item.js +166 -193
  511. package/dist/es/components/tree-item/index.js +1 -4
  512. package/dist/es/components/tree-section/daikin-tree-section.js +157 -209
  513. package/dist/es/components/tree-section/index.js +1 -3
  514. package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +76 -102
  515. package/dist/es/components/vertical-navigation/index.js +1 -3
  516. package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  517. package/dist/es/components/vertical-navigation-item/index.js +1 -3
  518. package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  519. package/dist/es/components/vertical-navigation-menu-item/index.js +1 -3
  520. package/dist/es/controllers/block-scroll.js +74 -41
  521. package/dist/es/controllers/click-outside.d.ts +3 -3
  522. package/dist/es/controllers/click-outside.js +59 -29
  523. package/dist/es/controllers/custom-readonly.js +52 -58
  524. package/dist/es/controllers/floating-ui-auto-update.js +74 -96
  525. package/dist/es/controllers/focus-trap.js +37 -55
  526. package/dist/es/controllers/helpers/controller-directive.js +46 -45
  527. package/dist/es/icon-registry.js +148 -163
  528. package/dist/es/index.js +17 -106
  529. package/dist/es/is-client.js +4 -4
  530. package/dist/es/navigation.js +67 -51
  531. package/dist/es/tailwind.css.js +4 -6
  532. package/dist/es/utils/calendar-common.js +156 -134
  533. package/dist/es/utils/extract-half-width-digits.js +18 -9
  534. package/dist/es/utils/is-similar-to-click.js +4 -4
  535. package/dist/es/utils/is-simple-key.js +10 -4
  536. package/dist/es/utils/notification-common.js +14 -28
  537. package/dist/es/utils/re-dispatch.js +7 -9
  538. package/dist/es/utils/scroller.js +45 -61
  539. package/dist/es-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  540. package/dist/es-dev/base/dds-element.js +101 -96
  541. package/dist/es-dev/base/dds-form-element.js +122 -144
  542. package/dist/es-dev/base/dds-property.d.ts +1 -1
  543. package/dist/es-dev/base/dds-property.js +48 -8
  544. package/dist/es-dev/base/decorators.js +8 -11
  545. package/dist/es-dev/base/define.js +12 -17
  546. package/dist/es-dev/base/index.js +3 -11
  547. package/dist/es-dev/components/accordion/daikin-accordion.js +70 -96
  548. package/dist/es-dev/components/accordion/index.js +1 -3
  549. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +138 -168
  550. package/dist/es-dev/components/accordion-item/index.js +1 -3
  551. package/dist/es-dev/components/avatar/daikin-avatar.js +136 -156
  552. package/dist/es-dev/components/avatar/index.js +1 -3
  553. package/dist/es-dev/components/badge/daikin-badge.js +173 -198
  554. package/dist/es-dev/components/badge/index.js +1 -3
  555. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +73 -87
  556. package/dist/es-dev/components/breadcrumb/index.js +1 -3
  557. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  558. package/dist/es-dev/components/breadcrumb-item/index.js +1 -3
  559. package/dist/es-dev/components/button/daikin-button.js +255 -286
  560. package/dist/es-dev/components/button/index.js +1 -3
  561. package/dist/es-dev/components/calendar/daikin-calendar.js +415 -531
  562. package/dist/es-dev/components/calendar/index.js +1 -3
  563. package/dist/es-dev/components/card/daikin-card.js +44 -58
  564. package/dist/es-dev/components/card/index.js +1 -3
  565. package/dist/es-dev/components/card-footer/daikin-card-footer.js +16 -25
  566. package/dist/es-dev/components/card-footer/index.js +1 -3
  567. package/dist/es-dev/components/card-header/daikin-card-header.js +39 -48
  568. package/dist/es-dev/components/card-header/index.js +1 -3
  569. package/dist/es-dev/components/carousel/daikin-carousel.d.ts +50 -7
  570. package/dist/es-dev/components/carousel/daikin-carousel.js +393 -200
  571. package/dist/es-dev/components/carousel/index.js +1 -3
  572. package/dist/es-dev/components/carousel-item/daikin-carousel-item.d.ts +1 -5
  573. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +62 -60
  574. package/dist/es-dev/components/carousel-item/index.js +1 -3
  575. package/dist/es-dev/components/checkbox/daikin-checkbox.js +315 -333
  576. package/dist/es-dev/components/checkbox/index.js +1 -3
  577. package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +86 -106
  578. package/dist/es-dev/components/checkbox-group/index.js +1 -3
  579. package/dist/es-dev/components/chip/daikin-chip.d.ts +2 -0
  580. package/dist/es-dev/components/chip/daikin-chip.js +323 -333
  581. package/dist/es-dev/components/chip/index.js +1 -3
  582. package/dist/es-dev/components/combobox/daikin-combobox.d.ts +8 -0
  583. package/dist/es-dev/components/combobox/daikin-combobox.js +465 -585
  584. package/dist/es-dev/components/combobox/index.js +1 -4
  585. package/dist/es-dev/components/date-picker/daikin-date-picker.js +795 -837
  586. package/dist/es-dev/components/date-picker/index.js +1 -3
  587. package/dist/es-dev/components/divider/daikin-divider.js +25 -34
  588. package/dist/es-dev/components/divider/index.js +1 -3
  589. package/dist/es-dev/components/drawer/daikin-drawer.js +189 -208
  590. package/dist/es-dev/components/drawer/index.js +1 -3
  591. package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.js +18 -27
  592. package/dist/es-dev/components/drawer-footer/index.js +1 -3
  593. package/dist/es-dev/components/drawer-header/daikin-drawer-header.js +53 -64
  594. package/dist/es-dev/components/drawer-header/index.js +1 -3
  595. package/dist/es-dev/components/dropdown/daikin-dropdown.js +468 -570
  596. package/dist/es-dev/components/dropdown/index.js +1 -3
  597. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +124 -150
  598. package/dist/es-dev/components/dropdown-item/index.js +1 -3
  599. package/dist/es-dev/components/empty-state/daikin-empty-state.js +21 -30
  600. package/dist/es-dev/components/empty-state/index.js +1 -3
  601. package/dist/es-dev/components/icon/daikin-icon.js +158 -206
  602. package/dist/es-dev/components/icon/icons.json.js +97 -7
  603. package/dist/es-dev/components/icon/index.js +1 -4
  604. package/dist/es-dev/components/icon-button/daikin-icon-button.js +277 -267
  605. package/dist/es-dev/components/icon-button/index.js +1 -3
  606. package/dist/es-dev/components/index.js +85 -99
  607. package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +130 -160
  608. package/dist/es-dev/components/inline-notification/index.js +1 -3
  609. package/dist/es-dev/components/input-group/daikin-input-group.js +184 -234
  610. package/dist/es-dev/components/input-group/index.js +1 -3
  611. package/dist/es-dev/components/link/daikin-link.js +111 -127
  612. package/dist/es-dev/components/link/index.js +1 -3
  613. package/dist/es-dev/components/list/daikin-list.js +77 -100
  614. package/dist/es-dev/components/list/index.js +1 -3
  615. package/dist/es-dev/components/list-item/daikin-list-item.js +168 -192
  616. package/dist/es-dev/components/list-item/index.js +1 -3
  617. package/dist/es-dev/components/loading/daikin-loading.js +62 -82
  618. package/dist/es-dev/components/loading/index.js +1 -3
  619. package/dist/es-dev/components/logo/daikin-logo.js +106 -125
  620. package/dist/es-dev/components/logo/index.js +1 -3
  621. package/dist/es-dev/components/menu/daikin-menu.js +246 -316
  622. package/dist/es-dev/components/menu/index.js +1 -3
  623. package/dist/es-dev/components/modal/daikin-modal.js +97 -126
  624. package/dist/es-dev/components/modal/index.js +1 -3
  625. package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +18 -27
  626. package/dist/es-dev/components/modal-footer/index.js +1 -3
  627. package/dist/es-dev/components/modal-header/daikin-modal-header.js +61 -72
  628. package/dist/es-dev/components/modal-header/index.js +1 -3
  629. package/dist/es-dev/components/navigation/daikin-navigation.js +42 -52
  630. package/dist/es-dev/components/navigation/index.js +1 -3
  631. package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +152 -181
  632. package/dist/es-dev/components/navigation-item/index.js +1 -3
  633. package/dist/es-dev/components/pagination/daikin-pagination.js +183 -219
  634. package/dist/es-dev/components/pagination/index.js +1 -3
  635. package/dist/es-dev/components/pagination/pagination-utils.js +77 -44
  636. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +138 -183
  637. package/dist/es-dev/components/progress-bar/index.js +1 -3
  638. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +47 -60
  639. package/dist/es-dev/components/progress-indicator/index.js +1 -3
  640. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  641. package/dist/es-dev/components/progress-indicator-item/index.js +1 -3
  642. package/dist/es-dev/components/radio/daikin-radio.js +264 -282
  643. package/dist/es-dev/components/radio/index.js +1 -3
  644. package/dist/es-dev/components/radio-group/daikin-radio-group.js +142 -170
  645. package/dist/es-dev/components/radio-group/index.js +1 -3
  646. package/dist/es-dev/components/select/daikin-select.js +222 -261
  647. package/dist/es-dev/components/select/index.js +1 -3
  648. package/dist/es-dev/components/slider/daikin-slider.js +241 -298
  649. package/dist/es-dev/components/slider/index.js +1 -3
  650. package/dist/es-dev/components/slider/slider-utils.js +62 -49
  651. package/dist/es-dev/components/status-message/daikin-status-message.js +107 -111
  652. package/dist/es-dev/components/status-message/index.js +1 -3
  653. package/dist/es-dev/components/tab/daikin-tab.js +105 -130
  654. package/dist/es-dev/components/tab/index.js +1 -3
  655. package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +36 -57
  656. package/dist/es-dev/components/tab-panels/index.js +1 -3
  657. package/dist/es-dev/components/table/daikin-table.js +261 -326
  658. package/dist/es-dev/components/table/index.js +1 -3
  659. package/dist/es-dev/components/table-cell/daikin-table-cell.js +49 -68
  660. package/dist/es-dev/components/table-cell/index.js +1 -3
  661. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +121 -137
  662. package/dist/es-dev/components/table-header-cell/index.js +1 -3
  663. package/dist/es-dev/components/tabs/daikin-tabs.js +176 -227
  664. package/dist/es-dev/components/tabs/index.js +1 -3
  665. package/dist/es-dev/components/tag/daikin-tag.js +142 -150
  666. package/dist/es-dev/components/tag/index.js +1 -3
  667. package/dist/es-dev/components/text-area/daikin-text-area.js +153 -173
  668. package/dist/es-dev/components/text-area/index.js +1 -3
  669. package/dist/es-dev/components/text-field/daikin-text-field.js +371 -427
  670. package/dist/es-dev/components/text-field/index.js +1 -3
  671. package/dist/es-dev/components/text-field/number-utils.js +76 -93
  672. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +279 -303
  673. package/dist/es-dev/components/text-masked-field/index.js +1 -3
  674. package/dist/es-dev/components/time-picker/daikin-time-picker.js +685 -768
  675. package/dist/es-dev/components/time-picker/index.js +1 -13
  676. package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +134 -167
  677. package/dist/es-dev/components/toast-notification/index.js +1 -3
  678. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  679. package/dist/es-dev/components/toast-notification-manager/index.js +1 -3
  680. package/dist/es-dev/components/toggle/daikin-toggle.js +160 -175
  681. package/dist/es-dev/components/toggle/index.js +1 -3
  682. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +2 -2
  683. package/dist/es-dev/components/tooltip/daikin-tooltip.js +156 -199
  684. package/dist/es-dev/components/tooltip/index.js +1 -3
  685. package/dist/es-dev/components/tree/common.js +75 -76
  686. package/dist/es-dev/components/tree/daikin-tree.js +81 -101
  687. package/dist/es-dev/components/tree/index.js +1 -3
  688. package/dist/es-dev/components/tree-item/daikin-tree-item.js +166 -193
  689. package/dist/es-dev/components/tree-item/index.js +1 -4
  690. package/dist/es-dev/components/tree-section/daikin-tree-section.js +157 -209
  691. package/dist/es-dev/components/tree-section/index.js +1 -3
  692. package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +80 -114
  693. package/dist/es-dev/components/vertical-navigation/index.js +1 -3
  694. package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  695. package/dist/es-dev/components/vertical-navigation-item/index.js +1 -3
  696. package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  697. package/dist/es-dev/components/vertical-navigation-menu-item/index.js +1 -3
  698. package/dist/es-dev/controllers/block-scroll.js +74 -41
  699. package/dist/es-dev/controllers/click-outside.d.ts +3 -3
  700. package/dist/es-dev/controllers/click-outside.js +59 -29
  701. package/dist/es-dev/controllers/custom-readonly.js +52 -58
  702. package/dist/es-dev/controllers/floating-ui-auto-update.js +76 -103
  703. package/dist/es-dev/controllers/focus-trap.js +37 -55
  704. package/dist/es-dev/controllers/helpers/controller-directive.js +46 -45
  705. package/dist/es-dev/icon-registry.js +148 -163
  706. package/dist/es-dev/index.js +17 -106
  707. package/dist/es-dev/is-client.js +4 -4
  708. package/dist/es-dev/navigation.js +67 -51
  709. package/dist/es-dev/tailwind.css.js +4 -6
  710. package/dist/es-dev/utils/calendar-common.js +156 -134
  711. package/dist/es-dev/utils/extract-half-width-digits.js +18 -9
  712. package/dist/es-dev/utils/is-similar-to-click.js +4 -4
  713. package/dist/es-dev/utils/is-simple-key.js +10 -4
  714. package/dist/es-dev/utils/notification-common.js +17 -31
  715. package/dist/es-dev/utils/re-dispatch.js +7 -9
  716. package/dist/es-dev/utils/scroller.js +45 -61
  717. package/package.json +81 -78
@@ -1,716 +1,732 @@
1
- import { offset, flip, shift, size } from "@floating-ui/dom";
2
- import { cva } from "class-variance-authority";
3
- import { unsafeCSS, css, nothing, html } from "lit";
4
- import { state } from "lit/decorators.js";
5
- import { guard } from "lit/directives/guard.js";
6
- import { ifDefined } from "lit/directives/if-defined.js";
7
- import { createRef, ref } from "lit/directives/ref.js";
8
- import "../../base/dds-element.js";
1
+ import { property as property$1 } from "../../base/dds-property.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js";
9
3
  import { DDSFormElement } from "../../base/dds-form-element.js";
10
- import { property } from "../../base/dds-property.js";
11
4
  import { ddsElement } from "../../base/decorators.js";
12
- import "../../base/define.js";
5
+ import "../../base/index.js";
6
+ import tailwind_default from "../../tailwind.css.js";
7
+ import { countDaysForYearMonth, cvaIconButton, formatDateForProperty, isDateOutOfRange, parseDateFromProperty, tryParseDateFromProperty } from "../../utils/calendar-common.js";
8
+ import "../icon-button/daikin-icon-button.js";
9
+ import "../calendar/daikin-calendar.js";
13
10
  import { FloatingUIAutoUpdateController } from "../../controllers/floating-ui-auto-update.js";
14
11
  import { FocusTrapController } from "../../controllers/focus-trap.js";
15
- import tailwindStyles from "../../tailwind.css.js";
16
- import { tryParseDateFromProperty, parseDateFromProperty, DEFAULT_MIN_DATE, DEFAULT_MAX_DATE, formatDateForProperty, isDateOutOfRange, cvaIconButton, countDaysForYearMonth } from "../../utils/calendar-common.js";
17
12
  import { extractHalfWidthDigits } from "../../utils/extract-half-width-digits.js";
18
13
  import { reDispatch } from "../../utils/re-dispatch.js";
19
- import "../calendar/daikin-calendar.js";
20
- import "../icon-button/daikin-icon-button.js";
21
- var __defProp = Object.defineProperty;
22
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
23
- var __decorateClass = (decorators, target, key, kind) => {
24
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
25
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
26
- if (decorator = decorators[i])
27
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
28
- if (kind && result) __defProp(target, key, result);
29
- return result;
30
- };
31
- const dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
14
+ import { css, html, nothing, unsafeCSS } from "lit";
15
+ import { state } from "lit/decorators.js";
16
+ import { cva } from "class-variance-authority";
17
+ import { createRef, ref } from "lit/directives/ref.js";
18
+ import { ifDefined } from "lit/directives/if-defined.js";
19
+ import { flip, offset, shift, size } from "@floating-ui/dom";
20
+ import { guard } from "lit/directives/guard.js";
21
+ //#region src/components/date-picker/daikin-date-picker.ts
22
+ var dateTimeFormatPartsCache = /* @__PURE__ */ new Map();
23
+ /**
24
+ * Gets the date format parts for the given inputLocale, using cache to optimize performance. If the inputLocale is invalid, it falls back to the default locale and caches the result under the requested key to avoid throwing errors on subsequent calls with the same invalid inputLocale.
25
+ */
32
26
  function getSafeDateTimeFormatParts(inputLocale) {
33
- const options = {
34
- year: "numeric",
35
- month: "numeric",
36
- day: "numeric"
37
- };
38
- const key = inputLocale ?? "__DEFAULT__";
39
- const cached = dateTimeFormatPartsCache.get(key);
40
- if (cached) return cached;
41
- try {
42
- const parts = new Intl.DateTimeFormat(
43
- inputLocale ?? void 0,
44
- options
45
- ).formatToParts(0);
46
- dateTimeFormatPartsCache.set(key, parts);
47
- return parts;
48
- } catch {
49
- const parts = new Intl.DateTimeFormat(void 0, options).formatToParts(0);
50
- dateTimeFormatPartsCache.set(key, parts);
51
- return parts;
52
- }
27
+ const options = {
28
+ year: "numeric",
29
+ month: "numeric",
30
+ day: "numeric"
31
+ };
32
+ const key = inputLocale ?? "__DEFAULT__";
33
+ const cached = dateTimeFormatPartsCache.get(key);
34
+ if (cached) return cached;
35
+ try {
36
+ const parts = new Intl.DateTimeFormat(inputLocale ?? void 0, options).formatToParts(0);
37
+ dateTimeFormatPartsCache.set(key, parts);
38
+ return parts;
39
+ } catch {
40
+ const parts = new Intl.DateTimeFormat(void 0, options).formatToParts(0);
41
+ dateTimeFormatPartsCache.set(key, parts);
42
+ return parts;
43
+ }
53
44
  }
45
+ /**
46
+ * Build date item metadata (type + selection ranges) based on the current inputLocale's
47
+ * date order (e.g. MDY, DMY, YMD) and the separator used by Intl.
48
+ */
54
49
  function getDateOrderAndSeparator(inputLocale) {
55
- const parts = getSafeDateTimeFormatParts(inputLocale ?? void 0);
56
- const order = parts.filter(
57
- (p) => ["year", "month", "day"].includes(p.type)
58
- ).map((p) => p.type);
59
- const literals = parts.filter((p) => p.type === "literal");
60
- const sep = literals.length >= 2 && literals[0].value === literals[1].value ? literals[0].value : "/";
61
- const requiredParts = ["year", "month", "day"];
62
- const isValidOrder = order.length === 3 && requiredParts.every((part) => order.includes(part));
63
- const isValidSep = sep.length > 0 && /^\D+$/.test(sep);
64
- if (!isValidOrder || !isValidSep) {
65
- return {
66
- order: ["month", "day", "year"],
67
- sep: "/"
68
- };
69
- }
70
- return { order, sep };
50
+ const parts = getSafeDateTimeFormatParts(inputLocale ?? void 0);
51
+ const order = parts.filter((p) => [
52
+ "year",
53
+ "month",
54
+ "day"
55
+ ].includes(p.type)).map((p) => p.type);
56
+ const literals = parts.filter((p) => p.type === "literal");
57
+ const sep = literals.length >= 2 && literals[0].value === literals[1].value ? literals[0].value : "/";
58
+ const isValidOrder = order.length === 3 && [
59
+ "year",
60
+ "month",
61
+ "day"
62
+ ].every((part) => order.includes(part));
63
+ const isValidSep = sep.length > 0 && /^\D+$/.test(sep);
64
+ if (!isValidOrder || !isValidSep) return {
65
+ order: [
66
+ "month",
67
+ "day",
68
+ "year"
69
+ ],
70
+ sep: "/"
71
+ };
72
+ return {
73
+ order,
74
+ sep
75
+ };
71
76
  }
77
+ /**
78
+ * The year, month, and day that make up the date string in the input field, and the
79
+ * range (inclusive) that each item is included in, arranged in the order of the items.
80
+ *
81
+ * The order of the elements must be ascending in the range.
82
+ */
72
83
  function getDateItems(inputLocale) {
73
- const { order, sep } = getDateOrderAndSeparator(inputLocale);
74
- const lengths = { year: 4, month: 2, day: 2 };
75
- const items = order.map((key, i) => {
76
- const type = key;
77
- const len = lengths[type];
78
- const start = order.slice(0, i).reduce((sum, k) => sum + lengths[k], 0) + i * sep.length;
79
- const end = start + len;
80
- return { type, range: [start, end] };
81
- });
82
- return items;
84
+ const { order, sep } = getDateOrderAndSeparator(inputLocale);
85
+ const lengths = {
86
+ year: 4,
87
+ month: 2,
88
+ day: 2
89
+ };
90
+ return order.map((key, i) => {
91
+ const type = key;
92
+ const len = lengths[type];
93
+ const start = order.slice(0, i).reduce((sum, k) => sum + lengths[k], 0) + i * sep.length;
94
+ return {
95
+ type,
96
+ range: [start, start + len]
97
+ };
98
+ });
83
99
  }
84
- const PLACEHOLDER_YEAR = "YYYY";
85
- const PLACEHOLDER_MONTH = "MM";
86
- const PLACEHOLDER_DAY = "DD";
87
- const cvaField = cva(
88
- [
89
- "flex",
90
- "items-center",
91
- "size-full",
92
- "min-h-(--dds-input-height)",
93
- "bg-ddt-color-common-background-default",
94
- "pl-[calc(var(--dds-padding-30)+0.25rem)]",
95
- "pr-[calc((var(--dds-gap-10))+var(--dds-icon-button)+0.5rem)]",
96
- "rounded-sm",
97
- "truncate",
98
- "outline-solid",
99
- "outline-(--color-border)",
100
- "outline-0",
101
- "-outline-offset-2",
102
- "placeholder:text-ddt-color-common-text-secondary",
103
- // Define `--color-border` as a CSS variable that references `--color-state-focus` and `--color-base` in that order.
104
- // `--color-base` indicates the color of the border when the element is normal, hovered, or disabled.
105
- "[--color-border:var(--color-state-focus,var(--color-base))]",
106
- "border",
107
- "border-(--color-border)",
108
- // Update `--color-base` depending on the state.
109
- // The default `--color-base` and `--color-state-focus` values are defined in `variants.error` because they differ depending on whether or not the input has an error state.
110
- "enabled:text-ddt-color-common-text-primary",
111
- "enabled:hover:bg-ddt-color-common-surface-hover",
112
- "enabled:active:bg-ddt-color-common-surface-press",
113
- "focus-visible:outline-2",
114
- "disabled:[--color-base:var(--dds-color-common-disabled)]",
115
- "disabled:text-ddt-color-common-disabled",
116
- "disabled:bg-ddt-color-common-background-default",
117
- "disabled:placeholder:text-ddt-color-common-disabled"
118
- ],
119
- {
120
- variants: {
121
- error: {
122
- false: [
123
- "enabled:[--color-base:var(--dds-color-common-neutral-default)]",
124
- "focus-visible:[--color-state-focus:var(--dds-color-common-border-focus)]"
125
- ],
126
- true: ["enabled:[--color-base:var(--dds-color-common-danger-default)]"]
127
- }
128
- }
129
- }
130
- );
100
+ var PLACEHOLDER_YEAR = "YYYY";
101
+ var PLACEHOLDER_MONTH = "MM";
102
+ var PLACEHOLDER_DAY = "DD";
103
+ var cvaField = cva([
104
+ "flex",
105
+ "items-center",
106
+ "size-full",
107
+ "min-h-(--dds-input-height)",
108
+ "bg-ddt-color-common-background-default",
109
+ "pl-[calc(var(--dds-padding-30)+0.25rem)]",
110
+ "pr-[calc((var(--dds-gap-10))+var(--dds-icon-button)+0.5rem)]",
111
+ "rounded-sm",
112
+ "truncate",
113
+ "outline-solid",
114
+ "outline-(--color-border)",
115
+ "outline-0",
116
+ "-outline-offset-2",
117
+ "placeholder:text-ddt-color-common-text-secondary",
118
+ "[--color-border:var(--color-state-focus,var(--color-base))]",
119
+ "border",
120
+ "border-(--color-border)",
121
+ "enabled:text-ddt-color-common-text-primary",
122
+ "enabled:hover:bg-ddt-color-common-surface-hover",
123
+ "enabled:active:bg-ddt-color-common-surface-press",
124
+ "focus-visible:outline-2",
125
+ "disabled:[--color-base:var(--dds-color-common-disabled)]",
126
+ "disabled:text-ddt-color-common-disabled",
127
+ "disabled:bg-ddt-color-common-background-default",
128
+ "disabled:placeholder:text-ddt-color-common-disabled"
129
+ ], { variants: { error: {
130
+ false: ["enabled:[--color-base:var(--dds-color-common-neutral-default)]", "focus-visible:[--color-state-focus:var(--dds-color-common-border-focus)]"],
131
+ true: ["enabled:[--color-base:var(--dds-color-common-danger-default)]"]
132
+ } } });
133
+ /**
134
+ * Decomposes the date string displayed on the UI and returns it as an object.
135
+ * The returned object may not necessarily be a valid date. It may contain strings such as YYYY or invalid dates such as 02/31.
136
+ */
131
137
  function parsePartsFromUIValue(value, inputLocale) {
132
- const { order, sep } = getDateOrderAndSeparator(inputLocale);
133
- const parts = value.split(sep);
134
- return Object.fromEntries(
135
- order.map((key, i) => [key, parts[i] ?? ""])
136
- );
138
+ const { order, sep } = getDateOrderAndSeparator(inputLocale);
139
+ const parts = value.split(sep);
140
+ return Object.fromEntries(order.map((key, i) => [key, parts[i] ?? ""]));
137
141
  }
142
+ /**
143
+ * Formats the date parts object into a string format for display in the UI.
144
+ * The object does not necessarily need to be a valid date. It can contain strings such as YYYY or invalid dates such as 02/31.
145
+ */
138
146
  function formatPartsForUI(parts, inputLocale) {
139
- const { order, sep } = getDateOrderAndSeparator(inputLocale);
140
- return order.map((k) => parts[k]).join(sep);
147
+ const { order, sep } = getDateOrderAndSeparator(inputLocale);
148
+ return order.map((k) => parts[k]).join(sep);
141
149
  }
142
150
  function getPlaceholderAll(inputLocale) {
143
- return formatPartsForUI(
144
- { year: PLACEHOLDER_YEAR, month: PLACEHOLDER_MONTH, day: PLACEHOLDER_DAY },
145
- inputLocale
146
- );
151
+ return formatPartsForUI({
152
+ year: PLACEHOLDER_YEAR,
153
+ month: PLACEHOLDER_MONTH,
154
+ day: PLACEHOLDER_DAY
155
+ }, inputLocale);
147
156
  }
157
+ /**
158
+ * Parses the date string on the UI and returns it as a `Date` (in UTC).
159
+ * If the date string on the UI is not a valid date (contains a string such as YYYY or an invalid date such as 02/31), returns null.
160
+ */
148
161
  function tryParseDateFromUIValue(value, inputLocale) {
149
- const { year, month, day } = parsePartsFromUIValue(value, inputLocale);
150
- if (
151
- // Prevent treating incomplete year entries (such as 0202) as valid.
152
- // This also means that dates less than 1000 years ago cannot be handled.
153
- !/^[1-9]\d\d\d$/.test(year) || !/^\d\d$/.test(month) || !/^\d\d$/.test(day)
154
- ) {
155
- return null;
156
- }
157
- const date = parseDateFromProperty(`${year}-${month}-${day}`);
158
- if (date.getUTCFullYear() !== Number(year) || date.getUTCMonth() + 1 !== Number(month) || date.getUTCDate() !== Number(day)) {
159
- return null;
160
- }
161
- return date;
162
+ const { year, month, day } = parsePartsFromUIValue(value, inputLocale);
163
+ if (!/^[1-9]\d\d\d$/.test(year) || !/^\d\d$/.test(month) || !/^\d\d$/.test(day)) return null;
164
+ const date = parseDateFromProperty(`${year}-${month}-${day}`);
165
+ if (date.getUTCFullYear() !== Number(year) || date.getUTCMonth() + 1 !== Number(month) || date.getUTCDate() !== Number(day)) return null;
166
+ return date;
162
167
  }
168
+ /**
169
+ * Formats the UTC `Date` as a date string in the UI.
170
+ */
163
171
  function formatDateForUI(date, inputLocale) {
164
- return formatPartsForUI(
165
- {
166
- year: String(date.getUTCFullYear()).padStart(4, "0"),
167
- month: String(date.getUTCMonth() + 1).padStart(2, "0"),
168
- day: String(date.getUTCDate()).padStart(2, "0")
169
- },
170
- inputLocale
171
- );
172
+ return formatPartsForUI({
173
+ year: String(date.getUTCFullYear()).padStart(4, "0"),
174
+ month: String(date.getUTCMonth() + 1).padStart(2, "0"),
175
+ day: String(date.getUTCDate()).padStart(2, "0")
176
+ }, inputLocale);
172
177
  }
178
+ /**
179
+ * Gets the type of date item (year, month, or day) that matches the selected range.
180
+ * If there are no matching items, returns null.
181
+ */
173
182
  function getDateItemInSelection(selectionStart, selectionEnd, inputLocale) {
174
- for (const { type, range } of getDateItems(inputLocale)) {
175
- if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
176
- return type;
177
- }
178
- }
179
- return null;
183
+ for (const { type, range } of getDateItems(inputLocale)) if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) return type;
184
+ return null;
180
185
  }
186
+ /**
187
+ * Calculates state updates based on numeric key input.
188
+ * If the year, month, and day should be updated, an object containing `parts` and `done` is returned.
189
+ * `parts` stores the new year, month, and day objects.
190
+ * If the input in the input field is complete and the next item should be moved to, `done` is set to true.
191
+ * In the case of the last item (currently the year), even if done is true, there is no need to move to the next item.
192
+ * If there is no need to update the state, null is returned.
193
+ */
181
194
  function handleDigitInput(parts, item, digit) {
182
- switch (item) {
183
- case "year": {
184
- if (!parts.year.startsWith("0")) {
185
- return {
186
- parts: { ...parts, year: `000${digit}` },
187
- done: false
188
- };
189
- }
190
- const newYear = `${parts.year.slice(1)}${digit}`;
191
- return {
192
- parts: { ...parts, year: newYear },
193
- done: !newYear.startsWith("0")
194
- };
195
- }
196
- case "month":
197
- if (parts.month === "01" && ["0", "1", "2"].includes(digit)) {
198
- return {
199
- parts: { ...parts, month: `1${digit}` },
200
- done: true
201
- };
202
- }
203
- if (digit !== "0") {
204
- return {
205
- parts: { ...parts, month: `0${digit}` },
206
- done: digit !== "1"
207
- };
208
- }
209
- break;
210
- case "day":
211
- if (["01", "02"].includes(parts.day) || parts.day === "03" && ["0", "1"].includes(digit)) {
212
- return {
213
- parts: {
214
- ...parts,
215
- day: `${parts.day.slice(1)}${digit}`
216
- },
217
- done: true
218
- };
219
- }
220
- if (parts.day === "03" && digit === "3" || digit === "0") {
221
- break;
222
- }
223
- return {
224
- parts: { ...parts, day: `0${digit}` },
225
- done: !["1", "2", "3"].includes(digit)
226
- };
227
- }
228
- return null;
195
+ switch (item) {
196
+ case "year": {
197
+ if (!parts.year.startsWith("0")) return {
198
+ parts: {
199
+ ...parts,
200
+ year: `000${digit}`
201
+ },
202
+ done: false
203
+ };
204
+ const newYear = `${parts.year.slice(1)}${digit}`;
205
+ return {
206
+ parts: {
207
+ ...parts,
208
+ year: newYear
209
+ },
210
+ done: !newYear.startsWith("0")
211
+ };
212
+ }
213
+ case "month":
214
+ if (parts.month === "01" && [
215
+ "0",
216
+ "1",
217
+ "2"
218
+ ].includes(digit)) return {
219
+ parts: {
220
+ ...parts,
221
+ month: `1${digit}`
222
+ },
223
+ done: true
224
+ };
225
+ if (digit !== "0") return {
226
+ parts: {
227
+ ...parts,
228
+ month: `0${digit}`
229
+ },
230
+ done: digit !== "1"
231
+ };
232
+ break;
233
+ case "day":
234
+ if (["01", "02"].includes(parts.day) || parts.day === "03" && ["0", "1"].includes(digit)) return {
235
+ parts: {
236
+ ...parts,
237
+ day: `${parts.day.slice(1)}${digit}`
238
+ },
239
+ done: true
240
+ };
241
+ if (parts.day === "03" && digit === "3" || digit === "0") break;
242
+ return {
243
+ parts: {
244
+ ...parts,
245
+ day: `0${digit}`
246
+ },
247
+ done: ![
248
+ "1",
249
+ "2",
250
+ "3"
251
+ ].includes(digit)
252
+ };
253
+ }
254
+ return null;
229
255
  }
230
- function handleOffsetInput(parts, item, offset2, viewDate, minDate, maxDate) {
231
- if (offset2 === 0) {
232
- return null;
233
- }
234
- const year = Number(parts.year);
235
- const month = Number(parts.month);
236
- const maxDay = isFinite(month) ? countDaysForYearMonth(
237
- isFinite(year) ? year : 2021,
238
- // Assume not leap year
239
- month - 1
240
- ) : 31;
241
- const { nanDefault, min, max, length } = {
242
- year: {
243
- nanDefault: viewDate == null ? void 0 : viewDate.getUTCFullYear(),
244
- min: minDate.getUTCFullYear(),
245
- max: maxDate.getUTCFullYear(),
246
- length: 4
247
- },
248
- month: {
249
- nanDefault: null,
250
- min: 1,
251
- max: 12,
252
- length: 2
253
- },
254
- day: {
255
- nanDefault: null,
256
- min: 1,
257
- max: maxDay,
258
- length: 2
259
- }
260
- }[item];
261
- const value = Number(parts[item]);
262
- let newValue;
263
- if (isFinite(value)) {
264
- const withOffset = value + offset2;
265
- newValue = min <= withOffset && withOffset <= max ? withOffset : (
266
- // Wrap around
267
- offset2 > 0 ? min : max
268
- );
269
- } else {
270
- newValue = nanDefault ?? (offset2 > 0 ? min : max);
271
- }
272
- return {
273
- ...parts,
274
- [item]: String(Math.max(Math.min(newValue, max), min)).padStart(
275
- length,
276
- "0"
277
- )
278
- };
256
+ /**
257
+ * Calculates state updates based on offset.
258
+ * If the year, month, and day should be updated, a new parts object is returned.
259
+ * If there is no need to update the state, null is returned.
260
+ */
261
+ function handleOffsetInput(parts, item, offset, viewDate, minDate, maxDate) {
262
+ if (offset === 0) return null;
263
+ const year = Number(parts.year);
264
+ const month = Number(parts.month);
265
+ const maxDay = isFinite(month) ? countDaysForYearMonth(isFinite(year) ? year : 2021, month - 1) : 31;
266
+ const { nanDefault, min, max, length } = {
267
+ year: {
268
+ nanDefault: viewDate?.getUTCFullYear(),
269
+ min: minDate.getUTCFullYear(),
270
+ max: maxDate.getUTCFullYear(),
271
+ length: 4
272
+ },
273
+ month: {
274
+ nanDefault: null,
275
+ min: 1,
276
+ max: 12,
277
+ length: 2
278
+ },
279
+ day: {
280
+ nanDefault: null,
281
+ min: 1,
282
+ max: maxDay,
283
+ length: 2
284
+ }
285
+ }[item];
286
+ const value = Number(parts[item]);
287
+ let newValue;
288
+ if (isFinite(value)) {
289
+ const withOffset = value + offset;
290
+ newValue = min <= withOffset && withOffset <= max ? withOffset : offset > 0 ? min : max;
291
+ } else newValue = nanDefault ?? (offset > 0 ? min : max);
292
+ return {
293
+ ...parts,
294
+ [item]: String(Math.max(Math.min(newValue, max), min)).padStart(length, "0")
295
+ };
279
296
  }
280
- let DaikinDatePicker = class extends DDSFormElement {
281
- constructor() {
282
- super(...arguments);
283
- this.readonly = false;
284
- this.disabled = false;
285
- this.required = false;
286
- this.error = false;
287
- this.open = false;
288
- this.defaultValue = null;
289
- this.locale = null;
290
- this.inputLocale = null;
291
- this._label = null;
292
- this._currentSelection = "month";
293
- this._preCompositionValue = "";
294
- this._inputValue = "";
295
- this._monthDigitIndex = 0;
296
- this._dayDigitIndex = 0;
297
- this._yearDigitIndex = 0;
298
- this._autoUpdateController = new FloatingUIAutoUpdateController(this);
299
- this._dateInputElement = createRef();
300
- this._calendarElement = createRef();
301
- this._calendarButtonElement = createRef();
302
- this._getLocale = () => this.inputLocale ?? null;
303
- this._getDateItems = () => getDateItems(this._getLocale());
304
- this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
305
- this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
306
- this._tryParseDateFromUIValue = (v) => tryParseDateFromUIValue(v, this._getLocale());
307
- this._formatDateForUI = (d) => formatDateForUI(d, this._getLocale());
308
- this._getPlaceholderAll = () => getPlaceholderAll(this._getLocale());
309
- this._getDateItemInSelection = (s, e) => getDateItemInSelection(s, e, this._getLocale());
310
- this._ignoreCloseByFocusTrap = false;
311
- this._handleCloseCalendar = () => {
312
- var _a;
313
- if (this._ignoreCloseByFocusTrap) return;
314
- this.open = false;
315
- (_a = this._calendarButtonElement.value) == null ? void 0 : _a.focus();
316
- };
317
- this._focusTrapController = new FocusTrapController(
318
- this,
319
- this._handleCloseCalendar
320
- );
321
- this.label = null;
322
- }
323
- static getDefaultPlaceholder(element) {
324
- return getPlaceholderAll(element._getLocale());
325
- }
326
- get _dateValue() {
327
- return tryParseDateFromProperty(this.value);
328
- }
329
- /**
330
- * Returns the string to bind to the <input> element's .value property.
331
- *
332
- * - When this.value holds a valid date, show the locale-formatted date.
333
- * - When _inputValue contains partial or invalid content (placeholders / impossible
334
- * dates like 02/31), return it so the user's in-progress entry is preserved
335
- * across Lit re-renders.
336
- * - Otherwise (e.g. this.value was cleared externally while _inputValue still
337
- * holds a now-stale complete valid date string) return "" so the CSS placeholder
338
- * text is visible instead.
339
- */
340
- get _displayValue() {
341
- if (this._dateValue) {
342
- return this._formatDateForUI(this._dateValue);
343
- }
344
- if (this._inputValue && !this._tryParseDateFromUIValue(this._inputValue)) {
345
- return this._inputValue;
346
- }
347
- return "";
348
- }
349
- get _min() {
350
- return tryParseDateFromProperty(this.min) ?? parseDateFromProperty(DEFAULT_MIN_DATE);
351
- }
352
- get _max() {
353
- return tryParseDateFromProperty(this.max) ?? parseDateFromProperty(DEFAULT_MAX_DATE);
354
- }
355
- get _viewDate() {
356
- var _a;
357
- return ((_a = this._calendarElement.value) == null ? void 0 : _a.viewDate) ?? null;
358
- }
359
- get _open() {
360
- return this.open && !this.disabled && !this.readonly;
361
- }
362
- _emitSelect() {
363
- this.dispatchEvent(
364
- new Event("select", {
365
- bubbles: true,
366
- composed: true
367
- })
368
- );
369
- }
370
- _handleFocusIn(event) {
371
- const target = event.target;
372
- this._updateInputSelection(target);
373
- }
374
- _handleFocusOut(event) {
375
- const target = event.target;
376
- if (target.value === this._getPlaceholderAll()) {
377
- target.value = "";
378
- this._inputValue = "";
379
- }
380
- }
381
- _handleChange(event) {
382
- this._updateValue(event.target);
383
- }
384
- _handleMouseUp(event) {
385
- var _a, _b;
386
- event.preventDefault();
387
- const selectionStart = ((_a = this._dateInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
388
- const selectionEnd = ((_b = this._dateInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
389
- const dateItemInSelection = this._getDateItemInSelection(
390
- selectionStart,
391
- selectionEnd
392
- );
393
- if (event.target.value === this._getPlaceholderAll() && !dateItemInSelection) {
394
- this._updateSelection("month");
395
- return;
396
- }
397
- if (dateItemInSelection) {
398
- this._updateSelection(dateItemInSelection);
399
- }
400
- }
401
- // Saves the input's display value when IME composition starts so that
402
- // `_handleCompositionEnd` can restore it if the browser inserted raw IME text.
403
- _handleCompositionStart(event) {
404
- this._preCompositionValue = event.target.value;
405
- }
406
- // Handle compositionend to support full-width and half-width digit input via IME.
407
- // Full-width digits are converted to half-width, then each digit is applied as if
408
- // the user had typed them one by one using the existing handleDigitInput logic.
409
- _handleCompositionEnd(event) {
410
- const target = event.target;
411
- const composedText = event.data;
412
- target.value = this._preCompositionValue || this._getPlaceholderAll();
413
- const digits = extractHalfWidthDigits(composedText);
414
- if (digits.length === 0) {
415
- this._updateInputSelection(target);
416
- this._updateValue(target);
417
- return;
418
- }
419
- this._applyDigits(target, digits);
420
- }
421
- // Applies a single digit to the given date part, incorporating fresh-entry
422
- // tracking for month and day. Extracted from _applyDigits to keep complexity low.
423
- _applyDigitToPart(parts, item, digit) {
424
- if (item === "month") {
425
- const monthDigitIndex = this._monthDigitIndex;
426
- if (monthDigitIndex === 0) {
427
- this._monthDigitIndex = 1;
428
- if (digit === "0") {
429
- return { parts: { ...parts, month: "00" }, done: false };
430
- }
431
- return {
432
- parts: { ...parts, month: `0${digit}` },
433
- done: digit !== "1"
434
- };
435
- }
436
- this._monthDigitIndex = 0;
437
- if (parts.month === "00") {
438
- if (digit === "0") return null;
439
- return { parts: { ...parts, month: `0${digit}` }, done: true };
440
- }
441
- } else if (item === "day") {
442
- const dayDigitIndex = this._dayDigitIndex;
443
- if (dayDigitIndex === 0) {
444
- this._dayDigitIndex = 1;
445
- if (digit === "0") {
446
- return { parts: { ...parts, day: "00" }, done: false };
447
- }
448
- return {
449
- parts: { ...parts, day: `0${digit}` },
450
- done: !["1", "2", "3"].includes(digit)
451
- };
452
- }
453
- this._dayDigitIndex = 0;
454
- if (parts.day === "00") {
455
- if (digit === "0") return null;
456
- return { parts: { ...parts, day: `0${digit}` }, done: true };
457
- }
458
- } else if (this._yearDigitIndex === 0) {
459
- this._yearDigitIndex = 1;
460
- return { parts: { ...parts, year: `000${digit}` }, done: false };
461
- }
462
- return handleDigitInput(parts, item, digit);
463
- }
464
- // Applies a sequence of digit characters to the input starting from the currently
465
- // selected date item, then commits the result to this.value.
466
- // Shared by _handleKeyDown (single digit) and _handleCompositionEnd (multiple digits).
467
- _applyDigits(target, digits) {
468
- const items = this._getDateItems();
469
- let parts = this._parsePartsFromUIValue(target.value);
470
- let currentItem = this._currentSelection;
471
- for (const digit of digits) {
472
- const currentIndex = items.findIndex(({ type }) => type === currentItem);
473
- if (currentIndex < 0) break;
474
- const newState = this._applyDigitToPart(parts, currentItem, digit);
475
- if (!newState) continue;
476
- parts = newState.parts;
477
- if (!newState.done) continue;
478
- const nextIndex = Math.min(currentIndex + 1, items.length - 1);
479
- currentItem = items[nextIndex].type;
480
- this._monthDigitIndex = 0;
481
- this._dayDigitIndex = 0;
482
- this._yearDigitIndex = 0;
483
- }
484
- target.value = this._formatPartsForUI(parts);
485
- this._updateSelection(currentItem);
486
- this._updateValue(target);
487
- }
488
- _handleKeyDown(event) {
489
- if (this.readonly) {
490
- return;
491
- }
492
- if (event.isComposing || event.key === "Process" || event.keyCode === 229) {
493
- return;
494
- }
495
- const target = event.target;
496
- const key = event.key;
497
- const parts = this._parsePartsFromUIValue(target.value);
498
- if (key === "Backspace" || key === "Delete") {
499
- event.preventDefault();
500
- const itemToRemove = this._currentSelection;
501
- const placeholder = {
502
- year: PLACEHOLDER_YEAR,
503
- month: PLACEHOLDER_MONTH,
504
- day: PLACEHOLDER_DAY
505
- }[itemToRemove];
506
- if (parts[itemToRemove] !== placeholder) {
507
- target.value = this._formatPartsForUI({
508
- ...parts,
509
- [itemToRemove]: placeholder
510
- });
511
- this._updateSelection(itemToRemove);
512
- }
513
- this._updateValue(target);
514
- return;
515
- }
516
- if (/^\d$/.test(key)) {
517
- event.preventDefault();
518
- this._applyDigits(target, [key]);
519
- return;
520
- }
521
- const moveOffset = {
522
- ArrowLeft: -1,
523
- ArrowRight: 1
524
- }[key];
525
- if (moveOffset) {
526
- event.preventDefault();
527
- const items = this._getDateItems();
528
- const currentIndex = items.findIndex(
529
- ({ type }) => type === this._currentSelection
530
- );
531
- const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), items.length - 1) : 0;
532
- this._updateSelection(items[newIndex].type);
533
- return;
534
- }
535
- const countOffset = {
536
- ArrowUp: 1,
537
- ArrowDown: -1
538
- }[key];
539
- if (countOffset) {
540
- event.preventDefault();
541
- const newParts = handleOffsetInput(
542
- parts,
543
- this._currentSelection,
544
- countOffset,
545
- this._viewDate,
546
- this._min,
547
- this._max
548
- );
549
- if (newParts) {
550
- target.value = this._formatPartsForUI(newParts);
551
- this._updateSelection(this._currentSelection);
552
- }
553
- this._updateValue(target);
554
- return;
555
- }
556
- if (key.length <= 1) {
557
- event.preventDefault();
558
- return;
559
- }
560
- }
561
- // Depending on the PC settings, a period may be entered when the space key is pressed repeatedly, so this is stopped.
562
- // When this happens, the selection range changes, so this is also reset to the current item.
563
- // Note: _updateInputSelection is intentionally NOT used here because it always moves focus to the
564
- // first item, which would break IME input on non-first fields (e.g. compositionend would always
565
- // edit the first date part instead of the one the user is on).
566
- _handleBeforeInput(event) {
567
- event.preventDefault();
568
- if (!event.isComposing) {
569
- this._updateSelection(this._currentSelection);
570
- }
571
- }
572
- _handleSelect(event) {
573
- event.stopPropagation();
574
- const calendar = event.target;
575
- if (!calendar.value) {
576
- return;
577
- }
578
- const target = this._dateInputElement.value;
579
- const value = parseDateFromProperty(calendar.value);
580
- const formattedForUI = this._formatDateForUI(value);
581
- this.value = formatDateForProperty(value);
582
- target.value = formattedForUI;
583
- this._inputValue = formattedForUI;
584
- this.error = false;
585
- if (event.type === "select") {
586
- this.open = false;
587
- }
588
- this._emitSelect();
589
- }
590
- _handlePointerDown() {
591
- this._ignoreCloseByFocusTrap = true;
592
- }
593
- _handlePointerUp() {
594
- this._ignoreCloseByFocusTrap = false;
595
- if (this.disabled || this.readonly) {
596
- return;
597
- }
598
- this.open = !this.open;
599
- }
600
- _handleCalendarKeyDown(event) {
601
- if (event.key === "Enter" || event.key === " ") {
602
- event.preventDefault();
603
- event.stopPropagation();
604
- if (this.disabled || this.readonly) {
605
- return;
606
- }
607
- this.open = !this.open;
608
- }
609
- }
610
- _handleToggle(event) {
611
- if (reDispatch(this, event, new ToggleEvent("toggle", event))) {
612
- this.open = event.newState === "open";
613
- const calendar = this._calendarElement.value;
614
- if (calendar) {
615
- calendar.view = "day";
616
- }
617
- }
618
- }
619
- /**
620
- * Returns true if all date parts (year/month/day) in the input are filled with
621
- * digits and no placeholder text (YYYY, MM, DD) remains.
622
- */
623
- _isInputComplete(value) {
624
- const parts = this._parsePartsFromUIValue(value);
625
- return /^\d{4}$/.test(parts.year) && /^\d{2}$/.test(parts.month) && /^\d{2}$/.test(parts.day);
626
- }
627
- _updateValue(target) {
628
- this._inputValue = target.value;
629
- if (target.value === this._getPlaceholderAll()) {
630
- this.error = false;
631
- this.value = "";
632
- return;
633
- }
634
- if (!this._isInputComplete(target.value)) {
635
- this.error = true;
636
- this.value = "";
637
- return;
638
- }
639
- const newDate = this._tryParseDateFromUIValue(target.value);
640
- if (!newDate) {
641
- this.error = true;
642
- this.value = "";
643
- return;
297
+ var DaikinDatePicker = class DaikinDatePicker extends DDSFormElement {
298
+ constructor(..._args) {
299
+ super(..._args);
300
+ this.readonly = false;
301
+ this.disabled = false;
302
+ this.required = false;
303
+ this.error = false;
304
+ this.open = false;
305
+ this.defaultValue = null;
306
+ this.locale = null;
307
+ this.inputLocale = null;
308
+ this._label = null;
309
+ this._currentSelection = "month";
310
+ this._preCompositionValue = "";
311
+ this._inputValue = "";
312
+ this._monthDigitIndex = 0;
313
+ this._dayDigitIndex = 0;
314
+ this._yearDigitIndex = 0;
315
+ this._autoUpdateController = new FloatingUIAutoUpdateController(this);
316
+ this._dateInputElement = createRef();
317
+ this._calendarElement = createRef();
318
+ this._calendarButtonElement = createRef();
319
+ this._getLocale = () => this.inputLocale ?? null;
320
+ this._getDateItems = () => getDateItems(this._getLocale());
321
+ this._parsePartsFromUIValue = (v) => parsePartsFromUIValue(v, this._getLocale());
322
+ this._formatPartsForUI = (p) => formatPartsForUI(p, this._getLocale());
323
+ this._tryParseDateFromUIValue = (v) => tryParseDateFromUIValue(v, this._getLocale());
324
+ this._formatDateForUI = (d) => formatDateForUI(d, this._getLocale());
325
+ this._getPlaceholderAll = () => getPlaceholderAll(this._getLocale());
326
+ this._getDateItemInSelection = (s, e) => getDateItemInSelection(s, e, this._getLocale());
327
+ this._ignoreCloseByFocusTrap = false;
328
+ this._handleCloseCalendar = () => {
329
+ if (this._ignoreCloseByFocusTrap) return;
330
+ this.open = false;
331
+ this._calendarButtonElement.value?.focus();
332
+ };
333
+ this._focusTrapController = new FocusTrapController(this, this._handleCloseCalendar);
334
+ this.label = null;
335
+ }
336
+ static {
337
+ this.styles = css`
338
+ ${unsafeCSS(tailwind_default)}
339
+
340
+ :host {
341
+ display: flex;
342
+ align-items: center;
343
+ height: var(--dds-input-height, 3rem);
644
344
  }
645
- const newValue = formatDateForProperty(newDate);
646
- if (isDateOutOfRange(newDate, this._min, this._max)) {
647
- this.error = true;
648
- if (this.value !== newValue) {
649
- this.value = newValue;
650
- this._emitSelect();
651
- }
652
- return;
345
+
346
+ :host([readonly]:not([disabled])) input {
347
+ --color-base: var(--dds-color-common-surface-secondary);
348
+ background-color: var(--dds-color-common-surface-secondary);
653
349
  }
654
- if (!this.error && !this.open && this.value === newValue) {
655
- return;
350
+
351
+ :host([readonly]:not([disabled])) input:hover,
352
+ :host([readonly]:not([disabled])) input:active {
353
+ --color-base: var(--dds-color-common-surface-secondary);
354
+ background-color: var(--dds-color-common-surface-secondary);
656
355
  }
657
- this.error = false;
658
- this.value = newValue;
659
- this.open = false;
660
- this._emitSelect();
661
- }
662
- _updateInputSelection(target) {
663
- var _a;
664
- const selection = window.getSelection();
665
- if (!selection) {
666
- return;
356
+
357
+ :host([readonly]:not([disabled])) input:focus-visible {
358
+ --color-base: var(--dds-color-common-border-focus);
667
359
  }
668
- if (target.value === "") {
669
- target.value = this._getPlaceholderAll();
670
- this._inputValue = this._getPlaceholderAll();
360
+
361
+ :host([readonly][error]:not([disabled])) input,
362
+ :host([readonly][error]:not([disabled])) input:hover,
363
+ :host([readonly][error]:not([disabled])) input:active {
364
+ --color-base: var(--dds-color-common-danger-default);
671
365
  }
672
- const itemInfo = this._getDateItems()[0];
673
- (_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
674
- itemInfo.range[0],
675
- itemInfo.range[1]
676
- );
677
- this._monthDigitIndex = 0;
678
- this._dayDigitIndex = 0;
679
- this._yearDigitIndex = 0;
680
- this._currentSelection = itemInfo.type;
681
- }
682
- _updateSelection(dateItem) {
683
- var _a;
684
- const selection = window.getSelection();
685
- if (!selection) {
686
- return;
366
+
367
+ daikin-calendar[popover] {
368
+ display: none;
687
369
  }
688
- const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
689
- if (itemInfo) {
690
- if (dateItem !== this._currentSelection) {
691
- if (dateItem === "month") this._monthDigitIndex = 0;
692
- if (dateItem === "day") this._dayDigitIndex = 0;
693
- if (dateItem === "year") this._yearDigitIndex = 0;
694
- }
695
- (_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
696
- itemInfo.range[0],
697
- itemInfo.range[1]
698
- );
699
- this._currentSelection = itemInfo.type;
370
+
371
+ daikin-calendar[popover]:popover-open {
372
+ display: flex;
700
373
  }
701
- }
702
- /**
703
- * Focuses on the inner date input.
704
- * @param options focus options
705
- */
706
- focus(options) {
707
- var _a;
708
- (_a = this._dateInputElement.value) == null ? void 0 : _a.focus(options);
709
- }
710
- render() {
711
- const min = this._min;
712
- const max = this._max;
713
- return html`<div
374
+ `;
375
+ }
376
+ static getDefaultPlaceholder(element) {
377
+ return getPlaceholderAll(element._getLocale());
378
+ }
379
+ get _dateValue() {
380
+ return tryParseDateFromProperty(this.value);
381
+ }
382
+ /**
383
+ * Returns the string to bind to the <input> element's .value property.
384
+ *
385
+ * - When this.value holds a valid date, show the locale-formatted date.
386
+ * - When _inputValue contains partial or invalid content (placeholders / impossible
387
+ * dates like 02/31), return it so the user's in-progress entry is preserved
388
+ * across Lit re-renders.
389
+ * - Otherwise (e.g. this.value was cleared externally while _inputValue still
390
+ * holds a now-stale complete valid date string) return "" so the CSS placeholder
391
+ * text is visible instead.
392
+ */
393
+ get _displayValue() {
394
+ if (this._dateValue) return this._formatDateForUI(this._dateValue);
395
+ if (this._inputValue && !this._tryParseDateFromUIValue(this._inputValue)) return this._inputValue;
396
+ return "";
397
+ }
398
+ get _min() {
399
+ return tryParseDateFromProperty(this.min) ?? parseDateFromProperty("1900-01-01");
400
+ }
401
+ get _max() {
402
+ return tryParseDateFromProperty(this.max) ?? parseDateFromProperty("2099-12-31");
403
+ }
404
+ get _viewDate() {
405
+ return this._calendarElement.value?.viewDate ?? null;
406
+ }
407
+ get _open() {
408
+ return this.open && !this.disabled && !this.readonly;
409
+ }
410
+ _emitSelect() {
411
+ this.dispatchEvent(new Event("select", {
412
+ bubbles: true,
413
+ composed: true
414
+ }));
415
+ }
416
+ _handleFocusIn(event) {
417
+ const target = event.target;
418
+ this._updateInputSelection(target);
419
+ }
420
+ _handleFocusOut(event) {
421
+ const target = event.target;
422
+ if (target.value === this._getPlaceholderAll()) {
423
+ target.value = "";
424
+ this._inputValue = "";
425
+ }
426
+ }
427
+ _handleChange(event) {
428
+ this._updateValue(event.target);
429
+ }
430
+ _handleMouseUp(event) {
431
+ event.preventDefault();
432
+ const selectionStart = this._dateInputElement.value?.selectionStart ?? 0;
433
+ const selectionEnd = this._dateInputElement.value?.selectionEnd ?? 0;
434
+ const dateItemInSelection = this._getDateItemInSelection(selectionStart, selectionEnd);
435
+ if (event.target.value === this._getPlaceholderAll() && !dateItemInSelection) {
436
+ this._updateSelection("month");
437
+ return;
438
+ }
439
+ if (dateItemInSelection) this._updateSelection(dateItemInSelection);
440
+ }
441
+ _handleCompositionStart(event) {
442
+ this._preCompositionValue = event.target.value;
443
+ }
444
+ _handleCompositionEnd(event) {
445
+ const target = event.target;
446
+ const composedText = event.data;
447
+ target.value = this._preCompositionValue || this._getPlaceholderAll();
448
+ const digits = extractHalfWidthDigits(composedText);
449
+ if (digits.length === 0) {
450
+ this._updateInputSelection(target);
451
+ this._updateValue(target);
452
+ return;
453
+ }
454
+ this._applyDigits(target, digits);
455
+ }
456
+ _applyDigitToPart(parts, item, digit) {
457
+ if (item === "month") {
458
+ if (this._monthDigitIndex === 0) {
459
+ this._monthDigitIndex = 1;
460
+ if (digit === "0") return {
461
+ parts: {
462
+ ...parts,
463
+ month: "00"
464
+ },
465
+ done: false
466
+ };
467
+ return {
468
+ parts: {
469
+ ...parts,
470
+ month: `0${digit}`
471
+ },
472
+ done: digit !== "1"
473
+ };
474
+ }
475
+ this._monthDigitIndex = 0;
476
+ if (parts.month === "00") {
477
+ if (digit === "0") return null;
478
+ return {
479
+ parts: {
480
+ ...parts,
481
+ month: `0${digit}`
482
+ },
483
+ done: true
484
+ };
485
+ }
486
+ } else if (item === "day") {
487
+ if (this._dayDigitIndex === 0) {
488
+ this._dayDigitIndex = 1;
489
+ if (digit === "0") return {
490
+ parts: {
491
+ ...parts,
492
+ day: "00"
493
+ },
494
+ done: false
495
+ };
496
+ return {
497
+ parts: {
498
+ ...parts,
499
+ day: `0${digit}`
500
+ },
501
+ done: ![
502
+ "1",
503
+ "2",
504
+ "3"
505
+ ].includes(digit)
506
+ };
507
+ }
508
+ this._dayDigitIndex = 0;
509
+ if (parts.day === "00") {
510
+ if (digit === "0") return null;
511
+ return {
512
+ parts: {
513
+ ...parts,
514
+ day: `0${digit}`
515
+ },
516
+ done: true
517
+ };
518
+ }
519
+ } else if (this._yearDigitIndex === 0) {
520
+ this._yearDigitIndex = 1;
521
+ return {
522
+ parts: {
523
+ ...parts,
524
+ year: `000${digit}`
525
+ },
526
+ done: false
527
+ };
528
+ }
529
+ return handleDigitInput(parts, item, digit);
530
+ }
531
+ _applyDigits(target, digits) {
532
+ const items = this._getDateItems();
533
+ let parts = this._parsePartsFromUIValue(target.value);
534
+ let currentItem = this._currentSelection;
535
+ for (const digit of digits) {
536
+ const currentIndex = items.findIndex(({ type }) => type === currentItem);
537
+ if (currentIndex < 0) break;
538
+ const newState = this._applyDigitToPart(parts, currentItem, digit);
539
+ if (!newState) continue;
540
+ parts = newState.parts;
541
+ if (!newState.done) continue;
542
+ currentItem = items[Math.min(currentIndex + 1, items.length - 1)].type;
543
+ this._monthDigitIndex = 0;
544
+ this._dayDigitIndex = 0;
545
+ this._yearDigitIndex = 0;
546
+ }
547
+ target.value = this._formatPartsForUI(parts);
548
+ this._updateSelection(currentItem);
549
+ this._updateValue(target);
550
+ }
551
+ _handleKeyDown(event) {
552
+ if (this.readonly) return;
553
+ if (event.isComposing || event.key === "Process" || event.keyCode === 229) return;
554
+ const target = event.target;
555
+ const key = event.key;
556
+ const parts = this._parsePartsFromUIValue(target.value);
557
+ if (key === "Backspace" || key === "Delete") {
558
+ event.preventDefault();
559
+ const itemToRemove = this._currentSelection;
560
+ const placeholder = {
561
+ year: PLACEHOLDER_YEAR,
562
+ month: PLACEHOLDER_MONTH,
563
+ day: PLACEHOLDER_DAY
564
+ }[itemToRemove];
565
+ if (parts[itemToRemove] !== placeholder) {
566
+ target.value = this._formatPartsForUI({
567
+ ...parts,
568
+ [itemToRemove]: placeholder
569
+ });
570
+ this._updateSelection(itemToRemove);
571
+ }
572
+ this._updateValue(target);
573
+ return;
574
+ }
575
+ if (/^\d$/.test(key)) {
576
+ event.preventDefault();
577
+ this._applyDigits(target, [key]);
578
+ return;
579
+ }
580
+ const moveOffset = {
581
+ ArrowLeft: -1,
582
+ ArrowRight: 1
583
+ }[key];
584
+ if (moveOffset) {
585
+ event.preventDefault();
586
+ const items = this._getDateItems();
587
+ const currentIndex = items.findIndex(({ type }) => type === this._currentSelection);
588
+ const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), items.length - 1) : 0;
589
+ this._updateSelection(items[newIndex].type);
590
+ return;
591
+ }
592
+ const countOffset = {
593
+ ArrowUp: 1,
594
+ ArrowDown: -1
595
+ }[key];
596
+ if (countOffset) {
597
+ event.preventDefault();
598
+ const newParts = handleOffsetInput(parts, this._currentSelection, countOffset, this._viewDate, this._min, this._max);
599
+ if (newParts) {
600
+ target.value = this._formatPartsForUI(newParts);
601
+ this._updateSelection(this._currentSelection);
602
+ }
603
+ this._updateValue(target);
604
+ return;
605
+ }
606
+ if (key.length <= 1) {
607
+ event.preventDefault();
608
+ return;
609
+ }
610
+ }
611
+ _handleBeforeInput(event) {
612
+ event.preventDefault();
613
+ if (!event.isComposing) this._updateSelection(this._currentSelection);
614
+ }
615
+ _handleSelect(event) {
616
+ event.stopPropagation();
617
+ const calendar = event.target;
618
+ if (!calendar.value) return;
619
+ const target = this._dateInputElement.value;
620
+ const value = parseDateFromProperty(calendar.value);
621
+ const formattedForUI = this._formatDateForUI(value);
622
+ this.value = formatDateForProperty(value);
623
+ target.value = formattedForUI;
624
+ this._inputValue = formattedForUI;
625
+ this.error = false;
626
+ if (event.type === "select") this.open = false;
627
+ this._emitSelect();
628
+ }
629
+ _handlePointerDown() {
630
+ this._ignoreCloseByFocusTrap = true;
631
+ }
632
+ _handlePointerUp() {
633
+ this._ignoreCloseByFocusTrap = false;
634
+ if (this.disabled || this.readonly) return;
635
+ this.open = !this.open;
636
+ }
637
+ _handleCalendarKeyDown(event) {
638
+ if (event.key === "Enter" || event.key === " ") {
639
+ event.preventDefault();
640
+ event.stopPropagation();
641
+ if (this.disabled || this.readonly) return;
642
+ this.open = !this.open;
643
+ }
644
+ }
645
+ _handleToggle(event) {
646
+ if (reDispatch(this, event, new ToggleEvent("toggle", event))) {
647
+ this.open = event.newState === "open";
648
+ const calendar = this._calendarElement.value;
649
+ if (calendar) calendar.view = "day";
650
+ }
651
+ }
652
+ /**
653
+ * Returns true if all date parts (year/month/day) in the input are filled with
654
+ * digits and no placeholder text (YYYY, MM, DD) remains.
655
+ */
656
+ _isInputComplete(value) {
657
+ const parts = this._parsePartsFromUIValue(value);
658
+ return /^\d{4}$/.test(parts.year) && /^\d{2}$/.test(parts.month) && /^\d{2}$/.test(parts.day);
659
+ }
660
+ _updateValue(target) {
661
+ this._inputValue = target.value;
662
+ if (target.value === this._getPlaceholderAll()) {
663
+ this.error = false;
664
+ this.value = "";
665
+ return;
666
+ }
667
+ if (!this._isInputComplete(target.value)) {
668
+ this.error = true;
669
+ this.value = "";
670
+ return;
671
+ }
672
+ const newDate = this._tryParseDateFromUIValue(target.value);
673
+ if (!newDate) {
674
+ this.error = true;
675
+ this.value = "";
676
+ return;
677
+ }
678
+ const newValue = formatDateForProperty(newDate);
679
+ if (isDateOutOfRange(newDate, this._min, this._max)) {
680
+ this.error = true;
681
+ if (this.value !== newValue) {
682
+ this.value = newValue;
683
+ this._emitSelect();
684
+ }
685
+ return;
686
+ }
687
+ if (!this.error && !this.open && this.value === newValue) return;
688
+ this.error = false;
689
+ this.value = newValue;
690
+ this.open = false;
691
+ this._emitSelect();
692
+ }
693
+ _updateInputSelection(target) {
694
+ if (!window.getSelection()) return;
695
+ if (target.value === "") {
696
+ target.value = this._getPlaceholderAll();
697
+ this._inputValue = this._getPlaceholderAll();
698
+ }
699
+ const itemInfo = this._getDateItems()[0];
700
+ this._dateInputElement.value?.setSelectionRange(itemInfo.range[0], itemInfo.range[1]);
701
+ this._monthDigitIndex = 0;
702
+ this._dayDigitIndex = 0;
703
+ this._yearDigitIndex = 0;
704
+ this._currentSelection = itemInfo.type;
705
+ }
706
+ _updateSelection(dateItem) {
707
+ if (!window.getSelection()) return;
708
+ const itemInfo = this._getDateItems().find(({ type }) => type === dateItem);
709
+ if (itemInfo) {
710
+ if (dateItem !== this._currentSelection) {
711
+ if (dateItem === "month") this._monthDigitIndex = 0;
712
+ if (dateItem === "day") this._dayDigitIndex = 0;
713
+ if (dateItem === "year") this._yearDigitIndex = 0;
714
+ }
715
+ this._dateInputElement.value?.setSelectionRange(itemInfo.range[0], itemInfo.range[1]);
716
+ this._currentSelection = itemInfo.type;
717
+ }
718
+ }
719
+ /**
720
+ * Focuses on the inner date input.
721
+ * @param options focus options
722
+ */
723
+ focus(options) {
724
+ this._dateInputElement.value?.focus(options);
725
+ }
726
+ render() {
727
+ const min = this._min;
728
+ const max = this._max;
729
+ return html`<div
714
730
  class="size-full relative"
715
731
  ${this._autoUpdateController.refReference()}
716
732
  >
@@ -769,162 +785,104 @@ let DaikinDatePicker = class extends DDSFormElement {
769
785
  ${this._autoUpdateController.refFloating()}
770
786
  >
771
787
  </daikin-calendar>
772
- ${// Activate auto update only when the tooltip is open.
773
- // TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
774
- guard(
775
- [this.open],
776
- () => this._autoUpdateController.directive(
777
- {
778
- placement: "bottom-start",
779
- middleware: [
780
- offset({ mainAxis: 0 }),
781
- flip(),
782
- shift(),
783
- size({
784
- apply({ availableHeight, elements }) {
785
- Object.assign(elements.floating.style, {
786
- maxHeight: `${availableHeight}px`
787
- });
788
- }
789
- })
790
- ]
791
- },
792
- this.open
793
- )
794
- )}
795
- ${guard(
796
- [this.open],
797
- () => this._focusTrapController.directive(this.open)
798
- )}`;
799
- }
800
- willUpdate(changedProperties) {
801
- if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) {
802
- this.open = this._open;
803
- }
804
- {
805
- for (const prop of ["value", "min", "max", "defaultValue"]) {
806
- if (changedProperties.has(prop)) {
807
- if (this[prop] && !tryParseDateFromProperty(this[prop])) {
808
- console.warn(
809
- `daikin-date-picker: Invalid date "${this[prop]}" specified for ${prop}`
810
- );
811
- }
812
- }
813
- }
814
- }
815
- if (changedProperties.has("value")) {
816
- if (tryParseDateFromProperty(this.value)) {
817
- const newDate = parseDateFromProperty(this.value);
818
- this.error = isDateOutOfRange(newDate, this._min, this._max);
819
- }
820
- }
821
- }
822
- updated(changedProperties) {
823
- var _a;
824
- if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) {
825
- (_a = this._autoUpdateController.floatingElement) == null ? void 0 : _a.togglePopover(this._open);
826
- }
827
- if (changedProperties.has("value")) {
828
- this.setFormValue(this.value);
829
- }
830
- }
831
- /**
832
- * This method is used by `daikin-input-group` to reflect it's attributes to this component.
833
- * @private
834
- */
835
- reflectInputGroup(inputGroup) {
836
- const isError = !inputGroup.disabled && !!inputGroup.error;
837
- this.disabled = !!inputGroup.disabled;
838
- this.readonly = !!inputGroup.readonly;
839
- this.required = !!inputGroup.required;
840
- this.error = isError;
841
- this._label = inputGroup.label;
842
- }
843
- };
844
- DaikinDatePicker.styles = css`
845
- ${unsafeCSS(tailwindStyles)}
846
-
847
- :host {
848
- display: flex;
849
- align-items: center;
850
- height: var(--dds-input-height, 3rem);
851
- }
852
-
853
- :host([readonly]:not([disabled])) input {
854
- --color-base: var(--dds-color-common-surface-secondary);
855
- background-color: var(--dds-color-common-surface-secondary);
856
- }
857
-
858
- :host([readonly]:not([disabled])) input:hover,
859
- :host([readonly]:not([disabled])) input:active {
860
- --color-base: var(--dds-color-common-surface-secondary);
861
- background-color: var(--dds-color-common-surface-secondary);
862
- }
863
-
864
- :host([readonly]:not([disabled])) input:focus-visible {
865
- --color-base: var(--dds-color-common-border-focus);
866
- }
867
-
868
- :host([readonly][error]:not([disabled])) input,
869
- :host([readonly][error]:not([disabled])) input:hover,
870
- :host([readonly][error]:not([disabled])) input:active {
871
- --color-base: var(--dds-color-common-danger-default);
872
- }
873
-
874
- daikin-calendar[popover] {
875
- display: none;
876
- }
877
-
878
- daikin-calendar[popover]:popover-open {
879
- display: flex;
880
- }
881
- `;
882
- __decorateClass([
883
- property({
884
- type: String,
885
- reflect: true,
886
- fallbackValue: DaikinDatePicker.getDefaultPlaceholder
887
- })
888
- ], DaikinDatePicker.prototype, "placeholder", 2);
889
- __decorateClass([
890
- property({ type: String, reflect: true, fallbackValue: "1900-01-01" })
891
- ], DaikinDatePicker.prototype, "min", 2);
892
- __decorateClass([
893
- property({ type: String, reflect: true, fallbackValue: "2099-12-31" })
894
- ], DaikinDatePicker.prototype, "max", 2);
895
- __decorateClass([
896
- property({ type: Boolean, reflect: true })
897
- ], DaikinDatePicker.prototype, "readonly", 2);
898
- __decorateClass([
899
- property({ type: Boolean, reflect: true })
900
- ], DaikinDatePicker.prototype, "disabled", 2);
901
- __decorateClass([
902
- property({ type: Boolean, reflect: true })
903
- ], DaikinDatePicker.prototype, "required", 2);
904
- __decorateClass([
905
- property({ type: Boolean, reflect: true })
906
- ], DaikinDatePicker.prototype, "error", 2);
907
- __decorateClass([
908
- property({ type: Boolean, reflect: true })
909
- ], DaikinDatePicker.prototype, "open", 2);
910
- __decorateClass([
911
- property({ type: String, reflect: true, attribute: "default-value" })
912
- ], DaikinDatePicker.prototype, "defaultValue", 2);
913
- __decorateClass([
914
- property({ type: String, reflect: true })
915
- ], DaikinDatePicker.prototype, "locale", 2);
916
- __decorateClass([
917
- property({ type: String, reflect: true, attribute: "input-locale" })
918
- ], DaikinDatePicker.prototype, "inputLocale", 2);
919
- __decorateClass([
920
- state()
921
- ], DaikinDatePicker.prototype, "_label", 2);
922
- __decorateClass([
923
- state()
924
- ], DaikinDatePicker.prototype, "_currentSelection", 2);
925
- DaikinDatePicker = __decorateClass([
926
- ddsElement("daikin-date-picker")
927
- ], DaikinDatePicker);
928
- export {
929
- DaikinDatePicker
788
+ ${guard([this.open], () => this._autoUpdateController.directive({
789
+ placement: "bottom-start",
790
+ middleware: [
791
+ offset({ mainAxis: 0 }),
792
+ flip(),
793
+ shift(),
794
+ size({ apply({ availableHeight, elements }) {
795
+ Object.assign(elements.floating.style, { maxHeight: `${availableHeight}px` });
796
+ } })
797
+ ]
798
+ }, this.open))}
799
+ ${guard([this.open], () => this._focusTrapController.directive(this.open))}`;
800
+ }
801
+ willUpdate(changedProperties) {
802
+ if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) this.open = this._open;
803
+ for (const prop of [
804
+ "value",
805
+ "min",
806
+ "max",
807
+ "defaultValue"
808
+ ]) if (changedProperties.has(prop)) {
809
+ if (this[prop] && !tryParseDateFromProperty(this[prop])) console.warn(`daikin-date-picker: Invalid date "${this[prop]}" specified for ${prop}`);
810
+ }
811
+ if (changedProperties.has("value")) {
812
+ if (tryParseDateFromProperty(this.value)) {
813
+ const newDate = parseDateFromProperty(this.value);
814
+ this.error = isDateOutOfRange(newDate, this._min, this._max);
815
+ }
816
+ }
817
+ }
818
+ updated(changedProperties) {
819
+ if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) this._autoUpdateController.floatingElement?.togglePopover(this._open);
820
+ if (changedProperties.has("value")) this.setFormValue(this.value);
821
+ }
822
+ /**
823
+ * This method is used by `daikin-input-group` to reflect it's attributes to this component.
824
+ * @private
825
+ */
826
+ reflectInputGroup(inputGroup) {
827
+ const isError = !inputGroup.disabled && !!inputGroup.error;
828
+ this.disabled = !!inputGroup.disabled;
829
+ this.readonly = !!inputGroup.readonly;
830
+ this.required = !!inputGroup.required;
831
+ this.error = isError;
832
+ this._label = inputGroup.label;
833
+ }
930
834
  };
835
+ __decorate([property$1({
836
+ type: String,
837
+ reflect: true,
838
+ fallbackValue: DaikinDatePicker.getDefaultPlaceholder
839
+ })], DaikinDatePicker.prototype, "placeholder", void 0);
840
+ __decorate([property$1({
841
+ type: String,
842
+ reflect: true,
843
+ fallbackValue: "1900-01-01"
844
+ })], DaikinDatePicker.prototype, "min", void 0);
845
+ __decorate([property$1({
846
+ type: String,
847
+ reflect: true,
848
+ fallbackValue: "2099-12-31"
849
+ })], DaikinDatePicker.prototype, "max", void 0);
850
+ __decorate([property$1({
851
+ type: Boolean,
852
+ reflect: true
853
+ })], DaikinDatePicker.prototype, "readonly", void 0);
854
+ __decorate([property$1({
855
+ type: Boolean,
856
+ reflect: true
857
+ })], DaikinDatePicker.prototype, "disabled", void 0);
858
+ __decorate([property$1({
859
+ type: Boolean,
860
+ reflect: true
861
+ })], DaikinDatePicker.prototype, "required", void 0);
862
+ __decorate([property$1({
863
+ type: Boolean,
864
+ reflect: true
865
+ })], DaikinDatePicker.prototype, "error", void 0);
866
+ __decorate([property$1({
867
+ type: Boolean,
868
+ reflect: true
869
+ })], DaikinDatePicker.prototype, "open", void 0);
870
+ __decorate([property$1({
871
+ type: String,
872
+ reflect: true,
873
+ attribute: "default-value"
874
+ })], DaikinDatePicker.prototype, "defaultValue", void 0);
875
+ __decorate([property$1({
876
+ type: String,
877
+ reflect: true
878
+ })], DaikinDatePicker.prototype, "locale", void 0);
879
+ __decorate([property$1({
880
+ type: String,
881
+ reflect: true,
882
+ attribute: "input-locale"
883
+ })], DaikinDatePicker.prototype, "inputLocale", void 0);
884
+ __decorate([state()], DaikinDatePicker.prototype, "_label", void 0);
885
+ __decorate([state()], DaikinDatePicker.prototype, "_currentSelection", void 0);
886
+ DaikinDatePicker = __decorate([ddsElement("daikin-date-picker")], DaikinDatePicker);
887
+ //#endregion
888
+ export { DaikinDatePicker };