@daikin-oss/design-system-web-components 2.0.0 → 2.0.1-next.1

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 (697) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/custom-elements.json +1173 -1174
  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 +131 -167
  35. package/dist/cjs/components/carousel/index.cjs +5 -4
  36. package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +51 -59
  37. package/dist/cjs/components/carousel-item/index.cjs +5 -4
  38. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +324 -336
  39. package/dist/cjs/components/checkbox/index.cjs +5 -4
  40. package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  41. package/dist/cjs/components/checkbox-group/index.cjs +5 -4
  42. package/dist/cjs/components/chip/daikin-chip.cjs +312 -334
  43. package/dist/cjs/components/chip/index.cjs +5 -4
  44. package/dist/cjs/components/combobox/daikin-combobox.cjs +469 -592
  45. package/dist/cjs/components/combobox/index.cjs +6 -5
  46. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +809 -842
  47. package/dist/cjs/components/date-picker/index.cjs +5 -4
  48. package/dist/cjs/components/divider/daikin-divider.cjs +32 -36
  49. package/dist/cjs/components/divider/index.cjs +5 -4
  50. package/dist/cjs/components/drawer/daikin-drawer.cjs +200 -213
  51. package/dist/cjs/components/drawer/index.cjs +5 -4
  52. package/dist/cjs/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  53. package/dist/cjs/components/drawer-footer/index.cjs +5 -4
  54. package/dist/cjs/components/drawer-header/daikin-drawer-header.cjs +62 -67
  55. package/dist/cjs/components/drawer-header/index.cjs +5 -4
  56. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +479 -575
  57. package/dist/cjs/components/dropdown/index.cjs +5 -4
  58. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  59. package/dist/cjs/components/dropdown-item/index.cjs +5 -4
  60. package/dist/cjs/components/empty-state/daikin-empty-state.cjs +28 -31
  61. package/dist/cjs/components/empty-state/index.cjs +5 -4
  62. package/dist/cjs/components/icon/daikin-icon.cjs +159 -179
  63. package/dist/cjs/components/icon/icons.json.cjs +97 -6
  64. package/dist/cjs/components/icon/index.cjs +6 -5
  65. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +255 -274
  66. package/dist/cjs/components/icon-button/index.cjs +5 -4
  67. package/dist/cjs/components/index.cjs +435 -226
  68. package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +138 -162
  69. package/dist/cjs/components/inline-notification/index.cjs +5 -4
  70. package/dist/cjs/components/input-group/daikin-input-group.cjs +191 -235
  71. package/dist/cjs/components/input-group/index.cjs +5 -4
  72. package/dist/cjs/components/link/daikin-link.cjs +122 -132
  73. package/dist/cjs/components/link/index.cjs +5 -4
  74. package/dist/cjs/components/list/daikin-list.cjs +84 -101
  75. package/dist/cjs/components/list/index.cjs +5 -4
  76. package/dist/cjs/components/list-item/daikin-list-item.cjs +179 -196
  77. package/dist/cjs/components/list-item/index.cjs +5 -4
  78. package/dist/cjs/components/loading/daikin-loading.cjs +70 -84
  79. package/dist/cjs/components/loading/index.cjs +5 -4
  80. package/dist/cjs/components/logo/daikin-logo.cjs +115 -128
  81. package/dist/cjs/components/logo/index.cjs +5 -4
  82. package/dist/cjs/components/menu/daikin-menu.cjs +258 -322
  83. package/dist/cjs/components/menu/index.cjs +5 -4
  84. package/dist/cjs/components/modal/daikin-modal.cjs +107 -130
  85. package/dist/cjs/components/modal/index.cjs +5 -4
  86. package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +26 -29
  87. package/dist/cjs/components/modal-footer/index.cjs +5 -4
  88. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +70 -75
  89. package/dist/cjs/components/modal-header/index.cjs +5 -4
  90. package/dist/cjs/components/navigation/daikin-navigation.cjs +50 -54
  91. package/dist/cjs/components/navigation/index.cjs +5 -4
  92. package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +165 -188
  93. package/dist/cjs/components/navigation-item/index.cjs +5 -4
  94. package/dist/cjs/components/pagination/daikin-pagination.cjs +191 -221
  95. package/dist/cjs/components/pagination/index.cjs +5 -4
  96. package/dist/cjs/components/pagination/pagination-utils.cjs +76 -41
  97. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +136 -169
  98. package/dist/cjs/components/progress-bar/index.cjs +5 -4
  99. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  100. package/dist/cjs/components/progress-indicator/index.cjs +5 -4
  101. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  102. package/dist/cjs/components/progress-indicator-item/index.cjs +5 -4
  103. package/dist/cjs/components/radio/daikin-radio.cjs +273 -285
  104. package/dist/cjs/components/radio/index.cjs +5 -4
  105. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +149 -171
  106. package/dist/cjs/components/radio-group/index.cjs +5 -4
  107. package/dist/cjs/components/select/daikin-select.cjs +231 -264
  108. package/dist/cjs/components/select/index.cjs +5 -4
  109. package/dist/cjs/components/slider/daikin-slider.cjs +250 -301
  110. package/dist/cjs/components/slider/index.cjs +5 -4
  111. package/dist/cjs/components/slider/slider-utils.cjs +61 -45
  112. package/dist/cjs/components/status-message/daikin-status-message.cjs +115 -113
  113. package/dist/cjs/components/status-message/index.cjs +5 -4
  114. package/dist/cjs/components/tab/daikin-tab.cjs +112 -132
  115. package/dist/cjs/components/tab/index.cjs +5 -4
  116. package/dist/cjs/components/tab-panels/daikin-tab-panels.cjs +43 -52
  117. package/dist/cjs/components/tab-panels/index.cjs +5 -4
  118. package/dist/cjs/components/table/daikin-table.cjs +265 -318
  119. package/dist/cjs/components/table/index.cjs +5 -4
  120. package/dist/cjs/components/table-cell/daikin-table-cell.cjs +55 -69
  121. package/dist/cjs/components/table-cell/index.cjs +5 -4
  122. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  123. package/dist/cjs/components/table-header-cell/index.cjs +5 -4
  124. package/dist/cjs/components/tabs/daikin-tabs.cjs +178 -219
  125. package/dist/cjs/components/tabs/index.cjs +5 -4
  126. package/dist/cjs/components/tag/daikin-tag.cjs +148 -152
  127. package/dist/cjs/components/tag/index.cjs +5 -4
  128. package/dist/cjs/components/text-area/daikin-text-area.cjs +161 -175
  129. package/dist/cjs/components/text-area/index.cjs +5 -4
  130. package/dist/cjs/components/text-field/daikin-text-field.cjs +378 -428
  131. package/dist/cjs/components/text-field/index.cjs +5 -4
  132. package/dist/cjs/components/text-field/number-utils.cjs +77 -90
  133. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  134. package/dist/cjs/components/text-masked-field/index.cjs +5 -4
  135. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +689 -752
  136. package/dist/cjs/components/time-picker/index.cjs +15 -14
  137. package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +143 -170
  138. package/dist/cjs/components/toast-notification/index.cjs +5 -4
  139. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  140. package/dist/cjs/components/toast-notification-manager/index.cjs +5 -4
  141. package/dist/cjs/components/toggle/daikin-toggle.cjs +169 -178
  142. package/dist/cjs/components/toggle/index.cjs +5 -4
  143. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +165 -202
  144. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +2 -2
  145. package/dist/cjs/components/tooltip/index.cjs +5 -4
  146. package/dist/cjs/components/tree/common.cjs +74 -70
  147. package/dist/cjs/components/tree/daikin-tree.cjs +89 -103
  148. package/dist/cjs/components/tree/index.cjs +5 -4
  149. package/dist/cjs/components/tree-item/daikin-tree-item.cjs +178 -198
  150. package/dist/cjs/components/tree-item/index.cjs +6 -5
  151. package/dist/cjs/components/tree-section/daikin-tree-section.cjs +169 -215
  152. package/dist/cjs/components/tree-section/index.cjs +5 -4
  153. package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +84 -104
  154. package/dist/cjs/components/vertical-navigation/index.cjs +5 -4
  155. package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  156. package/dist/cjs/components/vertical-navigation-item/index.cjs +5 -4
  157. package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  158. package/dist/cjs/components/vertical-navigation-menu-item/index.cjs +5 -4
  159. package/dist/cjs/controllers/block-scroll.cjs +75 -41
  160. package/dist/cjs/controllers/click-outside.cjs +62 -30
  161. package/dist/cjs/controllers/custom-readonly.cjs +52 -58
  162. package/dist/cjs/controllers/floating-ui-auto-update.cjs +76 -98
  163. package/dist/cjs/controllers/focus-trap.cjs +39 -57
  164. package/dist/cjs/controllers/helpers/controller-directive.cjs +46 -45
  165. package/dist/cjs/icon-registry.cjs +147 -161
  166. package/dist/cjs/index.cjs +374 -234
  167. package/dist/cjs/is-client.cjs +3 -4
  168. package/dist/cjs/navigation.cjs +66 -47
  169. package/dist/cjs/tailwind.css.cjs +4 -6
  170. package/dist/cjs/utils/calendar-common.cjs +156 -117
  171. package/dist/cjs/utils/extract-half-width-digits.cjs +17 -8
  172. package/dist/cjs/utils/is-similar-to-click.cjs +3 -3
  173. package/dist/cjs/utils/is-simple-key.cjs +9 -3
  174. package/dist/cjs/utils/notification-common.cjs +14 -27
  175. package/dist/cjs/utils/re-dispatch.cjs +6 -8
  176. package/dist/cjs/utils/scroller.cjs +44 -57
  177. package/dist/cjs-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs +9 -0
  178. package/dist/cjs-dev/_virtual/_rolldown/runtime.cjs +23 -0
  179. package/dist/cjs-dev/base/dds-element.cjs +101 -96
  180. package/dist/cjs-dev/base/dds-form-element.cjs +123 -144
  181. package/dist/cjs-dev/base/dds-property.cjs +46 -5
  182. package/dist/cjs-dev/base/dds-property.d.cts +1 -1
  183. package/dist/cjs-dev/base/decorators.cjs +8 -11
  184. package/dist/cjs-dev/base/define.cjs +11 -17
  185. package/dist/cjs-dev/base/index.cjs +12 -13
  186. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +78 -98
  187. package/dist/cjs-dev/components/accordion/index.cjs +5 -4
  188. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +148 -172
  189. package/dist/cjs-dev/components/accordion-item/index.cjs +5 -4
  190. package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +149 -163
  191. package/dist/cjs-dev/components/avatar/index.cjs +5 -4
  192. package/dist/cjs-dev/components/badge/daikin-badge.cjs +179 -199
  193. package/dist/cjs-dev/components/badge/index.cjs +5 -4
  194. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +80 -88
  195. package/dist/cjs-dev/components/breadcrumb/index.cjs +5 -4
  196. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +120 -127
  197. package/dist/cjs-dev/components/breadcrumb-item/index.cjs +5 -4
  198. package/dist/cjs-dev/components/button/daikin-button.cjs +269 -294
  199. package/dist/cjs-dev/components/button/index.cjs +5 -4
  200. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +429 -539
  201. package/dist/cjs-dev/components/calendar/index.cjs +5 -4
  202. package/dist/cjs-dev/components/card/daikin-card.cjs +52 -61
  203. package/dist/cjs-dev/components/card/index.cjs +5 -4
  204. package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +24 -27
  205. package/dist/cjs-dev/components/card-footer/index.cjs +5 -4
  206. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +46 -49
  207. package/dist/cjs-dev/components/card-header/index.cjs +5 -4
  208. package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +137 -177
  209. package/dist/cjs-dev/components/carousel/index.cjs +5 -4
  210. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +51 -59
  211. package/dist/cjs-dev/components/carousel-item/index.cjs +5 -4
  212. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +324 -336
  213. package/dist/cjs-dev/components/checkbox/index.cjs +5 -4
  214. package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  215. package/dist/cjs-dev/components/checkbox-group/index.cjs +5 -4
  216. package/dist/cjs-dev/components/chip/daikin-chip.cjs +312 -334
  217. package/dist/cjs-dev/components/chip/index.cjs +5 -4
  218. package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +469 -592
  219. package/dist/cjs-dev/components/combobox/index.cjs +6 -5
  220. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +817 -853
  221. package/dist/cjs-dev/components/date-picker/index.cjs +5 -4
  222. package/dist/cjs-dev/components/divider/daikin-divider.cjs +32 -36
  223. package/dist/cjs-dev/components/divider/index.cjs +5 -4
  224. package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +200 -213
  225. package/dist/cjs-dev/components/drawer/index.cjs +5 -4
  226. package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  227. package/dist/cjs-dev/components/drawer-footer/index.cjs +5 -4
  228. package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.cjs +62 -67
  229. package/dist/cjs-dev/components/drawer-header/index.cjs +5 -4
  230. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +479 -575
  231. package/dist/cjs-dev/components/dropdown/index.cjs +5 -4
  232. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  233. package/dist/cjs-dev/components/dropdown-item/index.cjs +5 -4
  234. package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +28 -31
  235. package/dist/cjs-dev/components/empty-state/index.cjs +5 -4
  236. package/dist/cjs-dev/components/icon/daikin-icon.cjs +167 -208
  237. package/dist/cjs-dev/components/icon/icons.json.cjs +97 -6
  238. package/dist/cjs-dev/components/icon/index.cjs +6 -5
  239. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +255 -274
  240. package/dist/cjs-dev/components/icon-button/index.cjs +5 -4
  241. package/dist/cjs-dev/components/index.cjs +435 -226
  242. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +138 -162
  243. package/dist/cjs-dev/components/inline-notification/index.cjs +5 -4
  244. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +191 -235
  245. package/dist/cjs-dev/components/input-group/index.cjs +5 -4
  246. package/dist/cjs-dev/components/link/daikin-link.cjs +122 -132
  247. package/dist/cjs-dev/components/link/index.cjs +5 -4
  248. package/dist/cjs-dev/components/list/daikin-list.cjs +84 -101
  249. package/dist/cjs-dev/components/list/index.cjs +5 -4
  250. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +179 -196
  251. package/dist/cjs-dev/components/list-item/index.cjs +5 -4
  252. package/dist/cjs-dev/components/loading/daikin-loading.cjs +70 -84
  253. package/dist/cjs-dev/components/loading/index.cjs +5 -4
  254. package/dist/cjs-dev/components/logo/daikin-logo.cjs +115 -128
  255. package/dist/cjs-dev/components/logo/index.cjs +5 -4
  256. package/dist/cjs-dev/components/menu/daikin-menu.cjs +258 -322
  257. package/dist/cjs-dev/components/menu/index.cjs +5 -4
  258. package/dist/cjs-dev/components/modal/daikin-modal.cjs +107 -130
  259. package/dist/cjs-dev/components/modal/index.cjs +5 -4
  260. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +26 -29
  261. package/dist/cjs-dev/components/modal-footer/index.cjs +5 -4
  262. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +70 -75
  263. package/dist/cjs-dev/components/modal-header/index.cjs +5 -4
  264. package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +50 -54
  265. package/dist/cjs-dev/components/navigation/index.cjs +5 -4
  266. package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +165 -188
  267. package/dist/cjs-dev/components/navigation-item/index.cjs +5 -4
  268. package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +191 -221
  269. package/dist/cjs-dev/components/pagination/index.cjs +5 -4
  270. package/dist/cjs-dev/components/pagination/pagination-utils.cjs +76 -41
  271. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +145 -184
  272. package/dist/cjs-dev/components/progress-bar/index.cjs +5 -4
  273. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  274. package/dist/cjs-dev/components/progress-indicator/index.cjs +5 -4
  275. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  276. package/dist/cjs-dev/components/progress-indicator-item/index.cjs +5 -4
  277. package/dist/cjs-dev/components/radio/daikin-radio.cjs +273 -285
  278. package/dist/cjs-dev/components/radio/index.cjs +5 -4
  279. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +149 -171
  280. package/dist/cjs-dev/components/radio-group/index.cjs +5 -4
  281. package/dist/cjs-dev/components/select/daikin-select.cjs +231 -264
  282. package/dist/cjs-dev/components/select/index.cjs +5 -4
  283. package/dist/cjs-dev/components/slider/daikin-slider.cjs +250 -301
  284. package/dist/cjs-dev/components/slider/index.cjs +5 -4
  285. package/dist/cjs-dev/components/slider/slider-utils.cjs +61 -45
  286. package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +115 -113
  287. package/dist/cjs-dev/components/status-message/index.cjs +5 -4
  288. package/dist/cjs-dev/components/tab/daikin-tab.cjs +112 -132
  289. package/dist/cjs-dev/components/tab/index.cjs +5 -4
  290. package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.cjs +44 -59
  291. package/dist/cjs-dev/components/tab-panels/index.cjs +5 -4
  292. package/dist/cjs-dev/components/table/daikin-table.cjs +271 -330
  293. package/dist/cjs-dev/components/table/index.cjs +5 -4
  294. package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +55 -69
  295. package/dist/cjs-dev/components/table-cell/index.cjs +5 -4
  296. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  297. package/dist/cjs-dev/components/table-header-cell/index.cjs +5 -4
  298. package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +184 -229
  299. package/dist/cjs-dev/components/tabs/index.cjs +5 -4
  300. package/dist/cjs-dev/components/tag/daikin-tag.cjs +148 -152
  301. package/dist/cjs-dev/components/tag/index.cjs +5 -4
  302. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +161 -175
  303. package/dist/cjs-dev/components/text-area/index.cjs +5 -4
  304. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +378 -428
  305. package/dist/cjs-dev/components/text-field/index.cjs +5 -4
  306. package/dist/cjs-dev/components/text-field/number-utils.cjs +78 -93
  307. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  308. package/dist/cjs-dev/components/text-masked-field/index.cjs +5 -4
  309. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +697 -764
  310. package/dist/cjs-dev/components/time-picker/index.cjs +15 -14
  311. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +143 -170
  312. package/dist/cjs-dev/components/toast-notification/index.cjs +5 -4
  313. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  314. package/dist/cjs-dev/components/toast-notification-manager/index.cjs +5 -4
  315. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +169 -178
  316. package/dist/cjs-dev/components/toggle/index.cjs +5 -4
  317. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +165 -202
  318. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +2 -2
  319. package/dist/cjs-dev/components/tooltip/index.cjs +5 -4
  320. package/dist/cjs-dev/components/tree/common.cjs +74 -70
  321. package/dist/cjs-dev/components/tree/daikin-tree.cjs +89 -103
  322. package/dist/cjs-dev/components/tree/index.cjs +5 -4
  323. package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +178 -198
  324. package/dist/cjs-dev/components/tree-item/index.cjs +6 -5
  325. package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +169 -215
  326. package/dist/cjs-dev/components/tree-section/index.cjs +5 -4
  327. package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +88 -116
  328. package/dist/cjs-dev/components/vertical-navigation/index.cjs +5 -4
  329. package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  330. package/dist/cjs-dev/components/vertical-navigation-item/index.cjs +5 -4
  331. package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  332. package/dist/cjs-dev/components/vertical-navigation-menu-item/index.cjs +5 -4
  333. package/dist/cjs-dev/controllers/block-scroll.cjs +75 -41
  334. package/dist/cjs-dev/controllers/click-outside.cjs +62 -30
  335. package/dist/cjs-dev/controllers/custom-readonly.cjs +52 -58
  336. package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +78 -105
  337. package/dist/cjs-dev/controllers/focus-trap.cjs +39 -57
  338. package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +46 -45
  339. package/dist/cjs-dev/icon-registry.cjs +147 -161
  340. package/dist/cjs-dev/index.cjs +374 -234
  341. package/dist/cjs-dev/is-client.cjs +3 -4
  342. package/dist/cjs-dev/navigation.cjs +66 -47
  343. package/dist/cjs-dev/tailwind.css.cjs +4 -6
  344. package/dist/cjs-dev/utils/calendar-common.cjs +156 -117
  345. package/dist/cjs-dev/utils/extract-half-width-digits.cjs +17 -8
  346. package/dist/cjs-dev/utils/is-similar-to-click.cjs +3 -3
  347. package/dist/cjs-dev/utils/is-simple-key.cjs +9 -3
  348. package/dist/cjs-dev/utils/notification-common.cjs +17 -30
  349. package/dist/cjs-dev/utils/re-dispatch.cjs +6 -8
  350. package/dist/cjs-dev/utils/scroller.cjs +44 -57
  351. package/dist/es/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  352. package/dist/es/base/dds-element.js +100 -86
  353. package/dist/es/base/dds-form-element.js +122 -144
  354. package/dist/es/base/dds-property.d.ts +1 -1
  355. package/dist/es/base/dds-property.js +48 -8
  356. package/dist/es/base/decorators.js +8 -11
  357. package/dist/es/base/define.js +12 -17
  358. package/dist/es/base/index.js +3 -11
  359. package/dist/es/components/accordion/daikin-accordion.js +69 -89
  360. package/dist/es/components/accordion/index.js +1 -3
  361. package/dist/es/components/accordion-item/daikin-accordion-item.js +138 -168
  362. package/dist/es/components/accordion-item/index.js +1 -3
  363. package/dist/es/components/avatar/daikin-avatar.js +136 -156
  364. package/dist/es/components/avatar/index.js +1 -3
  365. package/dist/es/components/badge/daikin-badge.js +173 -198
  366. package/dist/es/components/badge/index.js +1 -3
  367. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +73 -87
  368. package/dist/es/components/breadcrumb/index.js +1 -3
  369. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  370. package/dist/es/components/breadcrumb-item/index.js +1 -3
  371. package/dist/es/components/button/daikin-button.js +255 -286
  372. package/dist/es/components/button/index.js +1 -3
  373. package/dist/es/components/calendar/daikin-calendar.js +407 -520
  374. package/dist/es/components/calendar/index.js +1 -3
  375. package/dist/es/components/card/daikin-card.js +44 -58
  376. package/dist/es/components/card/index.js +1 -3
  377. package/dist/es/components/card-footer/daikin-card-footer.js +16 -25
  378. package/dist/es/components/card-footer/index.js +1 -3
  379. package/dist/es/components/card-header/daikin-card-header.js +39 -48
  380. package/dist/es/components/card-header/index.js +1 -3
  381. package/dist/es/components/carousel/daikin-carousel.js +121 -163
  382. package/dist/es/components/carousel/index.js +1 -3
  383. package/dist/es/components/carousel-item/daikin-carousel-item.js +44 -58
  384. package/dist/es/components/carousel-item/index.js +1 -3
  385. package/dist/es/components/checkbox/daikin-checkbox.js +315 -333
  386. package/dist/es/components/checkbox/index.js +1 -3
  387. package/dist/es/components/checkbox-group/daikin-checkbox-group.js +86 -106
  388. package/dist/es/components/checkbox-group/index.js +1 -3
  389. package/dist/es/components/chip/daikin-chip.js +304 -332
  390. package/dist/es/components/chip/index.js +1 -3
  391. package/dist/es/components/combobox/daikin-combobox.js +454 -584
  392. package/dist/es/components/combobox/index.js +1 -4
  393. package/dist/es/components/date-picker/daikin-date-picker.js +787 -826
  394. package/dist/es/components/date-picker/index.js +1 -3
  395. package/dist/es/components/divider/daikin-divider.js +25 -34
  396. package/dist/es/components/divider/index.js +1 -3
  397. package/dist/es/components/drawer/daikin-drawer.js +189 -208
  398. package/dist/es/components/drawer/index.js +1 -3
  399. package/dist/es/components/drawer-footer/daikin-drawer-footer.js +18 -27
  400. package/dist/es/components/drawer-footer/index.js +1 -3
  401. package/dist/es/components/drawer-header/daikin-drawer-header.js +53 -64
  402. package/dist/es/components/drawer-header/index.js +1 -3
  403. package/dist/es/components/dropdown/daikin-dropdown.js +468 -570
  404. package/dist/es/components/dropdown/index.js +1 -3
  405. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +124 -150
  406. package/dist/es/components/dropdown-item/index.js +1 -3
  407. package/dist/es/components/empty-state/daikin-empty-state.js +21 -30
  408. package/dist/es/components/empty-state/index.js +1 -3
  409. package/dist/es/components/icon/daikin-icon.js +150 -177
  410. package/dist/es/components/icon/icons.json.js +97 -7
  411. package/dist/es/components/icon/index.js +1 -4
  412. package/dist/es/components/icon-button/daikin-icon-button.js +242 -267
  413. package/dist/es/components/icon-button/index.js +1 -3
  414. package/dist/es/components/index.js +85 -99
  415. package/dist/es/components/inline-notification/daikin-inline-notification.js +130 -160
  416. package/dist/es/components/inline-notification/index.js +1 -3
  417. package/dist/es/components/input-group/daikin-input-group.js +184 -234
  418. package/dist/es/components/input-group/index.js +1 -3
  419. package/dist/es/components/link/daikin-link.js +111 -127
  420. package/dist/es/components/link/index.js +1 -3
  421. package/dist/es/components/list/daikin-list.js +77 -100
  422. package/dist/es/components/list/index.js +1 -3
  423. package/dist/es/components/list-item/daikin-list-item.js +168 -192
  424. package/dist/es/components/list-item/index.js +1 -3
  425. package/dist/es/components/loading/daikin-loading.js +62 -82
  426. package/dist/es/components/loading/index.js +1 -3
  427. package/dist/es/components/logo/daikin-logo.js +106 -125
  428. package/dist/es/components/logo/index.js +1 -3
  429. package/dist/es/components/menu/daikin-menu.js +246 -316
  430. package/dist/es/components/menu/index.js +1 -3
  431. package/dist/es/components/modal/daikin-modal.js +97 -126
  432. package/dist/es/components/modal/index.js +1 -3
  433. package/dist/es/components/modal-footer/daikin-modal-footer.js +18 -27
  434. package/dist/es/components/modal-footer/index.js +1 -3
  435. package/dist/es/components/modal-header/daikin-modal-header.js +61 -72
  436. package/dist/es/components/modal-header/index.js +1 -3
  437. package/dist/es/components/navigation/daikin-navigation.js +42 -52
  438. package/dist/es/components/navigation/index.js +1 -3
  439. package/dist/es/components/navigation-item/daikin-navigation-item.js +152 -181
  440. package/dist/es/components/navigation-item/index.js +1 -3
  441. package/dist/es/components/pagination/daikin-pagination.js +183 -219
  442. package/dist/es/components/pagination/index.js +1 -3
  443. package/dist/es/components/pagination/pagination-utils.js +77 -44
  444. package/dist/es/components/progress-bar/daikin-progress-bar.js +129 -168
  445. package/dist/es/components/progress-bar/index.js +1 -3
  446. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +47 -60
  447. package/dist/es/components/progress-indicator/index.js +1 -3
  448. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  449. package/dist/es/components/progress-indicator-item/index.js +1 -3
  450. package/dist/es/components/radio/daikin-radio.js +264 -282
  451. package/dist/es/components/radio/index.js +1 -3
  452. package/dist/es/components/radio-group/daikin-radio-group.js +142 -170
  453. package/dist/es/components/radio-group/index.js +1 -3
  454. package/dist/es/components/select/daikin-select.js +222 -261
  455. package/dist/es/components/select/index.js +1 -3
  456. package/dist/es/components/slider/daikin-slider.js +241 -298
  457. package/dist/es/components/slider/index.js +1 -3
  458. package/dist/es/components/slider/slider-utils.js +62 -49
  459. package/dist/es/components/status-message/daikin-status-message.js +107 -111
  460. package/dist/es/components/status-message/index.js +1 -3
  461. package/dist/es/components/tab/daikin-tab.js +105 -130
  462. package/dist/es/components/tab/index.js +1 -3
  463. package/dist/es/components/tab-panels/daikin-tab-panels.js +35 -50
  464. package/dist/es/components/tab-panels/index.js +1 -3
  465. package/dist/es/components/table/daikin-table.js +255 -314
  466. package/dist/es/components/table/index.js +1 -3
  467. package/dist/es/components/table-cell/daikin-table-cell.js +49 -68
  468. package/dist/es/components/table-cell/index.js +1 -3
  469. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +121 -137
  470. package/dist/es/components/table-header-cell/index.js +1 -3
  471. package/dist/es/components/tabs/daikin-tabs.js +170 -217
  472. package/dist/es/components/tabs/index.js +1 -3
  473. package/dist/es/components/tag/daikin-tag.js +140 -150
  474. package/dist/es/components/tag/index.js +1 -3
  475. package/dist/es/components/text-area/daikin-text-area.js +153 -173
  476. package/dist/es/components/text-area/index.js +1 -3
  477. package/dist/es/components/text-field/daikin-text-field.js +361 -417
  478. package/dist/es/components/text-field/index.js +1 -3
  479. package/dist/es/components/text-field/number-utils.js +75 -90
  480. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +279 -303
  481. package/dist/es/components/text-masked-field/index.js +1 -3
  482. package/dist/es/components/time-picker/daikin-time-picker.js +677 -756
  483. package/dist/es/components/time-picker/index.js +1 -13
  484. package/dist/es/components/toast-notification/daikin-toast-notification.js +134 -167
  485. package/dist/es/components/toast-notification/index.js +1 -3
  486. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  487. package/dist/es/components/toast-notification-manager/index.js +1 -3
  488. package/dist/es/components/toggle/daikin-toggle.js +160 -175
  489. package/dist/es/components/toggle/index.js +1 -3
  490. package/dist/es/components/tooltip/daikin-tooltip.d.ts +2 -2
  491. package/dist/es/components/tooltip/daikin-tooltip.js +156 -199
  492. package/dist/es/components/tooltip/index.js +1 -3
  493. package/dist/es/components/tree/common.js +75 -76
  494. package/dist/es/components/tree/daikin-tree.js +81 -101
  495. package/dist/es/components/tree/index.js +1 -3
  496. package/dist/es/components/tree-item/daikin-tree-item.js +166 -193
  497. package/dist/es/components/tree-item/index.js +1 -4
  498. package/dist/es/components/tree-section/daikin-tree-section.js +157 -209
  499. package/dist/es/components/tree-section/index.js +1 -3
  500. package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +76 -102
  501. package/dist/es/components/vertical-navigation/index.js +1 -3
  502. package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  503. package/dist/es/components/vertical-navigation-item/index.js +1 -3
  504. package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  505. package/dist/es/components/vertical-navigation-menu-item/index.js +1 -3
  506. package/dist/es/controllers/block-scroll.js +74 -41
  507. package/dist/es/controllers/click-outside.js +61 -29
  508. package/dist/es/controllers/custom-readonly.js +52 -58
  509. package/dist/es/controllers/floating-ui-auto-update.js +74 -96
  510. package/dist/es/controllers/focus-trap.js +37 -55
  511. package/dist/es/controllers/helpers/controller-directive.js +46 -45
  512. package/dist/es/icon-registry.js +148 -163
  513. package/dist/es/index.js +17 -106
  514. package/dist/es/is-client.js +4 -4
  515. package/dist/es/navigation.js +67 -51
  516. package/dist/es/tailwind.css.js +4 -6
  517. package/dist/es/utils/calendar-common.js +156 -134
  518. package/dist/es/utils/extract-half-width-digits.js +18 -9
  519. package/dist/es/utils/is-similar-to-click.js +4 -4
  520. package/dist/es/utils/is-simple-key.js +10 -4
  521. package/dist/es/utils/notification-common.js +14 -28
  522. package/dist/es/utils/re-dispatch.js +7 -9
  523. package/dist/es/utils/scroller.js +45 -61
  524. package/dist/es-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  525. package/dist/es-dev/base/dds-element.js +101 -96
  526. package/dist/es-dev/base/dds-form-element.js +122 -144
  527. package/dist/es-dev/base/dds-property.d.ts +1 -1
  528. package/dist/es-dev/base/dds-property.js +48 -8
  529. package/dist/es-dev/base/decorators.js +8 -11
  530. package/dist/es-dev/base/define.js +12 -17
  531. package/dist/es-dev/base/index.js +3 -11
  532. package/dist/es-dev/components/accordion/daikin-accordion.js +70 -96
  533. package/dist/es-dev/components/accordion/index.js +1 -3
  534. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +138 -168
  535. package/dist/es-dev/components/accordion-item/index.js +1 -3
  536. package/dist/es-dev/components/avatar/daikin-avatar.js +136 -156
  537. package/dist/es-dev/components/avatar/index.js +1 -3
  538. package/dist/es-dev/components/badge/daikin-badge.js +173 -198
  539. package/dist/es-dev/components/badge/index.js +1 -3
  540. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +73 -87
  541. package/dist/es-dev/components/breadcrumb/index.js +1 -3
  542. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  543. package/dist/es-dev/components/breadcrumb-item/index.js +1 -3
  544. package/dist/es-dev/components/button/daikin-button.js +255 -286
  545. package/dist/es-dev/components/button/index.js +1 -3
  546. package/dist/es-dev/components/calendar/daikin-calendar.js +415 -531
  547. package/dist/es-dev/components/calendar/index.js +1 -3
  548. package/dist/es-dev/components/card/daikin-card.js +44 -58
  549. package/dist/es-dev/components/card/index.js +1 -3
  550. package/dist/es-dev/components/card-footer/daikin-card-footer.js +16 -25
  551. package/dist/es-dev/components/card-footer/index.js +1 -3
  552. package/dist/es-dev/components/card-header/daikin-card-header.js +39 -48
  553. package/dist/es-dev/components/card-header/index.js +1 -3
  554. package/dist/es-dev/components/carousel/daikin-carousel.js +127 -173
  555. package/dist/es-dev/components/carousel/index.js +1 -3
  556. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +44 -58
  557. package/dist/es-dev/components/carousel-item/index.js +1 -3
  558. package/dist/es-dev/components/checkbox/daikin-checkbox.js +315 -333
  559. package/dist/es-dev/components/checkbox/index.js +1 -3
  560. package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +86 -106
  561. package/dist/es-dev/components/checkbox-group/index.js +1 -3
  562. package/dist/es-dev/components/chip/daikin-chip.js +304 -332
  563. package/dist/es-dev/components/chip/index.js +1 -3
  564. package/dist/es-dev/components/combobox/daikin-combobox.js +454 -584
  565. package/dist/es-dev/components/combobox/index.js +1 -4
  566. package/dist/es-dev/components/date-picker/daikin-date-picker.js +795 -837
  567. package/dist/es-dev/components/date-picker/index.js +1 -3
  568. package/dist/es-dev/components/divider/daikin-divider.js +25 -34
  569. package/dist/es-dev/components/divider/index.js +1 -3
  570. package/dist/es-dev/components/drawer/daikin-drawer.js +189 -208
  571. package/dist/es-dev/components/drawer/index.js +1 -3
  572. package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.js +18 -27
  573. package/dist/es-dev/components/drawer-footer/index.js +1 -3
  574. package/dist/es-dev/components/drawer-header/daikin-drawer-header.js +53 -64
  575. package/dist/es-dev/components/drawer-header/index.js +1 -3
  576. package/dist/es-dev/components/dropdown/daikin-dropdown.js +468 -570
  577. package/dist/es-dev/components/dropdown/index.js +1 -3
  578. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +124 -150
  579. package/dist/es-dev/components/dropdown-item/index.js +1 -3
  580. package/dist/es-dev/components/empty-state/daikin-empty-state.js +21 -30
  581. package/dist/es-dev/components/empty-state/index.js +1 -3
  582. package/dist/es-dev/components/icon/daikin-icon.js +158 -206
  583. package/dist/es-dev/components/icon/icons.json.js +97 -7
  584. package/dist/es-dev/components/icon/index.js +1 -4
  585. package/dist/es-dev/components/icon-button/daikin-icon-button.js +242 -267
  586. package/dist/es-dev/components/icon-button/index.js +1 -3
  587. package/dist/es-dev/components/index.js +85 -99
  588. package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +130 -160
  589. package/dist/es-dev/components/inline-notification/index.js +1 -3
  590. package/dist/es-dev/components/input-group/daikin-input-group.js +184 -234
  591. package/dist/es-dev/components/input-group/index.js +1 -3
  592. package/dist/es-dev/components/link/daikin-link.js +111 -127
  593. package/dist/es-dev/components/link/index.js +1 -3
  594. package/dist/es-dev/components/list/daikin-list.js +77 -100
  595. package/dist/es-dev/components/list/index.js +1 -3
  596. package/dist/es-dev/components/list-item/daikin-list-item.js +168 -192
  597. package/dist/es-dev/components/list-item/index.js +1 -3
  598. package/dist/es-dev/components/loading/daikin-loading.js +62 -82
  599. package/dist/es-dev/components/loading/index.js +1 -3
  600. package/dist/es-dev/components/logo/daikin-logo.js +106 -125
  601. package/dist/es-dev/components/logo/index.js +1 -3
  602. package/dist/es-dev/components/menu/daikin-menu.js +246 -316
  603. package/dist/es-dev/components/menu/index.js +1 -3
  604. package/dist/es-dev/components/modal/daikin-modal.js +97 -126
  605. package/dist/es-dev/components/modal/index.js +1 -3
  606. package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +18 -27
  607. package/dist/es-dev/components/modal-footer/index.js +1 -3
  608. package/dist/es-dev/components/modal-header/daikin-modal-header.js +61 -72
  609. package/dist/es-dev/components/modal-header/index.js +1 -3
  610. package/dist/es-dev/components/navigation/daikin-navigation.js +42 -52
  611. package/dist/es-dev/components/navigation/index.js +1 -3
  612. package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +152 -181
  613. package/dist/es-dev/components/navigation-item/index.js +1 -3
  614. package/dist/es-dev/components/pagination/daikin-pagination.js +183 -219
  615. package/dist/es-dev/components/pagination/index.js +1 -3
  616. package/dist/es-dev/components/pagination/pagination-utils.js +77 -44
  617. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +138 -183
  618. package/dist/es-dev/components/progress-bar/index.js +1 -3
  619. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +47 -60
  620. package/dist/es-dev/components/progress-indicator/index.js +1 -3
  621. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  622. package/dist/es-dev/components/progress-indicator-item/index.js +1 -3
  623. package/dist/es-dev/components/radio/daikin-radio.js +264 -282
  624. package/dist/es-dev/components/radio/index.js +1 -3
  625. package/dist/es-dev/components/radio-group/daikin-radio-group.js +142 -170
  626. package/dist/es-dev/components/radio-group/index.js +1 -3
  627. package/dist/es-dev/components/select/daikin-select.js +222 -261
  628. package/dist/es-dev/components/select/index.js +1 -3
  629. package/dist/es-dev/components/slider/daikin-slider.js +241 -298
  630. package/dist/es-dev/components/slider/index.js +1 -3
  631. package/dist/es-dev/components/slider/slider-utils.js +62 -49
  632. package/dist/es-dev/components/status-message/daikin-status-message.js +107 -111
  633. package/dist/es-dev/components/status-message/index.js +1 -3
  634. package/dist/es-dev/components/tab/daikin-tab.js +105 -130
  635. package/dist/es-dev/components/tab/index.js +1 -3
  636. package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +36 -57
  637. package/dist/es-dev/components/tab-panels/index.js +1 -3
  638. package/dist/es-dev/components/table/daikin-table.js +261 -326
  639. package/dist/es-dev/components/table/index.js +1 -3
  640. package/dist/es-dev/components/table-cell/daikin-table-cell.js +49 -68
  641. package/dist/es-dev/components/table-cell/index.js +1 -3
  642. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +121 -137
  643. package/dist/es-dev/components/table-header-cell/index.js +1 -3
  644. package/dist/es-dev/components/tabs/daikin-tabs.js +176 -227
  645. package/dist/es-dev/components/tabs/index.js +1 -3
  646. package/dist/es-dev/components/tag/daikin-tag.js +140 -150
  647. package/dist/es-dev/components/tag/index.js +1 -3
  648. package/dist/es-dev/components/text-area/daikin-text-area.js +153 -173
  649. package/dist/es-dev/components/text-area/index.js +1 -3
  650. package/dist/es-dev/components/text-field/daikin-text-field.js +361 -417
  651. package/dist/es-dev/components/text-field/index.js +1 -3
  652. package/dist/es-dev/components/text-field/number-utils.js +76 -93
  653. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +279 -303
  654. package/dist/es-dev/components/text-masked-field/index.js +1 -3
  655. package/dist/es-dev/components/time-picker/daikin-time-picker.js +685 -768
  656. package/dist/es-dev/components/time-picker/index.js +1 -13
  657. package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +134 -167
  658. package/dist/es-dev/components/toast-notification/index.js +1 -3
  659. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  660. package/dist/es-dev/components/toast-notification-manager/index.js +1 -3
  661. package/dist/es-dev/components/toggle/daikin-toggle.js +160 -175
  662. package/dist/es-dev/components/toggle/index.js +1 -3
  663. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +2 -2
  664. package/dist/es-dev/components/tooltip/daikin-tooltip.js +156 -199
  665. package/dist/es-dev/components/tooltip/index.js +1 -3
  666. package/dist/es-dev/components/tree/common.js +75 -76
  667. package/dist/es-dev/components/tree/daikin-tree.js +81 -101
  668. package/dist/es-dev/components/tree/index.js +1 -3
  669. package/dist/es-dev/components/tree-item/daikin-tree-item.js +166 -193
  670. package/dist/es-dev/components/tree-item/index.js +1 -4
  671. package/dist/es-dev/components/tree-section/daikin-tree-section.js +157 -209
  672. package/dist/es-dev/components/tree-section/index.js +1 -3
  673. package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +80 -114
  674. package/dist/es-dev/components/vertical-navigation/index.js +1 -3
  675. package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  676. package/dist/es-dev/components/vertical-navigation-item/index.js +1 -3
  677. package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  678. package/dist/es-dev/components/vertical-navigation-menu-item/index.js +1 -3
  679. package/dist/es-dev/controllers/block-scroll.js +74 -41
  680. package/dist/es-dev/controllers/click-outside.js +61 -29
  681. package/dist/es-dev/controllers/custom-readonly.js +52 -58
  682. package/dist/es-dev/controllers/floating-ui-auto-update.js +76 -103
  683. package/dist/es-dev/controllers/focus-trap.js +37 -55
  684. package/dist/es-dev/controllers/helpers/controller-directive.js +46 -45
  685. package/dist/es-dev/icon-registry.js +148 -163
  686. package/dist/es-dev/index.js +17 -106
  687. package/dist/es-dev/is-client.js +4 -4
  688. package/dist/es-dev/navigation.js +67 -51
  689. package/dist/es-dev/tailwind.css.js +4 -6
  690. package/dist/es-dev/utils/calendar-common.js +156 -134
  691. package/dist/es-dev/utils/extract-half-width-digits.js +18 -9
  692. package/dist/es-dev/utils/is-similar-to-click.js +4 -4
  693. package/dist/es-dev/utils/is-simple-key.js +10 -4
  694. package/dist/es-dev/utils/notification-common.js +17 -31
  695. package/dist/es-dev/utils/re-dispatch.js +7 -9
  696. package/dist/es-dev/utils/scroller.js +45 -61
  697. package/package.json +80 -78
