@revolist/ui 4.0.1-rc → 4.0.2-rc

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 (218) hide show
  1. package/README.md +6 -5
  2. package/_chunks/calendar-CpaUK7w1.js +248 -0
  3. package/_chunks/chart-frame-BC99KjGa.js +127 -0
  4. package/_chunks/choice-chips-Cs4D-3nH.js +110 -0
  5. package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-BBMFmUNA.js} +41 -41
  6. package/_chunks/color-picker-D90Jg-M8.js +138 -0
  7. package/_chunks/compat.module-DDB2pm9O.js +229 -0
  8. package/_chunks/component-YDcfoOLz.js +859 -0
  9. package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-ztgmsG7H.js} +29 -29
  10. package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
  11. package/_chunks/{controls-NEL5tDaz.js → controls-DIum-E66.js} +192 -192
  12. package/_chunks/{date-control-CYCkb1aQ.js → date-control-BJSzu79z.js} +21 -21
  13. package/_chunks/date-time-BxPJusp9.js +770 -0
  14. package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-Bblyah10.js} +1 -1
  15. package/_chunks/dialog.parts-DBqo3Qwb.js +134 -0
  16. package/_chunks/{dropdown-CkGQBm1Q.js → dropdown-voWqmwAe.js} +102 -102
  17. package/_chunks/duration-87U2EoMS.js +271 -0
  18. package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
  19. package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-D3JdS8l3.js} +8 -8
  20. package/_chunks/framework-mount-C-Zwm44H.js +54 -0
  21. package/_chunks/hooks.module-CG3gN83z.js +157 -0
  22. package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
  23. package/_chunks/mount-DZe_6VtR.js +90 -0
  24. package/_chunks/native.view-ByyZ1CT5.js +32 -0
  25. package/_chunks/{number-input-NnH57J4j.js → number-input-BeIadZuL.js} +89 -89
  26. package/_chunks/picker-DpP7iQLA.js +122 -0
  27. package/_chunks/preact.module-BBM36DnO.js +290 -0
  28. package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-Ca8ZBty3.js} +10 -10
  29. package/_chunks/reorder-list-Cc3KmfAN.js +59 -0
  30. package/_chunks/request-trail-IdNiFvKH.js +347 -0
  31. package/_chunks/{rich-text-2Rla349o.js → rich-text-BzI1DyfF.js} +167 -167
  32. package/_vendor/preact/LICENSE +21 -0
  33. package/_vendor/preact/compat/src/index.d.ts +353 -0
  34. package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
  35. package/_vendor/preact/compat/src/suspense.d.ts +19 -0
  36. package/_vendor/preact/hooks/src/index.d.ts +145 -0
  37. package/_vendor/preact/src/dom.d.ts +2548 -0
  38. package/_vendor/preact/src/index.d.ts +373 -0
  39. package/_vendor/preact/src/jsx.d.ts +2958 -0
  40. package/activity-message.d.ts +1 -1
  41. package/activity-message.js +16 -16
  42. package/ai/components.d.ts +1 -1
  43. package/ai/index.js +2 -2
  44. package/ai/request-trail.d.ts +1 -1
  45. package/ai/translation-context.d.ts +1 -1
  46. package/alert.d.ts +2 -2
  47. package/assignee/field.d.ts +2 -2
  48. package/assignee/index.js +87 -87
  49. package/assignee/layout.d.ts +2 -2
  50. package/assignee/picker.d.ts +1 -1
  51. package/avatar/index.js +25 -25
  52. package/avatar/index.view.d.ts +1 -1
  53. package/brush-range/component.d.ts +1 -1
  54. package/brush-range/component.js +30 -30
  55. package/buttons/delete-button.js +1 -1
  56. package/buttons/remove-button.d.ts +1 -1
  57. package/buttons/remove-button.js +3 -3
  58. package/buttons/svg-button.d.ts +1 -1
  59. package/buttons/svg-button.js +35 -35
  60. package/calendar/calendar.d.ts +1 -1
  61. package/calendar/calendar.js +1 -1
  62. package/calendar/caption.d.ts +1 -1
  63. package/calendar/day.d.ts +1 -1
  64. package/calendar/day.js +4 -4
  65. package/calendar/header.d.ts +1 -1
  66. package/calendar/header.js +35 -35
  67. package/calendar/index.js +2 -2
  68. package/calendar/month-grid.d.ts +1 -1
  69. package/calendar/month-grid.js +37 -37
  70. package/calendar/picker.d.ts +1 -1
  71. package/calendar/types.d.ts +1 -1
  72. package/calendar/year-grid.d.ts +1 -1
  73. package/calendar/year-grid.js +12 -12
  74. package/checkbox/index.d.ts +2 -2
  75. package/checkbox/index.js +9 -9
  76. package/choice-chips/index.d.ts +1 -1
  77. package/choice-chips/index.js +1 -1
  78. package/color-palette/color-palette.d.ts +1 -1
  79. package/color-palette/color-palette.js +1 -1
  80. package/color-palette/color-picker.d.ts +1 -1
  81. package/color-palette/color-picker.js +2 -2
  82. package/component-catalog.d.ts +19 -19
  83. package/control-presentation.js +18 -18
  84. package/controls.d.ts +4 -4
  85. package/controls.js +1 -1
  86. package/core/editor-commit.d.ts +1 -1
  87. package/core/editor-popup.d.ts +1 -1
  88. package/core/editor-popup.js +1 -1
  89. package/date-time/date-control.d.ts +1 -1
  90. package/date-time/field.d.ts +2 -2
  91. package/date-time/index.js +1 -1
  92. package/date-time/picker.d.ts +1 -1
  93. package/date-time/time-control.d.ts +1 -1
  94. package/date-time/time-selection.d.ts +1 -1
  95. package/date-time/types.d.ts +1 -1
  96. package/dialog/dialog-action-footer.view.d.ts +1 -1
  97. package/dialog/dialog.dom.js +52 -52
  98. package/dialog/dialog.parts.d.ts +18 -18
  99. package/dialog/dialog.parts.js +1 -1
  100. package/dialog/dialog.preact.d.ts +1 -1
  101. package/dialog/dialog.preact.js +6 -6
  102. package/distribution-chart/area-chart.d.ts +1 -1
  103. package/distribution-chart/area-chart.js +25 -25
  104. package/distribution-chart/bar-chart.d.ts +1 -1
  105. package/distribution-chart/bar-chart.js +6 -6
  106. package/distribution-chart/chart-frame.d.ts +1 -1
  107. package/distribution-chart/index.d.ts +1 -1
  108. package/distribution-chart/index.js +6 -6
  109. package/distribution-chart/line-chart.d.ts +1 -1
  110. package/distribution-chart/line-chart.js +9 -9
  111. package/distribution-chart/types.d.ts +1 -1
  112. package/dropdown/content.d.ts +1 -1
  113. package/dropdown/content.js +83 -82
  114. package/dropdown/dropdown.service.d.ts +1 -1
  115. package/dropdown/dropdown.service.js +9 -9
  116. package/dropdown/index.js +1 -1
  117. package/dropdown/lookup-field.d.ts +1 -1
  118. package/dropdown/lookup-field.js +41 -41
  119. package/dropdown/popup.d.ts +1 -1
  120. package/dropdown/popup.js +17 -16
  121. package/duration/controls.d.ts +1 -1
  122. package/duration/index.d.ts +2 -2
  123. package/duration/index.js +1 -1
  124. package/editor-actions.d.ts +1 -1
  125. package/editor-actions.js +21 -20
  126. package/editor-layout/index.d.ts +1 -1
  127. package/editor-layout/index.js +27 -27
  128. package/field-configurator.d.ts +1 -1
  129. package/field-configurator.js +93 -93
  130. package/field-reorder.hook.js +32 -32
  131. package/filter/filters/slider/preact.js +3 -3
  132. package/filter/filters/slider/single.d.ts +1 -1
  133. package/filter/filters/slider/single.js +23 -23
  134. package/filter-badge.d.ts +1 -1
  135. package/filter-badge.js +23 -22
  136. package/filter-controls.d.ts +1 -1
  137. package/filter-controls.js +31 -31
  138. package/form-controls/index.js +20 -20
  139. package/form-controls/presentation.d.ts +1 -1
  140. package/form-controls/presentation.js +44 -44
  141. package/formatting/comparison-preview.d.ts +1 -1
  142. package/formatting/control-tooltip.d.ts +1 -1
  143. package/formatting/icon-controls.d.ts +1 -1
  144. package/formatting/index.js +99 -98
  145. package/formatting/inspector-section.d.ts +1 -1
  146. package/formatting/typography-controls.d.ts +1 -1
  147. package/framework-mount.d.ts +1 -1
  148. package/framework.js +19 -19
  149. package/icons/icon.d.ts +1 -1
  150. package/icons/icon.js +1 -1
  151. package/legend.d.ts +1 -1
  152. package/legend.js +12 -12
  153. package/masked-input/index.d.ts +1 -1
  154. package/masked-input/index.js +109 -109
  155. package/native-control.d.ts +11 -11
  156. package/native-control.js +12 -12
  157. package/native.js +39 -39
  158. package/number-input/index.d.ts +1 -1
  159. package/number-input/index.js +1 -1
  160. package/package.json +1 -2
  161. package/pdf-viewer/component.d.ts +1 -1
  162. package/pdf-viewer/controller.js +1 -1
  163. package/pdf-viewer/header.d.ts +1 -1
  164. package/pdf-viewer/index.js +13 -13
  165. package/pdf-viewer/search-bar.d.ts +1 -1
  166. package/pdf-viewer/status.d.ts +1 -1
  167. package/pdf-viewer/toolbar.d.ts +1 -1
  168. package/pickers.d.ts +1 -1
  169. package/preact-mount.d.ts +1 -1
  170. package/preact-mount.js +1 -1
  171. package/preact.js +14 -14
  172. package/rating-choice.d.ts +1 -1
  173. package/rating-choice.js +1 -1
  174. package/react-adapter.d.ts +1 -1
  175. package/react.js +19 -19
  176. package/reorder-list.d.ts +1 -1
  177. package/reorder-list.js +1 -1
  178. package/resource-picker/resource-picker-avatar.d.ts +1 -1
  179. package/resource-picker/resource-picker-avatar.js +14 -14
  180. package/resource-picker/resource-picker-option.d.ts +1 -1
  181. package/resource-picker/resource-picker-option.js +28 -28
  182. package/resource-picker/resource-picker-popup.d.ts +1 -1
  183. package/resource-picker/resource-picker-popup.js +3 -3
  184. package/resource-picker/resource-picker.d.ts +1 -1
  185. package/resource-picker/resource-picker.js +88 -88
  186. package/rich-text/index.d.ts +1 -1
  187. package/rich-text/index.js +1 -1
  188. package/rich-text/toolbar.d.ts +1 -1
  189. package/search-input/index.js +12 -12
  190. package/segmented-switch/index.d.ts +1 -1
  191. package/segmented-switch/index.js +1 -1
  192. package/status-feedback/render.d.ts +2 -2
  193. package/status-feedback/render.js +13 -13
  194. package/surfaces.js +34 -34
  195. package/svelte.js +2 -2
  196. package/switch/index.js +15 -15
  197. package/time-grid.d.ts +1 -1
  198. package/time-grid.js +58 -58
  199. package/timeline-track/component.d.ts +1 -1
  200. package/timeline-track/index.js +75 -75
  201. package/vue-adapter.d.ts +1 -1
  202. package/vue.d.ts +116 -116
  203. package/vue.js +121 -121
  204. package/_chunks/calendar-BsDxCYhI.js +0 -248
  205. package/_chunks/chart-frame-BvxbmEU9.js +0 -126
  206. package/_chunks/choice-chips-0HfOnK_4.js +0 -110
  207. package/_chunks/color-picker-BRv-__AM.js +0 -138
  208. package/_chunks/component-D4PH5UZT.js +0 -859
  209. package/_chunks/date-time-DjucJmbc.js +0 -769
  210. package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
  211. package/_chunks/duration-BCaktcvz.js +0 -270
  212. package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
  213. package/_chunks/framework-mount-BKIOsvY-.js +0 -54
  214. package/_chunks/mount-0-8opf1j.js +0 -90
  215. package/_chunks/native.view-8q_nwQ7x.js +0 -32
  216. package/_chunks/picker-oazJ7sO_.js +0 -121
  217. package/_chunks/reorder-list-BV3kZXso.js +0 -59
  218. package/_chunks/request-trail-D0oVzdRd.js +0 -347
