@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.
Files changed (88) hide show
  1. package/dist/checkmark-rF75Pk98.js +75 -0
  2. package/dist/close-button-DAgpEZYq.js +172 -0
  3. package/dist/components/avatar/index.js +118 -20
  4. package/dist/components/button/index.js +1 -1
  5. package/dist/components/carousel/index.js +52 -12
  6. package/dist/components/checkbox/index.d.ts +1 -1
  7. package/dist/components/checkbox/index.js +151 -34
  8. package/dist/components/checkmark/index.js +1 -1
  9. package/dist/components/clipboard/index.js +3 -2
  10. package/dist/components/combobox/index.js +46 -9
  11. package/dist/components/data-list/index.d.ts +3 -2
  12. package/dist/components/data-list/index.js +23 -8
  13. package/dist/components/date-picker/index.js +17 -10
  14. package/dist/components/dialog/index.d.ts +1 -1
  15. package/dist/components/dialog/index.js +156 -95
  16. package/dist/components/display-date-value/index.d.ts +1 -1
  17. package/dist/components/display-date-value/index.js +2 -2
  18. package/dist/components/display-value/index.js +1 -1
  19. package/dist/components/drawer/index.d.ts +1 -1
  20. package/dist/components/drawer/index.js +22 -1
  21. package/dist/components/drilldown-menu/index.js +268 -87
  22. package/dist/components/field/index.js +110 -27
  23. package/dist/components/floating-panel/index.d.ts +1 -1
  24. package/dist/components/floating-panel/index.js +91 -43
  25. package/dist/components/form/index.d.ts +1 -1
  26. package/dist/components/form/index.js +142 -26
  27. package/dist/components/highlight/index.d.ts +1 -1
  28. package/dist/components/highlight/index.js +63 -14
  29. package/dist/components/icon/index.d.ts +1 -1
  30. package/dist/components/icon/index.js +1 -1
  31. package/dist/components/image/index.js +33 -2
  32. package/dist/components/input/index.d.ts +1 -1
  33. package/dist/components/input/index.js +67 -4
  34. package/dist/components/input-group/index.js +79 -14
  35. package/dist/components/json-form-builder/index.d.ts +1 -1
  36. package/dist/components/json-form-builder/index.js +383 -99
  37. package/dist/components/loader/index.js +35 -15
  38. package/dist/components/logo/index.js +97 -19
  39. package/dist/components/menu/index.d.ts +1 -1
  40. package/dist/components/menu/index.js +41 -7
  41. package/dist/components/number-input/index.d.ts +1 -1
  42. package/dist/components/number-input/index.js +68 -13
  43. package/dist/components/page-header/index.js +67 -12
  44. package/dist/components/pagination/index.d.ts +1 -1
  45. package/dist/components/pagination/index.js +52 -13
  46. package/dist/components/picker/index.js +56 -28
  47. package/dist/components/popover/index.d.ts +1 -1
  48. package/dist/components/popover/index.js +2 -1
  49. package/dist/components/progress/index.js +57 -23
  50. package/dist/components/progress-circle/index.js +82 -30
  51. package/dist/components/radio-group/index.js +60 -19
  52. package/dist/components/scroll-area/index.js +80 -19
  53. package/dist/components/segment-group/index.d.ts +1 -1
  54. package/dist/components/segment-group/index.js +40 -5
  55. package/dist/components/select/index.d.ts +1 -1
  56. package/dist/components/select/index.js +119 -22
  57. package/dist/components/show/index.js +1 -1
  58. package/dist/components/skeleton/index.js +55 -4
  59. package/dist/components/slider/index.d.ts +1 -0
  60. package/dist/components/slider/index.js +174 -55
  61. package/dist/components/spotlight/index.js +447 -126
  62. package/dist/components/steps/index.js +35 -13
  63. package/dist/components/switch/index.d.ts +1 -1
  64. package/dist/components/switch/index.js +210 -43
  65. package/dist/components/table/index.d.ts +1 -1
  66. package/dist/components/table/index.js +435 -67
  67. package/dist/components/tags-input/index.d.ts +1 -1
  68. package/dist/components/tags-input/index.js +25 -9
  69. package/dist/components/textarea/index.d.ts +1 -1
  70. package/dist/components/textarea/index.js +66 -4
  71. package/dist/components/toast/index.d.ts +1 -1
  72. package/dist/components/toast/index.js +56 -22
  73. package/dist/components/tooltip/index.d.ts +1 -1
  74. package/dist/components/tooltip/index.js +87 -25
  75. package/dist/components/tree-view/index.d.ts +1 -1
  76. package/dist/components/tree-view/index.js +64 -8
  77. package/dist/display-date-value-CSPbdE60.js +45 -0
  78. package/dist/{display-date-value-CdfgVuB7.d.ts → display-date-value-RbzRgYHt.d.ts} +1 -1
  79. package/dist/display-value-R2nHrGQo.js +81 -0
  80. package/dist/{featured-icon-DPysOpSf.js → featured-icon-DBnAKGXC.js} +31 -4
  81. package/dist/show-B7zG1Vci.js +28 -0
  82. package/dist/utils/index.js +164 -73
  83. package/package.json +6 -3
  84. package/dist/checkmark-CW-yHMvN.js +0 -18
  85. package/dist/close-button-BM7ikbYh.js +0 -52
  86. package/dist/display-date-value-gTlidtNz.js +0 -21
  87. package/dist/display-value-BNKxQ99u.js +0 -37
  88. 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
