@apliteni/apliteni-ui 0.59.0 → 0.61.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/package.json +1 -1
- package/react/README.md +34 -5
- package/react/dist/index.css +4 -0
- package/react/dist/index.d.ts +40 -4
- package/react/dist/index.js +272 -224
- package/src/styles/input.css +14 -0
package/react/dist/index.js
CHANGED
|
@@ -162,28 +162,62 @@ function Badge({ variant = "neutral", children }) {
|
|
|
162
162
|
return /* @__PURE__ */ jsx3("span", { className: cls, children });
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
// src/primitives/Pill.tsx
|
|
166
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
167
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
168
|
+
var Pill = forwardRef2(function Pill2({
|
|
169
|
+
variant,
|
|
170
|
+
className,
|
|
171
|
+
...rest
|
|
172
|
+
}, ref) {
|
|
173
|
+
const classes = ["ui-pill", variant && `ui-pill--${variant}`, className].filter(Boolean).join(" ");
|
|
174
|
+
return /* @__PURE__ */ jsx4("span", { ...rest, ref, className: classes });
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// src/primitives/StatusDot.tsx
|
|
178
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
179
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
180
|
+
var StatusDot = forwardRef3(function StatusDot2({
|
|
181
|
+
live = false,
|
|
182
|
+
className,
|
|
183
|
+
...rest
|
|
184
|
+
}, ref) {
|
|
185
|
+
const labelled = Boolean(rest["aria-label"]?.trim() || rest["aria-labelledby"]?.trim());
|
|
186
|
+
const classes = ["ui-dot", live && "is-live", className].filter(Boolean).join(" ");
|
|
187
|
+
return /* @__PURE__ */ jsx5(
|
|
188
|
+
"span",
|
|
189
|
+
{
|
|
190
|
+
role: labelled ? "img" : void 0,
|
|
191
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
192
|
+
...rest,
|
|
193
|
+
ref,
|
|
194
|
+
className: classes
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
|
|
165
199
|
// src/primitives/Card.tsx
|
|
166
|
-
import { jsx as
|
|
200
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
167
201
|
function Card({ title, sub, level = 2, children }) {
|
|
168
202
|
const n = Number(level);
|
|
169
203
|
const Heading = `h${[2, 3, 4, 5, 6].includes(n) ? n : 2}`;
|
|
170
204
|
const titled = title != null && title !== false && title !== "";
|
|
171
205
|
return /* @__PURE__ */ jsxs2("div", { className: "ui-card", children: [
|
|
172
|
-
titled && /* @__PURE__ */
|
|
173
|
-
sub != null && /* @__PURE__ */
|
|
206
|
+
titled && /* @__PURE__ */ jsx6(Heading, { className: "ui-card__title", children: title }),
|
|
207
|
+
sub != null && /* @__PURE__ */ jsx6("div", { className: "ui-card__sub", children: sub }),
|
|
174
208
|
children
|
|
175
209
|
] });
|
|
176
210
|
}
|
|
177
211
|
|
|
178
212
|
// src/primitives/Callout.tsx
|
|
179
213
|
import { calloutIcons, icon as kitIcon } from "@apliteni/apliteni-ui";
|
|
180
|
-
import { jsx as
|
|
214
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
181
215
|
function Callout({ variant, icon: icon6 = calloutIcons[variant ?? "neutral"], children, actions }) {
|
|
182
216
|
return /* @__PURE__ */ jsxs3("div", { className: `ui-callout${variant && variant !== "neutral" ? ` ui-callout--${variant}` : ""}`, role: variant === "danger" ? "alert" : void 0, children: [
|
|
183
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ jsx7("span", { className: "ui-callout__icon", dangerouslySetInnerHTML: { __html: kitIcon(icon6) } }),
|
|
184
218
|
/* @__PURE__ */ jsxs3("div", { className: "ui-callout__body", children: [
|
|
185
219
|
children,
|
|
186
|
-
actions != null && /* @__PURE__ */
|
|
220
|
+
actions != null && /* @__PURE__ */ jsx7("div", { className: "ui-toolbar ui-callout__actions", children: actions })
|
|
187
221
|
] })
|
|
188
222
|
] });
|
|
189
223
|
}
|
|
@@ -193,7 +227,7 @@ import { useId as useId2 } from "react";
|
|
|
193
227
|
|
|
194
228
|
// src/Tooltip.tsx
|
|
195
229
|
import { useEffect, useId, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState } from "react";
|
|
196
|
-
import { jsx as
|
|
230
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
197
231
|
function Tooltip({ text: text2, children }) {
|
|
198
232
|
const id = useId();
|
|
199
233
|
const host = useRef2(null);
|
|
@@ -250,7 +284,7 @@ function Tooltip({ text: text2, children }) {
|
|
|
250
284
|
};
|
|
251
285
|
}, [open]);
|
|
252
286
|
return /* @__PURE__ */ jsxs4("span", { ref: host, className: "ui-tip-host", style: { display: "inline-block" }, children: [
|
|
253
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ jsx8(
|
|
254
288
|
"span",
|
|
255
289
|
{
|
|
256
290
|
ref: trigger,
|
|
@@ -287,12 +321,12 @@ function Tooltip({ text: text2, children }) {
|
|
|
287
321
|
children
|
|
288
322
|
}
|
|
289
323
|
),
|
|
290
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ jsx8("span", { ref: tip, id, role: "tooltip", className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx8("span", { className: "ui-tip__label", children: text2 }) })
|
|
291
325
|
] });
|
|
292
326
|
}
|
|
293
327
|
|
|
294
328
|
// src/primitives/StatBand.tsx
|
|
295
|
-
import { Fragment, jsx as
|
|
329
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
296
330
|
var GLYPH = { up: "arrowUp", down: "arrowDown", flat: "minus" };
|
|
297
331
|
var directionOf = (text2) => {
|
|
298
332
|
const t = text2.trim();
|
|
@@ -301,15 +335,15 @@ var directionOf = (text2) => {
|
|
|
301
335
|
var hasChange = (d) => !!d && d.value != null && d.value !== "";
|
|
302
336
|
function Delta({ delta, basisId }) {
|
|
303
337
|
if (!hasChange(delta)) {
|
|
304
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ jsx9("dd", { className: "ui-stat__delta ui-stat__delta--none", children: delta.none || "No earlier figure" });
|
|
305
339
|
}
|
|
306
340
|
const dir = delta.direction && GLYPH[delta.direction] ? delta.direction : directionOf(delta.value);
|
|
307
341
|
return /* @__PURE__ */ jsxs5("dd", { className: "ui-stat__delta", "aria-describedby": !delta.basis && basisId ? basisId : void 0, children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
delta.tooltip ? /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ jsx9(Icon, { name: GLYPH[dir] }),
|
|
343
|
+
delta.tooltip ? /* @__PURE__ */ jsx9(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx9("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx9("span", { className: "ui-stat__change", children: delta.value }),
|
|
310
344
|
delta.basis ? /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
311
345
|
" ",
|
|
312
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ jsx9("span", { className: "ui-stat__basis", children: delta.basis })
|
|
313
347
|
] }) : null
|
|
314
348
|
] });
|
|
315
349
|
}
|
|
@@ -319,15 +353,15 @@ function StatBand({ stats, variant = "tiles", basis, basisId: sharedBasisId, lab
|
|
|
319
353
|
const basisId = basis ? `${id || auto}-basis` : sharedBasisId;
|
|
320
354
|
const root = ["ui-stats", `ui-stats--${v}`, v === "band" && "ui-card"].filter(Boolean).join(" ");
|
|
321
355
|
return /* @__PURE__ */ jsxs5("div", { className: root, role: label ? "group" : void 0, "aria-label": label || void 0, children: [
|
|
322
|
-
basis ? /* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
356
|
+
basis ? /* @__PURE__ */ jsx9("p", { className: "ui-stats__basis", id: basisId, children: basis }) : null,
|
|
357
|
+
/* @__PURE__ */ jsx9("dl", { className: "ui-stats__list", children: stats.map((s, i) => {
|
|
324
358
|
const tone = hasChange(s.delta) && (s.delta.tone === "good" || s.delta.tone === "bad") ? s.delta.tone : "";
|
|
325
359
|
const cls = ["ui-stat", tone && `ui-stat--${tone}`, v === "tiles" && "ui-card ui-card--pad-sm"].filter(Boolean).join(" ");
|
|
326
360
|
return /* @__PURE__ */ jsxs5("div", { className: cls, children: [
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
s.delta ? /* @__PURE__ */
|
|
330
|
-
s.trend ? /* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ jsx9("dt", { className: "ui-stat__label", children: s.label }),
|
|
362
|
+
/* @__PURE__ */ jsx9("dd", { className: "ui-stat__value", children: s.value }),
|
|
363
|
+
s.delta ? /* @__PURE__ */ jsx9(Delta, { delta: s.delta, basisId }) : null,
|
|
364
|
+
s.trend ? /* @__PURE__ */ jsx9("dd", { className: "ui-stat__trend", children: s.trend }) : null
|
|
331
365
|
] }, `${s.label}-${i}`);
|
|
332
366
|
}) })
|
|
333
367
|
] });
|
|
@@ -551,7 +585,7 @@ function useDialog(active, { root, panel, body, initialFocus }, onClose) {
|
|
|
551
585
|
}
|
|
552
586
|
|
|
553
587
|
// src/Modal.tsx
|
|
554
|
-
import { jsx as
|
|
588
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
555
589
|
function Modal({ open, title, onClose, footer, children, initialFocusRef, role = "dialog" }) {
|
|
556
590
|
const id = useId3();
|
|
557
591
|
const titleId = `${id}-title`;
|
|
@@ -563,7 +597,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
|
|
|
563
597
|
const scope = useDialog(shown, { root, panel, body, initialFocus: initialFocusRef }, onClose);
|
|
564
598
|
if (!mounted) return null;
|
|
565
599
|
return createPortal(
|
|
566
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ jsx10(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsx10("div", { className: shown ? "rx-scrim is-open" : "rx-scrim", ref: root, onMouseDown: dismissOnScrim(onClose), children: /* @__PURE__ */ jsxs6(
|
|
567
601
|
"div",
|
|
568
602
|
{
|
|
569
603
|
className: "rx-modal",
|
|
@@ -575,11 +609,11 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
|
|
|
575
609
|
ref: panel,
|
|
576
610
|
children: [
|
|
577
611
|
/* @__PURE__ */ jsxs6("div", { className: "rx-modal__head", children: [
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ jsx10("h2", { className: "rx-modal__title", id: titleId, children: title }),
|
|
613
|
+
/* @__PURE__ */ jsx10(Button, { variant: "ghost", size: "sm", iconOnly: true, icon: "x", "aria-label": "Close", onClick: onClose })
|
|
580
614
|
] }),
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
footer && /* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ jsx10("div", { className: "rx-modal__body", id: bodyId, ref: body, children }),
|
|
616
|
+
footer && /* @__PURE__ */ jsx10("div", { className: "rx-modal__foot", children: footer })
|
|
583
617
|
]
|
|
584
618
|
}
|
|
585
619
|
) }) }),
|
|
@@ -588,7 +622,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
|
|
|
588
622
|
}
|
|
589
623
|
|
|
590
624
|
// src/Confirm.tsx
|
|
591
|
-
import { Fragment as Fragment2, jsx as
|
|
625
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
592
626
|
function Confirm({
|
|
593
627
|
open,
|
|
594
628
|
title,
|
|
@@ -601,7 +635,7 @@ function Confirm({
|
|
|
601
635
|
onCancel
|
|
602
636
|
}) {
|
|
603
637
|
const safeAction = useRef5(null);
|
|
604
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ jsx11(
|
|
605
639
|
Modal,
|
|
606
640
|
{
|
|
607
641
|
open,
|
|
@@ -610,8 +644,8 @@ function Confirm({
|
|
|
610
644
|
role: "alertdialog",
|
|
611
645
|
initialFocusRef: safeAction,
|
|
612
646
|
footer: /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ jsx11(Button, { ref: safeAction, variant: "ghost", onClick: onCancel, children: cancelLabel }),
|
|
648
|
+
/* @__PURE__ */ jsx11(Button, { variant: danger ? "danger" : "primary", busy, onClick: onConfirm, children: confirmLabel })
|
|
615
649
|
] }),
|
|
616
650
|
children: body
|
|
617
651
|
}
|
|
@@ -621,7 +655,7 @@ function Confirm({
|
|
|
621
655
|
// src/Drawer.tsx
|
|
622
656
|
import { useId as useId4, useRef as useRef6 } from "react";
|
|
623
657
|
import { createPortal as createPortal2 } from "react-dom";
|
|
624
|
-
import { jsx as
|
|
658
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
625
659
|
function Drawer({
|
|
626
660
|
open,
|
|
627
661
|
title,
|
|
@@ -641,8 +675,8 @@ function Drawer({
|
|
|
641
675
|
if (!mounted) return null;
|
|
642
676
|
const cls = ["ui-drawer", `ui-drawer--${side}`, `ui-drawer--${size}`, shown && "is-open"].filter(Boolean).join(" ");
|
|
643
677
|
return createPortal2(
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ jsx12(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs8("div", { className: cls, ref: root, children: [
|
|
679
|
+
/* @__PURE__ */ jsx12("div", { className: "ui-drawer__scrim", onMouseDown: dismissOnScrim(onClose) }),
|
|
646
680
|
/* @__PURE__ */ jsxs8(
|
|
647
681
|
"aside",
|
|
648
682
|
{
|
|
@@ -654,11 +688,11 @@ function Drawer({
|
|
|
654
688
|
ref: panel,
|
|
655
689
|
children: [
|
|
656
690
|
/* @__PURE__ */ jsxs8("header", { className: "ui-drawer__header", children: [
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ jsx12("h2", { className: "ui-drawer__title", id: titleId, children: title }),
|
|
692
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx12(Icon, { name: "x" }) })
|
|
659
693
|
] }),
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
footer && /* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ jsx12("div", { className: "ui-drawer__body", ref: body, children }),
|
|
695
|
+
footer && /* @__PURE__ */ jsx12("footer", { className: "ui-drawer__footer", children: footer })
|
|
662
696
|
]
|
|
663
697
|
}
|
|
664
698
|
)
|
|
@@ -671,9 +705,9 @@ function Drawer({
|
|
|
671
705
|
import { useCallback, useEffect as useEffect3, useId as useId5, useMemo, useRef as useRef7, useState as useState3 } from "react";
|
|
672
706
|
import { createPortal as createPortal3 } from "react-dom";
|
|
673
707
|
import { rankGroups, icon as icon2 } from "@apliteni/apliteni-ui";
|
|
674
|
-
import { jsx as
|
|
708
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
675
709
|
var cx2 = (...a) => a.filter(Boolean).join(" ");
|
|
676
|
-
var Glyph = ({ name, className }) => /* @__PURE__ */
|
|
710
|
+
var Glyph = ({ name, className }) => /* @__PURE__ */ jsx13("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon2(name) } });
|
|
677
711
|
var keysOf = (shortcut) => shortcut == null ? [] : Array.isArray(shortcut) ? shortcut : [shortcut];
|
|
678
712
|
function CommandPalette({
|
|
679
713
|
open,
|
|
@@ -738,8 +772,8 @@ function CommandPalette({
|
|
|
738
772
|
const listId = `${uid}-list`;
|
|
739
773
|
let n = 0;
|
|
740
774
|
return createPortal3(
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ jsx13(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs9("div", { className: cx2("ui-cmdk", density === "roomy" && "ui-cmdk--roomy", "is-open"), ref: root, children: [
|
|
776
|
+
/* @__PURE__ */ jsx13("div", { className: "ui-cmdk__scrim", onMouseDown: dismissOnScrim(onClose) }),
|
|
743
777
|
/* @__PURE__ */ jsxs9(
|
|
744
778
|
"div",
|
|
745
779
|
{
|
|
@@ -752,8 +786,8 @@ function CommandPalette({
|
|
|
752
786
|
onKeyDown,
|
|
753
787
|
children: [
|
|
754
788
|
/* @__PURE__ */ jsxs9("div", { className: "ui-cmdk__search", ref: search, children: [
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ jsx13(Glyph, { name: "search", className: "ui-cmdk__search-ic" }),
|
|
790
|
+
/* @__PURE__ */ jsx13(
|
|
757
791
|
"input",
|
|
758
792
|
{
|
|
759
793
|
className: "ui-cmdk__input",
|
|
@@ -775,14 +809,14 @@ function CommandPalette({
|
|
|
775
809
|
}
|
|
776
810
|
)
|
|
777
811
|
] }),
|
|
778
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ jsx13("div", { className: "ui-cmdk__list", id: listId, role: "listbox", "aria-label": `${label} results`, children: shown.map((group, gi) => /* @__PURE__ */ jsxs9(
|
|
779
813
|
"div",
|
|
780
814
|
{
|
|
781
815
|
className: "ui-cmdk__group",
|
|
782
816
|
role: "group",
|
|
783
817
|
"aria-labelledby": group.label ? `${uid}-g${gi}` : void 0,
|
|
784
818
|
children: [
|
|
785
|
-
group.label && /* @__PURE__ */
|
|
819
|
+
group.label && /* @__PURE__ */ jsx13("div", { className: "ui-cmdk__group-head", id: `${uid}-g${gi}`, children: group.label }),
|
|
786
820
|
group.items.map((item) => {
|
|
787
821
|
const disabled = isDisabled(item);
|
|
788
822
|
const id = `${uid}-o${n++}`;
|
|
@@ -807,13 +841,13 @@ function CommandPalette({
|
|
|
807
841
|
},
|
|
808
842
|
onClick: (e) => run(item, e.metaKey || e.ctrlKey),
|
|
809
843
|
children: [
|
|
810
|
-
item.icon && /* @__PURE__ */
|
|
844
|
+
item.icon && /* @__PURE__ */ jsx13(Glyph, { name: item.icon, className: "ui-cmdk__ic" }),
|
|
811
845
|
/* @__PURE__ */ jsxs9("span", { className: "ui-cmdk__main", children: [
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
item.description && /* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ jsx13("span", { className: "ui-cmdk__label", children: item.label }),
|
|
847
|
+
item.description && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__desc", children: item.description })
|
|
814
848
|
] }),
|
|
815
|
-
item.badge && /* @__PURE__ */
|
|
816
|
-
keysOf(item.shortcut).length > 0 && /* @__PURE__ */
|
|
849
|
+
item.badge && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__badge", children: item.badge }),
|
|
850
|
+
keysOf(item.shortcut).length > 0 && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__keys", "aria-hidden": "true", children: keysOf(item.shortcut).map((k) => /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: k }, k)) })
|
|
817
851
|
]
|
|
818
852
|
},
|
|
819
853
|
item.id
|
|
@@ -823,20 +857,20 @@ function CommandPalette({
|
|
|
823
857
|
},
|
|
824
858
|
group.label ?? `g${gi}`
|
|
825
859
|
)) }),
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
860
|
+
/* @__PURE__ */ jsx13("p", { className: "ui-cmdk__empty", hidden: countOf(shown) > 0, children: empty }),
|
|
861
|
+
/* @__PURE__ */ jsx13("p", { className: "ui-sr", role: "status", "aria-live": "polite", children: countOf(shown) === 0 ? "No results" : `${countOf(shown)} result${countOf(shown) === 1 ? "" : "s"}` }),
|
|
828
862
|
hint && /* @__PURE__ */ jsxs9("div", { className: "ui-cmdk__foot", "aria-hidden": "true", children: [
|
|
829
863
|
/* @__PURE__ */ jsxs9("span", { children: [
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
864
|
+
/* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u2191" }),
|
|
865
|
+
/* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u2193" }),
|
|
832
866
|
" move"
|
|
833
867
|
] }),
|
|
834
868
|
/* @__PURE__ */ jsxs9("span", { children: [
|
|
835
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u21B5" }),
|
|
836
870
|
" run"
|
|
837
871
|
] }),
|
|
838
872
|
/* @__PURE__ */ jsxs9("span", { children: [
|
|
839
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "esc" }),
|
|
840
874
|
" close"
|
|
841
875
|
] })
|
|
842
876
|
] })
|
|
@@ -867,7 +901,7 @@ import { DEFAULT_PAGE_SIZE as DEFAULT_PAGE_SIZE2 } from "@apliteni/apliteni-ui";
|
|
|
867
901
|
// src/Pagination.tsx
|
|
868
902
|
import { useEffect as useEffect4, useId as useId6, useRef as useRef8, useState as useState4 } from "react";
|
|
869
903
|
import { DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
|
|
870
|
-
import { jsx as
|
|
904
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
871
905
|
var GHOST_SM = "ui-btn ui-btn--ghost ui-btn--sm";
|
|
872
906
|
var VARIANTS = ["steps", "numbered", "jump"];
|
|
873
907
|
var cx3 = (...a) => a.filter(Boolean).join(" ");
|
|
@@ -959,7 +993,7 @@ function Pagination({
|
|
|
959
993
|
const step = (label_, target, disabled) => (
|
|
960
994
|
// A control at an end is disabled and stays where it is: removing it slides
|
|
961
995
|
// the next control under a pointer already travelling toward it.
|
|
962
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ jsx14(
|
|
963
997
|
"button",
|
|
964
998
|
{
|
|
965
999
|
type: "button",
|
|
@@ -1005,7 +1039,7 @@ function Pagination({
|
|
|
1005
1039
|
} else {
|
|
1006
1040
|
let middle = null;
|
|
1007
1041
|
if (kind === "numbered") {
|
|
1008
|
-
middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */
|
|
1042
|
+
middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */ jsx14("span", { className: "ui-pager__gap", "aria-hidden": "true", children: "\u2026" }, `gap${i}`) : /* @__PURE__ */ jsx14(
|
|
1009
1043
|
"button",
|
|
1010
1044
|
{
|
|
1011
1045
|
type: "button",
|
|
@@ -1021,8 +1055,8 @@ function Pagination({
|
|
|
1021
1055
|
));
|
|
1022
1056
|
} else if (kind === "jump") {
|
|
1023
1057
|
middle = /* @__PURE__ */ jsxs10("span", { className: "ui-pager__jump", children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ jsx14("label", { htmlFor: `${uid}-jump`, children: "Page" }),
|
|
1059
|
+
/* @__PURE__ */ jsx14(
|
|
1026
1060
|
"input",
|
|
1027
1061
|
{
|
|
1028
1062
|
className: "ui-input ui-pager__jump-input",
|
|
@@ -1067,10 +1101,10 @@ function Pagination({
|
|
|
1067
1101
|
"aria-label": label,
|
|
1068
1102
|
"aria-busy": loading ? true : void 0,
|
|
1069
1103
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1104
|
+
/* @__PURE__ */ jsx14("p", { className: "ui-pager__status", "aria-live": "polite", "aria-atomic": "true", children: status }),
|
|
1071
1105
|
sizes.length ? /* @__PURE__ */ jsxs10("div", { className: "ui-pager__size", children: [
|
|
1072
|
-
/* @__PURE__ */
|
|
1073
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ jsx14("label", { className: "ui-pager__size-label", htmlFor: `${uid}-size`, children: "Rows" }),
|
|
1107
|
+
/* @__PURE__ */ jsx14(
|
|
1074
1108
|
"select",
|
|
1075
1109
|
{
|
|
1076
1110
|
className: "ui-select ui-pager__size-select",
|
|
@@ -1078,7 +1112,7 @@ function Pagination({
|
|
|
1078
1112
|
disabled: loading,
|
|
1079
1113
|
value: size,
|
|
1080
1114
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
1081
|
-
children: sizes.map((s) => /* @__PURE__ */
|
|
1115
|
+
children: sizes.map((s) => /* @__PURE__ */ jsx14("option", { value: s, children: fmt(s) }, s))
|
|
1082
1116
|
}
|
|
1083
1117
|
)
|
|
1084
1118
|
] }) : null,
|
|
@@ -1089,7 +1123,7 @@ function Pagination({
|
|
|
1089
1123
|
}
|
|
1090
1124
|
|
|
1091
1125
|
// src/DataTable.tsx
|
|
1092
|
-
import { Fragment as Fragment3, jsx as
|
|
1126
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1093
1127
|
var NO_SORT = { key: void 0, dir: -1 };
|
|
1094
1128
|
function sortTableRows(rows, sort) {
|
|
1095
1129
|
if (sort.key === void 0) return [...rows];
|
|
@@ -1182,7 +1216,7 @@ function DataTable({
|
|
|
1182
1216
|
onSortChange?.(next);
|
|
1183
1217
|
toFirstPage();
|
|
1184
1218
|
};
|
|
1185
|
-
const caret = (k) => /* @__PURE__ */
|
|
1219
|
+
const caret = (k) => /* @__PURE__ */ jsx15(
|
|
1186
1220
|
"svg",
|
|
1187
1221
|
{
|
|
1188
1222
|
className: "rx-caret",
|
|
@@ -1194,19 +1228,19 @@ function DataTable({
|
|
|
1194
1228
|
strokeLinejoin: "round",
|
|
1195
1229
|
"aria-hidden": "true",
|
|
1196
1230
|
focusable: "false",
|
|
1197
|
-
children: sort.key === k ? /* @__PURE__ */
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */
|
|
1231
|
+
children: sort.key === k ? /* @__PURE__ */ jsx15("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1232
|
+
/* @__PURE__ */ jsx15("path", { d: "m8 9 4-4 4 4" }),
|
|
1233
|
+
/* @__PURE__ */ jsx15("path", { d: "m8 15 4 4 4-4" })
|
|
1200
1234
|
] })
|
|
1201
1235
|
}
|
|
1202
1236
|
);
|
|
1203
1237
|
const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));
|
|
1204
1238
|
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1205
1239
|
scrollable && columnScroll.overflow && /* @__PURE__ */ jsxs11("div", { className: "ui-card__row", role: "group", "aria-label": `${scrollLabel} columns`, children: [
|
|
1206
|
-
/* @__PURE__ */
|
|
1207
|
-
/* @__PURE__ */
|
|
1240
|
+
/* @__PURE__ */ jsx15(Button, { size: "sm", icon: "arrowLeft", "aria-controls": scrollId, disabled: columnScroll.start, onClick: () => scrollColumns(-1), children: "Previous columns" }),
|
|
1241
|
+
/* @__PURE__ */ jsx15(Button, { size: "sm", iconRight: "arrowRight", "aria-controls": scrollId, disabled: columnScroll.end, onClick: () => scrollColumns(1), children: "More columns" })
|
|
1208
1242
|
] }),
|
|
1209
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ jsx15(
|
|
1210
1244
|
"div",
|
|
1211
1245
|
{
|
|
1212
1246
|
id: scrollId,
|
|
@@ -1222,8 +1256,8 @@ function DataTable({
|
|
|
1222
1256
|
className: ["ui-table ui-table--hover", (density === "dense" || !density && dense) && "ui-table--dense", density === "compact" && "ui-table--compact", stickyHeader && "ui-table--sticky", pinnedIdentity && "ui-table--pinned"].filter(Boolean).join(" "),
|
|
1223
1257
|
"aria-busy": loading || void 0,
|
|
1224
1258
|
children: [
|
|
1225
|
-
/* @__PURE__ */
|
|
1226
|
-
selectable ? /* @__PURE__ */
|
|
1259
|
+
/* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsxs11("tr", { children: [
|
|
1260
|
+
selectable ? /* @__PURE__ */ jsx15("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx15(
|
|
1227
1261
|
"input",
|
|
1228
1262
|
{
|
|
1229
1263
|
type: "checkbox",
|
|
@@ -1236,7 +1270,7 @@ function DataTable({
|
|
|
1236
1270
|
// The sort control is a real <button> inside the header cell. It used to be
|
|
1237
1271
|
// role="button" ON the <th>, which threw away the columnheader role and put
|
|
1238
1272
|
// aria-sort on a role that forbids it.
|
|
1239
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ jsx15(
|
|
1240
1274
|
"th",
|
|
1241
1275
|
{
|
|
1242
1276
|
scope: "col",
|
|
@@ -1252,9 +1286,9 @@ function DataTable({
|
|
|
1252
1286
|
))
|
|
1253
1287
|
] }) }),
|
|
1254
1288
|
/* @__PURE__ */ jsxs11("tbody", { children: [
|
|
1255
|
-
!slice.length && /* @__PURE__ */
|
|
1289
|
+
!slice.length && /* @__PURE__ */ jsx15("tr", { children: /* @__PURE__ */ jsx15("td", { colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
|
|
1256
1290
|
slice.map((r) => /* @__PURE__ */ jsxs11("tr", { children: [
|
|
1257
|
-
selectable ? /* @__PURE__ */
|
|
1291
|
+
selectable ? /* @__PURE__ */ jsx15("td", { className: "ui-table__selection", children: /* @__PURE__ */ jsx15(
|
|
1258
1292
|
"input",
|
|
1259
1293
|
{
|
|
1260
1294
|
type: "checkbox",
|
|
@@ -1263,7 +1297,7 @@ function DataTable({
|
|
|
1263
1297
|
onChange: () => onToggle(r.name)
|
|
1264
1298
|
}
|
|
1265
1299
|
) }) : null,
|
|
1266
|
-
columns.map((c, columnIndex) => /* @__PURE__ */
|
|
1300
|
+
columns.map((c, columnIndex) => /* @__PURE__ */ jsx15("td", { className: [c.num && "ui-table__num", pinnedIdentity && columnIndex === 0 && "ui-table__identity"].filter(Boolean).join(" "), children: c.render ? c.render(r) : String(r[c.key]) }, c.key))
|
|
1267
1301
|
] }, r.name))
|
|
1268
1302
|
] })
|
|
1269
1303
|
]
|
|
@@ -1271,7 +1305,7 @@ function DataTable({
|
|
|
1271
1305
|
)
|
|
1272
1306
|
}
|
|
1273
1307
|
),
|
|
1274
|
-
pager ? /* @__PURE__ */
|
|
1308
|
+
pager ? /* @__PURE__ */ jsx15(
|
|
1275
1309
|
Pagination,
|
|
1276
1310
|
{
|
|
1277
1311
|
page,
|
|
@@ -1296,7 +1330,7 @@ function DataTable({
|
|
|
1296
1330
|
import { PAGE_SIZES as KIT_PAGE_SIZES, DEFAULT_PAGE_SIZE as KIT_DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
|
|
1297
1331
|
|
|
1298
1332
|
// src/Loading.tsx
|
|
1299
|
-
import { jsx as
|
|
1333
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1300
1334
|
var cx4 = (...a) => a.filter(Boolean).join(" ");
|
|
1301
1335
|
function Skeleton({ lines = 3, width, height, radius, className }) {
|
|
1302
1336
|
const widths = Array.isArray(lines) ? lines : null;
|
|
@@ -1306,10 +1340,10 @@ function Skeleton({ lines = 3, width, height, radius, className }) {
|
|
|
1306
1340
|
if (!w && !height && !radius) return void 0;
|
|
1307
1341
|
return { ...w && { width: w }, ...height && { height }, ...radius && { borderRadius: radius } };
|
|
1308
1342
|
};
|
|
1309
|
-
return /* @__PURE__ */
|
|
1343
|
+
return /* @__PURE__ */ jsx16("div", { className: cx4("ui-skel", className), "aria-hidden": "true", children: Array.from({ length: n }, (_, i) => /* @__PURE__ */ jsx16("span", { className: "ui-skel__bar m-skeleton", style: styleFor(i) }, i)) });
|
|
1310
1344
|
}
|
|
1311
1345
|
function SkeletonTable({ rows = 5, cols = 4, head = true }) {
|
|
1312
|
-
const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */
|
|
1346
|
+
const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */ jsx16("span", { className: "ui-skel__bar m-skeleton" }, i));
|
|
1313
1347
|
return /* @__PURE__ */ jsxs12(
|
|
1314
1348
|
"div",
|
|
1315
1349
|
{
|
|
@@ -1317,8 +1351,8 @@ function SkeletonTable({ rows = 5, cols = 4, head = true }) {
|
|
|
1317
1351
|
style: { "--skel-cols": Math.max(1, cols) },
|
|
1318
1352
|
"aria-hidden": "true",
|
|
1319
1353
|
children: [
|
|
1320
|
-
head && /* @__PURE__ */
|
|
1321
|
-
Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */
|
|
1354
|
+
head && /* @__PURE__ */ jsx16("div", { className: "ui-skel__row ui-skel__row--head", children: cells }),
|
|
1355
|
+
Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsx16("div", { className: "ui-skel__row", children: cells }, i))
|
|
1322
1356
|
]
|
|
1323
1357
|
}
|
|
1324
1358
|
);
|
|
@@ -1339,8 +1373,8 @@ function BusyRegion({
|
|
|
1339
1373
|
"aria-live": "polite",
|
|
1340
1374
|
"aria-busy": busy,
|
|
1341
1375
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1376
|
+
/* @__PURE__ */ jsx16("span", { className: "ui-sr", children: busy ? label : message }),
|
|
1377
|
+
/* @__PURE__ */ jsx16("div", { className: "ui-busy__body", children: busy ? placeholder ?? /* @__PURE__ */ jsx16(Skeleton, { lines: 3 }) : children })
|
|
1344
1378
|
]
|
|
1345
1379
|
}
|
|
1346
1380
|
);
|
|
@@ -1354,14 +1388,14 @@ function Denied({
|
|
|
1354
1388
|
children
|
|
1355
1389
|
}) {
|
|
1356
1390
|
return /* @__PURE__ */ jsxs12("div", { className: cx4("ui-denied", className), children: [
|
|
1357
|
-
/* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
sub && /* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx16("div", { className: "ui-denied__seal", children: /* @__PURE__ */ jsx16(Icon, { name: icon6 }) }),
|
|
1392
|
+
/* @__PURE__ */ jsx16("div", { className: "ui-denied__title", children: title }),
|
|
1393
|
+
sub && /* @__PURE__ */ jsx16("div", { className: "ui-denied__sub", children: sub }),
|
|
1360
1394
|
need && /* @__PURE__ */ jsxs12("div", { className: "ui-denied__need", children: [
|
|
1361
1395
|
"Needs ",
|
|
1362
|
-
/* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ jsx16("code", { className: "ui-code", children: need })
|
|
1363
1397
|
] }),
|
|
1364
|
-
children && /* @__PURE__ */
|
|
1398
|
+
children && /* @__PURE__ */ jsx16("div", { className: "ui-denied__actions", children })
|
|
1365
1399
|
] });
|
|
1366
1400
|
}
|
|
1367
1401
|
|
|
@@ -1375,10 +1409,10 @@ import {
|
|
|
1375
1409
|
useState as useState6
|
|
1376
1410
|
} from "react";
|
|
1377
1411
|
import { icon as icon3, dropdownMatch, dropdownFiltering } from "@apliteni/apliteni-ui";
|
|
1378
|
-
import { Fragment as Fragment5, jsx as
|
|
1412
|
+
import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1379
1413
|
var cx5 = (...a) => a.filter(Boolean).join(" ");
|
|
1380
1414
|
var isRow = (it) => Boolean(it) && it !== "---" && !it.separator;
|
|
1381
|
-
var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */
|
|
1415
|
+
var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */ jsx17(
|
|
1382
1416
|
"span",
|
|
1383
1417
|
{
|
|
1384
1418
|
className,
|
|
@@ -1391,7 +1425,7 @@ function RowBadge({ badge }) {
|
|
|
1391
1425
|
const given = typeof badge === "string" ? "" : badge.tone || "";
|
|
1392
1426
|
let tone = given || (/^live$/i.test(String(text2)) ? "live" : "neutral");
|
|
1393
1427
|
if (!given && tone === "neutral" && /^(?:off|unset|disabled|archive|archived)$/i.test(text2)) tone = "state";
|
|
1394
|
-
return /* @__PURE__ */
|
|
1428
|
+
return /* @__PURE__ */ jsx17("span", { className: `ui-dropdown__badge is-${tone}`, children: text2 });
|
|
1395
1429
|
}
|
|
1396
1430
|
var keyOf = (it) => it.value != null ? `v:${it.value}` : `l:${it.label}`;
|
|
1397
1431
|
var itemsIn = (panel) => Array.from(panel?.querySelectorAll("[data-dd-item]") ?? []).filter((el) => el.getAttribute("aria-disabled") !== "true" && !el.hidden);
|
|
@@ -1606,7 +1640,7 @@ function Dropdown({
|
|
|
1606
1640
|
};
|
|
1607
1641
|
function renderRow(entry, key) {
|
|
1608
1642
|
if (!isRow(entry)) {
|
|
1609
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ jsx17("div", { className: "ui-dropdown__sep", role: "separator", hidden: filtering || void 0 }, key);
|
|
1610
1644
|
}
|
|
1611
1645
|
const disabled = !!entry.disabled;
|
|
1612
1646
|
const selected = selectedOf(entry);
|
|
@@ -1629,18 +1663,18 @@ function Dropdown({
|
|
|
1629
1663
|
...sx ? { id: rowIds.get(entry), hidden: hiddenBy(entry) || void 0 } : null,
|
|
1630
1664
|
onClick: (e) => choose(entry, e),
|
|
1631
1665
|
children: /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1632
|
-
entry.icon && /* @__PURE__ */
|
|
1666
|
+
entry.icon && /* @__PURE__ */ jsx17(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
|
|
1633
1667
|
/* @__PURE__ */ jsxs13("span", { className: "ui-dropdown__main", children: [
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
entry.description && /* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx17("span", { className: "ui-dropdown__label", children: entry.label }),
|
|
1669
|
+
entry.description && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__desc", children: entry.description })
|
|
1636
1670
|
] }),
|
|
1637
|
-
entry.badge ? /* @__PURE__ */
|
|
1638
|
-
asOption && /* @__PURE__ */
|
|
1671
|
+
entry.badge ? /* @__PURE__ */ jsx17(RowBadge, { badge: entry.badge }) : null,
|
|
1672
|
+
asOption && /* @__PURE__ */ jsx17(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
|
|
1639
1673
|
] })
|
|
1640
1674
|
};
|
|
1641
|
-
if (row) return /* @__PURE__ */
|
|
1675
|
+
if (row) return /* @__PURE__ */ jsx17(Fragment4, { children: row(entry, props) }, key);
|
|
1642
1676
|
const Tag = asLink ? "a" : "div";
|
|
1643
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ jsx17(Tag, { ...props }, key);
|
|
1644
1678
|
}
|
|
1645
1679
|
const body = sections?.length ? sections.map((section, si) => {
|
|
1646
1680
|
const gone = filtering && !(section.items || []).some((it) => isRow(it) && !hiddenBy(it));
|
|
@@ -1652,7 +1686,7 @@ function Dropdown({
|
|
|
1652
1686
|
"aria-label": section.label || void 0,
|
|
1653
1687
|
hidden: gone || void 0,
|
|
1654
1688
|
children: [
|
|
1655
|
-
section.label && /* @__PURE__ */
|
|
1689
|
+
section.label && /* @__PURE__ */ jsx17("div", { className: "ui-dropdown__group", role: "presentation", children: section.label }),
|
|
1656
1690
|
(section.items || []).map((entry, i) => renderRow(entry, `s${si}-${i}`))
|
|
1657
1691
|
]
|
|
1658
1692
|
},
|
|
@@ -1661,8 +1695,8 @@ function Dropdown({
|
|
|
1661
1695
|
}) : (items || []).map((entry, i) => renderRow(entry, `i${i}`));
|
|
1662
1696
|
const cap = scroll && scroll !== true ? { maxHeight: typeof scroll === "number" ? `${scroll}px` : scroll } : void 0;
|
|
1663
1697
|
const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ jsx17("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
|
|
1699
|
+
/* @__PURE__ */ jsx17("span", { className: "ui-dropdown__none-hint", children: sx.hint })
|
|
1666
1700
|
] }) : null;
|
|
1667
1701
|
return /* @__PURE__ */ jsxs13("div", { className: cx5("ui-dropdown", open && "open"), id, ref: root, onKeyDown, children: [
|
|
1668
1702
|
/* @__PURE__ */ jsxs13(
|
|
@@ -1681,10 +1715,10 @@ function Dropdown({
|
|
|
1681
1715
|
},
|
|
1682
1716
|
children: [
|
|
1683
1717
|
triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1684
|
-
label && /* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */
|
|
1718
|
+
label && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__pre", children: label }),
|
|
1719
|
+
/* @__PURE__ */ jsx17("span", { className: "ui-dropdown__value", children: shown != null ? shown : placeholder })
|
|
1686
1720
|
] }),
|
|
1687
|
-
chevron && /* @__PURE__ */
|
|
1721
|
+
chevron && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
|
|
1688
1722
|
]
|
|
1689
1723
|
}
|
|
1690
1724
|
),
|
|
@@ -1710,8 +1744,8 @@ function Dropdown({
|
|
|
1710
1744
|
header,
|
|
1711
1745
|
sx ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1712
1746
|
/* @__PURE__ */ jsxs13("div", { className: "ui-dropdown__search", children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ jsx17(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
|
|
1748
|
+
/* @__PURE__ */ jsx17(
|
|
1715
1749
|
"input",
|
|
1716
1750
|
{
|
|
1717
1751
|
className: "ui-dropdown__search-input",
|
|
@@ -1735,8 +1769,8 @@ function Dropdown({
|
|
|
1735
1769
|
}
|
|
1736
1770
|
)
|
|
1737
1771
|
] }),
|
|
1738
|
-
/* @__PURE__ */
|
|
1739
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ jsx17("div", { className: "ui-dropdown__list", role: "listbox", id: listId, "aria-label": name, style: cap, children: body }),
|
|
1773
|
+
/* @__PURE__ */ jsx17(
|
|
1740
1774
|
"div",
|
|
1741
1775
|
{
|
|
1742
1776
|
className: "ui-dropdown__none",
|
|
@@ -1761,7 +1795,7 @@ function strip(o) {
|
|
|
1761
1795
|
}
|
|
1762
1796
|
|
|
1763
1797
|
// src/BackLink.tsx
|
|
1764
|
-
import { jsx as
|
|
1798
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1765
1799
|
var BARE = "Back";
|
|
1766
1800
|
var SCRIPTED = /^javascript:/i;
|
|
1767
1801
|
var LEADING = /^[\u0000-\u0020]+/;
|
|
@@ -1788,8 +1822,8 @@ function BackLink({
|
|
|
1788
1822
|
"aria-label": bare ? void 0 : `${BARE} to ${name}`,
|
|
1789
1823
|
...rest,
|
|
1790
1824
|
children: [
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ jsx18(Icon, { name: "chevronLeft" }),
|
|
1826
|
+
/* @__PURE__ */ jsx18("span", { className: "ui-back__label", children: bare ? BARE : name })
|
|
1793
1827
|
]
|
|
1794
1828
|
}
|
|
1795
1829
|
);
|
|
@@ -1797,41 +1831,41 @@ function BackLink({
|
|
|
1797
1831
|
|
|
1798
1832
|
// src/TableValues.tsx
|
|
1799
1833
|
import { formatNumericValue, formatDeltaValue } from "@apliteni/apliteni-ui";
|
|
1800
|
-
import { jsx as
|
|
1834
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1801
1835
|
function NumericValue(props) {
|
|
1802
1836
|
const value = formatNumericValue(props);
|
|
1803
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ jsx19("span", { children: /* @__PURE__ */ jsxs15("span", { className: "ui-value", "aria-label": value.missing, children: [
|
|
1804
1838
|
value.text,
|
|
1805
|
-
value.unit && /* @__PURE__ */
|
|
1839
|
+
value.unit && /* @__PURE__ */ jsx19("span", { className: "ui-value__unit", children: value.unit })
|
|
1806
1840
|
] }) });
|
|
1807
1841
|
}
|
|
1808
1842
|
function DeltaValue(props) {
|
|
1809
1843
|
const value = formatDeltaValue(props);
|
|
1810
|
-
return /* @__PURE__ */
|
|
1844
|
+
return /* @__PURE__ */ jsx19("span", { children: /* @__PURE__ */ jsx19("span", { className: value.className, "aria-describedby": value.basisId || void 0, children: value.text }) });
|
|
1811
1845
|
}
|
|
1812
1846
|
function RowIdentity({ symbol, name, logo, href }) {
|
|
1813
1847
|
const Tag = href ? "a" : "span";
|
|
1814
1848
|
return /* @__PURE__ */ jsxs15(Tag, { className: "ui-identity", href, children: [
|
|
1815
1849
|
/* @__PURE__ */ jsxs15("span", { className: "ui-identity__logo", "aria-hidden": "true", children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
logo && /* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ jsx19("span", { children: symbol.slice(0, 1) }),
|
|
1851
|
+
logo && /* @__PURE__ */ jsx19("img", { src: logo, alt: "", onLoad: (e) => {
|
|
1818
1852
|
e.currentTarget.hidden = false;
|
|
1819
1853
|
}, onError: (e) => {
|
|
1820
1854
|
e.currentTarget.hidden = true;
|
|
1821
1855
|
} })
|
|
1822
1856
|
] }),
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
1857
|
+
/* @__PURE__ */ jsx19("span", { className: "ui-identity__symbol", children: symbol }),
|
|
1858
|
+
/* @__PURE__ */ jsx19("span", { className: "ui-identity__name", children: name })
|
|
1825
1859
|
] });
|
|
1826
1860
|
}
|
|
1827
1861
|
|
|
1828
1862
|
// src/Segmented.tsx
|
|
1829
1863
|
import { segmentedNextIndex } from "@apliteni/apliteni-ui";
|
|
1830
|
-
import { jsx as
|
|
1864
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1831
1865
|
function Segmented({ options, value, onChange, label, appearance = "pill", disabled = false }) {
|
|
1832
1866
|
const enabled = options.filter((o) => !o.disabled);
|
|
1833
1867
|
const tabValue = enabled.some((o) => o.value === value) ? value : enabled[0]?.value;
|
|
1834
|
-
return /* @__PURE__ */
|
|
1868
|
+
return /* @__PURE__ */ jsx20("div", { className: `ui-seg${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx20(
|
|
1835
1869
|
"button",
|
|
1836
1870
|
{
|
|
1837
1871
|
type: "button",
|
|
@@ -1858,7 +1892,7 @@ function Segmented({ options, value, onChange, label, appearance = "pill", disab
|
|
|
1858
1892
|
|
|
1859
1893
|
// src/FilterBar.tsx
|
|
1860
1894
|
import { useRef as useRef11, useState as useState7 } from "react";
|
|
1861
|
-
import { jsx as
|
|
1895
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1862
1896
|
function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters", disabled = false, busy = false, onRemove, onClear, onChange }) {
|
|
1863
1897
|
const bar = useRef11(null);
|
|
1864
1898
|
const focused = useRef11(null);
|
|
@@ -1875,7 +1909,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1875
1909
|
focused.current = null;
|
|
1876
1910
|
(target || bar.current)?.focus();
|
|
1877
1911
|
});
|
|
1878
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsxs16(
|
|
1879
1913
|
"fieldset",
|
|
1880
1914
|
{
|
|
1881
1915
|
ref: bar,
|
|
@@ -1888,7 +1922,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1888
1922
|
if (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) focused.current = null;
|
|
1889
1923
|
},
|
|
1890
1924
|
children: [
|
|
1891
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ jsx21("legend", { className: "ui-filter-bar__legend", children: label }),
|
|
1892
1926
|
filters.map((filter, index) => /* @__PURE__ */ jsxs16(
|
|
1893
1927
|
"fieldset",
|
|
1894
1928
|
{
|
|
@@ -1899,8 +1933,8 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1899
1933
|
focused.current = { id: filter.id, index };
|
|
1900
1934
|
},
|
|
1901
1935
|
children: [
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx21("legend", { className: "ui-filter-bar__legend", children: filter.label }),
|
|
1937
|
+
/* @__PURE__ */ jsx21(
|
|
1904
1938
|
Dropdown,
|
|
1905
1939
|
{
|
|
1906
1940
|
label: filter.label,
|
|
@@ -1915,7 +1949,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1915
1949
|
}
|
|
1916
1950
|
}
|
|
1917
1951
|
),
|
|
1918
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ jsx21(
|
|
1919
1953
|
"button",
|
|
1920
1954
|
{
|
|
1921
1955
|
type: "button",
|
|
@@ -1932,9 +1966,9 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1932
1966
|
},
|
|
1933
1967
|
filter.id
|
|
1934
1968
|
)),
|
|
1935
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx21("span", { "data-filter-clear": "", onFocus: () => {
|
|
1936
1970
|
focused.current = { id: null, index: 0 };
|
|
1937
|
-
}, children: /* @__PURE__ */
|
|
1971
|
+
}, children: /* @__PURE__ */ jsx21(Button, { size: "sm", variant: "ghost", disabled: !filters.length, onClick: () => {
|
|
1938
1972
|
if (!blocked) onClear();
|
|
1939
1973
|
}, children: clearLabel }) })
|
|
1940
1974
|
]
|
|
@@ -1943,32 +1977,32 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
|
|
|
1943
1977
|
}
|
|
1944
1978
|
|
|
1945
1979
|
// src/KeyValueList.tsx
|
|
1946
|
-
import { jsx as
|
|
1980
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1947
1981
|
function detail({ value, redacted }) {
|
|
1948
1982
|
if (redacted) return /* @__PURE__ */ jsxs17("span", { className: "ui-kv__hidden", children: [
|
|
1949
|
-
/* @__PURE__ */
|
|
1983
|
+
/* @__PURE__ */ jsx22(Icon, { name: "eyeOff" }),
|
|
1950
1984
|
"Hidden"
|
|
1951
1985
|
] });
|
|
1952
1986
|
if (value == null) return "\u2014";
|
|
1953
1987
|
return typeof value === "boolean" ? String(value) : value;
|
|
1954
1988
|
}
|
|
1955
1989
|
function KeyValueList({ rows, columns = 1, className, ...rest }) {
|
|
1956
|
-
return /* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1990
|
+
return /* @__PURE__ */ jsx22("dl", { ...rest, className: ["ui-kv", columns === 2 && "ui-kv--two-columns", className].filter(Boolean).join(" "), children: rows.map((row, index) => /* @__PURE__ */ jsxs17("div", { className: "ui-drawer__row", children: [
|
|
1991
|
+
/* @__PURE__ */ jsx22("dt", { children: row.label }),
|
|
1992
|
+
/* @__PURE__ */ jsx22("dd", { children: detail(row) })
|
|
1959
1993
|
] }, index)) });
|
|
1960
1994
|
}
|
|
1961
1995
|
function DrawerSection({ title, headingLevel = 3, className, children, ...rest }) {
|
|
1962
1996
|
const Heading = `h${headingLevel}`;
|
|
1963
1997
|
return /* @__PURE__ */ jsxs17("section", { ...rest, className: ["ui-drawer__section", className].filter(Boolean).join(" "), children: [
|
|
1964
|
-
title != null && /* @__PURE__ */
|
|
1998
|
+
title != null && /* @__PURE__ */ jsx22(Heading, { className: "ui-drawer__section-title", children: title }),
|
|
1965
1999
|
children
|
|
1966
2000
|
] });
|
|
1967
2001
|
}
|
|
1968
2002
|
|
|
1969
2003
|
// src/Snippet.tsx
|
|
1970
2004
|
import { useEffect as useEffect7, useRef as useRef12, useState as useState8 } from "react";
|
|
1971
|
-
import { jsx as
|
|
2005
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1972
2006
|
function Snippet({ label = "shell", code = "", reveal = false, copyLabel = "Copy" }) {
|
|
1973
2007
|
const [status, setStatus] = useState8("idle");
|
|
1974
2008
|
const request = useRef12(0);
|
|
@@ -1995,20 +2029,20 @@ function Snippet({ label = "shell", code = "", reveal = false, copyLabel = "Copy
|
|
|
1995
2029
|
}
|
|
1996
2030
|
return /* @__PURE__ */ jsxs18("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
|
|
1997
2031
|
/* @__PURE__ */ jsxs18("div", { className: "ui-snippet__bar", children: [
|
|
1998
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsx23("span", { children: label }),
|
|
1999
2033
|
/* @__PURE__ */ jsxs18("button", { type: "button", className: "ui-snippet__copy", "aria-live": "polite", "aria-atomic": "true", onClick: copy, children: [
|
|
2000
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx23(Icon, { name: status === "copied" ? "check" : "copy" }),
|
|
2001
2035
|
status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : copyLabel
|
|
2002
2036
|
] })
|
|
2003
2037
|
] }),
|
|
2004
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx23("pre", { children: code })
|
|
2005
2039
|
] });
|
|
2006
2040
|
}
|
|
2007
2041
|
|
|
2008
2042
|
// src/Tabs.tsx
|
|
2009
2043
|
import { useEffect as useEffect8, useId as useId9, useRef as useRef13 } from "react";
|
|
2010
2044
|
import { playEntrance } from "@apliteni/apliteni-ui/motion";
|
|
2011
|
-
import { Fragment as Fragment6, jsx as
|
|
2045
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2012
2046
|
function Tabs({ items, value, onChange, label }) {
|
|
2013
2047
|
const id = useId9();
|
|
2014
2048
|
const previous = useRef13(value);
|
|
@@ -2019,7 +2053,7 @@ function Tabs({ items, value, onChange, label }) {
|
|
|
2019
2053
|
previous.current = value;
|
|
2020
2054
|
}, [value]);
|
|
2021
2055
|
return /* @__PURE__ */ jsxs19("div", { className: "ui-tabs", children: [
|
|
2022
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ jsx24("div", { className: "ui-tabs__list", role: "tablist", "aria-label": label, children: items.map((item, i) => /* @__PURE__ */ jsxs19(
|
|
2023
2057
|
"button",
|
|
2024
2058
|
{
|
|
2025
2059
|
type: "button",
|
|
@@ -2065,7 +2099,7 @@ function Tabs({ items, value, onChange, label }) {
|
|
|
2065
2099
|
},
|
|
2066
2100
|
item.value
|
|
2067
2101
|
)) }),
|
|
2068
|
-
/* @__PURE__ */
|
|
2102
|
+
/* @__PURE__ */ jsx24("div", { className: "ui-tabs__panels", children: items.map((item, i) => /* @__PURE__ */ jsx24(
|
|
2069
2103
|
"div",
|
|
2070
2104
|
{
|
|
2071
2105
|
className: "ui-tabs__panel",
|
|
@@ -2085,7 +2119,7 @@ function Tabs({ items, value, onChange, label }) {
|
|
|
2085
2119
|
// src/Timeline.tsx
|
|
2086
2120
|
import { useEffect as useEffect9, useRef as useRef14 } from "react";
|
|
2087
2121
|
import { playEntrance as playEntrance2, prefersReducedMotion } from "@apliteni/apliteni-ui/motion";
|
|
2088
|
-
import { jsx as
|
|
2122
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2089
2123
|
var kindIcons = { person: "user", rule: "bolt", reversal: "refresh" };
|
|
2090
2124
|
function Timeline({ events, className, ...rest }) {
|
|
2091
2125
|
const previousIds = useRef14(new Set(events.map((event) => event.id)));
|
|
@@ -2102,7 +2136,7 @@ function Timeline({ events, className, ...rest }) {
|
|
|
2102
2136
|
}
|
|
2103
2137
|
previousIds.current = new Set(events.map((event) => event.id));
|
|
2104
2138
|
}, [events]);
|
|
2105
|
-
return /* @__PURE__ */
|
|
2139
|
+
return /* @__PURE__ */ jsx25("ol", { ...rest, role: "list", className: ["ui-timeline", events.some((event) => event.kind) && "ui-timeline--kinds", className].filter(Boolean).join(" "), children: events.map((event, index) => /* @__PURE__ */ jsxs20(
|
|
2106
2140
|
"li",
|
|
2107
2141
|
{
|
|
2108
2142
|
className: "ui-timeline__event",
|
|
@@ -2111,20 +2145,20 @@ function Timeline({ events, className, ...rest }) {
|
|
|
2111
2145
|
else rows.current.delete(event.id);
|
|
2112
2146
|
},
|
|
2113
2147
|
children: [
|
|
2114
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ jsx25("span", { "aria-hidden": "true", className: [
|
|
2115
2149
|
"ui-timeline__marker",
|
|
2116
2150
|
event.kind && "ui-timeline__marker--kind",
|
|
2117
2151
|
event.kind === "reversal" && "ui-timeline__marker--reversal"
|
|
2118
|
-
].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */
|
|
2152
|
+
].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */ jsx25(Icon, { name: kindIcons[event.kind] }) }),
|
|
2119
2153
|
/* @__PURE__ */ jsxs20("div", { className: "ui-timeline__head", children: [
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ jsx25("span", { className: "ui-timeline__actor", children: event.actor }),
|
|
2155
|
+
/* @__PURE__ */ jsx25("time", { dateTime: event.dateTime, children: event.timestamp }),
|
|
2156
|
+
index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */ jsx25("span", { className: "ui-timeline__relative", children: event.relativeTimestamp })
|
|
2123
2157
|
] }),
|
|
2124
|
-
/* @__PURE__ */
|
|
2158
|
+
/* @__PURE__ */ jsx25("p", { className: "ui-timeline__description", children: event.description }),
|
|
2125
2159
|
(event.meta != null || event.undo) && /* @__PURE__ */ jsxs20("div", { className: "ui-timeline__meta", children: [
|
|
2126
|
-
event.meta != null && /* @__PURE__ */
|
|
2127
|
-
event.undo && /* @__PURE__ */
|
|
2160
|
+
event.meta != null && /* @__PURE__ */ jsx25("span", { children: event.meta }),
|
|
2161
|
+
event.undo && /* @__PURE__ */ jsx25(Button, { variant: "ghost", size: "xs", className: "ui-btn ui-btn--ghost ui-btn--xs ui-timeline__undo", "aria-label": event.undo.label, onClick: event.undo.onUndo, children: "Undo" })
|
|
2128
2162
|
] })
|
|
2129
2163
|
]
|
|
2130
2164
|
},
|
|
@@ -2133,9 +2167,9 @@ function Timeline({ events, className, ...rest }) {
|
|
|
2133
2167
|
}
|
|
2134
2168
|
|
|
2135
2169
|
// src/Field.tsx
|
|
2136
|
-
import { useEffect as useEffect10, useId as useId10, useRef as useRef15, useState as useState9 } from "react";
|
|
2170
|
+
import { forwardRef as forwardRef4, useEffect as useEffect10, useId as useId10, useRef as useRef15, useState as useState9 } from "react";
|
|
2137
2171
|
import { esc, icon as icon4 } from "@apliteni/apliteni-ui";
|
|
2138
|
-
import { jsx as
|
|
2172
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2139
2173
|
function messages(id, hint, error) {
|
|
2140
2174
|
return [error && `${id}-error`, hint && `${id}-hint`].filter(Boolean).join(" ") || void 0;
|
|
2141
2175
|
}
|
|
@@ -2143,10 +2177,10 @@ function Frame({ id, label, hint, error, required, children }) {
|
|
|
2143
2177
|
return /* @__PURE__ */ jsxs21("div", { className: "ui-field", children: [
|
|
2144
2178
|
/* @__PURE__ */ jsxs21("label", { className: "ui-field__label", htmlFor: id, children: [
|
|
2145
2179
|
label,
|
|
2146
|
-
required && /* @__PURE__ */
|
|
2180
|
+
required && /* @__PURE__ */ jsx26("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
|
|
2147
2181
|
] }),
|
|
2148
2182
|
children,
|
|
2149
|
-
error && /* @__PURE__ */
|
|
2183
|
+
error && /* @__PURE__ */ jsx26(
|
|
2150
2184
|
"div",
|
|
2151
2185
|
{
|
|
2152
2186
|
id: `${id}-error`,
|
|
@@ -2155,19 +2189,25 @@ function Frame({ id, label, hint, error, required, children }) {
|
|
|
2155
2189
|
dangerouslySetInnerHTML: { __html: icon4("alert") + esc(error) }
|
|
2156
2190
|
}
|
|
2157
2191
|
),
|
|
2158
|
-
hint && /* @__PURE__ */
|
|
2192
|
+
hint && /* @__PURE__ */ jsx26("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
|
|
2159
2193
|
] });
|
|
2160
2194
|
}
|
|
2161
2195
|
function wiring(id, hint, error) {
|
|
2162
2196
|
return { id, "aria-describedby": messages(id, hint, error), "aria-invalid": error ? true : void 0 };
|
|
2163
2197
|
}
|
|
2164
|
-
function
|
|
2198
|
+
function Field({ id: suppliedId, label, hint, error, required, children }) {
|
|
2199
|
+
const generatedId = useId10();
|
|
2200
|
+
const id = suppliedId ?? generatedId;
|
|
2201
|
+
return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: children({ ...wiring(id, hint, error), required }) });
|
|
2202
|
+
}
|
|
2203
|
+
var TextField = forwardRef4(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph, className = "", ...props }, ref) {
|
|
2165
2204
|
const id = useId10();
|
|
2166
2205
|
const hasUnit = type === "number" && !!unit;
|
|
2167
2206
|
const describedBy = [messages(id, hint, error), hasUnit ? `${id}-unit` : ""].filter(Boolean).join(" ") || void 0;
|
|
2168
|
-
const control = /* @__PURE__ */
|
|
2207
|
+
const control = /* @__PURE__ */ jsx26(
|
|
2169
2208
|
"input",
|
|
2170
2209
|
{
|
|
2210
|
+
ref,
|
|
2171
2211
|
...props,
|
|
2172
2212
|
...wiring(id, hint, error),
|
|
2173
2213
|
required,
|
|
@@ -2177,14 +2217,19 @@ function TextField({ label, hint, error, required, type = "text", unit, classNam
|
|
|
2177
2217
|
className: `ui-input${error ? " is-invalid" : ""} ${className}`
|
|
2178
2218
|
}
|
|
2179
2219
|
);
|
|
2180
|
-
|
|
2220
|
+
const unitSpan = hasUnit ? /* @__PURE__ */ jsx26("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
|
|
2221
|
+
return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: glyph ? /* @__PURE__ */ jsxs21("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
|
|
2222
|
+
/* @__PURE__ */ jsx26("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon4(glyph) } }),
|
|
2223
|
+
control,
|
|
2224
|
+
unitSpan
|
|
2225
|
+
] }) : hasUnit ? /* @__PURE__ */ jsxs21("div", { className: "ui-field-number", children: [
|
|
2181
2226
|
control,
|
|
2182
|
-
|
|
2227
|
+
unitSpan
|
|
2183
2228
|
] }) : control });
|
|
2184
|
-
}
|
|
2229
|
+
});
|
|
2185
2230
|
function TextArea({ label, hint, error, required, className = "", ...props }) {
|
|
2186
2231
|
const id = useId10();
|
|
2187
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx26(
|
|
2188
2233
|
"textarea",
|
|
2189
2234
|
{
|
|
2190
2235
|
rows: 4,
|
|
@@ -2197,7 +2242,7 @@ function TextArea({ label, hint, error, required, className = "", ...props }) {
|
|
|
2197
2242
|
}
|
|
2198
2243
|
function SelectField({ label, hint, error, required, className = "", children, ...props }) {
|
|
2199
2244
|
const id = useId10();
|
|
2200
|
-
return /* @__PURE__ */
|
|
2245
|
+
return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx26(
|
|
2201
2246
|
"select",
|
|
2202
2247
|
{
|
|
2203
2248
|
...props,
|
|
@@ -2226,7 +2271,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
|
|
|
2226
2271
|
setFile(next);
|
|
2227
2272
|
onFileChange?.(next);
|
|
2228
2273
|
};
|
|
2229
|
-
return /* @__PURE__ */
|
|
2274
|
+
return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs21(
|
|
2230
2275
|
"div",
|
|
2231
2276
|
{
|
|
2232
2277
|
className: `ui-file${dragging && !disabled ? " is-dragging" : ""}${file ? " has-file" : ""}${error ? " is-invalid" : ""}${disabled ? " is-disabled" : ""}`,
|
|
@@ -2247,12 +2292,12 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
|
|
|
2247
2292
|
update(transfer.files[0]);
|
|
2248
2293
|
},
|
|
2249
2294
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2252
|
-
/* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ jsx26("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx26(Icon, { name: "upload" }) }),
|
|
2296
|
+
/* @__PURE__ */ jsx26("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
|
|
2297
|
+
/* @__PURE__ */ jsx26("div", { children: "or choose one from your device" }),
|
|
2253
2298
|
/* @__PURE__ */ jsxs21("span", { className: "ui-file__choose", children: [
|
|
2254
|
-
/* @__PURE__ */
|
|
2255
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ jsx26("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
|
|
2300
|
+
/* @__PURE__ */ jsx26(
|
|
2256
2301
|
"input",
|
|
2257
2302
|
{
|
|
2258
2303
|
...props,
|
|
@@ -2274,7 +2319,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
|
|
|
2274
2319
|
// src/Toast.tsx
|
|
2275
2320
|
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext2, useEffect as useEffect11, useLayoutEffect as useLayoutEffect4, useRef as useRef16, useState as useState10 } from "react";
|
|
2276
2321
|
import { createPortal as createPortal4 } from "react-dom";
|
|
2277
|
-
import { jsx as
|
|
2322
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2278
2323
|
var Context = createContext2(null);
|
|
2279
2324
|
var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
|
|
2280
2325
|
function useToast() {
|
|
@@ -2334,12 +2379,12 @@ function Notice({ notice, remove }) {
|
|
|
2334
2379
|
if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
|
|
2335
2380
|
},
|
|
2336
2381
|
children: [
|
|
2337
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ jsx27("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx27(Icon, { name: glyphs[tone] }) }),
|
|
2338
2383
|
/* @__PURE__ */ jsxs22("div", { className: "ui-toast__body", children: [
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
notice.text && /* @__PURE__ */
|
|
2384
|
+
/* @__PURE__ */ jsx27("div", { className: "ui-toast__title", children: notice.title }),
|
|
2385
|
+
notice.text && /* @__PURE__ */ jsx27("div", { className: "ui-toast__text", children: notice.text })
|
|
2341
2386
|
] }),
|
|
2342
|
-
notice.action && /* @__PURE__ */
|
|
2387
|
+
notice.action && /* @__PURE__ */ jsx27(
|
|
2343
2388
|
"button",
|
|
2344
2389
|
{
|
|
2345
2390
|
type: "button",
|
|
@@ -2354,8 +2399,8 @@ function Notice({ notice, remove }) {
|
|
|
2354
2399
|
children: notice.action.label
|
|
2355
2400
|
}
|
|
2356
2401
|
),
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
!notice.action && /* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx27("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx27(Icon, { name: "x" }) }),
|
|
2403
|
+
!notice.action && /* @__PURE__ */ jsx27(
|
|
2359
2404
|
"span",
|
|
2360
2405
|
{
|
|
2361
2406
|
className: "ui-toast__timer is-running",
|
|
@@ -2400,7 +2445,7 @@ function Toast({ children }) {
|
|
|
2400
2445
|
return /* @__PURE__ */ jsxs22(Context.Provider, { value: push, children: [
|
|
2401
2446
|
children,
|
|
2402
2447
|
typeof document !== "undefined" && createPortal4(
|
|
2403
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ jsx27("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx27(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
|
|
2404
2449
|
document.body
|
|
2405
2450
|
)
|
|
2406
2451
|
] });
|
|
@@ -2409,7 +2454,7 @@ function Toast({ children }) {
|
|
|
2409
2454
|
// src/AppShell.tsx
|
|
2410
2455
|
import { useEffect as useEffect12, useId as useId11, useState as useState11 } from "react";
|
|
2411
2456
|
import { applyTheme, paletteHotkey, prism, railCollapsed, themeIcon, themeName } from "@apliteni/apliteni-ui";
|
|
2412
|
-
import { Fragment as Fragment7, jsx as
|
|
2457
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2413
2458
|
var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
|
|
2414
2459
|
function AppShell({
|
|
2415
2460
|
sections,
|
|
@@ -2481,12 +2526,12 @@ function AppShell({
|
|
|
2481
2526
|
if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMore(false);
|
|
2482
2527
|
},
|
|
2483
2528
|
children: /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
2484
|
-
/* @__PURE__ */
|
|
2485
|
-
/* @__PURE__ */
|
|
2486
|
-
section.count != null && /* @__PURE__ */
|
|
2529
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx28(Icon, { name: section.icon }) }),
|
|
2530
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: section.label }),
|
|
2531
|
+
section.count != null && /* @__PURE__ */ jsx28("span", { className: "ui-nav__badge", children: section.count })
|
|
2487
2532
|
] })
|
|
2488
2533
|
};
|
|
2489
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ jsx28("li", { children: renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx28("a", { ...linkProps }) }, section.href);
|
|
2490
2535
|
});
|
|
2491
2536
|
const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
|
|
2492
2537
|
const visible = sections.length > 4 ? sections.slice(0, 3) : sections;
|
|
@@ -2494,30 +2539,30 @@ function AppShell({
|
|
|
2494
2539
|
const initials = account.name.trim().split(/\s+/).map((part) => part[0]).slice(0, 2).join("");
|
|
2495
2540
|
return /* @__PURE__ */ jsxs23("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
|
|
2496
2541
|
/* @__PURE__ */ jsxs23("div", { className: "ui-app__rail", children: [
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
brand ?? /* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ jsx28("div", { className: "ui-app__head", children: /* @__PURE__ */ jsxs23("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
|
|
2543
|
+
brand ?? /* @__PURE__ */ jsx28("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
|
|
2544
|
+
/* @__PURE__ */ jsx28("span", { children: word })
|
|
2500
2545
|
] }) }),
|
|
2501
|
-
/* @__PURE__ */
|
|
2502
|
-
/* @__PURE__ */
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
/* @__PURE__ */
|
|
2505
|
-
/* @__PURE__ */
|
|
2546
|
+
/* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-nav--side", "aria-label": "Sections", children: /* @__PURE__ */ jsx28("ul", { className: "ui-nav__list", children: links(sections) }) }),
|
|
2547
|
+
/* @__PURE__ */ jsx28("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx28("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs23("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
|
|
2548
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs23("svg", { className: "ui-icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
2549
|
+
/* @__PURE__ */ jsx28("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2550
|
+
/* @__PURE__ */ jsx28("path", { className: "ui-app__fold-seam", d: "M9 3v18" })
|
|
2506
2551
|
] }) }),
|
|
2507
|
-
/* @__PURE__ */
|
|
2552
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: foldLabel })
|
|
2508
2553
|
] }) }) })
|
|
2509
2554
|
] }),
|
|
2510
2555
|
/* @__PURE__ */ jsxs23("div", { className: "ui-app__well", children: [
|
|
2511
2556
|
/* @__PURE__ */ jsxs23("header", { className: "ui-app__bar", children: [
|
|
2512
2557
|
/* @__PURE__ */ jsxs23("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx28(Icon, { name: "search" }) }),
|
|
2559
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-app__search-txt", children: "Search or run a command\u2026" }),
|
|
2560
|
+
/* @__PURE__ */ jsx28("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
|
|
2516
2561
|
] }),
|
|
2517
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-app__bar-gap" }),
|
|
2518
2563
|
bandControl,
|
|
2519
|
-
/* @__PURE__ */
|
|
2520
|
-
/* @__PURE__ */
|
|
2564
|
+
/* @__PURE__ */ jsx28("button", { type: "button", className: "toggle", "aria-label": themeName(theme), title: themeName(theme), onClick: () => applyTheme(theme === "light" ? "dark" : "light"), children: /* @__PURE__ */ jsx28("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) }),
|
|
2565
|
+
/* @__PURE__ */ jsx28("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx28(
|
|
2521
2566
|
Dropdown,
|
|
2522
2567
|
{
|
|
2523
2568
|
variant: "menu",
|
|
@@ -2526,10 +2571,10 @@ function AppShell({
|
|
|
2526
2571
|
ariaLabel: `Signed in as ${account.name}, ${account.email}`,
|
|
2527
2572
|
triggerClass: "ui-app__user-trigger",
|
|
2528
2573
|
panelClass: "ui-app__user-panel",
|
|
2529
|
-
triggerContent: /* @__PURE__ */
|
|
2574
|
+
triggerContent: /* @__PURE__ */ jsx28("span", { className: "ui-app__av", "aria-hidden": "true", children: initials }),
|
|
2530
2575
|
header: /* @__PURE__ */ jsxs23("div", { className: "ui-dropdown__head", children: [
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsx28("b", { children: account.name }),
|
|
2577
|
+
/* @__PURE__ */ jsx28("span", { children: account.email })
|
|
2533
2578
|
] }),
|
|
2534
2579
|
items: [{ label: "Sign out", icon: "logout", danger: true }],
|
|
2535
2580
|
onSelect: onSignOut
|
|
@@ -2537,16 +2582,16 @@ function AppShell({
|
|
|
2537
2582
|
) })
|
|
2538
2583
|
] }),
|
|
2539
2584
|
/* @__PURE__ */ jsxs23("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
|
|
2540
|
-
back && /* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
lede && /* @__PURE__ */
|
|
2543
|
-
actions && /* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2585
|
+
back && /* @__PURE__ */ jsx28(BackLink, { ...back }),
|
|
2586
|
+
/* @__PURE__ */ jsx28("h1", { children: title }),
|
|
2587
|
+
lede && /* @__PURE__ */ jsx28("p", { className: "ui-app__sub", children: lede }),
|
|
2588
|
+
actions && /* @__PURE__ */ jsx28("div", { className: "ui-react-app__actions", children: actions }),
|
|
2589
|
+
/* @__PURE__ */ jsx28("div", { className: "ui-app__body", children })
|
|
2545
2590
|
] })
|
|
2546
2591
|
] }),
|
|
2547
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-react-app__bottom", "aria-label": "Sections on mobile", children: /* @__PURE__ */ jsxs23("ul", { className: "ui-nav__list", children: [
|
|
2548
2593
|
links(visible),
|
|
2549
|
-
remaining.length > 0 && /* @__PURE__ */
|
|
2594
|
+
remaining.length > 0 && /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsxs23(
|
|
2550
2595
|
"button",
|
|
2551
2596
|
{
|
|
2552
2597
|
type: "button",
|
|
@@ -2555,20 +2600,20 @@ function AppShell({
|
|
|
2555
2600
|
"aria-expanded": more,
|
|
2556
2601
|
onClick: () => setMore(true),
|
|
2557
2602
|
children: [
|
|
2558
|
-
/* @__PURE__ */
|
|
2559
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx28(Icon, { name: "moreHorizontal" }) }),
|
|
2604
|
+
/* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: "More" })
|
|
2560
2605
|
]
|
|
2561
2606
|
}
|
|
2562
2607
|
) })
|
|
2563
2608
|
] }) }),
|
|
2564
|
-
/* @__PURE__ */
|
|
2565
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ jsx28(Drawer, { open: more, onClose: () => setMore(false), title: "More sections", side: "bottom", children: /* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-nav--side", "aria-label": "More sections", children: /* @__PURE__ */ jsx28("ul", { className: "ui-nav__list", children: links(remaining) }) }) }),
|
|
2610
|
+
/* @__PURE__ */ jsx28(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
|
|
2566
2611
|
] });
|
|
2567
2612
|
}
|
|
2568
2613
|
|
|
2569
2614
|
// src/EmptyState.tsx
|
|
2570
2615
|
import { icon as kitIcon2, illo } from "@apliteni/apliteni-ui";
|
|
2571
|
-
import { jsx as
|
|
2616
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2572
2617
|
var cases = {
|
|
2573
2618
|
"first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
|
|
2574
2619
|
"no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
|
|
@@ -2581,17 +2626,17 @@ function EmptyState({ variant = "first-run", title, sub, icon: icon6, art, actio
|
|
|
2581
2626
|
const guidance = sub ?? preset.sub;
|
|
2582
2627
|
const glyph = icon6 ?? preset.icon;
|
|
2583
2628
|
return /* @__PURE__ */ jsxs24("div", { className: "ui-empty", children: [
|
|
2584
|
-
art ? typeof art === "string" ? /* @__PURE__ */
|
|
2585
|
-
heading && /* @__PURE__ */
|
|
2586
|
-
guidance && /* @__PURE__ */
|
|
2587
|
-
actions && /* @__PURE__ */
|
|
2629
|
+
art ? typeof art === "string" ? /* @__PURE__ */ jsx29("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx29("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx29("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
|
|
2630
|
+
heading && /* @__PURE__ */ jsx29("div", { className: "ui-empty__title", children: heading }),
|
|
2631
|
+
guidance && /* @__PURE__ */ jsx29("div", { className: "ui-empty__sub", children: guidance }),
|
|
2632
|
+
actions && /* @__PURE__ */ jsx29("div", { className: "ui-empty__actions", children: actions })
|
|
2588
2633
|
] });
|
|
2589
2634
|
}
|
|
2590
2635
|
|
|
2591
2636
|
// src/ThemeToggle.tsx
|
|
2592
2637
|
import { useSyncExternalStore } from "react";
|
|
2593
2638
|
import { icon as icon5 } from "@apliteni/apliteni-ui";
|
|
2594
|
-
import { jsx as
|
|
2639
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2595
2640
|
var STORAGE_KEY = "apliteni-strategy-theme";
|
|
2596
2641
|
var CHOICE_EVENT = "apliteni-theme-choice";
|
|
2597
2642
|
var THEME_INIT_SCRIPT = `(()=>{let t;try{t=localStorage.getItem('apliteni-strategy-theme')}catch{}document.documentElement.setAttribute('data-theme',t==='dark'||t==='light'?t:window.matchMedia?.('(prefers-color-scheme: light)').matches?'light':'dark')})()`;
|
|
@@ -2649,7 +2694,7 @@ function ThemeToggle({ labelled = false }) {
|
|
|
2649
2694
|
}
|
|
2650
2695
|
window.dispatchEvent(new Event(CHOICE_EVENT));
|
|
2651
2696
|
};
|
|
2652
|
-
const button = /* @__PURE__ */
|
|
2697
|
+
const button = /* @__PURE__ */ jsx30("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx30("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon5(theme === "auto" ? "monitor" : theme === "light" ? "sun" : "moon") } }) });
|
|
2653
2698
|
return labelled ? /* @__PURE__ */ jsxs25("span", { className: "ui-theme-toggle", children: [
|
|
2654
2699
|
button,
|
|
2655
2700
|
/* @__PURE__ */ jsxs25("span", { children: [
|
|
@@ -2680,6 +2725,7 @@ export {
|
|
|
2680
2725
|
DrawerSection,
|
|
2681
2726
|
Dropdown,
|
|
2682
2727
|
EmptyState,
|
|
2728
|
+
Field,
|
|
2683
2729
|
FileField,
|
|
2684
2730
|
FilterBar,
|
|
2685
2731
|
Icon,
|
|
@@ -2688,6 +2734,7 @@ export {
|
|
|
2688
2734
|
NumericValue,
|
|
2689
2735
|
PAGE_SIZES,
|
|
2690
2736
|
Pagination,
|
|
2737
|
+
Pill,
|
|
2691
2738
|
RowIdentity,
|
|
2692
2739
|
Segmented,
|
|
2693
2740
|
SelectField,
|
|
@@ -2695,6 +2742,7 @@ export {
|
|
|
2695
2742
|
SkeletonTable,
|
|
2696
2743
|
Snippet,
|
|
2697
2744
|
StatBand,
|
|
2745
|
+
StatusDot,
|
|
2698
2746
|
THEME_INIT_SCRIPT,
|
|
2699
2747
|
Tabs,
|
|
2700
2748
|
TextArea,
|