@@ -1,14 +1,14 @@
1
- import { r as e, t } from "../_chunks/chart-frame-BvxbmEU9.js";
2
- import { jsx as n } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
+ import { r as t, t as n } from "../_chunks/chart-frame-BC99KjGa.js";
3
3
  //#region src/distribution-chart/bar-chart.tsx
4
4
  function r(r) {
5
- let { values: i, max: a } = e(r.data);
6
- return /* @__PURE__ */ n(t, {
5
+ let { values: i, max: a } = t(r.data);
6
+ return /* @__PURE__ */ e(n, {
7
7
  ...r,
8
8
  variant: "bar",
9
- renderDatum: (e, t) => /* @__PURE__ */ n("span", {
9
+ renderDatum: (t, n) => /* @__PURE__ */ e("span", {
10
10
  class: "rv-distribution-chart__bar",
11
- style: { height: `${Math.max(3, i[t] / a * 100)}%` },
11
+ style: { height: `${Math.max(3, i[n] / a * 100)}%` },
12
12
  "aria-hidden": "true"
13
13
  })
14
14
  });
@@ -1,4 +1,4 @@
1
- import { h, ComponentChildren } from 'preact';
1
+ import { h, ComponentChildren } from '../_vendor/preact/src/index';
2
2
  import { DistributionChartDatum, DistributionChartType, StandaloneChartProps } from './types';
3
3
  export interface ChartPoint {
4
4
  readonly x: number;
@@ -1,4 +1,4 @@
1
- import { h } from 'preact';
1
+ import { h } from '../_vendor/preact/src/index';
2
2
  import { DistributionChartProps } from './types';
3
3
  export * from './types';
4
4
  export { BarChart, type BarChartProps } from './bar-chart';
@@ -1,10 +1,10 @@
1
- import { BarChart as e } from "./bar-chart.js";
2
- import { LineChart as t } from "./line-chart.js";
3
- import { AreaChart as n } from "./area-chart.js";
4
- import { jsx as r } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
+ import { BarChart as t } from "./bar-chart.js";
3
+ import { LineChart as n } from "./line-chart.js";
4
+ import { AreaChart as r } from "./area-chart.js";
5
5
  //#region src/distribution-chart/index.tsx
6
6
  function i({ type: i = "bar", ...a }) {
7
- return r(i === "line" ? t : i === "area" ? n : e, { ...a });
7
+ return e(i === "line" ? n : i === "area" ? r : t, { ...a });
8
8
  }
9
9
  //#endregion
10
- export { n as AreaChart, e as BarChart, i as DistributionChart, t as LineChart };
10
+ export { r as AreaChart, t as BarChart, i as DistributionChart, n as LineChart };
@@ -1,4 +1,4 @@
1
- import { h } from 'preact';
1
+ import { h } from '../_vendor/preact/src/index';
2
2
  import { StandaloneChartProps } from './types';
3
3
  export type LineChartProps = StandaloneChartProps;
4
4
  /** Compact line chart with independently selected intervals and optional points. */
@@ -1,21 +1,21 @@
1
- import { i as e, n as t, r as n, t as r } from "../_chunks/chart-frame-BvxbmEU9.js";
2
- import { jsx as i } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
+ import { i as t, n, r, t as i } from "../_chunks/chart-frame-BC99KjGa.js";
3
3
  //#region src/distribution-chart/line-chart.tsx
4
4
  function a(a) {
5
- let { points: o } = n(a.data);
6
- return /* @__PURE__ */ i(r, {
5
+ let { points: o } = r(a.data);
6
+ return /* @__PURE__ */ e(i, {
7
7
  ...a,
8
8
  variant: "line",
9
9
  positions: o,
10
- renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */ i("span", {
10
+ renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */ e("span", {
11
11
  class: "rv-distribution-chart__point",
12
12
  "aria-hidden": "true"
13
13
  }),
14
- children: o.length > 0 && /* @__PURE__ */ i(t, { children: o.slice(1).map((t, n) => /* @__PURE__ */ i("path", {
15
- class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[n].selected && a.data[n + 1].selected ? " is-selected" : ""}`,
16
- d: e(o[n], t, a.interpolation),
14
+ children: o.length > 0 && /* @__PURE__ */ e(n, { children: o.slice(1).map((n, r) => /* @__PURE__ */ e("path", {
15
+ class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[r].selected && a.data[r + 1].selected ? " is-selected" : ""}`,
16
+ d: t(o[r], n, a.interpolation),
17
17
  "vector-effect": "non-scaling-stroke"
18
- }, a.data[n].key)) })
18
+ }, a.data[r].key)) })
19
19
  });
20
20
  }
21
21
  //#endregion
@@ -1,4 +1,4 @@
1
- import { ComponentChildren } from 'preact';
1
+ import { ComponentChildren } from '../_vendor/preact/src/index';
2
2
  export type DistributionChartType = 'bar' | 'line' | 'area';
3
3
  export interface DistributionChartTooltip {
4
4
  readonly title: string;
@@ -1,4 +1,4 @@
1
- import { h, ComponentChildren, RefObject } from 'preact';
1
+ import { h, ComponentChildren, RefObject } from '../_vendor/preact/src/index';
2
2
  import { DropdownConfig, DropdownOption } from './dropdown.types';
3
3
  import { RemoteDropdownState, DropdownRemoteText } from './remote';
4
4
  type DropdownContentProps<T = any> = {
@@ -1,141 +1,142 @@
1
- import { ButtonControl as e } from "../native-control.js";
2
- import { useDropdownService as t } from "./dropdown.service.js";
3
- import { h as n } from "preact";
4
- import { Fragment as r, jsx as i, jsxs as a } from "preact/jsx-runtime";
5
- import { useCallback as o, useEffect as s, useRef as c } from "preact/compat";
1
+ import { c as e, i as t } from "../_chunks/preact.module-BBM36DnO.js";
2
+ import { c as n, o as r, t as i } from "../_chunks/hooks.module-CG3gN83z.js";
3
+ import { t as a } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
4
+ import "../_chunks/compat.module-DDB2pm9O.js";
5
+ import { ButtonControl as o } from "../native-control.js";
6
+ import { useDropdownService as s } from "./dropdown.service.js";
6
7
  //#region src/dropdown/content.tsx
7
- function l({ options: n, selectedValues: r, remote: o, value: l, onChange: d, config: f, multiSelect: p, search: m, searchPlaceholder: h, listboxId: g, searchId: _, renderOption: v, renderNoResults: y, onClose: b, theme: x }) {
8
- let S = c(null), C = c(null), w = c(null), { searchValue: T, focusedIndex: E, selectedOptions: D, filteredOptions: O, handleSelect: k, handleKeyDown: A, handleSearchChange: j, setFocusedIndex: M } = t(n, l, d, f, b, o && {
9
- selected: r ?? [],
10
- search: o.search
11
- }), N = E >= 0 && E < O.length && !O[E].disabled ? `${g}-option-${E}` : void 0;
12
- return s(() => {
13
- if (!f.autoFocus) return;
8
+ function c({ options: e, selectedValues: t, remote: r, value: c, onChange: u, config: d, multiSelect: f, search: p, searchPlaceholder: m, listboxId: h, searchId: g, renderOption: _, renderNoResults: v, onClose: y, theme: b }) {
9
+ let x = i(null), S = i(null), C = i(null), { searchValue: w, focusedIndex: T, selectedOptions: E, filteredOptions: D, handleSelect: O, handleKeyDown: k, handleSearchChange: A, setFocusedIndex: j } = s(e, c, u, d, y, r && {
10
+ selected: t ?? [],
11
+ search: r.search
12
+ }), M = T >= 0 && T < D.length && !D[T].disabled ? `${h}-option-${T}` : void 0;
13
+ return n(() => {
14
+ if (!d.autoFocus) return;
14
15
  let e = () => {
15
- m && S.current ? S.current.focus({ preventScroll: !0 }) : C.current?.focus({ preventScroll: !0 });
16
- }, t = C.current?.ownerDocument.defaultView ?? (typeof window < "u" ? window : void 0);
16
+ p && x.current ? x.current.focus({ preventScroll: !0 }) : S.current?.focus({ preventScroll: !0 });
17
+ }, t = S.current?.ownerDocument.defaultView ?? (typeof window < "u" ? window : void 0);
17
18
  if (!t) return;
18
19
  e();
19
20
  let n = t.setTimeout(e, 0), r = t.requestAnimationFrame(e), i = t.setTimeout(e, 16);
20
21
  return () => {
21
22
  t.clearTimeout(n), t.cancelAnimationFrame(r), t.clearTimeout(i);
22
23
  };
23
- }, [f.autoFocus, m]), /* @__PURE__ */ a("div", {
24
- ref: C,
24
+ }, [d.autoFocus, p]), /* @__PURE__ */ a("div", {
25
+ ref: S,
25
26
  className: "dropdown-listbox",
26
- "data-theme": x ?? "default",
27
+ "data-theme": b ?? "default",
27
28
  role: "listbox",
28
- id: g,
29
- "aria-multiselectable": p,
30
- "aria-activedescendant": N,
29
+ id: h,
30
+ "aria-multiselectable": f,
31
+ "aria-activedescendant": M,
31
32
  tabIndex: -1,
32
- "aria-busy": o?.loading,
33
+ "aria-busy": r?.loading,
33
34
  onScrollCapture: (e) => {
34
35
  let t = e.target;
35
- o && t.scrollHeight - t.scrollTop - t.clientHeight < 48 && o.loadMore();
36
+ r && t.scrollHeight - t.scrollTop - t.clientHeight < 48 && r.loadMore();
36
37
  },
37
38
  onKeyUp: (e) => e.stopPropagation(),
38
39
  onKeyDown: (e) => {
39
- e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), b(!1)) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), f.closeOnTab && b(!0)) : (e.key !== " " || e.target !== S.current) && A(e);
40
+ e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), y(!1)) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), d.closeOnTab && y(!0)) : (e.key !== " " || e.target !== x.current) && k(e);
40
41
  },
41
42
  children: [
42
- m && /* @__PURE__ */ i("div", {
43
+ p && /* @__PURE__ */ a("div", {
43
44
  className: "dropdown-search",
44
- children: /* @__PURE__ */ i("input", {
45
- ref: S,
45
+ children: /* @__PURE__ */ a("input", {
46
+ ref: x,
46
47
  type: "text",
47
- id: _,
48
- className: `dropdown-search-input ${x ? `theme-${x}` : ""}`,
49
- placeholder: h,
50
- value: T,
51
- onChange: j,
52
- onInput: j,
53
- "aria-label": f.searchAriaLabel ?? "Search options"
48
+ id: g,
49
+ className: `dropdown-search-input ${b ? `theme-${b}` : ""}`,
50
+ placeholder: m,
51
+ value: w,
52
+ onChange: A,
53
+ onInput: A,
54
+ "aria-label": d.searchAriaLabel ?? "Search options"
54
55
  })
55
56
  }),
56
- o?.loading && /* @__PURE__ */ i("div", {
57
+ r?.loading && /* @__PURE__ */ a("div", {
57
58
  role: "status",
58
- children: o.text.loading
59
+ children: r.text.loading
59
60
  }),
60
- o?.error && /* @__PURE__ */ a("div", {
61
+ r?.error && /* @__PURE__ */ a("div", {
61
62
  role: "alert",
62
63
  children: [
63
- o.text.error,
64
+ r.text.error,
64
65
  " ",
65
- /* @__PURE__ */ i(e, {
66
- onClick: o.retry,
67
- children: o.text.retry
66
+ /* @__PURE__ */ a(o, {
67
+ onClick: r.retry,
68
+ children: r.text.retry
68
69
  })
69
70
  ]
70
71
  }),
71
- /* @__PURE__ */ i(u, {
72
- options: n,
73
- filteredOptions: O,
74
- multiSelect: p,
75
- focusedIndex: E,
76
- selectedOptions: D,
77
- onKeyDown: A,
78
- onSelect: k,
79
- onFocusChange: M,
80
- renderOption: v,
81
- renderNoResults: o ? () => o.loading || o.error ? null : o.text.empty : y,
82
- dropdownListRef: w,
83
- theme: x,
84
- optionIdPrefix: g
72
+ /* @__PURE__ */ a(l, {
73
+ options: e,
74
+ filteredOptions: D,
75
+ multiSelect: f,
76
+ focusedIndex: T,
77
+ selectedOptions: E,
78
+ onKeyDown: k,
79
+ onSelect: O,
80
+ onFocusChange: j,
81
+ renderOption: _,
82
+ renderNoResults: r ? () => r.loading || r.error ? null : r.text.empty : v,
83
+ dropdownListRef: C,
84
+ theme: b,
85
+ optionIdPrefix: h
85
86
  }),
86
- o?.hasMore && /* @__PURE__ */ i(e, {
87
- disabled: o.loading,
88
- onClick: o.loadMore,
89
- children: o.text.loadMore
87
+ r?.hasMore && /* @__PURE__ */ a(o, {
88
+ disabled: r.loading,
89
+ onClick: r.loadMore,
90
+ children: r.text.loadMore
90
91
  })
91
92
  ]
92
93
  });
93
94
  }
94
- function u({ options: e, filteredOptions: t, multiSelect: s, focusedIndex: c, selectedOptions: l, onKeyDown: u, onSelect: d, onFocusChange: f, renderOption: p, renderNoResults: m, dropdownListRef: h, theme: g, optionIdPrefix: _ }) {
95
- let v = o((e) => l.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [l]), y = o((e, t) => {
96
- let r = v(e), o = c === t;
97
- return /* @__PURE__ */ i("li", {
98
- id: `${_}-option-${t}`,
95
+ function l({ options: n, filteredOptions: i, multiSelect: o, focusedIndex: s, selectedOptions: c, onKeyDown: l, onSelect: u, onFocusChange: d, renderOption: f, renderNoResults: p, dropdownListRef: m, theme: h, optionIdPrefix: g }) {
96
+ let _ = r((e) => c.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [c]), v = r((t, n) => {
97
+ let r = _(t), i = s === n;
98
+ return /* @__PURE__ */ a("li", {
99
+ id: `${g}-option-${n}`,
99
100
  role: "option",
100
101
  "aria-selected": r,
101
- "aria-disabled": e.disabled,
102
+ "aria-disabled": t.disabled,
102
103
  tabIndex: -1,
103
- className: `dropdown-option ${r ? "selected" : ""} ${o ? "focused" : ""} ${e.disabled ? "disabled" : ""} ${g ? `theme-${g}` : ""}`,
104
- onClick: () => d(e),
104
+ className: `dropdown-option ${r ? "selected" : ""} ${i ? "focused" : ""} ${t.disabled ? "disabled" : ""} ${h ? `theme-${h}` : ""}`,
105
+ onClick: () => u(t),
105
106
  onMouseEnter: () => {
106
- e.disabled || f(t);
107
+ t.disabled || d(n);
107
108
  },
108
- children: p ? p(n, e, r) : /* @__PURE__ */ a("div", {
109
+ children: f ? f(e, t, r) : /* @__PURE__ */ a("div", {
109
110
  className: "option-content",
110
- children: [s && /* @__PURE__ */ i("input", {
111
+ children: [o && /* @__PURE__ */ a("input", {
111
112
  type: "checkbox",
112
113
  checked: r,
113
114
  readOnly: !0,
114
- disabled: e.disabled,
115
+ disabled: t.disabled,
115
116
  tabIndex: -1,
116
117
  "aria-hidden": "true"
117
- }), /* @__PURE__ */ i("span", { children: e.label })]
118
+ }), /* @__PURE__ */ a("span", { children: t.label })]
118
119
  })
119
- }, `${e.label}-${t}`);
120
+ }, `${t.label}-${n}`);
120
121
  }, [
121
- c,
122
- d,
123
- v,
124
122
  s,
125
- p,
123
+ u,
124
+ _,
125
+ o,
126
126
  f,
127
- g
127
+ d,
128
+ h
128
129
  ]);
129
- return /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i("ul", {
130
- ref: h,
130
+ return /* @__PURE__ */ a(t, { children: /* @__PURE__ */ a("ul", {
131
+ ref: m,
131
132
  className: "dropdown-options",
132
133
  role: "presentation",
133
134
  tabIndex: -1,
134
- children: t.length > 0 ? t.map(y) : /* @__PURE__ */ i("li", {
135
+ children: i.length > 0 ? i.map(v) : /* @__PURE__ */ a("li", {
135
136
  className: "no-results",
136
- children: m ? m(n) : /* @__PURE__ */ i("span", { children: "No results found" })
137
+ children: p ? p(e) : /* @__PURE__ */ a("span", { children: "No results found" })
137
138
  })
138
139
  }) });
139
140
  }
140
141
  //#endregion
141
- export { u as DropdownContent, l as DropdownPopupContent };
142
+ export { l as DropdownContent, c as DropdownPopupContent };
@@ -14,6 +14,6 @@ export declare function useDropdownService<T = any>(options: DropdownOption<T>[]
14
14
  handleKeyDown: (e: KeyboardEvent) => void;
15
15
  handleSearchChange: (e: DropdownInputEvent) => void;
16
16
  isOptionSelected: (option: DropdownOption<T>) => boolean;
17
- setFocusedIndex: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<number>>;
17
+ setFocusedIndex: import('../_vendor/preact/hooks/src/index').Dispatch<import('../_vendor/preact/hooks/src/index').StateUpdater<number>>;
18
18
  };
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "preact/hooks";
1
+ import { c as e, i as t, n, o as r, t as i } from "../_chunks/hooks.module-CG3gN83z.js";
2
2
  //#region src/dropdown/dropdown.service.ts
3
3
  var a = (e, t) => e.label.toLowerCase().includes(t.toLowerCase()), o = (e, t, n) => {
4
4
  if (n === "none") return 0;
@@ -12,8 +12,8 @@ function s(e, t, n) {
12
12
  return r ? [r] : [];
13
13
  }
14
14
  function c(c, l, u, d = {}, f, p) {
15
- let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] = i(b), [C, w] = i(-1), [T, E] = i(() => s(c, l, v)), D = r(!1);
16
- t(() => {
15
+ let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] = t(b), [C, w] = t(-1), [T, E] = t(() => s(c, l, v)), D = i(!1);
16
+ e(() => {
17
17
  E(p?.selected ?? s(c, l, v));
18
18
  }, [
19
19
  l,
@@ -34,9 +34,9 @@ function c(c, l, u, d = {}, f, p) {
34
34
  _,
35
35
  !!p
36
36
  ]);
37
- t(() => {
37
+ e(() => {
38
38
  D.current = !1, S(b);
39
- }, [b]), t(() => {
39
+ }, [b]), e(() => {
40
40
  O.length ? w((e) => {
41
41
  if (D.current && e >= 0 && e < O.length && !O[e].disabled) return e;
42
42
  let t = O.findIndex((e) => !e.disabled && T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)));
@@ -47,7 +47,7 @@ function c(c, l, u, d = {}, f, p) {
47
47
  return e >= 0 && e < O.length && !O[e].disabled ? e : t >= 0 ? t : O.findIndex((e) => !e.disabled);
48
48
  }) : w(-1);
49
49
  }, [O, T]);
50
- let k = e((e) => {
50
+ let k = r((e) => {
51
51
  if (!e.disabled) {
52
52
  if (v) {
53
53
  let t = T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
@@ -74,7 +74,7 @@ function c(c, l, u, d = {}, f, p) {
74
74
  selectedOptions: T,
75
75
  filteredOptions: O,
76
76
  handleSelect: k,
77
- handleKeyDown: e((e) => {
77
+ handleKeyDown: r((e) => {
78
78
  switch (e.key) {
79
79
  case "Escape":
80
80
  e.preventDefault(), e.stopPropagation();
@@ -93,11 +93,11 @@ function c(c, l, u, d = {}, f, p) {
93
93
  C,
94
94
  k
95
95
  ]),
96
- handleSearchChange: e((e) => {
96
+ handleSearchChange: r((e) => {
97
97
  let t = e.currentTarget.value;
98
98
  t !== x && (D.current = !1, S(t), p?.search(t), w(-1));
99
99
  }, [p, x]),
100
- isOptionSelected: e((e) => T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [T]),
100
+ isOptionSelected: r((e) => T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [T]),
101
101
  setFocusedIndex: w
102
102
  };
103
103
  }
package/dropdown/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { DropdownPopup as e } from "./popup.js";
2
- import { n as t, r as n, t as r } from "../_chunks/dropdown-CkGQBm1Q.js";
2
+ import { n as t, r as n, t as r } from "../_chunks/dropdown-voWqmwAe.js";
3
3
  import { DropdownPopupContent as i } from "./content.js";
4
4
  export { r as Dropdown, e as DropdownPopup, i as DropdownPopupContent, t as defineDropdown, n as destroyDropdown };
@@ -26,4 +26,4 @@ export declare function LookupField({ initial, options, context, apply, cancel,
26
26
  context: unknown;
27
27
  apply: (value: LookupId | LookupId[] | null) => void;
28
28
  cancel: () => void;
29
- }): import("preact").JSX.Element;
29
+ }): import("../_vendor/preact/src/index").JSX.Element;
@@ -1,64 +1,64 @@
1
- import { t as e } from "../_chunks/dropdown-CkGQBm1Q.js";
2
- import { n as t } from "../_chunks/editor-commit-D6Rf5rGz.js";
3
- import { EditorActions as n } from "../editor-actions.js";
4
- import { useRef as r, useState as i } from "preact/hooks";
5
- import { jsx as a, jsxs as o } from "preact/jsx-runtime";
1
+ import { i 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/dropdown-voWqmwAe.js";
4
+ import { n as i } from "../_chunks/editor-commit-Bq3wSgvr.js";
5
+ import { EditorActions as a } from "../editor-actions.js";
6
6
  //#region src/dropdown/lookup-field.tsx
7
- function s({ initial: s, options: c, context: l, apply: u, cancel: d }) {
8
- let [f, p] = i(s), [m, h] = i(!1), g = c.autoApply !== !1, _ = r(!1), v = r(s), y = f === null || Array.isArray(f) && !f.length;
9
- return t(() => {
10
- if (!_.current) return !0;
11
- let e = v.current;
12
- return c.required && (e === null || Array.isArray(e) && !e.length) ? !1 : (_.current && (_.current = !1, u(e)), !0);
13
- }, g), /* @__PURE__ */ o("div", {
7
+ function o({ initial: o, options: s, context: c, apply: l, cancel: u }) {
8
+ let [d, f] = e(o), [p, m] = e(!1), h = s.autoApply !== !1, g = t(!1), _ = t(o), v = d === null || Array.isArray(d) && !d.length;
9
+ return i(() => {
10
+ if (!g.current) return !0;
11
+ let e = _.current;
12
+ return s.required && (e === null || Array.isArray(e) && !e.length) ? !1 : (g.current && (g.current = !1, l(e)), !0);
13
+ }, h), /* @__PURE__ */ n("div", {
14
14
  class: "rv-lookup-editor",
15
15
  onKeyDown: (e) => {
16
- (e.ctrlKey || e.metaKey) && e.key === "Enter" && !(c.required && y) && (e.preventDefault(), u(f));
16
+ (e.ctrlKey || e.metaKey) && e.key === "Enter" && !(s.required && v) && (e.preventDefault(), l(d));
17
17
  },
18
18
  children: [
19
- /* @__PURE__ */ a(e, {
20
- source: c.source ?? [],
21
- dataSource: c.dataSource,
22
- dataContext: l,
23
- remoteText: c.text,
24
- value: f === null ? void 0 : f,
19
+ /* @__PURE__ */ n(r, {
20
+ source: s.source ?? [],
21
+ dataSource: s.dataSource,
22
+ dataContext: c,
23
+ remoteText: s.text,
24
+ value: d === null ? void 0 : d,
25
25
  onChange: (e) => {
26
- _.current = !0, h(!0), v.current = e, p(e);
26
+ g.current = !0, m(!0), _.current = e, f(e);
27
27
  let t = e === null || Array.isArray(e) && !e.length;
28
- g && !c.multiple && !(c.required && t) && (_.current = !1, u(e));
28
+ h && !s.multiple && !(s.required && t) && (g.current = !1, l(e));
29
29
  },
30
- placeholder: c.placeholder ?? c.text?.placeholder,
31
- renderOption: c.renderOption,
32
- renderValue: c.renderValue,
30
+ placeholder: s.placeholder ?? s.text?.placeholder,
31
+ renderOption: s.renderOption,
32
+ renderValue: s.renderValue,
33
33
  config: {
34
34
  search: !0,
35
- multiSelect: c.multiple,
35
+ multiSelect: s.multiple,
36
36
  topLayer: !0,
37
37
  autoFocus: !0,
38
- ariaLabel: c.text?.label ?? "Linked records",
39
- searchPlaceholder: c.text?.searchPlaceholder,
40
- searchAriaLabel: c.text?.searchLabel,
41
- removeLabel: c.text?.removeLabel
38
+ ariaLabel: s.text?.label ?? "Linked records",
39
+ searchPlaceholder: s.text?.searchPlaceholder,
40
+ searchAriaLabel: s.text?.searchLabel,
41
+ removeLabel: s.text?.removeLabel
42
42
  }
43
43
  }),
44
- c.required && y && m && /* @__PURE__ */ a("span", {
44
+ s.required && v && p && /* @__PURE__ */ n("span", {
45
45
  role: "alert",
46
46
  class: "rv-editor-error",
47
- children: c.text?.requiredValue ?? "Select at least one record."
47
+ children: s.text?.requiredValue ?? "Select at least one record."
48
48
  }),
49
- /* @__PURE__ */ a(n, {
50
- showConfirm: c.showActions ?? !g,
51
- text: c.actions,
52
- disabled: c.required && y,
53
- cancel: d,
54
- apply: () => u(f),
55
- clear: c.required ? void 0 : () => {
56
- let e = c.multiple ? [] : null;
57
- g ? u(e) : (v.current = e, p(e));
49
+ /* @__PURE__ */ n(a, {
50
+ showConfirm: s.showActions ?? !h,
51
+ text: s.actions,
52
+ disabled: s.required && v,
53
+ cancel: u,
54
+ apply: () => l(d),
55
+ clear: s.required ? void 0 : () => {
56
+ let e = s.multiple ? [] : null;
57
+ h ? l(e) : (_.current = e, f(e));
58
58
  }
59
59
  })
60
60
  ]
61
61
  });
62
62
  }
63
63
  //#endregion
64
- export { s as LookupField };
64
+ export { o as LookupField };
@@ -1,4 +1,4 @@
1
- import { h, ComponentChildren, RefObject } from 'preact';
1
+ import { h, ComponentChildren, RefObject } from '../_vendor/preact/src/index';
2
2
  export type DropdownPopupProps = {
3
3
  onPointerRelease?: (event: MouseEvent | TouchEvent) => void;
4
4
  triggerRef: RefObject<HTMLDivElement>;
package/dropdown/popup.js CHANGED
@@ -1,7 +1,8 @@
1
- import { hideTopLayerPopup as e, showTopLayerPopup as t } from "../core/top-layer-popup.js";
2
- import { inheritUiMotion as n } from "../core/motion.js";
3
- import { jsx as r } from "preact/jsx-runtime";
4
- import { createPortal as i, useEffect as a, useLayoutEffect as o, useRef as s, useState as c } from "preact/compat";
1
+ import { c as e, i as t, r as n, t as r } from "../_chunks/hooks.module-CG3gN83z.js";
2
+ import { t as i } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { t as a } from "../_chunks/compat.module-DDB2pm9O.js";
4
+ import { hideTopLayerPopup as o, showTopLayerPopup as s } from "../core/top-layer-popup.js";
5
+ import { inheritUiMotion as c } from "../core/motion.js";
5
6
  //#region src/dropdown/popup.tsx
6
7
  var l = 5, u = 4;
7
8
  function d(e, t, n) {
@@ -28,15 +29,15 @@ function d(e, t, n) {
28
29
  };
29
30
  }
30
31
  function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, theme: g, dropdownMenuId: _, popupClassName: v, closeOnClickOutside: y = !1, onClose: b, align: x = "start", matchTriggerWidth: S = !1, maxHeight: C, observePopupResize: w = !0, topLayer: T = !1 }) {
31
- let E = s(null), [D, O] = c({
32
+ let E = r(null), [D, O] = t({
32
33
  top: 0,
33
34
  left: 0,
34
35
  display: "none"
35
36
  });
36
- o(() => {
37
+ n(() => {
37
38
  let e = p.current, t = E.current;
38
- if (e && t) return n(e, t);
39
- }, [h, p]), a(() => {
39
+ if (e && t) return c(e, t);
40
+ }, [h, p]), e(() => {
40
41
  let e = p.current;
41
42
  if (!e) return;
42
43
  let t = e.ownerDocument.defaultView ?? window, n = () => {
@@ -83,14 +84,14 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
83
84
  w,
84
85
  h,
85
86
  p
86
- ]), o(() => {
87
- let n = E.current;
88
- if (!T || !n) return;
89
- let r = t(n);
87
+ ]), n(() => {
88
+ let e = E.current;
89
+ if (!T || !e) return;
90
+ let t = s(e);
90
91
  return () => {
91
- e(n, r);
92
+ o(e, t);
92
93
  };
93
- }, [h, T]), o(() => {
94
+ }, [h, T]), n(() => {
94
95
  if (!y || !b) return;
95
96
  let e = h?.ownerDocument ?? E.current?.ownerDocument ?? p.current?.ownerDocument ?? (typeof document < "u" ? document : void 0);
96
97
  if (!e) return;
@@ -113,7 +114,7 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
113
114
  h,
114
115
  p
115
116
  ]);
116
- let k = /* @__PURE__ */ r("div", {
117
+ let k = /* @__PURE__ */ i("div", {
117
118
  ref: E,
118
119
  id: _,
119
120
  className: `revo-dropdown-menu ${v || ""}`,
@@ -134,7 +135,7 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
134
135
  },
135
136
  children: m
136
137
  });
137
- return h ? i(k, h) : k;
138
+ return h ? a(k, h) : k;
138
139
  }
139
140
  //#endregion
140
141
  export { f as DropdownPopup };
@@ -10,4 +10,4 @@ export declare function DurationControls(props: DurationFieldOptions & {
10
10
  disabled?: boolean;
11
11
  onChange: (value: number, unit?: DurationUnit, elapsed?: boolean) => void;
12
12
  onCommit?: (value: number, unit?: DurationUnit, elapsed?: boolean) => void;
13
- }): import("preact").JSX.Element;
13
+ }): import("../_vendor/preact/src/index").JSX.Element;
@@ -30,7 +30,7 @@ export interface DurationFieldProps extends DurationFieldOptions {
30
30
  readOnly?: boolean;
31
31
  className?: string;
32
32
  }
33
- export declare function DurationField(props: DurationFieldProps): import("preact").JSX.Element;
33
+ export declare function DurationField(props: DurationFieldProps): import("../_vendor/preact/src/index").JSX.Element;
34
34
  export type { DurationControlOptions, ParsedDuration };
35
35
  /** Shared staged duration form for grid adapters; scheduling stays in product commands. */
36
36
  export declare function DurationDraft({ value, options, apply, cancel, }: {
@@ -42,4 +42,4 @@ export declare function DurationDraft({ value, options, apply, cancel, }: {
42
42
  };
43
43
  apply: (value: ParsedDuration | null) => void;
44
44
  cancel: () => void;
45
- }): import("preact").JSX.Element;
45
+ }): import("../_vendor/preact/src/index").JSX.Element;