@pyck/react 0.0.5 → 0.0.6

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 (58) hide show
  1. package/dist/checkmark-fJPHeX8N.js +62 -0
  2. package/dist/close-button-r3blTfSH.js +141 -0
  3. package/dist/components/avatar/index.js +96 -11
  4. package/dist/components/button/index.js +1 -1
  5. package/dist/components/carousel/index.js +35 -10
  6. package/dist/components/checkbox/index.js +103 -22
  7. package/dist/components/checkmark/index.js +1 -1
  8. package/dist/components/combobox/index.js +30 -6
  9. package/dist/components/data-list/index.js +19 -8
  10. package/dist/components/date-picker/index.js +1 -1
  11. package/dist/components/dialog/index.js +44 -13
  12. package/dist/components/display-date-value/index.js +2 -2
  13. package/dist/components/display-value/index.js +1 -1
  14. package/dist/components/drawer/index.js +17 -1
  15. package/dist/components/drilldown-menu/index.js +209 -78
  16. package/dist/components/field/index.js +89 -16
  17. package/dist/components/floating-panel/index.js +54 -43
  18. package/dist/components/form/index.js +115 -26
  19. package/dist/components/highlight/index.js +52 -14
  20. package/dist/components/icon/index.js +1 -1
  21. package/dist/components/image/index.js +27 -2
  22. package/dist/components/input/index.js +47 -4
  23. package/dist/components/input-group/index.js +56 -14
  24. package/dist/components/json-form-builder/index.js +245 -87
  25. package/dist/components/logo/index.js +46 -19
  26. package/dist/components/menu/index.js +28 -6
  27. package/dist/components/number-input/index.js +46 -7
  28. package/dist/components/page-header/index.js +45 -12
  29. package/dist/components/pagination/index.js +35 -13
  30. package/dist/components/progress/index.js +47 -8
  31. package/dist/components/progress-circle/index.js +66 -17
  32. package/dist/components/radio-group/index.js +47 -6
  33. package/dist/components/scroll-area/index.js +64 -9
  34. package/dist/components/segment-group/index.js +34 -5
  35. package/dist/components/select/index.js +85 -21
  36. package/dist/components/show/index.js +1 -1
  37. package/dist/components/skeleton/index.js +44 -4
  38. package/dist/components/slider/index.js +134 -37
  39. package/dist/components/spotlight/index.js +269 -125
  40. package/dist/components/steps/index.js +26 -12
  41. package/dist/components/switch/index.js +160 -29
  42. package/dist/components/table/index.js +370 -66
  43. package/dist/components/tags-input/index.js +17 -7
  44. package/dist/components/textarea/index.js +47 -4
  45. package/dist/components/toast/index.js +28 -22
  46. package/dist/components/tooltip/index.js +71 -14
  47. package/dist/components/tree-view/index.js +45 -8
  48. package/dist/display-date-value-BAU46P8s.js +40 -0
  49. package/dist/display-value-Bz71ZqgM.js +57 -0
  50. package/dist/{featured-icon-DPysOpSf.js → featured-icon-CKDv0xfF.js} +27 -4
  51. package/dist/show-DAysVQAC.js +27 -0
  52. package/dist/utils/index.js +164 -73
  53. package/package.json +5 -3
  54. package/dist/checkmark-CW-yHMvN.js +0 -18
  55. package/dist/close-button-BM7ikbYh.js +0 -52
  56. package/dist/display-date-value-gTlidtNz.js +0 -21
  57. package/dist/display-value-BNKxQ99u.js +0 -37
  58. package/dist/show-IaI-36v9.js +0 -12
@@ -1,4 +1,5 @@
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 { pagination } from "@pyck/styled-system/recipes";
4
5
  import { EllipsisIcon } from "lucide-react";
@@ -25,20 +26,41 @@ const Ellipsis = withContext(Pagination.Ellipsis, "ellipsis");
25
26
  const PrevTrigger = withContext(Pagination.PrevTrigger, "prevTrigger");