@@ -1,655 +1,627 @@
1
- import { unsafeCSS, css, html } from "lit";
2
- import { state } from "lit/decorators.js";
3
- import { ifDefined } from "lit/directives/if-defined.js";
4
- import { createRef, ref } from "lit/directives/ref.js";
5
- import "../../base/dds-element.js";
1
+ import { oneOf, property as property$1 } from "../../base/dds-property.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js";
6
3
  import { DDSFormElement } from "../../base/dds-form-element.js";
7
- import { property, oneOf } from "../../base/dds-property.js";
8
4
  import { ddsElement } from "../../base/decorators.js";
9
- import "../../base/define.js";
10
- import tailwindStyles from "../../tailwind.css.js";
5
+ import "../../base/index.js";
6
+ import tailwind_default from "../../tailwind.css.js";
11
7
  import { extractHalfWidthDigits } from "../../utils/extract-half-width-digits.js";
12
8
  import "../dropdown-item/daikin-dropdown-item.js";
13
9
  import "../dropdown/daikin-dropdown.js";
14
- var __defProp = Object.defineProperty;
15
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
16
- var __decorateClass = (decorators, target, key, kind) => {
17
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
18
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
19
- if (decorator = decorators[i])
20
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
21
- if (kind && result) __defProp(target, key, result);
22
- return result;
23
- };
24
- const VALUE_TIME_REGEX = /^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/;
25
- const DEFAULT_MIN_TIME = "00:00";
26
- const DEFAULT_MAX_TIME = "23:59";
10
+ import { css, html, unsafeCSS } from "lit";
11
+ import { state } from "lit/decorators.js";
12
+ import { createRef, ref } from "lit/directives/ref.js";
13
+ import { ifDefined } from "lit/directives/if-defined.js";
14
+ //#region src/components/time-picker/daikin-time-picker.ts
15
+ /**
16
+ * 24-hour time format regex validation (00:00 ~ 23:59).
17
+ */
18
+ var VALUE_TIME_REGEX = /^(?:[01][0-9]|2[0-3]):[0-5][0-9]$/;
19
+ /** Default minimum time. */
20
+ var DEFAULT_MIN_TIME = "00:00";
21
+ /** Default maximum time. */
22
+ var DEFAULT_MAX_TIME = "23:59";
27
23
  function uiToTimeValue(object) {
28
- if (object.hourCycle === "h23") {
29
- return formatTimeForUI(formatPartsForUI(object));
30
- }
31
- const [hour12, minute] = formatPartsForUI(object).split(":").map(Number);
32
- const hour = hour12 % 12 + (object.meridiem === "PM" ? 12 : 0);
33
- return `${hour.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}`;
24
+ if (object.hourCycle === "h23") return formatTimeForUI(formatPartsForUI(object));
25
+ const [hour12, minute] = formatPartsForUI(object).split(":").map(Number);
26
+ return `${(hour12 % 12 + (object.meridiem === "PM" ? 12 : 0)).toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}`;
34
27
  }
