@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
package/time-grid.js CHANGED
@@ -1,6 +1,7 @@
1
- import { ButtonControl as e } from "./native-control.js";
2
- import { useLayoutEffect as t, useRef as n } from "preact/hooks";
3
- import { jsx as r, jsxs as i } from "preact/jsx-runtime";
1
+ import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
2
+ import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { t as r } from "./_chunks/native-control-B9MNibfa.js";
4
+ import { t as i } from "./_chunks/tooltip-text-BXsUEmBH.js";
4
5
  //#region src/time-grid.tsx
5
6
  var a = (e, t) => `${e}:${t}`;
6
7
  function o(e) {
@@ -10,53 +11,53 @@ function o(e) {
10
11
  e.outsideWorkHours && "is-outside-work-hours"
11
12
  ].filter(Boolean).join(" ");
12
13
  }
13
- function s(t) {
14
- let n = (e) => `rv-time-grid__${e}${t.legacyClassPrefix ? ` ${t.legacyClassPrefix}__${e}` : ""}`, s = Array.from({ length: 12 }, (e, t) => t * 2);
15
- return /* @__PURE__ */ i("div", {
16
- class: n("schedule"),
17
- children: [/* @__PURE__ */ i("div", {
18
- class: n("hours"),
14
+ function s(e) {
15
+ let t = (e) => `rv-time-grid__${e}`, s = Array.from({ length: 12 }, (e, t) => t * 2);
16
+ return /* @__PURE__ */ n("div", {
17
+ class: t("schedule"),
18
+ children: [/* @__PURE__ */ n("div", {
19
+ class: t("hours"),
19
20
  "aria-hidden": "true",
20
- children: [/* @__PURE__ */ r("span", {}), s.map((e) => /* @__PURE__ */ r("span", {
21
- class: n("hour"),
22
- children: t.hourLabel(e)
23
- }, e))]
24
- }), /* @__PURE__ */ r("div", {
25
- ref: t.matrixRef,
26
- class: n("matrix"),
21
+ children: [/* @__PURE__ */ n("span", {}), s.map((r) => /* @__PURE__ */ n("span", {
22
+ class: t("hour"),
23
+ children: e.hourLabel(r)
24
+ }, r))]
25
+ }), /* @__PURE__ */ n("div", {
26
+ ref: e.matrixRef,
27
+ class: t("matrix"),
27
28
  role: "grid",
28
- "aria-label": t.gridLabel,
29
- "aria-rowcount": t.days.length,
29
+ "aria-label": e.gridLabel,
30
+ "aria-rowcount": e.days.length,
30
31
  "aria-colcount": 12,
31
- children: t.days.map((c) => {
32
- let { weekday: l, short: u, long: d } = c, f = t.weekendDays.includes(l);
33
- return /* @__PURE__ */ i("div", {
34
- class: `${n("row")}${f ? " is-weekend" : ""}`,
32
+ children: e.days.map((c) => {
33
+ let { weekday: l, short: u, long: d } = c, f = e.weekendDays.includes(l);
34
+ return /* @__PURE__ */ n("div", {
35
+ class: `${t("row")}${f ? " is-weekend" : ""}`,
35
36
  role: "row",
36
- children: [/* @__PURE__ */ r("span", {
37
- class: n("weekday"),
37
+ children: [/* @__PURE__ */ n(i, {
38
+ class: t("weekday"),
38
39
  role: "rowheader",
39
40
  title: d,
40
41
  children: u
41
- }), s.map((n) => {
42
- let i = a(l, n), s = t.cells.has(i) || t.cells.has(a(l, n + 1)), u = t.workingHours ? n < t.workingHours.startHour || n + 2 > t.workingHours.endHour : !1;
43
- return /* @__PURE__ */ r(e, {
42
+ }), s.map((t) => {
43
+ let i = a(l, t), s = e.cells.has(i) || e.cells.has(a(l, t + 1)), u = e.workingHours ? t < e.workingHours.startHour || t + 2 > e.workingHours.endHour : !1;
44
+ return /* @__PURE__ */ n(r, {
44
45
  type: "button",
45
- disabled: t.disabled,
46
+ disabled: e.disabled,
46
47
  role: "gridcell",
47
48
  "data-time-cell": i,
48
- class: `${o({
49
+ class: o({
49
50
  weekend: f,
50
51
  outsideWorkHours: u
51
- })} ${t.legacyClassPrefix ? `${t.legacyClassPrefix}__cell` : ""}`,
52
+ }),
52
53
  "aria-selected": s,
53
- "aria-label": t.cellLabel(c, t.hourLabel(n), t.hourLabel(n + 2), s),
54
- tabIndex: t.focused === i ? 0 : -1,
55
- onFocus: () => t.onFocus(i),
56
- onKeyDown: (e) => t.onKeyDown(e, l, n),
57
- onClick: (e) => t.onClick(e, l, n, s),
58
- onPointerDown: (e) => t.onPointerDown(e, l, n, s),
59
- onPointerEnter: () => t.onPointerEnter(l, n)
54
+ "aria-label": e.cellLabel(c, e.hourLabel(t), e.hourLabel(t + 2), s),
55
+ tabIndex: e.focused === i ? 0 : -1,
56
+ onFocus: () => e.onFocus(i),
57
+ onKeyDown: (n) => e.onKeyDown(n, l, t),
58
+ onClick: (n) => e.onClick(n, l, t, s),
59
+ onPointerDown: (n) => e.onPointerDown(n, l, t, s),
60
+ onPointerEnter: () => e.onPointerEnter(l, t)
60
61
  }, i);
61
62
  })]
62
63
  }, l);
@@ -64,13 +65,13 @@ function s(t) {
64
65
  })]
65
66
  });
66
67
  }
67
- function c(e) {
68
- let r = n(e);
69
- r.current = e;
70
- let i = n(), o = n(), s = n(), c = () => {
68
+ function c(n) {
69
+ let r = t(n);
70
+ r.current = n;
71
+ let i = t(), o = t(), s = t(), c = () => {
71
72
  o.current?.(), o.current = void 0;
72
73
  };
73
- t(() => () => {
74
+ e(() => () => {
74
75
  i.current = void 0, c(), s.current !== void 0 && cancelAnimationFrame(s.current);
75
76
  }, []);
76
77
  let l = (e, t) => {
@@ -6,11 +6,29 @@
6
6
  height: 112px;
7
7
  margin: 0 0 12px;
8
8
  overflow: hidden;
9
- border: 1px solid var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border)));
9
+ border: 1px solid
10
+ var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border)));
10
11
  border-radius: 11px;
11
12
  background:
12
- repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), color-mix(in srgb, var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border))) 58%, transparent) 25%),
13
- var(--rv-ui-surface-sunken, color-mix(in srgb, var(--rv-dialog-bg, var(--rv-ui-surface)) 96%, var(--rv-ui-text-muted, var(--rv-dialog-muted, var(--rv-ui-text-muted)))));
13
+ repeating-linear-gradient(
14
+ to right,
15
+ transparent 0,
16
+ transparent calc(25% - 1px),
17
+ color-mix(
18
+ in srgb,
19
+ var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border))) 58%,
20
+ transparent
21
+ )
22
+ 25%
23
+ ),
24
+ var(
25
+ --rv-ui-surface-sunken,
26
+ color-mix(
27
+ in srgb,
28
+ var(--rv-dialog-bg, var(--rv-ui-surface)) 96%,
29
+ var(--rv-ui-text-muted, var(--rv-dialog-muted, var(--rv-ui-text-muted)))
30
+ )
31
+ );
14
32
  }
15
33
  .rv-timeline-control__track::before {
16
34
  position: absolute;
@@ -18,12 +36,29 @@
18
36
  right: 0;
19
37
  left: 0;
20
38
  height: 1px;
21
- background: color-mix(in srgb, var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border))) 82%, transparent);
39
+ background: color-mix(
40
+ in srgb,
41
+ var(--rv-ui-border, var(--rv-dialog-border, var(--rv-ui-border))) 82%,
42
+ transparent
43
+ );
22
44
  content: '';
23
45
  }
24
- .rv-timeline-control__range { position: absolute; bottom: 8px; color: var(--rv-ui-text-muted, var(--rv-dialog-muted, var(--rv-ui-text-muted))); font-size: 11px; font-variant-numeric: tabular-nums; }
25
- .rv-timeline-control__range--start { left: 10px; }
26
- .rv-timeline-control__range--end { right: 10px; }
46
+ .rv-timeline-control__range {
47
+ position: absolute;
48
+ bottom: 8px;
49
+ color: var(
50
+ --rv-ui-text-muted,
51
+ var(--rv-dialog-muted, var(--rv-ui-text-muted))
52
+ );
53
+ font-size: 11px;
54
+ font-variant-numeric: tabular-nums;
55
+ }
56
+ .rv-timeline-control__range--start {
57
+ left: 10px;
58
+ }
59
+ .rv-timeline-control__range--end {
60
+ right: 10px;
61
+ }
27
62
  .rv-timeline-control__bar {
28
63
  position: absolute;
29
64
  top: 39px;
@@ -37,7 +72,11 @@
37
72
  color: var(--timeline-event-text-color, #0f172a);
38
73
  box-shadow: 0 1px 2px var(--rv-ui-shadow);
39
74
  touch-action: none;
40
- transition: border-color var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1)), box-shadow var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1));
75
+ transition:
76
+ border-color var(--rv-ui-motion-fast, 120ms)
77
+ var(--rv-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1)),
78
+ box-shadow var(--rv-ui-motion-fast, 120ms)
79
+ var(--rv-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1));
41
80
  }
