@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,9 +1,11 @@
1
1
  import { t as __exportAll } from "../../chunk-BYypO7fO.js";
2
2
  import { match } from "ts-pattern";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { useCallback, useEffect, useState } from "react";
4
5
  import { ark } from "@ark-ui/react/factory";
5
6
  import { Box, HStack, createStyleContext } from "@pyck/styled-system/jsx";
6
7
  import { table } from "@pyck/styled-system/recipes";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
7
9
  import { Show } from "@pyck/react/show";
8
10
  import { Wrap } from "@pyck/react/wrap";
9
11
  import { Icon } from "@pyck/react/icon";
@@ -12,69 +14,388 @@ import { Tooltip } from "@pyck/react/tooltip";
12
14
  import { DisplayDateValue } from "@pyck/react/display-date-value";
13
15
 
14
16
  //#region src/components/table/cells/table-cell-content.tsx
15
- const renderIcon = (icon, iconProps) => match(icon).when((x) => typeof x === "function", (Icon) => <Icon {...iconProps} />).otherwise((node) => node ?? null);
17
+ const renderIcon = (icon, iconProps) => match(icon).when((x) => typeof x === "function", (Icon) => /* @__PURE__ */ jsx(Icon, { ...iconProps })).otherwise((node) => node ?? null);
16
18
  const TableCellContent = (props) => {
17
- const { children, icon, iconProps, tooltip, justifyContent = "flex-start", ...rest } = props;
18
- const content = <HStack justifyContent={justifyContent} {...rest}>
19
- <Wrap when={!!icon} with={(children) => <Icon boxSize="4">{children}</Icon>}>
20
- {renderIcon(icon, iconProps)}
21
- </Wrap>
22
-
23
- <Box overflow="hidden" textOverflow="ellipsis">
24
- {children}
25
- </Box>
26
- </HStack>;
27
- return <Show when={!!tooltip} fallback={content}>
28
- <Tooltip content={tooltip} openDelay={100}>
29
- {content}
30
- </Tooltip>
31
- </Show>;
19
+ const $ = c(27);
20
+ let children;
21
+ let icon;
22
+ let iconProps;
23
+ let rest;
24
+ let t0;
25
+ let tooltip;
26
+ if ($[0] !== props) {
27
+ ({children, icon, iconProps, tooltip, justifyContent: t0, ...rest} = props);
28
+ $[0] = props;
29
+ $[1] = children;
30
+ $[2] = icon;
31
+ $[3] = iconProps;
32
+ $[4] = rest;
33
+ $[5] = t0;
34
+ $[6] = tooltip;
35
+ } else {
36
+ children = $[1];
37
+ icon = $[2];
38
+ iconProps = $[3];
39
+ rest = $[4];
40
+ t0 = $[5];
41
+ tooltip = $[6];
42
+ }
43
+ const justifyContent = t0 === void 0 ? "flex-start" : t0;
44
+ const t1 = !!icon;
45
+ let t2;
46
+ if ($[7] !== icon || $[8] !== iconProps) {
47
+ t2 = renderIcon(icon, iconProps);
48
+ $[7] = icon;
49
+ $[8] = iconProps;
50
+ $[9] = t2;
51
+ } else t2 = $[9];
52
+ let t3;
53
+ if ($[10] !== t1 || $[11] !== t2) {
54
+ t3 = /* @__PURE__ */ jsx(Wrap, {
55
+ when: t1,
56
+ with: _temp,
57
+ children: t2
58
+ });
59
+ $[10] = t1;
60
+ $[11] = t2;
61
+ $[12] = t3;
62
+ } else t3 = $[12];
63
+ let t4;
64
+ if ($[13] !== children) {
65
+ t4 = /* @__PURE__ */ jsx(Box, {
66
+ overflow: "hidden",
67
+ textOverflow: "ellipsis",
68
+ children
69
+ });
70
+ $[13] = children;
71
+ $[14] = t4;
72
+ } else t4 = $[14];
73
+ let t5;
74
+ if ($[15] !== justifyContent || $[16] !== rest || $[17] !== t3 || $[18] !== t4) {
75
+ t5 = /* @__PURE__ */ jsxs(HStack, {
76
+ justifyContent,
77
+ ...rest,
78
+ children: [t3, t4]
79
+ });
80
+ $[15] = justifyContent;
81
+ $[16] = rest;
82
+ $[17] = t3;
83
+ $[18] = t4;
84
+ $[19] = t5;
85
+ } else t5 = $[19];
86
+ const content = t5;
87
+ const t6 = !!tooltip;
88
+ let t7;
89
+ if ($[20] !== content || $[21] !== tooltip) {
90
+ t7 = /* @__PURE__ */ jsx(Tooltip, {
91
+ content: tooltip,
92
+ openDelay: 100,
93
+ children: content
94
+ });
95
+ $[20] = content;
96
+ $[21] = tooltip;
97
+ $[22] = t7;
98
+ } else t7 = $[22];
99
+ let t8;
100
+ if ($[23] !== content || $[24] !== t6 || $[25] !== t7) {
101
+ t8 = /* @__PURE__ */ jsx(Show, {
102
+ when: t6,
103
+ fallback: content,
104
+ children: t7
105
+ });
106
+ $[23] = content;
107
+ $[24] = t6;
108
+ $[25] = t7;
109
+ $[26] = t8;
110
+ } else t8 = $[26];
111
+ return t8;
32
112
  };
