@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,13 +1,14 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, delegateEvents, effect, insert, memo,
|
|
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";
|
|
4
5
|
//#region src/components/layout/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
6
|
-
var _tmpl$2 =
|
|
7
|
-
var _tmpl$3 =
|
|
8
|
-
var _tmpl$4 =
|
|
9
|
-
var _tmpl$5 =
|
|
10
|
-
var _tmpl$6 =
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<header>`);
|
|
8
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<main>`);
|
|
9
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<footer>`);
|
|
10
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=layout data-part=sider-resize role=separator aria-orientation=vertical tabindex=0>`);
|
|
11
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<aside><!><!>`);
|
|
11
12
|
const LayoutContext = createContext();
|
|
12
13
|
/**
|
|
13
14
|
* The application skeleton: Root, Header, Sider, Content, Footer —
|
|
@@ -21,46 +22,40 @@ function LayoutRoot(props) {
|
|
|
21
22
|
value: { siderPlacement: () => own.sider },
|
|
22
23
|
get children() {
|
|
23
24
|
var _el$ = _tmpl$();
|
|
24
|
-
spread(_el$,
|
|
25
|
+
spread(_el$, [rest, {
|
|
25
26
|
"data-scope": "layout",
|
|
26
27
|
"data-part": "root",
|
|
27
|
-
get
|
|
28
|
+
get "data-sider"() {
|
|
28
29
|
return own.sider;
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
+
}], false);
|
|
31
32
|
return _el$;
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
function LayoutHeader(props) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return _el$2;
|
|
43
|
-
})();
|
|
37
|
+
var _el$2 = _tmpl$2();
|
|
38
|
+
spread(_el$2, [props, {
|
|
39
|
+
"data-scope": "layout",
|
|
40
|
+
"data-part": "header"
|
|
41
|
+
}], false);
|
|
42
|
+
return _el$2;
|
|
44
43
|
}
|
|
45
44
|
function LayoutContent(props) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return _el$3;
|
|
53
|
-
})();
|
|
45
|
+
var _el$3 = _tmpl$3();
|
|
46
|
+
spread(_el$3, [props, {
|
|
47
|
+
"data-scope": "layout",
|
|
48
|
+
"data-part": "content"
|
|
49
|
+
}], false);
|
|
50
|
+
return _el$3;
|
|
54
51
|
}
|
|
55
52
|
function LayoutFooter(props) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return _el$4;
|
|
63
|
-
})();
|
|
53
|
+
var _el$4 = _tmpl$4();
|
|
54
|
+
spread(_el$4, [props, {
|
|
55
|
+
"data-scope": "layout",
|
|
56
|
+
"data-part": "footer"
|
|
57
|
+
}], false);
|
|
58
|
+
return _el$4;
|
|
64
59
|
}
|
|
65
60
|
/** One step of the arrow-key resize, in px. */
|
|
66
61
|
const RESIZE_STEP = 16;
|
|
@@ -95,6 +90,7 @@ function LayoutSider(props) {
|
|
|
95
90
|
});
|
|
96
91
|
const layout = useContext(LayoutContext);
|
|
97
92
|
const [dragging, setDragging] = createSignal(false);
|
|
93
|
+
const messages = useComponentMessages();
|
|
98
94
|
let rail;
|
|
99
95
|
let startPointerX = 0;
|
|
100
96
|
let startWidth = 0;
|
|
@@ -126,53 +122,61 @@ function LayoutSider(props) {
|
|
|
126
122
|
};
|
|
127
123
|
const handle = () => own.resizable && !collapsed() ? (() => {
|
|
128
124
|
var _el$5 = _tmpl$5();
|
|
129
|
-
_el$5
|
|
130
|
-
_el$5
|
|
131
|
-
_el$5
|
|
132
|
-
_el$5
|
|
133
|
-
effect((
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
125
|
+
_el$5._$$keydown = onKeyDown;
|
|
126
|
+
_el$5._$$pointerup = onPointerUp;
|
|
127
|
+
_el$5._$$pointermove = onPointerMove;
|
|
128
|
+
_el$5._$$pointerdown = onPointerDown;
|
|
129
|
+
effect(() => {
|
|
130
|
+
return {
|
|
131
|
+
e: dragging() ? "" : void 0,
|
|
132
|
+
t: messages().sidebar.resize,
|
|
133
|
+
a: railWidth()
|
|
134
|
+
};
|
|
135
|
+
}, ({ e, t, a }, _p$) => {
|
|
136
|
+
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
137
|
+
t !== _p$?.t && setAttribute(_el$5, "aria-label", t);
|
|
138
|
+
a !== _p$?.a && setAttribute(_el$5, "aria-valuenow", a);
|
|
141
139
|
});
|
|
142
140
|
return _el$5;
|
|
143
141
|
})() : null;
|
|
144
142
|
const foldedWidth = () => own.collapsedWidth ?? "3.5rem";
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
143
|
+
var _el$6 = _tmpl$6();
|
|
144
|
+
var _el$7 = _el$6.firstChild;
|
|
145
|
+
var _el$8 = _el$7.nextSibling;
|
|
146
|
+
ref(() => {
|
|
147
|
+
return (el) => rail = el;
|
|
148
|
+
}, _el$6);
|
|
149
|
+
spread(_el$6, [rest, {
|
|
150
|
+
get style() {
|
|
151
|
+
return {
|
|
152
|
+
...typeof own.style === "object" ? own.style : {},
|
|
153
|
+
"--bs-layout-sider-width": collapsed() ? foldedWidth() : width(),
|
|
154
|
+
"--bs-layout-sider-min": collapsed() ? foldedWidth() : own.minWidth ?? "12rem",
|
|
155
|
+
"--bs-layout-sider-max": collapsed() ? foldedWidth() : own.maxWidth ?? "24rem"
|
|
156
|
+
};
|
|
157
|
+
},
|
|
158
|
+
"data-scope": "layout",
|
|
159
|
+
"data-part": "sider",
|
|
160
|
+
get "data-collapsed"() {
|
|
161
|
+
return collapsed() ? "" : void 0;
|
|
162
|
+
},
|
|
163
|
+
get "data-dragging"() {
|
|
164
|
+
return dragging() ? "" : void 0;
|
|
165
|
+
},
|
|
166
|
+
get "data-resizable"() {
|
|
167
|
+
return own.resizable ? "" : void 0;
|
|
168
|
+
}
|
|
169
|
+
}], true);
|
|
170
|
+
insert(_el$6, (() => {
|
|
171
|
+
var _c$ = memo(() => {
|
|
172
|
+
return typeof own.children === "function";
|
|
173
|
+
});
|
|
174
|
+
return () => {
|
|
175
|
+
return _c$() ? own.children({ collapsed: collapsed() }) : own.children;
|
|
176
|
+
};
|
|
177
|
+
})(), _el$7);
|
|
178
|
+
insert(_el$6, handle, _el$8);
|
|
179
|
+
return _el$6;
|
|
176
180
|
}
|
|
177
181
|
const Layout = Object.assign(LayoutRoot, {
|
|
178
182
|
Root: LayoutRoot,
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { claimElement, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/link/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<a>`);
|
|
6
6
|
/** A link is ink in the accent's voice: quiet at rest, deepening under
|
|
7
7
|
* the hand, the halo at focus. The underline follows the prose —
|
|
8
8
|
* always, on hover, or never. */
|
|
9
9
|
function Link(props) {
|
|
10
10
|
injectComponentStyle("link");
|
|
11
11
|
const [own, rest] = splitProps(props, ["underline"]);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})();
|
|
12
|
+
var _el$ = _tmpl$();
|
|
13
|
+
claimElement(_el$);
|
|
14
|
+
spread(_el$, [rest, {
|
|
15
|
+
"data-scope": "link",
|
|
16
|
+
"data-part": "root",
|
|
17
|
+
get "data-underline"() {
|
|
18
|
+
return own.underline ?? "hover";
|
|
19
|
+
}
|
|
20
|
+
}], false);
|
|
21
|
+
return _el$;
|
|
23
22
|
}
|
|
24
23
|
//#endregion
|
|
25
24
|
export { Link };
|
|
@@ -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>>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, insert, mergeProps, spread, template } from "
|
|
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$ =
|
|
6
|
-
var _tmpl$2 =
|
|
7
|
-
var _tmpl$3 =
|
|
8
|
-
var _tmpl$4 =
|
|
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
|
|
@@ -15,32 +16,38 @@ function part(name, tag) {
|
|
|
15
16
|
function Component(props) {
|
|
16
17
|
return createComponent(tag, mergeProps(props, {
|
|
17
18
|
"data-scope": "list",
|
|
18
|
-
get
|
|
19
|
+
get "data-part"() {
|
|
19
20
|
return name.toLowerCase();
|
|
20
21
|
}
|
|
21
22
|
}));
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return _el$;
|
|
43
|
-
})();
|
|
39
|
+
var _el$2 = _tmpl$2();
|
|
40
|
+
spread(_el$2, [rest, {
|
|
41
|
+
"data-scope": "list",
|
|
42
|
+
"data-part": "root",
|
|
43
|
+
get "data-bordered"() {
|
|
44
|
+
return own.bordered || void 0;
|
|
45
|
+
},
|
|
46
|
+
get "data-hoverable"() {
|
|
47
|
+
return own.hoverable || void 0;
|
|
48
|
+
}
|
|
49
|
+
}], false);
|
|
50
|
+
return _el$2;
|
|
44
51
|
}
|
|
45
52
|
/** The row's words: `title` and `description` ride their own named
|
|
46
53
|
* parts, the children follow them for anything else. */
|
|
@@ -50,35 +57,42 @@ function Content(props) {
|
|
|
50
57
|
"description",
|
|
51
58
|
"children"
|
|
52
59
|
]);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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, {
|
|
65
|
+
"data-scope": "list",
|
|
66
|
+
"data-part": "content"
|
|
67
|
+
}], true);
|
|
68
|
+
insert(_el$3, createComponent(Show, {
|
|
69
|
+
get when() {
|
|
70
|
+
return own.title;
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
var _el$4 = _tmpl$3();
|
|
74
|
+
insert(_el$4, () => {
|
|
61
75
|
return own.title;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
});
|
|
77
|
+
return _el$4;
|
|
78
|
+
}
|
|
79
|
+
}), _el$5);
|
|
80
|
+
insert(_el$3, createComponent(Show, {
|
|
81
|
+
get when() {
|
|
82
|
+
return own.description;
|
|
83
|
+
},
|
|
84
|
+
get children() {
|
|
85
|
+
var _el$6 = _tmpl$4();
|
|
86
|
+
insert(_el$6, () => {
|
|
71
87
|
return own.description;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return _el$2;
|
|
81
|
-
})();
|
|
88
|
+
});
|
|
89
|
+
return _el$6;
|
|
90
|
+
}
|
|
91
|
+
}), _el$7);
|
|
92
|
+
insert(_el$3, () => {
|
|
93
|
+
return own.children;
|
|
94
|
+
}, _el$8);
|
|
95
|
+
return _el$3;
|
|
82
96
|
}
|
|
83
97
|
const List = Object.assign(Root, {
|
|
84
98
|
Root,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { Listbox as Listbox$1 } from "@ark-ui/solid/listbox";
|
|
5
5
|
//#region src/components/listbox/index.tsx
|
|
6
6
|
const ArkRoot = Listbox$1.Root;
|
|
7
7
|
function ListboxRoot(props) {
|
|
8
8
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
return createComponent(ArkRoot, mergeProps(rest, { get
|
|
9
|
+
return createComponent(ArkRoot, mergeProps(rest, { get "data-size"() {
|
|
10
10
|
return own.size ?? "md";
|
|
11
11
|
} }));
|
|
12
12
|
}
|
|
@@ -1,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/masonry/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
/** The same named steps of the space ramp the stack uses — one
|
|
7
7
|
* vocabulary of distance across the layout primitives. */
|
|
8
8
|
const gapVars = {
|
|
@@ -16,21 +16,19 @@ const gapVars = {
|
|
|
16
16
|
function Masonry(props) {
|
|
17
17
|
injectComponentStyle("masonry");
|
|
18
18
|
const [own, rest] = splitProps(props, ["columns", "gap"]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return _el$;
|
|
33
|
-
})();
|
|
19
|
+
var _el$ = _tmpl$();
|
|
20
|
+
spread(_el$, [rest, {
|
|
21
|
+
get style() {
|
|
22
|
+
return {
|
|
23
|
+
...rest.style,
|
|
24
|
+
"--bs-masonry-columns": String(own.columns ?? 3),
|
|
25
|
+
"--bs-masonry-gap": gapVars[own.gap ?? "md"] ?? gapVars.md
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
"data-scope": "masonry",
|
|
29
|
+
"data-part": "root"
|
|
30
|
+
}], false);
|
|
31
|
+
return _el$;
|
|
34
32
|
}
|
|
35
33
|
//#endregion
|
|
36
34
|
export { Masonry };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../textarea/index.mjs";
|
|
2
|
-
import { n as MentionsVessel, r as useMentions, t as Mentions } from "../../mentions-
|
|
2
|
+
import { n as MentionsVessel, r as useMentions, t as Mentions } from "../../mentions-f5Js_2W7.mjs";
|
|
3
3
|
export { Mentions, MentionsVessel, useMentions };
|
|
@@ -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
|
import { createContext, splitProps, useContext } from "solid-js";
|
|
4
4
|
import { Menu as Menu$1 } from "@ark-ui/solid/menu";
|
|
5
5
|
//#region src/components/menu/index.tsx
|
|
@@ -24,7 +24,7 @@ function MenuRoot(props) {
|
|
|
24
24
|
}
|
|
25
25
|
function MenuContent(props) {
|
|
26
26
|
const size = useContext(MenuSizeContext);
|
|
27
|
-
return createComponent(Menu$1.Content, mergeProps(props, { get
|
|
27
|
+
return createComponent(Menu$1.Content, mergeProps(props, { get "data-size"() {
|
|
28
28
|
return size?.() ?? "md";
|
|
29
29
|
} }));
|
|
30
30
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
3
|
import { For, splitProps } from "solid-js";
|
|
4
|
+
import { Portal } from "solid-js/web";
|
|
4
5
|
import { Menu } from "@ark-ui/solid/menu";
|
|
5
6
|
//#region src/components/menubar/index.tsx
|
|
6
|
-
var _tmpl$ =
|
|
7
|
-
var _tmpl$2 =
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
8
9
|
/**
|
|
9
10
|
* A desktop-style menu bar: a row of quiet ghost triggers, each opening
|
|
10
11
|
* the same paper vessel as the menu family. The triggers are our own
|
|
@@ -21,62 +22,63 @@ function Menubar(props) {
|
|
|
21
22
|
injectComponentStyle("menubar");
|
|
22
23
|
injectComponentStyle("menu");
|
|
23
24
|
const [own, rest] = splitProps(props, ["items", "onSelect"]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
spread(_el$, [rest, {
|
|
27
|
+
"data-scope": "menubar",
|
|
28
|
+
"data-part": "root",
|
|
29
|
+
role: "menubar"
|
|
30
|
+
}], true);
|
|
31
|
+
insert(_el$, createComponent(For, {
|
|
32
|
+
get each() {
|
|
33
|
+
return own.items ?? [];
|
|
34
|
+
},
|
|
35
|
+
children: (group) => createComponent(Menu.Root, {
|
|
36
|
+
positioning: { placement: "bottom-start" },
|
|
37
|
+
get children() {
|
|
38
|
+
return [createComponent(Menu.Trigger, { asChild: (triggerProps) => (() => {
|
|
39
|
+
var _el$2 = _tmpl$2();
|
|
40
|
+
spread(_el$2, [triggerProps, {
|
|
41
|
+
type: "button",
|
|
42
|
+
role: "menuitem",
|
|
43
|
+
"data-scope": "menubar",
|
|
44
|
+
"data-part": "trigger"
|
|
45
|
+
}], true);
|
|
46
|
+
insert(_el$2, () => {
|
|
47
|
+
return group.label;
|
|
48
|
+
});
|
|
49
|
+
return _el$2;
|
|
50
|
+
})() }), createComponent(Portal, { get children() {
|
|
51
|
+
return createComponent(Menu.Positioner, { get children() {
|
|
52
|
+
return createComponent(Menu.Content, { get children() {
|
|
53
|
+
return createComponent(For, {
|
|
54
|
+
get each() {
|
|
55
|
+
return group.items;
|
|
56
|
+
},
|
|
57
|
+
children: (entry) => createComponent(Menu.Item, {
|
|
58
|
+
get value() {
|
|
59
|
+
return entry.value;
|
|
53
60
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} });
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
} });
|
|
61
|
+
get disabled() {
|
|
62
|
+
return entry.disabled;
|
|
63
|
+
},
|
|
64
|
+
get "data-danger"() {
|
|
65
|
+
return entry.danger ? "" : void 0;
|
|
66
|
+
},
|
|
67
|
+
onSelect: () => own.onSelect?.(entry.value),
|
|
68
|
+
get children() {
|
|
69
|
+
return createComponent(Menu.ItemText, { get children() {
|
|
70
|
+
return entry.label;
|
|
71
|
+
} });
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
});
|
|
73
75
|
} });
|
|
74
|
-
} })
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
} });
|
|
77
|
+
} })];
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
}));
|
|
81
|
+
return _el$;
|
|
80
82
|
}
|
|
81
83
|
//#endregion
|
|
82
84
|
export { Menubar };
|