@bysages/solid 0.2.3 → 0.3.1
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-slzE03wh.mjs} +19 -17
- 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 +21 -22
- package/dist/components/ai-action/index.mjs +2 -2
- package/dist/components/ai-attachments/index.mjs +52 -38
- package/dist/components/ai-message/index.mjs +11 -13
- package/dist/components/ai-prompt-input/index.mjs +81 -55
- 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 +8 -3
- 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 +26 -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 +12 -10
- 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 +167 -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 +83 -59
- package/dist/components/comment/index.mjs +77 -62
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +13 -9
- 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 +116 -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 +75 -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.d.mts +7 -1
- package/dist/components/file-upload/index.mjs +13 -3
- package/dist/components/float-button/index.mjs +42 -39
- 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.d.mts +4 -0
- package/dist/components/image/index.mjs +50 -43
- package/dist/components/image-viewer/index.d.mts +4 -0
- package/dist/components/image-viewer/index.mjs +54 -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/json-tree-view/index.d.mts +5 -2
- package/dist/components/json-tree-view/index.mjs +25 -2
- package/dist/components/kbd/index.mjs +8 -10
- package/dist/components/layout/index.mjs +81 -77
- package/dist/components/link/index.mjs +12 -13
- package/dist/components/list/index.d.mts +2 -1
- package/dist/components/list/index.mjs +62 -48
- 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 +59 -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 +168 -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 +17 -17
- package/dist/components/split-button/index.mjs +88 -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.d.mts +6 -1
- package/dist/components/steps/index.mjs +9 -3
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/table/index.mjs +323 -214
- 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 +86 -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/toc/index.d.mts +2 -7
- package/dist/components/toc/index.mjs +1 -9
- 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 +126 -107
- package/dist/components/tree-select/index.mjs +36 -25
- package/dist/components/tree-view/index.d.mts +8 -1
- package/dist/components/tree-view/index.mjs +29 -3
- 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 +72 -0
- package/dist/components/watermark/index.mjs +19 -13
- package/dist/index-DdsnfV4f.d.mts +16 -0
- 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 +17 -4
- package/dist/index.mjs +22 -9
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
- package/dist/select-CX6OuQlU.mjs +123 -0
- package/dist/toc-CZmYEaQR.mjs +21 -0
- package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
- package/package.json +28 -7
- package/dist/chevron-GWEoEYdO.mjs +0 -9
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { claimElement, insert, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/ai-source/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<li data-scope=ai data-part=source><a>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<ol>`);
|
|
7
7
|
/** One place the ink came from; href and the rest ride the anchor. */
|
|
8
8
|
function Source(props) {
|
|
9
9
|
injectComponentStyle("ai");
|
|
10
10
|
const [own, rest] = splitProps(props, ["href", "children"]);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
var _el$ = _tmpl$();
|
|
12
|
+
var _el$2 = _el$.firstChild;
|
|
13
|
+
claimElement(_el$2);
|
|
14
|
+
spread(_el$2, [rest, {
|
|
15
|
+
get href() {
|
|
16
|
+
return own.href;
|
|
17
|
+
},
|
|
18
|
+
target: "_blank",
|
|
19
|
+
rel: "noreferrer"
|
|
20
|
+
}], true);
|
|
21
|
+
insert(_el$2, () => {
|
|
22
|
+
return own.children ?? own.href;
|
|
23
|
+
});
|
|
24
|
+
return _el$;
|
|
23
25
|
}
|
|
24
26
|
/** The reading list under a response: where this ink came from. */
|
|
25
27
|
function Sources(props) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return _el$3;
|
|
33
|
-
})();
|
|
28
|
+
var _el$3 = _tmpl$2();
|
|
29
|
+
spread(_el$3, [props, {
|
|
30
|
+
"data-scope": "ai",
|
|
31
|
+
"data-part": "sources"
|
|
32
|
+
}], false);
|
|
33
|
+
return _el$3;
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
export { Source as AiSource, Source, Sources as AiSources, Sources };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
-
import { createComponent, mergeProps } from "
|
|
3
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
5
|
//#region src/components/ai-suggestion/index.tsx
|
|
6
6
|
/** A seal-cut button proposing the next stroke; selection hands back
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
3
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
4
|
import { For, splitProps } from "solid-js";
|
|
4
5
|
import { useListCollection } from "@ark-ui/solid/collection";
|
|
5
6
|
import { Combobox } from "@ark-ui/solid/combobox";
|
|
7
|
+
import { Portal } from "solid-js/web";
|
|
6
8
|
//#region src/components/autocomplete/index.tsx
|
|
7
9
|
/**
|
|
8
10
|
* Free text with suggestions: the reader types anything, the list
|
|
@@ -13,6 +15,7 @@ import { Combobox } from "@ark-ui/solid/combobox";
|
|
|
13
15
|
* otherwise.
|
|
14
16
|
*/
|
|
15
17
|
function AutoComplete(props) {
|
|
18
|
+
const messages = useComponentMessages();
|
|
16
19
|
injectComponentStyle("combobox");
|
|
17
20
|
const [own, rest] = splitProps(props, [
|
|
18
21
|
"value",
|
|
@@ -33,7 +36,7 @@ function AutoComplete(props) {
|
|
|
33
36
|
get inputValue() {
|
|
34
37
|
return own.value;
|
|
35
38
|
},
|
|
36
|
-
get
|
|
39
|
+
get "data-size"() {
|
|
37
40
|
return own.size ?? "md";
|
|
38
41
|
},
|
|
39
42
|
allowCustomValue: true,
|
|
@@ -54,7 +57,9 @@ function AutoComplete(props) {
|
|
|
54
57
|
} }), createComponent(Portal, { get children() {
|
|
55
58
|
return createComponent(Combobox.Positioner, { get children() {
|
|
56
59
|
return createComponent(Combobox.Content, { get children() {
|
|
57
|
-
return [createComponent(Combobox.Empty, { children
|
|
60
|
+
return [createComponent(Combobox.Empty, { get children() {
|
|
61
|
+
return messages().command.noMatches;
|
|
62
|
+
} }), createComponent(For, {
|
|
58
63
|
get each() {
|
|
59
64
|
return collection().items;
|
|
60
65
|
},
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps, spread, template } from "
|
|
3
|
+
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/banner/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
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
8
|
/** A page-level notice, spoken across the full measure: a wash of the
|
|
8
9
|
* status pigment, one heavier hairline on the leading edge, and room
|
|
9
10
|
* for actions and a quiet close. Ink is the neutral register; the four
|
|
@@ -11,22 +12,20 @@ var _tmpl$2 = /*#__PURE__*/ template(`<button><svg viewBox="0 0 16 16"fill=none
|
|
|
11
12
|
function Root(props) {
|
|
12
13
|
const [own, rest] = splitProps(props, ["status"]);
|
|
13
14
|
const status = own.status ?? "ink";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return _el$;
|
|
23
|
-
})();
|
|
15
|
+
var _el$ = _tmpl$();
|
|
16
|
+
spread(_el$, [rest, {
|
|
17
|
+
role: status === "ink" ? void 0 : "status",
|
|
18
|
+
"data-scope": "banner",
|
|
19
|
+
"data-part": "root",
|
|
20
|
+
"data-status": status
|
|
21
|
+
}], false);
|
|
22
|
+
return _el$;
|
|
24
23
|
}
|
|
25
24
|
function part(name, tag) {
|
|
26
25
|
function Component(props) {
|
|
27
26
|
return createComponent(tag, mergeProps(props, {
|
|
28
27
|
"data-scope": "banner",
|
|
29
|
-
get
|
|
28
|
+
get "data-part"() {
|
|
30
29
|
return name.toLowerCase();
|
|
31
30
|
}
|
|
32
31
|
}));
|
|
@@ -42,20 +41,19 @@ const Actions = part("Actions", "div");
|
|
|
42
41
|
* consumer's state. */
|
|
43
42
|
function Close(props) {
|
|
44
43
|
const [own, rest] = splitProps(props, ["type"]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})();
|
|
44
|
+
const messages = useComponentMessages();
|
|
45
|
+
var _el$2 = _tmpl$2();
|
|
46
|
+
spread(_el$2, [rest, {
|
|
47
|
+
get type() {
|
|
48
|
+
return own.type ?? "button";
|
|
49
|
+
},
|
|
50
|
+
get "aria-label"() {
|
|
51
|
+
return rest["aria-label"] ?? messages().banner.dismiss;
|
|
52
|
+
},
|
|
53
|
+
"data-scope": "banner",
|
|
54
|
+
"data-part": "close"
|
|
55
|
+
}], true);
|
|
56
|
+
return _el$2;
|
|
59
57
|
}
|
|
60
58
|
const Banner = Object.assign(Root, {
|
|
61
59
|
Root,
|