@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
package/README.md CHANGED
@@ -128,7 +128,7 @@ The ring inherits the button text color. Motion Off (`data-rv-ui-motion="off"`)
128
128
 
129
129
  ## Standalone framework controls
130
130
 
131
- Import `@revolist/ui/styles.css` once for compiled standard styles. The public build bundles private date/chart utilities; customers do not need private workspace packages or a TypeScript/Sass source compiler. Preact is required by the shared rendering layer; React, Vue, Angular and Svelte are optional peers used only by their adapter subpaths.
131
+ Import `@revolist/ui/styles.css` once for compiled standard styles. The public build bundles private date/chart utilities; customers do not need private workspace packages or a TypeScript/Sass source compiler. The public distribution includes its Preact renderer and declarations; consumers do not need to install Preact. React, Vue, Angular and Svelte are optional peers used only by their adapter subpaths.
132
132
 
133
133
  ```ts
134
134
  import { createControl, applyControlPresentation } from '@revolist/ui';
@@ -143,7 +143,7 @@ Each adapter preserves native elements, events, values and form bindings. React
143
143
 
144
144
  ## Build and release preparation
145
145
 
146
- Run `pnpm --dir packages/ui pack:public` from the monorepo, then `pnpm --dir packages/ui test:public`. The generated public package is `dist/`, and the archive is `artifacts/revolist-ui-<version>.tgz`. The workspace manifest intentionally remains private; the generated distribution manifest declares public access and contains no workspace dependencies.
146
+ Run `pnpm --dir packages/ui pack:public` from the monorepo, then `pnpm --dir packages/ui test:public`. The generated public package is `dist/`, and the archive is `artifacts/revolist-ui-<version>.tgz`. The generated distribution manifest declares public access and contains no workspace dependencies.
147
147
 
148
148
  Before publication, standalone repositories consume an identical archive in their own `vendor/` directory using relative `file:` dependencies and a lockfile generated against that real archive. These paths are portable with the cloned repository. Include its vendor archive when copying a starter out of that repository. After an authorized registry release, dependencies can switch to the published version and locks can be regenerated from the registry. Do not substitute unverified registry URLs or integrity values for the prepared archive.
149
149
 
@@ -153,8 +153,9 @@ The Publish NPM workflow includes UI in `all` releases and supports a standalone
153
153
 
154
154
  `@revolist/ui/vue` exposes Vue wrappers for the Preact component catalog and the
155
155
  standalone number, mask, duration, temporal, assignee and Markdown editors.
156
- These wrappers retain the existing Preact implementation and require both Vue
157
- and Preact. Use `vue-control` for native HTML controls that only need presentation;
156
+ These wrappers retain the existing Preact implementation, bundled in the public
157
+ distribution, and require Vue. Use `vue-control` for native HTML controls that
158
+ only need presentation;
158
159
  its runtime presentation helpers do not import Preact.
159
160
 
160
161
  ```vue
@@ -217,7 +218,7 @@ pnpm --filter @revolist/ui-gallery exec playwright test --config ../../tests/sha
217
218
  ## React, Angular and Svelte component adapters
218
219
 
219
220
  All adapters reuse the existing Preact controls and their interaction lifecycle.
220
- Import `@revolist/ui/styles.css` once. Install Preact and your host framework;
221
+ Import `@revolist/ui/styles.css` once. Install your host framework;
221
222
  React component wrappers also require `react-dom`. The primitive `*-control`
222
223
  entries remain available for framework-owned native elements.
223
224
 