26
27
  const NextTrigger = withContext(Pagination.NextTrigger, "nextTrigger");
27
28
  const Items = (props) => {
29
+ const $ = c(11);
28
30
  const { pages } = usePaginationContext();
29
- const { render, ellipsis, ...rest } = props;
30
- return <For each={pages}>
31
- {(page, index) => {
32
- if (page.type === "ellipsis") return <Ellipsis asChild key={index} index={index}>
33
- {ellipsis || <IconButton as="span">
34
- <EllipsisIcon />
35
- </IconButton>}
36
- </Ellipsis>;
37
- return <Item asChild key={index} type="page" value={page.value} {...rest}>
38
- {render(page)}
39
- </Item>;
40
- }}
41
- </For>;
31
+ let ellipsis;
32
+ let render;
33
+ let rest;
34
+ if ($[0] !== props) {
35
+ ({render, ellipsis, ...rest} = props);
36
+ $[0] = props;
37
+ $[1] = ellipsis;
38
+ $[2] = render;
39
+ $[3] = rest;
40
+ } else {
41
+ ellipsis = $[1];
42
+ render = $[2];
43
+ rest = $[3];
44
+ }
45
+ let t0;
46
+ if ($[4] !== ellipsis || $[5] !== render || $[6] !== rest) {
47
+ t0 = (page, index) => {
48
+ if (page.type === "ellipsis") return <Ellipsis asChild={true} key={index} index={index}>{ellipsis || <IconButton as="span"><EllipsisIcon /></IconButton>}</Ellipsis>;
49
+ return <Item asChild={true} key={index} type="page" value={page.value} {...rest}>{render(page)}</Item>;
50
+ };
51
+ $[4] = ellipsis;
52
+ $[5] = render;
53
+ $[6] = rest;
54
+ $[7] = t0;
55
+ } else t0 = $[7];
56
+ let t1;
57
+ if ($[8] !== pages || $[9] !== t0) {
58
+ t1 = <For each={pages}>{t0}</For>;
59
+ $[8] = pages;
60
+ $[9] = t0;
61
+ $[10] = t1;
62
+ } else t1 = $[10];
63
+ return t1;
42
64
  };
43
65
 
44
66
  //#endregion
@@ -1,4 +1,5 @@
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 { createStyleContext } from "@pyck/styled-system/jsx";
4
5
  import { progress } from "@pyck/styled-system/recipes";
@@ -33,14 +34,52 @@ const View = withContext(Progress$1.View, "view");
33
34
  //#endregion
34
35
  //#region src/components/progress/progress.closed.tsx
35
36
  const Progress = forwardRef(function Progress(props, ref) {
36
- const { showValueText, valueText, label, ...rest } = props;
37
- return <progress_exports.Root {...rest} ref={ref}>
38
- {label && <progress_exports.Label>{label}</progress_exports.Label>}
39
- <progress_exports.Track>
40
- <progress_exports.Range />
41
- </progress_exports.Track>
42
- {showValueText && <progress_exports.ValueText>{valueText}</progress_exports.ValueText>}
43
- </progress_exports.Root>;
37
+ const $ = c(16);
38
+ let label;
39
+ let rest;
40
+ let showValueText;
41
+ let valueText;
42
+ if ($[0] !== props) {
43
+ ({showValueText, valueText, label, ...rest} = props);
44
+ $[0] = props;
45
+ $[1] = label;
46
+ $[2] = rest;
47
+ $[3] = showValueText;
48
+ $[4] = valueText;
49
+ } else {
50
+ label = $[1];
51
+ rest = $[2];
52
+ showValueText = $[3];
53
+ valueText = $[4];
54
+ }
55
+ let t0;
56
+ if ($[5] !== label) {
57
+ t0 = label && <progress_exports.Label>{label}</progress_exports.Label>;
58
+ $[5] = label;
59
+ $[6] = t0;
60
+ } else t0 = $[6];
61
+ let t1;
62
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
63
+ t1 = <progress_exports.Track><progress_exports.Range /></progress_exports.Track>;
64
+ $[7] = t1;
65
+ } else t1 = $[7];
66
+ let t2;
67
+ if ($[8] !== showValueText || $[9] !== valueText) {
68
+ t2 = showValueText && <progress_exports.ValueText>{valueText}</progress_exports.ValueText>;
69
+ $[8] = showValueText;
70
+ $[9] = valueText;
71
+ $[10] = t2;
72
+ } else t2 = $[10];
73
+ let t3;
74
+ if ($[11] !== ref || $[12] !== rest || $[13] !== t0 || $[14] !== t2) {
75
+ t3 = <progress_exports.Root {...rest} ref={ref}>{t0}{t1}{t2}</progress_exports.Root>;
76
+ $[11] = ref;
77
+ $[12] = rest;
78
+ $[13] = t0;
79
+ $[14] = t2;
80
+ $[15] = t3;
81
+ } else t3 = $[15];
82
+ return t3;
44
83
  });
