@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, effect, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/result/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true>`);
|
|
7
|
+
const MARK = { __html: "<g data-for=\"success\"><path d=\"M20 6 9 17l-5-5\"/></g><g data-for=\"warning\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></g><g data-for=\"danger\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></g><g data-for=\"info\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/></g>" };
|
|
8
|
+
function ResultRoot(props) {
|
|
9
|
+
injectComponentStyle("result");
|
|
10
|
+
const [own, rest] = splitProps(props, ["status"]);
|
|
11
|
+
var _el$ = _tmpl$();
|
|
12
|
+
spread(_el$, [rest, {
|
|
13
|
+
"data-scope": "result",
|
|
14
|
+
"data-part": "root",
|
|
15
|
+
get "data-status"() {
|
|
16
|
+
return own.status ?? "info";
|
|
17
|
+
}
|
|
18
|
+
}], false);
|
|
19
|
+
return _el$;
|
|
20
|
+
}
|
|
21
|
+
/** The mark carries all four verdicts and lets the root choose, so the
|
|
22
|
+
* icon can never drift from the status the root declares. */
|
|
23
|
+
function ResultIcon(props) {
|
|
24
|
+
injectComponentStyle("result");
|
|
25
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
26
|
+
var _el$2 = _tmpl$();
|
|
27
|
+
spread(_el$2, [rest, {
|
|
28
|
+
"data-scope": "result",
|
|
29
|
+
"data-part": "icon"
|
|
30
|
+
}], true);
|
|
31
|
+
insert(_el$2, () => {
|
|
32
|
+
return own.children ?? (() => {
|
|
33
|
+
var _el$3 = _tmpl$2();
|
|
34
|
+
effect(() => MARK.__html, (_v$) => {
|
|
35
|
+
_el$3.innerHTML = _v$;
|
|
36
|
+
});
|
|
37
|
+
return _el$3;
|
|
38
|
+
})();
|
|
39
|
+
});
|
|
40
|
+
return _el$2;
|
|
41
|
+
}
|
|
42
|
+
function part(name, tag) {
|
|
43
|
+
return function Part(props) {
|
|
44
|
+
injectComponentStyle("result");
|
|
45
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
46
|
+
return createComponent(tag, mergeProps(rest, {
|
|
47
|
+
"data-scope": "result",
|
|
48
|
+
"data-part": name,
|
|
49
|
+
get children() {
|
|
50
|
+
return own.children;
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** A verdict drawn after the deed: the mark washes in the fixed
|
|
56
|
+
* pigment, the title rides the serif, and the extra carries the way
|
|
57
|
+
* onward. Any subset composes. */
|
|
58
|
+
const Result = {
|
|
59
|
+
Root: ResultRoot,
|
|
60
|
+
Icon: ResultIcon,
|
|
61
|
+
Title: part("title", "h3"),
|
|
62
|
+
Description: part("description", "p"),
|
|
63
|
+
Extra: part("extra", "div")
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { Result, ResultIcon, ResultRoot };
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/components/select/index.d.ts
|
|
4
|
-
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
5
|
-
* whole control and its list dissolves open as a paper vessel, the checked
|
|
6
|
-
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
7
|
-
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
8
|
-
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
9
|
-
type SelectOwnProps = {
|
|
10
|
-
/** One rung of the control-height ladder for the trigger. */
|
|
11
|
-
size?: "sm" | "md" | "lg";
|
|
12
|
-
};
|
|
13
|
-
declare function SelectRoot<T extends CollectionItem>(props: SelectRootProps<T> & SelectOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
export declare const Select: Omit<typeof Select$1, "Root"> & {
|
|
15
|
-
Root: typeof SelectRoot;
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
1
|
+
import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "../../index-YPUiqD3n.mjs";
|
|
2
|
+
export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { splitProps } from "solid-js";
|
|
4
|
-
import { Select as Select$1 } from "@ark-ui/solid/select";
|
|
5
|
-
//#region src/components/select/index.tsx
|
|
6
|
-
function SelectRoot(props) {
|
|
7
|
-
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Select$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
9
|
-
return own.size ?? "md";
|
|
10
|
-
} }));
|
|
11
|
-
}
|
|
12
|
-
const Select = {
|
|
13
|
-
...Select$1,
|
|
14
|
-
Root: SelectRoot
|
|
15
|
-
};
|
|
16
|
-
injectComponentStyle("select");
|
|
17
|
-
//#endregion
|
|
18
|
-
export { Select };
|
|
1
|
+
import { n as NativeSelect, t as Select } from "../../select-CX6OuQlU.mjs";
|
|
2
|
+
export { NativeSelect, Select };
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/separator/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
function Separator(props) {
|
|
7
7
|
injectComponentStyle("separator");
|
|
8
8
|
const [own, rest] = splitProps(props, ["orientation", "decorative"]);
|
|
9
9
|
const orientation = () => own.orientation ?? "horizontal";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return _el$;
|
|
26
|
-
})();
|
|
10
|
+
var _el$ = _tmpl$();
|
|
11
|
+
spread(_el$, [rest, {
|
|
12
|
+
get role() {
|
|
13
|
+
return own.decorative ? "none" : "separator";
|
|
14
|
+
},
|
|
15
|
+
"data-scope": "separator",
|
|
16
|
+
"data-part": "root",
|
|
17
|
+
get "data-orientation"() {
|
|
18
|
+
return orientation();
|
|
19
|
+
},
|
|
20
|
+
get "aria-orientation"() {
|
|
21
|
+
return own.decorative ? void 0 : orientation();
|
|
22
|
+
}
|
|
23
|
+
}], false);
|
|
24
|
+
return _el$;
|
|
27
25
|
}
|
|
28
26
|
//#endregion
|
|
29
27
|
export { Separator };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
//#region src/components/skeleton/index.tsx
|
|
4
|
-
var _tmpl$ =
|
|
4
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
5
5
|
function Skeleton(props) {
|
|
6
6
|
injectComponentStyle("skeleton");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return _el$;
|
|
14
|
-
})();
|
|
7
|
+
var _el$ = _tmpl$();
|
|
8
|
+
spread(_el$, [props, {
|
|
9
|
+
"data-scope": "skeleton",
|
|
10
|
+
"data-part": "root"
|
|
11
|
+
}], false);
|
|
12
|
+
return _el$;
|
|
15
13
|
}
|
|
16
14
|
//#endregion
|
|
17
15
|
export { Skeleton };
|
|
@@ -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 { Slider as Slider$1 } from "@ark-ui/solid/slider";
|
|
5
5
|
//#region src/components/slider/index.tsx
|
|
6
6
|
function SliderRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Slider$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Slider$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
3
|
+
import { spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/spinner/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span><svg viewBox="0 0 24 24"fill=none aria-hidden=true><circle cx=12 cy=12 r=9 stroke=currentColor stroke-opacity=0.2 stroke-width=2.5></circle><path d="M21 12a9 9 0 0 0-9-9"stroke=currentColor stroke-width=2.5 stroke-linecap=round>`);
|
|
6
7
|
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
7
8
|
* default — it reports progress without claiming attention. */
|
|
8
9
|
function Spinner(props) {
|
|
9
10
|
injectComponentStyle("spinner");
|
|
10
11
|
const [own, rest] = splitProps(props, ["size"]);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})();
|
|
12
|
+
const messages = useComponentMessages();
|
|
13
|
+
var _el$ = _tmpl$();
|
|
14
|
+
spread(_el$, [rest, {
|
|
15
|
+
role: "status",
|
|
16
|
+
get "aria-label"() {
|
|
17
|
+
return rest["aria-label"] ?? messages().spinner.loading;
|
|
18
|
+
},
|
|
19
|
+
"data-scope": "spinner",
|
|
20
|
+
"data-part": "root",
|
|
21
|
+
get "data-size"() {
|
|
22
|
+
return own.size ?? "md";
|
|
23
|
+
}
|
|
24
|
+
}], true);
|
|
25
|
+
return _el$;
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Spinner };
|
|
@@ -1,12 +1,14 @@
|
|
|
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
|
-
import {
|
|
4
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
5
|
import { For, splitProps } from "solid-js";
|
|
6
|
+
import { Portal } from "solid-js/web";
|
|
5
7
|
import { Menu } from "@ark-ui/solid/menu";
|
|
6
8
|
//#region src/components/split-button/index.tsx
|
|
7
|
-
var _tmpl$ =
|
|
8
|
-
var _tmpl$2 =
|
|
9
|
-
var _tmpl$3 =
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><!><!>`);
|
|
10
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
11
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 9 6 6 6-6">`);
|
|
10
12
|
/**
|
|
11
13
|
* A primary action with its alternatives one seam away: the main button
|
|
12
14
|
* fires `onClick`, the fitted arrow opens a paper vessel of the same
|
|
@@ -33,87 +35,90 @@ function SplitButton(props) {
|
|
|
33
35
|
const variant = () => own.variant ?? "solid";
|
|
34
36
|
const tone = () => own.tone ?? "ink";
|
|
35
37
|
const size = () => own.size ?? "md";
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
38
|
+
const messages = useComponentMessages();
|
|
39
|
+
var _el$ = _tmpl$();
|
|
40
|
+
var _el$2 = _el$.firstChild;
|
|
41
|
+
var _el$3 = _el$2.nextSibling;
|
|
42
|
+
spread(_el$, [rest, {
|
|
43
|
+
"data-scope": "split-button",
|
|
44
|
+
"data-part": "root"
|
|
45
|
+
}], true);
|
|
46
|
+
insert(_el$, createComponent(Button, {
|
|
47
|
+
get variant() {
|
|
48
|
+
return variant();
|
|
49
|
+
},
|
|
50
|
+
get tone() {
|
|
51
|
+
return tone();
|
|
52
|
+
},
|
|
53
|
+
get size() {
|
|
54
|
+
return size();
|
|
55
|
+
},
|
|
56
|
+
get disabled() {
|
|
57
|
+
return own.disabled;
|
|
58
|
+
},
|
|
59
|
+
onClick: (event) => own.onClick?.(event),
|
|
60
|
+
get children() {
|
|
61
|
+
return own.label;
|
|
62
|
+
}
|
|
63
|
+
}), _el$2);
|
|
64
|
+
insert(_el$, createComponent(Menu.Root, {
|
|
65
|
+
positioning: { placement: "bottom-end" },
|
|
66
|
+
get children() {
|
|
67
|
+
return [createComponent(Menu.Trigger, { asChild: (propsFn) => (() => {
|
|
68
|
+
var _el$4 = _tmpl$2();
|
|
69
|
+
spread(_el$4, [propsFn, {
|
|
70
|
+
type: "button",
|
|
71
|
+
get disabled() {
|
|
72
|
+
return own.disabled;
|
|
73
|
+
},
|
|
74
|
+
get "aria-label"() {
|
|
75
|
+
return messages().more.actions;
|
|
76
|
+
},
|
|
77
|
+
get "data-variant"() {
|
|
78
|
+
return variant();
|
|
79
|
+
},
|
|
80
|
+
get "data-tone"() {
|
|
81
|
+
return tone();
|
|
82
|
+
},
|
|
83
|
+
get "data-size"() {
|
|
84
|
+
return size();
|
|
85
|
+
},
|
|
86
|
+
"data-square": "true",
|
|
87
|
+
"data-motion": "ink-ripple lit"
|
|
88
|
+
}], true);
|
|
89
|
+
insert(_el$4, chevronDown);
|
|
90
|
+
return _el$4;
|
|
91
|
+
})() }), createComponent(Portal, { get children() {
|
|
92
|
+
return createComponent(Menu.Positioner, { get children() {
|
|
93
|
+
return createComponent(Menu.Content, { get children() {
|
|
94
|
+
return createComponent(For, {
|
|
95
|
+
get each() {
|
|
96
|
+
return own.items ?? [];
|
|
97
|
+
},
|
|
98
|
+
children: (entry) => createComponent(Menu.Item, {
|
|
99
|
+
get value() {
|
|
100
|
+
return entry.value;
|
|
91
101
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} });
|
|
107
|
-
}
|
|
108
|
-
})
|
|
109
|
-
});
|
|
110
|
-
} });
|
|
102
|
+
get disabled() {
|
|
103
|
+
return entry.disabled;
|
|
104
|
+
},
|
|
105
|
+
get "data-danger"() {
|
|
106
|
+
return entry.danger ? "" : void 0;
|
|
107
|
+
},
|
|
108
|
+
onSelect: () => own.onSelect?.(entry.value),
|
|
109
|
+
get children() {
|
|
110
|
+
return createComponent(Menu.ItemText, { get children() {
|
|
111
|
+
return entry.label;
|
|
112
|
+
} });
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
});
|
|
111
116
|
} });
|
|
112
|
-
} })
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
} });
|
|
118
|
+
} })];
|
|
119
|
+
}
|
|
120
|
+
}), _el$3);
|
|
121
|
+
return _el$;
|
|
117
122
|
}
|
|
118
123
|
/** One stroke pointing down: all a fitted dropdown arrow needs. */
|
|
119
124
|
function chevronDown() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/spotlight/index.d.ts
|
|
3
|
+
export interface SpotlightProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** How far the lamp throws before the ink swallows it. */
|
|
5
|
+
radius?: string;
|
|
6
|
+
}
|
|
7
|
+
/** The ink-light card: a vessel whose rim and face take light from the
|
|
8
|
+
* reader's hand. The wrapper only measures and writes the geometry —
|
|
9
|
+
* the lamp itself is the two layers the stylesheet paints. */
|
|
10
|
+
export declare function Spotlight(props: SpotlightProps): JSX.Element;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { insert, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/spotlight/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
/** The ink-light card: a vessel whose rim and face take light from the
|
|
7
|
+
* reader's hand. The wrapper only measures and writes the geometry —
|
|
8
|
+
* the lamp itself is the two layers the stylesheet paints. */
|
|
9
|
+
function Spotlight(props) {
|
|
10
|
+
injectComponentStyle("spotlight");
|
|
11
|
+
const [own, rest] = splitProps(props, ["radius"]);
|
|
12
|
+
const track = (event) => {
|
|
13
|
+
const host = event.currentTarget;
|
|
14
|
+
const rect = host.getBoundingClientRect();
|
|
15
|
+
host.style.setProperty("--bs-spot-x", `${event.clientX - rect.left}px`);
|
|
16
|
+
host.style.setProperty("--bs-spot-y", `${event.clientY - rect.top}px`);
|
|
17
|
+
};
|
|
18
|
+
var _el$ = _tmpl$();
|
|
19
|
+
spread(_el$, [rest, {
|
|
20
|
+
"data-scope": "spotlight",
|
|
21
|
+
"data-part": "root",
|
|
22
|
+
get style() {
|
|
23
|
+
return { "--bs-spot-radius": own.radius };
|
|
24
|
+
},
|
|
25
|
+
onPointerMove: track,
|
|
26
|
+
onPointerEnter: (event) => {
|
|
27
|
+
track(event);
|
|
28
|
+
event.currentTarget.setAttribute("data-hovered", "");
|
|
29
|
+
},
|
|
30
|
+
onPointerLeave: (event) => event.currentTarget.removeAttribute("data-hovered")
|
|
31
|
+
}], true);
|
|
32
|
+
insert(_el$, () => {
|
|
33
|
+
return props.children;
|
|
34
|
+
});
|
|
35
|
+
return _el$;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Spotlight };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/stack/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
/** Whitespace chosen by name: the named steps point at the space ramp so
|
|
7
7
|
* siblings are held apart by one token, never by ad-hoc margins. */
|
|
8
8
|
const gapVars = {
|
|
@@ -22,26 +22,24 @@ function Stack(props) {
|
|
|
22
22
|
"align",
|
|
23
23
|
"justify"
|
|
24
24
|
]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return _el$;
|
|
44
|
-
})();
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
spread(_el$, [rest, {
|
|
27
|
+
get style() {
|
|
28
|
+
return {
|
|
29
|
+
...rest.style,
|
|
30
|
+
"--bs-stack-gap": gapVars[own.gap ?? "md"] ?? gapVars.md,
|
|
31
|
+
"align-items": own.align,
|
|
32
|
+
"justify-content": own.justify,
|
|
33
|
+
"flex-wrap": own.wrap ? "wrap" : void 0
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
"data-scope": "stack",
|
|
37
|
+
"data-part": "root",
|
|
38
|
+
get "data-direction"() {
|
|
39
|
+
return own.direction ?? "column";
|
|
40
|
+
}
|
|
41
|
+
}], false);
|
|
42
|
+
return _el$;
|
|
45
43
|
}
|
|
46
44
|
//#endregion
|
|
47
45
|
export { Stack };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps, spread, template } from "
|
|
2
|
+
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/stat/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
6
|
function part(name, tag) {
|
|
7
7
|
function Component(props) {
|
|
8
8
|
return createComponent(tag, mergeProps(props, {
|
|
9
9
|
"data-scope": "stat",
|
|
10
|
-
get
|
|
10
|
+
get "data-part"() {
|
|
11
11
|
return name.toLowerCase();
|
|
12
12
|
}
|
|
13
13
|
}));
|
|
@@ -22,17 +22,15 @@ const Description = part("Description", "p");
|
|
|
22
22
|
* explicit `data-direction` attribute on the consumer side still wins. */
|
|
23
23
|
function Delta(props) {
|
|
24
24
|
const [own, rest] = splitProps(props, ["direction"]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _el$;
|
|
35
|
-
})();
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
spread(_el$, [rest, {
|
|
27
|
+
"data-scope": "stat",
|
|
28
|
+
"data-part": "delta",
|
|
29
|
+
get "data-direction"() {
|
|
30
|
+
return rest["data-direction"] ?? own.direction ?? "flat";
|
|
31
|
+
}
|
|
32
|
+
}], false);
|
|
33
|
+
return _el$;
|
|
36
34
|
}
|
|
37
35
|
const Stat = Object.assign(Root, {
|
|
38
36
|
Root,
|
|
@@ -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
|
|
@@ -1,17 +1,23 @@
|
|
|
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 { Steps as Steps$1 } from "@ark-ui/solid/steps";
|
|
5
5
|
//#region src/components/steps/index.tsx
|
|
6
6
|
function StepsRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Steps$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Steps$1.Root, mergeProps(rest, { get "data-size"() {
|
|
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
|