@bysages/solid 0.4.1 → 0.4.2
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 +108 -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/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,23 +1,122 @@
|
|
|
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
|
+
import { createComponent, effect, insert, memo, mergeProps, setStyleProperty, template } from "@solidjs/web";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
6
|
-
import { Progress as Progress$1 } from "@ark-ui/solid/progress";
|
|
5
|
+
import { Show, createMemo, splitProps } from "solid-js";
|
|
6
|
+
import { Progress as Progress$1, useProgressContext } from "@ark-ui/solid/progress";
|
|
7
7
|
//#region src/components/progress/index.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=progress data-part=view data-view=dashboard><div aria-hidden=true data-scope=progress data-part=dash-ring>`);
|
|
8
9
|
function ProgressRoot(props) {
|
|
9
|
-
|
|
10
|
-
const
|
|
10
|
+
injectComponentStyle("progress");
|
|
11
|
+
const [own, rest] = splitProps(props, [
|
|
12
|
+
"id",
|
|
13
|
+
"size",
|
|
14
|
+
"variant",
|
|
15
|
+
"label",
|
|
16
|
+
"value",
|
|
17
|
+
"defaultValue",
|
|
18
|
+
"min",
|
|
19
|
+
"max"
|
|
20
|
+
]);
|
|
21
|
+
const id = useElementId("progress", () => own.id);
|
|
22
|
+
const dashboardPercent = createMemo(() => {
|
|
23
|
+
const min = own.min ?? 0;
|
|
24
|
+
const max = own.max ?? 100;
|
|
25
|
+
const percent = ((own.value ?? own.defaultValue ?? min + (max - min) / 2) - min) / (max - min) * 100;
|
|
26
|
+
return !Number.isFinite(percent) ? 0 : Math.min(100, Math.max(0, percent));
|
|
27
|
+
});
|
|
11
28
|
return createComponent(Progress$1.Root, mergeProps(rest, {
|
|
12
29
|
get id() {
|
|
13
30
|
return id();
|
|
14
31
|
},
|
|
15
32
|
get "data-size"() {
|
|
16
33
|
return own.size ?? "md";
|
|
34
|
+
},
|
|
35
|
+
get "data-variant"() {
|
|
36
|
+
return own.variant ?? "linear";
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
return createComponent(Show, {
|
|
40
|
+
get when() {
|
|
41
|
+
return own.variant === "dashboard";
|
|
42
|
+
},
|
|
43
|
+
get fallback() {
|
|
44
|
+
return rest.children;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return [memo(() => {
|
|
48
|
+
return memo(() => {
|
|
49
|
+
return !!own.label;
|
|
50
|
+
})() ? createComponent(Progress$1.Label, { get children() {
|
|
51
|
+
return own.label;
|
|
52
|
+
} }) : null;
|
|
53
|
+
}), (() => {
|
|
54
|
+
var _el$ = _tmpl$();
|
|
55
|
+
var _el$2 = _el$.firstChild;
|
|
56
|
+
insert(_el$, createComponent(Progress$1.ValueText, {}), null);
|
|
57
|
+
effect(() => String(dashboardPercent()), (_v$) => {
|
|
58
|
+
setStyleProperty(_el$2, "--percent", _v$);
|
|
59
|
+
});
|
|
60
|
+
return _el$;
|
|
61
|
+
})()];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function ProgressCircleView() {
|
|
68
|
+
const progress = useProgressContext();
|
|
69
|
+
const value = progress().value;
|
|
70
|
+
const max = progress().max;
|
|
71
|
+
const state = value === null ? "indeterminate" : value === max ? "complete" : "loading";
|
|
72
|
+
return createComponent(Progress$1.View, {
|
|
73
|
+
state,
|
|
74
|
+
get children() {
|
|
75
|
+
return createComponent(Progress$1.Circle, { get children() {
|
|
76
|
+
return createComponent(Progress$1.CircleRange, {});
|
|
77
|
+
} });
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** The complete progress behind one value: a labelled linear groove by
|
|
82
|
+
* default, with circular and dashboard dials for compact status. */
|
|
83
|
+
function ProgressFacade(props) {
|
|
84
|
+
const variant = () => props.variant ?? "linear";
|
|
85
|
+
return createComponent(ProgressRoot, mergeProps({
|
|
86
|
+
get size() {
|
|
87
|
+
return props.size ?? "md";
|
|
88
|
+
},
|
|
89
|
+
get variant() {
|
|
90
|
+
return variant();
|
|
91
|
+
},
|
|
92
|
+
get label() {
|
|
93
|
+
return props.label;
|
|
94
|
+
},
|
|
95
|
+
get defaultValue() {
|
|
96
|
+
return props.defaultValue;
|
|
97
|
+
},
|
|
98
|
+
get min() {
|
|
99
|
+
return props.min;
|
|
100
|
+
},
|
|
101
|
+
get max() {
|
|
102
|
+
return props.max;
|
|
103
|
+
}
|
|
104
|
+
}, () => {
|
|
105
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
106
|
+
}, {
|
|
107
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
108
|
+
get children() {
|
|
109
|
+
return memo(() => {
|
|
110
|
+
return variant() === "dashboard";
|
|
111
|
+
})() ? null : [props.label ? createComponent(Progress$1.Label, { get children() {
|
|
112
|
+
return props.label;
|
|
113
|
+
} }) : null, variant() === "circle" ? createComponent(ProgressCircleView, {}) : createComponent(Progress$1.Track, { get children() {
|
|
114
|
+
return createComponent(Progress$1.Range, {});
|
|
115
|
+
} })];
|
|
17
116
|
}
|
|
18
117
|
}));
|
|
19
118
|
}
|
|
20
|
-
const Progress = defineFamily(
|
|
119
|
+
const Progress = defineFamily(ProgressFacade, {
|
|
21
120
|
...Progress$1,
|
|
22
121
|
Root: ProgressRoot
|
|
23
122
|
});
|
|
@@ -6,7 +6,14 @@ import { QrCode as QrCode$1 } from "@ark-ui/solid/qr-code";
|
|
|
6
6
|
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
7
7
|
* DownloadTrigger. */
|
|
8
8
|
declare function QrCodeRoot(props: ComponentProps<typeof QrCode$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
-
export
|
|
9
|
+
export interface QrCodeFacadeProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/** The complete printable code behind one payload. */
|
|
15
|
+
declare function QrCodeFacade(props: QrCodeFacadeProps): import("solid-js").JSX.Element;
|
|
16
|
+
export declare const QrCode: typeof QrCodeFacade & Omit<typeof QrCode$1, "Root"> & {
|
|
10
17
|
Root: typeof QrCodeRoot;
|
|
11
18
|
};
|
|
12
19
|
//#endregion
|
|
@@ -1,20 +1,37 @@
|
|
|
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 { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
6
|
import { QrCode as QrCode$1 } from "@ark-ui/solid/qr-code";
|
|
6
|
-
//#region src/components/qr-code/index.
|
|
7
|
+
//#region src/components/qr-code/index.tsx
|
|
7
8
|
/** Ark's QrCode, dressed in the paper-and-ink system: the pattern prints in
|
|
8
9
|
* ink on the page, with an optional paper badge and a seal-cut download
|
|
9
10
|
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
10
11
|
* DownloadTrigger. */
|
|
11
12
|
function QrCodeRoot(props) {
|
|
12
13
|
const id = useElementId("qr-code", () => props.id);
|
|
13
|
-
return createComponent(QrCode$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return createComponent$1(QrCode$1.Root, mergeProps$1(props, { get id() {
|
|
14
15
|
return id();
|
|
15
16
|
} }));
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
/** The complete printable code behind one payload. */
|
|
19
|
+
function QrCodeFacade(props) {
|
|
20
|
+
injectComponentStyle("qr-code");
|
|
21
|
+
return createComponent(QrCodeRoot, mergeProps({ get defaultValue() {
|
|
22
|
+
return props.defaultValue;
|
|
23
|
+
} }, () => {
|
|
24
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
25
|
+
}, {
|
|
26
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
27
|
+
get children() {
|
|
28
|
+
return createComponent(QrCode$1.Frame, { get children() {
|
|
29
|
+
return createComponent(QrCode$1.Pattern, {});
|
|
30
|
+
} });
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
const QrCode = defineFamily(QrCodeFacade, {
|
|
18
35
|
...QrCode$1,
|
|
19
36
|
Root: QrCodeRoot
|
|
20
37
|
});
|
|
@@ -9,7 +9,29 @@ type RadioGroupOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function RadioGroupRoot(props: RadioGroupRootProps & RadioGroupOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export
|
|
12
|
+
export type RadioGroupItem = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** The complete radio group behind one choice and its named rows. */
|
|
18
|
+
export interface RadioGroupFacadeProps {
|
|
19
|
+
value?: string;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
items: RadioGroupItem[];
|
|
22
|
+
label?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
invalid?: boolean;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
orientation?: "horizontal" | "vertical";
|
|
28
|
+
/** One rung for the dial; the chosen dot rides it. */
|
|
29
|
+
size?: "sm" | "md" | "lg";
|
|
30
|
+
onValueChange?: (value: string) => void;
|
|
31
|
+
}
|
|
32
|
+
declare function RadioGroupFacade(props: RadioGroupFacadeProps): import("solid-js").JSX.Element;
|
|
33
|
+
type RadioGroupParts = Omit<typeof RadioGroup$1, "Root"> & {
|
|
13
34
|
Root: typeof RadioGroupRoot;
|
|
14
35
|
};
|
|
36
|
+
export declare const RadioGroup: typeof RadioGroupFacade & RadioGroupParts;
|
|
15
37
|
//#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 { For, Show, splitProps } from "solid-js";
|
|
6
6
|
import { RadioGroup as RadioGroup$1 } from "@ark-ui/solid/radio-group";
|
|
7
7
|
//#region src/components/radio-group/index.tsx
|
|
8
8
|
function RadioGroupRoot(props) {
|
|
@@ -17,7 +17,70 @@ function RadioGroupRoot(props) {
|
|
|
17
17
|
}
|
|
18
18
|
}));
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
function RadioGroupFacade(props) {
|
|
21
|
+
injectComponentStyle("radio-group");
|
|
22
|
+
return createComponent(RadioGroupRoot, 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 orientation() {
|
|
39
|
+
return props.orientation ?? "vertical";
|
|
40
|
+
},
|
|
41
|
+
get defaultValue() {
|
|
42
|
+
return props.defaultValue;
|
|
43
|
+
}
|
|
44
|
+
}, () => {
|
|
45
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
46
|
+
}, {
|
|
47
|
+
onValueChange: (details) => props.onValueChange?.(details.value ?? ""),
|
|
48
|
+
get children() {
|
|
49
|
+
return [createComponent(Show, {
|
|
50
|
+
get when() {
|
|
51
|
+
return props.label;
|
|
52
|
+
},
|
|
53
|
+
get children() {
|
|
54
|
+
return createComponent(RadioGroup$1.Label, { get children() {
|
|
55
|
+
return props.label;
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
}), createComponent(For, {
|
|
59
|
+
get each() {
|
|
60
|
+
return props.items;
|
|
61
|
+
},
|
|
62
|
+
children: (item) => createComponent(RadioGroup$1.Item, {
|
|
63
|
+
get value() {
|
|
64
|
+
return item.value;
|
|
65
|
+
},
|
|
66
|
+
get disabled() {
|
|
67
|
+
return item.disabled;
|
|
68
|
+
},
|
|
69
|
+
get children() {
|
|
70
|
+
return [
|
|
71
|
+
createComponent(RadioGroup$1.ItemControl, {}),
|
|
72
|
+
createComponent(RadioGroup$1.ItemText, { get children() {
|
|
73
|
+
return item.label;
|
|
74
|
+
} }),
|
|
75
|
+
createComponent(RadioGroup$1.ItemHiddenInput, {})
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
})];
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
const RadioGroup = defineFamily(RadioGroupFacade, {
|
|
21
84
|
...RadioGroup$1,
|
|
22
85
|
Root: RadioGroupRoot
|
|
23
86
|
});
|
|
@@ -9,7 +9,21 @@ type RatingGroupOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function RatingGroupRoot(props: RatingGroupRootProps & RatingGroupOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
|
|
12
|
+
/** The complete whole-star rating behind one numeric value. */
|
|
13
|
+
export interface RatingGroupFacadeProps {
|
|
14
|
+
value?: number;
|
|
15
|
+
defaultValue?: number;
|
|
16
|
+
label?: string;
|
|
17
|
+
count?: number;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
/** One rung of the control-height ladder every seal stands on. */
|
|
21
|
+
size?: "sm" | "md" | "lg";
|
|
22
|
+
onValueChange?: (value: number) => void;
|
|
23
|
+
}
|
|
24
|
+
declare function RatingGroupFacade(props: RatingGroupFacadeProps): import("solid-js").JSX.Element;
|
|
25
|
+
type RatingGroupParts = Omit<typeof RatingGroup$1, "Root"> & {
|
|
13
26
|
Root: typeof RatingGroupRoot;
|
|
14
27
|
};
|
|
28
|
+
export declare const RatingGroup: typeof RatingGroupFacade & RatingGroupParts;
|
|
15
29
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
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";
|
|
3
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
6
|
+
import { For, Show, splitProps } from "solid-js";
|
|
6
7
|
import { RatingGroup as RatingGroup$1 } from "@ark-ui/solid/rating-group";
|
|
7
8
|
//#region src/components/rating-group/index.tsx
|
|
8
9
|
function RatingGroupRoot(props) {
|
|
@@ -17,7 +18,55 @@ function RatingGroupRoot(props) {
|
|
|
17
18
|
}
|
|
18
19
|
}));
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
function RatingGroupFacade(props) {
|
|
22
|
+
injectComponentStyle("rating-group");
|
|
23
|
+
return createComponent(RatingGroupRoot, mergeProps({
|
|
24
|
+
get size() {
|
|
25
|
+
return props.size ?? "md";
|
|
26
|
+
},
|
|
27
|
+
get count() {
|
|
28
|
+
return props.count ?? 5;
|
|
29
|
+
},
|
|
30
|
+
get disabled() {
|
|
31
|
+
return props.disabled;
|
|
32
|
+
},
|
|
33
|
+
get readOnly() {
|
|
34
|
+
return props.readOnly;
|
|
35
|
+
},
|
|
36
|
+
get defaultValue() {
|
|
37
|
+
return props.defaultValue ?? 0;
|
|
38
|
+
}
|
|
39
|
+
}, () => {
|
|
40
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
41
|
+
}, {
|
|
42
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
43
|
+
get children() {
|
|
44
|
+
return [createComponent(Show, {
|
|
45
|
+
get when() {
|
|
46
|
+
return props.label;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return createComponent(RatingGroup$1.Label, { get children() {
|
|
50
|
+
return props.label;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
}), createComponent(RatingGroup$1.Control, { get children() {
|
|
54
|
+
return [createComponent(RatingGroup$1.Context, { children: (context) => createComponent(For, {
|
|
55
|
+
get each() {
|
|
56
|
+
return context().items;
|
|
57
|
+
},
|
|
58
|
+
children: (item) => createComponent(RatingGroup$1.Item, {
|
|
59
|
+
index: item,
|
|
60
|
+
get children() {
|
|
61
|
+
return iconNode("star");
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}) }), createComponent(RatingGroup$1.HiddenInput, {})];
|
|
65
|
+
} })];
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
const RatingGroup = defineFamily(RatingGroupFacade, {
|
|
21
70
|
...RatingGroup$1,
|
|
22
71
|
Root: RatingGroupRoot
|
|
23
72
|
});
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { ComponentProps } from "solid-js";
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
2
2
|
import { ScrollArea as ScrollArea$1 } from "@ark-ui/solid/scroll-area";
|
|
3
3
|
//#region src/components/scroll-area/index.d.ts
|
|
4
4
|
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
5
5
|
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
6
6
|
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
7
|
-
declare function ScrollAreaRoot(props: ComponentProps<typeof ScrollArea$1.Root>):
|
|
8
|
-
export
|
|
7
|
+
declare function ScrollAreaRoot(props: ComponentProps<typeof ScrollArea$1.Root>): JSX.Element;
|
|
8
|
+
export interface ScrollAreaFacadeProps {
|
|
9
|
+
class?: string;
|
|
10
|
+
orientation?: "vertical" | "horizontal" | "both";
|
|
11
|
+
children?: JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
/** The complete scroll vessel around caller content, with one or both quiet
|
|
14
|
+
* lanes depending on orientation. */
|
|
15
|
+
declare function ScrollAreaFacade(props: ScrollAreaFacadeProps): JSX.Element;
|
|
16
|
+
export declare const ScrollArea: typeof ScrollAreaFacade & Omit<typeof ScrollArea$1, "Root"> & {
|
|
9
17
|
Root: typeof ScrollAreaRoot;
|
|
10
18
|
};
|
|
11
19
|
//#endregion
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { createComponent } from "@solidjs/web";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
-
import { createComponent, mergeProps } from "solid-js";
|
|
5
|
+
import { For, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
6
|
import { ScrollArea as ScrollArea$1 } from "@ark-ui/solid/scroll-area";
|
|
6
|
-
//#region src/components/scroll-area/index.
|
|
7
|
+
//#region src/components/scroll-area/index.tsx
|
|
7
8
|
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
8
9
|
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
9
10
|
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
10
11
|
function ScrollAreaRoot(props) {
|
|
11
12
|
const id = useElementId("scroll-area", () => props.id);
|
|
12
|
-
return createComponent(ScrollArea$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return createComponent$1(ScrollArea$1.Root, mergeProps$1(props, { get id() {
|
|
13
14
|
return id();
|
|
14
15
|
} }));
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
/** The complete scroll vessel around caller content, with one or both quiet
|
|
18
|
+
* lanes depending on orientation. */
|
|
19
|
+
function ScrollAreaFacade(props) {
|
|
20
|
+
const orientations = () => props.orientation === "both" ? ["vertical", "horizontal"] : [props.orientation ?? "vertical"];
|
|
21
|
+
return createComponent(ScrollAreaRoot, {
|
|
22
|
+
get "class"() {
|
|
23
|
+
return props.class;
|
|
24
|
+
},
|
|
25
|
+
get children() {
|
|
26
|
+
return [
|
|
27
|
+
createComponent(ScrollArea$1.Viewport, { get children() {
|
|
28
|
+
return createComponent(ScrollArea$1.Content, { get children() {
|
|
29
|
+
return props.children;
|
|
30
|
+
} });
|
|
31
|
+
} }),
|
|
32
|
+
createComponent(For, {
|
|
33
|
+
get each() {
|
|
34
|
+
return orientations();
|
|
35
|
+
},
|
|
36
|
+
children: (orientation) => createComponent(ScrollArea$1.Scrollbar, {
|
|
37
|
+
orientation,
|
|
38
|
+
get children() {
|
|
39
|
+
return createComponent(ScrollArea$1.Thumb, {});
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
createComponent(ScrollArea$1.Corner, {})
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const ScrollArea = defineFamily(ScrollAreaFacade, {
|
|
17
49
|
...ScrollArea$1,
|
|
18
50
|
Root: ScrollAreaRoot
|
|
19
51
|
});
|
|
@@ -8,10 +8,33 @@ type SegmentGroupOwnProps = {
|
|
|
8
8
|
size?: "sm" | "md" | "lg";
|
|
9
9
|
};
|
|
10
10
|
declare function SegmentGroupRoot(props: SegmentGroupRootProps & SegmentGroupOwnProps): import("solid-js").JSX.Element;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export type SegmentGroupItem = {
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** The complete segmented choice behind one value and its named seals. */
|
|
17
|
+
export interface SegmentGroupFacadeProps {
|
|
18
|
+
value?: string;
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
items: SegmentGroupItem[];
|
|
21
|
+
label?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
/** One rung of the control-height ladder for the segments. The
|
|
25
|
+
* family keeps its compact register, so the rungs sit one notch
|
|
26
|
+
* below the global ladder - the default md rests at the small
|
|
27
|
+
* height. */
|
|
28
|
+
size?: "sm" | "md" | "lg";
|
|
29
|
+
/** The tray reads as one row of seals; the underlying machine
|
|
30
|
+
* defaults to a vertical stack, so the horizontal row is ours to
|
|
31
|
+
* assert. */
|
|
32
|
+
orientation?: "horizontal" | "vertical";
|
|
33
|
+
onValueChange?: (value: string) => void;
|
|
34
|
+
}
|
|
35
|
+
declare function SegmentGroupFacade(props: SegmentGroupFacadeProps): import("solid-js").JSX.Element;
|
|
36
|
+
type SegmentGroupParts = Omit<typeof SegmentGroup$1, "Root"> & {
|
|
15
37
|
Root: typeof SegmentGroupRoot;
|
|
16
38
|
};
|
|
39
|
+
export declare const SegmentGroup: typeof SegmentGroupFacade & SegmentGroupParts;
|
|
17
40
|
//#endregion
|
|
@@ -1,13 +1,14 @@
|
|
|
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, splitProps } from "solid-js";
|
|
5
|
+
import { For, Show, createComponent as createComponent$1, mergeProps as mergeProps$1, splitProps } from "solid-js";
|
|
5
6
|
import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/solid/segment-group";
|
|
6
7
|
//#region src/components/segment-group/index.tsx
|
|
7
8
|
function SegmentGroupRoot(props) {
|
|
8
9
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
10
|
const id = useElementId("segment-group", () => rest.id);
|
|
10
|
-
return createComponent(SegmentGroup$1.Root, mergeProps(rest, {
|
|
11
|
+
return createComponent$1(SegmentGroup$1.Root, mergeProps$1(rest, {
|
|
11
12
|
get "data-size"() {
|
|
12
13
|
return own.size ?? "md";
|
|
13
14
|
},
|
|
@@ -16,10 +17,68 @@ function SegmentGroupRoot(props) {
|
|
|
16
17
|
}
|
|
17
18
|
}));
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
function SegmentGroupFacade(props) {
|
|
21
|
+
injectComponentStyle("segment-group");
|
|
22
|
+
return createComponent(SegmentGroupRoot, mergeProps({
|
|
23
|
+
get size() {
|
|
24
|
+
return props.size ?? "md";
|
|
25
|
+
},
|
|
26
|
+
get disabled() {
|
|
27
|
+
return props.disabled;
|
|
28
|
+
},
|
|
29
|
+
get readOnly() {
|
|
30
|
+
return props.readOnly;
|
|
31
|
+
},
|
|
32
|
+
get orientation() {
|
|
33
|
+
return props.orientation ?? "horizontal";
|
|
34
|
+
},
|
|
35
|
+
get defaultValue() {
|
|
36
|
+
return props.defaultValue;
|
|
37
|
+
}
|
|
38
|
+
}, () => {
|
|
39
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
40
|
+
}, {
|
|
41
|
+
onValueChange: (details) => props.onValueChange?.(details.value ?? ""),
|
|
42
|
+
get children() {
|
|
43
|
+
return [
|
|
44
|
+
createComponent(Show, {
|
|
45
|
+
get when() {
|
|
46
|
+
return props.label;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return createComponent(SegmentGroup$1.Label, { get children() {
|
|
50
|
+
return props.label;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
createComponent(SegmentGroup$1.Indicator, {}),
|
|
55
|
+
createComponent(For, {
|
|
56
|
+
get each() {
|
|
57
|
+
return props.items;
|
|
58
|
+
},
|
|
59
|
+
children: (item) => createComponent(SegmentGroup$1.Item, {
|
|
60
|
+
get value() {
|
|
61
|
+
return item.value;
|
|
62
|
+
},
|
|
63
|
+
get disabled() {
|
|
64
|
+
return item.disabled;
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return [
|
|
68
|
+
createComponent(SegmentGroup$1.ItemText, { get children() {
|
|
69
|
+
return item.label;
|
|
70
|
+
} }),
|
|
71
|
+
createComponent(SegmentGroup$1.ItemControl, {}),
|
|
72
|
+
createComponent(SegmentGroup$1.ItemHiddenInput, {})
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
const SegmentGroup = defineFamily(SegmentGroupFacade, {
|
|
23
82
|
...SegmentGroup$1,
|
|
24
83
|
Root: SegmentGroupRoot
|
|
25
84
|
});
|
|
@@ -6,7 +6,22 @@ import { SignaturePad as SignaturePad$1 } from "@ark-ui/solid/signature-pad";
|
|
|
6
6
|
* The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
|
|
7
7
|
* ClearTrigger, HiddenInput, Context. */
|
|
8
8
|
declare function SignaturePadRoot(props: ComponentProps<typeof SignaturePad$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
-
|
|
9
|
+
/** The one-tag path: the paper, guide, clear control, and hidden form
|
|
10
|
+
* value; stroke previews and drawing events stay on the anatomy. */
|
|
11
|
+
export interface SignaturePadFacadeProps {
|
|
12
|
+
value?: string[];
|
|
13
|
+
defaultValue?: string[];
|
|
14
|
+
label?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Show the reset control. */
|
|
19
|
+
clearable?: boolean;
|
|
20
|
+
onValueChange?: (value: string[]) => void;
|
|
21
|
+
}
|
|
22
|
+
declare function SignaturePadFacade(props: SignaturePadFacadeProps): import("solid-js").JSX.Element;
|
|
23
|
+
type SignaturePadParts = Omit<typeof SignaturePad$1, "Root"> & {
|
|
10
24
|
Root: typeof SignaturePadRoot;
|
|
11
25
|
};
|
|
26
|
+
export declare const SignaturePad: typeof SignaturePadFacade & SignaturePadParts;
|
|
12
27
|
//#endregion
|