42
81
  .rv-timeline-control__bar-move {
43
82
  position: absolute;
@@ -55,14 +94,28 @@
55
94
  cursor: grab;
56
95
  touch-action: none;
57
96
  }
58
- .rv-timeline-control__bar-move:active { cursor: grabbing; }
97
+ .rv-timeline-control__bar-move:active {
98
+ cursor: grabbing;
99
+ }
59
100
  .rv-timeline-control__bar:hover {
60
101
  border-color: var(--timeline-event-hover-color-end, #166534);
61
102
  }
62
- .rv-timeline-control__bar--selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--timeline-event-color, #16a34a) 22%, transparent), 0 1px 2px var(--rv-ui-shadow); }
63
- .rv-timeline-control__bar--milestone { border-radius: 50%; }
64
- .rv-timeline-control__bar--milestone .rv-timeline-control__bar-label { display: none; }
65
- .rv-timeline-control__bar--outside { outline: 2px dashed var(--rv-structured-warning, var(--rv-ui-warning)); outline-offset: 2px; }
103
+ .rv-timeline-control__bar--selected {
104
+ box-shadow:
105
+ 0 0 0 3px
106
+ color-mix(in srgb, var(--timeline-event-color, #16a34a) 22%, transparent),
107
+ 0 1px 2px var(--rv-ui-shadow);
108
+ }
109
+ .rv-timeline-control__bar--milestone {
110
+ border-radius: 50%;
111
+ }
112
+ .rv-timeline-control__bar--milestone .rv-timeline-control__bar-label {
113
+ display: none;
114
+ }
115
+ .rv-timeline-control__bar--outside {
116
+ outline: 2px dashed var(--rv-structured-warning, var(--rv-ui-warning));
117
+ outline-offset: 2px;
118
+ }
66
119
  .rv-timeline-control__bar-label {
67
120
  display: block;
68
121
  overflow: hidden;
@@ -89,16 +142,27 @@
89
142
  width: 4px;
90
143
  border-radius: 999px;
91
144
  background: rgb(255 255 255 / 82%);
92
- opacity: .45;
93
- transition: opacity var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1));
145
+ opacity: 0.45;
146
+ transition: opacity var(--rv-ui-motion-fast, 120ms)
147
+ var(--rv-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1));
94
148
  content: '';
95
149
  }
