@revolist/ui 4.0.4-rc → 4.0.6-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.
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +10 -10
- package/README.md +22 -4
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/badge.view-D30pMUfi.js +14 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-QWDyYzdo.js} +19 -19
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/check-BwI7iCAm.js +4 -0
- package/_chunks/choice-chips-A6WR-WJe.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-BK4W1nd6.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-CMkF17YZ.js} +281 -265
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
- package/_chunks/configurator-actions-By8WSL2m.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-mlH7l0Uq.js} +42 -17
- package/_chunks/{controls-DsNi8V8I.js → controls-FUU-MUKC.js} +171 -186
- package/_chunks/{date-control-DrVFX13g.js → date-control-Dup_P3w5.js} +1 -1
- package/_chunks/{date-time-qIhp5vaX.js → date-time-9z6pAG5T.js} +317 -278
- package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-D7oRjsmP.js} +5 -5
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-BCINdXpU.js +223 -0
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-Cw2zk58T.js +266 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-pFMuHf3G.js +644 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-DqXV6vgP.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-gEGTu1Ki.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-DbxdUJr-.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B0_13Sja.js} +1 -1
- package/_chunks/request-trail-CCSK6TJA.js +753 -0
- package/_chunks/rich-text-5rnc8lpI.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_variables.scss +33 -32
- package/ai/_chat.scss +28 -3
- package/ai/_style.scss +55 -2
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +13 -2
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +17 -1
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/assignee/assignee.scss +5 -1
- package/assignee/index.js +2 -2
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.view.d.ts +8 -0
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +2 -2
- package/calendar/calendar.js +1 -1
- package/calendar/index.js +2 -2
- package/checkbox/checkbox.scss +1 -22
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +9 -7
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +61 -0
- package/configurator-drop-zone.d.ts +38 -0
- package/configurator-drop-zone.js +64 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +1 -2
- package/controls.js +4 -3
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +64 -7
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +9 -9
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +12 -54
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/editor-dropdown.style.scss +5 -0
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/field-configurator.d.ts +27 -0
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_slider.scss +8 -25
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +5 -6
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.js +12 -12
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +2 -47
- package/framework.js +226 -222
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native.js +46 -43
- package/number-input/index.js +1 -1
- package/package.json +36 -1
- package/pagination.js +11 -11
- package/pdf-viewer/index.js +1 -1
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +8 -6
- package/preact.js +71 -64
- package/rating-choice.js +1 -1
- package/react-control.d.ts +2 -0
- package/react-control.js +2 -2
- package/react.d.ts +5 -6
- package/react.js +68 -66
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +4 -4
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +165 -70
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/translations.d.ts +2 -0
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/styles/_alert.scss +18 -4
- package/styles/_compositions.scss +3 -3
- package/styles/_editor-slider.scss +0 -2
- package/styles/_field-configurator.scss +147 -0
- package/styles/_fields-grid.scss +37 -0
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +28 -19
- package/styles/configurator-actions.scss +141 -0
- package/styles/{legacy-pagination.css → pagination.css} +19 -2
- package/styles.css +1 -1
- package/styles.scss +2 -2
- package/surfaces.d.ts +36 -2
- package/surfaces.js +35 -132
- package/svelte.js +3 -3
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/vue.d.ts +26 -30
- package/vue.js +117 -121
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/surfaces.view.d.ts +0 -63
- /package/styles/{legacy-rating.css → rating.css} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { c as e, i as t } from "./preact.module-BBM36DnO.js";
|
|
2
2
|
import { i as n, r, t as i } from "./hooks.module-CG3gN83z.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as _ } from "./chevron-
|
|
13
|
-
import {
|
|
3
|
+
import { t as a } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import { createPreactElement as o } from "../preact-mount.js";
|
|
5
|
+
import { createControlId as s } from "../core/control-id.js";
|
|
6
|
+
import { t as c } from "./title-tooltip-Cw6LOZhb.js";
|
|
7
|
+
import { n as l } from "./rating-choice-DbxdUJr-.js";
|
|
8
|
+
import { a as u, n as d, t as f } from "./native-control-pFMuHf3G.js";
|
|
9
|
+
import { r as p } from "./popup-C35Isk7p.js";
|
|
10
|
+
import { registerControl as m, renderControl as h } from "../control-presentation.js";
|
|
11
|
+
import { paginationItems as ee, renderPaginationButton as g } from "../pagination.js";
|
|
12
|
+
import { t as _ } from "./chevron-left-D0nc4Z5S.js";
|
|
13
|
+
import { t as v } from "./chevron-right-sxHQMSkq.js";
|
|
14
14
|
import { SvgButton as y } from "../buttons/svg-button.js";
|
|
15
15
|
import { SegmentedSwitch as b } from "../segmented-switch/index.js";
|
|
16
16
|
import { attachMenuKeyboard as x, attachResizeHandle as te } from "../surfaces.js";
|
|
@@ -19,12 +19,12 @@ import { normalizeProgressRange as S } from "../progress/range.js";
|
|
|
19
19
|
//#region src/icons/pagination.ts
|
|
20
20
|
var C = {
|
|
21
21
|
first: "<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=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L269.3 256 406.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z\"/></svg>",
|
|
22
|
-
previous:
|
|
23
|
-
next:
|
|
22
|
+
previous: _,
|
|
23
|
+
next: v,
|
|
24
24
|
last: "<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=\"M439.1 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L371.2 256 233.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L179.2 256 41.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z\"/></svg>"
|
|
25
25
|
};
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region src/native-controls.
|
|
27
|
+
//#region src/native-controls.tsx
|
|
28
28
|
function w(e, t) {
|
|
29
29
|
return e("div", {
|
|
30
30
|
class: t.className ?? "rv-spinner",
|
|
@@ -36,8 +36,8 @@ function w(e, t) {
|
|
|
36
36
|
"aria-hidden": "true"
|
|
37
37
|
})] : []);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function T(e, t) {
|
|
40
|
+
return o(e, /* @__PURE__ */ a(f, {
|
|
41
41
|
unstyled: !0,
|
|
42
42
|
type: "button",
|
|
43
43
|
class: t.className ?? "rv-btn",
|
|
@@ -47,7 +47,7 @@ function ne(e, t) {
|
|
|
47
47
|
children: t.text ?? t.label
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function E(e, t) {
|
|
51
51
|
return e("button", {
|
|
52
52
|
type: "button",
|
|
53
53
|
role: "menuitem",
|
|
@@ -63,44 +63,37 @@ function T(e, t) {
|
|
|
63
63
|
style: "float:inline-end;margin-inline-start:16px"
|
|
64
64
|
}, "›") : null]);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function D(e, t, n = Math.max(0, Math.floor(t))) {
|
|
67
67
|
let r = Math.round(t);
|
|
68
68
|
return Array.from({ length: Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0 }, (t, n) => e("span", { class: n < r ? "star filled-star" : "star empty-star" }));
|
|
69
69
|
}
|
|
70
|
-
function D(e, t) {
|
|
71
|
-
let n = (e) => t.max > t.min ? Math.max(0, Math.min(100, (e - t.min) / (t.max - t.min) * 100)) : 0;
|
|
72
|
-
return e("div", { class: `revo-slider ${t.thresholdClassNames ?? ""}` }, [e("div", { class: `revo-slider-container ${t.thresholdClassNames ?? ""}` }, [
|
|
73
|
-
e("div", {
|
|
74
|
-
class: "revo-slider-fill",
|
|
75
|
-
style: { width: `${n(t.value)}%` }
|
|
76
|
-
}),
|
|
77
|
-
e("input", {
|
|
78
|
-
class: "revo-slider-input rv-single-slider",
|
|
79
|
-
style: { "--rv-single-slider-value": `${n(t.value)}%` },
|
|
80
|
-
type: "range",
|
|
81
|
-
min: t.min,
|
|
82
|
-
max: t.max,
|
|
83
|
-
step: t.step,
|
|
84
|
-
value: t.value,
|
|
85
|
-
"aria-label": t.label,
|
|
86
|
-
"aria-valuetext": String(t.displayValue ?? t.value),
|
|
87
|
-
onInput: (e) => {
|
|
88
|
-
let r = e.target;
|
|
89
|
-
r.style.setProperty("--rv-single-slider-value", `${n(Number(r.value))}%`);
|
|
90
|
-
let i = r.closest(".revo-slider")?.querySelector(".revo-slider-value"), a = String(t.formatValue?.(Number(r.value)) ?? Number(r.value));
|
|
91
|
-
r.setAttribute("aria-valuetext", a), i && (i.textContent = a);
|
|
92
|
-
},
|
|
93
|
-
onChange: (e) => t.onChange(Number(e.target.value), e),
|
|
94
|
-
onMouseDown: t.onMouseDown
|
|
95
|
-
}),
|
|
96
|
-
...(t.thresholds ?? []).map((t) => e("div", {
|
|
97
|
-
class: `revo-slider-threshold ${t.className}`,
|
|
98
|
-
style: { left: `${n(t.value)}%` }
|
|
99
|
-
}))
|
|
100
|
-
]), ...t.hideValue ? [] : [e("span", { class: `revo-slider-value rv-badge rv-badge--inline ${t.thresholdClassNames ?? ""}` }, t.displayValue ?? t.value)]]);
|
|
101
|
-
}
|
|
102
70
|
function O(e, t) {
|
|
103
|
-
let n = (
|
|
71
|
+
let n = (e) => t.max > t.min ? Math.max(0, Math.min(100, (e - t.min) / (t.max - t.min) * 100)) : 0;
|
|
72
|
+
return e("div", { class: `revo-slider ${t.thresholdClassNames ?? ""}` }, [e("div", { class: `revo-slider-container ${t.thresholdClassNames ?? ""}` }, [e("input", {
|
|
73
|
+
class: "revo-slider-input rv-single-slider",
|
|
74
|
+
style: { "--rv-single-slider-value": `${n(t.value)}%` },
|
|
75
|
+
type: "range",
|
|
76
|
+
min: t.min,
|
|
77
|
+
max: t.max,
|
|
78
|
+
step: t.step,
|
|
79
|
+
value: t.value,
|
|
80
|
+
"aria-label": t.label,
|
|
81
|
+
"aria-valuetext": String(t.displayValue ?? t.value),
|
|
82
|
+
onInput: (e) => {
|
|
83
|
+
let r = e.target;
|
|
84
|
+
r.style.setProperty("--rv-single-slider-value", `${n(Number(r.value))}%`);
|
|
85
|
+
let i = r.closest(".revo-slider")?.querySelector(".revo-slider-value"), a = String(t.formatValue?.(Number(r.value)) ?? Number(r.value));
|
|
86
|
+
r.setAttribute("aria-valuetext", a), i && (i.textContent = a);
|
|
87
|
+
},
|
|
88
|
+
onChange: (e) => t.onChange(Number(e.target.value), e),
|
|
89
|
+
onMouseDown: t.onMouseDown
|
|
90
|
+
}), ...(t.thresholds ?? []).map((t) => e("div", {
|
|
91
|
+
class: `revo-slider-threshold ${t.className}`,
|
|
92
|
+
style: { left: `${n(t.value)}%` }
|
|
93
|
+
}))]), ...t.hideValue ? [] : [e("span", { class: `revo-slider-value rv-badge rv-badge--inline ${t.thresholdClassNames ?? ""}` }, t.displayValue ?? t.value)]]);
|
|
94
|
+
}
|
|
95
|
+
function k(e, t) {
|
|
96
|
+
let n = (n, r, i) => h(e, "button", {
|
|
104
97
|
class: {
|
|
105
98
|
"revo-counter-button": !0,
|
|
106
99
|
"revo-counter-button-disabled": r
|
|
@@ -121,7 +114,7 @@ function O(e, t) {
|
|
|
121
114
|
}
|
|
122
115
|
//#endregion
|
|
123
116
|
//#region src/alert.tsx
|
|
124
|
-
function
|
|
117
|
+
function A(e, { children: t, tone: n = "neutral", label: r, icon: i, title: a, description: o, actions: s, className: c = "", class: l = "", ...u }) {
|
|
125
118
|
let d = (t, n, ...r) => e(t, n, r);
|
|
126
119
|
return /* @__PURE__ */ d("div", {
|
|
127
120
|
...u,
|
|
@@ -133,60 +126,61 @@ function k(e, { children: t, tone: n = "neutral", label: r, icon: i, title: a, d
|
|
|
133
126
|
"aria-hidden": "true"
|
|
134
127
|
}, i), /* @__PURE__ */ d("div", { class: "rv-alert__content" }, a && /* @__PURE__ */ d("div", { class: "rv-alert__title" }, a), o && /* @__PURE__ */ d("div", { class: "rv-alert__description" }, o), t), s && /* @__PURE__ */ d("div", { class: "rv-alert__actions" }, s));
|
|
135
128
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
129
|
+
function ne(t) {
|
|
130
|
+
return A(e, t);
|
|
138
131
|
}
|
|
139
132
|
//#endregion
|
|
140
133
|
//#region src/controls.tsx
|
|
141
|
-
var j = p(
|
|
142
|
-
let
|
|
134
|
+
var j = m(p(function({ href: e, target: t, rel: n, rounded: r = !1, variant: i = "default", size: o = "default", className: s = "", class: l, ...u }, d) {
|
|
135
|
+
let p = c(e !== void 0 && typeof u.title == "string" ? u.title : void 0), m = [
|
|
143
136
|
i === "default" ? "rv-btn" : `rv-btn-${i}`,
|
|
144
|
-
|
|
137
|
+
o === "compact" ? "rv-btn-sm" : "",
|
|
145
138
|
r ? "rv-btn-rounded" : "",
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
l,
|
|
140
|
+
s
|
|
148
141
|
].filter(Boolean).join(" ");
|
|
149
142
|
if (e !== void 0) {
|
|
150
|
-
let r =
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
...
|
|
143
|
+
let r = u.disabled || u.busy, { busy: i, disabled: o, title: s, ...c } = u;
|
|
144
|
+
return /* @__PURE__ */ a("a", {
|
|
145
|
+
...c,
|
|
146
|
+
ref: p,
|
|
153
147
|
href: r ? void 0 : e,
|
|
154
148
|
target: t,
|
|
155
149
|
rel: n,
|
|
156
|
-
class:
|
|
150
|
+
class: m,
|
|
157
151
|
"aria-disabled": r || void 0,
|
|
158
152
|
"aria-busy": i || void 0,
|
|
159
|
-
tabIndex: r ? -1 :
|
|
153
|
+
tabIndex: r ? -1 : u.tabIndex,
|
|
160
154
|
onClick: (e) => {
|
|
161
|
-
r ? e.preventDefault() :
|
|
155
|
+
r ? e.preventDefault() : u.onClick?.(e);
|
|
162
156
|
}
|
|
163
157
|
});
|
|
164
158
|
}
|
|
165
|
-
return /* @__PURE__ */
|
|
159
|
+
return /* @__PURE__ */ a(f, {
|
|
166
160
|
ref: d,
|
|
167
161
|
rounded: r,
|
|
168
162
|
type: "button",
|
|
169
|
-
...
|
|
163
|
+
...u,
|
|
170
164
|
class: [
|
|
171
165
|
i === "default" ? "rv-btn" : `rv-btn-${i}`,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
166
|
+
o === "compact" ? "rv-btn-sm" : "",
|
|
167
|
+
l,
|
|
168
|
+
s
|
|
175
169
|
].filter(Boolean).join(" ")
|
|
176
170
|
});
|
|
177
171
|
}), "button");
|
|
178
|
-
function M({ label: e, icon: t, badge: n, children: r, className: i = "", variant:
|
|
179
|
-
return /* @__PURE__ */
|
|
172
|
+
function M({ label: e, icon: t, badge: n, children: r, className: i = "", variant: o = "ghost", size: s = "default", ...c }) {
|
|
173
|
+
return /* @__PURE__ */ a(y, {
|
|
180
174
|
...c,
|
|
181
175
|
label: e,
|
|
182
176
|
icon: t,
|
|
183
177
|
badge: n,
|
|
184
|
-
className: `rv-btn-icon ${
|
|
178
|
+
className: `rv-btn-icon ${o === "default" ? "rv-btn" : `rv-btn-${o}`} ${s === "compact" ? "rv-btn-sm" : ""} ${i}`,
|
|
185
179
|
children: r
|
|
186
180
|
});
|
|
187
181
|
}
|
|
188
182
|
function N({ pressed: e, onPressedChange: t, ...n }) {
|
|
189
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ a(j, {
|
|
190
184
|
...n,
|
|
191
185
|
"aria-pressed": e,
|
|
192
186
|
onClick: (r) => {
|
|
@@ -195,7 +189,7 @@ function N({ pressed: e, onPressedChange: t, ...n }) {
|
|
|
195
189
|
});
|
|
196
190
|
}
|
|
197
191
|
function P({ children: e, className: t = "", label: n }) {
|
|
198
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ a("div", {
|
|
199
193
|
role: "group",
|
|
200
194
|
"aria-label": n,
|
|
201
195
|
class: `rv-btn-group ${t}`,
|
|
@@ -203,19 +197,19 @@ function P({ children: e, className: t = "", label: n }) {
|
|
|
203
197
|
});
|
|
204
198
|
}
|
|
205
199
|
function F(e) {
|
|
206
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ a(b, {
|
|
207
201
|
...e,
|
|
208
202
|
role: "radiogroup"
|
|
209
203
|
});
|
|
210
204
|
}
|
|
211
205
|
function I(e) {
|
|
212
|
-
return /* @__PURE__ */
|
|
206
|
+
return /* @__PURE__ */ a(b, {
|
|
213
207
|
...e,
|
|
214
208
|
role: "tablist"
|
|
215
209
|
});
|
|
216
210
|
}
|
|
217
211
|
function L({ id: e, labelledBy: t, active: n, children: r }) {
|
|
218
|
-
return /* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ a("div", {
|
|
219
213
|
id: e,
|
|
220
214
|
role: "tabpanel",
|
|
221
215
|
"aria-labelledby": t,
|
|
@@ -223,14 +217,14 @@ function L({ id: e, labelledBy: t, active: n, children: r }) {
|
|
|
223
217
|
children: r
|
|
224
218
|
});
|
|
225
219
|
}
|
|
226
|
-
function R({ className: e = "", value: t, options: r, onChange: i, label:
|
|
227
|
-
let [u] = n(() =>
|
|
228
|
-
return /* @__PURE__ */
|
|
220
|
+
function R({ className: e = "", value: t, options: r, onChange: i, label: o, disabled: c, name: l }) {
|
|
221
|
+
let [u] = n(() => s("rv-ui"));
|
|
222
|
+
return /* @__PURE__ */ a("fieldset", {
|
|
229
223
|
class: `rv-radio-group ${e}`,
|
|
230
|
-
disabled:
|
|
231
|
-
children: [/* @__PURE__ */
|
|
224
|
+
disabled: c,
|
|
225
|
+
children: [/* @__PURE__ */ a("legend", { children: o }), r.map((e) => /* @__PURE__ */ a("label", { children: [/* @__PURE__ */ a(d, {
|
|
232
226
|
type: "radio",
|
|
233
|
-
name:
|
|
227
|
+
name: l ?? u,
|
|
234
228
|
checked: t === e.value,
|
|
235
229
|
disabled: e.disabled,
|
|
236
230
|
onChange: () => i(e.value)
|
|
@@ -238,7 +232,7 @@ function R({ className: e = "", value: t, options: r, onChange: i, label: a, dis
|
|
|
238
232
|
});
|
|
239
233
|
}
|
|
240
234
|
function z({ className: e = "", class: t, onValueChange: n, onInput: r, ...i }) {
|
|
241
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ a(d, {
|
|
242
236
|
type: "text",
|
|
243
237
|
...i,
|
|
244
238
|
class: `rv-control ${t ?? ""} ${e}`,
|
|
@@ -248,7 +242,7 @@ function z({ className: e = "", class: t, onValueChange: n, onInput: r, ...i })
|
|
|
248
242
|
});
|
|
249
243
|
}
|
|
250
244
|
function B({ className: e = "", class: t, onValueChange: n, onInput: r, ...i }) {
|
|
251
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ a(u, {
|
|
252
246
|
...i,
|
|
253
247
|
class: `rv-control ${t ?? ""} ${e}`,
|
|
254
248
|
onInput: (e) => {
|
|
@@ -257,7 +251,7 @@ function B({ className: e = "", class: t, onValueChange: n, onInput: r, ...i })
|
|
|
257
251
|
});
|
|
258
252
|
}
|
|
259
253
|
function V({ onValueChange: e, ...t }) {
|
|
260
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ a(z, {
|
|
261
255
|
...t,
|
|
262
256
|
type: "number",
|
|
263
257
|
onValueChange: (t) => {
|
|
@@ -265,23 +259,23 @@ function V({ onValueChange: e, ...t }) {
|
|
|
265
259
|
}
|
|
266
260
|
});
|
|
267
261
|
}
|
|
268
|
-
function H({ value: e, min: t = -Infinity, max: n = Infinity, step: r = 1, onChange: i, label:
|
|
262
|
+
function H({ value: e, min: t = -Infinity, max: n = Infinity, step: r = 1, onChange: i, label: o, decreaseLabel: s, increaseLabel: c, disabled: l, readOnly: u }) {
|
|
269
263
|
let d = (e) => {
|
|
270
264
|
Number.isFinite(e) && i(Math.max(t, Math.min(n, e)));
|
|
271
265
|
};
|
|
272
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ a("div", {
|
|
273
267
|
class: "rv-number-stepper",
|
|
274
268
|
role: "group",
|
|
275
|
-
"aria-label":
|
|
269
|
+
"aria-label": o,
|
|
276
270
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ a(j, {
|
|
278
272
|
disabled: l || u || e <= t,
|
|
279
|
-
"aria-label":
|
|
273
|
+
"aria-label": s,
|
|
280
274
|
onClick: () => d(e - r),
|
|
281
275
|
children: "−"
|
|
282
276
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
"aria-label":
|
|
277
|
+
/* @__PURE__ */ a(V, {
|
|
278
|
+
"aria-label": o,
|
|
285
279
|
value: e,
|
|
286
280
|
min: Number.isFinite(t) ? t : void 0,
|
|
287
281
|
max: Number.isFinite(n) ? n : void 0,
|
|
@@ -292,7 +286,7 @@ function H({ value: e, min: t = -Infinity, max: n = Infinity, step: r = 1, onCha
|
|
|
292
286
|
e !== void 0 && d(e);
|
|
293
287
|
}
|
|
294
288
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ a(j, {
|
|
296
290
|
disabled: l || u || e >= n,
|
|
297
291
|
"aria-label": c,
|
|
298
292
|
onClick: () => d(e + r),
|
|
@@ -302,38 +296,38 @@ function H({ value: e, min: t = -Infinity, max: n = Infinity, step: r = 1, onCha
|
|
|
302
296
|
});
|
|
303
297
|
}
|
|
304
298
|
function U(e) {
|
|
305
|
-
return /* @__PURE__ */
|
|
299
|
+
return /* @__PURE__ */ a(z, {
|
|
306
300
|
...e,
|
|
307
301
|
type: "date"
|
|
308
302
|
});
|
|
309
303
|
}
|
|
310
304
|
function W(e) {
|
|
311
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ a(z, {
|
|
312
306
|
...e,
|
|
313
307
|
type: "time"
|
|
314
308
|
});
|
|
315
309
|
}
|
|
316
310
|
function G(e) {
|
|
317
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ a(z, {
|
|
318
312
|
...e,
|
|
319
313
|
type: "datetime-local"
|
|
320
314
|
});
|
|
321
315
|
}
|
|
322
316
|
function K({ children: e, className: t = "" }) {
|
|
323
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ a("span", {
|
|
324
318
|
class: `rv-btn-pill ${t}`,
|
|
325
319
|
children: e
|
|
326
320
|
});
|
|
327
321
|
}
|
|
328
322
|
function q({ children: e, id: t }) {
|
|
329
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ a("span", {
|
|
330
324
|
class: "rv-field__hint",
|
|
331
325
|
id: t,
|
|
332
326
|
children: e
|
|
333
327
|
});
|
|
334
328
|
}
|
|
335
329
|
function re({ children: e, id: t }) {
|
|
336
|
-
return /* @__PURE__ */
|
|
330
|
+
return /* @__PURE__ */ a("span", {
|
|
337
331
|
class: "rv-field__error",
|
|
338
332
|
id: t,
|
|
339
333
|
role: "alert",
|
|
@@ -341,14 +335,14 @@ function re({ children: e, id: t }) {
|
|
|
341
335
|
});
|
|
342
336
|
}
|
|
343
337
|
function J({ children: e, title: t, description: n }) {
|
|
344
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ a("fieldset", {
|
|
345
339
|
class: "rv-form-section",
|
|
346
340
|
children: [
|
|
347
|
-
t && /* @__PURE__ */
|
|
341
|
+
t && /* @__PURE__ */ a("legend", {
|
|
348
342
|
class: "rv-form-section__title",
|
|
349
343
|
children: t
|
|
350
344
|
}),
|
|
351
|
-
n && /* @__PURE__ */
|
|
345
|
+
n && /* @__PURE__ */ a("p", {
|
|
352
346
|
class: "rv-form-description",
|
|
353
347
|
children: n
|
|
354
348
|
}),
|
|
@@ -357,25 +351,25 @@ function J({ children: e, title: t, description: n }) {
|
|
|
357
351
|
});
|
|
358
352
|
}
|
|
359
353
|
function Y({ children: e, className: t = "", summary: n, open: r, onToggle: i }) {
|
|
360
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ a("details", {
|
|
361
355
|
class: `rv-disclosure ${t}`.trim(),
|
|
362
356
|
open: r,
|
|
363
357
|
onToggle: i,
|
|
364
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ a("summary", {
|
|
365
359
|
class: "rv-disclosure-summary",
|
|
366
360
|
children: n
|
|
367
361
|
}), e]
|
|
368
362
|
});
|
|
369
363
|
}
|
|
370
364
|
function X({ children: e, className: t = "", label: n }) {
|
|
371
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ a("section", {
|
|
372
366
|
class: `rv-panel ${t}`,
|
|
373
367
|
"aria-label": n,
|
|
374
368
|
children: e
|
|
375
369
|
});
|
|
376
370
|
}
|
|
377
371
|
function ie({ children: e, className: t = "", label: n }) {
|
|
378
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ a("div", {
|
|
379
373
|
class: `rv-toolbar ${t}`,
|
|
380
374
|
role: "toolbar",
|
|
381
375
|
"aria-label": n,
|
|
@@ -383,7 +377,7 @@ function ie({ children: e, className: t = "", label: n }) {
|
|
|
383
377
|
});
|
|
384
378
|
}
|
|
385
379
|
function ae({ children: e, className: t = "", label: n }) {
|
|
386
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ a("div", {
|
|
387
381
|
class: `rv-toolbar-group ${t}`,
|
|
388
382
|
role: "group",
|
|
389
383
|
"aria-label": n,
|
|
@@ -391,23 +385,14 @@ function ae({ children: e, className: t = "", label: n }) {
|
|
|
391
385
|
});
|
|
392
386
|
}
|
|
393
387
|
function oe() {
|
|
394
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ a("span", {
|
|
395
389
|
class: "rv-toolbar-separator",
|
|
396
390
|
role: "separator",
|
|
397
391
|
"aria-orientation": "vertical"
|
|
398
392
|
});
|
|
399
393
|
}
|
|
400
|
-
function se({
|
|
401
|
-
return /* @__PURE__ */
|
|
402
|
-
class: `${a({
|
|
403
|
-
variant: n,
|
|
404
|
-
shape: r
|
|
405
|
-
})} ${t}`,
|
|
406
|
-
children: e
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
function ce({ count: e, label: t }) {
|
|
410
|
-
return /* @__PURE__ */ s("span", {
|
|
394
|
+
function se({ count: e, label: t }) {
|
|
395
|
+
return /* @__PURE__ */ a("span", {
|
|
411
396
|
class: "rv-count",
|
|
412
397
|
"aria-label": t,
|
|
413
398
|
children: e
|
|
@@ -419,89 +404,89 @@ function Z({ label: t }) {
|
|
|
419
404
|
showSpinner: !0
|
|
420
405
|
});
|
|
421
406
|
}
|
|
422
|
-
function
|
|
423
|
-
return /* @__PURE__ */
|
|
407
|
+
function Q({ busy: e, label: t, children: n }) {
|
|
408
|
+
return /* @__PURE__ */ a("div", {
|
|
424
409
|
class: "rv-loading-container",
|
|
425
410
|
"aria-busy": e,
|
|
426
|
-
children: [n, e && /* @__PURE__ */
|
|
411
|
+
children: [n, e && /* @__PURE__ */ a("div", {
|
|
427
412
|
class: "rv-loading-overlay",
|
|
428
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ a(Z, { label: t })
|
|
429
414
|
})]
|
|
430
415
|
});
|
|
431
416
|
}
|
|
432
|
-
function
|
|
433
|
-
return /* @__PURE__ */
|
|
417
|
+
function ce({ title: e, description: t, children: n }) {
|
|
418
|
+
return /* @__PURE__ */ a("div", {
|
|
434
419
|
class: "rv-empty-state",
|
|
435
420
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
t && /* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ a("strong", { children: e }),
|
|
422
|
+
t && /* @__PURE__ */ a("p", { children: t }),
|
|
438
423
|
n
|
|
439
424
|
]
|
|
440
425
|
});
|
|
441
426
|
}
|
|
442
|
-
function
|
|
443
|
-
let
|
|
444
|
-
return r(() =>
|
|
445
|
-
ref:
|
|
427
|
+
function $({ children: e, label: t, onClose: n }) {
|
|
428
|
+
let o = i(null);
|
|
429
|
+
return r(() => o.current ? x(o.current, n) : void 0, [n]), /* @__PURE__ */ a("div", {
|
|
430
|
+
ref: o,
|
|
446
431
|
class: "rv-menu",
|
|
447
432
|
role: "menu",
|
|
448
433
|
"aria-label": t,
|
|
449
434
|
children: e
|
|
450
435
|
});
|
|
451
436
|
}
|
|
452
|
-
function
|
|
453
|
-
return /* @__PURE__ */
|
|
437
|
+
function le({ children: e, ...t }) {
|
|
438
|
+
return /* @__PURE__ */ a(j, {
|
|
454
439
|
variant: "ghost",
|
|
455
440
|
...t,
|
|
456
441
|
role: "menuitem",
|
|
457
442
|
children: e
|
|
458
443
|
});
|
|
459
444
|
}
|
|
460
|
-
function
|
|
461
|
-
return /* @__PURE__ */
|
|
445
|
+
function ue() {
|
|
446
|
+
return /* @__PURE__ */ a("div", {
|
|
462
447
|
role: "separator",
|
|
463
448
|
class: "rv-menu-separator"
|
|
464
449
|
});
|
|
465
450
|
}
|
|
466
|
-
function
|
|
467
|
-
let [
|
|
451
|
+
function de({ label: e, children: t }) {
|
|
452
|
+
let [o, c] = n(!1), l = i(null), u = i(null), [d] = n(() => s("rv-ui"));
|
|
468
453
|
r(() => {
|
|
469
|
-
|
|
470
|
-
}, [
|
|
471
|
-
let
|
|
472
|
-
|
|
454
|
+
o && l.current?.querySelector("[role=\"menu\"]")?.querySelector("[role=\"menuitem\"]:not(:disabled)")?.focus();
|
|
455
|
+
}, [o]);
|
|
456
|
+
let f = () => {
|
|
457
|
+
c(!1), u.current?.focus();
|
|
473
458
|
};
|
|
474
|
-
return /* @__PURE__ */
|
|
475
|
-
ref:
|
|
459
|
+
return /* @__PURE__ */ a("div", {
|
|
460
|
+
ref: l,
|
|
476
461
|
class: "rv-submenu",
|
|
477
462
|
onKeyDown: (e) => {
|
|
478
|
-
|
|
463
|
+
o && (e.key === "ArrowLeft" || e.key === "Escape") && (e.preventDefault(), e.stopPropagation(), f());
|
|
479
464
|
},
|
|
480
|
-
children: [/* @__PURE__ */
|
|
481
|
-
ref:
|
|
465
|
+
children: [/* @__PURE__ */ a(j, {
|
|
466
|
+
ref: u,
|
|
482
467
|
variant: "ghost",
|
|
483
468
|
role: "menuitem",
|
|
484
469
|
"aria-haspopup": "menu",
|
|
485
|
-
"aria-expanded":
|
|
486
|
-
"aria-controls":
|
|
487
|
-
onClick: () =>
|
|
470
|
+
"aria-expanded": o,
|
|
471
|
+
"aria-controls": d,
|
|
472
|
+
onClick: () => c(!o),
|
|
488
473
|
onKeyDown: (e) => {
|
|
489
|
-
e.key === "ArrowRight" && (e.preventDefault(),
|
|
474
|
+
e.key === "ArrowRight" && (e.preventDefault(), c(!0));
|
|
490
475
|
},
|
|
491
476
|
children: e
|
|
492
|
-
}),
|
|
493
|
-
id:
|
|
494
|
-
children: /* @__PURE__ */
|
|
477
|
+
}), o && /* @__PURE__ */ a("div", {
|
|
478
|
+
id: d,
|
|
479
|
+
children: /* @__PURE__ */ a($, {
|
|
495
480
|
label: e,
|
|
496
|
-
onClose:
|
|
481
|
+
onClose: f,
|
|
497
482
|
children: t
|
|
498
483
|
})
|
|
499
484
|
})]
|
|
500
485
|
});
|
|
501
486
|
}
|
|
502
|
-
function
|
|
487
|
+
function fe(e) {
|
|
503
488
|
let t = i(null), n = i(e);
|
|
504
|
-
return n.current = e, r(() => t.current ? te(t.current, () => n.current) : void 0, []), /* @__PURE__ */
|
|
489
|
+
return n.current = e, r(() => t.current ? te(t.current, () => n.current) : void 0, []), /* @__PURE__ */ a("div", {
|
|
505
490
|
class: "rv-resize-handle",
|
|
506
491
|
ref: t,
|
|
507
492
|
role: "separator",
|
|
@@ -513,37 +498,37 @@ function pe(e) {
|
|
|
513
498
|
"aria-valuemax": e.max
|
|
514
499
|
});
|
|
515
500
|
}
|
|
516
|
-
function
|
|
501
|
+
function pe({ page: n, pageCount: r, onChange: i, label: o, previousLabel: s, nextLabel: c, firstLabel: l = "First page", lastLabel: u = "Last page", variant: d = "compact", disabled: f = !1, navigation: p = !0, boundaryButtons: m = !1, buttons: h, children: _, className: v = "" }) {
|
|
517
502
|
let y = Number.isFinite(r) ? Math.max(0, Math.floor(r)) : 0, b = Math.min(Math.max(0, Math.floor(n) || 0), Math.max(0, y - 1)), x = (e, t) => {
|
|
518
|
-
let n =
|
|
503
|
+
let n = h?.[e];
|
|
519
504
|
if (n === !1) return null;
|
|
520
|
-
let r = e === "first" ? 0 : e === "last" ? y - 1 : b + (e === "previous" ? -1 : 1),
|
|
521
|
-
return /* @__PURE__ */
|
|
505
|
+
let r = e === "first" ? 0 : e === "last" ? y - 1 : b + (e === "previous" ? -1 : 1), o = f || !!n?.disabled || !y || r < 0 || r >= y || r === b;
|
|
506
|
+
return /* @__PURE__ */ a(M, {
|
|
522
507
|
...n,
|
|
523
508
|
label: t,
|
|
524
509
|
icon: C[e],
|
|
525
510
|
size: "compact",
|
|
526
511
|
className: `rv-pagination-button rv-pagination-button--icon ${n?.className ?? ""}`,
|
|
527
|
-
disabled:
|
|
512
|
+
disabled: o,
|
|
528
513
|
onClick: () => {
|
|
529
|
-
|
|
514
|
+
o || i(r);
|
|
530
515
|
}
|
|
531
516
|
});
|
|
532
517
|
};
|
|
533
|
-
return /* @__PURE__ */
|
|
518
|
+
return /* @__PURE__ */ a("nav", {
|
|
534
519
|
class: `rv-pagination ${d === "numbered" ? "rv-pagination--numbered" : ""} ${v}`,
|
|
535
|
-
"aria-label":
|
|
520
|
+
"aria-label": o,
|
|
536
521
|
children: [
|
|
537
522
|
p && m && x("first", l),
|
|
538
|
-
p && x("previous",
|
|
523
|
+
p && x("previous", s),
|
|
539
524
|
_,
|
|
540
|
-
d === "numbered" ? /* @__PURE__ */
|
|
525
|
+
d === "numbered" ? /* @__PURE__ */ a(t, { children: [/* @__PURE__ */ a("span", {
|
|
541
526
|
class: `rv-pagination-pages ${y <= 5 ? "rv-pagination-pages--compact" : ""}`,
|
|
542
|
-
children: ee(b, y, 3).map((t, n) => t === "ellipsis" ? /* @__PURE__ */
|
|
527
|
+
children: ee(b, y, 3).map((t, n) => t === "ellipsis" ? /* @__PURE__ */ a("span", {
|
|
543
528
|
class: "rv-pagination-ellipsis",
|
|
544
529
|
"aria-label": "More pages",
|
|
545
530
|
children: "…"
|
|
546
|
-
}, `gap-${n}`) :
|
|
531
|
+
}, `gap-${n}`) : g(e, {
|
|
547
532
|
text: String(t + 1),
|
|
548
533
|
label: `${t + 1}`,
|
|
549
534
|
active: t === b,
|
|
@@ -552,7 +537,7 @@ function me({ page: n, pageCount: r, onChange: i, label: a, previousLabel: o, ne
|
|
|
552
537
|
!f && t !== b && i(t);
|
|
553
538
|
}
|
|
554
539
|
}))
|
|
555
|
-
}), y > 5 && /* @__PURE__ */
|
|
540
|
+
}), y > 5 && /* @__PURE__ */ a("span", {
|
|
556
541
|
class: "rv-pagination-summary rv-pagination-summary--responsive",
|
|
557
542
|
"aria-live": "polite",
|
|
558
543
|
children: [
|
|
@@ -560,7 +545,7 @@ function me({ page: n, pageCount: r, onChange: i, label: a, previousLabel: o, ne
|
|
|
560
545
|
" / ",
|
|
561
546
|
y
|
|
562
547
|
]
|
|
563
|
-
})] }) : d === "compact" ? /* @__PURE__ */
|
|
548
|
+
})] }) : d === "compact" ? /* @__PURE__ */ a("span", {
|
|
564
549
|
class: "rv-pagination-summary",
|
|
565
550
|
"aria-live": "polite",
|
|
566
551
|
children: [
|
|
@@ -574,9 +559,9 @@ function me({ page: n, pageCount: r, onChange: i, label: a, previousLabel: o, ne
|
|
|
574
559
|
]
|
|
575
560
|
});
|
|
576
561
|
}
|
|
577
|
-
function
|
|
562
|
+
function me({ value: e, min: t = 0, max: n = 100, label: r }) {
|
|
578
563
|
let i = S(e, t, n);
|
|
579
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ a("svg", {
|
|
580
565
|
viewBox: "0 0 36 36",
|
|
581
566
|
class: "rv-circular-progress",
|
|
582
567
|
role: "progressbar",
|
|
@@ -584,14 +569,14 @@ function he({ value: e, min: t = 0, max: n = 100, label: r }) {
|
|
|
584
569
|
"aria-valuemin": i.min,
|
|
585
570
|
"aria-valuemax": i.max,
|
|
586
571
|
"aria-valuenow": i.min + (i.max - i.min) * i.percent / 100,
|
|
587
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ a("circle", {
|
|
588
573
|
cx: "18",
|
|
589
574
|
cy: "18",
|
|
590
575
|
r: "16",
|
|
591
576
|
fill: "none",
|
|
592
577
|
stroke: "currentColor",
|
|
593
578
|
opacity: "0.15"
|
|
594
|
-
}), /* @__PURE__ */
|
|
579
|
+
}), /* @__PURE__ */ a("circle", {
|
|
595
580
|
cx: "18",
|
|
596
581
|
cy: "18",
|
|
597
582
|
r: "16",
|
|
@@ -603,28 +588,28 @@ function he({ value: e, min: t = 0, max: n = 100, label: r }) {
|
|
|
603
588
|
})]
|
|
604
589
|
});
|
|
605
590
|
}
|
|
606
|
-
function
|
|
607
|
-
let
|
|
608
|
-
return i ? /* @__PURE__ */
|
|
591
|
+
function he({ value: e, max: n = 5, label: r, onChange: i, disabled: o }) {
|
|
592
|
+
let s = Array.from({ length: Math.max(0, Math.min(100, Math.floor(n))) }, (e, t) => t + 1);
|
|
593
|
+
return i ? /* @__PURE__ */ a(R, {
|
|
609
594
|
className: "rv-rating",
|
|
610
595
|
label: r,
|
|
611
596
|
value: e,
|
|
612
|
-
disabled:
|
|
613
|
-
options:
|
|
597
|
+
disabled: o,
|
|
598
|
+
options: s.map((n) => ({
|
|
614
599
|
value: n,
|
|
615
|
-
label: /* @__PURE__ */
|
|
600
|
+
label: /* @__PURE__ */ a(t, { children: [/* @__PURE__ */ a(l, { filled: n <= e }), /* @__PURE__ */ a("span", {
|
|
616
601
|
class: "rv-visually-hidden",
|
|
617
602
|
children: n
|
|
618
603
|
})] })
|
|
619
604
|
})),
|
|
620
605
|
onChange: i
|
|
621
|
-
}) : /* @__PURE__ */
|
|
606
|
+
}) : /* @__PURE__ */ a("span", {
|
|
622
607
|
class: "rv-rating",
|
|
623
608
|
role: "img",
|
|
624
609
|
"aria-label": `${r}: ${e} / ${n}`,
|
|
625
|
-
children:
|
|
610
|
+
children: s.map((t) => /* @__PURE__ */ a(l, { filled: t <= e }))
|
|
626
611
|
});
|
|
627
612
|
}
|
|
628
|
-
|
|
613
|
+
m(z, "input"), m(V, "input"), m(U, "input"), m(W, "input"), m(G, "input"), m(B, "textarea");
|
|
629
614
|
//#endregion
|
|
630
|
-
export {
|
|
615
|
+
export { z as A, k as B, he as C, de as D, Z as E, ae as F, E as H, oe as I, ne as L, W as M, N, L as O, ie as P, A as R, R as S, F as T, D as U, w as V, O as W, ue as _, se as a, pe as b, Y as c, q as d, J as f, le as g, $ as h, me as i, B as j, I as k, ce as l, Q as m, P as n, U as o, M as p, K as r, G as s, j as t, re as u, V as v, fe as w, X as x, H as y, T as z };
|