@tedi-design-system/react 18.0.0-rc.2 → 18.0.0-rc.20

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 (372) hide show
  1. package/_virtual/index.cjs10.js +1 -1
  2. package/_virtual/index.cjs11.js +1 -1
  3. package/_virtual/index.cjs12.js +1 -1
  4. package/_virtual/index.cjs13.js +1 -1
  5. package/_virtual/index.cjs5.js +1 -1
  6. package/_virtual/index.cjs6.js +1 -1
  7. package/_virtual/index.cjs7.js +1 -1
  8. package/_virtual/index.cjs8.js +1 -1
  9. package/_virtual/index.cjs9.js +1 -1
  10. package/_virtual/index.es10.js +1 -1
  11. package/_virtual/index.es11.js +1 -1
  12. package/_virtual/index.es12.js +1 -1
  13. package/_virtual/index.es13.js +2 -4
  14. package/_virtual/index.es5.js +4 -2
  15. package/_virtual/index.es6.js +1 -1
  16. package/_virtual/index.es7.js +1 -1
  17. package/_virtual/index.es8.js +1 -1
  18. package/_virtual/index.es9.js +1 -1
  19. package/bundle-stats.html +1 -1
  20. package/external/@floating-ui/core/dist/floating-ui.core.cjs.js +1 -1
  21. package/external/@floating-ui/core/dist/floating-ui.core.es.js +275 -271
  22. package/external/@floating-ui/dom/dist/floating-ui.dom.cjs.js +1 -1
  23. package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +189 -188
  24. package/external/@floating-ui/react/dist/floating-ui.react.cjs.js +1 -1
  25. package/external/@floating-ui/react/dist/floating-ui.react.es.js +1419 -1538
  26. package/external/@floating-ui/react/dist/floating-ui.react.utils.cjs.js +1 -1
  27. package/external/@floating-ui/react/dist/floating-ui.react.utils.es.js +348 -81
  28. package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js +1 -1
  29. package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +113 -93
  30. package/external/@floating-ui/utils/dist/floating-ui.utils.cjs.js +1 -1
  31. package/external/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +1 -1
  32. package/external/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +97 -97
  33. package/external/@floating-ui/utils/dist/floating-ui.utils.es.js +66 -68
  34. package/external/@mui/system/colorManipulator.cjs.js +1 -1
  35. package/external/@mui/system/colorManipulator.es.js +2 -2
  36. package/external/@mui/system/createStyled.cjs.js +1 -1
  37. package/external/@mui/system/createStyled.es.js +6 -6
  38. package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
  39. package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
  40. package/external/lodash-es/_baseUnset.cjs.js +1 -1
  41. package/external/lodash-es/_baseUnset.es.js +12 -19
  42. package/external/tabbable/dist/index.esm.cjs.js +1 -1
  43. package/external/tabbable/dist/index.esm.es.js +72 -63
  44. package/external/toposort/index.cjs.js +1 -1
  45. package/external/toposort/index.es.js +1 -1
  46. package/index.css +1 -1
  47. package/package.json +4 -4
  48. package/src/community/components/accordion/accordion-item/accordion-item.d.ts +3 -0
  49. package/src/community/components/accordion/accordion-item-content/accordion-item-content.d.ts +3 -0
  50. package/src/community/components/accordion/accordion-item-header/accordion-item-header.d.ts +3 -0
  51. package/src/community/components/accordion/accordion.d.ts +3 -0
  52. package/src/community/components/form/pickers/calendar/calendar.d.ts +6 -0
  53. package/src/community/components/form/pickers/datepicker/datepicker.d.ts +6 -0
  54. package/src/community/components/form/pickers/datetimepicker/datetimepicker.d.ts +6 -0
  55. package/src/community/components/form/pickers/timepicker/timepicker.d.ts +6 -0
  56. package/src/community/components/layout/footer/footer.d.ts +6 -0
  57. package/src/community/components/map-components/carousel/carousel.d.ts +10 -0
  58. package/src/community/components/modal/modal-closer.d.ts +6 -0
  59. package/src/community/components/modal/modal-provider.d.ts +6 -0
  60. package/src/community/components/modal/modal-trigger.d.ts +6 -0
  61. package/src/community/components/modal/modal.d.ts +6 -0
  62. package/src/community/components/placeholder/placeholder.d.ts +5 -0
  63. package/src/community/components/stepper/step.d.ts +6 -0
  64. package/src/community/components/stepper/stepper-nav.d.ts +6 -0
  65. package/src/community/components/stepper/stepper.d.ts +6 -0
  66. package/src/tedi/components/buttons/button-group/button-group.cjs.js +1 -1
  67. package/src/tedi/components/buttons/button-group/button-group.es.js +4 -4
  68. package/src/tedi/components/buttons/card-button/card-button.cjs.js +1 -0
  69. package/src/tedi/components/buttons/card-button/card-button.d.ts +17 -0
  70. package/src/tedi/components/buttons/card-button/card-button.es.js +26 -0
  71. package/src/tedi/components/buttons/card-button/card-button.module.scss.cjs.js +1 -0
  72. package/src/tedi/components/buttons/card-button/card-button.module.scss.es.js +6 -0
  73. package/src/tedi/components/buttons/card-button/index.d.ts +1 -0
  74. package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
  75. package/src/tedi/components/buttons/collapse/collapse.d.ts +15 -0
  76. package/src/tedi/components/buttons/collapse/collapse.es.js +58 -56
  77. package/src/tedi/components/buttons/collapse-button/collapse-button.cjs.js +1 -0
  78. package/src/tedi/components/buttons/collapse-button/collapse-button.d.ts +61 -0
  79. package/src/tedi/components/buttons/collapse-button/collapse-button.es.js +68 -0
  80. package/src/tedi/components/buttons/collapse-button/collapse-button.module.scss.cjs.js +1 -0
  81. package/src/tedi/components/buttons/collapse-button/collapse-button.module.scss.es.js +17 -0
  82. package/src/tedi/components/content/accordion/accordion-context.cjs.js +1 -0
  83. package/src/tedi/components/content/accordion/accordion-context.d.ts +27 -0
  84. package/src/tedi/components/content/accordion/accordion-context.es.js +6 -0
  85. package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.cjs.js +1 -0
  86. package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.d.ts +24 -0
  87. package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.es.js +11 -0
  88. package/src/tedi/components/content/accordion/accordion-item/accordion-item.cjs.js +1 -0
  89. package/src/tedi/components/content/accordion/accordion-item/accordion-item.d.ts +76 -0
  90. package/src/tedi/components/content/accordion/accordion-item/accordion-item.es.js +70 -0
  91. package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.cjs.js +1 -0
  92. package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.d.ts +16 -0
  93. package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.es.js +31 -0
  94. package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.cjs.js +1 -0
  95. package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.d.ts +134 -0
  96. package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.es.js +127 -0
  97. package/src/tedi/components/content/accordion/accordion.cjs.js +1 -0
  98. package/src/tedi/components/content/accordion/accordion.d.ts +61 -0
  99. package/src/tedi/components/content/accordion/accordion.es.js +52 -0
  100. package/src/tedi/components/content/accordion/accordion.module.scss.cjs.js +1 -0
  101. package/src/tedi/components/content/accordion/accordion.module.scss.es.js +32 -0
  102. package/src/tedi/components/content/accordion/index.d.ts +6 -0
  103. package/src/tedi/components/content/calendar/calendar-grid.cjs.js +1 -1
  104. package/src/tedi/components/content/calendar/calendar-grid.es.js +7 -6
  105. package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
  106. package/src/tedi/components/content/calendar/calendar.d.ts +9 -1
  107. package/src/tedi/components/content/calendar/calendar.es.js +72 -71
  108. package/src/tedi/components/content/calendar/calendar.module.scss.cjs.js +1 -1
  109. package/src/tedi/components/content/calendar/calendar.module.scss.es.js +3 -2
  110. package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.cjs.js +1 -1
  111. package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.es.js +99 -79
  112. package/src/tedi/components/content/carousel/carousel-context.cjs.js +1 -0
  113. package/src/tedi/components/content/carousel/carousel-context.d.ts +7 -0
  114. package/src/tedi/components/content/carousel/carousel-context.es.js +11 -0
  115. package/src/tedi/components/content/carousel/carousel-utils.cjs.js +1 -0
  116. package/src/tedi/components/content/carousel/carousel-utils.d.ts +26 -0
  117. package/src/tedi/components/content/carousel/carousel-utils.es.js +14 -0
  118. package/src/tedi/components/content/carousel/carousel.cjs.js +1 -0
  119. package/src/tedi/components/content/carousel/carousel.d.ts +20 -0
  120. package/src/tedi/components/content/carousel/carousel.es.js +27 -0
  121. package/src/tedi/components/content/carousel/carousel.module.scss.cjs.js +1 -0
  122. package/src/tedi/components/content/carousel/carousel.module.scss.es.js +18 -0
  123. package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.cjs.js +1 -0
  124. package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.d.ts +53 -0
  125. package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.es.js +103 -0
  126. package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.cjs.js +1 -0
  127. package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.d.ts +17 -0
  128. package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.es.js +10 -0
  129. package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.cjs.js +1 -0
  130. package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.d.ts +17 -0
  131. package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.es.js +10 -0
  132. package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.cjs.js +1 -0
  133. package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.d.ts +20 -0
  134. package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.es.js +38 -0
  135. package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.cjs.js +1 -0
  136. package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.d.ts +43 -0
  137. package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.es.js +48 -0
  138. package/src/tedi/components/content/carousel/index.d.ts +7 -0
  139. package/src/tedi/components/content/carousel/use-carousel.cjs.js +1 -0
  140. package/src/tedi/components/content/carousel/use-carousel.d.ts +56 -0
  141. package/src/tedi/components/content/carousel/use-carousel.es.js +228 -0
  142. package/src/tedi/components/content/table/index.d.ts +6 -0
  143. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.cjs.js +1 -0
  144. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.d.ts +15 -0
  145. package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.es.js +37 -0
  146. package/src/tedi/components/content/table/table-context.cjs.js +1 -0
  147. package/src/tedi/components/content/table/table-context.d.ts +3 -0
  148. package/src/tedi/components/content/table/table-context.es.js +11 -0
  149. package/src/tedi/components/content/table/table-header-button/table-header-button.cjs.js +1 -0
  150. package/src/tedi/components/content/table/table-header-button/table-header-button.d.ts +51 -0
  151. package/src/tedi/components/content/table/table-header-button/table-header-button.es.js +42 -0
  152. package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.cjs.js +1 -0
  153. package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.es.js +7 -0
  154. package/src/tedi/components/content/table/table-toolbar/table-toolbar.cjs.js +1 -0
  155. package/src/tedi/components/content/table/table-toolbar/table-toolbar.d.ts +21 -0
  156. package/src/tedi/components/content/table/table-toolbar/table-toolbar.es.js +9 -0
  157. package/src/tedi/components/content/table/table.cjs.js +1 -0
  158. package/src/tedi/components/content/table/table.d.ts +519 -0
  159. package/src/tedi/components/content/table/table.es.js +856 -0
  160. package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -0
  161. package/src/tedi/components/content/table/table.module.scss.es.js +54 -0
  162. package/src/tedi/components/content/table/use-table-persistence.cjs.js +1 -0
  163. package/src/tedi/components/content/table/use-table-persistence.d.ts +13 -0
  164. package/src/tedi/components/content/table/use-table-persistence.es.js +53 -0
  165. package/src/tedi/components/filter/filter/filter-group-context.cjs.js +1 -0
  166. package/src/tedi/components/filter/filter/filter-group-context.d.ts +8 -0
  167. package/src/tedi/components/filter/filter/filter-group-context.es.js +5 -0
  168. package/src/tedi/components/filter/filter/filter-group.cjs.js +1 -0
  169. package/src/tedi/components/filter/filter/filter-group.d.ts +94 -0
  170. package/src/tedi/components/filter/filter/filter-group.es.js +64 -0
  171. package/src/tedi/components/filter/filter/filter.cjs.js +1 -0
  172. package/src/tedi/components/filter/filter/filter.d.ts +98 -0
  173. package/src/tedi/components/filter/filter/filter.es.js +236 -0
  174. package/src/tedi/components/filter/filter/filter.module.scss.cjs.js +1 -0
  175. package/src/tedi/components/filter/filter/filter.module.scss.es.js +21 -0
  176. package/src/tedi/components/filter/filter/index.d.ts +3 -0
  177. package/src/tedi/components/form/date-field/date-field-helpers.cjs.js +1 -0
  178. package/src/tedi/components/form/date-field/date-field-helpers.d.ts +66 -0
  179. package/src/tedi/components/form/date-field/date-field-helpers.es.js +28 -0
  180. package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
  181. package/src/tedi/components/form/date-field/date-field.d.ts +22 -0
  182. package/src/tedi/components/form/date-field/date-field.es.js +248 -212
  183. package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -0
  184. package/src/tedi/components/form/date-time-field/date-time-field.d.ts +207 -0
  185. package/src/tedi/components/form/date-time-field/date-time-field.es.js +376 -0
  186. package/src/tedi/components/form/date-time-field/date-time-field.module.scss.cjs.js +1 -0
  187. package/src/tedi/components/form/date-time-field/date-time-field.module.scss.es.js +30 -0
  188. package/src/tedi/components/form/input-group/components/input/input.cjs.js +1 -1
  189. package/src/tedi/components/form/input-group/components/input/input.es.js +14 -13
  190. package/src/tedi/components/form/input-group/components/prefix/prefix.cjs.js +1 -1
  191. package/src/tedi/components/form/input-group/components/prefix/prefix.es.js +16 -16
  192. package/src/tedi/components/form/input-group/components/suffix/suffix.cjs.js +1 -1
  193. package/src/tedi/components/form/input-group/components/suffix/suffix.es.js +12 -12
  194. package/src/tedi/components/form/input-group/input-group.cjs.js +1 -1
  195. package/src/tedi/components/form/input-group/input-group.d.ts +13 -0
  196. package/src/tedi/components/form/input-group/input-group.es.js +47 -45
  197. package/src/tedi/components/form/input-group/input-group.module.scss.cjs.js +1 -1
  198. package/src/tedi/components/form/input-group/input-group.module.scss.es.js +2 -0
  199. package/src/tedi/components/form/search/search.cjs.js +1 -1
  200. package/src/tedi/components/form/search/search.es.js +22 -20
  201. package/src/tedi/components/form/select/components/select-multi-option.cjs.js +1 -1
  202. package/src/tedi/components/form/select/components/select-multi-option.es.js +43 -51
  203. package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
  204. package/src/tedi/components/form/select/components/select-single-option.es.js +21 -27
  205. package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
  206. package/src/tedi/components/form/select/select.module.scss.es.js +0 -1
  207. package/src/tedi/components/form/textfield/textfield.d.ts +14 -0
  208. package/src/tedi/components/form/time-field/time-field-helpers.cjs.js +1 -1
  209. package/src/tedi/components/form/time-field/time-field-helpers.d.ts +1 -1
  210. package/src/tedi/components/form/time-field/time-field-helpers.es.js +1 -1
  211. package/src/tedi/components/form/time-field/time-field.cjs.js +1 -1
  212. package/src/tedi/components/form/time-field/time-field.d.ts +32 -1
  213. package/src/tedi/components/form/time-field/time-field.es.js +129 -95
  214. package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.cjs.js +1 -0
  215. package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.d.ts +30 -0
  216. package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.es.js +59 -0
  217. package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.module.scss.cjs.js +1 -0
  218. package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.module.scss.es.js +10 -0
  219. package/src/tedi/components/form/time-picker/components/time-grid/time-grid.cjs.js +1 -1
  220. package/src/tedi/components/form/time-picker/components/time-grid/time-grid.d.ts +5 -1
  221. package/src/tedi/components/form/time-picker/components/time-grid/time-grid.es.js +47 -64
  222. package/src/tedi/components/form/time-picker/components/time-wheel/time-wheel.cjs.js +1 -1
  223. package/src/tedi/components/form/time-picker/components/time-wheel/time-wheel.es.js +1 -1
  224. package/src/tedi/components/form/time-picker/time-picker.module.scss.cjs.js +1 -1
  225. package/src/tedi/components/form/time-picker/time-picker.module.scss.es.js +1 -2
  226. package/src/tedi/components/layout/footer/footer-body/footer-body.cjs.js +1 -0
  227. package/src/tedi/components/layout/footer/footer-body/footer-body.d.ts +30 -0
  228. package/src/tedi/components/layout/footer/footer-body/footer-body.es.js +28 -0
  229. package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.cjs.js +1 -0
  230. package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.d.ts +23 -0
  231. package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.es.js +25 -0
  232. package/src/tedi/components/layout/footer/footer-context.cjs.js +1 -0
  233. package/src/tedi/components/layout/footer/footer-context.d.ts +23 -0
  234. package/src/tedi/components/layout/footer/footer-context.es.js +7 -0
  235. package/src/tedi/components/layout/footer/footer-section/footer-section.cjs.js +1 -0
  236. package/src/tedi/components/layout/footer/footer-section/footer-section.d.ts +48 -0
  237. package/src/tedi/components/layout/footer/footer-section/footer-section.es.js +65 -0
  238. package/src/tedi/components/layout/footer/footer-side/footer-side.cjs.js +1 -0
  239. package/src/tedi/components/layout/footer/footer-side/footer-side.d.ts +36 -0
  240. package/src/tedi/components/layout/footer/footer-side/footer-side.es.js +34 -0
  241. package/src/tedi/components/layout/footer/footer.cjs.js +1 -0
  242. package/src/tedi/components/layout/footer/footer.d.ts +56 -0
  243. package/src/tedi/components/layout/footer/footer.es.js +64 -0
  244. package/src/tedi/components/layout/footer/footer.module.scss.cjs.js +1 -0
  245. package/src/tedi/components/layout/footer/footer.module.scss.es.js +31 -0
  246. package/src/tedi/components/layout/footer/index.d.ts +5 -0
  247. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.cjs.js +1 -0
  248. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.d.ts +52 -0
  249. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.es.js +68 -0
  250. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.module.scss.cjs.js +1 -0
  251. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.module.scss.es.js +9 -0
  252. package/src/tedi/components/layout/mobile-nav/index.d.ts +2 -0
  253. package/src/tedi/components/layout/mobile-nav/mobile-nav.cjs.js +1 -0
  254. package/src/tedi/components/layout/mobile-nav/mobile-nav.d.ts +20 -0
  255. package/src/tedi/components/layout/{sidenav/components/sidenav-mobile/sidenav-mobile.es.js → mobile-nav/mobile-nav.es.js} +21 -20
  256. package/src/tedi/components/layout/sidenav/index.d.ts +2 -2
  257. package/src/tedi/components/layout/sidenav/sidenav.cjs.js +1 -1
  258. package/src/tedi/components/layout/sidenav/sidenav.d.ts +2 -11
  259. package/src/tedi/components/layout/sidenav/sidenav.es.js +27 -27
  260. package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.cjs.js +1 -0
  261. package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.d.ts +34 -0
  262. package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.es.js +33 -0
  263. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.cjs.js +1 -0
  264. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.d.ts +66 -0
  265. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.es.js +101 -0
  266. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.cjs.js +1 -0
  267. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.d.ts +11 -0
  268. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.es.js +9 -0
  269. package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.cjs.js +1 -0
  270. package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.d.ts +28 -0
  271. package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.es.js +30 -0
  272. package/src/tedi/components/layout/top-nav/index.d.ts +5 -0
  273. package/src/tedi/components/layout/top-nav/top-nav-context.cjs.js +1 -0
  274. package/src/tedi/components/layout/top-nav/top-nav-context.d.ts +11 -0
  275. package/src/tedi/components/layout/top-nav/top-nav-context.es.js +6 -0
  276. package/src/tedi/components/layout/top-nav/top-nav.cjs.js +1 -0
  277. package/src/tedi/components/layout/top-nav/top-nav.d.ts +91 -0
  278. package/src/tedi/components/layout/top-nav/top-nav.es.js +171 -0
  279. package/src/tedi/components/layout/top-nav/top-nav.module.scss.cjs.js +1 -0
  280. package/src/tedi/components/layout/top-nav/top-nav.module.scss.es.js +28 -0
  281. package/src/tedi/components/loaders/progress-bar/index.d.ts +1 -0
  282. package/src/tedi/components/loaders/progress-bar/progress-bar.cjs.js +1 -0
  283. package/src/tedi/components/loaders/progress-bar/progress-bar.d.ts +65 -0
  284. package/src/tedi/components/loaders/progress-bar/progress-bar.es.js +75 -0
  285. package/src/tedi/components/loaders/progress-bar/progress-bar.module.scss.cjs.js +1 -0
  286. package/src/tedi/components/loaders/progress-bar/progress-bar.module.scss.es.js +17 -0
  287. package/src/tedi/components/misc/option-content/option-content.cjs.js +1 -0
  288. package/src/tedi/components/misc/option-content/option-content.d.ts +71 -0
  289. package/src/tedi/components/misc/option-content/option-content.es.js +92 -0
  290. package/src/tedi/components/misc/option-content/option-content.module.scss.cjs.js +1 -0
  291. package/src/tedi/components/misc/option-content/option-content.module.scss.es.js +21 -0
  292. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.cjs.js +1 -0
  293. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.d.ts +2 -0
  294. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.es.js +5 -0
  295. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.cjs.js +1 -0
  296. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.d.ts +45 -0
  297. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.es.js +50 -0
  298. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.cjs.js +1 -0
  299. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.d.ts +36 -0
  300. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.es.js +38 -0
  301. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.module.scss.cjs.js +1 -0
  302. package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.module.scss.es.js +24 -0
  303. package/src/tedi/components/navigation/horizontal-stepper/index.d.ts +2 -0
  304. package/src/tedi/components/navigation/pagination/index.d.ts +1 -0
  305. package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.cjs.js +1 -0
  306. package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.d.ts +36 -0
  307. package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.es.js +65 -0
  308. package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.module.scss.cjs.js +1 -0
  309. package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.module.scss.es.js +13 -0
  310. package/src/tedi/components/navigation/pagination/pagination.cjs.js +1 -1
  311. package/src/tedi/components/navigation/pagination/pagination.d.ts +115 -13
  312. package/src/tedi/components/navigation/pagination/pagination.es.js +244 -96
  313. package/src/tedi/components/navigation/pagination/pagination.module.scss.cjs.js +1 -1
  314. package/src/tedi/components/navigation/pagination/pagination.module.scss.es.js +18 -1
  315. package/src/tedi/components/notifications/alert/alert.cjs.js +1 -1
  316. package/src/tedi/components/notifications/alert/alert.d.ts +14 -1
  317. package/src/tedi/components/notifications/alert/alert.es.js +45 -42
  318. package/src/tedi/components/notifications/alert/alert.module.scss.cjs.js +1 -1
  319. package/src/tedi/components/notifications/alert/alert.module.scss.es.js +2 -1
  320. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.cjs.js +1 -1
  321. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.d.ts +9 -2
  322. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.es.js +42 -39
  323. package/src/tedi/components/overlays/dropdown/dropdown.d.ts +1 -1
  324. package/src/tedi/components/overlays/dropdown/dropdown.es.js +0 -3
  325. package/src/tedi/components/overlays/modal/index.d.ts +8 -0
  326. package/src/tedi/components/overlays/modal/modal-body/modal-body.cjs.js +1 -0
  327. package/src/tedi/components/overlays/modal/modal-body/modal-body.d.ts +22 -0
  328. package/src/tedi/components/overlays/modal/modal-body/modal-body.es.js +21 -0
  329. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.cjs.js +1 -0
  330. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.d.ts +15 -0
  331. package/src/tedi/components/overlays/modal/modal-closer/modal-closer.es.js +16 -0
  332. package/src/tedi/components/overlays/modal/modal-content/modal-content.cjs.js +1 -0
  333. package/src/tedi/components/overlays/modal/modal-content/modal-content.d.ts +108 -0
  334. package/src/tedi/components/overlays/modal/modal-content/modal-content.es.js +81 -0
  335. package/src/tedi/components/overlays/modal/modal-context.cjs.js +1 -0
  336. package/src/tedi/components/overlays/modal/modal-context.d.ts +59 -0
  337. package/src/tedi/components/overlays/modal/modal-context.es.js +15 -0
  338. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.cjs.js +1 -0
  339. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.d.ts +22 -0
  340. package/src/tedi/components/overlays/modal/modal-footer/modal-footer.es.js +25 -0
  341. package/src/tedi/components/overlays/modal/modal-header/modal-header.cjs.js +1 -0
  342. package/src/tedi/components/overlays/modal/modal-header/modal-header.d.ts +58 -0
  343. package/src/tedi/components/overlays/modal/modal-header/modal-header.es.js +25 -0
  344. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.cjs.js +1 -0
  345. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.d.ts +13 -0
  346. package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.es.js +14 -0
  347. package/src/tedi/components/overlays/modal/modal.cjs.js +1 -0
  348. package/src/tedi/components/overlays/modal/modal.d.ts +68 -0
  349. package/src/tedi/components/overlays/modal/modal.es.js +76 -0
  350. package/src/tedi/components/overlays/modal/modal.module.scss.cjs.js +1 -0
  351. package/src/tedi/components/overlays/modal/modal.module.scss.es.js +37 -0
  352. package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
  353. package/src/tedi/components/overlays/overlay/overlay-content.es.js +35 -32
  354. package/src/tedi/components/overlays/tooltip/tooltip.cjs.js +1 -1
  355. package/src/tedi/components/overlays/tooltip/tooltip.es.js +14 -6
  356. package/src/tedi/helpers/hooks/use-breakpoint.cjs.js +1 -1
  357. package/src/tedi/helpers/hooks/use-breakpoint.d.ts +7 -0
  358. package/src/tedi/helpers/hooks/use-breakpoint.es.js +22 -14
  359. package/src/tedi/helpers/hooks/use-sidenav-state.d.ts +1 -1
  360. package/src/tedi/index.d.ts +14 -0
  361. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  362. package/src/tedi/providers/label-provider/labels-map.d.ts +237 -6
  363. package/src/tedi/providers/label-provider/labels-map.es.js +299 -59
  364. package/tedi.cjs.js +1 -1
  365. package/tedi.es.js +332 -224
  366. package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.cjs.js +0 -1
  367. package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.d.ts +0 -14
  368. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.cjs.js +0 -1
  369. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.d.ts +0 -31
  370. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.es.js +0 -48
  371. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.module.scss.cjs.js +0 -1
  372. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.module.scss.es.js +0 -8
