@pyck/react 0.0.5 → 0.0.7
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/checkmark-rF75Pk98.js +75 -0
- package/dist/close-button-DAgpEZYq.js +172 -0
- package/dist/components/avatar/index.js +118 -20
- package/dist/components/button/index.js +1 -1
- package/dist/components/carousel/index.js +52 -12
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +151 -34
- package/dist/components/checkmark/index.js +1 -1
- package/dist/components/clipboard/index.js +3 -2
- package/dist/components/combobox/index.js +46 -9
- package/dist/components/data-list/index.d.ts +3 -2
- package/dist/components/data-list/index.js +23 -8
- package/dist/components/date-picker/index.js +17 -10
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +156 -95
- package/dist/components/display-date-value/index.d.ts +1 -1
- package/dist/components/display-date-value/index.js +2 -2
- package/dist/components/display-value/index.js +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +22 -1
- package/dist/components/drilldown-menu/index.js +268 -87
- package/dist/components/field/index.js +110 -27
- package/dist/components/floating-panel/index.d.ts +1 -1
- package/dist/components/floating-panel/index.js +91 -43
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.js +142 -26
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/highlight/index.js +63 -14
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/image/index.js +33 -2
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js +67 -4
- package/dist/components/input-group/index.js +79 -14
- package/dist/components/json-form-builder/index.d.ts +1 -1
- package/dist/components/json-form-builder/index.js +383 -99
- package/dist/components/loader/index.js +35 -15
- package/dist/components/logo/index.js +97 -19
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/index.js +41 -7
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.js +68 -13
- package/dist/components/page-header/index.js +67 -12
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.js +52 -13
- package/dist/components/picker/index.js +56 -28
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +2 -1
- package/dist/components/progress/index.js +57 -23
- package/dist/components/progress-circle/index.js +82 -30
- package/dist/components/radio-group/index.js +60 -19
- package/dist/components/scroll-area/index.js +80 -19
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/segment-group/index.js +40 -5
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +119 -22
- package/dist/components/show/index.js +1 -1
- package/dist/components/skeleton/index.js +55 -4
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +174 -55
- package/dist/components/spotlight/index.js +447 -126
- package/dist/components/steps/index.js +35 -13
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +210 -43
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +435 -67
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/tags-input/index.js +25 -9
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.js +66 -4
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +56 -22
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +87 -25
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/index.js +64 -8
- package/dist/display-date-value-CSPbdE60.js +45 -0
- package/dist/{display-date-value-CdfgVuB7.d.ts → display-date-value-RbzRgYHt.d.ts} +1 -1
- package/dist/display-value-R2nHrGQo.js +81 -0
- package/dist/{featured-icon-DPysOpSf.js → featured-icon-DBnAKGXC.js} +31 -4
- package/dist/show-B7zG1Vci.js +28 -0
- package/dist/utils/index.js +164 -73
- package/package.json +6 -3
- package/dist/checkmark-CW-yHMvN.js +0 -18
- package/dist/close-button-BM7ikbYh.js +0 -52
- package/dist/display-date-value-gTlidtNz.js +0 -21
- package/dist/display-value-BNKxQ99u.js +0 -37
- package/dist/show-IaI-36v9.js +0 -12
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { createListCollection } from "@ark-ui/react/collection";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { useEffect, useMemo, useState } from "react";
|
|
3
4
|
import { Box, Center, Grid, HStack } from "@pyck/styled-system/jsx";
|
|
4
5
|
import { ArrowDownIcon, ArrowUpIcon, ChevronRightIcon, CommandIcon, CornerDownLeftIcon, SearchIcon, UserIcon } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
import { useDebounce, useHotkey } from "@pyck/react/utils";
|
|
6
8
|
import { Show } from "@pyck/react/show";
|
|
7
9
|
import { Span } from "@pyck/react/span";
|
|
8
10
|
import { Button } from "@pyck/react/button";
|
|
9
11
|
import { Icon } from "@pyck/react/icon";
|
|
10
12
|
import { Combobox } from "@pyck/react/combobox";
|
|
11
|
-
import { Text } from "@pyck/react/text";
|
|
12
13
|
import { ScrollArea } from "@pyck/react/scroll-area";
|
|
14
|
+
import { Text } from "@pyck/react/text";
|
|
13
15
|
import { Dialog } from "@pyck/react/dialog";
|
|
14
16
|
import { InputGroup } from "@pyck/react/input-group";
|
|
15
17
|
import { Kbd } from "@pyck/react/kbd";
|
|
@@ -19,146 +21,465 @@ import { Highlight } from "@pyck/react/highlight";
|
|
|
19
21
|
|
|
20
22
|
//#region src/components/spotlight/keyboard-hints.tsx
|
|
21
23
|
const KeyboardHints = () => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
const $ = c(4);
|
|
25
|
+
let t0;
|
|
26
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27
|
+
t0 = /* @__PURE__ */ jsx(KeyboardKey, { children: /* @__PURE__ */ jsx(ArrowUpIcon, {}) });
|
|
28
|
+
$[0] = t0;
|
|
29
|
+
} else t0 = $[0];
|
|
30
|
+
let t1;
|
|
31
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
32
|
+
t1 = /* @__PURE__ */ jsx(Shortcut, {
|
|
33
|
+
label: "to navigate",
|
|
34
|
+
children: /* @__PURE__ */ jsxs(HStack, {
|
|
35
|
+
gap: "1.5",
|
|
36
|
+
children: [t0, /* @__PURE__ */ jsx(KeyboardKey, { children: /* @__PURE__ */ jsx(ArrowDownIcon, {}) })]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
$[1] = t1;
|
|
40
|
+
} else t1 = $[1];
|
|
41
|
+
let t2;
|
|
42
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
43
|
+
t2 = /* @__PURE__ */ jsx(Shortcut, {
|
|
44
|
+
label: "to select",
|
|
45
|
+
children: /* @__PURE__ */ jsx(KeyboardKey, { children: /* @__PURE__ */ jsx(CornerDownLeftIcon, {}) })
|
|
46
|
+
});
|
|
47
|
+
$[2] = t2;
|
|
48
|
+
} else t2 = $[2];
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t3 = /* @__PURE__ */ jsxs(HStack, {
|
|
52
|
+
gap: "4",
|
|
53
|
+
children: [
|
|
54
|
+
t1,
|
|
55
|
+
t2,
|
|
56
|
+
/* @__PURE__ */ jsx(Shortcut, {
|
|
57
|
+
label: "to close",
|
|
58
|
+
children: /* @__PURE__ */ jsx(Kbd, {
|
|
59
|
+
variant: "surface",
|
|
60
|
+
size: "2xl",
|
|
61
|
+
color: "fg.muted",
|
|
62
|
+
children: "Esc"
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
$[3] = t3;
|
|
68
|
+
} else t3 = $[3];
|
|
69
|
+
return t3;
|
|
70
|
+
};
|
|
71
|
+
const Shortcut = (t0) => {
|
|
72
|
+
const $ = c(5);
|
|
73
|
+
const { children, label } = t0;
|
|
74
|
+
let t1;
|
|
75
|
+
if ($[0] !== label) {
|
|
76
|
+
t1 = /* @__PURE__ */ jsx(Text, {
|
|
77
|
+
color: "fg.muted",
|
|
78
|
+
textStyle: "sm",
|
|
79
|
+
fontWeight: "medium",
|
|
80
|
+
children: label
|
|
81
|
+
});
|
|
82
|
+
$[0] = label;
|
|
83
|
+
$[1] = t1;
|
|
84
|
+
} else t1 = $[1];
|
|
85
|
+
let t2;
|
|
86
|
+
if ($[2] !== children || $[3] !== t1) {
|
|
87
|
+
t2 = /* @__PURE__ */ jsxs(HStack, { children: [children, t1] });
|
|
88
|
+
$[2] = children;
|
|
89
|
+
$[3] = t1;
|
|
90
|
+
$[4] = t2;
|
|
91
|
+
} else t2 = $[4];
|
|
92
|
+
return t2;
|
|
93
|
+
};
|
|
94
|
+
const KeyboardKey = (props) => {
|
|
95
|
+
const $ = c(2);
|
|
96
|
+
let t0;
|
|
97
|
+
if ($[0] !== props) {
|
|
98
|
+
t0 = /* @__PURE__ */ jsx(Kbd, {
|
|
99
|
+
variant: "surface",
|
|
100
|
+
size: "2xl",
|
|
101
|
+
children: /* @__PURE__ */ jsx(Icon, { ...props })
|
|
102
|
+
});
|
|
103
|
+
$[0] = props;
|
|
104
|
+
$[1] = t0;
|
|
105
|
+
} else t0 = $[1];
|
|
106
|
+
return t0;
|
|
46
107
|
};
|
|
47
|
-
const Shortcut = ({ children, label }) => <HStack>
|
|
48
|
-
{children}
|
|
49
|
-
<Text color="fg.muted" textStyle="sm" fontWeight="medium">
|
|
50
|
-
{label}
|
|
51
|
-
</Text>
|
|
52
|
-
</HStack>;
|
|
53
|
-
const KeyboardKey = (props) => <Kbd variant="surface" size="2xl">
|
|
54
|
-
<Icon {...props} />
|
|
55
|
-
</Kbd>;
|
|
56
108
|
|
|
57
109
|
//#endregion
|
|
58
110
|
//#region src/components/spotlight/search-result-item.tsx
|
|
59
111
|
const SearchResultItem = (props) => {
|
|
112
|
+
const $ = c(16);
|
|
60
113
|
const { item, filterText } = props;
|
|
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
|
-
|
|
114
|
+
let t0;
|
|
115
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
116
|
+
t0 = { bg: "gray.surface.bg.hover" };
|
|
117
|
+
$[0] = t0;
|
|
118
|
+
} else t0 = $[0];
|
|
119
|
+
let t1;
|
|
120
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
121
|
+
t1 = /* @__PURE__ */ jsx(Center, {
|
|
122
|
+
borderWidth: "1px",
|
|
123
|
+
borderRadius: "l2",
|
|
124
|
+
boxSize: "10",
|
|
125
|
+
children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(UserIcon, {}) })
|
|
126
|
+
});
|
|
127
|
+
$[1] = t1;
|
|
128
|
+
} else t1 = $[1];
|
|
129
|
+
let t2;
|
|
130
|
+
if ($[2] !== item.label) {
|
|
131
|
+
t2 = /* @__PURE__ */ jsx(Text, {
|
|
132
|
+
fontWeight: "medium",
|
|
133
|
+
children: item.label
|
|
134
|
+
});
|
|
135
|
+
$[2] = item.label;
|
|
136
|
+
$[3] = t2;
|
|
137
|
+
} else t2 = $[3];
|
|
138
|
+
const t3 = item.matchReason?.property;
|
|
139
|
+
let t4;
|
|
140
|
+
if ($[4] !== t3) {
|
|
141
|
+
t4 = /* @__PURE__ */ jsx(Breadcrumb.Item, { children: t3 });
|
|
142
|
+
$[4] = t3;
|
|
143
|
+
$[5] = t4;
|
|
144
|
+
} else t4 = $[5];
|
|
145
|
+
let t5;
|
|
146
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
147
|
+
t5 = /* @__PURE__ */ jsx(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx(ChevronRightIcon, {}) });
|
|
148
|
+
$[6] = t5;
|
|
149
|
+
} else t5 = $[6];
|
|
150
|
+
const t6 = filterText ?? "";
|
|
151
|
+
const t7 = item.matchReason?.value ?? "";
|
|
152
|
+
let t8;
|
|
153
|
+
if ($[7] !== t6 || $[8] !== t7) {
|
|
154
|
+
t8 = /* @__PURE__ */ jsx(Breadcrumb.Item, {
|
|
155
|
+
color: "fg.muted",
|
|
156
|
+
children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx(Highlight, {
|
|
157
|
+
query: t6,
|
|
158
|
+
variant: "subtle",
|
|
159
|
+
colorPalette: "teal",
|
|
160
|
+
children: t7
|
|
161
|
+
}) })
|
|
162
|
+
});
|
|
163
|
+
$[7] = t6;
|
|
164
|
+
$[8] = t7;
|
|
165
|
+
$[9] = t8;
|
|
166
|
+
} else t8 = $[9];
|
|
167
|
+
let t9;
|
|
168
|
+
if ($[10] !== t4 || $[11] !== t8) {
|
|
169
|
+
t9 = /* @__PURE__ */ jsx(Breadcrumb.Root, {
|
|
170
|
+
size: "sm",
|
|
171
|
+
children: /* @__PURE__ */ jsxs(Breadcrumb.List, {
|
|
172
|
+
gap: "0.5",
|
|
173
|
+
children: [
|
|
174
|
+
t4,
|
|
175
|
+
t5,
|
|
176
|
+
t8
|
|
177
|
+
]
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
$[10] = t4;
|
|
181
|
+
$[11] = t8;
|
|
182
|
+
$[12] = t9;
|
|
183
|
+
} else t9 = $[12];
|
|
184
|
+
let t10;
|
|
185
|
+
if ($[13] !== t2 || $[14] !== t9) {
|
|
186
|
+
t10 = /* @__PURE__ */ jsxs(HStack, {
|
|
187
|
+
py: "2.5",
|
|
188
|
+
px: "3.5",
|
|
189
|
+
borderRadius: "l3",
|
|
190
|
+
_hover: t0,
|
|
191
|
+
children: [t1, /* @__PURE__ */ jsxs(Box, {
|
|
192
|
+
textStyle: "sm",
|
|
193
|
+
children: [t2, t9]
|
|
194
|
+
})]
|
|
195
|
+
});
|
|
196
|
+
$[13] = t2;
|
|
197
|
+
$[14] = t9;
|
|
198
|
+
$[15] = t10;
|
|
199
|
+
} else t10 = $[15];
|
|
200
|
+
return t10;
|
|
86
201
|
};
|
|
87
202
|
|
|
88
203
|
//#endregion
|
|
89
204
|
//#region src/components/spotlight/spotlight.tsx
|
|
90
205
|
const Spotlight = (props) => {
|
|
206
|
+
const $ = c(46);
|
|
91
207
|
const { searchList, children, onHighlightChange } = props;
|
|
92
208
|
const [open, setOpen] = useState(false);
|
|
93
209
|
useHotkey(setOpen);
|
|
94
210
|
const [filterText, setFilterText] = useState("");
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
setFilterText(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
211
|
+
let t0;
|
|
212
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
+
t0 = { wait: 250 };
|
|
214
|
+
$[0] = t0;
|
|
215
|
+
} else t0 = $[0];
|
|
216
|
+
const debouncedValue = useDebounce(filterText, t0);
|
|
217
|
+
let t1;
|
|
218
|
+
if ($[1] !== debouncedValue || $[2] !== searchList) {
|
|
219
|
+
t1 = () => {
|
|
220
|
+
console.log("Setting filter text to:", debouncedValue);
|
|
221
|
+
searchList.setFilterText(debouncedValue);
|
|
222
|
+
};
|
|
223
|
+
$[1] = debouncedValue;
|
|
224
|
+
$[2] = searchList;
|
|
225
|
+
$[3] = t1;
|
|
226
|
+
} else t1 = $[3];
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[4] !== debouncedValue) {
|
|
229
|
+
t2 = [debouncedValue];
|
|
230
|
+
$[4] = debouncedValue;
|
|
231
|
+
$[5] = t2;
|
|
232
|
+
} else t2 = $[5];
|
|
233
|
+
useEffect(t1, t2);
|
|
234
|
+
let t3;
|
|
235
|
+
if ($[6] !== searchList.items) {
|
|
236
|
+
t3 = createListCollection({ items: searchList.items });
|
|
237
|
+
$[6] = searchList.items;
|
|
238
|
+
$[7] = t3;
|
|
239
|
+
} else t3 = $[7];
|
|
240
|
+
const collection = t3;
|
|
241
|
+
let t4;
|
|
242
|
+
if ($[8] !== searchList) {
|
|
243
|
+
t4 = (event) => {
|
|
244
|
+
setOpen(event.open);
|
|
245
|
+
if (!event.open) {
|
|
246
|
+
setFilterText("");
|
|
247
|
+
searchList.setFilterText("");
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
$[8] = searchList;
|
|
251
|
+
$[9] = t4;
|
|
252
|
+
} else t4 = $[9];
|
|
253
|
+
let t5;
|
|
254
|
+
let t6;
|
|
255
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
256
|
+
t5 = /* @__PURE__ */ jsx(Icon, {
|
|
257
|
+
color: "fg.muted",
|
|
258
|
+
size: "sm",
|
|
259
|
+
children: /* @__PURE__ */ jsx(SearchIcon, {})
|
|
260
|
+
});
|
|
261
|
+
t6 = /* @__PURE__ */ jsx(Span, {
|
|
262
|
+
fontWeight: "normal",
|
|
263
|
+
flex: "1",
|
|
264
|
+
minW: "0",
|
|
265
|
+
textAlign: "start",
|
|
266
|
+
children: "Find..."
|
|
267
|
+
});
|
|
268
|
+
$[10] = t5;
|
|
269
|
+
$[11] = t6;
|
|
270
|
+
} else {
|
|
271
|
+
t5 = $[10];
|
|
272
|
+
t6 = $[11];
|
|
273
|
+
}
|
|
274
|
+
let t7;
|
|
275
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
276
|
+
t7 = /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
277
|
+
asChild: true,
|
|
278
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
279
|
+
variant: "outline",
|
|
280
|
+
size: "sm",
|
|
281
|
+
minW: "56",
|
|
282
|
+
children: [
|
|
283
|
+
t5,
|
|
284
|
+
t6,
|
|
285
|
+
/* @__PURE__ */ jsxs(Kbd, {
|
|
286
|
+
variant: "surface",
|
|
287
|
+
size: "sm",
|
|
288
|
+
gap: "0.5",
|
|
289
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
290
|
+
boxSize: "3",
|
|
291
|
+
children: /* @__PURE__ */ jsx(CommandIcon, {})
|
|
292
|
+
}), "K"]
|
|
293
|
+
})
|
|
294
|
+
]
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
$[12] = t7;
|
|
298
|
+
} else t7 = $[12];
|
|
299
|
+
let t8;
|
|
300
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
301
|
+
t8 = /* @__PURE__ */ jsx(Dialog.Backdrop, {});
|
|
302
|
+
$[13] = t8;
|
|
303
|
+
} else t8 = $[13];
|
|
304
|
+
let t9;
|
|
305
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
306
|
+
t9 = (t10) => {
|
|
307
|
+
const { inputValue } = t10;
|
|
308
|
+
return setFilterText(inputValue || "");
|
|
309
|
+
};
|
|
310
|
+
$[14] = t9;
|
|
311
|
+
} else t9 = $[14];
|
|
312
|
+
let t10;
|
|
313
|
+
if ($[15] !== onHighlightChange) {
|
|
314
|
+
t10 = (e) => onHighlightChange?.(e.highlightedItem);
|
|
315
|
+
$[15] = onHighlightChange;
|
|
316
|
+
$[16] = t10;
|
|
317
|
+
} else t10 = $[16];
|
|
318
|
+
let t11;
|
|
319
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
320
|
+
t11 = { content: "list" };
|
|
321
|
+
$[17] = t11;
|
|
322
|
+
} else t11 = $[17];
|
|
323
|
+
let t12;
|
|
324
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
325
|
+
t12 = /* @__PURE__ */ jsx(Dialog.Header, {
|
|
326
|
+
px: "1",
|
|
327
|
+
p: "2",
|
|
328
|
+
children: /* @__PURE__ */ jsx(InputGroup, {
|
|
329
|
+
startElement: /* @__PURE__ */ jsx(SearchIcon, {}),
|
|
330
|
+
children: /* @__PURE__ */ jsx(Combobox.Input, {})
|
|
331
|
+
})
|
|
332
|
+
});
|
|
333
|
+
$[18] = t12;
|
|
334
|
+
} else t12 = $[18];
|
|
335
|
+
let t13;
|
|
336
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
337
|
+
t13 = { viewport: "list" };
|
|
338
|
+
$[19] = t13;
|
|
339
|
+
} else t13 = $[19];
|
|
340
|
+
let t14;
|
|
341
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
342
|
+
t14 = /* @__PURE__ */ jsx(Combobox.Empty, { children: "No results found." });
|
|
343
|
+
$[20] = t14;
|
|
344
|
+
} else t14 = $[20];
|
|
345
|
+
let t15;
|
|
346
|
+
if ($[21] !== collection.items || $[22] !== debouncedValue) {
|
|
347
|
+
let t16;
|
|
348
|
+
if ($[24] !== debouncedValue) {
|
|
349
|
+
t16 = (item) => /* @__PURE__ */ jsx(Combobox.Item, {
|
|
350
|
+
item,
|
|
351
|
+
persistFocus: true,
|
|
352
|
+
p: "0",
|
|
353
|
+
children: /* @__PURE__ */ jsx(SearchResultItem, {
|
|
354
|
+
item,
|
|
355
|
+
filterText: debouncedValue
|
|
356
|
+
})
|
|
357
|
+
}, item.value);
|
|
358
|
+
$[24] = debouncedValue;
|
|
359
|
+
$[25] = t16;
|
|
360
|
+
} else t16 = $[25];
|
|
361
|
+
t15 = collection.items.map(t16);
|
|
362
|
+
$[21] = collection.items;
|
|
363
|
+
$[22] = debouncedValue;
|
|
364
|
+
$[23] = t15;
|
|
365
|
+
} else t15 = $[23];
|
|
366
|
+
let t16;
|
|
367
|
+
if ($[26] !== t15) {
|
|
368
|
+
t16 = /* @__PURE__ */ jsx(ScrollArea, {
|
|
369
|
+
size: "sm",
|
|
370
|
+
ids: t13,
|
|
371
|
+
children: /* @__PURE__ */ jsxs(Combobox.List, {
|
|
372
|
+
gap: "1",
|
|
373
|
+
p: "2",
|
|
374
|
+
children: [t14, t15]
|
|
375
|
+
})
|
|
376
|
+
});
|
|
377
|
+
$[26] = t15;
|
|
378
|
+
$[27] = t16;
|
|
379
|
+
} else t16 = $[27];
|
|
380
|
+
const t17 = children !== null;
|
|
381
|
+
let t18;
|
|
382
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
383
|
+
t18 = /* @__PURE__ */ jsx(Center, { children: "Placeholder to explain how search works" });
|
|
384
|
+
$[28] = t18;
|
|
385
|
+
} else t18 = $[28];
|
|
386
|
+
let t19;
|
|
387
|
+
if ($[29] !== children || $[30] !== t17) {
|
|
388
|
+
t19 = /* @__PURE__ */ jsx(ScrollArea, {
|
|
389
|
+
size: "sm",
|
|
390
|
+
h: "full",
|
|
391
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
392
|
+
py: "4",
|
|
393
|
+
ps: "4",
|
|
394
|
+
pe: "8",
|
|
395
|
+
children: /* @__PURE__ */ jsx(Show, {
|
|
396
|
+
when: t17,
|
|
397
|
+
fallback: t18,
|
|
398
|
+
children
|
|
399
|
+
})
|
|
400
|
+
})
|
|
401
|
+
});
|
|
402
|
+
$[29] = children;
|
|
403
|
+
$[30] = t17;
|
|
404
|
+
$[31] = t19;
|
|
405
|
+
} else t19 = $[31];
|
|
406
|
+
let t20;
|
|
407
|
+
if ($[32] !== t16 || $[33] !== t19) {
|
|
408
|
+
t20 = /* @__PURE__ */ jsx(Dialog.Body, {
|
|
409
|
+
px: "0",
|
|
410
|
+
children: /* @__PURE__ */ jsxs(Grid, {
|
|
411
|
+
columns: 2,
|
|
412
|
+
gridTemplateColumns: "2fr 3fr",
|
|
413
|
+
width: "full",
|
|
414
|
+
h: "xl",
|
|
415
|
+
divideX: "1px",
|
|
416
|
+
children: [t16, t19]
|
|
417
|
+
})
|
|
418
|
+
});
|
|
419
|
+
$[32] = t16;
|
|
420
|
+
$[33] = t19;
|
|
421
|
+
$[34] = t20;
|
|
422
|
+
} else t20 = $[34];
|
|
423
|
+
let t21;
|
|
424
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
425
|
+
t21 = /* @__PURE__ */ jsx(Dialog.Footer, {
|
|
426
|
+
py: "3.5",
|
|
427
|
+
px: "4",
|
|
428
|
+
justifyContent: "start",
|
|
429
|
+
children: /* @__PURE__ */ jsx(KeyboardHints, {})
|
|
430
|
+
});
|
|
431
|
+
$[35] = t21;
|
|
432
|
+
} else t21 = $[35];
|
|
433
|
+
let t22;
|
|
434
|
+
if ($[36] !== t20) {
|
|
435
|
+
t22 = /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
436
|
+
maxW: "4xl",
|
|
437
|
+
divideY: "1px",
|
|
438
|
+
children: [
|
|
439
|
+
t12,
|
|
440
|
+
t20,
|
|
441
|
+
t21
|
|
442
|
+
]
|
|
443
|
+
});
|
|
444
|
+
$[36] = t20;
|
|
445
|
+
$[37] = t22;
|
|
446
|
+
} else t22 = $[37];
|
|
447
|
+
let t23;
|
|
448
|
+
if ($[38] !== collection || $[39] !== t10 || $[40] !== t22) {
|
|
449
|
+
t23 = /* @__PURE__ */ jsxs(Portal, { children: [t8, /* @__PURE__ */ jsx(Dialog.Positioner, { children: /* @__PURE__ */ jsx(Combobox.Root, {
|
|
450
|
+
open: true,
|
|
451
|
+
disableLayer: true,
|
|
452
|
+
inputBehavior: "autohighlight",
|
|
453
|
+
placeholder: "Search...",
|
|
454
|
+
selectionBehavior: "preserve",
|
|
455
|
+
collection,
|
|
456
|
+
loopFocus: false,
|
|
457
|
+
onInputValueChange: t9,
|
|
458
|
+
onHighlightChange: t10,
|
|
459
|
+
variant: "plain",
|
|
460
|
+
ids: t11,
|
|
461
|
+
children: t22
|
|
462
|
+
}) })] });
|
|
463
|
+
$[38] = collection;
|
|
464
|
+
$[39] = t10;
|
|
465
|
+
$[40] = t22;
|
|
466
|
+
$[41] = t23;
|
|
467
|
+
} else t23 = $[41];
|
|
468
|
+
let t24;
|
|
469
|
+
if ($[42] !== open || $[43] !== t23 || $[44] !== t4) {
|
|
470
|
+
t24 = /* @__PURE__ */ jsxs(Dialog.Root, {
|
|
471
|
+
open,
|
|
472
|
+
onOpenChange: t4,
|
|
473
|
+
motionPreset: "slide-in-bottom",
|
|
474
|
+
scrollBehavior: "inside",
|
|
475
|
+
children: [t7, t23]
|
|
476
|
+
});
|
|
477
|
+
$[42] = open;
|
|
478
|
+
$[43] = t23;
|
|
479
|
+
$[44] = t4;
|
|
480
|
+
$[45] = t24;
|
|
481
|
+
} else t24 = $[45];
|
|
482
|
+
return t24;
|
|
162
483
|
};
|
|
163
484
|
|
|
164
485
|
//#endregion
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../chunk-BYypO7fO.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { ark } from "@ark-ui/react/factory";
|
|
4
5
|
import { Box, createStyleContext } from "@pyck/styled-system/jsx";
|
|
5
6
|
import { steps } from "@pyck/styled-system/recipes";
|
|
6
7
|
import { CheckIcon } from "lucide-react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
7
9
|
import { Steps } from "@ark-ui/react/steps";
|
|
8
10
|
|
|
9
11
|
//#region src/components/steps/steps.tsx
|
|
@@ -39,21 +41,41 @@ const Separator = withContext(Steps.Separator, "separator");
|
|
|
39
41
|
const Trigger = withContext(Steps.Trigger, "trigger");
|
|
40
42
|
const Title = withContext(ark.div, "title");
|
|
41
43
|
const Description = withContext(ark.div, "description");
|
|
42
|
-
const Status = (props) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
44
|
+
const Status = (props) => {
|
|
45
|
+
const $ = c(4);
|
|
46
|
+
let t0;
|
|
47
|
+
if ($[0] !== props.complete || $[1] !== props.current || $[2] !== props.incomplete) {
|
|
48
|
+
t0 = /* @__PURE__ */ jsx(Steps.ItemContext, { children: (api) => {
|
|
49
|
+
if (api.current) return /* @__PURE__ */ jsx(Fragment$1, { children: props.current ?? props.incomplete });
|
|
50
|
+
if (api.completed) return /* @__PURE__ */ jsx(Fragment$1, { children: props.complete });
|
|
51
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: props.incomplete ?? props.current });
|
|
52
|
+
} });
|
|
53
|
+
$[0] = props.complete;
|
|
54
|
+
$[1] = props.current;
|
|
55
|
+
$[2] = props.incomplete;
|
|
56
|
+
$[3] = t0;
|
|
57
|
+
} else t0 = $[3];
|
|
58
|
+
return t0;
|
|
59
|
+
};
|
|
49
60
|
const StepNumber = forwardRef(function StepNumber(props, ref) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
const $ = c(3);
|
|
62
|
+
let t0;
|
|
63
|
+
if ($[0] !== props || $[1] !== ref) {
|
|
64
|
+
t0 = /* @__PURE__ */ jsx(Steps.ItemContext, { children: (api) => /* @__PURE__ */ jsx(Box, {
|
|
65
|
+
ref,
|
|
66
|
+
...props,
|
|
67
|
+
children: api.index + 1
|
|
68
|
+
}) });
|
|
69
|
+
$[0] = props;
|
|
70
|
+
$[1] = ref;
|
|
71
|
+
$[2] = t0;
|
|
72
|
+
} else t0 = $[2];
|
|
73
|
+
return t0;
|
|
55
74
|
});
|
|
56
|
-
const Indicator = withContext(Steps.Indicator, "indicator", { defaultProps: { children:
|
|
75
|
+
const Indicator = withContext(Steps.Indicator, "indicator", { defaultProps: { children: /* @__PURE__ */ jsx(Status, {
|
|
76
|
+
complete: /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
77
|
+
incomplete: /* @__PURE__ */ jsx(StepNumber, {})
|
|
78
|
+
}) } });
|
|
57
79
|
const Context = Steps.Context;
|
|
58
80
|
const ItemContext = Steps.ItemContext;
|
|
59
81
|
|