@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,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 { Checkbox as Checkbox$1 } from "@ark-ui/solid/checkbox";
|
|
5
5
|
//#region src/components/checkbox/index.tsx
|
|
6
6
|
function CheckboxRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Checkbox$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Checkbox$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, insert,
|
|
2
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
3
|
import { For, createUniqueId, splitProps } from "solid-js";
|
|
4
4
|
import { useFieldContext } from "@ark-ui/solid/field";
|
|
5
5
|
import { Checkbox } from "@ark-ui/solid/checkbox";
|
|
6
6
|
//#region src/components/checkbox-group/index.tsx
|
|
7
|
-
var _tmpl$ =
|
|
8
|
-
var _tmpl$2 =
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m5 12.5 5 5L19 7">`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
9
9
|
function checkGlyph() {
|
|
10
10
|
return _tmpl$();
|
|
11
11
|
}
|
|
@@ -40,60 +40,58 @@ function CheckboxGroup(props) {
|
|
|
40
40
|
else next.add(value);
|
|
41
41
|
own.onValueChange?.([...next]);
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
var _el$2 = _tmpl$2();
|
|
44
|
+
spread(_el$2, [rest, {
|
|
45
|
+
role: "group",
|
|
46
|
+
"data-scope": "checkbox-group",
|
|
47
|
+
"data-part": "root",
|
|
48
|
+
get "data-layout"() {
|
|
49
|
+
return own.layout ?? "vertical";
|
|
50
|
+
},
|
|
51
|
+
get "data-invalid"() {
|
|
52
|
+
return isInvalid() ? "" : void 0;
|
|
53
|
+
}
|
|
54
|
+
}], true);
|
|
55
|
+
insert(_el$2, createComponent(For, {
|
|
56
|
+
get each() {
|
|
57
|
+
return own.options;
|
|
58
|
+
},
|
|
59
|
+
children: (option) => createComponent(Checkbox.Root, {
|
|
60
|
+
get ids() {
|
|
61
|
+
return {
|
|
62
|
+
label: `${uid}:${option.value}:label`,
|
|
63
|
+
hiddenInput: `${uid}:${option.value}:input`
|
|
64
|
+
};
|
|
51
65
|
},
|
|
52
|
-
get
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
get checked() {
|
|
67
|
+
return selected().has(option.value);
|
|
68
|
+
},
|
|
69
|
+
get "data-size"() {
|
|
70
|
+
return own.size ?? "md";
|
|
71
|
+
},
|
|
72
|
+
get invalid() {
|
|
73
|
+
return isInvalid();
|
|
59
74
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
get children() {
|
|
81
|
-
return [
|
|
82
|
-
createComponent(Checkbox.Control, { get children() {
|
|
83
|
-
return createComponent(Checkbox.Indicator, { get children() {
|
|
84
|
-
return checkGlyph();
|
|
85
|
-
} });
|
|
86
|
-
} }),
|
|
87
|
-
createComponent(Checkbox.Label, { get children() {
|
|
88
|
-
return option.label;
|
|
89
|
-
} }),
|
|
90
|
-
createComponent(Checkbox.HiddenInput, {})
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
}));
|
|
95
|
-
return _el$2;
|
|
96
|
-
})();
|
|
75
|
+
get disabled() {
|
|
76
|
+
return isDisabled() || option.disabled === true;
|
|
77
|
+
},
|
|
78
|
+
onCheckedChange: () => toggle(option.value),
|
|
79
|
+
get children() {
|
|
80
|
+
return [
|
|
81
|
+
createComponent(Checkbox.Control, { get children() {
|
|
82
|
+
return createComponent(Checkbox.Indicator, { get children() {
|
|
83
|
+
return checkGlyph();
|
|
84
|
+
} });
|
|
85
|
+
} }),
|
|
86
|
+
createComponent(Checkbox.Label, { get children() {
|
|
87
|
+
return option.label;
|
|
88
|
+
} }),
|
|
89
|
+
createComponent(Checkbox.HiddenInput, {})
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}));
|
|
94
|
+
return _el$2;
|
|
97
95
|
}
|
|
98
96
|
//#endregion
|
|
99
97
|
export { CheckboxGroup };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { insert, memo,
|
|
2
|
+
import { insert, memo, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/chip/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
6
|
function Chip(props) {
|
|
7
7
|
injectComponentStyle("chip");
|
|
8
8
|
const [own, rest] = splitProps(props, [
|
|
@@ -11,24 +11,26 @@ function Chip(props) {
|
|
|
11
11
|
"tone",
|
|
12
12
|
"variant"
|
|
13
13
|
]);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
var _el$ = _tmpl$();
|
|
15
|
+
spread(_el$, [rest, {
|
|
16
|
+
"data-scope": "chip",
|
|
17
|
+
"data-part": "root",
|
|
18
|
+
get "data-tone"() {
|
|
19
|
+
return own.tone ?? "ink";
|
|
20
|
+
},
|
|
21
|
+
get "data-variant"() {
|
|
22
|
+
return own.variant ?? "solid";
|
|
23
|
+
}
|
|
24
|
+
}], true);
|
|
25
|
+
insert(_el$, (() => {
|
|
26
|
+
var _c$ = memo(() => {
|
|
27
|
+
return !!(own.max != null && own.value > own.max);
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
return _c$() ? `${own.max}+` : String(own.value);
|
|
31
|
+
};
|
|
32
|
+
})());
|
|
33
|
+
return _el$;
|
|
32
34
|
}
|
|
33
35
|
//#endregion
|
|
34
36
|
export { Chip };
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { Clipboard as Clipboard$1 } from "@ark-ui/solid/clipboard";
|
|
5
5
|
//#region src/components/clipboard/index.tsx
|
|
6
6
|
const ArkRoot = Clipboard$1.Root;
|
|
7
7
|
function ClipboardRoot(props) {
|
|
8
8
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
return createComponent(ArkRoot, mergeProps(rest, { get
|
|
9
|
+
return createComponent(ArkRoot, mergeProps(rest, { get "data-size"() {
|
|
10
10
|
return own.size ?? "md";
|
|
11
11
|
} }));
|
|
12
12
|
}
|
|
@@ -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 { ColorPicker as ColorPicker$1 } from "@ark-ui/solid/color-picker";
|
|
5
5
|
//#region src/components/color-picker/index.tsx
|
|
6
6
|
function ColorPickerRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(ColorPicker$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(ColorPicker$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -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 { Combobox as Combobox$1 } from "@ark-ui/solid/combobox";
|
|
5
5
|
//#region src/components/combobox/index.tsx
|
|
6
6
|
function ComboboxRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Combobox$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Combobox$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
3
|
+
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
4
|
import { For, Show, createEffect, createSignal, 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
|
import { Dialog } from "@ark-ui/solid/dialog";
|
|
7
9
|
//#region src/components/command/index.tsx
|
|
8
|
-
var _tmpl$ =
|
|
9
|
-
var _tmpl$2 =
|
|
10
|
-
var _tmpl$3 =
|
|
11
|
-
var _tmpl$4 =
|
|
12
|
-
var _tmpl$5 =
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span data-scope=command data-part=item-hint>`);
|
|
11
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><!><!>`);
|
|
12
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
13
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
|
|
14
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<input>`);
|
|
15
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div data-scope=command data-part=empty>`);
|
|
13
16
|
/** A command row: the machine's item grafted onto a vessel of our own,
|
|
14
17
|
* the label riding the machine's item text. */
|
|
15
18
|
function Row(props) {
|
|
@@ -19,29 +22,35 @@ function Row(props) {
|
|
|
19
22
|
},
|
|
20
23
|
asChild: (itemProps) => (() => {
|
|
21
24
|
var _el$ = _tmpl$2();
|
|
22
|
-
|
|
25
|
+
var _el$2 = _el$.firstChild;
|
|
26
|
+
var _el$4 = _el$2.nextSibling;
|
|
27
|
+
spread(_el$, [itemProps, {
|
|
23
28
|
"data-scope": "command",
|
|
24
29
|
"data-part": "item"
|
|
25
|
-
}
|
|
30
|
+
}], true);
|
|
26
31
|
insert(_el$, createComponent(Combobox.ItemText, { asChild: (textProps) => (() => {
|
|
27
|
-
var _el$
|
|
28
|
-
spread(_el$
|
|
32
|
+
var _el$5 = _tmpl$3();
|
|
33
|
+
spread(_el$5, [textProps, {
|
|
29
34
|
"data-scope": "command",
|
|
30
35
|
"data-part": "item-label"
|
|
31
|
-
}
|
|
32
|
-
insert(_el$
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
}], true);
|
|
37
|
+
insert(_el$5, () => {
|
|
38
|
+
return props.entry.label;
|
|
39
|
+
});
|
|
40
|
+
return _el$5;
|
|
41
|
+
})() }), _el$2);
|
|
35
42
|
insert(_el$, createComponent(Show, {
|
|
36
43
|
get when() {
|
|
37
44
|
return props.entry.hint;
|
|
38
45
|
},
|
|
39
46
|
get children() {
|
|
40
|
-
var _el$
|
|
41
|
-
insert(_el$
|
|
42
|
-
|
|
47
|
+
var _el$3 = _tmpl$();
|
|
48
|
+
insert(_el$3, () => {
|
|
49
|
+
return props.entry.hint;
|
|
50
|
+
});
|
|
51
|
+
return _el$3;
|
|
43
52
|
}
|
|
44
|
-
}),
|
|
53
|
+
}), _el$4);
|
|
45
54
|
return _el$;
|
|
46
55
|
})()
|
|
47
56
|
});
|
|
@@ -58,6 +67,7 @@ function Row(props) {
|
|
|
58
67
|
function Command(props) {
|
|
59
68
|
injectComponentStyle("command");
|
|
60
69
|
injectComponentStyle("dialog");
|
|
70
|
+
const messages = useComponentMessages();
|
|
61
71
|
const [own, rest] = splitProps(props, [
|
|
62
72
|
"items",
|
|
63
73
|
"placeholder",
|
|
@@ -115,18 +125,21 @@ function Command(props) {
|
|
|
115
125
|
get children() {
|
|
116
126
|
return createComponent(Portal, { get children() {
|
|
117
127
|
return [createComponent(Dialog.Backdrop, {}), createComponent(Dialog.Positioner, { asChild: (positionerProps) => (() => {
|
|
118
|
-
var _el$
|
|
119
|
-
spread(_el$
|
|
128
|
+
var _el$6 = _tmpl$4();
|
|
129
|
+
spread(_el$6, [positionerProps, {
|
|
120
130
|
"data-scope": "command",
|
|
121
131
|
"data-part": "positioner"
|
|
122
|
-
}
|
|
123
|
-
insert(_el$
|
|
124
|
-
var _el$
|
|
125
|
-
spread(_el$
|
|
132
|
+
}], true);
|
|
133
|
+
insert(_el$6, createComponent(Dialog.Content, { asChild: (contentProps) => (() => {
|
|
134
|
+
var _el$7 = _tmpl$4();
|
|
135
|
+
spread(_el$7, [contentProps, {
|
|
126
136
|
"data-scope": "command",
|
|
127
|
-
"data-part": "content"
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
"data-part": "content",
|
|
138
|
+
get "aria-label"() {
|
|
139
|
+
return messages().command.palette;
|
|
140
|
+
}
|
|
141
|
+
}], true);
|
|
142
|
+
insert(_el$7, createComponent(Combobox.Root, {
|
|
130
143
|
get collection() {
|
|
131
144
|
return collection();
|
|
132
145
|
},
|
|
@@ -152,23 +165,28 @@ function Command(props) {
|
|
|
152
165
|
},
|
|
153
166
|
get children() {
|
|
154
167
|
return [createComponent(Combobox.Input, { asChild: (inputProps) => (() => {
|
|
155
|
-
var _el$
|
|
156
|
-
spread(_el$
|
|
157
|
-
|
|
168
|
+
var _el$8 = _tmpl$5();
|
|
169
|
+
spread(_el$8, [inputProps, {
|
|
170
|
+
type: "text",
|
|
158
171
|
get placeholder() {
|
|
159
|
-
return own.placeholder;
|
|
172
|
+
return own.placeholder ?? messages().command.search;
|
|
173
|
+
},
|
|
174
|
+
get "aria-label"() {
|
|
175
|
+
return messages().command.search;
|
|
160
176
|
},
|
|
161
177
|
"data-scope": "command",
|
|
162
178
|
"data-part": "input"
|
|
163
|
-
}
|
|
164
|
-
return _el$
|
|
179
|
+
}], false);
|
|
180
|
+
return _el$8;
|
|
165
181
|
})() }), createComponent(Combobox.Content, { asChild: (listProps) => (() => {
|
|
166
|
-
var _el$
|
|
167
|
-
|
|
182
|
+
var _el$9 = _tmpl$2();
|
|
183
|
+
var _el$10 = _el$9.firstChild;
|
|
184
|
+
var _el$12 = _el$10.nextSibling;
|
|
185
|
+
spread(_el$9, [listProps, {
|
|
168
186
|
"data-scope": "command",
|
|
169
187
|
"data-part": "list"
|
|
170
|
-
}
|
|
171
|
-
insert(_el$
|
|
188
|
+
}], true);
|
|
189
|
+
insert(_el$9, createComponent(For, {
|
|
172
190
|
get each() {
|
|
173
191
|
return sections();
|
|
174
192
|
},
|
|
@@ -186,48 +204,54 @@ function Command(props) {
|
|
|
186
204
|
},
|
|
187
205
|
get children() {
|
|
188
206
|
return createComponent(Combobox.ItemGroup, { asChild: (groupProps) => (() => {
|
|
189
|
-
var _el$
|
|
190
|
-
|
|
207
|
+
var _el$13 = _tmpl$2();
|
|
208
|
+
var _el$14 = _el$13.firstChild;
|
|
209
|
+
var _el$15 = _el$14.nextSibling;
|
|
210
|
+
spread(_el$13, [groupProps, {
|
|
191
211
|
"data-scope": "command",
|
|
192
212
|
"data-part": "group"
|
|
193
|
-
}
|
|
194
|
-
insert(_el$
|
|
195
|
-
var _el$
|
|
196
|
-
spread(_el$
|
|
213
|
+
}], true);
|
|
214
|
+
insert(_el$13, createComponent(Combobox.ItemGroupLabel, { asChild: (labelProps) => (() => {
|
|
215
|
+
var _el$16 = _tmpl$4();
|
|
216
|
+
spread(_el$16, [labelProps, {
|
|
197
217
|
"data-scope": "command",
|
|
198
218
|
"data-part": "group-label"
|
|
199
|
-
}
|
|
200
|
-
insert(_el$
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
}], true);
|
|
220
|
+
insert(_el$16, () => {
|
|
221
|
+
return section.group;
|
|
222
|
+
});
|
|
223
|
+
return _el$16;
|
|
224
|
+
})() }), _el$14);
|
|
225
|
+
insert(_el$13, createComponent(For, {
|
|
204
226
|
get each() {
|
|
205
227
|
return section.entries;
|
|
206
228
|
},
|
|
207
229
|
children: (entry) => createComponent(Row, { entry })
|
|
208
|
-
}),
|
|
209
|
-
return _el$
|
|
230
|
+
}), _el$15);
|
|
231
|
+
return _el$13;
|
|
210
232
|
})() });
|
|
211
233
|
}
|
|
212
234
|
})
|
|
213
|
-
}),
|
|
214
|
-
insert(_el$
|
|
235
|
+
}), _el$10);
|
|
236
|
+
insert(_el$9, createComponent(Show, {
|
|
215
237
|
get when() {
|
|
216
238
|
return sections().length === 0;
|
|
217
239
|
},
|
|
218
240
|
get children() {
|
|
219
|
-
var _el$
|
|
220
|
-
insert(_el$
|
|
221
|
-
|
|
241
|
+
var _el$11 = _tmpl$6();
|
|
242
|
+
insert(_el$11, () => {
|
|
243
|
+
return own.emptyText ?? messages().command.noMatches;
|
|
244
|
+
});
|
|
245
|
+
return _el$11;
|
|
222
246
|
}
|
|
223
|
-
}),
|
|
224
|
-
return _el$
|
|
247
|
+
}), _el$12);
|
|
248
|
+
return _el$9;
|
|
225
249
|
})() })];
|
|
226
250
|
}
|
|
227
251
|
}));
|
|
228
|
-
return _el$
|
|
252
|
+
return _el$7;
|
|
229
253
|
})() }));
|
|
230
|
-
return _el$
|
|
254
|
+
return _el$6;
|
|
231
255
|
})() })];
|
|
232
256
|
} });
|
|
233
257
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
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 { Show, splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/comment/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
7
|
-
var _tmpl$3 =
|
|
8
|
-
var _tmpl$4 =
|
|
9
|
-
var _tmpl$5 =
|
|
10
|
-
var _tmpl$6 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=comment data-part=avatar>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span data-scope=comment data-part=author>`);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<time data-scope=comment data-part=datetime>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<header data-scope=comment data-part=header><!><!>`);
|
|
9
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=comment data-part=actions>`);
|
|
10
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<article><div data-scope=comment data-part=body><div data-scope=comment data-part=content></div><!>`);
|
|
11
11
|
/**
|
|
12
12
|
* A voice on the record: the portrait hangs left (the `avatar` prop),
|
|
13
13
|
* the body carries the byline from `author` and `datetime`, the ink is
|
|
@@ -22,65 +22,80 @@ function Comment(props) {
|
|
|
22
22
|
"actions",
|
|
23
23
|
"children"
|
|
24
24
|
]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
var _el$ = _tmpl$6();
|
|
26
|
+
var _el$3 = _el$.firstChild;
|
|
27
|
+
var _el$9 = _el$3.firstChild;
|
|
28
|
+
var _el$11 = _el$9.nextSibling;
|
|
29
|
+
spread(_el$, [rest, {
|
|
30
|
+
"data-scope": "comment",
|
|
31
|
+
"data-part": "root"
|
|
32
|
+
}], true);
|
|
33
|
+
insert(_el$, createComponent(Show, {
|
|
34
|
+
get when() {
|
|
35
|
+
return own.avatar;
|
|
36
|
+
},
|
|
37
|
+
get children() {
|
|
38
|
+
var _el$2 = _tmpl$();
|
|
39
|
+
insert(_el$2, () => {
|
|
33
40
|
return own.avatar;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
});
|
|
42
|
+
return _el$2;
|
|
43
|
+
}
|
|
44
|
+
}), _el$3);
|
|
45
|
+
insert(_el$3, createComponent(Show, {
|
|
46
|
+
get when() {
|
|
47
|
+
return own.author || own.datetime;
|
|
48
|
+
},
|
|
49
|
+
get children() {
|
|
50
|
+
var _el$4 = _tmpl$4();
|
|
51
|
+
var _el$6 = _el$4.firstChild;
|
|
52
|
+
var _el$8 = _el$6.nextSibling;
|
|
53
|
+
insert(_el$4, createComponent(Show, {
|
|
54
|
+
get when() {
|
|
55
|
+
return own.author;
|
|
56
|
+
},
|
|
57
|
+
get children() {
|
|
58
|
+
var _el$5 = _tmpl$2();
|
|
59
|
+
insert(_el$5, () => {
|
|
49
60
|
return own.author;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
});
|
|
62
|
+
return _el$5;
|
|
63
|
+
}
|
|
64
|
+
}), _el$6);
|
|
65
|
+
insert(_el$4, createComponent(Show, {
|
|
66
|
+
get when() {
|
|
67
|
+
return own.datetime;
|
|
68
|
+
},
|
|
69
|
+
get children() {
|
|
70
|
+
var _el$7 = _tmpl$3();
|
|
71
|
+
insert(_el$7, () => {
|
|
59
72
|
return own.datetime;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
});
|
|
74
|
+
effect(() => own.datetime, (_v$) => {
|
|
75
|
+
setAttribute(_el$7, "datetime", _v$);
|
|
76
|
+
});
|
|
77
|
+
return _el$7;
|
|
78
|
+
}
|
|
79
|
+
}), _el$8);
|
|
80
|
+
return _el$4;
|
|
81
|
+
}
|
|
82
|
+
}), _el$9);
|
|
83
|
+
insert(_el$9, () => {
|
|
84
|
+
return own.children;
|
|
85
|
+
});
|
|
86
|
+
insert(_el$3, createComponent(Show, {
|
|
87
|
+
get when() {
|
|
88
|
+
return own.actions;
|
|
89
|
+
},
|
|
90
|
+
get children() {
|
|
91
|
+
var _el$10 = _tmpl$5();
|
|
92
|
+
insert(_el$10, () => {
|
|
74
93
|
return own.actions;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}), null);
|
|
82
|
-
return _el$;
|
|
83
|
-
})();
|
|
94
|
+
});
|
|
95
|
+
return _el$10;
|
|
96
|
+
}
|
|
97
|
+
}), _el$11);
|
|
98
|
+
return _el$;
|
|
84
99
|
}
|
|
85
100
|
//#endregion
|
|
86
101
|
export { Comment };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemeScene } from "@bysages/core";
|
|
1
|
+
import { ComponentMessagesOverride, ThemeScene } from "@bysages/core";
|
|
2
2
|
import { JSX } from "solid-js";
|
|
3
3
|
//#region src/components/config-provider/index.d.ts
|
|
4
4
|
/** The four density tiers the token layer's `[data-density]` selectors
|
|
@@ -22,6 +22,8 @@ export interface ConfigContext {
|
|
|
22
22
|
dir?: "ltr" | "rtl";
|
|
23
23
|
/** BCP-47 locale, landing as the native `lang` attribute. */
|
|
24
24
|
locale?: string;
|
|
25
|
+
/** Wrapper-owned copy, resolved with `locale` and merged over its locale defaults leaf by leaf. */
|
|
26
|
+
messages?: ComponentMessagesOverride;
|
|
25
27
|
}
|
|
26
28
|
/** Solid context for the provider's snapshot — a custom part reads it
|
|
27
29
|
* with `useContext(ConfigContextKey)`. */
|
|
@@ -36,6 +38,7 @@ export interface ConfigProviderProps extends JSX.HTMLAttributes<HTMLDivElement>
|
|
|
36
38
|
accent?: string;
|
|
37
39
|
dir?: "ltr" | "rtl";
|
|
38
40
|
locale?: string;
|
|
41
|
+
messages?: ComponentMessagesOverride;
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* The declarative host for global configuration: one element that both
|