rudiment-ui 0.1.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 +21 -0
- package/README.md +150 -0
- package/dist/components/Alert/Alert.d.ts +12 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +10 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +13 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +28 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Charts/BarChart/BarChart.d.ts +14 -0
- package/dist/components/Charts/BarChart/BarChart.d.ts.map +1 -0
- package/dist/components/Charts/DonutChart/DonutChart.d.ts +15 -0
- package/dist/components/Charts/DonutChart/DonutChart.d.ts.map +1 -0
- package/dist/components/Charts/LineChart/LineChart.d.ts +14 -0
- package/dist/components/Charts/LineChart/LineChart.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +13 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts +13 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +11 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Icon/Icon.d.ts +9 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +12 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +16 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Kanban/KanbanBoard.d.ts +29 -0
- package/dist/components/Kanban/KanbanBoard.d.ts.map +1 -0
- package/dist/components/Kanban/KanbanCard.d.ts +7 -0
- package/dist/components/Kanban/KanbanCard.d.ts.map +1 -0
- package/dist/components/Kanban/KanbanColumn.d.ts +10 -0
- package/dist/components/Kanban/KanbanColumn.d.ts.map +1 -0
- package/dist/components/Menu/Keyboard.d.ts +5 -0
- package/dist/components/Menu/Keyboard.d.ts.map +1 -0
- package/dist/components/Menu/Menu.d.ts +6 -0
- package/dist/components/Menu/Menu.d.ts.map +1 -0
- package/dist/components/Menu/MenuItem.d.ts +6 -0
- package/dist/components/Menu/MenuItem.d.ts.map +1 -0
- package/dist/components/Menu/MenuSection.d.ts +7 -0
- package/dist/components/Menu/MenuSection.d.ts.map +1 -0
- package/dist/components/Menu/MenuTrigger.d.ts +5 -0
- package/dist/components/Menu/MenuTrigger.d.ts.map +1 -0
- package/dist/components/NavItem/NavItem.d.ts +13 -0
- package/dist/components/NavItem/NavItem.d.ts.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +12 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +17 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/StatCard/StatCard.d.ts +10 -0
- package/dist/components/StatCard/StatCard.d.ts.map +1 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Tag/Tag.d.ts +11 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/hooks/useChartTheme.d.ts +14 -0
- package/dist/hooks/useChartTheme.d.ts.map +1 -0
- package/dist/hooks/useLoadingButton.d.ts +297 -0
- package/dist/hooks/useLoadingButton.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1655 -0
- package/dist/layouts/Box/Box.d.ts +9 -0
- package/dist/layouts/Box/Box.d.ts.map +1 -0
- package/dist/layouts/Center/Center.d.ts +9 -0
- package/dist/layouts/Center/Center.d.ts.map +1 -0
- package/dist/layouts/Cluster/Cluster.d.ts +9 -0
- package/dist/layouts/Cluster/Cluster.d.ts.map +1 -0
- package/dist/layouts/Cover/Cover.d.ts +8 -0
- package/dist/layouts/Cover/Cover.d.ts.map +1 -0
- package/dist/layouts/Grid/Grid.d.ts +8 -0
- package/dist/layouts/Grid/Grid.d.ts.map +1 -0
- package/dist/layouts/Sidebar/Sidebar.d.ts +11 -0
- package/dist/layouts/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/layouts/Stack/Stack.d.ts +13 -0
- package/dist/layouts/Stack/Stack.d.ts.map +1 -0
- package/dist/layouts/Switcher/Switcher.d.ts +9 -0
- package/dist/layouts/Switcher/Switcher.d.ts.map +1 -0
- package/dist/typography/Heading/Heading.d.ts +8 -0
- package/dist/typography/Heading/Heading.d.ts.map +1 -0
- package/dist/typography/Prose/Prose.d.ts +8 -0
- package/dist/typography/Prose/Prose.d.ts.map +1 -0
- package/dist/typography/Text/Text.d.ts +8 -0
- package/dist/typography/Text/Text.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/package.json +102 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1655 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx as ne } from "clsx";
|
|
3
|
+
import { twMerge as oe } from "tailwind-merge";
|
|
4
|
+
import { useButton as O, useTextField as ie, useCheckbox as ae, useCheckboxGroup as se, useSelect as ce, HiddenSelect as le, usePopover as de, useListBox as ue, useOption as me, usePreventScroll as fe, useModalOverlay as he, useDialog as pe, OverlayContainer as ge, FocusScope as be, useSwitch as _e, VisuallyHidden as ve, useRadioGroup as Ne, useTooltip as Ce, useTooltipTrigger as ye, useProgressBar as Z, useLink as ke } from "react-aria";
|
|
5
|
+
import w, { useState as D, useCallback as $, useEffect as xe, forwardRef as b, useRef as y, createContext as Pe, Children as Se, isValidElement as Be, cloneElement as Ie } from "react";
|
|
6
|
+
import { jsx as r, jsxs as h, Fragment as T } from "react/jsx-runtime";
|
|
7
|
+
import { useObjectRef as k } from "@react-aria/utils";
|
|
8
|
+
import { Icon as $e } from "@iconify/react";
|
|
9
|
+
import { useToggleState as q, useCheckboxGroupState as we, useSelectState as Te, useRadioGroupState as De, useTooltipTriggerState as Me } from "react-stately";
|
|
10
|
+
import { MenuTrigger as Re, Popover as Ee, Menu as Oe, MenuItem as Ke, MenuSection as Le, Header as Ge, Collection as Ae, Keyboard as Fe } from "react-aria-components";
|
|
11
|
+
import { Separator as kr, SubmenuTrigger as xr } from "react-aria-components";
|
|
12
|
+
import { ResponsiveContainer as G, BarChart as je, CartesianGrid as J, XAxis as K, YAxis as L, Tooltip as A, Legend as F, Bar as ze, LineChart as He, Line as Ue, PieChart as Xe, Pie as We, Cell as Ye } from "recharts";
|
|
13
|
+
import { useDroppable as Ze, useSensors as qe, useSensor as U, PointerSensor as Je, KeyboardSensor as Qe, DndContext as Ve, closestCorners as et, DragOverlay as tt } from "@dnd-kit/core";
|
|
14
|
+
import { SortableContext as rt, verticalListSortingStrategy as nt, sortableKeyboardCoordinates as ot, useSortable as it } from "@dnd-kit/sortable";
|
|
15
|
+
import { CSS as at } from "@dnd-kit/utilities";
|
|
16
|
+
function m(...t) {
|
|
17
|
+
return oe(ne(t));
|
|
18
|
+
}
|
|
19
|
+
function Q(t, e, n) {
|
|
20
|
+
const { buttonProps: o } = O(
|
|
21
|
+
{ ...t, isDisabled: t.isDisabled || e },
|
|
22
|
+
n
|
|
23
|
+
);
|
|
24
|
+
return {
|
|
25
|
+
buttonProps: {
|
|
26
|
+
...o,
|
|
27
|
+
"aria-busy": e || void 0
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const st = {
|
|
32
|
+
axisColor: "--token-component-chart-axis-color",
|
|
33
|
+
gridColor: "--token-component-chart-grid-color",
|
|
34
|
+
labelColor: "--token-component-chart-label-color",
|
|
35
|
+
legendColor: "--token-component-chart-legend-color",
|
|
36
|
+
tooltipBg: "--token-component-chart-tooltip-bg",
|
|
37
|
+
tooltipText: "--token-component-chart-tooltip-text",
|
|
38
|
+
tooltipBorder: "--token-component-chart-tooltip-border",
|
|
39
|
+
chartBg: "--token-component-chart-bg"
|
|
40
|
+
}, ct = Array.from(
|
|
41
|
+
{ length: 8 },
|
|
42
|
+
(t, e) => `--token-color-dataviz-series-${e + 1}`
|
|
43
|
+
), X = [
|
|
44
|
+
"#2563eb",
|
|
45
|
+
"#d946ef",
|
|
46
|
+
"#f59e0b",
|
|
47
|
+
"#10b981",
|
|
48
|
+
"#ef4444",
|
|
49
|
+
"#8b5cf6",
|
|
50
|
+
"#06b6d4",
|
|
51
|
+
"#f97316"
|
|
52
|
+
];
|
|
53
|
+
function W() {
|
|
54
|
+
if (typeof window > "u")
|
|
55
|
+
return {
|
|
56
|
+
colors: X,
|
|
57
|
+
axisColor: "#6b7280",
|
|
58
|
+
gridColor: "#e5e7eb",
|
|
59
|
+
labelColor: "#111827",
|
|
60
|
+
legendColor: "#6b7280",
|
|
61
|
+
tooltipBg: "#ffffff",
|
|
62
|
+
tooltipText: "#111827",
|
|
63
|
+
tooltipBorder: "#e5e7eb",
|
|
64
|
+
chartBg: "#ffffff"
|
|
65
|
+
};
|
|
66
|
+
const t = getComputedStyle(document.documentElement), e = (i) => t.getPropertyValue(i).trim(), n = ct.map((i, a) => e(i) || X[a]), o = {};
|
|
67
|
+
for (const [i, a] of Object.entries(st))
|
|
68
|
+
o[i] = e(a) || "";
|
|
69
|
+
return {
|
|
70
|
+
colors: n,
|
|
71
|
+
axisColor: o.axisColor,
|
|
72
|
+
gridColor: o.gridColor,
|
|
73
|
+
labelColor: o.labelColor,
|
|
74
|
+
legendColor: o.legendColor,
|
|
75
|
+
tooltipBg: o.tooltipBg,
|
|
76
|
+
tooltipText: o.tooltipText,
|
|
77
|
+
tooltipBorder: o.tooltipBorder,
|
|
78
|
+
chartBg: o.chartBg
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function j() {
|
|
82
|
+
const [t, e] = D(W), n = $(() => {
|
|
83
|
+
e(W());
|
|
84
|
+
}, []);
|
|
85
|
+
return xe(() => {
|
|
86
|
+
n();
|
|
87
|
+
const o = new MutationObserver((i) => {
|
|
88
|
+
for (const a of i)
|
|
89
|
+
a.type === "attributes" && a.attributeName === "data-theme" && n();
|
|
90
|
+
});
|
|
91
|
+
return o.observe(document.documentElement, {
|
|
92
|
+
attributes: !0,
|
|
93
|
+
attributeFilter: ["data-theme"]
|
|
94
|
+
}), () => o.disconnect();
|
|
95
|
+
}, [n]), t;
|
|
96
|
+
}
|
|
97
|
+
const P = b(
|
|
98
|
+
function({ icon: e, size: n = "md", color: o, label: i, className: a }, l) {
|
|
99
|
+
const c = typeof n == "string" ? `rudiment-icon--${n}` : void 0, d = typeof n == "number" ? { width: n, height: n, ...o ? { color: o } : {} } : o ? { color: o } : void 0;
|
|
100
|
+
return /* @__PURE__ */ r(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
ref: l,
|
|
104
|
+
className: m("rudiment-icon", c, a),
|
|
105
|
+
role: i ? "img" : void 0,
|
|
106
|
+
"aria-label": i,
|
|
107
|
+
"aria-hidden": i ? void 0 : !0,
|
|
108
|
+
style: d,
|
|
109
|
+
children: /* @__PURE__ */ r($e, { icon: e })
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
), Ot = w.forwardRef(
|
|
114
|
+
function({
|
|
115
|
+
variant: e = "primary",
|
|
116
|
+
size: n = "md",
|
|
117
|
+
isLoading: o = !1,
|
|
118
|
+
iconBefore: i,
|
|
119
|
+
iconAfter: a,
|
|
120
|
+
className: l,
|
|
121
|
+
children: c,
|
|
122
|
+
...d
|
|
123
|
+
}, u) {
|
|
124
|
+
const s = k(u), { buttonProps: p } = Q(d, o, s);
|
|
125
|
+
return /* @__PURE__ */ r(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
...p,
|
|
129
|
+
ref: s,
|
|
130
|
+
className: m(
|
|
131
|
+
"rudiment-button",
|
|
132
|
+
`rudiment-button--${e}`,
|
|
133
|
+
`rudiment-button--${n}`,
|
|
134
|
+
o && "rudiment-button--loading",
|
|
135
|
+
l
|
|
136
|
+
),
|
|
137
|
+
children: o ? /* @__PURE__ */ h(T, { children: [
|
|
138
|
+
/* @__PURE__ */ r("span", { className: "rudiment-button__spinner", role: "img", "aria-hidden": "true" }),
|
|
139
|
+
/* @__PURE__ */ r("span", { children: c })
|
|
140
|
+
] }) : /* @__PURE__ */ h(T, { children: [
|
|
141
|
+
i && /* @__PURE__ */ r(P, { icon: i, size: n, className: "rudiment-button__icon" }),
|
|
142
|
+
/* @__PURE__ */ r("span", { children: c }),
|
|
143
|
+
a && /* @__PURE__ */ r(P, { icon: a, size: n, className: "rudiment-button__icon" })
|
|
144
|
+
] })
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
), Kt = w.forwardRef(
|
|
149
|
+
function({
|
|
150
|
+
label: e,
|
|
151
|
+
type: n = "text",
|
|
152
|
+
placeholder: o,
|
|
153
|
+
description: i,
|
|
154
|
+
errorMessage: a,
|
|
155
|
+
isRequired: l = !1,
|
|
156
|
+
isDisabled: c = !1,
|
|
157
|
+
value: d,
|
|
158
|
+
defaultValue: u,
|
|
159
|
+
onChange: s,
|
|
160
|
+
className: p
|
|
161
|
+
}, g) {
|
|
162
|
+
const f = k(g), {
|
|
163
|
+
labelProps: _,
|
|
164
|
+
inputProps: v,
|
|
165
|
+
descriptionProps: N,
|
|
166
|
+
errorMessageProps: x,
|
|
167
|
+
isInvalid: C
|
|
168
|
+
} = ie(
|
|
169
|
+
{
|
|
170
|
+
label: e,
|
|
171
|
+
type: n,
|
|
172
|
+
placeholder: o,
|
|
173
|
+
description: i,
|
|
174
|
+
errorMessage: a,
|
|
175
|
+
isRequired: l,
|
|
176
|
+
isDisabled: c,
|
|
177
|
+
value: d,
|
|
178
|
+
defaultValue: u,
|
|
179
|
+
onChange: s,
|
|
180
|
+
isInvalid: !!a
|
|
181
|
+
},
|
|
182
|
+
f
|
|
183
|
+
);
|
|
184
|
+
return /* @__PURE__ */ h("div", { className: m("rudiment-input", p), children: [
|
|
185
|
+
/* @__PURE__ */ h("label", { ..._, className: "rudiment-input__label", children: [
|
|
186
|
+
e,
|
|
187
|
+
l && /* @__PURE__ */ h("span", { className: "rudiment-input__required", "aria-hidden": "true", children: [
|
|
188
|
+
" ",
|
|
189
|
+
"*"
|
|
190
|
+
] })
|
|
191
|
+
] }),
|
|
192
|
+
/* @__PURE__ */ r(
|
|
193
|
+
"input",
|
|
194
|
+
{
|
|
195
|
+
...v,
|
|
196
|
+
ref: f,
|
|
197
|
+
className: m(
|
|
198
|
+
"rudiment-input__field",
|
|
199
|
+
C && "rudiment-input__field--error"
|
|
200
|
+
)
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
i && !C && /* @__PURE__ */ r("p", { ...N, className: "rudiment-input__description", children: i }),
|
|
204
|
+
C && a && /* @__PURE__ */ r("p", { ...x, className: "rudiment-input__error", children: a })
|
|
205
|
+
] });
|
|
206
|
+
}
|
|
207
|
+
), Lt = b(
|
|
208
|
+
function(e, n) {
|
|
209
|
+
const o = k(n), i = q(e), { inputProps: a } = ae(e, i, o);
|
|
210
|
+
return /* @__PURE__ */ h(
|
|
211
|
+
"label",
|
|
212
|
+
{
|
|
213
|
+
className: m(
|
|
214
|
+
"rudiment-checkbox",
|
|
215
|
+
e.isDisabled && "rudiment-checkbox--disabled",
|
|
216
|
+
e.className
|
|
217
|
+
),
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ r("input", { ...a, ref: o, className: "rudiment-checkbox__input" }),
|
|
220
|
+
/* @__PURE__ */ r(
|
|
221
|
+
"span",
|
|
222
|
+
{
|
|
223
|
+
className: m(
|
|
224
|
+
"rudiment-checkbox__control",
|
|
225
|
+
i.isSelected && "rudiment-checkbox__control--checked",
|
|
226
|
+
e.isIndeterminate && "rudiment-checkbox__control--indeterminate"
|
|
227
|
+
),
|
|
228
|
+
"aria-hidden": "true"
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ r("span", { className: "rudiment-checkbox__label", children: e.children })
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
function Gt(t) {
|
|
238
|
+
const e = we(t), { groupProps: n, labelProps: o, descriptionProps: i, errorMessageProps: a } = se(t, e);
|
|
239
|
+
return /* @__PURE__ */ h(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
...n,
|
|
243
|
+
className: m("rudiment-checkbox-group", t.className),
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ r("span", { ...o, className: "rudiment-checkbox-group__label", children: t.label }),
|
|
246
|
+
t.children,
|
|
247
|
+
t.description && !t.errorMessage && /* @__PURE__ */ r(
|
|
248
|
+
"p",
|
|
249
|
+
{
|
|
250
|
+
...i,
|
|
251
|
+
className: "rudiment-checkbox-group__description",
|
|
252
|
+
children: t.description
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
t.errorMessage && /* @__PURE__ */ r("p", { ...a, className: "rudiment-checkbox-group__error", children: t.errorMessage })
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function lt(t) {
|
|
261
|
+
return /* @__PURE__ */ r(
|
|
262
|
+
"svg",
|
|
263
|
+
{
|
|
264
|
+
...t,
|
|
265
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
266
|
+
width: "16",
|
|
267
|
+
height: "16",
|
|
268
|
+
viewBox: "0 0 24 24",
|
|
269
|
+
fill: "none",
|
|
270
|
+
stroke: "currentColor",
|
|
271
|
+
strokeWidth: "2",
|
|
272
|
+
strokeLinecap: "round",
|
|
273
|
+
strokeLinejoin: "round",
|
|
274
|
+
children: /* @__PURE__ */ r("polyline", { points: "6 9 12 15 18 9" })
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
function dt({
|
|
279
|
+
state: t,
|
|
280
|
+
triggerRef: e,
|
|
281
|
+
popoverRef: n,
|
|
282
|
+
children: o
|
|
283
|
+
}) {
|
|
284
|
+
const { popoverProps: i } = de({ triggerRef: e, popoverRef: n }, t);
|
|
285
|
+
return /* @__PURE__ */ r(
|
|
286
|
+
"div",
|
|
287
|
+
{
|
|
288
|
+
...i,
|
|
289
|
+
ref: n,
|
|
290
|
+
className: "rudiment-select__popover",
|
|
291
|
+
children: o
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
function ut({ state: t, listBoxRef: e, ...n }) {
|
|
296
|
+
const { listBoxProps: o } = ue(n, t, e);
|
|
297
|
+
return /* @__PURE__ */ r("ul", { ...o, ref: e, className: "rudiment-select__listbox", children: [...t.collection].map((i) => /* @__PURE__ */ r(mt, { item: i, state: t }, i.key)) });
|
|
298
|
+
}
|
|
299
|
+
function mt({ item: t, state: e }) {
|
|
300
|
+
const n = y(null), { optionProps: o, isSelected: i, isFocused: a } = me(
|
|
301
|
+
{ key: t.key },
|
|
302
|
+
e,
|
|
303
|
+
n
|
|
304
|
+
);
|
|
305
|
+
return /* @__PURE__ */ r(
|
|
306
|
+
"li",
|
|
307
|
+
{
|
|
308
|
+
...o,
|
|
309
|
+
ref: n,
|
|
310
|
+
className: "rudiment-select__option",
|
|
311
|
+
"data-focused": a,
|
|
312
|
+
"aria-selected": i,
|
|
313
|
+
children: t.rendered
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
function At(t) {
|
|
318
|
+
const e = Te(t), n = y(null), o = y(null), i = y(null), {
|
|
319
|
+
labelProps: a,
|
|
320
|
+
triggerProps: l,
|
|
321
|
+
valueProps: c,
|
|
322
|
+
menuProps: d,
|
|
323
|
+
descriptionProps: u,
|
|
324
|
+
errorMessageProps: s
|
|
325
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
326
|
+
} = ce(t, e, n), { buttonProps: p } = O(l, n);
|
|
327
|
+
return /* @__PURE__ */ h("div", { className: m("rudiment-select", t.className), children: [
|
|
328
|
+
/* @__PURE__ */ r("label", { ...a, className: "rudiment-select__label", children: t.label }),
|
|
329
|
+
/* @__PURE__ */ r(le, { state: e, triggerRef: n, label: t.label }),
|
|
330
|
+
/* @__PURE__ */ h(
|
|
331
|
+
"button",
|
|
332
|
+
{
|
|
333
|
+
...p,
|
|
334
|
+
ref: n,
|
|
335
|
+
className: m(
|
|
336
|
+
"rudiment-select__trigger",
|
|
337
|
+
t.errorMessage && "rudiment-select__trigger--error"
|
|
338
|
+
),
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ r("span", { ...c, children: e.selectedItem ? e.selectedItem.rendered : t.placeholder || "Select an option" }),
|
|
341
|
+
/* @__PURE__ */ r(lt, { "aria-hidden": "true" })
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
e.isOpen && /* @__PURE__ */ r(dt, { state: e, triggerRef: n, popoverRef: o, children: /* @__PURE__ */ r(ut, { ...d, state: e, listBoxRef: i }) }),
|
|
346
|
+
t.description && !t.errorMessage && /* @__PURE__ */ r("p", { ...u, className: "rudiment-select__description", children: t.description }),
|
|
347
|
+
t.errorMessage && /* @__PURE__ */ r("p", { ...s, className: "rudiment-select__error", children: t.errorMessage })
|
|
348
|
+
] });
|
|
349
|
+
}
|
|
350
|
+
function Ft(t) {
|
|
351
|
+
return /* @__PURE__ */ r(Re, { ...t });
|
|
352
|
+
}
|
|
353
|
+
function jt({ className: t, ...e }) {
|
|
354
|
+
return /* @__PURE__ */ r(Ee, { className: "rudiment-menu__popover", children: /* @__PURE__ */ r(
|
|
355
|
+
Oe,
|
|
356
|
+
{
|
|
357
|
+
...e,
|
|
358
|
+
className: m("rudiment-menu__list", t)
|
|
359
|
+
}
|
|
360
|
+
) });
|
|
361
|
+
}
|
|
362
|
+
function zt({ isDestructive: t, className: e, ...n }) {
|
|
363
|
+
return /* @__PURE__ */ r(
|
|
364
|
+
Ke,
|
|
365
|
+
{
|
|
366
|
+
...n,
|
|
367
|
+
className: (o) => m(
|
|
368
|
+
"rudiment-menu__item",
|
|
369
|
+
t && "rudiment-menu__item--destructive",
|
|
370
|
+
typeof e == "function" ? e(o) : e
|
|
371
|
+
),
|
|
372
|
+
"data-destructive": t || void 0
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
function Ht({
|
|
377
|
+
title: t,
|
|
378
|
+
className: e,
|
|
379
|
+
children: n,
|
|
380
|
+
...o
|
|
381
|
+
}) {
|
|
382
|
+
return /* @__PURE__ */ h(Le, { ...o, className: m("rudiment-menu__section", e), children: [
|
|
383
|
+
t && /* @__PURE__ */ r(Ge, { className: "rudiment-menu__section-header", children: t }),
|
|
384
|
+
/* @__PURE__ */ r(Ae, { items: o.items, children: n })
|
|
385
|
+
] });
|
|
386
|
+
}
|
|
387
|
+
function Ut({ className: t, ...e }) {
|
|
388
|
+
return /* @__PURE__ */ r(
|
|
389
|
+
Fe,
|
|
390
|
+
{
|
|
391
|
+
...e,
|
|
392
|
+
className: m("rudiment-menu__item-shortcut", t)
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
const Xt = b(function({
|
|
397
|
+
isOpen: e,
|
|
398
|
+
onClose: n,
|
|
399
|
+
title: o,
|
|
400
|
+
isDismissable: i = !0,
|
|
401
|
+
size: a = "md",
|
|
402
|
+
children: l,
|
|
403
|
+
className: c
|
|
404
|
+
}, d) {
|
|
405
|
+
const u = y(null), s = k(d);
|
|
406
|
+
fe({ isDisabled: !e });
|
|
407
|
+
const p = {
|
|
408
|
+
isOpen: e,
|
|
409
|
+
close: n,
|
|
410
|
+
open: () => {
|
|
411
|
+
},
|
|
412
|
+
toggle: () => {
|
|
413
|
+
},
|
|
414
|
+
setOpen: () => {
|
|
415
|
+
}
|
|
416
|
+
}, { modalProps: g, underlayProps: f } = he(
|
|
417
|
+
{ isDismissable: i },
|
|
418
|
+
p,
|
|
419
|
+
s
|
|
420
|
+
), { dialogProps: _, titleProps: v } = pe({}, s);
|
|
421
|
+
return e ? /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(
|
|
422
|
+
"div",
|
|
423
|
+
{
|
|
424
|
+
...f,
|
|
425
|
+
ref: u,
|
|
426
|
+
className: "rudiment-dialog__overlay",
|
|
427
|
+
children: /* @__PURE__ */ r(be, { contain: !0, restoreFocus: !0, autoFocus: !0, children: /* @__PURE__ */ h(
|
|
428
|
+
"div",
|
|
429
|
+
{
|
|
430
|
+
...g,
|
|
431
|
+
..._,
|
|
432
|
+
ref: s,
|
|
433
|
+
className: m(
|
|
434
|
+
"rudiment-dialog",
|
|
435
|
+
`rudiment-dialog--${a}`,
|
|
436
|
+
c
|
|
437
|
+
),
|
|
438
|
+
children: [
|
|
439
|
+
/* @__PURE__ */ r("h2", { ...v, className: "rudiment-dialog__title", children: o }),
|
|
440
|
+
/* @__PURE__ */ r("div", { className: "rudiment-dialog__body", children: l })
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
) })
|
|
444
|
+
}
|
|
445
|
+
) }) : null;
|
|
446
|
+
}), Wt = b(
|
|
447
|
+
function(e, n) {
|
|
448
|
+
const o = k(n), i = q(e), { inputProps: a } = _e(e, i, o);
|
|
449
|
+
return /* @__PURE__ */ h(
|
|
450
|
+
"label",
|
|
451
|
+
{
|
|
452
|
+
className: m(
|
|
453
|
+
"rudiment-switch",
|
|
454
|
+
e.isDisabled && "rudiment-switch--disabled",
|
|
455
|
+
e.className
|
|
456
|
+
),
|
|
457
|
+
children: [
|
|
458
|
+
/* @__PURE__ */ r(ve, { children: /* @__PURE__ */ r("input", { ...a, ref: o }) }),
|
|
459
|
+
/* @__PURE__ */ r(
|
|
460
|
+
"span",
|
|
461
|
+
{
|
|
462
|
+
className: m(
|
|
463
|
+
"rudiment-switch__track",
|
|
464
|
+
i.isSelected && "rudiment-switch__track--on"
|
|
465
|
+
),
|
|
466
|
+
"aria-hidden": "true",
|
|
467
|
+
children: /* @__PURE__ */ r("span", { className: "rudiment-switch__thumb" })
|
|
468
|
+
}
|
|
469
|
+
),
|
|
470
|
+
/* @__PURE__ */ r("span", { className: "rudiment-switch__label", children: e.children })
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
), ft = Pe(null);
|
|
476
|
+
function Yt(t) {
|
|
477
|
+
const e = De(t), { radioGroupProps: n, labelProps: o, descriptionProps: i, errorMessageProps: a } = Ne(t, e);
|
|
478
|
+
return /* @__PURE__ */ r(ft.Provider, { value: e, children: /* @__PURE__ */ h(
|
|
479
|
+
"div",
|
|
480
|
+
{
|
|
481
|
+
...n,
|
|
482
|
+
className: m("rudiment-radio-group", t.className),
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ r("span", { ...o, className: "rudiment-radio-group__label", children: t.label }),
|
|
485
|
+
/* @__PURE__ */ r(
|
|
486
|
+
"div",
|
|
487
|
+
{
|
|
488
|
+
className: m(
|
|
489
|
+
"rudiment-radio-group__options",
|
|
490
|
+
t.orientation === "horizontal" && "rudiment-radio-group__options--horizontal"
|
|
491
|
+
),
|
|
492
|
+
children: t.children
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
t.description && !t.errorMessage && /* @__PURE__ */ r("p", { ...i, className: "rudiment-radio-group__description", children: t.description }),
|
|
496
|
+
t.errorMessage && /* @__PURE__ */ r("p", { ...a, className: "rudiment-radio-group__error", children: t.errorMessage })
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
) });
|
|
500
|
+
}
|
|
501
|
+
const Zt = b(
|
|
502
|
+
function({ delay: e = 500, closeDelay: n = 0, children: o }, i) {
|
|
503
|
+
const a = Me({ delay: e, closeDelay: n }), l = y(null), { triggerProps: c, tooltipProps: d } = ye({ delay: e, closeDelay: n }, a, l), [u, s] = o, { "aria-describedby": p, tabIndex: g, ...f } = c;
|
|
504
|
+
return /* @__PURE__ */ h("span", { ref: i, className: "rudiment-tooltip-trigger", ...f, children: [
|
|
505
|
+
w.cloneElement(u, {
|
|
506
|
+
ref: l,
|
|
507
|
+
"aria-describedby": p
|
|
508
|
+
}),
|
|
509
|
+
a.isOpen && w.cloneElement(s, d)
|
|
510
|
+
] });
|
|
511
|
+
}
|
|
512
|
+
), qt = b(
|
|
513
|
+
function({ children: e, className: n, ...o }, i) {
|
|
514
|
+
const { tooltipProps: a } = Ce(o);
|
|
515
|
+
return /* @__PURE__ */ r(
|
|
516
|
+
"span",
|
|
517
|
+
{
|
|
518
|
+
...a,
|
|
519
|
+
ref: i,
|
|
520
|
+
className: m("rudiment-tooltip", n),
|
|
521
|
+
role: "tooltip",
|
|
522
|
+
children: e
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
function Jt({
|
|
528
|
+
variant: t,
|
|
529
|
+
title: e,
|
|
530
|
+
icon: n,
|
|
531
|
+
isPolite: o = !1,
|
|
532
|
+
dismissible: i = !1,
|
|
533
|
+
onDismiss: a,
|
|
534
|
+
children: l,
|
|
535
|
+
className: c
|
|
536
|
+
}) {
|
|
537
|
+
const [d, u] = D(!1);
|
|
538
|
+
return d ? null : /* @__PURE__ */ h(
|
|
539
|
+
"div",
|
|
540
|
+
{
|
|
541
|
+
role: o ? "status" : "alert",
|
|
542
|
+
className: m(
|
|
543
|
+
"rudiment-alert",
|
|
544
|
+
`rudiment-alert--${t}`,
|
|
545
|
+
n && "rudiment-alert--has-icon",
|
|
546
|
+
i && "rudiment-alert--dismissible",
|
|
547
|
+
c
|
|
548
|
+
),
|
|
549
|
+
children: [
|
|
550
|
+
n && /* @__PURE__ */ r(P, { icon: n, size: "md", className: "rudiment-alert__icon", "aria-hidden": "true" }),
|
|
551
|
+
/* @__PURE__ */ h("div", { className: "rudiment-alert__body", children: [
|
|
552
|
+
e && /* @__PURE__ */ r("p", { className: "rudiment-alert__title", children: e }),
|
|
553
|
+
/* @__PURE__ */ r("div", { className: "rudiment-alert__content", children: l })
|
|
554
|
+
] }),
|
|
555
|
+
i && /* @__PURE__ */ r(
|
|
556
|
+
"button",
|
|
557
|
+
{
|
|
558
|
+
type: "button",
|
|
559
|
+
className: "rudiment-alert__dismiss",
|
|
560
|
+
"aria-label": "Dismiss alert",
|
|
561
|
+
onClick: () => {
|
|
562
|
+
u(!0), a?.();
|
|
563
|
+
},
|
|
564
|
+
children: /* @__PURE__ */ r(P, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
565
|
+
}
|
|
566
|
+
)
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
const Qt = w.forwardRef(
|
|
572
|
+
function({
|
|
573
|
+
variant: e = "secondary",
|
|
574
|
+
size: n = "md",
|
|
575
|
+
isLoading: o = !1,
|
|
576
|
+
className: i,
|
|
577
|
+
children: a,
|
|
578
|
+
...l
|
|
579
|
+
}, c) {
|
|
580
|
+
const d = k(c), { buttonProps: u } = Q(l, o, d);
|
|
581
|
+
return /* @__PURE__ */ r(
|
|
582
|
+
"button",
|
|
583
|
+
{
|
|
584
|
+
...u,
|
|
585
|
+
ref: d,
|
|
586
|
+
className: m(
|
|
587
|
+
"rudiment-icon-button",
|
|
588
|
+
`rudiment-icon-button--${e}`,
|
|
589
|
+
`rudiment-icon-button--${n}`,
|
|
590
|
+
i
|
|
591
|
+
),
|
|
592
|
+
children: a
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
function ht({
|
|
598
|
+
variant: t = "default",
|
|
599
|
+
size: e = "md",
|
|
600
|
+
dot: n = !1,
|
|
601
|
+
children: o,
|
|
602
|
+
className: i
|
|
603
|
+
}) {
|
|
604
|
+
return /* @__PURE__ */ r(
|
|
605
|
+
"span",
|
|
606
|
+
{
|
|
607
|
+
className: m(
|
|
608
|
+
"rudiment-badge",
|
|
609
|
+
`rudiment-badge--${t}`,
|
|
610
|
+
`rudiment-badge--${e}`,
|
|
611
|
+
n && "rudiment-badge--dot",
|
|
612
|
+
i
|
|
613
|
+
),
|
|
614
|
+
children: !n && o
|
|
615
|
+
}
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
function Vt({
|
|
619
|
+
variant: t = "default",
|
|
620
|
+
dismissible: e = !1,
|
|
621
|
+
onDismiss: n,
|
|
622
|
+
onPress: o,
|
|
623
|
+
isDisabled: i = !1,
|
|
624
|
+
children: a,
|
|
625
|
+
className: l
|
|
626
|
+
}) {
|
|
627
|
+
const [c, d] = D(!1), u = y(null), { buttonProps: s } = O(
|
|
628
|
+
{
|
|
629
|
+
onPress: o,
|
|
630
|
+
isDisabled: i,
|
|
631
|
+
elementType: o ? "button" : "span"
|
|
632
|
+
},
|
|
633
|
+
u
|
|
634
|
+
), p = typeof a == "string" ? `Remove ${a}` : "Remove", g = m(
|
|
635
|
+
"rudiment-tag",
|
|
636
|
+
`rudiment-tag--${t}`,
|
|
637
|
+
o && "rudiment-tag--interactive",
|
|
638
|
+
e && "rudiment-tag--dismissible",
|
|
639
|
+
l
|
|
640
|
+
);
|
|
641
|
+
return c ? null : o ? /* @__PURE__ */ h("button", { ref: u, ...s, className: g, children: [
|
|
642
|
+
a,
|
|
643
|
+
e && /* @__PURE__ */ r(
|
|
644
|
+
"span",
|
|
645
|
+
{
|
|
646
|
+
role: "button",
|
|
647
|
+
tabIndex: 0,
|
|
648
|
+
className: "rudiment-tag__close",
|
|
649
|
+
"aria-label": p,
|
|
650
|
+
onClick: (f) => {
|
|
651
|
+
f.stopPropagation(), d(!0), n?.();
|
|
652
|
+
},
|
|
653
|
+
onKeyDown: (f) => {
|
|
654
|
+
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), f.stopPropagation(), d(!0), n?.());
|
|
655
|
+
},
|
|
656
|
+
children: /* @__PURE__ */ r(P, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
] }) : /* @__PURE__ */ h(
|
|
660
|
+
"span",
|
|
661
|
+
{
|
|
662
|
+
className: g,
|
|
663
|
+
...i ? { "aria-disabled": "true" } : {},
|
|
664
|
+
children: [
|
|
665
|
+
a,
|
|
666
|
+
e && /* @__PURE__ */ r(
|
|
667
|
+
"button",
|
|
668
|
+
{
|
|
669
|
+
type: "button",
|
|
670
|
+
className: "rudiment-tag__close",
|
|
671
|
+
"aria-label": p,
|
|
672
|
+
onClick: () => {
|
|
673
|
+
d(!0), n?.();
|
|
674
|
+
},
|
|
675
|
+
children: /* @__PURE__ */ r(P, { icon: "mdi:close", size: "sm", "aria-hidden": "true" })
|
|
676
|
+
}
|
|
677
|
+
)
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
const pt = b(
|
|
683
|
+
function({ variant: e = "default", padding: n = "md", children: o, className: i }, a) {
|
|
684
|
+
return /* @__PURE__ */ r(
|
|
685
|
+
"div",
|
|
686
|
+
{
|
|
687
|
+
ref: a,
|
|
688
|
+
className: m(
|
|
689
|
+
"rudiment-card",
|
|
690
|
+
`rudiment-card--${e}`,
|
|
691
|
+
`rudiment-card--padding-${n}`,
|
|
692
|
+
i
|
|
693
|
+
),
|
|
694
|
+
children: o
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
function gt({ children: t, className: e }) {
|
|
700
|
+
return /* @__PURE__ */ r("div", { className: m("rudiment-card__header", e), children: t });
|
|
701
|
+
}
|
|
702
|
+
function bt({ children: t, className: e }) {
|
|
703
|
+
return /* @__PURE__ */ r("div", { className: m("rudiment-card__body", e), children: t });
|
|
704
|
+
}
|
|
705
|
+
function _t({ children: t, className: e }) {
|
|
706
|
+
return /* @__PURE__ */ r("div", { className: m("rudiment-card__footer", e), children: t });
|
|
707
|
+
}
|
|
708
|
+
const Y = Object.assign(pt, {
|
|
709
|
+
Header: gt,
|
|
710
|
+
Body: bt,
|
|
711
|
+
Footer: _t
|
|
712
|
+
});
|
|
713
|
+
function er({
|
|
714
|
+
value: t,
|
|
715
|
+
minValue: e = 0,
|
|
716
|
+
maxValue: n = 100,
|
|
717
|
+
label: o,
|
|
718
|
+
showValueLabel: i = !1,
|
|
719
|
+
variant: a = "default",
|
|
720
|
+
size: l = "md",
|
|
721
|
+
className: c
|
|
722
|
+
}) {
|
|
723
|
+
const { progressBarProps: d, labelProps: u } = Z({
|
|
724
|
+
label: o,
|
|
725
|
+
value: t,
|
|
726
|
+
minValue: e,
|
|
727
|
+
maxValue: n
|
|
728
|
+
}), s = (t - e) / (n - e) * 100;
|
|
729
|
+
return /* @__PURE__ */ h(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
...d,
|
|
733
|
+
className: m("rudiment-progress", c),
|
|
734
|
+
children: [
|
|
735
|
+
/* @__PURE__ */ h("div", { className: "rudiment-progress__label-row", children: [
|
|
736
|
+
/* @__PURE__ */ r("span", { ...u, className: "rudiment-progress__label", children: o }),
|
|
737
|
+
i && /* @__PURE__ */ h("span", { className: "rudiment-progress__value", children: [
|
|
738
|
+
Math.round(s),
|
|
739
|
+
"%"
|
|
740
|
+
] })
|
|
741
|
+
] }),
|
|
742
|
+
/* @__PURE__ */ r(
|
|
743
|
+
"div",
|
|
744
|
+
{
|
|
745
|
+
className: m(
|
|
746
|
+
"rudiment-progress__track",
|
|
747
|
+
`rudiment-progress__track--${l}`
|
|
748
|
+
),
|
|
749
|
+
children: /* @__PURE__ */ r(
|
|
750
|
+
"div",
|
|
751
|
+
{
|
|
752
|
+
className: m(
|
|
753
|
+
"rudiment-progress__bar",
|
|
754
|
+
`rudiment-progress__bar--${a}`
|
|
755
|
+
),
|
|
756
|
+
style: { width: `${s}%` }
|
|
757
|
+
}
|
|
758
|
+
)
|
|
759
|
+
}
|
|
760
|
+
)
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
function vt(t) {
|
|
766
|
+
const e = t.trim().split(/\s+/);
|
|
767
|
+
return e.length >= 2 ? (e[0][0] + e[e.length - 1][0]).toUpperCase() : (e[0]?.[0] ?? "").toUpperCase();
|
|
768
|
+
}
|
|
769
|
+
function tr({
|
|
770
|
+
src: t,
|
|
771
|
+
alt: e,
|
|
772
|
+
name: n,
|
|
773
|
+
size: o = "md",
|
|
774
|
+
status: i,
|
|
775
|
+
className: a
|
|
776
|
+
}) {
|
|
777
|
+
const [l, c] = D(!1), d = t && !l, u = n ? vt(n) : "", s = e || n;
|
|
778
|
+
return /* @__PURE__ */ h(
|
|
779
|
+
"span",
|
|
780
|
+
{
|
|
781
|
+
className: m(
|
|
782
|
+
"rudiment-avatar",
|
|
783
|
+
`rudiment-avatar--${o}`,
|
|
784
|
+
a
|
|
785
|
+
),
|
|
786
|
+
role: "img",
|
|
787
|
+
"aria-label": s,
|
|
788
|
+
children: [
|
|
789
|
+
d ? /* @__PURE__ */ r(
|
|
790
|
+
"img",
|
|
791
|
+
{
|
|
792
|
+
src: t,
|
|
793
|
+
alt: e || "",
|
|
794
|
+
className: "rudiment-avatar__image",
|
|
795
|
+
onError: () => c(!0)
|
|
796
|
+
}
|
|
797
|
+
) : /* @__PURE__ */ r("span", { className: "rudiment-avatar__initials", "aria-hidden": "true", children: u }),
|
|
798
|
+
i && /* @__PURE__ */ r(
|
|
799
|
+
ht,
|
|
800
|
+
{
|
|
801
|
+
variant: i,
|
|
802
|
+
dot: !0,
|
|
803
|
+
className: "rudiment-avatar__status"
|
|
804
|
+
}
|
|
805
|
+
)
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
function rr({
|
|
811
|
+
label: t,
|
|
812
|
+
value: e,
|
|
813
|
+
delta: n,
|
|
814
|
+
trend: o = "neutral",
|
|
815
|
+
children: i,
|
|
816
|
+
className: a
|
|
817
|
+
}) {
|
|
818
|
+
return /* @__PURE__ */ r(
|
|
819
|
+
Y,
|
|
820
|
+
{
|
|
821
|
+
variant: "outlined",
|
|
822
|
+
padding: "md",
|
|
823
|
+
className: m("rudiment-stat-card", a),
|
|
824
|
+
children: /* @__PURE__ */ h(Y.Body, { children: [
|
|
825
|
+
/* @__PURE__ */ r("span", { className: "rudiment-stat-card__label", children: t }),
|
|
826
|
+
/* @__PURE__ */ r("span", { className: "rudiment-stat-card__value", children: e }),
|
|
827
|
+
n && /* @__PURE__ */ r(
|
|
828
|
+
"span",
|
|
829
|
+
{
|
|
830
|
+
className: m(
|
|
831
|
+
"rudiment-stat-card__delta",
|
|
832
|
+
`rudiment-stat-card__delta--${o}`
|
|
833
|
+
),
|
|
834
|
+
children: n
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
i && /* @__PURE__ */ r("div", { className: "rudiment-stat-card__extra", children: i })
|
|
838
|
+
] })
|
|
839
|
+
}
|
|
840
|
+
);
|
|
841
|
+
}
|
|
842
|
+
function V(t, e) {
|
|
843
|
+
return m(
|
|
844
|
+
"rudiment-nav-item",
|
|
845
|
+
t && "rudiment-nav-item--active",
|
|
846
|
+
e
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
function ee(t, e, n) {
|
|
850
|
+
return /* @__PURE__ */ h(T, { children: [
|
|
851
|
+
t && /* @__PURE__ */ r(P, { icon: t, className: "rudiment-nav-item__icon" }),
|
|
852
|
+
/* @__PURE__ */ r("span", { className: "rudiment-nav-item__label", children: e }),
|
|
853
|
+
n && /* @__PURE__ */ r("span", { className: "rudiment-nav-item__badge", children: n })
|
|
854
|
+
] });
|
|
855
|
+
}
|
|
856
|
+
const Nt = b(
|
|
857
|
+
function({ label: e, icon: n, isActive: o = !1, href: i, onPress: a, badge: l, isDisabled: c = !1, className: d }, u) {
|
|
858
|
+
const s = k(u), { linkProps: p } = ke(
|
|
859
|
+
{ href: i, isDisabled: c, onPress: a },
|
|
860
|
+
s
|
|
861
|
+
);
|
|
862
|
+
return /* @__PURE__ */ r(
|
|
863
|
+
"a",
|
|
864
|
+
{
|
|
865
|
+
...p,
|
|
866
|
+
ref: s,
|
|
867
|
+
href: i,
|
|
868
|
+
className: V(o, d),
|
|
869
|
+
children: ee(n, e, l)
|
|
870
|
+
}
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
), Ct = b(
|
|
874
|
+
function({ label: e, icon: n, isActive: o = !1, onPress: i, badge: a, isDisabled: l = !1, className: c }, d) {
|
|
875
|
+
const u = k(d), { buttonProps: s } = O(
|
|
876
|
+
{ onPress: i, isDisabled: l },
|
|
877
|
+
u
|
|
878
|
+
);
|
|
879
|
+
return /* @__PURE__ */ r(
|
|
880
|
+
"button",
|
|
881
|
+
{
|
|
882
|
+
...s,
|
|
883
|
+
ref: u,
|
|
884
|
+
className: V(o, c),
|
|
885
|
+
children: ee(n, e, a)
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
), nr = b(
|
|
890
|
+
function(e, n) {
|
|
891
|
+
return e.href ? /* @__PURE__ */ r(
|
|
892
|
+
Nt,
|
|
893
|
+
{
|
|
894
|
+
...e,
|
|
895
|
+
ref: n
|
|
896
|
+
}
|
|
897
|
+
) : /* @__PURE__ */ r(
|
|
898
|
+
Ct,
|
|
899
|
+
{
|
|
900
|
+
...e,
|
|
901
|
+
ref: n
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
), E = 100, M = E / 2;
|
|
906
|
+
function or({
|
|
907
|
+
value: t,
|
|
908
|
+
minValue: e = 0,
|
|
909
|
+
maxValue: n = 100,
|
|
910
|
+
label: o,
|
|
911
|
+
showValueLabel: i = !1,
|
|
912
|
+
variant: a = "default",
|
|
913
|
+
size: l = "md",
|
|
914
|
+
children: c,
|
|
915
|
+
className: d
|
|
916
|
+
}) {
|
|
917
|
+
const { progressBarProps: u, labelProps: s } = Z({
|
|
918
|
+
label: o,
|
|
919
|
+
value: t,
|
|
920
|
+
minValue: e,
|
|
921
|
+
maxValue: n
|
|
922
|
+
}), p = (t - e) / (n - e) * 100, g = 8, f = (E - g) / 2, _ = 2 * Math.PI * f, v = _ * (1 - p / 100);
|
|
923
|
+
return /* @__PURE__ */ h(
|
|
924
|
+
"div",
|
|
925
|
+
{
|
|
926
|
+
...u,
|
|
927
|
+
className: m(
|
|
928
|
+
"rudiment-circular-progress",
|
|
929
|
+
`rudiment-circular-progress--${l}`,
|
|
930
|
+
d
|
|
931
|
+
),
|
|
932
|
+
children: [
|
|
933
|
+
/* @__PURE__ */ h(
|
|
934
|
+
"svg",
|
|
935
|
+
{
|
|
936
|
+
viewBox: `0 0 ${E} ${E}`,
|
|
937
|
+
className: "rudiment-circular-progress__svg",
|
|
938
|
+
children: [
|
|
939
|
+
/* @__PURE__ */ r(
|
|
940
|
+
"circle",
|
|
941
|
+
{
|
|
942
|
+
cx: M,
|
|
943
|
+
cy: M,
|
|
944
|
+
r: f,
|
|
945
|
+
className: "rudiment-circular-progress__track",
|
|
946
|
+
strokeWidth: g
|
|
947
|
+
}
|
|
948
|
+
),
|
|
949
|
+
/* @__PURE__ */ r(
|
|
950
|
+
"circle",
|
|
951
|
+
{
|
|
952
|
+
cx: M,
|
|
953
|
+
cy: M,
|
|
954
|
+
r: f,
|
|
955
|
+
className: m(
|
|
956
|
+
"rudiment-circular-progress__fill",
|
|
957
|
+
`rudiment-circular-progress__fill--${a}`
|
|
958
|
+
),
|
|
959
|
+
strokeWidth: g,
|
|
960
|
+
strokeDasharray: _,
|
|
961
|
+
strokeDashoffset: v,
|
|
962
|
+
strokeLinecap: "round"
|
|
963
|
+
}
|
|
964
|
+
)
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
),
|
|
968
|
+
/* @__PURE__ */ r("div", { className: "rudiment-circular-progress__center", children: c ?? (i && /* @__PURE__ */ h("span", { className: "rudiment-circular-progress__value", children: [
|
|
969
|
+
Math.round(p),
|
|
970
|
+
"%"
|
|
971
|
+
] })) }),
|
|
972
|
+
/* @__PURE__ */ r("span", { ...s, className: "rudiment-circular-progress__label", children: o })
|
|
973
|
+
]
|
|
974
|
+
}
|
|
975
|
+
);
|
|
976
|
+
}
|
|
977
|
+
function ir({
|
|
978
|
+
data: t,
|
|
979
|
+
dataKeys: e,
|
|
980
|
+
indexKey: n,
|
|
981
|
+
layout: o = "vertical",
|
|
982
|
+
stacked: i = !1,
|
|
983
|
+
showLegend: a = !0,
|
|
984
|
+
showGrid: l = !0,
|
|
985
|
+
height: c = 300,
|
|
986
|
+
label: d,
|
|
987
|
+
className: u
|
|
988
|
+
}) {
|
|
989
|
+
const s = j(), p = o === "horizontal";
|
|
990
|
+
return /* @__PURE__ */ r(
|
|
991
|
+
"div",
|
|
992
|
+
{
|
|
993
|
+
className: m("rudiment-chart", u),
|
|
994
|
+
role: "img",
|
|
995
|
+
"aria-label": d,
|
|
996
|
+
children: /* @__PURE__ */ r(G, { width: "100%", height: c, children: /* @__PURE__ */ h(
|
|
997
|
+
je,
|
|
998
|
+
{
|
|
999
|
+
data: t,
|
|
1000
|
+
layout: p ? "vertical" : "horizontal",
|
|
1001
|
+
children: [
|
|
1002
|
+
l && /* @__PURE__ */ r(
|
|
1003
|
+
J,
|
|
1004
|
+
{
|
|
1005
|
+
strokeDasharray: "3 3",
|
|
1006
|
+
stroke: s.gridColor,
|
|
1007
|
+
vertical: !p,
|
|
1008
|
+
horizontal: !p
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
1011
|
+
p ? /* @__PURE__ */ h(T, { children: [
|
|
1012
|
+
/* @__PURE__ */ r(K, { type: "number", tick: { fill: s.axisColor } }),
|
|
1013
|
+
/* @__PURE__ */ r(
|
|
1014
|
+
L,
|
|
1015
|
+
{
|
|
1016
|
+
dataKey: n,
|
|
1017
|
+
type: "category",
|
|
1018
|
+
tick: { fill: s.axisColor }
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1021
|
+
] }) : /* @__PURE__ */ h(T, { children: [
|
|
1022
|
+
/* @__PURE__ */ r(K, { dataKey: n, tick: { fill: s.axisColor } }),
|
|
1023
|
+
/* @__PURE__ */ r(L, { tick: { fill: s.axisColor } })
|
|
1024
|
+
] }),
|
|
1025
|
+
/* @__PURE__ */ r(
|
|
1026
|
+
A,
|
|
1027
|
+
{
|
|
1028
|
+
contentStyle: {
|
|
1029
|
+
backgroundColor: s.tooltipBg,
|
|
1030
|
+
color: s.tooltipText,
|
|
1031
|
+
border: `1px solid ${s.tooltipBorder}`,
|
|
1032
|
+
borderRadius: "0.375rem"
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
a && /* @__PURE__ */ r(
|
|
1037
|
+
F,
|
|
1038
|
+
{
|
|
1039
|
+
wrapperStyle: { color: s.legendColor }
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
e.map((g, f) => /* @__PURE__ */ r(
|
|
1043
|
+
ze,
|
|
1044
|
+
{
|
|
1045
|
+
dataKey: g,
|
|
1046
|
+
fill: s.colors[f % s.colors.length],
|
|
1047
|
+
stackId: i ? "stack" : void 0,
|
|
1048
|
+
radius: [2, 2, 0, 0]
|
|
1049
|
+
},
|
|
1050
|
+
g
|
|
1051
|
+
))
|
|
1052
|
+
]
|
|
1053
|
+
}
|
|
1054
|
+
) })
|
|
1055
|
+
}
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
function ar({
|
|
1059
|
+
data: t,
|
|
1060
|
+
dataKeys: e,
|
|
1061
|
+
indexKey: n,
|
|
1062
|
+
curved: o = !0,
|
|
1063
|
+
showDots: i = !0,
|
|
1064
|
+
showGrid: a = !0,
|
|
1065
|
+
showLegend: l = !0,
|
|
1066
|
+
height: c = 300,
|
|
1067
|
+
label: d,
|
|
1068
|
+
className: u
|
|
1069
|
+
}) {
|
|
1070
|
+
const s = j();
|
|
1071
|
+
return /* @__PURE__ */ r(
|
|
1072
|
+
"div",
|
|
1073
|
+
{
|
|
1074
|
+
className: m("rudiment-chart", u),
|
|
1075
|
+
role: "img",
|
|
1076
|
+
"aria-label": d,
|
|
1077
|
+
children: /* @__PURE__ */ r(G, { width: "100%", height: c, children: /* @__PURE__ */ h(He, { data: t, children: [
|
|
1078
|
+
a && /* @__PURE__ */ r(
|
|
1079
|
+
J,
|
|
1080
|
+
{
|
|
1081
|
+
strokeDasharray: "3 3",
|
|
1082
|
+
stroke: s.gridColor
|
|
1083
|
+
}
|
|
1084
|
+
),
|
|
1085
|
+
/* @__PURE__ */ r(K, { dataKey: n, tick: { fill: s.axisColor } }),
|
|
1086
|
+
/* @__PURE__ */ r(L, { tick: { fill: s.axisColor } }),
|
|
1087
|
+
/* @__PURE__ */ r(
|
|
1088
|
+
A,
|
|
1089
|
+
{
|
|
1090
|
+
contentStyle: {
|
|
1091
|
+
backgroundColor: s.tooltipBg,
|
|
1092
|
+
color: s.tooltipText,
|
|
1093
|
+
border: `1px solid ${s.tooltipBorder}`,
|
|
1094
|
+
borderRadius: "0.375rem"
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
),
|
|
1098
|
+
l && /* @__PURE__ */ r(
|
|
1099
|
+
F,
|
|
1100
|
+
{
|
|
1101
|
+
wrapperStyle: { color: s.legendColor }
|
|
1102
|
+
}
|
|
1103
|
+
),
|
|
1104
|
+
e.map((p, g) => /* @__PURE__ */ r(
|
|
1105
|
+
Ue,
|
|
1106
|
+
{
|
|
1107
|
+
type: o ? "monotone" : "linear",
|
|
1108
|
+
dataKey: p,
|
|
1109
|
+
stroke: s.colors[g % s.colors.length],
|
|
1110
|
+
dot: i,
|
|
1111
|
+
strokeWidth: 2,
|
|
1112
|
+
activeDot: { r: 5 }
|
|
1113
|
+
},
|
|
1114
|
+
p
|
|
1115
|
+
))
|
|
1116
|
+
] }) })
|
|
1117
|
+
}
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
function sr({
|
|
1121
|
+
data: t,
|
|
1122
|
+
innerRadius: e = 60,
|
|
1123
|
+
showLabels: n = !1,
|
|
1124
|
+
showLegend: o = !0,
|
|
1125
|
+
height: i = 300,
|
|
1126
|
+
label: a,
|
|
1127
|
+
className: l
|
|
1128
|
+
}) {
|
|
1129
|
+
const c = j();
|
|
1130
|
+
return /* @__PURE__ */ r(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
className: m("rudiment-chart", l),
|
|
1134
|
+
role: "img",
|
|
1135
|
+
"aria-label": a,
|
|
1136
|
+
children: /* @__PURE__ */ r(G, { width: "100%", height: i, children: /* @__PURE__ */ h(Xe, { children: [
|
|
1137
|
+
/* @__PURE__ */ r(
|
|
1138
|
+
We,
|
|
1139
|
+
{
|
|
1140
|
+
data: t,
|
|
1141
|
+
dataKey: "value",
|
|
1142
|
+
nameKey: "name",
|
|
1143
|
+
cx: "50%",
|
|
1144
|
+
cy: "50%",
|
|
1145
|
+
innerRadius: e,
|
|
1146
|
+
outerRadius: e + 30,
|
|
1147
|
+
paddingAngle: 2,
|
|
1148
|
+
label: n ? ({ name: d }) => d : !1,
|
|
1149
|
+
children: t.map((d, u) => /* @__PURE__ */ r(
|
|
1150
|
+
Ye,
|
|
1151
|
+
{
|
|
1152
|
+
fill: c.colors[u % c.colors.length]
|
|
1153
|
+
},
|
|
1154
|
+
u
|
|
1155
|
+
))
|
|
1156
|
+
}
|
|
1157
|
+
),
|
|
1158
|
+
/* @__PURE__ */ r(
|
|
1159
|
+
A,
|
|
1160
|
+
{
|
|
1161
|
+
contentStyle: {
|
|
1162
|
+
backgroundColor: c.tooltipBg,
|
|
1163
|
+
color: c.tooltipText,
|
|
1164
|
+
border: `1px solid ${c.tooltipBorder}`,
|
|
1165
|
+
borderRadius: "0.375rem"
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
o && /* @__PURE__ */ r(
|
|
1170
|
+
F,
|
|
1171
|
+
{
|
|
1172
|
+
wrapperStyle: { color: c.legendColor }
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
] }) })
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
1178
|
+
}
|
|
1179
|
+
function te({
|
|
1180
|
+
id: t,
|
|
1181
|
+
title: e,
|
|
1182
|
+
items: n,
|
|
1183
|
+
renderCard: o,
|
|
1184
|
+
className: i
|
|
1185
|
+
}) {
|
|
1186
|
+
const { setNodeRef: a, isOver: l } = Ze({ id: t });
|
|
1187
|
+
return /* @__PURE__ */ h(
|
|
1188
|
+
"div",
|
|
1189
|
+
{
|
|
1190
|
+
className: m(
|
|
1191
|
+
"rudiment-kanban__column",
|
|
1192
|
+
l && "rudiment-kanban__column--over",
|
|
1193
|
+
i
|
|
1194
|
+
),
|
|
1195
|
+
role: "region",
|
|
1196
|
+
"aria-label": e,
|
|
1197
|
+
children: [
|
|
1198
|
+
/* @__PURE__ */ h("div", { className: "rudiment-kanban__column-header", children: [
|
|
1199
|
+
/* @__PURE__ */ r("span", { className: "rudiment-kanban__column-title", children: e }),
|
|
1200
|
+
/* @__PURE__ */ r("span", { className: "rudiment-kanban__column-count", children: n.length })
|
|
1201
|
+
] }),
|
|
1202
|
+
/* @__PURE__ */ r("div", { ref: a, className: "rudiment-kanban__column-body", children: /* @__PURE__ */ r(
|
|
1203
|
+
rt,
|
|
1204
|
+
{
|
|
1205
|
+
items: n.map((c) => c.id),
|
|
1206
|
+
strategy: nt,
|
|
1207
|
+
children: n.map((c) => o(c))
|
|
1208
|
+
}
|
|
1209
|
+
) })
|
|
1210
|
+
]
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
function R(t, e) {
|
|
1215
|
+
return t.find((n) => n.items.some((o) => o.id === e));
|
|
1216
|
+
}
|
|
1217
|
+
function yt({
|
|
1218
|
+
columns: t,
|
|
1219
|
+
onCardMove: e,
|
|
1220
|
+
renderCard: n,
|
|
1221
|
+
className: o
|
|
1222
|
+
}) {
|
|
1223
|
+
const [i, a] = D(null), l = y(null), c = qe(
|
|
1224
|
+
U(Je, {
|
|
1225
|
+
activationConstraint: { distance: 5 }
|
|
1226
|
+
}),
|
|
1227
|
+
U(Qe, {
|
|
1228
|
+
coordinateGetter: ot
|
|
1229
|
+
})
|
|
1230
|
+
), d = $((f) => {
|
|
1231
|
+
l.current && (l.current.textContent = f);
|
|
1232
|
+
}, []), u = i ? t.flatMap((f) => f.items).find((f) => f.id === i) : null, s = $(
|
|
1233
|
+
(f) => {
|
|
1234
|
+
const _ = String(f.active.id);
|
|
1235
|
+
a(_);
|
|
1236
|
+
const v = R(t, _);
|
|
1237
|
+
v && d(`Picked up card from ${v.title}`);
|
|
1238
|
+
},
|
|
1239
|
+
[t, d]
|
|
1240
|
+
), p = $(
|
|
1241
|
+
(f) => {
|
|
1242
|
+
const { over: _ } = f;
|
|
1243
|
+
if (!_) return;
|
|
1244
|
+
const v = String(_.id), N = t.find((x) => x.id === v) || R(t, v);
|
|
1245
|
+
N && d(`Over column ${N.title}`);
|
|
1246
|
+
},
|
|
1247
|
+
[t, d]
|
|
1248
|
+
), g = $(
|
|
1249
|
+
(f) => {
|
|
1250
|
+
const { active: _, over: v } = f;
|
|
1251
|
+
if (a(null), !v) {
|
|
1252
|
+
d("Cancelled drag");
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
const N = String(_.id), x = String(v.id), C = R(t, N);
|
|
1256
|
+
if (!C) return;
|
|
1257
|
+
const z = C.items.findIndex(
|
|
1258
|
+
(I) => I.id === N
|
|
1259
|
+
), H = t.find((I) => I.id === x), re = R(t, x), S = H || re;
|
|
1260
|
+
if (!S) return;
|
|
1261
|
+
let B;
|
|
1262
|
+
H ? B = S.items.length : B = S.items.findIndex((I) => I.id === x), !(C.id === S.id && z === B) && (d(`Dropped card in ${S.title} at position ${B + 1}`), e({
|
|
1263
|
+
cardId: N,
|
|
1264
|
+
fromColumnId: C.id,
|
|
1265
|
+
toColumnId: S.id,
|
|
1266
|
+
fromIndex: z,
|
|
1267
|
+
toIndex: B
|
|
1268
|
+
}));
|
|
1269
|
+
},
|
|
1270
|
+
[t, e, d]
|
|
1271
|
+
);
|
|
1272
|
+
return /* @__PURE__ */ h(
|
|
1273
|
+
Ve,
|
|
1274
|
+
{
|
|
1275
|
+
sensors: c,
|
|
1276
|
+
collisionDetection: et,
|
|
1277
|
+
onDragStart: s,
|
|
1278
|
+
onDragOver: p,
|
|
1279
|
+
onDragEnd: g,
|
|
1280
|
+
children: [
|
|
1281
|
+
/* @__PURE__ */ r("div", { className: m("rudiment-kanban", o), children: t.map((f) => /* @__PURE__ */ r(
|
|
1282
|
+
te,
|
|
1283
|
+
{
|
|
1284
|
+
id: f.id,
|
|
1285
|
+
title: f.title,
|
|
1286
|
+
items: f.items,
|
|
1287
|
+
renderCard: n
|
|
1288
|
+
},
|
|
1289
|
+
f.id
|
|
1290
|
+
)) }),
|
|
1291
|
+
/* @__PURE__ */ r(tt, { children: u ? /* @__PURE__ */ r("div", { className: "rudiment-kanban__card rudiment-kanban__card--overlay", children: n(u) }) : null }),
|
|
1292
|
+
/* @__PURE__ */ r(
|
|
1293
|
+
"div",
|
|
1294
|
+
{
|
|
1295
|
+
ref: l,
|
|
1296
|
+
role: "status",
|
|
1297
|
+
"aria-live": "assertive",
|
|
1298
|
+
"aria-atomic": "true",
|
|
1299
|
+
className: "rudiment-kanban__sr-only"
|
|
1300
|
+
}
|
|
1301
|
+
)
|
|
1302
|
+
]
|
|
1303
|
+
}
|
|
1304
|
+
);
|
|
1305
|
+
}
|
|
1306
|
+
const cr = Object.assign(yt, {
|
|
1307
|
+
Column: te
|
|
1308
|
+
});
|
|
1309
|
+
function lr({ id: t, children: e, className: n }) {
|
|
1310
|
+
const {
|
|
1311
|
+
attributes: o,
|
|
1312
|
+
listeners: i,
|
|
1313
|
+
setNodeRef: a,
|
|
1314
|
+
transform: l,
|
|
1315
|
+
transition: c,
|
|
1316
|
+
isDragging: d
|
|
1317
|
+
} = it({ id: t }), u = {
|
|
1318
|
+
transform: at.Transform.toString(l),
|
|
1319
|
+
transition: c
|
|
1320
|
+
};
|
|
1321
|
+
return /* @__PURE__ */ h(
|
|
1322
|
+
"div",
|
|
1323
|
+
{
|
|
1324
|
+
ref: a,
|
|
1325
|
+
style: u,
|
|
1326
|
+
className: m(
|
|
1327
|
+
"rudiment-kanban__card",
|
|
1328
|
+
d && "rudiment-kanban__card--dragging",
|
|
1329
|
+
n
|
|
1330
|
+
),
|
|
1331
|
+
children: [
|
|
1332
|
+
/* @__PURE__ */ r(
|
|
1333
|
+
"button",
|
|
1334
|
+
{
|
|
1335
|
+
type: "button",
|
|
1336
|
+
className: "rudiment-kanban__card-handle",
|
|
1337
|
+
"aria-label": `Drag handle for card ${t}`,
|
|
1338
|
+
...o,
|
|
1339
|
+
...i,
|
|
1340
|
+
"aria-roledescription": "sortable",
|
|
1341
|
+
children: /* @__PURE__ */ h(
|
|
1342
|
+
"svg",
|
|
1343
|
+
{
|
|
1344
|
+
width: "12",
|
|
1345
|
+
height: "12",
|
|
1346
|
+
viewBox: "0 0 12 12",
|
|
1347
|
+
fill: "currentColor",
|
|
1348
|
+
"aria-hidden": "true",
|
|
1349
|
+
children: [
|
|
1350
|
+
/* @__PURE__ */ r("circle", { cx: "3.5", cy: "2", r: "1.25" }),
|
|
1351
|
+
/* @__PURE__ */ r("circle", { cx: "8.5", cy: "2", r: "1.25" }),
|
|
1352
|
+
/* @__PURE__ */ r("circle", { cx: "3.5", cy: "6", r: "1.25" }),
|
|
1353
|
+
/* @__PURE__ */ r("circle", { cx: "8.5", cy: "6", r: "1.25" }),
|
|
1354
|
+
/* @__PURE__ */ r("circle", { cx: "3.5", cy: "10", r: "1.25" }),
|
|
1355
|
+
/* @__PURE__ */ r("circle", { cx: "8.5", cy: "10", r: "1.25" })
|
|
1356
|
+
]
|
|
1357
|
+
}
|
|
1358
|
+
)
|
|
1359
|
+
}
|
|
1360
|
+
),
|
|
1361
|
+
/* @__PURE__ */ r("div", { className: "rudiment-kanban__card-content", children: e })
|
|
1362
|
+
]
|
|
1363
|
+
}
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
const dr = b(
|
|
1367
|
+
function({ level: e, size: n, className: o, children: i, ...a }, l) {
|
|
1368
|
+
const c = `h${e}`;
|
|
1369
|
+
return /* @__PURE__ */ r(
|
|
1370
|
+
c,
|
|
1371
|
+
{
|
|
1372
|
+
ref: l,
|
|
1373
|
+
className: m(
|
|
1374
|
+
`rudiment-heading rudiment-heading--${n ?? e}`,
|
|
1375
|
+
o
|
|
1376
|
+
),
|
|
1377
|
+
...a,
|
|
1378
|
+
children: i
|
|
1379
|
+
}
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
), ur = b(function({ variant: e = "body", as: n = "p", className: o, children: i, ...a }, l) {
|
|
1383
|
+
return /* @__PURE__ */ r(
|
|
1384
|
+
n,
|
|
1385
|
+
{
|
|
1386
|
+
ref: l,
|
|
1387
|
+
className: m(`rudiment-text rudiment-text--${e}`, o),
|
|
1388
|
+
...a,
|
|
1389
|
+
children: i
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
}), mr = b(function({ size: e = "base", as: n = "div", className: o, children: i, ...a }, l) {
|
|
1393
|
+
return /* @__PURE__ */ r(
|
|
1394
|
+
n,
|
|
1395
|
+
{
|
|
1396
|
+
ref: l,
|
|
1397
|
+
className: m(
|
|
1398
|
+
"rudiment-prose",
|
|
1399
|
+
e !== "base" && `rudiment-prose--${e}`,
|
|
1400
|
+
o
|
|
1401
|
+
),
|
|
1402
|
+
...a,
|
|
1403
|
+
children: i
|
|
1404
|
+
}
|
|
1405
|
+
);
|
|
1406
|
+
}), fr = b(function({
|
|
1407
|
+
padding: e,
|
|
1408
|
+
bordered: n = !1,
|
|
1409
|
+
invert: o = !1,
|
|
1410
|
+
as: i = "div",
|
|
1411
|
+
className: a,
|
|
1412
|
+
style: l,
|
|
1413
|
+
children: c,
|
|
1414
|
+
...d
|
|
1415
|
+
}, u) {
|
|
1416
|
+
const s = {};
|
|
1417
|
+
return e && (s["--box-padding"] = e), /* @__PURE__ */ r(
|
|
1418
|
+
i,
|
|
1419
|
+
{
|
|
1420
|
+
ref: u,
|
|
1421
|
+
className: m(
|
|
1422
|
+
"rudiment-box",
|
|
1423
|
+
n && "rudiment-box--bordered",
|
|
1424
|
+
o && "rudiment-box--invert",
|
|
1425
|
+
a
|
|
1426
|
+
),
|
|
1427
|
+
style: { ...s, ...l },
|
|
1428
|
+
...d,
|
|
1429
|
+
children: c
|
|
1430
|
+
}
|
|
1431
|
+
);
|
|
1432
|
+
}), hr = b(function({
|
|
1433
|
+
space: e,
|
|
1434
|
+
recursive: n = !1,
|
|
1435
|
+
splitAfter: o,
|
|
1436
|
+
as: i = "div",
|
|
1437
|
+
className: a,
|
|
1438
|
+
style: l,
|
|
1439
|
+
children: c,
|
|
1440
|
+
...d
|
|
1441
|
+
}, u) {
|
|
1442
|
+
const s = {};
|
|
1443
|
+
e && (s["--stack-space"] = e);
|
|
1444
|
+
const p = Se.toArray(c), g = o ? p.map((f, _) => _ === o - 1 && Be(f) ? Ie(
|
|
1445
|
+
f,
|
|
1446
|
+
{
|
|
1447
|
+
style: {
|
|
1448
|
+
...f.props.style,
|
|
1449
|
+
marginBlockEnd: "auto"
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
) : f) : c;
|
|
1453
|
+
return /* @__PURE__ */ r(
|
|
1454
|
+
i,
|
|
1455
|
+
{
|
|
1456
|
+
ref: u,
|
|
1457
|
+
className: m(
|
|
1458
|
+
"rudiment-stack",
|
|
1459
|
+
n && "rudiment-stack--recursive",
|
|
1460
|
+
o && "rudiment-stack--split",
|
|
1461
|
+
a
|
|
1462
|
+
),
|
|
1463
|
+
style: { ...s, ...l },
|
|
1464
|
+
...d,
|
|
1465
|
+
children: g
|
|
1466
|
+
}
|
|
1467
|
+
);
|
|
1468
|
+
}), pr = b(function({
|
|
1469
|
+
space: e,
|
|
1470
|
+
justify: n,
|
|
1471
|
+
align: o,
|
|
1472
|
+
as: i = "div",
|
|
1473
|
+
className: a,
|
|
1474
|
+
style: l,
|
|
1475
|
+
children: c,
|
|
1476
|
+
...d
|
|
1477
|
+
}, u) {
|
|
1478
|
+
const s = {};
|
|
1479
|
+
return e && (s["--cluster-space"] = e), n && (s["--cluster-justify"] = n), o && (s["--cluster-align"] = o), /* @__PURE__ */ r(
|
|
1480
|
+
i,
|
|
1481
|
+
{
|
|
1482
|
+
ref: u,
|
|
1483
|
+
className: m("rudiment-cluster", a),
|
|
1484
|
+
style: { ...s, ...l },
|
|
1485
|
+
...d,
|
|
1486
|
+
children: c
|
|
1487
|
+
}
|
|
1488
|
+
);
|
|
1489
|
+
}), gr = b(function({
|
|
1490
|
+
minCellWidth: e,
|
|
1491
|
+
space: n,
|
|
1492
|
+
as: o = "div",
|
|
1493
|
+
className: i,
|
|
1494
|
+
style: a,
|
|
1495
|
+
children: l,
|
|
1496
|
+
...c
|
|
1497
|
+
}, d) {
|
|
1498
|
+
const u = {};
|
|
1499
|
+
return e && (u["--grid-min-cell"] = e), n && (u["--grid-space"] = n), /* @__PURE__ */ r(
|
|
1500
|
+
o,
|
|
1501
|
+
{
|
|
1502
|
+
ref: d,
|
|
1503
|
+
className: m("rudiment-grid", i),
|
|
1504
|
+
style: { ...u, ...a },
|
|
1505
|
+
...c,
|
|
1506
|
+
children: l
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
1509
|
+
}), br = b(function({
|
|
1510
|
+
side: e = "left",
|
|
1511
|
+
sideWidth: n,
|
|
1512
|
+
contentMin: o,
|
|
1513
|
+
space: i,
|
|
1514
|
+
noStretch: a = !1,
|
|
1515
|
+
as: l = "div",
|
|
1516
|
+
className: c,
|
|
1517
|
+
style: d,
|
|
1518
|
+
children: u,
|
|
1519
|
+
...s
|
|
1520
|
+
}, p) {
|
|
1521
|
+
const g = {};
|
|
1522
|
+
return n && (g["--sidebar-width"] = n), o && (g["--sidebar-content-min"] = o), i && (g["--sidebar-space"] = i), /* @__PURE__ */ r(
|
|
1523
|
+
l,
|
|
1524
|
+
{
|
|
1525
|
+
ref: p,
|
|
1526
|
+
className: m(
|
|
1527
|
+
"rudiment-sidebar",
|
|
1528
|
+
e === "right" && "rudiment-sidebar--right",
|
|
1529
|
+
a && "rudiment-sidebar--no-stretch",
|
|
1530
|
+
c
|
|
1531
|
+
),
|
|
1532
|
+
style: { ...g, ...d },
|
|
1533
|
+
...s,
|
|
1534
|
+
children: u
|
|
1535
|
+
}
|
|
1536
|
+
);
|
|
1537
|
+
}), _r = b(function({
|
|
1538
|
+
maxWidth: e,
|
|
1539
|
+
gutters: n,
|
|
1540
|
+
intrinsic: o = !1,
|
|
1541
|
+
as: i = "div",
|
|
1542
|
+
className: a,
|
|
1543
|
+
style: l,
|
|
1544
|
+
children: c,
|
|
1545
|
+
...d
|
|
1546
|
+
}, u) {
|
|
1547
|
+
const s = {};
|
|
1548
|
+
return e && (s["--center-max-width"] = e), n && (s["--center-gutters"] = n), /* @__PURE__ */ r(
|
|
1549
|
+
i,
|
|
1550
|
+
{
|
|
1551
|
+
ref: u,
|
|
1552
|
+
className: m(
|
|
1553
|
+
"rudiment-center",
|
|
1554
|
+
o && "rudiment-center--intrinsic",
|
|
1555
|
+
a
|
|
1556
|
+
),
|
|
1557
|
+
style: { ...s, ...l },
|
|
1558
|
+
...d,
|
|
1559
|
+
children: c
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
}), vr = b(function({
|
|
1563
|
+
minHeight: e,
|
|
1564
|
+
space: n,
|
|
1565
|
+
as: o = "div",
|
|
1566
|
+
className: i,
|
|
1567
|
+
style: a,
|
|
1568
|
+
children: l,
|
|
1569
|
+
...c
|
|
1570
|
+
}, d) {
|
|
1571
|
+
const u = {};
|
|
1572
|
+
return e && (u["--cover-min-height"] = e), n && (u["--cover-space"] = n), /* @__PURE__ */ r(
|
|
1573
|
+
o,
|
|
1574
|
+
{
|
|
1575
|
+
ref: d,
|
|
1576
|
+
className: m("rudiment-cover", i),
|
|
1577
|
+
style: { ...u, ...a },
|
|
1578
|
+
...c,
|
|
1579
|
+
children: l
|
|
1580
|
+
}
|
|
1581
|
+
);
|
|
1582
|
+
}), Nr = b(
|
|
1583
|
+
function({
|
|
1584
|
+
threshold: e,
|
|
1585
|
+
space: n,
|
|
1586
|
+
limit: o,
|
|
1587
|
+
as: i = "div",
|
|
1588
|
+
className: a,
|
|
1589
|
+
style: l,
|
|
1590
|
+
children: c,
|
|
1591
|
+
...d
|
|
1592
|
+
}, u) {
|
|
1593
|
+
const s = {};
|
|
1594
|
+
return e && (s["--switcher-threshold"] = e), n && (s["--switcher-space"] = n), /* @__PURE__ */ r(
|
|
1595
|
+
i,
|
|
1596
|
+
{
|
|
1597
|
+
ref: u,
|
|
1598
|
+
className: m("rudiment-switcher", a),
|
|
1599
|
+
style: { ...s, ...l },
|
|
1600
|
+
...d,
|
|
1601
|
+
children: c
|
|
1602
|
+
}
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
);
|
|
1606
|
+
export {
|
|
1607
|
+
Jt as Alert,
|
|
1608
|
+
tr as Avatar,
|
|
1609
|
+
ht as Badge,
|
|
1610
|
+
ir as BarChart,
|
|
1611
|
+
fr as Box,
|
|
1612
|
+
Ot as Button,
|
|
1613
|
+
Y as Card,
|
|
1614
|
+
_r as Center,
|
|
1615
|
+
Lt as Checkbox,
|
|
1616
|
+
Gt as CheckboxGroup,
|
|
1617
|
+
or as CircularProgress,
|
|
1618
|
+
pr as Cluster,
|
|
1619
|
+
vr as Cover,
|
|
1620
|
+
Xt as Dialog,
|
|
1621
|
+
sr as DonutChart,
|
|
1622
|
+
gr as Grid,
|
|
1623
|
+
dr as Heading,
|
|
1624
|
+
P as Icon,
|
|
1625
|
+
Qt as IconButton,
|
|
1626
|
+
Kt as Input,
|
|
1627
|
+
cr as KanbanBoard,
|
|
1628
|
+
lr as KanbanCard,
|
|
1629
|
+
te as KanbanColumn,
|
|
1630
|
+
Ut as Keyboard,
|
|
1631
|
+
ar as LineChart,
|
|
1632
|
+
jt as Menu,
|
|
1633
|
+
zt as MenuItem,
|
|
1634
|
+
Ht as MenuSection,
|
|
1635
|
+
Ft as MenuTrigger,
|
|
1636
|
+
nr as NavItem,
|
|
1637
|
+
er as ProgressBar,
|
|
1638
|
+
mr as Prose,
|
|
1639
|
+
Yt as RadioGroup,
|
|
1640
|
+
At as Select,
|
|
1641
|
+
kr as Separator,
|
|
1642
|
+
br as Sidebar,
|
|
1643
|
+
hr as Stack,
|
|
1644
|
+
rr as StatCard,
|
|
1645
|
+
xr as SubmenuTrigger,
|
|
1646
|
+
Wt as Switch,
|
|
1647
|
+
Nr as Switcher,
|
|
1648
|
+
Vt as Tag,
|
|
1649
|
+
ur as Text,
|
|
1650
|
+
qt as Tooltip,
|
|
1651
|
+
Zt as TooltipTrigger,
|
|
1652
|
+
m as cn,
|
|
1653
|
+
j as useChartTheme,
|
|
1654
|
+
Q as useLoadingButton
|
|
1655
|
+
};
|