@@ -65,6 +65,11 @@ export interface TextFieldProps extends BreakpointSupport<TextFieldBreakpointPro
65
65
  * Also used to generate `aria-describedby` and helper IDs automatically.
66
66
  */
67
67
  id?: string;
68
+ /**
69
+ * The text or React node that serves as the label for the text field.
70
+ * If `hideLabel` is `true`, the label will be visually hidden but still accessible to screen readers.
71
+ * If `hideLabel` is `'keep-space'`, the label will be hidden but the space it occupies will be preserved.
72
+ */
68
73
  label?: React.ReactNode;
69
74
  /**
70
75
  * Name attribute for the underlying input/textarea element.
@@ -104,7 +109,13 @@ export interface TextFieldProps extends BreakpointSupport<TextFieldBreakpointPro
104
109
  * Note: These are **not** attached to the input/textarea directly, but to the surrounding container.
105
110
  */
106
111
  onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;
112
+ /**
113
+ * Key-down handler attached to the field's surrounding container (not the input directly).
114
+ */
107
115
  onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
116
+ /**
117
+ * Key-up handler attached to the field's surrounding container (not the input directly).
118
+ */
108
119
  onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
109
120
  /**
110
121
  * Default value for **uncontrolled** usage.
@@ -209,6 +220,9 @@ export interface TextFieldProps extends BreakpointSupport<TextFieldBreakpointPro
209
220
  * Additional attributes for the input element.
210
221
  */
