@bysages/solid 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-response-ClGGptX3.mjs → ai-response-D2uINBIi.mjs} +17 -7
- package/dist/chevron-BHQrYKPM.mjs +8 -0
- package/dist/components/accordion/index.d.mts +22 -2
- package/dist/components/accordion/index.mjs +68 -2
- package/dist/components/affix/index.d.mts +3 -1
- package/dist/components/affix/index.mjs +5 -4
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +14 -16
- package/dist/components/ai-action/index.d.mts +3 -1
- package/dist/components/ai-action/index.mjs +3 -2
- package/dist/components/ai-attachments/index.d.mts +8 -4
- package/dist/components/ai-attachments/index.mjs +41 -37
- package/dist/components/ai-message/index.d.mts +3 -1
- package/dist/components/ai-message/index.mjs +3 -2
- package/dist/components/ai-prompt-input/index.d.mts +3 -1
- package/dist/components/ai-prompt-input/index.mjs +59 -46
- package/dist/components/ai-reasoning/index.d.mts +3 -1
- package/dist/components/ai-reasoning/index.mjs +4 -3
- package/dist/components/ai-response/index.d.mts +3 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +6 -2
- package/dist/components/ai-source/index.mjs +5 -4
- package/dist/components/ai-suggestion/index.d.mts +3 -1
- package/dist/components/ai-suggestion/index.mjs +3 -2
- package/dist/components/ai-tool/index.d.mts +3 -1
- package/dist/components/ai-tool/index.mjs +4 -3
- package/dist/components/alert/index.mjs +31 -34
- package/dist/components/angle-slider/index.d.mts +1 -1
- package/dist/components/angle-slider/index.mjs +13 -5
- package/dist/components/aspect-ratio/index.d.mts +3 -1
- package/dist/components/aspect-ratio/index.mjs +3 -2
- package/dist/components/autocomplete/index.d.mts +4 -1
- package/dist/components/autocomplete/index.mjs +15 -2
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +10 -1
- package/dist/components/avatar-group/index.d.mts +3 -1
- package/dist/components/avatar-group/index.mjs +3 -2
- package/dist/components/back-top/index.d.mts +3 -1
- package/dist/components/back-top/index.mjs +9 -5
- package/dist/components/badge/index.d.mts +3 -1
- package/dist/components/badge/index.mjs +3 -2
- package/dist/components/banner/index.mjs +9 -3
- package/dist/components/block-ui/index.d.mts +3 -1
- package/dist/components/block-ui/index.mjs +3 -2
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/index.d.mts +3 -1
- package/dist/components/button/index.mjs +3 -2
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +29 -21
- package/dist/components/carousel/index.d.mts +5 -1
- package/dist/components/carousel/index.mjs +13 -1
- package/dist/components/cascade-select/index.d.mts +3 -1
- package/dist/components/cascade-select/index.mjs +82 -74
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/checkbox/index.mjs +13 -5
- package/dist/components/checkbox-group/index.d.mts +4 -9
- package/dist/components/checkbox-group/index.mjs +65 -68
- package/dist/components/chip/index.d.mts +3 -1
- package/dist/components/chip/index.mjs +3 -2
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +8 -1
- package/dist/components/clipboard/index.d.mts +1 -1
- package/dist/components/clipboard/index.mjs +13 -5
- package/dist/components/collapsible/index.d.mts +15 -1
- package/dist/components/collapsible/index.mjs +39 -2
- package/dist/components/color-picker/index.d.mts +13 -2
- package/dist/components/color-picker/index.mjs +95 -8
- package/dist/components/combobox/index.d.mts +24 -1
- package/dist/components/combobox/index.mjs +129 -8
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +24 -4
- package/dist/components/comment/index.d.mts +3 -1
- package/dist/components/comment/index.mjs +3 -2
- package/dist/components/config-provider/index.d.mts +7 -2
- package/dist/components/config-provider/index.mjs +6 -3
- package/dist/components/container/index.d.mts +3 -1
- package/dist/components/container/index.mjs +3 -2
- package/dist/components/data-view/index.d.mts +3 -1
- package/dist/components/data-view/index.mjs +13 -8
- package/dist/components/date-input/index.d.mts +1 -1
- package/dist/components/date-input/index.mjs +13 -5
- package/dist/components/date-picker/index.d.mts +1 -1
- package/dist/components/date-picker/index.mjs +13 -5
- package/dist/components/deferred-content/index.d.mts +3 -1
- package/dist/components/deferred-content/index.mjs +3 -2
- package/dist/components/descriptions/index.d.mts +7 -0
- package/dist/components/descriptions/index.mjs +21 -2
- package/dist/components/dialog/index.d.mts +17 -1
- package/dist/components/dialog/index.mjs +84 -2
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +8 -1
- package/dist/components/drawer/index.d.mts +17 -1
- package/dist/components/drawer/index.mjs +83 -2
- package/dist/components/dynamic-input/index.d.mts +3 -1
- package/dist/components/dynamic-input/index.mjs +15 -7
- package/dist/components/editable/index.d.mts +1 -1
- package/dist/components/editable/index.mjs +13 -5
- package/dist/components/ellipsis/index.d.mts +3 -1
- package/dist/components/ellipsis/index.mjs +3 -2
- package/dist/components/field/index.d.mts +5 -1
- package/dist/components/field/index.mjs +13 -1
- package/dist/components/fieldset/index.d.mts +5 -1
- package/dist/components/fieldset/index.mjs +13 -1
- package/dist/components/file-upload/index.d.mts +1 -1
- package/dist/components/file-upload/index.mjs +24 -6
- package/dist/components/float-button/index.mjs +3 -1
- package/dist/components/floating-panel/index.d.mts +5 -1
- package/dist/components/floating-panel/index.mjs +13 -1
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +8 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +10 -4
- package/dist/components/frame/index.d.mts +6 -1
- package/dist/components/frame/index.mjs +10 -1
- package/dist/components/grid/index.d.mts +3 -1
- package/dist/components/grid/index.mjs +3 -2
- package/dist/components/highlight/index.d.mts +3 -1
- package/dist/components/highlight/index.mjs +2 -1
- package/dist/components/hover-card/index.d.mts +19 -1
- package/dist/components/hover-card/index.mjs +91 -2
- package/dist/components/icon/index.d.mts +8 -7
- package/dist/components/icon/index.mjs +4 -3
- package/dist/components/image/index.d.mts +8 -2
- package/dist/components/image/index.mjs +40 -33
- package/dist/components/image-cropper/index.d.mts +5 -1
- package/dist/components/image-cropper/index.mjs +13 -1
- package/dist/components/image-viewer/index.d.mts +2 -19
- package/dist/components/image-viewer/index.mjs +3 -151
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +5 -1
- package/dist/components/json-tree-view/index.mjs +22 -2
- package/dist/components/kbd/index.d.mts +3 -1
- package/dist/components/kbd/index.mjs +3 -2
- package/dist/components/layout/index.mjs +8 -4
- package/dist/components/link/index.d.mts +3 -1
- package/dist/components/link/index.mjs +3 -2
- package/dist/components/list/index.d.mts +2 -1
- package/dist/components/list/index.mjs +35 -26
- package/dist/components/listbox/index.d.mts +1 -1
- package/dist/components/listbox/index.mjs +13 -5
- package/dist/components/marquee/index.d.mts +5 -1
- package/dist/components/marquee/index.mjs +13 -1
- package/dist/components/masonry/index.d.mts +3 -1
- package/dist/components/masonry/index.mjs +3 -2
- package/dist/components/media-player/index.d.mts +2 -0
- package/dist/components/media-player/index.mjs +2 -0
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +2 -2
- package/dist/components/menu/index.d.mts +21 -1
- package/dist/components/menu/index.mjs +62 -5
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +31 -9
- package/dist/components/navigation-menu/index.d.mts +5 -1
- package/dist/components/navigation-menu/index.mjs +13 -1
- package/dist/components/number-input/index.d.mts +1 -1
- package/dist/components/number-input/index.mjs +13 -5
- package/dist/components/order-list/index.d.mts +3 -1
- package/dist/components/order-list/index.mjs +79 -67
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/index.mjs +13 -5
- package/dist/components/password-input/index.d.mts +1 -1
- package/dist/components/password-input/index.mjs +13 -5
- package/dist/components/pin-input/index.d.mts +1 -1
- package/dist/components/pin-input/index.mjs +13 -5
- package/dist/components/popconfirm/index.d.mts +3 -1
- package/dist/components/popconfirm/index.mjs +16 -8
- package/dist/components/popover/index.d.mts +19 -1
- package/dist/components/popover/index.mjs +91 -2
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +9 -1
- package/dist/components/progress/index.d.mts +1 -1
- package/dist/components/progress/index.mjs +13 -5
- package/dist/components/progress-group/index.d.mts +3 -1
- package/dist/components/progress-group/index.mjs +4 -3
- package/dist/components/qr-code/index.d.mts +5 -1
- package/dist/components/qr-code/index.mjs +13 -1
- package/dist/components/radio-group/index.d.mts +1 -1
- package/dist/components/radio-group/index.mjs +13 -5
- package/dist/components/rating-group/index.d.mts +2 -2
- package/dist/components/rating-group/index.mjs +13 -5
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +5 -3
- package/dist/components/scroll-area/index.d.mts +5 -1
- package/dist/components/scroll-area/index.mjs +13 -1
- package/dist/components/segment-group/index.d.mts +1 -1
- package/dist/components/segment-group/index.mjs +11 -6
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +3 -1
- package/dist/components/separator/index.mjs +3 -2
- package/dist/components/signature-pad/index.d.mts +5 -1
- package/dist/components/signature-pad/index.mjs +13 -1
- package/dist/components/skeleton/index.d.mts +3 -1
- package/dist/components/skeleton/index.mjs +3 -2
- package/dist/components/slider/index.d.mts +1 -1
- package/dist/components/slider/index.mjs +13 -5
- package/dist/components/spinner/index.d.mts +3 -1
- package/dist/components/spinner/index.mjs +6 -3
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +19 -4
- package/dist/components/splitter/index.d.mts +5 -1
- package/dist/components/splitter/index.mjs +13 -1
- package/dist/components/spotlight/index.d.mts +3 -1
- package/dist/components/spotlight/index.mjs +3 -2
- package/dist/components/stack/index.d.mts +3 -1
- package/dist/components/stack/index.mjs +6 -5
- package/dist/components/steps/index.d.mts +25 -3
- package/dist/components/steps/index.mjs +73 -8
- package/dist/components/swap/index.d.mts +5 -1
- package/dist/components/swap/index.mjs +13 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/index.mjs +13 -5
- package/dist/components/table/index.d.mts +3 -1
- package/dist/components/table/index.mjs +194 -164
- package/dist/components/tabs/index.d.mts +20 -2
- package/dist/components/tabs/index.mjs +59 -3
- package/dist/components/tags-input/index.d.mts +1 -1
- package/dist/components/tags-input/index.mjs +13 -5
- package/dist/components/terminal/index.d.mts +3 -1
- package/dist/components/terminal/index.mjs +6 -3
- package/dist/components/textarea/index.d.mts +3 -1
- package/dist/components/textarea/index.mjs +3 -2
- package/dist/components/timer/index.d.mts +5 -1
- package/dist/components/timer/index.mjs +13 -1
- package/dist/components/toast/index.d.mts +8 -2
- package/dist/components/toast/index.mjs +14 -2
- package/dist/components/toc/index.d.mts +5 -1
- package/dist/components/toc/index.mjs +1 -9
- package/dist/components/toggle/index.d.mts +5 -1
- package/dist/components/toggle/index.mjs +13 -1
- package/dist/components/toggle-group/index.d.mts +1 -1
- package/dist/components/toggle-group/index.mjs +13 -5
- package/dist/components/toolbar/index.d.mts +3 -1
- package/dist/components/toolbar/index.mjs +3 -2
- package/dist/components/tooltip/index.d.mts +16 -1
- package/dist/components/tooltip/index.mjs +55 -2
- package/dist/components/tour/index.d.mts +16 -3
- package/dist/components/tour/index.mjs +74 -9
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +68 -54
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +45 -35
- package/dist/components/tree-view/index.d.mts +1 -1
- package/dist/components/tree-view/index.mjs +26 -5
- package/dist/components/user/index.d.mts +3 -1
- package/dist/components/user/index.mjs +8 -2
- package/dist/components/virtual-list/index.d.mts +3 -1
- package/dist/components/virtual-list/index.mjs +14 -9
- package/dist/components/watermark/index.d.mts +3 -1
- package/dist/components/watermark/index.mjs +4 -3
- package/dist/element-dGIhOTJ6.mjs +16 -0
- package/dist/family-Cmd8HEyK.mjs +11 -0
- package/dist/icon-DTqmJCd5.mjs +48 -0
- package/dist/id-2ygNzPHF.mjs +12 -0
- package/dist/image-viewer-B9A5lXsk.mjs +228 -0
- package/dist/{index-B1xiJ5ki.d.mts → index-B1-quIrl.d.mts} +6 -2
- package/dist/{index-DDX7x8aT.d.mts → index-DEArHiFI.d.mts} +16 -7
- package/dist/index-DhripUtf.d.mts +39 -0
- package/dist/{index-YPUiqD3n.d.mts → index-ID48LCMU.d.mts} +28 -2
- package/dist/{index-IfofF-SW.d.mts → index-nFXK_8hJ.d.mts} +53 -23
- package/dist/index-wW28BYf1.d.mts +124 -0
- package/dist/index.d.mts +22 -21
- package/dist/index.mjs +14 -13
- package/dist/{input-DoFQ7RXh.mjs → input-CPAJdwDb.mjs} +3 -2
- package/dist/media-player-BC8D_d29.mjs +796 -0
- package/dist/{mentions-f5Js_2W7.mjs → mentions-CeG5u8Qm.mjs} +67 -51
- package/dist/select-7YjMSBGx.mjs +292 -0
- package/dist/toc-DYKaKQ_X.mjs +31 -0
- package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
- package/package.json +3 -3
- package/dist/chevron-D5RzcayK.mjs +0 -9
- package/dist/select-CHaXbzLX.mjs +0 -115
|
@@ -1,35 +1,35 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
4
|
+
import { createComponent, effect, insert, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
3
5
|
import { Show, createEffect, createSignal, on, splitProps } from "solid-js";
|
|
4
6
|
//#region src/components/image/index.tsx
|
|
5
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
6
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** The mark for a source that never arrived: a quiet mountain-and-sun,
|
|
11
|
-
* drawn in the stylesheet's stroke and hidden from the reader. */
|
|
12
|
-
function placeholderGlyph() {
|
|
13
|
-
return [
|
|
14
|
-
_tmpl$(),
|
|
15
|
-
_tmpl$2(),
|
|
16
|
-
_tmpl$3()
|
|
17
|
-
];
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=image data-part=fallback>`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<figure><img data-scope=image data-part=img decoding=async>`, 1);
|
|
9
|
+
/** The registry icon for a source that never arrived, hidden from the reader. */
|
|
10
|
+
function placeholderIcon() {
|
|
11
|
+
return iconNode("image");
|
|
18
12
|
}
|
|
19
|
-
function Image(props) {
|
|
13
|
+
const Image = withSelfRoot(function Image(props) {
|
|
20
14
|
injectComponentStyle("image");
|
|
21
15
|
const [own, rest] = splitProps(props, [
|
|
22
16
|
"src",
|
|
23
17
|
"alt",
|
|
18
|
+
"width",
|
|
19
|
+
"height",
|
|
24
20
|
"fit",
|
|
25
21
|
"loading",
|
|
26
22
|
"fallback"
|
|
27
23
|
]);
|
|
28
24
|
const [state, setState] = createSignal("loading");
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
let image;
|
|
26
|
+
createEffect(on(() => own.src, () => {
|
|
27
|
+
setState("loading");
|
|
28
|
+
if (image?.complete) setState(image.naturalWidth > 0 ? "loaded" : "error");
|
|
29
|
+
}));
|
|
30
|
+
var _el$ = _tmpl$2();
|
|
31
|
+
var _el$2 = _el$.firstChild;
|
|
32
|
+
spread(_el$, [rest, {
|
|
33
33
|
"data-scope": "image",
|
|
34
34
|
"data-part": "root",
|
|
35
35
|
get "data-state"() {
|
|
@@ -39,32 +39,39 @@ function Image(props) {
|
|
|
39
39
|
return own.fit ?? "cover";
|
|
40
40
|
}
|
|
41
41
|
}], true);
|
|
42
|
-
_el$
|
|
43
|
-
_el$
|
|
44
|
-
|
|
42
|
+
_el$2.addEventListener("error", () => setState("error"));
|
|
43
|
+
_el$2.addEventListener("load", () => setState("loaded"));
|
|
44
|
+
ref(() => {
|
|
45
|
+
return (element) => image = element;
|
|
46
|
+
}, _el$2);
|
|
47
|
+
insert(_el$, createComponent(Show, {
|
|
45
48
|
get when() {
|
|
46
49
|
return state() === "error";
|
|
47
50
|
},
|
|
48
51
|
get children() {
|
|
49
|
-
var _el$
|
|
50
|
-
insert(_el$
|
|
51
|
-
return own.fallback ??
|
|
52
|
+
var _el$3 = _tmpl$();
|
|
53
|
+
insert(_el$3, () => {
|
|
54
|
+
return own.fallback ?? placeholderIcon();
|
|
52
55
|
});
|
|
53
|
-
return _el$
|
|
56
|
+
return _el$3;
|
|
54
57
|
}
|
|
55
58
|
}), null);
|
|
56
59
|
effect(() => {
|
|
57
60
|
return {
|
|
58
61
|
e: own.src,
|
|
59
62
|
t: own.alt ?? "",
|
|
60
|
-
a: own.
|
|
63
|
+
a: own.width,
|
|
64
|
+
o: own.height,
|
|
65
|
+
i: own.loading ?? "lazy"
|
|
61
66
|
};
|
|
62
|
-
}, ({ e, t, a }, _p$) => {
|
|
63
|
-
e !== _p$?.e && setAttribute(_el$
|
|
64
|
-
t !== _p$?.t && setAttribute(_el$
|
|
65
|
-
a !== _p$?.a && setAttribute(_el$
|
|
67
|
+
}, ({ e, t, a, o, i }, _p$) => {
|
|
68
|
+
e !== _p$?.e && setAttribute(_el$2, "src", e);
|
|
69
|
+
t !== _p$?.t && setAttribute(_el$2, "alt", t);
|
|
70
|
+
a !== _p$?.a && setAttribute(_el$2, "width", a);
|
|
71
|
+
o !== _p$?.o && setAttribute(_el$2, "height", o);
|
|
72
|
+
i !== _p$?.i && setAttribute(_el$2, "loading", i);
|
|
66
73
|
});
|
|
67
|
-
return _el
|
|
68
|
-
}
|
|
74
|
+
return _el$;
|
|
75
|
+
});
|
|
69
76
|
//#endregion
|
|
70
77
|
export { Image };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { ImageCropper as ImageCropper$1 } from "@ark-ui/solid/image-cropper";
|
|
2
3
|
//#region src/components/image-cropper/index.d.ts
|
|
3
4
|
/** Ark's ImageCropper, dressed in the paper-and-ink system: a rounded vessel
|
|
4
5
|
* holding the photograph, one lit selection window framed by light hairlines.
|
|
5
6
|
* The API is Ark's own — Root, Viewport, Image, Selection, Handle, Grid,
|
|
6
7
|
* Context. */
|
|
7
|
-
|
|
8
|
+
declare function ImageCropperRoot(props: ComponentProps<typeof ImageCropper$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
+
export declare const ImageCropper: typeof ImageCropperRoot & Omit<typeof ImageCropper$1, "Root"> & {
|
|
10
|
+
Root: typeof ImageCropperRoot;
|
|
11
|
+
};
|
|
8
12
|
//#endregion
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { ImageCropper as ImageCropper$1 } from "@ark-ui/solid/image-cropper";
|
|
3
6
|
//#region src/components/image-cropper/index.ts
|
|
4
7
|
/** Ark's ImageCropper, dressed in the paper-and-ink system: a rounded vessel
|
|
5
8
|
* holding the photograph, one lit selection window framed by light hairlines.
|
|
6
9
|
* The API is Ark's own — Root, Viewport, Image, Selection, Handle, Grid,
|
|
7
10
|
* Context. */
|
|
8
|
-
|
|
11
|
+
function ImageCropperRoot(props) {
|
|
12
|
+
const id = useElementId("image-cropper", () => props.id);
|
|
13
|
+
return createComponent(ImageCropper$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return id();
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
const ImageCropper = defineFamily(ImageCropperRoot, {
|
|
18
|
+
...ImageCropper$1,
|
|
19
|
+
Root: ImageCropperRoot
|
|
20
|
+
});
|
|
9
21
|
injectComponentStyle("image-cropper");
|
|
10
22
|
//#endregion
|
|
11
23
|
export { ImageCropper };
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A lightbox: the picture over a dimmed page, with a small toolbar
|
|
5
|
-
* beneath it. Zoom is the reader's hand (half to three times, clamped),
|
|
6
|
-
* a quarter turn at a time rotates, Escape and the scrim close — the
|
|
7
|
-
* dialog machine carries the modal part. `open` may stay with the
|
|
8
|
-
* caller; left undefined the viewer keeps it to itself.
|
|
9
|
-
*/
|
|
10
|
-
export interface ImageViewerProps {
|
|
11
|
-
src: string;
|
|
12
|
-
alt?: string;
|
|
13
|
-
open?: boolean;
|
|
14
|
-
zoomable?: boolean;
|
|
15
|
-
/** The openness changed — from the scrim, Escape or the toolbar. */
|
|
16
|
-
onOpenChange?: (open: boolean) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare function ImageViewer(props: ImageViewerProps): JSX.Element;
|
|
19
|
-
//#endregion
|
|
1
|
+
import { n as ImageViewerProps, t as ImageViewer } from "../../index-DhripUtf.mjs";
|
|
2
|
+
export { ImageViewer, ImageViewerProps };
|
|
@@ -1,152 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { createComponent, effect, insert, memo, setAttribute, setStyleProperty, template } from "@solidjs/web";
|
|
5
|
-
import { Show, createEffect, createSignal, splitProps } from "solid-js";
|
|
6
|
-
import { Portal } from "solid-js/web";
|
|
7
|
-
import { Dialog } from "@ark-ui/solid/dialog";
|
|
8
|
-
//#region src/components/image-viewer/index.tsx
|
|
9
|
-
var _tmpl$ = /* @__PURE__ */ template(`<svg><circle cx=11 cy=11 r=7></svg>`, 2);
|
|
10
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<svg><path d="m16.2 16.2 4.8 4.8"></svg>`, 2);
|
|
11
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<svg><path d="M8 11h6"></svg>`, 2);
|
|
12
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<svg><path d="M11 8v6"></svg>`, 2);
|
|
13
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<svg><path d="M20.49 12A8.5 8.5 0 1 1 18 6.06"></svg>`, 2);
|
|
14
|
-
var _tmpl$6 = /* @__PURE__ */ template(`<svg><path d="M20.5 3.5v4h-4"></svg>`, 2);
|
|
15
|
-
var _tmpl$7 = /* @__PURE__ */ template(`<svg><path d="m6 6 12 12"></svg>`, 2);
|
|
16
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<svg><path d="M18 6 6 18"></svg>`, 2);
|
|
17
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true>`);
|
|
18
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<img data-scope=image-viewer data-part=viewport>`);
|
|
19
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<div data-scope=image-viewer data-part=toolbar>`);
|
|
20
|
-
const MIN_SCALE = .5;
|
|
21
|
-
const MAX_SCALE = 3;
|
|
22
|
-
const SCALE_STEP = .25;
|
|
23
|
-
/** The toolbar's line-drawn glyphs, fresh per render. */
|
|
24
|
-
const TOOL_GLYPHS = {
|
|
25
|
-
zoomIn: () => [
|
|
26
|
-
_tmpl$(),
|
|
27
|
-
_tmpl$2(),
|
|
28
|
-
_tmpl$3(),
|
|
29
|
-
_tmpl$4()
|
|
30
|
-
],
|
|
31
|
-
zoomOut: () => [
|
|
32
|
-
_tmpl$(),
|
|
33
|
-
_tmpl$2(),
|
|
34
|
-
_tmpl$3()
|
|
35
|
-
],
|
|
36
|
-
rotate: () => [_tmpl$5(), _tmpl$6()],
|
|
37
|
-
close: () => [_tmpl$7(), _tmpl$8()]
|
|
38
|
-
};
|
|
39
|
-
function ImageViewer(props) {
|
|
40
|
-
injectComponentStyle("image-viewer");
|
|
41
|
-
const [own] = splitProps(props, [
|
|
42
|
-
"src",
|
|
43
|
-
"alt",
|
|
44
|
-
"open",
|
|
45
|
-
"zoomable",
|
|
46
|
-
"onOpenChange"
|
|
47
|
-
]);
|
|
48
|
-
const [localOpen, setLocalOpen] = createSignal(false);
|
|
49
|
-
const [scale, setScale] = createSignal(1);
|
|
50
|
-
const [rotation, setRotation] = createSignal(0);
|
|
51
|
-
const isOpen = () => own.open ?? localOpen();
|
|
52
|
-
const setOpen = (value) => {
|
|
53
|
-
if (own.open === void 0) setLocalOpen(value);
|
|
54
|
-
own.onOpenChange?.(value);
|
|
55
|
-
};
|
|
56
|
-
createEffect(() => {
|
|
57
|
-
if (isOpen()) {
|
|
58
|
-
setScale(1);
|
|
59
|
-
setRotation(0);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
function zoom(step) {
|
|
63
|
-
setScale(Math.min(MAX_SCALE, Math.max(MIN_SCALE, scale() + step)));
|
|
64
|
-
}
|
|
65
|
-
function rotate() {
|
|
66
|
-
setRotation((rotation() + 90) % 360);
|
|
67
|
-
}
|
|
68
|
-
function toolButton(label, glyph, onClick) {
|
|
69
|
-
return createComponent(Button, {
|
|
70
|
-
variant: "ghost",
|
|
71
|
-
square: true,
|
|
72
|
-
size: "lg",
|
|
73
|
-
"aria-label": label,
|
|
74
|
-
onClick,
|
|
75
|
-
get children() {
|
|
76
|
-
var _el$12 = _tmpl$9();
|
|
77
|
-
insert(_el$12, glyph);
|
|
78
|
-
return _el$12;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return createComponent(Dialog.Root, {
|
|
83
|
-
get open() {
|
|
84
|
-
return isOpen();
|
|
85
|
-
},
|
|
86
|
-
onOpenChange: (details) => setOpen(details.open),
|
|
87
|
-
lazyMount: true,
|
|
88
|
-
unmountOnExit: true,
|
|
89
|
-
get children() {
|
|
90
|
-
return createComponent(Portal, { get children() {
|
|
91
|
-
return [createComponent(Dialog.Backdrop, { class: "bs-image-viewer-backdrop" }), createComponent(Dialog.Positioner, {
|
|
92
|
-
class: "bs-image-viewer-positioner",
|
|
93
|
-
get children() {
|
|
94
|
-
return createComponent(Dialog.Content, {
|
|
95
|
-
class: "bs-image-viewer-content",
|
|
96
|
-
get "aria-label"() {
|
|
97
|
-
return own.alt || "Image preview";
|
|
98
|
-
},
|
|
99
|
-
onClick: (event) => {
|
|
100
|
-
if (event.target === event.currentTarget) setOpen(false);
|
|
101
|
-
},
|
|
102
|
-
get children() {
|
|
103
|
-
return [(() => {
|
|
104
|
-
var _el$13 = _tmpl$10();
|
|
105
|
-
effect(() => {
|
|
106
|
-
return {
|
|
107
|
-
e: own.src,
|
|
108
|
-
t: own.alt ?? "",
|
|
109
|
-
a: `scale(${scale()}) rotate(${rotation()}deg)`
|
|
110
|
-
};
|
|
111
|
-
}, ({ e, t, a }, _p$) => {
|
|
112
|
-
e !== _p$?.e && setAttribute(_el$13, "src", e);
|
|
113
|
-
t !== _p$?.t && setAttribute(_el$13, "alt", t);
|
|
114
|
-
a !== _p$?.a && setStyleProperty(_el$13, "transform", a);
|
|
115
|
-
});
|
|
116
|
-
return _el$13;
|
|
117
|
-
})(), (() => {
|
|
118
|
-
var _el$14 = _tmpl$11();
|
|
119
|
-
insert(_el$14, createComponent(ButtonGroup, { get children() {
|
|
120
|
-
return [
|
|
121
|
-
createComponent(Show, {
|
|
122
|
-
get when() {
|
|
123
|
-
return own.zoomable ?? true;
|
|
124
|
-
},
|
|
125
|
-
get children() {
|
|
126
|
-
return [memo(() => {
|
|
127
|
-
return toolButton("Zoom in", TOOL_GLYPHS.zoomIn, () => zoom(SCALE_STEP));
|
|
128
|
-
}), memo(() => {
|
|
129
|
-
return toolButton("Zoom out", TOOL_GLYPHS.zoomOut, () => zoom(-.25));
|
|
130
|
-
})];
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
|
-
memo(() => {
|
|
134
|
-
return toolButton("Rotate 90 degrees", TOOL_GLYPHS.rotate, rotate);
|
|
135
|
-
}),
|
|
136
|
-
memo(() => {
|
|
137
|
-
return toolButton("Close", TOOL_GLYPHS.close, () => setOpen(false));
|
|
138
|
-
})
|
|
139
|
-
];
|
|
140
|
-
} }));
|
|
141
|
-
return _el$14;
|
|
142
|
-
})()];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
})];
|
|
147
|
-
} });
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
1
|
+
import "../button-group/index.mjs";
|
|
2
|
+
import "../dialog/index.mjs";
|
|
3
|
+
import { t as ImageViewer } from "../../image-viewer-B9A5lXsk.mjs";
|
|
152
4
|
export { ImageViewer };
|
|
@@ -15,5 +15,7 @@ export interface InputProps extends JSX.InputHTMLAttributes<HTMLInputElement> {
|
|
|
15
15
|
* the label id, the described-by wiring and the invalid state for free,
|
|
16
16
|
* which is also the seam the Form validation layer will drive. Disabled
|
|
17
17
|
* rides the native attribute. */
|
|
18
|
-
export declare
|
|
18
|
+
export declare const Input: ((props: InputProps) => JSX.Element) & {
|
|
19
|
+
Root: (props: InputProps) => JSX.Element;
|
|
20
|
+
};
|
|
19
21
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Input } from "../../input-
|
|
1
|
+
import { t as Input } from "../../input-CPAJdwDb.mjs";
|
|
2
2
|
export { Input };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/solid/json-tree-view";
|
|
2
3
|
//#region src/components/json-tree-view/index.d.ts
|
|
3
4
|
/** Ark's JsonTreeView, dressed in the paper-and-ink system: the tree-view
|
|
4
5
|
* recipes re-scoped, with value nodes reading as tabular data. The API is
|
|
5
6
|
* Ark's own — Root, Tree, plus createJsonTreeCollection. */
|
|
6
|
-
|
|
7
|
+
declare function JsonTreeViewRoot(props: ComponentProps<typeof JsonTreeView$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
export declare const JsonTreeView: typeof JsonTreeViewRoot & Omit<typeof JsonTreeView$1, "Root"> & {
|
|
9
|
+
Root: typeof JsonTreeViewRoot;
|
|
10
|
+
};
|
|
7
11
|
//#endregion
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
5
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
6
|
+
import { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
2
7
|
import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/solid/json-tree-view";
|
|
3
|
-
//#region src/components/json-tree-view/index.
|
|
8
|
+
//#region src/components/json-tree-view/index.tsx
|
|
4
9
|
/** Ark's JsonTreeView, dressed in the paper-and-ink system: the tree-view
|
|
5
10
|
* recipes re-scoped, with value nodes reading as tabular data. The API is
|
|
6
11
|
* Ark's own — Root, Tree, plus createJsonTreeCollection. */
|
|
7
|
-
|
|
12
|
+
function JsonTreeViewRoot(props) {
|
|
13
|
+
const id = useElementId("json-tree-view", () => props.id);
|
|
14
|
+
return createComponent$1(JsonTreeView$1.Root, mergeProps$1(props, { get id() {
|
|
15
|
+
return id();
|
|
16
|
+
} }));
|
|
17
|
+
}
|
|
18
|
+
function JsonTreeViewTree(props) {
|
|
19
|
+
return createComponent(JsonTreeView$1.Tree, mergeProps(props, { get arrow() {
|
|
20
|
+
return props.arrow ?? iconNode("chevron-right");
|
|
21
|
+
} }));
|
|
22
|
+
}
|
|
23
|
+
const JsonTreeView = defineFamily(JsonTreeViewRoot, {
|
|
24
|
+
...JsonTreeView$1,
|
|
25
|
+
Root: JsonTreeViewRoot,
|
|
26
|
+
Tree: JsonTreeViewTree
|
|
27
|
+
});
|
|
8
28
|
injectComponentStyle("json-tree-view");
|
|
9
29
|
//#endregion
|
|
10
30
|
export { JsonTreeView };
|
|
@@ -2,5 +2,7 @@ import { JSX } from "solid-js";
|
|
|
2
2
|
//#region src/components/kbd/index.d.ts
|
|
3
3
|
/** A keycap in miniature, riding the type it annotates. */
|
|
4
4
|
export type KbdProps = JSX.HTMLAttributes<HTMLElement>;
|
|
5
|
-
export declare
|
|
5
|
+
export declare const Kbd: ((props: KbdProps) => JSX.Element) & {
|
|
6
|
+
Root: (props: KbdProps) => JSX.Element;
|
|
7
|
+
};
|
|
6
8
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { spread, template } from "@solidjs/web";
|
|
3
4
|
//#region src/components/kbd/index.tsx
|
|
4
5
|
var _tmpl$ = /* @__PURE__ */ template(`<kbd>`);
|
|
5
|
-
function Kbd(props) {
|
|
6
|
+
const Kbd = withSelfRoot(function Kbd(props) {
|
|
6
7
|
injectComponentStyle("kbd");
|
|
7
8
|
var _el$ = _tmpl$();
|
|
8
9
|
spread(_el$, [props, {
|
|
@@ -10,6 +11,6 @@ function Kbd(props) {
|
|
|
10
11
|
"data-part": "root"
|
|
11
12
|
}], false);
|
|
12
13
|
return _el$;
|
|
13
|
-
}
|
|
14
|
+
});
|
|
14
15
|
//#endregion
|
|
15
16
|
export { Kbd };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { createComponent, delegateEvents, effect, insert, memo, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
3
4
|
import { createContext, createEffect, createSignal, splitProps, useContext } from "solid-js";
|
|
@@ -6,7 +7,7 @@ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
|
6
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<header>`);
|
|
7
8
|
var _tmpl$3 = /* @__PURE__ */ template(`<main>`);
|
|
8
9
|
var _tmpl$4 = /* @__PURE__ */ template(`<footer>`);
|
|
9
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=layout data-part=sider-resize role=separator aria-orientation=vertical tabindex=0
|
|
10
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div data-scope=layout data-part=sider-resize role=separator aria-orientation=vertical tabindex=0>`);
|
|
10
11
|
var _tmpl$6 = /* @__PURE__ */ template(`<aside><!><!>`);
|
|
11
12
|
const LayoutContext = createContext();
|
|
12
13
|
/**
|
|
@@ -89,6 +90,7 @@ function LayoutSider(props) {
|
|
|
89
90
|
});
|
|
90
91
|
const layout = useContext(LayoutContext);
|
|
91
92
|
const [dragging, setDragging] = createSignal(false);
|
|
93
|
+
const messages = useComponentMessages();
|
|
92
94
|
let rail;
|
|
93
95
|
let startPointerX = 0;
|
|
94
96
|
let startWidth = 0;
|
|
@@ -127,11 +129,13 @@ function LayoutSider(props) {
|
|
|
127
129
|
effect(() => {
|
|
128
130
|
return {
|
|
129
131
|
e: dragging() ? "" : void 0,
|
|
130
|
-
t:
|
|
132
|
+
t: messages().sidebar.resize,
|
|
133
|
+
a: railWidth()
|
|
131
134
|
};
|
|
132
|
-
}, ({ e, t }, _p$) => {
|
|
135
|
+
}, ({ e, t, a }, _p$) => {
|
|
133
136
|
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
134
|
-
t !== _p$?.t && setAttribute(_el$5, "aria-
|
|
137
|
+
t !== _p$?.t && setAttribute(_el$5, "aria-label", t);
|
|
138
|
+
a !== _p$?.a && setAttribute(_el$5, "aria-valuenow", a);
|
|
135
139
|
});
|
|
136
140
|
return _el$5;
|
|
137
141
|
})() : null;
|
|
@@ -6,5 +6,7 @@ export interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
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
|
-
export declare
|
|
9
|
+
export declare const Link: ((props: LinkProps) => JSX.Element) & {
|
|
10
|
+
Root: (props: LinkProps) => JSX.Element;
|
|
11
|
+
};
|
|
10
12
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { claimElement, spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -6,7 +7,7 @@ var _tmpl$ = /* @__PURE__ */ template(`<a>`);
|
|
|
6
7
|
/** A link is ink in the accent's voice: quiet at rest, deepening under
|
|
7
8
|
* the hand, the halo at focus. The underline follows the prose —
|
|
8
9
|
* always, on hover, or never. */
|
|
9
|
-
function Link(props) {
|
|
10
|
+
const Link = withSelfRoot(function Link(props) {
|
|
10
11
|
injectComponentStyle("link");
|
|
11
12
|
const [own, rest] = splitProps(props, ["underline"]);
|
|
12
13
|
var _el$ = _tmpl$();
|
|
@@ -19,6 +20,6 @@ function Link(props) {
|
|
|
19
20
|
}
|
|
20
21
|
}], false);
|
|
21
22
|
return _el$;
|
|
22
|
-
}
|
|
23
|
+
});
|
|
23
24
|
//#endregion
|
|
24
25
|
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>>;
|
|
@@ -2,10 +2,11 @@ import { injectComponentStyle } from "@bysages/core";
|
|
|
2
2
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { Show, splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/list/index.tsx
|
|
5
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
6
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
7
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=list data-part=
|
|
8
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<div
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<li>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<ul>`);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=list data-part=title>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<div data-scope=list data-part=description>`);
|
|
9
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<div><!><!><!>`);
|
|
9
10
|
/** A ledger of rows: Root is the list, Item one row, Leading the mark
|
|
10
11
|
* before the words, Content the title and its quiet echo, Actions the
|
|
11
12
|
* way out. The bordered variant draws the hairlines; the hoverable
|
|
@@ -22,13 +23,21 @@ function part(name, tag) {
|
|
|
22
23
|
}
|
|
23
24
|
return Component;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
function Item(props) {
|
|
27
|
+
const [, rest] = splitProps(props, ["role"]);
|
|
28
|
+
var _el$ = _tmpl$();
|
|
29
|
+
spread(_el$, [rest, {
|
|
30
|
+
"data-scope": "list",
|
|
31
|
+
"data-part": "item"
|
|
32
|
+
}], false);
|
|
33
|
+
return _el$;
|
|
34
|
+
}
|
|
26
35
|
const Leading = part("Leading", "div");
|
|
27
36
|
const Actions = part("Actions", "div");
|
|
28
37
|
function Root(props) {
|
|
29
38
|
const [own, rest] = splitProps(props, ["bordered", "hoverable"]);
|
|
30
|
-
var _el$ = _tmpl$();
|
|
31
|
-
spread(_el
|
|
39
|
+
var _el$2 = _tmpl$2();
|
|
40
|
+
spread(_el$2, [rest, {
|
|
32
41
|
"data-scope": "list",
|
|
33
42
|
"data-part": "root",
|
|
34
43
|
get "data-bordered"() {
|
|
@@ -38,7 +47,7 @@ function Root(props) {
|
|
|
38
47
|
return own.hoverable || void 0;
|
|
39
48
|
}
|
|
40
49
|
}], false);
|
|
41
|
-
return _el
|
|
50
|
+
return _el$2;
|
|
42
51
|
}
|
|
43
52
|
/** The row's words: `title` and `description` ride their own named
|
|
44
53
|
* parts, the children follow them for anything else. */
|
|
@@ -48,42 +57,42 @@ function Content(props) {
|
|
|
48
57
|
"description",
|
|
49
58
|
"children"
|
|
50
59
|
]);
|
|
51
|
-
var _el$
|
|
52
|
-
var _el$
|
|
53
|
-
var _el$
|
|
54
|
-
var _el$
|
|
55
|
-
spread(_el$
|
|
60
|
+
var _el$3 = _tmpl$5();
|
|
61
|
+
var _el$5 = _el$3.firstChild;
|
|
62
|
+
var _el$7 = _el$5.nextSibling;
|
|
63
|
+
var _el$8 = _el$7.nextSibling;
|
|
64
|
+
spread(_el$3, [rest, {
|
|
56
65
|
"data-scope": "list",
|
|
57
66
|
"data-part": "content"
|
|
58
67
|
}], true);
|
|
59
|
-
insert(_el$
|
|
68
|
+
insert(_el$3, createComponent(Show, {
|
|
60
69
|
get when() {
|
|
61
70
|
return own.title;
|
|
62
71
|
},
|
|
63
72
|
get children() {
|
|
64
|
-
var _el$
|
|
65
|
-
insert(_el$
|
|
73
|
+
var _el$4 = _tmpl$3();
|
|
74
|
+
insert(_el$4, () => {
|
|
66
75
|
return own.title;
|
|
67
76
|
});
|
|
68
|
-
return _el$
|
|
77
|
+
return _el$4;
|
|
69
78
|
}
|
|
70
|
-
}), _el$
|
|
71
|
-
insert(_el$
|
|
79
|
+
}), _el$5);
|
|
80
|
+
insert(_el$3, createComponent(Show, {
|
|
72
81
|
get when() {
|
|
73
82
|
return own.description;
|
|
74
83
|
},
|
|
75
84
|
get children() {
|
|
76
|
-
var _el$
|
|
77
|
-
insert(_el$
|
|
85
|
+
var _el$6 = _tmpl$4();
|
|
86
|
+
insert(_el$6, () => {
|
|
78
87
|
return own.description;
|
|
79
88
|
});
|
|
80
|
-
return _el$
|
|
89
|
+
return _el$6;
|
|
81
90
|
}
|
|
82
|
-
}), _el$
|
|
83
|
-
insert(_el$
|
|
91
|
+
}), _el$7);
|
|
92
|
+
insert(_el$3, () => {
|
|
84
93
|
return own.children;
|
|
85
|
-
}, _el$
|
|
86
|
-
return _el$
|
|
94
|
+
}, _el$8);
|
|
95
|
+
return _el$3;
|
|
87
96
|
}
|
|
88
97
|
const List = Object.assign(Root, {
|
|
89
98
|
Root,
|
|
@@ -11,7 +11,7 @@ type ListboxOwnProps = {
|
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
12
|
};
|
|
13
13
|
declare function ListboxRoot<T extends CollectionItem>(props: ListboxRootProps<T> & ListboxOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
export declare const Listbox: Omit<typeof Listbox$1, "Root"> & {
|
|
14
|
+
export declare const Listbox: typeof ListboxRoot & Omit<typeof Listbox$1, "Root"> & {
|
|
15
15
|
Root: typeof ListboxRoot;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
@@ -6,14 +8,20 @@ import { Listbox as Listbox$1 } from "@ark-ui/solid/listbox";
|
|
|
6
8
|
const ArkRoot = Listbox$1.Root;
|
|
7
9
|
function ListboxRoot(props) {
|
|
8
10
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const id = useElementId("listbox", () => rest.id);
|
|
12
|
+
return createComponent(ArkRoot, mergeProps(rest, {
|
|
13
|
+
get id() {
|
|
14
|
+
return id();
|
|
15
|
+
},
|
|
16
|
+
get "data-size"() {
|
|
17
|
+
return own.size ?? "md";
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
12
20
|
}
|
|
13
|
-
const Listbox = {
|
|
21
|
+
const Listbox = defineFamily(ListboxRoot, {
|
|
14
22
|
...Listbox$1,
|
|
15
23
|
Root: ListboxRoot
|
|
16
|
-
};
|
|
24
|
+
});
|
|
17
25
|
injectComponentStyle("listbox");
|
|
18
26
|
//#endregion
|
|
19
27
|
export { Listbox };
|