113
+ function _temp(children_0) {
114
+ return /* @__PURE__ */ jsx(Icon, {
115
+ boxSize: "4",
116
+ children: children_0
117
+ });
118
+ }
33
119
 
34
120
  //#endregion
35
121
  //#region src/components/table/cells/boolean-cell.tsx
36
122
  const BooleanCell = (props) => {
37
- const { value: booleanValue, trueLabel = "Yes", falseLabel = "No", copyable, icon, tooltip, ...rest } = props;
38
- const value = booleanValue ? trueLabel : falseLabel;
39
- return <TableCellContent tooltip={tooltip} icon={icon} {...rest}>
40
- <DisplayValue value={value} copyable={copyable} />
41
- </TableCellContent>;
123
+ const $ = c(16);
124
+ let booleanValue;
125
+ let copyable;
126
+ let icon;
127
+ let rest;
128
+ let t0;
129
+ let t1;
130
+ let tooltip;
131
+ if ($[0] !== props) {
132
+ ({value: booleanValue, trueLabel: t0, falseLabel: t1, copyable, icon, tooltip, ...rest} = props);
133
+ $[0] = props;
134
+ $[1] = booleanValue;
135
+ $[2] = copyable;
136
+ $[3] = icon;
137
+ $[4] = rest;
138
+ $[5] = t0;
139
+ $[6] = t1;
140
+ $[7] = tooltip;
141
+ } else {
142
+ booleanValue = $[1];
143
+ copyable = $[2];
144
+ icon = $[3];
145
+ rest = $[4];
146
+ t0 = $[5];
147
+ t1 = $[6];
148
+ tooltip = $[7];
149
+ }
150
+ const value = booleanValue ? t0 === void 0 ? "Yes" : t0 : t1 === void 0 ? "No" : t1;
151
+ let t2;
152
+ if ($[8] !== copyable || $[9] !== value) {
153
+ t2 = /* @__PURE__ */ jsx(DisplayValue, {
154
+ value,
155
+ copyable
156
+ });
157
+ $[8] = copyable;
158
+ $[9] = value;
159
+ $[10] = t2;
160
+ } else t2 = $[10];
161
+ let t3;
162
+ if ($[11] !== icon || $[12] !== rest || $[13] !== t2 || $[14] !== tooltip) {
163
+ t3 = /* @__PURE__ */ jsx(TableCellContent, {
164
+ tooltip,
165
+ icon,
166
+ ...rest,
167
+ children: t2
168
+ });
169
+ $[11] = icon;
170
+ $[12] = rest;
171
+ $[13] = t2;
172
+ $[14] = tooltip;
173
+ $[15] = t3;
174
+ } else t3 = $[15];
175
+ return t3;
42
176
  };