211
222
  input?: React.InputHTMLAttributes<HTMLInputElement> | React.TextareaHTMLAttributes<HTMLTextAreaElement>;
223
+ /**
224
+ * Optional start slot element to render inside the input container, before the input field.
225
+ */
212
226
  startSlot?: React.ReactNode;
213
227
  /**
214
228
  * Optional end slot element to render inside the input container, after the input field.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=40,u=6,d=()=>Array.from({length:24},(e,t)=>t.toString().padStart(2,"0")),m=e=>{const t=Math.max(1,e??1),r=[];for(let n=0;n<60;n+=t)r.push(n.toString().padStart(2,"0"));return r},T=(e,t)=>{if(!t.length)return"00";const r=Number(e);return isNaN(r)?t[0]:t.reduce((n,s)=>{const o=Math.abs(Number(s)-r),i=Math.abs(Number(n)-r);return o<i||o===i&&Number(s)>Number(n)?s:n},t[0])},p=e=>{if(!e.includes(":"))return{hour:"00",minute:"00"};const[t,r]=e.split(":");return{hour:t.padStart(2,"0"),minute:r.padStart(2,"0")}},f=(e,t)=>{const r=Math.round(e/c);return Math.max(0,Math.min(r,t-1))},l=e=>e*c,S=(e,t,r=1)=>Math.abs(e-t)>r,g=(e,t,r="auto")=>{e.scrollTo({top:l(t),behavior:r})},h=e=>{e&&clearTimeout(e)},a=e=>e?/^([01][0-9]|2[0-3]):[0-5][0-9]$/.test(e.trim()):!1,I=e=>{const t=e.trim();if(!t)return"";if(a(t))return t;const r=t.replace(/[^0-9]/g,"");if(r.length===3){const n=r.slice(0,1).padStart(2,"0"),s=r.slice(1),o=`${n}:${s}`;return a(o)?o:null}if(r.length===4){const n=r.slice(0,2),s=r.slice(2),o=`${n}:${s}`;return a(o)?o:null}if(t.includes(":")){const[n,s]=t.split(":"),o=parseInt(n,10),i=parseInt(s,10);if(!isNaN(o)&&!isNaN(i)&&o>=0&&o<=23&&i>=0&&i<=59)return`${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}return null};exports.ITEM_HEIGHT=c;exports.TIMEPICKER_OFFSET=u;exports.clearScrollTimeout=h;exports.findClosestMinute=T;exports.generateHours=d;exports.generateMinutes=m;exports.getScrollTopForIndex=l;exports.isValidTime=a;exports.needsScrollCorrection=S;exports.normalizeTime=I;exports.parseTime=p;exports.scrollToIndex=g;exports.snapToNearestItem=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=40,u=2,d=()=>Array.from({length:24},(e,t)=>t.toString().padStart(2,"0")),m=e=>{const t=Math.max(1,e??1),r=[];for(let n=0;n<60;n+=t)r.push(n.toString().padStart(2,"0"));return r},T=(e,t)=>{if(!t.length)return"00";const r=Number(e);return isNaN(r)?t[0]:t.reduce((n,s)=>{const o=Math.abs(Number(s)-r),i=Math.abs(Number(n)-r);return o<i||o===i&&Number(s)>Number(n)?s:n},t[0])},p=e=>{if(!e.includes(":"))return{hour:"00",minute:"00"};const[t,r]=e.split(":");return{hour:t.padStart(2,"0"),minute:r.padStart(2,"0")}},f=(e,t)=>{const r=Math.round(e/c);return Math.max(0,Math.min(r,t-1))},l=e=>e*c,S=(e,t,r=1)=>Math.abs(e-t)>r,g=(e,t,r="auto")=>{e.scrollTo({top:l(t),behavior:r})},h=e=>{e&&clearTimeout(e)},a=e=>e?/^([01][0-9]|2[0-3]):[0-5][0-9]$/.test(e.trim()):!1,I=e=>{const t=e.trim();if(!t)return"";if(a(t))return t;const r=t.replace(/[^0-9]/g,"");if(r.length===3){const n=r.slice(0,1).padStart(2,"0"),s=r.slice(1),o=`${n}:${s}`;return a(o)?o:null}if(r.length===4){const n=r.slice(0,2),s=r.slice(2),o=`${n}:${s}`;return a(o)?o:null}if(t.includes(":")){const[n,s]=t.split(":"),o=parseInt(n,10),i=parseInt(s,10);if(!isNaN(o)&&!isNaN(i)&&o>=0&&o<=23&&i>=0&&i<=59)return`${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}return null};exports.ITEM_HEIGHT=c;exports.TIMEPICKER_OFFSET=u;exports.clearScrollTimeout=h;exports.findClosestMinute=T;exports.generateHours=d;exports.generateMinutes=m;exports.getScrollTopForIndex=l;exports.isValidTime=a;exports.needsScrollCorrection=S;exports.normalizeTime=I;exports.parseTime=p;exports.scrollToIndex=g;exports.snapToNearestItem=f;
@@ -1,5 +1,5 @@
1
1
  export declare const ITEM_HEIGHT = 40;
2
- export declare const TIMEPICKER_OFFSET = 6;
2
+ export declare const TIMEPICKER_OFFSET = 2;
3
3
  /**
4
4
  * Generates an array of hours (00–23)
5
5
  */