- return <HStack gap="4">
23
- <Shortcut label="to navigate">
24
- <HStack gap="1.5">
25
- <KeyboardKey>
26
- <ArrowUpIcon />
27
- </KeyboardKey>
28
- <KeyboardKey>
29
- <ArrowDownIcon />
30
- </KeyboardKey>
31
- </HStack>
32
- </Shortcut>
33
-
34
- <Shortcut label="to select">
35
- <KeyboardKey>
36
- <CornerDownLeftIcon />
37
- </KeyboardKey>
38
- </Shortcut>
39
-
40
- <Shortcut label="to close">
41
- <Kbd variant="surface" size="2xl" color="fg.muted">
42
- Esc
43
- </Kbd>
44
- </Shortcut>
45
- </HStack>;
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
- return <HStack py="2.5" px="3.5" borderRadius="l3" _hover={{ bg: "gray.surface.bg.hover" }}>
62
- <Center borderWidth="1px" borderRadius="l2" boxSize="10">
63
- <Icon>
64
- <UserIcon />
65
- </Icon>
66
- </Center>
67
- <Box textStyle="sm">
68
- <Text fontWeight="medium">{item.label}</Text>
69
- <Breadcrumb.Root size="sm">
70
- <Breadcrumb.List gap="0.5">
71
- <Breadcrumb.Item>{item.matchReason?.property}</Breadcrumb.Item>
72
- <Breadcrumb.Separator>
73
- <ChevronRightIcon />
74
- </Breadcrumb.Separator>
75
- <Breadcrumb.Item color="fg.muted">
76
- <Text>
77
- <Highlight query={filterText ?? ""} variant="subtle" colorPalette="teal">
78
- {item.matchReason?.value ?? ""}
79
- </Highlight>
80
- </Text>
81
- </Breadcrumb.Item>
82
- </Breadcrumb.List>
83
- </Breadcrumb.Root>
84
- </Box>
85
- </HStack>;
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
- const debouncedValue = useDebounce(filterText, { wait: 250 });
96
- useEffect(() => {
97
- console.log("Setting filter text to:", debouncedValue);
98
- searchList.setFilterText(debouncedValue);
99
- }, [debouncedValue]);
100
- const collection = useMemo(() => createListCollection({ items: searchList.items }), [searchList.items]);
101
- const id = "list";
102
- return <Dialog.Root open={open} onOpenChange={(event) => {
103
- setOpen(event.open);
104
- if (!event.open) {
105
- setFilterText("");
106
- searchList.setFilterText("");
107
- }
108
- }} motionPreset="slide-in-bottom" scrollBehavior="inside">
109
- <Dialog.Trigger asChild>
110
- <Button variant="outline" size="sm" minW="56">
111
- <Icon color="fg.muted" size="sm">
112
- <SearchIcon />
113
- </Icon>
114
- <Span fontWeight="normal" flex="1" minW="0" textAlign="start">
115
- Find...
116
- </Span>
117
- <Kbd variant="surface" size="sm" gap="0.5">
118
- <Icon boxSize="3">
119
- <CommandIcon />
120
- </Icon>
121
- K
122
- </Kbd>
123
- </Button>
124
- </Dialog.Trigger>
125
- <Portal>
126
- <Dialog.Backdrop />
127
- <Dialog.Positioner>
128
- <Combobox.Root open disableLayer inputBehavior="autohighlight" placeholder="Search..." selectionBehavior="preserve" collection={collection} loopFocus={false} onInputValueChange={({ inputValue }) => setFilterText(inputValue || "")} onHighlightChange={(e) => onHighlightChange?.(e.highlightedItem)} variant="plain" ids={{ content: id }}>
129
- <Dialog.Content maxW="4xl" divideY="1px">
130
- <Dialog.Header px="1" p="2">
131
- <InputGroup startElement={<SearchIcon />}>
132
- <Combobox.Input />
133
- </InputGroup>
134
- </Dialog.Header>
135
- <Dialog.Body px="0">
136
- <Grid columns={2} gridTemplateColumns="2fr 3fr" width="full" h="xl" divideX="1px">
137
- <ScrollArea size="sm" ids={{ viewport: id }}>
138
- <Combobox.List gap="1" p="2">
139
- <Combobox.Empty>No results found.</Combobox.Empty>
140
- {collection.items.map((item) => <Combobox.Item key={item.value} item={item} persistFocus p="0">
141
- <SearchResultItem item={item} filterText={debouncedValue} />
142
- </Combobox.Item>)}
143
- </Combobox.List>
144
- </ScrollArea>
145
- <ScrollArea size="sm" h="full">
146
- <Box py="4" ps="4" pe="8">
147
- <Show when={children !== null} fallback={<Center>Placeholder to explain how search works</Center>}>
148
- {children}
149
- </Show>
150
- </Box>
151
- </ScrollArea>
152
- </Grid>
153
- </Dialog.Body>
154
- <Dialog.Footer py="3.5" px="4" justifyContent="start">
155
- <KeyboardHints />
156
- </Dialog.Footer>
157
- </Dialog.Content>
158
- </Combobox.Root>
159
- </Dialog.Positioner>
160
- </Portal>
161
- </Dialog.Root>;
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) => <Steps.ItemContext>
43
- {(api) => {
44
- if (api.current) return <>{props.current ?? props.incomplete}</>;
45
- if (api.completed) return <>{props.complete}</>;
46
- return <>{props.incomplete ?? props.current}</>;
47
- }}
48
- </Steps.ItemContext>;
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
- return <Steps.ItemContext>
51
- {(api) => <Box ref={ref} {...props}>
52
- {api.index + 1}
53
- </Box>}
54
- </Steps.ItemContext>;
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: <Status complete={<CheckIcon />} incomplete={<StepNumber />} /> } });
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