43
177
 
44
178
  //#endregion
45
179
  //#region src/components/table/cells/date-cell.tsx
46
180
  const DateCell = (props) => {
47
- const { value, type = "date", format, locale, copyable, icon, tooltip, justifyContent, ...rest } = props;
48
- return <TableCellContent icon={icon} tooltip={tooltip} justifyContent={justifyContent} {...rest}>
49
- <DisplayDateValue value={value} type={type} format={format} locale={locale} copyable={copyable} />
50
- </TableCellContent>;
181
+ const $ = c(22);
182
+ let copyable;
183
+ let format;
184
+ let icon;
185
+ let justifyContent;
186
+ let locale;
187
+ let rest;
188
+ let t0;
189
+ let tooltip;
190
+ let value;
191
+ if ($[0] !== props) {
192
+ ({value, type: t0, format, locale, copyable, icon, tooltip, justifyContent, ...rest} = props);
193
+ $[0] = props;
194
+ $[1] = copyable;
195
+ $[2] = format;
196
+ $[3] = icon;
197
+ $[4] = justifyContent;
198
+ $[5] = locale;
199
+ $[6] = rest;
200
+ $[7] = t0;
201
+ $[8] = tooltip;
202
+ $[9] = value;
203
+ } else {
204
+ copyable = $[1];
205
+ format = $[2];
206
+ icon = $[3];
207
+ justifyContent = $[4];
208
+ locale = $[5];
209
+ rest = $[6];
210
+ t0 = $[7];
211
+ tooltip = $[8];
212
+ value = $[9];
213
+ }
214
+ const type = t0 === void 0 ? "date" : t0;
215
+ let t1;
216
+ if ($[10] !== copyable || $[11] !== format || $[12] !== locale || $[13] !== type || $[14] !== value) {
217
+ t1 = /* @__PURE__ */ jsx(DisplayDateValue, {
218
+ value,
219
+ type,
220
+ format,
221
+ locale,
222
+ copyable
223
+ });
224
+ $[10] = copyable;
225
+ $[11] = format;
226
+ $[12] = locale;
227
+ $[13] = type;
228
+ $[14] = value;
229
+ $[15] = t1;
230
+ } else t1 = $[15];
231
+ let t2;
232
+ if ($[16] !== icon || $[17] !== justifyContent || $[18] !== rest || $[19] !== t1 || $[20] !== tooltip) {
233
+ t2 = /* @__PURE__ */ jsx(TableCellContent, {
234
+ icon,
235
+ tooltip,
236
+ justifyContent,
237
+ ...rest,
238
+ children: t1
239
+ });
240
+ $[16] = icon;
241
+ $[17] = justifyContent;
242
+ $[18] = rest;
243
+ $[19] = t1;
244
+ $[20] = tooltip;
245
+ $[21] = t2;
246
+ } else t2 = $[21];
247
+ return t2;
51
248
  };
52
249
 
53
250
  //#endregion
54
251
  //#region src/components/table/cells/number-cell.tsx
