@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.
- package/dist/checkmark-fJPHeX8N.js +62 -0
- package/dist/close-button-r3blTfSH.js +141 -0
- package/dist/components/avatar/index.js +96 -11
- package/dist/components/button/index.js +1 -1
- package/dist/components/carousel/index.js +35 -10
- package/dist/components/checkbox/index.js +103 -22
- package/dist/components/checkmark/index.js +1 -1
- package/dist/components/combobox/index.js +30 -6
- package/dist/components/data-list/index.js +19 -8
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dialog/index.js +44 -13
- package/dist/components/display-date-value/index.js +2 -2
- package/dist/components/display-value/index.js +1 -1
- package/dist/components/drawer/index.js +17 -1
- package/dist/components/drilldown-menu/index.js +209 -78
- package/dist/components/field/index.js +89 -16
- package/dist/components/floating-panel/index.js +54 -43
- package/dist/components/form/index.js +115 -26
- package/dist/components/highlight/index.js +52 -14
- package/dist/components/icon/index.js +1 -1
- package/dist/components/image/index.js +27 -2
- package/dist/components/input/index.js +47 -4
- package/dist/components/input-group/index.js +56 -14
- package/dist/components/json-form-builder/index.js +245 -87
- package/dist/components/logo/index.js +46 -19
- package/dist/components/menu/index.js +28 -6
- package/dist/components/number-input/index.js +46 -7
- package/dist/components/page-header/index.js +45 -12
- package/dist/components/pagination/index.js +35 -13
- package/dist/components/progress/index.js +47 -8
- package/dist/components/progress-circle/index.js +66 -17
- package/dist/components/radio-group/index.js +47 -6
- package/dist/components/scroll-area/index.js +64 -9
- package/dist/components/segment-group/index.js +34 -5
- package/dist/components/select/index.js +85 -21
- package/dist/components/show/index.js +1 -1
- package/dist/components/skeleton/index.js +44 -4
- package/dist/components/slider/index.js +134 -37
- package/dist/components/spotlight/index.js +269 -125
- package/dist/components/steps/index.js +26 -12
- package/dist/components/switch/index.js +160 -29
- package/dist/components/table/index.js +370 -66
- package/dist/components/tags-input/index.js +17 -7
- package/dist/components/textarea/index.js +47 -4
- package/dist/components/toast/index.js +28 -22
- package/dist/components/tooltip/index.js +71 -14
- package/dist/components/tree-view/index.js +45 -8
- package/dist/display-date-value-BAU46P8s.js +40 -0
- package/dist/display-value-Bz71ZqgM.js +57 -0
- package/dist/{featured-icon-DPysOpSf.js → featured-icon-CKDv0xfF.js} +27 -4
- package/dist/show-DAysVQAC.js +27 -0
- package/dist/utils/index.js +164 -73
- package/package.json +5 -3
- package/dist/checkmark-CW-yHMvN.js +0 -18
- package/dist/close-button-BM7ikbYh.js +0 -52
- package/dist/display-date-value-gTlidtNz.js +0 -21
- package/dist/display-value-BNKxQ99u.js +0 -37
- package/dist/show-IaI-36v9.js +0 -12
|
@@ -1,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 { floatingPanel } from "@pyck/styled-system/recipes";
|
|
4
5
|
import { ArrowDownLeft, GripVertical, Maximize, Minus, XIcon } from "lucide-react";
|
|
@@ -32,54 +33,64 @@ const StageTrigger = withContext(FloatingPanel.StageTrigger, "stageTrigger");
|
|
|
32
33
|
const StyledHeader = withContext(FloatingPanel.Header, "header");
|
|
33
34
|
const Title = withContext(FloatingPanel.Title, "title");
|
|
34
35
|
const Header = (props) => {
|
|
36
|
+
const $ = c(6);
|
|
35
37
|
const { children } = props;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
let t0;
|
|
39
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
40
|
+
t0 = <GripVertical />;
|
|
41
|
+
$[0] = t0;
|
|
42
|
+
} else t0 = $[0];
|
|
43
|
+
let t1;
|
|
44
|
+
if ($[1] !== children) {
|
|
45
|
+
t1 = <Title>{t0}{children}</Title>;
|
|
46
|
+
$[1] = children;
|
|
47
|
+
$[2] = t1;
|
|
48
|
+
} else t1 = $[2];
|
|
49
|
+
let t2;
|
|
50
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t2 = <Controls />;
|
|
52
|
+
$[3] = t2;
|
|
53
|
+
} else t2 = $[3];
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[4] !== t1) {
|
|
56
|
+
t3 = <DragTrigger><StyledHeader>{t1}{t2}</StyledHeader></DragTrigger>;
|
|
57
|
+
$[4] = t1;
|
|
58
|
+
$[5] = t3;
|
|
59
|
+
} else t3 = $[5];
|
|
60
|
+
return t3;
|
|
45
61
|
};
|
|
46
62
|
const Controls = () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</ButtonGroup>
|
|
70
|
-
</Control>;
|
|
63
|
+
const $ = c(4);
|
|
64
|
+
let t0;
|
|
65
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
66
|
+
t0 = <StageTrigger stage="minimized" asChild={true}><IconButton><Minus /></IconButton></StageTrigger>;
|
|
67
|
+
$[0] = t0;
|
|
68
|
+
} else t0 = $[0];
|
|
69
|
+
let t1;
|
|
70
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
71
|
+
t1 = <StageTrigger stage="maximized" asChild={true}><IconButton><Maximize /></IconButton></StageTrigger>;
|
|
72
|
+
$[1] = t1;
|
|
73
|
+
} else t1 = $[1];
|
|
74
|
+
let t2;
|
|
75
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
76
|
+
t2 = <StageTrigger stage="default" asChild={true}><IconButton><ArrowDownLeft /></IconButton></StageTrigger>;
|
|
77
|
+
$[2] = t2;
|
|
78
|
+
} else t2 = $[2];
|
|
79
|
+
let t3;
|
|
80
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t3 = <Control asChild={true}><ButtonGroup variant="plain" size="2xs">{t0}{t1}{t2}<CloseTrigger asChild={true}><IconButton><XIcon /></IconButton></CloseTrigger></ButtonGroup></Control>;
|
|
82
|
+
$[3] = t3;
|
|
83
|
+
} else t3 = $[3];
|
|
84
|
+
return t3;
|
|
71
85
|
};
|
|
72
86
|
const ResizeTriggers = () => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<ResizeTrigger axis="sw" />
|
|
81
|
-
<ResizeTrigger axis="nw" />
|
|
82
|
-
</>;
|
|
87
|
+
const $ = c(1);
|
|
88
|
+
let t0;
|
|
89
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
90
|
+
t0 = <><ResizeTrigger axis="n" /><ResizeTrigger axis="e" /><ResizeTrigger axis="w" /><ResizeTrigger axis="s" /><ResizeTrigger axis="ne" /><ResizeTrigger axis="se" /><ResizeTrigger axis="sw" /><ResizeTrigger axis="nw" /></>;
|
|
91
|
+
$[0] = t0;
|
|
92
|
+
} else t0 = $[0];
|
|
93
|
+
return t0;
|
|
83
94
|
};
|
|
84
95
|
|
|
85
96
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
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";
|
|
@@ -10,36 +11,124 @@ import { Fieldset } from "@pyck/react/fieldset";
|
|
|
10
11
|
//#region src/components/form/form.tsx
|
|
11
12
|
const StyledForm = styled(ark.form, form);
|
|
12
13
|
const Form = (props) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const $ = c(8);
|
|
15
|
+
let formProps;
|
|
16
|
+
let value;
|
|
17
|
+
if ($[0] !== props) {
|
|
18
|
+
({value, ...formProps} = props);
|
|
19
|
+
$[0] = props;
|
|
20
|
+
$[1] = formProps;
|
|
21
|
+
$[2] = value;
|
|
22
|
+
} else {
|
|
23
|
+
formProps = $[1];
|
|
24
|
+
value = $[2];
|
|
25
|
+
}
|
|
26
|
+
let t0;
|
|
27
|
+
if ($[3] !== formProps) {
|
|
28
|
+
t0 = <StyledForm {...formProps} />;
|
|
29
|
+
$[3] = formProps;
|
|
30
|
+
$[4] = t0;
|
|
31
|
+
} else t0 = $[4];
|
|
32
|
+
let t1;
|
|
33
|
+
if ($[5] !== t0 || $[6] !== value) {
|
|
34
|
+
t1 = <FormProvider {...value}>{t0}</FormProvider>;
|
|
35
|
+
$[5] = t0;
|
|
36
|
+
$[6] = value;
|
|
37
|
+
$[7] = t1;
|
|
38
|
+
} else t1 = $[7];
|
|
39
|
+
return t1;
|
|
17
40
|
};
|
|
18
41
|
|
|
19
42
|
//#endregion
|
|
20
43
|
//#region src/components/form/form-section.tsx
|
|
21
|
-
const FormSection = (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
const FormSection = (t0) => {
|
|
45
|
+
const $ = c(35);
|
|
46
|
+
const { id, value, onSubmit, error, legend, description, children, loading, busy } = t0;
|
|
47
|
+
let t1;
|
|
48
|
+
if ($[0] !== onSubmit || $[1] !== value) {
|
|
49
|
+
t1 = value.handleSubmit(onSubmit);
|
|
50
|
+
$[0] = onSubmit;
|
|
51
|
+
$[1] = value;
|
|
52
|
+
$[2] = t1;
|
|
53
|
+
} else t1 = $[2];
|
|
54
|
+
const t2 = !!error;
|
|
55
|
+
let t3;
|
|
56
|
+
if ($[3] !== legend) {
|
|
57
|
+
t3 = <Fieldset.Legend>{legend}</Fieldset.Legend>;
|
|
58
|
+
$[3] = legend;
|
|
59
|
+
$[4] = t3;
|
|
60
|
+
} else t3 = $[4];
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[5] !== description) {
|
|
63
|
+
t4 = <Fieldset.Description>{description}</Fieldset.Description>;
|
|
64
|
+
$[5] = description;
|
|
65
|
+
$[6] = t4;
|
|
66
|
+
} else t4 = $[6];
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[7] !== description || $[8] !== t4) {
|
|
69
|
+
t5 = <Show when={description}>{t4}</Show>;
|
|
70
|
+
$[7] = description;
|
|
71
|
+
$[8] = t4;
|
|
72
|
+
$[9] = t5;
|
|
73
|
+
} else t5 = $[9];
|
|
74
|
+
let t6;
|
|
75
|
+
if ($[10] !== t3 || $[11] !== t5) {
|
|
76
|
+
t6 = <Fieldset.Header>{t3}{t5}</Fieldset.Header>;
|
|
77
|
+
$[10] = t3;
|
|
78
|
+
$[11] = t5;
|
|
79
|
+
$[12] = t6;
|
|
80
|
+
} else t6 = $[12];
|
|
81
|
+
let t7;
|
|
82
|
+
if ($[13] !== children) {
|
|
83
|
+
t7 = <Fieldset.Body>{children}</Fieldset.Body>;
|
|
84
|
+
$[13] = children;
|
|
85
|
+
$[14] = t7;
|
|
86
|
+
} else t7 = $[14];
|
|
87
|
+
let t8;
|
|
88
|
+
if ($[15] !== error) {
|
|
89
|
+
t8 = error && <Fieldset.ErrorText>{error}</Fieldset.ErrorText>;
|
|
90
|
+
$[15] = error;
|
|
91
|
+
$[16] = t8;
|
|
92
|
+
} else t8 = $[16];
|
|
93
|
+
let t9;
|
|
94
|
+
if ($[17] !== busy || $[18] !== loading) {
|
|
95
|
+
t9 = <Button type="submit" loading={loading} disabled={busy} size="sm">Save</Button>;
|
|
96
|
+
$[17] = busy;
|
|
97
|
+
$[18] = loading;
|
|
98
|
+
$[19] = t9;
|
|
99
|
+
} else t9 = $[19];
|
|
100
|
+
let t10;
|
|
101
|
+
if ($[20] !== t8 || $[21] !== t9) {
|
|
102
|
+
t10 = <Fieldset.Footer>{t8}{t9}</Fieldset.Footer>;
|
|
103
|
+
$[20] = t8;
|
|
104
|
+
$[21] = t9;
|
|
105
|
+
$[22] = t10;
|
|
106
|
+
} else t10 = $[22];
|
|
107
|
+
let t11;
|
|
108
|
+
if ($[23] !== t10 || $[24] !== t2 || $[25] !== t6 || $[26] !== t7) {
|
|
109
|
+
t11 = <Fieldset.Root invalid={t2}>{t6}{t7}{t10}</Fieldset.Root>;
|
|
110
|
+
$[23] = t10;
|
|
111
|
+
$[24] = t2;
|
|
112
|
+
$[25] = t6;
|
|
113
|
+
$[26] = t7;
|
|
114
|
+
$[27] = t11;
|
|
115
|
+
} else t11 = $[27];
|
|
116
|
+
let t12;
|
|
117
|
+
if ($[28] !== t1 || $[29] !== t11 || $[30] !== value) {
|
|
118
|
+
t12 = <Form$1 value={value} onSubmit={t1}>{t11}</Form$1>;
|
|
119
|
+
$[28] = t1;
|
|
120
|
+
$[29] = t11;
|
|
121
|
+
$[30] = value;
|
|
122
|
+
$[31] = t12;
|
|
123
|
+
} else t12 = $[31];
|
|
124
|
+
let t13;
|
|
125
|
+
if ($[32] !== id || $[33] !== t12) {
|
|
126
|
+
t13 = <Box id={id}>{t12}</Box>;
|
|
127
|
+
$[32] = id;
|
|
128
|
+
$[33] = t12;
|
|
129
|
+
$[34] = t13;
|
|
130
|
+
} else t13 = $[34];
|
|
131
|
+
return t13;
|
|
43
132
|
};
|
|
44
133
|
|
|
45
134
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
1
2
|
import { Fragment } from "react";
|
|
2
3
|
import { Show } from "@pyck/react/show";
|
|
3
4
|
import { useHighlight } from "@ark-ui/react/highlight";
|
|
@@ -6,21 +7,58 @@ import { Mark } from "@pyck/react/mark";
|
|
|
6
7
|
|
|
7
8
|
//#region src/components/highlight/highlight.tsx
|
|
8
9
|
const Highlight = (props) => {
|
|
9
|
-
const
|
|
10
|
+
const $ = c(16);
|
|
11
|
+
let children;
|
|
12
|
+
let markProps;
|
|
13
|
+
let matchAll;
|
|
14
|
+
let query;
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
({children, query, ignoreCase: t0, matchAll, ...markProps} = props);
|
|
18
|
+
$[0] = props;
|
|
19
|
+
$[1] = children;
|
|
20
|
+
$[2] = markProps;
|
|
21
|
+
$[3] = matchAll;
|
|
22
|
+
$[4] = query;
|
|
23
|
+
$[5] = t0;
|
|
24
|
+
} else {
|
|
25
|
+
children = $[1];
|
|
26
|
+
markProps = $[2];
|
|
27
|
+
matchAll = $[3];
|
|
28
|
+
query = $[4];
|
|
29
|
+
t0 = $[5];
|
|
30
|
+
}
|
|
31
|
+
const ignoreCase = t0 === void 0 ? true : t0;
|
|
10
32
|
if (typeof children !== "string") throw new Error("The children prop of Highlight must be a string");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
let t1;
|
|
34
|
+
if ($[6] !== children || $[7] !== ignoreCase || $[8] !== matchAll || $[9] !== query) {
|
|
35
|
+
t1 = {
|
|
36
|
+
query,
|
|
37
|
+
text: children,
|
|
38
|
+
matchAll,
|
|
39
|
+
ignoreCase
|
|
40
|
+
};
|
|
41
|
+
$[6] = children;
|
|
42
|
+
$[7] = ignoreCase;
|
|
43
|
+
$[8] = matchAll;
|
|
44
|
+
$[9] = query;
|
|
45
|
+
$[10] = t1;
|
|
46
|
+
} else t1 = $[10];
|
|
47
|
+
const chunks = useHighlight(t1);
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[11] !== markProps) {
|
|
50
|
+
t2 = (chunk, index) => <Show key={index} when={chunk.match} fallback={<Fragment key={index}>{chunk.text}</Fragment>}><Mark key={index} {...markProps}>{chunk.text}</Mark></Show>;
|
|
51
|
+
$[11] = markProps;
|
|
52
|
+
$[12] = t2;
|
|
53
|
+
} else t2 = $[12];
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[13] !== chunks || $[14] !== t2) {
|
|
56
|
+
t3 = <For each={chunks}>{t2}</For>;
|
|
57
|
+
$[13] = chunks;
|
|
58
|
+
$[14] = t2;
|
|
59
|
+
$[15] = t3;
|
|
60
|
+
} else t3 = $[15];
|
|
61
|
+
return t3;
|
|
24
62
|
};
|
|
25
63
|
|
|
26
64
|
//#endregion
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
1
2
|
import { forwardRef } from "react";
|
|
2
3
|
import { styled } from "@pyck/styled-system/jsx";
|
|
3
4
|
|
|
4
5
|
//#region src/components/image/image.tsx
|
|
5
6
|
const StyledImage = styled("img");
|
|
6
7
|
const Image = forwardRef(function Image(props, ref) {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const $ = c(9);
|
|
9
|
+
let align;
|
|
10
|
+
let rest;
|
|
11
|
+
let t0;
|
|
12
|
+
if ($[0] !== props) {
|
|
13
|
+
({align, fit: t0, ...rest} = props);
|
|
14
|
+
$[0] = props;
|
|
15
|
+
$[1] = align;
|
|
16
|
+
$[2] = rest;
|
|
17
|
+
$[3] = t0;
|
|
18
|
+
} else {
|
|
19
|
+
align = $[1];
|
|
20
|
+
rest = $[2];
|
|
21
|
+
t0 = $[3];
|
|
22
|
+
}
|
|
23
|
+
const fit = t0 === void 0 ? "cover" : t0;
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[4] !== align || $[5] !== fit || $[6] !== ref || $[7] !== rest) {
|
|
26
|
+
t1 = <StyledImage ref={ref} objectFit={fit} objectPosition={align} {...rest} />;
|
|
27
|
+
$[4] = align;
|
|
28
|
+
$[5] = fit;
|
|
29
|
+
$[6] = ref;
|
|
30
|
+
$[7] = rest;
|
|
31
|
+
$[8] = t1;
|
|
32
|
+
} else t1 = $[8];
|
|
33
|
+
return t1;
|
|
9
34
|
});
|
|
10
35
|
|
|
11
36
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
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";
|
|
3
4
|
import { Field } from "@pyck/react/field";
|
|
@@ -10,11 +11,53 @@ const Input = styled(Field$1.Input, input);
|
|
|
10
11
|
//#endregion
|
|
11
12
|
//#region src/components/input/input.field.tsx
|
|
12
13
|
const InputField = (props) => {
|
|
13
|
-
const
|
|
14
|
+
const $ = c(17);
|
|
15
|
+
let disabled;
|
|
16
|
+
let helperText;
|
|
17
|
+
let hideLabel;
|
|
18
|
+
let inputProps;
|
|
19
|
+
let label;
|
|
20
|
+
let name;
|
|
21
|
+
if ($[0] !== props) {
|
|
22
|
+
({name, label, hideLabel, helperText, disabled, ...inputProps} = props);
|
|
23
|
+
$[0] = props;
|
|
24
|
+
$[1] = disabled;
|
|
25
|
+
$[2] = helperText;
|
|
26
|
+
$[3] = hideLabel;
|
|
27
|
+
$[4] = inputProps;
|
|
28
|
+
$[5] = label;
|
|
29
|
+
$[6] = name;
|
|
30
|
+
} else {
|
|
31
|
+
disabled = $[1];
|
|
32
|
+
helperText = $[2];
|
|
33
|
+
hideLabel = $[3];
|
|
34
|
+
inputProps = $[4];
|
|
35
|
+
label = $[5];
|
|
36
|
+
name = $[6];
|
|
37
|
+
}
|
|
14
38
|
const { control } = useFormContext();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
let t0;
|
|
40
|
+
if ($[7] !== disabled || $[8] !== helperText || $[9] !== hideLabel || $[10] !== inputProps || $[11] !== label) {
|
|
41
|
+
t0 = (t1) => {
|
|
42
|
+
const { field, fieldState } = t1;
|
|
43
|
+
return <Field label={label} helperText={helperText} hideLabel={hideLabel} disabled={field.disabled || disabled} required={inputProps.required} invalid={!!fieldState.error} errorText={fieldState.error?.message}><Input {...inputProps} name={field.name} value={field.value} onChange={field.onChange} onBlur={field.onBlur} /></Field>;
|
|
44
|
+
};
|
|
45
|
+
$[7] = disabled;
|
|
46
|
+
$[8] = helperText;
|
|
47
|
+
$[9] = hideLabel;
|
|
48
|
+
$[10] = inputProps;
|
|
49
|
+
$[11] = label;
|
|
50
|
+
$[12] = t0;
|
|
51
|
+
} else t0 = $[12];
|
|
52
|
+
let t1;
|
|
53
|
+
if ($[13] !== control || $[14] !== name || $[15] !== t0) {
|
|
54
|
+
t1 = <Controller name={name} control={control} render={t0} />;
|
|
55
|
+
$[13] = control;
|
|
56
|
+
$[14] = name;
|
|
57
|
+
$[15] = t0;
|
|
58
|
+
$[16] = t1;
|
|
59
|
+
} else t1 = $[16];
|
|
60
|
+
return t1;
|
|
18
61
|
};
|
|
19
62
|
|
|
20
63
|
//#endregion
|
|
@@ -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 { createStyleContext } from "@pyck/styled-system/jsx";
|
|
@@ -9,20 +10,61 @@ const { withProvider, withContext } = createStyleContext(inputGroup);
|
|
|
9
10
|
const Root = withProvider(ark.div, "root");
|
|
10
11
|
const Element = withContext(ark.div, "element");
|
|
11
12
|
const InputGroup = forwardRef(function InputGroup(props, ref) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
const $ = c(21);
|
|
14
|
+
let children;
|
|
15
|
+
let endElement;
|
|
16
|
+
let rest;
|
|
17
|
+
let startElement;
|
|
18
|
+
if ($[0] !== props) {
|
|
19
|
+
({startElement, endElement, children, ...rest} = props);
|
|
20
|
+
$[0] = props;
|
|
21
|
+
$[1] = children;
|
|
22
|
+
$[2] = endElement;
|
|
23
|
+
$[3] = rest;
|
|
24
|
+
$[4] = startElement;
|
|
25
|
+
} else {
|
|
26
|
+
children = $[1];
|
|
27
|
+
endElement = $[2];
|
|
28
|
+
rest = $[3];
|
|
29
|
+
startElement = $[4];
|
|
30
|
+
}
|
|
31
|
+
let t0;
|
|
32
|
+
if ($[5] !== startElement) {
|
|
33
|
+
t0 = <Element insetInlineStart="0" top="0">{startElement}</Element>;
|
|
34
|
+
$[5] = startElement;
|
|
35
|
+
$[6] = t0;
|
|
36
|
+
} else t0 = $[6];
|
|
37
|
+
let t1;
|
|
38
|
+
if ($[7] !== startElement || $[8] !== t0) {
|
|
39
|
+
t1 = <Show when={startElement}>{t0}</Show>;
|
|
40
|
+
$[7] = startElement;
|
|
41
|
+
$[8] = t0;
|
|
42
|
+
$[9] = t1;
|
|
43
|
+
} else t1 = $[9];
|
|
44
|
+
let t2;
|
|
45
|
+
if ($[10] !== endElement) {
|
|
46
|
+
t2 = <Element insetInlineEnd="0" top="0">{endElement}</Element>;
|
|
47
|
+
$[10] = endElement;
|
|
48
|
+
$[11] = t2;
|
|
49
|
+
} else t2 = $[11];
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[12] !== endElement || $[13] !== t2) {
|
|
52
|
+
t3 = <Show when={endElement}>{t2}</Show>;
|
|
53
|
+
$[12] = endElement;
|
|
54
|
+
$[13] = t2;
|
|
55
|
+
$[14] = t3;
|
|
56
|
+
} else t3 = $[14];
|
|
57
|
+
let t4;
|
|
58
|
+
if ($[15] !== children || $[16] !== ref || $[17] !== rest || $[18] !== t1 || $[19] !== t3) {
|
|
59
|
+
t4 = <Root ref={ref} {...rest}>{t1}{children}{t3}</Root>;
|
|
60
|
+
$[15] = children;
|
|
61
|
+
$[16] = ref;
|
|
62
|
+
$[17] = rest;
|
|
63
|
+
$[18] = t1;
|
|
64
|
+
$[19] = t3;
|
|
65
|
+
$[20] = t4;
|
|
66
|
+
} else t4 = $[20];
|
|
67
|
+
return t4;
|
|
26
68
|
});
|
|
27
69
|
|
|
28
70
|
//#endregion
|