@revolist/ui 4.0.1-rc → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/LICENSE +21 -0
  2. package/MIGRATION.md +36 -0
  3. package/OWNERSHIP.md +32 -32
  4. package/README.md +405 -264
  5. package/_button.scss +6 -2
  6. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  7. package/_chunks/calculator-CDWOuAcp.js +4 -0
  8. package/_chunks/calendar-DJqiFwFT.js +258 -0
  9. package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
  10. package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
  11. package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
  12. package/_chunks/choice-chips-yr6Uzmof.js +126 -0
  13. package/_chunks/clock-BOhPNlW3.js +4 -0
  14. package/_chunks/color-palette-DMJUChWC.js +92 -0
  15. package/_chunks/{color-picker-BRv-__AM.js → color-picker-CMWxQlWt.js} +61 -56
  16. package/_chunks/component-DyWiItBR.js +878 -0
  17. package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
  18. package/_chunks/configurator-actions-DCodxcUw.js +155 -0
  19. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  20. package/_chunks/control-CbOYUakE.js +118 -0
  21. package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
  22. package/_chunks/controls-DD1qvPfE.js +650 -0
  23. package/_chunks/{date-control-CYCkb1aQ.js → date-control-XI2cpKI_.js} +21 -21
  24. package/_chunks/date-time-CGJdC1Qa.js +807 -0
  25. package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
  26. package/_chunks/dialog.parts-CJ3FVxC9.js +131 -0
  27. package/_chunks/duration-CBJWK82T.js +272 -0
  28. package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
  29. package/_chunks/editor-popup-ByU7qiub.js +82 -0
  30. package/_chunks/field-configurator-B-qtIwx1.js +288 -0
  31. package/_chunks/field-context-D57PnBbH.js +5 -0
  32. package/_chunks/framework-mount-Bk4O_T7T.js +54 -0
  33. package/_chunks/hooks.module-CG3gN83z.js +157 -0
  34. package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
  35. package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
  36. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  37. package/_chunks/minus-BOAR3A1C.js +4 -0
  38. package/_chunks/mount-C7i5gsKI.js +267 -0
  39. package/_chunks/native-Blr3byjO.js +32 -0
  40. package/_chunks/native-control-B9MNibfa.js +649 -0
  41. package/_chunks/{number-input-NnH57J4j.js → number-input-CgbZes5B.js} +89 -89
  42. package/_chunks/picker-DqpjDC90.js +122 -0
  43. package/_chunks/plus-CbGRkIGl.js +4 -0
  44. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  45. package/_chunks/popup-C35Isk7p.js +378 -0
  46. package/_chunks/preact.module-BBM36DnO.js +290 -0
  47. package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-WDrfiluf.js} +10 -10
  48. package/_chunks/render-m5eMMwFR.js +83 -0
  49. package/_chunks/reorder-list-C4HSda4n.js +59 -0
  50. package/_chunks/request-trail-SHynDFdM.js +762 -0
  51. package/_chunks/rich-text-CtjqRvv8.js +842 -0
  52. package/_chunks/rotate-left-BF6G883o.js +4 -0
  53. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  54. package/_chunks/selection-list-tooltips-BtWjpP6M.js +41 -0
  55. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  56. package/_chunks/tooltip-D4xkio5G.js +54 -0
  57. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  58. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  59. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  60. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  61. package/_dialog.scss +55 -21
  62. package/_form.scss +71 -21
  63. package/_legend.scss +25 -7
  64. package/_shared/data-query/index.d.ts +2 -2
  65. package/_shared/data-query/load-options.d.ts +2 -2
  66. package/_variables.scss +34 -32
  67. package/_vendor/preact/LICENSE +21 -0
  68. package/_vendor/preact/compat/src/index.d.ts +353 -0
  69. package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
  70. package/_vendor/preact/compat/src/suspense.d.ts +19 -0
  71. package/_vendor/preact/hooks/src/index.d.ts +145 -0
  72. package/_vendor/preact/src/dom.d.ts +2548 -0
  73. package/_vendor/preact/src/index.d.ts +373 -0
  74. package/_vendor/preact/src/jsx.d.ts +2958 -0
  75. package/_view-switcher.scss +6 -0
  76. package/activity-message.d.ts +2 -2
  77. package/activity-message.js +16 -16
  78. package/ai/_chat.scss +227 -0
  79. package/ai/_style.scss +170 -39
  80. package/ai/chat.d.ts +65 -0
  81. package/ai/components.d.ts +35 -6
  82. package/ai/index.d.ts +3 -0
  83. package/ai/index.js +3 -3
  84. package/ai/mount.d.ts +59 -6
  85. package/ai/prompt-history.d.ts +13 -0
  86. package/ai/request-trail.d.ts +9 -3
  87. package/ai/results/_style.scss +83 -0
  88. package/ai/results/index.d.ts +11 -0
  89. package/ai/results/metrics.d.ts +5 -0
  90. package/ai/results/table.d.ts +5 -0
  91. package/ai/results/text.d.ts +5 -0
  92. package/ai/results/types.d.ts +29 -0
  93. package/ai/transcript.d.ts +27 -0
  94. package/ai/translation-context.d.ts +1 -1
  95. package/ai/translations.d.ts +1 -1
  96. package/alert.d.ts +2 -2
  97. package/angular/angular.d.ts +1 -1
  98. package/angular/angular.js +13 -10
  99. package/assignee/assignee.scss +28 -6
  100. package/assignee/field.d.ts +2 -2
  101. package/assignee/index.js +86 -87
  102. package/assignee/layout.d.ts +2 -2
  103. package/assignee/picker.d.ts +1 -1
  104. package/avatar/avatar.style.scss +23 -6
  105. package/avatar/index.d.ts +25 -2
  106. package/avatar/index.js +42 -41
  107. package/badge.d.ts +1 -1
  108. package/badge.view.d.ts +8 -0
  109. package/brush-range/_brush-range.scss +55 -49
  110. package/brush-range/component.d.ts +2 -4
  111. package/brush-range/component.js +19 -19
  112. package/buttons/delete-button.d.ts +2 -1
  113. package/buttons/delete-button.js +1 -1
  114. package/buttons/delete-button.style.scss +6 -2
  115. package/buttons/remove-button.d.ts +2 -2
  116. package/buttons/remove-button.js +3 -3
  117. package/buttons/remove-button.style.scss +1 -1
  118. package/buttons/svg-button.d.ts +3 -2
  119. package/buttons/svg-button.js +23 -23
  120. package/calendar/_calendar.scss +27 -26
  121. package/calendar/calendar.d.ts +1 -1
  122. package/calendar/calendar.js +1 -1
  123. package/calendar/caption.d.ts +1 -1
  124. package/calendar/day.d.ts +1 -1
  125. package/calendar/day.js +4 -4
  126. package/calendar/header.d.ts +1 -1
  127. package/calendar/header.js +34 -35
  128. package/calendar/index.js +2 -2
  129. package/calendar/month-grid.d.ts +1 -1
  130. package/calendar/month-grid.js +37 -37
  131. package/calendar/picker.d.ts +1 -1
  132. package/calendar/types.d.ts +1 -1
  133. package/calendar/year-grid.d.ts +1 -1
  134. package/calendar/year-grid.js +12 -12
  135. package/cell-input.scss +3 -7
  136. package/cell-visuals/badge.style.scss +6 -3
  137. package/cell-visuals/bar-chart.style.scss +2 -1
  138. package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
  139. package/cell-visuals/progress-line.style.scss +1 -4
  140. package/cell-visuals/sparkline.style.scss +2 -1
  141. package/cell-visuals/timeline.style.css +4 -2
  142. package/checkbox/checkbox.scss +6 -24
  143. package/checkbox/index.d.ts +2 -2
  144. package/checkbox/index.js +9 -9
  145. package/choice-chips/index.d.ts +4 -2
  146. package/choice-chips/index.js +1 -1
  147. package/color-palette/color-palette.d.ts +1 -1
  148. package/color-palette/color-palette.js +1 -1
  149. package/color-palette/color-palette.style.scss +88 -25
  150. package/color-palette/color-picker.d.ts +1 -1
  151. package/color-palette/color-picker.js +2 -2
  152. package/color-palette/color-picker.style.scss +23 -10
  153. package/color-palette/common-palettes.d.ts +1 -1
  154. package/color-palette/common-palettes.js +1 -1
  155. package/color-palette/native.d.ts +15 -2
  156. package/component-catalog.d.ts +42 -29
  157. package/configurator-actions.d.ts +67 -0
  158. package/configurator-actions.js +1 -0
  159. package/configurator-aggregation-list.d.ts +14 -0
  160. package/configurator-aggregation-list.js +63 -0
  161. package/configurator-drop-zone.d.ts +39 -0
  162. package/configurator-drop-zone.js +66 -0
  163. package/configurator-field-icon.d.ts +10 -0
  164. package/configurator-field-icon.js +1 -0
  165. package/configurator-focus.d.ts +4 -0
  166. package/configurator-focus.js +39 -0
  167. package/configurator-sections.d.ts +42 -0
  168. package/configurator-sections.js +71 -0
  169. package/control-attributes.js +7 -7
  170. package/control-presentation.d.ts +8 -2
  171. package/control-presentation.js +31 -26
  172. package/controls.d.ts +23 -11
  173. package/controls.js +4 -3
  174. package/core/editor-commit.d.ts +1 -1
  175. package/core/editor-popup-position.d.ts +6 -2
  176. package/core/editor-popup.d.ts +5 -1
  177. package/core/editor-popup.js +1 -1
  178. package/core/popover-controller.d.ts +35 -0
  179. package/core/popup-ownership.d.ts +2 -0
  180. package/core/selection-list-tooltips.d.ts +2 -0
  181. package/core/title-tooltip.d.ts +2 -0
  182. package/core/tooltip-session.d.ts +29 -0
  183. package/core/tooltip-surface.d.ts +13 -0
  184. package/core/tooltip-text.d.ts +6 -0
  185. package/core/tooltip.d.ts +35 -0
  186. package/core/top-layer-popup.d.ts +4 -0
  187. package/core/top-layer-popup.js +1 -23
  188. package/date-time/attach.d.ts +1 -1
  189. package/date-time/date-control.d.ts +2 -2
  190. package/date-time/field.d.ts +4 -3
  191. package/date-time/index.js +1 -1
  192. package/date-time/picker.d.ts +1 -1
  193. package/date-time/style.scss +242 -39
  194. package/date-time/time-control.d.ts +1 -1
  195. package/date-time/time-selection.d.ts +3 -1
  196. package/date-time/types.d.ts +6 -2
  197. package/dialog/dialog-action-footer.d.ts +17 -2
  198. package/dialog/dialog.dom.d.ts +15 -2
  199. package/dialog/dialog.dom.js +53 -53
  200. package/dialog/dialog.parts.d.ts +18 -18
  201. package/dialog/dialog.parts.js +1 -1
  202. package/dialog/dialog.preact.d.ts +1 -1
  203. package/dialog/dialog.preact.js +6 -6
  204. package/distribution-chart/_distribution-chart.scss +113 -77
  205. package/distribution-chart/area-chart.d.ts +1 -1
  206. package/distribution-chart/area-chart.js +25 -25
  207. package/distribution-chart/bar-chart.d.ts +6 -3
  208. package/distribution-chart/bar-chart.js +10 -6
  209. package/distribution-chart/chart-frame.d.ts +3 -2
  210. package/distribution-chart/index.d.ts +2 -2
  211. package/distribution-chart/index.js +6 -6
  212. package/distribution-chart/line-chart.d.ts +1 -1
  213. package/distribution-chart/line-chart.js +9 -9
  214. package/distribution-chart/types.d.ts +1 -1
  215. package/dropdown/content.d.ts +3 -2
  216. package/dropdown/content.js +1 -141
  217. package/dropdown/control.d.ts +14 -0
  218. package/dropdown/control.js +1 -0
  219. package/dropdown/control.view.d.ts +6 -0
  220. package/dropdown/dropdown.service.d.ts +1 -1
  221. package/dropdown/dropdown.service.js +9 -9
  222. package/dropdown/dropdown.types.d.ts +5 -1
  223. package/dropdown/editor-dropdown.style.scss +54 -16
  224. package/dropdown/index.d.ts +1 -1
  225. package/dropdown/index.js +3 -4
  226. package/dropdown/lookup-field.d.ts +6 -1
  227. package/dropdown/lookup-field.js +42 -41
  228. package/dropdown/popup.d.ts +2 -2
  229. package/dropdown/popup.js +1 -140
  230. package/duration/controls.d.ts +1 -1
  231. package/duration/index.d.ts +2 -2
  232. package/duration/index.js +1 -1
  233. package/duration/style.scss +1 -1
  234. package/editor-actions.d.ts +1 -1
  235. package/editor-actions.js +21 -20
  236. package/editor-layout/index.d.ts +5 -5
  237. package/editor-layout/index.js +43 -38
  238. package/editor-layout/style.scss +82 -18
  239. package/field-configurator.d.ts +40 -2
  240. package/field-configurator.js +4 -170
  241. package/field-expansion.d.ts +9 -0
  242. package/field-reorder.hook.js +32 -32
  243. package/fieldset.d.ts +3 -0
  244. package/filter/filters/slider/_single-slider.scss +57 -38
  245. package/filter/filters/slider/_slider.scss +41 -33
  246. package/filter/filters/slider/control.js +2 -0
  247. package/filter/filters/slider/preact.js +3 -3
  248. package/filter/filters/slider/runtime.js +49 -22
  249. package/filter/filters/slider/single.d.ts +1 -1
  250. package/filter/filters/slider/single.js +23 -23
  251. package/filter-badge.d.ts +1 -1
  252. package/filter-badge.js +23 -22
  253. package/filter-controls.d.ts +1 -2
  254. package/filter-controls.js +29 -30
  255. package/form-controls/field-context.d.ts +5 -0
  256. package/form-controls/index.d.ts +10 -2
  257. package/form-controls/index.js +17 -22
  258. package/form-controls/presentation.d.ts +2 -2
  259. package/form-controls/presentation.js +59 -51
  260. package/formatting/comparison-preview.d.ts +1 -1
  261. package/formatting/icon-controls.d.ts +1 -1
  262. package/formatting/index.d.ts +1 -1
  263. package/formatting/index.js +106 -100
  264. package/formatting/inspector-section.d.ts +1 -1
  265. package/formatting/styles.scss +14 -57
  266. package/formatting/typography-controls.d.ts +1 -1
  267. package/framework-mount.d.ts +1 -1
  268. package/framework.js +237 -226
  269. package/history-controls.d.ts +14 -0
  270. package/history-controls.js +27 -0
  271. package/icon-toolbar.d.ts +62 -0
  272. package/icon-toolbar.js +1 -0
  273. package/icons/icon.d.ts +2 -2
  274. package/icons/icon.js +1 -1
  275. package/legend.d.ts +2 -2
  276. package/legend.js +12 -12
  277. package/masked-input/index.d.ts +1 -1
  278. package/masked-input/index.js +109 -109
  279. package/native-control.d.ts +14 -13
  280. package/native-control.js +3 -26
  281. package/native-controls.d.ts +54 -2
  282. package/native-styles.css +1 -1
  283. package/native-styles.scss +6 -2
  284. package/native.d.ts +3 -3
  285. package/native.js +49 -45
  286. package/number-input/index.d.ts +2 -2
  287. package/number-input/index.js +1 -1
  288. package/package.json +88 -15
  289. package/pagination.d.ts +3 -0
  290. package/pagination.js +50 -40
  291. package/pdf-viewer/component.d.ts +1 -1
  292. package/pdf-viewer/controller.js +1 -1
  293. package/pdf-viewer/header.d.ts +2 -2
  294. package/pdf-viewer/index.d.ts +2 -2
  295. package/pdf-viewer/index.js +13 -13
  296. package/pdf-viewer/search-bar.d.ts +2 -2
  297. package/pdf-viewer/status.d.ts +2 -2
  298. package/pdf-viewer/style.scss +205 -45
  299. package/pdf-viewer/toolbar.d.ts +1 -1
  300. package/pickers.d.ts +6 -2
  301. package/preact-mount.d.ts +1 -1
  302. package/preact-mount.js +2 -2
  303. package/preact.d.ts +15 -10
  304. package/preact.js +109 -64
  305. package/progress/_bar.scss +9 -3
  306. package/progress/_circular.scss +2 -1
  307. package/rating-choice.d.ts +1 -1
  308. package/rating-choice.js +1 -1
  309. package/react-adapter.d.ts +5 -3
  310. package/react-control.d.ts +1 -0
  311. package/react.d.ts +20 -11
  312. package/react.js +72 -88
  313. package/reorder-list.d.ts +2 -2
  314. package/reorder-list.js +1 -1
  315. package/reorder-list.scss +59 -17
  316. package/resource-picker/resource-picker-avatar.d.ts +1 -1
  317. package/resource-picker/resource-picker-avatar.js +14 -14
  318. package/resource-picker/resource-picker-option.d.ts +1 -1
  319. package/resource-picker/resource-picker-option.js +28 -28
  320. package/resource-picker/resource-picker-popup.d.ts +1 -1
  321. package/resource-picker/resource-picker-popup.js +3 -3
  322. package/resource-picker/resource-picker.d.ts +1 -1
  323. package/resource-picker/resource-picker.js +68 -66
  324. package/resource-picker/resource-picker.scss +66 -35
  325. package/rich-text/engine.d.ts +17 -19
  326. package/rich-text/format-html.d.ts +2 -0
  327. package/rich-text/index.d.ts +11 -7
  328. package/rich-text/index.js +1 -1
  329. package/rich-text/model.d.ts +6 -3
  330. package/rich-text/render-model.d.ts +4 -5
  331. package/rich-text/style.scss +295 -55
  332. package/rich-text/syntax.d.ts +5 -2
  333. package/rich-text/toolbar.d.ts +7 -7
  334. package/rich-text/translations.d.ts +5 -15
  335. package/search-input/index.js +12 -12
  336. package/search-input/native.d.ts +21 -2
  337. package/segmented-switch/index.d.ts +1 -1
  338. package/segmented-switch/index.js +1 -1
  339. package/select.d.ts +22 -0
  340. package/select.js +1 -0
  341. package/selection-list.d.ts +1 -0
  342. package/selection-list.js +3 -1
  343. package/status-feedback/exit-snapshot.js +1 -1
  344. package/status-feedback/index.js +2 -2
  345. package/status-feedback/popover.js +9 -9
  346. package/status-feedback/render.d.ts +2 -2
  347. package/status-feedback/render.js +3 -44
  348. package/status-feedback/status-feedback.scss +130 -34
  349. package/status-feedback/types.d.ts +4 -0
  350. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  351. package/styles/_activity-message.scss +24 -7
  352. package/styles/_alert.scss +78 -17
  353. package/styles/_cell-editor-frame.scss +11 -0
  354. package/styles/_compositions.scss +404 -82
  355. package/styles/_control.scss +42 -12
  356. package/styles/_disclosure.scss +15 -5
  357. package/styles/_editor-counter.scss +16 -6
  358. package/styles/_editor-slider.scss +8 -4
  359. package/styles/_field-configurator.scss +321 -23
  360. package/styles/_fields-grid.scss +49 -0
  361. package/styles/_filter-controls.scss +10 -2
  362. package/styles/_icon-action.scss +48 -15
  363. package/styles/_loading.scss +12 -3
  364. package/styles/_motion.scss +32 -9
  365. package/styles/_palette.scss +0 -24
  366. package/styles/_primitives.scss +376 -116
  367. package/styles/_theme.scss +130 -86
  368. package/styles/_thresholds.scss +28 -25
  369. package/styles/_time-grid.scss +8 -3
  370. package/styles/_tokens.scss +6 -1
  371. package/styles/configurator-actions.scss +241 -0
  372. package/styles/pagination.css +213 -0
  373. package/styles/{legacy-rating.css → rating.css} +8 -3
  374. package/styles.css +1 -1
  375. package/styles.scss +3 -5
  376. package/surfaces.d.ts +38 -2
  377. package/surfaces.js +37 -134
  378. package/svelte/UiComponent.server.js +1 -48
  379. package/svelte/UiComponent.svelte +44 -32
  380. package/svelte.d.ts +1 -1
  381. package/svelte.js +33 -68
  382. package/switch/index.js +3 -2
  383. package/time-grid.d.ts +1 -2
  384. package/time-grid.js +43 -42
  385. package/timeline-track/_style.scss +96 -24
  386. package/timeline-track/component.d.ts +5 -1
  387. package/timeline-track/index.js +91 -74
  388. package/timeline-track/model.d.ts +9 -0
  389. package/timeline-track/model.js +10 -1
  390. package/ui.css +1 -1
  391. package/view-switcher.d.ts +23 -0
  392. package/vue-adapter.d.ts +1 -1
  393. package/vue.d.ts +160 -144
  394. package/vue.js +149 -178
  395. package/_chunks/calendar-BsDxCYhI.js +0 -248
  396. package/_chunks/chart-frame-BvxbmEU9.js +0 -126
  397. package/_chunks/choice-chips-0HfOnK_4.js +0 -110
  398. package/_chunks/color-palette-BmZ7kH9R.js +0 -94
  399. package/_chunks/component-D4PH5UZT.js +0 -859
  400. package/_chunks/control-tooltip-BCNzQCXE.js +0 -100
  401. package/_chunks/controls-NEL5tDaz.js +0 -615
  402. package/_chunks/date-time-DjucJmbc.js +0 -769
  403. package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
  404. package/_chunks/dropdown-CkGQBm1Q.js +0 -357
  405. package/_chunks/duration-BCaktcvz.js +0 -270
  406. package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
  407. package/_chunks/editor-popup-B7fu_A_T.js +0 -81
  408. package/_chunks/framework-mount-BKIOsvY-.js +0 -54
  409. package/_chunks/mount-0-8opf1j.js +0 -90
  410. package/_chunks/native.view-8q_nwQ7x.js +0 -32
  411. package/_chunks/picker-oazJ7sO_.js +0 -121
  412. package/_chunks/reorder-list-BV3kZXso.js +0 -59
  413. package/_chunks/request-trail-D0oVzdRd.js +0 -347
  414. package/_chunks/rich-text-2Rla349o.js +0 -477
  415. package/avatar/index.view.d.ts +0 -25
  416. package/color-palette/native.view.d.ts +0 -15
  417. package/control-presentation.view.d.ts +0 -8
  418. package/dialog/dialog-action-footer.view.d.ts +0 -20
  419. package/dialog/dialog.dom.view.d.ts +0 -15
  420. package/form-controls/index.view.d.ts +0 -12
  421. package/formatting/control-tooltip.d.ts +0 -27
  422. package/native-controls.view.d.ts +0 -54
  423. package/react-native-select.d.ts +0 -6
  424. package/search-input/native.view.d.ts +0 -21
  425. package/styles/legacy-pagination.css +0 -112
  426. package/surfaces.view.d.ts +0 -63
  427. package/vue-native-select.d.ts +0 -9