45
84
 
46
85
  //#endregion
@@ -1,4 +1,5 @@
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 { Stack, createStyleContext } from "@pyck/styled-system/jsx";
4
5
  import { progressCircle } from "@pyck/styled-system/recipes";
@@ -31,23 +32,71 @@ const View = withContext(Progress.View, "view");
31
32
  //#endregion
32
33
  //#region src/components/progress-circle/progress-circle.closed.tsx
33
34
  const ProgressCircle = forwardRef(function ProgressCircle(props, ref) {
34
- const { showValueText, valueText, label, ...rest } = props;
35
- return <progress_circle_exports.Root {...rest} ref={ref}>
36
- <progress_circle_exports.Circle>
37
- <progress_circle_exports.Track />
38
- <progress_circle_exports.Range />
39
- </progress_circle_exports.Circle>
40
- <AbsoluteCenter>
41
- <Stack gap="0" align="center">
42
- <Show when={label}>
43
- <progress_circle_exports.Label>{label}</progress_circle_exports.Label>
44
- </Show>
45
- <Show when={showValueText}>
46
- <progress_circle_exports.ValueText>{valueText}</progress_circle_exports.ValueText>
47
- </Show>
48
- </Stack>
49
- </AbsoluteCenter>
50
- </progress_circle_exports.Root>;
35
+ const $ = c(23);
36
+ let label;
37
+ let rest;
38
+ let showValueText;
39
+ let valueText;
40
+ if ($[0] !== props) {
41
+ ({showValueText, valueText, label, ...rest} = props);
42
+ $[0] = props;
43
+ $[1] = label;
44
+ $[2] = rest;
45
+ $[3] = showValueText;
46
+ $[4] = valueText;
47
+ } else {
48
+ label = $[1];
49
+ rest = $[2];
50
+ showValueText = $[3];
51
+ valueText = $[4];
52
+ }
53
+ let t0;
54
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
55
+ t0 = <progress_circle_exports.Circle><progress_circle_exports.Track /><progress_circle_exports.Range /></progress_circle_exports.Circle>;
56
+ $[5] = t0;
57
+ } else t0 = $[5];
58
+ let t1;
59
+ if ($[6] !== label) {
60
+ t1 = <progress_circle_exports.Label>{label}</progress_circle_exports.Label>;
61
+ $[6] = label;
62
+ $[7] = t1;
63
+ } else t1 = $[7];
64
+ let t2;
65
+ if ($[8] !== label || $[9] !== t1) {
66
+ t2 = <Show when={label}>{t1}</Show>;
67
+ $[8] = label;
68
+ $[9] = t1;
69
+ $[10] = t2;
70
+ } else t2 = $[10];
71
+ let t3;
72
+ if ($[11] !== valueText) {
73
+ t3 = <progress_circle_exports.ValueText>{valueText}</progress_circle_exports.ValueText>;
74
+ $[11] = valueText;
75
+ $[12] = t3;
76
+ } else t3 = $[12];
77
+ let t4;
78
+ if ($[13] !== showValueText || $[14] !== t3) {
79
+ t4 = <Show when={showValueText}>{t3}</Show>;
80
+ $[13] = showValueText;
81
+ $[14] = t3;
82
+ $[15] = t4;
83
+ } else t4 = $[15];
84
+ let t5;
85
+ if ($[16] !== t2 || $[17] !== t4) {
86
+ t5 = <AbsoluteCenter><Stack gap="0" align="center">{t2}{t4}</Stack></AbsoluteCenter>;
87
+ $[16] = t2;
88
+ $[17] = t4;
89
+ $[18] = t5;
90
+ } else t5 = $[18];
91
+ let t6;
92
+ if ($[19] !== ref || $[20] !== rest || $[21] !== t5) {
93
+ t6 = <progress_circle_exports.Root {...rest} ref={ref}>{t0}{t5}</progress_circle_exports.Root>;
94
+ $[19] = ref;
95
+ $[20] = rest;
96
+ $[21] = t5;
97
+ $[22] = t6;
98
+ } else t6 = $[22];
99
+ return t6;
51
100
  });