96
150
  .rv-timeline-control__bar:hover .rv-timeline-control__handle::after,
97
- .rv-timeline-control__bar--selected .rv-timeline-control__handle::after { opacity: 1; }
98
- .rv-timeline-control__handle--start { left: -12px; }
99
- .rv-timeline-control__handle--start::after { left: 10px; }
100
- .rv-timeline-control__handle--end { right: -12px; }
101
- .rv-timeline-control__handle--end::after { right: 10px; }
151
+ .rv-timeline-control__bar--selected .rv-timeline-control__handle::after {
152
+ opacity: 1;
153
+ }
154
+ .rv-timeline-control__handle--start {
155
+ left: -12px;
156
+ }
157
+ .rv-timeline-control__handle--start::after {
158
+ left: 10px;
159
+ }
160
+ .rv-timeline-control__handle--end {
161
+ right: -12px;
162
+ }
163
+ .rv-timeline-control__handle--end::after {
164
+ right: 10px;
165
+ }
102
166
 
103
167
  .rv-timeline-control__track button:focus-visible {
104
168
  outline: 0;
@@ -106,16 +170,24 @@
106
170
  box-shadow: 0 0 0 3px var(--rv-ui-focus-ring);
107
171
  }
108
172
  @media (prefers-reduced-motion: reduce) {
109
- .rv-timeline-control__bar { transition: none; }
173
+ .rv-timeline-control__bar {
174
+ transition: none;
175
+ }
110
176
  }
