@vanstack/solid-ark 0.0.36 → 0.0.38

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.
@@ -1,103 +0,0 @@
1
- import "./solid-ark.css";
2
- import { Index as e, Portal as t, createComponent as n, memo as r, template as i } from "solid-js/web";
3
- import { Show as a, createMemo as o } from "solid-js";
4
- import { Select as s, createListCollection as c } from "@ark-ui/solid/select";
5
- //#region src/form/components/FormSelect.tsx
6
- var l = /*#__PURE__*/ i("<svg fill=none height=14 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 viewBox=\"0 0 24 24\"width=14 xmlns=http://www.w3.org/2000/svg><path d=\"M18 6 6 18\"></path><path d=\"m6 6 12 12\">"), u = /*#__PURE__*/ i("<svg fill=none height=16 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 viewBox=\"0 0 24 24\"width=16 xmlns=http://www.w3.org/2000/svg><path d=\"m7 15 5 5 5-5\"></path><path d=\"m7 9 5-5 5 5\">"), d = /*#__PURE__*/ i("<div class=van-form-select-empty>暂无数据");
7
- function f() {
8
- return l();
9
- }
10
- function p(i) {
11
- let l = o(() => c({ items: i.field.options.map((e) => ({
12
- label: e.label,
13
- value: e.value
14
- })) }));
15
- return n(s.Root, {
16
- get collection() {
17
- return l();
18
- },
19
- get id() {
20
- return i.controlId;
21
- },
22
- onOpenChange: () => i.onBlur(),
23
- onValueChange: (e) => i.onChange(e.value?.[0] ?? ""),
24
- get value() {
25
- return r(() => !!i.value)() ? [i.value] : [];
26
- },
27
- get children() {
28
- return [
29
- n(s.Control, {
30
- class: "van-form-select-control",
31
- get children() {
32
- return [
33
- n(s.Trigger, {
34
- class: "van-form-select-trigger",
35
- get children() {
36
- return n(s.ValueText, {
37
- class: "van-form-select-value",
38
- get placeholder() {
39
- return i.field.placeholder ?? "请选择";
40
- }
41
- });
42
- }
43
- }),
44
- r(() => r(() => i.field.clearable === !0)() && n(s.ClearTrigger, {
45
- class: "van-form-select-clear",
46
- get children() {
47
- return n(f, {});
48
- }
49
- })),
50
- n(s.Indicator, {
51
- class: "van-form-select-indicator",
52
- get children() {
53
- return u();
54
- }
55
- })
56
- ];
57
- }
58
- }),
59
- n(t, { get children() {
60
- return n(s.Positioner, {
61
- class: "van-form-select-positioner",
62
- get children() {
63
- return n(s.Content, {
64
- class: "van-form-select-content",
65
- get children() {
66
- return n(a, {
67
- get fallback() {
68
- return n(e, {
69
- get each() {
70
- return i.field.options;
71
- },
72
- children: (e) => n(s.Item, {
73
- class: "van-form-select-item",
74
- get item() {
75
- return e();
76
- },
77
- get children() {
78
- return n(s.ItemText, { get children() {
79
- return e().label;
80
- } });
81
- }
82
- })
83
- });
84
- },
85
- get when() {
86
- return i.field.options.length === 0;
87
- },
88
- get children() {
89
- return d();
90
- }
91
- });
92
- }
93
- });
94
- }
95
- });
96
- } }),
97
- n(s.HiddenSelect, {})
98
- ];
99
- }
100
- });
101
- }
102
- //#endregion
103
- export { p as FormSelect };
@@ -1 +0,0 @@
1
- export declare function FieldSkeleton(): import("solid-js").JSX.Element;