52
101
 
53
102
  //#endregion
@@ -1,4 +1,5 @@
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 { createStyleContext } from "@pyck/styled-system/jsx";
4
5
  import { radioGroup } from "@pyck/styled-system/recipes";
@@ -29,12 +30,52 @@ const ItemHiddenInput = RadioGroup.ItemHiddenInput;
29
30
  //#endregion
30
31
  //#region src/components/radio-group/radio-group.closed.tsx
31
32
  const Radio = forwardRef(function Radio(props, ref) {
32
- const { children, inputProps, rootRef, ...rest } = props;
33
- return <radio_group_exports.Item ref={rootRef} {...rest}>
34
- <radio_group_exports.ItemHiddenInput ref={ref} {...inputProps} />
35
- <radio_group_exports.ItemControl />
36
- {children && <radio_group_exports.ItemText>{children}</radio_group_exports.ItemText>}
37
- </radio_group_exports.Item>;
33
+ const $ = c(16);
34
+ let children;
35
+ let inputProps;
36
+ let rest;
37
+ let rootRef;
38
+ if ($[0] !== props) {
39
+ ({children, inputProps, rootRef, ...rest} = props);
40
+ $[0] = props;
41
+ $[1] = children;
42
+ $[2] = inputProps;
43
+ $[3] = rest;
44
+ $[4] = rootRef;
45
+ } else {
46
+ children = $[1];
47
+ inputProps = $[2];
48
+ rest = $[3];
49
+ rootRef = $[4];
50
+ }
51
+ let t0;
52
+ if ($[5] !== inputProps || $[6] !== ref) {
53
+ t0 = <radio_group_exports.ItemHiddenInput ref={ref} {...inputProps} />;
54
+ $[5] = inputProps;
55
+ $[6] = ref;
56
+ $[7] = t0;
57
+ } else t0 = $[7];
58
+ let t1;
59
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
60
+ t1 = <radio_group_exports.ItemControl />;
61
+ $[8] = t1;
62
+ } else t1 = $[8];
63
+ let t2;
64
+ if ($[9] !== children) {
65
+ t2 = children && <radio_group_exports.ItemText>{children}</radio_group_exports.ItemText>;
66
+ $[9] = children;
67
+ $[10] = t2;
68
+ } else t2 = $[10];
69
+ let t3;
70
+ if ($[11] !== rest || $[12] !== rootRef || $[13] !== t0 || $[14] !== t2) {
71
+ t3 = <radio_group_exports.Item ref={rootRef} {...rest}>{t0}{t1}{t2}</radio_group_exports.Item>;
72
+ $[11] = rest;
73
+ $[12] = rootRef;
74
+ $[13] = t0;
75
+ $[14] = t2;
76
+ $[15] = t3;
77
+ } else t3 = $[15];
78
+ return t3;
38
79
  });
39
80
 
40
81
  //#endregion
@@ -1,4 +1,5 @@
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 { createStyleContext } from "@pyck/styled-system/jsx";
4
5
  import { scrollArea } from "@pyck/styled-system/recipes";