35
28
  function timeValueToUI(time, hourCycle) {
36
- const [hour24, minute] = time.split(":").map(Number);
37
- if (hourCycle === "h23") {
38
- return {
39
- hourCycle: "h23",
40
- hour: hour24.toString().padStart(2, "0"),
41
- minute: minute.toString().padStart(2, "0"),
42
- meridiem: null
43
- };
44
- }
45
- const meridiem = hour24 >= 12 ? "PM" : "AM";
46
- let hour12 = hour24 % 12;
47
- if (hour12 === 0) hour12 = 12;
48
- return {
49
- hourCycle: "h12",
50
- hour: hour12.toString().padStart(2, "0"),
51
- minute: minute.toString().padStart(2, "0"),
52
- meridiem
53
- };
29
+ const [hour24, minute] = time.split(":").map(Number);
30
+ if (hourCycle === "h23") return {
31
+ hourCycle: "h23",
32
+ hour: hour24.toString().padStart(2, "0"),
33
+ minute: minute.toString().padStart(2, "0"),
34
+ meridiem: null
35
+ };
36
+ const meridiem = hour24 >= 12 ? "PM" : "AM";
37
+ let hour12 = hour24 % 12;
38
+ if (hour12 === 0) hour12 = 12;
39
+ return {
40
+ hourCycle: "h12",
41
+ hour: hour12.toString().padStart(2, "0"),
42
+ minute: minute.toString().padStart(2, "0"),
43
+ meridiem
44
+ };
54
45
  }
