@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,19 +1,24 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
1
3
|
import { Button } from "../button/index.mjs";
|
|
4
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
5
|
import { Field } from "../field/index.mjs";
|
|
3
6
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
7
|
import { claimElement, createComponent, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
5
8
|
import { Show, splitProps } from "solid-js";
|
|
6
9
|
//#region src/components/ai-prompt-input/index.tsx
|
|
7
|
-
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 16 16"width=14 height=14 aria-hidden=true
|
|
8
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
9
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=ai
|
|
10
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<div data-scope=ai data-part=prompt-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 16 16"width=14 height=14 aria-hidden=true><rect x=4.5 y=4.5 width=7 height=7 fill=currentColor>`);
|
|
11
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=ai>`);
|
|
12
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div data-scope=ai data-part=prompt-footer><div data-scope=ai data-part=prompt-end><!><!>`);
|
|
13
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<form><div data-scope=ai data-part=prompt-main><!><!><!></div><!>`);
|
|
14
|
+
function arrowUpIcon() {
|
|
15
|
+
return iconNode("arrow-up", {
|
|
16
|
+
width: "14",
|
|
17
|
+
height: "14"
|
|
18
|
+
});
|
|
14
19
|
}
|
|
15
|
-
function
|
|
16
|
-
return _tmpl$
|
|
20
|
+
function stopIcon() {
|
|
21
|
+
return _tmpl$();
|
|
17
22
|
}
|
|
18
23
|
/** The prompt vessel: the shared field textarea — self-growing on the
|
|
19
24
|
* machine's autoresize — with the submit seal riding its last line.
|
|
@@ -27,7 +32,7 @@ function stopGlyph() {
|
|
|
27
32
|
* and take the text on `onSubmit`. Enter sends; Shift+Enter breaks the
|
|
28
33
|
* line. While `busy` the seal becomes a stop seal and Enter holds its
|
|
29
34
|
* breath. */
|
|
30
|
-
function PromptInput(props) {
|
|
35
|
+
const PromptInput = withSelfRoot(function PromptInput(props) {
|
|
31
36
|
injectComponentStyle("ai");
|
|
32
37
|
const [own, rest] = splitProps(props, [
|
|
33
38
|
"value",
|
|
@@ -43,6 +48,7 @@ function PromptInput(props) {
|
|
|
43
48
|
"footer",
|
|
44
49
|
"footerEnd"
|
|
45
50
|
]);
|
|
51
|
+
const messages = useComponentMessages();
|
|
46
52
|
const send = () => {
|
|
47
53
|
const value = (own.value ?? "").trim();
|
|
48
54
|
if (!value || own.disabled || own.busy) return;
|
|
@@ -50,46 +56,50 @@ function PromptInput(props) {
|
|
|
50
56
|
own.onValueChange?.("");
|
|
51
57
|
};
|
|
52
58
|
const row = (part, content) => content != null ? (() => {
|
|
53
|
-
var _el$
|
|
54
|
-
setAttribute(_el$
|
|
55
|
-
insert(_el$
|
|
56
|
-
return _el$
|
|
59
|
+
var _el$2 = _tmpl$2();
|
|
60
|
+
setAttribute(_el$2, "data-part", part);
|
|
61
|
+
insert(_el$2, content);
|
|
62
|
+
return _el$2;
|
|
57
63
|
})() : null;
|
|
58
64
|
const seal = () => own.busy ? createComponent(Button, {
|
|
59
65
|
variant: "solid",
|
|
60
66
|
size: "sm",
|
|
61
67
|
square: true,
|
|
62
68
|
type: "button",
|
|
63
|
-
"aria-label"
|
|
69
|
+
get "aria-label"() {
|
|
70
|
+
return messages().ai.stop;
|
|
71
|
+
},
|
|
64
72
|
get disabled() {
|
|
65
73
|
return own.disabled;
|
|
66
74
|
},
|
|
67
75
|
onClick: () => own.onStop?.(),
|
|
68
76
|
get children() {
|
|
69
|
-
return
|
|
77
|
+
return stopIcon();
|
|
70
78
|
}
|
|
71
79
|
}) : createComponent(Button, {
|
|
72
80
|
variant: "solid",
|
|
73
81
|
size: "sm",
|
|
74
82
|
square: true,
|
|
75
83
|
type: "submit",
|
|
76
|
-
"aria-label"
|
|
84
|
+
get "aria-label"() {
|
|
85
|
+
return messages().ai.send;
|
|
86
|
+
},
|
|
77
87
|
get disabled() {
|
|
78
88
|
return own.disabled || !(own.value ?? "").trim();
|
|
79
89
|
},
|
|
80
90
|
get children() {
|
|
81
|
-
return
|
|
91
|
+
return arrowUpIcon();
|
|
82
92
|
}
|
|
83
93
|
});
|
|
84
94
|
const trailing = () => own.footer != null ? own.trailing : own.trailing ?? seal();
|
|
85
|
-
var _el$
|
|
95
|
+
var _el$3 = _tmpl$4();
|
|
96
|
+
var _el$4 = _el$3.firstChild;
|
|
86
97
|
var _el$5 = _el$4.firstChild;
|
|
87
|
-
var _el$6 = _el$5.
|
|
98
|
+
var _el$6 = _el$5.nextSibling;
|
|
88
99
|
var _el$7 = _el$6.nextSibling;
|
|
89
|
-
var _el$
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
spread(_el$4, [rest, {
|
|
100
|
+
var _el$12 = _el$4.nextSibling;
|
|
101
|
+
claimElement(_el$3);
|
|
102
|
+
spread(_el$3, [rest, {
|
|
93
103
|
"data-scope": "ai",
|
|
94
104
|
"data-part": "prompt",
|
|
95
105
|
onSubmit: (event) => {
|
|
@@ -97,13 +107,13 @@ function PromptInput(props) {
|
|
|
97
107
|
send();
|
|
98
108
|
}
|
|
99
109
|
}], true);
|
|
100
|
-
insert(_el$
|
|
110
|
+
insert(_el$3, () => {
|
|
101
111
|
return row("prompt-header", own.header);
|
|
102
|
-
}, _el$
|
|
103
|
-
insert(_el$
|
|
112
|
+
}, _el$4);
|
|
113
|
+
insert(_el$4, () => {
|
|
104
114
|
return row("prompt-leading", own.leading);
|
|
105
|
-
}, _el$
|
|
106
|
-
insert(_el$
|
|
115
|
+
}, _el$5);
|
|
116
|
+
insert(_el$4, createComponent(Field.Root, { get children() {
|
|
107
117
|
return createComponent(Field.Textarea, {
|
|
108
118
|
autoresize: true,
|
|
109
119
|
rows: 1,
|
|
@@ -111,7 +121,10 @@ function PromptInput(props) {
|
|
|
111
121
|
return own.value ?? "";
|
|
112
122
|
},
|
|
113
123
|
get placeholder() {
|
|
114
|
-
return own.placeholder ??
|
|
124
|
+
return own.placeholder ?? messages().ai.send;
|
|
125
|
+
},
|
|
126
|
+
get "aria-label"() {
|
|
127
|
+
return messages().ai.conversation;
|
|
115
128
|
},
|
|
116
129
|
get disabled() {
|
|
117
130
|
return own.disabled;
|
|
@@ -124,30 +137,30 @@ function PromptInput(props) {
|
|
|
124
137
|
}
|
|
125
138
|
}
|
|
126
139
|
});
|
|
127
|
-
} }), _el$
|
|
128
|
-
insert(_el$
|
|
140
|
+
} }), _el$6);
|
|
141
|
+
insert(_el$4, () => {
|
|
129
142
|
return row("prompt-trailing", trailing());
|
|
130
|
-
}, _el$
|
|
131
|
-
insert(_el$
|
|
143
|
+
}, _el$7);
|
|
144
|
+
insert(_el$3, createComponent(Show, {
|
|
132
145
|
get when() {
|
|
133
146
|
return own.footer != null;
|
|
134
147
|
},
|
|
135
148
|
get children() {
|
|
136
|
-
var _el$
|
|
149
|
+
var _el$8 = _tmpl$3();
|
|
150
|
+
var _el$9 = _el$8.firstChild;
|
|
137
151
|
var _el$10 = _el$9.firstChild;
|
|
138
|
-
var _el$11 = _el$10.
|
|
139
|
-
|
|
140
|
-
insert(_el$9, () => {
|
|
152
|
+
var _el$11 = _el$10.nextSibling;
|
|
153
|
+
insert(_el$8, () => {
|
|
141
154
|
return own.footer;
|
|
142
|
-
}, _el$
|
|
143
|
-
insert(_el$
|
|
155
|
+
}, _el$9);
|
|
156
|
+
insert(_el$9, () => {
|
|
144
157
|
return own.footerEnd;
|
|
145
|
-
}, _el$
|
|
146
|
-
insert(_el$
|
|
147
|
-
return _el$
|
|
158
|
+
}, _el$10);
|
|
159
|
+
insert(_el$9, seal, _el$11);
|
|
160
|
+
return _el$8;
|
|
148
161
|
}
|
|
149
|
-
}), _el$
|
|
150
|
-
return _el$
|
|
151
|
-
}
|
|
162
|
+
}), _el$12);
|
|
163
|
+
return _el$3;
|
|
164
|
+
});
|
|
152
165
|
//#endregion
|
|
153
166
|
export { PromptInput as AiPromptInput, PromptInput };
|
|
@@ -8,6 +8,8 @@ export interface ReasoningProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
}
|
|
9
9
|
/** The model's thought, folded by the shared collapsible in its quiet
|
|
10
10
|
* register: bare ink for a trigger, the thought on one hairline. */
|
|
11
|
-
export declare
|
|
11
|
+
export declare const Reasoning: ((props: ReasoningProps) => JSX.Element) & {
|
|
12
|
+
Root: (props: ReasoningProps) => JSX.Element;
|
|
13
|
+
};
|
|
12
14
|
//#endregion
|
|
13
15
|
export { Reasoning as AiReasoning };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as chevron } from "../../chevron-BHQrYKPM.mjs";
|
|
2
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { createComponent, insert, mergeProps, template } from "@solidjs/web";
|
|
@@ -8,7 +9,7 @@ var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
|
8
9
|
var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=ai data-part=reasoning-content>`);
|
|
9
10
|
/** The model's thought, folded by the shared collapsible in its quiet
|
|
10
11
|
* register: bare ink for a trigger, the thought on one hairline. */
|
|
11
|
-
function Reasoning(props) {
|
|
12
|
+
const Reasoning = withSelfRoot(function Reasoning(props) {
|
|
12
13
|
injectComponentStyle("ai");
|
|
13
14
|
const [own, rest] = splitProps(props, ["label", "children"]);
|
|
14
15
|
return createComponent(Collapsible.Root, mergeProps(rest, {
|
|
@@ -33,6 +34,6 @@ function Reasoning(props) {
|
|
|
33
34
|
} })];
|
|
34
35
|
}
|
|
35
36
|
}));
|
|
36
|
-
}
|
|
37
|
+
});
|
|
37
38
|
//#endregion
|
|
38
39
|
export { Reasoning as AiReasoning, Reasoning };
|
|
@@ -15,6 +15,8 @@ export interface ResponseProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
/** Markdown set on the paper. Rendering goes through
|
|
16
16
|
* `@tanstack/markdown`, whose defaults leave raw HTML and executable
|
|
17
17
|
* links inert — streaming-safe by construction. */
|
|
18
|
-
export declare
|
|
18
|
+
export declare const Response: ((props: ResponseProps) => JSX.Element) & {
|
|
19
|
+
Root: (props: ResponseProps) => JSX.Element;
|
|
20
|
+
};
|
|
19
21
|
//#endregion
|
|
20
22
|
export { Response as AiResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Response } from "../../ai-response-
|
|
1
|
+
import { t as Response } from "../../ai-response-D2uINBIi.mjs";
|
|
2
2
|
export { Response as AiResponse, Response };
|
|
@@ -6,8 +6,12 @@ export interface SourceProps extends JSX.HTMLAttributes<HTMLAnchorElement> {
|
|
|
6
6
|
href: string;
|
|
7
7
|
}
|
|
8
8
|
/** One place the ink came from; href and the rest ride the anchor. */
|
|
9
|
-
export declare
|
|
9
|
+
export declare const Source: ((props: SourceProps) => JSX.Element) & {
|
|
10
|
+
Root: (props: SourceProps) => JSX.Element;
|
|
11
|
+
};
|
|
10
12
|
/** The reading list under a response: where this ink came from. */
|
|
11
|
-
export declare
|
|
13
|
+
export declare const Sources: ((props: JSX.HTMLAttributes<HTMLOListElement>) => JSX.Element) & {
|
|
14
|
+
Root: (props: JSX.HTMLAttributes<HTMLOListElement>) => JSX.Element;
|
|
15
|
+
};
|
|
12
16
|
//#endregion
|
|
13
17
|
export { Source as AiSource, Sources as AiSources };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { claimElement, insert, spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -5,7 +6,7 @@ import { splitProps } from "solid-js";
|
|
|
5
6
|
var _tmpl$ = /* @__PURE__ */ template(`<li data-scope=ai data-part=source><a>`);
|
|
6
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<ol>`);
|
|
7
8
|
/** One place the ink came from; href and the rest ride the anchor. */
|
|
8
|
-
function Source(props) {
|
|
9
|
+
const Source = withSelfRoot(function Source(props) {
|
|
9
10
|
injectComponentStyle("ai");
|
|
10
11
|
const [own, rest] = splitProps(props, ["href", "children"]);
|
|
11
12
|
var _el$ = _tmpl$();
|
|
@@ -22,15 +23,15 @@ function Source(props) {
|
|
|
22
23
|
return own.children ?? own.href;
|
|
23
24
|
});
|
|
24
25
|
return _el$;
|
|
25
|
-
}
|
|
26
|
+
});
|
|
26
27
|
/** The reading list under a response: where this ink came from. */
|
|
27
|
-
function Sources(props) {
|
|
28
|
+
const Sources = withSelfRoot(function Sources(props) {
|
|
28
29
|
var _el$3 = _tmpl$2();
|
|
29
30
|
spread(_el$3, [props, {
|
|
30
31
|
"data-scope": "ai",
|
|
31
32
|
"data-part": "sources"
|
|
32
33
|
}], false);
|
|
33
34
|
return _el$3;
|
|
34
|
-
}
|
|
35
|
+
});
|
|
35
36
|
//#endregion
|
|
36
37
|
export { Source as AiSource, Source, Sources as AiSources, Sources };
|
|
@@ -8,6 +8,8 @@ export interface SuggestionProps extends Omit<JSX.HTMLAttributes<HTMLButtonEleme
|
|
|
8
8
|
}
|
|
9
9
|
/** A seal-cut button proposing the next stroke; selection hands back
|
|
10
10
|
* the prompt. The shared Button in its outline register. */
|
|
11
|
-
export declare
|
|
11
|
+
export declare const Suggestion: ((props: SuggestionProps) => JSX.Element) & {
|
|
12
|
+
Root: (props: SuggestionProps) => JSX.Element;
|
|
13
|
+
};
|
|
12
14
|
//#endregion
|
|
13
15
|
export { Suggestion as AiSuggestion };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { Button } from "../button/index.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
@@ -5,7 +6,7 @@ import { splitProps } from "solid-js";
|
|
|
5
6
|
//#region src/components/ai-suggestion/index.tsx
|
|
6
7
|
/** A seal-cut button proposing the next stroke; selection hands back
|
|
7
8
|
* the prompt. The shared Button in its outline register. */
|
|
8
|
-
function Suggestion(props) {
|
|
9
|
+
const Suggestion = withSelfRoot(function Suggestion(props) {
|
|
9
10
|
injectComponentStyle("ai");
|
|
10
11
|
const [own, rest] = splitProps(props, ["prompt", "onSelect"]);
|
|
11
12
|
return createComponent(Button, mergeProps({
|
|
@@ -17,6 +18,6 @@ function Suggestion(props) {
|
|
|
17
18
|
return own.prompt;
|
|
18
19
|
}
|
|
19
20
|
}));
|
|
20
|
-
}
|
|
21
|
+
});
|
|
21
22
|
//#endregion
|
|
22
23
|
export { Suggestion as AiSuggestion, Suggestion };
|
|
@@ -18,6 +18,8 @@ export interface ToolProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
/** A tool call: the shared collapsible as the vessel — the name it was
|
|
19
19
|
* reached by and the state it reached in on the trigger, its input and
|
|
20
20
|
* output folded inside. */
|
|
21
|
-
export declare
|
|
21
|
+
export declare const Tool: ((props: ToolProps) => JSX.Element) & {
|
|
22
|
+
Root: (props: ToolProps) => JSX.Element;
|
|
23
|
+
};
|
|
22
24
|
//#endregion
|
|
23
25
|
export { Tool as AiTool };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as chevron } from "../../chevron-BHQrYKPM.mjs";
|
|
2
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { createComponent, insert, mergeProps, template } from "@solidjs/web";
|
|
@@ -13,7 +14,7 @@ var _tmpl$6 = /* @__PURE__ */ template(`<div data-scope=ai data-part=tool-body><
|
|
|
13
14
|
/** A tool call: the shared collapsible as the vessel — the name it was
|
|
14
15
|
* reached by and the state it reached in on the trigger, its input and
|
|
15
16
|
* output folded inside. */
|
|
16
|
-
function Tool(props) {
|
|
17
|
+
const Tool = withSelfRoot(function Tool(props) {
|
|
17
18
|
injectComponentStyle("ai");
|
|
18
19
|
const [own, rest] = splitProps(props, [
|
|
19
20
|
"name",
|
|
@@ -85,6 +86,6 @@ function Tool(props) {
|
|
|
85
86
|
return _el$3;
|
|
86
87
|
} })];
|
|
87
88
|
} }));
|
|
88
|
-
}
|
|
89
|
+
});
|
|
89
90
|
//#endregion
|
|
90
91
|
export { Tool as AiTool, Tool };
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent,
|
|
3
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
4
|
import { createContext, splitProps, useContext } from "solid-js";
|
|
4
5
|
//#region src/components/alert/index.tsx
|
|
5
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
6
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
7
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<
|
|
8
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<p>`);
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span data-scope=alert data-part=icon>`);
|
|
8
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<p>`);
|
|
9
9
|
const StatusContext = createContext(() => "ink");
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
effect(() => paths[status], (_v$) => {
|
|
21
|
-
setAttribute(_el$2, "d", _v$);
|
|
10
|
+
function statusIcon(status) {
|
|
11
|
+
return iconNode({
|
|
12
|
+
ink: "info",
|
|
13
|
+
info: "info",
|
|
14
|
+
success: "circle-check",
|
|
15
|
+
warning: "triangle-alert",
|
|
16
|
+
danger: "circle-x"
|
|
17
|
+
}[status], {
|
|
18
|
+
width: "16",
|
|
19
|
+
height: "16"
|
|
22
20
|
});
|
|
23
|
-
return _el$;
|
|
24
21
|
}
|
|
25
22
|
function AlertRoot(props) {
|
|
26
23
|
const [own, rest] = splitProps(props, ["status"]);
|
|
@@ -28,8 +25,8 @@ function AlertRoot(props) {
|
|
|
28
25
|
return createComponent(StatusContext.Provider, {
|
|
29
26
|
value: status,
|
|
30
27
|
get children() {
|
|
31
|
-
var _el$
|
|
32
|
-
spread(_el
|
|
28
|
+
var _el$ = _tmpl$();
|
|
29
|
+
spread(_el$, [rest, {
|
|
33
30
|
get role() {
|
|
34
31
|
return status() === "ink" || status() === "info" ? "status" : "alert";
|
|
35
32
|
},
|
|
@@ -39,41 +36,41 @@ function AlertRoot(props) {
|
|
|
39
36
|
return status();
|
|
40
37
|
}
|
|
41
38
|
}], false);
|
|
42
|
-
return _el
|
|
39
|
+
return _el$;
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
43
|
function Icon() {
|
|
47
44
|
const status = useContext(StatusContext);
|
|
48
|
-
var _el$
|
|
49
|
-
insert(_el$
|
|
50
|
-
return
|
|
45
|
+
var _el$2 = _tmpl$2();
|
|
46
|
+
insert(_el$2, () => {
|
|
47
|
+
return statusIcon(status());
|
|
51
48
|
});
|
|
52
|
-
return _el$
|
|
49
|
+
return _el$2;
|
|
53
50
|
}
|
|
54
51
|
function Body(props) {
|
|
55
|
-
var _el$
|
|
56
|
-
spread(_el$
|
|
52
|
+
var _el$3 = _tmpl$();
|
|
53
|
+
spread(_el$3, [props, {
|
|
57
54
|
"data-scope": "alert",
|
|
58
55
|
"data-part": "body"
|
|
59
56
|
}], false);
|
|
60
|
-
return _el$
|
|
57
|
+
return _el$3;
|
|
61
58
|
}
|
|
62
59
|
function Title(props) {
|
|
63
|
-
var _el$
|
|
64
|
-
spread(_el$
|
|
60
|
+
var _el$4 = _tmpl$3();
|
|
61
|
+
spread(_el$4, [props, {
|
|
65
62
|
"data-scope": "alert",
|
|
66
63
|
"data-part": "title"
|
|
67
64
|
}], false);
|
|
68
|
-
return _el$
|
|
65
|
+
return _el$4;
|
|
69
66
|
}
|
|
70
67
|
function Description(props) {
|
|
71
|
-
var _el$
|
|
72
|
-
spread(_el$
|
|
68
|
+
var _el$5 = _tmpl$3();
|
|
69
|
+
spread(_el$5, [props, {
|
|
73
70
|
"data-scope": "alert",
|
|
74
71
|
"data-part": "description"
|
|
75
72
|
}], false);
|
|
76
|
-
return _el$
|
|
73
|
+
return _el$5;
|
|
77
74
|
}
|
|
78
75
|
const Alert = Object.assign(AlertRoot, {
|
|
79
76
|
Root: AlertRoot,
|
|
@@ -9,7 +9,7 @@ type AngleSliderOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function AngleSliderRoot(props: AngleSliderRootProps & AngleSliderOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export declare const AngleSlider: Omit<typeof AngleSlider$1, "Root"> & {
|
|
12
|
+
export declare const AngleSlider: typeof AngleSliderRoot & Omit<typeof AngleSlider$1, "Root"> & {
|
|
13
13
|
Root: typeof AngleSliderRoot;
|
|
14
14
|
};
|
|
15
15
|
//#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";
|
|
@@ -5,14 +7,20 @@ import { AngleSlider as AngleSlider$1 } from "@ark-ui/solid/angle-slider";
|
|
|
5
7
|
//#region src/components/angle-slider/index.tsx
|
|
6
8
|
function AngleSliderRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const id = useElementId("angle-slider", () => rest.id);
|
|
11
|
+
return createComponent(AngleSlider$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 AngleSlider = {
|
|
20
|
+
const AngleSlider = defineFamily(AngleSliderRoot, {
|
|
13
21
|
...AngleSlider$1,
|
|
14
22
|
Root: AngleSliderRoot
|
|
15
|
-
};
|
|
23
|
+
});
|
|
16
24
|
injectComponentStyle("angle-slider");
|
|
17
25
|
//#endregion
|
|
18
26
|
export { AngleSlider };
|
|
@@ -6,5 +6,7 @@ export interface AspectRatioProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
/** A CSS `aspect-ratio` value — "16 / 9", "4 / 3", "1 / 1". */
|
|
7
7
|
ratio?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare
|
|
9
|
+
export declare const AspectRatio: ((props: AspectRatioProps) => JSX.Element) & {
|
|
10
|
+
Root: (props: AspectRatioProps) => JSX.Element;
|
|
11
|
+
};
|
|
10
12
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
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
|
import { splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/aspect-ratio/index.tsx
|
|
5
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
-
function AspectRatio(props) {
|
|
7
|
+
const AspectRatio = withSelfRoot(function AspectRatio(props) {
|
|
7
8
|
injectComponentStyle("aspect-ratio");
|
|
8
9
|
const [own, rest] = splitProps(props, ["ratio"]);
|
|
9
10
|
var _el$ = _tmpl$();
|
|
@@ -18,6 +19,6 @@ function AspectRatio(props) {
|
|
|
18
19
|
"data-part": "root"
|
|
19
20
|
}], false);
|
|
20
21
|
return _el$;
|
|
21
|
-
}
|
|
22
|
+
});
|
|
22
23
|
//#endregion
|
|
23
24
|
export { AspectRatio };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Combobox } from "../combobox/index.mjs";
|
|
1
2
|
//#region src/components/autocomplete/index.d.ts
|
|
2
3
|
export interface AutoCompleteProps {
|
|
4
|
+
id?: string;
|
|
3
5
|
value?: string;
|
|
4
6
|
items?: string[];
|
|
5
7
|
placeholder?: string;
|
|
@@ -17,5 +19,6 @@ export interface AutoCompleteProps {
|
|
|
17
19
|
* matching is a case-insensitive substring unless `filter` says
|
|
18
20
|
* otherwise.
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
declare function AutoCompleteImpl(props: AutoCompleteProps): import("solid-js").JSX.Element;
|
|
23
|
+
export declare const AutoComplete: typeof AutoCompleteImpl & typeof Combobox;
|
|
21
24
|
//#endregion
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
4
|
+
import { Combobox as Combobox$1 } from "../combobox/index.mjs";
|
|
1
5
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
6
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
7
|
import { For, splitProps } from "solid-js";
|
|
@@ -13,9 +17,11 @@ import { Portal } from "solid-js/web";
|
|
|
13
17
|
* matching is a case-insensitive substring unless `filter` says
|
|
14
18
|
* otherwise.
|
|
15
19
|
*/
|
|
16
|
-
function
|
|
20
|
+
function AutoCompleteImpl(props) {
|
|
21
|
+
const messages = useComponentMessages();
|
|
17
22
|
injectComponentStyle("combobox");
|
|
18
23
|
const [own, rest] = splitProps(props, [
|
|
24
|
+
"id",
|
|
19
25
|
"value",
|
|
20
26
|
"items",
|
|
21
27
|
"placeholder",
|
|
@@ -23,11 +29,15 @@ function AutoComplete(props) {
|
|
|
23
29
|
"filter",
|
|
24
30
|
"onValueChange"
|
|
25
31
|
]);
|
|
32
|
+
const id = useElementId("autocomplete", () => props.id);
|
|
26
33
|
const { collection, filter } = useListCollection({
|
|
27
34
|
initialItems: own.items ?? [],
|
|
28
35
|
filter: (item, input) => own.filter ? own.filter(item, input) : item.toLowerCase().includes(input.toLowerCase())
|
|
29
36
|
});
|
|
30
37
|
return createComponent(Combobox.Root, mergeProps(rest, {
|
|
38
|
+
get id() {
|
|
39
|
+
return id();
|
|
40
|
+
},
|
|
31
41
|
get collection() {
|
|
32
42
|
return collection();
|
|
33
43
|
},
|
|
@@ -55,7 +65,9 @@ function AutoComplete(props) {
|
|
|
55
65
|
} }), createComponent(Portal, { get children() {
|
|
56
66
|
return createComponent(Combobox.Positioner, { get children() {
|
|
57
67
|
return createComponent(Combobox.Content, { get children() {
|
|
58
|
-
return [createComponent(Combobox.Empty, { children
|
|
68
|
+
return [createComponent(Combobox.Empty, { get children() {
|
|
69
|
+
return messages().command.noMatches;
|
|
70
|
+
} }), createComponent(For, {
|
|
59
71
|
get each() {
|
|
60
72
|
return collection().items;
|
|
61
73
|
},
|
|
@@ -72,5 +84,6 @@ function AutoComplete(props) {
|
|
|
72
84
|
}
|
|
73
85
|
}));
|
|
74
86
|
}
|
|
87
|
+
const AutoComplete = defineFamily(AutoCompleteImpl, Combobox$1);
|
|
75
88
|
//#endregion
|
|
76
89
|
export { AutoComplete };
|
|
@@ -17,7 +17,7 @@ export interface AvatarProps extends ComponentProps<typeof Avatar$1.Root> {
|
|
|
17
17
|
shape?: "circle" | "square";
|
|
18
18
|
}
|
|
19
19
|
declare function AvatarRoot(props: AvatarProps): import("solid-js").JSX.Element;
|
|
20
|
-
export declare const Avatar: typeof Avatar$1 & {
|
|
20
|
+
export declare const Avatar: typeof AvatarRoot & Omit<typeof Avatar$1, "Root"> & {
|
|
21
21
|
Root: typeof AvatarRoot;
|
|
22
22
|
};
|
|
23
23
|
//#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";
|
|
@@ -5,7 +7,11 @@ import { Avatar as Avatar$1 } from "@ark-ui/solid/avatar";
|
|
|
5
7
|
//#region src/components/avatar/index.tsx
|
|
6
8
|
function AvatarRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size", "shape"]);
|
|
10
|
+
const id = useElementId("avatar", () => rest.id);
|
|
8
11
|
return createComponent(Avatar$1.Root, mergeProps(rest, {
|
|
12
|
+
get id() {
|
|
13
|
+
return id();
|
|
14
|
+
},
|
|
9
15
|
get "data-size"() {
|
|
10
16
|
return own.size;
|
|
11
17
|
},
|
|
@@ -14,7 +20,10 @@ function AvatarRoot(props) {
|
|
|
14
20
|
}
|
|
15
21
|
}));
|
|
16
22
|
}
|
|
17
|
-
const Avatar =
|
|
23
|
+
const Avatar = defineFamily(AvatarRoot, {
|
|
24
|
+
...Avatar$1,
|
|
25
|
+
Root: AvatarRoot
|
|
26
|
+
});
|
|
18
27
|
injectComponentStyle("avatar");
|
|
19
28
|
//#endregion
|
|
20
29
|
export { Avatar };
|