@@ -0,0 +1,807 @@
1
+ import { i as e } from "./preact.module-BBM36DnO.js";
2
+ import { a as t, i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
3
+ import { t as o } from "./jsxRuntime.module-F6UFnpT-.js";
4
+ import { createPreactElement as s, releasePreactElement as c } from "../preact-mount.js";
5
+ import { createControlId as l } from "../core/control-id.js";
6
+ import { SvgIcon as u } from "../icons/icon.js";
7
+ import { n as d } from "./native-control-B9MNibfa.js";
8
+ import "./chevron-down-GbplLa6s.js";
9
+ import { R as f, t as p } from "./controls-DD1qvPfE.js";
10
+ import { EditorList as m, EditorListItem as h } from "../editor-layout/index.js";
11
+ import { t as g } from "./clock-BOhPNlW3.js";
12
+ import { i as _, s as v } from "./iso-B0YHBK7m.js";
13
+ import { f as y, h as b, m as x, p as S } from "./model-mPO2tG2f.js";
14
+ import { n as C, t as w } from "./date-control-XI2cpKI_.js";
15
+ import { t as T } from "./picker-DqpjDC90.js";
16
+ import { t as E } from "./editor-popup-ByU7qiub.js";
17
+ import { n as D } from "./editor-commit-Bq3wSgvr.js";
18
+ import { EditorActions as O } from "../editor-actions.js";
19
+ //#region ../dates/src/date-controls.ts
20
+ var k = /^(\d{4})-(\d{2})-(\d{2})$/, A = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/, j = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
21
+ function M(e, t, n = "minute") {
22
+ if (Number.isNaN(t.getTime())) return "";
23
+ let r = `${P(t.getHours())}:${P(t.getMinutes())}${n === "second" ? `:${P(t.getSeconds())}` : ""}`;
24
+ if (e === "time") return r;
25
+ let i = _(t);
26
+ return e === "date" ? i : `${i}T${r}`;
27
+ }
28
+ function N(e, t, n = /* @__PURE__ */ new Date()) {
29
+ if (e === "time") {
30
+ let e = j.exec(t);
31
+ if (!e) return;
32
+ let r = Number(e[1]), i = Number(e[2]), a = Number(e[3] ?? 0);
33
+ if (r > 23 || i > 59 || a > 59 || Number.isNaN(n.getTime())) return;
34
+ let o = new Date(n.getTime());
35
+ return o.setHours(r, i, a, 0), o;
36
+ }
37
+ let r = e === "date" ? k.exec(t) : A.exec(t);
38
+ if (!r) return;
39
+ let i = Number(r[1]), a = Number(r[2]), o = Number(r[3]), s = Number(r[4] ?? 0), c = Number(r[5] ?? 0), l = Number(r[6] ?? 0), u = Number((r[7] ?? "").padEnd(3, "0")), d = /* @__PURE__ */ new Date(0);
40
+ if (d.setFullYear(i, a - 1, o), d.setHours(s, c, l, u), !(a < 1 || a > 12 || o < 1 || d.getFullYear() !== i || d.getMonth() !== a - 1 || d.getDate() !== o || d.getHours() !== s || d.getMinutes() !== c || d.getSeconds() !== l || d.getMilliseconds() !== u)) return d;
41
+ }
42
+ function P(e) {
43
+ return String(e).padStart(2, "0");
44
+ }
45
+ //#endregion
46
+ //#region ../dates/src/civil-time.ts
47
+ var F = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/;
48
+ function I(e) {
49
+ let t = /* @__PURE__ */ new Date(0);
50
+ return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t.getTime();
51
+ }
52
+ function L(e) {
53
+ let t = F.exec(e);
54
+ if (!t) return;
55
+ let n = {
56
+ year: Number(t[1]),
57
+ month: Number(t[2]),
58
+ day: Number(t[3]),
59
+ hour: Number(t[4]),
60
+ minute: Number(t[5]),
61
+ second: Number(t[6] ?? 0)
62
+ }, r = new Date(I(n)), i = {
63
+ year: r.getUTCFullYear(),
64
+ month: r.getUTCMonth() + 1,
65
+ day: r.getUTCDate(),
66
+ hour: r.getUTCHours(),
67
+ minute: r.getUTCMinutes(),
68
+ second: r.getUTCSeconds()
69
+ };
70
+ return Object.keys(n).every((e) => n[e] === i[e]) ? n : void 0;
71
+ }
72
+ //#endregion
73
+ //#region ../dates/src/temporal-controls.ts
74
+ function R(e) {
75
+ return e.split("T")[0];
76
+ }
77
+ function z(e) {
78
+ return e.includes("T") ? e.split("T")[1] : e;
79
+ }
80
+ function B(e, t, n) {
81
+ return n === "datetime" ? `${e}T${t.includes("T") ? z(t) : "00:00"}` : e;
82
+ }
83
+ function V(e, t, n) {
84
+ return n === "datetime" ? `${R(e)}T${t}` : t;
85
+ }
86
+ function ee(e, t) {
87
+ return e === "date" ? v(t) : e === "datetime" ? !!L(t.replace(/(\d{2}:\d{2}:\d{2})\.\d{1,3}$/, "$1")) : !!N(e, t);
88
+ }
89
+ function H(e) {
90
+ let t = N("time", e);
91
+ return t ? t.getHours() * 3600 + t.getMinutes() * 60 + t.getSeconds() : void 0;
92
+ }
93
+ function U(e, t) {
94
+ let n = H(e);
95
+ if (n === void 0) return !1;
96
+ let r = t.min ? H(t.min) : void 0, i = t.max ? H(t.max) : void 0;
97
+ return (r === void 0 || n >= r) && (i === void 0 || n <= i) && (t.step === void 0 || t.step > 0 && (n - (r ?? 0)) % t.step === 0);
98
+ }
99
+ function W(e, t, n = "minute", r) {
100
+ let i = N("time", e);
101
+ return i ? new Intl.DateTimeFormat(r ?? (t === "12h" ? "en-US" : "en-GB"), {
102
+ hour: "2-digit",
103
+ minute: "2-digit",
104
+ ...n === "second" ? { second: "2-digit" } : {},
105
+ hourCycle: t === "12h" ? "h12" : "h23"
106
+ }).format(i) : e;
107
+ }
108
+ function G(e, t = "minute", n) {
109
+ if (e = e.replace(/[\u200e\u200f\u061c]/g, "").trim(), n) {
110
+ let t = new Intl.NumberFormat(n, { useGrouping: !1 });
111
+ for (let n = 0; n < 10; n++) e = e.split(t.format(n)).join(String(n));
112
+ let r = new Intl.DateTimeFormat(n, {
113
+ hour: "numeric",
114
+ hourCycle: "h12"
115
+ });
116
+ for (let [t, n] of [[1, "AM"], [13, "PM"]]) {
117
+ let i = r.formatToParts(new Date(2e3, 0, 1, t)).find((e) => e.type === "dayPeriod")?.value;
118
+ i && (e = e.replace(i, n));
119
+ }
120
+ let i = new Intl.DateTimeFormat(n, {
121
+ hour: "2-digit",
122
+ minute: "2-digit",
123
+ second: "2-digit",
124
+ hourCycle: "h23"
125
+ }).formatToParts(new Date(2e3, 0, 1, 13, 45, 20));
126
+ for (let t of i) t.type === "literal" && t.value.trim() && (e = e.split(t.value).join(":"));
127
+ e = e.replace(/^\s*(AM|PM)\s*(.*)$/i, "$2 $1");
128
+ }
129
+ let r = N("time", e.trim());
130
+ if (r) return M("time", r, t);
131
+ let i = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap])\.?m\.?$/i.exec(e.trim());
132
+ if (!i) return;
133
+ let a = Number(i[1]);
134
+ if (a < 1 || a > 12) return;
135
+ let o = N("time", `${String(a % 12 + (i[4].toLowerCase() === "p" ? 12 : 0)).padStart(2, "0")}:${i[2]}:${i[3] ?? "00"}`);
136
+ return o ? M("time", o, t) : void 0;
137
+ }
138
+ //#endregion
139
+ //#region ../dates/src/time-selection.ts
140
+ function K(e) {
141
+ let t = e.min ? H(e.min) : void 0, n = e.max ? H(e.max) : void 0, r = e.step ?? (e.precision === "second" ? 1 : 60);
142
+ if (!Number.isFinite(r) || r <= 0) return [];
143
+ let i = e.precision === "second" ? 1 : 60, a = [];
144
+ for (let e = 0; e < 86400; e += i) (t === void 0 || e >= t) && (n === void 0 || e <= n) && (e - (t ?? 0)) % r === 0 && a.push(e);
145
+ return a;
146
+ }
147
+ function q(e, t = "minute") {
148
+ let n = (e) => String(e).padStart(2, "0");
149
+ return `${n(Math.floor(e / 3600))}:${n(Math.floor(e / 60) % 60)}${t === "second" ? `:${n(e % 60)}` : ""}`;
150
+ }
151
+ function J(e, t) {
152
+ return e === "12h" || e === "locale" && !!new Intl.DateTimeFormat(t, { hour: "numeric" }).resolvedOptions().hour12;
153
+ }
154
+ function te(e, t) {
155
+ return new Intl.DateTimeFormat(t, {
156
+ hour: "numeric",
157
+ hourCycle: "h12"
158
+ }).formatToParts(new Date(2e3, 0, 1, e ? 13 : 1)).find((e) => e.type === "dayPeriod")?.value ?? (e ? "PM" : "AM");
159
+ }
160
+ function ne(e, t, n) {
161
+ let r = H(t), i = r ?? e[0] ?? 0, a = Math.floor(i / 3600), o = Math.floor(i / 60) % 60, s = i % 60, c = {
162
+ hour: /* @__PURE__ */ new Map(),
163
+ minute: /* @__PURE__ */ new Map(),
164
+ second: /* @__PURE__ */ new Map(),
165
+ period: /* @__PURE__ */ new Map()
166
+ }, l = (e, t, n, r) => {
167
+ let i = c[e].get(t);
168
+ (i === void 0 || Math.abs(n - r) < Math.abs(i - r)) && c[e].set(t, n);
169
+ };
170
+ for (let t of e) {
171
+ let e = Math.floor(t / 3600), r = Math.floor(t / 60) % 60, i = t % 60;
172
+ (!n || Math.floor(e / 12) === Math.floor(a / 12)) && l("hour", e, t, e * 3600 + o * 60 + s), e === a && l("minute", r, t, a * 3600 + r * 60 + s), e === a && r === o && l("second", i, t, a * 3600 + o * 60 + i);
173
+ let c = Math.floor(e / 12);
174
+ l("period", c, t, (a % 12 + c * 12) * 3600 + o * 60 + s);
175
+ }
176
+ return {
177
+ columns: c,
178
+ hour: a,
179
+ minute: o,
180
+ second: s,
181
+ period: Math.floor(a / 12),
182
+ hasValue: r !== void 0
183
+ };
184
+ }
185
+ //#endregion
186
+ //#region src/date-time/types.ts
187
+ var Y = {
188
+ date: "Date",
189
+ dates: "Dates",
190
+ invalidDate: "Enter a valid date in the indicated format.",
191
+ outOfRange: "The date is outside the allowed range.",
192
+ disabledDate: "This date is unavailable.",
193
+ invalidRange: "Enter a complete range with the start before or equal to the end.",
194
+ selectionCount: "The selection does not meet the allowed count or length.",
195
+ requiredValue: "A value is required.",
196
+ startDate: "Start date",
197
+ endDate: "End date",
198
+ startTime: "Start time",
199
+ endTime: "End time",
200
+ time: "Time",
201
+ hours: "Hour",
202
+ minutes: "Minute",
203
+ seconds: "Second",
204
+ dayPeriod: "Period",
205
+ noTimes: "No available times.",
206
+ invalid: "Enter a valid value within the allowed range.",
207
+ chooseDate: "Choose date",
208
+ chooseTime: "Choose time"
209
+ };
210
+ function X(e, t) {
211
+ return (e === "time" ? t?.chooseTime : t?.chooseDate) ?? (e === "time" ? Y.chooseTime : Y.chooseDate);
212
+ }
213
+ //#endregion
214
+ //#region src/date-time/validation.ts
215
+ function re(e, t, n = "") {
216
+ let { kind: r = "date", selection: i = "single", value: a, calendar: o = {} } = e, s = {
217
+ ...Y,
218
+ ...e.text
219
+ }, c = a && !Array.isArray(a) && typeof a == "object" ? a : void 0, l = typeof a == "string" ? a : "", u = c?.from ?? "", d = c?.to ?? "", f = e.required ?? o.required ?? !1, p = c ? [u, d] : Array.isArray(a) ? a : l ? [l] : [], m = (e) => v(e) && (!o.minDate || e >= o.minDate) && (!o.maxDate || e <= o.maxDate) && !o.isDateDisabled?.(e) && !o.isMonthDisabled?.(y(e, o.calendarSystem)), h = (t) => ee(r, t) && (r === "time" || m(R(t))) && (r === "date" || U(z(t), {
220
+ min: e.minTime,
221
+ max: e.maxTime,
222
+ step: e.timeStep
223
+ })), g = c && d ? x(R(u), R(d)) : 0, _ = i === "multiple" ? p.length : g, b = !p.length && !f || i === "single" || (!o.min || _ >= o.min) && (o.max === void 0 || _ <= o.max), C = (() => {
224
+ if (r === "time" || !c?.to || !o.excludeDisabled || !p.every(h)) return !0;
225
+ if (g > 366e3) return !1;
226
+ for (let e = R(u); e <= R(d); e = S(e, 1)) if (!m(e)) return !1;
227
+ return !0;
228
+ })(), w = "", T = r === "time" || p.every((e) => {
229
+ let n = R(e);
230
+ if (!v(n)) return !1;
231
+ let r = o.validateSelection?.(n, {
232
+ month: o.month ?? t,
233
+ view: o.defaultView ?? "month",
234
+ referenceDate: o.referenceDate,
235
+ selection: c ? {
236
+ from: R(u),
237
+ to: R(d || u)
238
+ } : {
239
+ from: n,
240
+ to: n
241
+ }
242
+ });
243
+ return typeof r == "string" && (w = r), r !== !1 && typeof r != "string";
244
+ }), E = !n && b && T && C && (!f || p.length > 0) && p.every(h) && (i !== "multiple" || new Set(p).size === p.length) && (!c || !!d && u <= d) && (i !== "multiple" || r === "date"), D = (t) => e.text?.[t] ?? e.text?.invalid ?? s[t] ?? s.invalid, O = r === "time" ? [] : p.map(R);
245
+ return {
246
+ valid: E,
247
+ errorMessage: n || w || (!p.length && f ? D("requiredValue") : c && (!u || !d) ? D("invalidRange") : O.some((e) => !v(e)) ? D("invalidDate") : O.some((e) => o.minDate && e < o.minDate || o.maxDate && e > o.maxDate) ? D("outOfRange") : O.some((e) => !m(e)) || !C ? D("disabledDate") : c && (!d || u > d) ? D("invalidRange") : !b || i === "multiple" && new Set(p).size !== p.length ? D("selectionCount") : s.invalid),
248
+ validDate: m
249
+ };
250
+ }
251
+ //#endregion
252
+ //#region src/date-time/time-control.tsx
253
+ function ie({ value: e, label: t, format: r = "locale", precision: i = "minute", locale: a, min: s, max: c, step: l, onChange: u }) {
254
+ let [f, p] = n(!1), [m, h] = n("");
255
+ if (r === "locale") return /* @__PURE__ */ o(d, {
256
+ type: "time",
257
+ "aria-label": t,
258
+ value: e,
259
+ min: s,
260
+ max: c,
261
+ step: l ?? (i === "second" ? 1 : 60),
262
+ onInput: (e) => u(e.currentTarget.value)
263
+ });
264
+ let g = W(e, r, i, a);
265
+ return /* @__PURE__ */ o(d, {
266
+ type: "text",
267
+ "aria-label": t,
268
+ value: f ? m : g,
269
+ "aria-invalid": !!e && !U(e, {
270
+ min: s,
271
+ max: c,
272
+ step: l
273
+ }),
274
+ placeholder: r === "12h" ? "09:00 AM" : "09:00",
275
+ onFocus: () => {
276
+ p(!0), h(g);
277
+ },
278
+ onBlur: () => p(!1),
279
+ onInput: (e) => {
280
+ let t = e.currentTarget.value;
281
+ h(t), u(t ? G(t, i, a) ?? t : "");
282
+ }
283
+ });
284
+ }
285
+ //#endregion
286
+ //#region src/date-time/time-selection.tsx
287
+ function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: s, display: c, onSelect: l }) {
288
+ let u = a(null), d = r !== void 0 && s.has(r), f = d ? r : n.find((e) => s.has(e));
289
+ i(() => {
290
+ let e = u.current;
291
+ if (!e) return;
292
+ let t = () => {
293
+ let t = e.querySelector("[aria-selected=\"true\"], [tabindex=\"0\"]");
294
+ t && e.clientHeight && (e.scrollTop = t.offsetTop - (e.clientHeight - t.clientHeight) / 2);
295
+ };
296
+ t();
297
+ let n = new ResizeObserver(t);
298
+ return n.observe(e), () => n.disconnect();
299
+ }, [r, f]);
300
+ let p = (e) => {
301
+ let t = s.get(Number(e));
302
+ t !== void 0 && l(t);
303
+ };
304
+ return /* @__PURE__ */ o("div", {
305
+ class: "rv-time-selection__column",
306
+ children: [e && /* @__PURE__ */ o("span", {
307
+ class: "rv-time-selection__label",
308
+ children: e
309
+ }), /* @__PURE__ */ o(m, {
310
+ label: t,
311
+ listRef: u,
312
+ variant: "plain",
313
+ className: "rv-time-selection__list",
314
+ onSelect: p,
315
+ children: n.map((e) => /* @__PURE__ */ o(h, {
316
+ value: String(e),
317
+ selected: r === e && d,
318
+ disabled: !s.has(e),
319
+ tabIndex: e === f ? 0 : -1,
320
+ onClick: () => p(String(e)),
321
+ children: c(e)
322
+ }, e))
323
+ })]
324
+ });
325
+ }
326
+ function Z({ value: e, label: i, text: a, onChange: s, format: c = "locale", precision: l = "minute", locale: d, min: f, max: m, step: h, collapsible: g = !1 }) {
327
+ let [_, v] = n(!1), y = t(), b = J(c, d), x = r(() => K({
328
+ min: f,
329
+ max: m,
330
+ step: h,
331
+ precision: l
332
+ }), [
333
+ f,
334
+ m,
335
+ h,
336
+ l
337
+ ]), S = r(() => ne(x, e, b), [
338
+ x,
339
+ e,
340
+ b
341
+ ]), C = r(() => new Intl.NumberFormat(d, {
342
+ minimumIntegerDigits: 2,
343
+ useGrouping: !1
344
+ }), [d]), w = (e) => s(q(e, l)), T = (e, t, n, r = (e) => C.format(e)) => /* @__PURE__ */ o(ae, {
345
+ label: e === "period" ? void 0 : t,
346
+ accessibleLabel: `${i}: ${t}`,
347
+ values: n,
348
+ selected: S.hasValue ? S[e] : void 0,
349
+ choices: S.columns[e],
350
+ display: r,
351
+ onSelect: w
352
+ }), E = (e, t = 0) => Array.from({ length: e }, (e, n) => t + n);
353
+ return /* @__PURE__ */ o("section", {
354
+ class: "rv-time-selection",
355
+ children: [/* @__PURE__ */ o("div", {
356
+ class: "rv-time-selection__entry-row",
357
+ children: [/* @__PURE__ */ o("label", {
358
+ class: "rv-time-selection__entry",
359
+ children: [/* @__PURE__ */ o("span", { children: i }), /* @__PURE__ */ o(ie, {
360
+ value: e,
361
+ label: i,
362
+ format: c,
363
+ precision: l,
364
+ locale: d,
365
+ min: f,
366
+ max: m,
367
+ step: h,
368
+ onChange: s
369
+ })]
370
+ }), g && /* @__PURE__ */ o(p, {
371
+ variant: "ghost",
372
+ className: "rv-time-selection__toggle",
373
+ "aria-label": a.chooseTime ?? a.time,
374
+ "aria-expanded": _,
375
+ "aria-controls": _ ? y : void 0,
376
+ onClick: () => v(!_),
377
+ children: /* @__PURE__ */ o(u, { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"/></svg>" })
378
+ })]
379
+ }), (!g || _) && /* @__PURE__ */ o("div", {
380
+ id: y,
381
+ class: "rv-time-selection__clock",
382
+ children: [
383
+ /* @__PURE__ */ o("div", {
384
+ class: `rv-time-selection__columns${l === "second" ? " rv-time-selection__columns--seconds" : ""}`,
385
+ children: [
386
+ T("hour", a.hours, E(b ? 12 : 24, b ? S.period * 12 : 0), (e) => C.format(b ? e % 12 || 12 : e)),
387
+ T("minute", a.minutes, E(60)),
388
+ l === "second" && T("second", a.seconds, E(60))
389
+ ]
390
+ }),
391
+ b && /* @__PURE__ */ o("div", {
392
+ class: "rv-time-selection__period",
393
+ children: T("period", a.dayPeriod, [0, 1], (e) => te(e, d))
394
+ }),
395
+ !x.length && /* @__PURE__ */ o("p", {
396
+ class: "rv-time-selection__empty",
397
+ role: "status",
398
+ children: a.noTimes
399
+ })
400
+ ]
401
+ })]
402
+ });
403
+ }
404
+ //#endregion
405
+ //#region src/date-time/picker.tsx
406
+ function oe(t) {
407
+ let { kind: r = "date", selection: a = "single", value: s, onChange: c, calendar: u = {} } = t, d = (u.numberOfMonths ?? 1) >= 2, m = {
408
+ ...Y,
409
+ ...t.text
410
+ }, [h] = n(() => l("rv-date-error")), g = (e) => r === "date" ? e : R(e), _ = {
411
+ locale: u.locale,
412
+ ...typeof t.dateInput == "object" ? t.dateInput : {}
413
+ }, [x, S] = n(t.endpoint === "to" ? "to" : void 0), [C, E] = n(""), D = s && !Array.isArray(s) && typeof s == "object" ? s : void 0, O = typeof s == "string" ? s : "", k = Array.isArray(s) ? s : [], A = D?.from ?? "", j = D?.to ?? "", M = R(r === "time" ? b() : t.endpoint === "to" ? j : A || O || k[0] || ""), [N, P] = n(() => u.defaultMonth ?? y(v(M) ? M : b(), u.calendarSystem)), F = t.required ?? u.required ?? !1, { valid: I, errorMessage: L, validDate: ee } = re(t, N, C);
414
+ i(() => t.onValidityChange?.(!!I), [I]);
415
+ let H = (e, n = !1) => {
416
+ E(""), c(e), (t.onValidChange || n) && re({
417
+ ...t,
418
+ value: e
419
+ }, N).valid && (t.onValidChange?.(e), n && t.onSelectionComplete?.(e));
420
+ }, U = (e) => {
421
+ H(e, r === "date" && a !== "multiple");
422
+ }, W = (e) => {
423
+ if (!ee(e)) return;
424
+ let t = y(e, u.calendarSystem);
425
+ t !== (u.month ?? N) && (P(t), u.onMonthChange?.(t));
426
+ }, G = (e, t) => {
427
+ if (typeof t != "string") return;
428
+ W(t);
429
+ let n = {
430
+ from: A,
431
+ to: j,
432
+ [e]: t ? B(t, e === "from" ? A : j, r) : ""
433
+ };
434
+ H(!n.from && !n.to ? null : n);
435
+ }, K = (e, n, r, i = !0) => /* @__PURE__ */ o("label", {
436
+ class: `rv-temporal-picker__time${i ? "" : " rv-temporal-picker__time--single"}`,
437
+ children: [i && /* @__PURE__ */ o("span", { children: n }), /* @__PURE__ */ o(ie, {
438
+ label: n,
439
+ value: e ? z(e) : "",
440
+ min: t.minTime,
441
+ max: t.maxTime,
442
+ step: t.timeStep,
443
+ precision: t.precision,
444
+ format: t.timeFormat,
445
+ locale: u.locale,
446
+ onChange: r
447
+ })]
448
+ }), q = {
449
+ ...u,
450
+ month: u.month ?? N,
451
+ onMonthChange: (e) => {
452
+ P(e), u.onMonthChange?.(e);
453
+ },
454
+ required: F,
455
+ onInvalidSelection: (e, t) => {
456
+ E(e || m.invalid), u.onInvalidSelection?.(e, t);
457
+ }
458
+ }, J;
459
+ if (a === "multiple") J = {
460
+ ...q,
461
+ mode: "multiple",
462
+ selected: k.filter(v),
463
+ onSelectionChange: (e) => U([...e])
464
+ };
465
+ else if (a === "range" && !x) J = {
466
+ ...q,
467
+ mode: "range",
468
+ selected: A && v(R(A)) ? {
469
+ from: R(A),
470
+ ...j && v(R(j)) ? { to: R(j) } : {}
471
+ } : void 0,
472
+ onSelectionChange: (e) => U(e ? {
473
+ from: B(e.from, A, r),
474
+ ...e.to ? { to: B(e.to, j, r) } : {}
475
+ } : null)
476
+ };
477
+ else {
478
+ let e = a === "range" ? x === "to" ? j : A : O;
479
+ J = {
480
+ ...q,
481
+ mode: "single",
482
+ selected: e && v(R(e)) ? R(e) : void 0,
483
+ onSelectionChange: (t) => {
484
+ U(a === "range" ? t ? {
485
+ from: A,
486
+ to: j,
487
+ [x ?? "from"]: B(t, e, r)
488
+ } : null : t ? B(t, O, r) : null);
489
+ }
490
+ };
491
+ }
492
+ return /* @__PURE__ */ o("div", {
493
+ class: `rv-temporal-picker rv-temporal-picker--${r}${d ? " rv-temporal-picker--multi-month" : ""}`,
494
+ children: [
495
+ t.dateInput === !1 && a === "range" && r !== "time" && /* @__PURE__ */ o("div", {
496
+ class: `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}`,
497
+ children: [/* @__PURE__ */ o(p, {
498
+ "aria-label": `${m.startDate}: ${A}`,
499
+ "aria-pressed": x !== "to",
500
+ onClick: () => {
501
+ S(void 0), A && P(y(R(A), u.calendarSystem)), E("");
502
+ },
503
+ children: A ? R(A) : "—"
504
+ }), /* @__PURE__ */ o(p, {
505
+ "aria-label": `${m.endDate}: ${j}`,
506
+ "aria-pressed": x === "to",
507
+ onClick: () => {
508
+ S("to"), j && P(y(R(j), u.calendarSystem)), E("");
509
+ },
510
+ children: j ? R(j) : "—"
511
+ })]
512
+ }),
513
+ /* @__PURE__ */ o("div", {
514
+ class: "rv-temporal-picker__header",
515
+ children: r !== "time" && t.dateInput !== !1 && /* @__PURE__ */ o("div", {
516
+ class: `rv-temporal-picker__dates ${a === "range" ? `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}` : ""}`,
517
+ children: a === "range" ? /* @__PURE__ */ o(e, { children: [/* @__PURE__ */ o("div", {
518
+ class: "rv-temporal-picker__endpoint",
519
+ role: "group",
520
+ "aria-label": m.startDate,
521
+ children: [/* @__PURE__ */ o(w, {
522
+ label: m.startDate,
523
+ value: g(A),
524
+ options: _,
525
+ invalid: !I,
526
+ errorId: h,
527
+ onFocus: () => S(void 0),
528
+ onChange: (e) => G("from", e)
529
+ }), r === "datetime" && K(A, m.startTime, (e) => H({
530
+ from: V(A, e, r),
531
+ ...j ? { to: j } : {}
532
+ }), !1)]
533
+ }), /* @__PURE__ */ o("div", {
534
+ class: "rv-temporal-picker__endpoint",
535
+ role: "group",
536
+ "aria-label": m.endDate,
537
+ children: [/* @__PURE__ */ o(w, {
538
+ label: m.endDate,
539
+ value: g(j),
540
+ options: _,
541
+ invalid: !I,
542
+ errorId: h,
543
+ onFocus: () => S("to"),
544
+ onChange: (e) => G("to", e)
545
+ }), r === "datetime" && K(j, m.endTime, (e) => H({
546
+ from: A,
547
+ to: V(j, e, r)
548
+ }), !1)]
549
+ })] }) : /* @__PURE__ */ o(w, {
550
+ label: a === "multiple" ? m.dates : m.date,
551
+ value: a === "multiple" ? k : g(O),
552
+ multiple: a === "multiple",
553
+ options: _,
554
+ invalid: !I,
555
+ errorId: h,
556
+ onChange: (e) => {
557
+ typeof e == "string" && W(e), H(Array.isArray(e) ? e : e ? B(e, O, r) : null);
558
+ }
559
+ })
560
+ })
561
+ }),
562
+ /* @__PURE__ */ o("div", {
563
+ class: "rv-temporal-picker__body",
564
+ children: [r !== "time" && /* @__PURE__ */ o(T, { ...J }), r !== "date" && a !== "range" && /* @__PURE__ */ o(Z, {
565
+ collapsible: r === "datetime" && d,
566
+ value: z(O),
567
+ label: m.time,
568
+ text: m,
569
+ format: t.timeFormat,
570
+ precision: t.precision,
571
+ locale: u.locale,
572
+ min: t.minTime,
573
+ max: t.maxTime,
574
+ step: t.timeStep,
575
+ onChange: (e) => H(V(O, e, r))
576
+ })]
577
+ }),
578
+ r !== "date" && a === "range" && (r === "time" || t.dateInput === !1) && /* @__PURE__ */ o("div", {
579
+ class: "rv-temporal-picker__times",
580
+ children: [r === "time" ? /* @__PURE__ */ o(Z, {
581
+ value: z(A),
582
+ label: m.startTime,
583
+ text: m,
584
+ format: t.timeFormat,
585
+ precision: t.precision,
586
+ locale: u.locale,
587
+ min: t.minTime,
588
+ max: t.maxTime,
589
+ step: t.timeStep,
590
+ onChange: (e) => H({
591
+ from: e,
592
+ ...j ? { to: j } : {}
593
+ })
594
+ }) : K(A, m.startTime, (e) => H({
595
+ from: V(A, e, r),
596
+ ...j ? { to: j } : {}
597
+ })), r === "time" ? /* @__PURE__ */ o(Z, {
598
+ value: z(j),
599
+ label: m.endTime,
600
+ text: m,
601
+ format: t.timeFormat,
602
+ precision: t.precision,
603
+ locale: u.locale,
604
+ min: t.minTime,
605
+ max: t.maxTime,
606
+ step: t.timeStep,
607
+ onChange: (e) => H({
608
+ from: A,
609
+ to: e
610
+ })
611
+ }) : K(j, m.endTime, (e) => H({
612
+ from: A,
613
+ to: V(j, e, r)
614
+ }))]
615
+ }),
616
+ !I && /* @__PURE__ */ o(f, {
617
+ tone: "danger",
618
+ children: /* @__PURE__ */ o("span", {
619
+ id: h,
620
+ children: L
621
+ })
622
+ })
623
+ ]
624
+ });
625
+ }
626
+ //#endregion
627
+ //#region src/date-time/field.tsx
628
+ function Q({ value: e, options: t, apply: r, cancel: i, onValidChange: a, clearable: s = !0 }) {
629
+ let [c, l] = n(e), [u, d] = n(!1), [p, m] = n(""), h = (e) => {
630
+ l(e), m("");
631
+ }, g = t.autoApply !== !1, _ = JSON.stringify(c) !== JSON.stringify(e), v = (e) => {
632
+ let t = r(e) || "";
633
+ return m(t), !t;
634
+ }, y = () => u ? v(c) : !1;
635
+ return D(() => !_ || y(), g), /* @__PURE__ */ o("div", {
636
+ class: `rv-temporal-draft${t.kind === "time" ? " rv-temporal-draft--time" : ""}`,
637
+ onKeyDown: (e) => {
638
+ e.key === "Enter" && !e.isComposing && (e.ctrlKey || e.metaKey || g && e.target instanceof HTMLInputElement) && (e.preventDefault(), y());
639
+ },
640
+ children: [
641
+ /* @__PURE__ */ o(oe, {
642
+ ...t,
643
+ value: c,
644
+ onChange: h,
645
+ onValidChange: a,
646
+ onValidityChange: d,
647
+ onSelectionComplete: g ? v : void 0
648
+ }),
649
+ p && /* @__PURE__ */ o(f, {
650
+ tone: "danger",
651
+ children: p
652
+ }),
653
+ /* @__PURE__ */ o(O, {
654
+ text: t.actions,
655
+ showConfirm: t.showActions ?? !g,
656
+ disabled: !u,
657
+ apply: y,
658
+ cancel: i,
659
+ clear: !s || (t.required ?? t.calendar?.required) ? void 0 : () => {
660
+ let e = t.selection === "multiple" ? [] : null;
661
+ h(e), g && v(e);
662
+ }
663
+ })
664
+ ]
665
+ });
666
+ }
667
+ function se({ value: e, kind: t = "date", picker: n, livePickerUpdates: r, onValueChange: s, onInput: c, formatValue: l, parseValue: f, ...m }) {
668
+ let h = a(null), _ = a(), v = a({
669
+ value: e,
670
+ kind: t,
671
+ picker: n,
672
+ onValueChange: s,
673
+ input: m
674
+ });
675
+ return v.current = {
676
+ value: e,
677
+ kind: t,
678
+ picker: n,
679
+ onValueChange: s,
680
+ input: m
681
+ }, i(() => () => _.current?.close(), []), i(() => {
682
+ (m.disabled || m.readOnly) && _.current?.close();
683
+ }, [m.disabled, m.readOnly]), /* @__PURE__ */ o("span", {
684
+ class: "rv-date-time-field",
685
+ children: [/* @__PURE__ */ o(d, {
686
+ ...m,
687
+ type: "text",
688
+ value: l?.(e) ?? e,
689
+ placeholder: m.placeholder ?? (t === "date" ? "YYYY-MM-DD" : t === "time" ? "HH:mm" : "YYYY-MM-DDTHH:mm"),
690
+ onInput: (e) => {
691
+ c?.(e);
692
+ let t = f ? f(e.currentTarget.value) : e.currentTarget.value;
693
+ t !== void 0 && s?.(t);
694
+ }
695
+ }), /* @__PURE__ */ o(p, {
696
+ ref: h,
697
+ variant: "ghost",
698
+ "aria-label": X(t, n?.text),
699
+ disabled: m.disabled || m.readOnly,
700
+ onClick: () => {
701
+ if (!h.current) return;
702
+ if (_.current) {
703
+ _.current.close();
704
+ return;
705
+ }
706
+ let i, a = (e) => {
707
+ let t = typeof e == "string" ? e : "";
708
+ t === i || v.current.input.disabled || v.current.input.readOnly || (i = t, v.current.onValueChange?.(t));
709
+ };
710
+ _.current = E(h.current, (i) => /* @__PURE__ */ o(Q, {
711
+ value: e || null,
712
+ options: {
713
+ ...n,
714
+ calendar: {
715
+ fixedWeeks: !0,
716
+ ...n?.calendar
717
+ },
718
+ required: n?.required ?? m.required,
719
+ kind: t,
720
+ selection: "single"
721
+ },
722
+ cancel: i,
723
+ onValidChange: r && n?.autoApply !== !1 ? a : void 0,
724
+ apply: (e) => {
725
+ a(e), i();
726
+ }
727
+ }), {
728
+ label: X(t, n?.text),
729
+ fitViewport: t === "datetime",
730
+ className: t === "time" ? "rv-editor-popup--time" : t === "datetime" ? "rv-editor-popup--datetime" : void 0,
731
+ onClose: () => {
732
+ _.current = void 0;
733
+ }
734
+ });
735
+ },
736
+ children: /* @__PURE__ */ o(u, { svg: t === "time" ? g : C })
737
+ })]
738
+ });
739
+ }
740
+ //#endregion
741
+ //#region src/date-time/attach.tsx
742
+ var $ = /* @__PURE__ */ new WeakMap();
743
+ function ce(e, t, n) {
744
+ $.get(e)?.();
745
+ let r, i = s(e.ownerDocument, /* @__PURE__ */ o(p, {
746
+ className: "rv-temporal-picker-trigger",
747
+ variant: "ghost",
748
+ disabled: e.disabled || e.readOnly,
749
+ "aria-label": X(t.kind ?? "date", t.text),
750
+ onClick: () => {
751
+ e.disabled || e.readOnly || (r ? r.close() : r = E(e, (r) => /* @__PURE__ */ o(Q, {
752
+ value: e.value || null,
753
+ options: {
754
+ ...t,
755
+ selection: "single",
756
+ required: t.required ?? t.calendar?.required ?? e.required
757
+ },
758
+ cancel: r,
759
+ apply: (t) => {
760
+ !e.disabled && !e.readOnly && n(typeof t == "string" ? t : ""), r();
761
+ }
762
+ }), {
763
+ fitViewport: t.kind === "datetime",
764
+ className: t.kind === "time" ? "rv-editor-popup--time" : t.kind === "datetime" ? "rv-editor-popup--datetime" : void 0,
765
+ label: X(t.kind ?? "date", t.text),
766
+ trigger: i,
767
+ onClose: () => {
768
+ r = void 0;
769
+ }
770
+ }));
771
+ },
772
+ children: /* @__PURE__ */ o(u, { svg: t.kind === "time" ? g : C })
773
+ }));
774
+ e.after(i);
775
+ let a = e.ownerDocument.defaultView?.MutationObserver, l = a ? new a(() => {
776
+ i.disabled = e.disabled || e.readOnly, i.disabled && r?.close();
777
+ }) : void 0;
778
+ l?.observe(e, {
779
+ attributes: !0,
780
+ attributeFilter: ["disabled", "readonly"]
781
+ });
782
+ let d = () => {
783
+ $.get(e) === d && ($.delete(e), l?.disconnect(), r?.close(), c(i), i.remove());
784
+ };
785
+ return $.set(e, d), d;
786
+ }
787
+ //#endregion
788
+ //#region src/date-time/value.tsx
789
+ function le(e, t) {
790
+ let n = Number.isFinite(t.maxVisibleDates) ? Math.max(1, Math.floor(t.maxVisibleDates)) : 2, r = t.multiple ? t.values.slice(0, n) : t.values, i = t.values.length - r.length;
791
+ return e("span", {
792
+ class: "rv-temporal-value",
793
+ role: t.fullValue ? "group" : void 0,
794
+ dir: t.dir ?? "auto",
795
+ title: t.fullValue || void 0,
796
+ "data-tooltip": t.fullValue || void 0,
797
+ "aria-label": t.fullValue || void 0
798
+ }, [...r.map((t) => e("span", {
799
+ class: "rv-badge rv-temporal-value__item",
800
+ "aria-hidden": "true"
801
+ }, t)), i > 0 ? e("span", {
802
+ class: "rv-badge rv-temporal-value__more",
803
+ "aria-hidden": "true"
804
+ }, `+${i}`) : null]);
805
+ }
806
+ //#endregion
807
+ export { oe as a, Q as i, ce as n, Y as o, se as r, X as s, le as t };