@@ -24,17 +25,71 @@ const Viewport = withContext(ScrollArea$1.Viewport, "viewport");
24
25
  //#endregion
25
26
  //#region src/components/scroll-area/scroll-area.closed.tsx
26
27
  const ScrollArea = forwardRef(function ScrollArea(props, ref) {
27
- const { children, scrollbars = "both", contentProps, ...rest } = props;
28
+ const $ = c(24);
29
+ let children;
30
+ let contentProps;
31
+ let rest;
32
+ let t0;
33
+ if ($[0] !== props) {
34
+ ({children, scrollbars: t0, contentProps, ...rest} = props);
35
+ $[0] = props;
36
+ $[1] = children;
37
+ $[2] = contentProps;
38
+ $[3] = rest;
39
+ $[4] = t0;
40
+ } else {
41
+ children = $[1];
42
+ contentProps = $[2];
43
+ rest = $[3];
44
+ t0 = $[4];
45
+ }
46
+ const scrollbars = t0 === void 0 ? "both" : t0;
28
47
  const showVertical = scrollbars === "vertical" || scrollbars === "both";
29
48
  const showHorizontal = scrollbars === "horizontal" || scrollbars === "both";
30
- return <scroll_area_exports.Root {...rest}>
31
- <scroll_area_exports.Viewport ref={ref}>
32
- <scroll_area_exports.Content {...contentProps}>{children}</scroll_area_exports.Content>
33
- </scroll_area_exports.Viewport>
34
- {showVertical && <scroll_area_exports.Scrollbar orientation="vertical" />}
35
- {showHorizontal && <scroll_area_exports.Scrollbar orientation="horizontal" />}
36
- {showVertical && showHorizontal && <scroll_area_exports.Corner />}
37
- </scroll_area_exports.Root>;
49
+ let t1;
50
+ if ($[5] !== children || $[6] !== contentProps) {
51
+ t1 = <scroll_area_exports.Content {...contentProps}>{children}</scroll_area_exports.Content>;
52
+ $[5] = children;
53
+ $[6] = contentProps;
54
+ $[7] = t1;
55
+ } else t1 = $[7];
56
+ let t2;
57
+ if ($[8] !== ref || $[9] !== t1) {
58
+ t2 = <scroll_area_exports.Viewport ref={ref}>{t1}</scroll_area_exports.Viewport>;
59
+ $[8] = ref;
60
+ $[9] = t1;
61
+ $[10] = t2;
62
+ } else t2 = $[10];
63
+ let t3;
64
+ if ($[11] !== showVertical) {
65
+ t3 = showVertical && <scroll_area_exports.Scrollbar orientation="vertical" />;
66
+ $[11] = showVertical;
67
+ $[12] = t3;
68
+ } else t3 = $[12];
69
+ let t4;
70
+ if ($[13] !== showHorizontal) {
71
+ t4 = showHorizontal && <scroll_area_exports.Scrollbar orientation="horizontal" />;
72
+ $[13] = showHorizontal;
73
+ $[14] = t4;
74
+ } else t4 = $[14];
75
+ let t5;
76
+ if ($[15] !== showHorizontal || $[16] !== showVertical) {
77
+ t5 = showVertical && showHorizontal && <scroll_area_exports.Corner />;
78
+ $[15] = showHorizontal;
79
+ $[16] = showVertical;
80
+ $[17] = t5;
81
+ } else t5 = $[17];
82
+ let t6;
83
+ if ($[18] !== rest || $[19] !== t2 || $[20] !== t3 || $[21] !== t4 || $[22] !== t5) {
84
+ t6 = <scroll_area_exports.Root {...rest}>{t2}{t3}{t4}{t5}</scroll_area_exports.Root>;
85
+ $[18] = rest;
86
+ $[19] = t2;
87
+ $[20] = t3;
88
+ $[21] = t4;
89
+ $[22] = t5;
90
+ $[23] = t6;
91
+ } else t6 = $[23];
92
+ return t6;
38
93
  });