111
177
  @media (forced-colors: active) {
112
- .rv-timeline-control__track { border-color: CanvasText; }
178
+ .rv-timeline-control__track {
179
+ border-color: CanvasText;
180
+ }
113
181
  .rv-timeline-control__bar {
114
182
  border-color: Highlight;
115
183
  background: Highlight;
116
184
  color: HighlightText;
117
185
  forced-color-adjust: auto;
118
186
  }
119
- .rv-timeline-control__bar--selected { outline: 2px solid Highlight; }
120
- .rv-timeline-control__handle::after { background: HighlightText; }
187
+ .rv-timeline-control__bar--selected {
188
+ outline: 2px solid Highlight;
189
+ }
190
+ .rv-timeline-control__handle::after {
191
+ background: HighlightText;
192
+ }
121
193
  }
@@ -1,3 +1,4 @@
1
+ import { JSX } from '../_vendor/preact/src/index';
1
2
  import { TimelineTrackEvent, TimelineTrackRange } from './model';
2
3
  export type TimelineTrackPointerMode = 'move' | 'start' | 'end';
3
4
  export interface TimelineTrackItem<T extends TimelineTrackEvent> {
@@ -12,6 +13,9 @@ export interface TimelineTrackLabels {
12
13
  }
13
14
  export interface TimelineTrackProps<T extends TimelineTrackEvent> {
14
15
  readonly rows: readonly TimelineTrackItem<T>[];
16
+ readonly tooltip?: boolean;
17
+ readonly formatValue?: (value: number) => string;
18
+ readonly getTooltip?: (event: T) => string;
15
19
  readonly selected?: string | number;
16
20
  /** Finite bounds with end greater than start. */
17
21
  readonly range: TimelineTrackRange;
@@ -20,4 +24,4 @@ export interface TimelineTrackProps<T extends TimelineTrackEvent> {
20
24
  readonly onEventChange: (id: string | number, event: T) => void;
21
25
  }
22
26
  /** Controlled numeric timeline. Changes preserve event metadata; consumers own commits. */
23
- export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): import("preact").JSX.Element;
27
+ export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, tooltip, formatValue, getTooltip, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): JSX.Element;
@@ -1,139 +1,156 @@
1
- import { ButtonControl as e } from "../native-control.js";
2
- import { eventOutsideRange as t, moveTimelineEvent as n, niceTimelineStep as r, resizeTimelineEvent as i, timelineGeometry as a } from "./model.js";
3
- import { useRef as o } from "preact/hooks";
4
- import { jsx as s, jsxs as c } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/hooks.module-CG3gN83z.js";
2
+ import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { t as n } from "../_chunks/native-control-B9MNibfa.js";
4
+ import { n as r } from "../_chunks/tooltip-D4xkio5G.js";
5
+ import { eventOutsideRange as i, moveTimelineEvent as a, niceTimelineStep as o, resizeTimelineEvent as s, timelineEventBackground as c, timelineGeometry as l } from "./model.js";
5
6
  //#region src/timeline-track/component.tsx
