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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (717) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/custom-elements.json +875 -689
  3. package/dist/cjs/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs +9 -0
  4. package/dist/cjs/_virtual/_rolldown/runtime.cjs +23 -0
  5. package/dist/cjs/base/dds-element.cjs +100 -86
  6. package/dist/cjs/base/dds-form-element.cjs +123 -144
  7. package/dist/cjs/base/dds-property.cjs +46 -5
  8. package/dist/cjs/base/dds-property.d.cts +1 -1
  9. package/dist/cjs/base/decorators.cjs +8 -11
  10. package/dist/cjs/base/define.cjs +11 -17
  11. package/dist/cjs/base/index.cjs +12 -13
  12. package/dist/cjs/components/accordion/daikin-accordion.cjs +77 -91
  13. package/dist/cjs/components/accordion/index.cjs +5 -4
  14. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +148 -172
  15. package/dist/cjs/components/accordion-item/index.cjs +5 -4
  16. package/dist/cjs/components/avatar/daikin-avatar.cjs +149 -163
  17. package/dist/cjs/components/avatar/index.cjs +5 -4
  18. package/dist/cjs/components/badge/daikin-badge.cjs +179 -199
  19. package/dist/cjs/components/badge/index.cjs +5 -4
  20. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +80 -88
  21. package/dist/cjs/components/breadcrumb/index.cjs +5 -4
  22. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +120 -127
  23. package/dist/cjs/components/breadcrumb-item/index.cjs +5 -4
  24. package/dist/cjs/components/button/daikin-button.cjs +269 -294
  25. package/dist/cjs/components/button/index.cjs +5 -4
  26. package/dist/cjs/components/calendar/daikin-calendar.cjs +421 -528
  27. package/dist/cjs/components/calendar/index.cjs +5 -4
  28. package/dist/cjs/components/card/daikin-card.cjs +52 -61
  29. package/dist/cjs/components/card/index.cjs +5 -4
  30. package/dist/cjs/components/card-footer/daikin-card-footer.cjs +24 -27
  31. package/dist/cjs/components/card-footer/index.cjs +5 -4
  32. package/dist/cjs/components/card-header/daikin-card-header.cjs +46 -49
  33. package/dist/cjs/components/card-header/index.cjs +5 -4
  34. package/dist/cjs/components/carousel/daikin-carousel.cjs +397 -192
  35. package/dist/cjs/components/carousel/daikin-carousel.d.cts +50 -7
  36. package/dist/cjs/components/carousel/index.cjs +5 -4
  37. package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +69 -61
  38. package/dist/cjs/components/carousel-item/daikin-carousel-item.d.cts +1 -5
  39. package/dist/cjs/components/carousel-item/index.cjs +5 -4
  40. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +324 -336
  41. package/dist/cjs/components/checkbox/index.cjs +5 -4
  42. package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  43. package/dist/cjs/components/checkbox-group/index.cjs +5 -4
  44. package/dist/cjs/components/chip/daikin-chip.cjs +331 -335
  45. package/dist/cjs/components/chip/daikin-chip.d.cts +2 -0
  46. package/dist/cjs/components/chip/index.cjs +5 -4
  47. package/dist/cjs/components/combobox/daikin-combobox.cjs +480 -593
  48. package/dist/cjs/components/combobox/daikin-combobox.d.cts +8 -0
  49. package/dist/cjs/components/combobox/index.cjs +6 -5
  50. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +809 -842
  51. package/dist/cjs/components/date-picker/index.cjs +5 -4
  52. package/dist/cjs/components/divider/daikin-divider.cjs +32 -36
  53. package/dist/cjs/components/divider/index.cjs +5 -4
  54. package/dist/cjs/components/drawer/daikin-drawer.cjs +200 -213
  55. package/dist/cjs/components/drawer/index.cjs +5 -4
  56. package/dist/cjs/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  57. package/dist/cjs/components/drawer-footer/index.cjs +5 -4
  58. package/dist/cjs/components/drawer-header/daikin-drawer-header.cjs +62 -67
  59. package/dist/cjs/components/drawer-header/index.cjs +5 -4
  60. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +479 -575
  61. package/dist/cjs/components/dropdown/index.cjs +5 -4
  62. package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  63. package/dist/cjs/components/dropdown-item/index.cjs +5 -4
  64. package/dist/cjs/components/empty-state/daikin-empty-state.cjs +28 -31
  65. package/dist/cjs/components/empty-state/index.cjs +5 -4
  66. package/dist/cjs/components/icon/daikin-icon.cjs +159 -179
  67. package/dist/cjs/components/icon/icons.json.cjs +97 -6
  68. package/dist/cjs/components/icon/index.cjs +6 -5
  69. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +290 -274
  70. package/dist/cjs/components/icon-button/index.cjs +5 -4
  71. package/dist/cjs/components/index.cjs +435 -226
  72. package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +138 -162
  73. package/dist/cjs/components/inline-notification/index.cjs +5 -4
  74. package/dist/cjs/components/input-group/daikin-input-group.cjs +191 -235
  75. package/dist/cjs/components/input-group/index.cjs +5 -4
  76. package/dist/cjs/components/link/daikin-link.cjs +122 -132
  77. package/dist/cjs/components/link/index.cjs +5 -4
  78. package/dist/cjs/components/list/daikin-list.cjs +84 -101
  79. package/dist/cjs/components/list/index.cjs +5 -4
  80. package/dist/cjs/components/list-item/daikin-list-item.cjs +179 -196
  81. package/dist/cjs/components/list-item/index.cjs +5 -4
  82. package/dist/cjs/components/loading/daikin-loading.cjs +70 -84
  83. package/dist/cjs/components/loading/index.cjs +5 -4
  84. package/dist/cjs/components/logo/daikin-logo.cjs +115 -128
  85. package/dist/cjs/components/logo/index.cjs +5 -4
  86. package/dist/cjs/components/menu/daikin-menu.cjs +258 -322
  87. package/dist/cjs/components/menu/index.cjs +5 -4
  88. package/dist/cjs/components/modal/daikin-modal.cjs +107 -130
  89. package/dist/cjs/components/modal/index.cjs +5 -4
  90. package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +26 -29
  91. package/dist/cjs/components/modal-footer/index.cjs +5 -4
  92. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +70 -75
  93. package/dist/cjs/components/modal-header/index.cjs +5 -4
  94. package/dist/cjs/components/navigation/daikin-navigation.cjs +50 -54
  95. package/dist/cjs/components/navigation/index.cjs +5 -4
  96. package/dist/cjs/components/navigation-item/daikin-navigation-item.cjs +165 -188
  97. package/dist/cjs/components/navigation-item/index.cjs +5 -4
  98. package/dist/cjs/components/pagination/daikin-pagination.cjs +191 -221
  99. package/dist/cjs/components/pagination/index.cjs +5 -4
  100. package/dist/cjs/components/pagination/pagination-utils.cjs +76 -41
  101. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +136 -169
  102. package/dist/cjs/components/progress-bar/index.cjs +5 -4
  103. package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  104. package/dist/cjs/components/progress-indicator/index.cjs +5 -4
  105. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  106. package/dist/cjs/components/progress-indicator-item/index.cjs +5 -4
  107. package/dist/cjs/components/radio/daikin-radio.cjs +273 -285
  108. package/dist/cjs/components/radio/index.cjs +5 -4
  109. package/dist/cjs/components/radio-group/daikin-radio-group.cjs +149 -171
  110. package/dist/cjs/components/radio-group/index.cjs +5 -4
  111. package/dist/cjs/components/select/daikin-select.cjs +231 -264
  112. package/dist/cjs/components/select/index.cjs +5 -4
  113. package/dist/cjs/components/slider/daikin-slider.cjs +250 -301
  114. package/dist/cjs/components/slider/index.cjs +5 -4
  115. package/dist/cjs/components/slider/slider-utils.cjs +61 -45
  116. package/dist/cjs/components/status-message/daikin-status-message.cjs +115 -113
  117. package/dist/cjs/components/status-message/index.cjs +5 -4
  118. package/dist/cjs/components/tab/daikin-tab.cjs +112 -132
  119. package/dist/cjs/components/tab/index.cjs +5 -4
  120. package/dist/cjs/components/tab-panels/daikin-tab-panels.cjs +43 -52
  121. package/dist/cjs/components/tab-panels/index.cjs +5 -4
  122. package/dist/cjs/components/table/daikin-table.cjs +265 -318
  123. package/dist/cjs/components/table/index.cjs +5 -4
  124. package/dist/cjs/components/table-cell/daikin-table-cell.cjs +55 -69
  125. package/dist/cjs/components/table-cell/index.cjs +5 -4
  126. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  127. package/dist/cjs/components/table-header-cell/index.cjs +5 -4
  128. package/dist/cjs/components/tabs/daikin-tabs.cjs +178 -219
  129. package/dist/cjs/components/tabs/index.cjs +5 -4
  130. package/dist/cjs/components/tag/daikin-tag.cjs +150 -152
  131. package/dist/cjs/components/tag/index.cjs +5 -4
  132. package/dist/cjs/components/text-area/daikin-text-area.cjs +161 -175
  133. package/dist/cjs/components/text-area/index.cjs +5 -4
  134. package/dist/cjs/components/text-field/daikin-text-field.cjs +388 -438
  135. package/dist/cjs/components/text-field/index.cjs +5 -4
  136. package/dist/cjs/components/text-field/number-utils.cjs +77 -90
  137. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  138. package/dist/cjs/components/text-masked-field/index.cjs +5 -4
  139. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +689 -752
  140. package/dist/cjs/components/time-picker/index.cjs +15 -14
  141. package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +143 -170
  142. package/dist/cjs/components/toast-notification/index.cjs +5 -4
  143. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  144. package/dist/cjs/components/toast-notification-manager/index.cjs +5 -4
  145. package/dist/cjs/components/toggle/daikin-toggle.cjs +169 -178
  146. package/dist/cjs/components/toggle/index.cjs +5 -4
  147. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +165 -202
  148. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +2 -2
  149. package/dist/cjs/components/tooltip/index.cjs +5 -4
  150. package/dist/cjs/components/tree/common.cjs +74 -70
  151. package/dist/cjs/components/tree/daikin-tree.cjs +89 -103
  152. package/dist/cjs/components/tree/index.cjs +5 -4
  153. package/dist/cjs/components/tree-item/daikin-tree-item.cjs +178 -198
  154. package/dist/cjs/components/tree-item/index.cjs +6 -5
  155. package/dist/cjs/components/tree-section/daikin-tree-section.cjs +169 -215
  156. package/dist/cjs/components/tree-section/index.cjs +5 -4
  157. package/dist/cjs/components/vertical-navigation/daikin-vertical-navigation.cjs +84 -104
  158. package/dist/cjs/components/vertical-navigation/index.cjs +5 -4
  159. package/dist/cjs/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  160. package/dist/cjs/components/vertical-navigation-item/index.cjs +5 -4
  161. package/dist/cjs/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  162. package/dist/cjs/components/vertical-navigation-menu-item/index.cjs +5 -4
  163. package/dist/cjs/controllers/block-scroll.cjs +75 -41
  164. package/dist/cjs/controllers/click-outside.cjs +60 -30
  165. package/dist/cjs/controllers/click-outside.d.cts +3 -3
  166. package/dist/cjs/controllers/custom-readonly.cjs +52 -58
  167. package/dist/cjs/controllers/floating-ui-auto-update.cjs +76 -98
  168. package/dist/cjs/controllers/focus-trap.cjs +39 -57
  169. package/dist/cjs/controllers/helpers/controller-directive.cjs +46 -45
  170. package/dist/cjs/icon-registry.cjs +147 -161
  171. package/dist/cjs/index.cjs +374 -234
  172. package/dist/cjs/is-client.cjs +3 -4
  173. package/dist/cjs/navigation.cjs +66 -47
  174. package/dist/cjs/tailwind.css.cjs +4 -6
  175. package/dist/cjs/utils/calendar-common.cjs +156 -117
  176. package/dist/cjs/utils/extract-half-width-digits.cjs +17 -8
  177. package/dist/cjs/utils/is-similar-to-click.cjs +3 -3
  178. package/dist/cjs/utils/is-simple-key.cjs +9 -3
  179. package/dist/cjs/utils/notification-common.cjs +14 -27
  180. package/dist/cjs/utils/re-dispatch.cjs +6 -8
  181. package/dist/cjs/utils/scroller.cjs +44 -57
  182. package/dist/cjs-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs +9 -0
  183. package/dist/cjs-dev/_virtual/_rolldown/runtime.cjs +23 -0
  184. package/dist/cjs-dev/base/dds-element.cjs +101 -96
  185. package/dist/cjs-dev/base/dds-form-element.cjs +123 -144
  186. package/dist/cjs-dev/base/dds-property.cjs +46 -5
  187. package/dist/cjs-dev/base/dds-property.d.cts +1 -1
  188. package/dist/cjs-dev/base/decorators.cjs +8 -11
  189. package/dist/cjs-dev/base/define.cjs +11 -17
  190. package/dist/cjs-dev/base/index.cjs +12 -13
  191. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +78 -98
  192. package/dist/cjs-dev/components/accordion/index.cjs +5 -4
  193. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +148 -172
  194. package/dist/cjs-dev/components/accordion-item/index.cjs +5 -4
  195. package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +149 -163
  196. package/dist/cjs-dev/components/avatar/index.cjs +5 -4
  197. package/dist/cjs-dev/components/badge/daikin-badge.cjs +179 -199
  198. package/dist/cjs-dev/components/badge/index.cjs +5 -4
  199. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +80 -88
  200. package/dist/cjs-dev/components/breadcrumb/index.cjs +5 -4
  201. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +120 -127
  202. package/dist/cjs-dev/components/breadcrumb-item/index.cjs +5 -4
  203. package/dist/cjs-dev/components/button/daikin-button.cjs +269 -294
  204. package/dist/cjs-dev/components/button/index.cjs +5 -4
  205. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +429 -539
  206. package/dist/cjs-dev/components/calendar/index.cjs +5 -4
  207. package/dist/cjs-dev/components/card/daikin-card.cjs +52 -61
  208. package/dist/cjs-dev/components/card/index.cjs +5 -4
  209. package/dist/cjs-dev/components/card-footer/daikin-card-footer.cjs +24 -27
  210. package/dist/cjs-dev/components/card-footer/index.cjs +5 -4
  211. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +46 -49
  212. package/dist/cjs-dev/components/card-header/index.cjs +5 -4
  213. package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +403 -202
  214. package/dist/cjs-dev/components/carousel/daikin-carousel.d.cts +50 -7
  215. package/dist/cjs-dev/components/carousel/index.cjs +5 -4
  216. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +69 -61
  217. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.d.cts +1 -5
  218. package/dist/cjs-dev/components/carousel-item/index.cjs +5 -4
  219. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +324 -336
  220. package/dist/cjs-dev/components/checkbox/index.cjs +5 -4
  221. package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +93 -107
  222. package/dist/cjs-dev/components/checkbox-group/index.cjs +5 -4
  223. package/dist/cjs-dev/components/chip/daikin-chip.cjs +331 -335
  224. package/dist/cjs-dev/components/chip/daikin-chip.d.cts +2 -0
  225. package/dist/cjs-dev/components/chip/index.cjs +5 -4
  226. package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +480 -593
  227. package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +8 -0
  228. package/dist/cjs-dev/components/combobox/index.cjs +6 -5
  229. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +817 -853
  230. package/dist/cjs-dev/components/date-picker/index.cjs +5 -4
  231. package/dist/cjs-dev/components/divider/daikin-divider.cjs +32 -36
  232. package/dist/cjs-dev/components/divider/index.cjs +5 -4
  233. package/dist/cjs-dev/components/drawer/daikin-drawer.cjs +200 -213
  234. package/dist/cjs-dev/components/drawer/index.cjs +5 -4
  235. package/dist/cjs-dev/components/drawer-footer/daikin-drawer-footer.cjs +26 -29
  236. package/dist/cjs-dev/components/drawer-footer/index.cjs +5 -4
  237. package/dist/cjs-dev/components/drawer-header/daikin-drawer-header.cjs +62 -67
  238. package/dist/cjs-dev/components/drawer-header/index.cjs +5 -4
  239. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +479 -575
  240. package/dist/cjs-dev/components/dropdown/index.cjs +5 -4
  241. package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +130 -151
  242. package/dist/cjs-dev/components/dropdown-item/index.cjs +5 -4
  243. package/dist/cjs-dev/components/empty-state/daikin-empty-state.cjs +28 -31
  244. package/dist/cjs-dev/components/empty-state/index.cjs +5 -4
  245. package/dist/cjs-dev/components/icon/daikin-icon.cjs +167 -208
  246. package/dist/cjs-dev/components/icon/icons.json.cjs +97 -6
  247. package/dist/cjs-dev/components/icon/index.cjs +6 -5
  248. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +290 -274
  249. package/dist/cjs-dev/components/icon-button/index.cjs +5 -4
  250. package/dist/cjs-dev/components/index.cjs +435 -226
  251. package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +138 -162
  252. package/dist/cjs-dev/components/inline-notification/index.cjs +5 -4
  253. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +191 -235
  254. package/dist/cjs-dev/components/input-group/index.cjs +5 -4
  255. package/dist/cjs-dev/components/link/daikin-link.cjs +122 -132
  256. package/dist/cjs-dev/components/link/index.cjs +5 -4
  257. package/dist/cjs-dev/components/list/daikin-list.cjs +84 -101
  258. package/dist/cjs-dev/components/list/index.cjs +5 -4
  259. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +179 -196
  260. package/dist/cjs-dev/components/list-item/index.cjs +5 -4
  261. package/dist/cjs-dev/components/loading/daikin-loading.cjs +70 -84
  262. package/dist/cjs-dev/components/loading/index.cjs +5 -4
  263. package/dist/cjs-dev/components/logo/daikin-logo.cjs +115 -128
  264. package/dist/cjs-dev/components/logo/index.cjs +5 -4
  265. package/dist/cjs-dev/components/menu/daikin-menu.cjs +258 -322
  266. package/dist/cjs-dev/components/menu/index.cjs +5 -4
  267. package/dist/cjs-dev/components/modal/daikin-modal.cjs +107 -130
  268. package/dist/cjs-dev/components/modal/index.cjs +5 -4
  269. package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +26 -29
  270. package/dist/cjs-dev/components/modal-footer/index.cjs +5 -4
  271. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +70 -75
  272. package/dist/cjs-dev/components/modal-header/index.cjs +5 -4
  273. package/dist/cjs-dev/components/navigation/daikin-navigation.cjs +50 -54
  274. package/dist/cjs-dev/components/navigation/index.cjs +5 -4
  275. package/dist/cjs-dev/components/navigation-item/daikin-navigation-item.cjs +165 -188
  276. package/dist/cjs-dev/components/navigation-item/index.cjs +5 -4
  277. package/dist/cjs-dev/components/pagination/daikin-pagination.cjs +191 -221
  278. package/dist/cjs-dev/components/pagination/index.cjs +5 -4
  279. package/dist/cjs-dev/components/pagination/pagination-utils.cjs +76 -41
  280. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +145 -184
  281. package/dist/cjs-dev/components/progress-bar/index.cjs +5 -4
  282. package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +55 -62
  283. package/dist/cjs-dev/components/progress-indicator/index.cjs +5 -4
  284. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +55 -70
  285. package/dist/cjs-dev/components/progress-indicator-item/index.cjs +5 -4
  286. package/dist/cjs-dev/components/radio/daikin-radio.cjs +273 -285
  287. package/dist/cjs-dev/components/radio/index.cjs +5 -4
  288. package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +149 -171
  289. package/dist/cjs-dev/components/radio-group/index.cjs +5 -4
  290. package/dist/cjs-dev/components/select/daikin-select.cjs +231 -264
  291. package/dist/cjs-dev/components/select/index.cjs +5 -4
  292. package/dist/cjs-dev/components/slider/daikin-slider.cjs +250 -301
  293. package/dist/cjs-dev/components/slider/index.cjs +5 -4
  294. package/dist/cjs-dev/components/slider/slider-utils.cjs +61 -45
  295. package/dist/cjs-dev/components/status-message/daikin-status-message.cjs +115 -113
  296. package/dist/cjs-dev/components/status-message/index.cjs +5 -4
  297. package/dist/cjs-dev/components/tab/daikin-tab.cjs +112 -132
  298. package/dist/cjs-dev/components/tab/index.cjs +5 -4
  299. package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.cjs +44 -59
  300. package/dist/cjs-dev/components/tab-panels/index.cjs +5 -4
  301. package/dist/cjs-dev/components/table/daikin-table.cjs +271 -330
  302. package/dist/cjs-dev/components/table/index.cjs +5 -4
  303. package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +55 -69
  304. package/dist/cjs-dev/components/table-cell/index.cjs +5 -4
  305. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +129 -139
  306. package/dist/cjs-dev/components/table-header-cell/index.cjs +5 -4
  307. package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +184 -229
  308. package/dist/cjs-dev/components/tabs/index.cjs +5 -4
  309. package/dist/cjs-dev/components/tag/daikin-tag.cjs +150 -152
  310. package/dist/cjs-dev/components/tag/index.cjs +5 -4
  311. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +161 -175
  312. package/dist/cjs-dev/components/text-area/index.cjs +5 -4
  313. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +388 -438
  314. package/dist/cjs-dev/components/text-field/index.cjs +5 -4
  315. package/dist/cjs-dev/components/text-field/number-utils.cjs +78 -93
  316. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +292 -308
  317. package/dist/cjs-dev/components/text-masked-field/index.cjs +5 -4
  318. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +697 -764
  319. package/dist/cjs-dev/components/time-picker/index.cjs +15 -14
  320. package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +143 -170
  321. package/dist/cjs-dev/components/toast-notification/index.cjs +5 -4
  322. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +173 -195
  323. package/dist/cjs-dev/components/toast-notification-manager/index.cjs +5 -4
  324. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +169 -178
  325. package/dist/cjs-dev/components/toggle/index.cjs +5 -4
  326. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +165 -202
  327. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +2 -2
  328. package/dist/cjs-dev/components/tooltip/index.cjs +5 -4
  329. package/dist/cjs-dev/components/tree/common.cjs +74 -70
  330. package/dist/cjs-dev/components/tree/daikin-tree.cjs +89 -103
  331. package/dist/cjs-dev/components/tree/index.cjs +5 -4
  332. package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +178 -198
  333. package/dist/cjs-dev/components/tree-item/index.cjs +6 -5
  334. package/dist/cjs-dev/components/tree-section/daikin-tree-section.cjs +169 -215
  335. package/dist/cjs-dev/components/tree-section/index.cjs +5 -4
  336. package/dist/cjs-dev/components/vertical-navigation/daikin-vertical-navigation.cjs +88 -116
  337. package/dist/cjs-dev/components/vertical-navigation/index.cjs +5 -4
  338. package/dist/cjs-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.cjs +463 -482
  339. package/dist/cjs-dev/components/vertical-navigation-item/index.cjs +5 -4
  340. package/dist/cjs-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.cjs +196 -214
  341. package/dist/cjs-dev/components/vertical-navigation-menu-item/index.cjs +5 -4
  342. package/dist/cjs-dev/controllers/block-scroll.cjs +75 -41
  343. package/dist/cjs-dev/controllers/click-outside.cjs +60 -30
  344. package/dist/cjs-dev/controllers/click-outside.d.cts +3 -3
  345. package/dist/cjs-dev/controllers/custom-readonly.cjs +52 -58
  346. package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +78 -105
  347. package/dist/cjs-dev/controllers/focus-trap.cjs +39 -57
  348. package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +46 -45
  349. package/dist/cjs-dev/icon-registry.cjs +147 -161
  350. package/dist/cjs-dev/index.cjs +374 -234
  351. package/dist/cjs-dev/is-client.cjs +3 -4
  352. package/dist/cjs-dev/navigation.cjs +66 -47
  353. package/dist/cjs-dev/tailwind.css.cjs +4 -6
  354. package/dist/cjs-dev/utils/calendar-common.cjs +156 -117
  355. package/dist/cjs-dev/utils/extract-half-width-digits.cjs +17 -8
  356. package/dist/cjs-dev/utils/is-similar-to-click.cjs +3 -3
  357. package/dist/cjs-dev/utils/is-simple-key.cjs +9 -3
  358. package/dist/cjs-dev/utils/notification-common.cjs +17 -30
  359. package/dist/cjs-dev/utils/re-dispatch.cjs +6 -8
  360. package/dist/cjs-dev/utils/scroller.cjs +44 -57
  361. package/dist/es/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  362. package/dist/es/base/dds-element.js +100 -86
  363. package/dist/es/base/dds-form-element.js +122 -144
  364. package/dist/es/base/dds-property.d.ts +1 -1
  365. package/dist/es/base/dds-property.js +48 -8
  366. package/dist/es/base/decorators.js +8 -11
  367. package/dist/es/base/define.js +12 -17
  368. package/dist/es/base/index.js +3 -11
  369. package/dist/es/components/accordion/daikin-accordion.js +69 -89
  370. package/dist/es/components/accordion/index.js +1 -3
  371. package/dist/es/components/accordion-item/daikin-accordion-item.js +138 -168
  372. package/dist/es/components/accordion-item/index.js +1 -3
  373. package/dist/es/components/avatar/daikin-avatar.js +136 -156
  374. package/dist/es/components/avatar/index.js +1 -3
  375. package/dist/es/components/badge/daikin-badge.js +173 -198
  376. package/dist/es/components/badge/index.js +1 -3
  377. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +73 -87
  378. package/dist/es/components/breadcrumb/index.js +1 -3
  379. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  380. package/dist/es/components/breadcrumb-item/index.js +1 -3
  381. package/dist/es/components/button/daikin-button.js +255 -286
  382. package/dist/es/components/button/index.js +1 -3
  383. package/dist/es/components/calendar/daikin-calendar.js +407 -520
  384. package/dist/es/components/calendar/index.js +1 -3
  385. package/dist/es/components/card/daikin-card.js +44 -58
  386. package/dist/es/components/card/index.js +1 -3
  387. package/dist/es/components/card-footer/daikin-card-footer.js +16 -25
  388. package/dist/es/components/card-footer/index.js +1 -3
  389. package/dist/es/components/card-header/daikin-card-header.js +39 -48
  390. package/dist/es/components/card-header/index.js +1 -3
  391. package/dist/es/components/carousel/daikin-carousel.d.ts +50 -7
  392. package/dist/es/components/carousel/daikin-carousel.js +387 -190
  393. package/dist/es/components/carousel/index.js +1 -3
  394. package/dist/es/components/carousel-item/daikin-carousel-item.d.ts +1 -5
  395. package/dist/es/components/carousel-item/daikin-carousel-item.js +62 -60
  396. package/dist/es/components/carousel-item/index.js +1 -3
  397. package/dist/es/components/checkbox/daikin-checkbox.js +315 -333
  398. package/dist/es/components/checkbox/index.js +1 -3
  399. package/dist/es/components/checkbox-group/daikin-checkbox-group.js +86 -106
  400. package/dist/es/components/checkbox-group/index.js +1 -3
  401. package/dist/es/components/chip/daikin-chip.d.ts +2 -0
  402. package/dist/es/components/chip/daikin-chip.js +323 -333
  403. package/dist/es/components/chip/index.js +1 -3
  404. package/dist/es/components/combobox/daikin-combobox.d.ts +8 -0
  405. package/dist/es/components/combobox/daikin-combobox.js +465 -585
  406. package/dist/es/components/combobox/index.js +1 -4
  407. package/dist/es/components/date-picker/daikin-date-picker.js +787 -826
  408. package/dist/es/components/date-picker/index.js +1 -3
  409. package/dist/es/components/divider/daikin-divider.js +25 -34
  410. package/dist/es/components/divider/index.js +1 -3
  411. package/dist/es/components/drawer/daikin-drawer.js +189 -208
  412. package/dist/es/components/drawer/index.js +1 -3
  413. package/dist/es/components/drawer-footer/daikin-drawer-footer.js +18 -27
  414. package/dist/es/components/drawer-footer/index.js +1 -3
  415. package/dist/es/components/drawer-header/daikin-drawer-header.js +53 -64
  416. package/dist/es/components/drawer-header/index.js +1 -3
  417. package/dist/es/components/dropdown/daikin-dropdown.js +468 -570
  418. package/dist/es/components/dropdown/index.js +1 -3
  419. package/dist/es/components/dropdown-item/daikin-dropdown-item.js +124 -150
  420. package/dist/es/components/dropdown-item/index.js +1 -3
  421. package/dist/es/components/empty-state/daikin-empty-state.js +21 -30
  422. package/dist/es/components/empty-state/index.js +1 -3
  423. package/dist/es/components/icon/daikin-icon.js +150 -177
  424. package/dist/es/components/icon/icons.json.js +97 -7
  425. package/dist/es/components/icon/index.js +1 -4
  426. package/dist/es/components/icon-button/daikin-icon-button.js +277 -267
  427. package/dist/es/components/icon-button/index.js +1 -3
  428. package/dist/es/components/index.js +85 -99
  429. package/dist/es/components/inline-notification/daikin-inline-notification.js +130 -160
  430. package/dist/es/components/inline-notification/index.js +1 -3
  431. package/dist/es/components/input-group/daikin-input-group.js +184 -234
  432. package/dist/es/components/input-group/index.js +1 -3
  433. package/dist/es/components/link/daikin-link.js +111 -127
  434. package/dist/es/components/link/index.js +1 -3
  435. package/dist/es/components/list/daikin-list.js +77 -100
  436. package/dist/es/components/list/index.js +1 -3
  437. package/dist/es/components/list-item/daikin-list-item.js +168 -192
  438. package/dist/es/components/list-item/index.js +1 -3
  439. package/dist/es/components/loading/daikin-loading.js +62 -82
  440. package/dist/es/components/loading/index.js +1 -3
  441. package/dist/es/components/logo/daikin-logo.js +106 -125
  442. package/dist/es/components/logo/index.js +1 -3
  443. package/dist/es/components/menu/daikin-menu.js +246 -316
  444. package/dist/es/components/menu/index.js +1 -3
  445. package/dist/es/components/modal/daikin-modal.js +97 -126
  446. package/dist/es/components/modal/index.js +1 -3
  447. package/dist/es/components/modal-footer/daikin-modal-footer.js +18 -27
  448. package/dist/es/components/modal-footer/index.js +1 -3
  449. package/dist/es/components/modal-header/daikin-modal-header.js +61 -72
  450. package/dist/es/components/modal-header/index.js +1 -3
  451. package/dist/es/components/navigation/daikin-navigation.js +42 -52
  452. package/dist/es/components/navigation/index.js +1 -3
  453. package/dist/es/components/navigation-item/daikin-navigation-item.js +152 -181
  454. package/dist/es/components/navigation-item/index.js +1 -3
  455. package/dist/es/components/pagination/daikin-pagination.js +183 -219
  456. package/dist/es/components/pagination/index.js +1 -3
  457. package/dist/es/components/pagination/pagination-utils.js +77 -44
  458. package/dist/es/components/progress-bar/daikin-progress-bar.js +129 -168
  459. package/dist/es/components/progress-bar/index.js +1 -3
  460. package/dist/es/components/progress-indicator/daikin-progress-indicator.js +47 -60
  461. package/dist/es/components/progress-indicator/index.js +1 -3
  462. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  463. package/dist/es/components/progress-indicator-item/index.js +1 -3
  464. package/dist/es/components/radio/daikin-radio.js +264 -282
  465. package/dist/es/components/radio/index.js +1 -3
  466. package/dist/es/components/radio-group/daikin-radio-group.js +142 -170
  467. package/dist/es/components/radio-group/index.js +1 -3
  468. package/dist/es/components/select/daikin-select.js +222 -261
  469. package/dist/es/components/select/index.js +1 -3
  470. package/dist/es/components/slider/daikin-slider.js +241 -298
  471. package/dist/es/components/slider/index.js +1 -3
  472. package/dist/es/components/slider/slider-utils.js +62 -49
  473. package/dist/es/components/status-message/daikin-status-message.js +107 -111
  474. package/dist/es/components/status-message/index.js +1 -3
  475. package/dist/es/components/tab/daikin-tab.js +105 -130
  476. package/dist/es/components/tab/index.js +1 -3
  477. package/dist/es/components/tab-panels/daikin-tab-panels.js +35 -50
  478. package/dist/es/components/tab-panels/index.js +1 -3
  479. package/dist/es/components/table/daikin-table.js +255 -314
  480. package/dist/es/components/table/index.js +1 -3
  481. package/dist/es/components/table-cell/daikin-table-cell.js +49 -68
  482. package/dist/es/components/table-cell/index.js +1 -3
  483. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +121 -137
  484. package/dist/es/components/table-header-cell/index.js +1 -3
  485. package/dist/es/components/tabs/daikin-tabs.js +170 -217
  486. package/dist/es/components/tabs/index.js +1 -3
  487. package/dist/es/components/tag/daikin-tag.js +142 -150
  488. package/dist/es/components/tag/index.js +1 -3
  489. package/dist/es/components/text-area/daikin-text-area.js +153 -173
  490. package/dist/es/components/text-area/index.js +1 -3
  491. package/dist/es/components/text-field/daikin-text-field.js +371 -427
  492. package/dist/es/components/text-field/index.js +1 -3
  493. package/dist/es/components/text-field/number-utils.js +75 -90
  494. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +279 -303
  495. package/dist/es/components/text-masked-field/index.js +1 -3
  496. package/dist/es/components/time-picker/daikin-time-picker.js +677 -756
  497. package/dist/es/components/time-picker/index.js +1 -13
  498. package/dist/es/components/toast-notification/daikin-toast-notification.js +134 -167
  499. package/dist/es/components/toast-notification/index.js +1 -3
  500. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  501. package/dist/es/components/toast-notification-manager/index.js +1 -3
  502. package/dist/es/components/toggle/daikin-toggle.js +160 -175
  503. package/dist/es/components/toggle/index.js +1 -3
  504. package/dist/es/components/tooltip/daikin-tooltip.d.ts +2 -2
  505. package/dist/es/components/tooltip/daikin-tooltip.js +156 -199
  506. package/dist/es/components/tooltip/index.js +1 -3
  507. package/dist/es/components/tree/common.js +75 -76
  508. package/dist/es/components/tree/daikin-tree.js +81 -101
  509. package/dist/es/components/tree/index.js +1 -3
  510. package/dist/es/components/tree-item/daikin-tree-item.js +166 -193
  511. package/dist/es/components/tree-item/index.js +1 -4
  512. package/dist/es/components/tree-section/daikin-tree-section.js +157 -209
  513. package/dist/es/components/tree-section/index.js +1 -3
  514. package/dist/es/components/vertical-navigation/daikin-vertical-navigation.js +76 -102
  515. package/dist/es/components/vertical-navigation/index.js +1 -3
  516. package/dist/es/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  517. package/dist/es/components/vertical-navigation-item/index.js +1 -3
  518. package/dist/es/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  519. package/dist/es/components/vertical-navigation-menu-item/index.js +1 -3
  520. package/dist/es/controllers/block-scroll.js +74 -41
  521. package/dist/es/controllers/click-outside.d.ts +3 -3
  522. package/dist/es/controllers/click-outside.js +59 -29
  523. package/dist/es/controllers/custom-readonly.js +52 -58
  524. package/dist/es/controllers/floating-ui-auto-update.js +74 -96
  525. package/dist/es/controllers/focus-trap.js +37 -55
  526. package/dist/es/controllers/helpers/controller-directive.js +46 -45
  527. package/dist/es/icon-registry.js +148 -163
  528. package/dist/es/index.js +17 -106
  529. package/dist/es/is-client.js +4 -4
  530. package/dist/es/navigation.js +67 -51
  531. package/dist/es/tailwind.css.js +4 -6
  532. package/dist/es/utils/calendar-common.js +156 -134
  533. package/dist/es/utils/extract-half-width-digits.js +18 -9
  534. package/dist/es/utils/is-similar-to-click.js +4 -4
  535. package/dist/es/utils/is-simple-key.js +10 -4
  536. package/dist/es/utils/notification-common.js +14 -28
  537. package/dist/es/utils/re-dispatch.js +7 -9
  538. package/dist/es/utils/scroller.js +45 -61
  539. package/dist/es-dev/_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.js +9 -0
  540. package/dist/es-dev/base/dds-element.js +101 -96
  541. package/dist/es-dev/base/dds-form-element.js +122 -144
  542. package/dist/es-dev/base/dds-property.d.ts +1 -1
  543. package/dist/es-dev/base/dds-property.js +48 -8
  544. package/dist/es-dev/base/decorators.js +8 -11
  545. package/dist/es-dev/base/define.js +12 -17
  546. package/dist/es-dev/base/index.js +3 -11
  547. package/dist/es-dev/components/accordion/daikin-accordion.js +70 -96
  548. package/dist/es-dev/components/accordion/index.js +1 -3
  549. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +138 -168
  550. package/dist/es-dev/components/accordion-item/index.js +1 -3
  551. package/dist/es-dev/components/avatar/daikin-avatar.js +136 -156
  552. package/dist/es-dev/components/avatar/index.js +1 -3
  553. package/dist/es-dev/components/badge/daikin-badge.js +173 -198
  554. package/dist/es-dev/components/badge/index.js +1 -3
  555. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +73 -87
  556. package/dist/es-dev/components/breadcrumb/index.js +1 -3
  557. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +106 -119
  558. package/dist/es-dev/components/breadcrumb-item/index.js +1 -3
  559. package/dist/es-dev/components/button/daikin-button.js +255 -286
  560. package/dist/es-dev/components/button/index.js +1 -3
  561. package/dist/es-dev/components/calendar/daikin-calendar.js +415 -531
  562. package/dist/es-dev/components/calendar/index.js +1 -3
  563. package/dist/es-dev/components/card/daikin-card.js +44 -58
  564. package/dist/es-dev/components/card/index.js +1 -3
  565. package/dist/es-dev/components/card-footer/daikin-card-footer.js +16 -25
  566. package/dist/es-dev/components/card-footer/index.js +1 -3
  567. package/dist/es-dev/components/card-header/daikin-card-header.js +39 -48
  568. package/dist/es-dev/components/card-header/index.js +1 -3
  569. package/dist/es-dev/components/carousel/daikin-carousel.d.ts +50 -7
  570. package/dist/es-dev/components/carousel/daikin-carousel.js +393 -200
  571. package/dist/es-dev/components/carousel/index.js +1 -3
  572. package/dist/es-dev/components/carousel-item/daikin-carousel-item.d.ts +1 -5
  573. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +62 -60
  574. package/dist/es-dev/components/carousel-item/index.js +1 -3
  575. package/dist/es-dev/components/checkbox/daikin-checkbox.js +315 -333
  576. package/dist/es-dev/components/checkbox/index.js +1 -3
  577. package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +86 -106
  578. package/dist/es-dev/components/checkbox-group/index.js +1 -3
  579. package/dist/es-dev/components/chip/daikin-chip.d.ts +2 -0
  580. package/dist/es-dev/components/chip/daikin-chip.js +323 -333
  581. package/dist/es-dev/components/chip/index.js +1 -3
  582. package/dist/es-dev/components/combobox/daikin-combobox.d.ts +8 -0
  583. package/dist/es-dev/components/combobox/daikin-combobox.js +465 -585
  584. package/dist/es-dev/components/combobox/index.js +1 -4
  585. package/dist/es-dev/components/date-picker/daikin-date-picker.js +795 -837
  586. package/dist/es-dev/components/date-picker/index.js +1 -3
  587. package/dist/es-dev/components/divider/daikin-divider.js +25 -34
  588. package/dist/es-dev/components/divider/index.js +1 -3
  589. package/dist/es-dev/components/drawer/daikin-drawer.js +189 -208
  590. package/dist/es-dev/components/drawer/index.js +1 -3
  591. package/dist/es-dev/components/drawer-footer/daikin-drawer-footer.js +18 -27
  592. package/dist/es-dev/components/drawer-footer/index.js +1 -3
  593. package/dist/es-dev/components/drawer-header/daikin-drawer-header.js +53 -64
  594. package/dist/es-dev/components/drawer-header/index.js +1 -3
  595. package/dist/es-dev/components/dropdown/daikin-dropdown.js +468 -570
  596. package/dist/es-dev/components/dropdown/index.js +1 -3
  597. package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +124 -150
  598. package/dist/es-dev/components/dropdown-item/index.js +1 -3
  599. package/dist/es-dev/components/empty-state/daikin-empty-state.js +21 -30
  600. package/dist/es-dev/components/empty-state/index.js +1 -3
  601. package/dist/es-dev/components/icon/daikin-icon.js +158 -206
  602. package/dist/es-dev/components/icon/icons.json.js +97 -7
  603. package/dist/es-dev/components/icon/index.js +1 -4
  604. package/dist/es-dev/components/icon-button/daikin-icon-button.js +277 -267
  605. package/dist/es-dev/components/icon-button/index.js +1 -3
  606. package/dist/es-dev/components/index.js +85 -99
  607. package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +130 -160
  608. package/dist/es-dev/components/inline-notification/index.js +1 -3
  609. package/dist/es-dev/components/input-group/daikin-input-group.js +184 -234
  610. package/dist/es-dev/components/input-group/index.js +1 -3
  611. package/dist/es-dev/components/link/daikin-link.js +111 -127
  612. package/dist/es-dev/components/link/index.js +1 -3
  613. package/dist/es-dev/components/list/daikin-list.js +77 -100
  614. package/dist/es-dev/components/list/index.js +1 -3
  615. package/dist/es-dev/components/list-item/daikin-list-item.js +168 -192
  616. package/dist/es-dev/components/list-item/index.js +1 -3
  617. package/dist/es-dev/components/loading/daikin-loading.js +62 -82
  618. package/dist/es-dev/components/loading/index.js +1 -3
  619. package/dist/es-dev/components/logo/daikin-logo.js +106 -125
  620. package/dist/es-dev/components/logo/index.js +1 -3
  621. package/dist/es-dev/components/menu/daikin-menu.js +246 -316
  622. package/dist/es-dev/components/menu/index.js +1 -3
  623. package/dist/es-dev/components/modal/daikin-modal.js +97 -126
  624. package/dist/es-dev/components/modal/index.js +1 -3
  625. package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +18 -27
  626. package/dist/es-dev/components/modal-footer/index.js +1 -3
  627. package/dist/es-dev/components/modal-header/daikin-modal-header.js +61 -72
  628. package/dist/es-dev/components/modal-header/index.js +1 -3
  629. package/dist/es-dev/components/navigation/daikin-navigation.js +42 -52
  630. package/dist/es-dev/components/navigation/index.js +1 -3
  631. package/dist/es-dev/components/navigation-item/daikin-navigation-item.js +152 -181
  632. package/dist/es-dev/components/navigation-item/index.js +1 -3
  633. package/dist/es-dev/components/pagination/daikin-pagination.js +183 -219
  634. package/dist/es-dev/components/pagination/index.js +1 -3
  635. package/dist/es-dev/components/pagination/pagination-utils.js +77 -44
  636. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +138 -183
  637. package/dist/es-dev/components/progress-bar/index.js +1 -3
  638. package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +47 -60
  639. package/dist/es-dev/components/progress-indicator/index.js +1 -3
  640. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +48 -69
  641. package/dist/es-dev/components/progress-indicator-item/index.js +1 -3
  642. package/dist/es-dev/components/radio/daikin-radio.js +264 -282
  643. package/dist/es-dev/components/radio/index.js +1 -3
  644. package/dist/es-dev/components/radio-group/daikin-radio-group.js +142 -170
  645. package/dist/es-dev/components/radio-group/index.js +1 -3
  646. package/dist/es-dev/components/select/daikin-select.js +222 -261
  647. package/dist/es-dev/components/select/index.js +1 -3
  648. package/dist/es-dev/components/slider/daikin-slider.js +241 -298
  649. package/dist/es-dev/components/slider/index.js +1 -3
  650. package/dist/es-dev/components/slider/slider-utils.js +62 -49
  651. package/dist/es-dev/components/status-message/daikin-status-message.js +107 -111
  652. package/dist/es-dev/components/status-message/index.js +1 -3
  653. package/dist/es-dev/components/tab/daikin-tab.js +105 -130
  654. package/dist/es-dev/components/tab/index.js +1 -3
  655. package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +36 -57
  656. package/dist/es-dev/components/tab-panels/index.js +1 -3
  657. package/dist/es-dev/components/table/daikin-table.js +261 -326
  658. package/dist/es-dev/components/table/index.js +1 -3
  659. package/dist/es-dev/components/table-cell/daikin-table-cell.js +49 -68
  660. package/dist/es-dev/components/table-cell/index.js +1 -3
  661. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +121 -137
  662. package/dist/es-dev/components/table-header-cell/index.js +1 -3
  663. package/dist/es-dev/components/tabs/daikin-tabs.js +176 -227
  664. package/dist/es-dev/components/tabs/index.js +1 -3
  665. package/dist/es-dev/components/tag/daikin-tag.js +142 -150
  666. package/dist/es-dev/components/tag/index.js +1 -3
  667. package/dist/es-dev/components/text-area/daikin-text-area.js +153 -173
  668. package/dist/es-dev/components/text-area/index.js +1 -3
  669. package/dist/es-dev/components/text-field/daikin-text-field.js +371 -427
  670. package/dist/es-dev/components/text-field/index.js +1 -3
  671. package/dist/es-dev/components/text-field/number-utils.js +76 -93
  672. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +279 -303
  673. package/dist/es-dev/components/text-masked-field/index.js +1 -3
  674. package/dist/es-dev/components/time-picker/daikin-time-picker.js +685 -768
  675. package/dist/es-dev/components/time-picker/index.js +1 -13
  676. package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +134 -167
  677. package/dist/es-dev/components/toast-notification/index.js +1 -3
  678. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +165 -193
  679. package/dist/es-dev/components/toast-notification-manager/index.js +1 -3
  680. package/dist/es-dev/components/toggle/daikin-toggle.js +160 -175
  681. package/dist/es-dev/components/toggle/index.js +1 -3
  682. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +2 -2
  683. package/dist/es-dev/components/tooltip/daikin-tooltip.js +156 -199
  684. package/dist/es-dev/components/tooltip/index.js +1 -3
  685. package/dist/es-dev/components/tree/common.js +75 -76
  686. package/dist/es-dev/components/tree/daikin-tree.js +81 -101
  687. package/dist/es-dev/components/tree/index.js +1 -3
  688. package/dist/es-dev/components/tree-item/daikin-tree-item.js +166 -193
  689. package/dist/es-dev/components/tree-item/index.js +1 -4
  690. package/dist/es-dev/components/tree-section/daikin-tree-section.js +157 -209
  691. package/dist/es-dev/components/tree-section/index.js +1 -3
  692. package/dist/es-dev/components/vertical-navigation/daikin-vertical-navigation.js +80 -114
  693. package/dist/es-dev/components/vertical-navigation/index.js +1 -3
  694. package/dist/es-dev/components/vertical-navigation-item/daikin-vertical-navigation-item.js +443 -468
  695. package/dist/es-dev/components/vertical-navigation-item/index.js +1 -3
  696. package/dist/es-dev/components/vertical-navigation-menu-item/daikin-vertical-navigation-menu-item.js +185 -209
  697. package/dist/es-dev/components/vertical-navigation-menu-item/index.js +1 -3
  698. package/dist/es-dev/controllers/block-scroll.js +74 -41
  699. package/dist/es-dev/controllers/click-outside.d.ts +3 -3
  700. package/dist/es-dev/controllers/click-outside.js +59 -29
  701. package/dist/es-dev/controllers/custom-readonly.js +52 -58
  702. package/dist/es-dev/controllers/floating-ui-auto-update.js +76 -103
  703. package/dist/es-dev/controllers/focus-trap.js +37 -55
  704. package/dist/es-dev/controllers/helpers/controller-directive.js +46 -45
  705. package/dist/es-dev/icon-registry.js +148 -163
  706. package/dist/es-dev/index.js +17 -106
  707. package/dist/es-dev/is-client.js +4 -4
  708. package/dist/es-dev/navigation.js +67 -51
  709. package/dist/es-dev/tailwind.css.js +4 -6
  710. package/dist/es-dev/utils/calendar-common.js +156 -134
  711. package/dist/es-dev/utils/extract-half-width-digits.js +18 -9
  712. package/dist/es-dev/utils/is-similar-to-click.js +4 -4
  713. package/dist/es-dev/utils/is-simple-key.js +10 -4
  714. package/dist/es-dev/utils/notification-common.js +17 -31
  715. package/dist/es-dev/utils/re-dispatch.js +7 -9
  716. package/dist/es-dev/utils/scroller.js +45 -61
  717. package/package.json +81 -78