55
252
  const NumberCell = (props) => {
56
- const { value, minimumFractionDigits, maximumFractionDigits, locale: localeProp, useGrouping, copyable, tooltip, justifyContent = "flex-end", icon, ...rest } = props;
253
+ const $ = c(26);
254
+ let copyable;
255
+ let icon;
256
+ let localeProp;
257
+ let maximumFractionDigits;
258
+ let minimumFractionDigits;
259
+ let rest;
260
+ let t0;
261
+ let tooltip;
262
+ let useGrouping;
263
+ let value;
264
+ if ($[0] !== props) {
265
+ ({value, minimumFractionDigits, maximumFractionDigits, locale: localeProp, useGrouping, copyable, tooltip, justifyContent: t0, icon, ...rest} = props);
266
+ $[0] = props;
267
+ $[1] = copyable;
268
+ $[2] = icon;
269
+ $[3] = localeProp;
270
+ $[4] = maximumFractionDigits;
271
+ $[5] = minimumFractionDigits;
272
+ $[6] = rest;
273
+ $[7] = t0;
274
+ $[8] = tooltip;
275
+ $[9] = useGrouping;
276
+ $[10] = value;
277
+ } else {
278
+ copyable = $[1];
279
+ icon = $[2];
280
+ localeProp = $[3];
281
+ maximumFractionDigits = $[4];
282
+ minimumFractionDigits = $[5];
283
+ rest = $[6];
284
+ t0 = $[7];
285
+ tooltip = $[8];
286
+ useGrouping = $[9];
287
+ value = $[10];
288
+ }
289
+ const justifyContent = t0 === void 0 ? "flex-end" : t0;
57
290
  const locale = localeProp ?? "en";
58
- const formatValue = (n) => {
59
- if (!Number.isFinite(n)) return null;
60
- return new Intl.NumberFormat(locale, {
61
- useGrouping,
62
- minimumFractionDigits,
63
- maximumFractionDigits
64
- }).format(n);
65
- };
66
- return <TableCellContent icon={icon} tooltip={tooltip} justifyContent={justifyContent} {...rest}>
67
- <DisplayValue value={value} formatValue={formatValue} copyable={copyable} />
68
- </TableCellContent>;
291
+ let t1;
292
+ if ($[11] !== locale || $[12] !== maximumFractionDigits || $[13] !== minimumFractionDigits || $[14] !== useGrouping) {
293
+ t1 = (n) => {
294
+ if (!Number.isFinite(n)) return null;
295
+ return new Intl.NumberFormat(locale, {
296
+ useGrouping,
297
+ minimumFractionDigits,
298
+ maximumFractionDigits
299
+ }).format(n);
300
+ };
301
+ $[11] = locale;
302
+ $[12] = maximumFractionDigits;
303
+ $[13] = minimumFractionDigits;
304
+ $[14] = useGrouping;
305
+ $[15] = t1;
306
+ } else t1 = $[15];
307
+ const formatValue = t1;
308
+ let t2;
309
+ if ($[16] !== copyable || $[17] !== formatValue || $[18] !== value) {
310
+ t2 = /* @__PURE__ */ jsx(DisplayValue, {
311
+ value,
312
+ formatValue,
313
+ copyable
314
+ });
315
+ $[16] = copyable;
316
+ $[17] = formatValue;
317
+ $[18] = value;
318
+ $[19] = t2;
319
+ } else t2 = $[19];
320
+ let t3;
321
+ if ($[20] !== icon || $[21] !== justifyContent || $[22] !== rest || $[23] !== t2 || $[24] !== tooltip) {
322
+ t3 = /* @__PURE__ */ jsx(TableCellContent, {
323
+ icon,
324
+ tooltip,
325
+ justifyContent,
326
+ ...rest,
327
+ children: t2
328
+ });
329
+ $[20] = icon;
330
+ $[21] = justifyContent;
331
+ $[22] = rest;
332
+ $[23] = t2;
333
+ $[24] = tooltip;
334
+ $[25] = t3;
335
+ } else t3 = $[25];
336
+ return t3;
69
337
  };
70
338
 
71
339
  //#endregion
72
340
  //#region src/components/table/cells/text-cell.tsx