@@ -0,0 +1,248 @@
1
+ import { i as e, n as t, t as n } from "./hooks.module-CG3gN83z.js";
2
+ import { t as r } from "./jsxRuntime.module-F6UFnpT-.js";
3
+ import { ButtonControl as i, Select as a } from "../native-control.js";
4
+ import { createControlId as o } from "../core/control-id.js";
5
+ import { DEFAULT_CALENDAR_TRANSLATIONS as s } from "../calendar/translations.js";
6
+ import { a as c, n as l } from "./iso-B0YHBK7m.js";
7
+ import { a as u, c as d, d as f, f as p, l as m, n as h, p as g, r as _, s as v, t as y, u as b } from "./model-mPO2tG2f.js";
8
+ import { CalendarHeader as ee, CalendarWeekdays as te } from "../calendar/header.js";
9
+ import { CalendarMonthGrid as x } from "../calendar/month-grid.js";
10
+ import { CalendarYearGrid as ne } from "../calendar/year-grid.js";
11
+ //#region src/calendar/caption.tsx
12
+ function re({ month: e, system: n, locale: i, layout: o, start: s, end: c, disabled: l, labels: u, onChange: d }) {
13
+ let h = m(e, n), g = f(e, n), _ = t(() => {
14
+ let t = m(e, n)[0], r = s ? m(s, n)[0] : v(t, -600, n), i = c ? m(c, n)[0] : v(t, 120, n), a = [];
15
+ for (let e = r; e <= i; e = v(e, 12, n)) a.push(e);
16
+ return a.includes(t) || a.push(t), a.sort();
17
+ }, [
18
+ e,
19
+ n,
20
+ s,
21
+ c
22
+ ]);
23
+ return /* @__PURE__ */ r("div", {
24
+ class: "revo-calendar__caption",
25
+ children: [o === "dropdown-years" ? /* @__PURE__ */ r("span", { children: b(e, i, { month: "long" }, n) }) : /* @__PURE__ */ r(a, {
26
+ "aria-label": u.chooseMonth,
27
+ disabled: l,
28
+ value: String(g.month),
29
+ onChange: (e) => d(h[Number(e.currentTarget.value) - 1]),
30
+ children: h.map((e, t) => /* @__PURE__ */ r("option", {
31
+ value: String(t + 1),
32
+ disabled: !!(s && e < p(s, n) || c && e > p(c, n)),
33
+ children: b(e, i, { month: "short" }, n)
34
+ }, e))
35
+ }), o === "dropdown-months" ? /* @__PURE__ */ r("span", { children: b(e, i, { year: "numeric" }, n) }) : /* @__PURE__ */ r(a, {
36
+ "aria-label": u.chooseYear,
37
+ disabled: l,
38
+ value: h[0],
39
+ onChange: (e) => {
40
+ let t = e.currentTarget.value, r = v(t, g.month - 1, n);
41
+ s && r < p(s, n) && (r = p(s, n)), c && r > p(c, n) && (r = p(c, n)), d(r);
42
+ },
43
+ children: _.map((e) => /* @__PURE__ */ r("option", {
44
+ value: e,
45
+ children: b(e, i, { year: "numeric" }, n)
46
+ }, e))
47
+ })]
48
+ });
49
+ }
50
+ //#endregion
51
+ //#region src/calendar/calendar.tsx
52
+ var ie = "2026-08-02";
53
+ function S({ locale: a = "en-US", weekStartsOn: f = 1, showOutsideDays: m = !1, allowOutsideMonthSelection: S = !1, fixedWeeks: ae = !0, showTodayButton: oe = !1, showHeader: se = !0, showNavigation: C = !0, showPreviousButton: ce = C, showNextButton: le = C, showMonthLabel: ue = !0, showWeekdays: de = !0, enableYearView: w = !0, translations: fe = {}, ...T }) {
54
+ let [E] = e(() => o("rv-calendar-feedback")), D = T.calendarSystem ?? "gregory", O = Math.max(1, Math.min(12, Math.trunc(T.numberOfMonths || 1))), k = t(() => {
55
+ let e = T.views ? [...new Set(T.views.filter((e) => e === "month" || e === "year"))] : w ? ["month", "year"] : ["month"];
56
+ return e.length ? e : ["month"];
57
+ }, [T.views, w]), [A, pe] = e(T.defaultView && k.includes(T.defaultView) ? T.defaultView : k[0]), j = k.includes(A) ? A : k[0], M = p(T.month, D), N = t(() => Array.from({ length: O }, (e, t) => v(M, t, D)), [
58
+ M,
59
+ O,
60
+ D
61
+ ]), me = T.reverseMonths ? [...N].reverse() : N, he = t(() => Array.from({ length: 7 }, (e, t) => g(ie, (f + t) % 7)), [f]), P = T.referenceDate ?? (T.referenceInstant ? l(T.referenceInstant, T.timeZone ?? "UTC") : void 0), F = n(/* @__PURE__ */ new Map()), I = n(!1), L = {
62
+ ...s,
63
+ ...fe
64
+ }, R = (e) => _(e, {
65
+ minDate: T.minDate,
66
+ maxDate: T.maxDate,
67
+ isMonthDisabled: T.isMonthDisabled,
68
+ calendarSystem: D
69
+ }), z = [T.startMonth, T.minDate].filter((e) => !!e).map((e) => p(e, D)).sort().at(-1), B = [T.endMonth, T.maxDate].filter((e) => !!e).map((e) => p(e, D)).sort().at(0), V = (e) => !!(T.disableNavigation || R(e) || z && e < z || B && e > B), H = (e, t = O) => {
70
+ let n = B ? v(B, 1 - t, D) : void 0;
71
+ return n && z && n < z && (n = z), n && e > n && (e = n), z && e < z && (e = z), e;
72
+ }, U = /* @__PURE__ */ new Map(), W = (e) => {
73
+ let t = U.get(e);
74
+ if (t !== void 0) return t;
75
+ let n = R(p(e, D)) || h(e, {
76
+ minDate: T.minDate,
77
+ maxDate: T.maxDate,
78
+ isDisabled: T.isDateDisabled
79
+ });
80
+ return U.set(e, n), n;
81
+ }, ge = N.includes(p(T.focusedDate, D)) && !W(T.focusedDate) ? T.focusedDate : N.flatMap((e) => y(e, f, !1, D)).find((e) => N.includes(p(e, D)) && !W(e)) ?? T.focusedDate, G = (e) => {
82
+ e !== j && k.includes(e) && (pe(e), T.onViewChange?.(e));
83
+ }, K = (e, t = T.onSelect) => {
84
+ if (W(e)) return T.onInvalidSelection?.(L.invalidSelection, e), !1;
85
+ let n = T.validateSelection?.(e, {
86
+ month: M,
87
+ view: j,
88
+ selection: T.selection,
89
+ preview: T.preview,
90
+ referenceDate: P
91
+ });
92
+ return n === !1 || typeof n == "string" ? (T.onInvalidSelection?.(typeof n == "string" ? n : L.invalidSelection, e), !1) : (t(e), !0);
93
+ }, _e = (e, t) => {
94
+ t ? F.current.set(e, t) : F.current.delete(e), t && I.current && e === T.focusedDate && (I.current = !1, queueMicrotask(() => t.focus()));
95
+ }, ve = (e, t) => {
96
+ let n = T.dir ?? (e.currentTarget.ownerDocument.defaultView?.getComputedStyle(e.currentTarget).direction === "rtl" ? "rtl" : "ltr"), r = u({
97
+ date: t,
98
+ key: e.key,
99
+ shiftKey: e.shiftKey,
100
+ weekStartsOn: f,
101
+ minDate: T.minDate,
102
+ maxDate: T.maxDate,
103
+ isDisabled: W,
104
+ dir: n,
105
+ calendarSystem: D
106
+ });
107
+ if (!r) return;
108
+ e.preventDefault();
109
+ let i = p(r, D);
110
+ (N.includes(i) || !V(i)) && (I.current = !0, N.includes(i) || T.onMonthChange(H(i)), T.onFocusedDateChange(r), queueMicrotask(() => {
111
+ let e = F.current.get(r);
112
+ e && (I.current = !1, e.focus());
113
+ }));
114
+ }, q = (e) => T.formatMonth?.(e, a) ?? b(e, a, {
115
+ month: "long",
116
+ year: "numeric"
117
+ }, D), J = j === "year", Y = J ? 12 : T.pagedNavigation ? O : 1, X = H(v(M, -Y, D), J ? 1 : O), Z = H(v(M, Y, D), J ? 1 : O), Q = (e, t = J ? 1 : O) => {
118
+ let n = H(e, t);
119
+ V(n) || T.onMonthChange(n);
120
+ }, $ = (e) => {
121
+ K(e, T.onPresetSelect ?? T.onSelect) && (T.onMonthChange(H(p(e, D))), T.onFocusedDateChange(e), G("month"));
122
+ };
123
+ return /* @__PURE__ */ r("div", {
124
+ class: `revo-calendar${T.showWeekNumber ? " revo-calendar--week-numbers" : ""}${T.className ? ` ${T.className}` : ""}`,
125
+ dir: T.dir,
126
+ style: T.cellSize ? { "--revo-calendar-cell-size": `${Math.max(24, T.cellSize)}px` } : void 0,
127
+ children: [
128
+ /* @__PURE__ */ r("div", {
129
+ class: "revo-calendar__months",
130
+ children: (J ? [M] : me).map((e, t) => /* @__PURE__ */ r("section", {
131
+ class: "revo-calendar__month-panel",
132
+ children: [se && /* @__PURE__ */ r(ee, {
133
+ label: J ? b(e, a, { year: "numeric" }, D) : q(e),
134
+ previousLabel: J ? L.previousYear : L.previousMonth,
135
+ nextLabel: J ? L.nextYear : L.nextMonth,
136
+ caption: !J && T.captionLayout && T.captionLayout !== "label" ? /* @__PURE__ */ r(re, {
137
+ month: e,
138
+ system: D,
139
+ locale: a,
140
+ layout: T.captionLayout,
141
+ start: z,
142
+ end: B,
143
+ disabled: T.disableNavigation,
144
+ labels: L,
145
+ onChange: (t) => Q(v(t, -N.indexOf(e), D))
146
+ }) : void 0,
147
+ labelAction: !T.disableNavigation && !J && k.includes("year") ? {
148
+ ariaLabel: `${L.chooseMonth}: ${q(e)}`,
149
+ onClick: () => G("year")
150
+ } : void 0,
151
+ showLabel: ue,
152
+ showPrevious: ce && t === 0,
153
+ showNext: le && t === (J ? 0 : O - 1),
154
+ previousDisabled: X >= M || V(X),
155
+ nextDisabled: Z <= M || V(Z),
156
+ onPrevious: () => Q(X),
157
+ onNext: () => Q(Z)
158
+ }), J ? /* @__PURE__ */ r(ne, {
159
+ month: M,
160
+ system: D,
161
+ referenceDate: P,
162
+ minDate: T.minDate,
163
+ maxDate: T.maxDate,
164
+ isMonthDisabled: T.isMonthDisabled,
165
+ locale: a,
166
+ ariaLabel: `${L.chooseMonth} ${b(M, a, { year: "numeric" }, D)}`,
167
+ onEscape: () => G("month"),
168
+ onSelect: (e) => {
169
+ Q(e, O), G("month");
170
+ }
171
+ }) : /* @__PURE__ */ r("div", {
172
+ class: "revo-calendar__calendar",
173
+ role: "grid",
174
+ "aria-label": `${q(e)} ${L.calendar}`,
175
+ children: [de && /* @__PURE__ */ r(te, {
176
+ dates: he,
177
+ locale: a,
178
+ format: T.formatWeekday ?? ((e, t) => b(e, t, { weekday: /^(fa|ar)(-|$)/.test(t) ? "narrow" : "short" }, D)),
179
+ weekNumberLabel: T.showWeekNumber ? L.weekNumber : void 0
180
+ }), /* @__PURE__ */ r(x, {
181
+ dates: y(e, f, ae, D),
182
+ month: e,
183
+ system: D,
184
+ visibleMonths: N,
185
+ focusedDate: ge,
186
+ referenceDate: P,
187
+ selection: T.selection,
188
+ selectedDates: T.selectedDates,
189
+ preview: T.preview,
190
+ previewInvalid: T.previewInvalid,
191
+ previewDescriptionId: T.previewDescription ? E : void 0,
192
+ showOutsideDays: m,
193
+ allowOutsideMonthSelection: S,
194
+ dayClassName: T.dayClassName,
195
+ renderDay: T.renderDay ?? ((e) => b(e, a, { day: "numeric" }, D)),
196
+ isDisabled: W,
197
+ formatDayLabel: (e) => T.formatDayLabel?.(e, a) ?? b(e, a, {
198
+ weekday: "long",
199
+ month: "long",
200
+ day: "numeric",
201
+ year: "numeric"
202
+ }, D),
203
+ weekNumber: T.showWeekNumber ? (e) => {
204
+ let t = d(T.weekNumbering === "local" ? e : g(e, (4 - c(e) + 7) % 7), T.weekNumbering === "local" ? f : 1, T.weekNumbering === "local" ? 1 : 4, T.weekNumbering === "local" ? D : "gregory");
205
+ return T.formatWeekNumber?.(t) ?? new Intl.NumberFormat(a).format(t);
206
+ } : void 0,
207
+ weekNumberLabel: L.weekNumber,
208
+ setDayRef: _e,
209
+ onFocus: T.onFocusedDateChange,
210
+ onPreview: (e) => T.onPreviewDateChange?.(e),
211
+ onKeyDown: ve,
212
+ onSelect: K
213
+ })]
214
+ })]
215
+ }, e))
216
+ }),
217
+ T.presets?.length ? /* @__PURE__ */ r("div", {
218
+ class: "revo-calendar__presets",
219
+ children: T.presets.map((e) => /* @__PURE__ */ r(i, {
220
+ disabled: W(e.date),
221
+ onClick: () => $(e.date),
222
+ children: e.label
223
+ }, e.label))
224
+ }) : null,
225
+ oe && P && /* @__PURE__ */ r("button", {
226
+ type: "button",
227
+ class: "revo-calendar__today",
228
+ disabled: W(P),
229
+ onClick: () => $(P),
230
+ children: L.today
231
+ }),
232
+ T.previewDescription !== void 0 && /* @__PURE__ */ r("p", {
233
+ id: E,
234
+ class: "revo-calendar__feedback",
235
+ role: "status",
236
+ "aria-live": "polite",
237
+ "aria-atomic": "true",
238
+ children: T.previewDescription
239
+ }),
240
+ T.footer && /* @__PURE__ */ r("div", {
241
+ class: "revo-calendar__footer",
242
+ children: T.footer
243
+ })
244
+ ]
245
+ });
246
+ }
247
+ //#endregion
248
+ export { S as t };
@@ -0,0 +1,127 @@
1
+ import { i as e } from "./preact.module-BBM36DnO.js";
2
+ import { i as t, t as n } from "./hooks.module-CG3gN83z.js";
3
+ import { t as r } from "./jsxRuntime.module-F6UFnpT-.js";
4
+ //#region src/distribution-chart/geometry.ts
5
+ function i(e) {
6
+ let t = e.map(({ value: e }) => Number.isFinite(e) ? Math.max(0, e) : 0), n = Math.max(1, ...t);
7
+ return {
8
+ values: t,
9
+ max: n,
10
+ points: t.map((t, r) => ({
11
+ x: e.length <= 1 ? 50 : r / (e.length - 1) * 100,
12
+ y: 96 - t / n * 88
13
+ }))
14
+ };
15
+ }
16
+ function a(e, t) {
17
+ return t === "step" ? `H ${e.x} V ${e.y}` : `L ${e.x} ${e.y}`;
18
+ }
19
+ function o(e, t, n = "linear") {
20
+ return `M ${e.x} ${e.y} ${a(t, n)}`;
21
+ }
22
+ //#endregion
23
+ //#region src/distribution-chart/chart-frame.tsx
24
+ function s({ title: e, details: t = [] }) {
25
+ return [e, ...t].filter(Boolean).join(". ");
26
+ }
27
+ function c({ title: t, details: n = [] }) {
28
+ return /* @__PURE__ */ r(e, { children: [/* @__PURE__ */ r("strong", { children: t }), n.map((e) => /* @__PURE__ */ r("span", { children: e }, e))] });
29
+ }
30
+ function l({ data: e, ariaLabel: a, variant: o, height: l = 72, className: u = "", showGrid: d = !1, showLabels: f = !1, showValues: p = !1, legend: m, formatValue: h = String, tooltip: g = !0, tooltipIndicator: _ = "none", renderTooltip: v, positions: y, renderDatum: b, children: x }) {
31
+ let { values: S, max: C } = i(e), [w, T] = t(0), E = n([]), D = Math.min(w, Math.max(0, e.length - 1)), O = (t) => {
32
+ if (!e.length) return;
33
+ let n = Math.max(0, Math.min(t, e.length - 1));
34
+ T(n), E.current[n]?.focus();
35
+ };
36
+ return /* @__PURE__ */ r("div", {
37
+ class: `rv-distribution-chart rv-distribution-chart--${o} ${u}`.trim(),
38
+ role: "group",
39
+ "aria-label": a,
40
+ "data-empty": e.length ? void 0 : "true",
41
+ children: [
42
+ /* @__PURE__ */ r("div", {
43
+ class: "rv-distribution-chart__region",
44
+ style: { height: `${Math.max(40, Math.min(240, l))}px` },
45
+ children: [
46
+ d && /* @__PURE__ */ r("div", {
47
+ class: "rv-distribution-chart__grid",
48
+ "aria-hidden": "true",
49
+ children: [
50
+ 0,
51
+ 1,
52
+ 2,
53
+ 3,
54
+ 4
55
+ ].map((e) => /* @__PURE__ */ r("span", {}, e))
56
+ }),
57
+ x,
58
+ /* @__PURE__ */ r("div", {
59
+ class: "rv-distribution-chart__data",
60
+ role: "list",
61
+ children: e.map((t, n) => {
62
+ let i = y?.[n], a = !i;
63
+ return /* @__PURE__ */ r("span", {
64
+ ref: (e) => {
65
+ E.current[n] = e;
66
+ },
67
+ class: `rv-distribution-chart__datum${t.selected ? " is-selected" : ""}${a ? " is-bar" : " is-point"}`,
68
+ role: "listitem",
69
+ tabIndex: n === D ? 0 : -1,
70
+ "aria-label": s(t.tooltip),
71
+ style: a ? void 0 : {
72
+ left: `${i.x}%`,
73
+ top: `${i.y}%`
74
+ },
75
+ onFocus: () => T(n),
76
+ onKeyDown: (t) => {
77
+ t.key === "ArrowRight" || t.key === "ArrowDown" ? (t.preventDefault(), O(n + 1)) : t.key === "ArrowLeft" || t.key === "ArrowUp" ? (t.preventDefault(), O(n - 1)) : t.key === "Home" ? (t.preventDefault(), O(0)) : t.key === "End" && (t.preventDefault(), O(e.length - 1));
78
+ },
79
+ children: [
80
+ b(t, n),
81
+ p && /* @__PURE__ */ r("span", {
82
+ class: "rv-distribution-chart__value",
83
+ style: a ? {
84
+ top: `${100 - Math.max(3, S[n] / C * 100)}%`,
85
+ transform: "translate(-50%, -100%)"
86
+ } : void 0,
87
+ "aria-hidden": "true",
88
+ children: h(t.value)
89
+ }),
90
+ g && /* @__PURE__ */ r("span", {
91
+ class: `rv-distribution-chart__tooltip rv-distribution-chart__tooltip--${_}`,
92
+ role: "tooltip",
93
+ children: [_ !== "none" && /* @__PURE__ */ r("i", { "aria-hidden": "true" }), v ? v(t, n) : c(t.tooltip)]
94
+ })
95
+ ]
96
+ }, t.key);
97
+ })
98
+ })
99
+ ]
100
+ }),
101
+ f && /* @__PURE__ */ r("div", {
102
+ class: `rv-distribution-chart__labels${o === "bar" ? " is-bar" : ""}`,
103
+ "aria-hidden": "true",
104
+ children: e.map((e) => /* @__PURE__ */ r("span", {
105
+ title: e.tooltip.title,
106
+ children: e.tooltip.title
107
+ }, e.key))
108
+ }),
109
+ m && /* @__PURE__ */ r("div", {
110
+ class: "rv-distribution-chart__legend",
111
+ children: [/* @__PURE__ */ r("i", { "aria-hidden": "true" }), m]
112
+ })
113
+ ]
114
+ });
115
+ }
116
+ function u({ children: e }) {
117
+ return /* @__PURE__ */ r("svg", {
118
+ class: "rv-distribution-chart__plot",
119
+ viewBox: "0 0 100 100",
120
+ preserveAspectRatio: "none",
121
+ "aria-hidden": "true",
122
+ focusable: "false",
123
+ children: e
124
+ });
125
+ }
126
+ //#endregion
127
+ export { o as i, u as n, i as r, l as t };
@@ -0,0 +1,110 @@
1
+ import { r as e, t } from "./hooks.module-CG3gN83z.js";
2
+ import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
3
+ import { SvgIcon as r } from "../icons/icon.js";
4
+ import { ButtonControl as i } from "../native-control.js";
5
+ import { TooltipController as a } from "../surfaces.js";
6
+ import { RemoveButton as o } from "../buttons/remove-button.js";
7
+ //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/circle-info.svg?raw
8
+ var s = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"/></svg>";
9
+ //#endregion
10
+ //#region src/choice-chips/index.tsx
11
+ function c({ value: e, options: t, onChange: r, ariaLabel: i, appearance: a = "soft", size: o = "medium", className: s = "", itemClassName: c = "", disabled: l = !1, testId: d }) {
12
+ let f = Array.isArray(e) ? e : e === void 0 ? [] : [e];
13
+ return /* @__PURE__ */ n("div", {
14
+ class: `rv-choice-chips rv-choice-chips--${a} rv-choice-chips--${o} ${s}`.trim(),
15
+ role: "group",
16
+ "aria-label": i,
17
+ "data-testid": d,
18
+ children: t.map((e) => {
19
+ let t = f.includes(e.value), i = l || !!e.disabled;
20
+ return /* @__PURE__ */ n(u, {
21
+ className: `${c} ${e.className ?? ""}`.trim(),
22
+ style: e.style,
23
+ color: e.color,
24
+ selected: t,
25
+ "aria-label": e.ariaLabel,
26
+ title: e.title,
27
+ disabled: i,
28
+ "data-value": String(e.value),
29
+ "data-testid": e.testId,
30
+ onSelect: () => {
31
+ i || r(e.value, e);
32
+ },
33
+ info: e.info,
34
+ onRemove: e.onRemove,
35
+ removeLabel: e.removeLabel,
36
+ children: e.label
37
+ }, String(e.value));
38
+ })
39
+ });
40
+ }
41
+ function l({ "data-tooltip": o, title: c, ref: l, ...u }) {
42
+ let d = t(null), f = o ?? (typeof c == "object" ? c.value : c);
43
+ return e(() => {
44
+ if (!d.current || !f) return;
45
+ let e = new a();
46
+ return e.bind(d.current, f, { trigger: "click" }), () => e.destroy();
47
+ }, [f]), /* @__PURE__ */ n(i, {
48
+ ...u,
49
+ type: "button",
50
+ ref: (e) => {
51
+ d.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
52
+ },
53
+ class: `rv-choice-chip-info ${u.className ?? u.class ?? ""}`.trim(),
54
+ children: /* @__PURE__ */ n(r, {
55
+ svg: s,
56
+ size: 12
57
+ })
58
+ });
59
+ }
60
+ function u({ children: e, color: t, selected: r, onSelect: i, info: a, onRemove: s, removeLabel: c, removeClassName: l = "", className: u = "", disabled: d, ...f }) {
61
+ let p = t ? typeof f.style == "string" ? `${f.style};--rv-choice-chip-color:${t}` : {
62
+ ...f.style,
63
+ "--rv-choice-chip-color": t
64
+ } : f.style;
65
+ return !a && !s && i ? /* @__PURE__ */ n("button", {
66
+ ...f,
67
+ style: p,
68
+ "data-color": t ? "true" : void 0,
69
+ type: "button",
70
+ class: `rv-choice-chip ${u}`.trim(),
71
+ "aria-pressed": r,
72
+ disabled: d,
73
+ onClick: i,
74
+ children: e
75
+ }) : /* @__PURE__ */ n("span", {
76
+ class: `rv-choice-chip rv-choice-chip--composite ${u}`.trim(),
77
+ role: f.role,
78
+ style: p,
79
+ "data-color": t ? "true" : void 0,
80
+ "data-selected": r ? "true" : void 0,
81
+ "aria-disabled": d || void 0,
82
+ children: [
83
+ i ? /* @__PURE__ */ n("button", {
84
+ ...f,
85
+ type: "button",
86
+ class: "rv-choice-chip-label",
87
+ "aria-pressed": r,
88
+ disabled: d,
89
+ onClick: i,
90
+ children: e
91
+ }) : /* @__PURE__ */ n("span", {
92
+ class: "rv-choice-chip-label",
93
+ children: e
94
+ }),
95
+ a,
96
+ s && /* @__PURE__ */ n(o, {
97
+ compact: !0,
98
+ className: l,
99
+ disabled: typeof d == "object" ? d.value : d,
100
+ locale: {
101
+ title: c ?? "Remove",
102
+ ariaLabel: c ?? "Remove"
103
+ },
104
+ onClick: s
105
+ })
106
+ ]
107
+ });
108
+ }
109
+ //#endregion
110
+ export { l as n, c as r, u as t };
@@ -1,13 +1,13 @@
1
- import { n as e } from "./control-tooltip-BCNzQCXE.js";
2
- import { DEFAULT_COLOR_PALETTE_OPTIONS as t } from "../color-palette/palette.js";
3
- import { jsx as n, jsxs as r } from "preact/jsx-runtime";
1
+ import { t as e } from "./jsxRuntime.module-F6UFnpT-.js";
2
+ import { n as t } from "./control-tooltip-ztgmsG7H.js";
3
+ import { DEFAULT_COLOR_PALETTE_OPTIONS as n } from "../color-palette/palette.js";
4
4
  //#region src/color-palette/color-model.ts
