@bysages/solid 0.3.1 → 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-slzE03wh.mjs → ai-response-D2uINBIi.mjs} +13 -5
- 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 +6 -5
- 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 +38 -36
- 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 +47 -43
- 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 +10 -1
- 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 +6 -2
- package/dist/components/block-ui/index.d.mts +3 -1
- package/dist/components/block-ui/index.mjs +3 -2
- 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 +73 -72
- 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 +13 -1
- 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 +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 +3 -2
- package/dist/components/data-view/index.d.mts +3 -1
- package/dist/components/data-view/index.mjs +5 -6
- 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 +10 -6
- 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 -7
- package/dist/components/file-upload/index.mjs +13 -5
- 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 +4 -2
- package/dist/components/image/index.mjs +34 -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 -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/json-tree-view/index.d.mts +5 -4
- package/dist/components/json-tree-view/index.mjs +15 -18
- package/dist/components/kbd/index.d.mts +3 -1
- package/dist/components/kbd/index.mjs +3 -2
- package/dist/components/link/index.d.mts +3 -1
- package/dist/components/link/index.mjs +3 -2
- 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 +30 -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 +67 -63
- 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 +3 -2
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +14 -3
- 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 +20 -3
- package/dist/components/steps/index.mjs +66 -7
- 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 +169 -151
- 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 +3 -2
- 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 +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 +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 +54 -50
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +37 -30
- package/dist/components/tree-view/index.d.mts +1 -8
- package/dist/components/tree-view/index.mjs +16 -21
- 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 +13 -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 +23 -22
- package/dist/index.mjs +13 -12
- 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-CZmYEaQR.mjs → toc-DYKaKQ_X.mjs} +12 -2
- package/package.json +3 -3
- package/dist/chevron-D5RzcayK.mjs +0 -9
- package/dist/index-DdsnfV4f.d.mts +0 -16
- package/dist/select-CX6OuQlU.mjs +0 -123
|
@@ -1,29 +1,24 @@
|
|
|
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";
|
|
4
|
+
import { Checkbox as Checkbox$1 } from "../checkbox/index.mjs";
|
|
1
5
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent,
|
|
3
|
-
import { For,
|
|
6
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
7
|
+
import { For, splitProps } from "solid-js";
|
|
4
8
|
import { useFieldContext } from "@ark-ui/solid/field";
|
|
5
9
|
import { Checkbox } from "@ark-ui/solid/checkbox";
|
|
6
10
|
//#region src/components/checkbox-group/index.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function checkGlyph() {
|
|
10
|
-
return _tmpl$();
|
|
11
|
+
function checkIcon() {
|
|
12
|
+
return iconNode("check");
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
* One question, many answers: a labelled stack (or row) of the seal-cut
|
|
14
|
-
* checkboxes bound to a single array. Toggling a box adds or removes its
|
|
15
|
-
* value; the group itself is semantics (`role="group"`), the boxes stay
|
|
16
|
-
* the machine-driven originals. Inside a `Field.Root` the group picks up
|
|
17
|
-
* the field context, so the invalid and disabled states a Form routes to
|
|
18
|
-
* its name dress every box at once.
|
|
19
|
-
*/
|
|
20
|
-
function CheckboxGroup(props) {
|
|
14
|
+
function CheckboxGroupImpl(props) {
|
|
21
15
|
injectComponentStyle("checkbox-group");
|
|
22
16
|
injectComponentStyle("checkbox");
|
|
23
17
|
const field = useFieldContext();
|
|
24
|
-
const uid = createUniqueId();
|
|
25
18
|
const [own, rest] = splitProps(props, [
|
|
19
|
+
"id",
|
|
26
20
|
"value",
|
|
21
|
+
"defaultValue",
|
|
27
22
|
"options",
|
|
28
23
|
"layout",
|
|
29
24
|
"size",
|
|
@@ -31,67 +26,69 @@ function CheckboxGroup(props) {
|
|
|
31
26
|
"disabled",
|
|
32
27
|
"onValueChange"
|
|
33
28
|
]);
|
|
34
|
-
const
|
|
29
|
+
const id = useElementId("checkbox-group", () => own.id);
|
|
30
|
+
const selectedValue = own.value === void 0 ? void 0 : () => own.value;
|
|
35
31
|
const isInvalid = () => own.invalid || field?.().invalid === true;
|
|
36
32
|
const isDisabled = () => own.disabled || field?.().disabled === true;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
return createComponent(Checkbox.Group, mergeProps(rest, { get id() {
|
|
34
|
+
return id();
|
|
35
|
+
} }, selectedValue === void 0 ? {} : { value: selectedValue }, () => {
|
|
36
|
+
return own.defaultValue === void 0 ? {} : { defaultValue: own.defaultValue };
|
|
37
|
+
}, {
|
|
38
|
+
get disabled() {
|
|
39
|
+
return isDisabled();
|
|
40
|
+
},
|
|
41
|
+
get invalid() {
|
|
42
|
+
return isInvalid();
|
|
43
|
+
},
|
|
44
|
+
get onValueChange() {
|
|
45
|
+
return own.onValueChange;
|
|
46
|
+
},
|
|
48
47
|
get "data-layout"() {
|
|
49
48
|
return own.layout ?? "vertical";
|
|
50
49
|
},
|
|
51
50
|
get "data-invalid"() {
|
|
52
51
|
return isInvalid() ? "" : void 0;
|
|
53
|
-
}
|
|
54
|
-
}], true);
|
|
55
|
-
insert(_el$2, createComponent(For, {
|
|
56
|
-
get each() {
|
|
57
|
-
return own.options;
|
|
58
52
|
},
|
|
59
|
-
children
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
53
|
+
get children() {
|
|
54
|
+
return createComponent(For, {
|
|
55
|
+
get each() {
|
|
56
|
+
return own.options;
|
|
57
|
+
},
|
|
58
|
+
children: (option) => createComponent(Checkbox.Root, {
|
|
59
|
+
get value() {
|
|
60
|
+
return option.value;
|
|
61
|
+
},
|
|
62
|
+
get ids() {
|
|
63
|
+
return {
|
|
64
|
+
label: `${id()}:${option.value}:label`,
|
|
65
|
+
hiddenInput: `${id()}:${option.value}:input`
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
get "data-size"() {
|
|
69
|
+
return own.size ?? "md";
|
|
70
|
+
},
|
|
71
|
+
get disabled() {
|
|
72
|
+
return option.disabled === true;
|
|
73
|
+
},
|
|
74
|
+
get children() {
|
|
75
|
+
return [
|
|
76
|
+
createComponent(Checkbox.Control, { get children() {
|
|
77
|
+
return createComponent(Checkbox.Indicator, { get children() {
|
|
78
|
+
return checkIcon();
|
|
79
|
+
} });
|
|
80
|
+
} }),
|
|
81
|
+
createComponent(Checkbox.Label, { get children() {
|
|
82
|
+
return option.label;
|
|
83
|
+
} }),
|
|
84
|
+
createComponent(Checkbox.HiddenInput, {})
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
93
90
|
}));
|
|
94
|
-
return _el$2;
|
|
95
91
|
}
|
|
92
|
+
const CheckboxGroup = defineFamily(CheckboxGroupImpl, Checkbox$1);
|
|
96
93
|
//#endregion
|
|
97
94
|
export { CheckboxGroup };
|
|
@@ -8,5 +8,7 @@ export interface ChipProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
|
8
8
|
tone?: "ink" | "info" | "success" | "warning" | "danger";
|
|
9
9
|
variant?: "solid" | "subtle" | "outline";
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
11
|
+
export declare const Chip: ((props: ChipProps) => JSX.Element) & {
|
|
12
|
+
Root: (props: ChipProps) => JSX.Element;
|
|
13
|
+
};
|
|
12
14
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { insert, memo, spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
4
5
|
//#region src/components/chip/index.tsx
|
|
5
6
|
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
|
-
function Chip(props) {
|
|
7
|
+
const Chip = withSelfRoot(function Chip(props) {
|
|
7
8
|
injectComponentStyle("chip");
|
|
8
9
|
const [own, rest] = splitProps(props, [
|
|
9
10
|
"value",
|
|
@@ -31,6 +32,6 @@ function Chip(props) {
|
|
|
31
32
|
};
|
|
32
33
|
})());
|
|
33
34
|
return _el$;
|
|
34
|
-
}
|
|
35
|
+
});
|
|
35
36
|
//#endregion
|
|
36
37
|
export { Chip };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { ClientOnly, ClientOnlyProps } from "@ark-ui/solid/client-only";
|
|
2
|
-
|
|
1
|
+
import { ClientOnly as ClientOnly$1, ClientOnlyProps } from "@ark-ui/solid/client-only";
|
|
2
|
+
//#region src/components/client-only/index.d.ts
|
|
3
|
+
export declare const ClientOnly: typeof ClientOnly$1 & {
|
|
4
|
+
Root: typeof ClientOnly$1;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export type { ClientOnlyProps };
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { ClientOnly as ClientOnly$1 } from "@ark-ui/solid/client-only";
|
|
3
|
+
//#region src/components/client-only/index.ts
|
|
4
|
+
/** Render children on the client only, after hydration — the escape
|
|
5
|
+
* hatch for browser-only widgets inside server-rendered pages. Headless,
|
|
6
|
+
* like the rest of Ark's utilities: no visual layer of our own. */
|
|
7
|
+
const ClientOnly = withSelfRoot(ClientOnly$1);
|
|
8
|
+
//#endregion
|
|
2
9
|
export { ClientOnly };
|
|
@@ -10,7 +10,7 @@ type ClipboardOwnProps = {
|
|
|
10
10
|
size?: "sm" | "md" | "lg";
|
|
11
11
|
};
|
|
12
12
|
declare function ClipboardRoot(props: ClipboardRootProps & ClipboardOwnProps): import("solid-js").JSX.Element;
|
|
13
|
-
export declare const Clipboard: Omit<typeof Clipboard$1, "Root"> & {
|
|
13
|
+
export declare const Clipboard: typeof ClipboardRoot & Omit<typeof Clipboard$1, "Root"> & {
|
|
14
14
|
Root: typeof ClipboardRoot;
|
|
15
15
|
};
|
|
16
16
|
//#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 { Clipboard as Clipboard$1 } from "@ark-ui/solid/clipboard";
|
|
|
6
8
|
const ArkRoot = Clipboard$1.Root;
|
|
7
9
|
function ClipboardRoot(props) {
|
|
8
10
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const id = useElementId("clipboard", () => 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 Clipboard = {
|
|
21
|
+
const Clipboard = defineFamily(ClipboardRoot, {
|
|
14
22
|
...Clipboard$1,
|
|
15
23
|
Root: ClipboardRoot
|
|
16
|
-
};
|
|
24
|
+
});
|
|
17
25
|
injectComponentStyle("clipboard");
|
|
18
26
|
//#endregion
|
|
19
27
|
export { Clipboard };
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
1
2
|
import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
|
|
2
3
|
//#region src/components/collapsible/index.d.ts
|
|
3
4
|
/** Ark's Collapsible, dressed in the paper-and-ink system: one control on
|
|
4
5
|
* the paper, its panel dissolving open to the machine's measured height.
|
|
5
6
|
* The API is Ark's own — Root, Trigger, Content, Indicator. */
|
|
6
|
-
|
|
7
|
+
declare function CollapsibleRoot(props: ComponentProps<typeof Collapsible$1.Root>): JSX.Element;
|
|
8
|
+
export interface CollapsibleFacadeProps {
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
children?: JSX.Element;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
declare function CollapsibleFacade(props: CollapsibleFacadeProps): JSX.Element;
|
|
17
|
+
type CollapsibleParts = Omit<typeof Collapsible$1, "Root"> & {
|
|
18
|
+
Root: typeof CollapsibleRoot;
|
|
19
|
+
};
|
|
20
|
+
export declare const Collapsible: typeof CollapsibleFacade & CollapsibleParts;
|
|
7
21
|
//#endregion
|
|
@@ -1,10 +1,47 @@
|
|
|
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, memo, mergeProps } from "@solidjs/web";
|
|
6
|
+
import { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
2
7
|
import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
|
|
3
|
-
//#region src/components/collapsible/index.
|
|
8
|
+
//#region src/components/collapsible/index.tsx
|
|
4
9
|
/** Ark's Collapsible, dressed in the paper-and-ink system: one control on
|
|
5
10
|
* the paper, its panel dissolving open to the machine's measured height.
|
|
6
11
|
* The API is Ark's own — Root, Trigger, Content, Indicator. */
|
|
7
|
-
|
|
12
|
+
function CollapsibleRoot(props) {
|
|
13
|
+
const id = useElementId("collapsible", () => props.id);
|
|
14
|
+
return createComponent$1(Collapsible$1.Root, mergeProps$1(props, { get id() {
|
|
15
|
+
return id();
|
|
16
|
+
} }));
|
|
17
|
+
}
|
|
18
|
+
function CollapsibleFacade(props) {
|
|
19
|
+
injectComponentStyle("collapsible");
|
|
20
|
+
return createComponent(CollapsibleRoot, mergeProps({ get disabled() {
|
|
21
|
+
return props.disabled;
|
|
22
|
+
} }, () => {
|
|
23
|
+
return props.open === void 0 ? {} : { open: props.open };
|
|
24
|
+
}, () => {
|
|
25
|
+
return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
|
|
26
|
+
}, {
|
|
27
|
+
onOpenChange: (details) => props.onOpenChange?.(details.open),
|
|
28
|
+
get children() {
|
|
29
|
+
return [createComponent(Collapsible$1.Trigger, { get children() {
|
|
30
|
+
return [memo(() => {
|
|
31
|
+
return props.label;
|
|
32
|
+
}), createComponent(Collapsible$1.Indicator, { get children() {
|
|
33
|
+
return iconNode("chevron-right");
|
|
34
|
+
} })];
|
|
35
|
+
} }), createComponent(Collapsible$1.Content, { get children() {
|
|
36
|
+
return props.children;
|
|
37
|
+
} })];
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
const Collapsible = defineFamily(CollapsibleFacade, {
|
|
42
|
+
...Collapsible$1,
|
|
43
|
+
Root: CollapsibleRoot
|
|
44
|
+
});
|
|
8
45
|
injectComponentStyle("collapsible");
|
|
9
46
|
//#endregion
|
|
10
47
|
export { Collapsible };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
2
|
+
import { Color, ColorPicker as ColorPicker$1, ColorPickerRootProps } from "@ark-ui/solid/color-picker";
|
|
2
3
|
//#region src/components/color-picker/index.d.ts
|
|
3
4
|
/** Ark's ColorPicker, dressed in the paper-and-ink system: a seal-sized swatch
|
|
4
5
|
* on the paper, opening into an area and channel sliders where pigment is
|
|
@@ -13,7 +14,17 @@ type ColorPickerOwnProps = {
|
|
|
13
14
|
size?: "sm" | "md" | "lg";
|
|
14
15
|
};
|
|
15
16
|
declare function ColorPickerRoot(props: ColorPickerRootProps & ColorPickerOwnProps): import("solid-js").JSX.Element;
|
|
16
|
-
|
|
17
|
+
type ColorPickerFacadeProps = Omit<ComponentProps<typeof ColorPickerRoot>, "children" | "defaultValue" | "disabled" | "invalid" | "label" | "onValueChange" | "required" | "value"> & {
|
|
18
|
+
value?: string | Color;
|
|
19
|
+
defaultValue?: string | Color;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
label?: string;
|
|
24
|
+
onValueChange?: (value: unknown) => void;
|
|
25
|
+
};
|
|
26
|
+
declare function ColorPickerFacade(props: ColorPickerFacadeProps): import("solid-js").JSX.Element;
|
|
27
|
+
export declare const ColorPicker: typeof ColorPickerFacade & Omit<typeof ColorPicker$1, "Root"> & {
|
|
17
28
|
Root: typeof ColorPickerRoot;
|
|
18
29
|
};
|
|
19
30
|
//#endregion
|
|
@@ -1,18 +1,105 @@
|
|
|
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";
|
|
2
|
-
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
-
import { splitProps } from "solid-js";
|
|
4
|
-
import { ColorPicker as ColorPicker$1 } from "@ark-ui/solid/color-picker";
|
|
5
|
+
import { createComponent, insert, mergeProps, template } from "@solidjs/web";
|
|
6
|
+
import { Show, splitProps } from "solid-js";
|
|
7
|
+
import { ColorPicker as ColorPicker$1, parseColor } from "@ark-ui/solid/color-picker";
|
|
5
8
|
//#region src/components/color-picker/index.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=color-picker data-part=channel-controls><div data-scope=color-picker data-part=channel-sliders><!><!>`);
|
|
6
10
|
function ColorPickerRoot(props) {
|
|
7
11
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
const id = useElementId("color-picker", () => rest.id);
|
|
13
|
+
return createComponent(ColorPicker$1.Root, mergeProps(rest, {
|
|
14
|
+
get id() {
|
|
15
|
+
return id();
|
|
16
|
+
},
|
|
17
|
+
get "data-size"() {
|
|
18
|
+
return own.size ?? "md";
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
11
21
|
}
|
|
12
|
-
|
|
22
|
+
function ColorPickerFacade(props) {
|
|
23
|
+
injectComponentStyle("color-picker");
|
|
24
|
+
const toColor = (color) => typeof color === "string" ? parseColor(color) : color;
|
|
25
|
+
return createComponent(ColorPickerRoot, mergeProps(props, {
|
|
26
|
+
get value() {
|
|
27
|
+
return toColor(props.value);
|
|
28
|
+
},
|
|
29
|
+
get defaultValue() {
|
|
30
|
+
return toColor(props.defaultValue);
|
|
31
|
+
},
|
|
32
|
+
get disabled() {
|
|
33
|
+
return props.disabled;
|
|
34
|
+
},
|
|
35
|
+
get invalid() {
|
|
36
|
+
return props.invalid;
|
|
37
|
+
},
|
|
38
|
+
get required() {
|
|
39
|
+
return props.required;
|
|
40
|
+
},
|
|
41
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
42
|
+
get children() {
|
|
43
|
+
return [
|
|
44
|
+
createComponent(Show, {
|
|
45
|
+
get when() {
|
|
46
|
+
return props.label;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return createComponent(ColorPicker$1.Label, { get children() {
|
|
50
|
+
return props.label;
|
|
51
|
+
} });
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
createComponent(ColorPicker$1.Control, { get children() {
|
|
55
|
+
return [createComponent(ColorPicker$1.ChannelInput, { channel: "hex" }), createComponent(ColorPicker$1.Trigger, { get children() {
|
|
56
|
+
return [createComponent(ColorPicker$1.TransparencyGrid, {}), createComponent(ColorPicker$1.ValueSwatch, {})];
|
|
57
|
+
} })];
|
|
58
|
+
} }),
|
|
59
|
+
createComponent(ColorPicker$1.Positioner, { get children() {
|
|
60
|
+
return createComponent(ColorPicker$1.Content, { get children() {
|
|
61
|
+
return [createComponent(ColorPicker$1.Area, { get children() {
|
|
62
|
+
return [createComponent(ColorPicker$1.AreaBackground, {}), createComponent(ColorPicker$1.AreaThumb, {})];
|
|
63
|
+
} }), (() => {
|
|
64
|
+
var _el$ = _tmpl$();
|
|
65
|
+
var _el$2 = _el$.firstChild;
|
|
66
|
+
var _el$3 = _el$2.firstChild;
|
|
67
|
+
var _el$4 = _el$3.nextSibling;
|
|
68
|
+
insert(_el$, createComponent(ColorPicker$1.EyeDropperTrigger, { get children() {
|
|
69
|
+
return iconNode("pipette", {
|
|
70
|
+
width: 14,
|
|
71
|
+
height: 14
|
|
72
|
+
});
|
|
73
|
+
} }), _el$2);
|
|
74
|
+
insert(_el$2, createComponent(ColorPicker$1.ChannelSlider, {
|
|
75
|
+
channel: "hue",
|
|
76
|
+
get children() {
|
|
77
|
+
return [createComponent(ColorPicker$1.ChannelSliderTrack, {}), createComponent(ColorPicker$1.ChannelSliderThumb, {})];
|
|
78
|
+
}
|
|
79
|
+
}), _el$3);
|
|
80
|
+
insert(_el$2, createComponent(ColorPicker$1.ChannelSlider, {
|
|
81
|
+
channel: "alpha",
|
|
82
|
+
get children() {
|
|
83
|
+
return [
|
|
84
|
+
createComponent(ColorPicker$1.TransparencyGrid, {}),
|
|
85
|
+
createComponent(ColorPicker$1.ChannelSliderTrack, {}),
|
|
86
|
+
createComponent(ColorPicker$1.ChannelSliderThumb, {})
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
}), _el$4);
|
|
90
|
+
return _el$;
|
|
91
|
+
})()];
|
|
92
|
+
} });
|
|
93
|
+
} }),
|
|
94
|
+
createComponent(ColorPicker$1.HiddenInput, {})
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
const ColorPicker = defineFamily(ColorPickerFacade, {
|
|
13
100
|
...ColorPicker$1,
|
|
14
101
|
Root: ColorPickerRoot
|
|
15
|
-
};
|
|
102
|
+
});
|
|
16
103
|
injectComponentStyle("color-picker");
|
|
17
104
|
//#endregion
|
|
18
105
|
export { ColorPicker };
|
|
@@ -11,7 +11,30 @@ type ComboboxOwnProps = {
|
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
12
|
};
|
|
13
13
|
declare function ComboboxRoot<T extends CollectionItem>(props: ComboboxRootProps<T> & ComboboxOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
|
|
14
|
+
type ComboboxOption = {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
type ComboboxFacadeValue = string | string[];
|
|
19
|
+
type ComboboxParts = Omit<typeof Combobox$1, "Root"> & {
|
|
15
20
|
Root: typeof ComboboxRoot;
|
|
16
21
|
};
|
|
22
|
+
export interface ComboboxFacadeProps {
|
|
23
|
+
value?: ComboboxFacadeValue;
|
|
24
|
+
defaultValue?: ComboboxFacadeValue;
|
|
25
|
+
options: ComboboxOption[];
|
|
26
|
+
multiple?: boolean;
|
|
27
|
+
/** Show the clear-value control when the machine allows it. */
|
|
28
|
+
clearable?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/** One rung of the control-height ladder for the field row. */
|
|
35
|
+
size?: "sm" | "md" | "lg";
|
|
36
|
+
onValueChange?: (value?: ComboboxFacadeValue) => void;
|
|
37
|
+
}
|
|
38
|
+
declare function ComboboxFacade(props: ComboboxFacadeProps): import("solid-js").JSX.Element;
|
|
39
|
+
export declare const Combobox: typeof ComboboxFacade & ComboboxParts;
|
|
17
40
|
//#endregion
|
|
@@ -1,18 +1,139 @@
|
|
|
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";
|
|
2
|
-
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
-
import { splitProps } from "solid-js";
|
|
4
|
-
import { Combobox as Combobox$1 } from "@ark-ui/solid/combobox";
|
|
5
|
+
import { createComponent, memo, mergeProps } from "@solidjs/web";
|
|
6
|
+
import { For, Show, splitProps } from "solid-js";
|
|
7
|
+
import { Combobox as Combobox$1, createListCollection } from "@ark-ui/solid/combobox";
|
|
5
8
|
//#region src/components/combobox/index.tsx
|
|
6
9
|
function ComboboxRoot(props) {
|
|
7
10
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
const id = useElementId("combobox", () => rest.id);
|
|
12
|
+
return createComponent(Combobox$1.Root, mergeProps(rest, {
|
|
13
|
+
get id() {
|
|
14
|
+
return id();
|
|
15
|
+
},
|
|
16
|
+
get "data-size"() {
|
|
17
|
+
return own.size ?? "md";
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
11
20
|
}
|
|
12
|
-
|
|
21
|
+
function toComboboxValue(value) {
|
|
22
|
+
if (value === void 0) return void 0;
|
|
23
|
+
return Array.isArray(value) ? value : [value];
|
|
24
|
+
}
|
|
25
|
+
function fromComboboxValue(value, multiple) {
|
|
26
|
+
return multiple ? value : value.at(0);
|
|
27
|
+
}
|
|
28
|
+
function ComboboxFacade(props) {
|
|
29
|
+
injectComponentStyle("combobox");
|
|
30
|
+
const collection = createListCollection({ items: props.options });
|
|
31
|
+
return createComponent(ComboboxRoot, mergeProps({
|
|
32
|
+
get size() {
|
|
33
|
+
return props.size ?? "md";
|
|
34
|
+
},
|
|
35
|
+
collection,
|
|
36
|
+
get defaultValue() {
|
|
37
|
+
return toComboboxValue(props.defaultValue);
|
|
38
|
+
},
|
|
39
|
+
get disabled() {
|
|
40
|
+
return props.disabled;
|
|
41
|
+
},
|
|
42
|
+
get invalid() {
|
|
43
|
+
return props.invalid;
|
|
44
|
+
},
|
|
45
|
+
get multiple() {
|
|
46
|
+
return props.multiple;
|
|
47
|
+
},
|
|
48
|
+
get placeholder() {
|
|
49
|
+
return props.placeholder;
|
|
50
|
+
},
|
|
51
|
+
get required() {
|
|
52
|
+
return props.required;
|
|
53
|
+
},
|
|
54
|
+
lazyMount: true,
|
|
55
|
+
unmountOnExit: true
|
|
56
|
+
}, () => {
|
|
57
|
+
return props.value === void 0 ? {} : { value: toComboboxValue(props.value) };
|
|
58
|
+
}, {
|
|
59
|
+
onValueChange: (event) => props.onValueChange?.(fromComboboxValue(event.value, props.multiple)),
|
|
60
|
+
get children() {
|
|
61
|
+
return [
|
|
62
|
+
createComponent(Show, {
|
|
63
|
+
get when() {
|
|
64
|
+
return props.label;
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return createComponent(Combobox$1.Label, { get children() {
|
|
68
|
+
return props.label;
|
|
69
|
+
} });
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
createComponent(Combobox$1.Control, { get children() {
|
|
73
|
+
return [
|
|
74
|
+
createComponent(Combobox$1.Input, {
|
|
75
|
+
get "aria-label"() {
|
|
76
|
+
return memo(() => {
|
|
77
|
+
return !!props.label;
|
|
78
|
+
})() ? void 0 : props.placeholder;
|
|
79
|
+
},
|
|
80
|
+
get placeholder() {
|
|
81
|
+
return props.placeholder;
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
createComponent(Show, {
|
|
85
|
+
get when() {
|
|
86
|
+
return props.clearable !== false;
|
|
87
|
+
},
|
|
88
|
+
get children() {
|
|
89
|
+
return createComponent(Combobox$1.ClearTrigger, { get children() {
|
|
90
|
+
return iconNode("x", {
|
|
91
|
+
width: "14",
|
|
92
|
+
height: "14"
|
|
93
|
+
});
|
|
94
|
+
} });
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
createComponent(Combobox$1.Trigger, { get children() {
|
|
98
|
+
return iconNode("chevron-down", {
|
|
99
|
+
width: "16",
|
|
100
|
+
height: "16"
|
|
101
|
+
});
|
|
102
|
+
} })
|
|
103
|
+
];
|
|
104
|
+
} }),
|
|
105
|
+
createComponent(Combobox$1.Positioner, { get children() {
|
|
106
|
+
return createComponent(Combobox$1.Content, { get children() {
|
|
107
|
+
return [createComponent(Combobox$1.Empty, { children: "No results found" }), createComponent(Combobox$1.List, { get children() {
|
|
108
|
+
return createComponent(For, {
|
|
109
|
+
get each() {
|
|
110
|
+
return collection.items;
|
|
111
|
+
},
|
|
112
|
+
children: (item) => createComponent(Combobox$1.Item, {
|
|
113
|
+
item,
|
|
114
|
+
get children() {
|
|
115
|
+
return [createComponent(Combobox$1.ItemText, { get children() {
|
|
116
|
+
return item.label;
|
|
117
|
+
} }), createComponent(Combobox$1.ItemIndicator, { get children() {
|
|
118
|
+
return iconNode("check", {
|
|
119
|
+
width: "14",
|
|
120
|
+
height: "14"
|
|
121
|
+
});
|
|
122
|
+
} })];
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
} })];
|
|
127
|
+
} });
|
|
128
|
+
} })
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
const Combobox = defineFamily(ComboboxFacade, {
|
|
13
134
|
...Combobox$1,
|
|
14
135
|
Root: ComboboxRoot
|
|
15
|
-
};
|
|
136
|
+
});
|
|
16
137
|
injectComponentStyle("combobox");
|
|
17
138
|
//#endregion
|
|
18
139
|
export { Combobox };
|