@bysages/solid 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-response-slzE03wh.mjs → ai-response-CJ-uEAgj.mjs} +14 -6
- package/dist/chevron-BHQrYKPM.mjs +8 -0
- package/dist/components/accordion/index.d.mts +22 -2
- package/dist/components/accordion/index.mjs +69 -3
- package/dist/components/affix/index.d.mts +3 -1
- package/dist/components/affix/index.mjs +6 -5
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +7 -6
- package/dist/components/ai-action/index.d.mts +3 -1
- package/dist/components/ai-action/index.mjs +4 -3
- package/dist/components/ai-attachments/index.d.mts +8 -4
- package/dist/components/ai-attachments/index.mjs +39 -37
- package/dist/components/ai-message/index.d.mts +3 -1
- package/dist/components/ai-message/index.mjs +4 -3
- package/dist/components/ai-prompt-input/index.d.mts +3 -1
- package/dist/components/ai-prompt-input/index.mjs +48 -44
- package/dist/components/ai-reasoning/index.d.mts +3 -1
- package/dist/components/ai-reasoning/index.mjs +5 -4
- 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 +6 -5
- package/dist/components/ai-suggestion/index.d.mts +3 -1
- package/dist/components/ai-suggestion/index.mjs +4 -3
- package/dist/components/ai-tool/index.d.mts +3 -1
- package/dist/components/ai-tool/index.mjs +5 -4
- package/dist/components/alert/index.mjs +32 -35
- package/dist/components/angle-slider/index.d.mts +1 -1
- package/dist/components/angle-slider/index.mjs +14 -6
- package/dist/components/aspect-ratio/index.d.mts +3 -1
- package/dist/components/aspect-ratio/index.mjs +4 -3
- package/dist/components/autocomplete/index.d.mts +4 -1
- package/dist/components/autocomplete/index.mjs +19 -4
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +11 -2
- package/dist/components/avatar-group/index.d.mts +3 -1
- package/dist/components/avatar-group/index.mjs +4 -3
- package/dist/components/back-top/index.d.mts +3 -1
- package/dist/components/back-top/index.mjs +10 -6
- package/dist/components/badge/index.d.mts +3 -1
- package/dist/components/badge/index.mjs +4 -3
- package/dist/components/banner/index.mjs +7 -3
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.d.mts +3 -1
- package/dist/components/block-ui/index.mjs +4 -3
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.d.mts +3 -1
- package/dist/components/button/index.mjs +4 -3
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +30 -22
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +5 -1
- package/dist/components/carousel/index.mjs +14 -2
- package/dist/components/cascade-select/index.d.mts +3 -1
- package/dist/components/cascade-select/index.mjs +74 -73
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/checkbox/index.mjs +14 -6
- package/dist/components/checkbox-group/index.d.mts +4 -9
- package/dist/components/checkbox-group/index.mjs +66 -69
- package/dist/components/chip/index.d.mts +3 -1
- package/dist/components/chip/index.mjs +4 -3
- 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 +14 -6
- package/dist/components/collapsible/index.d.mts +15 -1
- package/dist/components/collapsible/index.mjs +40 -3
- package/dist/components/color-picker/index.d.mts +13 -2
- package/dist/components/color-picker/index.mjs +96 -9
- package/dist/components/combobox/index.d.mts +24 -1
- package/dist/components/combobox/index.mjs +130 -9
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +14 -2
- package/dist/components/comment/index.d.mts +3 -1
- package/dist/components/comment/index.mjs +4 -3
- package/dist/components/config-provider/index.d.mts +3 -1
- package/dist/components/config-provider/index.mjs +3 -2
- package/dist/components/container/index.d.mts +3 -1
- package/dist/components/container/index.mjs +4 -3
- package/dist/components/data-view/index.d.mts +3 -1
- package/dist/components/data-view/index.mjs +6 -7
- package/dist/components/date-input/index.d.mts +1 -1
- package/dist/components/date-input/index.mjs +14 -6
- package/dist/components/date-picker/index.d.mts +1 -1
- package/dist/components/date-picker/index.mjs +14 -6
- package/dist/components/deferred-content/index.d.mts +3 -1
- package/dist/components/deferred-content/index.mjs +4 -3
- package/dist/components/descriptions/index.d.mts +7 -0
- package/dist/components/descriptions/index.mjs +22 -3
- package/dist/components/dialog/index.d.mts +17 -1
- package/dist/components/dialog/index.mjs +85 -3
- package/dist/components/dock/index.mjs +1 -1
- 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 +84 -3
- package/dist/components/dynamic-input/index.d.mts +3 -1
- package/dist/components/dynamic-input/index.mjs +11 -7
- package/dist/components/editable/index.d.mts +1 -1
- package/dist/components/editable/index.mjs +14 -6
- package/dist/components/ellipsis/index.d.mts +3 -1
- package/dist/components/ellipsis/index.mjs +4 -3
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +5 -1
- package/dist/components/field/index.mjs +14 -2
- package/dist/components/fieldset/index.d.mts +5 -1
- package/dist/components/fieldset/index.mjs +14 -2
- package/dist/components/file-upload/index.d.mts +1 -7
- package/dist/components/file-upload/index.mjs +14 -6
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +5 -1
- package/dist/components/floating-panel/index.mjs +14 -2
- 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 +11 -5
- 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 +4 -3
- package/dist/components/highlight/index.d.mts +3 -1
- package/dist/components/highlight/index.mjs +3 -2
- package/dist/components/hover-card/index.d.mts +19 -1
- package/dist/components/hover-card/index.mjs +92 -3
- package/dist/components/icon/index.d.mts +8 -7
- package/dist/components/icon/index.mjs +5 -4
- package/dist/components/image/index.d.mts +4 -2
- package/dist/components/image/index.mjs +35 -34
- package/dist/components/image-cropper/index.d.mts +5 -1
- package/dist/components/image-cropper/index.mjs +14 -2
- package/dist/components/image-viewer/index.d.mts +2 -23
- package/dist/components/image-viewer/index.mjs +3 -159
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +5 -4
- package/dist/components/json-tree-view/index.mjs +16 -19
- package/dist/components/kbd/index.d.mts +3 -1
- package/dist/components/kbd/index.mjs +4 -3
- package/dist/components/layout/index.mjs +1 -1
- package/dist/components/link/index.d.mts +3 -1
- package/dist/components/link/index.mjs +4 -3
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +1 -1
- package/dist/components/listbox/index.mjs +14 -6
- package/dist/components/marquee/index.d.mts +5 -1
- package/dist/components/marquee/index.mjs +14 -2
- package/dist/components/masonry/index.d.mts +3 -1
- package/dist/components/masonry/index.mjs +4 -3
- 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 +63 -6
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +31 -10
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +5 -1
- package/dist/components/navigation-menu/index.mjs +14 -2
- package/dist/components/number-input/index.d.mts +1 -1
- package/dist/components/number-input/index.mjs +14 -6
- package/dist/components/order-list/index.d.mts +3 -1
- package/dist/components/order-list/index.mjs +68 -64
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/index.mjs +14 -6
- package/dist/components/password-input/index.d.mts +1 -1
- package/dist/components/password-input/index.mjs +14 -6
- package/dist/components/pin-input/index.d.mts +1 -1
- package/dist/components/pin-input/index.mjs +14 -6
- package/dist/components/popconfirm/index.d.mts +3 -1
- package/dist/components/popconfirm/index.mjs +17 -9
- package/dist/components/popover/index.d.mts +19 -1
- package/dist/components/popover/index.mjs +92 -3
- 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 +14 -6
- package/dist/components/progress-group/index.d.mts +3 -1
- package/dist/components/progress-group/index.mjs +5 -4
- package/dist/components/qr-code/index.d.mts +5 -1
- package/dist/components/qr-code/index.mjs +14 -2
- package/dist/components/radio-group/index.d.mts +1 -1
- package/dist/components/radio-group/index.mjs +14 -6
- package/dist/components/rating-group/index.d.mts +2 -2
- package/dist/components/rating-group/index.mjs +14 -6
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +6 -4
- package/dist/components/scroll-area/index.d.mts +5 -1
- package/dist/components/scroll-area/index.mjs +14 -2
- package/dist/components/segment-group/index.d.mts +1 -1
- package/dist/components/segment-group/index.mjs +12 -7
- 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 +4 -3
- package/dist/components/signature-pad/index.d.mts +5 -1
- package/dist/components/signature-pad/index.mjs +14 -2
- package/dist/components/skeleton/index.d.mts +3 -1
- package/dist/components/skeleton/index.mjs +4 -3
- package/dist/components/slider/index.d.mts +1 -1
- package/dist/components/slider/index.mjs +14 -6
- package/dist/components/spinner/index.d.mts +3 -1
- package/dist/components/spinner/index.mjs +4 -3
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +15 -4
- package/dist/components/splitter/index.d.mts +5 -1
- package/dist/components/splitter/index.mjs +14 -2
- package/dist/components/spotlight/index.d.mts +3 -1
- package/dist/components/spotlight/index.mjs +4 -3
- package/dist/components/stack/index.d.mts +3 -1
- package/dist/components/stack/index.mjs +7 -6
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +20 -3
- package/dist/components/steps/index.mjs +67 -8
- package/dist/components/swap/index.d.mts +5 -1
- package/dist/components/swap/index.mjs +14 -2
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/index.mjs +14 -6
- package/dist/components/table/index.d.mts +3 -1
- package/dist/components/table/index.mjs +191 -153
- package/dist/components/tabs/index.d.mts +20 -2
- package/dist/components/tabs/index.mjs +60 -4
- package/dist/components/tags-input/index.d.mts +1 -1
- package/dist/components/tags-input/index.mjs +14 -6
- package/dist/components/terminal/index.d.mts +3 -1
- package/dist/components/terminal/index.mjs +4 -3
- package/dist/components/textarea/index.d.mts +3 -1
- package/dist/components/textarea/index.mjs +4 -3
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +5 -1
- package/dist/components/timer/index.mjs +14 -2
- package/dist/components/toast/index.d.mts +8 -2
- package/dist/components/toast/index.mjs +15 -3
- package/dist/components/toc/index.d.mts +11 -2
- package/dist/components/toc/index.mjs +1 -1
- package/dist/components/toggle/index.d.mts +5 -1
- package/dist/components/toggle/index.mjs +14 -2
- package/dist/components/toggle-group/index.d.mts +1 -1
- package/dist/components/toggle-group/index.mjs +14 -6
- package/dist/components/toolbar/index.d.mts +3 -1
- package/dist/components/toolbar/index.mjs +4 -3
- package/dist/components/tooltip/index.d.mts +16 -1
- package/dist/components/tooltip/index.mjs +56 -3
- package/dist/components/tour/index.d.mts +16 -3
- package/dist/components/tour/index.mjs +75 -10
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +55 -51
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +38 -31
- package/dist/components/tree-view/index.d.mts +1 -8
- package/dist/components/tree-view/index.mjs +17 -22
- package/dist/components/typography/index.mjs +1 -1
- package/dist/components/user/index.d.mts +3 -1
- package/dist/components/user/index.mjs +9 -3
- package/dist/components/virtual-list/index.d.mts +3 -1
- package/dist/components/virtual-list/index.mjs +14 -10
- package/dist/components/watermark/index.d.mts +3 -1
- package/dist/components/watermark/index.mjs +5 -4
- 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-19s75Hz_.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-IfofF-SW.d.mts → index-DVc1L_zt.d.mts} +191 -112
- package/dist/index-DhripUtf.d.mts +39 -0
- package/dist/{index-YPUiqD3n.d.mts → index-ID48LCMU.d.mts} +28 -2
- package/dist/index-wW28BYf1.d.mts +124 -0
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +13 -12
- package/dist/{input-DoFQ7RXh.mjs → input-BL3N3L8g.mjs} +4 -3
- package/dist/media-player-yF7KVUxM.mjs +796 -0
- package/dist/{mentions-f5Js_2W7.mjs → mentions-DKUG7eHt.mjs} +68 -52
- package/dist/select-DI7pFspF.mjs +292 -0
- package/dist/{toc-CZmYEaQR.mjs → toc-CqvGOp34.mjs} +13 -3
- package/package.json +10 -82
- package/dist/chevron-D5RzcayK.mjs +0 -9
- package/dist/index-DdsnfV4f.d.mts +0 -16
- package/dist/select-CX6OuQlU.mjs +0 -123
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
2
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
-
import {
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
+
import { For, splitProps } from "solid-js";
|
|
4
6
|
import { Tabs as Tabs$1 } from "@ark-ui/solid/tabs";
|
|
5
7
|
//#region src/components/tabs/index.tsx
|
|
6
8
|
function TabsRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size", "variant"]);
|
|
10
|
+
const id = useElementId("tabs", () => rest.id);
|
|
8
11
|
return createComponent(Tabs$1.Root, mergeProps(rest, {
|
|
12
|
+
get id() {
|
|
13
|
+
return id();
|
|
14
|
+
},
|
|
9
15
|
get "data-size"() {
|
|
10
16
|
return own.size ?? "md";
|
|
11
17
|
},
|
|
@@ -14,10 +20,60 @@ function TabsRoot(props) {
|
|
|
14
20
|
}
|
|
15
21
|
}));
|
|
16
22
|
}
|
|
17
|
-
|
|
23
|
+
function TabsFacade(props) {
|
|
24
|
+
injectComponentStyle("tabs");
|
|
25
|
+
return createComponent(TabsRoot, mergeProps({
|
|
26
|
+
get size() {
|
|
27
|
+
return props.size ?? "md";
|
|
28
|
+
},
|
|
29
|
+
get variant() {
|
|
30
|
+
return props.variant ?? "line";
|
|
31
|
+
},
|
|
32
|
+
get orientation() {
|
|
33
|
+
return props.orientation ?? "horizontal";
|
|
34
|
+
},
|
|
35
|
+
get defaultValue() {
|
|
36
|
+
return props.defaultValue;
|
|
37
|
+
}
|
|
38
|
+
}, () => {
|
|
39
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
40
|
+
}, {
|
|
41
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
42
|
+
get children() {
|
|
43
|
+
return [createComponent(Tabs$1.List, { get children() {
|
|
44
|
+
return [createComponent(For, {
|
|
45
|
+
get each() {
|
|
46
|
+
return props.items;
|
|
47
|
+
},
|
|
48
|
+
children: (item) => createComponent(Tabs$1.Trigger, {
|
|
49
|
+
get value() {
|
|
50
|
+
return item.value;
|
|
51
|
+
},
|
|
52
|
+
get children() {
|
|
53
|
+
return item.label;
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}), createComponent(Tabs$1.Indicator, {})];
|
|
57
|
+
} }), createComponent(For, {
|
|
58
|
+
get each() {
|
|
59
|
+
return props.items;
|
|
60
|
+
},
|
|
61
|
+
children: (item) => createComponent(Tabs$1.Content, {
|
|
62
|
+
get value() {
|
|
63
|
+
return item.value;
|
|
64
|
+
},
|
|
65
|
+
get children() {
|
|
66
|
+
return item.content;
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
})];
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
const Tabs = defineFamily(TabsFacade, {
|
|
18
74
|
...Tabs$1,
|
|
19
75
|
Root: TabsRoot
|
|
20
|
-
};
|
|
76
|
+
});
|
|
21
77
|
injectComponentStyle("tabs");
|
|
22
78
|
//#endregion
|
|
23
79
|
export { Tabs };
|
|
@@ -10,7 +10,7 @@ type TagsInputOwnProps = {
|
|
|
10
10
|
size?: "sm" | "md" | "lg";
|
|
11
11
|
};
|
|
12
12
|
declare function TagsInputRoot(props: TagsInputRootProps & TagsInputOwnProps): import("solid-js").JSX.Element;
|
|
13
|
-
export declare const TagsInput: Omit<typeof TagsInput$1, "Root"> & {
|
|
13
|
+
export declare const TagsInput: typeof TagsInputRoot & Omit<typeof TagsInput$1, "Root"> & {
|
|
14
14
|
Root: typeof TagsInputRoot;
|
|
15
15
|
};
|
|
16
16
|
//#endregion
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
2
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
4
6
|
import { TagsInput as TagsInput$1 } from "@ark-ui/solid/tags-input";
|
|
5
7
|
//#region src/components/tags-input/index.tsx
|
|
6
8
|
function TagsInputRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const id = useElementId("tags-input", () => rest.id);
|
|
11
|
+
return createComponent(TagsInput$1.Root, mergeProps(rest, {
|
|
12
|
+
get id() {
|
|
13
|
+
return id();
|
|
14
|
+
},
|
|
15
|
+
get "data-size"() {
|
|
16
|
+
return own.size ?? "md";
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
11
19
|
}
|
|
12
|
-
const TagsInput = {
|
|
20
|
+
const TagsInput = defineFamily(TagsInputRoot, {
|
|
13
21
|
...TagsInput$1,
|
|
14
22
|
Root: TagsInputRoot
|
|
15
|
-
};
|
|
23
|
+
});
|
|
16
24
|
injectComponentStyle("tags-input");
|
|
17
25
|
//#endregion
|
|
18
26
|
export { TagsInput };
|
|
@@ -13,5 +13,7 @@ export interface TerminalProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>,
|
|
|
13
13
|
* component owns only the reading and the caret — each entered line
|
|
14
14
|
* leaves as an event, and the caller answers through the lines prop,
|
|
15
15
|
* so history stays theirs to shape. */
|
|
16
|
-
export declare
|
|
16
|
+
export declare const Terminal: ((props: TerminalProps) => JSX.Element) & {
|
|
17
|
+
Root: (props: TerminalProps) => JSX.Element;
|
|
18
|
+
};
|
|
17
19
|
//#endregion
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
3
|
import { createComponent, delegateEvents, effect, insert, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { For, createEffect, createSignal, onMount, splitProps } from "solid-js";
|
|
5
6
|
//#region src/components/terminal/index.tsx
|
|
6
7
|
var _tmpl$ = /* @__PURE__ */ template(`<div><div data-scope=terminal data-part=scroll></div><div data-scope=terminal data-part=entry><span data-scope=terminal data-part=sigil aria-hidden=true></span><input data-scope=terminal data-part=input autocomplete=off>`);
|
|
@@ -9,7 +10,7 @@ var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=terminal data-part=line>
|
|
|
9
10
|
* component owns only the reading and the caret — each entered line
|
|
10
11
|
* leaves as an event, and the caller answers through the lines prop,
|
|
11
12
|
* so history stays theirs to shape. */
|
|
12
|
-
function Terminal(props) {
|
|
13
|
+
const Terminal = withSelfRoot(function Terminal(props) {
|
|
13
14
|
const messages = useComponentMessages();
|
|
14
15
|
injectComponentStyle("terminal");
|
|
15
16
|
const [own, rest] = splitProps(props, [
|
|
@@ -80,7 +81,7 @@ function Terminal(props) {
|
|
|
80
81
|
a !== _p$?.a && setAttribute(_el$5, "aria-label", a);
|
|
81
82
|
});
|
|
82
83
|
return _el$;
|
|
83
|
-
}
|
|
84
|
+
});
|
|
84
85
|
delegateEvents(["input", "keydown"]);
|
|
85
86
|
//#endregion
|
|
86
87
|
export { Terminal };
|
|
@@ -10,5 +10,7 @@ export interface TextareaProps extends JSX.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
10
10
|
* itself from the `invalid` prop; inside a `Field.Root` it consumes the
|
|
11
11
|
* field context, picking up the label id, the described-by wiring and
|
|
12
12
|
* the invalid state for free. Disabled rides the native attribute. */
|
|
13
|
-
export declare
|
|
13
|
+
export declare const Textarea: ((props: TextareaProps) => JSX.Element) & {
|
|
14
|
+
Root: (props: TextareaProps) => JSX.Element;
|
|
15
|
+
};
|
|
14
16
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { mergeProps as mergeProps$1, splitProps } from "solid-js";
|
|
4
5
|
import { useFieldContext } from "@ark-ui/solid/field";
|
|
5
6
|
//#region src/components/textarea/index.tsx
|
|
@@ -9,7 +10,7 @@ var _tmpl$ = /* @__PURE__ */ template(`<textarea>`);
|
|
|
9
10
|
* itself from the `invalid` prop; inside a `Field.Root` it consumes the
|
|
10
11
|
* field context, picking up the label id, the described-by wiring and
|
|
11
12
|
* the invalid state for free. Disabled rides the native attribute. */
|
|
12
|
-
function Textarea(props) {
|
|
13
|
+
const Textarea = withSelfRoot(function Textarea(props) {
|
|
13
14
|
injectComponentStyle("textarea");
|
|
14
15
|
const field = useFieldContext();
|
|
15
16
|
const [own, rest] = splitProps(props, [
|
|
@@ -32,6 +33,6 @@ function Textarea(props) {
|
|
|
32
33
|
});
|
|
33
34
|
}, false);
|
|
34
35
|
return _el$;
|
|
35
|
-
}
|
|
36
|
+
});
|
|
36
37
|
//#endregion
|
|
37
38
|
export { Textarea };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
2
1
|
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/timeline/index.tsx
|
|
5
5
|
var _tmpl$ = /* @__PURE__ */ template(`<ol>`);
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Timer as Timer$1 } from "@ark-ui/solid/timer";
|
|
2
3
|
//#region src/components/timer/index.d.ts
|
|
3
4
|
/** Ark's Timer, dressed in the paper-and-ink system: monospaced digits
|
|
4
5
|
* that never jitter, quiet action triggers on the control recipe. The API
|
|
5
6
|
* is Ark's own — Root, Area, Control, Item, Separator, ActionTrigger,
|
|
6
7
|
* Context. Unit labels are plain content, not a machine part. */
|
|
7
|
-
|
|
8
|
+
declare function TimerRoot(props: ComponentProps<typeof Timer$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
+
export declare const Timer: typeof TimerRoot & Omit<typeof Timer$1, "Root"> & {
|
|
10
|
+
Root: typeof TimerRoot;
|
|
11
|
+
};
|
|
8
12
|
//#endregion
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Timer as Timer$1 } from "@ark-ui/solid/timer";
|
|
3
6
|
//#region src/components/timer/index.ts
|
|
4
7
|
/** Ark's Timer, dressed in the paper-and-ink system: monospaced digits
|
|
5
8
|
* that never jitter, quiet action triggers on the control recipe. The API
|
|
6
9
|
* is Ark's own — Root, Area, Control, Item, Separator, ActionTrigger,
|
|
7
10
|
* Context. Unit labels are plain content, not a machine part. */
|
|
8
|
-
|
|
11
|
+
function TimerRoot(props) {
|
|
12
|
+
const id = useElementId("timer", () => props.id);
|
|
13
|
+
return createComponent(Timer$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return id();
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
const Timer = defineFamily(TimerRoot, {
|
|
18
|
+
...Timer$1,
|
|
19
|
+
Root: TimerRoot
|
|
20
|
+
});
|
|
9
21
|
injectComponentStyle("timer");
|
|
10
22
|
//#endregion
|
|
11
23
|
export { Timer };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { CreateToasterReturn, Toast as Toast$1, createToaster } from "@ark-ui/solid/toast";
|
|
2
3
|
//#region src/components/toast/index.d.ts
|
|
3
4
|
/** Ark's Toast, dressed in the paper-and-ink system: each notice rides the
|
|
@@ -5,7 +6,12 @@ import { CreateToasterReturn, Toast as Toast$1, createToaster } from "@ark-ui/so
|
|
|
5
6
|
* translate variables carry the slide. The API is Ark's own — Toaster,
|
|
6
7
|
* Root, Title, Description, ActionTrigger, CloseTrigger, plus
|
|
7
8
|
* createToaster. */
|
|
8
|
-
|
|
9
|
-
export declare const
|
|
9
|
+
declare function ToastRoot(props: ComponentProps<typeof Toast$1.Root>): import("solid-js").JSX.Element;
|
|
10
|
+
export declare const Toast: typeof ToastRoot & Omit<typeof Toast$1, "Root"> & {
|
|
11
|
+
Root: typeof ToastRoot;
|
|
12
|
+
};
|
|
13
|
+
export declare const Toaster: ((props: import("@ark-ui/solid/toast").ToasterProps) => import("solid-js").JSX.Element) & {
|
|
14
|
+
Root: (props: import("@ark-ui/solid/toast").ToasterProps) => import("solid-js").JSX.Element;
|
|
15
|
+
};
|
|
10
16
|
//#endregion
|
|
11
17
|
export { type CreateToasterReturn, createToaster };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot, t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Toast as Toast$1, Toaster as Toaster$1, createToaster } from "@ark-ui/solid/toast";
|
|
3
6
|
//#region src/components/toast/index.ts
|
|
4
7
|
/** Ark's Toast, dressed in the paper-and-ink system: each notice rides the
|
|
@@ -6,8 +9,17 @@ import { Toast as Toast$1, Toaster as Toaster$1, createToaster } from "@ark-ui/s
|
|
|
6
9
|
* translate variables carry the slide. The API is Ark's own — Toaster,
|
|
7
10
|
* Root, Title, Description, ActionTrigger, CloseTrigger, plus
|
|
8
11
|
* createToaster. */
|
|
9
|
-
|
|
10
|
-
const
|
|
12
|
+
function ToastRoot(props) {
|
|
13
|
+
const id = useElementId("toast", () => props.id);
|
|
14
|
+
return createComponent(Toast$1.Root, mergeProps(props, { get id() {
|
|
15
|
+
return id();
|
|
16
|
+
} }));
|
|
17
|
+
}
|
|
18
|
+
const Toast = defineFamily(ToastRoot, {
|
|
19
|
+
...Toast$1,
|
|
20
|
+
Root: ToastRoot
|
|
21
|
+
});
|
|
22
|
+
const Toaster = withSelfRoot(Toaster$1);
|
|
11
23
|
injectComponentStyle("toast");
|
|
12
24
|
//#endregion
|
|
13
25
|
export { Toast, Toaster, createToaster };
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
2
|
+
import { Toc as Toc$1 } from "@ark-ui/solid/toc";
|
|
3
|
+
//#region src/components/toc/index.d.ts
|
|
4
|
+
/** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
|
|
5
|
+
* beside the scroll, one stroke of primary ink marking where the reader
|
|
6
|
+
* stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
|
|
7
|
+
declare function TocRoot(props: ComponentProps<typeof Toc$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
export declare const Toc: typeof TocRoot & Omit<typeof Toc$1, "Root"> & {
|
|
9
|
+
Root: typeof TocRoot;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Toc } from "../../toc-
|
|
1
|
+
import { t as Toc } from "../../toc-CqvGOp34.mjs";
|
|
2
2
|
export { Toc };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Toggle as Toggle$1 } from "@ark-ui/solid/toggle";
|
|
2
3
|
//#region src/components/toggle/index.d.ts
|
|
3
4
|
/** Ark's Toggle, dressed in the paper-and-ink system: a standalone seal that
|
|
4
5
|
* settles into the flat ink fill while pressed on. The API is Ark's own —
|
|
5
6
|
* Root, Indicator. */
|
|
6
|
-
|
|
7
|
+
declare function ToggleRoot(props: ComponentProps<typeof Toggle$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
export declare const Toggle: typeof ToggleRoot & Omit<typeof Toggle$1, "Root"> & {
|
|
9
|
+
Root: typeof ToggleRoot;
|
|
10
|
+
};
|
|
7
11
|
//#endregion
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Toggle as Toggle$1 } from "@ark-ui/solid/toggle";
|
|
3
6
|
//#region src/components/toggle/index.ts
|
|
4
7
|
/** Ark's Toggle, dressed in the paper-and-ink system: a standalone seal that
|
|
5
8
|
* settles into the flat ink fill while pressed on. The API is Ark's own —
|
|
6
9
|
* Root, Indicator. */
|
|
7
|
-
|
|
10
|
+
function ToggleRoot(props) {
|
|
11
|
+
const id = useElementId("toggle", () => props.id);
|
|
12
|
+
return createComponent(Toggle$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return id();
|
|
14
|
+
} }));
|
|
15
|
+
}
|
|
16
|
+
const Toggle = defineFamily(ToggleRoot, {
|
|
17
|
+
...Toggle$1,
|
|
18
|
+
Root: ToggleRoot
|
|
19
|
+
});
|
|
8
20
|
injectComponentStyle("toggle");
|
|
9
21
|
//#endregion
|
|
10
22
|
export { Toggle };
|
|
@@ -8,7 +8,7 @@ type ToggleGroupOwnProps = {
|
|
|
8
8
|
size?: "sm" | "md" | "lg";
|
|
9
9
|
};
|
|
10
10
|
declare function ToggleGroupRoot(props: ToggleGroupRootProps & ToggleGroupOwnProps): import("solid-js").JSX.Element;
|
|
11
|
-
export declare const ToggleGroup: Omit<typeof ToggleGroup$1, "Root"> & {
|
|
11
|
+
export declare const ToggleGroup: typeof ToggleGroupRoot & Omit<typeof ToggleGroup$1, "Root"> & {
|
|
12
12
|
Root: typeof ToggleGroupRoot;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
2
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
4
6
|
import { ToggleGroup as ToggleGroup$1 } from "@ark-ui/solid/toggle-group";
|
|
5
7
|
//#region src/components/toggle-group/index.tsx
|
|
6
8
|
function ToggleGroupRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const id = useElementId("toggle-group", () => rest.id);
|
|
11
|
+
return createComponent(ToggleGroup$1.Root, mergeProps(rest, {
|
|
12
|
+
get id() {
|
|
13
|
+
return id();
|
|
14
|
+
},
|
|
15
|
+
get "data-size"() {
|
|
16
|
+
return own.size ?? "md";
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
11
19
|
}
|
|
12
|
-
const ToggleGroup = {
|
|
20
|
+
const ToggleGroup = defineFamily(ToggleGroupRoot, {
|
|
13
21
|
...ToggleGroup$1,
|
|
14
22
|
Root: ToggleGroupRoot
|
|
15
|
-
};
|
|
23
|
+
});
|
|
16
24
|
injectComponentStyle("toggle-group");
|
|
17
25
|
//#endregion
|
|
18
26
|
export { ToggleGroup };
|
|
@@ -13,5 +13,7 @@ export interface ToolbarProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
13
13
|
/** A workbench rail: the start tools at the leading edge, the end tools
|
|
14
14
|
* at the trailing, the rail itself carrying the toolbar role so
|
|
15
15
|
* assistive tech reads it as one group of commands. */
|
|
16
|
-
export declare
|
|
16
|
+
export declare const Toolbar: ((props: ToolbarProps) => JSX.Element) & {
|
|
17
|
+
Root: (props: ToolbarProps) => JSX.Element;
|
|
18
|
+
};
|
|
17
19
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { Show, splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/toolbar/index.tsx
|
|
5
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=toolbar data-part=group data-edge=end>`);
|
|
@@ -7,7 +8,7 @@ var _tmpl$2 = /* @__PURE__ */ template(`<div><div data-scope=toolbar data-part=g
|
|
|
7
8
|
/** A workbench rail: the start tools at the leading edge, the end tools
|
|
8
9
|
* at the trailing, the rail itself carrying the toolbar role so
|
|
9
10
|
* assistive tech reads it as one group of commands. */
|
|
10
|
-
function Toolbar(props) {
|
|
11
|
+
const Toolbar = withSelfRoot(function Toolbar(props) {
|
|
11
12
|
injectComponentStyle("toolbar");
|
|
12
13
|
const [own, rest] = splitProps(props, [
|
|
13
14
|
"label",
|
|
@@ -41,6 +42,6 @@ function Toolbar(props) {
|
|
|
41
42
|
}
|
|
42
43
|
}), null);
|
|
43
44
|
return _el$;
|
|
44
|
-
}
|
|
45
|
+
});
|
|
45
46
|
//#endregion
|
|
46
47
|
export { Toolbar };
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Tooltip as Tooltip$1 } from "@ark-ui/solid/tooltip";
|
|
2
3
|
//#region src/components/tooltip/index.d.ts
|
|
3
4
|
/** Ark's Tooltip, dressed in the paper-and-ink system: the smallest
|
|
4
5
|
* vessel — a tight chip of ink that dissolves in over its anchor. The
|
|
5
6
|
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
6
|
-
|
|
7
|
+
declare function TooltipRoot(props: ComponentProps<typeof Tooltip$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
type TooltipPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
9
|
+
export interface TooltipFacadeProps {
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
trigger: string | Element;
|
|
13
|
+
content: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
placement?: TooltipPlacement;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
declare function TooltipFacade(props: TooltipFacadeProps): import("solid-js").JSX.Element;
|
|
19
|
+
export declare const Tooltip: typeof TooltipFacade & Omit<typeof Tooltip$1, "Root"> & {
|
|
20
|
+
Root: typeof TooltipRoot;
|
|
21
|
+
};
|
|
7
22
|
//#endregion
|
|
@@ -1,10 +1,63 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { n as withElementProps, t as isElement } from "../../element-dGIhOTJ6.mjs";
|
|
4
|
+
import { createComponent, memo, mergeProps } from "@solidjs/web";
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
2
7
|
import { Tooltip as Tooltip$1 } from "@ark-ui/solid/tooltip";
|
|
3
|
-
//#region src/components/tooltip/index.
|
|
8
|
+
//#region src/components/tooltip/index.tsx
|
|
4
9
|
/** Ark's Tooltip, dressed in the paper-and-ink system: the smallest
|
|
5
10
|
* vessel — a tight chip of ink that dissolves in over its anchor. The
|
|
6
11
|
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
7
|
-
|
|
12
|
+
function TooltipRoot(props) {
|
|
13
|
+
const id = useElementId("tooltip", () => props.id);
|
|
14
|
+
return createComponent$1(Tooltip$1.Root, mergeProps$1(props, { get id() {
|
|
15
|
+
return id();
|
|
16
|
+
} }));
|
|
17
|
+
}
|
|
18
|
+
function TooltipFacade(props) {
|
|
19
|
+
injectComponentStyle("tooltip");
|
|
20
|
+
const triggerElement = () => isElement(props.trigger) ? props.trigger : void 0;
|
|
21
|
+
const triggerChildren = () => triggerElement() ? void 0 : props.trigger;
|
|
22
|
+
const triggerAsChild = (propsFn) => {
|
|
23
|
+
const trigger = triggerElement();
|
|
24
|
+
return trigger ? withElementProps(trigger, propsFn()) : props.trigger;
|
|
25
|
+
};
|
|
26
|
+
return createComponent(TooltipRoot, mergeProps(() => {
|
|
27
|
+
return props.open === void 0 ? {} : { open: props.open };
|
|
28
|
+
}, () => {
|
|
29
|
+
return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
|
|
30
|
+
}, () => {
|
|
31
|
+
return props.placement === void 0 ? {} : { positioning: { placement: props.placement } };
|
|
32
|
+
}, {
|
|
33
|
+
onOpenChange: (details) => props.onOpenChange?.(details.open),
|
|
34
|
+
get children() {
|
|
35
|
+
return [createComponent(Tooltip$1.Trigger, {
|
|
36
|
+
get disabled() {
|
|
37
|
+
return props.disabled;
|
|
38
|
+
},
|
|
39
|
+
get asChild() {
|
|
40
|
+
return triggerElement() ? triggerAsChild : void 0;
|
|
41
|
+
},
|
|
42
|
+
get children() {
|
|
43
|
+
return triggerChildren();
|
|
44
|
+
}
|
|
45
|
+
}), createComponent(Tooltip$1.Positioner, { get children() {
|
|
46
|
+
return createComponent(Tooltip$1.Content, { get children() {
|
|
47
|
+
return [createComponent(Tooltip$1.Arrow, { get children() {
|
|
48
|
+
return createComponent(Tooltip$1.ArrowTip, {});
|
|
49
|
+
} }), memo(() => {
|
|
50
|
+
return props.content;
|
|
51
|
+
})];
|
|
52
|
+
} });
|
|
53
|
+
} })];
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
const Tooltip = defineFamily(TooltipFacade, {
|
|
58
|
+
...Tooltip$1,
|
|
59
|
+
Root: TooltipRoot
|
|
60
|
+
});
|
|
8
61
|
injectComponentStyle("tooltip");
|
|
9
62
|
//#endregion
|
|
10
63
|
export { Tooltip };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
import { Tour as Tour$1, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, UseTourProps, UseTourReturn } from "@ark-ui/solid/tour";
|
|
2
3
|
//#region src/components/tour/index.d.ts
|
|
3
4
|
/** Ark's Tour, dressed in the paper-and-ink system: a dimmed page where
|
|
4
5
|
* the spotlight alone keeps the focus halo, and the anchored card rides
|
|
@@ -6,6 +7,18 @@ import { Tour as Tour$1, TourInteractOutsideEvent, TourPointerDownOutsideEvent,
|
|
|
6
7
|
* Spotlight, Positioner, Content, Arrow, ArrowTip, Title, Description,
|
|
7
8
|
* ProgressText, Control, Actions, ActionTrigger, CloseTrigger, plus
|
|
8
9
|
* useTour. */
|
|
9
|
-
export
|
|
10
|
+
export interface TourFacadeProps {
|
|
11
|
+
tour: UseTourReturn;
|
|
12
|
+
trigger?: string;
|
|
13
|
+
/** Replaces the standard card body when supplied. */
|
|
14
|
+
content?: JSX.Element;
|
|
15
|
+
children?: JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
declare function TourFacade(props: TourFacadeProps): JSX.Element;
|
|
18
|
+
export declare const Tour: typeof TourFacade & Omit<typeof Tour$1, "Root"> & {
|
|
19
|
+
Root: typeof Tour$1.Root;
|
|
20
|
+
};
|
|
21
|
+
/** Tour machines are created by useTour, so the stable id belongs there. */
|
|
22
|
+
export declare function useTour(props?: UseTourProps): UseTourReturn;
|
|
10
23
|
//#endregion
|
|
11
|
-
export {
|
|
24
|
+
export type { TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails };
|
|
@@ -1,13 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { Button } from "../button/index.mjs";
|
|
4
|
+
import { createComponent, memo } from "@solidjs/web";
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { Show, mergeProps as mergeProps$1 } from "solid-js";
|
|
7
|
+
import { Tour as Tour$1, useTour as useTour$1 } from "@ark-ui/solid/tour";
|
|
8
|
+
//#region src/components/tour/index.tsx
|
|
9
|
+
function TourFacade(props) {
|
|
10
|
+
injectComponentStyle("tour");
|
|
11
|
+
return createComponent(Tour$1.Root, {
|
|
12
|
+
get tour() {
|
|
13
|
+
return props.tour;
|
|
14
|
+
},
|
|
15
|
+
get children() {
|
|
16
|
+
return [
|
|
17
|
+
createComponent(Button, {
|
|
18
|
+
size: "sm",
|
|
19
|
+
onClick: () => props.tour().start(),
|
|
20
|
+
get children() {
|
|
21
|
+
return props.trigger ?? "Start tour";
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
memo(() => {
|
|
25
|
+
return props.children;
|
|
26
|
+
}),
|
|
27
|
+
createComponent(Tour$1.Backdrop, {}),
|
|
28
|
+
createComponent(Tour$1.Spotlight, {}),
|
|
29
|
+
createComponent(Tour$1.Positioner, { get children() {
|
|
30
|
+
return createComponent(Tour$1.Content, { get children() {
|
|
31
|
+
return createComponent(Show, {
|
|
32
|
+
get when() {
|
|
33
|
+
return props.content;
|
|
34
|
+
},
|
|
35
|
+
get fallback() {
|
|
36
|
+
return createComponent(TourCardBody, {});
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
return props.content;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
} });
|
|
43
|
+
} })
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function TourCardBody() {
|
|
49
|
+
return [
|
|
50
|
+
createComponent(Tour$1.ProgressText, {}),
|
|
51
|
+
createComponent(Tour$1.Title, {}),
|
|
52
|
+
createComponent(Tour$1.Description, {}),
|
|
53
|
+
createComponent(Tour$1.Control, { get children() {
|
|
54
|
+
return createComponent(Tour$1.Actions, { children: (actions) => memo(() => {
|
|
55
|
+
return actions().map((action) => createComponent(Tour$1.ActionTrigger, {
|
|
56
|
+
action,
|
|
57
|
+
get children() {
|
|
58
|
+
return action.label;
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}) });
|
|
62
|
+
} })
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
const Tour = defineFamily(TourFacade, {
|
|
66
|
+
...Tour$1,
|
|
67
|
+
Root: Tour$1.Root
|
|
68
|
+
});
|
|
69
|
+
/** Tour machines are created by useTour, so the stable id belongs there. */
|
|
70
|
+
function useTour(props = {}) {
|
|
71
|
+
const id = useElementId("tour", () => props.id);
|
|
72
|
+
return useTour$1(mergeProps$1(props, { get id() {
|
|
73
|
+
return id();
|
|
74
|
+
} }));
|
|
75
|
+
}
|
|
11
76
|
injectComponentStyle("tour");
|
|
12
77
|
//#endregion
|
|
13
78
|
export { Tour, useTour };
|