@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,14 +1,14 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, insert,
|
|
2
|
+
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/meter/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span><span data-scope=meter data-part=range>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
7
7
|
function part(name, tag) {
|
|
8
8
|
function Component(props) {
|
|
9
9
|
return createComponent(tag, mergeProps(props, {
|
|
10
10
|
"data-scope": "meter",
|
|
11
|
-
get
|
|
11
|
+
get "data-part"() {
|
|
12
12
|
return name.toLowerCase();
|
|
13
13
|
}
|
|
14
14
|
}));
|
|
@@ -19,10 +19,10 @@ const Label = part("Label", "span");
|
|
|
19
19
|
const ValueText = part("ValueText", "span");
|
|
20
20
|
const Track = (props) => (() => {
|
|
21
21
|
var _el$ = _tmpl$();
|
|
22
|
-
spread(_el$,
|
|
22
|
+
spread(_el$, [props, {
|
|
23
23
|
"data-scope": "meter",
|
|
24
24
|
"data-part": "track"
|
|
25
|
-
}
|
|
25
|
+
}], true);
|
|
26
26
|
return _el$;
|
|
27
27
|
})();
|
|
28
28
|
function Root(props) {
|
|
@@ -41,38 +41,38 @@ function Root(props) {
|
|
|
41
41
|
return span > 0 ? Math.min(Math.max((own.value - min()) / span, 0), 1) : 0;
|
|
42
42
|
};
|
|
43
43
|
const level = () => own.level ?? "normal";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
44
|
+
var _el$2 = _tmpl$2();
|
|
45
|
+
spread(_el$2, [rest, {
|
|
46
|
+
role: "meter",
|
|
47
|
+
get "aria-valuemin"() {
|
|
48
|
+
return min();
|
|
49
|
+
},
|
|
50
|
+
get "aria-valuemax"() {
|
|
51
|
+
return max();
|
|
52
|
+
},
|
|
53
|
+
get "aria-valuenow"() {
|
|
54
|
+
return own.value;
|
|
55
|
+
},
|
|
56
|
+
get "aria-label"() {
|
|
57
|
+
return own.label ?? rest["aria-label"];
|
|
58
|
+
},
|
|
59
|
+
"data-scope": "meter",
|
|
60
|
+
"data-part": "root",
|
|
61
|
+
get "data-size"() {
|
|
62
|
+
return own.size ?? "md";
|
|
63
|
+
},
|
|
64
|
+
get "data-level"() {
|
|
65
|
+
return level() !== "normal" ? level() : void 0;
|
|
66
|
+
},
|
|
67
|
+
get style() {
|
|
68
|
+
return {
|
|
69
|
+
...rest.style,
|
|
70
|
+
"--_percent": `${ratio() * 100}%`
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}], true);
|
|
74
|
+
insert(_el$2, () => {
|
|
75
|
+
return rest.children ?? [
|
|
76
76
|
createComponent(Label, { get children() {
|
|
77
77
|
return own.label;
|
|
78
78
|
} }),
|
|
@@ -80,9 +80,9 @@ function Root(props) {
|
|
|
80
80
|
return `${Math.round(ratio() * 100)}%`;
|
|
81
81
|
} }),
|
|
82
82
|
createComponent(Track, {})
|
|
83
|
-
]
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
];
|
|
84
|
+
});
|
|
85
|
+
return _el$2;
|
|
86
86
|
}
|
|
87
87
|
const Meter = Object.assign(Root, {
|
|
88
88
|
Root,
|
|
@@ -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 { NumberInput as NumberInput$1 } from "@ark-ui/solid/number-input";
|
|
5
5
|
//#region src/components/number-input/index.tsx
|
|
6
6
|
function NumberInputRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(NumberInput$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(NumberInput$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/order-list/index.d.ts
|
|
3
|
+
export interface OrderOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OrderListProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** The rows in their current order — the value is the order. */
|
|
9
|
+
value: string[];
|
|
10
|
+
/** Every row the ledger knows, in no particular order. */
|
|
11
|
+
options: OrderOption[];
|
|
12
|
+
label?: string;
|
|
13
|
+
onValueChange?: (value: string[]) => void;
|
|
14
|
+
}
|
|
15
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
16
|
+
* arrows, and the group reports the new order as the value itself —
|
|
17
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
18
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
19
|
+
* touch keeps the buttons as its route. */
|
|
20
|
+
export declare function OrderList(props: OrderListProps): JSX.Element;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
4
|
+
import { For, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
5
|
+
//#region src/components/order-list/index.tsx
|
|
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>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg><path></svg>`, 2);
|
|
8
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
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>`);
|
|
10
|
+
const ARROWS = {
|
|
11
|
+
up: ["m18 15-6-6-6 6"],
|
|
12
|
+
down: ["m6 9 6 6 6-6"],
|
|
13
|
+
top: ["m18 15-6-6-6 6", "M5 4h14"],
|
|
14
|
+
bottom: ["m6 9 6 6 6-6", "M5 20h14"]
|
|
15
|
+
};
|
|
16
|
+
function arrowGlyph(paths) {
|
|
17
|
+
var _el$ = _tmpl$();
|
|
18
|
+
insert(_el$, createComponent(For, {
|
|
19
|
+
each: paths,
|
|
20
|
+
children: (d) => (() => {
|
|
21
|
+
var _el$2 = _tmpl$2();
|
|
22
|
+
setAttribute(_el$2, "d", d);
|
|
23
|
+
return _el$2;
|
|
24
|
+
})()
|
|
25
|
+
}));
|
|
26
|
+
return _el$;
|
|
27
|
+
}
|
|
28
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
29
|
+
* arrows, and the group reports the new order as the value itself —
|
|
30
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
31
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
32
|
+
* touch keeps the buttons as its route. */
|
|
33
|
+
function OrderList(props) {
|
|
34
|
+
const messages = useComponentMessages();
|
|
35
|
+
injectComponentStyle("order-list");
|
|
36
|
+
const uid = createUniqueId();
|
|
37
|
+
const [own, rest] = splitProps(props, [
|
|
38
|
+
"value",
|
|
39
|
+
"options",
|
|
40
|
+
"label",
|
|
41
|
+
"onValueChange"
|
|
42
|
+
]);
|
|
43
|
+
const [dragging, setDragging] = createSignal(null);
|
|
44
|
+
const [dropLine, setDropLine] = createSignal(null);
|
|
45
|
+
const rows = () => own.value.map((entry) => own.options.find((option) => option.value === entry)).filter((option) => option != null);
|
|
46
|
+
function reset() {
|
|
47
|
+
setDragging(null);
|
|
48
|
+
setDropLine(null);
|
|
49
|
+
}
|
|
50
|
+
function move(entry, offset) {
|
|
51
|
+
const next = [...own.value];
|
|
52
|
+
const from = next.indexOf(entry);
|
|
53
|
+
const to = Math.max(0, Math.min(next.length - 1, from + offset));
|
|
54
|
+
if (from === to) return;
|
|
55
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
56
|
+
own.onValueChange?.(next);
|
|
57
|
+
}
|
|
58
|
+
function drop() {
|
|
59
|
+
const entry = dragging();
|
|
60
|
+
if (entry == null) return;
|
|
61
|
+
const seam = dropLine();
|
|
62
|
+
const from = own.value.indexOf(entry);
|
|
63
|
+
if (seam && seam.index === from) return reset();
|
|
64
|
+
const next = own.value.filter((candidate) => candidate !== entry);
|
|
65
|
+
let at = seam ? seam.before ? seam.index : seam.index + 1 : next.length;
|
|
66
|
+
if (from < at) at -= 1;
|
|
67
|
+
next.splice(Math.max(0, Math.min(next.length, at)), 0, entry);
|
|
68
|
+
own.onValueChange?.(next);
|
|
69
|
+
reset();
|
|
70
|
+
}
|
|
71
|
+
var _el$3 = _tmpl$3();
|
|
72
|
+
var _el$4 = _el$3.firstChild;
|
|
73
|
+
spread(_el$3, [rest, {
|
|
74
|
+
"data-scope": "order-list",
|
|
75
|
+
"data-part": "root",
|
|
76
|
+
"data-uid": uid,
|
|
77
|
+
onDragLeave: (event) => {
|
|
78
|
+
const host = event.currentTarget;
|
|
79
|
+
if (!event.relatedTarget || !host.contains(event.relatedTarget)) setDropLine(null);
|
|
80
|
+
}
|
|
81
|
+
}], true);
|
|
82
|
+
insert(_el$4, createComponent(For, {
|
|
83
|
+
get each() {
|
|
84
|
+
return rows();
|
|
85
|
+
},
|
|
86
|
+
children: (option, index) => {
|
|
87
|
+
const seam = () => dropLine() && dropLine().index === index() ? dropLine().before ? "top" : "bottom" : void 0;
|
|
88
|
+
var _el$5 = _tmpl$4();
|
|
89
|
+
var _el$7 = _el$5.firstChild.nextSibling;
|
|
90
|
+
var _el$9 = _el$7.nextSibling.firstChild;
|
|
91
|
+
var _el$10 = _el$9.nextSibling;
|
|
92
|
+
var _el$11 = _el$10.nextSibling;
|
|
93
|
+
var _el$12 = _el$11.nextSibling;
|
|
94
|
+
_el$5.addEventListener("drop", (event) => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
drop();
|
|
97
|
+
});
|
|
98
|
+
_el$5.addEventListener("dragover", (event) => {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
101
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
102
|
+
const before = event.clientY < rect.top + rect.height / 2;
|
|
103
|
+
setDropLine(dragging() != null && !(option.value === dragging() && before) ? {
|
|
104
|
+
index: index(),
|
|
105
|
+
before
|
|
106
|
+
} : null);
|
|
107
|
+
});
|
|
108
|
+
_el$5.addEventListener("dragend", reset);
|
|
109
|
+
_el$5.addEventListener("dragstart", (event) => {
|
|
110
|
+
setDragging(option.value);
|
|
111
|
+
event.dataTransfer?.setData("text/plain", option.value);
|
|
112
|
+
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
113
|
+
});
|
|
114
|
+
insert(_el$7, () => {
|
|
115
|
+
return option.label;
|
|
116
|
+
});
|
|
117
|
+
_el$9._$$click = () => move(option.value, -index());
|
|
118
|
+
insert(_el$9, () => {
|
|
119
|
+
return arrowGlyph(ARROWS.top);
|
|
120
|
+
});
|
|
121
|
+
_el$10._$$click = () => move(option.value, -1);
|
|
122
|
+
insert(_el$10, () => {
|
|
123
|
+
return arrowGlyph(ARROWS.up);
|
|
124
|
+
});
|
|
125
|
+
_el$11._$$click = () => move(option.value, 1);
|
|
126
|
+
insert(_el$11, () => {
|
|
127
|
+
return arrowGlyph(ARROWS.down);
|
|
128
|
+
});
|
|
129
|
+
_el$12._$$click = () => move(option.value, rows().length - 1 - index());
|
|
130
|
+
insert(_el$12, () => {
|
|
131
|
+
return arrowGlyph(ARROWS.bottom);
|
|
132
|
+
});
|
|
133
|
+
effect(() => {
|
|
134
|
+
return {
|
|
135
|
+
e: dragging() === option.value ? "" : void 0,
|
|
136
|
+
t: seam(),
|
|
137
|
+
a: messages().orderList.toTop,
|
|
138
|
+
o: index() === 0,
|
|
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
|
|
145
|
+
};
|
|
146
|
+
}, ({ e, t, a, o, i, n, s, h, r, d }, _p$) => {
|
|
147
|
+
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
148
|
+
t !== _p$?.t && setAttribute(_el$5, "data-drop-line", t);
|
|
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);
|
|
157
|
+
});
|
|
158
|
+
return _el$5;
|
|
159
|
+
}
|
|
160
|
+
}));
|
|
161
|
+
effect(() => own.label, (_v$) => {
|
|
162
|
+
setAttribute(_el$4, "aria-label", _v$);
|
|
163
|
+
});
|
|
164
|
+
return _el$3;
|
|
165
|
+
}
|
|
166
|
+
delegateEvents(["click"]);
|
|
167
|
+
//#endregion
|
|
168
|
+
export { OrderList };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
//#region src/components/page-header/index.tsx
|
|
4
4
|
/** The page's face: an eyebrow whisper, a serif title, one line of
|
|
5
5
|
* description, and the actions resting beside the title on the same
|
|
@@ -8,7 +8,7 @@ function part(name, tag, extra = {}) {
|
|
|
8
8
|
function Component(props) {
|
|
9
9
|
return createComponent(tag, mergeProps(extra, props, {
|
|
10
10
|
"data-scope": "page-header",
|
|
11
|
-
get
|
|
11
|
+
get "data-part"() {
|
|
12
12
|
return name.toLowerCase();
|
|
13
13
|
}
|
|
14
14
|
}));
|
|
@@ -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 { Pagination as Pagination$1 } from "@ark-ui/solid/pagination";
|
|
5
5
|
//#region src/components/pagination/index.tsx
|
|
6
6
|
function PaginationRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Pagination$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Pagination$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 { PasswordInput as PasswordInput$1 } from "@ark-ui/solid/password-input";
|
|
5
5
|
//#region src/components/password-input/index.tsx
|
|
6
6
|
function PasswordInputRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(PasswordInput$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(PasswordInput$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 { PinInput as PinInput$1 } from "@ark-ui/solid/pin-input";
|
|
5
5
|
//#region src/components/pin-input/index.tsx
|
|
6
6
|
function PinInputRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(PinInput$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(PinInput$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
-
import {
|
|
3
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
4
|
import { createSignal, splitProps } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
5
6
|
import { Popover } from "@ark-ui/solid/popover";
|
|
6
7
|
//#region src/components/popconfirm/index.tsx
|
|
7
|
-
var _tmpl$ =
|
|
8
|
-
var _tmpl$2 =
|
|
9
|
-
var _tmpl$3 =
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<p data-part=message>`);
|
|
9
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div data-part=actions><!><!>`);
|
|
10
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
|
|
10
11
|
/** A question at the point of no return: the trigger opens a small
|
|
11
12
|
* anchored vessel carrying the message and two answers. Confirmation
|
|
12
13
|
* and cancellation are the caller's to act on — the panel closes
|
|
@@ -35,21 +36,27 @@ function Popconfirm(props) {
|
|
|
35
36
|
positioning: { placement: "top" },
|
|
36
37
|
get children() {
|
|
37
38
|
return [createComponent(Popover.Trigger, { asChild: (propsFn) => (() => {
|
|
38
|
-
var _el$
|
|
39
|
-
spread(_el$
|
|
40
|
-
insert(_el$
|
|
41
|
-
|
|
39
|
+
var _el$5 = _tmpl$3();
|
|
40
|
+
spread(_el$5, [propsFn, rest], true);
|
|
41
|
+
insert(_el$5, () => {
|
|
42
|
+
return own.children;
|
|
43
|
+
});
|
|
44
|
+
return _el$5;
|
|
42
45
|
})() }), createComponent(Portal, { get children() {
|
|
43
46
|
return createComponent(Popover.Positioner, { get children() {
|
|
44
47
|
return createComponent(Popover.Content, {
|
|
45
|
-
|
|
48
|
+
class: "bs-popconfirm",
|
|
46
49
|
get children() {
|
|
47
50
|
return [(() => {
|
|
48
51
|
var _el$ = _tmpl$();
|
|
49
|
-
insert(_el$, () =>
|
|
52
|
+
insert(_el$, () => {
|
|
53
|
+
return own.message;
|
|
54
|
+
});
|
|
50
55
|
return _el$;
|
|
51
56
|
})(), (() => {
|
|
52
57
|
var _el$2 = _tmpl$2();
|
|
58
|
+
var _el$3 = _el$2.firstChild;
|
|
59
|
+
var _el$4 = _el$3.nextSibling;
|
|
53
60
|
insert(_el$2, createComponent(Button, {
|
|
54
61
|
variant: "ghost",
|
|
55
62
|
size: "sm",
|
|
@@ -57,14 +64,14 @@ function Popconfirm(props) {
|
|
|
57
64
|
get children() {
|
|
58
65
|
return own.cancelText ?? "Cancel";
|
|
59
66
|
}
|
|
60
|
-
}),
|
|
67
|
+
}), _el$3);
|
|
61
68
|
insert(_el$2, createComponent(Button, {
|
|
62
69
|
size: "sm",
|
|
63
70
|
onClick: () => settle(true),
|
|
64
71
|
get children() {
|
|
65
72
|
return own.confirmText ?? "Confirm";
|
|
66
73
|
}
|
|
67
|
-
}),
|
|
74
|
+
}), _el$4);
|
|
68
75
|
return _el$2;
|
|
69
76
|
})()];
|
|
70
77
|
}
|
|
@@ -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 { Progress as Progress$1 } from "@ark-ui/solid/progress";
|
|
5
5
|
//#region src/components/progress/index.tsx
|
|
6
6
|
function ProgressRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Progress$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Progress$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, effect, insert,
|
|
2
|
+
import { createComponent, effect, insert, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
|
|
3
3
|
import { For, Show, splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/progress-group/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
7
|
-
var _tmpl$3 =
|
|
8
|
-
var _tmpl$4 =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=progress-group data-part=legend>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><div data-scope=progress-group data-part=track>`);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=progress-group data-part=segment role=progressbar aria-valuemin=0>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<div data-scope=progress-group data-part=legend-item><span data-scope=progress-group data-part=swatch aria-hidden=true></span><span data-scope=progress-group data-part=legend-label></span><span data-scope=progress-group data-part=legend-value>`);
|
|
9
9
|
function ProgressGroup(props) {
|
|
10
10
|
injectComponentStyle("progress-group");
|
|
11
11
|
const [own, rest] = splitProps(props, [
|
|
@@ -19,59 +19,66 @@ function ProgressGroup(props) {
|
|
|
19
19
|
return whole > 0 ? `${value / whole * 100}%` : "0%";
|
|
20
20
|
};
|
|
21
21
|
const nameOf = (segment, index) => segment.label ?? segment.pigment ?? `Segment ${index + 1}`;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
22
|
+
var _el$ = _tmpl$2();
|
|
23
|
+
var _el$2 = _el$.firstChild;
|
|
24
|
+
spread(_el$, [rest, {
|
|
25
|
+
"data-scope": "progress-group",
|
|
26
|
+
"data-part": "root"
|
|
27
|
+
}], true);
|
|
28
|
+
insert(_el$2, createComponent(For, {
|
|
29
|
+
get each() {
|
|
30
|
+
return own.segments;
|
|
31
|
+
},
|
|
32
|
+
children: (segment, index) => (() => {
|
|
33
|
+
var _el$4 = _tmpl$3();
|
|
34
|
+
effect(() => {
|
|
35
|
+
return {
|
|
36
|
+
e: segment.pigment,
|
|
37
|
+
t: segment.value,
|
|
38
|
+
a: total(),
|
|
39
|
+
o: nameOf(segment, index()),
|
|
40
|
+
i: share(segment.value)
|
|
41
|
+
};
|
|
42
|
+
}, ({ e, t, a, o, i }, _p$) => {
|
|
43
|
+
e !== _p$?.e && setAttribute(_el$4, "data-pigment", e);
|
|
44
|
+
t !== _p$?.t && setAttribute(_el$4, "aria-valuenow", t);
|
|
45
|
+
a !== _p$?.a && setAttribute(_el$4, "aria-valuemax", a);
|
|
46
|
+
o !== _p$?.o && setAttribute(_el$4, "aria-label", o);
|
|
47
|
+
i !== _p$?.i && setStyleProperty(_el$4, "inline-size", i);
|
|
48
|
+
});
|
|
49
|
+
return _el$4;
|
|
50
|
+
})()
|
|
51
|
+
}));
|
|
52
|
+
insert(_el$, createComponent(Show, {
|
|
53
|
+
get when() {
|
|
54
|
+
return own.showLegend ?? true;
|
|
55
|
+
},
|
|
56
|
+
get children() {
|
|
57
|
+
var _el$3 = _tmpl$();
|
|
58
|
+
insert(_el$3, createComponent(For, {
|
|
59
|
+
get each() {
|
|
60
|
+
return own.segments;
|
|
61
|
+
},
|
|
62
|
+
children: (segment, index) => (() => {
|
|
63
|
+
var _el$5 = _tmpl$4();
|
|
64
|
+
var _el$7 = _el$5.firstChild.nextSibling;
|
|
65
|
+
var _el$8 = _el$7.nextSibling;
|
|
66
|
+
insert(_el$7, () => {
|
|
67
|
+
return nameOf(segment, index());
|
|
68
|
+
});
|
|
69
|
+
insert(_el$8, () => {
|
|
70
|
+
return String(segment.value);
|
|
71
|
+
});
|
|
72
|
+
effect(() => segment.pigment, (_v$) => {
|
|
73
|
+
setAttribute(_el$5, "data-pigment", _v$);
|
|
74
|
+
});
|
|
75
|
+
return _el$5;
|
|
76
|
+
})()
|
|
77
|
+
}));
|
|
78
|
+
return _el$3;
|
|
79
|
+
}
|
|
80
|
+
}), null);
|
|
81
|
+
return _el$;
|
|
75
82
|
}
|
|
76
83
|
//#endregion
|
|
77
84
|
export { ProgressGroup };
|
|
@@ -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 { RadioGroup as RadioGroup$1 } from "@ark-ui/solid/radio-group";
|
|
5
5
|
//#region src/components/radio-group/index.tsx
|
|
6
6
|
function RadioGroupRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(RadioGroup$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(RadioGroup$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 { RatingGroup as RatingGroup$1 } from "@ark-ui/solid/rating-group";
|
|
5
5
|
//#region src/components/rating-group/index.tsx
|
|
6
6
|
function RatingGroupRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(RatingGroup$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(RatingGroup$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/result/index.d.ts
|
|
3
|
+
type Status = "success" | "warning" | "danger" | "info";
|
|
4
|
+
export interface ResultRootProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** The verdict the operation returned; the fixed pigments speak it. */
|
|
6
|
+
status?: Status;
|
|
7
|
+
}
|
|
8
|
+
export declare function ResultRoot(props: ResultRootProps): JSX.Element;
|
|
9
|
+
/** The mark carries all four verdicts and lets the root choose, so the
|
|
10
|
+
* icon can never drift from the status the root declares. */
|
|
11
|
+
export declare function ResultIcon(props: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
12
|
+
/** A verdict drawn after the deed: the mark washes in the fixed
|
|
13
|
+
* pigment, the title rides the serif, and the extra carries the way
|
|
14
|
+
* onward. Any subset composes. */
|
|
15
|
+
export declare const Result: {
|
|
16
|
+
Root: typeof ResultRoot;
|
|
17
|
+
Icon: typeof ResultIcon;
|
|
18
|
+
Title: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
19
|
+
Description: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
20
|
+
Extra: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|