5
- function i(e) {
5
+ function r(e) {
6
6
  if (!e) return;
7
7
  let t = e.trim().toLowerCase(), n = /^#([\da-f])([\da-f])([\da-f])$/i.exec(t);
8
8
  return n ? `#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}` : /^#[\da-f]{6}$/i.test(t) ? t : void 0;
9
9
  }
10
- function a(e) {
10
+ function i(e) {
11
11
  if (![
12
12
  "ArrowRight",
13
13
  "ArrowDown",
@@ -23,72 +23,72 @@ function a(e) {
23
23
  }
24
24
  //#endregion
25
25
  //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/check.svg?raw
26
- var o = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z\"/></svg>";
26
+ var a = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z\"/></svg>";
27
27
  //#endregion
28
28
  //#region src/color-palette/color-palette.tsx
29
- function s({ value: e, options: i = t, ariaLabel: s, defaultLabel: l, colorAriaLabel: u, disabled: d = !1, includeDefault: f = !0, defaultDisabled: p = !1, onChange: m }) {
30
- let h = i.findIndex((t) => t.value === e && !t.disabled), g = i.findIndex((e) => !e.disabled), _ = f && !p, v = a;
31
- return /* @__PURE__ */ r("div", {
29
+ function o({ value: t, options: r = n, ariaLabel: o, defaultLabel: c, colorAriaLabel: l, disabled: u = !1, includeDefault: d = !0, defaultDisabled: f = !1, onChange: p }) {
30
+ let m = r.findIndex((e) => e.value === t && !e.disabled), h = r.findIndex((e) => !e.disabled), g = d && !f, _ = i;
31
+ return /* @__PURE__ */ e("div", {
32
32
  class: "rv-color-palette",
33
33
  role: "radiogroup",
34
- "aria-label": s,
35
- children: [/* @__PURE__ */ n("div", {
34
+ "aria-label": o,
35
+ children: [/* @__PURE__ */ e("div", {
36
36
  class: "rv-color-palette__swatches",
37
- children: i.map((t, r) => {
38
- let i = t.value === e, a = u(t);
39
- return /* @__PURE__ */ n(c, {
37
+ children: r.map((n, r) => {
38
+ let i = n.value === t, o = l(n);
39
+ return /* @__PURE__ */ e(s, {
40
40
  type: "button",
41
41
  role: "radio",
42
42
  class: "rv-color-palette__swatch",
43
- "data-rv-color-palette-value": t.value,
44
- label: a,
43
+ "data-rv-color-palette-value": n.value,
44
+ label: o,
45
45
  "aria-checked": i ? "true" : "false",
46
- disabled: d || t.disabled,
47
- tabIndex: !d && (r === h || h < 0 && (!_ || e !== null) && r === g) ? 0 : -1,
48
- style: { "--rv-color-palette-color": t.value },
49
- onKeyDown: v,
50
- onClick: () => m(t.value),
51
- children: i ? /* @__PURE__ */ n("span", {
46
+ disabled: u || n.disabled,
47
+ tabIndex: !u && (r === m || m < 0 && (!g || t !== null) && r === h) ? 0 : -1,
48
+ style: { "--rv-color-palette-color": n.value },
49
+ onKeyDown: _,
50
+ onClick: () => p(n.value),
51
+ children: i ? /* @__PURE__ */ e("span", {
52
52
  class: "rv-color-palette__check",
53
53
  "aria-hidden": "true",
54
- dangerouslySetInnerHTML: { __html: o }
54
+ dangerouslySetInnerHTML: { __html: a }
55
55
  }) : null
56
- }, t.value);
56
+ }, n.value);
57
57
  })
58
- }), f ? /* @__PURE__ */ r(c, {
58
+ }), d ? /* @__PURE__ */ e(s, {
59
59
  type: "button",
60
60
  role: "radio",
61
61
  class: "rv-color-palette__default",
62
62
  "data-rv-color-palette-default": "",
63
- "aria-checked": e === null ? "true" : "false",
64
- label: l,
65
- disabled: d || p,
66
- tabIndex: !d && !p && (e === null || g < 0) ? 0 : -1,
67
- onKeyDown: v,
68
- onClick: () => m(null),
69
- children: [e === null ? /* @__PURE__ */ n("span", {
63
+ "aria-checked": t === null ? "true" : "false",
64
+ label: c,
65
+ disabled: u || f,
66
+ tabIndex: !u && !f && (t === null || h < 0) ? 0 : -1,
67
+ onKeyDown: _,
68
+ onClick: () => p(null),
69
+ children: [t === null ? /* @__PURE__ */ e("span", {
70
70
  class: "rv-color-palette__default-check",
71
71
  "aria-hidden": "true",
72
- dangerouslySetInnerHTML: { __html: o }
73
- }) : null, /* @__PURE__ */ n("span", {
72
+ dangerouslySetInnerHTML: { __html: a }
73
+ }) : null, /* @__PURE__ */ e("span", {
74
74
  class: "rv-color-palette__default-label",
75
- children: l
75
+ children: c
76
76
  })]
77
77
  }) : null]
78
78
  });
79
79
  }
80
- function c({ label: t, children: n, onKeyDown: i, disabled: a, ...o }) {
81
- let s = e(t, !0);
82
- return /* @__PURE__ */ r("button", {
80
+ function s({ label: n, children: r, onKeyDown: i, disabled: a, ...o }) {
81
+ let s = t(n, !0);
82
+ return /* @__PURE__ */ e("button", {
83
83
  ...o,
84
84
  disabled: a,
85
- "aria-label": t,
85
+ "aria-label": n,
86
86
  ...a ? {} : s.triggerProps,
87
87
  onKeyDown: (e) => {
88
88
  s.triggerProps.onKeyDown(e), e.defaultPrevented || i(e);
89
89
  },
90
- children: [n, s.tooltip]
90
+ children: [r, s.tooltip]
91
91
  });
92
92
  }
93
93
  //#endregion
94
- export { i as n, s as t };
94
+ export { r as n, o as t };