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