39
94
 
40
95
  //#endregion
@@ -1,5 +1,6 @@
1
1
  import { t as __exportAll } from "../../chunk-BYypO7fO.js";
2
2
  import { n as isString } from "../../function-DOGwA2sm.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { useMemo } from "react";
4
5
  import { createStyleContext } from "@pyck/styled-system/jsx";
5
6
  import { segmentGroup } from "@pyck/styled-system/recipes";
@@ -31,11 +32,39 @@ const ItemHiddenInput = SegmentGroup.ItemHiddenInput;
31
32
  const ItemText = withContext(SegmentGroup.ItemText, "itemText");
32
33
  const Label = withContext(SegmentGroup.Label, "label");
33
34
  const Items = (props) => {
34
- const { items, ...itemProps } = props;
35
- return useMemo(() => normalize(items), [items]).map((item) => <Item key={item.value} value={item.value} disabled={item.disabled} {...itemProps}>
36
- <ItemText>{item.label}</ItemText>
37
- <ItemHiddenInput />
38
- </Item>);
35
+ const $ = c(10);
36
+ let itemProps;
37
+ let items;
38
+ if ($[0] !== props) {
39
+ ({items, ...itemProps} = props);
40
+ $[0] = props;
41
+ $[1] = itemProps;
42
+ $[2] = items;
43
+ } else {
44
+ itemProps = $[1];
45
+ items = $[2];
46
+ }
47
+ let t0;
48
+ if ($[3] !== items) {
49
+ t0 = normalize(items);
50
+ $[3] = items;
51
+ $[4] = t0;
52
+ } else t0 = $[4];
53
+ const data = t0;
54
+ let t1;
55
+ if ($[5] !== data || $[6] !== itemProps) {
56
+ let t2;
57
+ if ($[8] !== itemProps) {
58
+ t2 = (item) => <Item key={item.value} value={item.value} disabled={item.disabled} {...itemProps}><ItemText>{item.label}</ItemText><ItemHiddenInput /></Item>;
59
+ $[8] = itemProps;
60
+ $[9] = t2;
61
+ } else t2 = $[9];
62
+ t1 = data.map(t2);
63
+ $[5] = data;
64
+ $[6] = itemProps;
65
+ $[7] = t1;
66
+ } else t1 = $[7];
67
+ return t1;
39
68
  };