6
- var l = {
7
+ var u = {
7
8
  preview: "Timeline preview",
8
9
  moveEvent: (e) => `Move event ${e}`,
9
10
  resizeStart: (e) => `Resize start of ${e}`,
10
11
  resizeEnd: (e) => `Resize end of ${e}`
11
12
  };
12
- function u({ rows: u, selected: d, range: f, labels: p, onSelect: m, onEventChange: h }) {
13
- let g = {
14
- ...l,
15
- ...p
16
- }, _ = o(), v = (e, t, n) => {
13
+ function d({ rows: r, tooltip: d = !0, formatValue: p = String, getTooltip: m, selected: h, range: g, labels: _, onSelect: v, onEventChange: y }) {
14
+ let b = {
15
+ ...u,
16
+ ..._
17
+ }, x = e(), S = (e, t, n) => {
17
18
  let r = e.currentTarget.closest(".rv-timeline-control__track");
18
- r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), _.current = {
19
+ r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), x.current = {
19
20
  id: t.id,
20
21
  mode: n,
21
22
  clientX: e.clientX,
22
23
  event: t.event,
23
24
  width: r.getBoundingClientRect().width
24
- }, m(t.id));
25
- }, y = (e) => {
26
- let t = _.current;
25
+ }, v(t.id));
26
+ }, C = (e) => {
27
+ let t = x.current;
27
28
  if (!t) return;
28
- let a = r(f), o = (e.clientX - t.clientX) / Math.max(1, t.width) * (f.end - f.start), s = Math.round(o / a) * a, c = t.mode === "move" ? n(t.event, s, f) : i(t.event, t.mode, s, f);
29
- h(t.id, c);
30
- }, b = () => {
31
- _.current = void 0;
32
- }, x = (e, t, a) => {
29
+ let n = o(g), r = (e.clientX - t.clientX) / Math.max(1, t.width) * (g.end - g.start), i = Math.round(r / n) * n, c = t.mode === "move" ? a(t.event, i, g) : s(t.event, t.mode, i, g);
30
+ y(t.id, c);
31
+ }, w = () => {
32
+ x.current = void 0;
33
+ }, T = (e, t, n) => {
33
34
  if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
34
35
  e.preventDefault();
35
- let o = r(f) * (e.key === "ArrowLeft" ? -1 : 1);
36
- h(t.id, a === "move" ? n(t.event, o, f) : i(t.event, a, o, f));
36
+ let r = o(g) * (e.key === "ArrowLeft" ? -1 : 1);
37
+ y(t.id, n === "move" ? a(t.event, r, g) : s(t.event, n, r, g));
37
38
  };
