@bysages/solid 0.4.0 → 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/{ai-response-D2uINBIi.mjs → ai-response-CJ-uEAgj.mjs} +1 -1
- package/dist/components/accordion/index.mjs +1 -1
- package/dist/components/affix/index.mjs +3 -3
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +2 -2
- package/dist/components/ai-action/index.mjs +1 -1
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-message/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +38 -36
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +1 -1
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/alert/index.mjs +1 -1
- package/dist/components/angle-slider/index.d.mts +15 -1
- package/dist/components/angle-slider/index.mjs +58 -3
- package/dist/components/aspect-ratio/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +9 -3
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/avatar-group/index.mjs +1 -1
- package/dist/components/back-top/index.mjs +1 -1
- package/dist/components/badge/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.mjs +1 -1
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.mjs +1 -1
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +19 -7
- package/dist/components/calendar/index.mjs +213 -139
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +15 -1
- package/dist/components/carousel/index.mjs +69 -5
- package/dist/components/cascade-select/index.mjs +2 -2
- package/dist/components/checkbox/index.d.mts +16 -1
- package/dist/components/checkbox/index.mjs +54 -3
- package/dist/components/checkbox-group/index.d.mts +10 -3
- package/dist/components/checkbox-group/index.mjs +3 -3
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/chip/index.mjs +1 -1
- package/dist/components/clipboard/index.d.mts +14 -1
- package/dist/components/clipboard/index.mjs +58 -3
- package/dist/components/collapsible/index.mjs +1 -1
- package/dist/components/color-picker/index.mjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/command/index.mjs +1 -1
- package/dist/components/comment/index.mjs +1 -1
- package/dist/components/container/index.mjs +1 -1
- package/dist/components/data-view/index.mjs +1 -1
- package/dist/components/date-input/index.d.mts +16 -2
- package/dist/components/date-input/index.mjs +52 -3
- package/dist/components/date-picker/index.d.mts +27 -2
- package/dist/components/date-picker/index.mjs +153 -4
- package/dist/components/deferred-content/index.mjs +1 -1
- package/dist/components/descriptions/index.mjs +1 -1
- package/dist/components/dialog/index.mjs +1 -1
- package/dist/components/dock/index.mjs +1 -1
- package/dist/components/drawer/index.mjs +1 -1
- package/dist/components/dynamic-input/index.mjs +2 -2
- package/dist/components/editable/index.d.mts +17 -1
- package/dist/components/editable/index.mjs +81 -3
- package/dist/components/ellipsis/index.mjs +1 -1
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +16 -1
- package/dist/components/field/index.mjs +53 -5
- package/dist/components/fieldset/index.d.mts +15 -3
- package/dist/components/fieldset/index.mjs +47 -5
- package/dist/components/file-upload/index.d.mts +21 -1
- package/dist/components/file-upload/index.mjs +66 -3
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +15 -3
- package/dist/components/floating-panel/index.mjs +113 -5
- package/dist/components/form/index.d.mts +44 -2
- package/dist/components/form/index.mjs +1 -1
- package/dist/components/grid/index.mjs +1 -1
- package/dist/components/highlight/index.mjs +1 -1
- package/dist/components/hover-card/index.mjs +1 -1
- package/dist/components/icon/index.mjs +1 -1
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-cropper/index.d.mts +8 -1
- package/dist/components/image-cropper/index.mjs +43 -5
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +11 -2
- package/dist/components/json-tree-view/index.mjs +17 -2
- package/dist/components/kbd/index.mjs +1 -1
- package/dist/components/layout/index.mjs +1 -1
- package/dist/components/link/index.mjs +1 -1
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +21 -1
- package/dist/components/listbox/index.mjs +59 -4
- package/dist/components/marquee/index.d.mts +12 -1
- package/dist/components/marquee/index.mjs +46 -5
- package/dist/components/masonry/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +1 -1
- package/dist/components/menubar/index.mjs +1 -1
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +17 -1
- package/dist/components/navigation-menu/index.mjs +66 -6
- package/dist/components/number-input/index.d.mts +20 -1
- package/dist/components/number-input/index.mjs +72 -3
- package/dist/components/order-list/index.mjs +1 -1
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +22 -2
- package/dist/components/pagination/index.mjs +105 -6
- package/dist/components/password-input/index.d.mts +18 -1
- package/dist/components/password-input/index.mjs +57 -3
- package/dist/components/pin-input/index.d.mts +18 -1
- package/dist/components/pin-input/index.mjs +55 -3
- package/dist/components/popconfirm/index.mjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/progress/index.d.mts +19 -1
- package/dist/components/progress/index.mjs +106 -7
- package/dist/components/progress-group/index.mjs +1 -1
- package/dist/components/qr-code/index.d.mts +8 -1
- package/dist/components/qr-code/index.mjs +22 -5
- package/dist/components/radio-group/index.d.mts +23 -1
- package/dist/components/radio-group/index.mjs +66 -3
- package/dist/components/rating-group/index.d.mts +15 -1
- package/dist/components/rating-group/index.mjs +52 -3
- package/dist/components/result/index.mjs +1 -1
- package/dist/components/scroll-area/index.d.mts +11 -3
- package/dist/components/scroll-area/index.mjs +37 -5
- package/dist/components/segment-group/index.d.mts +27 -4
- package/dist/components/segment-group/index.mjs +66 -7
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.mjs +1 -1
- package/dist/components/signature-pad/index.d.mts +16 -1
- package/dist/components/signature-pad/index.mjs +64 -5
- package/dist/components/skeleton/index.mjs +1 -1
- package/dist/components/slider/index.d.mts +20 -1
- package/dist/components/slider/index.mjs +67 -3
- package/dist/components/spinner/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- package/dist/components/splitter/index.d.mts +15 -1
- package/dist/components/splitter/index.mjs +58 -5
- package/dist/components/spotlight/index.mjs +1 -1
- package/dist/components/stack/index.mjs +1 -1
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +10 -3
- package/dist/components/swap/index.d.mts +11 -3
- package/dist/components/swap/index.mjs +35 -5
- package/dist/components/switch/index.d.mts +16 -1
- package/dist/components/switch/index.mjs +48 -3
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.mjs +36 -14
- package/dist/components/tabs/index.mjs +1 -1
- 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 +83 -3
- package/dist/components/terminal/index.mjs +1 -1
- package/dist/components/textarea/index.mjs +1 -1
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +12 -1
- package/dist/components/timer/index.mjs +57 -5
- package/dist/components/toast/index.d.mts +10 -5
- package/dist/components/toast/index.mjs +38 -6
- 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 +27 -5
- package/dist/components/toggle-group/index.d.mts +23 -1
- package/dist/components/toggle-group/index.mjs +58 -4
- package/dist/components/toolbar/index.mjs +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tour/index.mjs +1 -1
- package/dist/components/transfer/index.mjs +2 -2
- package/dist/components/tree-select/index.mjs +2 -2
- package/dist/components/tree-view/index.d.mts +32 -2
- package/dist/components/tree-view/index.mjs +94 -5
- package/dist/components/typography/index.mjs +1 -1
- package/dist/components/user/index.mjs +1 -1
- package/dist/components/virtual-list/index.mjs +1 -1
- package/dist/components/watermark/index.mjs +1 -1
- package/dist/{image-viewer-B9A5lXsk.mjs → image-viewer-19s75Hz_.mjs} +1 -1
- package/dist/index-BU5U5w04.d.mts +35 -0
- package/dist/{index-nFXK_8hJ.d.mts → index-DVc1L_zt.d.mts} +138 -89
- package/dist/index.d.mts +44 -43
- package/dist/index.mjs +9 -8
- package/dist/{input-CPAJdwDb.mjs → input-BL3N3L8g.mjs} +1 -1
- package/dist/{media-player-BC8D_d29.mjs → media-player-yF7KVUxM.mjs} +2 -2
- package/dist/{mentions-CeG5u8Qm.mjs → mentions-DKUG7eHt.mjs} +1 -1
- package/dist/{select-7YjMSBGx.mjs → select-DI7pFspF.mjs} +1 -1
- package/dist/toc-DRHr8_eD.mjs +88 -0
- package/package.json +10 -82
- package/dist/index-B1-quIrl.d.mts +0 -1815
- package/dist/toc-DYKaKQ_X.mjs +0 -31
|
@@ -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
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
5
|
-
import {
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { Show, splitProps } from "solid-js";
|
|
6
7
|
import { Editable as Editable$1 } from "@ark-ui/solid/editable";
|
|
7
8
|
//#region src/components/editable/index.tsx
|
|
8
9
|
function EditableRoot(props) {
|
|
@@ -17,7 +18,84 @@ function EditableRoot(props) {
|
|
|
17
18
|
}
|
|
18
19
|
}));
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
/** The one-tag path: a named value with the house edit controls. Modes,
|
|
22
|
+
* custom triggers, and alternate editors stay on the anatomy. */
|
|
23
|
+
function EditableFacade(props) {
|
|
24
|
+
injectComponentStyle("editable");
|
|
25
|
+
return createComponent(EditableRoot, mergeProps({
|
|
26
|
+
get size() {
|
|
27
|
+
return props.size ?? "md";
|
|
28
|
+
},
|
|
29
|
+
get disabled() {
|
|
30
|
+
return props.disabled;
|
|
31
|
+
},
|
|
32
|
+
get invalid() {
|
|
33
|
+
return props.invalid;
|
|
34
|
+
},
|
|
35
|
+
get required() {
|
|
36
|
+
return props.required;
|
|
37
|
+
},
|
|
38
|
+
get placeholder() {
|
|
39
|
+
return props.placeholder;
|
|
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 [
|
|
50
|
+
createComponent(Show, {
|
|
51
|
+
get when() {
|
|
52
|
+
return props.label;
|
|
53
|
+
},
|
|
54
|
+
get children() {
|
|
55
|
+
return createComponent(Editable$1.Label, { get children() {
|
|
56
|
+
return props.label;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
createComponent(Editable$1.Area, { get children() {
|
|
61
|
+
return [createComponent(Editable$1.Preview, {}), createComponent(Editable$1.Input, {})];
|
|
62
|
+
} }),
|
|
63
|
+
createComponent(Editable$1.Control, { get children() {
|
|
64
|
+
return [
|
|
65
|
+
createComponent(Editable$1.EditTrigger, {
|
|
66
|
+
"aria-label": "Edit",
|
|
67
|
+
get children() {
|
|
68
|
+
return iconNode("pencil", {
|
|
69
|
+
width: 14,
|
|
70
|
+
height: 14
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
createComponent(Editable$1.SubmitTrigger, {
|
|
75
|
+
"aria-label": "Submit",
|
|
76
|
+
get children() {
|
|
77
|
+
return iconNode("check", {
|
|
78
|
+
width: 14,
|
|
79
|
+
height: 14
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
83
|
+
createComponent(Editable$1.CancelTrigger, {
|
|
84
|
+
"aria-label": "Cancel",
|
|
85
|
+
get children() {
|
|
86
|
+
return iconNode("x", {
|
|
87
|
+
width: 14,
|
|
88
|
+
height: 14
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
];
|
|
93
|
+
} })
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
const Editable = defineFamily(EditableFacade, {
|
|
21
99
|
...Editable$1,
|
|
22
100
|
Root: EditableRoot
|
|
23
101
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
2
|
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
5
|
//#region src/components/ellipsis/index.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
2
1
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
//#region src/components/empty/index.tsx
|
|
4
4
|
/** An empty state: the page holds its breath. Root centers the column,
|
|
5
5
|
* Visual carries the mark, Title and Description carry the ink, Actions
|
|
@@ -6,7 +6,22 @@ import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
|
6
6
|
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
7
7
|
* RequiredIndicator. */
|
|
8
8
|
declare function FieldRoot(props: ComponentProps<typeof Field$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
-
|
|
9
|
+
/** The one-tag path for a simple text field; textarea, select, and
|
|
10
|
+
* custom controls keep the anatomy. */
|
|
11
|
+
export interface FieldFacadeProps {
|
|
12
|
+
value?: string | number;
|
|
13
|
+
defaultValue?: string | number;
|
|
14
|
+
label?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
onValueChange?: (value: string) => void;
|
|
21
|
+
}
|
|
22
|
+
declare function FieldFacade(props: FieldFacadeProps): import("solid-js").JSX.Element;
|
|
23
|
+
type FieldParts = Omit<typeof Field$1, "Root"> & {
|
|
10
24
|
Root: typeof FieldRoot;
|
|
11
25
|
};
|
|
26
|
+
export declare const Field: typeof FieldFacade & FieldParts;
|
|
12
27
|
//#endregion
|
|
@@ -1,20 +1,68 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { createComponent } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
+
import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
6
|
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
6
|
-
//#region src/components/field/index.
|
|
7
|
+
//#region src/components/field/index.tsx
|
|
7
8
|
/** Ark's Field, dressed in the paper-and-ink system: a tracked label, a
|
|
8
9
|
* border-and-halo control, and quiet help text. The API is Ark's own —
|
|
9
10
|
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
10
11
|
* RequiredIndicator. */
|
|
11
12
|
function FieldRoot(props) {
|
|
12
13
|
const id = useElementId("field", () => props.id);
|
|
13
|
-
return createComponent(Field$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return createComponent$1(Field$1.Root, mergeProps$1(props, { get id() {
|
|
14
15
|
return id();
|
|
15
16
|
} }));
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
function FieldFacade(props) {
|
|
19
|
+
injectComponentStyle("field");
|
|
20
|
+
return createComponent(FieldRoot, {
|
|
21
|
+
get disabled() {
|
|
22
|
+
return props.disabled;
|
|
23
|
+
},
|
|
24
|
+
get invalid() {
|
|
25
|
+
return props.invalid;
|
|
26
|
+
},
|
|
27
|
+
get required() {
|
|
28
|
+
return props.required;
|
|
29
|
+
},
|
|
30
|
+
get children() {
|
|
31
|
+
return [
|
|
32
|
+
createComponent(Show, {
|
|
33
|
+
get when() {
|
|
34
|
+
return props.label;
|
|
35
|
+
},
|
|
36
|
+
get children() {
|
|
37
|
+
return createComponent(Field$1.Label, { get children() {
|
|
38
|
+
return props.label;
|
|
39
|
+
} });
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
createComponent(Field$1.Input, {
|
|
43
|
+
get placeholder() {
|
|
44
|
+
return props.placeholder;
|
|
45
|
+
},
|
|
46
|
+
get value() {
|
|
47
|
+
return props.value ?? props.defaultValue;
|
|
48
|
+
},
|
|
49
|
+
onInput: (event) => props.onValueChange?.(event.currentTarget.value)
|
|
50
|
+
}),
|
|
51
|
+
createComponent(Show, {
|
|
52
|
+
get when() {
|
|
53
|
+
return props.description;
|
|
54
|
+
},
|
|
55
|
+
get children() {
|
|
56
|
+
return createComponent(Field$1.HelperText, { get children() {
|
|
57
|
+
return props.description;
|
|
58
|
+
} });
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const Field = defineFamily(FieldFacade, {
|
|
18
66
|
...Field$1,
|
|
19
67
|
Root: FieldRoot
|
|
20
68
|
});
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { ComponentProps } from "solid-js";
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
2
2
|
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
3
3
|
//#region src/components/fieldset/index.d.ts
|
|
4
4
|
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
5
5
|
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
6
6
|
* HelperText, ErrorText. */
|
|
7
|
-
declare function FieldsetRoot(props: ComponentProps<typeof Fieldset$1.Root>):
|
|
8
|
-
|
|
7
|
+
declare function FieldsetRoot(props: ComponentProps<typeof Fieldset$1.Root>): JSX.Element;
|
|
8
|
+
/** The one-tag path: one label and optional description around the
|
|
9
|
+
* caller's controls; compound or bespoke groups keep the anatomy. */
|
|
10
|
+
export interface FieldsetFacadeProps {
|
|
11
|
+
label?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
declare function FieldsetFacade(props: FieldsetFacadeProps): JSX.Element;
|
|
19
|
+
type FieldsetParts = Omit<typeof Fieldset$1, "Root"> & {
|
|
9
20
|
Root: typeof FieldsetRoot;
|
|
10
21
|
};
|
|
22
|
+
export declare const Fieldset: typeof FieldsetFacade & FieldsetParts;
|
|
11
23
|
//#endregion
|
|
@@ -1,19 +1,61 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { createComponent, memo } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
+
import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
6
|
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
6
|
-
//#region src/components/fieldset/index.
|
|
7
|
+
//#region src/components/fieldset/index.tsx
|
|
7
8
|
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
8
9
|
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
9
10
|
* HelperText, ErrorText. */
|
|
10
11
|
function FieldsetRoot(props) {
|
|
11
12
|
const id = useElementId("fieldset", () => props.id);
|
|
12
|
-
return createComponent(Fieldset$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return createComponent$1(Fieldset$1.Root, mergeProps$1(props, { get id() {
|
|
13
14
|
return id();
|
|
14
15
|
} }));
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
function FieldsetFacade(props) {
|
|
18
|
+
injectComponentStyle("fieldset");
|
|
19
|
+
return createComponent(FieldsetRoot, {
|
|
20
|
+
get disabled() {
|
|
21
|
+
return props.disabled;
|
|
22
|
+
},
|
|
23
|
+
get invalid() {
|
|
24
|
+
return props.invalid;
|
|
25
|
+
},
|
|
26
|
+
get "data-required"() {
|
|
27
|
+
return props.required || void 0;
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
return [
|
|
31
|
+
createComponent(Show, {
|
|
32
|
+
get when() {
|
|
33
|
+
return props.label;
|
|
34
|
+
},
|
|
35
|
+
get children() {
|
|
36
|
+
return createComponent(Fieldset$1.Legend, { get children() {
|
|
37
|
+
return props.label;
|
|
38
|
+
} });
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
memo(() => {
|
|
42
|
+
return props.children;
|
|
43
|
+
}),
|
|
44
|
+
createComponent(Show, {
|
|
45
|
+
get when() {
|
|
46
|
+
return props.description;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return createComponent(Fieldset$1.HelperText, { get children() {
|
|
50
|
+
return props.description;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const Fieldset = defineFamily(FieldsetFacade, {
|
|
17
59
|
...Fieldset$1,
|
|
18
60
|
Root: FieldsetRoot
|
|
19
61
|
});
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { FileUpload as FileUpload$1, FileUploadRootProps } from "@ark-ui/solid/file-upload";
|
|
2
3
|
//#region src/components/file-upload/index.d.ts
|
|
4
|
+
/** The inner trigger repeats the click binding the dropzone already
|
|
5
|
+
* owns: keyboard users enter through the dropzone, so the button
|
|
6
|
+
* leaves the tab order and the semantic tree entirely. */
|
|
7
|
+
declare function FileUploadTrigger(props: ComponentProps<typeof FileUpload$1.Trigger>): import("solid-js").JSX.Element;
|
|
3
8
|
/** Ark's FileUpload, dressed in the paper-and-ink system: a dashed
|
|
4
9
|
* dropzone that floods with subtle light on drag-over, and accepted files
|
|
5
10
|
* as loose hairline slips. The API is Ark's own — Root, Label, Trigger,
|
|
@@ -11,7 +16,22 @@ type FileUploadOwnProps = {
|
|
|
11
16
|
size?: "sm" | "md" | "lg";
|
|
12
17
|
};
|
|
13
18
|
declare function FileUploadRoot(props: FileUploadRootProps & FileUploadOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
|
|
19
|
+
/** The one-tag path: a labelled dropzone and its accepted slips; MIME
|
|
20
|
+
* rules, directories, and controlled files stay on the anatomy. */
|
|
21
|
+
export interface FileUploadFacadeProps {
|
|
22
|
+
label?: string;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
maxFiles?: number;
|
|
28
|
+
/** One rung of the control-height ladder for the trigger. */
|
|
29
|
+
size?: "sm" | "md" | "lg";
|
|
30
|
+
}
|
|
31
|
+
declare function FileUploadFacade(props: FileUploadFacadeProps): import("solid-js").JSX.Element;
|
|
32
|
+
type FileUploadParts = Omit<typeof FileUpload$1, "Root" | "Trigger"> & {
|
|
15
33
|
Root: typeof FileUploadRoot;
|
|
34
|
+
Trigger: typeof FileUploadTrigger;
|
|
16
35
|
};
|
|
36
|
+
export declare const FileUpload: typeof FileUploadFacade & FileUploadParts;
|
|
17
37
|
//#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
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
5
|
-
import {
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { For, Show, splitProps } from "solid-js";
|
|
6
7
|
import { FileUpload as FileUpload$1 } from "@ark-ui/solid/file-upload";
|
|
7
8
|
//#region src/components/file-upload/index.tsx
|
|
8
9
|
/** The inner trigger repeats the click binding the dropzone already
|
|
@@ -26,7 +27,69 @@ function FileUploadRoot(props) {
|
|
|
26
27
|
}
|
|
27
28
|
}));
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
function FileUploadFacade(props) {
|
|
31
|
+
injectComponentStyle("file-upload");
|
|
32
|
+
return createComponent(FileUploadRoot, {
|
|
33
|
+
get size() {
|
|
34
|
+
return props.size ?? "md";
|
|
35
|
+
},
|
|
36
|
+
get disabled() {
|
|
37
|
+
return props.disabled;
|
|
38
|
+
},
|
|
39
|
+
get invalid() {
|
|
40
|
+
return props.invalid;
|
|
41
|
+
},
|
|
42
|
+
get required() {
|
|
43
|
+
return props.required;
|
|
44
|
+
},
|
|
45
|
+
get maxFiles() {
|
|
46
|
+
return props.maxFiles;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return [
|
|
50
|
+
createComponent(Show, {
|
|
51
|
+
get when() {
|
|
52
|
+
return props.label;
|
|
53
|
+
},
|
|
54
|
+
get children() {
|
|
55
|
+
return createComponent(FileUpload$1.Label, { get children() {
|
|
56
|
+
return props.label;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
createComponent(FileUpload$1.Dropzone, { get children() {
|
|
61
|
+
return createComponent(FileUploadTrigger, { get children() {
|
|
62
|
+
return props.placeholder ?? "Choose files";
|
|
63
|
+
} });
|
|
64
|
+
} }),
|
|
65
|
+
createComponent(FileUpload$1.ItemGroup, { get children() {
|
|
66
|
+
return createComponent(FileUpload$1.Context, { children: (context) => createComponent(For, {
|
|
67
|
+
get each() {
|
|
68
|
+
return context().acceptedFiles;
|
|
69
|
+
},
|
|
70
|
+
children: (file) => createComponent(FileUpload$1.Item, {
|
|
71
|
+
file,
|
|
72
|
+
get children() {
|
|
73
|
+
return [
|
|
74
|
+
createComponent(FileUpload$1.ItemPreview, { get children() {
|
|
75
|
+
return iconNode("file");
|
|
76
|
+
} }),
|
|
77
|
+
createComponent(FileUpload$1.ItemName, {}),
|
|
78
|
+
createComponent(FileUpload$1.ItemSizeText, {}),
|
|
79
|
+
createComponent(FileUpload$1.ItemDeleteTrigger, { get children() {
|
|
80
|
+
return iconNode("x");
|
|
81
|
+
} })
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}) });
|
|
86
|
+
} }),
|
|
87
|
+
createComponent(FileUpload$1.HiddenInput, {})
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const FileUpload = defineFamily(FileUploadFacade, {
|
|
30
93
|
...FileUpload$1,
|
|
31
94
|
Root: FileUploadRoot,
|
|
32
95
|
Trigger: FileUploadTrigger
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
2
|
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
3
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { createContext, createSignal, splitProps, useContext } from "solid-js";
|
|
6
6
|
//#region src/components/float-button/index.tsx
|
|
7
7
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from "solid-js";
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
2
2
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
3
3
|
//#region src/components/floating-panel/index.d.ts
|
|
4
4
|
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
@@ -6,8 +6,20 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
|
6
6
|
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
7
7
|
* Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
|
|
8
8
|
* Body. */
|
|
9
|
-
declare function FloatingPanelRoot(props: ComponentProps<typeof FloatingPanel$1.Root>):
|
|
10
|
-
export
|
|
9
|
+
declare function FloatingPanelRoot(props: ComponentProps<typeof FloatingPanel$1.Root>): JSX.Element;
|
|
10
|
+
export interface FloatingPanelFacadeProps {
|
|
11
|
+
open?: boolean;
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
trigger?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
label: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
children?: JSX.Element;
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
}
|
|
21
|
+
declare function FloatingPanelFacade(props: FloatingPanelFacadeProps): JSX.Element;
|
|
22
|
+
export declare const FloatingPanel: typeof FloatingPanelFacade & Omit<typeof FloatingPanel$1, "Root"> & {
|
|
11
23
|
Root: typeof FloatingPanelRoot;
|
|
12
24
|
};
|
|
13
25
|
//#endregion
|
|
@@ -1,9 +1,12 @@
|
|
|
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
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { For, Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
5
7
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
6
|
-
//#region src/components/floating-panel/index.
|
|
8
|
+
//#region src/components/floating-panel/index.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<p>`);
|
|
7
10
|
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
8
11
|
* popup vessel let loose — a draggable, resizable sheet whose header is the
|
|
9
12
|
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
@@ -11,11 +14,116 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
|
11
14
|
* Body. */
|
|
12
15
|
function FloatingPanelRoot(props) {
|
|
13
16
|
const id = useElementId("floating-panel", () => props.id);
|
|
14
|
-
return createComponent(FloatingPanel$1.Root, mergeProps(props, { get id() {
|
|
17
|
+
return createComponent$1(FloatingPanel$1.Root, mergeProps$1(props, { get id() {
|
|
15
18
|
return id();
|
|
16
19
|
} }));
|
|
17
20
|
}
|
|
18
|
-
const
|
|
21
|
+
const resizeAxes = [
|
|
22
|
+
"n",
|
|
23
|
+
"e",
|
|
24
|
+
"s",
|
|
25
|
+
"w",
|
|
26
|
+
"ne",
|
|
27
|
+
"se",
|
|
28
|
+
"sw",
|
|
29
|
+
"nw"
|
|
30
|
+
];
|
|
31
|
+
function FloatingPanelFacade(props) {
|
|
32
|
+
injectComponentStyle("floating-panel");
|
|
33
|
+
return createComponent(FloatingPanelRoot, mergeProps(() => {
|
|
34
|
+
return props.open === void 0 ? {} : { open: props.open };
|
|
35
|
+
}, () => {
|
|
36
|
+
return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
|
|
37
|
+
}, {
|
|
38
|
+
get disabled() {
|
|
39
|
+
return props.disabled;
|
|
40
|
+
},
|
|
41
|
+
onOpenChange: (details) => props.onOpenChange?.(details.open),
|
|
42
|
+
get children() {
|
|
43
|
+
return [createComponent(FloatingPanel$1.Trigger, { get children() {
|
|
44
|
+
return props.trigger ?? props.label;
|
|
45
|
+
} }), createComponent(FloatingPanel$1.Positioner, { get children() {
|
|
46
|
+
return createComponent(FloatingPanel$1.Content, { get children() {
|
|
47
|
+
return [
|
|
48
|
+
createComponent(FloatingPanel$1.DragTrigger, { get children() {
|
|
49
|
+
return createComponent(FloatingPanel$1.Header, { get children() {
|
|
50
|
+
return [createComponent(FloatingPanel$1.Title, { get children() {
|
|
51
|
+
return props.label;
|
|
52
|
+
} }), createComponent(FloatingPanel$1.Control, { get children() {
|
|
53
|
+
return [
|
|
54
|
+
createComponent(FloatingPanel$1.StageTrigger, {
|
|
55
|
+
stage: "minimized",
|
|
56
|
+
get children() {
|
|
57
|
+
return iconNode("minus");
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
createComponent(FloatingPanel$1.StageTrigger, {
|
|
61
|
+
stage: "maximized",
|
|
62
|
+
get children() {
|
|
63
|
+
return iconNode("maximize-2");
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
createComponent(FloatingPanel$1.StageTrigger, {
|
|
67
|
+
stage: "default",
|
|
68
|
+
"aria-label": "Restore",
|
|
69
|
+
get children() {
|
|
70
|
+
return iconNode("minimize-2");
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
createComponent(FloatingPanel$1.CloseTrigger, {
|
|
74
|
+
"aria-label": "Close",
|
|
75
|
+
get children() {
|
|
76
|
+
return iconNode("x");
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
];
|
|
80
|
+
} })];
|
|
81
|
+
} });
|
|
82
|
+
} }),
|
|
83
|
+
createComponent(FloatingPanel$1.Body, { get children() {
|
|
84
|
+
return [
|
|
85
|
+
createComponent(Show, {
|
|
86
|
+
get when() {
|
|
87
|
+
return props.description;
|
|
88
|
+
},
|
|
89
|
+
get children() {
|
|
90
|
+
var _el$ = _tmpl$();
|
|
91
|
+
insert(_el$, () => {
|
|
92
|
+
return props.description;
|
|
93
|
+
});
|
|
94
|
+
return _el$;
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
createComponent(Show, {
|
|
98
|
+
get when() {
|
|
99
|
+
return props.content;
|
|
100
|
+
},
|
|
101
|
+
get children() {
|
|
102
|
+
var _el$2 = _tmpl$();
|
|
103
|
+
insert(_el$2, () => {
|
|
104
|
+
return props.content;
|
|
105
|
+
});
|
|
106
|
+
return _el$2;
|
|
107
|
+
}
|
|
108
|
+
}),
|
|
109
|
+
memo(() => {
|
|
110
|
+
return props.children;
|
|
111
|
+
})
|
|
112
|
+
];
|
|
113
|
+
} }),
|
|
114
|
+
createComponent(For, {
|
|
115
|
+
get each() {
|
|
116
|
+
return [...resizeAxes];
|
|
117
|
+
},
|
|
118
|
+
children: (axis) => createComponent(FloatingPanel$1.ResizeTrigger, { axis })
|
|
119
|
+
})
|
|
120
|
+
];
|
|
121
|
+
} });
|
|
122
|
+
} })];
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
const FloatingPanel = defineFamily(FloatingPanelFacade, {
|
|
19
127
|
...FloatingPanel$1,
|
|
20
128
|
Root: FloatingPanelRoot
|
|
21
129
|
});
|
|
@@ -1,2 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Component, JSX } from "solid-js";
|
|
2
|
+
import { FieldApi, FormApi, SolidFormApi, createField, createForm } from "@tanstack/solid-form";
|
|
3
|
+
//#region src/components/form/index.d.ts
|
|
4
|
+
/** The seam this family passes the engine through — the members the
|
|
5
|
+
* components drive, with the engine's field-name generics opened to
|
|
6
|
+
* `any`. The engine ships no "any form" alias: its loosest, `FormLikeAPI`,
|
|
7
|
+
* still pins names to `string`, which a concrete form's literal names
|
|
8
|
+
* cannot satisfy. */
|
|
9
|
+
interface AnyFormApi {
|
|
10
|
+
handleSubmit(): Promise<unknown>;
|
|
11
|
+
setFieldMeta(field: any, updater: (prev: any) => any): void;
|
|
12
|
+
Field: Component<any>;
|
|
13
|
+
}
|
|
14
|
+
/** The form element itself: native submit interception handing the event
|
|
15
|
+
* to the engine, one grid, one spacing voice. */
|
|
16
|
+
export interface FormProps extends JSX.FormHTMLAttributes<HTMLFormElement> {
|
|
17
|
+
form: AnyFormApi;
|
|
18
|
+
}
|
|
19
|
+
export declare const Form: ((props: FormProps) => JSX.Element) & {
|
|
20
|
+
Root: (props: FormProps) => JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The named slot in the grid: label, control, hint — and the engine's
|
|
24
|
+
* errors for this name, shown through the same parts the standalone
|
|
25
|
+
* Field family styles. The children receive the live engine field — in
|
|
26
|
+
* Solid an accessor to the FieldApi — so every capability the engine
|
|
27
|
+
* has is right there where the control is wired. Without a Form above
|
|
28
|
+
* it degrades to a plain labelled field.
|
|
29
|
+
*/
|
|
30
|
+
export interface FormFieldProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
31
|
+
form?: AnyFormApi;
|
|
32
|
+
name: string;
|
|
33
|
+
label?: string;
|
|
34
|
+
hint?: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
invalid?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
children?: JSX.Element | ((field: any) => JSX.Element);
|
|
39
|
+
}
|
|
40
|
+
export declare const FormField: ((props: FormFieldProps) => JSX.Element) & {
|
|
41
|
+
Root: (props: FormFieldProps) => JSX.Element;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { type FieldApi, type FormApi, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
3
|
import { claimElement, createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { Show, createContext, splitProps, useContext } from "solid-js";
|
|
6
6
|
import { Field } from "@ark-ui/solid/field";
|
|
7
7
|
import { createField, createForm } from "@tanstack/solid-form";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
2
|
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
5
|
//#region src/components/grid/index.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { Highlight as Highlight$1 } from "@ark-ui/solid/highlight";
|
|
4
4
|
//#region src/components/highlight/index.ts
|
|
5
5
|
/** Ark's Highlight, dressed in the paper-and-ink system: query hits are
|