@@ -1,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,130 +660,97 @@ 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
- if (changedProperties.has("hourCycle")) {
696
- if (isValidValueTime(this.value)) {
697
- this._syncMeridiemWithValue();
698
- }
699
- if (isValidValueTime(this.value)) {
700
- this.error = isTimeOutOfRange(this.value, this.min, this.max);
701
- }
702
- }
703
- if (changedProperties.has("value")) {
704
- if (isValidValueTime(this.value)) {
705
- if (this.hourCycle !== "h23") {
706
- this._syncMeridiemWithValue();
707
- }
708
- if (isTimeOutOfRange(this.value, this.min, this.max)) {
709
- this.error = true;
710
- } else {
711
- this.error = false;
712
- }
713
- }
714
- }
715
- }
716
- updated(changedProperties) {
717
- if (changedProperties.has("value")) {
718
- this.setFormValue(this.value);
719
- }
720
- }
721
- /**
722
- * This method is used by `daikin-input-group` to reflect it's attributes to this component.
723
- * @private
724
- */
725
- reflectInputGroup(inputGroup) {
726
- const isError = !inputGroup.disabled && !!inputGroup.error;
727
- this.disabled = !!inputGroup.disabled;
728
- this.readonly = !!inputGroup.readonly;
729
- this.required = !!inputGroup.required;
730
- this.error = isError;
731
- this._label = inputGroup.label ?? null;
732
- }
663
+ }
664
+ willUpdate(changedProperties) {
665
+ if (changedProperties.has("hourCycle")) {
666
+ if (isValidValueTime(this.value)) this._syncMeridiemWithValue();
667
+ if (isValidValueTime(this.value)) this.error = isTimeOutOfRange(this.value, this.min, this.max);
668
+ }
669
+ if (changedProperties.has("value")) {
670
+ if (isValidValueTime(this.value)) {
671
+ if (this.hourCycle !== "h23") this._syncMeridiemWithValue();
672
+ if (isTimeOutOfRange(this.value, this.min, this.max)) this.error = true;
673
+ else this.error = false;
674
+ }
675
+ }
676
+ }
677
+ updated(changedProperties) {
678
+ if (changedProperties.has("value")) this.setFormValue(this.value);
679
+ }
680
+ /**
681
+ * This method is used by `daikin-input-group` to reflect it's attributes to this component.
682
+ * @private
683
+ */
684
+ reflectInputGroup(inputGroup) {
685
+ const isError = !inputGroup.disabled && !!inputGroup.error;
686
+ this.disabled = !!inputGroup.disabled;
687
+ this.readonly = !!inputGroup.readonly;
688
+ this.required = !!inputGroup.required;
689
+ this.error = isError;
690
+ this._label = inputGroup.label ?? null;
691
+ }
733
692
  };