46
+ /**
47
+ * Validates if a time string matches the 24-hour format.
48
+ */
55
49
  function isValidValueTime(str) {
56
- return VALUE_TIME_REGEX.test(str);
50
+ return VALUE_TIME_REGEX.test(str);
57
51
  }
52
+ /**
53
+ * Checks if a time is out of the given range.
54
+ */
58
55
  function isTimeOutOfRange(time, min, max) {
59
- const toMinutes = (s) => {
60
- const [h, m] = s.split(":").map(Number);
61
- return h * 60 + m;
62
- };
63
- const v = toMinutes(time);
64
- const vMin = toMinutes(min);
65
- const vMax = toMinutes(max);
66
- return v < vMin || v > vMax;
56
+ const toMinutes = (s) => {
57
+ const [h, m] = s.split(":").map(Number);
58
+ return h * 60 + m;
59
+ };
60
+ const v = toMinutes(time);
61
+ const vMin = toMinutes(min);
62
+ const vMax = toMinutes(max);
63
+ return v < vMin || v > vMax;
67
64
  }
68
- const TIME_ITEMS = [
69
- {
70
- type: "hour",
71
- range: [0, 2]
72
- // 0-2 exclusive, selects "hh"
73
- },
74
- {
75
- type: "minute",
76
- range: [3, 5]
77
- // 3-5 exclusive, selects "mm"
78
- }
79
- ];
80
- const PLACEHOLDER_HOUR = "hh";
81
- const PLACEHOLDER_MINUTE = "mm";
82
- const PLACEHOLDER_ALL = formatPartsForUI({
83
- hour: PLACEHOLDER_HOUR,
84
- minute: PLACEHOLDER_MINUTE
65
+ /**
66
+ * Defines the index range for each part of the time string in the input.
67
+ *
68
+ * HH:MM format:
69
+ * - Hour: positions 0-1 ([0,2))
70
+ * - Minute: positions 3-4 ([3,5))
71
+ * - Colon: position 2
72
+ */
73
+ var TIME_ITEMS = [{
74
+ type: "hour",
75
+ range: [0, 2]
76
+ }, {
77
+ type: "minute",
78
+ range: [3, 5]
79
+ }];
80
+ var PLACEHOLDER_HOUR = "hh";
81
+ var PLACEHOLDER_MINUTE = "mm";
82
+ var PLACEHOLDER_ALL = formatPartsForUI({
83
+ hour: PLACEHOLDER_HOUR,
84
+ minute: PLACEHOLDER_MINUTE
85
85
  });
86
- function formatPartsForUI({
87
- hour,
88
- minute
89
- }) {
90
- return `${hour}:${minute}`;
86
+ /**
87
+ * Formats a time object as a UI display string (HH:MM).
88
+ * The hour/minute values do not have to be valid.
89
+ */
90
+ function formatPartsForUI({ hour, minute }) {
91
+ return `${hour}:${minute}`;
91
92
  }
93
+ /**
94
+ * Parses a UI time string (HH:MM) and returns an hour/minute object.
95
+ * The result is not guaranteed to be valid.
96
+ */
92
97
  function parsePartsFromUIValue(value) {
93
- const [hour, minute] = value.split(":");
94
- return { hour: hour || "hh", minute: minute || "mm" };
98
+ const [hour, minute] = value.split(":");
99
+ return {
100
+ hour: hour || "hh",
101
+ minute: minute || "mm"
102
+ };
95
103
  }
104
+ /**
105
+ * Attempts to parse a valid time string from a UI value (HH:MM).
106
+ * Returns null if invalid.
107
+ */
96
108
  function tryParseTimeFromUIValue(value) {
97
- const { hour, minute } = parsePartsFromUIValue(value);
98
- if (!/^(0\d|1\d|2[0-3])$/.test(hour) || !/^[0-5]\d$/.test(minute)) {
99
- return null;
100
- }
101
- const formattedHour = hour !== "hh" ? hour.padStart(2, "0") : "hh";
102
- const formattedMinute = minute !== "mm" ? minute.padStart(2, "0") : "mm";
103
- const timeString = `${formattedHour}:${formattedMinute}`;
104
- return timeString;
109
+ const { hour, minute } = parsePartsFromUIValue(value);
110
+ if (!/^(0\d|1\d|2[0-3])$/.test(hour) || !/^[0-5]\d$/.test(minute)) return null;
111
+ return `${hour !== "hh" ? hour.padStart(2, "0") : "hh"}:${minute !== "mm" ? minute.padStart(2, "0") : "mm"}`;
105
112
  }
113
+ /**
114
+ * Formats a valid time string as a UI display string (HH:MM).
115
+ */
106
116
  function formatTimeForUI(timeString) {
107
- const [hour, minute] = timeString.split(":");
108
- return formatPartsForUI({
109
- hour: hour.padStart(2, "0"),
110
- minute: minute.padStart(2, "0")
111
- });
117
+ const [hour, minute] = timeString.split(":");
118
+ return formatPartsForUI({
119
+ hour: hour.padStart(2, "0"),
120
+ minute: minute.padStart(2, "0")
121
+ });
112
122
  }
123
+ /**
124
+ * Determines whether the current selection is on the hour or minute part.
125
+ * Returns null if no match.
126
+ */
113
127
  function getTimeItemInSelection(selectionStart, selectionEnd) {
114
- for (const { type, range } of TIME_ITEMS) {
115
- if (selectionStart >= range[0] && selectionStart <= range[1] && selectionEnd >= range[0] && selectionEnd <= range[1]) {
116
- return type;
117
- }
118
- }
119
- return null;
128
+ for (const { type, range } of TIME_ITEMS) if (selectionStart >= range[0] && selectionStart <= range[1] && selectionEnd >= range[0] && selectionEnd <= range[1]) return type;
129
+ return null;
120
130
  }
131
+ /**
132
+ * Calculate digit key input, returns new time parts and whether input is complete.
133
+ * @returns { parts, done } or null
134
+ */
121
135
  function calcDigitInput(parts, item, digit, hourDigitIndex, hourCycle) {
122
- if (!/^\d$/.test(digit)) {
123
- return null;
124
- }
125
- switch (item) {
126
- case "hour": {
127
- if (hourCycle === "h23") {
128
- if (hourDigitIndex === 1) {
129
- const firstDigit = parts.hour[1];
130
- if (firstDigit === "2") {
131
- if (["0", "1", "2", "3"].includes(digit)) {
132
- return {
133
- parts: { ...parts, hour: `2${digit}` },
134
- done: true
135
- };
136
- }
137
- return {
138
- parts: { ...parts, hour: `0${digit}` },
139
- done: true
140
- };
141
- }
142
- if (firstDigit === "0" || firstDigit === "1") {
143
- return {
144
- parts: { ...parts, hour: `${firstDigit}${digit}` },
145
- done: true
146
- };
147
- }
148
- }
149
- return {
150
- parts: { ...parts, hour: `0${digit}` },
151
- done: digit > "2"
152
- };
153
- }
154
- if (parts.hour === "01" && ["0", "1", "2"].includes(digit)) {
155
- return {
156
- parts: { ...parts, hour: `1${digit}` },
157
- done: true
158
- };
159
- }
160
- if (parts.hour === "00") {
161
- return {
162
- parts: { ...parts, hour: `0${digit}` },
163
- done: hourDigitIndex === 1
164
- };
165
- }
166
- return {
167
- parts: { ...parts, hour: `0${digit}` },
168
- done: digit > "1"
169
- };
170
- }
171
- case "minute": {
172
- if (["01", "02", "03", "04", "05"].includes(parts.minute)) {
173
- return {
174
- parts: { ...parts, minute: `${parts.minute[1]}${digit}` },
175
- done: true
176
- };
177
- }
178
- return {
179
- parts: { ...parts, minute: `0${digit}` },
180
- done: digit > "5"
181
- };
182
- }
183
- }
136
+ if (!/^\d$/.test(digit)) return null;
137
+ switch (item) {
138
+ case "hour":
139
+ if (hourCycle === "h23") {
140
+ if (hourDigitIndex === 1) {
141
+ const firstDigit = parts.hour[1];
142
+ if (firstDigit === "2") {
143
+ if ([
144
+ "0",
145
+ "1",
146
+ "2",
147
+ "3"
148
+ ].includes(digit)) return {
149
+ parts: {
150
+ ...parts,
151
+ hour: `2${digit}`
152
+ },
153
+ done: true
154
+ };
155
+ return {
156
+ parts: {
157
+ ...parts,
158
+ hour: `0${digit}`
159
+ },
160
+ done: true
161
+ };
162
+ }
163
+ if (firstDigit === "0" || firstDigit === "1") return {
164
+ parts: {
165
+ ...parts,
166
+ hour: `${firstDigit}${digit}`
167
+ },
168
+ done: true
169
+ };
170
+ }
171
+ return {
172
+ parts: {
173
+ ...parts,
174
+ hour: `0${digit}`
175
+ },
176
+ done: digit > "2"
177
+ };
178
+ }
179
+ if (parts.hour === "01" && [
180
+ "0",
181
+ "1",
182
+ "2"
183
+ ].includes(digit)) return {
184
+ parts: {
185
+ ...parts,
186
+ hour: `1${digit}`
187
+ },
188
+ done: true
189
+ };
190
+ if (parts.hour === "00") return {
191
+ parts: {
192
+ ...parts,
193
+ hour: `0${digit}`
194
+ },
195
+ done: hourDigitIndex === 1
196
+ };
197
+ return {
198
+ parts: {
199
+ ...parts,
200
+ hour: `0${digit}`
201
+ },
202
+ done: digit > "1"
203
+ };
204
+ case "minute":
205
+ if ([
206
+ "01",
207
+ "02",
208
+ "03",
209
+ "04",
210
+ "05"
211
+ ].includes(parts.minute)) return {
212
+ parts: {
213
+ ...parts,
214
+ minute: `${parts.minute[1]}${digit}`
215
+ },
216
+ done: true
217
+ };
218
+ return {
219
+ parts: {
220
+ ...parts,
221
+ minute: `0${digit}`
222
+ },
223
+ done: digit > "5"
224
+ };
225
+ }
184
226
  }
185
- const fieldBaseClass = [
186
- "flex",
187
- "items-center",
188
- "size-full",
189
- "w-[calc(var(--dds-space-1600)+var(--dds-space-600)+var(--dds-space-100)+var(--dds-space-050))]",
190
- "bg-ddt-color-common-background-default",
191
- "px-[calc(var(--dds-padding-30)+0.25rem)]",
192
- "rounded-sm",
193
- "truncate",
194
- "outline-solid",
195
- "outline-(--color-border)",
196
- "outline-0",
197
- "-outline-offset-2",
198
- "placeholder:text-ddt-color-common-text-secondary",
199
- "[--color-border:var(--color-state-focus,var(--color-base))]",
200
- "border",
201
- "border-(--color-border)",
202
- "enabled:text-ddt-color-common-text-primary",
203
- "enabled:hover:bg-ddt-color-common-surface-hover",
204
- "enabled:active:bg-ddt-color-common-surface-press",
205
- "focus-visible:outline-2",
206
- "disabled:[--color-border:var(--dds-color-common-disabled)]",
207
- "disabled:text-ddt-color-common-disabled",
208
- "disabled:bg-ddt-color-common-background-default",
209
- "disabled:placeholder:text-ddt-color-common-disabled"
227
+ var fieldBaseClass = [
228
+ "flex",
229
+ "items-center",
230
+ "size-full",
231
+ "w-[calc(var(--dds-space-1600)+var(--dds-space-600)+var(--dds-space-100)+var(--dds-space-050))]",
232
+ "bg-ddt-color-common-background-default",
233
+ "px-[calc(var(--dds-padding-30)+0.25rem)]",
234
+ "rounded-sm",
235
+ "truncate",
236
+ "outline-solid",
237
+ "outline-(--color-border)",
238
+ "outline-0",
239
+ "-outline-offset-2",
240
+ "placeholder:text-ddt-color-common-text-secondary",
241
+ "[--color-border:var(--color-state-focus,var(--color-base))]",
242
+ "border",
243
+ "border-(--color-border)",
244
+ "enabled:text-ddt-color-common-text-primary",
245
+ "enabled:hover:bg-ddt-color-common-surface-hover",
246
+ "enabled:active:bg-ddt-color-common-surface-press",
247
+ "focus-visible:outline-2",
248
+ "disabled:[--color-border:var(--dds-color-common-disabled)]",
249
+ "disabled:text-ddt-color-common-disabled",
250
+ "disabled:bg-ddt-color-common-background-default",
251
+ "disabled:placeholder:text-ddt-color-common-disabled"
210
252
  ].join(" ");
211
253
  function getFieldClass(error) {
212
- return [
213
- fieldBaseClass,
214
- error ? "enabled:[--color-base:var(--dds-color-common-danger-default)]" : "enabled:[--color-base:var(--dds-color-common-neutral-default)] focus-visible:[--color-state-focus:var(--dds-color-common-border-focus)]"
215
- ].join(" ");
254
+ return [fieldBaseClass, error ? "enabled:[--color-base:var(--dds-color-common-danger-default)]" : "enabled:[--color-base:var(--dds-color-common-neutral-default)] focus-visible:[--color-state-focus:var(--dds-color-common-border-focus)]"].join(" ");
216
255
  }
217
- let DaikinTimePicker = class extends DDSFormElement {
218
- constructor() {
219
- super(...arguments);
220
- this.disabled = false;
221
- this.readonly = false;
222
- this.required = false;
223
- this.error = false;
224
- this.hourCycle = "h12";
225
- this.meridiemSingleOpen = true;
226
- this._label = null;
227
- this._inputValue = "";
228
- this._currentSelection = "hour";
229
- this._meridiem = "";
230
- this._timeInputElement = createRef();
231
- this._meridiemDropdown = createRef();
232
- this._hourDigitIndex = 0;
233
- this._preCompositionValue = "";
234
- this._minuteDigitIndex = 0;
235
- }
236
- /**
237
- * Returns the value to be displayed in the input field.
238
- * - If the main value is a valid 24-hour time, returns a display string based on the selected hour cycle.
239
- * - If the current input value is not valid or meridiem is empty, returns the raw input value.
240
- * - Otherwise, returns null.
241
- */
242
- get _value() {
243
- if (isValidValueTime(this.value)) {
244
- const ui = timeValueToUI(this.value, this.hourCycle);
245
- return formatPartsForUI({ hour: ui.hour, minute: ui.minute });
246
- }
247
- const needsMeridiem = this.hourCycle === "h12";
248
- if (this._timeValue && // Show the raw input value when it is not a valid 24h time OR when the
249
- // UI hour is "00" (intermediate 12h entry state). Without the "00" check,
250
- // "00:xx" would be treated as valid 24h and the getter would return null,
251
- // causing Lit to clear the input field.
252
- (!isValidValueTime(this._timeValue) || parsePartsFromUIValue(this._timeValue).hour === "00") || needsMeridiem && this._meridiem === "") {
253
- return this._timeValue;
254
- }
255
- return null;
256
- }
257
- /**
258
- * Returns the value to display in the input field (from _inputValue state).
259
- */
260
- get _timeValue() {
261
- return this._inputValue;
262
- }
263
- /**
264
- * Syncs the AM/PM value with the current value (24-hour) if value changes externally.
265
- */
266
- _syncMeridiemWithValue() {
267
- if (this.value) {
268
- const ui = timeValueToUI(this.value, this.hourCycle);
269
- this._meridiem = ui.meridiem ? ui.meridiem : "";
270
- }
271
- }
272
- get _min() {
273
- return this.min || DEFAULT_MIN_TIME;
274
- }
275
- get _max() {
276
- return this.max || DEFAULT_MAX_TIME;
277
- }
278
- _convertZeroHourToTwelve() {
279
- const minutes = this._inputValue.split(":")[1];
280
- this._inputValue = `12:${minutes}`;
281
- if (this._timeInputElement.value) {
282
- this._timeInputElement.value.value = this._inputValue;
283
- }
284
- }
285
- _handleFocusIn(event) {
286
- const target = event.target;
287
- this._updateInputSelection(target);
288
- if (!this._inputValue) {
289
- this._inputValue = PLACEHOLDER_ALL;
290
- }
291
- }
292
- _handleFocusOut(event) {
293
- const target = event.target;
294
- if (target.value === PLACEHOLDER_ALL) {
295
- this._inputValue = "";
296
- target.value = "";
297
- }
298
- const allowZeroHour = this.hourCycle === "h23";
299
- if (!allowZeroHour && target.value.startsWith("00")) {
300
- this._convertZeroHourToTwelve();
301
- this._updateValue();
302
- }
303
- this._hourDigitIndex = 0;
304
- this._minuteDigitIndex = 0;
305
- }
306
- _handleChange(event) {
307
- const target = event.target;
308
- this._inputValue = target.value;
309
- this._updateValue(event);
310
- }
311
- _handleMouseUp(event) {
312
- var _a, _b;
313
- event.preventDefault();
314
- const selectionStart = ((_a = this._timeInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
315
- const selectionEnd = ((_b = this._timeInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
316
- const timeItemInSelection = getTimeItemInSelection(
317
- selectionStart,
318
- selectionEnd
319
- );
320
- if (event.target.value === PLACEHOLDER_ALL && !timeItemInSelection) {
321
- this._updateSelection("hour");
322
- return;
323
- }
324
- if (timeItemInSelection) {
325
- this._updateSelection(timeItemInSelection);
326
- }
327
- }
328
- _handleDigitInput(parts, item, digit, hourDigitIndex, hourCycle) {
329
- if (item === "hour") {
330
- if (hourDigitIndex === 1) {
331
- this._hourDigitIndex = 0;
332
- } else {
333
- this._hourDigitIndex = 1;
334
- }
335
- if (hourDigitIndex === 0) {
336
- return {
337
- parts: { ...parts, hour: `0${digit}` },
338
- done: hourCycle === "h12" ? digit > "1" : digit > "2"
339
- };
340
- }
341
- }
342
- if (item === "minute") {
343
- const minuteDigitIndex = this._minuteDigitIndex;
344
- if (minuteDigitIndex === 1) {
345
- this._minuteDigitIndex = 0;
346
- } else {
347
- this._minuteDigitIndex = 1;
348
- }
349
- if (minuteDigitIndex === 0) {
350
- return {
351
- parts: { ...parts, minute: `0${digit}` },
352
- done: digit > "5"
353
- };
354
- }
355
- }
356
- return calcDigitInput(parts, item, digit, hourDigitIndex, this.hourCycle);
357
- }
358
- // Saves the input's display value when IME composition starts so that
359
- // _handleCompositionEnd can restore it if the browser inserted raw IME text.
360
- _handleCompositionStart(event) {
361
- this._preCompositionValue = event.target.value;
362
- }
363
- // Handles compositionend to support full-width and half-width digit input via IME.
364
- // Full-width digits are converted to half-width, then each digit is applied as if
365
- // the user had typed them one by one using the existing calcDigitInput logic.
366
- _handleCompositionEnd(event) {
367
- if (this.readonly) {
368
- return;
369
- }
370
- const target = event.target;
371
- const composedText = event.data;
372
- target.value = this._preCompositionValue || PLACEHOLDER_ALL;
373
- this._inputValue = target.value;
374
- const digits = extractHalfWidthDigits(composedText);
375
- if (digits.length === 0) {
376
- this._updateInputSelection(target);
377
- this._updateValue();
378
- return;
379
- }
380
- this._applyDigits(target, digits);
381
- }
382
- // Applies a sequence of digit characters to the input starting from the currently
383
- // selected time item, then commits the result to this.value.
384
- // Shared by _handleKeyDown (single digit) and _handleCompositionEnd (multiple digits).
385
- _applyDigits(target, digits) {
386
- let parts = parsePartsFromUIValue(target.value);
387
- let currentItem = this._currentSelection;
388
- for (const digit of digits) {
389
- const currentIndex = TIME_ITEMS.findIndex(
390
- ({ type }) => type === currentItem
391
- );
392
- if (currentIndex < 0) break;
393
- const newState = this._handleDigitInput(
394
- parts,
395
- currentItem,
396
- digit,
397
- this._hourDigitIndex,
398
- this.hourCycle
399
- );
400
- if (newState) {
401
- parts = newState.parts;
402
- if (newState.done) {
403
- const nextIndex = Math.min(currentIndex + 1, TIME_ITEMS.length - 1);
404
- currentItem = TIME_ITEMS[nextIndex].type;
405
- }
406
- }
407
- }
408
- const newVal = formatPartsForUI(parts);
409
- this._inputValue = newVal;
410
- target.value = newVal;
411
- this._updateSelection(currentItem);
412
- this._updateValue();
413
- }
414
- _handleKeyDown(event) {
415
- if (this.readonly) {
416
- return;
417
- }
418
- if (event.isComposing || event.key === "Process" || event.keyCode === 229) {
419
- return;
420
- }
421
- const target = event.target;
422
- const key = event.key;
423
- const parts = parsePartsFromUIValue(target.value);
424
- if (key === "Backspace" || key === "Delete") {
425
- event.preventDefault();
426
- const itemToRemove = this._currentSelection;
427
- const placeholder = {
428
- hour: PLACEHOLDER_HOUR,
429
- minute: PLACEHOLDER_MINUTE
430
- }[itemToRemove];
431
- if (parts[itemToRemove] !== placeholder) {
432
- const newVal = formatPartsForUI({
433
- ...parts,
434
- [itemToRemove]: placeholder
435
- });
436
- this._inputValue = newVal;
437
- target.value = newVal;
438
- this._updateSelection(itemToRemove);
439
- }
440
- this._updateValue();
441
- return;
442
- }
443
- if (/^\d$/.test(key)) {
444
- event.preventDefault();
445
- this._applyDigits(target, [key]);
446
- return;
447
- }
448
- const moveOffset = {
449
- ArrowLeft: -1,
450
- ArrowRight: 1
451
- }[key];
452
- if (moveOffset) {
453
- event.preventDefault();
454
- const currentIndex = TIME_ITEMS.findIndex(
455
- ({ type }) => type === this._currentSelection
456
- );
457
- const newIndex = currentIndex >= 0 ? Math.min(
458
- Math.max(currentIndex + moveOffset, 0),
459
- TIME_ITEMS.length - 1
460
- ) : 0;
461
- this._updateSelection(TIME_ITEMS[newIndex].type);
462
- return;
463
- }
464
- const countOffset = {
465
- ArrowUp: 1,
466
- ArrowDown: -1
467
- }[key];
468
- if (countOffset) {
469
- event.preventDefault();
470
- this._updateSelection(this._currentSelection);
471
- this._updateTimeByOffset(countOffset);
472
- return;
473
- }
474
- if (key.length <= 1) {
475
- event.preventDefault();
476
- return;
477
- }
478
- }
479
- _updateTimeByOffset(offset) {
480
- const target = this._timeInputElement.value;
481
- if (!target) return;
482
- const currentTime = target.value;
483
- if (!currentTime) return;
484
- const [hourStr, minuteStr] = currentTime.split(":");
485
- let hour = parseInt(hourStr, 10);
486
- let minute = parseInt(minuteStr, 10);
487
- if (this._currentSelection === "hour") {
488
- if (isNaN(hour)) hour = 0;
489
- if (this.hourCycle === "h23") {
490
- hour = (hour + offset + 24) % 24;
491
- } else {
492
- hour = (hour + offset + 11) % 12 + 1;
493
- }
494
- } else {
495
- if (isNaN(minute)) minute = 0;
496
- minute = (minute + offset * Number(this.minutesStep) + 60) % 60;
497
- }
498
- const newTime = `${isNaN(hour) ? "hh" : String(hour).padStart(2, "0")}:${isNaN(minute) ? "mm" : String(minute).padStart(2, "0")}`;
499
- this._inputValue = formatTimeForUI(newTime);
500
- target.value = this._inputValue;
501
- this._updateSelection(this._currentSelection);
502
- this._updateValue();
503
- }
504
- _handleBeforeInput(event) {
505
- event.preventDefault();
506
- if (!event.isComposing) {
507
- this._updateSelection(this._currentSelection);
508
- }
509
- }
510
- /**
511
- * Updates the value in 24-hour format if the input is valid, while preserving the selected UI hour cycle.
512
- */
513
- _updateValue(event) {
514
- const target = (event == null ? void 0 : event.target) || this._timeInputElement.value;
515
- if (!target) return;
516
- const allowZeroHour = this.hourCycle === "h23";
517
- const needsMeridiem = this.hourCycle === "h12";
518
- this._inputValue = target.value;
519
- if (target.value === PLACEHOLDER_ALL) {
520
- this.error = false;
521
- this.value = "";
522
- return;
523
- }
524
- if (needsMeridiem && this._meridiem === "") {
525
- this.error = true;
526
- this.value = "";
527
- return;
528
- }
529
- const newTime = tryParseTimeFromUIValue(target.value);
530
- const { hour: uiHour } = parsePartsFromUIValue(target.value);
531
- if (!allowZeroHour && uiHour === "00") {
532
- this.error = true;
533
- this.value = "";
534
- return;
535
- }
536
- const newValue = newTime != null ? uiToTimeValue(
537
- this.hourCycle === "h23" ? {
538
- hourCycle: "h23",
539
- ...parsePartsFromUIValue(newTime),
540
- meridiem: null
541
- } : {
542
- hourCycle: "h12",
543
- ...parsePartsFromUIValue(newTime),
544
- meridiem: this._meridiem
545
- }
546
- ) : "";
547
- this.error = !newValue || isTimeOutOfRange(newValue, this._min, this._max);
548
- const changed = newValue !== this.value;
549
- this.value = newValue;
550
- if (changed) {
551
- if (newValue) {
552
- this.dispatchEvent(
553
- new Event("input", {
554
- bubbles: true,
555
- composed: true
556
- })
557
- );
558
- }
559
- this.dispatchEvent(
560
- new Event("change", {
561
- bubbles: true,
562
- composed: true
563
- })
564
- );
565
- }
566
- }
567
- _updateInputSelection(target) {
568
- var _a;
569
- if (target.value === "") {
570
- target.value = PLACEHOLDER_ALL;
571
- }
572
- const itemInfo = TIME_ITEMS[0];
573
- (_a = this._timeInputElement.value) == null ? void 0 : _a.setSelectionRange(
574
- itemInfo.range[0],
575
- itemInfo.range[1]
576
- );
577
- this._currentSelection = itemInfo.type;
578
- }
579
- _updateSelection(timeItem) {
580
- var _a;
581
- const selection = window.getSelection();
582
- if (!selection) {
583
- return;
584
- }
585
- const allowZeroHour = this.hourCycle === "h23";
586
- const itemInfo = TIME_ITEMS.find(({ type }) => type === timeItem);
587
- if (itemInfo) {
588
- if (itemInfo.type === "minute") {
589
- if (!allowZeroHour && this._inputValue.startsWith("00")) {
590
- this._convertZeroHourToTwelve();
591
- }
592
- this._hourDigitIndex = 0;
593
- if (this._currentSelection !== "minute") {
594
- this._minuteDigitIndex = 0;
595
- }
596
- }
597
- (_a = this._timeInputElement.value) == null ? void 0 : _a.setSelectionRange(
598
- itemInfo.range[0],
599
- itemInfo.range[1]
600
- );
601
- this._currentSelection = itemInfo.type;
602
- }
603
- }
604
- _handleDropdownChange(event) {
605
- if (this.readonly) {
606
- return;
607
- }
608
- const target = event.target;
609
- this._meridiem = target.value;
610
- const input = this._timeInputElement.value;
611
- if (input && input.value && tryParseTimeFromUIValue(input.value)) {
612
- this._updateValue();
613
- }
614
- }
615
- _closeMeridiemDropdown() {
616
- const dropdown = this._meridiemDropdown.value;
617
- if (!dropdown || !dropdown.open) {
618
- return;
619
- }
620
- dropdown.open = false;
621
- }
622
- _handleMeridiemDropdownToggle(event) {
623
- if (!this.meridiemSingleOpen) {
624
- return;
256
+ var DaikinTimePicker = class DaikinTimePicker extends DDSFormElement {
257
+ constructor(..._args) {
258
+ super(..._args);
259
+ this.disabled = false;
260
+ this.readonly = false;
261
+ this.required = false;
262
+ this.error = false;
263
+ this.hourCycle = "h12";
264
+ this.meridiemSingleOpen = true;
265
+ this._label = null;
266
+ this._inputValue = "";
267
+ this._currentSelection = "hour";
268
+ this._meridiem = "";
269
+ this._timeInputElement = createRef();
270
+ this._meridiemDropdown = createRef();
271
+ this._hourDigitIndex = 0;
272
+ this._preCompositionValue = "";
273
+ this._minuteDigitIndex = 0;
274
+ }
275
+ static {
276
+ this.styles = css`
277
+ ${unsafeCSS(tailwind_default)}
278
+
279
+ :host {
280
+ display: inline-flex;
281
+ align-items: center;
282
+ height: var(--dds-input-height, 3rem);
283
+ width: fit-content;
625
284
  }
626
- const toggleEvent = event;
627
- if (toggleEvent.newState !== "open") {
628
- return;
285
+
286
+ :host([readonly]:not([disabled])) input {
287
+ --color-base: var(--dds-color-common-surface-secondary);
288
+ background-color: var(--dds-color-common-surface-secondary);
629
289
  }
630
- const root = this.getRootNode();
631
- if (!(root instanceof Document || root instanceof ShadowRoot)) {
632
- return;
290
+
291
+ :host([readonly]:not([disabled])) input:hover,
292
+ :host([readonly]:not([disabled])) input:active {
293
+ --color-base: var(--dds-color-common-surface-secondary);
294
+ background-color: var(--dds-color-common-surface-secondary);
633
295
  }
634
- const peerTimePickers = root.querySelectorAll("daikin-time-picker");
635
- for (const peerElement of peerTimePickers) {
636
- if (peerElement === this) {
637
- continue;
638
- }
639
- peerElement._closeMeridiemDropdown();
296
+
297
+ :host([readonly][error]:not([disabled])) input,
298
+ :host([readonly][error]:not([disabled])) input:hover,
299
+ :host([readonly][error]:not([disabled])) input:active {
300
+ --color-base: var(--dds-color-common-danger-default);
640
301
  }
641
- }
642
- /**
643
- * Focuses on the inner time input.
644
- * @param options focus options
645
- */
646
- focus(options) {
647
- var _a;
648
- (_a = this._timeInputElement.value) == null ? void 0 : _a.focus(options);
649
- }
650
- render() {
651
- const needsMeridiem = this.hourCycle === "h12";
652
- return html`<div
302
+ `;
303
+ }
304
+ /**
305
+ * Returns the value to be displayed in the input field.
306
+ * - If the main value is a valid 24-hour time, returns a display string based on the selected hour cycle.
307
+ * - If the current input value is not valid or meridiem is empty, returns the raw input value.
308
+ * - Otherwise, returns null.
309
+ */
310
+ get _value() {
311
+ if (isValidValueTime(this.value)) {
312
+ const ui = timeValueToUI(this.value, this.hourCycle);
313
+ return formatPartsForUI({
314
+ hour: ui.hour,
315
+ minute: ui.minute
316
+ });
317
+ }
318
+ const needsMeridiem = this.hourCycle === "h12";
319
+ if (this._timeValue && (!isValidValueTime(this._timeValue) || parsePartsFromUIValue(this._timeValue).hour === "00") || needsMeridiem && this._meridiem === "") return this._timeValue;
320
+ return null;
321
+ }
322
+ /**
323
+ * Returns the value to display in the input field (from _inputValue state).
324
+ */
325
+ get _timeValue() {
326
+ return this._inputValue;
327
+ }
328
+ /**
329
+ * Syncs the AM/PM value with the current value (24-hour) if value changes externally.
330
+ */
331
+ _syncMeridiemWithValue() {
332
+ if (this.value) {
333
+ const ui = timeValueToUI(this.value, this.hourCycle);
334
+ this._meridiem = ui.meridiem ? ui.meridiem : "";
335
+ }
336
+ }
337
+ get _min() {
338
+ return this.min || DEFAULT_MIN_TIME;
339
+ }
340
+ get _max() {
341
+ return this.max || DEFAULT_MAX_TIME;
342
+ }
343
+ _convertZeroHourToTwelve() {
344
+ const minutes = this._inputValue.split(":")[1];
345
+ this._inputValue = `12:${minutes}`;
346
+ if (this._timeInputElement.value) this._timeInputElement.value.value = this._inputValue;
347
+ }
348
+ _handleFocusIn(event) {
349
+ const target = event.target;
350
+ this._updateInputSelection(target);
351
+ if (!this._inputValue) this._inputValue = PLACEHOLDER_ALL;
352
+ }
353
+ _handleFocusOut(event) {
354
+ const target = event.target;
355
+ if (target.value === PLACEHOLDER_ALL) {
356
+ this._inputValue = "";
357
+ target.value = "";
358
+ }
359
+ if (!(this.hourCycle === "h23") && target.value.startsWith("00")) {
360
+ this._convertZeroHourToTwelve();
361
+ this._updateValue();
362
+ }
363
+ this._hourDigitIndex = 0;
364
+ this._minuteDigitIndex = 0;
365
+ }
366
+ _handleChange(event) {
367
+ const target = event.target;
368
+ this._inputValue = target.value;
369
+ this._updateValue(event);
370
+ }
371
+ _handleMouseUp(event) {
372
+ event.preventDefault();
373
+ const timeItemInSelection = getTimeItemInSelection(this._timeInputElement.value?.selectionStart ?? 0, this._timeInputElement.value?.selectionEnd ?? 0);
374
+ if (event.target.value === PLACEHOLDER_ALL && !timeItemInSelection) {
375
+ this._updateSelection("hour");
376
+ return;
377
+ }
378
+ if (timeItemInSelection) this._updateSelection(timeItemInSelection);
379
+ }
380
+ _handleDigitInput(parts, item, digit, hourDigitIndex, hourCycle) {
381
+ if (item === "hour") {
382
+ if (hourDigitIndex === 1) this._hourDigitIndex = 0;
383
+ else this._hourDigitIndex = 1;
384
+ if (hourDigitIndex === 0) return {
385
+ parts: {
386
+ ...parts,
387
+ hour: `0${digit}`
388
+ },
389
+ done: hourCycle === "h12" ? digit > "1" : digit > "2"
390
+ };
391
+ }
392
+ if (item === "minute") {
393
+ const minuteDigitIndex = this._minuteDigitIndex;
394
+ if (minuteDigitIndex === 1) this._minuteDigitIndex = 0;
395
+ else this._minuteDigitIndex = 1;
396
+ if (minuteDigitIndex === 0) return {
397
+ parts: {
398
+ ...parts,
399
+ minute: `0${digit}`
400
+ },
401
+ done: digit > "5"
402
+ };
403
+ }
404
+ return calcDigitInput(parts, item, digit, hourDigitIndex, this.hourCycle);
405
+ }
406
+ _handleCompositionStart(event) {
407
+ this._preCompositionValue = event.target.value;
408
+ }
409
+ _handleCompositionEnd(event) {
410
+ if (this.readonly) return;
411
+ const target = event.target;
412
+ const composedText = event.data;
413
+ target.value = this._preCompositionValue || PLACEHOLDER_ALL;
414
+ this._inputValue = target.value;
415
+ const digits = extractHalfWidthDigits(composedText);
416
+ if (digits.length === 0) {
417
+ this._updateInputSelection(target);
418
+ this._updateValue();
419
+ return;
420
+ }
421
+ this._applyDigits(target, digits);
422
+ }
423
+ _applyDigits(target, digits) {
424
+ let parts = parsePartsFromUIValue(target.value);
425
+ let currentItem = this._currentSelection;
426
+ for (const digit of digits) {
427
+ const currentIndex = TIME_ITEMS.findIndex(({ type }) => type === currentItem);
428
+ if (currentIndex < 0) break;
429
+ const newState = this._handleDigitInput(parts, currentItem, digit, this._hourDigitIndex, this.hourCycle);
430
+ if (newState) {
431
+ parts = newState.parts;
432
+ if (newState.done) currentItem = TIME_ITEMS[Math.min(currentIndex + 1, TIME_ITEMS.length - 1)].type;
433
+ }
434
+ }
435
+ const newVal = formatPartsForUI(parts);
436
+ this._inputValue = newVal;
437
+ target.value = newVal;
438
+ this._updateSelection(currentItem);
439
+ this._updateValue();
440
+ }
441
+ _handleKeyDown(event) {
442
+ if (this.readonly) return;
443
+ if (event.isComposing || event.key === "Process" || event.keyCode === 229) return;
444
+ const target = event.target;
445
+ const key = event.key;
446
+ const parts = parsePartsFromUIValue(target.value);
447
+ if (key === "Backspace" || key === "Delete") {
448
+ event.preventDefault();
449
+ const itemToRemove = this._currentSelection;
450
+ const placeholder = {
451
+ hour: PLACEHOLDER_HOUR,
452
+ minute: PLACEHOLDER_MINUTE
453
+ }[itemToRemove];
454
+ if (parts[itemToRemove] !== placeholder) {
455
+ const newVal = formatPartsForUI({
456
+ ...parts,
457
+ [itemToRemove]: placeholder
458
+ });
459
+ this._inputValue = newVal;
460
+ target.value = newVal;
461
+ this._updateSelection(itemToRemove);
462
+ }
463
+ this._updateValue();
464
+ return;
465
+ }
466
+ if (/^\d$/.test(key)) {
467
+ event.preventDefault();
468
+ this._applyDigits(target, [key]);
469
+ return;
470
+ }
471
+ const moveOffset = {
472
+ ArrowLeft: -1,
473
+ ArrowRight: 1
474
+ }[key];
475
+ if (moveOffset) {
476
+ event.preventDefault();
477
+ const currentIndex = TIME_ITEMS.findIndex(({ type }) => type === this._currentSelection);
478
+ const newIndex = currentIndex >= 0 ? Math.min(Math.max(currentIndex + moveOffset, 0), TIME_ITEMS.length - 1) : 0;
479
+ this._updateSelection(TIME_ITEMS[newIndex].type);
480
+ return;
481
+ }
482
+ const countOffset = {
483
+ ArrowUp: 1,
484
+ ArrowDown: -1
485
+ }[key];
486
+ if (countOffset) {
487
+ event.preventDefault();
488
+ this._updateSelection(this._currentSelection);
489
+ this._updateTimeByOffset(countOffset);
490
+ return;
491
+ }
492
+ if (key.length <= 1) {
493
+ event.preventDefault();
494
+ return;
495
+ }
496
+ }
497
+ _updateTimeByOffset(offset) {
498
+ const target = this._timeInputElement.value;
499
+ if (!target) return;
500
+ const currentTime = target.value;
501
+ if (!currentTime) return;
502
+ const [hourStr, minuteStr] = currentTime.split(":");
503
+ let hour = parseInt(hourStr, 10);
504
+ let minute = parseInt(minuteStr, 10);
505
+ if (this._currentSelection === "hour") {
506
+ if (isNaN(hour)) hour = 0;
507
+ if (this.hourCycle === "h23") hour = (hour + offset + 24) % 24;
508
+ else hour = (hour + offset + 11) % 12 + 1;
509
+ } else {
510
+ if (isNaN(minute)) minute = 0;
511
+ minute = (minute + offset * Number(this.minutesStep) + 60) % 60;
512
+ }
513
+ const newTime = `${isNaN(hour) ? "hh" : String(hour).padStart(2, "0")}:${isNaN(minute) ? "mm" : String(minute).padStart(2, "0")}`;
514
+ this._inputValue = formatTimeForUI(newTime);
515
+ target.value = this._inputValue;
516
+ this._updateSelection(this._currentSelection);
517
+ this._updateValue();
518
+ }
519
+ _handleBeforeInput(event) {
520
+ event.preventDefault();
521
+ if (!event.isComposing) this._updateSelection(this._currentSelection);
522
+ }
523
+ /**
524
+ * Updates the value in 24-hour format if the input is valid, while preserving the selected UI hour cycle.
525
+ */
526
+ _updateValue(event) {
527
+ const target = event?.target || this._timeInputElement.value;
528
+ if (!target) return;
529
+ const allowZeroHour = this.hourCycle === "h23";
530
+ const needsMeridiem = this.hourCycle === "h12";
531
+ this._inputValue = target.value;
532
+ if (target.value === PLACEHOLDER_ALL) {
533
+ this.error = false;
534
+ this.value = "";
535
+ return;
536
+ }
537
+ if (needsMeridiem && this._meridiem === "") {
538
+ this.error = true;
539
+ this.value = "";
540
+ return;
541
+ }
542
+ const newTime = tryParseTimeFromUIValue(target.value);
543
+ const { hour: uiHour } = parsePartsFromUIValue(target.value);
544
+ if (!allowZeroHour && uiHour === "00") {
545
+ this.error = true;
546
+ this.value = "";
547
+ return;
548
+ }
549
+ const newValue = newTime != null ? uiToTimeValue(this.hourCycle === "h23" ? {
550
+ hourCycle: "h23",
551
+ ...parsePartsFromUIValue(newTime),
552
+ meridiem: null
553
+ } : {
554
+ hourCycle: "h12",
555
+ ...parsePartsFromUIValue(newTime),
556
+ meridiem: this._meridiem
557
+ }) : "";
558
+ this.error = !newValue || isTimeOutOfRange(newValue, this._min, this._max);
559
+ const changed = newValue !== this.value;
560
+ this.value = newValue;
561
+ if (changed) {
562
+ if (newValue) this.dispatchEvent(new Event("input", {
563
+ bubbles: true,
564
+ composed: true
565
+ }));
566
+ this.dispatchEvent(new Event("change", {
567
+ bubbles: true,
568
+ composed: true
569
+ }));
570
+ }
571
+ }
572
+ _updateInputSelection(target) {
573
+ if (target.value === "") target.value = PLACEHOLDER_ALL;
574
+ const itemInfo = TIME_ITEMS[0];
575
+ this._timeInputElement.value?.setSelectionRange(itemInfo.range[0], itemInfo.range[1]);
576
+ this._currentSelection = itemInfo.type;
577
+ }
578
+ _updateSelection(timeItem) {
579
+ if (!window.getSelection()) return;
580
+ const allowZeroHour = this.hourCycle === "h23";
581
+ const itemInfo = TIME_ITEMS.find(({ type }) => type === timeItem);
582
+ if (itemInfo) {
583
+ if (itemInfo.type === "minute") {
584
+ if (!allowZeroHour && this._inputValue.startsWith("00")) this._convertZeroHourToTwelve();
585
+ this._hourDigitIndex = 0;
586
+ if (this._currentSelection !== "minute") this._minuteDigitIndex = 0;
587
+ }
588
+ this._timeInputElement.value?.setSelectionRange(itemInfo.range[0], itemInfo.range[1]);
589
+ this._currentSelection = itemInfo.type;
590
+ }
591
+ }
592
+ _handleDropdownChange(event) {
593
+ if (this.readonly) return;
594
+ const target = event.target;
595
+ this._meridiem = target.value;
596
+ const input = this._timeInputElement.value;
597
+ if (input && input.value && tryParseTimeFromUIValue(input.value)) this._updateValue();
598
+ }
599
+ _closeMeridiemDropdown() {
600
+ const dropdown = this._meridiemDropdown.value;
601
+ if (!dropdown || !dropdown.open) return;
602
+ dropdown.open = false;
603
+ }
604
+ _handleMeridiemDropdownToggle(event) {
605
+ if (!this.meridiemSingleOpen) return;
606
+ if (event.newState !== "open") return;
607
+ const root = this.getRootNode();
608
+ if (!(root instanceof Document || root instanceof ShadowRoot)) return;
609
+ const peerTimePickers = root.querySelectorAll("daikin-time-picker");
610
+ for (const peerElement of peerTimePickers) {
611
+ if (peerElement === this) continue;
612
+ peerElement._closeMeridiemDropdown();
613
+ }
614
+ }
615
+ /**
616
+ * Focuses on the inner time input.
617
+ * @param options focus options
618
+ */
619
+ focus(options) {
620
+ this._timeInputElement.value?.focus(options);
621
+ }
622
+ render() {
623
+ const needsMeridiem = this.hourCycle === "h12";
624
+ return html`<div
653
625
  role="group"
654
626
  aria-label=${ifDefined(this._label ?? void 0)}
655
627
  class="flex flex-row h-full gap-2 w-fit"
@@ -688,152 +660,97 @@ let DaikinTimePicker = class extends DDSFormElement {
688
660
  <daikin-dropdown-item value="PM">PM</daikin-dropdown-item>
689
661
  </daikin-dropdown>` : null}
690
662
  </div>`;
691
- }
692
- willUpdate(changedProperties) {
693
- {
694
- for (const prop of ["value", "min", "max"]) {
695
- if (changedProperties.has(prop)) {
696
- const val = this[prop];
697
- if (val && !isValidValueTime(val)) {
698
- console.warn(
699
- `daikin-time-picker: Invalid time "${val}" specified for ${prop}`
700
- );
701
- }
702
- }
703
- }
704
- }
705
- if (changedProperties.has("hourCycle")) {
706
- if (isValidValueTime(this.value)) {
707
- this._syncMeridiemWithValue();
708
- }
709
- if (isValidValueTime(this.value)) {
710
- this.error = isTimeOutOfRange(this.value, this.min, this.max);
711
- }
712
- }
713
- if (changedProperties.has("value")) {
714
- if (isValidValueTime(this.value)) {
715
- if (this.hourCycle !== "h23") {
716
- this._syncMeridiemWithValue();
717
- }
718
- if (isTimeOutOfRange(this.value, this.min, this.max)) {
719
- this.error = true;
720
- } else {
721
- this.error = false;
722
- }
723
- }
724
- }
725
- }
726
- updated(changedProperties) {
727
- if (changedProperties.has("value")) {
728
- this.setFormValue(this.value);
729
- }
730
- }
731
- /**
732
- * This method is used by `daikin-input-group` to reflect it's attributes to this component.
733
- * @private
734
- */
735
- reflectInputGroup(inputGroup) {
736
- const isError = !inputGroup.disabled && !!inputGroup.error;
737
- this.disabled = !!inputGroup.disabled;
738
- this.readonly = !!inputGroup.readonly;
739
- this.required = !!inputGroup.required;
740
- this.error = isError;
741
- this._label = inputGroup.label ?? null;
742
- }
743
- };
744
- DaikinTimePicker.styles = css`
745
- ${unsafeCSS(tailwindStyles)}
746
-
747
- :host {
748
- display: inline-flex;
749
- align-items: center;
750
- height: var(--dds-input-height, 3rem);
751
- width: fit-content;
752
- }
753
-
754
- :host([readonly]:not([disabled])) input {
755
- --color-base: var(--dds-color-common-surface-secondary);
756
- background-color: var(--dds-color-common-surface-secondary);
757
- }
758
-
759
- :host([readonly]:not([disabled])) input:hover,
760
- :host([readonly]:not([disabled])) input:active {
761
- --color-base: var(--dds-color-common-surface-secondary);
762
- background-color: var(--dds-color-common-surface-secondary);
763
- }
764
-
765
- :host([readonly][error]:not([disabled])) input,
766
- :host([readonly][error]:not([disabled])) input:hover,
767
- :host([readonly][error]:not([disabled])) input:active {
768
- --color-base: var(--dds-color-common-danger-default);
769
- }
770
- `;
771
- __decorateClass([
772
- property({ type: String, reflect: true, fallbackValue: "hh:mm" })
773
- ], DaikinTimePicker.prototype, "placeholder", 2);
774
- __decorateClass([
775
- property({ type: String, reflect: true, fallbackValue: DEFAULT_MIN_TIME })
776
- ], DaikinTimePicker.prototype, "min", 2);
777
- __decorateClass([
778
- property({ type: String, reflect: true, fallbackValue: DEFAULT_MAX_TIME })
779
- ], DaikinTimePicker.prototype, "max", 2);
780
- __decorateClass([
781
- property({ type: Boolean, reflect: true })
782
- ], DaikinTimePicker.prototype, "disabled", 2);
783
- __decorateClass([
784
- property({ type: Boolean, reflect: true })
785
- ], DaikinTimePicker.prototype, "readonly", 2);
786
- __decorateClass([
787
- property({ type: Boolean, reflect: true })
788
- ], DaikinTimePicker.prototype, "required", 2);
789
- __decorateClass([
790
- property({ type: Boolean, reflect: true })
791
- ], DaikinTimePicker.prototype, "error", 2);
792
- __decorateClass([
793
- property({
794
- type: String,
795
- reflect: true,
796
- attribute: "hour-cycle",
797
- fallbackValue: "h12",
798
- isAllowedValue: oneOf(["h12", "h23"])
799
- })
800
- ], DaikinTimePicker.prototype, "hourCycle", 2);
801
- __decorateClass([
802
- property({
803
- type: String,
804
- reflect: true,
805
- attribute: "minutes-step",
806
- fallbackValue: "1"
807
- })
808
- ], DaikinTimePicker.prototype, "minutesStep", 2);
809
- __decorateClass([
810
- property({ type: Boolean, reflect: true, attribute: "meridiem-single-open" })
811
- ], DaikinTimePicker.prototype, "meridiemSingleOpen", 2);
812
- __decorateClass([
813
- state()
814
- ], DaikinTimePicker.prototype, "_label", 2);
815
- __decorateClass([
816
- state()
817
- ], DaikinTimePicker.prototype, "_inputValue", 2);
818
- __decorateClass([
819
- state()
820
- ], DaikinTimePicker.prototype, "_currentSelection", 2);
821
- __decorateClass([
822
- state()
823
- ], DaikinTimePicker.prototype, "_meridiem", 2);
824
- DaikinTimePicker = __decorateClass([
825
- ddsElement("daikin-time-picker")
826
- ], DaikinTimePicker);
827
- export {
828
- DaikinTimePicker,
829
- calcDigitInput,
830
- formatPartsForUI,
831
- formatTimeForUI,
832
- getTimeItemInSelection,
833
- isTimeOutOfRange,
834
- isValidValueTime,
835
- parsePartsFromUIValue,
836
- timeValueToUI,
837
- tryParseTimeFromUIValue,
838
- uiToTimeValue
663
+ }
664
+ willUpdate(changedProperties) {
665
+ for (const prop of [
666
+ "value",
667
+ "min",
668
+ "max"
669
+ ]) if (changedProperties.has(prop)) {
670
+ const val = this[prop];
671
+ if (val && !isValidValueTime(val)) console.warn(`daikin-time-picker: Invalid time "${val}" specified for ${prop}`);
672
+ }
673
+ if (changedProperties.has("hourCycle")) {
674
+ if (isValidValueTime(this.value)) this._syncMeridiemWithValue();
675
+ if (isValidValueTime(this.value)) this.error = isTimeOutOfRange(this.value, this.min, this.max);
676
+ }
677
+ if (changedProperties.has("value")) {
678
+ if (isValidValueTime(this.value)) {
679
+ if (this.hourCycle !== "h23") this._syncMeridiemWithValue();
680
+ if (isTimeOutOfRange(this.value, this.min, this.max)) this.error = true;
681
+ else this.error = false;
682
+ }
683
+ }
684
+ }
685
+ updated(changedProperties) {
686
+ if (changedProperties.has("value")) this.setFormValue(this.value);
687
+ }
688
+ /**
689
+ * This method is used by `daikin-input-group` to reflect it's attributes to this component.
690
+ * @private
691
+ */
692
+ reflectInputGroup(inputGroup) {
693
+ const isError = !inputGroup.disabled && !!inputGroup.error;
694
+ this.disabled = !!inputGroup.disabled;
695
+ this.readonly = !!inputGroup.readonly;
696
+ this.required = !!inputGroup.required;
697
+ this.error = isError;
698
+ this._label = inputGroup.label ?? null;
699
+ }
839
700
  };
701
+ __decorate([property$1({
702
+ type: String,
703
+ reflect: true,
704
+ fallbackValue: "hh:mm"
705
+ })], DaikinTimePicker.prototype, "placeholder", void 0);
706
+ __decorate([property$1({
707
+ type: String,
708
+ reflect: true,
709
+ fallbackValue: DEFAULT_MIN_TIME
710
+ })], DaikinTimePicker.prototype, "min", void 0);
711
+ __decorate([property$1({
712
+ type: String,
713
+ reflect: true,
714
+ fallbackValue: DEFAULT_MAX_TIME
715
+ })], DaikinTimePicker.prototype, "max", void 0);
716
+ __decorate([property$1({
717
+ type: Boolean,
718
+ reflect: true
719
+ })], DaikinTimePicker.prototype, "disabled", void 0);
720
+ __decorate([property$1({
721
+ type: Boolean,
722
+ reflect: true
723
+ })], DaikinTimePicker.prototype, "readonly", void 0);
724
+ __decorate([property$1({
725
+ type: Boolean,
726
+ reflect: true
727
+ })], DaikinTimePicker.prototype, "required", void 0);
728
+ __decorate([property$1({
729
+ type: Boolean,
730
+ reflect: true
731
+ })], DaikinTimePicker.prototype, "error", void 0);
732
+ __decorate([property$1({
733
+ type: String,
734
+ reflect: true,
735
+ attribute: "hour-cycle",
736
+ fallbackValue: "h12",
737
+ isAllowedValue: oneOf(["h12", "h23"])
738
+ })], DaikinTimePicker.prototype, "hourCycle", void 0);
739
+ __decorate([property$1({
740
+ type: String,
741
+ reflect: true,
742
+ attribute: "minutes-step",
743
+ fallbackValue: "1"
744
+ })], DaikinTimePicker.prototype, "minutesStep", void 0);
745
+ __decorate([property$1({
746
+ type: Boolean,
747
+ reflect: true,
748
+ attribute: "meridiem-single-open"
749
+ })], DaikinTimePicker.prototype, "meridiemSingleOpen", void 0);
750
+ __decorate([state()], DaikinTimePicker.prototype, "_label", void 0);
751
+ __decorate([state()], DaikinTimePicker.prototype, "_inputValue", void 0);
752
+ __decorate([state()], DaikinTimePicker.prototype, "_currentSelection", void 0);
753
+ __decorate([state()], DaikinTimePicker.prototype, "_meridiem", void 0);
754
+ DaikinTimePicker = __decorate([ddsElement("daikin-time-picker")], DaikinTimePicker);
755
+ //#endregion
756
+ export { DaikinTimePicker, calcDigitInput, formatPartsForUI, formatTimeForUI, getTimeItemInSelection, isTimeOutOfRange, isValidValueTime, parsePartsFromUIValue, timeValueToUI, tryParseTimeFromUIValue, uiToTimeValue };