73
341
  const TextCell = (props) => {
74
- const { value, formatValue, copyable, icon, tooltip, justifyContent = "flex-start", ...rest } = props;
75
- return <TableCellContent icon={icon} tooltip={tooltip} justifyContent={justifyContent} {...rest}>
76
- <DisplayValue value={value} formatValue={formatValue} copyable={copyable} />
77
- </TableCellContent>;
342
+ const $ = c(18);
343
+ let copyable;
344
+ let formatValue;
345
+ let icon;
346
+ let rest;
347
+ let t0;
348
+ let tooltip;
349
+ let value;
350
+ if ($[0] !== props) {
351
+ ({value, formatValue, copyable, icon, tooltip, justifyContent: t0, ...rest} = props);
352
+ $[0] = props;
353
+ $[1] = copyable;
354
+ $[2] = formatValue;
355
+ $[3] = icon;
356
+ $[4] = rest;
357
+ $[5] = t0;
358
+ $[6] = tooltip;
359
+ $[7] = value;
360
+ } else {
361
+ copyable = $[1];
362
+ formatValue = $[2];
363
+ icon = $[3];
364
+ rest = $[4];
365
+ t0 = $[5];
366
+ tooltip = $[6];
367
+ value = $[7];
368
+ }
369
+ const justifyContent = t0 === void 0 ? "flex-start" : t0;
370
+ let t1;
371
+ if ($[8] !== copyable || $[9] !== formatValue || $[10] !== value) {
372
+ t1 = /* @__PURE__ */ jsx(DisplayValue, {
373
+ value,
374
+ formatValue,
375
+ copyable
376
+ });
377
+ $[8] = copyable;
378
+ $[9] = formatValue;
379
+ $[10] = value;
380
+ $[11] = t1;
381
+ } else t1 = $[11];
382
+ let t2;
383
+ if ($[12] !== icon || $[13] !== justifyContent || $[14] !== rest || $[15] !== t1 || $[16] !== tooltip) {
384
+ t2 = /* @__PURE__ */ jsx(TableCellContent, {
385
+ icon,
386
+ tooltip,
387
+ justifyContent,
388
+ ...rest,
389
+ children: t1
390
+ });
391
+ $[12] = icon;
392
+ $[13] = justifyContent;
393
+ $[14] = rest;
394
+ $[15] = t1;
395
+ $[16] = tooltip;
396
+ $[17] = t2;
397
+ } else t2 = $[17];
398
+ return t2;
78
399
  };
79
400
 
80
401
  //#endregion
@@ -102,34 +423,81 @@ const Row = withContext(ark.tr, "row");
102
423
  //#endregion
103
424
  //#region src/components/table/use-virtualized-table-height.ts
104
425
  const SCROLL_THRESHOLD = .95;