734
- exports.DaikinTimePicker.styles = lit.css`
735
- ${lit.unsafeCSS(tailwind.default)}
736
-
737
- :host {
738
- display: inline-flex;
739
- align-items: center;
740
- height: var(--dds-input-height, 3rem);
741
- width: fit-content;
742
- }
743
-
744
- :host([readonly]:not([disabled])) input {
745
- --color-base: var(--dds-color-common-surface-secondary);
746
- background-color: var(--dds-color-common-surface-secondary);
747
- }
748
-
749
- :host([readonly]:not([disabled])) input:hover,
750
- :host([readonly]:not([disabled])) input:active {
751
- --color-base: var(--dds-color-common-surface-secondary);
752
- background-color: var(--dds-color-common-surface-secondary);
753
- }
754
-
755
- :host([readonly][error]:not([disabled])) input,
756
- :host([readonly][error]:not([disabled])) input:hover,
757
- :host([readonly][error]:not([disabled])) input:active {
758
- --color-base: var(--dds-color-common-danger-default);
759
- }
760
- `;
761
- __decorateClass([
762
- ddsProperty.property({ type: String, reflect: true, fallbackValue: "hh:mm" })
763
- ], exports.DaikinTimePicker.prototype, "placeholder", 2);
764
- __decorateClass([
765
- ddsProperty.property({ type: String, reflect: true, fallbackValue: DEFAULT_MIN_TIME })
766
- ], exports.DaikinTimePicker.prototype, "min", 2);
767
- __decorateClass([
768
- ddsProperty.property({ type: String, reflect: true, fallbackValue: DEFAULT_MAX_TIME })
769
- ], exports.DaikinTimePicker.prototype, "max", 2);
770
- __decorateClass([
771
- ddsProperty.property({ type: Boolean, reflect: true })
772
- ], exports.DaikinTimePicker.prototype, "disabled", 2);
773
- __decorateClass([
774
- ddsProperty.property({ type: Boolean, reflect: true })
775
- ], exports.DaikinTimePicker.prototype, "readonly", 2);
776
- __decorateClass([
777
- ddsProperty.property({ type: Boolean, reflect: true })
778
- ], exports.DaikinTimePicker.prototype, "required", 2);
779
- __decorateClass([
780
- ddsProperty.property({ type: Boolean, reflect: true })
781
- ], exports.DaikinTimePicker.prototype, "error", 2);
782
- __decorateClass([
783
- ddsProperty.property({
784
- type: String,
785
- reflect: true,
786
- attribute: "hour-cycle",
787
- fallbackValue: "h12",
788
- isAllowedValue: ddsProperty.oneOf(["h12", "h23"])
789
- })
790
- ], exports.DaikinTimePicker.prototype, "hourCycle", 2);
791
- __decorateClass([
792
- ddsProperty.property({
793
- type: String,
794
- reflect: true,
795
- attribute: "minutes-step",
796
- fallbackValue: "1"
797
- })
798
- ], exports.DaikinTimePicker.prototype, "minutesStep", 2);
799
- __decorateClass([
800
- ddsProperty.property({ type: Boolean, reflect: true, attribute: "meridiem-single-open" })
801
- ], exports.DaikinTimePicker.prototype, "meridiemSingleOpen", 2);
802
- __decorateClass([
803
- decorators_js.state()
804
- ], exports.DaikinTimePicker.prototype, "_label", 2);
805
- __decorateClass([
806
- decorators_js.state()
807
- ], exports.DaikinTimePicker.prototype, "_inputValue", 2);
808
- __decorateClass([
809
- decorators_js.state()
810
- ], exports.DaikinTimePicker.prototype, "_currentSelection", 2);
811
- __decorateClass([
812
- decorators_js.state()
813
- ], exports.DaikinTimePicker.prototype, "_meridiem", 2);
814
- exports.DaikinTimePicker = __decorateClass([
815
- decorators.ddsElement("daikin-time-picker")
816
- ], exports.DaikinTimePicker);
693
+ require_decorate.default([require_dds_property.property({
694
+ type: String,
695
+ reflect: true,
696
+ fallbackValue: "hh:mm"
697
+ })], DaikinTimePicker.prototype, "placeholder", void 0);
698
+ require_decorate.default([require_dds_property.property({
699
+ type: String,
700
+ reflect: true,
701
+ fallbackValue: DEFAULT_MIN_TIME
702
+ })], DaikinTimePicker.prototype, "min", void 0);
703
+ require_decorate.default([require_dds_property.property({
704
+ type: String,
705
+ reflect: true,
706
+ fallbackValue: DEFAULT_MAX_TIME
707
+ })], DaikinTimePicker.prototype, "max", void 0);
708
+ require_decorate.default([require_dds_property.property({
709
+ type: Boolean,
710
+ reflect: true
711
+ })], DaikinTimePicker.prototype, "disabled", void 0);
712
+ require_decorate.default([require_dds_property.property({
713
+ type: Boolean,
714
+ reflect: true
715
+ })], DaikinTimePicker.prototype, "readonly", void 0);
716
+ require_decorate.default([require_dds_property.property({
717
+ type: Boolean,
718
+ reflect: true
719
+ })], DaikinTimePicker.prototype, "required", void 0);
720
+ require_decorate.default([require_dds_property.property({
721
+ type: Boolean,
722
+ reflect: true
723
+ })], DaikinTimePicker.prototype, "error", void 0);
724
+ require_decorate.default([require_dds_property.property({
725
+ type: String,
726
+ reflect: true,
727
+ attribute: "hour-cycle",
728
+ fallbackValue: "h12",
729
+ isAllowedValue: require_dds_property.oneOf(["h12", "h23"])
730
+ })], DaikinTimePicker.prototype, "hourCycle", void 0);
731
+ require_decorate.default([require_dds_property.property({
732
+ type: String,
733
+ reflect: true,
734
+ attribute: "minutes-step",
735
+ fallbackValue: "1"
736
+ })], DaikinTimePicker.prototype, "minutesStep", void 0);
737
+ require_decorate.default([require_dds_property.property({
738
+ type: Boolean,
739
+ reflect: true,
740
+ attribute: "meridiem-single-open"
741
+ })], DaikinTimePicker.prototype, "meridiemSingleOpen", void 0);
742
+ require_decorate.default([(0, lit_decorators_js.state)()], DaikinTimePicker.prototype, "_label", void 0);
743
+ require_decorate.default([(0, lit_decorators_js.state)()], DaikinTimePicker.prototype, "_inputValue", void 0);
744
+ require_decorate.default([(0, lit_decorators_js.state)()], DaikinTimePicker.prototype, "_currentSelection", void 0);
745
+ require_decorate.default([(0, lit_decorators_js.state)()], DaikinTimePicker.prototype, "_meridiem", void 0);
746
+ DaikinTimePicker = require_decorate.default([require_decorators.ddsElement("daikin-time-picker")], DaikinTimePicker);
747
+ //#endregion
748
+ Object.defineProperty(exports, "DaikinTimePicker", {
749
+ enumerable: true,
750
+ get: function() {
751
+ return DaikinTimePicker;
752
+ }
753
+ });
817
754
  exports.calcDigitInput = calcDigitInput;
818
755
  exports.formatPartsForUI = formatPartsForUI;
819
756
  exports.formatTimeForUI = formatTimeForUI;