rudiment-ui 0.3.0 → 0.4.0
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/LICENSE +1 -1
- package/README.md +142 -99
- package/dist/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/Brand/Brand.d.ts +16 -0
- package/dist/components/Brand/Brand.d.ts.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Charts/BarChart/BarChart.d.ts.map +1 -1
- package/dist/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/components/Charts/LineChart/LineChart.d.ts +12 -1
- package/dist/components/Charts/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +7 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxGroupContext.d.ts +4 -0
- package/dist/components/Checkbox/CheckboxGroupContext.d.ts.map +1 -0
- package/dist/components/ComboBox/ComboBox.d.ts +41 -0
- package/dist/components/ComboBox/ComboBox.d.ts.map +1 -0
- package/dist/components/DatePicker/CalendarParts.d.ts +21 -0
- package/dist/components/DatePicker/CalendarParts.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +34 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DateRangePicker.d.ts +33 -0
- package/dist/components/DatePicker/DateRangePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts +14 -0
- package/dist/components/DatePicker/dateUtils.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +11 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +18 -0
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/Form/Form.d.ts +17 -0
- package/dist/components/Form/Form.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanBoard.d.ts +3 -1
- package/dist/components/Kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanCard.d.ts +6 -1
- package/dist/components/Kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/NavItem/NavItem.d.ts.map +1 -1
- package/dist/components/NumberField/NumberField.d.ts +37 -0
- package/dist/components/NumberField/NumberField.d.ts.map +1 -0
- package/dist/components/RadioGroup/Radio.d.ts +15 -0
- package/dist/components/RadioGroup/Radio.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RouterProvider/RouterProvider.d.ts +15 -0
- package/dist/components/RouterProvider/RouterProvider.d.ts.map +1 -0
- package/dist/components/Switch/Switch.d.ts +5 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Table/Table.d.ts +30 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/TableBody.d.ts +10 -0
- package/dist/components/Table/TableBody.d.ts.map +1 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -0
- package/dist/components/Table/TableColumn.d.ts +15 -0
- package/dist/components/Table/TableColumn.d.ts.map +1 -0
- package/dist/components/Table/TableHeader.d.ts +10 -0
- package/dist/components/Table/TableHeader.d.ts.map +1 -0
- package/dist/components/Table/TableRow.d.ts +10 -0
- package/dist/components/Table/TableRow.d.ts.map +1 -0
- package/dist/components/Table/TableSelectionCheckbox.d.ts +3 -0
- package/dist/components/Table/TableSelectionCheckbox.d.ts.map +1 -0
- package/dist/components/Tabs/Tab.d.ts +15 -0
- package/dist/components/Tabs/Tab.d.ts.map +1 -0
- package/dist/components/Tabs/TabList.d.ts +10 -0
- package/dist/components/Tabs/TabList.d.ts.map +1 -0
- package/dist/components/Tabs/TabPanel.d.ts +8 -0
- package/dist/components/Tabs/TabPanel.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +15 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Toast/Toast.d.ts +15 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/toastQueue.d.ts +40 -0
- package/dist/components/Toast/toastQueue.d.ts.map +1 -0
- package/dist/hooks/useChartTheme.d.ts +2 -0
- package/dist/hooks/useChartTheme.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +52 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2109 -993
- package/dist/layouts/Box/Box.d.ts +2 -0
- package/dist/layouts/Box/Box.d.ts.map +1 -1
- package/dist/layouts/Cover/Cover.d.ts +7 -1
- package/dist/layouts/Cover/Cover.d.ts.map +1 -1
- package/package.json +9 -4
- package/styles.d.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { twMerge as
|
|
4
|
-
import { useButton as
|
|
5
|
-
import
|
|
6
|
-
import { jsx as i, jsxs as p, Fragment as
|
|
7
|
-
import { useObjectRef as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { useToggleState as
|
|
10
|
-
import { Item as
|
|
11
|
-
import { MenuTrigger as
|
|
12
|
-
import { Separator as
|
|
13
|
-
import { ResponsiveContainer as
|
|
14
|
-
import { useDroppable as
|
|
15
|
-
import { SortableContext as
|
|
16
|
-
import { CSS as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
import { clsx as ir } from "clsx";
|
|
3
|
+
import { twMerge as tr } from "tailwind-merge";
|
|
4
|
+
import { useButton as G, useTextField as xe, useCheckboxGroupItem as nr, useCheckbox as ar, useCheckboxGroup as or, useSelect as sr, HiddenSelect as dr, usePopover as Ce, useListBox as Se, useOption as Pe, usePreventScroll as lr, useModalOverlay as cr, useDialog as ur, OverlayContainer as mr, FocusScope as pr, useSwitch as hr, VisuallyHidden as te, useRadioGroup as fr, useRadio as _r, useTooltip as br, useTooltipTrigger as gr, useProgressBar as Te, useLink as W, mergeProps as Nr, RouterProvider as vr, useFilter as Rr, useComboBox as yr, DismissButton as kr } from "react-aria";
|
|
5
|
+
import D, { useState as O, useCallback as A, useEffect as ne, forwardRef as v, createContext as ae, useContext as K, useId as we, useRef as P, Children as $e, isValidElement as X, useMemo as I, cloneElement as xr, useLayoutEffect as Cr } from "react";
|
|
6
|
+
import { jsx as i, jsxs as p, Fragment as w } from "react/jsx-runtime";
|
|
7
|
+
import { useObjectRef as B } from "@react-aria/utils";
|
|
8
|
+
import { Icon as Sr } from "@iconify/react";
|
|
9
|
+
import { useToggleState as Be, useCheckboxGroupState as Pr, useSelectState as Tr, useRadioGroupState as wr, useTooltipTriggerState as $r, useComboBoxState as Br } from "react-stately";
|
|
10
|
+
import { Item as ua } from "react-stately";
|
|
11
|
+
import { MenuTrigger as Ir, Popover as oe, Menu as Mr, Keyboard as Dr, MenuItem as Er, Text as z, MenuSection as Lr, Header as Or, Collection as se, Separator as zr, SubmenuTrigger as Ar, Tabs as Fr, TabList as Gr, Tab as Kr, TabPanel as Vr, UNSTABLE_ToastQueue as Hr, UNSTABLE_ToastRegion as Ur, UNSTABLE_ToastStateContext as jr, UNSTABLE_Toast as qr, UNSTABLE_ToastContent as Wr, Table as Xr, Checkbox as Zr, useTableOptions as Ie, TableHeader as Qr, Column as Me, TableBody as Yr, Row as Jr, Cell as De, TableStateContext as ei, Label as Z, Button as F, FieldError as Ee, Heading as ri, CalendarGrid as ii, CalendarGridHeader as ti, CalendarHeaderCell as ni, CalendarGridBody as ai, CalendarCell as oi, DatePicker as si, Group as de, DateInput as Q, DateSegment as Y, Dialog as Le, Calendar as di, DateRangePicker as li, RangeCalendar as ci, NumberField as ui, Input as mi } from "react-aria-components";
|
|
12
|
+
import { Separator as pa } from "react-aria-components";
|
|
13
|
+
import { ResponsiveContainer as le, BarChart as pi, CartesianGrid as Oe, XAxis as J, YAxis as ee, Tooltip as ce, Legend as ue, Bar as hi, LineChart as fi, ReferenceLine as _i, Line as bi, PieChart as gi, Pie as Ni, Cell as vi } from "recharts";
|
|
14
|
+
import { useDroppable as Ri, useSensors as yi, useSensor as be, PointerSensor as ki, KeyboardSensor as xi, DndContext as Ci, closestCorners as Si, DragOverlay as Pi } from "@dnd-kit/core";
|
|
15
|
+
import { SortableContext as Ti, verticalListSortingStrategy as wi, sortableKeyboardCoordinates as $i, useSortable as Bi } from "@dnd-kit/sortable";
|
|
16
|
+
import { CSS as Ii } from "@dnd-kit/utilities";
|
|
17
|
+
import { flushSync as Mi } from "react-dom";
|
|
18
|
+
import { parseDateTime as Di, toCalendarDate as me, parseDate as Ei, toCalendarDateTime as Li } from "@internationalized/date";
|
|
19
|
+
function u(...e) {
|
|
20
|
+
return tr(ir(e));
|
|
21
|
+
}
|
|
22
|
+
function ze(e, r, t) {
|
|
23
|
+
const { buttonProps: n } = G(
|
|
24
|
+
{ ...e, isDisabled: e.isDisabled || r },
|
|
23
25
|
t
|
|
24
26
|
);
|
|
25
27
|
return {
|
|
26
28
|
buttonProps: {
|
|
27
29
|
...n,
|
|
28
|
-
"aria-busy":
|
|
30
|
+
"aria-busy": r || void 0
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
|
-
const
|
|
34
|
+
const Oi = {
|
|
33
35
|
axisColor: "--rudi-component-chart-axis-color",
|
|
34
36
|
gridColor: "--rudi-component-chart-grid-color",
|
|
35
37
|
labelColor: "--rudi-component-chart-label-color",
|
|
@@ -38,10 +40,10 @@ const lr = {
|
|
|
38
40
|
tooltipText: "--rudi-component-chart-tooltip-text",
|
|
39
41
|
tooltipBorder: "--rudi-component-chart-tooltip-border",
|
|
40
42
|
chartBg: "--rudi-component-chart-bg"
|
|
41
|
-
},
|
|
43
|
+
}, zi = Array.from(
|
|
42
44
|
{ length: 8 },
|
|
43
|
-
(
|
|
44
|
-
),
|
|
45
|
+
(e, r) => `--rudi-color-dataviz-series-${r + 1}`
|
|
46
|
+
), ge = [
|
|
45
47
|
"#2563eb",
|
|
46
48
|
"#d946ef",
|
|
47
49
|
"#f59e0b",
|
|
@@ -51,10 +53,10 @@ const lr = {
|
|
|
51
53
|
"#06b6d4",
|
|
52
54
|
"#f97316"
|
|
53
55
|
];
|
|
54
|
-
function
|
|
56
|
+
function Ne() {
|
|
55
57
|
if (typeof window > "u")
|
|
56
58
|
return {
|
|
57
|
-
colors:
|
|
59
|
+
colors: ge,
|
|
58
60
|
axisColor: "#6b7280",
|
|
59
61
|
gridColor: "#e5e7eb",
|
|
60
62
|
labelColor: "#111827",
|
|
@@ -62,11 +64,12 @@ function W() {
|
|
|
62
64
|
tooltipBg: "#ffffff",
|
|
63
65
|
tooltipText: "#111827",
|
|
64
66
|
tooltipBorder: "#e5e7eb",
|
|
65
|
-
chartBg: "#ffffff"
|
|
67
|
+
chartBg: "#ffffff",
|
|
68
|
+
tones: { default: "#6b7280", success: "#16a34a", warning: "#d97706", error: "#dc2626", info: "#2563eb" }
|
|
66
69
|
};
|
|
67
|
-
const
|
|
68
|
-
for (const [a, o] of Object.entries(
|
|
69
|
-
n[a] =
|
|
70
|
+
const e = getComputedStyle(document.documentElement), r = (a) => e.getPropertyValue(a).trim(), t = zi.map((a, o) => r(a) || ge[o]), n = {};
|
|
71
|
+
for (const [a, o] of Object.entries(Oi))
|
|
72
|
+
n[a] = r(o) || "";
|
|
70
73
|
return {
|
|
71
74
|
colors: t,
|
|
72
75
|
axisColor: n.axisColor,
|
|
@@ -76,116 +79,141 @@ function W() {
|
|
|
76
79
|
tooltipBg: n.tooltipBg,
|
|
77
80
|
tooltipText: n.tooltipText,
|
|
78
81
|
tooltipBorder: n.tooltipBorder,
|
|
79
|
-
chartBg: n.chartBg
|
|
82
|
+
chartBg: n.chartBg,
|
|
83
|
+
tones: {
|
|
84
|
+
default: r("--rudi-color-text-subtle") || "#6b7280",
|
|
85
|
+
success: r("--rudi-color-feedback-success") || "#16a34a",
|
|
86
|
+
warning: r("--rudi-color-feedback-warning") || "#d97706",
|
|
87
|
+
error: r("--rudi-color-feedback-error") || "#dc2626",
|
|
88
|
+
info: r("--rudi-color-feedback-info") || "#2563eb"
|
|
89
|
+
}
|
|
80
90
|
};
|
|
81
91
|
}
|
|
82
|
-
function
|
|
83
|
-
const [
|
|
84
|
-
|
|
92
|
+
function pe() {
|
|
93
|
+
const [e, r] = O(Ne), t = A(() => {
|
|
94
|
+
r(Ne());
|
|
85
95
|
}, []);
|
|
86
|
-
return
|
|
96
|
+
return ne(() => {
|
|
87
97
|
t();
|
|
88
|
-
const n = new MutationObserver((
|
|
89
|
-
for (const
|
|
90
|
-
|
|
98
|
+
const n = new MutationObserver((o) => {
|
|
99
|
+
for (const s of o)
|
|
100
|
+
s.type === "attributes" && s.attributeName === "data-theme" && t();
|
|
91
101
|
});
|
|
92
|
-
|
|
102
|
+
n.observe(document.documentElement, {
|
|
93
103
|
attributes: !0,
|
|
94
104
|
attributeFilter: ["data-theme"]
|
|
95
|
-
})
|
|
96
|
-
|
|
105
|
+
});
|
|
106
|
+
const a = window.matchMedia?.("(prefers-color-scheme: dark)");
|
|
107
|
+
return a?.addEventListener("change", t), () => {
|
|
108
|
+
n.disconnect(), a?.removeEventListener("change", t);
|
|
109
|
+
};
|
|
110
|
+
}, [t]), e;
|
|
97
111
|
}
|
|
98
|
-
const
|
|
99
|
-
function({ icon:
|
|
100
|
-
const
|
|
112
|
+
const R = v(
|
|
113
|
+
function({ icon: r, size: t = "md", color: n, label: a, className: o }, s) {
|
|
114
|
+
const d = typeof t == "string" ? `rudi-icon--${t}` : void 0, l = typeof t == "number" ? { width: t, height: t, ...n ? { color: n } : {} } : n ? { color: n } : void 0;
|
|
101
115
|
return /* @__PURE__ */ i(
|
|
102
116
|
"span",
|
|
103
117
|
{
|
|
104
|
-
ref:
|
|
105
|
-
className:
|
|
118
|
+
ref: s,
|
|
119
|
+
className: u("rudi-icon", d, o),
|
|
106
120
|
role: a ? "img" : void 0,
|
|
107
121
|
"aria-label": a,
|
|
108
122
|
"aria-hidden": a ? void 0 : !0,
|
|
109
|
-
style:
|
|
110
|
-
children: /* @__PURE__ */ i(
|
|
123
|
+
style: l,
|
|
124
|
+
children: /* @__PURE__ */ i(Sr, { icon: r })
|
|
111
125
|
}
|
|
112
126
|
);
|
|
113
127
|
}
|
|
114
|
-
),
|
|
128
|
+
), jt = D.forwardRef(
|
|
115
129
|
function({
|
|
116
|
-
variant:
|
|
130
|
+
variant: r = "primary",
|
|
117
131
|
size: t = "md",
|
|
118
132
|
isLoading: n = !1,
|
|
119
133
|
iconBefore: a,
|
|
120
134
|
iconAfter: o,
|
|
121
|
-
className:
|
|
122
|
-
children:
|
|
123
|
-
...
|
|
124
|
-
},
|
|
125
|
-
const
|
|
135
|
+
className: s,
|
|
136
|
+
children: d,
|
|
137
|
+
...l
|
|
138
|
+
}, c) {
|
|
139
|
+
const m = B(c), { buttonProps: f } = ze(l, n, m);
|
|
126
140
|
return /* @__PURE__ */ i(
|
|
127
141
|
"button",
|
|
128
142
|
{
|
|
129
143
|
...f,
|
|
130
|
-
ref:
|
|
131
|
-
className:
|
|
144
|
+
ref: m,
|
|
145
|
+
className: u(
|
|
132
146
|
"rudi-button",
|
|
133
|
-
`rudi-button--${
|
|
147
|
+
`rudi-button--${r}`,
|
|
134
148
|
`rudi-button--${t}`,
|
|
135
149
|
n && "rudi-button--loading",
|
|
136
|
-
|
|
150
|
+
s
|
|
137
151
|
),
|
|
138
|
-
children: n ? /* @__PURE__ */ p(
|
|
152
|
+
children: n ? /* @__PURE__ */ p(w, { children: [
|
|
139
153
|
/* @__PURE__ */ i("span", { className: "rudi-button__spinner", role: "img", "aria-hidden": "true" }),
|
|
140
|
-
/* @__PURE__ */ i("span", { children:
|
|
141
|
-
] }) : /* @__PURE__ */ p(
|
|
142
|
-
a && /* @__PURE__ */ i(
|
|
143
|
-
/* @__PURE__ */ i("span", { children:
|
|
144
|
-
o && /* @__PURE__ */ i(
|
|
154
|
+
/* @__PURE__ */ i("span", { children: d })
|
|
155
|
+
] }) : /* @__PURE__ */ p(w, { children: [
|
|
156
|
+
a && /* @__PURE__ */ i(R, { icon: a, size: t, className: "rudi-button__icon" }),
|
|
157
|
+
/* @__PURE__ */ i("span", { children: d }),
|
|
158
|
+
o && /* @__PURE__ */ i(R, { icon: o, size: t, className: "rudi-button__icon" })
|
|
145
159
|
] })
|
|
146
160
|
}
|
|
147
161
|
);
|
|
148
162
|
}
|
|
149
|
-
),
|
|
163
|
+
), qt = D.forwardRef(
|
|
150
164
|
function({
|
|
151
|
-
label:
|
|
165
|
+
label: r,
|
|
152
166
|
type: t = "text",
|
|
153
167
|
placeholder: n,
|
|
154
168
|
description: a,
|
|
155
169
|
errorMessage: o,
|
|
156
|
-
isRequired:
|
|
157
|
-
isDisabled:
|
|
158
|
-
value:
|
|
159
|
-
defaultValue:
|
|
160
|
-
onChange:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
isRequired: s = !1,
|
|
171
|
+
isDisabled: d = !1,
|
|
172
|
+
value: l,
|
|
173
|
+
defaultValue: c,
|
|
174
|
+
onChange: m,
|
|
175
|
+
onBlur: f,
|
|
176
|
+
name: g,
|
|
177
|
+
autoComplete: _,
|
|
178
|
+
inputMode: h,
|
|
179
|
+
maxLength: b,
|
|
180
|
+
isReadOnly: N,
|
|
181
|
+
autoFocus: y,
|
|
182
|
+
className: k
|
|
183
|
+
}, C) {
|
|
184
|
+
const T = B(C), {
|
|
185
|
+
labelProps: M,
|
|
186
|
+
inputProps: E,
|
|
187
|
+
descriptionProps: $,
|
|
188
|
+
errorMessageProps: x,
|
|
189
|
+
isInvalid: S
|
|
190
|
+
} = xe(
|
|
170
191
|
{
|
|
171
|
-
label:
|
|
192
|
+
label: r,
|
|
172
193
|
type: t,
|
|
173
194
|
placeholder: n,
|
|
174
195
|
description: a,
|
|
175
196
|
errorMessage: o,
|
|
176
|
-
isRequired:
|
|
177
|
-
isDisabled:
|
|
178
|
-
value:
|
|
179
|
-
defaultValue:
|
|
180
|
-
onChange:
|
|
197
|
+
isRequired: s,
|
|
198
|
+
isDisabled: d,
|
|
199
|
+
value: l,
|
|
200
|
+
defaultValue: c,
|
|
201
|
+
onChange: m,
|
|
202
|
+
onBlur: f,
|
|
203
|
+
name: g,
|
|
204
|
+
autoComplete: _,
|
|
205
|
+
inputMode: h,
|
|
206
|
+
maxLength: b,
|
|
207
|
+
isReadOnly: N,
|
|
208
|
+
autoFocus: y,
|
|
181
209
|
isInvalid: !!o
|
|
182
210
|
},
|
|
183
|
-
|
|
211
|
+
T
|
|
184
212
|
);
|
|
185
|
-
return /* @__PURE__ */ p("div", { className:
|
|
186
|
-
/* @__PURE__ */ p("label", { ...
|
|
187
|
-
|
|
188
|
-
|
|
213
|
+
return /* @__PURE__ */ p("div", { className: u("rudi-input", k), children: [
|
|
214
|
+
/* @__PURE__ */ p("label", { ...M, className: "rudi-input__label", children: [
|
|
215
|
+
r,
|
|
216
|
+
s && /* @__PURE__ */ p("span", { className: "rudi-input__required", "aria-hidden": "true", children: [
|
|
189
217
|
" ",
|
|
190
218
|
"*"
|
|
191
219
|
] })
|
|
@@ -193,76 +221,103 @@ const N = v(
|
|
|
193
221
|
/* @__PURE__ */ i(
|
|
194
222
|
"input",
|
|
195
223
|
{
|
|
196
|
-
...
|
|
197
|
-
ref:
|
|
198
|
-
className:
|
|
224
|
+
...E,
|
|
225
|
+
ref: T,
|
|
226
|
+
className: u(
|
|
199
227
|
"rudi-input__field",
|
|
200
|
-
|
|
228
|
+
S && "rudi-input__field--error"
|
|
201
229
|
)
|
|
202
230
|
}
|
|
203
231
|
),
|
|
204
|
-
a && !
|
|
205
|
-
|
|
232
|
+
a && !S && /* @__PURE__ */ i("p", { ...$, className: "rudi-input__description", children: a }),
|
|
233
|
+
S && o && /* @__PURE__ */ i("p", { ...x, className: "rudi-input__error", children: o })
|
|
206
234
|
] });
|
|
207
235
|
}
|
|
208
|
-
),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
236
|
+
), Ae = ae(null);
|
|
237
|
+
function Fe({ props: e, inputProps: r, isSelected: t, inputRef: n }) {
|
|
238
|
+
const a = we(), o = !!e.errorMessage, s = /* @__PURE__ */ p(
|
|
239
|
+
"label",
|
|
240
|
+
{
|
|
241
|
+
className: u(
|
|
242
|
+
"rudi-checkbox",
|
|
243
|
+
e.isDisabled && "rudi-checkbox--disabled",
|
|
244
|
+
!o && e.className
|
|
245
|
+
),
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ i(
|
|
248
|
+
"input",
|
|
249
|
+
{
|
|
250
|
+
...r,
|
|
251
|
+
ref: n,
|
|
252
|
+
className: "rudi-checkbox__input",
|
|
253
|
+
"aria-invalid": o || void 0,
|
|
254
|
+
"aria-describedby": o ? a : r["aria-describedby"]
|
|
255
|
+
}
|
|
218
256
|
),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
257
|
+
/* @__PURE__ */ i(
|
|
258
|
+
"span",
|
|
259
|
+
{
|
|
260
|
+
className: u(
|
|
261
|
+
"rudi-checkbox__control",
|
|
262
|
+
t && "rudi-checkbox__control--checked",
|
|
263
|
+
e.isIndeterminate && "rudi-checkbox__control--indeterminate"
|
|
264
|
+
),
|
|
265
|
+
"aria-hidden": "true"
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ i("span", { className: "rudi-checkbox__label", children: e.children })
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
return o ? /* @__PURE__ */ p("div", { className: u("rudi-checkbox-field", e.className), children: [
|
|
273
|
+
s,
|
|
274
|
+
/* @__PURE__ */ i("p", { id: a, className: "rudi-checkbox__error", children: e.errorMessage })
|
|
275
|
+
] }) : s;
|
|
276
|
+
}
|
|
277
|
+
const Ai = v(
|
|
278
|
+
function({ group: r, ...t }, n) {
|
|
279
|
+
const a = B(n), { inputProps: o } = nr({ ...t, value: t.value ?? "" }, r, a);
|
|
280
|
+
return /* @__PURE__ */ i(Fe, { props: t, inputProps: o, isSelected: r.isSelected(t.value ?? ""), inputRef: a });
|
|
281
|
+
}
|
|
282
|
+
), Fi = v(
|
|
283
|
+
function(r, t) {
|
|
284
|
+
const n = B(t), a = Be(r), { inputProps: o } = ar({ ...r, isInvalid: !!r.errorMessage }, a, n);
|
|
285
|
+
return /* @__PURE__ */ i(Fe, { props: r, inputProps: o, isSelected: a.isSelected, inputRef: n });
|
|
286
|
+
}
|
|
287
|
+
), Wt = v(
|
|
288
|
+
function(r, t) {
|
|
289
|
+
const n = K(Ae);
|
|
290
|
+
return n ? /* @__PURE__ */ i(Ai, { ...r, group: n, ref: t }) : /* @__PURE__ */ i(Fi, { ...r, ref: t });
|
|
236
291
|
}
|
|
237
292
|
);
|
|
238
|
-
function
|
|
239
|
-
const e =
|
|
240
|
-
return /* @__PURE__ */ p(
|
|
293
|
+
function Xt(e) {
|
|
294
|
+
const r = { ...e, isInvalid: !!e.errorMessage }, t = Pr(r), { groupProps: n, labelProps: a, descriptionProps: o, errorMessageProps: s } = or(r, t);
|
|
295
|
+
return /* @__PURE__ */ i(Ae.Provider, { value: t, children: /* @__PURE__ */ p(
|
|
241
296
|
"div",
|
|
242
297
|
{
|
|
243
|
-
...
|
|
244
|
-
className:
|
|
298
|
+
...n,
|
|
299
|
+
className: u("rudi-checkbox-group", e.className),
|
|
245
300
|
children: [
|
|
246
|
-
/* @__PURE__ */ i("span", { ...
|
|
247
|
-
|
|
248
|
-
|
|
301
|
+
/* @__PURE__ */ i("span", { ...a, className: "rudi-checkbox-group__label", children: e.label }),
|
|
302
|
+
e.children,
|
|
303
|
+
e.description && !e.errorMessage && /* @__PURE__ */ i(
|
|
249
304
|
"p",
|
|
250
305
|
{
|
|
251
|
-
...
|
|
306
|
+
...o,
|
|
252
307
|
className: "rudi-checkbox-group__description",
|
|
253
|
-
children:
|
|
308
|
+
children: e.description
|
|
254
309
|
}
|
|
255
310
|
),
|
|
256
|
-
|
|
311
|
+
e.errorMessage && /* @__PURE__ */ i("p", { ...s, className: "rudi-checkbox-group__error", children: e.errorMessage })
|
|
257
312
|
]
|
|
258
313
|
}
|
|
259
|
-
);
|
|
314
|
+
) });
|
|
260
315
|
}
|
|
261
|
-
function
|
|
316
|
+
function Gi(e) {
|
|
262
317
|
return /* @__PURE__ */ i(
|
|
263
318
|
"svg",
|
|
264
319
|
{
|
|
265
|
-
...
|
|
320
|
+
...e,
|
|
266
321
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
322
|
width: "16",
|
|
268
323
|
height: "16",
|
|
@@ -276,13 +331,13 @@ function mr(r) {
|
|
|
276
331
|
}
|
|
277
332
|
);
|
|
278
333
|
}
|
|
279
|
-
function
|
|
280
|
-
state:
|
|
281
|
-
triggerRef:
|
|
334
|
+
function Ki({
|
|
335
|
+
state: e,
|
|
336
|
+
triggerRef: r,
|
|
282
337
|
popoverRef: t,
|
|
283
338
|
children: n
|
|
284
339
|
}) {
|
|
285
|
-
const { popoverProps: a } =
|
|
340
|
+
const { popoverProps: a } = Ce({ triggerRef: r, popoverRef: t }, e);
|
|
286
341
|
return /* @__PURE__ */ i(
|
|
287
342
|
"div",
|
|
288
343
|
{
|
|
@@ -293,14 +348,14 @@ function pr({
|
|
|
293
348
|
}
|
|
294
349
|
);
|
|
295
350
|
}
|
|
296
|
-
function
|
|
297
|
-
const { listBoxProps: n } =
|
|
298
|
-
return /* @__PURE__ */ i("ul", { ...n, ref:
|
|
351
|
+
function Vi({ state: e, listBoxRef: r, ...t }) {
|
|
352
|
+
const { listBoxProps: n } = Se(t, e, r);
|
|
353
|
+
return /* @__PURE__ */ i("ul", { ...n, ref: r, className: "rudi-select__listbox", children: [...e.collection].map((a) => /* @__PURE__ */ i(Hi, { item: a, state: e }, a.key)) });
|
|
299
354
|
}
|
|
300
|
-
function
|
|
301
|
-
const t =
|
|
302
|
-
{ key:
|
|
303
|
-
|
|
355
|
+
function Hi({ item: e, state: r }) {
|
|
356
|
+
const t = P(null), { optionProps: n, isSelected: a, isFocused: o } = Pe(
|
|
357
|
+
{ key: e.key },
|
|
358
|
+
r,
|
|
304
359
|
t
|
|
305
360
|
);
|
|
306
361
|
return /* @__PURE__ */ i(
|
|
@@ -311,188 +366,225 @@ function fr({ item: r, state: e }) {
|
|
|
311
366
|
className: "rudi-select__option",
|
|
312
367
|
"data-focused": o,
|
|
313
368
|
"aria-selected": a,
|
|
314
|
-
children:
|
|
369
|
+
children: e.rendered
|
|
315
370
|
}
|
|
316
371
|
);
|
|
317
372
|
}
|
|
318
|
-
function
|
|
319
|
-
const
|
|
373
|
+
function Zt(e) {
|
|
374
|
+
const r = Tr(e), t = P(null), n = P(null), a = P(null), {
|
|
320
375
|
labelProps: o,
|
|
321
|
-
triggerProps:
|
|
322
|
-
valueProps:
|
|
323
|
-
menuProps:
|
|
324
|
-
descriptionProps:
|
|
325
|
-
errorMessageProps:
|
|
376
|
+
triggerProps: s,
|
|
377
|
+
valueProps: d,
|
|
378
|
+
menuProps: l,
|
|
379
|
+
descriptionProps: c,
|
|
380
|
+
errorMessageProps: m
|
|
326
381
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
327
|
-
} =
|
|
328
|
-
return /* @__PURE__ */ p("div", { className:
|
|
329
|
-
/* @__PURE__ */ i("label", { ...o, className: "rudi-select__label", children:
|
|
330
|
-
/* @__PURE__ */ i(
|
|
382
|
+
} = sr(e, r, t), { buttonProps: f } = G(s, t);
|
|
383
|
+
return /* @__PURE__ */ p("div", { className: u("rudi-select", e.className), children: [
|
|
384
|
+
/* @__PURE__ */ i("label", { ...o, className: "rudi-select__label", children: e.label }),
|
|
385
|
+
/* @__PURE__ */ i(dr, { state: r, triggerRef: t, label: e.label }),
|
|
331
386
|
/* @__PURE__ */ p(
|
|
332
387
|
"button",
|
|
333
388
|
{
|
|
334
389
|
...f,
|
|
335
390
|
ref: t,
|
|
336
|
-
className:
|
|
391
|
+
className: u(
|
|
337
392
|
"rudi-select__trigger",
|
|
338
|
-
|
|
393
|
+
e.errorMessage && "rudi-select__trigger--error"
|
|
339
394
|
),
|
|
340
395
|
children: [
|
|
341
|
-
/* @__PURE__ */ i("span", { ...
|
|
342
|
-
/* @__PURE__ */ i(
|
|
396
|
+
/* @__PURE__ */ i("span", { ...d, children: r.selectedItem ? r.selectedItem.rendered : e.placeholder || "Select an option" }),
|
|
397
|
+
/* @__PURE__ */ i(Gi, { "aria-hidden": "true" })
|
|
343
398
|
]
|
|
344
399
|
}
|
|
345
400
|
),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
401
|
+
r.isOpen && /* @__PURE__ */ i(Ki, { state: r, triggerRef: t, popoverRef: n, children: /* @__PURE__ */ i(Vi, { ...l, state: r, listBoxRef: a }) }),
|
|
402
|
+
e.description && !e.errorMessage && /* @__PURE__ */ i("p", { ...c, className: "rudi-select__description", children: e.description }),
|
|
403
|
+
e.errorMessage && /* @__PURE__ */ i("p", { ...m, className: "rudi-select__error", children: e.errorMessage })
|
|
349
404
|
] });
|
|
350
405
|
}
|
|
351
|
-
function
|
|
352
|
-
return /* @__PURE__ */ i(
|
|
406
|
+
function Qt(e) {
|
|
407
|
+
return /* @__PURE__ */ i(Ir, { ...e });
|
|
353
408
|
}
|
|
354
|
-
function
|
|
355
|
-
return /* @__PURE__ */ i(
|
|
356
|
-
|
|
409
|
+
function Yt({ className: e, ...r }) {
|
|
410
|
+
return /* @__PURE__ */ i(oe, { className: "rudi-menu__popover", children: /* @__PURE__ */ i(
|
|
411
|
+
Mr,
|
|
357
412
|
{
|
|
358
|
-
...
|
|
359
|
-
className:
|
|
413
|
+
...r,
|
|
414
|
+
className: u("rudi-menu__list", e)
|
|
360
415
|
}
|
|
361
416
|
) });
|
|
362
417
|
}
|
|
363
|
-
function
|
|
418
|
+
function Ui({ className: e, ...r }) {
|
|
364
419
|
return /* @__PURE__ */ i(
|
|
365
|
-
|
|
420
|
+
Dr,
|
|
366
421
|
{
|
|
367
|
-
...
|
|
368
|
-
className:
|
|
422
|
+
...r,
|
|
423
|
+
className: u("rudi-menu__item-shortcut", e)
|
|
369
424
|
}
|
|
370
425
|
);
|
|
371
426
|
}
|
|
372
|
-
function
|
|
373
|
-
isDestructive:
|
|
374
|
-
icon:
|
|
427
|
+
function Jt({
|
|
428
|
+
isDestructive: e,
|
|
429
|
+
icon: r,
|
|
375
430
|
label: t,
|
|
376
431
|
description: n,
|
|
377
432
|
shortcut: a,
|
|
378
433
|
className: o,
|
|
379
|
-
textValue:
|
|
380
|
-
children:
|
|
381
|
-
...
|
|
434
|
+
textValue: s,
|
|
435
|
+
children: d,
|
|
436
|
+
...l
|
|
382
437
|
}) {
|
|
383
|
-
const
|
|
438
|
+
const c = t != null || r != null || n != null || a != null;
|
|
384
439
|
return /* @__PURE__ */ i(
|
|
385
|
-
|
|
440
|
+
Er,
|
|
386
441
|
{
|
|
387
|
-
...
|
|
388
|
-
textValue:
|
|
389
|
-
className: (f) =>
|
|
442
|
+
...l,
|
|
443
|
+
textValue: s ?? t ?? (typeof d == "string" ? d : void 0),
|
|
444
|
+
className: (f) => u(
|
|
390
445
|
"rudi-menu__item",
|
|
391
|
-
|
|
446
|
+
e && "rudi-menu__item--destructive",
|
|
392
447
|
typeof o == "function" ? o(f) : o
|
|
393
448
|
),
|
|
394
|
-
"data-destructive":
|
|
395
|
-
children:
|
|
396
|
-
|
|
449
|
+
"data-destructive": e || void 0,
|
|
450
|
+
children: c ? /* @__PURE__ */ p(w, { children: [
|
|
451
|
+
r && /* @__PURE__ */ i(R, { icon: r, className: "rudi-menu__item-icon" }),
|
|
397
452
|
(t != null || n != null) && /* @__PURE__ */ p("span", { className: "rudi-menu__item-content", children: [
|
|
398
|
-
t != null && /* @__PURE__ */ i(
|
|
399
|
-
n != null && /* @__PURE__ */ i(
|
|
453
|
+
t != null && /* @__PURE__ */ i(z, { slot: "label", className: "rudi-menu__item-label", children: t }),
|
|
454
|
+
n != null && /* @__PURE__ */ i(z, { slot: "description", className: "rudi-menu__item-description", children: n })
|
|
400
455
|
] }),
|
|
401
|
-
a != null && /* @__PURE__ */ i(
|
|
402
|
-
] }) :
|
|
456
|
+
a != null && /* @__PURE__ */ i(Ui, { children: a })
|
|
457
|
+
] }) : d
|
|
403
458
|
}
|
|
404
459
|
);
|
|
405
460
|
}
|
|
406
|
-
function
|
|
407
|
-
title:
|
|
408
|
-
className:
|
|
461
|
+
function en({
|
|
462
|
+
title: e,
|
|
463
|
+
className: r,
|
|
409
464
|
children: t,
|
|
410
465
|
...n
|
|
411
466
|
}) {
|
|
412
|
-
return /* @__PURE__ */ p(
|
|
413
|
-
|
|
414
|
-
/* @__PURE__ */ i(
|
|
467
|
+
return /* @__PURE__ */ p(Lr, { ...n, className: u("rudi-menu__section", r), children: [
|
|
468
|
+
e && /* @__PURE__ */ i(Or, { className: "rudi-menu__section-header", children: e }),
|
|
469
|
+
/* @__PURE__ */ i(se, { items: n.items, children: t })
|
|
415
470
|
] });
|
|
416
471
|
}
|
|
417
|
-
function
|
|
472
|
+
function rn({ className: e, ...r }) {
|
|
418
473
|
return /* @__PURE__ */ i(
|
|
419
|
-
|
|
474
|
+
zr,
|
|
420
475
|
{
|
|
421
|
-
...
|
|
422
|
-
className:
|
|
476
|
+
...r,
|
|
477
|
+
className: u("rudi-menu__separator", e)
|
|
423
478
|
}
|
|
424
479
|
);
|
|
425
480
|
}
|
|
426
|
-
function
|
|
427
|
-
return /* @__PURE__ */ i(
|
|
481
|
+
function tn(e) {
|
|
482
|
+
return /* @__PURE__ */ i(Ar, { ...e });
|
|
428
483
|
}
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
484
|
+
const he = D.forwardRef(
|
|
485
|
+
function({
|
|
486
|
+
variant: r = "secondary",
|
|
487
|
+
size: t = "md",
|
|
488
|
+
isLoading: n = !1,
|
|
489
|
+
className: a,
|
|
490
|
+
children: o,
|
|
491
|
+
...s
|
|
492
|
+
}, d) {
|
|
493
|
+
const l = B(d), { buttonProps: c } = ze(s, n, l);
|
|
494
|
+
return /* @__PURE__ */ i(
|
|
495
|
+
"button",
|
|
496
|
+
{
|
|
497
|
+
...c,
|
|
498
|
+
ref: l,
|
|
499
|
+
className: u(
|
|
500
|
+
"rudi-icon-button",
|
|
501
|
+
`rudi-icon-button--${r}`,
|
|
502
|
+
`rudi-icon-button--${t}`,
|
|
503
|
+
a
|
|
504
|
+
),
|
|
505
|
+
children: o
|
|
506
|
+
}
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
function re({ children: e, className: r }) {
|
|
511
|
+
return /* @__PURE__ */ i("div", { className: u("rudi-dialog__footer", r), children: e });
|
|
512
|
+
}
|
|
513
|
+
const ji = v(function(r, t) {
|
|
514
|
+
return r.isOpen ? /* @__PURE__ */ i(qi, { ...r, forwardedRef: t }) : null;
|
|
515
|
+
});
|
|
516
|
+
function qi({
|
|
517
|
+
onClose: e,
|
|
518
|
+
title: r,
|
|
519
|
+
isDismissable: t = !0,
|
|
520
|
+
size: n = "md",
|
|
521
|
+
children: a,
|
|
522
|
+
className: o,
|
|
523
|
+
forwardedRef: s
|
|
524
|
+
}) {
|
|
525
|
+
const d = P(null), l = B(s);
|
|
526
|
+
lr();
|
|
527
|
+
const c = {
|
|
528
|
+
isOpen: !0,
|
|
529
|
+
close: e,
|
|
443
530
|
open: () => {
|
|
444
531
|
},
|
|
445
532
|
toggle: () => {
|
|
446
533
|
},
|
|
447
534
|
setOpen: () => {
|
|
448
535
|
}
|
|
449
|
-
}, { modalProps:
|
|
450
|
-
{ isDismissable:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
), { dialogProps: g, titleProps:
|
|
454
|
-
return
|
|
536
|
+
}, { modalProps: m, underlayProps: f } = cr(
|
|
537
|
+
{ isDismissable: t },
|
|
538
|
+
c,
|
|
539
|
+
l
|
|
540
|
+
), { dialogProps: g, titleProps: _ } = ur({}, l), h = $e.toArray(a), b = h.filter((y) => X(y) && y.type === re), N = h.filter((y) => !(X(y) && y.type === re));
|
|
541
|
+
return /* @__PURE__ */ i(mr, { children: /* @__PURE__ */ i(
|
|
455
542
|
"div",
|
|
456
543
|
{
|
|
457
|
-
...
|
|
458
|
-
ref:
|
|
544
|
+
...f,
|
|
545
|
+
ref: d,
|
|
459
546
|
className: "rudi-dialog__overlay",
|
|
460
|
-
children: /* @__PURE__ */ i(
|
|
547
|
+
children: /* @__PURE__ */ i(pr, { contain: !0, restoreFocus: !0, autoFocus: !0, children: /* @__PURE__ */ p(
|
|
461
548
|
"div",
|
|
462
549
|
{
|
|
463
|
-
...
|
|
550
|
+
...m,
|
|
464
551
|
...g,
|
|
465
|
-
ref:
|
|
466
|
-
className:
|
|
552
|
+
ref: l,
|
|
553
|
+
className: u(
|
|
467
554
|
"rudi-dialog",
|
|
468
|
-
`rudi-dialog--${
|
|
469
|
-
|
|
555
|
+
`rudi-dialog--${n}`,
|
|
556
|
+
o
|
|
470
557
|
),
|
|
471
558
|
children: [
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
|
|
559
|
+
/* @__PURE__ */ p("div", { className: "rudi-dialog__header", children: [
|
|
560
|
+
/* @__PURE__ */ i("h2", { ..._, className: "rudi-dialog__title", children: r }),
|
|
561
|
+
t && /* @__PURE__ */ i(he, { "aria-label": "Close", variant: "ghost", size: "sm", onPress: e, children: /* @__PURE__ */ i(R, { icon: "lucide:x" }) })
|
|
562
|
+
] }),
|
|
563
|
+
/* @__PURE__ */ i("div", { className: "rudi-dialog__body", children: N }),
|
|
564
|
+
b
|
|
474
565
|
]
|
|
475
566
|
}
|
|
476
567
|
) })
|
|
477
568
|
}
|
|
478
|
-
) })
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
569
|
+
) });
|
|
570
|
+
}
|
|
571
|
+
const nn = Object.assign(ji, { Footer: re }), an = v(
|
|
572
|
+
function(r, t) {
|
|
573
|
+
const n = B(t), a = Be(r), { inputProps: o } = hr(r, a, n);
|
|
482
574
|
return /* @__PURE__ */ p(
|
|
483
575
|
"label",
|
|
484
576
|
{
|
|
485
|
-
className:
|
|
577
|
+
className: u(
|
|
486
578
|
"rudi-switch",
|
|
487
|
-
|
|
488
|
-
|
|
579
|
+
r.isDisabled && "rudi-switch--disabled",
|
|
580
|
+
r.className
|
|
489
581
|
),
|
|
490
582
|
children: [
|
|
491
|
-
/* @__PURE__ */ i(
|
|
583
|
+
/* @__PURE__ */ i(te, { children: /* @__PURE__ */ i("input", { ...o, ref: n }) }),
|
|
492
584
|
/* @__PURE__ */ i(
|
|
493
585
|
"span",
|
|
494
586
|
{
|
|
495
|
-
className:
|
|
587
|
+
className: u(
|
|
496
588
|
"rudi-switch__track",
|
|
497
589
|
a.isSelected && "rudi-switch__track--on"
|
|
498
590
|
),
|
|
@@ -500,90 +592,121 @@ const ri = v(function({
|
|
|
500
592
|
children: /* @__PURE__ */ i("span", { className: "rudi-switch__thumb" })
|
|
501
593
|
}
|
|
502
594
|
),
|
|
503
|
-
/* @__PURE__ */ i("span", { className: "rudi-switch__label", children:
|
|
595
|
+
r.children != null && /* @__PURE__ */ i("span", { className: "rudi-switch__label", children: r.children })
|
|
504
596
|
]
|
|
505
597
|
}
|
|
506
598
|
);
|
|
507
599
|
}
|
|
508
|
-
),
|
|
509
|
-
function
|
|
510
|
-
const e =
|
|
511
|
-
return /* @__PURE__ */ i(
|
|
600
|
+
), Ge = ae(null);
|
|
601
|
+
function on(e) {
|
|
602
|
+
const r = { ...e, isInvalid: !!e.errorMessage }, t = wr(r), { radioGroupProps: n, labelProps: a, descriptionProps: o, errorMessageProps: s } = fr(r, t);
|
|
603
|
+
return /* @__PURE__ */ i(Ge.Provider, { value: t, children: /* @__PURE__ */ p(
|
|
512
604
|
"div",
|
|
513
605
|
{
|
|
514
|
-
...
|
|
515
|
-
className:
|
|
606
|
+
...n,
|
|
607
|
+
className: u("rudi-radio-group", e.className),
|
|
516
608
|
children: [
|
|
517
|
-
/* @__PURE__ */ i("span", { ...
|
|
609
|
+
/* @__PURE__ */ i("span", { ...a, className: "rudi-radio-group__label", children: e.label }),
|
|
518
610
|
/* @__PURE__ */ i(
|
|
519
611
|
"div",
|
|
520
612
|
{
|
|
521
|
-
className:
|
|
613
|
+
className: u(
|
|
522
614
|
"rudi-radio-group__options",
|
|
523
|
-
|
|
615
|
+
e.orientation === "horizontal" && "rudi-radio-group__options--horizontal"
|
|
524
616
|
),
|
|
525
|
-
children:
|
|
617
|
+
children: e.children
|
|
526
618
|
}
|
|
527
619
|
),
|
|
528
|
-
|
|
529
|
-
|
|
620
|
+
e.description && !e.errorMessage && /* @__PURE__ */ i("p", { ...o, className: "rudi-radio-group__description", children: e.description }),
|
|
621
|
+
e.errorMessage && /* @__PURE__ */ i("p", { ...s, className: "rudi-radio-group__error", children: e.errorMessage })
|
|
530
622
|
]
|
|
531
623
|
}
|
|
532
624
|
) });
|
|
533
625
|
}
|
|
534
|
-
const
|
|
535
|
-
function(
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
626
|
+
const sn = v(
|
|
627
|
+
function(r, t) {
|
|
628
|
+
const n = K(Ge);
|
|
629
|
+
if (!n)
|
|
630
|
+
throw new Error("RudiRadio must be rendered inside a RudiRadioGroup.");
|
|
631
|
+
const a = B(t), { inputProps: o, isSelected: s, isDisabled: d } = _r(r, n, a);
|
|
632
|
+
return /* @__PURE__ */ p(
|
|
633
|
+
"label",
|
|
634
|
+
{
|
|
635
|
+
className: u(
|
|
636
|
+
"rudi-radio",
|
|
637
|
+
d && "rudi-radio--disabled",
|
|
638
|
+
r.className
|
|
639
|
+
),
|
|
640
|
+
children: [
|
|
641
|
+
/* @__PURE__ */ i("input", { ...o, ref: a, className: "rudi-radio__input" }),
|
|
642
|
+
/* @__PURE__ */ i(
|
|
643
|
+
"span",
|
|
644
|
+
{
|
|
645
|
+
className: u(
|
|
646
|
+
"rudi-radio__control",
|
|
647
|
+
s && "rudi-radio__control--selected"
|
|
648
|
+
),
|
|
649
|
+
"aria-hidden": "true"
|
|
650
|
+
}
|
|
651
|
+
),
|
|
652
|
+
/* @__PURE__ */ i("span", { className: "rudi-radio__label", children: r.children })
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
), dn = v(
|
|
658
|
+
function({ delay: r = 500, closeDelay: t = 0, children: n }, a) {
|
|
659
|
+
const o = $r({ delay: r, closeDelay: t }), s = P(null), { triggerProps: d, tooltipProps: l } = gr({ delay: r, closeDelay: t }, o, s), [c, m] = n, { "aria-describedby": f, tabIndex: g, ..._ } = d;
|
|
660
|
+
return /* @__PURE__ */ p("span", { ref: a, className: "rudi-tooltip-trigger", ..._, children: [
|
|
661
|
+
D.cloneElement(c, {
|
|
662
|
+
ref: s,
|
|
540
663
|
"aria-describedby": f
|
|
541
664
|
}),
|
|
542
|
-
o.isOpen &&
|
|
665
|
+
o.isOpen && D.cloneElement(m, l)
|
|
543
666
|
] });
|
|
544
667
|
}
|
|
545
|
-
),
|
|
546
|
-
function({ children:
|
|
547
|
-
const { tooltipProps: o } =
|
|
668
|
+
), ln = v(
|
|
669
|
+
function({ children: r, className: t, ...n }, a) {
|
|
670
|
+
const { tooltipProps: o } = br(n);
|
|
548
671
|
return /* @__PURE__ */ i(
|
|
549
672
|
"span",
|
|
550
673
|
{
|
|
551
674
|
...o,
|
|
552
675
|
ref: a,
|
|
553
|
-
className:
|
|
676
|
+
className: u("rudi-tooltip", t),
|
|
554
677
|
role: "tooltip",
|
|
555
|
-
children:
|
|
678
|
+
children: r
|
|
556
679
|
}
|
|
557
680
|
);
|
|
558
681
|
}
|
|
559
682
|
);
|
|
560
|
-
function
|
|
561
|
-
variant:
|
|
562
|
-
title:
|
|
683
|
+
function Wi({
|
|
684
|
+
variant: e,
|
|
685
|
+
title: r,
|
|
563
686
|
icon: t,
|
|
564
687
|
isPolite: n = !1,
|
|
565
688
|
dismissible: a = !1,
|
|
566
689
|
onDismiss: o,
|
|
567
|
-
children:
|
|
568
|
-
className:
|
|
690
|
+
children: s,
|
|
691
|
+
className: d
|
|
569
692
|
}) {
|
|
570
|
-
const [
|
|
571
|
-
return
|
|
693
|
+
const [l, c] = O(!1);
|
|
694
|
+
return l ? null : /* @__PURE__ */ p(
|
|
572
695
|
"div",
|
|
573
696
|
{
|
|
574
697
|
role: n ? "status" : "alert",
|
|
575
|
-
className:
|
|
698
|
+
className: u(
|
|
576
699
|
"rudi-alert",
|
|
577
|
-
`rudi-alert--${
|
|
700
|
+
`rudi-alert--${e}`,
|
|
578
701
|
t && "rudi-alert--has-icon",
|
|
579
702
|
a && "rudi-alert--dismissible",
|
|
580
|
-
|
|
703
|
+
d
|
|
581
704
|
),
|
|
582
705
|
children: [
|
|
583
|
-
t && /* @__PURE__ */ i(
|
|
706
|
+
t && /* @__PURE__ */ i(R, { icon: t, size: "md", className: "rudi-alert__icon", "aria-hidden": "true" }),
|
|
584
707
|
/* @__PURE__ */ p("div", { className: "rudi-alert__body", children: [
|
|
585
|
-
|
|
586
|
-
/* @__PURE__ */ i("div", { className: "rudi-alert__content", children:
|
|
708
|
+
r && /* @__PURE__ */ i("p", { className: "rudi-alert__title", children: r }),
|
|
709
|
+
/* @__PURE__ */ i("div", { className: "rudi-alert__content", children: s })
|
|
587
710
|
] }),
|
|
588
711
|
a && /* @__PURE__ */ i(
|
|
589
712
|
"button",
|
|
@@ -592,44 +715,18 @@ function oi({
|
|
|
592
715
|
className: "rudi-alert__dismiss",
|
|
593
716
|
"aria-label": "Dismiss alert",
|
|
594
717
|
onClick: () => {
|
|
595
|
-
|
|
718
|
+
c(!0), o?.();
|
|
596
719
|
},
|
|
597
|
-
children: /* @__PURE__ */ i(
|
|
720
|
+
children: /* @__PURE__ */ i(R, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
598
721
|
}
|
|
599
722
|
)
|
|
600
723
|
]
|
|
601
724
|
}
|
|
602
725
|
);
|
|
603
726
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
size: t = "md",
|
|
608
|
-
isLoading: n = !1,
|
|
609
|
-
className: a,
|
|
610
|
-
children: o,
|
|
611
|
-
...d
|
|
612
|
-
}, c) {
|
|
613
|
-
const s = k(c), { buttonProps: l } = ee(d, n, s);
|
|
614
|
-
return /* @__PURE__ */ i(
|
|
615
|
-
"button",
|
|
616
|
-
{
|
|
617
|
-
...l,
|
|
618
|
-
ref: s,
|
|
619
|
-
className: m(
|
|
620
|
-
"rudi-icon-button",
|
|
621
|
-
`rudi-icon-button--${e}`,
|
|
622
|
-
`rudi-icon-button--${t}`,
|
|
623
|
-
a
|
|
624
|
-
),
|
|
625
|
-
children: o
|
|
626
|
-
}
|
|
627
|
-
);
|
|
628
|
-
}
|
|
629
|
-
);
|
|
630
|
-
function br({
|
|
631
|
-
variant: r = "default",
|
|
632
|
-
size: e = "md",
|
|
727
|
+
function Xi({
|
|
728
|
+
variant: e = "default",
|
|
729
|
+
size: r = "md",
|
|
633
730
|
dot: t = !1,
|
|
634
731
|
children: n,
|
|
635
732
|
className: a
|
|
@@ -637,10 +734,10 @@ function br({
|
|
|
637
734
|
return /* @__PURE__ */ i(
|
|
638
735
|
"span",
|
|
639
736
|
{
|
|
640
|
-
className:
|
|
737
|
+
className: u(
|
|
641
738
|
"rudi-badge",
|
|
642
|
-
`rudi-badge--${r}`,
|
|
643
739
|
`rudi-badge--${e}`,
|
|
740
|
+
`rudi-badge--${r}`,
|
|
644
741
|
t && "rudi-badge--dot",
|
|
645
742
|
a
|
|
646
743
|
),
|
|
@@ -648,79 +745,79 @@ function br({
|
|
|
648
745
|
}
|
|
649
746
|
);
|
|
650
747
|
}
|
|
651
|
-
function
|
|
652
|
-
variant:
|
|
653
|
-
dismissible:
|
|
748
|
+
function cn({
|
|
749
|
+
variant: e = "default",
|
|
750
|
+
dismissible: r = !1,
|
|
654
751
|
onDismiss: t,
|
|
655
752
|
onPress: n,
|
|
656
753
|
isDisabled: a = !1,
|
|
657
754
|
children: o,
|
|
658
|
-
className:
|
|
755
|
+
className: s
|
|
659
756
|
}) {
|
|
660
|
-
const [
|
|
757
|
+
const [d, l] = O(!1), c = P(null), { buttonProps: m } = G(
|
|
661
758
|
{
|
|
662
759
|
onPress: n,
|
|
663
760
|
isDisabled: a,
|
|
664
761
|
elementType: n ? "button" : "span"
|
|
665
762
|
},
|
|
666
|
-
|
|
667
|
-
), f = typeof o == "string" ? `Remove ${o}` : "Remove",
|
|
763
|
+
c
|
|
764
|
+
), f = typeof o == "string" ? `Remove ${o}` : "Remove", g = u(
|
|
668
765
|
"rudi-tag",
|
|
669
|
-
`rudi-tag--${
|
|
766
|
+
`rudi-tag--${e}`,
|
|
670
767
|
n && "rudi-tag--interactive",
|
|
671
|
-
|
|
672
|
-
|
|
768
|
+
r && "rudi-tag--dismissible",
|
|
769
|
+
s
|
|
673
770
|
);
|
|
674
|
-
return
|
|
771
|
+
return d ? null : n ? /* @__PURE__ */ p("button", { ref: c, ...m, className: g, children: [
|
|
675
772
|
o,
|
|
676
|
-
|
|
773
|
+
r && /* @__PURE__ */ i(
|
|
677
774
|
"span",
|
|
678
775
|
{
|
|
679
776
|
role: "button",
|
|
680
777
|
tabIndex: 0,
|
|
681
778
|
className: "rudi-tag__close",
|
|
682
779
|
"aria-label": f,
|
|
683
|
-
onClick: (
|
|
684
|
-
|
|
780
|
+
onClick: (_) => {
|
|
781
|
+
_.stopPropagation(), l(!0), t?.();
|
|
685
782
|
},
|
|
686
|
-
onKeyDown: (
|
|
687
|
-
(
|
|
783
|
+
onKeyDown: (_) => {
|
|
784
|
+
(_.key === "Enter" || _.key === " ") && (_.preventDefault(), _.stopPropagation(), l(!0), t?.());
|
|
688
785
|
},
|
|
689
|
-
children: /* @__PURE__ */ i(
|
|
786
|
+
children: /* @__PURE__ */ i(R, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
690
787
|
}
|
|
691
788
|
)
|
|
692
789
|
] }) : /* @__PURE__ */ p(
|
|
693
790
|
"span",
|
|
694
791
|
{
|
|
695
|
-
className:
|
|
792
|
+
className: g,
|
|
696
793
|
...a ? { "aria-disabled": "true" } : {},
|
|
697
794
|
children: [
|
|
698
795
|
o,
|
|
699
|
-
|
|
796
|
+
r && /* @__PURE__ */ i(
|
|
700
797
|
"button",
|
|
701
798
|
{
|
|
702
799
|
type: "button",
|
|
703
800
|
className: "rudi-tag__close",
|
|
704
801
|
"aria-label": f,
|
|
705
802
|
onClick: () => {
|
|
706
|
-
|
|
803
|
+
l(!0), t?.();
|
|
707
804
|
},
|
|
708
|
-
children: /* @__PURE__ */ i(
|
|
805
|
+
children: /* @__PURE__ */ i(R, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
709
806
|
}
|
|
710
807
|
)
|
|
711
808
|
]
|
|
712
809
|
}
|
|
713
810
|
);
|
|
714
811
|
}
|
|
715
|
-
const
|
|
716
|
-
function({ variant:
|
|
812
|
+
const Zi = v(
|
|
813
|
+
function({ variant: r = "default", padding: t = "md", children: n, className: a }, o) {
|
|
717
814
|
return /* @__PURE__ */ i(
|
|
718
815
|
"div",
|
|
719
816
|
{
|
|
720
817
|
ref: o,
|
|
721
|
-
className:
|
|
818
|
+
className: u(
|
|
722
819
|
"rudi-card",
|
|
723
|
-
`rudi-card--${
|
|
820
|
+
`rudi-card--${r}`,
|
|
724
821
|
`rudi-card--padding-${t}`,
|
|
725
822
|
a
|
|
726
823
|
),
|
|
@@ -729,70 +826,70 @@ const vr = v(
|
|
|
729
826
|
);
|
|
730
827
|
}
|
|
731
828
|
);
|
|
732
|
-
function
|
|
733
|
-
return /* @__PURE__ */ i("div", { className:
|
|
829
|
+
function Qi({ children: e, className: r }) {
|
|
830
|
+
return /* @__PURE__ */ i("div", { className: u("rudi-card__header", r), children: e });
|
|
734
831
|
}
|
|
735
|
-
function
|
|
736
|
-
return /* @__PURE__ */ i("div", { className:
|
|
832
|
+
function Yi({ children: e, className: r }) {
|
|
833
|
+
return /* @__PURE__ */ i("div", { className: u("rudi-card__body", r), children: e });
|
|
737
834
|
}
|
|
738
|
-
function
|
|
739
|
-
return /* @__PURE__ */ i("div", { className:
|
|
835
|
+
function Ji({ children: e, className: r }) {
|
|
836
|
+
return /* @__PURE__ */ i("div", { className: u("rudi-card__footer", r), children: e });
|
|
740
837
|
}
|
|
741
|
-
const
|
|
742
|
-
Header:
|
|
743
|
-
Body:
|
|
744
|
-
Footer:
|
|
838
|
+
const ve = Object.assign(Zi, {
|
|
839
|
+
Header: Qi,
|
|
840
|
+
Body: Yi,
|
|
841
|
+
Footer: Ji
|
|
745
842
|
});
|
|
746
|
-
function
|
|
747
|
-
if (!t || t.length === 0) return
|
|
748
|
-
const n = [...t].sort((a, o) => o.at - a.at).find((a) =>
|
|
749
|
-
return n ? n.variant :
|
|
843
|
+
function et(e, r, t) {
|
|
844
|
+
if (!t || t.length === 0) return r;
|
|
845
|
+
const n = [...t].sort((a, o) => o.at - a.at).find((a) => e >= a.at);
|
|
846
|
+
return n ? n.variant : r;
|
|
750
847
|
}
|
|
751
|
-
function
|
|
752
|
-
value:
|
|
753
|
-
minValue:
|
|
848
|
+
function un({
|
|
849
|
+
value: e,
|
|
850
|
+
minValue: r = 0,
|
|
754
851
|
maxValue: t = 100,
|
|
755
852
|
label: n,
|
|
756
853
|
showValueLabel: a = !1,
|
|
757
854
|
variant: o = "default",
|
|
758
|
-
thresholds:
|
|
759
|
-
size:
|
|
760
|
-
className:
|
|
855
|
+
thresholds: s,
|
|
856
|
+
size: d = "md",
|
|
857
|
+
className: l
|
|
761
858
|
}) {
|
|
762
|
-
const { progressBarProps:
|
|
859
|
+
const { progressBarProps: c, labelProps: m } = Te({
|
|
763
860
|
label: n,
|
|
764
|
-
value:
|
|
765
|
-
minValue:
|
|
861
|
+
value: e,
|
|
862
|
+
minValue: r,
|
|
766
863
|
maxValue: t
|
|
767
|
-
}), f = t -
|
|
864
|
+
}), f = t - r, g = f === 0 ? 0 : (e - r) / f * 100, _ = Math.min(100, Math.max(0, g)), h = et(_, o, s);
|
|
768
865
|
return /* @__PURE__ */ p(
|
|
769
866
|
"div",
|
|
770
867
|
{
|
|
771
|
-
...
|
|
772
|
-
className:
|
|
868
|
+
...c,
|
|
869
|
+
className: u("rudi-progress", l),
|
|
773
870
|
children: [
|
|
774
871
|
/* @__PURE__ */ p("div", { className: "rudi-progress__label-row", children: [
|
|
775
|
-
/* @__PURE__ */ i("span", { ...
|
|
872
|
+
/* @__PURE__ */ i("span", { ...m, className: "rudi-progress__label", children: n }),
|
|
776
873
|
a && /* @__PURE__ */ p("span", { className: "rudi-progress__value", children: [
|
|
777
|
-
Math.round(
|
|
874
|
+
Math.round(_),
|
|
778
875
|
"%"
|
|
779
876
|
] })
|
|
780
877
|
] }),
|
|
781
878
|
/* @__PURE__ */ i(
|
|
782
879
|
"div",
|
|
783
880
|
{
|
|
784
|
-
className:
|
|
881
|
+
className: u(
|
|
785
882
|
"rudi-progress__track",
|
|
786
|
-
`rudi-progress__track--${
|
|
883
|
+
`rudi-progress__track--${d}`
|
|
787
884
|
),
|
|
788
885
|
children: /* @__PURE__ */ i(
|
|
789
886
|
"div",
|
|
790
887
|
{
|
|
791
|
-
className:
|
|
888
|
+
className: u(
|
|
792
889
|
"rudi-progress__bar",
|
|
793
|
-
`rudi-progress__bar--${
|
|
890
|
+
`rudi-progress__bar--${h}`
|
|
794
891
|
),
|
|
795
|
-
style: { width: `${
|
|
892
|
+
style: { width: `${_}%` }
|
|
796
893
|
}
|
|
797
894
|
)
|
|
798
895
|
}
|
|
@@ -801,24 +898,24 @@ function ci({
|
|
|
801
898
|
}
|
|
802
899
|
);
|
|
803
900
|
}
|
|
804
|
-
function
|
|
805
|
-
orientation:
|
|
806
|
-
spacing:
|
|
901
|
+
function mn({
|
|
902
|
+
orientation: e = "horizontal",
|
|
903
|
+
spacing: r = "md",
|
|
807
904
|
label: t,
|
|
808
905
|
className: n
|
|
809
906
|
}) {
|
|
810
|
-
const a =
|
|
907
|
+
const a = u(
|
|
811
908
|
"rudi-divider",
|
|
812
|
-
`rudi-divider--${
|
|
813
|
-
`rudi-divider--spacing-${
|
|
814
|
-
t &&
|
|
909
|
+
`rudi-divider--${e}`,
|
|
910
|
+
`rudi-divider--spacing-${r}`,
|
|
911
|
+
t && e === "horizontal" && "rudi-divider--labeled",
|
|
815
912
|
n
|
|
816
913
|
);
|
|
817
|
-
return t &&
|
|
914
|
+
return t && e === "horizontal" ? /* @__PURE__ */ p("div", { className: a, role: "separator", "aria-orientation": "horizontal", children: [
|
|
818
915
|
/* @__PURE__ */ i("span", { className: "rudi-divider__line", "aria-hidden": "true" }),
|
|
819
916
|
/* @__PURE__ */ i("span", { className: "rudi-divider__label", children: t }),
|
|
820
917
|
/* @__PURE__ */ i("span", { className: "rudi-divider__line", "aria-hidden": "true" })
|
|
821
|
-
] }) :
|
|
918
|
+
] }) : e === "vertical" ? /* @__PURE__ */ i(
|
|
822
919
|
"div",
|
|
823
920
|
{
|
|
824
921
|
className: a,
|
|
@@ -827,59 +924,60 @@ function li({
|
|
|
827
924
|
}
|
|
828
925
|
) : /* @__PURE__ */ i("hr", { className: a });
|
|
829
926
|
}
|
|
830
|
-
function
|
|
831
|
-
tone:
|
|
832
|
-
color:
|
|
927
|
+
function pn({
|
|
928
|
+
tone: e = "default",
|
|
929
|
+
color: r,
|
|
833
930
|
size: t = "md",
|
|
834
931
|
pulse: n = !1,
|
|
835
932
|
label: a,
|
|
836
933
|
className: o
|
|
837
934
|
}) {
|
|
838
|
-
const
|
|
935
|
+
const s = r ? { "--rudi-dot-color": r } : void 0;
|
|
839
936
|
return /* @__PURE__ */ i(
|
|
840
937
|
"span",
|
|
841
938
|
{
|
|
842
|
-
className:
|
|
939
|
+
className: u(
|
|
843
940
|
"rudi-dot",
|
|
844
|
-
!
|
|
941
|
+
!r && `rudi-dot--${e}`,
|
|
845
942
|
`rudi-dot--${t}`,
|
|
846
943
|
n && "rudi-dot--pulse",
|
|
847
944
|
o
|
|
848
945
|
),
|
|
849
|
-
style:
|
|
946
|
+
style: s,
|
|
850
947
|
role: a ? "status" : void 0,
|
|
851
948
|
"aria-hidden": a ? void 0 : !0,
|
|
852
949
|
children: a && /* @__PURE__ */ i("span", { className: "rudi-dot__label", children: a })
|
|
853
950
|
}
|
|
854
951
|
);
|
|
855
952
|
}
|
|
856
|
-
const
|
|
953
|
+
const hn = D.forwardRef(
|
|
857
954
|
function({
|
|
858
|
-
href:
|
|
955
|
+
href: r,
|
|
859
956
|
variant: t = "default",
|
|
860
957
|
underline: n = "hover",
|
|
861
958
|
external: a = !1,
|
|
862
959
|
children: o,
|
|
863
|
-
className:
|
|
864
|
-
...
|
|
865
|
-
},
|
|
960
|
+
className: s,
|
|
961
|
+
...d
|
|
962
|
+
}, l) {
|
|
963
|
+
const c = B(l), m = a ? { target: "_blank", rel: "noreferrer noopener" } : {}, { linkProps: f } = W({ href: r, ...m }, c);
|
|
866
964
|
return /* @__PURE__ */ p(
|
|
867
965
|
"a",
|
|
868
966
|
{
|
|
869
|
-
...
|
|
870
|
-
...
|
|
871
|
-
ref:
|
|
872
|
-
href:
|
|
873
|
-
className:
|
|
967
|
+
...Nr(d, f),
|
|
968
|
+
...m,
|
|
969
|
+
ref: c,
|
|
970
|
+
href: r,
|
|
971
|
+
className: u(
|
|
874
972
|
"rudi-link",
|
|
875
973
|
`rudi-link--${t}`,
|
|
876
974
|
`rudi-link--underline-${n}`,
|
|
877
|
-
|
|
975
|
+
s
|
|
878
976
|
),
|
|
879
977
|
children: [
|
|
880
978
|
o,
|
|
881
979
|
a && /* @__PURE__ */ i(
|
|
882
|
-
|
|
980
|
+
R,
|
|
883
981
|
{
|
|
884
982
|
icon: "lucide:arrow-up-right",
|
|
885
983
|
size: "sm",
|
|
@@ -891,130 +989,130 @@ const mi = P.forwardRef(
|
|
|
891
989
|
);
|
|
892
990
|
}
|
|
893
991
|
);
|
|
894
|
-
function
|
|
895
|
-
src:
|
|
896
|
-
alt:
|
|
992
|
+
function fn({
|
|
993
|
+
src: e,
|
|
994
|
+
alt: r,
|
|
897
995
|
aspectRatio: t,
|
|
898
996
|
fit: n = "cover",
|
|
899
997
|
radius: a = "md",
|
|
900
998
|
loading: o = "lazy",
|
|
901
|
-
overlay:
|
|
902
|
-
className:
|
|
999
|
+
overlay: s,
|
|
1000
|
+
className: d
|
|
903
1001
|
}) {
|
|
904
1002
|
return /* @__PURE__ */ p(
|
|
905
1003
|
"div",
|
|
906
1004
|
{
|
|
907
|
-
className:
|
|
1005
|
+
className: u("rudi-image", `rudi-image--radius-${a}`, d),
|
|
908
1006
|
style: t ? { aspectRatio: t } : void 0,
|
|
909
1007
|
children: [
|
|
910
1008
|
/* @__PURE__ */ i(
|
|
911
1009
|
"img",
|
|
912
1010
|
{
|
|
913
|
-
src:
|
|
914
|
-
alt:
|
|
1011
|
+
src: e,
|
|
1012
|
+
alt: r,
|
|
915
1013
|
loading: o,
|
|
916
|
-
className:
|
|
1014
|
+
className: u("rudi-image__img", `rudi-image__img--${n}`)
|
|
917
1015
|
}
|
|
918
1016
|
),
|
|
919
|
-
|
|
1017
|
+
s != null && /* @__PURE__ */ i("div", { className: "rudi-image__overlay", children: s })
|
|
920
1018
|
]
|
|
921
1019
|
}
|
|
922
1020
|
);
|
|
923
1021
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
1022
|
+
function rt(e, r) {
|
|
1023
|
+
return r >= e + 1 ? "full" : r >= e + 0.5 ? "half" : "empty";
|
|
926
1024
|
}
|
|
927
|
-
function
|
|
928
|
-
value:
|
|
929
|
-
max:
|
|
1025
|
+
function _n({
|
|
1026
|
+
value: e,
|
|
1027
|
+
max: r = 5,
|
|
930
1028
|
size: t = "md",
|
|
931
1029
|
onChange: n,
|
|
932
1030
|
showValue: a = !1,
|
|
933
1031
|
count: o,
|
|
934
|
-
label:
|
|
935
|
-
className:
|
|
1032
|
+
label: s,
|
|
1033
|
+
className: d
|
|
936
1034
|
}) {
|
|
937
|
-
const
|
|
938
|
-
|
|
1035
|
+
const l = typeof n == "function", c = l ? Math.round(e) : e, m = Array.from({ length: r }, (h, b) => rt(b, c)), f = s ?? `Rated ${c} out of ${r}`, g = (h) => /* @__PURE__ */ i(
|
|
1036
|
+
R,
|
|
939
1037
|
{
|
|
940
|
-
icon:
|
|
1038
|
+
icon: h === "half" ? "lucide:star-half" : "lucide:star",
|
|
941
1039
|
size: t,
|
|
942
|
-
className:
|
|
1040
|
+
className: u("rudi-rating__star", `rudi-rating__star--${h}`)
|
|
943
1041
|
}
|
|
944
|
-
),
|
|
945
|
-
a &&
|
|
1042
|
+
), _ = (a || o != null) && /* @__PURE__ */ p("span", { className: "rudi-rating__text", children: [
|
|
1043
|
+
a && c.toFixed(1),
|
|
946
1044
|
o != null && ` (${o})`
|
|
947
1045
|
] });
|
|
948
|
-
return
|
|
1046
|
+
return l ? /* @__PURE__ */ p(
|
|
949
1047
|
"div",
|
|
950
1048
|
{
|
|
951
|
-
className:
|
|
1049
|
+
className: u("rudi-rating", `rudi-rating--${t}`, d),
|
|
952
1050
|
role: "radiogroup",
|
|
953
1051
|
"aria-label": f,
|
|
954
1052
|
children: [
|
|
955
|
-
|
|
1053
|
+
m.map((h, b) => /* @__PURE__ */ i(
|
|
956
1054
|
"button",
|
|
957
1055
|
{
|
|
958
1056
|
type: "button",
|
|
959
1057
|
role: "radio",
|
|
960
|
-
"aria-checked": Math.round(
|
|
1058
|
+
"aria-checked": Math.round(e) === b + 1,
|
|
961
1059
|
"aria-label": `${b + 1} star${b === 0 ? "" : "s"}`,
|
|
962
1060
|
className: "rudi-rating__button",
|
|
963
1061
|
onClick: () => n(b + 1),
|
|
964
|
-
children:
|
|
1062
|
+
children: g(h)
|
|
965
1063
|
},
|
|
966
1064
|
b
|
|
967
1065
|
)),
|
|
968
|
-
|
|
1066
|
+
_
|
|
969
1067
|
]
|
|
970
1068
|
}
|
|
971
1069
|
) : /* @__PURE__ */ p(
|
|
972
1070
|
"div",
|
|
973
1071
|
{
|
|
974
|
-
className:
|
|
1072
|
+
className: u("rudi-rating", `rudi-rating--${t}`, d),
|
|
975
1073
|
role: "img",
|
|
976
1074
|
"aria-label": f,
|
|
977
1075
|
children: [
|
|
978
|
-
/* @__PURE__ */ i("span", { className: "rudi-rating__stars", "aria-hidden": "true", children:
|
|
979
|
-
|
|
1076
|
+
/* @__PURE__ */ i("span", { className: "rudi-rating__stars", "aria-hidden": "true", children: m.map((h, b) => /* @__PURE__ */ i("span", { children: g(h) }, b)) }),
|
|
1077
|
+
_
|
|
980
1078
|
]
|
|
981
1079
|
}
|
|
982
1080
|
);
|
|
983
1081
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
1082
|
+
function it(e, r) {
|
|
1083
|
+
return e.icon ? /* @__PURE__ */ i(R, { icon: e.icon, size: "sm" }) : e.status === "complete" ? /* @__PURE__ */ i(R, { icon: "lucide:check", size: "sm" }) : /* @__PURE__ */ i("span", { className: "rudi-stepper__number", children: r + 1 });
|
|
986
1084
|
}
|
|
987
|
-
function
|
|
988
|
-
steps:
|
|
989
|
-
orientation:
|
|
1085
|
+
function bn({
|
|
1086
|
+
steps: e,
|
|
1087
|
+
orientation: r = "horizontal",
|
|
990
1088
|
size: t = "md",
|
|
991
1089
|
className: n
|
|
992
1090
|
}) {
|
|
993
1091
|
return /* @__PURE__ */ i(
|
|
994
1092
|
"ol",
|
|
995
1093
|
{
|
|
996
|
-
className:
|
|
1094
|
+
className: u(
|
|
997
1095
|
"rudi-stepper",
|
|
998
|
-
`rudi-stepper--${
|
|
1096
|
+
`rudi-stepper--${r}`,
|
|
999
1097
|
`rudi-stepper--${t}`,
|
|
1000
1098
|
n
|
|
1001
1099
|
),
|
|
1002
|
-
children:
|
|
1003
|
-
const
|
|
1100
|
+
children: e.map((a, o) => {
|
|
1101
|
+
const s = a.status ?? "upcoming", d = s === "complete" || s === "current", l = o < e.length - 1 && (e[o + 1].status ?? "upcoming") !== "upcoming";
|
|
1004
1102
|
return /* @__PURE__ */ p(
|
|
1005
1103
|
"li",
|
|
1006
1104
|
{
|
|
1007
|
-
className:
|
|
1008
|
-
"aria-current":
|
|
1105
|
+
className: u("rudi-stepper__step", `rudi-stepper__step--${s}`),
|
|
1106
|
+
"aria-current": s === "current" ? "step" : void 0,
|
|
1009
1107
|
children: [
|
|
1010
1108
|
/* @__PURE__ */ p("div", { className: "rudi-stepper__marker", children: [
|
|
1011
1109
|
o > 0 && /* @__PURE__ */ i(
|
|
1012
1110
|
"span",
|
|
1013
1111
|
{
|
|
1014
|
-
className:
|
|
1112
|
+
className: u(
|
|
1015
1113
|
"rudi-stepper__connector",
|
|
1016
1114
|
"rudi-stepper__connector--before",
|
|
1017
|
-
|
|
1115
|
+
d && "rudi-stepper__connector--filled"
|
|
1018
1116
|
),
|
|
1019
1117
|
"aria-hidden": "true"
|
|
1020
1118
|
}
|
|
@@ -1022,20 +1120,20 @@ function fi({
|
|
|
1022
1120
|
/* @__PURE__ */ i(
|
|
1023
1121
|
"span",
|
|
1024
1122
|
{
|
|
1025
|
-
className:
|
|
1123
|
+
className: u(
|
|
1026
1124
|
"rudi-stepper__node",
|
|
1027
|
-
|
|
1125
|
+
d && "rudi-stepper__node--filled"
|
|
1028
1126
|
),
|
|
1029
|
-
children:
|
|
1127
|
+
children: it(a, o)
|
|
1030
1128
|
}
|
|
1031
1129
|
),
|
|
1032
|
-
o <
|
|
1130
|
+
o < e.length - 1 && /* @__PURE__ */ i(
|
|
1033
1131
|
"span",
|
|
1034
1132
|
{
|
|
1035
|
-
className:
|
|
1133
|
+
className: u(
|
|
1036
1134
|
"rudi-stepper__connector",
|
|
1037
1135
|
"rudi-stepper__connector--after",
|
|
1038
|
-
|
|
1136
|
+
l && "rudi-stepper__connector--filled"
|
|
1039
1137
|
),
|
|
1040
1138
|
"aria-hidden": "true"
|
|
1041
1139
|
}
|
|
@@ -1053,45 +1151,45 @@ function fi({
|
|
|
1053
1151
|
}
|
|
1054
1152
|
);
|
|
1055
1153
|
}
|
|
1056
|
-
const
|
|
1057
|
-
label:
|
|
1154
|
+
const gn = D.forwardRef(function({
|
|
1155
|
+
label: r,
|
|
1058
1156
|
placeholder: t,
|
|
1059
1157
|
description: n,
|
|
1060
1158
|
errorMessage: a,
|
|
1061
1159
|
isRequired: o = !1,
|
|
1062
|
-
isDisabled:
|
|
1063
|
-
value:
|
|
1064
|
-
defaultValue:
|
|
1065
|
-
onChange:
|
|
1066
|
-
rows:
|
|
1160
|
+
isDisabled: s = !1,
|
|
1161
|
+
value: d,
|
|
1162
|
+
defaultValue: l,
|
|
1163
|
+
onChange: c,
|
|
1164
|
+
rows: m = 4,
|
|
1067
1165
|
resize: f = "vertical",
|
|
1068
|
-
className:
|
|
1069
|
-
},
|
|
1070
|
-
const
|
|
1166
|
+
className: g
|
|
1167
|
+
}, _) {
|
|
1168
|
+
const h = B(_), {
|
|
1071
1169
|
labelProps: b,
|
|
1072
|
-
inputProps:
|
|
1170
|
+
inputProps: N,
|
|
1073
1171
|
descriptionProps: y,
|
|
1074
|
-
errorMessageProps:
|
|
1075
|
-
isInvalid:
|
|
1076
|
-
} =
|
|
1172
|
+
errorMessageProps: k,
|
|
1173
|
+
isInvalid: C
|
|
1174
|
+
} = xe(
|
|
1077
1175
|
{
|
|
1078
|
-
label:
|
|
1176
|
+
label: r,
|
|
1079
1177
|
placeholder: t,
|
|
1080
1178
|
description: n,
|
|
1081
1179
|
errorMessage: a,
|
|
1082
1180
|
isRequired: o,
|
|
1083
|
-
isDisabled:
|
|
1084
|
-
value:
|
|
1085
|
-
defaultValue:
|
|
1086
|
-
onChange:
|
|
1181
|
+
isDisabled: s,
|
|
1182
|
+
value: d,
|
|
1183
|
+
defaultValue: l,
|
|
1184
|
+
onChange: c,
|
|
1087
1185
|
isInvalid: !!a,
|
|
1088
1186
|
inputElementType: "textarea"
|
|
1089
1187
|
},
|
|
1090
|
-
|
|
1188
|
+
h
|
|
1091
1189
|
);
|
|
1092
|
-
return /* @__PURE__ */ p("div", { className:
|
|
1190
|
+
return /* @__PURE__ */ p("div", { className: u("rudi-textarea", g), children: [
|
|
1093
1191
|
/* @__PURE__ */ p("label", { ...b, className: "rudi-textarea__label", children: [
|
|
1094
|
-
|
|
1192
|
+
r,
|
|
1095
1193
|
o && /* @__PURE__ */ p("span", { className: "rudi-textarea__required", "aria-hidden": "true", children: [
|
|
1096
1194
|
" ",
|
|
1097
1195
|
"*"
|
|
@@ -1100,41 +1198,45 @@ const _i = P.forwardRef(function({
|
|
|
1100
1198
|
/* @__PURE__ */ i(
|
|
1101
1199
|
"textarea",
|
|
1102
1200
|
{
|
|
1103
|
-
...
|
|
1104
|
-
ref:
|
|
1105
|
-
rows:
|
|
1106
|
-
className:
|
|
1201
|
+
...N,
|
|
1202
|
+
ref: h,
|
|
1203
|
+
rows: m,
|
|
1204
|
+
className: u(
|
|
1107
1205
|
"rudi-textarea__field",
|
|
1108
1206
|
`rudi-textarea__field--resize-${f}`,
|
|
1109
|
-
|
|
1207
|
+
C && "rudi-textarea__field--error"
|
|
1110
1208
|
)
|
|
1111
1209
|
}
|
|
1112
1210
|
),
|
|
1113
|
-
n && !
|
|
1114
|
-
|
|
1211
|
+
n && !C && /* @__PURE__ */ i("p", { ...y, className: "rudi-textarea__description", children: n }),
|
|
1212
|
+
C && a && /* @__PURE__ */ i("p", { ...k, className: "rudi-textarea__error", children: a })
|
|
1115
1213
|
] });
|
|
1116
1214
|
});
|
|
1117
|
-
function
|
|
1118
|
-
|
|
1119
|
-
|
|
1215
|
+
function tt({ href: e, children: r }) {
|
|
1216
|
+
const t = P(null), { linkProps: n } = W({ href: e }, t);
|
|
1217
|
+
return /* @__PURE__ */ i("a", { ...n, ref: t, href: e, className: "rudi-breadcrumb__link", children: r });
|
|
1218
|
+
}
|
|
1219
|
+
function Nn({
|
|
1220
|
+
items: e,
|
|
1221
|
+
separator: r = "lucide:chevron-right",
|
|
1120
1222
|
label: t = "Breadcrumb",
|
|
1121
1223
|
className: n
|
|
1122
1224
|
}) {
|
|
1123
|
-
return /* @__PURE__ */ i("nav", { "aria-label": t, className:
|
|
1124
|
-
const
|
|
1225
|
+
return /* @__PURE__ */ i("nav", { "aria-label": t, className: u("rudi-breadcrumb", n), children: /* @__PURE__ */ i("ol", { className: "rudi-breadcrumb__list", children: e.map((a, o) => {
|
|
1226
|
+
const s = o === e.length - 1;
|
|
1125
1227
|
return /* @__PURE__ */ p("li", { className: "rudi-breadcrumb__item", children: [
|
|
1126
|
-
|
|
1228
|
+
s || !a.href ? /* @__PURE__ */ i(
|
|
1127
1229
|
"span",
|
|
1128
1230
|
{
|
|
1129
1231
|
className: "rudi-breadcrumb__current",
|
|
1130
|
-
"aria-current":
|
|
1232
|
+
"aria-current": s ? "page" : void 0,
|
|
1131
1233
|
children: a.label
|
|
1132
1234
|
}
|
|
1133
|
-
) : /* @__PURE__ */ i(
|
|
1134
|
-
!
|
|
1135
|
-
|
|
1235
|
+
) : /* @__PURE__ */ i(tt, { href: a.href, children: a.label }),
|
|
1236
|
+
!s && /* @__PURE__ */ i(
|
|
1237
|
+
R,
|
|
1136
1238
|
{
|
|
1137
|
-
icon:
|
|
1239
|
+
icon: r,
|
|
1138
1240
|
size: "sm",
|
|
1139
1241
|
className: "rudi-breadcrumb__separator"
|
|
1140
1242
|
}
|
|
@@ -1142,59 +1244,59 @@ function gi({
|
|
|
1142
1244
|
] }, `${a.label}-${o}`);
|
|
1143
1245
|
}) }) });
|
|
1144
1246
|
}
|
|
1145
|
-
function
|
|
1247
|
+
function nt(e, r, t) {
|
|
1146
1248
|
const n = t * 2 + 5;
|
|
1147
|
-
if (
|
|
1148
|
-
return Array.from({ length:
|
|
1149
|
-
const a = Math.max(
|
|
1150
|
-
if (
|
|
1151
|
-
else for (let
|
|
1152
|
-
for (let
|
|
1153
|
-
|
|
1154
|
-
if (
|
|
1155
|
-
else for (let
|
|
1156
|
-
return
|
|
1157
|
-
}
|
|
1158
|
-
function
|
|
1159
|
-
page:
|
|
1160
|
-
pageCount:
|
|
1249
|
+
if (r <= n)
|
|
1250
|
+
return Array.from({ length: r }, (c, m) => m + 1);
|
|
1251
|
+
const a = Math.max(e - t, 1), o = Math.min(e + t, r), s = a > 2, d = o < r - 1, l = [1];
|
|
1252
|
+
if (s) l.push("ellipsis-start");
|
|
1253
|
+
else for (let c = 2; c < a; c++) l.push(c);
|
|
1254
|
+
for (let c = a; c <= o; c++)
|
|
1255
|
+
c !== 1 && c !== r && l.push(c);
|
|
1256
|
+
if (d) l.push("ellipsis-end");
|
|
1257
|
+
else for (let c = o + 1; c < r; c++) l.push(c);
|
|
1258
|
+
return l.push(r), l;
|
|
1259
|
+
}
|
|
1260
|
+
function vn({
|
|
1261
|
+
page: e,
|
|
1262
|
+
pageCount: r,
|
|
1161
1263
|
onPageChange: t,
|
|
1162
1264
|
siblingCount: n = 1,
|
|
1163
1265
|
label: a = "Pagination",
|
|
1164
1266
|
className: o
|
|
1165
1267
|
}) {
|
|
1166
|
-
if (
|
|
1167
|
-
const
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1268
|
+
if (r <= 1) return null;
|
|
1269
|
+
const s = nt(e, r, n), d = (l) => {
|
|
1270
|
+
const c = Math.min(Math.max(l, 1), r);
|
|
1271
|
+
c !== e && t(c);
|
|
1170
1272
|
};
|
|
1171
|
-
return /* @__PURE__ */ i("nav", { "aria-label": a, className:
|
|
1273
|
+
return /* @__PURE__ */ i("nav", { "aria-label": a, className: u("rudi-pagination", o), children: /* @__PURE__ */ p("ul", { className: "rudi-pagination__list", children: [
|
|
1172
1274
|
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1173
1275
|
"button",
|
|
1174
1276
|
{
|
|
1175
1277
|
type: "button",
|
|
1176
1278
|
className: "rudi-pagination__control",
|
|
1177
1279
|
"aria-label": "Go to previous page",
|
|
1178
|
-
disabled:
|
|
1179
|
-
onClick: () =>
|
|
1180
|
-
children: /* @__PURE__ */ i(
|
|
1280
|
+
disabled: e <= 1,
|
|
1281
|
+
onClick: () => d(e - 1),
|
|
1282
|
+
children: /* @__PURE__ */ i(R, { icon: "lucide:chevron-left", size: "sm" })
|
|
1181
1283
|
}
|
|
1182
1284
|
) }),
|
|
1183
|
-
|
|
1184
|
-
(
|
|
1285
|
+
s.map(
|
|
1286
|
+
(l) => typeof l == "number" ? /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1185
1287
|
"button",
|
|
1186
1288
|
{
|
|
1187
1289
|
type: "button",
|
|
1188
|
-
className:
|
|
1290
|
+
className: u(
|
|
1189
1291
|
"rudi-pagination__page",
|
|
1190
|
-
|
|
1292
|
+
l === e && "rudi-pagination__page--active"
|
|
1191
1293
|
),
|
|
1192
|
-
"aria-label": `Go to page ${
|
|
1193
|
-
"aria-current":
|
|
1194
|
-
onClick: () =>
|
|
1195
|
-
children:
|
|
1294
|
+
"aria-label": `Go to page ${l}`,
|
|
1295
|
+
"aria-current": l === e ? "page" : void 0,
|
|
1296
|
+
onClick: () => d(l),
|
|
1297
|
+
children: l
|
|
1196
1298
|
}
|
|
1197
|
-
) },
|
|
1299
|
+
) }, l) : /* @__PURE__ */ i("li", { className: "rudi-pagination__ellipsis", "aria-hidden": "true", children: "…" }, l)
|
|
1198
1300
|
),
|
|
1199
1301
|
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1200
1302
|
"button",
|
|
@@ -1202,48 +1304,48 @@ function bi({
|
|
|
1202
1304
|
type: "button",
|
|
1203
1305
|
className: "rudi-pagination__control",
|
|
1204
1306
|
"aria-label": "Go to next page",
|
|
1205
|
-
disabled:
|
|
1206
|
-
onClick: () =>
|
|
1207
|
-
children: /* @__PURE__ */ i(
|
|
1307
|
+
disabled: e >= r,
|
|
1308
|
+
onClick: () => d(e + 1),
|
|
1309
|
+
children: /* @__PURE__ */ i(R, { icon: "lucide:chevron-right", size: "sm" })
|
|
1208
1310
|
}
|
|
1209
1311
|
) })
|
|
1210
1312
|
] }) });
|
|
1211
1313
|
}
|
|
1212
|
-
function
|
|
1213
|
-
const
|
|
1214
|
-
return
|
|
1314
|
+
function at(e) {
|
|
1315
|
+
const r = e.trim().split(/\s+/);
|
|
1316
|
+
return r.length >= 2 ? (r[0][0] + r[r.length - 1][0]).toUpperCase() : (r[0]?.[0] ?? "").toUpperCase();
|
|
1215
1317
|
}
|
|
1216
|
-
function
|
|
1217
|
-
src:
|
|
1218
|
-
alt:
|
|
1318
|
+
function Rn({
|
|
1319
|
+
src: e,
|
|
1320
|
+
alt: r,
|
|
1219
1321
|
name: t,
|
|
1220
1322
|
size: n = "md",
|
|
1221
1323
|
status: a,
|
|
1222
1324
|
className: o
|
|
1223
1325
|
}) {
|
|
1224
|
-
const [
|
|
1326
|
+
const [s, d] = O(!1), l = e && !s, c = t ? at(t) : "", m = r || t;
|
|
1225
1327
|
return /* @__PURE__ */ p(
|
|
1226
1328
|
"span",
|
|
1227
1329
|
{
|
|
1228
|
-
className:
|
|
1330
|
+
className: u(
|
|
1229
1331
|
"rudi-avatar",
|
|
1230
1332
|
`rudi-avatar--${n}`,
|
|
1231
1333
|
o
|
|
1232
1334
|
),
|
|
1233
1335
|
role: "img",
|
|
1234
|
-
"aria-label":
|
|
1336
|
+
"aria-label": m,
|
|
1235
1337
|
children: [
|
|
1236
|
-
|
|
1338
|
+
l ? /* @__PURE__ */ i(
|
|
1237
1339
|
"img",
|
|
1238
1340
|
{
|
|
1239
|
-
src:
|
|
1240
|
-
alt:
|
|
1341
|
+
src: e,
|
|
1342
|
+
alt: r || "",
|
|
1241
1343
|
className: "rudi-avatar__image",
|
|
1242
|
-
onError: () =>
|
|
1344
|
+
onError: () => d(!0)
|
|
1243
1345
|
}
|
|
1244
|
-
) : /* @__PURE__ */ i("span", { className: "rudi-avatar__initials", "aria-hidden": "true", children:
|
|
1346
|
+
) : /* @__PURE__ */ i("span", { className: "rudi-avatar__initials", "aria-hidden": "true", children: c }),
|
|
1245
1347
|
a && /* @__PURE__ */ i(
|
|
1246
|
-
|
|
1348
|
+
Xi,
|
|
1247
1349
|
{
|
|
1248
1350
|
variant: a,
|
|
1249
1351
|
dot: !0,
|
|
@@ -1254,27 +1356,27 @@ function vi({
|
|
|
1254
1356
|
}
|
|
1255
1357
|
);
|
|
1256
1358
|
}
|
|
1257
|
-
function
|
|
1258
|
-
label:
|
|
1259
|
-
value:
|
|
1359
|
+
function yn({
|
|
1360
|
+
label: e,
|
|
1361
|
+
value: r,
|
|
1260
1362
|
delta: t,
|
|
1261
1363
|
trend: n = "neutral",
|
|
1262
1364
|
children: a,
|
|
1263
1365
|
className: o
|
|
1264
1366
|
}) {
|
|
1265
1367
|
return /* @__PURE__ */ i(
|
|
1266
|
-
|
|
1368
|
+
ve,
|
|
1267
1369
|
{
|
|
1268
1370
|
variant: "outlined",
|
|
1269
1371
|
padding: "md",
|
|
1270
|
-
className:
|
|
1271
|
-
children: /* @__PURE__ */ p(
|
|
1272
|
-
/* @__PURE__ */ i("span", { className: "rudi-stat-card__label", children:
|
|
1273
|
-
/* @__PURE__ */ i("span", { className: "rudi-stat-card__value", children:
|
|
1372
|
+
className: u("rudi-stat-card", o),
|
|
1373
|
+
children: /* @__PURE__ */ p(ve.Body, { children: [
|
|
1374
|
+
/* @__PURE__ */ i("span", { className: "rudi-stat-card__label", children: e }),
|
|
1375
|
+
/* @__PURE__ */ i("span", { className: "rudi-stat-card__value", children: r }),
|
|
1274
1376
|
t && /* @__PURE__ */ i(
|
|
1275
1377
|
"span",
|
|
1276
1378
|
{
|
|
1277
|
-
className:
|
|
1379
|
+
className: u(
|
|
1278
1380
|
"rudi-stat-card__delta",
|
|
1279
1381
|
`rudi-stat-card__delta--${n}`
|
|
1280
1382
|
),
|
|
@@ -1286,125 +1388,127 @@ function Ni({
|
|
|
1286
1388
|
}
|
|
1287
1389
|
);
|
|
1288
1390
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return
|
|
1391
|
+
function Ke(e, r) {
|
|
1392
|
+
return u(
|
|
1291
1393
|
"rudi-nav-item",
|
|
1292
|
-
|
|
1293
|
-
|
|
1394
|
+
e && "rudi-nav-item--active",
|
|
1395
|
+
r
|
|
1294
1396
|
);
|
|
1295
1397
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return /* @__PURE__ */ p(
|
|
1298
|
-
|
|
1299
|
-
/* @__PURE__ */ i("span", { className: "rudi-nav-item__label", children:
|
|
1398
|
+
function Ve(e, r, t) {
|
|
1399
|
+
return /* @__PURE__ */ p(w, { children: [
|
|
1400
|
+
e && /* @__PURE__ */ i(R, { icon: e, className: "rudi-nav-item__icon" }),
|
|
1401
|
+
/* @__PURE__ */ i("span", { className: "rudi-nav-item__label", children: r }),
|
|
1300
1402
|
t && /* @__PURE__ */ i("span", { className: "rudi-nav-item__badge", children: t })
|
|
1301
1403
|
] });
|
|
1302
1404
|
}
|
|
1303
|
-
const
|
|
1304
|
-
function({ label:
|
|
1305
|
-
const
|
|
1306
|
-
{ href: a, isDisabled:
|
|
1307
|
-
|
|
1405
|
+
const ot = v(
|
|
1406
|
+
function({ label: r, icon: t, isActive: n = !1, href: a, onPress: o, badge: s, isDisabled: d = !1, className: l }, c) {
|
|
1407
|
+
const m = B(c), { linkProps: f } = W(
|
|
1408
|
+
{ href: a, isDisabled: d, onPress: o },
|
|
1409
|
+
m
|
|
1308
1410
|
);
|
|
1309
1411
|
return /* @__PURE__ */ i(
|
|
1310
1412
|
"a",
|
|
1311
1413
|
{
|
|
1312
1414
|
...f,
|
|
1313
|
-
ref:
|
|
1415
|
+
ref: m,
|
|
1314
1416
|
href: a,
|
|
1315
|
-
|
|
1316
|
-
|
|
1417
|
+
"aria-current": n ? "page" : void 0,
|
|
1418
|
+
className: Ke(n, l),
|
|
1419
|
+
children: Ve(t, r, s)
|
|
1317
1420
|
}
|
|
1318
1421
|
);
|
|
1319
1422
|
}
|
|
1320
|
-
),
|
|
1321
|
-
function({ label:
|
|
1322
|
-
const
|
|
1323
|
-
{ onPress: a, isDisabled:
|
|
1324
|
-
|
|
1423
|
+
), st = v(
|
|
1424
|
+
function({ label: r, icon: t, isActive: n = !1, onPress: a, badge: o, isDisabled: s = !1, className: d }, l) {
|
|
1425
|
+
const c = B(l), { buttonProps: m } = G(
|
|
1426
|
+
{ onPress: a, isDisabled: s },
|
|
1427
|
+
c
|
|
1325
1428
|
);
|
|
1326
1429
|
return /* @__PURE__ */ i(
|
|
1327
1430
|
"button",
|
|
1328
1431
|
{
|
|
1329
|
-
...
|
|
1330
|
-
ref:
|
|
1331
|
-
|
|
1332
|
-
|
|
1432
|
+
...m,
|
|
1433
|
+
ref: c,
|
|
1434
|
+
"aria-current": n ? "true" : void 0,
|
|
1435
|
+
className: Ke(n, d),
|
|
1436
|
+
children: Ve(t, r, o)
|
|
1333
1437
|
}
|
|
1334
1438
|
);
|
|
1335
1439
|
}
|
|
1336
|
-
),
|
|
1337
|
-
function(
|
|
1338
|
-
return
|
|
1339
|
-
|
|
1440
|
+
), kn = v(
|
|
1441
|
+
function(r, t) {
|
|
1442
|
+
return r.href ? /* @__PURE__ */ i(
|
|
1443
|
+
ot,
|
|
1340
1444
|
{
|
|
1341
|
-
...
|
|
1445
|
+
...r,
|
|
1342
1446
|
ref: t
|
|
1343
1447
|
}
|
|
1344
1448
|
) : /* @__PURE__ */ i(
|
|
1345
|
-
|
|
1449
|
+
st,
|
|
1346
1450
|
{
|
|
1347
|
-
...
|
|
1451
|
+
...r,
|
|
1348
1452
|
ref: t
|
|
1349
1453
|
}
|
|
1350
1454
|
);
|
|
1351
1455
|
}
|
|
1352
|
-
),
|
|
1353
|
-
function
|
|
1354
|
-
value:
|
|
1355
|
-
minValue:
|
|
1456
|
+
), j = 100, V = j / 2;
|
|
1457
|
+
function xn({
|
|
1458
|
+
value: e,
|
|
1459
|
+
minValue: r = 0,
|
|
1356
1460
|
maxValue: t = 100,
|
|
1357
1461
|
label: n,
|
|
1358
1462
|
showValueLabel: a = !1,
|
|
1359
1463
|
variant: o = "default",
|
|
1360
|
-
size:
|
|
1361
|
-
children:
|
|
1362
|
-
className:
|
|
1464
|
+
size: s = "md",
|
|
1465
|
+
children: d,
|
|
1466
|
+
className: l
|
|
1363
1467
|
}) {
|
|
1364
|
-
const { progressBarProps:
|
|
1468
|
+
const { progressBarProps: c, labelProps: m } = Te({
|
|
1365
1469
|
label: n,
|
|
1366
|
-
value:
|
|
1367
|
-
minValue:
|
|
1470
|
+
value: e,
|
|
1471
|
+
minValue: r,
|
|
1368
1472
|
maxValue: t
|
|
1369
|
-
}), f = (
|
|
1473
|
+
}), f = (e - r) / (t - r) * 100, g = 8, _ = (j - g) / 2, h = 2 * Math.PI * _, b = h * (1 - f / 100);
|
|
1370
1474
|
return /* @__PURE__ */ p(
|
|
1371
1475
|
"div",
|
|
1372
1476
|
{
|
|
1373
|
-
...
|
|
1374
|
-
className:
|
|
1477
|
+
...c,
|
|
1478
|
+
className: u(
|
|
1375
1479
|
"rudi-circular-progress",
|
|
1376
|
-
`rudi-circular-progress--${
|
|
1377
|
-
|
|
1480
|
+
`rudi-circular-progress--${s}`,
|
|
1481
|
+
l
|
|
1378
1482
|
),
|
|
1379
1483
|
children: [
|
|
1380
1484
|
/* @__PURE__ */ p(
|
|
1381
1485
|
"svg",
|
|
1382
1486
|
{
|
|
1383
|
-
viewBox: `0 0 ${
|
|
1487
|
+
viewBox: `0 0 ${j} ${j}`,
|
|
1384
1488
|
className: "rudi-circular-progress__svg",
|
|
1385
1489
|
children: [
|
|
1386
1490
|
/* @__PURE__ */ i(
|
|
1387
1491
|
"circle",
|
|
1388
1492
|
{
|
|
1389
|
-
cx:
|
|
1390
|
-
cy:
|
|
1391
|
-
r:
|
|
1493
|
+
cx: V,
|
|
1494
|
+
cy: V,
|
|
1495
|
+
r: _,
|
|
1392
1496
|
className: "rudi-circular-progress__track",
|
|
1393
|
-
strokeWidth:
|
|
1497
|
+
strokeWidth: g
|
|
1394
1498
|
}
|
|
1395
1499
|
),
|
|
1396
1500
|
/* @__PURE__ */ i(
|
|
1397
1501
|
"circle",
|
|
1398
1502
|
{
|
|
1399
|
-
cx:
|
|
1400
|
-
cy:
|
|
1401
|
-
r:
|
|
1402
|
-
className:
|
|
1503
|
+
cx: V,
|
|
1504
|
+
cy: V,
|
|
1505
|
+
r: _,
|
|
1506
|
+
className: u(
|
|
1403
1507
|
"rudi-circular-progress__fill",
|
|
1404
1508
|
`rudi-circular-progress__fill--${o}`
|
|
1405
1509
|
),
|
|
1406
|
-
strokeWidth:
|
|
1407
|
-
strokeDasharray:
|
|
1510
|
+
strokeWidth: g,
|
|
1511
|
+
strokeDasharray: h,
|
|
1408
1512
|
strokeDashoffset: b,
|
|
1409
1513
|
strokeLinecap: "round"
|
|
1410
1514
|
}
|
|
@@ -1412,85 +1516,90 @@ function Ri({
|
|
|
1412
1516
|
]
|
|
1413
1517
|
}
|
|
1414
1518
|
),
|
|
1415
|
-
/* @__PURE__ */ i("div", { className: "rudi-circular-progress__center", children:
|
|
1519
|
+
/* @__PURE__ */ i("div", { className: "rudi-circular-progress__center", children: d ?? (a && /* @__PURE__ */ p("span", { className: "rudi-circular-progress__value", children: [
|
|
1416
1520
|
Math.round(f),
|
|
1417
1521
|
"%"
|
|
1418
1522
|
] })) }),
|
|
1419
|
-
/* @__PURE__ */ i("span", { ...
|
|
1523
|
+
/* @__PURE__ */ i("span", { ...m, className: "rudi-circular-progress__label", children: n })
|
|
1420
1524
|
]
|
|
1421
1525
|
}
|
|
1422
1526
|
);
|
|
1423
1527
|
}
|
|
1424
|
-
function
|
|
1425
|
-
data:
|
|
1426
|
-
dataKeys:
|
|
1528
|
+
function Cn({
|
|
1529
|
+
data: e,
|
|
1530
|
+
dataKeys: r,
|
|
1427
1531
|
indexKey: t,
|
|
1428
1532
|
layout: n = "vertical",
|
|
1429
1533
|
stacked: a = !1,
|
|
1430
1534
|
showLegend: o = !0,
|
|
1431
|
-
showGrid:
|
|
1432
|
-
height:
|
|
1433
|
-
label:
|
|
1434
|
-
className:
|
|
1535
|
+
showGrid: s = !0,
|
|
1536
|
+
height: d = 300,
|
|
1537
|
+
label: l,
|
|
1538
|
+
className: c
|
|
1435
1539
|
}) {
|
|
1436
|
-
const
|
|
1540
|
+
const m = pe(), f = n === "horizontal", g = f ? Math.min(
|
|
1541
|
+
220,
|
|
1542
|
+
Math.max(60, ...e.map((_) => String(_[t] ?? "").length * 8 + 24))
|
|
1543
|
+
) : void 0;
|
|
1437
1544
|
return /* @__PURE__ */ i(
|
|
1438
1545
|
"div",
|
|
1439
1546
|
{
|
|
1440
|
-
className:
|
|
1547
|
+
className: u("rudi-chart", c),
|
|
1441
1548
|
role: "img",
|
|
1442
|
-
"aria-label":
|
|
1443
|
-
children: /* @__PURE__ */ i(
|
|
1444
|
-
|
|
1549
|
+
"aria-label": l,
|
|
1550
|
+
children: /* @__PURE__ */ i(le, { width: "100%", height: d, children: /* @__PURE__ */ p(
|
|
1551
|
+
pi,
|
|
1445
1552
|
{
|
|
1446
|
-
data:
|
|
1553
|
+
data: e,
|
|
1447
1554
|
layout: f ? "vertical" : "horizontal",
|
|
1448
1555
|
children: [
|
|
1449
|
-
|
|
1450
|
-
|
|
1556
|
+
s && /* @__PURE__ */ i(
|
|
1557
|
+
Oe,
|
|
1451
1558
|
{
|
|
1452
1559
|
strokeDasharray: "3 3",
|
|
1453
|
-
stroke:
|
|
1454
|
-
vertical:
|
|
1560
|
+
stroke: m.gridColor,
|
|
1561
|
+
vertical: f,
|
|
1455
1562
|
horizontal: !f
|
|
1456
1563
|
}
|
|
1457
1564
|
),
|
|
1458
|
-
f ? /* @__PURE__ */ p(
|
|
1459
|
-
/* @__PURE__ */ i(
|
|
1565
|
+
f ? /* @__PURE__ */ p(w, { children: [
|
|
1566
|
+
/* @__PURE__ */ i(J, { type: "number", tick: { fill: m.axisColor } }),
|
|
1460
1567
|
/* @__PURE__ */ i(
|
|
1461
|
-
|
|
1568
|
+
ee,
|
|
1462
1569
|
{
|
|
1463
1570
|
dataKey: t,
|
|
1464
1571
|
type: "category",
|
|
1465
|
-
|
|
1572
|
+
width: g,
|
|
1573
|
+
tick: { fill: m.axisColor }
|
|
1466
1574
|
}
|
|
1467
1575
|
)
|
|
1468
|
-
] }) : /* @__PURE__ */ p(
|
|
1469
|
-
/* @__PURE__ */ i(
|
|
1470
|
-
/* @__PURE__ */ i(
|
|
1576
|
+
] }) : /* @__PURE__ */ p(w, { children: [
|
|
1577
|
+
/* @__PURE__ */ i(J, { dataKey: t, tick: { fill: m.axisColor } }),
|
|
1578
|
+
/* @__PURE__ */ i(ee, { tick: { fill: m.axisColor } })
|
|
1471
1579
|
] }),
|
|
1472
1580
|
/* @__PURE__ */ i(
|
|
1473
|
-
|
|
1581
|
+
ce,
|
|
1474
1582
|
{
|
|
1475
1583
|
contentStyle: {
|
|
1476
|
-
backgroundColor:
|
|
1477
|
-
color:
|
|
1478
|
-
border: `1px solid ${
|
|
1584
|
+
backgroundColor: m.tooltipBg,
|
|
1585
|
+
color: m.tooltipText,
|
|
1586
|
+
border: `1px solid ${m.tooltipBorder}`,
|
|
1479
1587
|
borderRadius: "0.375rem"
|
|
1480
1588
|
}
|
|
1481
1589
|
}
|
|
1482
1590
|
),
|
|
1483
1591
|
o && /* @__PURE__ */ i(
|
|
1484
|
-
|
|
1592
|
+
ue,
|
|
1485
1593
|
{
|
|
1486
|
-
wrapperStyle: { color:
|
|
1594
|
+
wrapperStyle: { color: m.legendColor },
|
|
1595
|
+
formatter: (_) => /* @__PURE__ */ i("span", { style: { color: m.legendColor }, children: _ })
|
|
1487
1596
|
}
|
|
1488
1597
|
),
|
|
1489
|
-
|
|
1490
|
-
|
|
1598
|
+
r.map((_, h) => /* @__PURE__ */ i(
|
|
1599
|
+
hi,
|
|
1491
1600
|
{
|
|
1492
1601
|
dataKey: _,
|
|
1493
|
-
fill:
|
|
1602
|
+
fill: m.colors[h % m.colors.length],
|
|
1494
1603
|
stackId: a ? "stack" : void 0,
|
|
1495
1604
|
radius: [2, 2, 0, 0]
|
|
1496
1605
|
},
|
|
@@ -1502,231 +1611,268 @@ function yi({
|
|
|
1502
1611
|
}
|
|
1503
1612
|
);
|
|
1504
1613
|
}
|
|
1505
|
-
function
|
|
1506
|
-
data:
|
|
1507
|
-
dataKeys:
|
|
1614
|
+
function Sn({
|
|
1615
|
+
data: e,
|
|
1616
|
+
dataKeys: r,
|
|
1508
1617
|
indexKey: t,
|
|
1509
1618
|
curved: n = !0,
|
|
1510
1619
|
showDots: a = !0,
|
|
1511
1620
|
showGrid: o = !0,
|
|
1512
|
-
showLegend:
|
|
1513
|
-
height:
|
|
1514
|
-
label:
|
|
1515
|
-
|
|
1621
|
+
showLegend: s = !0,
|
|
1622
|
+
height: d = 300,
|
|
1623
|
+
label: l,
|
|
1624
|
+
referenceLines: c = [],
|
|
1625
|
+
yDomain: m,
|
|
1626
|
+
unit: f,
|
|
1627
|
+
className: g
|
|
1516
1628
|
}) {
|
|
1517
|
-
const
|
|
1629
|
+
const _ = pe();
|
|
1518
1630
|
return /* @__PURE__ */ i(
|
|
1519
1631
|
"div",
|
|
1520
1632
|
{
|
|
1521
|
-
className:
|
|
1633
|
+
className: u("rudi-chart", g),
|
|
1522
1634
|
role: "img",
|
|
1523
|
-
"aria-label":
|
|
1524
|
-
children: /* @__PURE__ */ i(
|
|
1635
|
+
"aria-label": l,
|
|
1636
|
+
children: /* @__PURE__ */ i(le, { width: "100%", height: d, children: /* @__PURE__ */ p(fi, { data: e, children: [
|
|
1525
1637
|
o && /* @__PURE__ */ i(
|
|
1526
|
-
|
|
1638
|
+
Oe,
|
|
1527
1639
|
{
|
|
1528
1640
|
strokeDasharray: "3 3",
|
|
1529
|
-
stroke:
|
|
1641
|
+
stroke: _.gridColor
|
|
1530
1642
|
}
|
|
1531
1643
|
),
|
|
1532
|
-
/* @__PURE__ */ i(
|
|
1533
|
-
/* @__PURE__ */ i(
|
|
1644
|
+
/* @__PURE__ */ i(J, { dataKey: t, tick: { fill: _.axisColor } }),
|
|
1645
|
+
/* @__PURE__ */ i(ee, { tick: { fill: _.axisColor }, domain: m, unit: f }),
|
|
1534
1646
|
/* @__PURE__ */ i(
|
|
1535
|
-
|
|
1647
|
+
ce,
|
|
1536
1648
|
{
|
|
1537
1649
|
contentStyle: {
|
|
1538
|
-
backgroundColor:
|
|
1539
|
-
color:
|
|
1540
|
-
border: `1px solid ${
|
|
1650
|
+
backgroundColor: _.tooltipBg,
|
|
1651
|
+
color: _.tooltipText,
|
|
1652
|
+
border: `1px solid ${_.tooltipBorder}`,
|
|
1541
1653
|
borderRadius: "0.375rem"
|
|
1542
|
-
}
|
|
1654
|
+
},
|
|
1655
|
+
formatter: f ? (h) => `${h}${f}` : void 0
|
|
1543
1656
|
}
|
|
1544
1657
|
),
|
|
1545
|
-
|
|
1546
|
-
|
|
1658
|
+
s && /* @__PURE__ */ i(
|
|
1659
|
+
ue,
|
|
1547
1660
|
{
|
|
1548
|
-
wrapperStyle: { color:
|
|
1661
|
+
wrapperStyle: { color: _.legendColor },
|
|
1662
|
+
formatter: (h) => /* @__PURE__ */ i("span", { style: { color: _.legendColor }, children: h })
|
|
1549
1663
|
}
|
|
1550
1664
|
),
|
|
1551
|
-
|
|
1552
|
-
|
|
1665
|
+
c.map((h) => /* @__PURE__ */ i(
|
|
1666
|
+
_i,
|
|
1667
|
+
{
|
|
1668
|
+
y: h.y,
|
|
1669
|
+
stroke: _.tones[h.tone ?? "default"],
|
|
1670
|
+
strokeDasharray: "6 4",
|
|
1671
|
+
ifOverflow: "extendDomain",
|
|
1672
|
+
label: { value: h.label, position: "insideTopRight", fill: _.tones[h.tone ?? "default"] }
|
|
1673
|
+
},
|
|
1674
|
+
`${h.y}-${h.label}`
|
|
1675
|
+
)),
|
|
1676
|
+
r.map((h, b) => /* @__PURE__ */ i(
|
|
1677
|
+
bi,
|
|
1553
1678
|
{
|
|
1554
1679
|
type: n ? "monotone" : "linear",
|
|
1555
|
-
dataKey:
|
|
1556
|
-
stroke:
|
|
1680
|
+
dataKey: h,
|
|
1681
|
+
stroke: _.colors[b % _.colors.length],
|
|
1557
1682
|
dot: a,
|
|
1558
1683
|
strokeWidth: 2,
|
|
1559
1684
|
activeDot: { r: 5 }
|
|
1560
1685
|
},
|
|
1561
|
-
|
|
1686
|
+
h
|
|
1562
1687
|
))
|
|
1563
1688
|
] }) })
|
|
1564
1689
|
}
|
|
1565
1690
|
);
|
|
1566
1691
|
}
|
|
1567
|
-
function
|
|
1568
|
-
data:
|
|
1569
|
-
innerRadius:
|
|
1692
|
+
function Pn({
|
|
1693
|
+
data: e,
|
|
1694
|
+
innerRadius: r = 60,
|
|
1570
1695
|
showLabels: t = !1,
|
|
1571
1696
|
showLegend: n = !0,
|
|
1572
1697
|
height: a = 300,
|
|
1573
1698
|
label: o,
|
|
1574
|
-
className:
|
|
1699
|
+
className: s
|
|
1575
1700
|
}) {
|
|
1576
|
-
const
|
|
1701
|
+
const d = pe();
|
|
1577
1702
|
return /* @__PURE__ */ i(
|
|
1578
1703
|
"div",
|
|
1579
1704
|
{
|
|
1580
|
-
className:
|
|
1705
|
+
className: u("rudi-chart", s),
|
|
1581
1706
|
role: "img",
|
|
1582
1707
|
"aria-label": o,
|
|
1583
|
-
children: /* @__PURE__ */ i(
|
|
1708
|
+
children: /* @__PURE__ */ i(le, { width: "100%", height: a, children: /* @__PURE__ */ p(gi, { children: [
|
|
1584
1709
|
/* @__PURE__ */ i(
|
|
1585
|
-
|
|
1710
|
+
Ni,
|
|
1586
1711
|
{
|
|
1587
|
-
data:
|
|
1712
|
+
data: e,
|
|
1588
1713
|
dataKey: "value",
|
|
1589
1714
|
nameKey: "name",
|
|
1590
1715
|
cx: "50%",
|
|
1591
1716
|
cy: "50%",
|
|
1592
|
-
innerRadius:
|
|
1593
|
-
outerRadius:
|
|
1717
|
+
innerRadius: r,
|
|
1718
|
+
outerRadius: r + 30,
|
|
1594
1719
|
paddingAngle: 2,
|
|
1595
|
-
label: t ? ({ name:
|
|
1596
|
-
children:
|
|
1597
|
-
|
|
1720
|
+
label: t ? ({ name: l }) => l : !1,
|
|
1721
|
+
children: e.map((l, c) => /* @__PURE__ */ i(
|
|
1722
|
+
vi,
|
|
1598
1723
|
{
|
|
1599
|
-
fill:
|
|
1724
|
+
fill: d.colors[c % d.colors.length]
|
|
1600
1725
|
},
|
|
1601
|
-
|
|
1726
|
+
c
|
|
1602
1727
|
))
|
|
1603
1728
|
}
|
|
1604
1729
|
),
|
|
1605
1730
|
/* @__PURE__ */ i(
|
|
1606
|
-
|
|
1731
|
+
ce,
|
|
1607
1732
|
{
|
|
1608
1733
|
contentStyle: {
|
|
1609
|
-
backgroundColor:
|
|
1610
|
-
color:
|
|
1611
|
-
border: `1px solid ${
|
|
1734
|
+
backgroundColor: d.tooltipBg,
|
|
1735
|
+
color: d.tooltipText,
|
|
1736
|
+
border: `1px solid ${d.tooltipBorder}`,
|
|
1612
1737
|
borderRadius: "0.375rem"
|
|
1613
1738
|
}
|
|
1614
1739
|
}
|
|
1615
1740
|
),
|
|
1616
1741
|
n && /* @__PURE__ */ i(
|
|
1617
|
-
|
|
1742
|
+
ue,
|
|
1618
1743
|
{
|
|
1619
|
-
wrapperStyle: { color:
|
|
1744
|
+
wrapperStyle: { color: d.legendColor },
|
|
1745
|
+
formatter: (l) => /* @__PURE__ */ i("span", { style: { color: d.legendColor }, children: l })
|
|
1620
1746
|
}
|
|
1621
1747
|
)
|
|
1622
1748
|
] }) })
|
|
1623
1749
|
}
|
|
1624
1750
|
);
|
|
1625
1751
|
}
|
|
1626
|
-
function
|
|
1627
|
-
id:
|
|
1628
|
-
title:
|
|
1752
|
+
function He({
|
|
1753
|
+
id: e,
|
|
1754
|
+
title: r,
|
|
1629
1755
|
items: t,
|
|
1630
1756
|
renderCard: n,
|
|
1631
1757
|
className: a
|
|
1632
1758
|
}) {
|
|
1633
|
-
const { setNodeRef: o, isOver:
|
|
1759
|
+
const { setNodeRef: o, isOver: s } = Ri({ id: e });
|
|
1634
1760
|
return /* @__PURE__ */ p(
|
|
1635
1761
|
"div",
|
|
1636
1762
|
{
|
|
1637
|
-
className:
|
|
1763
|
+
className: u(
|
|
1638
1764
|
"rudi-kanban__column",
|
|
1639
|
-
|
|
1765
|
+
s && "rudi-kanban__column--over",
|
|
1640
1766
|
a
|
|
1641
1767
|
),
|
|
1642
1768
|
role: "region",
|
|
1643
|
-
"aria-label":
|
|
1769
|
+
"aria-label": r,
|
|
1644
1770
|
children: [
|
|
1645
1771
|
/* @__PURE__ */ p("div", { className: "rudi-kanban__column-header", children: [
|
|
1646
|
-
/* @__PURE__ */ i("span", { className: "rudi-kanban__column-title", children:
|
|
1772
|
+
/* @__PURE__ */ i("span", { className: "rudi-kanban__column-title", children: r }),
|
|
1647
1773
|
/* @__PURE__ */ i("span", { className: "rudi-kanban__column-count", children: t.length })
|
|
1648
1774
|
] }),
|
|
1649
1775
|
/* @__PURE__ */ i("div", { ref: o, className: "rudi-kanban__column-body", children: /* @__PURE__ */ i(
|
|
1650
|
-
|
|
1776
|
+
Ti,
|
|
1651
1777
|
{
|
|
1652
|
-
items: t.map((
|
|
1653
|
-
strategy:
|
|
1654
|
-
children: t.map((
|
|
1778
|
+
items: t.map((d) => d.id),
|
|
1779
|
+
strategy: wi,
|
|
1780
|
+
children: t.map((d) => n(d))
|
|
1655
1781
|
}
|
|
1656
1782
|
) })
|
|
1657
1783
|
]
|
|
1658
1784
|
}
|
|
1659
1785
|
);
|
|
1660
1786
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return
|
|
1787
|
+
function H(e, r) {
|
|
1788
|
+
return e.find((t) => t.items.some((n) => n.id === r));
|
|
1663
1789
|
}
|
|
1664
|
-
function
|
|
1665
|
-
columns:
|
|
1666
|
-
onCardMove:
|
|
1790
|
+
function dt({
|
|
1791
|
+
columns: e,
|
|
1792
|
+
onCardMove: r,
|
|
1667
1793
|
renderCard: t,
|
|
1668
|
-
|
|
1794
|
+
getCardLabel: n,
|
|
1795
|
+
className: a
|
|
1669
1796
|
}) {
|
|
1670
|
-
const [
|
|
1671
|
-
|
|
1797
|
+
const [o, s] = O(null), d = yi(
|
|
1798
|
+
be(ki, {
|
|
1672
1799
|
activationConstraint: { distance: 5 }
|
|
1673
1800
|
}),
|
|
1674
|
-
|
|
1675
|
-
coordinateGetter:
|
|
1801
|
+
be(xi, {
|
|
1802
|
+
coordinateGetter: $i
|
|
1676
1803
|
})
|
|
1677
|
-
),
|
|
1678
|
-
|
|
1679
|
-
|
|
1804
|
+
), l = A(
|
|
1805
|
+
(h) => {
|
|
1806
|
+
const b = e.flatMap((N) => N.items).find((N) => N.id === h);
|
|
1807
|
+
return b && n ? n(b) : h;
|
|
1808
|
+
},
|
|
1809
|
+
[e, n]
|
|
1810
|
+
), c = A(
|
|
1680
1811
|
(h) => {
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1812
|
+
const b = e.find((k) => k.id === h);
|
|
1813
|
+
if (b) return `${b.title}, position ${b.items.length + 1}`;
|
|
1814
|
+
const N = H(e, h);
|
|
1815
|
+
if (!N) return;
|
|
1816
|
+
const y = N.items.findIndex((k) => k.id === h);
|
|
1817
|
+
return `${N.title}, position ${y + 1} of ${N.items.length}`;
|
|
1685
1818
|
},
|
|
1686
|
-
[
|
|
1687
|
-
),
|
|
1819
|
+
[e]
|
|
1820
|
+
), m = I(
|
|
1821
|
+
() => ({
|
|
1822
|
+
onDragStart: ({ active: h }) => {
|
|
1823
|
+
const b = H(e, String(h.id));
|
|
1824
|
+
return `Picked up ${l(String(h.id))}${b ? ` from ${b.title}` : ""}.`;
|
|
1825
|
+
},
|
|
1826
|
+
onDragOver: ({ active: h, over: b }) => {
|
|
1827
|
+
const N = b ? c(String(b.id)) : void 0;
|
|
1828
|
+
return N ? `${l(String(h.id))} is over ${N}.` : `${l(String(h.id))} is no longer over a column.`;
|
|
1829
|
+
},
|
|
1830
|
+
onDragEnd: ({ active: h, over: b }) => {
|
|
1831
|
+
const N = b ? c(String(b.id)) : void 0;
|
|
1832
|
+
return N ? `Dropped ${l(String(h.id))} in ${N}.` : `Dropped ${l(String(h.id))}. It was not moved.`;
|
|
1833
|
+
},
|
|
1834
|
+
onDragCancel: ({ active: h }) => `Cancelled. ${l(String(h.id))} was not moved.`
|
|
1835
|
+
}),
|
|
1836
|
+
[e, l, c]
|
|
1837
|
+
), f = o ? e.flatMap((h) => h.items).find((h) => h.id === o) : null, g = A(
|
|
1688
1838
|
(h) => {
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
const b = String(g.id), x = r.find((y) => y.id === b) || E(r, b);
|
|
1692
|
-
x && s(`Over column ${x.title}`);
|
|
1839
|
+
const b = String(h.active.id);
|
|
1840
|
+
s(b);
|
|
1693
1841
|
},
|
|
1694
|
-
[
|
|
1695
|
-
), _ =
|
|
1842
|
+
[]
|
|
1843
|
+
), _ = A(
|
|
1696
1844
|
(h) => {
|
|
1697
|
-
const { active:
|
|
1698
|
-
if (
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
const S = R.items.findIndex(
|
|
1705
|
-
(w) => w.id === x
|
|
1706
|
-
), H = r.find((w) => w.id === y), ae = E(r, y), $ = H || ae;
|
|
1845
|
+
const { active: b, over: N } = h;
|
|
1846
|
+
if (s(null), !N) return;
|
|
1847
|
+
const y = String(b.id), k = String(N.id), C = H(e, y);
|
|
1848
|
+
if (!C) return;
|
|
1849
|
+
const T = C.items.findIndex(
|
|
1850
|
+
(S) => S.id === y
|
|
1851
|
+
), M = e.find((S) => S.id === k), E = H(e, k), $ = M || E;
|
|
1707
1852
|
if (!$) return;
|
|
1708
|
-
let
|
|
1709
|
-
|
|
1710
|
-
cardId:
|
|
1711
|
-
fromColumnId:
|
|
1853
|
+
let x;
|
|
1854
|
+
M ? x = $.items.length : x = $.items.findIndex((S) => S.id === k), !(C.id === $.id && T === x) && r({
|
|
1855
|
+
cardId: y,
|
|
1856
|
+
fromColumnId: C.id,
|
|
1712
1857
|
toColumnId: $.id,
|
|
1713
|
-
fromIndex:
|
|
1714
|
-
toIndex:
|
|
1715
|
-
})
|
|
1858
|
+
fromIndex: T,
|
|
1859
|
+
toIndex: x
|
|
1860
|
+
});
|
|
1716
1861
|
},
|
|
1717
|
-
[
|
|
1862
|
+
[e, r]
|
|
1718
1863
|
);
|
|
1719
1864
|
return /* @__PURE__ */ p(
|
|
1720
|
-
|
|
1865
|
+
Ci,
|
|
1721
1866
|
{
|
|
1722
|
-
sensors:
|
|
1723
|
-
collisionDetection:
|
|
1724
|
-
|
|
1725
|
-
|
|
1867
|
+
sensors: d,
|
|
1868
|
+
collisionDetection: Si,
|
|
1869
|
+
accessibility: { announcements: m },
|
|
1870
|
+
onDragStart: g,
|
|
1726
1871
|
onDragEnd: _,
|
|
1872
|
+
onDragCancel: () => s(null),
|
|
1727
1873
|
children: [
|
|
1728
|
-
/* @__PURE__ */ i("div", { className:
|
|
1729
|
-
|
|
1874
|
+
/* @__PURE__ */ i("div", { className: u("rudi-kanban", a), children: e.map((h) => /* @__PURE__ */ i(
|
|
1875
|
+
He,
|
|
1730
1876
|
{
|
|
1731
1877
|
id: h.id,
|
|
1732
1878
|
title: h.title,
|
|
@@ -1735,45 +1881,35 @@ function Ir({
|
|
|
1735
1881
|
},
|
|
1736
1882
|
h.id
|
|
1737
1883
|
)) }),
|
|
1738
|
-
/* @__PURE__ */ i(
|
|
1739
|
-
/* @__PURE__ */ i(
|
|
1740
|
-
"div",
|
|
1741
|
-
{
|
|
1742
|
-
ref: d,
|
|
1743
|
-
role: "status",
|
|
1744
|
-
"aria-live": "assertive",
|
|
1745
|
-
"aria-atomic": "true",
|
|
1746
|
-
className: "rudi-kanban__sr-only"
|
|
1747
|
-
}
|
|
1748
|
-
)
|
|
1884
|
+
/* @__PURE__ */ i(Pi, { children: f ? /* @__PURE__ */ i("div", { className: "rudi-kanban__card rudi-kanban__card--overlay", children: t(f) }) : null })
|
|
1749
1885
|
]
|
|
1750
1886
|
}
|
|
1751
1887
|
);
|
|
1752
1888
|
}
|
|
1753
|
-
const
|
|
1754
|
-
Column:
|
|
1889
|
+
const Tn = Object.assign(dt, {
|
|
1890
|
+
Column: He
|
|
1755
1891
|
});
|
|
1756
|
-
function
|
|
1892
|
+
function wn({ id: e, label: r, children: t, className: n }) {
|
|
1757
1893
|
const {
|
|
1758
|
-
attributes:
|
|
1759
|
-
listeners:
|
|
1760
|
-
setNodeRef:
|
|
1894
|
+
attributes: a,
|
|
1895
|
+
listeners: o,
|
|
1896
|
+
setNodeRef: s,
|
|
1761
1897
|
transform: d,
|
|
1762
|
-
transition:
|
|
1763
|
-
isDragging:
|
|
1764
|
-
} =
|
|
1765
|
-
transform:
|
|
1766
|
-
transition:
|
|
1898
|
+
transition: l,
|
|
1899
|
+
isDragging: c
|
|
1900
|
+
} = Bi({ id: e }), m = {
|
|
1901
|
+
transform: Ii.Transform.toString(d),
|
|
1902
|
+
transition: l
|
|
1767
1903
|
};
|
|
1768
1904
|
return /* @__PURE__ */ p(
|
|
1769
1905
|
"div",
|
|
1770
1906
|
{
|
|
1771
|
-
ref:
|
|
1772
|
-
style:
|
|
1773
|
-
className:
|
|
1907
|
+
ref: s,
|
|
1908
|
+
style: m,
|
|
1909
|
+
className: u(
|
|
1774
1910
|
"rudi-kanban__card",
|
|
1775
|
-
|
|
1776
|
-
|
|
1911
|
+
c && "rudi-kanban__card--dragging",
|
|
1912
|
+
n
|
|
1777
1913
|
),
|
|
1778
1914
|
children: [
|
|
1779
1915
|
/* @__PURE__ */ i(
|
|
@@ -1781,9 +1917,9 @@ function Si({ id: r, children: e, className: t }) {
|
|
|
1781
1917
|
{
|
|
1782
1918
|
type: "button",
|
|
1783
1919
|
className: "rudi-kanban__card-handle",
|
|
1784
|
-
"aria-label": `
|
|
1785
|
-
...n,
|
|
1920
|
+
"aria-label": `Move ${r ?? e}`,
|
|
1786
1921
|
...a,
|
|
1922
|
+
...o,
|
|
1787
1923
|
"aria-roledescription": "sortable",
|
|
1788
1924
|
children: /* @__PURE__ */ p(
|
|
1789
1925
|
"svg",
|
|
@@ -1805,330 +1941,1310 @@ function Si({ id: r, children: e, className: t }) {
|
|
|
1805
1941
|
)
|
|
1806
1942
|
}
|
|
1807
1943
|
),
|
|
1808
|
-
/* @__PURE__ */ i("div", { className: "rudi-kanban__card-content", children:
|
|
1944
|
+
/* @__PURE__ */ i("div", { className: "rudi-kanban__card-content", children: t })
|
|
1809
1945
|
]
|
|
1810
1946
|
}
|
|
1811
1947
|
);
|
|
1812
1948
|
}
|
|
1813
|
-
const
|
|
1814
|
-
function({ level:
|
|
1815
|
-
const f = `h${
|
|
1949
|
+
const fe = v(
|
|
1950
|
+
function({ level: r, size: t, weight: n, tone: a, align: o, noMargin: s, className: d, children: l, ...c }, m) {
|
|
1951
|
+
const f = `h${r}`;
|
|
1816
1952
|
return /* @__PURE__ */ i(
|
|
1817
1953
|
f,
|
|
1818
1954
|
{
|
|
1819
|
-
ref:
|
|
1820
|
-
className:
|
|
1821
|
-
`rudi-heading rudi-heading--${t ??
|
|
1955
|
+
ref: m,
|
|
1956
|
+
className: u(
|
|
1957
|
+
`rudi-heading rudi-heading--${t ?? r}`,
|
|
1822
1958
|
n && `rudi-heading--weight-${n}`,
|
|
1823
1959
|
a && `rudi-heading--tone-${a}`,
|
|
1824
1960
|
o && `rudi-heading--align-${o}`,
|
|
1825
|
-
|
|
1826
|
-
|
|
1961
|
+
s && "rudi-heading--flush",
|
|
1962
|
+
d
|
|
1827
1963
|
),
|
|
1828
|
-
...
|
|
1829
|
-
children:
|
|
1964
|
+
...c,
|
|
1965
|
+
children: l
|
|
1830
1966
|
}
|
|
1831
1967
|
);
|
|
1832
1968
|
}
|
|
1833
|
-
),
|
|
1834
|
-
variant:
|
|
1969
|
+
), _e = v(function({
|
|
1970
|
+
variant: r = "body",
|
|
1835
1971
|
as: t = "p",
|
|
1836
1972
|
weight: n,
|
|
1837
1973
|
tone: a,
|
|
1838
1974
|
align: o,
|
|
1839
|
-
noMargin:
|
|
1840
|
-
className:
|
|
1841
|
-
children:
|
|
1842
|
-
...
|
|
1843
|
-
},
|
|
1975
|
+
noMargin: s,
|
|
1976
|
+
className: d,
|
|
1977
|
+
children: l,
|
|
1978
|
+
...c
|
|
1979
|
+
}, m) {
|
|
1844
1980
|
return /* @__PURE__ */ i(
|
|
1845
1981
|
t,
|
|
1846
1982
|
{
|
|
1847
|
-
ref:
|
|
1848
|
-
className:
|
|
1849
|
-
`rudi-text rudi-text--${
|
|
1983
|
+
ref: m,
|
|
1984
|
+
className: u(
|
|
1985
|
+
`rudi-text rudi-text--${r}`,
|
|
1850
1986
|
n && `rudi-text--weight-${n}`,
|
|
1851
1987
|
a && `rudi-text--tone-${a}`,
|
|
1852
1988
|
o && `rudi-text--align-${o}`,
|
|
1853
|
-
|
|
1854
|
-
|
|
1989
|
+
s && "rudi-text--flush",
|
|
1990
|
+
d
|
|
1855
1991
|
),
|
|
1856
|
-
...
|
|
1857
|
-
children:
|
|
1992
|
+
...c,
|
|
1993
|
+
children: l
|
|
1858
1994
|
}
|
|
1859
1995
|
);
|
|
1860
|
-
}),
|
|
1996
|
+
}), $n = v(function({ size: r = "base", as: t = "div", className: n, children: a, ...o }, s) {
|
|
1861
1997
|
return /* @__PURE__ */ i(
|
|
1862
1998
|
t,
|
|
1863
1999
|
{
|
|
1864
|
-
ref:
|
|
1865
|
-
className:
|
|
2000
|
+
ref: s,
|
|
2001
|
+
className: u(
|
|
1866
2002
|
"rudi-prose",
|
|
1867
|
-
|
|
2003
|
+
r !== "base" && `rudi-prose--${r}`,
|
|
1868
2004
|
n
|
|
1869
2005
|
),
|
|
1870
2006
|
...o,
|
|
1871
2007
|
children: a
|
|
1872
2008
|
}
|
|
1873
2009
|
);
|
|
1874
|
-
}),
|
|
1875
|
-
padding:
|
|
2010
|
+
}), Bn = v(function({
|
|
2011
|
+
padding: r,
|
|
1876
2012
|
bordered: t = !1,
|
|
1877
2013
|
invert: n = !1,
|
|
1878
|
-
|
|
1879
|
-
|
|
2014
|
+
sticky: a = !1,
|
|
2015
|
+
as: o = "div",
|
|
2016
|
+
className: s,
|
|
1880
2017
|
style: d,
|
|
1881
|
-
children:
|
|
1882
|
-
...
|
|
1883
|
-
},
|
|
1884
|
-
const
|
|
1885
|
-
return
|
|
1886
|
-
|
|
2018
|
+
children: l,
|
|
2019
|
+
...c
|
|
2020
|
+
}, m) {
|
|
2021
|
+
const f = {};
|
|
2022
|
+
return r && (f["--box-padding"] = r), typeof a == "string" && (f["--box-sticky-top"] = a), /* @__PURE__ */ i(
|
|
2023
|
+
o,
|
|
1887
2024
|
{
|
|
1888
|
-
ref:
|
|
1889
|
-
className:
|
|
2025
|
+
ref: m,
|
|
2026
|
+
className: u(
|
|
1890
2027
|
"rudi-box",
|
|
1891
2028
|
t && "rudi-box--bordered",
|
|
1892
2029
|
n && "rudi-box--invert",
|
|
1893
|
-
|
|
2030
|
+
a && "rudi-box--sticky",
|
|
2031
|
+
s
|
|
1894
2032
|
),
|
|
1895
|
-
style: { ...
|
|
1896
|
-
...
|
|
1897
|
-
children:
|
|
2033
|
+
style: { ...f, ...d },
|
|
2034
|
+
...c,
|
|
2035
|
+
children: l
|
|
1898
2036
|
}
|
|
1899
2037
|
);
|
|
1900
|
-
}),
|
|
1901
|
-
space:
|
|
2038
|
+
}), In = v(function({
|
|
2039
|
+
space: r,
|
|
1902
2040
|
recursive: t = !1,
|
|
1903
2041
|
splitAfter: n,
|
|
1904
2042
|
as: a = "div",
|
|
1905
2043
|
className: o,
|
|
1906
|
-
style:
|
|
1907
|
-
children:
|
|
1908
|
-
...
|
|
1909
|
-
},
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
const f =
|
|
1913
|
-
|
|
2044
|
+
style: s,
|
|
2045
|
+
children: d,
|
|
2046
|
+
...l
|
|
2047
|
+
}, c) {
|
|
2048
|
+
const m = {};
|
|
2049
|
+
r && (m["--stack-space"] = r);
|
|
2050
|
+
const f = $e.toArray(d), g = n ? f.map((_, h) => h === n - 1 && X(_) ? xr(
|
|
2051
|
+
_,
|
|
1914
2052
|
{
|
|
1915
2053
|
style: {
|
|
1916
|
-
...
|
|
2054
|
+
..._.props.style,
|
|
1917
2055
|
marginBlockEnd: "auto"
|
|
1918
2056
|
}
|
|
1919
2057
|
}
|
|
1920
|
-
) :
|
|
2058
|
+
) : _) : d;
|
|
1921
2059
|
return /* @__PURE__ */ i(
|
|
1922
2060
|
a,
|
|
1923
2061
|
{
|
|
1924
|
-
ref:
|
|
1925
|
-
className:
|
|
2062
|
+
ref: c,
|
|
2063
|
+
className: u(
|
|
1926
2064
|
"rudi-stack",
|
|
1927
2065
|
t && "rudi-stack--recursive",
|
|
1928
2066
|
n && "rudi-stack--split",
|
|
1929
2067
|
o
|
|
1930
2068
|
),
|
|
1931
|
-
style: { ...
|
|
1932
|
-
...
|
|
1933
|
-
children:
|
|
2069
|
+
style: { ...m, ...s },
|
|
2070
|
+
...l,
|
|
2071
|
+
children: g
|
|
1934
2072
|
}
|
|
1935
2073
|
);
|
|
1936
|
-
}),
|
|
1937
|
-
space:
|
|
2074
|
+
}), Mn = v(function({
|
|
2075
|
+
space: r,
|
|
1938
2076
|
justify: t,
|
|
1939
2077
|
align: n,
|
|
1940
2078
|
as: a = "div",
|
|
1941
2079
|
className: o,
|
|
1942
|
-
style:
|
|
1943
|
-
children:
|
|
1944
|
-
...
|
|
1945
|
-
},
|
|
1946
|
-
const
|
|
1947
|
-
return
|
|
2080
|
+
style: s,
|
|
2081
|
+
children: d,
|
|
2082
|
+
...l
|
|
2083
|
+
}, c) {
|
|
2084
|
+
const m = {};
|
|
2085
|
+
return r && (m["--cluster-space"] = r), t && (m["--cluster-justify"] = t), n && (m["--cluster-align"] = n), /* @__PURE__ */ i(
|
|
1948
2086
|
a,
|
|
1949
2087
|
{
|
|
1950
|
-
ref:
|
|
1951
|
-
className:
|
|
1952
|
-
style: { ...
|
|
1953
|
-
...
|
|
1954
|
-
children:
|
|
2088
|
+
ref: c,
|
|
2089
|
+
className: u("rudi-cluster", o),
|
|
2090
|
+
style: { ...m, ...s },
|
|
2091
|
+
...l,
|
|
2092
|
+
children: d
|
|
1955
2093
|
}
|
|
1956
2094
|
);
|
|
1957
|
-
}),
|
|
1958
|
-
minCellWidth:
|
|
2095
|
+
}), Dn = v(function({
|
|
2096
|
+
minCellWidth: r,
|
|
1959
2097
|
space: t,
|
|
1960
2098
|
as: n = "div",
|
|
1961
2099
|
className: a,
|
|
1962
2100
|
style: o,
|
|
1963
|
-
children:
|
|
1964
|
-
...
|
|
1965
|
-
},
|
|
1966
|
-
const
|
|
1967
|
-
return
|
|
2101
|
+
children: s,
|
|
2102
|
+
...d
|
|
2103
|
+
}, l) {
|
|
2104
|
+
const c = {};
|
|
2105
|
+
return r && (c["--grid-min-cell"] = r), t && (c["--grid-space"] = t), /* @__PURE__ */ i(
|
|
1968
2106
|
n,
|
|
1969
2107
|
{
|
|
1970
|
-
ref:
|
|
1971
|
-
className:
|
|
1972
|
-
style: { ...
|
|
1973
|
-
...
|
|
1974
|
-
children:
|
|
2108
|
+
ref: l,
|
|
2109
|
+
className: u("rudi-grid", a),
|
|
2110
|
+
style: { ...c, ...o },
|
|
2111
|
+
...d,
|
|
2112
|
+
children: s
|
|
1975
2113
|
}
|
|
1976
2114
|
);
|
|
1977
|
-
}),
|
|
1978
|
-
side:
|
|
2115
|
+
}), En = v(function({
|
|
2116
|
+
side: r = "left",
|
|
1979
2117
|
sideWidth: t,
|
|
1980
2118
|
contentMin: n,
|
|
1981
2119
|
space: a,
|
|
1982
2120
|
noStretch: o = !1,
|
|
1983
|
-
as:
|
|
1984
|
-
className:
|
|
1985
|
-
style:
|
|
1986
|
-
children:
|
|
1987
|
-
...
|
|
2121
|
+
as: s = "div",
|
|
2122
|
+
className: d,
|
|
2123
|
+
style: l,
|
|
2124
|
+
children: c,
|
|
2125
|
+
...m
|
|
1988
2126
|
}, f) {
|
|
1989
|
-
const
|
|
1990
|
-
return t && (
|
|
1991
|
-
|
|
2127
|
+
const g = {};
|
|
2128
|
+
return t && (g["--sidebar-width"] = t), n && (g["--sidebar-content-min"] = n), a && (g["--sidebar-space"] = a), /* @__PURE__ */ i(
|
|
2129
|
+
s,
|
|
1992
2130
|
{
|
|
1993
2131
|
ref: f,
|
|
1994
|
-
className:
|
|
2132
|
+
className: u(
|
|
1995
2133
|
"rudi-sidebar",
|
|
1996
|
-
|
|
2134
|
+
r === "right" && "rudi-sidebar--right",
|
|
1997
2135
|
o && "rudi-sidebar--no-stretch",
|
|
1998
|
-
|
|
2136
|
+
d
|
|
1999
2137
|
),
|
|
2000
|
-
style: { ...
|
|
2001
|
-
...
|
|
2002
|
-
children:
|
|
2138
|
+
style: { ...g, ...l },
|
|
2139
|
+
...m,
|
|
2140
|
+
children: c
|
|
2003
2141
|
}
|
|
2004
2142
|
);
|
|
2005
|
-
}),
|
|
2006
|
-
maxWidth:
|
|
2143
|
+
}), Ln = v(function({
|
|
2144
|
+
maxWidth: r,
|
|
2007
2145
|
gutters: t,
|
|
2008
2146
|
intrinsic: n = !1,
|
|
2009
2147
|
as: a = "div",
|
|
2010
2148
|
className: o,
|
|
2011
|
-
style:
|
|
2012
|
-
children:
|
|
2013
|
-
...
|
|
2014
|
-
},
|
|
2015
|
-
const
|
|
2016
|
-
return
|
|
2149
|
+
style: s,
|
|
2150
|
+
children: d,
|
|
2151
|
+
...l
|
|
2152
|
+
}, c) {
|
|
2153
|
+
const m = {};
|
|
2154
|
+
return r && (m["--center-max-width"] = r), t && (m["--center-gutters"] = t), /* @__PURE__ */ i(
|
|
2017
2155
|
a,
|
|
2018
2156
|
{
|
|
2019
|
-
ref:
|
|
2020
|
-
className:
|
|
2157
|
+
ref: c,
|
|
2158
|
+
className: u(
|
|
2021
2159
|
"rudi-center",
|
|
2022
2160
|
n && "rudi-center--intrinsic",
|
|
2023
2161
|
o
|
|
2024
2162
|
),
|
|
2025
|
-
style: { ...
|
|
2026
|
-
...
|
|
2027
|
-
children:
|
|
2163
|
+
style: { ...m, ...s },
|
|
2164
|
+
...l,
|
|
2165
|
+
children: d
|
|
2028
2166
|
}
|
|
2029
2167
|
);
|
|
2030
|
-
}),
|
|
2031
|
-
|
|
2168
|
+
}), lt = v(function({ as: r = "div", className: t, children: n, ...a }, o) {
|
|
2169
|
+
return /* @__PURE__ */ i(r, { ref: o, className: u("rudi-cover__centered", t), ...a, children: n });
|
|
2170
|
+
}), ct = v(function({
|
|
2171
|
+
minHeight: r,
|
|
2032
2172
|
space: t,
|
|
2033
2173
|
as: n = "div",
|
|
2034
2174
|
className: a,
|
|
2035
2175
|
style: o,
|
|
2036
|
-
children:
|
|
2037
|
-
...
|
|
2038
|
-
},
|
|
2039
|
-
const
|
|
2040
|
-
return
|
|
2176
|
+
children: s,
|
|
2177
|
+
...d
|
|
2178
|
+
}, l) {
|
|
2179
|
+
const c = {};
|
|
2180
|
+
return r && (c["--cover-min-height"] = r), t && (c["--cover-space"] = t), /* @__PURE__ */ i(
|
|
2041
2181
|
n,
|
|
2042
2182
|
{
|
|
2043
|
-
ref:
|
|
2044
|
-
className:
|
|
2045
|
-
style: { ...
|
|
2046
|
-
...
|
|
2047
|
-
children:
|
|
2183
|
+
ref: l,
|
|
2184
|
+
className: u("rudi-cover", a),
|
|
2185
|
+
style: { ...c, ...o },
|
|
2186
|
+
...d,
|
|
2187
|
+
children: s
|
|
2048
2188
|
}
|
|
2049
2189
|
);
|
|
2050
|
-
}),
|
|
2190
|
+
}), On = Object.assign(ct, { Centered: lt }), zn = v(
|
|
2051
2191
|
function({
|
|
2052
|
-
threshold:
|
|
2192
|
+
threshold: r,
|
|
2053
2193
|
space: t,
|
|
2054
2194
|
limit: n,
|
|
2055
2195
|
as: a = "div",
|
|
2056
2196
|
className: o,
|
|
2057
|
-
style:
|
|
2058
|
-
children:
|
|
2059
|
-
...
|
|
2060
|
-
},
|
|
2061
|
-
const
|
|
2062
|
-
return
|
|
2197
|
+
style: s,
|
|
2198
|
+
children: d,
|
|
2199
|
+
...l
|
|
2200
|
+
}, c) {
|
|
2201
|
+
const m = {};
|
|
2202
|
+
return r && (m["--switcher-threshold"] = r), t && (m["--switcher-space"] = t), /* @__PURE__ */ i(
|
|
2063
2203
|
a,
|
|
2064
2204
|
{
|
|
2065
|
-
ref:
|
|
2066
|
-
className:
|
|
2067
|
-
style: { ...
|
|
2068
|
-
...
|
|
2069
|
-
children:
|
|
2205
|
+
ref: c,
|
|
2206
|
+
className: u("rudi-switcher", o),
|
|
2207
|
+
style: { ...m, ...s },
|
|
2208
|
+
...l,
|
|
2209
|
+
children: d
|
|
2210
|
+
}
|
|
2211
|
+
);
|
|
2212
|
+
}
|
|
2213
|
+
), Ue = ae(null);
|
|
2214
|
+
function je() {
|
|
2215
|
+
const e = K(Ue);
|
|
2216
|
+
if (!e)
|
|
2217
|
+
throw new Error(
|
|
2218
|
+
"RudiAppShell subcomponents must be rendered inside <RudiAppShell>."
|
|
2219
|
+
);
|
|
2220
|
+
return e;
|
|
2221
|
+
}
|
|
2222
|
+
const ut = v(
|
|
2223
|
+
function({
|
|
2224
|
+
isSidebarOpen: r,
|
|
2225
|
+
onSidebarOpenChange: t,
|
|
2226
|
+
defaultSidebarOpen: n = !1,
|
|
2227
|
+
className: a,
|
|
2228
|
+
children: o,
|
|
2229
|
+
...s
|
|
2230
|
+
}, d) {
|
|
2231
|
+
const [l, c] = O(n), m = r !== void 0, f = m ? r : l, g = we(), _ = P(null), h = (b) => {
|
|
2232
|
+
m || c(b), t?.(b);
|
|
2233
|
+
};
|
|
2234
|
+
return ne(() => {
|
|
2235
|
+
if (!f) return;
|
|
2236
|
+
const b = (N) => {
|
|
2237
|
+
N.key === "Escape" && (m || c(!1), t?.(!1), _.current?.querySelector("button")?.focus());
|
|
2238
|
+
};
|
|
2239
|
+
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
2240
|
+
}, [f, m, t]), /* @__PURE__ */ i(
|
|
2241
|
+
Ue.Provider,
|
|
2242
|
+
{
|
|
2243
|
+
value: {
|
|
2244
|
+
isSidebarOpen: f,
|
|
2245
|
+
setSidebarOpen: h,
|
|
2246
|
+
toggleSidebar: () => h(!f),
|
|
2247
|
+
sidebarId: g,
|
|
2248
|
+
menuButtonRef: _
|
|
2249
|
+
},
|
|
2250
|
+
children: /* @__PURE__ */ i(
|
|
2251
|
+
"div",
|
|
2252
|
+
{
|
|
2253
|
+
ref: d,
|
|
2254
|
+
className: u(
|
|
2255
|
+
"rudi-app-shell",
|
|
2256
|
+
f && "rudi-app-shell--sidebar-open",
|
|
2257
|
+
a
|
|
2258
|
+
),
|
|
2259
|
+
...s,
|
|
2260
|
+
children: o
|
|
2261
|
+
}
|
|
2262
|
+
)
|
|
2263
|
+
}
|
|
2264
|
+
);
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
function mt({
|
|
2268
|
+
width: e,
|
|
2269
|
+
className: r,
|
|
2270
|
+
style: t,
|
|
2271
|
+
children: n,
|
|
2272
|
+
"aria-label": a = "Sidebar",
|
|
2273
|
+
...o
|
|
2274
|
+
}) {
|
|
2275
|
+
const { isSidebarOpen: s, setSidebarOpen: d, sidebarId: l } = je(), c = {};
|
|
2276
|
+
return e && (c["--sidebar-width"] = e), /* @__PURE__ */ p(w, { children: [
|
|
2277
|
+
/* @__PURE__ */ i(
|
|
2278
|
+
"button",
|
|
2279
|
+
{
|
|
2280
|
+
type: "button",
|
|
2281
|
+
"aria-label": "Close navigation",
|
|
2282
|
+
className: "rudi-app-shell__backdrop",
|
|
2283
|
+
onClick: () => d(!1),
|
|
2284
|
+
tabIndex: s ? 0 : -1
|
|
2285
|
+
}
|
|
2286
|
+
),
|
|
2287
|
+
/* @__PURE__ */ i(
|
|
2288
|
+
"aside",
|
|
2289
|
+
{
|
|
2290
|
+
id: l,
|
|
2291
|
+
className: u("rudi-app-shell__sidebar", r),
|
|
2292
|
+
"aria-label": a,
|
|
2293
|
+
style: { ...c, ...t },
|
|
2294
|
+
...o,
|
|
2295
|
+
children: n
|
|
2296
|
+
}
|
|
2297
|
+
)
|
|
2298
|
+
] });
|
|
2299
|
+
}
|
|
2300
|
+
function pt({
|
|
2301
|
+
className: e,
|
|
2302
|
+
children: r,
|
|
2303
|
+
...t
|
|
2304
|
+
}) {
|
|
2305
|
+
return /* @__PURE__ */ i("div", { className: u("rudi-app-shell__content", e), ...t, children: r });
|
|
2306
|
+
}
|
|
2307
|
+
function ht({
|
|
2308
|
+
maxWidth: e,
|
|
2309
|
+
padding: r,
|
|
2310
|
+
className: t,
|
|
2311
|
+
style: n,
|
|
2312
|
+
children: a,
|
|
2313
|
+
...o
|
|
2314
|
+
}) {
|
|
2315
|
+
const s = {};
|
|
2316
|
+
return e && (s["--app-shell-main-max-width"] = e), r && (s["--app-shell-main-padding"] = r), /* @__PURE__ */ i(
|
|
2317
|
+
"main",
|
|
2318
|
+
{
|
|
2319
|
+
className: u("rudi-app-shell__main", t),
|
|
2320
|
+
style: { ...s, ...n },
|
|
2321
|
+
...o,
|
|
2322
|
+
children: /* @__PURE__ */ i("div", { className: "rudi-app-shell__main-inner", children: a })
|
|
2323
|
+
}
|
|
2324
|
+
);
|
|
2325
|
+
}
|
|
2326
|
+
function ft({
|
|
2327
|
+
"aria-label": e = "Open navigation",
|
|
2328
|
+
icon: r = "lucide:menu",
|
|
2329
|
+
className: t
|
|
2330
|
+
}) {
|
|
2331
|
+
const { toggleSidebar: n, isSidebarOpen: a, sidebarId: o, menuButtonRef: s } = je();
|
|
2332
|
+
return /* @__PURE__ */ i("span", { ref: s, className: u("rudi-app-shell__menu", t), children: /* @__PURE__ */ i(
|
|
2333
|
+
he,
|
|
2334
|
+
{
|
|
2335
|
+
"aria-label": e,
|
|
2336
|
+
"aria-expanded": a,
|
|
2337
|
+
"aria-controls": o,
|
|
2338
|
+
variant: "ghost",
|
|
2339
|
+
onPress: n,
|
|
2340
|
+
children: /* @__PURE__ */ i(R, { icon: r })
|
|
2341
|
+
}
|
|
2342
|
+
) });
|
|
2343
|
+
}
|
|
2344
|
+
const An = Object.assign(ut, {
|
|
2345
|
+
Sidebar: mt,
|
|
2346
|
+
Content: pt,
|
|
2347
|
+
Main: ht,
|
|
2348
|
+
MenuButton: ft
|
|
2349
|
+
}), Fn = v(
|
|
2350
|
+
function({
|
|
2351
|
+
start: r,
|
|
2352
|
+
end: t,
|
|
2353
|
+
announcement: n,
|
|
2354
|
+
sticky: a = !0,
|
|
2355
|
+
as: o = "header",
|
|
2356
|
+
className: s,
|
|
2357
|
+
children: d,
|
|
2358
|
+
...l
|
|
2359
|
+
}, c) {
|
|
2360
|
+
return /* @__PURE__ */ p(
|
|
2361
|
+
o,
|
|
2362
|
+
{
|
|
2363
|
+
ref: c,
|
|
2364
|
+
className: u(
|
|
2365
|
+
"rudi-top-bar",
|
|
2366
|
+
a && "rudi-top-bar--sticky",
|
|
2367
|
+
s
|
|
2368
|
+
),
|
|
2369
|
+
...l,
|
|
2370
|
+
children: [
|
|
2371
|
+
n != null && /* @__PURE__ */ i("div", { className: "rudi-top-bar__announcement", children: n }),
|
|
2372
|
+
/* @__PURE__ */ p("div", { className: "rudi-top-bar__row", children: [
|
|
2373
|
+
r != null && /* @__PURE__ */ i("div", { className: "rudi-top-bar__start", children: r }),
|
|
2374
|
+
d != null && /* @__PURE__ */ i("div", { className: "rudi-top-bar__center", children: d }),
|
|
2375
|
+
t != null && /* @__PURE__ */ i("div", { className: "rudi-top-bar__end", children: t })
|
|
2376
|
+
] })
|
|
2377
|
+
]
|
|
2378
|
+
}
|
|
2379
|
+
);
|
|
2380
|
+
}
|
|
2381
|
+
), Gn = v(
|
|
2382
|
+
function({ title: r, subtitle: t, actions: n, headingLevel: a = 1, className: o, ...s }, d) {
|
|
2383
|
+
return /* @__PURE__ */ p("div", { ref: d, className: u("rudi-page-header", o), ...s, children: [
|
|
2384
|
+
/* @__PURE__ */ p("div", { className: "rudi-page-header__text", children: [
|
|
2385
|
+
/* @__PURE__ */ i(
|
|
2386
|
+
fe,
|
|
2387
|
+
{
|
|
2388
|
+
level: a,
|
|
2389
|
+
size: 2,
|
|
2390
|
+
noMargin: !0,
|
|
2391
|
+
className: "rudi-page-header__title",
|
|
2392
|
+
children: r
|
|
2393
|
+
}
|
|
2394
|
+
),
|
|
2395
|
+
t != null && /* @__PURE__ */ i(
|
|
2396
|
+
_e,
|
|
2397
|
+
{
|
|
2398
|
+
variant: "caption",
|
|
2399
|
+
noMargin: !0,
|
|
2400
|
+
className: "rudi-page-header__subtitle",
|
|
2401
|
+
children: t
|
|
2402
|
+
}
|
|
2403
|
+
)
|
|
2404
|
+
] }),
|
|
2405
|
+
n != null && /* @__PURE__ */ i("div", { className: "rudi-page-header__actions", children: n })
|
|
2406
|
+
] });
|
|
2407
|
+
}
|
|
2408
|
+
), Kn = v(function({ title: r, description: t, action: n, headingLevel: a = 2, className: o, ...s }, d) {
|
|
2409
|
+
return /* @__PURE__ */ p("div", { ref: d, className: u("rudi-section-header", o), ...s, children: [
|
|
2410
|
+
/* @__PURE__ */ p("div", { className: "rudi-section-header__text", children: [
|
|
2411
|
+
/* @__PURE__ */ i(
|
|
2412
|
+
fe,
|
|
2413
|
+
{
|
|
2414
|
+
level: a,
|
|
2415
|
+
size: 5,
|
|
2416
|
+
noMargin: !0,
|
|
2417
|
+
className: "rudi-section-header__title",
|
|
2418
|
+
children: r
|
|
2419
|
+
}
|
|
2420
|
+
),
|
|
2421
|
+
t != null && /* @__PURE__ */ i(
|
|
2422
|
+
_e,
|
|
2423
|
+
{
|
|
2424
|
+
variant: "body-sm",
|
|
2425
|
+
noMargin: !0,
|
|
2426
|
+
className: "rudi-section-header__description",
|
|
2427
|
+
children: t
|
|
2428
|
+
}
|
|
2429
|
+
)
|
|
2430
|
+
] }),
|
|
2431
|
+
n != null && /* @__PURE__ */ i("div", { className: "rudi-section-header__action", children: n })
|
|
2432
|
+
] });
|
|
2433
|
+
}), Vn = vr;
|
|
2434
|
+
function _t({ name: e, mark: r, hideName: t }) {
|
|
2435
|
+
return /* @__PURE__ */ p(w, { children: [
|
|
2436
|
+
r != null && /* @__PURE__ */ i("span", { className: "rudi-brand__mark", "aria-hidden": "true", children: r }),
|
|
2437
|
+
/* @__PURE__ */ i("span", { className: u("rudi-brand__name", t && "rudi-brand__name--hidden"), children: e })
|
|
2438
|
+
] });
|
|
2439
|
+
}
|
|
2440
|
+
function bt({ href: e, className: r, children: t }) {
|
|
2441
|
+
const n = P(null), { linkProps: a } = W({ href: e }, n);
|
|
2442
|
+
return /* @__PURE__ */ i("a", { ...a, ref: n, href: e, className: r, children: t });
|
|
2443
|
+
}
|
|
2444
|
+
function Hn({ name: e, mark: r, hideName: t = !1, href: n, size: a = "md", className: o }) {
|
|
2445
|
+
const s = u("rudi-brand", `rudi-brand--${a}`, n && "rudi-brand--link", o), d = /* @__PURE__ */ i(_t, { name: e, mark: r, hideName: t });
|
|
2446
|
+
return n ? /* @__PURE__ */ i(bt, { href: n, className: s, children: d }) : /* @__PURE__ */ i("span", { className: s, children: d });
|
|
2447
|
+
}
|
|
2448
|
+
const gt = (e) => `${e} ${e === 1 ? "problem" : "problems"} to fix`, Un = v(function({ onSubmit: r, errors: t = [], errorTitle: n = gt, noValidate: a = !0, className: o, children: s, ...d }, l) {
|
|
2449
|
+
const c = B(l), m = P(null), f = t.length > 0, [g, _] = O(0);
|
|
2450
|
+
return ne(() => {
|
|
2451
|
+
g > 0 && f && m.current?.focus();
|
|
2452
|
+
}, [g]), /* @__PURE__ */ p(
|
|
2453
|
+
"form",
|
|
2454
|
+
{
|
|
2455
|
+
...d,
|
|
2456
|
+
ref: c,
|
|
2457
|
+
noValidate: a,
|
|
2458
|
+
className: u("rudi-form", o),
|
|
2459
|
+
onSubmit: (h) => {
|
|
2460
|
+
h.preventDefault(), r?.(new FormData(h.currentTarget), h), _((b) => b + 1);
|
|
2461
|
+
},
|
|
2462
|
+
children: [
|
|
2463
|
+
f && /* @__PURE__ */ i("div", { ref: m, tabIndex: -1, className: "rudi-form__summary", children: /* @__PURE__ */ i(Wi, { variant: "error", title: n(t.length), children: /* @__PURE__ */ i("ul", { className: "rudi-form__summary-list", children: t.map((h) => /* @__PURE__ */ i("li", { children: h }, h)) }) }) }),
|
|
2464
|
+
s
|
|
2465
|
+
]
|
|
2466
|
+
}
|
|
2467
|
+
);
|
|
2468
|
+
});
|
|
2469
|
+
function jn({ orientation: e = "horizontal", className: r, ...t }) {
|
|
2470
|
+
return /* @__PURE__ */ i(
|
|
2471
|
+
Fr,
|
|
2472
|
+
{
|
|
2473
|
+
...t,
|
|
2474
|
+
orientation: e,
|
|
2475
|
+
className: u("rudi-tabs", `rudi-tabs--${e}`, r)
|
|
2476
|
+
}
|
|
2477
|
+
);
|
|
2478
|
+
}
|
|
2479
|
+
function qn({
|
|
2480
|
+
variant: e = "underline",
|
|
2481
|
+
className: r,
|
|
2482
|
+
...t
|
|
2483
|
+
}) {
|
|
2484
|
+
return /* @__PURE__ */ i(
|
|
2485
|
+
Gr,
|
|
2486
|
+
{
|
|
2487
|
+
...t,
|
|
2488
|
+
className: u("rudi-tab-list", `rudi-tab-list--${e}`, r)
|
|
2489
|
+
}
|
|
2490
|
+
);
|
|
2491
|
+
}
|
|
2492
|
+
function Wn({ id: e, icon: r, badge: t, className: n, children: a, ...o }) {
|
|
2493
|
+
return /* @__PURE__ */ p(Kr, { ...o, id: e, className: u("rudi-tab", n), children: [
|
|
2494
|
+
r && /* @__PURE__ */ i(R, { icon: r, className: "rudi-tab__icon" }),
|
|
2495
|
+
/* @__PURE__ */ i("span", { className: "rudi-tab__label", children: a }),
|
|
2496
|
+
t != null && t !== !1 && /* @__PURE__ */ p(w, { children: [
|
|
2497
|
+
" ",
|
|
2498
|
+
/* @__PURE__ */ i("span", { className: "rudi-tab__badge", children: t })
|
|
2499
|
+
] })
|
|
2500
|
+
] });
|
|
2501
|
+
}
|
|
2502
|
+
function Xn({ className: e, ...r }) {
|
|
2503
|
+
return /* @__PURE__ */ i(Vr, { ...r, className: u("rudi-tab-panel", e) });
|
|
2504
|
+
}
|
|
2505
|
+
const Zn = v(
|
|
2506
|
+
function({ icon: r, title: t, description: n, action: a, headingLevel: o = 3, size: s = "md", className: d }, l) {
|
|
2507
|
+
return /* @__PURE__ */ p("div", { ref: l, className: u("rudi-empty-state", `rudi-empty-state--${s}`, d), children: [
|
|
2508
|
+
r && /* @__PURE__ */ i(R, { icon: r, className: "rudi-empty-state__icon" }),
|
|
2509
|
+
/* @__PURE__ */ i(
|
|
2510
|
+
fe,
|
|
2511
|
+
{
|
|
2512
|
+
level: o,
|
|
2513
|
+
size: s === "sm" ? 6 : 5,
|
|
2514
|
+
align: "center",
|
|
2515
|
+
noMargin: !0,
|
|
2516
|
+
className: "rudi-empty-state__title",
|
|
2517
|
+
children: t
|
|
2518
|
+
}
|
|
2519
|
+
),
|
|
2520
|
+
n != null && /* @__PURE__ */ i(
|
|
2521
|
+
_e,
|
|
2522
|
+
{
|
|
2523
|
+
as: typeof n == "string" ? "p" : "div",
|
|
2524
|
+
variant: s === "sm" ? "body-sm" : "body",
|
|
2525
|
+
tone: "subtle",
|
|
2526
|
+
align: "center",
|
|
2527
|
+
noMargin: !0,
|
|
2528
|
+
className: "rudi-empty-state__description",
|
|
2529
|
+
children: n
|
|
2530
|
+
}
|
|
2531
|
+
),
|
|
2532
|
+
a != null && /* @__PURE__ */ i("div", { className: "rudi-empty-state__action", children: a })
|
|
2533
|
+
] });
|
|
2534
|
+
}
|
|
2535
|
+
);
|
|
2536
|
+
function Nt({ state: e, triggerRef: r, popoverRef: t, children: n }) {
|
|
2537
|
+
const { popoverProps: a } = Ce(
|
|
2538
|
+
{ triggerRef: r, popoverRef: t, isNonModal: !0, placement: "bottom start", offset: 4 },
|
|
2539
|
+
e
|
|
2540
|
+
), [o, s] = O();
|
|
2541
|
+
Cr(() => {
|
|
2542
|
+
s(r.current?.offsetWidth);
|
|
2543
|
+
}, [r]);
|
|
2544
|
+
const d = {
|
|
2545
|
+
...a.style,
|
|
2546
|
+
...o ? { "--trigger-width": `${o}px` } : {}
|
|
2547
|
+
};
|
|
2548
|
+
return /* @__PURE__ */ p("div", { ...a, ref: t, style: d, className: "rudi-combo-box__popover", children: [
|
|
2549
|
+
n,
|
|
2550
|
+
/* @__PURE__ */ i(kr, { onDismiss: e.close })
|
|
2551
|
+
] });
|
|
2552
|
+
}
|
|
2553
|
+
function vt({ state: e, listBoxRef: r, ...t }) {
|
|
2554
|
+
const { listBoxProps: n } = Se(t, e, r);
|
|
2555
|
+
return /* @__PURE__ */ i("ul", { ...n, ref: r, className: "rudi-combo-box__listbox", children: [...e.collection].map((a) => /* @__PURE__ */ i(Rt, { item: a, state: e }, a.key)) });
|
|
2556
|
+
}
|
|
2557
|
+
function Rt({ item: e, state: r }) {
|
|
2558
|
+
const t = P(null), { optionProps: n, isSelected: a, isFocused: o, isDisabled: s } = Pe(
|
|
2559
|
+
{ key: e.key },
|
|
2560
|
+
r,
|
|
2561
|
+
t
|
|
2562
|
+
);
|
|
2563
|
+
return /* @__PURE__ */ i(
|
|
2564
|
+
"li",
|
|
2565
|
+
{
|
|
2566
|
+
...n,
|
|
2567
|
+
ref: t,
|
|
2568
|
+
className: "rudi-combo-box__option",
|
|
2569
|
+
"data-focused": o,
|
|
2570
|
+
"data-disabled": s || void 0,
|
|
2571
|
+
"aria-selected": a,
|
|
2572
|
+
children: e.rendered
|
|
2573
|
+
}
|
|
2574
|
+
);
|
|
2575
|
+
}
|
|
2576
|
+
function Qn(e) {
|
|
2577
|
+
const {
|
|
2578
|
+
label: r,
|
|
2579
|
+
description: t,
|
|
2580
|
+
errorMessage: n,
|
|
2581
|
+
isRequired: a = !1,
|
|
2582
|
+
isDisabled: o = !1,
|
|
2583
|
+
menuTrigger: s = "input",
|
|
2584
|
+
emptyMessage: d = "No matches",
|
|
2585
|
+
placeholder: l,
|
|
2586
|
+
className: c
|
|
2587
|
+
} = e, { contains: m } = Rr({ sensitivity: "base" }), f = !!n, g = {
|
|
2588
|
+
...e,
|
|
2589
|
+
items: void 0,
|
|
2590
|
+
defaultItems: e.items,
|
|
2591
|
+
menuTrigger: s,
|
|
2592
|
+
isRequired: a,
|
|
2593
|
+
isDisabled: o,
|
|
2594
|
+
isInvalid: f,
|
|
2595
|
+
validationBehavior: "aria",
|
|
2596
|
+
allowsEmptyCollection: !0,
|
|
2597
|
+
defaultFilter: m
|
|
2598
|
+
}, _ = Br(g), h = P(null), b = P(null), N = P(null), y = P(null), k = P(null), {
|
|
2599
|
+
labelProps: C,
|
|
2600
|
+
inputProps: T,
|
|
2601
|
+
listBoxProps: M,
|
|
2602
|
+
buttonProps: E,
|
|
2603
|
+
descriptionProps: $,
|
|
2604
|
+
errorMessageProps: x
|
|
2605
|
+
} = yr(
|
|
2606
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2607
|
+
{ ...g, inputRef: b, buttonRef: N, listBoxRef: y, popoverRef: k },
|
|
2608
|
+
_
|
|
2609
|
+
), { buttonProps: S } = G(E, N), rr = _.collection.size === 0;
|
|
2610
|
+
return /* @__PURE__ */ p("div", { className: u("rudi-combo-box", c), children: [
|
|
2611
|
+
/* @__PURE__ */ p("label", { ...C, className: "rudi-combo-box__label", children: [
|
|
2612
|
+
r,
|
|
2613
|
+
a && /* @__PURE__ */ p("span", { className: "rudi-combo-box__required", "aria-hidden": "true", children: [
|
|
2614
|
+
" ",
|
|
2615
|
+
"*"
|
|
2616
|
+
] })
|
|
2617
|
+
] }),
|
|
2618
|
+
/* @__PURE__ */ p(
|
|
2619
|
+
"div",
|
|
2620
|
+
{
|
|
2621
|
+
ref: h,
|
|
2622
|
+
className: u(
|
|
2623
|
+
"rudi-combo-box__field",
|
|
2624
|
+
f && "rudi-combo-box__field--error",
|
|
2625
|
+
o && "rudi-combo-box__field--disabled"
|
|
2626
|
+
),
|
|
2627
|
+
children: [
|
|
2628
|
+
/* @__PURE__ */ i(
|
|
2629
|
+
"input",
|
|
2630
|
+
{
|
|
2631
|
+
...T,
|
|
2632
|
+
ref: b,
|
|
2633
|
+
placeholder: l,
|
|
2634
|
+
className: "rudi-combo-box__input"
|
|
2635
|
+
}
|
|
2636
|
+
),
|
|
2637
|
+
/* @__PURE__ */ i("button", { ...S, ref: N, className: "rudi-combo-box__button", children: /* @__PURE__ */ i(R, { icon: "lucide:chevrons-up-down", size: "sm" }) })
|
|
2638
|
+
]
|
|
2639
|
+
}
|
|
2640
|
+
),
|
|
2641
|
+
_.isOpen && /* @__PURE__ */ p(Nt, { state: _, triggerRef: h, popoverRef: k, children: [
|
|
2642
|
+
/* @__PURE__ */ i(vt, { ...M, state: _, listBoxRef: y }),
|
|
2643
|
+
rr && /* @__PURE__ */ i("p", { className: "rudi-combo-box__empty", children: d })
|
|
2644
|
+
] }),
|
|
2645
|
+
t && !f && /* @__PURE__ */ i("p", { ...$, className: "rudi-combo-box__description", children: t }),
|
|
2646
|
+
f && /* @__PURE__ */ i("p", { ...x, className: "rudi-combo-box__error", children: n })
|
|
2647
|
+
] });
|
|
2648
|
+
}
|
|
2649
|
+
const yt = {
|
|
2650
|
+
success: 5e3,
|
|
2651
|
+
info: 5e3,
|
|
2652
|
+
warning: 5e3,
|
|
2653
|
+
error: void 0
|
|
2654
|
+
};
|
|
2655
|
+
function kt() {
|
|
2656
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2657
|
+
}
|
|
2658
|
+
function xt(e) {
|
|
2659
|
+
typeof document < "u" && "startViewTransition" in document && !kt() ? document.startViewTransition(() => {
|
|
2660
|
+
Mi(e);
|
|
2661
|
+
}) : e();
|
|
2662
|
+
}
|
|
2663
|
+
const q = new Hr({
|
|
2664
|
+
maxVisibleToasts: 5,
|
|
2665
|
+
wrapUpdate: xt
|
|
2666
|
+
});
|
|
2667
|
+
function qe({ title: e, description: r, variant: t, timeout: n, onClose: a }) {
|
|
2668
|
+
const o = n === void 0 ? yt[t] : n;
|
|
2669
|
+
return q.add(
|
|
2670
|
+
{ title: e, description: r, variant: t },
|
|
2671
|
+
{ timeout: o && o > 0 ? o : void 0, onClose: a }
|
|
2672
|
+
);
|
|
2673
|
+
}
|
|
2674
|
+
const U = (e) => (r, t = {}) => qe({ ...t, title: r, variant: e }), Yn = {
|
|
2675
|
+
add: qe,
|
|
2676
|
+
success: U("success"),
|
|
2677
|
+
info: U("info"),
|
|
2678
|
+
warning: U("warning"),
|
|
2679
|
+
error: U("error"),
|
|
2680
|
+
close: (e) => q.close(e),
|
|
2681
|
+
/** Removes every toast. Mainly useful in tests. */
|
|
2682
|
+
clear: () => q.clear()
|
|
2683
|
+
}, Ct = {
|
|
2684
|
+
info: "lucide:info",
|
|
2685
|
+
success: "lucide:circle-check",
|
|
2686
|
+
warning: "lucide:triangle-alert",
|
|
2687
|
+
error: "lucide:circle-alert"
|
|
2688
|
+
};
|
|
2689
|
+
function St({ toast: e }) {
|
|
2690
|
+
const r = K(jr), { title: t, description: n, variant: a } = e.content;
|
|
2691
|
+
return /* @__PURE__ */ p(
|
|
2692
|
+
qr,
|
|
2693
|
+
{
|
|
2694
|
+
toast: e,
|
|
2695
|
+
className: u("rudi-toast", `rudi-toast--${a}`),
|
|
2696
|
+
style: { viewTransitionName: e.key },
|
|
2697
|
+
children: [
|
|
2698
|
+
/* @__PURE__ */ i(R, { icon: Ct[a], size: "md", className: "rudi-toast__icon" }),
|
|
2699
|
+
/* @__PURE__ */ p(Wr, { className: "rudi-toast__content", children: [
|
|
2700
|
+
/* @__PURE__ */ i(z, { slot: "title", className: "rudi-toast__title", children: t }),
|
|
2701
|
+
n && /* @__PURE__ */ i(z, { slot: "description", className: "rudi-toast__description", children: n })
|
|
2702
|
+
] }),
|
|
2703
|
+
/* @__PURE__ */ i(
|
|
2704
|
+
he,
|
|
2705
|
+
{
|
|
2706
|
+
"aria-label": "Close",
|
|
2707
|
+
variant: "ghost",
|
|
2708
|
+
size: "sm",
|
|
2709
|
+
className: "rudi-toast__close",
|
|
2710
|
+
onPress: () => r?.close(e.key),
|
|
2711
|
+
children: /* @__PURE__ */ i(R, { icon: "lucide:x", size: "sm" })
|
|
2712
|
+
}
|
|
2713
|
+
)
|
|
2714
|
+
]
|
|
2715
|
+
}
|
|
2716
|
+
);
|
|
2717
|
+
}
|
|
2718
|
+
function Jn({
|
|
2719
|
+
placement: e = "bottom-end",
|
|
2720
|
+
"aria-label": r,
|
|
2721
|
+
className: t
|
|
2722
|
+
}) {
|
|
2723
|
+
return /* @__PURE__ */ i(
|
|
2724
|
+
Ur,
|
|
2725
|
+
{
|
|
2726
|
+
queue: q,
|
|
2727
|
+
"aria-label": r,
|
|
2728
|
+
className: u("rudi-toast-region", `rudi-toast-region--${e}`, t),
|
|
2729
|
+
children: ({ toast: n }) => /* @__PURE__ */ i(St, { toast: n })
|
|
2730
|
+
}
|
|
2731
|
+
);
|
|
2732
|
+
}
|
|
2733
|
+
const ea = v(function({ density: r = "regular", striped: t = !1, stickyHeader: n = !1, maxHeight: a, className: o, ...s }, d) {
|
|
2734
|
+
const l = a != null ? {
|
|
2735
|
+
"--table-max-height": typeof a == "number" ? `${a}px` : a
|
|
2736
|
+
} : void 0;
|
|
2737
|
+
return /* @__PURE__ */ i(
|
|
2738
|
+
"div",
|
|
2739
|
+
{
|
|
2740
|
+
className: u(
|
|
2741
|
+
"rudi-table",
|
|
2742
|
+
`rudi-table--${r}`,
|
|
2743
|
+
t && "rudi-table--striped",
|
|
2744
|
+
n && "rudi-table--sticky-header",
|
|
2745
|
+
a != null && "rudi-table--max-height",
|
|
2746
|
+
o
|
|
2747
|
+
),
|
|
2748
|
+
style: l,
|
|
2749
|
+
children: /* @__PURE__ */ i(Xr, { ...s, ref: d, className: "rudi-table__grid" })
|
|
2750
|
+
}
|
|
2751
|
+
);
|
|
2752
|
+
});
|
|
2753
|
+
function We() {
|
|
2754
|
+
return /* @__PURE__ */ i(Zr, { slot: "selection", className: "rudi-table__checkbox", children: ({ isSelected: e, isIndeterminate: r }) => /* @__PURE__ */ i(
|
|
2755
|
+
"span",
|
|
2756
|
+
{
|
|
2757
|
+
"aria-hidden": "true",
|
|
2758
|
+
className: u(
|
|
2759
|
+
"rudi-table__checkbox-control",
|
|
2760
|
+
e && "rudi-table__checkbox-control--checked",
|
|
2761
|
+
r && "rudi-table__checkbox-control--indeterminate"
|
|
2762
|
+
)
|
|
2763
|
+
}
|
|
2764
|
+
) });
|
|
2765
|
+
}
|
|
2766
|
+
function ra({
|
|
2767
|
+
columns: e,
|
|
2768
|
+
children: r,
|
|
2769
|
+
dependencies: t,
|
|
2770
|
+
className: n,
|
|
2771
|
+
...a
|
|
2772
|
+
}) {
|
|
2773
|
+
const { selectionBehavior: o, selectionMode: s } = Ie();
|
|
2774
|
+
return /* @__PURE__ */ p(Qr, { ...a, className: u("rudi-table__header", n), children: [
|
|
2775
|
+
o === "toggle" && /* @__PURE__ */ i(Me, { className: "rudi-table__column rudi-table__column--selection", children: s === "multiple" ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(te, { children: "Select" }) }),
|
|
2776
|
+
/* @__PURE__ */ i(se, { items: e, dependencies: t, children: r })
|
|
2777
|
+
] });
|
|
2778
|
+
}
|
|
2779
|
+
const Pt = {
|
|
2780
|
+
ascending: "lucide:arrow-up",
|
|
2781
|
+
descending: "lucide:arrow-down",
|
|
2782
|
+
none: "lucide:arrow-up-down"
|
|
2783
|
+
};
|
|
2784
|
+
function ia({
|
|
2785
|
+
align: e = "start",
|
|
2786
|
+
width: r,
|
|
2787
|
+
minWidth: t,
|
|
2788
|
+
children: n,
|
|
2789
|
+
className: a,
|
|
2790
|
+
textValue: o,
|
|
2791
|
+
...s
|
|
2792
|
+
}) {
|
|
2793
|
+
return /* @__PURE__ */ i(
|
|
2794
|
+
Me,
|
|
2795
|
+
{
|
|
2796
|
+
...s,
|
|
2797
|
+
"data-align": e,
|
|
2798
|
+
textValue: o ?? (typeof n == "string" ? n : void 0),
|
|
2799
|
+
style: r != null || t != null ? { width: r, minWidth: t } : void 0,
|
|
2800
|
+
className: u("rudi-table__column", a),
|
|
2801
|
+
children: ({ allowsSorting: d, sortDirection: l }) => /* @__PURE__ */ p("span", { className: "rudi-table__column-content", children: [
|
|
2802
|
+
/* @__PURE__ */ i("span", { className: "rudi-table__column-label", children: n }),
|
|
2803
|
+
d && /* @__PURE__ */ i(
|
|
2804
|
+
R,
|
|
2805
|
+
{
|
|
2806
|
+
icon: Pt[l ?? "none"],
|
|
2807
|
+
size: "sm",
|
|
2808
|
+
className: u(
|
|
2809
|
+
"rudi-table__sort-icon",
|
|
2810
|
+
l && "rudi-table__sort-icon--active"
|
|
2811
|
+
)
|
|
2812
|
+
}
|
|
2813
|
+
)
|
|
2814
|
+
] })
|
|
2815
|
+
}
|
|
2816
|
+
);
|
|
2817
|
+
}
|
|
2818
|
+
function ta({ className: e, ...r }) {
|
|
2819
|
+
return /* @__PURE__ */ i(Yr, { ...r, className: u("rudi-table__body", e) });
|
|
2820
|
+
}
|
|
2821
|
+
function na({
|
|
2822
|
+
id: e,
|
|
2823
|
+
columns: r,
|
|
2824
|
+
children: t,
|
|
2825
|
+
dependencies: n,
|
|
2826
|
+
className: a,
|
|
2827
|
+
...o
|
|
2828
|
+
}) {
|
|
2829
|
+
const { selectionBehavior: s } = Ie();
|
|
2830
|
+
return /* @__PURE__ */ p(Jr, { id: e, ...o, className: u("rudi-table__row", a), children: [
|
|
2831
|
+
s === "toggle" && /* @__PURE__ */ i(De, { className: "rudi-table__cell rudi-table__cell--selection", children: /* @__PURE__ */ i(We, {}) }),
|
|
2832
|
+
/* @__PURE__ */ i(se, { items: r, dependencies: n, children: t })
|
|
2833
|
+
] });
|
|
2834
|
+
}
|
|
2835
|
+
const Tt = /* @__PURE__ */ new Set(["checkbox", "radio", "button", "submit", "reset", "range", "color", "file", "image"]);
|
|
2836
|
+
function wt(e) {
|
|
2837
|
+
return e instanceof HTMLTextAreaElement ? !0 : e instanceof HTMLInputElement ? !Tt.has(e.type) : e instanceof HTMLElement && e.isContentEditable;
|
|
2838
|
+
}
|
|
2839
|
+
function $t({
|
|
2840
|
+
columnIndex: e,
|
|
2841
|
+
align: r,
|
|
2842
|
+
children: t
|
|
2843
|
+
}) {
|
|
2844
|
+
const n = K(ei), a = e != null ? n?.collection.columns[e] : void 0, o = r ?? a?.props?.["data-align"], s = (d, l) => {
|
|
2845
|
+
wt(d.target) && n?.setKeyboardNavigationDisabled(l);
|
|
2846
|
+
};
|
|
2847
|
+
return /* @__PURE__ */ i(
|
|
2848
|
+
"div",
|
|
2849
|
+
{
|
|
2850
|
+
className: "rudi-table__cell-content",
|
|
2851
|
+
"data-align": o ?? "start",
|
|
2852
|
+
onFocus: (d) => s(d, !0),
|
|
2853
|
+
onBlur: (d) => s(d, !1),
|
|
2854
|
+
children: t
|
|
2855
|
+
}
|
|
2856
|
+
);
|
|
2857
|
+
}
|
|
2858
|
+
function aa({ align: e, children: r, className: t, textValue: n, ...a }) {
|
|
2859
|
+
return /* @__PURE__ */ i(
|
|
2860
|
+
De,
|
|
2861
|
+
{
|
|
2862
|
+
...a,
|
|
2863
|
+
textValue: n ?? (typeof r == "string" ? r : void 0),
|
|
2864
|
+
className: u("rudi-table__cell", t),
|
|
2865
|
+
children: ({ columnIndex: o }) => /* @__PURE__ */ i($t, { columnIndex: o, align: e, children: r })
|
|
2866
|
+
}
|
|
2867
|
+
);
|
|
2868
|
+
}
|
|
2869
|
+
const Re = (e) => String(e).padStart(2, "0");
|
|
2870
|
+
function L(e, r = "day") {
|
|
2871
|
+
if (!e) return null;
|
|
2872
|
+
try {
|
|
2873
|
+
if (e.includes("T")) {
|
|
2874
|
+
const n = Di(e);
|
|
2875
|
+
return r === "day" ? me(n) : n;
|
|
2876
|
+
}
|
|
2877
|
+
const t = Ei(e);
|
|
2878
|
+
return r === "minute" ? Li(t) : t;
|
|
2879
|
+
} catch {
|
|
2880
|
+
return null;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
function ie(e, r = "day") {
|
|
2884
|
+
const t = me(e).toString();
|
|
2885
|
+
if (r === "day") return t;
|
|
2886
|
+
const n = "hour" in e ? e : { hour: 0, minute: 0 };
|
|
2887
|
+
return `${t}T${Re(n.hour)}:${Re(n.minute)}`;
|
|
2888
|
+
}
|
|
2889
|
+
function Xe(e) {
|
|
2890
|
+
if (e)
|
|
2891
|
+
return (r) => e(me(r).toString());
|
|
2892
|
+
}
|
|
2893
|
+
function Ze() {
|
|
2894
|
+
return /* @__PURE__ */ p("header", { className: "rudi-date-picker__calendar-header", children: [
|
|
2895
|
+
/* @__PURE__ */ i(F, { slot: "previous", className: "rudi-date-picker__nav", children: /* @__PURE__ */ i(R, { icon: "lucide:chevron-left", size: "sm" }) }),
|
|
2896
|
+
/* @__PURE__ */ i(ri, { className: "rudi-date-picker__heading" }),
|
|
2897
|
+
/* @__PURE__ */ i(F, { slot: "next", className: "rudi-date-picker__nav", children: /* @__PURE__ */ i(R, { icon: "lucide:chevron-right", size: "sm" }) })
|
|
2898
|
+
] });
|
|
2899
|
+
}
|
|
2900
|
+
function Qe() {
|
|
2901
|
+
return /* @__PURE__ */ p(ii, { className: "rudi-date-picker__grid", children: [
|
|
2902
|
+
/* @__PURE__ */ i(ti, { children: (e) => /* @__PURE__ */ i(ni, { className: "rudi-date-picker__weekday", children: e }) }),
|
|
2903
|
+
/* @__PURE__ */ i(ai, { children: (e) => /* @__PURE__ */ i(oi, { date: e, className: "rudi-date-picker__cell" }) })
|
|
2904
|
+
] });
|
|
2905
|
+
}
|
|
2906
|
+
function Ye() {
|
|
2907
|
+
return /* @__PURE__ */ i(F, { className: "rudi-date-picker__trigger", children: /* @__PURE__ */ i(R, { icon: "lucide:calendar", size: "sm" }) });
|
|
2908
|
+
}
|
|
2909
|
+
function Je({ label: e, isRequired: r }) {
|
|
2910
|
+
return /* @__PURE__ */ p(Z, { className: "rudi-date-picker__label", children: [
|
|
2911
|
+
e,
|
|
2912
|
+
r && /* @__PURE__ */ p("span", { className: "rudi-date-picker__required", "aria-hidden": "true", children: [
|
|
2913
|
+
" ",
|
|
2914
|
+
"*"
|
|
2915
|
+
] })
|
|
2916
|
+
] });
|
|
2917
|
+
}
|
|
2918
|
+
function er({
|
|
2919
|
+
description: e,
|
|
2920
|
+
errorMessage: r,
|
|
2921
|
+
isInvalid: t
|
|
2922
|
+
}) {
|
|
2923
|
+
return /* @__PURE__ */ p(w, { children: [
|
|
2924
|
+
e && !t && /* @__PURE__ */ i(z, { slot: "description", className: "rudi-date-picker__description", children: e }),
|
|
2925
|
+
/* @__PURE__ */ i(Ee, { className: "rudi-date-picker__error", children: r || void 0 })
|
|
2926
|
+
] });
|
|
2927
|
+
}
|
|
2928
|
+
const oa = D.forwardRef(
|
|
2929
|
+
function({
|
|
2930
|
+
label: r,
|
|
2931
|
+
value: t,
|
|
2932
|
+
defaultValue: n,
|
|
2933
|
+
onChange: a,
|
|
2934
|
+
granularity: o = "day",
|
|
2935
|
+
minValue: s,
|
|
2936
|
+
maxValue: d,
|
|
2937
|
+
isDateUnavailable: l,
|
|
2938
|
+
description: c,
|
|
2939
|
+
errorMessage: m,
|
|
2940
|
+
isRequired: f = !1,
|
|
2941
|
+
isDisabled: g = !1,
|
|
2942
|
+
isReadOnly: _ = !1,
|
|
2943
|
+
name: h,
|
|
2944
|
+
hourCycle: b,
|
|
2945
|
+
className: N
|
|
2946
|
+
}, y) {
|
|
2947
|
+
const k = I(
|
|
2948
|
+
() => t === void 0 ? void 0 : L(t, o),
|
|
2949
|
+
[t, o]
|
|
2950
|
+
), C = I(
|
|
2951
|
+
() => L(n, o) ?? void 0,
|
|
2952
|
+
// Only read on mount, like any uncontrolled default.
|
|
2953
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2954
|
+
[]
|
|
2955
|
+
), T = I(
|
|
2956
|
+
() => L(s, o) ?? void 0,
|
|
2957
|
+
[s, o]
|
|
2958
|
+
), M = I(
|
|
2959
|
+
() => L(d, o) ?? void 0,
|
|
2960
|
+
[d, o]
|
|
2961
|
+
), E = I(
|
|
2962
|
+
() => Xe(l),
|
|
2963
|
+
[l]
|
|
2964
|
+
), $ = (x) => {
|
|
2965
|
+
a?.(x ? ie(x, o) : null);
|
|
2966
|
+
};
|
|
2967
|
+
return /* @__PURE__ */ i(
|
|
2968
|
+
si,
|
|
2969
|
+
{
|
|
2970
|
+
ref: y,
|
|
2971
|
+
className: u("rudi-date-picker", N),
|
|
2972
|
+
value: k,
|
|
2973
|
+
defaultValue: C,
|
|
2974
|
+
onChange: $,
|
|
2975
|
+
granularity: o,
|
|
2976
|
+
minValue: T,
|
|
2977
|
+
maxValue: M,
|
|
2978
|
+
isDateUnavailable: E,
|
|
2979
|
+
isRequired: f,
|
|
2980
|
+
isDisabled: g,
|
|
2981
|
+
isReadOnly: _,
|
|
2982
|
+
isInvalid: m ? !0 : void 0,
|
|
2983
|
+
validationBehavior: "aria",
|
|
2984
|
+
name: h,
|
|
2985
|
+
hourCycle: b,
|
|
2986
|
+
shouldForceLeadingZeros: !0,
|
|
2987
|
+
children: ({ isInvalid: x }) => /* @__PURE__ */ p(w, { children: [
|
|
2988
|
+
/* @__PURE__ */ i(Je, { label: r, isRequired: f }),
|
|
2989
|
+
/* @__PURE__ */ p(de, { className: "rudi-date-picker__field", children: [
|
|
2990
|
+
/* @__PURE__ */ i(Q, { className: "rudi-date-picker__input", children: (S) => /* @__PURE__ */ i(
|
|
2991
|
+
Y,
|
|
2992
|
+
{
|
|
2993
|
+
segment: S,
|
|
2994
|
+
className: "rudi-date-picker__segment"
|
|
2995
|
+
}
|
|
2996
|
+
) }),
|
|
2997
|
+
/* @__PURE__ */ i(Ye, {})
|
|
2998
|
+
] }),
|
|
2999
|
+
/* @__PURE__ */ i(
|
|
3000
|
+
er,
|
|
3001
|
+
{
|
|
3002
|
+
description: c,
|
|
3003
|
+
errorMessage: m,
|
|
3004
|
+
isInvalid: x
|
|
3005
|
+
}
|
|
3006
|
+
),
|
|
3007
|
+
/* @__PURE__ */ i(oe, { className: "rudi-date-picker__popover", placement: "bottom start", children: /* @__PURE__ */ i(Le, { className: "rudi-date-picker__dialog", children: /* @__PURE__ */ p(di, { className: "rudi-date-picker__calendar", children: [
|
|
3008
|
+
/* @__PURE__ */ i(Ze, {}),
|
|
3009
|
+
/* @__PURE__ */ i(Qe, {})
|
|
3010
|
+
] }) }) })
|
|
3011
|
+
] })
|
|
3012
|
+
}
|
|
3013
|
+
);
|
|
3014
|
+
}
|
|
3015
|
+
);
|
|
3016
|
+
function ye(e) {
|
|
3017
|
+
if (!e) return null;
|
|
3018
|
+
const r = L(e.start, "day"), t = L(e.end, "day");
|
|
3019
|
+
return r && t ? { start: r, end: t } : null;
|
|
3020
|
+
}
|
|
3021
|
+
const sa = D.forwardRef(function({
|
|
3022
|
+
label: r,
|
|
3023
|
+
value: t,
|
|
3024
|
+
defaultValue: n,
|
|
3025
|
+
onChange: a,
|
|
3026
|
+
minValue: o,
|
|
3027
|
+
maxValue: s,
|
|
3028
|
+
isDateUnavailable: d,
|
|
3029
|
+
description: l,
|
|
3030
|
+
errorMessage: c,
|
|
3031
|
+
isRequired: m = !1,
|
|
3032
|
+
isDisabled: f = !1,
|
|
3033
|
+
isReadOnly: g = !1,
|
|
3034
|
+
startName: _,
|
|
3035
|
+
endName: h,
|
|
3036
|
+
className: b
|
|
3037
|
+
}, N) {
|
|
3038
|
+
const y = t === void 0 ? void 0 : t ? `${t.start}/${t.end}` : null, k = I(
|
|
3039
|
+
() => t === void 0 ? void 0 : ye(t),
|
|
3040
|
+
// valueKey captures the range contents, so new-but-equal objects don't re-parse.
|
|
3041
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3042
|
+
[y]
|
|
3043
|
+
), C = I(
|
|
3044
|
+
() => ye(n) ?? void 0,
|
|
3045
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3046
|
+
[]
|
|
3047
|
+
), T = I(() => L(o) ?? void 0, [o]), M = I(() => L(s) ?? void 0, [s]), E = I(
|
|
3048
|
+
() => Xe(d),
|
|
3049
|
+
[d]
|
|
3050
|
+
), $ = (x) => {
|
|
3051
|
+
a?.(
|
|
3052
|
+
x ? { start: ie(x.start), end: ie(x.end) } : null
|
|
3053
|
+
);
|
|
3054
|
+
};
|
|
3055
|
+
return /* @__PURE__ */ i(
|
|
3056
|
+
li,
|
|
3057
|
+
{
|
|
3058
|
+
ref: N,
|
|
3059
|
+
className: u("rudi-date-picker", b),
|
|
3060
|
+
value: k,
|
|
3061
|
+
defaultValue: C,
|
|
3062
|
+
onChange: $,
|
|
3063
|
+
granularity: "day",
|
|
3064
|
+
minValue: T,
|
|
3065
|
+
maxValue: M,
|
|
3066
|
+
isDateUnavailable: E,
|
|
3067
|
+
isRequired: m,
|
|
3068
|
+
isDisabled: f,
|
|
3069
|
+
isReadOnly: g,
|
|
3070
|
+
isInvalid: c ? !0 : void 0,
|
|
3071
|
+
validationBehavior: "aria",
|
|
3072
|
+
startName: _,
|
|
3073
|
+
endName: h,
|
|
3074
|
+
shouldForceLeadingZeros: !0,
|
|
3075
|
+
children: ({ isInvalid: x }) => /* @__PURE__ */ p(w, { children: [
|
|
3076
|
+
/* @__PURE__ */ i(Je, { label: r, isRequired: m }),
|
|
3077
|
+
/* @__PURE__ */ p(de, { className: "rudi-date-picker__field", children: [
|
|
3078
|
+
/* @__PURE__ */ i(Q, { slot: "start", className: "rudi-date-picker__input", children: (S) => /* @__PURE__ */ i(Y, { segment: S, className: "rudi-date-picker__segment" }) }),
|
|
3079
|
+
/* @__PURE__ */ i("span", { className: "rudi-date-picker__range-separator", "aria-hidden": "true", children: "–" }),
|
|
3080
|
+
/* @__PURE__ */ i(Q, { slot: "end", className: "rudi-date-picker__input", children: (S) => /* @__PURE__ */ i(Y, { segment: S, className: "rudi-date-picker__segment" }) }),
|
|
3081
|
+
/* @__PURE__ */ i(Ye, {})
|
|
3082
|
+
] }),
|
|
3083
|
+
/* @__PURE__ */ i(
|
|
3084
|
+
er,
|
|
3085
|
+
{
|
|
3086
|
+
description: l,
|
|
3087
|
+
errorMessage: c,
|
|
3088
|
+
isInvalid: x
|
|
3089
|
+
}
|
|
3090
|
+
),
|
|
3091
|
+
/* @__PURE__ */ i(oe, { className: "rudi-date-picker__popover", placement: "bottom start", children: /* @__PURE__ */ i(Le, { className: "rudi-date-picker__dialog", children: /* @__PURE__ */ p(ci, { className: "rudi-date-picker__calendar rudi-date-picker__calendar--range", children: [
|
|
3092
|
+
/* @__PURE__ */ i(Ze, {}),
|
|
3093
|
+
/* @__PURE__ */ i(Qe, {})
|
|
3094
|
+
] }) }) })
|
|
3095
|
+
] })
|
|
3096
|
+
}
|
|
3097
|
+
);
|
|
3098
|
+
}), ke = (e) => e === void 0 ? void 0 : e === null ? NaN : e, da = D.forwardRef(
|
|
3099
|
+
function({
|
|
3100
|
+
label: r,
|
|
3101
|
+
labelHidden: t = !1,
|
|
3102
|
+
value: n,
|
|
3103
|
+
defaultValue: a,
|
|
3104
|
+
onChange: o,
|
|
3105
|
+
minValue: s,
|
|
3106
|
+
maxValue: d,
|
|
3107
|
+
step: l,
|
|
3108
|
+
formatOptions: c,
|
|
3109
|
+
placeholder: m,
|
|
3110
|
+
description: f,
|
|
3111
|
+
errorMessage: g,
|
|
3112
|
+
isRequired: _ = !1,
|
|
3113
|
+
isDisabled: h = !1,
|
|
3114
|
+
isReadOnly: b = !1,
|
|
3115
|
+
name: N,
|
|
3116
|
+
hideStepper: y = !1,
|
|
3117
|
+
className: k
|
|
3118
|
+
}, C) {
|
|
3119
|
+
return /* @__PURE__ */ i(
|
|
3120
|
+
ui,
|
|
3121
|
+
{
|
|
3122
|
+
className: u("rudi-number-field", k),
|
|
3123
|
+
value: ke(n),
|
|
3124
|
+
defaultValue: ke(a),
|
|
3125
|
+
onChange: (T) => o?.(Number.isNaN(T) ? null : T),
|
|
3126
|
+
minValue: s,
|
|
3127
|
+
maxValue: d,
|
|
3128
|
+
step: l,
|
|
3129
|
+
formatOptions: c,
|
|
3130
|
+
isRequired: _,
|
|
3131
|
+
isDisabled: h,
|
|
3132
|
+
isReadOnly: b,
|
|
3133
|
+
isInvalid: g ? !0 : void 0,
|
|
3134
|
+
validationBehavior: "aria",
|
|
3135
|
+
name: N,
|
|
3136
|
+
children: ({ isInvalid: T }) => /* @__PURE__ */ p(w, { children: [
|
|
3137
|
+
t ? /* @__PURE__ */ i(te, { children: /* @__PURE__ */ i(Z, { children: r }) }) : /* @__PURE__ */ p(Z, { className: "rudi-number-field__label", children: [
|
|
3138
|
+
r,
|
|
3139
|
+
_ && /* @__PURE__ */ p("span", { className: "rudi-number-field__required", "aria-hidden": "true", children: [
|
|
3140
|
+
" ",
|
|
3141
|
+
"*"
|
|
3142
|
+
] })
|
|
3143
|
+
] }),
|
|
3144
|
+
/* @__PURE__ */ p(de, { className: "rudi-number-field__field", children: [
|
|
3145
|
+
/* @__PURE__ */ i(
|
|
3146
|
+
mi,
|
|
3147
|
+
{
|
|
3148
|
+
ref: C,
|
|
3149
|
+
placeholder: m,
|
|
3150
|
+
className: "rudi-number-field__input"
|
|
3151
|
+
}
|
|
3152
|
+
),
|
|
3153
|
+
!y && /* @__PURE__ */ p(w, { children: [
|
|
3154
|
+
/* @__PURE__ */ i(F, { slot: "decrement", className: "rudi-number-field__stepper", children: /* @__PURE__ */ i(R, { icon: "lucide:minus", size: "sm" }) }),
|
|
3155
|
+
/* @__PURE__ */ i(F, { slot: "increment", className: "rudi-number-field__stepper", children: /* @__PURE__ */ i(R, { icon: "lucide:plus", size: "sm" }) })
|
|
3156
|
+
] })
|
|
3157
|
+
] }),
|
|
3158
|
+
f && !T && /* @__PURE__ */ i(z, { slot: "description", className: "rudi-number-field__description", children: f }),
|
|
3159
|
+
/* @__PURE__ */ i(Ee, { className: "rudi-number-field__error", children: g || void 0 })
|
|
3160
|
+
] })
|
|
2070
3161
|
}
|
|
2071
3162
|
);
|
|
2072
3163
|
}
|
|
2073
3164
|
);
|
|
2074
3165
|
export {
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
3166
|
+
Wi as RudiAlert,
|
|
3167
|
+
An as RudiAppShell,
|
|
3168
|
+
Rn as RudiAvatar,
|
|
3169
|
+
Xi as RudiBadge,
|
|
3170
|
+
Cn as RudiBarChart,
|
|
3171
|
+
Bn as RudiBox,
|
|
3172
|
+
Hn as RudiBrand,
|
|
3173
|
+
Nn as RudiBreadcrumb,
|
|
3174
|
+
jt as RudiButton,
|
|
3175
|
+
ve as RudiCard,
|
|
3176
|
+
Ln as RudiCenter,
|
|
3177
|
+
Wt as RudiCheckbox,
|
|
3178
|
+
Xt as RudiCheckboxGroup,
|
|
3179
|
+
xn as RudiCircularProgress,
|
|
3180
|
+
Mn as RudiCluster,
|
|
3181
|
+
Qn as RudiComboBox,
|
|
3182
|
+
On as RudiCover,
|
|
3183
|
+
oa as RudiDatePicker,
|
|
3184
|
+
sa as RudiDateRangePicker,
|
|
3185
|
+
nn as RudiDialog,
|
|
3186
|
+
mn as RudiDivider,
|
|
3187
|
+
Pn as RudiDonutChart,
|
|
3188
|
+
pn as RudiDot,
|
|
3189
|
+
Zn as RudiEmptyState,
|
|
3190
|
+
Un as RudiForm,
|
|
3191
|
+
Dn as RudiGrid,
|
|
3192
|
+
fe as RudiHeading,
|
|
3193
|
+
R as RudiIcon,
|
|
3194
|
+
he as RudiIconButton,
|
|
3195
|
+
fn as RudiImage,
|
|
3196
|
+
qt as RudiInput,
|
|
3197
|
+
Tn as RudiKanbanBoard,
|
|
3198
|
+
wn as RudiKanbanCard,
|
|
3199
|
+
He as RudiKanbanColumn,
|
|
3200
|
+
Ui as RudiKeyboard,
|
|
3201
|
+
Sn as RudiLineChart,
|
|
3202
|
+
hn as RudiLink,
|
|
3203
|
+
Yt as RudiMenu,
|
|
3204
|
+
Jt as RudiMenuItem,
|
|
3205
|
+
en as RudiMenuSection,
|
|
3206
|
+
rn as RudiMenuSeparator,
|
|
3207
|
+
Qt as RudiMenuTrigger,
|
|
3208
|
+
kn as RudiNavItem,
|
|
3209
|
+
da as RudiNumberField,
|
|
3210
|
+
ua as RudiOption,
|
|
3211
|
+
Gn as RudiPageHeader,
|
|
3212
|
+
vn as RudiPagination,
|
|
3213
|
+
un as RudiProgressBar,
|
|
3214
|
+
$n as RudiProse,
|
|
3215
|
+
sn as RudiRadio,
|
|
3216
|
+
on as RudiRadioGroup,
|
|
3217
|
+
_n as RudiRating,
|
|
3218
|
+
Vn as RudiRouterProvider,
|
|
3219
|
+
Kn as RudiSectionHeader,
|
|
3220
|
+
Zt as RudiSelect,
|
|
3221
|
+
pa as RudiSeparator,
|
|
3222
|
+
En as RudiSidebar,
|
|
3223
|
+
In as RudiStack,
|
|
3224
|
+
yn as RudiStatCard,
|
|
3225
|
+
bn as RudiStepper,
|
|
3226
|
+
tn as RudiSubmenuTrigger,
|
|
3227
|
+
an as RudiSwitch,
|
|
3228
|
+
zn as RudiSwitcher,
|
|
3229
|
+
Wn as RudiTab,
|
|
3230
|
+
qn as RudiTabList,
|
|
3231
|
+
Xn as RudiTabPanel,
|
|
3232
|
+
ea as RudiTable,
|
|
3233
|
+
ta as RudiTableBody,
|
|
3234
|
+
aa as RudiTableCell,
|
|
3235
|
+
ia as RudiTableColumn,
|
|
3236
|
+
ra as RudiTableHeader,
|
|
3237
|
+
na as RudiTableRow,
|
|
3238
|
+
jn as RudiTabs,
|
|
3239
|
+
cn as RudiTag,
|
|
3240
|
+
_e as RudiText,
|
|
3241
|
+
gn as RudiTextarea,
|
|
3242
|
+
Jn as RudiToastRegion,
|
|
3243
|
+
ln as RudiTooltip,
|
|
3244
|
+
dn as RudiTooltipTrigger,
|
|
3245
|
+
Fn as RudiTopBar,
|
|
3246
|
+
u as cn,
|
|
3247
|
+
Yn as rudiToast,
|
|
3248
|
+
pe as useChartTheme,
|
|
3249
|
+
ze as useLoadingButton
|
|
2134
3250
|
};
|