@@ -1,4 +1,4 @@
1
- const u = 40, l = 6, d = () => Array.from({ length: 24 }, (n, t) => t.toString().padStart(2, "0")), m = (n) => {
1
+ const u = 40, l = 2, d = () => Array.from({ length: 24 }, (n, t) => t.toString().padStart(2, "0")), m = (n) => {
2
2
  const t = Math.max(1, n ?? 1), r = [];
3
3
  for (let e = 0; e < 60; e += t)
4
4
  r.push(e.toString().padStart(2, "0"));
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),T=require("../../../../../external/classnames/index.cjs.js"),m=require("react"),B=require("../textfield/textfield.cjs.js"),ne=require("../time-picker/time-picker.cjs.js"),s=require("./time-field.module.scss.cjs.js"),O=require("./time-field-helpers.cjs.js"),re=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),C=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),oe=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),k=require("../../overlays/dropdown/dropdown.cjs.js"),E=v=>{const{getCurrentBreakpointProps:S}=oe.useBreakpointProps(v.defaultServerBreakpoint),{id:V,label:M,value:c,defaultValue:z,onChange:F,readOnly:u=!1,required:A,placeholder:H,inputProps:i,stepMinutes:K=1,className:I,availableTimes:l}=v,{useNativePicker:G=!1,timePickerTrigger:P="button",showPicker:a=!0,availableTimesVariant:q="grid-buttons"}=S(v),y=c!==void 0,[J,N]=m.useState(c??z??""),g=y?c:J,[_,b]=m.useState(!1),w=P==="input",r=G,L=d.useFloating({open:_,onOpenChange:b,placement:w?"bottom-start":"bottom-end",middleware:[C.offset(O.TIMEPICKER_OFFSET),C.flip(),C.shift()],whileElementsMounted:re.autoUpdate}),{refs:j,context:p,x:Q,y:W,strategy:X}=L,Y=d.useClick(p),Z=d.useDismiss(p),$=d.useRole(p,{role:"listbox"}),D=a&&w&&!u&&!r,R=d.useInteractions([...D?[Y]:[],Z,$]),x=e=>{const n=e.trim();y||N(n),F==null||F(n)},ee=e=>{var h;const n=e.target.value??"";(h=i==null?void 0:i.onBlur)==null||h.call(i,e);const o=O.normalizeTime(n);o!==null&&o!==n&&x(o)};m.useEffect(()=>{c!==void 0&&N(c)},[c]);const f=m.useRef(null);m.useEffect(()=>{var e;(e=f.current)!=null&&e.inner&&j.setReference(f.current.inner)},[j]);const te=()=>{var n;const e=(n=f.current)==null?void 0:n.input;if(e){if(typeof e.showPicker=="function"){e.showPicker();return}e.focus()}},ie=()=>b(e=>!e),U={...i,id:V,label:M,value:g,placeholder:H,readOnly:u||!r&&w,icon:"schedule",isClearable:!0,required:A,onIconClick:()=>{u||!a||(r?te():P==="button"&&ie())},onChange:x,onBlur:ee,className:T.default(s.default["tedi-time-field__textfield"],{[s.default["tedi-time-field__icon--disabled"]]:!a||u},{[s.default["tedi-time-field__textfield--disabled"]]:i==null?void 0:i.disabled},{[s.default["tedi-time-field--native"]]:r}),input:{...i==null?void 0:i.input,...r&&{type:"time"}}};if(!r&&a&&!u&&q==="dropdown"&&!!(l!=null&&l.length)){const e=l.indexOf(g),n=e>=0?e:0;return t.jsxs(k.Dropdown,{width:"trigger",defaultActiveIndex:n,children:[t.jsx(k.Dropdown.Trigger,{children:t.jsx("div",{className:T.default(s.default["tedi-time-field__container"],I,{[s.default["tedi-time-field__container--native"]]:r}),children:t.jsx(B.TextField,{ref:f,...U})})}),t.jsx(k.Dropdown.Content,{children:l.map((o,h)=>t.jsx(k.Dropdown.Item,{index:h,active:o===g,onClick:()=>x(o),children:o},o))})]})}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:T.default(s.default["tedi-time-field__container"],I),...D?R.getReferenceProps():{},"aria-haspopup":a?"listbox":void 0,tabIndex:-1,children:t.jsx(B.TextField,{ref:f,"aria-expanded":a?_:void 0,...U})}),!r&&a&&t.jsx(d.FloatingPortal,{children:_&&!u&&t.jsx(d.FloatingFocusManager,{context:p,modal:!1,initialFocus:-1,children:t.jsx("div",{ref:j.setFloating,...R.getFloatingProps({style:{position:X,top:W??0,left:Q??0}}),children:t.jsx(ne.TimePicker,{value:g,stepMinutes:K,availableTimes:l,onChange:e=>{x(e),l&&b(!1)},gridVariant:q==="grid-radio"?"radio":"button",className:s.default["tedi-time-field__picker-wrapper"]})})})})]})};E.displayName="TimeField";exports.TimeField=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),y=require("../../../../../external/classnames/index.cjs.js"),f=require("react"),A=require("../textfield/textfield.cjs.js"),pe=require("../time-picker/time-picker.cjs.js"),d=require("./time-field.module.scss.cjs.js"),H=require("./time-field-helpers.cjs.js"),ge=require("./time-picker-modal/time-picker-modal.cjs.js"),ke=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),B=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),xe=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),K=require("../../../helpers/hooks/use-breakpoint.cjs.js"),F=require("../../overlays/dropdown/dropdown.cjs.js"),G=_=>{const{getCurrentBreakpointProps:J}=xe.useBreakpointProps(_.defaultServerBreakpoint),{id:L,label:Q,value:u,defaultValue:W,onChange:C,readOnly:h=!1,disabled:l=!1,required:X,placeholder:Y,inputProps:t,stepMinutes:M=1,className:O,availableTimes:a,modal:P=!1,modalProps:Z}=_,{useNativePicker:$=!1,timePickerTrigger:N="button",showPicker:n=!0,availableTimesVariant:w="grid-buttons"}=J(_),D=u!==void 0,[ee,R]=f.useState(u??W??""),m=D?u:ee,[T,j]=f.useState(!1),[te,U]=f.useState(!1),p=N==="input",s=$,ie=K.useBreakpoint(),g=!s&&n&&!h&&!l&&(P===!0||typeof P=="string"&&K.isBreakpointBelow(ie,P)),ne=c.useFloating({open:T,onOpenChange:j,placement:p?"bottom-start":"bottom-end",middleware:[B.offset(H.TIMEPICKER_OFFSET),B.flip(),B.shift()],whileElementsMounted:ke.autoUpdate}),{refs:q,context:v,x:oe,y:re,strategy:se}=ne,le=c.useClick(v),ae=c.useDismiss(v),de=c.useRole(v,{role:"listbox"}),S=n&&p&&!h&&!l&&!s&&!g,V=c.useInteractions([...S?[le]:[],ae,de]),k=e=>{const o=e.trim();D||R(o),C==null||C(o)},ce=e=>{var b;const o=e.target.value??"";(b=t==null?void 0:t.onBlur)==null||b.call(t,e);const r=H.normalizeTime(o);r!==null&&r!==o&&k(r)};f.useEffect(()=>{u!==void 0&&R(u)},[u]);const x=f.useRef(null);f.useEffect(()=>{var e;(e=x.current)!=null&&e.inner&&q.setReference(x.current.inner)},[q]);const ue=()=>{var o;const e=(o=x.current)==null?void 0:o.input;if(e){if(typeof e.showPicker=="function"){e.showPicker();return}e.focus()}},fe=()=>j(e=>!e),E=()=>U(!0),me=()=>{!n||l||(s?ue():g?E():N==="button"&&fe())},z=g&&p&&!h?()=>{E()}:void 0,I={...t,id:L,label:Q,value:m,placeholder:Y,readOnly:h||!s&&p,disabled:l||(t==null?void 0:t.disabled),icon:n?"schedule":{name:"schedule",color:"inherit"},isClearable:!0,required:X,onIconClick:n?me:void 0,onChange:k,onBlur:ce,className:y.default(d.default["tedi-time-field__textfield"],{[d.default["tedi-time-field__icon--disabled"]]:!n||l},{[d.default["tedi-time-field__textfield--disabled"]]:l||(t==null?void 0:t.disabled)},{[d.default["tedi-time-field--native"]]:s}),input:{...t==null?void 0:t.input,...s&&{type:"time"},...z&&{onClick:z}}};if(!s&&n&&!l&&w==="dropdown"&&!!(a!=null&&a.length)){const e=a.indexOf(m),o=e>=0?e:0;return i.jsxs(F.Dropdown,{width:"trigger",defaultActiveIndex:o,children:[i.jsx(F.Dropdown.Trigger,{children:i.jsx("div",{className:y.default(d.default["tedi-time-field__container"],O,{[d.default["tedi-time-field__container--native"]]:s}),children:i.jsx(A.TextField,{ref:x,...I,input:{...I.input,...!p&&{onClick:r=>r.stopPropagation()}}})})}),i.jsx(F.Dropdown.Content,{children:a.map((r,b)=>i.jsx(F.Dropdown.Item,{index:b,active:r===m,onClick:()=>k(r),children:r},r))})]})}return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:y.default(d.default["tedi-time-field__container"],O),...S?V.getReferenceProps():{},"aria-haspopup":n?"listbox":void 0,tabIndex:-1,children:i.jsx(A.TextField,{ref:x,"aria-expanded":n?T:void 0,...I})}),g&&i.jsx(ge.TimePickerModal,{open:te,onOpenChange:U,value:m,onConfirm:k,stepMinutes:M,availableTimes:a,gridVariant:w==="grid-radio"?"radio":"button",modalProps:Z}),!s&&n&&!l&&!g&&i.jsx(c.FloatingPortal,{children:T&&i.jsx(c.FloatingFocusManager,{context:v,modal:!1,initialFocus:-1,children:i.jsx("div",{ref:q.setFloating,...V.getFloatingProps({style:{position:se,top:re??0,left:oe??0}}),children:i.jsx(pe.TimePicker,{value:m,stepMinutes:M,availableTimes:a,onChange:e=>{k(e),a&&j(!1)},gridVariant:w==="grid-radio"?"radio":"button",className:d.default["tedi-time-field__picker-wrapper"]})})})})]})};G.displayName="TimeField";exports.TimeField=G;
@@ -1,6 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { BreakpointSupport } from '../../../helpers';
2
+ import { Breakpoint, BreakpointSupport } from '../../../helpers';
3
+ import { ModalContentProps } from '../../overlays/modal/modal-content/modal-content';
3
4
  import { TextFieldProps } from '../textfield/textfield';
