@bysages/solid 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/{ai-response-B_586r27.mjs → ai-response-ClGGptX3.mjs} +15 -15
- package/dist/chevron-D5RzcayK.mjs +9 -0
- package/dist/components/affix/index.mjs +15 -17
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +12 -10
- package/dist/components/ai-action/index.mjs +2 -2
- package/dist/components/ai-attachments/index.mjs +50 -38
- package/dist/components/ai-message/index.mjs +11 -13
- package/dist/components/ai-prompt-input/index.mjs +70 -53
- package/dist/components/ai-reasoning/index.mjs +10 -6
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +23 -23
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +29 -17
- package/dist/components/alert/index.mjs +37 -42
- package/dist/components/angle-slider/index.mjs +2 -2
- package/dist/components/aspect-ratio/index.mjs +14 -16
- package/dist/components/autocomplete/index.mjs +3 -2
- package/dist/components/avatar/index.d.mts +3 -0
- package/dist/components/avatar/index.mjs +10 -5
- package/dist/components/avatar-group/index.mjs +11 -13
- package/dist/components/back-top/index.mjs +31 -27
- package/dist/components/badge/index.mjs +14 -16
- package/dist/components/banner/index.mjs +24 -28
- package/dist/components/bento/index.d.mts +24 -0
- package/dist/components/bento/index.mjs +51 -0
- package/dist/components/block-ui/index.d.mts +12 -0
- package/dist/components/block-ui/index.mjs +43 -0
- package/dist/components/breadcrumb/index.mjs +7 -5
- package/dist/components/browser/index.d.mts +21 -0
- package/dist/components/browser/index.mjs +87 -0
- package/dist/components/button/index.mjs +27 -29
- package/dist/components/button-group/index.mjs +18 -20
- package/dist/components/calendar/index.mjs +141 -129
- package/dist/components/card/index.mjs +2 -2
- package/dist/components/cascade-select/index.mjs +160 -121
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/checkbox-group/index.mjs +53 -55
- package/dist/components/chip/index.mjs +22 -20
- package/dist/components/clipboard/index.mjs +2 -2
- package/dist/components/color-picker/index.mjs +2 -2
- package/dist/components/combobox/index.mjs +2 -2
- package/dist/components/command/index.mjs +73 -57
- package/dist/components/comment/index.mjs +77 -62
- package/dist/components/config-provider/index.mjs +10 -8
- package/dist/components/container/index.mjs +14 -16
- package/dist/components/data-view/index.d.mts +18 -0
- package/dist/components/data-view/index.mjs +110 -0
- package/dist/components/date-input/index.mjs +2 -2
- package/dist/components/date-picker/index.mjs +2 -2
- package/dist/components/deferred-content/index.d.mts +16 -0
- package/dist/components/deferred-content/index.mjs +52 -0
- package/dist/components/descriptions/index.d.mts +9 -1
- package/dist/components/descriptions/index.mjs +43 -16
- package/dist/components/dock/index.d.mts +22 -0
- package/dist/components/dock/index.mjs +64 -0
- package/dist/components/dynamic-input/index.mjs +71 -68
- package/dist/components/editable/index.mjs +2 -2
- package/dist/components/ellipsis/index.mjs +17 -19
- package/dist/components/empty/index.mjs +2 -2
- package/dist/components/file-upload/index.mjs +2 -2
- package/dist/components/float-button/index.mjs +39 -38
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +52 -37
- package/dist/components/grid/index.mjs +19 -21
- package/dist/components/icon/index.d.mts +9 -4
- package/dist/components/icon/index.mjs +37 -36
- package/dist/components/image/index.mjs +44 -43
- package/dist/components/image-viewer/index.mjs +46 -37
- package/dist/components/input/index.d.mts +3 -0
- package/dist/components/input/index.mjs +1 -41
- package/dist/components/input-group/index.mjs +14 -18
- package/dist/components/kbd/index.mjs +8 -10
- package/dist/components/layout/index.mjs +77 -77
- package/dist/components/link/index.mjs +12 -13
- package/dist/components/list/index.mjs +52 -47
- package/dist/components/listbox/index.mjs +2 -2
- package/dist/components/masonry/index.mjs +15 -17
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +2 -2
- package/dist/components/menubar/index.mjs +58 -57
- package/dist/components/meter/index.mjs +41 -41
- package/dist/components/number-input/index.mjs +2 -2
- package/dist/components/order-list/index.d.mts +21 -0
- package/dist/components/order-list/index.mjs +160 -0
- package/dist/components/page-header/index.mjs +2 -2
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/password-input/index.mjs +2 -2
- package/dist/components/pin-input/index.mjs +2 -2
- package/dist/components/popconfirm/index.mjs +19 -12
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/progress-group/index.mjs +65 -58
- package/dist/components/radio-group/index.mjs +2 -2
- package/dist/components/rating-group/index.mjs +2 -2
- package/dist/components/result/index.d.mts +22 -0
- package/dist/components/result/index.mjs +66 -0
- package/dist/components/select/index.d.mts +2 -17
- package/dist/components/select/index.mjs +2 -18
- package/dist/components/separator/index.mjs +17 -19
- package/dist/components/skeleton/index.mjs +8 -10
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/spinner/index.mjs +15 -17
- package/dist/components/split-button/index.mjs +84 -83
- package/dist/components/spotlight/index.d.mts +11 -0
- package/dist/components/spotlight/index.mjs +38 -0
- package/dist/components/stack/index.mjs +20 -22
- package/dist/components/stat/index.mjs +12 -14
- package/dist/components/steps/index.mjs +2 -2
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/table/index.mjs +308 -211
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/components/tabs/index.mjs +10 -5
- package/dist/components/tags-input/index.mjs +2 -2
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +84 -0
- package/dist/components/textarea/index.mjs +8 -8
- package/dist/components/timeline/index.d.mts +9 -3
- package/dist/components/timeline/index.mjs +18 -3
- package/dist/components/toggle-group/index.mjs +2 -2
- package/dist/components/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +46 -0
- package/dist/components/transfer/index.mjs +116 -107
- package/dist/components/tree-select/index.mjs +29 -21
- package/dist/components/tree-view/index.mjs +2 -2
- package/dist/components/typography/index.mjs +2 -2
- package/dist/components/user/index.d.mts +19 -0
- package/dist/components/user/index.mjs +68 -0
- package/dist/components/virtual-list/index.d.mts +17 -0
- package/dist/components/virtual-list/index.mjs +71 -0
- package/dist/components/watermark/index.mjs +19 -13
- package/dist/{index-B4XS2n2y.d.mts → index-IfofF-SW.d.mts} +718 -3773
- package/dist/index-YPUiqD3n.d.mts +42 -0
- package/dist/index.d.mts +16 -3
- package/dist/index.mjs +20 -7
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
- package/dist/select-CHaXbzLX.mjs +115 -0
- package/package.json +28 -7
- package/dist/chevron-GWEoEYdO.mjs +0 -9
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as chevron } from "../../chevron-
|
|
1
|
+
import { t as chevron } from "../../chevron-D5RzcayK.mjs";
|
|
2
2
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
-
import { createComponent, insert, mergeProps, template } from "
|
|
4
|
+
import { createComponent, insert, mergeProps, template } from "@solidjs/web";
|
|
5
5
|
import { Show, splitProps } from "solid-js";
|
|
6
6
|
//#region src/components/ai-tool/index.tsx
|
|
7
|
-
var _tmpl$ =
|
|
8
|
-
var _tmpl$2 =
|
|
9
|
-
var _tmpl$3 =
|
|
10
|
-
var _tmpl$4 =
|
|
11
|
-
var _tmpl$5 =
|
|
12
|
-
var _tmpl$6 =
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span data-scope=ai data-part=tool-status>`);
|
|
9
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span data-scope=ai data-part=tool-label>Input`);
|
|
10
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<pre>`);
|
|
11
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<span data-scope=ai data-part=tool-label>Output`);
|
|
12
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div data-scope=ai data-part=tool-body><!><!>`);
|
|
13
13
|
/** A tool call: the shared collapsible as the vessel — the name it was
|
|
14
14
|
* reached by and the state it reached in on the trigger, its input and
|
|
15
15
|
* output folded inside. */
|
|
@@ -22,12 +22,16 @@ function Tool(props) {
|
|
|
22
22
|
"input",
|
|
23
23
|
"output"
|
|
24
24
|
]);
|
|
25
|
-
return createComponent(Collapsible.Root, mergeProps(rest, { "data-ai": "tool" }, () =>
|
|
25
|
+
return createComponent(Collapsible.Root, mergeProps(rest, { "data-ai": "tool" }, () => {
|
|
26
|
+
return own.status ? { "data-status": own.status } : {};
|
|
27
|
+
}, { get children() {
|
|
26
28
|
return [createComponent(Collapsible.Trigger, { get children() {
|
|
27
29
|
return [
|
|
28
30
|
(() => {
|
|
29
31
|
var _el$ = _tmpl$();
|
|
30
|
-
insert(_el$, () =>
|
|
32
|
+
insert(_el$, () => {
|
|
33
|
+
return own.label ?? own.name;
|
|
34
|
+
});
|
|
31
35
|
return _el$;
|
|
32
36
|
})(),
|
|
33
37
|
createComponent(Show, {
|
|
@@ -36,7 +40,9 @@ function Tool(props) {
|
|
|
36
40
|
},
|
|
37
41
|
get children() {
|
|
38
42
|
var _el$2 = _tmpl$2();
|
|
39
|
-
insert(_el$2, () =>
|
|
43
|
+
insert(_el$2, () => {
|
|
44
|
+
return own.status.charAt(0).toUpperCase() + own.status.slice(1);
|
|
45
|
+
});
|
|
40
46
|
return _el$2;
|
|
41
47
|
}
|
|
42
48
|
}),
|
|
@@ -46,6 +52,8 @@ function Tool(props) {
|
|
|
46
52
|
];
|
|
47
53
|
} }), createComponent(Collapsible.Content, { get children() {
|
|
48
54
|
var _el$3 = _tmpl$6();
|
|
55
|
+
var _el$6 = _el$3.firstChild;
|
|
56
|
+
var _el$9 = _el$6.nextSibling;
|
|
49
57
|
insert(_el$3, createComponent(Show, {
|
|
50
58
|
get when() {
|
|
51
59
|
return own.input !== void 0;
|
|
@@ -53,23 +61,27 @@ function Tool(props) {
|
|
|
53
61
|
get children() {
|
|
54
62
|
return [_tmpl$3(), (() => {
|
|
55
63
|
var _el$5 = _tmpl$4();
|
|
56
|
-
insert(_el$5, () =>
|
|
64
|
+
insert(_el$5, () => {
|
|
65
|
+
return own.input;
|
|
66
|
+
});
|
|
57
67
|
return _el$5;
|
|
58
68
|
})()];
|
|
59
69
|
}
|
|
60
|
-
}),
|
|
70
|
+
}), _el$6);
|
|
61
71
|
insert(_el$3, createComponent(Show, {
|
|
62
72
|
get when() {
|
|
63
73
|
return own.output !== void 0;
|
|
64
74
|
},
|
|
65
75
|
get children() {
|
|
66
76
|
return [_tmpl$5(), (() => {
|
|
67
|
-
var _el$
|
|
68
|
-
insert(_el$
|
|
69
|
-
|
|
77
|
+
var _el$8 = _tmpl$4();
|
|
78
|
+
insert(_el$8, () => {
|
|
79
|
+
return own.output;
|
|
80
|
+
});
|
|
81
|
+
return _el$8;
|
|
70
82
|
})()];
|
|
71
83
|
}
|
|
72
|
-
}),
|
|
84
|
+
}), _el$9);
|
|
73
85
|
return _el$3;
|
|
74
86
|
} })];
|
|
75
87
|
} }));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, effect, insert,
|
|
2
|
+
import { createComponent, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
3
3
|
import { createContext, splitProps, useContext } from "solid-js";
|
|
4
4
|
//#region src/components/alert/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
7
|
-
var _tmpl$3 =
|
|
8
|
-
var _tmpl$4 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span data-scope=alert data-part=icon>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<p>`);
|
|
9
9
|
const StatusContext = createContext(() => "ink");
|
|
10
10
|
function glyph(status) {
|
|
11
11
|
const paths = {
|
|
@@ -15,11 +15,12 @@ function glyph(status) {
|
|
|
15
15
|
danger: "M6 6l12 12M18 6 6 18",
|
|
16
16
|
ink: "M12 8v5m0 3v.01M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
18
|
+
var _el$ = _tmpl$();
|
|
19
|
+
var _el$2 = _el$.firstChild;
|
|
20
|
+
effect(() => paths[status], (_v$) => {
|
|
21
|
+
setAttribute(_el$2, "d", _v$);
|
|
22
|
+
});
|
|
23
|
+
return _el$;
|
|
23
24
|
}
|
|
24
25
|
function AlertRoot(props) {
|
|
25
26
|
const [own, rest] = splitProps(props, ["status"]);
|
|
@@ -28,57 +29,51 @@ function AlertRoot(props) {
|
|
|
28
29
|
value: status,
|
|
29
30
|
get children() {
|
|
30
31
|
var _el$3 = _tmpl$2();
|
|
31
|
-
spread(_el$3,
|
|
32
|
+
spread(_el$3, [rest, {
|
|
32
33
|
get role() {
|
|
33
34
|
return status() === "ink" || status() === "info" ? "status" : "alert";
|
|
34
35
|
},
|
|
35
36
|
"data-scope": "alert",
|
|
36
37
|
"data-part": "root",
|
|
37
|
-
get
|
|
38
|
+
get "data-status"() {
|
|
38
39
|
return status();
|
|
39
40
|
}
|
|
40
|
-
}
|
|
41
|
+
}], false);
|
|
41
42
|
return _el$3;
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
function Icon() {
|
|
46
47
|
const status = useContext(StatusContext);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
var _el$4 = _tmpl$3();
|
|
49
|
+
insert(_el$4, () => {
|
|
50
|
+
return glyph(status());
|
|
51
|
+
});
|
|
52
|
+
return _el$4;
|
|
52
53
|
}
|
|
53
54
|
function Body(props) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return _el$5;
|
|
61
|
-
})();
|
|
55
|
+
var _el$5 = _tmpl$2();
|
|
56
|
+
spread(_el$5, [props, {
|
|
57
|
+
"data-scope": "alert",
|
|
58
|
+
"data-part": "body"
|
|
59
|
+
}], false);
|
|
60
|
+
return _el$5;
|
|
62
61
|
}
|
|
63
62
|
function Title(props) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return _el$6;
|
|
71
|
-
})();
|
|
63
|
+
var _el$6 = _tmpl$4();
|
|
64
|
+
spread(_el$6, [props, {
|
|
65
|
+
"data-scope": "alert",
|
|
66
|
+
"data-part": "title"
|
|
67
|
+
}], false);
|
|
68
|
+
return _el$6;
|
|
72
69
|
}
|
|
73
70
|
function Description(props) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return _el$7;
|
|
81
|
-
})();
|
|
71
|
+
var _el$7 = _tmpl$4();
|
|
72
|
+
spread(_el$7, [props, {
|
|
73
|
+
"data-scope": "alert",
|
|
74
|
+
"data-part": "description"
|
|
75
|
+
}], false);
|
|
76
|
+
return _el$7;
|
|
82
77
|
}
|
|
83
78
|
const Alert = Object.assign(AlertRoot, {
|
|
84
79
|
Root: AlertRoot,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { AngleSlider as AngleSlider$1 } from "@ark-ui/solid/angle-slider";
|
|
5
5
|
//#region src/components/angle-slider/index.tsx
|
|
6
6
|
function AngleSliderRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(AngleSlider$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(AngleSlider$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/aspect-ratio/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
function AspectRatio(props) {
|
|
7
7
|
injectComponentStyle("aspect-ratio");
|
|
8
8
|
const [own, rest] = splitProps(props, ["ratio"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return _el$;
|
|
22
|
-
})();
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, [rest, {
|
|
11
|
+
get style() {
|
|
12
|
+
return {
|
|
13
|
+
...rest.style,
|
|
14
|
+
"--bs-aspect-ratio": own.ratio ?? "1 / 1"
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
"data-scope": "aspect-ratio",
|
|
18
|
+
"data-part": "root"
|
|
19
|
+
}], false);
|
|
20
|
+
return _el$;
|
|
23
21
|
}
|
|
24
22
|
//#endregion
|
|
25
23
|
export { AspectRatio };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { For, splitProps } from "solid-js";
|
|
4
4
|
import { useListCollection } from "@ark-ui/solid/collection";
|
|
5
5
|
import { Combobox } from "@ark-ui/solid/combobox";
|
|
6
|
+
import { Portal } from "solid-js/web";
|
|
6
7
|
//#region src/components/autocomplete/index.tsx
|
|
7
8
|
/**
|
|
8
9
|
* Free text with suggestions: the reader types anything, the list
|
|
@@ -33,7 +34,7 @@ function AutoComplete(props) {
|
|
|
33
34
|
get inputValue() {
|
|
34
35
|
return own.value;
|
|
35
36
|
},
|
|
36
|
-
get
|
|
37
|
+
get "data-size"() {
|
|
37
38
|
return own.size ?? "md";
|
|
38
39
|
},
|
|
39
40
|
allowCustomValue: true,
|
|
@@ -12,6 +12,9 @@ export interface AvatarProps extends ComponentProps<typeof Avatar$1.Root> {
|
|
|
12
12
|
* default (large) stands as tall as the biggest control so an avatar
|
|
13
13
|
* rides a row without stretching it. */
|
|
14
14
|
size?: AvatarSize;
|
|
15
|
+
/** The corner: round by default; square cuts it sharp, a stamp
|
|
16
|
+
* beside a round portrait. */
|
|
17
|
+
shape?: "circle" | "square";
|
|
15
18
|
}
|
|
16
19
|
declare function AvatarRoot(props: AvatarProps): import("solid-js").JSX.Element;
|
|
17
20
|
export declare const Avatar: typeof Avatar$1 & {
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { Avatar as Avatar$1 } from "@ark-ui/solid/avatar";
|
|
5
5
|
//#region src/components/avatar/index.tsx
|
|
6
6
|
function AvatarRoot(props) {
|
|
7
|
-
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Avatar$1.Root, mergeProps(rest, {
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const [own, rest] = splitProps(props, ["size", "shape"]);
|
|
8
|
+
return createComponent(Avatar$1.Root, mergeProps(rest, {
|
|
9
|
+
get "data-size"() {
|
|
10
|
+
return own.size;
|
|
11
|
+
},
|
|
12
|
+
get "data-shape"() {
|
|
13
|
+
return own.shape ?? "circle";
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
11
16
|
}
|
|
12
17
|
const Avatar = Object.assign({}, Avatar$1, { Root: AvatarRoot });
|
|
13
18
|
injectComponentStyle("avatar");
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/avatar-group/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
function AvatarGroup(props) {
|
|
7
7
|
injectComponentStyle("avatar-group");
|
|
8
8
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return _el$;
|
|
19
|
-
})();
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, [rest, {
|
|
11
|
+
"data-scope": "avatar-group",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
get "data-size"() {
|
|
14
|
+
return own.size;
|
|
15
|
+
}
|
|
16
|
+
}], false);
|
|
17
|
+
return _el$;
|
|
20
18
|
}
|
|
21
19
|
//#endregion
|
|
22
20
|
export { AvatarGroup };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
-
import { createComponent, insert, mergeProps, spread, template } from "
|
|
3
|
+
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
4
4
|
import { createSignal, onCleanup, onMount, splitProps } from "solid-js";
|
|
5
5
|
//#region src/components/back-top/index.tsx
|
|
6
|
-
var _tmpl$ =
|
|
7
|
-
var _tmpl$2 =
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 14 6-6 6 6">`);
|
|
8
8
|
/**
|
|
9
9
|
* A way home: after the page has scrolled past `threshold`, a small
|
|
10
10
|
* floating control rises at the page's corner and returns the reader to
|
|
@@ -55,31 +55,35 @@ function BackTop(props) {
|
|
|
55
55
|
if (el) el.removeEventListener("scroll", onScroll);
|
|
56
56
|
else window.removeEventListener("scroll", onScroll);
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
var _el$ = _tmpl$();
|
|
59
|
+
spread(_el$, [{
|
|
60
|
+
"data-scope": "back-top",
|
|
61
|
+
"data-part": "root",
|
|
62
|
+
get "data-state"() {
|
|
61
63
|
return visible() ? "shown" : "hidden";
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
64
|
+
}
|
|
65
|
+
}, () => {
|
|
66
|
+
return scroller() ? { "data-container": "" } : {};
|
|
67
|
+
}], true);
|
|
68
|
+
insert(_el$, createComponent(Button, mergeProps(rest, {
|
|
69
|
+
variant: "outline",
|
|
70
|
+
square: true,
|
|
71
|
+
size: "lg",
|
|
72
|
+
get "aria-label"() {
|
|
73
|
+
return own.label ?? "Back to top";
|
|
74
|
+
},
|
|
75
|
+
get "aria-hidden"() {
|
|
76
|
+
return visible() ? void 0 : "true";
|
|
77
|
+
},
|
|
78
|
+
get tabindex() {
|
|
79
|
+
return visible() ? 0 : -1;
|
|
80
|
+
},
|
|
81
|
+
onClick: toTop,
|
|
82
|
+
get children() {
|
|
83
|
+
return rest.children ?? chevronUp();
|
|
84
|
+
}
|
|
85
|
+
})));
|
|
86
|
+
return _el$;
|
|
83
87
|
}
|
|
84
88
|
/** The single glyph a way-home control needs: one stroke pointing up. */
|
|
85
89
|
function chevronUp() {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/badge/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
6
|
function Badge(props) {
|
|
7
7
|
injectComponentStyle("badge");
|
|
8
8
|
const [own, rest] = splitProps(props, ["tone", "variant"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return _el$;
|
|
22
|
-
})();
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, [rest, {
|
|
11
|
+
"data-scope": "badge",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
get "data-tone"() {
|
|
14
|
+
return own.tone ?? "ink";
|
|
15
|
+
},
|
|
16
|
+
get "data-variant"() {
|
|
17
|
+
return own.variant ?? "solid";
|
|
18
|
+
}
|
|
19
|
+
}], false);
|
|
20
|
+
return _el$;
|
|
23
21
|
}
|
|
24
22
|
//#endregion
|
|
25
23
|
export { Badge };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps, spread, template } from "
|
|
2
|
+
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/banner/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<button><svg viewBox="0 0 16 16"fill=none aria-hidden=true><path d="M4 4l8 8M12 4l-8 8"stroke=currentColor stroke-width=1.5 stroke-linecap=round>`);
|
|
7
7
|
/** A page-level notice, spoken across the full measure: a wash of the
|
|
8
8
|
* status pigment, one heavier hairline on the leading edge, and room
|
|
9
9
|
* for actions and a quiet close. Ink is the neutral register; the four
|
|
@@ -11,22 +11,20 @@ var _tmpl$2 = /*#__PURE__*/ template(`<button><svg viewBox="0 0 16 16"fill=none
|
|
|
11
11
|
function Root(props) {
|
|
12
12
|
const [own, rest] = splitProps(props, ["status"]);
|
|
13
13
|
const status = own.status ?? "ink";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return _el$;
|
|
23
|
-
})();
|
|
14
|
+
var _el$ = _tmpl$();
|
|
15
|
+
spread(_el$, [rest, {
|
|
16
|
+
role: status === "ink" ? void 0 : "status",
|
|
17
|
+
"data-scope": "banner",
|
|
18
|
+
"data-part": "root",
|
|
19
|
+
"data-status": status
|
|
20
|
+
}], false);
|
|
21
|
+
return _el$;
|
|
24
22
|
}
|
|
25
23
|
function part(name, tag) {
|
|
26
24
|
function Component(props) {
|
|
27
25
|
return createComponent(tag, mergeProps(props, {
|
|
28
26
|
"data-scope": "banner",
|
|
29
|
-
get
|
|
27
|
+
get "data-part"() {
|
|
30
28
|
return name.toLowerCase();
|
|
31
29
|
}
|
|
32
30
|
}));
|
|
@@ -42,20 +40,18 @@ const Actions = part("Actions", "div");
|
|
|
42
40
|
* consumer's state. */
|
|
43
41
|
function Close(props) {
|
|
44
42
|
const [own, rest] = splitProps(props, ["type"]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return _el$2;
|
|
58
|
-
})();
|
|
43
|
+
var _el$2 = _tmpl$2();
|
|
44
|
+
spread(_el$2, [rest, {
|
|
45
|
+
get type() {
|
|
46
|
+
return own.type ?? "button";
|
|
47
|
+
},
|
|
48
|
+
get "aria-label"() {
|
|
49
|
+
return rest["aria-label"] ?? "Dismiss";
|
|
50
|
+
},
|
|
51
|
+
"data-scope": "banner",
|
|
52
|
+
"data-part": "close"
|
|
53
|
+
}], true);
|
|
54
|
+
return _el$2;
|
|
59
55
|
}
|
|
60
56
|
const Banner = Object.assign(Root, {
|
|
61
57
|
Root,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/bento/index.d.ts
|
|
3
|
+
export interface BentoProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Tracks across the lattice. */
|
|
5
|
+
columns?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface BentoCellProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** Columns this tile claims. */
|
|
9
|
+
span?: number;
|
|
10
|
+
/** Rows this tile claims. */
|
|
11
|
+
rowSpan?: number;
|
|
12
|
+
}
|
|
13
|
+
/** The bento lattice: a grid of unequal tiles that reads as one plate.
|
|
14
|
+
* The container owns the track count; each cell claims its own span. */
|
|
15
|
+
export declare function BentoRoot(props: BentoProps): JSX.Element;
|
|
16
|
+
/** One tile: `span` claims columns, `rowSpan` claims rows — the rest
|
|
17
|
+
* of the plate stays in measure. */
|
|
18
|
+
export declare function BentoCell(props: BentoCellProps): JSX.Element;
|
|
19
|
+
/** The whole family under one handle — Bento.Root, Bento.Cell. */
|
|
20
|
+
export declare const Bento: typeof BentoRoot & {
|
|
21
|
+
Root: typeof BentoRoot;
|
|
22
|
+
Cell: typeof BentoCell;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { insert, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/bento/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
/** The bento lattice: a grid of unequal tiles that reads as one plate.
|
|
7
|
+
* The container owns the track count; each cell claims its own span. */
|
|
8
|
+
function BentoRoot(props) {
|
|
9
|
+
injectComponentStyle("bento");
|
|
10
|
+
const [own, rest] = splitProps(props, ["columns"]);
|
|
11
|
+
var _el$ = _tmpl$();
|
|
12
|
+
spread(_el$, [rest, {
|
|
13
|
+
"data-scope": "bento",
|
|
14
|
+
"data-part": "root",
|
|
15
|
+
get style() {
|
|
16
|
+
return { "--bs-bento-columns": String(own.columns ?? 3) };
|
|
17
|
+
}
|
|
18
|
+
}], true);
|
|
19
|
+
insert(_el$, () => {
|
|
20
|
+
return rest.children;
|
|
21
|
+
});
|
|
22
|
+
return _el$;
|
|
23
|
+
}
|
|
24
|
+
/** One tile: `span` claims columns, `rowSpan` claims rows — the rest
|
|
25
|
+
* of the plate stays in measure. */
|
|
26
|
+
function BentoCell(props) {
|
|
27
|
+
injectComponentStyle("bento");
|
|
28
|
+
const [own, rest] = splitProps(props, ["span", "rowSpan"]);
|
|
29
|
+
var _el$2 = _tmpl$();
|
|
30
|
+
spread(_el$2, [rest, {
|
|
31
|
+
"data-scope": "bento",
|
|
32
|
+
"data-part": "cell",
|
|
33
|
+
get style() {
|
|
34
|
+
return {
|
|
35
|
+
"--bs-bento-span-x": String(own.span ?? 1),
|
|
36
|
+
"--bs-bento-span-y": String(own.rowSpan ?? 1)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}], true);
|
|
40
|
+
insert(_el$2, () => {
|
|
41
|
+
return rest.children;
|
|
42
|
+
});
|
|
43
|
+
return _el$2;
|
|
44
|
+
}
|
|
45
|
+
/** The whole family under one handle — Bento.Root, Bento.Cell. */
|
|
46
|
+
const Bento = Object.assign(BentoRoot, {
|
|
47
|
+
Root: BentoRoot,
|
|
48
|
+
Cell: BentoCell
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Bento, BentoCell, BentoRoot };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/block-ui/index.d.ts
|
|
3
|
+
export interface BlockUIProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Whether the curtain is drawn. */
|
|
5
|
+
blocked?: boolean;
|
|
6
|
+
children?: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
/** A curtain over content that must wait: the blocked region keeps its
|
|
9
|
+
* shape and dims under frosted paper while a quiet wheel reports the
|
|
10
|
+
* wait. Callers own the state; the curtain only answers it. */
|
|
11
|
+
export declare function BlockUI(props: BlockUIProps): JSX.Element;
|
|
12
|
+
//#endregion
|