40
69
  const normalize = (items) => items.map((item) => isString(item) ? {
41
70
  value: item,
@@ -1,5 +1,6 @@
1
1
  import { t as __exportAll } from "../../chunk-BYypO7fO.js";
2
2
  import { createListCollection } from "@ark-ui/react/collection";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { forwardRef } from "react";
4
5
  import { ark } from "@ark-ui/react/factory";
5
6
  import { createStyleContext } from "@pyck/styled-system/jsx";
@@ -52,12 +53,33 @@ const Indicator = withContext(Select$1.Indicator, "indicator", { defaultProps: {
52
53
  const HiddenSelect = Select$1.HiddenSelect;
53
54
  const StyledItemIndicator = withContext(Select$1.ItemIndicator, "itemIndicator");
54
55
  const ItemIndicator$1 = forwardRef(function ItemIndicator(props, ref) {
56
+ const $ = c(8);
55
57
  const item = useSelectItemContext();
56
- return <Show when={item.selected} fallback={<svg aria-hidden="true" focusable="false" />}>
57
- <StyledItemIndicator ref={ref} {...props}>
58
- <CheckIcon />
59
- </StyledItemIndicator>
60
- </Show>;
58
+ let t0;
59
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
60
+ t0 = <svg aria-hidden="true" focusable="false" />;
61
+ $[0] = t0;
62
+ } else t0 = $[0];
63
+ let t1;
64
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
65
+ t1 = <CheckIcon />;
66
+ $[1] = t1;
67
+ } else t1 = $[1];
68
+ let t2;
69
+ if ($[2] !== props || $[3] !== ref) {
70
+ t2 = <StyledItemIndicator ref={ref} {...props}>{t1}</StyledItemIndicator>;
71
+ $[2] = props;
72
+ $[3] = ref;
73
+ $[4] = t2;
74
+ } else t2 = $[4];
75
+ let t3;
76
+ if ($[5] !== item.selected || $[6] !== t2) {
77
+ t3 = <Show when={item.selected} fallback={t0}>{t2}</Show>;
78
+ $[5] = item.selected;
79
+ $[6] = t2;
80
+ $[7] = t3;
81
+ } else t3 = $[7];
82
+ return t3;
61
83
  });
62
84
 
63
85
  //#endregion
@@ -68,23 +90,65 @@ var select_field_exports = /* @__PURE__ */ __exportAll({
68
90
  Root: () => Root
69
91
  });
70
92
  const Root = (props) => {
71
- const { name, label, placeholder, hideLabel, helperText, disabled, required, ...selectProps } = props;
93
+ const $ = c(22);
94
+ let disabled;
95
+ let helperText;
96
+ let hideLabel;
97
+ let label;
98
+ let name;
99
+ let placeholder;
100
+ let required;
101
+ let selectProps;
102
+ if ($[0] !== props) {
103
+ ({name, label, placeholder, hideLabel, helperText, disabled, required, ...selectProps} = props);
104
+ $[0] = props;
105
+ $[1] = disabled;
106
+ $[2] = helperText;
107
+ $[3] = hideLabel;
108
+ $[4] = label;
109
+ $[5] = name;
110
+ $[6] = placeholder;
111
+ $[7] = required;
112
+ $[8] = selectProps;
113
+ } else {
114
+ disabled = $[1];
115
+ helperText = $[2];
116
+ hideLabel = $[3];
117
+ label = $[4];
118
+ name = $[5];
119
+ placeholder = $[6];
120
+ required = $[7];
121
+ selectProps = $[8];
122
+ }
72
123
  const { control } = useFormContext();
73
- return <Controller name={name} control={control} render={({ field, fieldState }) => <Field label={label} helperText={helperText} hideLabel={hideLabel} disabled={field.disabled || disabled} invalid={!!fieldState.error} errorText={fieldState.error?.message} required={required}>
74
- <Select.Root {...selectProps} name={field.name} onBlur={field.onBlur} onInteractOutside={field.onBlur} onValueChange={({ value }) => field.onChange(selectProps.multiple ? value : value[0])} value={[field.value].flat().filter(Boolean)}>
75
- <Select.Control>
76
- <Select.Trigger>
77
- <Select.ValueText placeholder={placeholder} />
78
- <Select.IndicatorGroup>
79
- <Select.Indicator />
80
- </Select.IndicatorGroup>
81
- </Select.Trigger>
82
- </Select.Control>
83
- <Select.Positioner>
84
- <Select.Content>{props.children}</Select.Content>
85
- </Select.Positioner>
86
- </Select.Root>
87
- </Field>} />;
124
+ let t0;
125
+ if ($[9] !== disabled || $[10] !== helperText || $[11] !== hideLabel || $[12] !== label || $[13] !== placeholder || $[14] !== props.children || $[15] !== required || $[16] !== selectProps) {
126
+ t0 = (t1) => {
127
+ const { field, fieldState } = t1;
128
+ return <Field label={label} helperText={helperText} hideLabel={hideLabel} disabled={field.disabled || disabled} invalid={!!fieldState.error} errorText={fieldState.error?.message} required={required}><Select.Root {...selectProps} name={field.name} onBlur={field.onBlur} onInteractOutside={field.onBlur} onValueChange={(t2) => {
129
+ const { value } = t2;
130
+ return field.onChange(selectProps.multiple ? value : value[0]);
131
+ }} value={[field.value].flat().filter(Boolean)}><Select.Control><Select.Trigger><Select.ValueText placeholder={placeholder} /><Select.IndicatorGroup><Select.Indicator /></Select.IndicatorGroup></Select.Trigger></Select.Control><Select.Positioner><Select.Content>{props.children}</Select.Content></Select.Positioner></Select.Root></Field>;
132
+ };
133
+ $[9] = disabled;
134
+ $[10] = helperText;
135
+ $[11] = hideLabel;
136
+ $[12] = label;
137
+ $[13] = placeholder;
138
+ $[14] = props.children;
139
+ $[15] = required;
140
+ $[16] = selectProps;
141
+ $[17] = t0;
142
+ } else t0 = $[17];
143
+ let t1;
144
+ if ($[18] !== control || $[19] !== name || $[20] !== t0) {
145
+ t1 = <Controller name={name} control={control} render={t0} />;
146
+ $[18] = control;
147
+ $[19] = name;
148
+ $[20] = t0;
149
+ $[21] = t1;
150
+ } else t1 = $[21];
151
+ return t1;
88
152
  };
89
153
  const Item = Select.Item;
90
154
  const ItemIndicator = Select.ItemIndicator;
@@ -1,3 +1,3 @@
1
- import { t as Show } from "../../show-IaI-36v9.js";
1
+ import { t as Show } from "../../show-DAysVQAC.js";
2
2
 
3
3
  export { Show };
@@ -1,3 +1,4 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import { ark } from "@ark-ui/react/factory";
3
4
  import { Stack, styled } from "@pyck/styled-system/jsx";
@@ -7,10 +8,49 @@ import { skeleton } from "@pyck/styled-system/recipes";
7
8
  const Skeleton = styled(ark.div, skeleton);
8
9
  const SkeletonCircle = styled(ark.div, skeleton, { defaultProps: { circle: true } });
9
10
  const SkeletonText = forwardRef(function SkeletonText(props, ref) {
10
- const { noOfLines = 3, gap, rootProps, ...skeletonProps } = props;
11
- return <Stack ref={ref} gap={gap} width="full" {...rootProps}>
12
- {[...Array(noOfLines).keys()].map((index) => <Skeleton key={index} height="4" _last={{ maxW: noOfLines === 1 ? "100%" : "80%" }} {...skeletonProps} />)}
13
- </Stack>;
11
+ const $ = c(16);
12
+ let gap;
13
+ let rootProps;
14
+ let skeletonProps;
15
+ let t0;
16
+ if ($[0] !== props) {
17
+ ({noOfLines: t0, gap, rootProps, ...skeletonProps} = props);
18
+ $[0] = props;
19
+ $[1] = gap;
20
+ $[2] = rootProps;
21
+ $[3] = skeletonProps;
22
+ $[4] = t0;
23
+ } else {
24
+ gap = $[1];
25
+ rootProps = $[2];
26
+ skeletonProps = $[3];
27
+ t0 = $[4];
28
+ }
29
+ const noOfLines = t0 === void 0 ? 3 : t0;
30
+ let t1;
31
+ if ($[5] !== noOfLines) {
32
+ t1 = [...Array(noOfLines).keys()];
33
+ $[5] = noOfLines;
34
+ $[6] = t1;
35
+ } else t1 = $[6];
36
+ let t2;
37
+ if ($[7] !== noOfLines || $[8] !== skeletonProps || $[9] !== t1) {
38
+ t2 = t1.map((index) => <Skeleton key={index} height="4" _last={{ maxW: noOfLines === 1 ? "100%" : "80%" }} {...skeletonProps} />);
39
+ $[7] = noOfLines;
40
+ $[8] = skeletonProps;
41
+ $[9] = t1;
42
+ $[10] = t2;
43
+ } else t2 = $[10];
44
+ let t3;
45
+ if ($[11] !== gap || $[12] !== ref || $[13] !== rootProps || $[14] !== t2) {
46
+ t3 = <Stack ref={ref} gap={gap} width="full" {...rootProps}>{t2}</Stack>;
47
+ $[11] = gap;
48
+ $[12] = ref;
49
+ $[13] = rootProps;
50
+ $[14] = t2;
51
+ $[15] = t3;
52
+ } else t3 = $[15];
53
+ return t3;
14
54
  });
15
55
 
16
56
  //#endregion