5
+ export type TimeFieldModal = boolean | Exclude<Breakpoint, 'xs'>;
4
6
  type TimeFieldBreakpointProps = {
5
7
  /**
6
8
  * If `true`, the field swaps the custom time-picker popover for the
@@ -56,6 +58,15 @@ export interface TimeFieldProps extends BreakpointSupport<TimeFieldBreakpointPro
56
58
  * @default false
57
59
  */
58
60
  readOnly?: boolean;
61
+ /**
62
+ * Disables the input and the picker. Equivalent of `<DateTimeField disabled>`
63
+ * — added so all three field siblings (`DateField`, `TimeField`,
64
+ * `DateTimeField`) share the same form-control idiom for "this field is
65
+ * fully unavailable". Forwards to the underlying `TextField`'s `disabled`
66
+ * attribute and short-circuits the picker open path.
67
+ * @default false
68
+ */
69
+ disabled?: boolean;
59
70
  /**
60
71
  * Marks the input as required.
61
72
  */
@@ -82,6 +93,26 @@ export interface TimeFieldProps extends BreakpointSupport<TimeFieldBreakpointPro
82
93
  * Array of available times to show in the picker or dropdown.
83
94
  */
84
95
  availableTimes?: string[];
96
+ /**
97
+ * Open the picker inside a modal instead of a floating popover. Useful on
98
+ * narrow viewports where a popover overlaps the input itself.
99
+ *
100
+ * - `true` always opens in a modal
101
+ * - `false` (default) always uses the popover
102
+ * - A breakpoint name (e.g. `'md'`) opens in a modal *below* that breakpoint
103
+ * and falls back to the popover from that breakpoint up
104
+ *
105
+ * Ignored when `useNativePicker` resolves to `true`.
106
+ * @default false
107
+ */
108
+ modal?: TimeFieldModal;
109
+ /**
110
+ * Extra props forwarded to the picker modal's `Modal.Content` — e.g. `size`, `width`, `maxWidth`,
111
+ * `position`, `fullscreen`, and per-breakpoint overrides. Lets the consumer tune the modal beyond
112
+ * its `size="small"` / `width="xs"` (capped to 312px) defaults. `className` is merged with the component's own (so
113
+ * the internal padding reset is preserved). Only applies when the picker opens as a modal.
114
+ */
115
+ modalProps?: Omit<ModalContentProps, 'children'>;
85
116
  }
