@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,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 { floatingPanel } from "@pyck/styled-system/recipes";
4
5
  import { ArrowDownLeft, GripVertical, Maximize, Minus, XIcon } from "lucide-react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
7
  import { ButtonGroup, IconButton } from "@pyck/react/button";
6
8
  import { FloatingPanel } from "@ark-ui/react/floating-panel";
7
9
 
@@ -32,54 +34,100 @@ const StageTrigger = withContext(FloatingPanel.StageTrigger, "stageTrigger");
32
34
  const StyledHeader = withContext(FloatingPanel.Header, "header");
33
35
  const Title = withContext(FloatingPanel.Title, "title");
34
36
  const Header = (props) => {
37
+ const $ = c(6);
35
38
  const { children } = props;
36
- return <DragTrigger>
37
- <StyledHeader>
38
- <Title>
39
- <GripVertical />
40
- {children}
41
- </Title>
42
- <Controls />
43
- </StyledHeader>
44
- </DragTrigger>;
39
+ let t0;
40
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t0 = /* @__PURE__ */ jsx(GripVertical, {});
42
+ $[0] = t0;
43
+ } else t0 = $[0];
44
+ let t1;
45
+ if ($[1] !== children) {
46
+ t1 = /* @__PURE__ */ jsxs(Title, { children: [t0, children] });
47
+ $[1] = children;
48
+ $[2] = t1;
49
+ } else t1 = $[2];
50
+ let t2;
51
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
52
+ t2 = /* @__PURE__ */ jsx(Controls, {});
53
+ $[3] = t2;
54
+ } else t2 = $[3];
55
+ let t3;
56
+ if ($[4] !== t1) {
57
+ t3 = /* @__PURE__ */ jsx(DragTrigger, { children: /* @__PURE__ */ jsxs(StyledHeader, { children: [t1, t2] }) });
58
+ $[4] = t1;
59
+ $[5] = t3;
60
+ } else t3 = $[5];
61
+ return t3;
45
62
  };
46
63
  const Controls = () => {
47
- return <Control asChild>
48
- <ButtonGroup variant="plain" size="2xs">
49
- <StageTrigger stage="minimized" asChild>
50
- <IconButton>
51
- <Minus />
52
- </IconButton>
53
- </StageTrigger>
54
- <StageTrigger stage="maximized" asChild>
55
- <IconButton>
56
- <Maximize />
57
- </IconButton>
58
- </StageTrigger>
59
- <StageTrigger stage="default" asChild>
60
- <IconButton>
61
- <ArrowDownLeft />
62
- </IconButton>
63
- </StageTrigger>
64
- <CloseTrigger asChild>
65
- <IconButton>
66
- <XIcon />
67
- </IconButton>
68
- </CloseTrigger>
69
- </ButtonGroup>
70
- </Control>;
64
+ const $ = c(4);
65
+ let t0;
66
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
67
+ t0 = /* @__PURE__ */ jsx(StageTrigger, {
68
+ stage: "minimized",
69
+ asChild: true,
70
+ children: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(Minus, {}) })
71
+ });
72
+ $[0] = t0;
73
+ } else t0 = $[0];
74
+ let t1;
75
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
76
+ t1 = /* @__PURE__ */ jsx(StageTrigger, {
77
+ stage: "maximized",
78
+ asChild: true,
79
+ children: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(Maximize, {}) })
80
+ });
81
+ $[1] = t1;
82
+ } else t1 = $[1];
83
+ let t2;
84
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
85
+ t2 = /* @__PURE__ */ jsx(StageTrigger, {
86
+ stage: "default",
87
+ asChild: true,
88
+ children: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(ArrowDownLeft, {}) })
89
+ });
90
+ $[2] = t2;
91
+ } else t2 = $[2];
92
+ let t3;
93
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
94
+ t3 = /* @__PURE__ */ jsx(Control, {
95
+ asChild: true,
96
+ children: /* @__PURE__ */ jsxs(ButtonGroup, {
97
+ variant: "plain",
98
+ size: "2xs",
99
+ children: [
100
+ t0,
101
+ t1,
102
+ t2,
103
+ /* @__PURE__ */ jsx(CloseTrigger, {
104
+ asChild: true,
105
+ children: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(XIcon, {}) })
106
+ })
107
+ ]
108
+ })
109
+ });
110
+ $[3] = t3;
111
+ } else t3 = $[3];
112
+ return t3;
71
113
  };
