@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,4 +1,4 @@
1
- import { jsx as e } from "preact/jsx-runtime";
1
+ import { t as e } from "./jsxRuntime.module-F6UFnpT-.js";
2
2
  //#region src/icons/cancel.svg?raw
3
3
  var t = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill=\"currentColor\" d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/></svg>", n = ({ onClick: n, disabled: r, className: i, onMouseDown: a, onDblClick: o, locale: s = {
4
4
  title: "Remove",
@@ -0,0 +1,134 @@
1
+ import { c as e, i as t } from "./preact.module-BBM36DnO.js";
2
+ import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
3
+ import { n as r } from "./compat.module-DDB2pm9O.js";
4
+ import { createPreactElement as i, releasePreactElement as a } from "../preact-mount.js";
5
+ import { ButtonControl as o, Input as s } from "../native-control.js";
6
+ import { t as c } from "./xmark-DD_PBvZI.js";
7
+ //#region src/dialog/dialog-action-footer.view.tsx
8
+ function l({ cancel: e = {}, save: t = {}, deleteAction: r = !1, reset: i = !1, start: a, end: s, children: c, actionsClass: l = "", class: u = "", ...d }) {
9
+ let f = (e, t, r, i = "", a = "button") => {
10
+ if (t === !1) return null;
11
+ let { label: s = r, class: c = "", ...l } = t;
12
+ return /* @__PURE__ */ n(o, {
13
+ type: a,
14
+ ...l,
15
+ class: `rv-btn ${i} ${c}`,
16
+ "data-dialog-action": e,
17
+ children: s
18
+ });
19
+ };
20
+ return /* @__PURE__ */ n("footer", {
21
+ ...d,
22
+ class: `rv-dialog__footer rv-dialog__action-footer ${u}`,
23
+ children: [c, /* @__PURE__ */ n("div", {
24
+ class: "rv-dialog__action-panel",
25
+ children: [/* @__PURE__ */ n("div", {
26
+ class: "rv-dialog__action-start",
27
+ children: [
28
+ a,
29
+ f("delete", r, "Delete", "rv-btn-danger-outline"),
30
+ f("reset", i, "Reset")
31
+ ]
32
+ }), /* @__PURE__ */ n("div", {
33
+ class: `rv-dialog__actions ${l}`,
34
+ children: [
35
+ s,
36
+ f("cancel", e, "Cancel"),
37
+ f("save", t, "Save", "rv-btn-primary", "submit")
38
+ ]
39
+ })]
40
+ })]
41
+ });
42
+ }
43
+ function u(e, t) {
44
+ return /* @__PURE__ */ n(l, { ...t });
45
+ }
46
+ function d(e, t) {
47
+ let r = i(e.ownerDocument, /* @__PURE__ */ n(l, { ...t }));
48
+ return e.append(r), { destroy() {
49
+ a(r);
50
+ } };
51
+ }
52
+ //#endregion
53
+ //#region src/dialog/dialog.parts.tsx
54
+ var f = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("header", {
55
+ ...t,
56
+ ref: r,
57
+ class: `rv-dialog__header ${e}`
58
+ }));
59
+ function p({ class: e = "", ...t }) {
60
+ return /* @__PURE__ */ n("form", {
61
+ ...t,
62
+ class: `rv-dialog__surface ${e}`
63
+ });
64
+ }
65
+ var m = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
66
+ ...t,
67
+ ref: r,
68
+ class: `rv-dialog__body ${e}`
69
+ })), h = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("footer", {
70
+ ...t,
71
+ ref: r,
72
+ class: `rv-dialog__footer ${e}`
73
+ })), g = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
74
+ ...t,
75
+ ref: r,
76
+ class: `rv-dialog__actions ${e}`
77
+ }));
78
+ function _({ class: e = "", iconClass: t = "", ...r }) {
79
+ return /* @__PURE__ */ n(o, {
80
+ ...r,
81
+ unstyled: !0,
82
+ type: "button",
83
+ class: `rv-dialog__close ${e}`,
84
+ children: /* @__PURE__ */ n("span", {
85
+ class: `rv-dialog__close-icon ${t}`,
86
+ "aria-hidden": "true",
87
+ dangerouslySetInnerHTML: { __html: c }
88
+ })
89
+ });
90
+ }
91
+ var v = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n(s, {
92
+ ...t,
93
+ ref: r,
94
+ class: `rv-dialog__title-input ${e}`
95
+ })), y = r(({ titleId: e, title: r, name: i, description: a, inputLabel: o, titleHidden: s, headingClass: c = "", kickerClass: l = "", titleClass: u = "", inputProps: d, closeLabel: p, closeProps: m, onClose: h, class: g = "", ...y }, b) => /* @__PURE__ */ n(f, {
96
+ ...y,
97
+ ref: b,
98
+ class: `rv-dialog__header--editable ${g}`,
99
+ children: [/* @__PURE__ */ n("div", {
100
+ class: `rv-dialog__heading ${c}`,
101
+ children: [
102
+ !s && i && /* @__PURE__ */ n("span", {
103
+ class: `rv-dialog__kicker ${l}`,
104
+ children: i
105
+ }),
106
+ !s && (d === !1 ? /* @__PURE__ */ n("h3", {
107
+ id: e,
108
+ class: `rv-dialog__title ${u}`,
109
+ children: r
110
+ }) : /* @__PURE__ */ n(t, { children: [/* @__PURE__ */ n("h3", {
111
+ id: e,
112
+ class: `rv-dialog__sr-only ${u}`,
113
+ children: r
114
+ }), /* @__PURE__ */ n(v, {
115
+ "aria-label": o,
116
+ value: r,
117
+ ...d
118
+ })] })),
119
+ a && /* @__PURE__ */ n("div", {
120
+ class: "rv-dialog__description",
121
+ children: a
122
+ })
123
+ ]
124
+ }), h && /* @__PURE__ */ n(_, {
125
+ ...m,
126
+ "aria-label": p,
127
+ onClick: h
128
+ })]
129
+ }));
130
+ function b(t) {
131
+ return u(e, t);
132
+ }
133
+ //#endregion
134
+ export { h as a, v as c, d, u as f, _ as i, y as l, g as n, p as o, m as r, f as s, b as t, l as u };
@@ -1,19 +1,19 @@
1
- import { t as e } from "./chevron-down-GbplLa6s.js";
2
- import { RemoveButton as t } from "../buttons/remove-button.js";
3
- import { DropdownPopup as n } from "../dropdown/popup.js";
4
- import { DropdownPopupContent as r } from "../dropdown/content.js";
5
- import { h as i, render as a } from "preact";
6
- import { useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "preact/hooks";
7
- import { jsx as d, jsxs as f } from "preact/jsx-runtime";
1
+ import { c as e, r as t } from "./preact.module-BBM36DnO.js";
2
+ import { c as n, i as r, n as i, r as a, t as o } from "./hooks.module-CG3gN83z.js";
3
+ import { t as s } from "./jsxRuntime.module-F6UFnpT-.js";
4
+ import { t as c } from "./chevron-down-GbplLa6s.js";
5
+ import { RemoveButton as l } from "../buttons/remove-button.js";
6
+ import { DropdownPopup as u } from "../dropdown/popup.js";
7
+ import { DropdownPopupContent as d } from "../dropdown/content.js";
8
8
  //#region src/dropdown/remote.ts
9
- var p = {
9
+ var f = {
10
10
  loading: "Loading…",
11
11
  empty: "No results found",
12
12
  error: "Unable to load options.",
13
13
  retry: "Retry",
14
14
  loadMore: "Load more",
15
15
  unavailable: (e) => `Unavailable (${String(e)})`
16
- }, m = class {
16
+ }, p = class {
17
17
  source;
18
18
  context;
19
19
  changed;
@@ -36,7 +36,7 @@ var p = {
36
36
  failedCursor;
37
37
  resolveFailed = !1;
38
38
  opened = !1;
39
- constructor(e, t, n, r = p, i = {}) {
39
+ constructor(e, t, n, r = f, i = {}) {
40
40
  this.source = e, this.context = t, this.changed = n, this.text = r, this.settings = i;
41
41
  }
42
42
  remember(e) {
@@ -115,19 +115,19 @@ var p = {
115
115
  //#endregion
116
116
  //#region src/dropdown/remote-hook.ts
117
117
  function ee(e) {
118
- let t = c(() => ({
119
- ...p,
118
+ let t = i(() => ({
119
+ ...f,
120
120
  ...e.remoteText
121
- }), [e.remoteText]), [n, r] = u({
121
+ }), [e.remoteText]), [s, c] = r({
122
122
  items: [],
123
123
  selected: [],
124
124
  loading: !1,
125
125
  error: !1,
126
126
  hasMore: !1
127
- }), i = l(), a = e.value === null || e.value === void 0 ? [] : Array.isArray(e.value) ? e.value : [e.value], d = JSON.stringify(a);
128
- return s(() => {
127
+ }), l = o(), u = e.value === null || e.value === void 0 ? [] : Array.isArray(e.value) ? e.value : [e.value], d = JSON.stringify(u);
128
+ return a(() => {
129
129
  if (!e.dataSource || e.disabled) {
130
- r({
130
+ c({
131
131
  items: [],
132
132
  selected: [],
133
133
  loading: !1,
@@ -136,17 +136,17 @@ function ee(e) {
136
136
  });
137
137
  return;
138
138
  }
139
- let n = new m(e.dataSource, e.dataContext, r, t);
140
- return i.current = n, () => {
141
- n.destroy(), i.current === n && (i.current = void 0);
139
+ let n = new p(e.dataSource, e.dataContext, c, t);
140
+ return l.current = n, () => {
141
+ n.destroy(), l.current === n && (l.current = void 0);
142
142
  };
143
143
  }, [
144
144
  e.dataSource,
145
145
  e.dataContext,
146
146
  e.disabled,
147
147
  t
148
- ]), s(() => {
149
- i.current?.setSelected(a, e.source);
148
+ ]), a(() => {
149
+ l.current?.setSelected(u, e.source);
150
150
  }, [
151
151
  d,
152
152
  e.source,
@@ -154,8 +154,8 @@ function ee(e) {
154
154
  e.dataContext,
155
155
  e.disabled,
156
156
  t
157
- ]), o(() => {
158
- e.open ? i.current?.search(e.initialQuery, !0) : i.current?.close();
157
+ ]), n(() => {
158
+ e.open ? l.current?.search(e.initialQuery, !0) : l.current?.close();
159
159
  }, [
160
160
  e.open,
161
161
  e.dataSource,
@@ -164,90 +164,90 @@ function ee(e) {
164
164
  e.initialQuery,
165
165
  t
166
166
  ]), {
167
- ...n,
167
+ ...s,
168
168
  text: t,
169
- search: (e) => i.current?.search(e),
170
- loadMore: () => i.current?.loadMore(),
171
- retry: () => i.current?.retry()
169
+ search: (e) => l.current?.search(e),
170
+ loadMore: () => l.current?.loadMore(),
171
+ retry: () => l.current?.retry()
172
172
  };
173
173
  }
174
174
  //#endregion
175
175
  //#region src/dropdown/index.tsx
176
- var te = ({ options: e, className: t, renderValue: n }) => /* @__PURE__ */ d("span", {
177
- className: `selected-value ${t}`,
178
- children: n ? n(i, e[0]) : e[0].label
179
- }), ne = ({ options: e, removeOption: n, className: r, renderValue: a, disabled: o, removeLabel: s }) => /* @__PURE__ */ d("div", {
176
+ var m = ({ options: t, className: n, renderValue: r }) => /* @__PURE__ */ s("span", {
177
+ className: `selected-value ${n}`,
178
+ children: r ? r(e, t[0]) : t[0].label
179
+ }), h = ({ options: t, removeOption: n, className: r, renderValue: i, disabled: a, removeLabel: o }) => /* @__PURE__ */ s("div", {
180
180
  className: `selected-values ${r}`,
181
- children: e.map((e, r) => /* @__PURE__ */ f("span", {
181
+ children: t.map((t, r) => /* @__PURE__ */ s("span", {
182
182
  className: "selected-tag",
183
- children: [a ? a(i, e) : e.label, !o && !e.disabled && /* @__PURE__ */ d(t, {
183
+ children: [i ? i(e, t) : t.label, !a && !t.disabled && /* @__PURE__ */ s(l, {
184
184
  compact: !0,
185
- onClick: (t) => {
186
- t.stopPropagation(), n(e);
185
+ onClick: (e) => {
186
+ e.stopPropagation(), n(t);
187
187
  },
188
188
  locale: {
189
- title: s?.(e.label) ?? `Remove ${e.label}`,
190
- ariaLabel: s?.(e.label) ?? `Remove ${e.label}`
189
+ title: o?.(t.label) ?? `Remove ${t.label}`,
190
+ ariaLabel: o?.(t.label) ?? `Remove ${t.label}`
191
191
  }
192
192
  })]
193
193
  }, r))
194
- }), h = ({ className: t }) => /* @__PURE__ */ d("span", {
195
- className: `dropdown-arrow ${t}`,
194
+ }), g = ({ className: e }) => /* @__PURE__ */ s("span", {
195
+ className: `dropdown-arrow ${e}`,
196
196
  "aria-hidden": "true",
197
- dangerouslySetInnerHTML: { __html: e }
198
- }), re = ({ placeholder: e, className: t }) => [/* @__PURE__ */ d("span", {
197
+ dangerouslySetInnerHTML: { __html: c }
198
+ }), te = ({ placeholder: e, className: t }) => [/* @__PURE__ */ s("span", {
199
199
  className: `placeholder px-2 ${t}`,
200
200
  children: e
201
- }), /* @__PURE__ */ d(h, { className: "mr-2" })];
202
- function g({ source: e, dataSource: t, dataContext: a, remoteText: s, value: p, onChange: m, placeholder: g = "Select an option", disabled: _ = !1, name: v, id: y, className: ie = "", style: b, config: x = {}, renderContent: S, renderOption: ae, renderValue: C, renderPlaceholder: w, renderSelectedValue: T, renderNoResults: oe, onClose: E, beforeOutsideClose: D, environment: O }) {
203
- let { search: k = !1, searchPlaceholder: A = "Search...", closeOnClickOutside: j = !0, autoOpen: M = !1, multiSelect: N = !1, portalTarget: P, ariaLabel: F, ariaLabelledBy: I, ariaDescribedBy: L, popupClassName: R, maxHeight: se } = x, z = l(null), B = P ?? (x.topLayer ? z.current?.closest("revo-grid") : void 0) ?? (typeof document < "u" ? document.body : null), V = c(() => y || `dropdown-${Math.random().toString(36).substring(2, 9)}`, [y]), H = `${V}-listbox`, ce = `${V}-search`, U = `${V}-menu`, [W, G] = u(M && !_), [le, K] = u(!_ && (M || !!x.autoFocus)), q = l(M), J = x.theme ?? "default";
204
- o(() => {
205
- M && !q.current && !_ && (K(!0), G(!0)), q.current = M;
206
- }, [M, _]), o(() => {
207
- _ && W && (G(!1), E?.(!1));
208
- }, [_, W]);
201
+ }), /* @__PURE__ */ s(g, { className: "mr-2" })];
202
+ function _({ source: t, dataSource: a, dataContext: c, remoteText: l, value: f, onChange: p, placeholder: _ = "Select an option", disabled: v = !1, name: y, id: b, className: ne = "", style: re, config: x = {}, renderContent: S, renderOption: ie, renderValue: C, renderPlaceholder: w, renderSelectedValue: T, renderNoResults: ae, onClose: E, beforeOutsideClose: D, environment: O }) {
203
+ let { search: k = !1, searchPlaceholder: A = "Search...", closeOnClickOutside: j = !0, autoOpen: M = !1, multiSelect: N = !1, portalTarget: P, ariaLabel: F, ariaLabelledBy: I, ariaDescribedBy: L, popupClassName: R, maxHeight: oe } = x, z = o(null), B = P ?? (x.topLayer ? z.current?.closest("revo-grid") : void 0) ?? (typeof document < "u" ? document.body : null), V = i(() => b || `dropdown-${Math.random().toString(36).substring(2, 9)}`, [b]), H = `${V}-listbox`, se = `${V}-search`, U = `${V}-menu`, [W, G] = r(M && !v), [ce, K] = r(!v && (M || !!x.autoFocus)), q = o(M), J = x.theme ?? "default";
204
+ n(() => {
205
+ M && !q.current && !v && (K(!0), G(!0)), q.current = M;
206
+ }, [M, v]), n(() => {
207
+ v && W && (G(!1), E?.(!1));
208
+ }, [v, W]);
209
209
  let Y = ee({
210
- dataSource: t,
211
- dataContext: a,
212
- remoteText: s,
213
- value: p,
214
- disabled: _,
215
- source: e,
210
+ dataSource: a,
211
+ dataContext: c,
212
+ remoteText: l,
213
+ value: f,
214
+ disabled: v,
215
+ source: t,
216
216
  open: W,
217
217
  initialQuery: x.initialSearch ?? ""
218
- }), X = t ? [...new Map([...Y.selected, ...Y.items].map((e) => [e.value, e])).values()] : e, Z = c(() => {
219
- if (p === void 0) return [];
220
- if (N && Array.isArray(p)) return X.filter((e) => p.some((t) => JSON.stringify(t) === JSON.stringify(e.value)));
218
+ }), X = a ? [...new Map([...Y.selected, ...Y.items].map((e) => [e.value, e])).values()] : t, Z = i(() => {
219
+ if (f === void 0) return [];
220
+ if (N && Array.isArray(f)) return X.filter((e) => f.some((t) => JSON.stringify(t) === JSON.stringify(e.value)));
221
221
  {
222
- let e = X.find((e) => JSON.stringify(e.value) === JSON.stringify(p));
222
+ let e = X.find((e) => JSON.stringify(e.value) === JSON.stringify(f));
223
223
  return e ? [e] : [];
224
224
  }
225
225
  }, [
226
- p,
226
+ f,
227
227
  X,
228
228
  N
229
229
  ]), Q = () => {
230
- _ || G((e) => {
230
+ v || G((e) => {
231
231
  let t = !e;
232
232
  return t && K(!0), t;
233
233
  });
234
234
  }, $ = (e = !1) => {
235
235
  G((t) => (t && E?.(e), !1));
236
236
  };
237
- o(() => {
237
+ n(() => {
238
238
  if (!W) return;
239
239
  let e = z.current;
240
240
  if (e) return O?.onOpen?.(e, $);
241
241
  }, [W]);
242
- let ue = (e) => {
243
- if (!(_ || e.disabled)) {
242
+ let le = (e) => {
243
+ if (!(v || e.disabled)) {
244
244
  if (N) {
245
245
  let t = Z.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
246
- n = t ? Z.filter((t) => JSON.stringify(t.value) !== JSON.stringify(e.value)) : [...Z, e], m && m(n.map((e) => e.value));
247
- } else m && m(e.value), $();
246
+ n = t ? Z.filter((t) => JSON.stringify(t.value) !== JSON.stringify(e.value)) : [...Z, e], p && p(n.map((e) => e.value));
247
+ } else p && p(e.value), $();
248
248
  }
249
249
  };
250
- return o(() => {
250
+ return n(() => {
251
251
  if (!j || !W) return;
252
252
  let e = B?.ownerDocument ?? z.current?.ownerDocument ?? (typeof document < "u" ? document : void 0);
253
253
  if (!e) return;
@@ -270,42 +270,42 @@ function g({ source: e, dataSource: t, dataContext: a, remoteText: s, value: p,
270
270
  U,
271
271
  B,
272
272
  D
273
- ]), /* @__PURE__ */ f("div", {
274
- className: `dropdown-container ${ie} ${_ ? "disabled" : ""}`,
275
- style: b,
273
+ ]), /* @__PURE__ */ s("div", {
274
+ className: `dropdown-container ${ne} ${v ? "disabled" : ""}`,
275
+ style: re,
276
276
  children: [
277
- /* @__PURE__ */ d("div", {
277
+ /* @__PURE__ */ s("div", {
278
278
  ref: z,
279
279
  className: `dropdown-trigger ${W ? "open" : ""}`,
280
280
  role: "combobox",
281
281
  "aria-haspopup": S ? "dialog" : "listbox",
282
- "aria-expanded": W && !_,
283
- "aria-disabled": _,
282
+ "aria-expanded": W && !v,
283
+ "aria-disabled": v,
284
284
  "aria-owns": H,
285
285
  "aria-controls": H,
286
286
  "aria-label": F,
287
287
  "aria-labelledby": I,
288
288
  "aria-describedby": L,
289
- tabIndex: _ ? -1 : 0,
290
- onClick: _ ? void 0 : Q,
289
+ tabIndex: v ? -1 : 0,
290
+ onClick: v ? void 0 : Q,
291
291
  onKeyDown: (e) => {
292
- _ || e.target !== e.currentTarget || (W && e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), $()) : !W && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), e.stopPropagation(), Q()));
292
+ v || e.target !== e.currentTarget || (W && e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), $()) : !W && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), e.stopPropagation(), Q()));
293
293
  },
294
294
  children: (() => {
295
- let e = [h({})];
296
- return T ? T(i, Z, e) : Z.length > 0 ? N ? [/* @__PURE__ */ d(ne, {
295
+ let t = [g({})];
296
+ return T ? T(e, Z, t) : Z.length > 0 ? N ? [/* @__PURE__ */ s(h, {
297
297
  options: Z,
298
- removeOption: ue,
298
+ removeOption: le,
299
299
  renderValue: C,
300
- disabled: _,
300
+ disabled: v,
301
301
  removeLabel: x.removeLabel
302
- }), /* @__PURE__ */ d(h, { className: "mr-2" })] : [/* @__PURE__ */ d(te, {
302
+ }), /* @__PURE__ */ s(g, { className: "mr-2" })] : [/* @__PURE__ */ s(m, {
303
303
  options: Z,
304
304
  renderValue: C
305
- }), /* @__PURE__ */ d(h, { className: "mr-2" })] : w ? w(i, g, e) : /* @__PURE__ */ d(re, { placeholder: g });
305
+ }), /* @__PURE__ */ s(g, { className: "mr-2" })] : w ? w(e, _, t) : /* @__PURE__ */ s(te, { placeholder: _ });
306
306
  })()
307
307
  }),
308
- W && !_ && /* @__PURE__ */ d(n, {
308
+ W && !v && /* @__PURE__ */ s(u, {
309
309
  onPointerRelease: O?.onPointerRelease,
310
310
  topLayer: x.topLayer,
311
311
  triggerRef: z,
@@ -313,45 +313,45 @@ function g({ source: e, dataSource: t, dataContext: a, remoteText: s, value: p,
313
313
  theme: J,
314
314
  dropdownMenuId: U,
315
315
  popupClassName: R,
316
- maxHeight: se,
316
+ maxHeight: oe,
317
317
  children: S ? S({
318
318
  id: H,
319
319
  close: $
320
- }) : /* @__PURE__ */ d(r, {
321
- options: t ? Y.items : X,
322
- selectedValues: t ? Y.selected : void 0,
323
- remote: t ? Y : void 0,
324
- value: p,
320
+ }) : /* @__PURE__ */ s(d, {
321
+ options: a ? Y.items : X,
322
+ selectedValues: a ? Y.selected : void 0,
323
+ remote: a ? Y : void 0,
324
+ value: f,
325
325
  onChange: (e) => {
326
- _ || m?.(e);
326
+ v || p?.(e);
327
327
  },
328
328
  config: {
329
329
  ...x,
330
- autoFocus: x.autoFocus || le
330
+ autoFocus: x.autoFocus || ce
331
331
  },
332
332
  multiSelect: N,
333
- search: !!t || k,
333
+ search: !!a || k,
334
334
  searchPlaceholder: A,
335
335
  listboxId: H,
336
- searchId: ce,
337
- renderOption: ae,
338
- renderNoResults: oe,
336
+ searchId: se,
337
+ renderOption: ie,
338
+ renderNoResults: ae,
339
339
  onClose: $,
340
340
  theme: J
341
341
  })
342
342
  }),
343
- v && /* @__PURE__ */ d("input", {
343
+ y && /* @__PURE__ */ s("input", {
344
344
  type: "hidden",
345
- name: v,
345
+ name: y,
346
346
  value: JSON.stringify(N ? Z.map((e) => e.value) : Z[0]?.value || "")
347
347
  })
348
348
  ]
349
349
  });
350
350
  }
351
- var _ = (e, t) => {
352
- a(/* @__PURE__ */ d(g, { ...t }), e);
353
- }, v = (e) => {
354
- a(null, e);
351
+ var v = (e, n) => {
352
+ t(/* @__PURE__ */ s(_, { ...n }), e);
353
+ }, y = (e) => {
354
+ t(null, e);
355
355
  };
356
356
  //#endregion
357
- export { _ as n, v as r, g as t };
357
+ export { v as n, y as r, _ as t };