86
117
  export declare const TimeField: React.FC<TimeFieldProps>;
87
118
  export {};
@@ -1,61 +1,66 @@
1
- import { jsxs as O, jsx as i, Fragment as te } from "react/jsx-runtime";
2
- import { useFloating as ie, useClick as ne, useDismiss as oe, useRole as re, useInteractions as le, FloatingPortal as se, FloatingFocusManager as ae } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
- import C from "../../../../../external/classnames/index.es.js";
4
- import ce, { useState as V, useEffect as E } from "react";
5
- import { TextField as U } from "../textfield/textfield.es.js";
6
- import { TimePicker as de } from "../time-picker/time-picker.es.js";
7
- import l from "./time-field.module.scss.es.js";
8
- import { TIMEPICKER_OFFSET as fe, normalizeTime as ue } from "./time-field-helpers.es.js";
9
- import { autoUpdate as me } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
10
- import { offset as pe, flip as ge, shift as he } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
11
- import { useBreakpointProps as ke } from "../../../helpers/hooks/use-breakpoint-props.es.js";
12
- import { Dropdown as h } from "../../overlays/dropdown/dropdown.es.js";
13
- const ve = (k) => {
14
- const { getCurrentBreakpointProps: D } = ke(k.defaultServerBreakpoint), {
15
- id: M,
16
- label: S,
1
+ import { jsxs as q, jsx as i, Fragment as fe } from "react/jsx-runtime";
2
+ import { useFloating as me, useClick as ue, useDismiss as pe, useRole as ge, useInteractions as he, FloatingPortal as ke, FloatingFocusManager as ve } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
+ import y from "../../../../../external/classnames/index.es.js";
4
+ import be, { useState as N, useEffect as z } from "react";
5
+ import { TextField as A } from "../textfield/textfield.es.js";
6
+ import { TimePicker as Ce } from "../time-picker/time-picker.es.js";
7
+ import d from "./time-field.module.scss.es.js";
8
+ import { normalizeTime as xe, TIMEPICKER_OFFSET as _e } from "./time-field-helpers.es.js";
9
+ import { TimePickerModal as Fe } from "./time-picker-modal/time-picker-modal.es.js";
10
+ import { autoUpdate as Pe } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
11
+ import { offset as Te, flip as we, shift as Ie } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
12
+ import { useBreakpointProps as ye } from "../../../helpers/hooks/use-breakpoint-props.es.js";
13
+ import { useBreakpoint as Ne, isBreakpointBelow as Be } from "../../../helpers/hooks/use-breakpoint.es.js";
14
+ import { Dropdown as b } from "../../overlays/dropdown/dropdown.es.js";
15
+ const Oe = (C) => {
16
+ const { getCurrentBreakpointProps: K } = ye(C.defaultServerBreakpoint), {
17
+ id: G,
18
+ label: H,
17
19
  value: c,
18
- defaultValue: j,
19
- onChange: v,
20
- readOnly: d = !1,
21
- required: q,
22
- placeholder: z,
20
+ defaultValue: J,
21
+ onChange: x,
22
+ readOnly: h = !1,
23
+ disabled: s = !1,
24
+ required: L,
25
+ placeholder: Q,
23
26
  inputProps: t,
24
- stepMinutes: A = 1,
25
- className: I,
26
- availableTimes: s
27
- } = k, {
28
- useNativePicker: K = !1,
29
- timePickerTrigger: w = "button",
30
- showPicker: a = !0,
31
- availableTimesVariant: T = "grid-buttons"
32
- } = D(k), P = c !== void 0, [G, N] = V(c ?? j ?? ""), u = P ? c : G, [x, _] = V(!1), F = w === "input", o = K, H = ie({
33
- open: x,
34
- onOpenChange: _,
35
- placement: F ? "bottom-start" : "bottom-end",
36
- middleware: [pe(fe), ge(), he()],
37
- whileElementsMounted: me
38
- }), { refs: b, context: m, x: J, y: L, strategy: Q } = H, W = ne(m), X = oe(m), Y = re(m, { role: "listbox" }), y = a && F && !d && !o, R = le([...y ? [W] : [], X, Y]), p = (e) => {
27
+ stepMinutes: B = 1,
28
+ className: O,
29
+ availableTimes: a,
30
+ modal: _ = !1,
31
+ modalProps: W
32
+ } = C, {
33
+ useNativePicker: X = !1,
34
+ timePickerTrigger: M = "button",
35
+ showPicker: o = !0,
36
+ availableTimesVariant: F = "grid-buttons"
37
+ } = K(C), R = c !== void 0, [Y, V] = N(c ?? J ?? ""), f = R ? c : Y, [P, T] = N(!1), [Z, E] = N(!1), m = M === "input", l = X, $ = Ne(), u = !l && o && !h && !s && (_ === !0 || typeof _ == "string" && Be($, _)), ee = me({
38
+ open: P,
39
+ onOpenChange: T,
40
+ placement: m ? "bottom-start" : "bottom-end",
41
+ middleware: [Te(_e), we(), Ie()],
42
+ whileElementsMounted: Pe
43
+ }), { refs: w, context: k, x: te, y: ie, strategy: oe } = ee, ne = ue(k), re = pe(k), le = ge(k, { role: "listbox" }), U = o && m && !h && !s && !l && !u, D = he([...U ? [ne] : [], re, le]), p = (e) => {
39
44
  const n = e.trim();
40
- P || N(n), v == null || v(n);
41
- }, Z = (e) => {
42
- var g;
45
+ R || V(n), x == null || x(n);
46
+ }, se = (e) => {
47
+ var v;
43
48
  const n = e.target.value ?? "";
44
- (g = t == null ? void 0 : t.onBlur) == null || g.call(t, e);
45
- const r = ue(n);
49
+ (v = t == null ? void 0 : t.onBlur) == null || v.call(t, e);
50
+ const r = xe(n);
46
51
  r !== null && r !== n && p(r);
47
52
  };
48
- E(() => {
49
- c !== void 0 && N(c);
53
+ z(() => {
54
+ c !== void 0 && V(c);
50
55
  }, [c]);
51
- const f = ce.useRef(null);
52
- E(() => {
56
+ const g = be.useRef(null);
57
+ z(() => {
53
58
  var e;
54
- (e = f.current) != null && e.inner && b.setReference(f.current.inner);
55
- }, [b]);
56
- const $ = () => {
59
+ (e = g.current) != null && e.inner && w.setReference(g.current.inner);
60
+ }, [w]);
61
+ const ae = () => {
57
62
  var n;
58
- const e = (n = f.current) == null ? void 0 : n.input;
63
+ const e = (n = g.current) == null ? void 0 : n.input;
59
64
  if (e) {
60
65
  if (typeof e.showPicker == "function") {
61
66
  e.showPicker();
@@ -63,87 +68,116 @@ const ve = (k) => {
63
68
  }
64
69
  e.focus();
65
70
  }
66
- }, ee = () => _((e) => !e), B = {
71
+ }, de = () => T((e) => !e), S = () => E(!0), ce = () => {
72
+ !o || s || (l ? ae() : u ? S() : M === "button" && de());
73
+ }, j = u && m && !h ? () => {
74
+ S();
75
+ } : void 0, I = {
67
76
  ...t,
68
- id: M,
69
- label: S,
70
- value: u,
71
- placeholder: z,
72
- readOnly: d || !o && F,
73
- icon: "schedule",
77
+ id: G,
78
+ label: H,
79
+ value: f,
80
+ placeholder: Q,
81
+ readOnly: h || !l && m,
82
+ disabled: s || (t == null ? void 0 : t.disabled),
83
+ icon: o ? "schedule" : { name: "schedule", color: "inherit" },
74
84
  isClearable: !0,
75
- required: q,
76
- onIconClick: () => {
77
- d || !a || (o ? $() : w === "button" && ee());
78
- },
85
+ required: L,
86
+ onIconClick: o ? ce : void 0,
79
87
  onChange: p,
80
- onBlur: Z,
81
- className: C(
82
- l["tedi-time-field__textfield"],
83
- { [l["tedi-time-field__icon--disabled"]]: !a || d },
84
- { [l["tedi-time-field__textfield--disabled"]]: t == null ? void 0 : t.disabled },
85
- { [l["tedi-time-field--native"]]: o }
88
+ onBlur: se,
89
+ className: y(
90
+ d["tedi-time-field__textfield"],
91
+ { [d["tedi-time-field__icon--disabled"]]: !o || s },
92
+ { [d["tedi-time-field__textfield--disabled"]]: s || (t == null ? void 0 : t.disabled) },
93
+ { [d["tedi-time-field--native"]]: l }
86
94
  ),
87
95
  input: {
88
96
  ...t == null ? void 0 : t.input,
89
- ...o && { type: "time" }
97
+ ...l && { type: "time" },
98
+ ...j && { onClick: j }
90
99
  }
91
100
  };
92
- if (!o && a && !d && T === "dropdown" && !!(s != null && s.length)) {
93
- const e = s.indexOf(u), n = e >= 0 ? e : 0;
94
- return /* @__PURE__ */ O(h, { width: "trigger", defaultActiveIndex: n, children: [
95
- /* @__PURE__ */ i(h.Trigger, { children: /* @__PURE__ */ i(
101
+ if (!l && o && !s && F === "dropdown" && !!(a != null && a.length)) {
102
+ const e = a.indexOf(f), n = e >= 0 ? e : 0;
103
+ return /* @__PURE__ */ q(b, { width: "trigger", defaultActiveIndex: n, children: [
104
+ /* @__PURE__ */ i(b.Trigger, { children: /* @__PURE__ */ i(
96
105
  "div",
97
106
  {
98
- className: C(l["tedi-time-field__container"], I, {
99
- [l["tedi-time-field__container--native"]]: o
107
+ className: y(d["tedi-time-field__container"], O, {
108
+ [d["tedi-time-field__container--native"]]: l
100
109
  }),
101
- children: /* @__PURE__ */ i(U, { ref: f, ...B })
110
+ children: /* @__PURE__ */ i(
111
+ A,
112
+ {
113
+ ref: g,
114
+ ...I,
115
+ input: {
116
+ ...I.input,
117
+ ...!m && {
118
+ onClick: (r) => r.stopPropagation()
119
+ }
120
+ }
121
+ }
122
+ )
102
123
  }
103
124
  ) }),
104
- /* @__PURE__ */ i(h.Content, { children: s.map((r, g) => /* @__PURE__ */ i(h.Item, { index: g, active: r === u, onClick: () => p(r), children: r }, r)) })
125
+ /* @__PURE__ */ i(b.Content, { children: a.map((r, v) => /* @__PURE__ */ i(b.Item, { index: v, active: r === f, onClick: () => p(r), children: r }, r)) })
105
126
  ] });
106
127
  }
107
- return /* @__PURE__ */ O(te, { children: [
128
+ return /* @__PURE__ */ q(fe, { children: [
108
129
  /* @__PURE__ */ i(
109
130
  "div",
110
131
  {
111
- className: C(l["tedi-time-field__container"], I),
112
- ...y ? R.getReferenceProps() : {},
113
- "aria-haspopup": a ? "listbox" : void 0,
132
+ className: y(d["tedi-time-field__container"], O),
133
+ ...U ? D.getReferenceProps() : {},
134
+ "aria-haspopup": o ? "listbox" : void 0,
114
135
  tabIndex: -1,
115
- children: /* @__PURE__ */ i(U, { ref: f, "aria-expanded": a ? x : void 0, ...B })
136
+ children: /* @__PURE__ */ i(A, { ref: g, "aria-expanded": o ? P : void 0, ...I })
116
137
  }
117
138
  ),
118
- !o && a && /* @__PURE__ */ i(se, { children: x && !d && /* @__PURE__ */ i(ae, { context: m, modal: !1, initialFocus: -1, children: /* @__PURE__ */ i(
139
+ u && /* @__PURE__ */ i(
140
+ Fe,
141
+ {
142
+ open: Z,
143
+ onOpenChange: E,
144
+ value: f,
145
+ onConfirm: p,
146
+ stepMinutes: B,
147
+ availableTimes: a,
148
+ gridVariant: F === "grid-radio" ? "radio" : "button",
149
+ modalProps: W
150
+ }
151
+ ),
152
+ !l && o && !s && !u && /* @__PURE__ */ i(ke, { children: P && /* @__PURE__ */ i(ve, { context: k, modal: !1, initialFocus: -1, children: /* @__PURE__ */ i(
119
153
  "div",
120
154
  {
121
- ref: b.setFloating,
122
- ...R.getFloatingProps({
155
+ ref: w.setFloating,
156
+ ...D.getFloatingProps({
123
157
  style: {
124
- position: Q,
125
- top: L ?? 0,
126
- left: J ?? 0
158
+ position: oe,
159
+ top: ie ?? 0,
160
+ left: te ?? 0
127
161
  }
128
162
  }),
129
163
  children: /* @__PURE__ */ i(
130
- de,
164
+ Ce,
131
165
  {
132
- value: u,
133
- stepMinutes: A,
134
- availableTimes: s,
166
+ value: f,
167
+ stepMinutes: B,
168
+ availableTimes: a,
135
169
  onChange: (e) => {
136
- p(e), s && _(!1);
170
+ p(e), a && T(!1);
137
171
  },
138
- gridVariant: T === "grid-radio" ? "radio" : "button",
139
- className: l["tedi-time-field__picker-wrapper"]
172
+ gridVariant: F === "grid-radio" ? "radio" : "button",
173
+ className: d["tedi-time-field__picker-wrapper"]
140
174
  }
141
175
  )
142
176
  }
143
177
  ) }) })
144
178
  ] });
145
179
  };
146
- ve.displayName = "TimeField";
180
+ Oe.displayName = "TimeField";
147
181
  export {
148
- ve as TimeField
182
+ Oe as TimeField
149
183
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("../../../../../../external/classnames/index.cjs.js"),m=require("react"),C=require("../../../base/typography/heading/heading.cjs.js"),f=require("../../../buttons/button/button.cjs.js"),_=require("../../../buttons/closing-button/closing-button.cjs.js"),b=require("../../time-picker/time-picker.cjs.js"),s=require("./time-picker-modal.module.scss.cjs.js"),l=require("../../../overlays/modal/modal.cjs.js"),T=require("../../../overlays/modal/modal-context.cjs.js"),v=require("../../../../providers/label-provider/use-labels.cjs.js"),N=({title:o})=>{const{labelId:i,onOpenChange:t}=T.useModal();return e.jsxs("div",{className:s.default["tedi-time-picker-modal__header"],children:[e.jsx(C.Heading,{element:"h2",modifiers:"h4",id:i,className:s.default["tedi-time-picker-modal__title"],children:o}),e.jsx(_.ClosingButton,{size:"small",onClick:()=>t(!1)})]})},c=o=>{const{open:i,onOpenChange:t,value:n,onConfirm:h,stepMinutes:k,availableTimes:x,gridVariant:j,modalProps:a,title:M}=o,{getLabel:r}=v.useLabels(),g=M??r("time-field.modal-title"),[d,u]=m.useState(n??"");m.useEffect(()=>{i&&u(n??"")},[i,n]);const p=()=>{d&&h(d),t(!1)};return e.jsx(l.Modal,{open:i,onToggle:t,children:e.jsxs(l.Modal.Content,{size:"small",width:"xs",...a,className:q.default(s.default["tedi-time-picker-modal"],a==null?void 0:a.className),children:[e.jsx(l.Modal.Header,{children:e.jsx(N,{title:g})}),e.jsx(l.Modal.Body,{className:s.default["tedi-time-picker-modal__body"],children:e.jsx(b.TimePicker,{value:d,stepMinutes:k,availableTimes:x,gridVariant:j,onChange:u,bordered:!1,className:s.default["tedi-time-picker-modal__picker"]})}),e.jsxs(l.Modal.Footer,{children:[e.jsx(f.Button,{visualType:"secondary",onClick:()=>t(!1),children:r("time-field.cancel")}),e.jsx(f.Button,{onClick:p,children:r("time-field.confirm")})]})]})})};c.displayName="TimePickerModal";exports.TimePickerModal=c;exports.default=c;
@@ -0,0 +1,30 @@
1
+ import { ModalContentProps } from '../../../overlays/modal';
2
+ import { TimePickerProps } from '../../time-picker/time-picker';
3
+ export interface TimePickerModalProps {
4
+ /** Whether the modal is open. Pair with `onOpenChange`. */
5
+ open: boolean;
6
+ /** Fires when the modal opens or closes (e.g. dismiss via backdrop or Escape). */
7
+ onOpenChange: (open: boolean) => void;
8
+ /** Current committed value (HH:mm). Used to seed the draft when the modal opens. */
9
+ value?: string;
10
+ /** Fires with the chosen value when the user clicks "Confirm". Cancel/dismiss do nothing. */
11
+ onConfirm: (value: string) => void;
12
+ /** Forwarded to the inner `TimePicker`. */
13
+ stepMinutes?: TimePickerProps['stepMinutes'];
14
+ /** Forwarded to the inner `TimePicker`. */
15
+ availableTimes?: TimePickerProps['availableTimes'];
16
+ /** Forwarded to the inner `TimePicker`. */
17
+ gridVariant?: TimePickerProps['gridVariant'];
18
+ /**
19
+ * Extra props spread onto `Modal.Content`, overriding the `size="small"` / `width="xs"` (capped to 312px)
20
+ * defaults (including `fullscreen`). `className` is merged, not replaced, so the internal padding reset survives.
21
+ */
22
+ modalProps?: Omit<ModalContentProps, 'children'>;
23
+ /** Modal title text. Falls back to the `time-field.modal-title` i18n key. */
24
+ title?: string;
25
+ }
26
+ export declare const TimePickerModal: {
27
+ (props: TimePickerModalProps): JSX.Element;
28
+ displayName: string;
29
+ };
30
+ export default TimePickerModal;
@@ -0,0 +1,59 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import T from "../../../../../../external/classnames/index.es.js";
3
+ import { useState as _, useEffect as b } from "react";
4
+ import { Heading as v } from "../../../base/typography/heading/heading.es.js";
5
+ import { Button as f } from "../../../buttons/button/button.es.js";
6
+ import { ClosingButton as y } from "../../../buttons/closing-button/closing-button.es.js";
7
+ import { TimePicker as M } from "../../time-picker/time-picker.es.js";
8
+ import l from "./time-picker-modal.module.scss.es.js";
9
+ import { Modal as t } from "../../../overlays/modal/modal.es.js";
10
+ import { useModal as x } from "../../../overlays/modal/modal-context.es.js";
11
+ import { useLabels as B } from "../../../../providers/label-provider/use-labels.es.js";
12
+ const H = ({ title: a }) => {
13
+ const { labelId: i, onOpenChange: o } = x();
14
+ return /* @__PURE__ */ d("div", { className: l["tedi-time-picker-modal__header"], children: [
15
+ /* @__PURE__ */ e(v, { element: "h2", modifiers: "h4", id: i, className: l["tedi-time-picker-modal__title"], children: a }),
16
+ /* @__PURE__ */ e(y, { size: "small", onClick: () => o(!1) })
17
+ ] });
18
+ }, P = (a) => {
19
+ const { open: i, onOpenChange: o, value: m, onConfirm: p, stepMinutes: h, availableTimes: k, gridVariant: u, modalProps: r, title: C } = a, { getLabel: s } = B(), g = C ?? s("time-field.modal-title"), [n, c] = _(m ?? "");
20
+ b(() => {
21
+ i && c(m ?? "");
22
+ }, [i, m]);
23
+ const N = () => {
24
+ n && p(n), o(!1);
25
+ };
26
+ return /* @__PURE__ */ e(t, { open: i, onToggle: o, children: /* @__PURE__ */ d(
27
+ t.Content,
28
+ {
29
+ size: "small",
30
+ width: "xs",
31
+ ...r,
32
+ className: T(l["tedi-time-picker-modal"], r == null ? void 0 : r.className),
33
+ children: [
34
+ /* @__PURE__ */ e(t.Header, { children: /* @__PURE__ */ e(H, { title: g }) }),
35
+ /* @__PURE__ */ e(t.Body, { className: l["tedi-time-picker-modal__body"], children: /* @__PURE__ */ e(
36
+ M,
37
+ {
38
+ value: n,
39
+ stepMinutes: h,
40
+ availableTimes: k,
41
+ gridVariant: u,
42
+ onChange: c,
43
+ bordered: !1,
44
+ className: l["tedi-time-picker-modal__picker"]
45
+ }
46
+ ) }),
47
+ /* @__PURE__ */ d(t.Footer, { children: [
48
+ /* @__PURE__ */ e(f, { visualType: "secondary", onClick: () => o(!1), children: s("time-field.cancel") }),
49
+ /* @__PURE__ */ e(f, { onClick: N, children: s("time-field.confirm") })
50
+ ] })
51
+ ]
52
+ }
53
+ ) });
54
+ };
55
+ P.displayName = "TimePickerModal";
56
+ export {
57
+ P as TimePickerModal,
58
+ P as default
59
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-time-picker-modal":"tedi-time-picker-modal-10d7ab34","tedi-time-picker-modal__header":"tedi-time-picker-modal__header-8331c682","tedi-time-picker-modal__title":"tedi-time-picker-modal__title-2c759f1e","tedi-time-picker-modal__body":"tedi-time-picker-modal__body-6b342637","tedi-time-picker-modal__picker":"tedi-time-picker-modal__picker-c4de3136"};exports.default=e;
@@ -0,0 +1,10 @@
1
+ const e = {
2
+ "tedi-time-picker-modal": "tedi-time-picker-modal-10d7ab34",
3
+ "tedi-time-picker-modal__header": "tedi-time-picker-modal__header-8331c682",
4
+ "tedi-time-picker-modal__title": "tedi-time-picker-modal__title-2c759f1e",
5
+ "tedi-time-picker-modal__body": "tedi-time-picker-modal__body-6b342637",
6
+ "tedi-time-picker-modal__picker": "tedi-time-picker-modal__picker-c4de3136"
7
+ };
8
+ export {
9
+ e as default
10
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),d=require("react"),h=require("../../../../../../../external/classnames/index.cjs.js"),R=require("../../../../buttons/button/button.cjs.js"),A=require("../../../choice-group/choice-group.cjs.js"),u=require("../../time-picker.module.scss.cjs.js"),C=require("../../../../../providers/label-provider/use-labels.cjs.js"),G=require("../../../../layout/grid/row.cjs.js"),I=require("../../../../layout/grid/col.cjs.js"),k=({times:m,value:o,onSelect:f,className:w,colWidth:a={xs:6,md:4},variant:p="button",bordered:x=!0})=>{const l=d.useId(),{getLabel:q}=C.useLabels(),s=d.useRef(null);d.useEffect(()=>{if(!o)return;const e=s.current;if(!e)return;const r=e.querySelector(`input[type="radio"][value="${o}"], button[data-time="${o}"]`);r==null||r.focus({preventScroll:!0})},[]);const _=e=>{var g;if(p!=="radio")return;const r=s.current;if(!r)return;const t=Array.from(r.querySelectorAll('input[type="radio"]:not([disabled])'));if(t.length===0)return;const i=t.findIndex(j=>j===document.activeElement);let n;switch(e.key){case"ArrowDown":case"ArrowRight":n=i<0||i===t.length-1?0:i+1;break;case"ArrowUp":case"ArrowLeft":n=i<=0?t.length-1:i-1;break;case"Home":n=0;break;case"End":n=t.length-1;break;default:return}e.preventDefault(),(g=t[n])==null||g.focus()},b=h.default(u.default["tedi-time-picker__grid"],{[u.default["tedi-time-picker__grid--borderless"]]:!x},w),y=typeof a=="object"?a:{width:a};return p==="radio"?c.jsx("div",{ref:s,className:b,onKeyDown:_,children:c.jsx(A.ChoiceGroup,{id:`time-picker-group-${l}`,label:q("timePicker.pickTime"),inputType:"radio",name:`time-grid-${l}`,value:o,onChange:e=>f(e),items:m.map(e=>({id:`time-${l}-${e}`,label:e,value:e,colProps:y})),direction:"row",variant:"card",showIndicator:!0,color:"secondary",hideLabel:!0})}):c.jsx("div",{ref:s,className:b,children:c.jsx(G.Row,{gutter:2,children:m.map(e=>d.createElement(I.Col,{...y,key:e},c.jsx(R.Button,{noStyle:!0,"data-time":e,className:h.default(u.default["tedi-time-picker__grid-item"],{[u.default["tedi-time-picker__grid-item--selected"]]:e===o}),onClick:()=>f(e),children:e})))})})};k.displayName="TimeGrid";exports.TimeGrid=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),j=require("../../../../../../../external/classnames/index.cjs.js"),d=require("react"),A=require("../../../choice-group/choice-group.cjs.js"),l=require("../../time-picker.module.scss.cjs.js"),G=require("../../../../../providers/label-provider/use-labels.cjs.js"),f=({times:b,value:n,onSelect:y,className:h,colWidth:s={xs:6,md:4},variant:m="button",bordered:g=!0})=>{const c=d.useId(),{getLabel:k}=G.useLabels(),a=d.useRef(null);d.useEffect(()=>{if(!n)return;const e=a.current;if(!e)return;const r=e.querySelector(`input[type="radio"][value="${n}"]`);r==null||r.focus({preventScroll:!0})},[]);const w=e=>{var p;const r=a.current;if(!r)return;const t=Array.from(r.querySelectorAll('input[type="radio"]:not([disabled])'));if(t.length===0)return;const o=t.findIndex(_=>_===document.activeElement);let i;switch(e.key){case"ArrowDown":case"ArrowRight":i=o<0||o===t.length-1?0:o+1;break;case"ArrowUp":case"ArrowLeft":i=o<=0?t.length-1:o-1;break;case"Home":i=0;break;case"End":i=t.length-1;break;default:return}e.preventDefault(),(p=t[i])==null||p.focus()},x=j.default(l.default["tedi-time-picker__grid"],{[l.default["tedi-time-picker__grid--borderless"]]:!g},h),q=typeof s=="object"?s:{width:s};return u.jsx("div",{ref:a,className:x,onKeyDown:w,children:u.jsx(A.ChoiceGroup,{id:`time-picker-group-${c}`,label:k("timePicker.pickTime"),inputType:"radio",name:`time-grid-${c}`,value:n,onChange:e=>y(e),items:b.map(e=>({id:`time-${c}-${e}`,label:m==="button"?u.jsx("span",{className:l.default["tedi-time-picker__slot-label"],children:e}):e,value:e,colProps:q})),direction:"row",variant:"card",showIndicator:m==="radio",color:"secondary",hideLabel:!0})})};f.displayName="TimeGrid";exports.TimeGrid=f;
@@ -25,7 +25,11 @@ export interface TimeGridProps {
25
25
  */
26
26
  colWidth?: ColSize | Pick<ColProps, 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'>;
27
27
  /**
28
- * Display mode
28
+ * Display mode. Both variants render the same `ChoiceGroup` card radio
29
+ * underneath — the only difference is the leading radio indicator:
30
+ *
31
+ * - `'button'` (default) — card with the label only, no dot.
32
+ * - `'radio'` — card with the radio dot before the label.
29
33
  */
30
34
  variant?: 'button' | 'radio';
31
35
  className?: string;