@cascivo/react 0.3.8 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +6 -3
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.module.js +7 -7
- package/dist/avatar/avatar.js +3 -3
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +46 -46
- package/dist/combobox/combobox.module.js +15 -15
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +7 -5
- package/dist/data-table/data-table.module.js +29 -29
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.module.js +19 -19
- package/dist/date-range-picker/date-range-picker.js +1 -0
- package/dist/dock/dock.js +21 -19
- package/dist/fab/fab.js +1 -1
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.module.js +14 -14
- package/dist/header/header.js +2 -2
- package/dist/index.d.ts +50 -2
- package/dist/log-viewer/log-viewer.css +1 -1
- package/dist/log-viewer/log-viewer.module.js +12 -12
- package/dist/menu/menu.css +1 -1
- package/dist/menu/menu.module.js +4 -4
- package/dist/multi-select/multi-select.js +3 -2
- package/dist/password-input/password-input.js +4 -0
- package/dist/popover/popover.css +1 -1
- package/dist/popover/popover.module.js +2 -2
- package/dist/radial-progress/radial-progress.js +13 -10
- package/dist/shell-header/shell-header.js +5 -4
- package/dist/side-nav/side-nav.js +4 -4
- package/dist/stat/stat.css +1 -1
- package/dist/stat/stat.module.js +6 -6
- package/dist/steps/steps.css +1 -1
- package/dist/steps/steps.js +19 -16
- package/dist/steps/steps.module.js +4 -4
- package/dist/styles.css +13 -13
- package/dist/swipe-item/swipe-item.js +2 -2
- package/dist/switcher/switcher.css +1 -1
- package/dist/switcher/switcher.js +3 -2
- package/dist/switcher/switcher.module.js +4 -4
- package/dist/tag/tag.css +1 -1
- package/dist/tag/tag.module.js +2 -2
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.js +1 -0
- package/dist/tags-input/tags-input.module.js +4 -4
- package/package.json +3 -3
- package/readme.body.md +6 -3
package/dist/dock/dock.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./dock.module.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useSignals as t } from "@cascivo/core";
|
|
5
|
+
import { builtin as n, t as r } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
7
|
//#region ../components/src/dock/dock.tsx
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
"aria-label":
|
|
9
|
-
className: [e.dock,
|
|
10
|
-
children:
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
8
|
+
function o({ items: o, activeIndex: s, className: c, ariaLabel: l }) {
|
|
9
|
+
return t(), /* @__PURE__ */ i("nav", {
|
|
10
|
+
"aria-label": l ?? r(n.dock.nav),
|
|
11
|
+
className: [e.dock, c].filter(Boolean).join(" "),
|
|
12
|
+
children: o.map((t, n) => {
|
|
13
|
+
let r = n === s;
|
|
14
|
+
return /* @__PURE__ */ a(t.href ? "a" : "button", {
|
|
13
15
|
className: e.item,
|
|
14
|
-
"data-active":
|
|
15
|
-
"aria-current":
|
|
16
|
-
...
|
|
17
|
-
type:
|
|
18
|
-
onClick:
|
|
19
|
-
children: [/* @__PURE__ */
|
|
16
|
+
"data-active": r || void 0,
|
|
17
|
+
"aria-current": r ? "page" : void 0,
|
|
18
|
+
...t.href ? { href: t.href } : {},
|
|
19
|
+
type: t.href ? void 0 : "button",
|
|
20
|
+
onClick: t.onClick,
|
|
21
|
+
children: [/* @__PURE__ */ i("span", {
|
|
20
22
|
className: e.icon,
|
|
21
23
|
"aria-hidden": "true",
|
|
22
|
-
children:
|
|
23
|
-
}), /* @__PURE__ */
|
|
24
|
+
children: t.icon
|
|
25
|
+
}), /* @__PURE__ */ i("span", {
|
|
24
26
|
className: e.label,
|
|
25
|
-
children:
|
|
27
|
+
children: t.label
|
|
26
28
|
})]
|
|
27
|
-
},
|
|
29
|
+
}, n);
|
|
28
30
|
})
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
//#endregion
|
|
32
|
-
export {
|
|
34
|
+
export { o as Dock };
|
package/dist/fab/fab.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._uploader_bw6tn_2{gap:var(--cascivo-space-2);flex-direction:column;inline-size:100%;display:flex}._label_bw6tn_9{font-size:var(--cascivo-font-size-sm);font-weight:var(--cascivo-font-weight-medium);color:var(--cascivo-color-text)}._input_bw6tn_15{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._zone_bw6tn_24{padding:var(--cascivo-space-8) var(--cascivo-space-4);border:2px dashed var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-sm);cursor:pointer;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), background var(--cascivo-duration-150) var(--cascivo-ease-out);text-align:center;justify-content:center;align-items:center;inline-size:100%;display:flex}._zone_bw6tn_24:hover:not(:disabled),._zone_bw6tn_24[data-state=dragover]{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent-subtle)}._zone_bw6tn_24:disabled{opacity:.5;cursor:not-allowed}._hint_bw6tn_57{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-text-muted)}._list_bw6tn_62{gap:var(--cascivo-space-2);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._file_bw6tn_71{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);font-size:var(--cascivo-font-size-sm);grid-template-columns:auto 1fr auto auto;grid-template-areas:"status name size remove""status error error error";display:grid}._file_bw6tn_71[data-state=error]{border-color:var(--cascivo-color-danger)}._status_bw6tn_88{grid-area:status;align-items:center;display:flex}._glyph-complete_bw6tn_94{color:var(--cascivo-color-success-foreground)}._glyph-error_bw6tn_98{color:var(--cascivo-color-danger)}._name_bw6tn_102{text-overflow:ellipsis;white-space:nowrap;grid-area:name;overflow:hidden}._size_bw6tn_109{color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-xs);grid-area:size}._remove_bw6tn_115{padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:var(--cascivo-color-text-muted);cursor:pointer;font-size:var(--cascivo-font-size-xs);background:0 0;border:none;grid-area:remove;justify-content:center;align-items:center;line-height:1;display:flex}._remove_bw6tn_115:hover{color:var(--cascivo-color-danger);background:var(--cascivo-color-danger-subtle)}._error-message_bw6tn_135{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-danger);grid-area:error}}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import './file-uploader.css';
|
|
4
4
|
var e = {
|
|
5
|
-
uploader: "
|
|
6
|
-
label: "
|
|
7
|
-
input: "
|
|
8
|
-
zone: "
|
|
9
|
-
hint: "
|
|
10
|
-
list: "
|
|
11
|
-
file: "
|
|
12
|
-
status: "
|
|
13
|
-
"glyph-complete": "_glyph-
|
|
14
|
-
"glyph-error": "_glyph-
|
|
15
|
-
name: "
|
|
16
|
-
size: "
|
|
17
|
-
remove: "
|
|
18
|
-
"error-message": "_error-
|
|
5
|
+
uploader: "_uploader_bw6tn_2",
|
|
6
|
+
label: "_label_bw6tn_9",
|
|
7
|
+
input: "_input_bw6tn_15",
|
|
8
|
+
zone: "_zone_bw6tn_24",
|
|
9
|
+
hint: "_hint_bw6tn_57",
|
|
10
|
+
list: "_list_bw6tn_62",
|
|
11
|
+
file: "_file_bw6tn_71",
|
|
12
|
+
status: "_status_bw6tn_88",
|
|
13
|
+
"glyph-complete": "_glyph-complete_bw6tn_94",
|
|
14
|
+
"glyph-error": "_glyph-error_bw6tn_98",
|
|
15
|
+
name: "_name_bw6tn_102",
|
|
16
|
+
size: "_size_bw6tn_109",
|
|
17
|
+
remove: "_remove_bw6tn_115",
|
|
18
|
+
"error-message": "_error-message_bw6tn_135"
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
21
|
export { e as default };
|
package/dist/header/header.js
CHANGED
|
@@ -23,13 +23,13 @@ function s({ brand: s, links: c, actions: l, sticky: u = !1, labels: d, classNam
|
|
|
23
23
|
className: e.nav,
|
|
24
24
|
children: /* @__PURE__ */ a("ul", {
|
|
25
25
|
className: e.list,
|
|
26
|
-
children: c.map((t) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("a", {
|
|
26
|
+
children: c.map((t, n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("a", {
|
|
27
27
|
href: t.href,
|
|
28
28
|
"aria-current": t.active ? "page" : void 0,
|
|
29
29
|
"data-state": t.active ? "active" : void 0,
|
|
30
30
|
className: e.link,
|
|
31
31
|
children: t.label
|
|
32
|
-
}) }, t.href))
|
|
32
|
+
}) }, t.id ?? `${n}-${t.href}`))
|
|
33
33
|
})
|
|
34
34
|
}),
|
|
35
35
|
/* @__PURE__ */ a("div", { className: e.spacer }),
|
package/dist/index.d.ts
CHANGED
|
@@ -332,6 +332,12 @@ interface ToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onC
|
|
|
332
332
|
checked?: boolean;
|
|
333
333
|
defaultChecked?: boolean;
|
|
334
334
|
onChange?: (checked: boolean) => void;
|
|
335
|
+
/**
|
|
336
|
+
* Renders a **visible** text label beside the switch that also becomes its
|
|
337
|
+
* accessible name. When a visible heading already labels the control, omit
|
|
338
|
+
* `label` (it would duplicate that text) and pass `aria-label` instead —
|
|
339
|
+
* `aria-label` is forwarded to the underlying button.
|
|
340
|
+
*/
|
|
335
341
|
label?: string;
|
|
336
342
|
size?: 'sm' | 'md';
|
|
337
343
|
}
|
|
@@ -406,6 +412,18 @@ declare function ToastProvider({
|
|
|
406
412
|
}: {
|
|
407
413
|
children: ReactNode;
|
|
408
414
|
}): import("react").JSX.Element;
|
|
415
|
+
/**
|
|
416
|
+
* Returns `{ toast }` — an object, not a callable. Destructure it and call
|
|
417
|
+
* `toast(...)`:
|
|
418
|
+
*
|
|
419
|
+
* ```tsx
|
|
420
|
+
* const { toast } = useToast()
|
|
421
|
+
* toast({ title: 'Saved' })
|
|
422
|
+
* ```
|
|
423
|
+
*
|
|
424
|
+
* (`useToast()(...)` is a type error — the hook returns the namespace object so
|
|
425
|
+
* more helpers can be added without changing its shape.)
|
|
426
|
+
*/
|
|
409
427
|
declare function useToast(): {
|
|
410
428
|
toast: typeof enqueue;
|
|
411
429
|
};
|
|
@@ -590,6 +608,8 @@ interface UseTocFromRegionOptions {
|
|
|
590
608
|
*/
|
|
591
609
|
declare function useTocFromRegion(ref: RefObject<HTMLElement | null>, options?: UseTocFromRegionOptions): Signal<TocItem[]>;
|
|
592
610
|
interface HeaderLink {
|
|
611
|
+
/** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
|
|
612
|
+
id?: string;
|
|
593
613
|
label: string;
|
|
594
614
|
href: string;
|
|
595
615
|
active?: boolean;
|
|
@@ -616,6 +636,8 @@ declare function Header({
|
|
|
616
636
|
type SideNavTone = 'default' | 'danger' | 'warning' | 'success';
|
|
617
637
|
/** A selectable/navigable sub-item (link when `href` is set, action when `onSelect` is set). */
|
|
618
638
|
interface SideNavLinkSubItem {
|
|
639
|
+
/** Stable React key. Provide when `label`/`href` may repeat (e.g. placeholder `#` links). */
|
|
640
|
+
id?: string;
|
|
619
641
|
label: string;
|
|
620
642
|
href?: string;
|
|
621
643
|
icon?: ReactNode;
|
|
@@ -633,6 +655,8 @@ type SideNavSubItem = SideNavLinkSubItem | {
|
|
|
633
655
|
label: string;
|
|
634
656
|
};
|
|
635
657
|
interface SideNavItem {
|
|
658
|
+
/** Stable React key. Provide when `label`/`href` may repeat (e.g. placeholder `#` links). */
|
|
659
|
+
id?: string;
|
|
636
660
|
label: string;
|
|
637
661
|
href?: string;
|
|
638
662
|
icon?: ReactNode;
|
|
@@ -798,6 +822,8 @@ declare function EmptyState({
|
|
|
798
822
|
...props
|
|
799
823
|
}: EmptyStateProps): import("react").JSX.Element;
|
|
800
824
|
interface FabAction {
|
|
825
|
+
/** Stable React key. Provide when `label` may repeat across actions. */
|
|
826
|
+
id?: string;
|
|
801
827
|
/** Accessible name and visible label for the speed-dial item. */
|
|
802
828
|
label: string;
|
|
803
829
|
icon: ReactNode;
|
|
@@ -953,6 +979,8 @@ interface DataTableLabels {
|
|
|
953
979
|
selectRow?: string;
|
|
954
980
|
itemsSelected?: (n: number) => string;
|
|
955
981
|
expandRow?: string;
|
|
982
|
+
previousPage?: string;
|
|
983
|
+
nextPage?: string;
|
|
956
984
|
}
|
|
957
985
|
interface DataTableProps<Row> {
|
|
958
986
|
columns: Column<Row>[];
|
|
@@ -973,6 +1001,7 @@ interface DataTableProps<Row> {
|
|
|
973
1001
|
onChange?: (ids: string[]) => void;
|
|
974
1002
|
};
|
|
975
1003
|
batchActions?: {
|
|
1004
|
+
id?: string;
|
|
976
1005
|
label: string;
|
|
977
1006
|
onClick: (selectedIds: string[]) => void;
|
|
978
1007
|
}[];
|
|
@@ -1138,6 +1167,7 @@ interface ComboboxLabels {
|
|
|
1138
1167
|
placeholder?: string;
|
|
1139
1168
|
empty?: string;
|
|
1140
1169
|
clear?: string;
|
|
1170
|
+
search?: string;
|
|
1141
1171
|
}
|
|
1142
1172
|
interface ComboboxProps {
|
|
1143
1173
|
options: ComboboxOption[];
|
|
@@ -1526,6 +1556,7 @@ interface MultiSelectOption {
|
|
|
1526
1556
|
disabled?: boolean;
|
|
1527
1557
|
}
|
|
1528
1558
|
interface MultiSelectLabels {
|
|
1559
|
+
label?: string;
|
|
1529
1560
|
placeholder?: string;
|
|
1530
1561
|
selected?: (count: number) => string;
|
|
1531
1562
|
search?: string;
|
|
@@ -1708,16 +1739,24 @@ interface ShellHeaderBrand {
|
|
|
1708
1739
|
href?: string;
|
|
1709
1740
|
}
|
|
1710
1741
|
interface ShellHeaderNavLink {
|
|
1742
|
+
/** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
|
|
1743
|
+
id?: string;
|
|
1711
1744
|
label: string;
|
|
1712
1745
|
href: string;
|
|
1713
1746
|
active?: boolean;
|
|
1747
|
+
/** Intercept navigation (e.g. a SPA section switch). Forwarded to the `<a>`. */
|
|
1748
|
+
onClick?: ((e: MouseEvent<HTMLAnchorElement>) => void) | undefined;
|
|
1714
1749
|
}
|
|
1715
1750
|
interface ShellHeaderNavMenuItem {
|
|
1751
|
+
/** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
|
|
1752
|
+
id?: string;
|
|
1716
1753
|
label: string;
|
|
1717
1754
|
href: string;
|
|
1718
1755
|
active?: boolean;
|
|
1719
1756
|
}
|
|
1720
1757
|
interface ShellHeaderNavMenu {
|
|
1758
|
+
/** Stable React key. Provide when `label` may repeat across menus. */
|
|
1759
|
+
id?: string;
|
|
1721
1760
|
label: string;
|
|
1722
1761
|
items: ShellHeaderNavMenuItem[];
|
|
1723
1762
|
}
|
|
@@ -2654,6 +2693,7 @@ interface DateRangePreset {
|
|
|
2654
2693
|
range: DateRange;
|
|
2655
2694
|
}
|
|
2656
2695
|
interface DateRangePickerLabels {
|
|
2696
|
+
label?: string;
|
|
2657
2697
|
placeholder?: string;
|
|
2658
2698
|
start?: string;
|
|
2659
2699
|
end?: string;
|
|
@@ -2777,11 +2817,14 @@ interface DockProps {
|
|
|
2777
2817
|
items: DockItem[];
|
|
2778
2818
|
activeIndex?: number;
|
|
2779
2819
|
className?: string;
|
|
2820
|
+
/** Accessible label for the nav landmark */
|
|
2821
|
+
ariaLabel?: string;
|
|
2780
2822
|
}
|
|
2781
2823
|
declare function Dock({
|
|
2782
2824
|
items,
|
|
2783
2825
|
activeIndex,
|
|
2784
|
-
className
|
|
2826
|
+
className,
|
|
2827
|
+
ariaLabel
|
|
2785
2828
|
}: DockProps): import("react").JSX.Element;
|
|
2786
2829
|
interface DrawerProps {
|
|
2787
2830
|
/** Controlled open state. */
|
|
@@ -2914,12 +2957,15 @@ interface StepsProps {
|
|
|
2914
2957
|
activeStep?: number;
|
|
2915
2958
|
orientation?: 'horizontal' | 'vertical';
|
|
2916
2959
|
className?: string;
|
|
2960
|
+
/** Accessible label for the steps list */
|
|
2961
|
+
ariaLabel?: string;
|
|
2917
2962
|
}
|
|
2918
2963
|
declare function Steps({
|
|
2919
2964
|
steps,
|
|
2920
2965
|
activeStep: controlledActiveStep,
|
|
2921
2966
|
orientation,
|
|
2922
|
-
className
|
|
2967
|
+
className,
|
|
2968
|
+
ariaLabel
|
|
2923
2969
|
}: StepsProps): import("react").JSX.Element;
|
|
2924
2970
|
interface TileProps {
|
|
2925
2971
|
/** Identifies this tile within a group. */
|
|
@@ -3089,6 +3135,8 @@ declare function Swap({
|
|
|
3089
3135
|
...aria
|
|
3090
3136
|
}: SwapProps): import("react").JSX.Element;
|
|
3091
3137
|
interface SwipeAction {
|
|
3138
|
+
/** Stable React key. Provide when `label` may repeat across actions. */
|
|
3139
|
+
id?: string;
|
|
3092
3140
|
/** Accessible name and visible label. */
|
|
3093
3141
|
label: string;
|
|
3094
3142
|
icon?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._root_1mutf_2{border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background-color:var(--cascivo-color-surface);flex-direction:column;display:flex;overflow:clip}._toolbar_1mutf_11{align-items:center;gap:var(--cascivo-space-2);padding-block:var(--cascivo-space-2);padding-inline:var(--cascivo-space-3);border-block-end:1px solid var(--cascivo-color-border);display:flex}._search_1mutf_20{min-inline-size:0;font:inherit;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface-raised);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-2);flex:0 16rem}._count_1mutf_33{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-muted)}._spacer_1mutf_38{flex:auto}._toggle_1mutf_42,._copy_1mutf_43{font:inherit;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface-raised);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-button);padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-3);cursor:pointer}:is(._toggle_1mutf_42,._copy_1mutf_43):hover{background-color:var(--cascivo-color-surface)}:is(._toggle_1mutf_42,._copy_1mutf_43):focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:2px}._toggle_1mutf_42[aria-pressed=true]{color:var(--cascivo-color-accent-content,var(--cascivo-color-text-on-accent));background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent)}@media (pointer:coarse){._toggle_1mutf_42,._copy_1mutf_43,._search_1mutf_20{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}._scroll_1mutf_81{font-family:var(--cascivo-font-mono);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);line-height:1.45;position:relative;overflow:auto}._scroll_1mutf_81:focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:-2px}._sizer_1mutf_96{inline-size:100%;position:relative}._line_1mutf_101{padding-inline:var(--cascivo-space-3);white-space:pre;align-items:center;display:flex;position:absolute;inset-inline:0}._line_1mutf_101[data-level=warn]{color:var(--cascivo-color-warning-foreground)}._line_1mutf_101[data-level=error]{color:var(--cascivo-color-destructive-foreground)}._line_1mutf_101[data-level=debug]{color:var(--cascivo-color-text-subtle)}._line_1mutf_101 mark{color:inherit;background-color:var(--cascivo-color-warning-subtle);border-radius:var(--cascivo-radius-indicator)}._ansi_1mutf_128[data-ansi=red]{color:var(--cascivo-color-error)}._ansi_1mutf_128[data-ansi=green]{color:var(--cascivo-color-success)}._ansi_1mutf_128[data-ansi=yellow]{color:var(--cascivo-color-warning)}._ansi_1mutf_128[data-ansi=blue],._ansi_1mutf_128[data-ansi=cyan]{color:var(--cascivo-color-info)}._ansi_1mutf_128[data-ansi=magenta]{color:var(--cascivo-color-accent)}._ansi_1mutf_128[data-ansi=black],._ansi_1mutf_128[data-ansi=bright-black]{color:var(--cascivo-color-text-muted)}._empty_1mutf_149{padding-block:var(--cascivo-space-6);padding-inline:var(--cascivo-space-3);text-align:center;color:var(--cascivo-color-text-muted)}}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import './log-viewer.css';
|
|
4
4
|
var e = {
|
|
5
|
-
root: "
|
|
6
|
-
toolbar: "
|
|
7
|
-
search: "
|
|
8
|
-
count: "
|
|
9
|
-
spacer: "
|
|
10
|
-
toggle: "
|
|
11
|
-
copy: "
|
|
12
|
-
scroll: "
|
|
13
|
-
sizer: "
|
|
14
|
-
line: "
|
|
15
|
-
ansi: "
|
|
16
|
-
empty: "
|
|
5
|
+
root: "_root_1mutf_2",
|
|
6
|
+
toolbar: "_toolbar_1mutf_11",
|
|
7
|
+
search: "_search_1mutf_20",
|
|
8
|
+
count: "_count_1mutf_33",
|
|
9
|
+
spacer: "_spacer_1mutf_38",
|
|
10
|
+
toggle: "_toggle_1mutf_42",
|
|
11
|
+
copy: "_copy_1mutf_43",
|
|
12
|
+
scroll: "_scroll_1mutf_81",
|
|
13
|
+
sizer: "_sizer_1mutf_96",
|
|
14
|
+
line: "_line_1mutf_101",
|
|
15
|
+
ansi: "_ansi_1mutf_128",
|
|
16
|
+
empty: "_empty_1mutf_149"
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
export { e as default };
|
package/dist/menu/menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._trigger_11vpw_2{min-block-size:1.5rem;min-inline-size:1.5rem;padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}._trigger_11vpw_2:hover{background:var(--cascivo-color-active-bg)}._trigger_11vpw_2:focus-visible{outline:var(--cascivo-focus-ring);outline-offset:2px}._panel_11vpw_25{padding:var(--cascivo-space-1);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);min-width:10rem;box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._panel_11vpw_25{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._panel_11vpw_25{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._panel_11vpw_25{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._panel_11vpw_25[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}._item_11vpw_69{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border-radius:var(--cascivo-radius-item);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;display:flex}._item_11vpw_69:hover,._item_11vpw_69:focus-visible{background:var(--cascivo-color-bg-subtle)}._item_11vpw_69[aria-disabled=true]{opacity:.5;cursor:not-allowed}._separator_11vpw_92{height:1px;margin-block:var(--cascivo-space-1);background:var(--cascivo-color-border)}}
|
package/dist/menu/menu.module.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import './menu.css';
|
|
4
4
|
var e = {
|
|
5
|
-
trigger: "
|
|
6
|
-
panel: "
|
|
7
|
-
item: "
|
|
8
|
-
separator: "
|
|
5
|
+
trigger: "_trigger_11vpw_2",
|
|
6
|
+
panel: "_panel_11vpw_25",
|
|
7
|
+
item: "_item_11vpw_69",
|
|
8
|
+
separator: "_separator_11vpw_92"
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
11
|
export { e as default };
|
|
@@ -55,8 +55,6 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
|
|
|
55
55
|
}), /* @__PURE__ */ u("div", {
|
|
56
56
|
ref: b.popoverRef,
|
|
57
57
|
popover: "auto",
|
|
58
|
-
role: "listbox",
|
|
59
|
-
"aria-multiselectable": "true",
|
|
60
58
|
className: t.panel,
|
|
61
59
|
style: { positionAnchor: b.anchorName },
|
|
62
60
|
tabIndex: -1,
|
|
@@ -74,6 +72,9 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
|
|
|
74
72
|
})
|
|
75
73
|
}), /* @__PURE__ */ l("div", {
|
|
76
74
|
ref: C,
|
|
75
|
+
role: "listbox",
|
|
76
|
+
"aria-multiselectable": "true",
|
|
77
|
+
"aria-label": _?.label ?? c(s.multiSelect.label),
|
|
77
78
|
className: t.options,
|
|
78
79
|
children: T.value.length === 0 ? /* @__PURE__ */ l("div", {
|
|
79
80
|
className: t["no-results"],
|
|
@@ -58,7 +58,11 @@ function u({ showStrengthMeter: u = !1, size: d = "md", labels: f, className: p,
|
|
|
58
58
|
})]
|
|
59
59
|
}), u && C && /* @__PURE__ */ o("div", {
|
|
60
60
|
className: e["strength-meter"],
|
|
61
|
+
role: "meter",
|
|
61
62
|
"aria-label": T,
|
|
63
|
+
"aria-valuenow": C.score,
|
|
64
|
+
"aria-valuemin": 0,
|
|
65
|
+
"aria-valuemax": 4,
|
|
62
66
|
"data-strength": C.label,
|
|
63
67
|
children: [
|
|
64
68
|
0,
|
package/dist/popover/popover.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._trigger_13tp0_2{justify-content:center;align-items:center;min-block-size:1.5rem;min-inline-size:1.5rem;display:inline-flex}._content_13tp0_11{padding:var(--cascivo-space-3);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._content_13tp0_11{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._content_13tp0_11{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._content_13tp0_11{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._content_13tp0_11[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}}
|
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./radial-progress.module.js";
|
|
4
4
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import { useId as n } from "react";
|
|
5
6
|
//#region ../components/src/radial-progress/radial-progress.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
7
|
+
function r({ value: r, size: i = "md", variant: a = "primary", children: o, className: s, ...c }) {
|
|
8
|
+
let l = Math.min(100, Math.max(0, r)), u = n();
|
|
8
9
|
return /* @__PURE__ */ t("div", {
|
|
9
10
|
role: "progressbar",
|
|
10
|
-
"aria-valuenow":
|
|
11
|
+
"aria-valuenow": l,
|
|
11
12
|
"aria-valuemin": 0,
|
|
12
13
|
"aria-valuemax": 100,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"data-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
"aria-labelledby": c["aria-label"] ? void 0 : u,
|
|
15
|
+
className: [e.radialProgress, s].filter(Boolean).join(" "),
|
|
16
|
+
"data-size": i,
|
|
17
|
+
"data-variant": a,
|
|
18
|
+
style: { "--cascivo-radial-progress": l },
|
|
19
|
+
...c,
|
|
18
20
|
children: /* @__PURE__ */ t("span", {
|
|
21
|
+
id: u,
|
|
19
22
|
className: e.label,
|
|
20
|
-
children:
|
|
23
|
+
children: o ?? `${l}%`
|
|
21
24
|
})
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
//#endregion
|
|
25
|
-
export {
|
|
28
|
+
export { r as RadialProgress };
|
|
@@ -64,7 +64,7 @@ function f({ item: n }) {
|
|
|
64
64
|
style: { positionAnchor: d },
|
|
65
65
|
className: t.navMenuPanel,
|
|
66
66
|
onKeyDown: _,
|
|
67
|
-
children: n.items.map((e) => /* @__PURE__ */ c("a", {
|
|
67
|
+
children: n.items.map((e, n) => /* @__PURE__ */ c("a", {
|
|
68
68
|
href: e.href,
|
|
69
69
|
role: "menuitem",
|
|
70
70
|
"aria-current": e.active ? "page" : void 0,
|
|
@@ -72,7 +72,7 @@ function f({ item: n }) {
|
|
|
72
72
|
className: t.navMenuItem,
|
|
73
73
|
onClick: p,
|
|
74
74
|
children: e.label
|
|
75
|
-
}, e.href))
|
|
75
|
+
}, e.id ?? `${n}-${e.href}`))
|
|
76
76
|
})]
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -127,13 +127,14 @@ function p({ brand: e, nav: r, actions: i, end: p, onMenuClick: m, menuExpanded:
|
|
|
127
127
|
className: t.nav,
|
|
128
128
|
children: /* @__PURE__ */ c("ul", {
|
|
129
129
|
className: t.navList,
|
|
130
|
-
children: r.map((e) => d(e) ? /* @__PURE__ */ c(f, { item: e }, e.label) : /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c("a", {
|
|
130
|
+
children: r.map((e, n) => d(e) ? /* @__PURE__ */ c(f, { item: e }, e.id ?? `${n}-${e.label}`) : /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c("a", {
|
|
131
131
|
href: e.href,
|
|
132
132
|
"aria-current": e.active ? "page" : void 0,
|
|
133
133
|
"data-state": e.active ? "active" : void 0,
|
|
134
134
|
className: t.navLink,
|
|
135
|
+
...e.onClick ? { onClick: e.onClick } : {},
|
|
135
136
|
children: e.label
|
|
136
|
-
}) }, e.href))
|
|
137
|
+
}) }, e.id ?? `${n}-${e.href}`))
|
|
137
138
|
})
|
|
138
139
|
}),
|
|
139
140
|
/* @__PURE__ */ c("div", { className: t.spacer }),
|
|
@@ -174,7 +174,7 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
174
174
|
children: t.items.map((t, i) => {
|
|
175
175
|
let a = `${r}-${i}`;
|
|
176
176
|
if (t.items) {
|
|
177
|
-
if (L && !C) return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(_, { item: t }) }, t.
|
|
177
|
+
if (L && !C) return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(_, { item: t }) }, t.id ?? a);
|
|
178
178
|
let e = P.value.includes(t.label), r = `${j}-group-${a}`;
|
|
179
179
|
return /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ u("button", {
|
|
180
180
|
type: "button",
|
|
@@ -230,12 +230,12 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
230
230
|
children: e.label
|
|
231
231
|
}, t))
|
|
232
232
|
})
|
|
233
|
-
})] }, t.
|
|
233
|
+
})] }, t.id ?? a);
|
|
234
234
|
}
|
|
235
235
|
if (t.render) return /* @__PURE__ */ l("li", {
|
|
236
236
|
className: n.customItem,
|
|
237
237
|
children: t.render({ collapsed: L })
|
|
238
|
-
}, t.
|
|
238
|
+
}, t.id ?? a);
|
|
239
239
|
let o = /* @__PURE__ */ u(c, { children: [
|
|
240
240
|
t.icon ? /* @__PURE__ */ l("span", {
|
|
241
241
|
className: n.icon,
|
|
@@ -289,7 +289,7 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
289
289
|
content: t.label,
|
|
290
290
|
placement: "right",
|
|
291
291
|
children: d
|
|
292
|
-
}) : d }, t.
|
|
292
|
+
}) : d }, t.id ?? a);
|
|
293
293
|
})
|
|
294
294
|
})]
|
|
295
295
|
}, r))
|
package/dist/stat/stat.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._stat_119kx_2{gap:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);flex-direction:column;display:flex}._label_119kx_9{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}._value_119kx_15{font-size:var(--cascivo-text-2xl);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);font-variant-numeric:tabular-nums}._delta_119kx_23{align-items:center;gap:var(--cascivo-space-1);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);font-variant-numeric:tabular-nums;display:inline-flex}._delta_119kx_23[data-trend=up]{color:var(--cascivo-color-success-foreground)}._delta_119kx_23[data-trend=down]{color:var(--cascivo-color-destructive-foreground)}._delta_119kx_23[data-trend=flat]{color:var(--cascivo-color-text-subtle)}._arrow_119kx_44{font-size:var(--cascivo-text-xs);line-height:1}._help_119kx_49{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}}
|
package/dist/stat/stat.module.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import './stat.css';
|
|
4
4
|
var e = {
|
|
5
|
-
stat: "
|
|
6
|
-
label: "
|
|
7
|
-
value: "
|
|
8
|
-
delta: "
|
|
9
|
-
arrow: "
|
|
10
|
-
help: "
|
|
5
|
+
stat: "_stat_119kx_2",
|
|
6
|
+
label: "_label_119kx_9",
|
|
7
|
+
value: "_value_119kx_15",
|
|
8
|
+
delta: "_delta_119kx_23",
|
|
9
|
+
arrow: "_arrow_119kx_44",
|
|
10
|
+
help: "_help_119kx_49"
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { e as default };
|
package/dist/steps/steps.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._steps_1u41q_2{gap:0;margin:0;padding:0;list-style:none;display:flex}._steps_1u41q_2[data-orientation=horizontal]{flex-direction:row;align-items:center}._steps_1u41q_2[data-orientation=vertical]{flex-direction:column}._step_1u41q_2{flex:1;align-items:center;gap:.5rem;display:flex;position:relative}._step_1u41q_2:not(:last-child):after{content:"";background-color:var(--cascivo-border-default);flex:1;block-size:1px}._steps_1u41q_2[data-orientation=vertical] ._step_1u41q_2:not(:last-child):after{flex:none;block-size:calc(100% - 1.5rem);inline-size:1px;position:absolute;inset-block-start:2rem;inset-inline-start:.75rem}._circle_1u41q_42{border-radius:var(--cascivo-radius-full);border:2px solid var(--cascivo-border-default);background-color:var(--cascivo-color-surface);block-size:1.5rem;inline-size:1.5rem;color:var(--cascivo-color-text-muted);transition:background-color .15s var(--cascivo-ease-out), border-color .15s var(--cascivo-ease-out);flex-shrink:0;justify-content:center;align-items:center;font-size:.75rem;font-weight:600;display:flex}._step_1u41q_2[data-state=active] ._circle_1u41q_42{background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent);color:var(--cascivo-color-accent-content)}._step_1u41q_2[data-state=complete] ._circle_1u41q_42{background-color:var(--cascivo-color-success);border-color:var(--cascivo-color-success);color:var(--cascivo-color-success-content)}._step_1u41q_2[data-state=error] ._circle_1u41q_42{background-color:var(--cascivo-color-error);border-color:var(--cascivo-color-error);color:var(--cascivo-color-error-content)}._step_1u41q_2[data-state=complete]:not(:last-child):after{background-color:var(--cascivo-color-success)}._label_1u41q_82{color:var(--cascivo-color-text-subtle);font-size:.875rem}._step_1u41q_2[data-state=active] ._label_1u41q_82{color:var(--cascivo-color-text);font-weight:500}._step_1u41q_2[data-state=complete] ._label_1u41q_82{color:var(--cascivo-color-text-subtle)}._step_1u41q_2[data-state=error] ._label_1u41q_82{color:var(--cascivo-color-destructive-foreground)}}
|
package/dist/steps/steps.js
CHANGED
|
@@ -2,25 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./steps.module.js";
|
|
4
4
|
import { useSignal as t, useSignals as n } from "@cascivo/core";
|
|
5
|
-
import {
|
|
5
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
7
|
//#region ../components/src/steps/steps.tsx
|
|
7
|
-
function
|
|
8
|
+
function s({ steps: s, activeStep: c, orientation: l = "horizontal", className: u, ariaLabel: d }) {
|
|
8
9
|
n();
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
let f = t(c ?? 0);
|
|
11
|
+
f.value = c ?? f.value;
|
|
12
|
+
let p = d ?? i(r.steps.label);
|
|
13
|
+
return /* @__PURE__ */ a("ol", {
|
|
14
|
+
className: [e.steps, u].filter(Boolean).join(" "),
|
|
15
|
+
"data-orientation": l,
|
|
16
|
+
"aria-label": p,
|
|
17
|
+
children: s.map((t, n) => {
|
|
18
|
+
let r = t.state ?? (n < f.value ? "complete" : n === f.value ? "active" : "pending");
|
|
19
|
+
return /* @__PURE__ */ o("li", {
|
|
17
20
|
className: e.step,
|
|
18
|
-
"data-state":
|
|
19
|
-
"aria-current":
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
+
"data-state": r,
|
|
22
|
+
"aria-current": r === "active" ? "step" : void 0,
|
|
23
|
+
children: [/* @__PURE__ */ a("div", {
|
|
21
24
|
className: e.circle,
|
|
22
|
-
children:
|
|
23
|
-
}), /* @__PURE__ */
|
|
25
|
+
children: r === "complete" ? "✓" : r === "error" ? "✕" : n + 1
|
|
26
|
+
}), /* @__PURE__ */ a("span", {
|
|
24
27
|
className: e.label,
|
|
25
28
|
children: t.label
|
|
26
29
|
})]
|
|
@@ -29,4 +32,4 @@ function a({ steps: a, activeStep: o, orientation: s = "horizontal", className:
|
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
34
|
//#endregion
|
|
32
|
-
export {
|
|
35
|
+
export { s as Steps };
|