72
114
  const ResizeTriggers = () => {
73
- return <>
74
- <ResizeTrigger axis="n" />
75
- <ResizeTrigger axis="e" />
76
- <ResizeTrigger axis="w" />
77
- <ResizeTrigger axis="s" />
78
- <ResizeTrigger axis="ne" />
79
- <ResizeTrigger axis="se" />
80
- <ResizeTrigger axis="sw" />
81
- <ResizeTrigger axis="nw" />
82
- </>;
115
+ const $ = c(1);
116
+ let t0;
117
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
118
+ t0 = /* @__PURE__ */ jsxs(Fragment, { children: [
119
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "n" }),
120
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "e" }),
121
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "w" }),
122
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "s" }),
123
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "ne" }),
124
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "se" }),
125
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "sw" }),
126
+ /* @__PURE__ */ jsx(ResizeTrigger, { axis: "nw" })
127
+ ] });
128
+ $[0] = t0;
129
+ } else t0 = $[0];
130
+ return t0;
83
131
  };
84
132
 
85
133
  //#endregion
@@ -1,10 +1,10 @@
1
1
  import * as react from "react";
2
2
  import { ComponentProps, ReactNode } 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 { FieldValues, UseFormReturn } from "react-hook-form";
5
6
  import * as _ark_ui_react0 from "@ark-ui/react";
6
7
  import * as _pyck_styled_system_types0 from "@pyck/styled-system/types";
7
- import * as react_jsx_runtime0 from "react/jsx-runtime";
8
8
 
9
9
  //#region src/components/form/form.d.ts
10
10
  type StyledFormProps = ComponentProps<typeof StyledForm>;
@@ -1,6 +1,8 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { ark } from "@ark-ui/react/factory";
2
3
  import { Box, styled } from "@pyck/styled-system/jsx";
3
4
  import { form } from "@pyck/styled-system/recipes";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
4
6
  import { FormProvider } from "react-hook-form";
5
7
  import { Show } from "@pyck/react/show";
6
8
  import { Button } from "@pyck/react/button";
@@ -10,36 +12,150 @@ import { Fieldset } from "@pyck/react/fieldset";
10
12
  //#region src/components/form/form.tsx
11
13
  const StyledForm = styled(ark.form, form);
12
14
  const Form = (props) => {
13
- const { value, ...formProps } = props;
14
- return <FormProvider {...value}>
15
- <StyledForm {...formProps} />
16
- </FormProvider>;
15
+ const $ = c(8);
16
+ let formProps;
17
+ let value;
18
+ if ($[0] !== props) {
19
+ ({value, ...formProps} = props);
20
+ $[0] = props;
21
+ $[1] = formProps;
22
+ $[2] = value;
23
+ } else {
24
+ formProps = $[1];
25
+ value = $[2];
26
+ }
27
+ let t0;
28
+ if ($[3] !== formProps) {
29
+ t0 = /* @__PURE__ */ jsx(StyledForm, { ...formProps });
30
+ $[3] = formProps;
31
+ $[4] = t0;
32
+ } else t0 = $[4];
33
+ let t1;
34
+ if ($[5] !== t0 || $[6] !== value) {
35
+ t1 = /* @__PURE__ */ jsx(FormProvider, {
36
+ ...value,
37
+ children: t0
38
+ });
39
+ $[5] = t0;
40
+ $[6] = value;
41
+ $[7] = t1;
42
+ } else t1 = $[7];
43
+ return t1;
17
44
  };
