@bysages/solid 0.3.0 → 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/dist/{ai-response-ClGGptX3.mjs → ai-response-slzE03wh.mjs} +4 -2
- package/dist/components/ai/index.mjs +11 -14
- package/dist/components/ai-attachments/index.mjs +3 -1
- package/dist/components/ai-prompt-input/index.mjs +12 -3
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +5 -1
- package/dist/components/banner/index.mjs +3 -1
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/cascade-select/index.mjs +10 -3
- package/dist/components/command/index.mjs +11 -3
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +3 -1
- package/dist/components/data-view/index.mjs +8 -2
- package/dist/components/dynamic-input/index.mjs +5 -1
- package/dist/components/file-upload/index.d.mts +7 -1
- package/dist/components/file-upload/index.mjs +11 -1
- package/dist/components/float-button/index.mjs +3 -1
- package/dist/components/image/index.d.mts +4 -0
- package/dist/components/image/index.mjs +9 -3
- package/dist/components/image-viewer/index.d.mts +4 -0
- package/dist/components/image-viewer/index.mjs +15 -7
- package/dist/components/json-tree-view/index.d.mts +5 -2
- package/dist/components/json-tree-view/index.mjs +25 -2
- package/dist/components/layout/index.mjs +8 -4
- package/dist/components/list/index.d.mts +2 -1
- package/dist/components/list/index.mjs +35 -26
- package/dist/components/menubar/index.mjs +1 -0
- package/dist/components/order-list/index.mjs +22 -14
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/spinner/index.mjs +3 -1
- package/dist/components/split-button/index.mjs +5 -1
- package/dist/components/steps/index.d.mts +6 -1
- package/dist/components/steps/index.mjs +7 -1
- package/dist/components/table/index.mjs +33 -21
- package/dist/components/terminal/index.mjs +3 -1
- package/dist/components/toc/index.d.mts +2 -7
- package/dist/components/toc/index.mjs +1 -9
- package/dist/components/transfer/index.mjs +14 -4
- package/dist/components/tree-select/index.mjs +9 -6
- package/dist/components/tree-view/index.d.mts +8 -1
- package/dist/components/tree-view/index.mjs +28 -2
- package/dist/components/virtual-list/index.mjs +1 -0
- package/dist/index-DdsnfV4f.d.mts +16 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{select-CHaXbzLX.mjs → select-CX6OuQlU.mjs} +9 -1
- package/dist/toc-CZmYEaQR.mjs +21 -0
- package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { createComponent, delegateEvents, effect, insert, memo, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
3
4
|
import { createContext, createEffect, createSignal, splitProps, useContext } from "solid-js";
|
|
@@ -6,7 +7,7 @@ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
|
6
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<header>`);
|
|
7
8
|
var _tmpl$3 = /* @__PURE__ */ template(`<main>`);
|
|
8
9
|
var _tmpl$4 = /* @__PURE__ */ template(`<footer>`);
|
|
9
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=layout data-part=sider-resize role=separator aria-orientation=vertical tabindex=0
|
|
10
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=layout data-part=sider-resize role=separator aria-orientation=vertical tabindex=0>`);
|
|
10
11
|
var _tmpl$6 = /* @__PURE__ */ template(`<aside><!><!>`);
|
|
11
12
|
const LayoutContext = createContext();
|
|
12
13
|
/**
|
|
@@ -89,6 +90,7 @@ function LayoutSider(props) {
|
|
|
89
90
|
});
|
|
90
91
|
const layout = useContext(LayoutContext);
|
|
91
92
|
const [dragging, setDragging] = createSignal(false);
|
|
93
|
+
const messages = useComponentMessages();
|
|
92
94
|
let rail;
|
|
93
95
|
let startPointerX = 0;
|
|
94
96
|
let startWidth = 0;
|
|
@@ -127,11 +129,13 @@ function LayoutSider(props) {
|
|
|
127
129
|
effect(() => {
|
|
128
130
|
return {
|
|
129
131
|
e: dragging() ? "" : void 0,
|
|
130
|
-
t:
|
|
132
|
+
t: messages().sidebar.resize,
|
|
133
|
+
a: railWidth()
|
|
131
134
|
};
|
|
132
|
-
}, ({ e, t }, _p$) => {
|
|
135
|
+
}, ({ e, t, a }, _p$) => {
|
|
133
136
|
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
134
|
-
t !== _p$?.t && setAttribute(_el$5, "aria-
|
|
137
|
+
t !== _p$?.t && setAttribute(_el$5, "aria-label", t);
|
|
138
|
+
a !== _p$?.a && setAttribute(_el$5, "aria-valuenow", a);
|
|
135
139
|
});
|
|
136
140
|
return _el$5;
|
|
137
141
|
})() : null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, JSX } from "solid-js";
|
|
2
2
|
//#region src/components/list/index.d.ts
|
|
3
|
+
declare function Item(props: JSX.HTMLAttributes<HTMLLIElement>): JSX.Element;
|
|
3
4
|
export interface ListRootProps extends JSX.HTMLAttributes<HTMLUListElement> {
|
|
4
5
|
/** One hairline between rows. */
|
|
5
6
|
bordered?: boolean;
|
|
@@ -18,7 +19,7 @@ export interface ListContentProps extends Omit<JSX.HTMLAttributes<HTMLDivElement
|
|
|
18
19
|
declare function Content(props: ListContentProps): JSX.Element;
|
|
19
20
|
export declare const List: typeof Root & {
|
|
20
21
|
Root: typeof Root;
|
|
21
|
-
Item:
|
|
22
|
+
Item: typeof Item;
|
|
22
23
|
Leading: Component<JSX.HTMLAttributes<HTMLElement>>;
|
|
23
24
|
Content: typeof Content;
|
|
24
25
|
Actions: Component<JSX.HTMLAttributes<HTMLElement>>;
|
|
@@ -2,10 +2,11 @@ import { injectComponentStyle } from "@bysages/core";
|
|
|
2
2
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { Show, splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/list/index.tsx
|
|
5
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
6
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
7
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=list data-part=
|
|
8
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<div
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<li>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<ul>`);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=list data-part=title>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<div data-scope=list data-part=description>`);
|
|
9
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div><!><!><!>`);
|
|
9
10
|
/** A ledger of rows: Root is the list, Item one row, Leading the mark
|
|
10
11
|
* before the words, Content the title and its quiet echo, Actions the
|
|
11
12
|
* way out. The bordered variant draws the hairlines; the hoverable
|
|
@@ -22,13 +23,21 @@ function part(name, tag) {
|
|
|
22
23
|
}
|
|
23
24
|
return Component;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
function Item(props) {
|
|
27
|
+
const [, rest] = splitProps(props, ["role"]);
|
|
28
|
+
var _el$ = _tmpl$();
|
|
29
|
+
spread(_el$, [rest, {
|
|
30
|
+
"data-scope": "list",
|
|
31
|
+
"data-part": "item"
|
|
32
|
+
}], false);
|
|
33
|
+
return _el$;
|
|
34
|
+
}
|
|
26
35
|
const Leading = part("Leading", "div");
|
|
27
36
|
const Actions = part("Actions", "div");
|
|
28
37
|
function Root(props) {
|
|
29
38
|
const [own, rest] = splitProps(props, ["bordered", "hoverable"]);
|
|
30
|
-
var _el$ = _tmpl$();
|
|
31
|
-
spread(_el
|
|
39
|
+
var _el$2 = _tmpl$2();
|
|
40
|
+
spread(_el$2, [rest, {
|
|
32
41
|
"data-scope": "list",
|
|
33
42
|
"data-part": "root",
|
|
34
43
|
get "data-bordered"() {
|
|
@@ -38,7 +47,7 @@ function Root(props) {
|
|
|
38
47
|
return own.hoverable || void 0;
|
|
39
48
|
}
|
|
40
49
|
}], false);
|
|
41
|
-
return _el
|
|
50
|
+
return _el$2;
|
|
42
51
|
}
|
|
43
52
|
/** The row's words: `title` and `description` ride their own named
|
|
44
53
|
* parts, the children follow them for anything else. */
|
|
@@ -48,42 +57,42 @@ function Content(props) {
|
|
|
48
57
|
"description",
|
|
49
58
|
"children"
|
|
50
59
|
]);
|
|
51
|
-
var _el$
|
|
52
|
-
var _el$
|
|
53
|
-
var _el$
|
|
54
|
-
var _el$
|
|
55
|
-
spread(_el$
|
|
60
|
+
var _el$3 = _tmpl$5();
|
|
61
|
+
var _el$5 = _el$3.firstChild;
|
|
62
|
+
var _el$7 = _el$5.nextSibling;
|
|
63
|
+
var _el$8 = _el$7.nextSibling;
|
|
64
|
+
spread(_el$3, [rest, {
|
|
56
65
|
"data-scope": "list",
|
|
57
66
|
"data-part": "content"
|
|
58
67
|
}], true);
|
|
59
|
-
insert(_el$
|
|
68
|
+
insert(_el$3, createComponent(Show, {
|
|
60
69
|
get when() {
|
|
61
70
|
return own.title;
|
|
62
71
|
},
|
|
63
72
|
get children() {
|
|
64
|
-
var _el$
|
|
65
|
-
insert(_el$
|
|
73
|
+
var _el$4 = _tmpl$3();
|
|
74
|
+
insert(_el$4, () => {
|
|
66
75
|
return own.title;
|
|
67
76
|
});
|
|
68
|
-
return _el$
|
|
77
|
+
return _el$4;
|
|
69
78
|
}
|
|
70
|
-
}), _el$
|
|
71
|
-
insert(_el$
|
|
79
|
+
}), _el$5);
|
|
80
|
+
insert(_el$3, createComponent(Show, {
|
|
72
81
|
get when() {
|
|
73
82
|
return own.description;
|
|
74
83
|
},
|
|
75
84
|
get children() {
|
|
76
|
-
var _el$
|
|
77
|
-
insert(_el$
|
|
85
|
+
var _el$6 = _tmpl$4();
|
|
86
|
+
insert(_el$6, () => {
|
|
78
87
|
return own.description;
|
|
79
88
|
});
|
|
80
|
-
return _el$
|
|
89
|
+
return _el$6;
|
|
81
90
|
}
|
|
82
|
-
}), _el$
|
|
83
|
-
insert(_el$
|
|
91
|
+
}), _el$7);
|
|
92
|
+
insert(_el$3, () => {
|
|
84
93
|
return own.children;
|
|
85
|
-
}, _el$
|
|
86
|
-
return _el$
|
|
94
|
+
}, _el$8);
|
|
95
|
+
return _el$3;
|
|
87
96
|
}
|
|
88
97
|
const List = Object.assign(Root, {
|
|
89
98
|
Root,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
3
4
|
import { For, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
@@ -5,7 +6,7 @@ import { For, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
|
5
6
|
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"width=12 height=12 fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true>`);
|
|
6
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<svg><path></svg>`, 2);
|
|
7
8
|
var _tmpl$3 = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
8
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<li
|
|
9
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<li draggable aria-roledescription="Sortable item"data-scope=order-list data-part=item><span data-scope=order-list data-part=grip aria-hidden=true>⋮⋮</span><span data-scope=order-list data-part=label></span><span data-scope=order-list data-part=controls><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move>`);
|
|
9
10
|
const ARROWS = {
|
|
10
11
|
up: ["m18 15-6-6-6 6"],
|
|
11
12
|
down: ["m6 9 6 6 6-6"],
|
|
@@ -30,6 +31,7 @@ function arrowGlyph(paths) {
|
|
|
30
31
|
* hairline of primary ink marks the seam the row will land on — so
|
|
31
32
|
* touch keeps the buttons as its route. */
|
|
32
33
|
function OrderList(props) {
|
|
34
|
+
const messages = useComponentMessages();
|
|
33
35
|
injectComponentStyle("order-list");
|
|
34
36
|
const uid = createUniqueId();
|
|
35
37
|
const [own, rest] = splitProps(props, [
|
|
@@ -69,11 +71,6 @@ function OrderList(props) {
|
|
|
69
71
|
var _el$3 = _tmpl$3();
|
|
70
72
|
var _el$4 = _el$3.firstChild;
|
|
71
73
|
spread(_el$3, [rest, {
|
|
72
|
-
role: "listbox",
|
|
73
|
-
get "aria-label"() {
|
|
74
|
-
return own.label;
|
|
75
|
-
},
|
|
76
|
-
"aria-multiselectable": false,
|
|
77
74
|
"data-scope": "order-list",
|
|
78
75
|
"data-part": "root",
|
|
79
76
|
"data-uid": uid,
|
|
@@ -137,22 +134,33 @@ function OrderList(props) {
|
|
|
137
134
|
return {
|
|
138
135
|
e: dragging() === option.value ? "" : void 0,
|
|
139
136
|
t: seam(),
|
|
140
|
-
a:
|
|
137
|
+
a: messages().orderList.toTop,
|
|
141
138
|
o: index() === 0,
|
|
142
|
-
i:
|
|
143
|
-
n: index() ===
|
|
139
|
+
i: messages().orderList.moveUp,
|
|
140
|
+
n: index() === 0,
|
|
141
|
+
s: messages().orderList.moveDown,
|
|
142
|
+
h: index() === rows().length - 1,
|
|
143
|
+
r: messages().orderList.toBottom,
|
|
144
|
+
d: index() === rows().length - 1
|
|
144
145
|
};
|
|
145
|
-
}, ({ e, t, a, o, i, n }, _p$) => {
|
|
146
|
+
}, ({ e, t, a, o, i, n, s, h, r, d }, _p$) => {
|
|
146
147
|
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
147
148
|
t !== _p$?.t && setAttribute(_el$5, "data-drop-line", t);
|
|
148
|
-
a !== _p$?.a && setAttribute(_el$9, "
|
|
149
|
-
o !== _p$?.o && setAttribute(_el$
|
|
150
|
-
i !== _p$?.i && setAttribute(_el$
|
|
151
|
-
n !== _p$?.n && setAttribute(_el$
|
|
149
|
+
a !== _p$?.a && setAttribute(_el$9, "aria-label", a);
|
|
150
|
+
o !== _p$?.o && setAttribute(_el$9, "disabled", o);
|
|
151
|
+
i !== _p$?.i && setAttribute(_el$10, "aria-label", i);
|
|
152
|
+
n !== _p$?.n && setAttribute(_el$10, "disabled", n);
|
|
153
|
+
s !== _p$?.s && setAttribute(_el$11, "aria-label", s);
|
|
154
|
+
h !== _p$?.h && setAttribute(_el$11, "disabled", h);
|
|
155
|
+
r !== _p$?.r && setAttribute(_el$12, "aria-label", r);
|
|
156
|
+
d !== _p$?.d && setAttribute(_el$12, "disabled", d);
|
|
152
157
|
});
|
|
153
158
|
return _el$5;
|
|
154
159
|
}
|
|
155
160
|
}));
|
|
161
|
+
effect(() => own.label, (_v$) => {
|
|
162
|
+
setAttribute(_el$4, "aria-label", _v$);
|
|
163
|
+
});
|
|
156
164
|
return _el$3;
|
|
157
165
|
}
|
|
158
166
|
delegateEvents(["click"]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NativeSelect, t as Select } from "../../select-
|
|
1
|
+
import { n as NativeSelect, t as Select } from "../../select-CX6OuQlU.mjs";
|
|
2
2
|
export { NativeSelect, Select };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -8,11 +9,12 @@ var _tmpl$ = /* @__PURE__ */ template(`<span><svg viewBox="0 0 24 24"fill=none a
|
|
|
8
9
|
function Spinner(props) {
|
|
9
10
|
injectComponentStyle("spinner");
|
|
10
11
|
const [own, rest] = splitProps(props, ["size"]);
|
|
12
|
+
const messages = useComponentMessages();
|
|
11
13
|
var _el$ = _tmpl$();
|
|
12
14
|
spread(_el$, [rest, {
|
|
13
15
|
role: "status",
|
|
14
16
|
get "aria-label"() {
|
|
15
|
-
return rest["aria-label"] ??
|
|
17
|
+
return rest["aria-label"] ?? messages().spinner.loading;
|
|
16
18
|
},
|
|
17
19
|
"data-scope": "spinner",
|
|
18
20
|
"data-part": "root",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
5
|
import { For, splitProps } from "solid-js";
|
|
@@ -34,6 +35,7 @@ function SplitButton(props) {
|
|
|
34
35
|
const variant = () => own.variant ?? "solid";
|
|
35
36
|
const tone = () => own.tone ?? "ink";
|
|
36
37
|
const size = () => own.size ?? "md";
|
|
38
|
+
const messages = useComponentMessages();
|
|
37
39
|
var _el$ = _tmpl$();
|
|
38
40
|
var _el$2 = _el$.firstChild;
|
|
39
41
|
var _el$3 = _el$2.nextSibling;
|
|
@@ -69,7 +71,9 @@ function SplitButton(props) {
|
|
|
69
71
|
get disabled() {
|
|
70
72
|
return own.disabled;
|
|
71
73
|
},
|
|
72
|
-
"aria-label"
|
|
74
|
+
get "aria-label"() {
|
|
75
|
+
return messages().more.actions;
|
|
76
|
+
},
|
|
73
77
|
get "data-variant"() {
|
|
74
78
|
return variant();
|
|
75
79
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Steps as Steps$1, StepsRootProps } from "@ark-ui/solid/steps";
|
|
2
3
|
//#region src/components/steps/index.d.ts
|
|
3
4
|
/**
|
|
@@ -12,7 +13,11 @@ type StepsOwnProps = {
|
|
|
12
13
|
size?: "sm" | "md" | "lg";
|
|
13
14
|
};
|
|
14
15
|
declare function StepsRoot(props: StepsRootProps & StepsOwnProps): import("solid-js").JSX.Element;
|
|
15
|
-
|
|
16
|
+
/** The machine wraps each tab in an item div; presentation keeps the
|
|
17
|
+
* tablist owned children legal while the tab itself keeps its role. */
|
|
18
|
+
declare function StepsItem(props: ComponentProps<typeof Steps$1.Item>): import("solid-js").JSX.Element;
|
|
19
|
+
export declare const Steps: Omit<typeof Steps$1, "Root" | "Item"> & {
|
|
16
20
|
Root: typeof StepsRoot;
|
|
21
|
+
Item: typeof StepsItem;
|
|
17
22
|
};
|
|
18
23
|
//#endregion
|
|
@@ -9,9 +9,15 @@ function StepsRoot(props) {
|
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
12
|
+
/** The machine wraps each tab in an item div; presentation keeps the
|
|
13
|
+
* tablist owned children legal while the tab itself keeps its role. */
|
|
14
|
+
function StepsItem(props) {
|
|
15
|
+
return createComponent(Steps$1.Item, mergeProps(props, { role: "presentation" }));
|
|
16
|
+
}
|
|
12
17
|
const Steps = {
|
|
13
18
|
...Steps$1,
|
|
14
|
-
Root: StepsRoot
|
|
19
|
+
Root: StepsRoot,
|
|
20
|
+
Item: StepsItem
|
|
15
21
|
};
|
|
16
22
|
injectComponentStyle("steps");
|
|
17
23
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { n as useComponentMessages, t as formatComponentMessage } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { Pagination } from "../pagination/index.mjs";
|
|
2
|
-
import { t as Select$1 } from "../../select-
|
|
3
|
+
import { t as Select$1 } from "../../select-CX6OuQlU.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { addEvent, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, setStyleProperty, spread, style, template } from "@solidjs/web";
|
|
5
6
|
import { For, createMemo, createSignal, onCleanup, onMount } from "solid-js";
|
|
@@ -15,9 +16,9 @@ var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=table data-part=cell-mai
|
|
|
15
16
|
var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
|
|
16
17
|
var _tmpl$7 = /* @__PURE__ */ template(`<div role=row data-scope=table data-part=row>`);
|
|
17
18
|
var _tmpl$8 = /* @__PURE__ */ template(`<div><!><!>`);
|
|
18
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<input type=text data-scope=table data-part=header-filter
|
|
19
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<div data-scope=table data-part=root><div data-scope=table data-part=viewport><div role=table data-scope=table data-part=table><div role=rowgroup data-scope=table data-part=header></div><div role=rowgroup data-scope=table data-part=body><!><!></div></div></div><!>`);
|
|
20
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<div data-scope=table data-part=toolbar><input type=search data-scope=table data-part=global-filter
|
|
19
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<input type=text data-scope=table data-part=header-filter>`);
|
|
20
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div data-scope=table data-part=root><div data-scope=table data-part=viewport tabindex=0><div role=table data-scope=table data-part=table><div role=rowgroup data-scope=table data-part=header></div><div role=rowgroup data-scope=table data-part=body><!><!></div></div></div><!>`);
|
|
21
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div data-scope=table data-part=toolbar><input type=search data-scope=table data-part=global-filter>`);
|
|
21
22
|
var _tmpl$12 = /* @__PURE__ */ template(`<div><input>`);
|
|
22
23
|
var _tmpl$13 = /* @__PURE__ */ template(`<div data-scope=table data-part=empty>`);
|
|
23
24
|
var _tmpl$14 = /* @__PURE__ */ template(`<div role=rowgroup data-scope=table data-part=footer>`);
|
|
@@ -85,6 +86,7 @@ function mark(el, attr, on) {
|
|
|
85
86
|
}
|
|
86
87
|
const chevronGlyph = _tmpl$3();
|
|
87
88
|
function DataTable(props) {
|
|
89
|
+
const messages = useComponentMessages();
|
|
88
90
|
injectComponentStyle("table");
|
|
89
91
|
if (props.virtual && props.merge) console.warn("[DataTable] `virtual` and `merge` are mutually exclusive; merge wins.");
|
|
90
92
|
/** Features follow the construction-time switches: sorting, selection,
|
|
@@ -408,7 +410,9 @@ function DataTable(props) {
|
|
|
408
410
|
},
|
|
409
411
|
{ indeterminate: false },
|
|
410
412
|
{
|
|
411
|
-
"aria-label"
|
|
413
|
+
get "aria-label"() {
|
|
414
|
+
return messages().table.selectRow;
|
|
415
|
+
},
|
|
412
416
|
onchange: () => row.toggleSelected(!row.getIsSelected())
|
|
413
417
|
}
|
|
414
418
|
], false);
|
|
@@ -425,7 +429,7 @@ function DataTable(props) {
|
|
|
425
429
|
e: String(row.depth),
|
|
426
430
|
t: row.getIsExpanded() || void 0,
|
|
427
431
|
a: !row.getCanExpand() || void 0,
|
|
428
|
-
o: row.getIsExpanded() ?
|
|
432
|
+
o: row.getIsExpanded() ? messages().table.collapseRow : messages().table.expandRow
|
|
429
433
|
};
|
|
430
434
|
}, ({ e, t, a, o }, _p$) => {
|
|
431
435
|
e !== _p$?.e && setStyleProperty(_el$6, "--bs-table-depth", e);
|
|
@@ -539,12 +543,14 @@ function DataTable(props) {
|
|
|
539
543
|
_el$13._$$click = (e) => e.stopPropagation();
|
|
540
544
|
effect(() => {
|
|
541
545
|
return {
|
|
542
|
-
e:
|
|
543
|
-
t: column.getFilterValue() ?? ""
|
|
546
|
+
e: formatComponentMessage(messages().table.filterColumn, { name: column.id }),
|
|
547
|
+
t: column.getFilterValue() ?? "",
|
|
548
|
+
a: messages().command.filter
|
|
544
549
|
};
|
|
545
|
-
}, ({ e, t }, _p$) => {
|
|
550
|
+
}, ({ e, t, a }, _p$) => {
|
|
546
551
|
e !== _p$?.e && setAttribute(_el$13, "aria-label", e);
|
|
547
552
|
_el$13.value = t ?? "";
|
|
553
|
+
a !== _p$?.a && setAttribute(_el$13, "placeholder", a);
|
|
548
554
|
});
|
|
549
555
|
return _el$13;
|
|
550
556
|
})() : null, _el$12);
|
|
@@ -569,12 +575,14 @@ function DataTable(props) {
|
|
|
569
575
|
_el$23._$$input = (e) => table.setGlobalFilter(e.target.value);
|
|
570
576
|
effect(() => {
|
|
571
577
|
return {
|
|
572
|
-
e:
|
|
573
|
-
t:
|
|
578
|
+
e: messages().table.filterAll,
|
|
579
|
+
t: props.globalFilterPlaceholder,
|
|
580
|
+
a: table.atoms.globalFilter.get() ?? ""
|
|
574
581
|
};
|
|
575
|
-
}, ({ e, t }, _p$) => {
|
|
576
|
-
e !== _p$?.e && setAttribute(_el$23, "
|
|
577
|
-
|
|
582
|
+
}, ({ e, t, a }, _p$) => {
|
|
583
|
+
e !== _p$?.e && setAttribute(_el$23, "aria-label", e);
|
|
584
|
+
t !== _p$?.t && setAttribute(_el$23, "placeholder", t);
|
|
585
|
+
_el$23.value = a ?? "";
|
|
578
586
|
});
|
|
579
587
|
return _el$22;
|
|
580
588
|
})() : null;
|
|
@@ -615,7 +623,9 @@ function DataTable(props) {
|
|
|
615
623
|
return { indeterminate: table.getIsSomeRowsSelected() && !all };
|
|
616
624
|
},
|
|
617
625
|
{
|
|
618
|
-
"aria-label"
|
|
626
|
+
get "aria-label"() {
|
|
627
|
+
return messages().table.selectAllRows;
|
|
628
|
+
},
|
|
619
629
|
onchange: () => table.toggleAllRowsSelected(!all)
|
|
620
630
|
}
|
|
621
631
|
], false);
|
|
@@ -651,7 +661,7 @@ function DataTable(props) {
|
|
|
651
661
|
return _c$4() ? (() => {
|
|
652
662
|
var _el$27 = _tmpl$13();
|
|
653
663
|
insert(_el$27, () => {
|
|
654
|
-
return props.emptyText;
|
|
664
|
+
return props.emptyText ?? messages().table.empty;
|
|
655
665
|
});
|
|
656
666
|
return _el$27;
|
|
657
667
|
})() : null;
|
|
@@ -677,7 +687,7 @@ function DataTable(props) {
|
|
|
677
687
|
children: (header) => (() => {
|
|
678
688
|
var _el$30 = _tmpl$6();
|
|
679
689
|
spread(_el$30, [{
|
|
680
|
-
role: "
|
|
690
|
+
role: "cell",
|
|
681
691
|
"data-scope": "table",
|
|
682
692
|
"data-part": "footer-cell",
|
|
683
693
|
get "data-numeric"() {
|
|
@@ -716,7 +726,7 @@ function DataTable(props) {
|
|
|
716
726
|
var _el$34 = _el$33.firstChild;
|
|
717
727
|
var _el$35 = _el$34.nextSibling;
|
|
718
728
|
insert(_el$32, () => {
|
|
719
|
-
return
|
|
729
|
+
return formatComponentMessage(messages().table.rowsCount, { count: table.getRowCount() });
|
|
720
730
|
});
|
|
721
731
|
insert(_el$33, createComponent(Select$1.Root, {
|
|
722
732
|
get collection() {
|
|
@@ -725,7 +735,7 @@ function DataTable(props) {
|
|
|
725
735
|
20,
|
|
726
736
|
50
|
|
727
737
|
]).map((size) => ({
|
|
728
|
-
label:
|
|
738
|
+
label: formatComponentMessage(messages().table.perPage, { size }),
|
|
729
739
|
value: String(size)
|
|
730
740
|
})) });
|
|
731
741
|
},
|
|
@@ -737,7 +747,9 @@ function DataTable(props) {
|
|
|
737
747
|
get children() {
|
|
738
748
|
return [createComponent(Select$1.Control, { get children() {
|
|
739
749
|
return createComponent(Select$1.Trigger, {
|
|
740
|
-
"aria-label"
|
|
750
|
+
get "aria-label"() {
|
|
751
|
+
return messages().table.rowsPerPage;
|
|
752
|
+
},
|
|
741
753
|
get children() {
|
|
742
754
|
return [createComponent(Select$1.ValueText, {}), createComponent(Select$1.Indicator, { get children() {
|
|
743
755
|
return chevronDownGlyph();
|
|
@@ -753,7 +765,7 @@ function DataTable(props) {
|
|
|
753
765
|
20,
|
|
754
766
|
50
|
|
755
767
|
]).map((size) => ({
|
|
756
|
-
label:
|
|
768
|
+
label: formatComponentMessage(messages().table.perPage, { size }),
|
|
757
769
|
value: String(size)
|
|
758
770
|
}));
|
|
759
771
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { createComponent, delegateEvents, effect, insert, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
3
4
|
import { For, createEffect, createSignal, onMount, splitProps } from "solid-js";
|
|
@@ -9,6 +10,7 @@ var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=terminal data-part=line>
|
|
|
9
10
|
* leaves as an event, and the caller answers through the lines prop,
|
|
10
11
|
* so history stays theirs to shape. */
|
|
11
12
|
function Terminal(props) {
|
|
13
|
+
const messages = useComponentMessages();
|
|
12
14
|
injectComponentStyle("terminal");
|
|
13
15
|
const [own, rest] = splitProps(props, [
|
|
14
16
|
"lines",
|
|
@@ -70,7 +72,7 @@ function Terminal(props) {
|
|
|
70
72
|
return {
|
|
71
73
|
e: draft(),
|
|
72
74
|
t: own.placeholder,
|
|
73
|
-
a: own.label
|
|
75
|
+
a: own.label ?? messages().terminal.commandLine
|
|
74
76
|
};
|
|
75
77
|
}, ({ e, t, a }, _p$) => {
|
|
76
78
|
_el$5.value = e ?? "";
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
|
|
4
|
-
* beside the scroll, one stroke of primary ink marking where the reader
|
|
5
|
-
* stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
|
|
6
|
-
export declare const Toc: typeof Toc$1;
|
|
7
|
-
//#endregion
|
|
1
|
+
import { t as Toc } from "../../index-DdsnfV4f.mjs";
|
|
2
|
+
export { Toc };
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Toc as Toc$1 } from "@ark-ui/solid/toc";
|
|
3
|
-
//#region src/components/toc/index.ts
|
|
4
|
-
/** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
|
|
5
|
-
* beside the scroll, one stroke of primary ink marking where the reader
|
|
6
|
-
* stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
|
|
7
|
-
const Toc = Toc$1;
|
|
8
|
-
injectComponentStyle("toc");
|
|
9
|
-
//#endregion
|
|
1
|
+
import { t as Toc } from "../../toc-CZmYEaQR.mjs";
|
|
10
2
|
export { Toc };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { n as useComponentMessages, t as formatComponentMessage } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
3
|
import { t as Input } from "../../input-DoFQ7RXh.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { createComponent, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
@@ -28,6 +29,7 @@ function arrowGlyph(direction) {
|
|
|
28
29
|
* panel.
|
|
29
30
|
*/
|
|
30
31
|
function Transfer(props) {
|
|
32
|
+
const messages = useComponentMessages();
|
|
31
33
|
injectComponentStyle("transfer");
|
|
32
34
|
injectComponentStyle("checkbox");
|
|
33
35
|
const [own, rest] = splitProps(props, [
|
|
@@ -82,8 +84,12 @@ function Transfer(props) {
|
|
|
82
84
|
return query();
|
|
83
85
|
},
|
|
84
86
|
onValueChange: setQuery,
|
|
85
|
-
placeholder
|
|
86
|
-
|
|
87
|
+
get placeholder() {
|
|
88
|
+
return formatComponentMessage(messages().transfer.filter, { name: title });
|
|
89
|
+
},
|
|
90
|
+
get "aria-label"() {
|
|
91
|
+
return formatComponentMessage(messages().transfer.filter, { name: title });
|
|
92
|
+
}
|
|
87
93
|
}));
|
|
88
94
|
return _el$8;
|
|
89
95
|
}
|
|
@@ -147,7 +153,9 @@ function Transfer(props) {
|
|
|
147
153
|
get disabled() {
|
|
148
154
|
return checkedSource().size === 0 || own.disabled;
|
|
149
155
|
},
|
|
150
|
-
"aria-label"
|
|
156
|
+
get "aria-label"() {
|
|
157
|
+
return messages().transfer.moveRight;
|
|
158
|
+
},
|
|
151
159
|
onClick: () => move(true),
|
|
152
160
|
get children() {
|
|
153
161
|
return arrowGlyph("right");
|
|
@@ -160,7 +168,9 @@ function Transfer(props) {
|
|
|
160
168
|
get disabled() {
|
|
161
169
|
return checkedTarget().size === 0 || own.disabled;
|
|
162
170
|
},
|
|
163
|
-
"aria-label"
|
|
171
|
+
get "aria-label"() {
|
|
172
|
+
return messages().transfer.moveLeft;
|
|
173
|
+
},
|
|
164
174
|
onClick: () => move(false),
|
|
165
175
|
get children() {
|
|
166
176
|
return arrowGlyph("left");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { t as Input } from "../../input-DoFQ7RXh.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
@@ -24,6 +25,7 @@ function chevron() {
|
|
|
24
25
|
* matches keep their ancestors and the branches fan open.
|
|
25
26
|
*/
|
|
26
27
|
function TreeSelect(props) {
|
|
28
|
+
const messages = useComponentMessages();
|
|
27
29
|
injectComponentStyle("tree-select");
|
|
28
30
|
injectComponentStyle("tree-view");
|
|
29
31
|
const [own, rest] = splitProps(props, [
|
|
@@ -97,10 +99,7 @@ function TreeSelect(props) {
|
|
|
97
99
|
get fallback() {
|
|
98
100
|
return createComponent(TreeView.Item, { asChild: (propsFn) => (() => {
|
|
99
101
|
var _el$2 = _tmpl$2();
|
|
100
|
-
spread(_el$2,
|
|
101
|
-
display: "flex",
|
|
102
|
-
"inline-size": "100%"
|
|
103
|
-
} }], true);
|
|
102
|
+
spread(_el$2, propsFn, true);
|
|
104
103
|
insert(_el$2, createComponent(TreeView.ItemText, { get children() {
|
|
105
104
|
return rowProps.node.label;
|
|
106
105
|
} }));
|
|
@@ -193,8 +192,12 @@ function TreeSelect(props) {
|
|
|
193
192
|
return query();
|
|
194
193
|
},
|
|
195
194
|
onValueChange: setQuery,
|
|
196
|
-
placeholder
|
|
197
|
-
|
|
195
|
+
get placeholder() {
|
|
196
|
+
return messages().select.filter;
|
|
197
|
+
},
|
|
198
|
+
get "aria-label"() {
|
|
199
|
+
return messages().select.filter;
|
|
200
|
+
}
|
|
198
201
|
}));
|
|
199
202
|
return _el$3;
|
|
200
203
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { TreeNode, TreeView as TreeView$1, TreeViewRootProps } from "@ark-ui/solid/tree-view";
|
|
2
3
|
//#region src/components/tree-view/index.d.ts
|
|
3
4
|
/** Ark's TreeView, dressed in the paper-and-ink system: quiet rows where
|
|
@@ -12,7 +13,13 @@ type TreeViewOwnProps = {
|
|
|
12
13
|
size?: "sm" | "md" | "lg";
|
|
13
14
|
};
|
|
14
15
|
declare function TreeViewRoot<T extends TreeNode>(props: TreeViewRootProps<T> & TreeViewOwnProps): import("solid-js").JSX.Element;
|
|
15
|
-
|
|
16
|
+
/** The node checkbox rides inside the branch control; the branch
|
|
17
|
+
* itself answers the keyboard, so the checkbox stays visual only. */
|
|
18
|
+
declare function TreeViewNodeCheckbox(props: ComponentProps<typeof TreeView$1.NodeCheckbox>): import("solid-js").JSX.Element;
|
|
19
|
+
declare function TreeViewBranchIndicator(props: ComponentProps<typeof TreeView$1.BranchIndicator>): import("solid-js").JSX.Element;
|
|
20
|
+
export declare const TreeView: Omit<typeof TreeView$1, "Root" | "NodeCheckbox" | "BranchIndicator"> & {
|
|
16
21
|
Root: typeof TreeViewRoot;
|
|
22
|
+
NodeCheckbox: typeof TreeViewNodeCheckbox;
|
|
23
|
+
BranchIndicator: typeof TreeViewBranchIndicator;
|
|
17
24
|
};
|
|
18
25
|
//#endregion
|