38
- return /* @__PURE__ */ c("div", {
39
+ return /* @__PURE__ */ t("div", {
39
40
  class: "rv-timeline-editor__track rv-timeline-control__track",
40
41
  role: "group",
41
- "aria-label": g.preview,
42
+ "aria-label": b.preview,
42
43
  children: [
43
- /* @__PURE__ */ s("span", {
44
+ /* @__PURE__ */ t("span", {
44
45
  class: "rv-timeline-editor__range rv-timeline-editor__range--start rv-timeline-control__range rv-timeline-control__range--start",
45
- children: f.start
46
+ children: g.start
46
47
  }),
47
- /* @__PURE__ */ s("span", {
48
+ /* @__PURE__ */ t("span", {
48
49
  class: "rv-timeline-editor__range rv-timeline-editor__range--end rv-timeline-control__range rv-timeline-control__range--end",
49
- children: f.end
50
+ children: g.end
50
51
  }),
51
- u.map((e, t) => ({
52
+ r.map((e, t) => ({
52
53
  row: e,
53
54
  index: t
54
- })).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: n, index: r }) => {
55
- let i = a(n.event, f), o = t(n.event, f), l = n.event.label || g.moveEvent(r + 1);
56
- return /* @__PURE__ */ c("div", {
55
+ })).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: e, index: r }) => {
56
+ let a = l(e.event, g), o = i(e.event, g), s = e.event.label || b.moveEvent(r + 1);
57
+ return /* @__PURE__ */ t(f, {
58
+ tooltipText: d ? m?.(e.event) ?? `${s}: ${p(e.event.start)} – ${p(e.event.end)}` : void 0,
57
59
  class: [
58
60
  "rv-timeline-editor__bar rv-timeline-control__bar",
59
- d === n.id ? "rv-timeline-editor__bar--selected rv-timeline-control__bar--selected" : "",
60
- n.event.start === n.event.end ? "rv-timeline-editor__bar--milestone rv-timeline-control__bar--milestone" : "",
61
+ h === e.id ? "rv-timeline-editor__bar--selected rv-timeline-control__bar--selected" : "",
62
+ e.event.start === e.event.end ? "rv-timeline-editor__bar--milestone rv-timeline-control__bar--milestone" : "",
61
63
  o ? "rv-timeline-editor__bar--outside rv-timeline-control__bar--outside" : ""
62
64
  ].filter(Boolean).join(" "),
63
65
  style: {
64
- left: `${i.left}%`,
65
- width: `${i.width}%`
66
+ left: `${a.left}%`,
67
+ width: `${a.width}%`,
68
+ background: c(e.event),
69
+ color: e.event.textColor,
70
+ "--timeline-event-color": e.event.color,
71
+ "--timeline-event-color-end": e.event.color
66
72
  },
67
73
  role: "group",
68
- "aria-label": l,
74
+ "aria-label": s,
69
75
  children: [
70
- /* @__PURE__ */ s(e, {
76
+ /* @__PURE__ */ t(n, {
71
77
  unstyled: !0,
72
78
  type: "button",
73
79
  class: "rv-timeline-editor__bar-move rv-timeline-control__bar-move",
74
80
  "data-autofocus": r === 0 ? "" : void 0,
75
- "aria-label": n.event.label ? `${g.moveEvent(r + 1)}: ${n.event.label}` : g.moveEvent(r + 1),
81
+ "aria-label": e.event.label ? `${b.moveEvent(r + 1)}: ${e.event.label}` : b.moveEvent(r + 1),
76
82
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
77
- onFocus: () => m(n.id),
78
- onPointerDown: (e) => v(e, n, "move"),
79
- onPointerMove: y,
80
- onPointerUp: b,
81
- onPointerCancel: b,
82
- onKeyDown: (e) => x(e, n, "move"),
83
- children: /* @__PURE__ */ s("span", {
83
+ onFocus: () => v(e.id),
84
+ onPointerDown: (t) => S(t, e, "move"),
85
+ onPointerMove: C,
86
+ onPointerUp: w,
87
+ onPointerCancel: w,
88
+ onKeyDown: (t) => T(t, e, "move"),
89
+ children: /* @__PURE__ */ t("span", {
84
90
  class: "rv-timeline-editor__bar-label rv-timeline-control__bar-label",
85
- children: n.event.label
91
+ children: e.event.label
86
92
  })
87
93
  }),
88
- /* @__PURE__ */ s(e, {
94
+ /* @__PURE__ */ t(n, {
89
95
  unstyled: !0,
90
96
  type: "button",
91
97
  class: "rv-timeline-editor__handle rv-timeline-editor__handle--start rv-timeline-control__handle rv-timeline-control__handle--start",
92
98
  role: "slider",
93
99
  "aria-orientation": "horizontal",
94
- "aria-label": g.resizeStart(l),
95
- "aria-valuemin": Math.min(f.start, n.event.start),
96
- "aria-valuemax": n.event.end,
97
- "aria-valuenow": n.event.start,
100
+ "aria-label": b.resizeStart(s),
101
+ "aria-valuemin": Math.min(g.start, e.event.start),
102
+ "aria-valuemax": e.event.end,
103
+ "aria-valuenow": e.event.start,
98
104
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
99
- onFocus: () => m(n.id),
100
- onPointerDown: (e) => {
101
- e.stopPropagation(), v(e, n, "start");
105
+ onFocus: () => v(e.id),
106
+ onPointerDown: (t) => {
107
+ t.stopPropagation(), S(t, e, "start");
102
108
  },
103
- onPointerMove: y,
104
- onPointerUp: b,
105
- onPointerCancel: b,
106
- onKeyDown: (e) => {
107
- e.stopPropagation(), x(e, n, "start");
109
+ onPointerMove: C,
110
+ onPointerUp: w,
111
+ onPointerCancel: w,
112
+ onKeyDown: (t) => {
113
+ t.stopPropagation(), T(t, e, "start");
108
114
  }
109
115
  }),
110
- /* @__PURE__ */ s(e, {
116
+ /* @__PURE__ */ t(n, {
111
117
  unstyled: !0,
112
118
  type: "button",
113
119
  class: "rv-timeline-editor__handle rv-timeline-editor__handle--end rv-timeline-control__handle rv-timeline-control__handle--end",
114
120
  role: "slider",
115
121
  "aria-orientation": "horizontal",
116
- "aria-label": g.resizeEnd(l),
117
- "aria-valuemin": n.event.start,
118
- "aria-valuemax": Math.max(f.end, n.event.end),
119
- "aria-valuenow": n.event.end,
122
+ "aria-label": b.resizeEnd(s),
123
+ "aria-valuemin": e.event.start,
124
+ "aria-valuemax": Math.max(g.end, e.event.end),
125
+ "aria-valuenow": e.event.end,
120
126
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
121
- onFocus: () => m(n.id),
122
- onPointerDown: (e) => {
123
- e.stopPropagation(), v(e, n, "end");
127
+ onFocus: () => v(e.id),
128
+ onPointerDown: (t) => {
129
+ t.stopPropagation(), S(t, e, "end");
124
130
  },
125
- onPointerMove: y,
126
- onPointerUp: b,
127
- onPointerCancel: b,
128
- onKeyDown: (e) => {
129
- e.stopPropagation(), x(e, n, "end");
131
+ onPointerMove: C,
132
+ onPointerUp: w,
133
+ onPointerCancel: w,
134
+ onKeyDown: (t) => {
135
+ t.stopPropagation(), T(t, e, "end");
130
136
  }
131
137
  })
132
138
  ]
133
- }, n.id);
139
+ }, e.id);
134
140
  })
135
141
  ]
136
142
  });
137
143
  }
144
+ function f({ tooltipText: e, children: n, ...i }) {
145
+ let a = r(e ?? "", !0, {
146
+ className: "rv-control-tooltip",
147
+ placement: "above"
148
+ });
149
+ return /* @__PURE__ */ t("div", {
150
+ ...i,
151
+ ...e ? a.triggerProps : {},
152
+ children: [n, e && a.tooltip]
153
+ });
154
+ }
138
155
  //#endregion
139
- export { u as TimelineTrack, t as eventOutsideRange, n as moveTimelineEvent, r as niceTimelineStep, i as resizeTimelineEvent, a as timelineGeometry };
156
+ export { d as TimelineTrack, i as eventOutsideRange, a as moveTimelineEvent, o as niceTimelineStep, s as resizeTimelineEvent, c as timelineEventBackground, l as timelineGeometry };
@@ -2,6 +2,13 @@ export interface TimelineTrackEvent {
2
2
  readonly start: number;
3
3
  readonly end: number;
4
4
  readonly label?: string;
5
+ /** Single CSS color, or weighted phases within this event. */
6
+ readonly color?: string;
7
+ readonly textColor?: string;
8
+ readonly segments?: readonly {
9
+ readonly color: string;
10
+ readonly weight: number;
11
+ }[];
5
12
  }
6
13
  export interface TimelineTrackRange {
7
14
  readonly start: number;
@@ -15,3 +22,5 @@ export declare function timelineGeometry(event: TimelineTrackEvent, range: Timel
15
22
  export declare function niceTimelineStep(range: TimelineTrackRange): number;
16
23
  export declare function moveTimelineEvent<T extends TimelineTrackEvent>(event: T, delta: number, range: TimelineTrackRange): T;
17
24
  export declare function resizeTimelineEvent<T extends TimelineTrackEvent>(event: T, edge: 'start' | 'end', delta: number, range: TimelineTrackRange): T;
25
+ /** Weighted phase colors use hard stops and scale with the event on resize. */
26
+ export declare function timelineEventBackground(event: TimelineTrackEvent): string | undefined;
@@ -34,5 +34,14 @@ function i(e, t, n, r) {
34
34
  end: Math.min(r.end, Math.max(e.start, e.end + n))
35
35
  };
36
36
  }
37
+ function a(e) {
38
+ let t = e.segments?.filter((e) => Number.isFinite(e.weight) && e.weight > 0);
39
+ if (!t?.length) return e.color;
40
+ let n = t.reduce((e, t) => e + t.weight, 0), r = 0;
41
+ return `linear-gradient(to right, ${t.map((e) => {
42
+ let t = r / n * 100;
43
+ return r += e.weight, `${e.color} ${t}% ${r / n * 100}%`;
44
+ }).join(", ")})`;
45
+ }
37
46
  //#endregion
38
- export { e as eventOutsideRange, r as moveTimelineEvent, n as niceTimelineStep, i as resizeTimelineEvent, t as timelineGeometry };
47
+ export { e as eventOutsideRange, r as moveTimelineEvent, n as niceTimelineStep, i as resizeTimelineEvent, a as timelineEventBackground, t as timelineGeometry };