18
45
 
19
46
  //#endregion
20
47
  //#region src/components/form/form-section.tsx
21
- const FormSection = ({ id, value, onSubmit, error, legend, description, children, loading, busy }) => {
22
- return <Box id={id}>
23
- <Form$1 value={value} onSubmit={value.handleSubmit(onSubmit)}>
24
- <Fieldset.Root invalid={!!error}>
25
- <Fieldset.Header>
26
- <Fieldset.Legend>{legend}</Fieldset.Legend>
27
- <Show when={description}>
28
- <Fieldset.Description>{description}</Fieldset.Description>
29
- </Show>
30
- </Fieldset.Header>
31
-
32
- <Fieldset.Body>{children}</Fieldset.Body>
33
-
34
- <Fieldset.Footer>
35
- {error && <Fieldset.ErrorText>{error}</Fieldset.ErrorText>}
36
- <Button type="submit" loading={loading} disabled={busy} size="sm">
37
- Save
38
- </Button>
39
- </Fieldset.Footer>
40
- </Fieldset.Root>
41
- </Form$1>
42
- </Box>;
48
+ const FormSection = (t0) => {
49
+ const $ = c(35);
50
+ const { id, value, onSubmit, error, legend, description, children, loading, busy } = t0;
51
+ let t1;
52
+ if ($[0] !== onSubmit || $[1] !== value) {
53
+ t1 = value.handleSubmit(onSubmit);
54
+ $[0] = onSubmit;
55
+ $[1] = value;
56
+ $[2] = t1;
57
+ } else t1 = $[2];
58
+ const t2 = !!error;
59
+ let t3;
60
+ if ($[3] !== legend) {
61
+ t3 = /* @__PURE__ */ jsx(Fieldset.Legend, { children: legend });
62
+ $[3] = legend;
63
+ $[4] = t3;
64
+ } else t3 = $[4];
65
+ let t4;
66
+ if ($[5] !== description) {
67
+ t4 = /* @__PURE__ */ jsx(Fieldset.Description, { children: description });
68
+ $[5] = description;
69
+ $[6] = t4;
70
+ } else t4 = $[6];
71
+ let t5;
72
+ if ($[7] !== description || $[8] !== t4) {
73
+ t5 = /* @__PURE__ */ jsx(Show, {
74
+ when: description,
75
+ children: t4
76
+ });
77
+ $[7] = description;
78
+ $[8] = t4;
79
+ $[9] = t5;
80
+ } else t5 = $[9];
81
+ let t6;
82
+ if ($[10] !== t3 || $[11] !== t5) {
83
+ t6 = /* @__PURE__ */ jsxs(Fieldset.Header, { children: [t3, t5] });
84
+ $[10] = t3;
85
+ $[11] = t5;
86
+ $[12] = t6;
87
+ } else t6 = $[12];
88
+ let t7;
89
+ if ($[13] !== children) {
90
+ t7 = /* @__PURE__ */ jsx(Fieldset.Body, { children });
91
+ $[13] = children;
92
+ $[14] = t7;
93
+ } else t7 = $[14];
94
+ let t8;
95
+ if ($[15] !== error) {
96
+ t8 = error && /* @__PURE__ */ jsx(Fieldset.ErrorText, { children: error });
97
+ $[15] = error;
98
+ $[16] = t8;
99
+ } else t8 = $[16];
100
+ let t9;
101
+ if ($[17] !== busy || $[18] !== loading) {
102
+ t9 = /* @__PURE__ */ jsx(Button, {
103
+ type: "submit",
104
+ loading,
105
+ disabled: busy,
106
+ size: "sm",
107
+ children: "Save"
108
+ });
109
+ $[17] = busy;
110
+ $[18] = loading;
111
+ $[19] = t9;
112
+ } else t9 = $[19];
113
+ let t10;
114
+ if ($[20] !== t8 || $[21] !== t9) {
115
+ t10 = /* @__PURE__ */ jsxs(Fieldset.Footer, { children: [t8, t9] });
116
+ $[20] = t8;
117
+ $[21] = t9;
118
+ $[22] = t10;
119
+ } else t10 = $[22];
120
+ let t11;
121
+ if ($[23] !== t10 || $[24] !== t2 || $[25] !== t6 || $[26] !== t7) {
122
+ t11 = /* @__PURE__ */ jsxs(Fieldset.Root, {
123
+ invalid: t2,
124
+ children: [
125
+ t6,
126
+ t7,
127
+ t10
128
+ ]
129
+ });
130
+ $[23] = t10;
131
+ $[24] = t2;
132
+ $[25] = t6;
133
+ $[26] = t7;
134
+ $[27] = t11;
135
+ } else t11 = $[27];
136
+ let t12;
137
+ if ($[28] !== t1 || $[29] !== t11 || $[30] !== value) {
138
+ t12 = /* @__PURE__ */ jsx(Form$1, {
139
+ value,
140
+ onSubmit: t1,
141
+ children: t11
142
+ });
143
+ $[28] = t1;
144
+ $[29] = t11;
145
+ $[30] = value;
146
+ $[31] = t12;
147
+ } else t12 = $[31];
148
+ let t13;
149
+ if ($[32] !== id || $[33] !== t12) {
150
+ t13 = /* @__PURE__ */ jsx(Box, {
151
+ id,
152
+ children: t12
153
+ });
154
+ $[32] = id;
155
+ $[33] = t12;
156
+ $[34] = t13;
157
+ } else t13 = $[34];
158
+ return t13;
43
159
  };
44
160
 
45
161
  //#endregion
@@ -1,5 +1,5 @@
1
- import { MarkProps } from "@pyck/react/mark";
2
1
  import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { MarkProps } from "@pyck/react/mark";
3
3
 
4
4
  //#region src/components/highlight/highlight.d.ts
5
5
  interface HighlightProps extends MarkProps {
@@ -1,4 +1,6 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { Fragment } from "react";
3
+ import { jsx } from "react/jsx-runtime";
2
4
  import { Show } from "@pyck/react/show";
3
5
  import { useHighlight } from "@ark-ui/react/highlight";
4
6
  import { For } from "@pyck/react/for";
@@ -6,21 +8,68 @@ import { Mark } from "@pyck/react/mark";
6
8
 
7
9
  //#region src/components/highlight/highlight.tsx
8
10
  const Highlight = (props) => {
9
- const { children, query, ignoreCase = true, matchAll, ...markProps } = props;
11
+ const $ = c(16);
12
+ let children;
13
+ let markProps;
14
+ let matchAll;
15
+ let query;
16
+ let t0;
17
+ if ($[0] !== props) {
18
+ ({children, query, ignoreCase: t0, matchAll, ...markProps} = props);
19
+ $[0] = props;
20
+ $[1] = children;
21
+ $[2] = markProps;
22
+ $[3] = matchAll;
23
+ $[4] = query;
24
+ $[5] = t0;
25
+ } else {
26
+ children = $[1];
27
+ markProps = $[2];
28
+ matchAll = $[3];
29
+ query = $[4];
30
+ t0 = $[5];
31
+ }
32
+ const ignoreCase = t0 === void 0 ? true : t0;
10
33
  if (typeof children !== "string") throw new Error("The children prop of Highlight must be a string");
11
- const chunks = useHighlight({
12
- query,
13
- text: children,
14
- matchAll,
15
- ignoreCase
16
- });
17
- return <For each={chunks}>
18
- {(chunk, index) => <Show key={index} when={chunk.match} fallback={<Fragment key={index}>{chunk.text}</Fragment>}>
19
- <Mark key={index} {...markProps}>
20
- {chunk.text}
21
- </Mark>
22
- </Show>}
23
- </For>;
34
+ let t1;
35
+ if ($[6] !== children || $[7] !== ignoreCase || $[8] !== matchAll || $[9] !== query) {
36
+ t1 = {
37
+ query,
38
+ text: children,
39
+ matchAll,
40
+ ignoreCase
41
+ };
42
+ $[6] = children;
43
+ $[7] = ignoreCase;
44
+ $[8] = matchAll;
45
+ $[9] = query;
46
+ $[10] = t1;
47
+ } else t1 = $[10];
48
+ const chunks = useHighlight(t1);
49
+ let t2;
50
+ if ($[11] !== markProps) {
51
+ t2 = (chunk, index) => /* @__PURE__ */ jsx(Show, {
52
+ when: chunk.match,
53
+ fallback: /* @__PURE__ */ jsx(Fragment, { children: chunk.text }, index),
54
+ children: /* @__PURE__ */ jsx(Mark, {
55
+ ...markProps,
56
+ children: chunk.text
57
+ }, index)
58
+ }, index);
59
+ $[11] = markProps;
60
+ $[12] = t2;
61
+ } else t2 = $[12];
62
+ let t3;
63
+ if ($[13] !== chunks || $[14] !== t2) {
64
+ t3 = /* @__PURE__ */ jsx(For, {
65
+ each: chunks,
66
+ children: t2
67
+ });
68
+ $[13] = chunks;
69
+ $[14] = t2;
70
+ $[15] = t3;
71
+ } else t3 = $[15];
72
+ return t3;
24
73
  };
25
74
 
26
75
  //#endregion
@@ -1,9 +1,9 @@
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 * as _ark_ui_react0 from "@ark-ui/react";
5
6
  import * as _pyck_styled_system_types0 from "@pyck/styled-system/types";
6
- import * as react_jsx_runtime0 from "react/jsx-runtime";
7
7
 
8
8
  //#region src/components/icon/featured-icon.d.ts
9
9
  type FeaturedIconProps = ComponentProps<typeof IconWrapper>;
@@ -1,3 +1,3 @@
1
- import { n as Icon, t as FeaturedIcon } from "../../featured-icon-DPysOpSf.js";
1
+ import { n as Icon, t as FeaturedIcon } from "../../featured-icon-DBnAKGXC.js";
2
2
 
3
3
  export { FeaturedIcon, Icon };
@@ -1,11 +1,42 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { forwardRef } from "react";
2
3
  import { styled } from "@pyck/styled-system/jsx";
4
+ import { jsx } from "react/jsx-runtime";
3
5
 
4
6
  //#region src/components/image/image.tsx
5
7
  const StyledImage = styled("img");
6
8
  const Image = forwardRef(function Image(props, ref) {
7
- const { align, fit = "cover", ...rest } = props;
8
- return <StyledImage ref={ref} objectFit={fit} objectPosition={align} {...rest} />;
9
+ const $ = c(9);
10
+ let align;
11
+ let rest;
12
+ let t0;
13
+ if ($[0] !== props) {
14
+ ({align, fit: t0, ...rest} = props);
15
+ $[0] = props;
16
+ $[1] = align;
17
+ $[2] = rest;
18
+ $[3] = t0;
19
+ } else {
20
+ align = $[1];
21
+ rest = $[2];
22
+ t0 = $[3];
23
+ }
24
+ const fit = t0 === void 0 ? "cover" : t0;
25
+ let t1;
26
+ if ($[4] !== align || $[5] !== fit || $[6] !== ref || $[7] !== rest) {
27
+ t1 = /* @__PURE__ */ jsx(StyledImage, {
28
+ ref,
29
+ objectFit: fit,
30
+ objectPosition: align,
31
+ ...rest
32
+ });
33
+ $[4] = align;
34
+ $[5] = fit;
35
+ $[6] = ref;
36
+ $[7] = rest;
37
+ $[8] = t1;
38
+ } else t1 = $[8];
39
+ return t1;
9
40
  });
10
41
 
11
42
  //#endregion
@@ -1,11 +1,11 @@
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 * as _pyck_styled_system_types0 from "@pyck/styled-system/types";
8
- import * as react_jsx_runtime0 from "react/jsx-runtime";
9
9
 
10
10
  //#region src/components/input/input.d.ts
11
11
  type InputProps = ComponentProps<typeof Input>;
@@ -1,5 +1,7 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { styled } from "@pyck/styled-system/jsx";
2
3
  import { input } from "@pyck/styled-system/recipes";
4
+ import { jsx } from "react/jsx-runtime";
3
5
  import { Field } from "@pyck/react/field";
4
6
  import { Controller, useFormContext } from "react-hook-form";
5
7
  import { Field as Field$1 } from "@ark-ui/react/field";
@@ -10,11 +12,72 @@ const Input = styled(Field$1.Input, input);
10
12
  //#endregion
11
13
  //#region src/components/input/input.field.tsx
12
14
  const InputField = (props) => {
13
- const { name, label, hideLabel, helperText, disabled, ...inputProps } = props;
15
+ const $ = c(17);
16
+ let disabled;
17
+ let helperText;
18
+ let hideLabel;
19
+ let inputProps;
20
+ let label;
21
+ let name;
22
+ if ($[0] !== props) {
23
+ ({name, label, hideLabel, helperText, disabled, ...inputProps} = props);
24
+ $[0] = props;
25
+ $[1] = disabled;
26
+ $[2] = helperText;
27
+ $[3] = hideLabel;
28
+ $[4] = inputProps;
29
+ $[5] = label;
30
+ $[6] = name;
31
+ } else {
32
+ disabled = $[1];
33
+ helperText = $[2];
34
+ hideLabel = $[3];
35
+ inputProps = $[4];
36
+ label = $[5];
37
+ name = $[6];
38
+ }
14
39
  const { control } = useFormContext();
15
- return <Controller name={name} control={control} render={({ field, fieldState }) => <Field label={label} helperText={helperText} hideLabel={hideLabel} disabled={field.disabled || disabled} required={inputProps.required} invalid={!!fieldState.error} errorText={fieldState.error?.message}>
16
- <Input {...inputProps} name={field.name} value={field.value} onChange={field.onChange} onBlur={field.onBlur} />
17
- </Field>} />;
40
+ let t0;
41
+ if ($[7] !== disabled || $[8] !== helperText || $[9] !== hideLabel || $[10] !== inputProps || $[11] !== label) {
42
+ t0 = (t1) => {
43
+ const { field, fieldState } = t1;
44
+ return /* @__PURE__ */ jsx(Field, {
45
+ label,
46
+ helperText,
47
+ hideLabel,
48
+ disabled: field.disabled || disabled,
49
+ required: inputProps.required,
50
+ invalid: !!fieldState.error,
51
+ errorText: fieldState.error?.message,
52
+ children: /* @__PURE__ */ jsx(Input, {
53
+ ...inputProps,
54
+ name: field.name,
55
+ value: field.value,
56
+ onChange: field.onChange,
57
+ onBlur: field.onBlur
58
+ })
59
+ });
60
+ };
61
+ $[7] = disabled;
62
+ $[8] = helperText;
63
+ $[9] = hideLabel;
64
+ $[10] = inputProps;
65
+ $[11] = label;
66
+ $[12] = t0;
67
+ } else t0 = $[12];
68
+ let t1;
69
+ if ($[13] !== control || $[14] !== name || $[15] !== t0) {
70
+ t1 = /* @__PURE__ */ jsx(Controller, {
71
+ name,
72
+ control,
73
+ render: t0
74
+ });
75
+ $[13] = control;
76
+ $[14] = name;
77
+ $[15] = t0;
78
+ $[16] = t1;
79
+ } else t1 = $[16];
80
+ return t1;
18
81
  };
19
82
 
20
83
  //#endregion