@bysages/solid 0.4.1 → 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/dist/components/ai-prompt-input/index.mjs +37 -35
- package/dist/components/angle-slider/index.d.mts +15 -1
- package/dist/components/angle-slider/index.mjs +57 -2
- package/dist/components/calendar/index.d.mts +19 -7
- package/dist/components/calendar/index.mjs +212 -138
- package/dist/components/carousel/index.d.mts +15 -1
- package/dist/components/carousel/index.mjs +68 -4
- package/dist/components/checkbox/index.d.mts +16 -1
- package/dist/components/checkbox/index.mjs +53 -2
- package/dist/components/checkbox-group/index.d.mts +10 -3
- package/dist/components/checkbox-group/index.mjs +2 -2
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/clipboard/index.d.mts +14 -1
- package/dist/components/clipboard/index.mjs +57 -2
- package/dist/components/date-input/index.d.mts +16 -2
- package/dist/components/date-input/index.mjs +51 -2
- package/dist/components/date-picker/index.d.mts +27 -2
- package/dist/components/date-picker/index.mjs +152 -3
- package/dist/components/editable/index.d.mts +17 -1
- package/dist/components/editable/index.mjs +80 -2
- package/dist/components/field/index.d.mts +16 -1
- package/dist/components/field/index.mjs +52 -4
- package/dist/components/fieldset/index.d.mts +15 -3
- package/dist/components/fieldset/index.mjs +46 -4
- package/dist/components/file-upload/index.d.mts +21 -1
- package/dist/components/file-upload/index.mjs +65 -2
- package/dist/components/floating-panel/index.d.mts +15 -3
- package/dist/components/floating-panel/index.mjs +112 -4
- package/dist/components/form/index.d.mts +44 -2
- package/dist/components/image-cropper/index.d.mts +8 -1
- package/dist/components/image-cropper/index.mjs +42 -4
- package/dist/components/json-tree-view/index.d.mts +11 -2
- package/dist/components/json-tree-view/index.mjs +16 -1
- package/dist/components/listbox/index.d.mts +21 -1
- package/dist/components/listbox/index.mjs +58 -3
- package/dist/components/marquee/index.d.mts +12 -1
- package/dist/components/marquee/index.mjs +45 -4
- package/dist/components/navigation-menu/index.d.mts +17 -1
- package/dist/components/navigation-menu/index.mjs +65 -5
- package/dist/components/number-input/index.d.mts +20 -1
- package/dist/components/number-input/index.mjs +71 -2
- package/dist/components/pagination/index.d.mts +22 -2
- package/dist/components/pagination/index.mjs +104 -5
- package/dist/components/password-input/index.d.mts +18 -1
- package/dist/components/password-input/index.mjs +56 -2
- package/dist/components/pin-input/index.d.mts +18 -1
- package/dist/components/pin-input/index.mjs +54 -2
- package/dist/components/progress/index.d.mts +19 -1
- package/dist/components/progress/index.mjs +105 -6
- package/dist/components/qr-code/index.d.mts +8 -1
- package/dist/components/qr-code/index.mjs +21 -4
- package/dist/components/radio-group/index.d.mts +23 -1
- package/dist/components/radio-group/index.mjs +65 -2
- package/dist/components/rating-group/index.d.mts +15 -1
- package/dist/components/rating-group/index.mjs +51 -2
- package/dist/components/scroll-area/index.d.mts +11 -3
- package/dist/components/scroll-area/index.mjs +36 -4
- package/dist/components/segment-group/index.d.mts +27 -4
- package/dist/components/segment-group/index.mjs +65 -6
- package/dist/components/signature-pad/index.d.mts +16 -1
- package/dist/components/signature-pad/index.mjs +63 -4
- package/dist/components/slider/index.d.mts +20 -1
- package/dist/components/slider/index.mjs +66 -2
- package/dist/components/splitter/index.d.mts +15 -1
- package/dist/components/splitter/index.mjs +57 -4
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +9 -2
- package/dist/components/swap/index.d.mts +11 -3
- package/dist/components/swap/index.mjs +34 -4
- package/dist/components/switch/index.d.mts +16 -1
- package/dist/components/switch/index.mjs +47 -2
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.mjs +13 -11
- package/dist/components/tag/index.d.mts +29 -0
- package/dist/components/tag/index.mjs +121 -0
- package/dist/components/tags-input/index.d.mts +18 -1
- package/dist/components/tags-input/index.mjs +82 -2
- package/dist/components/timer/index.d.mts +12 -1
- package/dist/components/timer/index.mjs +56 -4
- package/dist/components/toast/index.d.mts +10 -5
- package/dist/components/toast/index.mjs +37 -5
- package/dist/components/toc/index.d.mts +2 -11
- package/dist/components/toc/index.mjs +1 -1
- package/dist/components/toggle/index.d.mts +8 -1
- package/dist/components/toggle/index.mjs +26 -4
- package/dist/components/toggle-group/index.d.mts +23 -1
- package/dist/components/toggle-group/index.mjs +57 -3
- package/dist/components/tree-view/index.d.mts +32 -2
- package/dist/components/tree-view/index.mjs +93 -4
- package/dist/components/user/index.mjs +8 -2
- package/dist/generative/index.d.mts +47 -0
- package/dist/generative/index.mjs +942 -0
- package/dist/index-BU5U5w04.d.mts +35 -0
- package/dist/index.d.mts +43 -42
- package/dist/index.mjs +3 -2
- package/dist/toc-DRHr8_eD.mjs +88 -0
- package/package.json +2 -2
- package/dist/index-B1-quIrl.d.mts +0 -1815
- package/dist/toc-CqvGOp34.mjs +0 -31
|
@@ -1,20 +1,79 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
2
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
4
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
-
import { createComponent, mergeProps } from "solid-js";
|
|
6
|
+
import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
7
|
import { SignaturePad as SignaturePad$1 } from "@ark-ui/solid/signature-pad";
|
|
6
|
-
//#region src/components/signature-pad/index.
|
|
8
|
+
//#region src/components/signature-pad/index.tsx
|
|
7
9
|
/** Ark's SignaturePad, dressed in the paper-and-ink system: a quiet paper
|
|
8
10
|
* field with a guide hairline where ink — real ink strokes — is laid down.
|
|
9
11
|
* The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
|
|
10
12
|
* ClearTrigger, HiddenInput, Context. */
|
|
11
13
|
function SignaturePadRoot(props) {
|
|
12
14
|
const id = useElementId("signature-pad", () => props.id);
|
|
13
|
-
return createComponent(SignaturePad$1.Root, mergeProps(props, { get id() {
|
|
15
|
+
return createComponent$1(SignaturePad$1.Root, mergeProps$1(props, { get id() {
|
|
14
16
|
return id();
|
|
15
17
|
} }));
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
function SignaturePadFacade(props) {
|
|
20
|
+
injectComponentStyle("signature-pad");
|
|
21
|
+
return createComponent(SignaturePadRoot, mergeProps({
|
|
22
|
+
get disabled() {
|
|
23
|
+
return props.disabled;
|
|
24
|
+
},
|
|
25
|
+
get required() {
|
|
26
|
+
return props.required;
|
|
27
|
+
},
|
|
28
|
+
get defaultPaths() {
|
|
29
|
+
return props.defaultValue;
|
|
30
|
+
},
|
|
31
|
+
get "data-invalid"() {
|
|
32
|
+
return props.invalid || void 0;
|
|
33
|
+
}
|
|
34
|
+
}, () => {
|
|
35
|
+
return props.value === void 0 ? {} : { paths: props.value };
|
|
36
|
+
}, {
|
|
37
|
+
onDraw: (details) => props.onValueChange?.(details.paths),
|
|
38
|
+
get children() {
|
|
39
|
+
return [
|
|
40
|
+
createComponent(Show, {
|
|
41
|
+
get when() {
|
|
42
|
+
return props.label;
|
|
43
|
+
},
|
|
44
|
+
get children() {
|
|
45
|
+
return createComponent(SignaturePad$1.Label, { get children() {
|
|
46
|
+
return props.label;
|
|
47
|
+
} });
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
createComponent(SignaturePad$1.Control, { get children() {
|
|
51
|
+
return [
|
|
52
|
+
createComponent(SignaturePad$1.Segment, {}),
|
|
53
|
+
createComponent(Show, {
|
|
54
|
+
get when() {
|
|
55
|
+
return props.clearable !== false;
|
|
56
|
+
},
|
|
57
|
+
get children() {
|
|
58
|
+
return createComponent(SignaturePad$1.ClearTrigger, { get children() {
|
|
59
|
+
return iconNode("undo", {
|
|
60
|
+
width: "14",
|
|
61
|
+
height: "14"
|
|
62
|
+
});
|
|
63
|
+
} });
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
createComponent(SignaturePad$1.Guide, {})
|
|
67
|
+
];
|
|
68
|
+
} }),
|
|
69
|
+
createComponent(SignaturePad$1.Context, { children: (signaturePad) => createComponent(SignaturePad$1.HiddenInput, { get value() {
|
|
70
|
+
return signaturePad().paths.join(" ");
|
|
71
|
+
} }) })
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
const SignaturePad = defineFamily(SignaturePadFacade, {
|
|
18
77
|
...SignaturePad$1,
|
|
19
78
|
Root: SignaturePadRoot
|
|
20
79
|
});
|
|
@@ -9,7 +9,26 @@ type SliderOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function SliderRoot(props: SliderRootProps & SliderOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export
|
|
12
|
+
export interface SliderFacadeProps {
|
|
13
|
+
value?: number;
|
|
14
|
+
defaultValue?: number;
|
|
15
|
+
label?: string;
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
step?: number;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
orientation?: "horizontal" | "vertical";
|
|
24
|
+
/** One rung of the part-size ladder for the thumb seal. */
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
onValueChange?: (value: number) => void;
|
|
27
|
+
}
|
|
28
|
+
/** The common single-value slider; ranges and markers stay on the anatomy. */
|
|
29
|
+
declare function SliderFacade(props: SliderFacadeProps): import("solid-js").JSX.Element;
|
|
30
|
+
type SliderParts = Omit<typeof Slider$1, "Root"> & {
|
|
13
31
|
Root: typeof SliderRoot;
|
|
14
32
|
};
|
|
33
|
+
export declare const Slider: typeof SliderFacade & SliderParts;
|
|
15
34
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
5
|
+
import { Show, splitProps } from "solid-js";
|
|
6
6
|
import { Slider as Slider$1 } from "@ark-ui/solid/slider";
|
|
7
7
|
//#region src/components/slider/index.tsx
|
|
8
8
|
function SliderRoot(props) {
|
|
@@ -17,7 +17,71 @@ function SliderRoot(props) {
|
|
|
17
17
|
}
|
|
18
18
|
}));
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
/** The common single-value slider; ranges and markers stay on the anatomy. */
|
|
21
|
+
function SliderFacade(props) {
|
|
22
|
+
injectComponentStyle("slider");
|
|
23
|
+
return createComponent(SliderRoot, mergeProps({
|
|
24
|
+
get size() {
|
|
25
|
+
return props.size ?? "md";
|
|
26
|
+
},
|
|
27
|
+
get disabled() {
|
|
28
|
+
return props.disabled;
|
|
29
|
+
},
|
|
30
|
+
get invalid() {
|
|
31
|
+
return props.invalid;
|
|
32
|
+
},
|
|
33
|
+
get readOnly() {
|
|
34
|
+
return props.readOnly;
|
|
35
|
+
},
|
|
36
|
+
get min() {
|
|
37
|
+
return props.min ?? 0;
|
|
38
|
+
},
|
|
39
|
+
get max() {
|
|
40
|
+
return props.max ?? 100;
|
|
41
|
+
},
|
|
42
|
+
get step() {
|
|
43
|
+
return props.step ?? 1;
|
|
44
|
+
},
|
|
45
|
+
get orientation() {
|
|
46
|
+
return props.orientation ?? "horizontal";
|
|
47
|
+
},
|
|
48
|
+
get defaultValue() {
|
|
49
|
+
return [props.defaultValue ?? 50];
|
|
50
|
+
}
|
|
51
|
+
}, () => {
|
|
52
|
+
return props.value === void 0 ? {} : { value: [props.value] };
|
|
53
|
+
}, {
|
|
54
|
+
onValueChange: (details) => props.onValueChange?.(details.value.at(0) ?? props.min ?? 0),
|
|
55
|
+
get children() {
|
|
56
|
+
return [
|
|
57
|
+
createComponent(Show, {
|
|
58
|
+
get when() {
|
|
59
|
+
return props.label;
|
|
60
|
+
},
|
|
61
|
+
get children() {
|
|
62
|
+
return createComponent(Slider$1.Label, { get children() {
|
|
63
|
+
return props.label;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
}),
|
|
67
|
+
createComponent(Slider$1.ValueText, {}),
|
|
68
|
+
createComponent(Slider$1.Control, { get children() {
|
|
69
|
+
return [createComponent(Slider$1.Track, { get children() {
|
|
70
|
+
return createComponent(Slider$1.Range, {});
|
|
71
|
+
} }), createComponent(Slider$1.Thumb, {
|
|
72
|
+
index: 0,
|
|
73
|
+
get children() {
|
|
74
|
+
return createComponent(Slider$1.HiddenInput, { get required() {
|
|
75
|
+
return props.required;
|
|
76
|
+
} });
|
|
77
|
+
}
|
|
78
|
+
})];
|
|
79
|
+
} })
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
const Slider = defineFamily(SliderFacade, {
|
|
21
85
|
...Slider$1,
|
|
22
86
|
Root: SliderRoot
|
|
23
87
|
});
|
|
@@ -5,7 +5,21 @@ import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
|
|
|
5
5
|
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
6
6
|
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
7
7
|
declare function SplitterRoot(props: ComponentProps<typeof Splitter$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
-
export
|
|
8
|
+
export type SplitterItem = {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
export interface SplitterFacadeProps {
|
|
13
|
+
items: SplitterItem[];
|
|
14
|
+
defaultValue?: number[];
|
|
15
|
+
value?: number[];
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
onValueChange?: (value: number[]) => void;
|
|
18
|
+
}
|
|
19
|
+
/** The complete equal-height splitter; collapsed panels and custom panel
|
|
20
|
+
* bodies stay on the anatomy. */
|
|
21
|
+
declare function SplitterFacade(props: SplitterFacadeProps): import("solid-js").JSX.Element;
|
|
22
|
+
export declare const Splitter: typeof SplitterFacade & Omit<typeof Splitter$1, "Root"> & {
|
|
9
23
|
Root: typeof SplitterRoot;
|
|
10
24
|
};
|
|
11
25
|
//#endregion
|
|
@@ -1,19 +1,72 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
-
import { createComponent, mergeProps } from "solid-js";
|
|
5
|
+
import { For, Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
6
|
import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
|
|
6
|
-
//#region src/components/splitter/index.
|
|
7
|
+
//#region src/components/splitter/index.tsx
|
|
7
8
|
/** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
|
|
8
9
|
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
9
10
|
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
10
11
|
function SplitterRoot(props) {
|
|
11
12
|
const id = useElementId("splitter", () => props.id);
|
|
12
|
-
return createComponent(Splitter$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return createComponent$1(Splitter$1.Root, mergeProps$1(props, { get id() {
|
|
13
14
|
return id();
|
|
14
15
|
} }));
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
/** The complete equal-height splitter; collapsed panels and custom panel
|
|
18
|
+
* bodies stay on the anatomy. */
|
|
19
|
+
function SplitterFacade(props) {
|
|
20
|
+
injectComponentStyle("splitter");
|
|
21
|
+
const panels = () => props.items.map((item) => ({ id: item.id }));
|
|
22
|
+
return createComponent(SplitterRoot, mergeProps({
|
|
23
|
+
get orientation() {
|
|
24
|
+
return props.orientation ?? "horizontal";
|
|
25
|
+
},
|
|
26
|
+
get panels() {
|
|
27
|
+
return panels();
|
|
28
|
+
},
|
|
29
|
+
get defaultSize() {
|
|
30
|
+
return props.defaultValue;
|
|
31
|
+
}
|
|
32
|
+
}, () => {
|
|
33
|
+
return props.value === void 0 ? {} : { size: props.value };
|
|
34
|
+
}, {
|
|
35
|
+
onResize: (size) => props.onValueChange?.(size.size),
|
|
36
|
+
get children() {
|
|
37
|
+
return createComponent(For, {
|
|
38
|
+
get each() {
|
|
39
|
+
return props.items;
|
|
40
|
+
},
|
|
41
|
+
children: (item, index) => {
|
|
42
|
+
const next = () => props.items.at(index() + 1);
|
|
43
|
+
return [createComponent(Splitter$1.Panel, {
|
|
44
|
+
get id() {
|
|
45
|
+
return item.id;
|
|
46
|
+
},
|
|
47
|
+
get children() {
|
|
48
|
+
return item.label;
|
|
49
|
+
}
|
|
50
|
+
}), createComponent(Show, {
|
|
51
|
+
get when() {
|
|
52
|
+
return next();
|
|
53
|
+
},
|
|
54
|
+
children: (nextItem) => createComponent(Splitter$1.ResizeTrigger, {
|
|
55
|
+
get id() {
|
|
56
|
+
return `${item.id}:${nextItem().id}`;
|
|
57
|
+
},
|
|
58
|
+
"aria-label": "Resize panels",
|
|
59
|
+
get children() {
|
|
60
|
+
return createComponent(Splitter$1.ResizeTriggerIndicator, {});
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
})];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
const Splitter = defineFamily(SplitterFacade, {
|
|
17
70
|
...Splitter$1,
|
|
18
71
|
Root: SplitterRoot
|
|
19
72
|
});
|
|
@@ -8,11 +8,13 @@ import { Steps as Steps$1, StepsRootProps } from "@ark-ui/solid/steps";
|
|
|
8
8
|
* PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
|
|
9
9
|
* data-complete / data-current / data-incomplete.
|
|
10
10
|
*/
|
|
11
|
-
type StepsRootProps$1 = StepsRootProps & StepsOwnProps;
|
|
12
11
|
type StepsOwnProps = {
|
|
13
12
|
/** One rung of the control-height ladder every indicator stands on. */
|
|
14
13
|
size?: "sm" | "md" | "lg";
|
|
14
|
+
/** Default renders numbered seals; dot reduces each step to a bead. */
|
|
15
|
+
variant?: "default" | "dot";
|
|
15
16
|
};
|
|
17
|
+
type StepsRootProps$1 = StepsRootProps & StepsOwnProps;
|
|
16
18
|
declare function StepsRoot(props: StepsRootProps$1): import("solid-js").JSX.Element;
|
|
17
19
|
type StepsItem = {
|
|
18
20
|
title: string;
|
|
@@ -25,6 +27,8 @@ export interface StepsFacadeProps {
|
|
|
25
27
|
orientation?: "horizontal" | "vertical";
|
|
26
28
|
/** One rung of the control-height ladder every indicator stands on. */
|
|
27
29
|
size?: "sm" | "md" | "lg";
|
|
30
|
+
/** Default renders numbered seals; dot reduces each step to a bead. */
|
|
31
|
+
variant?: "default" | "dot";
|
|
28
32
|
class?: string;
|
|
29
33
|
onStepChange?: (step: number) => void;
|
|
30
34
|
}
|
|
@@ -6,7 +6,7 @@ import { For, splitProps } from "solid-js";
|
|
|
6
6
|
import { Steps as Steps$1 } from "@ark-ui/solid/steps";
|
|
7
7
|
//#region src/components/steps/index.tsx
|
|
8
8
|
function StepsRoot(props) {
|
|
9
|
-
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
+
const [own, rest] = splitProps(props, ["size", "variant"]);
|
|
10
10
|
const id = useElementId("steps", () => rest.id);
|
|
11
11
|
return createComponent(Steps$1.Root, mergeProps(rest, {
|
|
12
12
|
get id() {
|
|
@@ -14,11 +14,17 @@ function StepsRoot(props) {
|
|
|
14
14
|
},
|
|
15
15
|
get "data-size"() {
|
|
16
16
|
return own.size ?? "md";
|
|
17
|
+
},
|
|
18
|
+
get "data-variant"() {
|
|
19
|
+
return memo(() => {
|
|
20
|
+
return own.variant === "dot";
|
|
21
|
+
})() ? own.variant : void 0;
|
|
17
22
|
}
|
|
18
23
|
}));
|
|
19
24
|
}
|
|
20
25
|
function StepsFacade(props) {
|
|
21
26
|
injectComponentStyle("steps");
|
|
27
|
+
const variant = props.variant ?? "default";
|
|
22
28
|
return createComponent(StepsRoot, mergeProps({
|
|
23
29
|
get "class"() {
|
|
24
30
|
return props.class;
|
|
@@ -26,6 +32,7 @@ function StepsFacade(props) {
|
|
|
26
32
|
get size() {
|
|
27
33
|
return props.size ?? "md";
|
|
28
34
|
},
|
|
35
|
+
variant,
|
|
29
36
|
get count() {
|
|
30
37
|
return props.items.length;
|
|
31
38
|
},
|
|
@@ -56,7 +63,7 @@ function StepsFacade(props) {
|
|
|
56
63
|
get children() {
|
|
57
64
|
return [createComponent(Steps$1.Trigger, { get children() {
|
|
58
65
|
return [createComponent(Steps$1.Indicator, { get children() {
|
|
59
|
-
return String(index() + 1);
|
|
66
|
+
return variant === "dot" ? null : String(index() + 1);
|
|
60
67
|
} }), memo(() => {
|
|
61
68
|
return item.title;
|
|
62
69
|
})];
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { ComponentProps } from "solid-js";
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
2
2
|
import { Swap as Swap$1 } from "@ark-ui/solid/swap";
|
|
3
3
|
//#region src/components/swap/index.d.ts
|
|
4
4
|
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
5
5
|
* occupying one seal, the arriving one growing into place on the spring
|
|
6
6
|
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
7
7
|
* Indicator (type="on" | "off"), RootProvider. */
|
|
8
|
-
declare function SwapRoot(props: ComponentProps<typeof Swap$1.Root>):
|
|
9
|
-
export
|
|
8
|
+
declare function SwapRoot(props: ComponentProps<typeof Swap$1.Root>): JSX.Element;
|
|
9
|
+
export interface SwapFacadeProps {
|
|
10
|
+
swap?: boolean;
|
|
11
|
+
on?: JSX.Element;
|
|
12
|
+
off?: JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
/** The one-tag path for the default check/cross impression; custom
|
|
15
|
+
* transitions and indicators stay on the anatomy with `on`/`off` props. */
|
|
16
|
+
declare function SwapFacade(props: SwapFacadeProps): JSX.Element;
|
|
17
|
+
export declare const Swap: typeof SwapFacade & Omit<typeof Swap$1, "Root"> & {
|
|
10
18
|
Root: typeof SwapRoot;
|
|
11
19
|
};
|
|
12
20
|
//#endregion
|
|
@@ -1,20 +1,50 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
2
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
4
|
+
import { createComponent } from "@solidjs/web";
|
|
3
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
-
import { createComponent, mergeProps } from "solid-js";
|
|
6
|
+
import { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
7
|
import { Swap as Swap$1 } from "@ark-ui/solid/swap";
|
|
6
|
-
//#region src/components/swap/index.
|
|
8
|
+
//#region src/components/swap/index.tsx
|
|
7
9
|
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
8
10
|
* occupying one seal, the arriving one growing into place on the spring
|
|
9
11
|
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
10
12
|
* Indicator (type="on" | "off"), RootProvider. */
|
|
11
13
|
function SwapRoot(props) {
|
|
12
14
|
const id = useElementId("swap", () => props.id);
|
|
13
|
-
return createComponent(Swap$1.Root, mergeProps(props, { get id() {
|
|
15
|
+
return createComponent$1(Swap$1.Root, mergeProps$1(props, { get id() {
|
|
14
16
|
return id();
|
|
15
17
|
} }));
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
/** The one-tag path for the default check/cross impression; custom
|
|
20
|
+
* transitions and indicators stay on the anatomy with `on`/`off` props. */
|
|
21
|
+
function SwapFacade(props) {
|
|
22
|
+
return createComponent(SwapRoot, {
|
|
23
|
+
get swap() {
|
|
24
|
+
return props.swap ?? false;
|
|
25
|
+
},
|
|
26
|
+
get children() {
|
|
27
|
+
return [createComponent(Swap$1.Indicator, {
|
|
28
|
+
type: "on",
|
|
29
|
+
get children() {
|
|
30
|
+
return props.on ?? iconNode("check", {
|
|
31
|
+
width: "14",
|
|
32
|
+
height: "14"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}), createComponent(Swap$1.Indicator, {
|
|
36
|
+
type: "off",
|
|
37
|
+
get children() {
|
|
38
|
+
return props.off ?? iconNode("x", {
|
|
39
|
+
width: "14",
|
|
40
|
+
height: "14"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
})];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const Swap = defineFamily(SwapFacade, {
|
|
18
48
|
...Swap$1,
|
|
19
49
|
Root: SwapRoot
|
|
20
50
|
});
|
|
@@ -9,7 +9,22 @@ type SwitchOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function SwitchRoot(props: SwitchRootProps & SwitchOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
|
|
12
|
+
/** The complete switch behind one on/off state and its label. */
|
|
13
|
+
export interface SwitchFacadeProps {
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
defaultValue?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
/** One rung for the thumb; the track travels with it. */
|
|
22
|
+
size?: "sm" | "md" | "lg";
|
|
23
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
declare function SwitchFacade(props: SwitchFacadeProps): import("solid-js").JSX.Element;
|
|
26
|
+
type SwitchParts = Omit<typeof Switch$1, "Root"> & {
|
|
13
27
|
Root: typeof SwitchRoot;
|
|
14
28
|
};
|
|
29
|
+
export declare const Switch: typeof SwitchFacade & SwitchParts;
|
|
15
30
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
5
|
+
import { Show, splitProps } from "solid-js";
|
|
6
6
|
import { Switch as Switch$1 } from "@ark-ui/solid/switch";
|
|
7
7
|
//#region src/components/switch/index.tsx
|
|
8
8
|
function SwitchRoot(props) {
|
|
@@ -17,7 +17,52 @@ function SwitchRoot(props) {
|
|
|
17
17
|
}
|
|
18
18
|
}));
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
function SwitchFacade(props) {
|
|
21
|
+
injectComponentStyle("switch");
|
|
22
|
+
return createComponent(SwitchRoot, mergeProps({
|
|
23
|
+
get size() {
|
|
24
|
+
return props.size ?? "md";
|
|
25
|
+
},
|
|
26
|
+
get disabled() {
|
|
27
|
+
return props.disabled;
|
|
28
|
+
},
|
|
29
|
+
get invalid() {
|
|
30
|
+
return props.invalid;
|
|
31
|
+
},
|
|
32
|
+
get readOnly() {
|
|
33
|
+
return props.readOnly;
|
|
34
|
+
},
|
|
35
|
+
get required() {
|
|
36
|
+
return props.required;
|
|
37
|
+
},
|
|
38
|
+
get defaultChecked() {
|
|
39
|
+
return props.defaultValue ?? false;
|
|
40
|
+
}
|
|
41
|
+
}, () => {
|
|
42
|
+
return props.checked === void 0 ? {} : { checked: props.checked };
|
|
43
|
+
}, {
|
|
44
|
+
onCheckedChange: (details) => props.onCheckedChange?.(details.checked),
|
|
45
|
+
get children() {
|
|
46
|
+
return [
|
|
47
|
+
createComponent(Switch$1.Control, { get children() {
|
|
48
|
+
return createComponent(Switch$1.Thumb, {});
|
|
49
|
+
} }),
|
|
50
|
+
createComponent(Show, {
|
|
51
|
+
get when() {
|
|
52
|
+
return props.label;
|
|
53
|
+
},
|
|
54
|
+
get children() {
|
|
55
|
+
return createComponent(Switch$1.Label, { get children() {
|
|
56
|
+
return props.label;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
createComponent(Switch$1.HiddenInput, {})
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
const Switch = defineFamily(SwitchFacade, {
|
|
21
66
|
...Switch$1,
|
|
22
67
|
Root: SwitchRoot
|
|
23
68
|
});
|
|
@@ -58,6 +58,8 @@ export interface DataTableProps {
|
|
|
58
58
|
pageSizeOptions?: number[];
|
|
59
59
|
/** Keep the (optional) footer row pinned to the viewport bottom. */
|
|
60
60
|
stickyFooter?: boolean;
|
|
61
|
+
/** Band every other body row so wide measures keep the eye on line. */
|
|
62
|
+
striped?: boolean;
|
|
61
63
|
initialSorting?: SortingState;
|
|
62
64
|
globalFilterPlaceholder?: string;
|
|
63
65
|
emptyText?: string;
|
|
@@ -866,19 +866,21 @@ const DataTable = withSelfRoot(function DataTable(props) {
|
|
|
866
866
|
effect(() => {
|
|
867
867
|
return {
|
|
868
868
|
e: props.reorderable || void 0,
|
|
869
|
-
t:
|
|
870
|
-
a:
|
|
871
|
-
o:
|
|
872
|
-
i:
|
|
873
|
-
n:
|
|
869
|
+
t: props.striped || void 0,
|
|
870
|
+
a: `calc(${baseRowHeight()}px * var(--bs-density-scale, 1))`,
|
|
871
|
+
o: colsTemplate(),
|
|
872
|
+
i: mergeMode() || void 0,
|
|
873
|
+
n: virtual() || void 0,
|
|
874
|
+
s: readShallow(virtual() ? { "--bs-table-virtual-total": `${totalSize()}px` } : void 0)
|
|
874
875
|
};
|
|
875
|
-
}, ({ e, t, a, o, i, n }, _p$) => {
|
|
876
|
+
}, ({ e, t, a, o, i, n, s }, _p$) => {
|
|
876
877
|
e !== _p$?.e && setAttribute(_el$11, "data-reorderable", e);
|
|
877
|
-
t !== _p$?.t &&
|
|
878
|
-
a !== _p$?.a && setStyleProperty(_el$
|
|
879
|
-
o !== _p$?.o &&
|
|
880
|
-
i !== _p$?.i && setAttribute(_el$15, "data-
|
|
881
|
-
|
|
878
|
+
t !== _p$?.t && setAttribute(_el$11, "data-striped", t);
|
|
879
|
+
a !== _p$?.a && setStyleProperty(_el$11, "--bs-table-row-height", a);
|
|
880
|
+
o !== _p$?.o && setStyleProperty(_el$13, "--bs-table-cols", o);
|
|
881
|
+
i !== _p$?.i && setAttribute(_el$15, "data-merge", i);
|
|
882
|
+
n !== _p$?.n && setAttribute(_el$15, "data-virtual", n);
|
|
883
|
+
style(_el$15, s, _p$?.s);
|
|
882
884
|
});
|
|
883
885
|
return _el$11;
|
|
884
886
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/tag/index.d.ts
|
|
3
|
+
type TagTone = "ink" | "primary" | "success" | "warning" | "danger" | "info";
|
|
4
|
+
type TagVariant = "solid" | "outline" | "subtle";
|
|
5
|
+
export interface TagProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "ref"> {
|
|
6
|
+
/** The pigment the tag is inked with; ink is the solemn default,
|
|
7
|
+
* and the fixed pigments speak for their meaning. */
|
|
8
|
+
tone?: TagTone;
|
|
9
|
+
/** How the tag rests: a solid fill, an outline shell, a subtle
|
|
10
|
+
* wash. The pressed state always reads as solid. */
|
|
11
|
+
variant?: TagVariant;
|
|
12
|
+
/** Render the tag as a pressed button the consumer can toggle. */
|
|
13
|
+
checkable?: boolean;
|
|
14
|
+
/** The pressed state held from outside; omit it and the tag keeps
|
|
15
|
+
* its own state from `defaultValue`. */
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
defaultValue?: boolean;
|
|
18
|
+
/** Render the quiet removal seal. */
|
|
19
|
+
closable?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Reports the next pressed state from a checkable tag. */
|
|
22
|
+
onValueChange?: (checked: boolean) => void;
|
|
23
|
+
/** Reports a dismissal from the removal seal. */
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const Tag: ((props: TagProps) => JSX.Element) & {
|
|
27
|
+
Root: (props: TagProps) => JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|