105
- const useVirtualizedTableHeight = ({ virtualSize, tableRef, scrollRef }) => {
426
+ const useVirtualizedTableHeight = (t0) => {
427
+ const $ = c(17);
428
+ const { virtualSize, tableRef, scrollRef } = t0;
106
429
  const [isScrollNearBottom, setIsScrollNearBottom] = useState(false);
107
- const handlePseudoResize = useCallback(() => {
108
- return adjustTableHeight(tableRef, virtualSize);
109
- }, [tableRef, virtualSize]);
110
- const handleScroll = useCallback(() => {
111
- if (scrollRef.current) {
112
- const scrollPosition = scrollRef.current.scrollTop;
113
- const visibleHeight = scrollRef.current.clientHeight;
114
- setIsScrollNearBottom(scrollPosition > virtualSize * SCROLL_THRESHOLD - visibleHeight);
115
- }
116
- }, [scrollRef, virtualSize]);
117
- useEffect(() => {
118
- const scrollable = scrollRef.current;
119
- if (scrollable) scrollable.addEventListener("scroll", handleScroll);
120
- handlePseudoResize();
121
- return () => {
122
- if (scrollable) scrollable.removeEventListener("scroll", handleScroll);
430
+ let t1;
431
+ if ($[0] !== tableRef || $[1] !== virtualSize) {
432
+ t1 = () => adjustTableHeight(tableRef, virtualSize);
433
+ $[0] = tableRef;
434
+ $[1] = virtualSize;
435
+ $[2] = t1;
436
+ } else t1 = $[2];
437
+ const handlePseudoResize = t1;
438
+ let t2;
439
+ if ($[3] !== scrollRef || $[4] !== virtualSize) {
440
+ t2 = () => {
441
+ if (scrollRef.current) {
442
+ const scrollPosition = scrollRef.current.scrollTop;
443
+ const visibleHeight = scrollRef.current.clientHeight;
444
+ setIsScrollNearBottom(scrollPosition > virtualSize * SCROLL_THRESHOLD - visibleHeight);
445
+ }
446
+ };
447
+ $[3] = scrollRef;
448
+ $[4] = virtualSize;
449
+ $[5] = t2;
450
+ } else t2 = $[5];
451
+ const handleScroll = t2;
452
+ let t3;
453
+ let t4;
454
+ if ($[6] !== handlePseudoResize || $[7] !== handleScroll || $[8] !== scrollRef) {
455
+ t3 = () => {
456
+ const scrollable = scrollRef.current;
457
+ if (scrollable) scrollable.addEventListener("scroll", handleScroll);
458
+ handlePseudoResize();
459
+ return () => {
460
+ if (scrollable) scrollable.removeEventListener("scroll", handleScroll);
461
+ };
462
+ };
463
+ t4 = [
464
+ scrollRef,
465
+ handleScroll,
466
+ handlePseudoResize
467
+ ];
468
+ $[6] = handlePseudoResize;
469
+ $[7] = handleScroll;
470
+ $[8] = scrollRef;
471
+ $[9] = t3;
472
+ $[10] = t4;
473
+ } else {
474
+ t3 = $[9];
475
+ t4 = $[10];
476
+ }
477
+ useEffect(t3, t4);
478
+ let t5;
479
+ let t6;
480
+ if ($[11] !== handlePseudoResize || $[12] !== isScrollNearBottom) {
481
+ t5 = () => {
482
+ if (isScrollNearBottom) handlePseudoResize();
123
483
  };
124
- }, [
125
- scrollRef,
126
- handleScroll,
127
- handlePseudoResize
128
- ]);
129
- useEffect(() => {
130
- if (isScrollNearBottom) handlePseudoResize();
131
- }, [isScrollNearBottom, handlePseudoResize]);
132
- return { isScrollNearBottom };
484
+ t6 = [isScrollNearBottom, handlePseudoResize];
485
+ $[11] = handlePseudoResize;
486
+ $[12] = isScrollNearBottom;
487
+ $[13] = t5;
488
+ $[14] = t6;
489
+ } else {
490
+ t5 = $[13];
491
+ t6 = $[14];
492
+ }
493
+ useEffect(t5, t6);
494
+ let t7;
495
+ if ($[15] !== isScrollNearBottom) {
496
+ t7 = { isScrollNearBottom };
497
+ $[15] = isScrollNearBottom;
498
+ $[16] = t7;
499
+ } else t7 = $[16];
500
+ return t7;
133
501
  };
134
502
  const adjustTableHeight = (tableRef, virtualHeight) => {
135
503
  if (!tableRef.current) return;
@@ -2,8 +2,8 @@ import * as react from "react";
2
2
  import { ComponentProps } from "react";
3
3
  import * as _pyck_styled_system_jsx0 from "@pyck/styled-system/jsx";
4
4
  import * as _pyck_styled_system_recipes0 from "@pyck/styled-system/recipes";
5
- import { TagsInput, TagsInputContext as Context } from "@ark-ui/react/tags-input";
6
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
+ import { TagsInput, TagsInputContext as Context } from "@ark-ui/react/tags-input";
7
7
 
8
8
  //#region src/components/tags-input/tags-input.d.ts
9
9
  declare namespace tags_input_d_exports {
@@ -1,7 +1,9 @@
1
1
  import { t as __exportAll } from "../../chunk-BYypO7fO.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { createStyleContext } from "@pyck/styled-system/jsx";
3
4
  import { tagsInput } from "@pyck/styled-system/recipes";
4
5
  import { XIcon } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
5
7
  import { TagsInput, TagsInputContext as Context, useTagsInputContext } from "@ark-ui/react/tags-input";
6
8
 
7
9
  //#region src/components/tags-input/tags-input.tsx
@@ -24,24 +26,38 @@ var tags_input_exports = /* @__PURE__ */ __exportAll({
24
26
  const { withProvider, withContext } = createStyleContext(tagsInput);
25
27
  const Root = withProvider(TagsInput.Root, "root");
26
28
  const RootProvider = withProvider(TagsInput.RootProvider, "root");
27
- const ClearTrigger = withContext(TagsInput.ClearTrigger, "clearTrigger", { defaultProps: { children: <XIcon /> } });
29
+ const ClearTrigger = withContext(TagsInput.ClearTrigger, "clearTrigger", { defaultProps: { children: /* @__PURE__ */ jsx(XIcon, {}) } });
28
30
  const Control = withContext(TagsInput.Control, "control");
29
31
  const HiddenInput = TagsInput.HiddenInput;
30
32
  const Input = withContext(TagsInput.Input, "input");
31
33
  const Item = withContext(TagsInput.Item, "item");
32
- const ItemDeleteTrigger = withContext(TagsInput.ItemDeleteTrigger, "itemDeleteTrigger", { defaultProps: { children: <XIcon /> } });
34
+ const ItemDeleteTrigger = withContext(TagsInput.ItemDeleteTrigger, "itemDeleteTrigger", { defaultProps: { children: /* @__PURE__ */ jsx(XIcon, {}) } });
33
35
  const ItemInput = withContext(TagsInput.ItemInput, "itemInput");
34
36
  const ItemPreview = withContext(TagsInput.ItemPreview, "itemPreview");
35
37
  const ItemText = withContext(TagsInput.ItemText, "itemText");
36
38
  const Label = withContext(TagsInput.Label, "label");
37
39
  const Items = (props) => {
38
- return useTagsInputContext().value.map((item, index) => <Item key={item} index={index} value={item} {...props}>
39
- <ItemPreview>
40
- <ItemText>{item}</ItemText>
41
- <ItemDeleteTrigger />
42
- </ItemPreview>
43
- <ItemInput />
44
- </Item>);
40
+ const $ = c(5);
41
+ const context = useTagsInputContext();
42
+ let t0;
43
+ if ($[0] !== context.value || $[1] !== props) {
44
+ let t1;
45
+ if ($[3] !== props) {
46
+ t1 = (item, index) => /* @__PURE__ */ jsxs(Item, {
47
+ index,
48
+ value: item,
49
+ ...props,
50
+ children: [/* @__PURE__ */ jsxs(ItemPreview, { children: [/* @__PURE__ */ jsx(ItemText, { children: item }), /* @__PURE__ */ jsx(ItemDeleteTrigger, {})] }), /* @__PURE__ */ jsx(ItemInput, {})]
51
+ }, item);
52
+ $[3] = props;
53
+ $[4] = t1;
54
+ } else t1 = $[4];
55
+ t0 = context.value.map(t1);
56
+ $[0] = context.value;
57
+ $[1] = props;
58
+ $[2] = t0;
59
+ } else t0 = $[2];
60
+ return t0;
45
61
  };
46
62
 
47
63
  //#endregion
@@ -1,12 +1,12 @@
1
1
  import * as react from "react";
2
2
  import { ComponentProps } from "react";
3
3
  import * as _pyck_styled_system_recipes0 from "@pyck/styled-system/recipes";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
  import { FieldProps } from "@pyck/react/field";
5
6
  import { FieldPath, FieldValues } from "react-hook-form";
6
7
  import { Field as Field$1 } from "@ark-ui/react/field";
7
8
  import { TextareaProps as TextareaProps$1 } from "@pyck/react/textarea";
8
9
  import * as _pyck_styled_system_types0 from "@pyck/styled-system/types";
9
- import * as react_jsx_runtime0 from "react/jsx-runtime";
10
10
 
11
11
  //#region src/components/textarea/textarea.d.ts
12
12
  type TextareaProps = ComponentProps<typeof Textarea>;