@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.
- package/dist/checkmark-rF75Pk98.js +75 -0
- package/dist/close-button-DAgpEZYq.js +172 -0
- package/dist/components/avatar/index.js +118 -20
- package/dist/components/button/index.js +1 -1
- package/dist/components/carousel/index.js +52 -12
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +151 -34
- package/dist/components/checkmark/index.js +1 -1
- package/dist/components/clipboard/index.js +3 -2
- package/dist/components/combobox/index.js +46 -9
- package/dist/components/data-list/index.d.ts +3 -2
- package/dist/components/data-list/index.js +23 -8
- package/dist/components/date-picker/index.js +17 -10
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +156 -95
- package/dist/components/display-date-value/index.d.ts +1 -1
- package/dist/components/display-date-value/index.js +2 -2
- package/dist/components/display-value/index.js +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +22 -1
- package/dist/components/drilldown-menu/index.js +268 -87
- package/dist/components/field/index.js +110 -27
- package/dist/components/floating-panel/index.d.ts +1 -1
- package/dist/components/floating-panel/index.js +91 -43
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.js +142 -26
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/highlight/index.js +63 -14
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/image/index.js +33 -2
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js +67 -4
- package/dist/components/input-group/index.js +79 -14
- package/dist/components/json-form-builder/index.d.ts +1 -1
- package/dist/components/json-form-builder/index.js +383 -99
- package/dist/components/loader/index.js +35 -15
- package/dist/components/logo/index.js +97 -19
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/index.js +41 -7
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.js +68 -13
- package/dist/components/page-header/index.js +67 -12
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.js +52 -13
- package/dist/components/picker/index.js +56 -28
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +2 -1
- package/dist/components/progress/index.js +57 -23
- package/dist/components/progress-circle/index.js +82 -30
- package/dist/components/radio-group/index.js +60 -19
- package/dist/components/scroll-area/index.js +80 -19
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/segment-group/index.js +40 -5
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +119 -22
- package/dist/components/show/index.js +1 -1
- package/dist/components/skeleton/index.js +55 -4
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +174 -55
- package/dist/components/spotlight/index.js +447 -126
- package/dist/components/steps/index.js +35 -13
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +210 -43
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +435 -67
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/tags-input/index.js +25 -9
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.js +66 -4
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +56 -22
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +87 -25
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/index.js +64 -8
- package/dist/display-date-value-CSPbdE60.js +45 -0
- package/dist/{display-date-value-CdfgVuB7.d.ts → display-date-value-RbzRgYHt.d.ts} +1 -1
- package/dist/display-value-R2nHrGQo.js +81 -0
- package/dist/{featured-icon-DPysOpSf.js → featured-icon-DBnAKGXC.js} +31 -4
- package/dist/show-B7zG1Vci.js +28 -0
- package/dist/utils/index.js +164 -73
- package/package.json +6 -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,10 +1,12 @@
|
|
|
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";
|
|
6
7
|
import { select } from "@pyck/styled-system/recipes";
|
|
7
8
|
import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
10
|
import { Field } from "@pyck/react/field";
|
|
9
11
|
import { Controller, useFormContext } from "react-hook-form";
|
|
10
12
|
import { Show } from "@pyck/react/show";
|
|
@@ -48,16 +50,48 @@ const List = withContext(Select$1.List, "list");
|
|
|
48
50
|
const Positioner = withContext(Select$1.Positioner, "positioner");
|
|
49
51
|
const Trigger = withContext(Select$1.Trigger, "trigger");
|
|
50
52
|
const ValueText = withContext(Select$1.ValueText, "valueText");
|
|
51
|
-
const Indicator = withContext(Select$1.Indicator, "indicator", { defaultProps: { children:
|
|
53
|
+
const Indicator = withContext(Select$1.Indicator, "indicator", { defaultProps: { children: /* @__PURE__ */ jsx(ChevronsUpDownIcon, {}) } });
|
|
52
54
|
const HiddenSelect = Select$1.HiddenSelect;
|
|
53
55
|
const StyledItemIndicator = withContext(Select$1.ItemIndicator, "itemIndicator");
|
|
54
56
|
const ItemIndicator$1 = forwardRef(function ItemIndicator(props, ref) {
|
|
57
|
+
const $ = c(8);
|
|
55
58
|
const item = useSelectItemContext();
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
let t0;
|
|
60
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t0 = /* @__PURE__ */ jsx("svg", {
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
focusable: "false"
|
|
64
|
+
});
|
|
65
|
+
$[0] = t0;
|
|
66
|
+
} else t0 = $[0];
|
|
67
|
+
let t1;
|
|
68
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t1 = /* @__PURE__ */ jsx(CheckIcon, {});
|
|
70
|
+
$[1] = t1;
|
|
71
|
+
} else t1 = $[1];
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[2] !== props || $[3] !== ref) {
|
|
74
|
+
t2 = /* @__PURE__ */ jsx(StyledItemIndicator, {
|
|
75
|
+
ref,
|
|
76
|
+
...props,
|
|
77
|
+
children: t1
|
|
78
|
+
});
|
|
79
|
+
$[2] = props;
|
|
80
|
+
$[3] = ref;
|
|
81
|
+
$[4] = t2;
|
|
82
|
+
} else t2 = $[4];
|
|
83
|
+
let t3;
|
|
84
|
+
if ($[5] !== item.selected || $[6] !== t2) {
|
|
85
|
+
t3 = /* @__PURE__ */ jsx(Show, {
|
|
86
|
+
when: item.selected,
|
|
87
|
+
fallback: t0,
|
|
88
|
+
children: t2
|
|
89
|
+
});
|
|
90
|
+
$[5] = item.selected;
|
|
91
|
+
$[6] = t2;
|
|
92
|
+
$[7] = t3;
|
|
93
|
+
} else t3 = $[7];
|
|
94
|
+
return t3;
|
|
61
95
|
});
|
|
62
96
|
|
|
63
97
|
//#endregion
|
|
@@ -68,23 +102,86 @@ var select_field_exports = /* @__PURE__ */ __exportAll({
|
|
|
68
102
|
Root: () => Root
|
|
69
103
|
});
|
|
70
104
|
const Root = (props) => {
|
|
71
|
-
const
|
|
105
|
+
const $ = c(22);
|
|
106
|
+
let disabled;
|
|
107
|
+
let helperText;
|
|
108
|
+
let hideLabel;
|
|
109
|
+
let label;
|
|
110
|
+
let name;
|
|
111
|
+
let placeholder;
|
|
112
|
+
let required;
|
|
113
|
+
let selectProps;
|
|
114
|
+
if ($[0] !== props) {
|
|
115
|
+
({name, label, placeholder, hideLabel, helperText, disabled, required, ...selectProps} = props);
|
|
116
|
+
$[0] = props;
|
|
117
|
+
$[1] = disabled;
|
|
118
|
+
$[2] = helperText;
|
|
119
|
+
$[3] = hideLabel;
|
|
120
|
+
$[4] = label;
|
|
121
|
+
$[5] = name;
|
|
122
|
+
$[6] = placeholder;
|
|
123
|
+
$[7] = required;
|
|
124
|
+
$[8] = selectProps;
|
|
125
|
+
} else {
|
|
126
|
+
disabled = $[1];
|
|
127
|
+
helperText = $[2];
|
|
128
|
+
hideLabel = $[3];
|
|
129
|
+
label = $[4];
|
|
130
|
+
name = $[5];
|
|
131
|
+
placeholder = $[6];
|
|
132
|
+
required = $[7];
|
|
133
|
+
selectProps = $[8];
|
|
134
|
+
}
|
|
72
135
|
const { control } = useFormContext();
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
136
|
+
let t0;
|
|
137
|
+
if ($[9] !== disabled || $[10] !== helperText || $[11] !== hideLabel || $[12] !== label || $[13] !== placeholder || $[14] !== props.children || $[15] !== required || $[16] !== selectProps) {
|
|
138
|
+
t0 = (t1) => {
|
|
139
|
+
const { field, fieldState } = t1;
|
|
140
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
141
|
+
label,
|
|
142
|
+
helperText,
|
|
143
|
+
hideLabel,
|
|
144
|
+
disabled: field.disabled || disabled,
|
|
145
|
+
invalid: !!fieldState.error,
|
|
146
|
+
errorText: fieldState.error?.message,
|
|
147
|
+
required,
|
|
148
|
+
children: /* @__PURE__ */ jsxs(Select.Root, {
|
|
149
|
+
...selectProps,
|
|
150
|
+
name: field.name,
|
|
151
|
+
onBlur: field.onBlur,
|
|
152
|
+
onInteractOutside: field.onBlur,
|
|
153
|
+
onValueChange: (t2) => {
|
|
154
|
+
const { value } = t2;
|
|
155
|
+
return field.onChange(selectProps.multiple ? value : value[0]);
|
|
156
|
+
},
|
|
157
|
+
value: [field.value].flat().filter(Boolean),
|
|
158
|
+
children: [/* @__PURE__ */ jsx(Select.Control, { children: /* @__PURE__ */ jsxs(Select.Trigger, { children: [/* @__PURE__ */ jsx(Select.ValueText, { placeholder }), /* @__PURE__ */ jsx(Select.IndicatorGroup, { children: /* @__PURE__ */ jsx(Select.Indicator, {}) })] }) }), /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(Select.Content, { children: props.children }) })]
|
|
159
|
+
})
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
$[9] = disabled;
|
|
163
|
+
$[10] = helperText;
|
|
164
|
+
$[11] = hideLabel;
|
|
165
|
+
$[12] = label;
|
|
166
|
+
$[13] = placeholder;
|
|
167
|
+
$[14] = props.children;
|
|
168
|
+
$[15] = required;
|
|
169
|
+
$[16] = selectProps;
|
|
170
|
+
$[17] = t0;
|
|
171
|
+
} else t0 = $[17];
|
|
172
|
+
let t1;
|
|
173
|
+
if ($[18] !== control || $[19] !== name || $[20] !== t0) {
|
|
174
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
175
|
+
name,
|
|
176
|
+
control,
|
|
177
|
+
render: t0
|
|
178
|
+
});
|
|
179
|
+
$[18] = control;
|
|
180
|
+
$[19] = name;
|
|
181
|
+
$[20] = t0;
|
|
182
|
+
$[21] = t1;
|
|
183
|
+
} else t1 = $[21];
|
|
184
|
+
return t1;
|
|
88
185
|
};
|
|
89
186
|
const Item = Select.Item;
|
|
90
187
|
const ItemIndicator = Select.ItemIndicator;
|
|
@@ -1,16 +1,67 @@
|
|
|
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";
|
|
4
5
|
import { skeleton } from "@pyck/styled-system/recipes";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
7
|
|
|
6
8
|
//#region src/components/skeleton/skeleton.tsx
|
|
7
9
|
const Skeleton = styled(ark.div, skeleton);
|
|
8
10
|
const SkeletonCircle = styled(ark.div, skeleton, { defaultProps: { circle: true } });
|
|
9
11
|
const SkeletonText = forwardRef(function SkeletonText(props, ref) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const $ = c(16);
|
|
13
|
+
let gap;
|
|
14
|
+
let rootProps;
|
|
15
|
+
let skeletonProps;
|
|
16
|
+
let t0;
|
|
17
|
+
if ($[0] !== props) {
|
|
18
|
+
({noOfLines: t0, gap, rootProps, ...skeletonProps} = props);
|
|
19
|
+
$[0] = props;
|
|
20
|
+
$[1] = gap;
|
|
21
|
+
$[2] = rootProps;
|
|
22
|
+
$[3] = skeletonProps;
|
|
23
|
+
$[4] = t0;
|
|
24
|
+
} else {
|
|
25
|
+
gap = $[1];
|
|
26
|
+
rootProps = $[2];
|
|
27
|
+
skeletonProps = $[3];
|
|
28
|
+
t0 = $[4];
|
|
29
|
+
}
|
|
30
|
+
const noOfLines = t0 === void 0 ? 3 : t0;
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[5] !== noOfLines) {
|
|
33
|
+
t1 = [...Array(noOfLines).keys()];
|
|
34
|
+
$[5] = noOfLines;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
} else t1 = $[6];
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[7] !== noOfLines || $[8] !== skeletonProps || $[9] !== t1) {
|
|
39
|
+
t2 = t1.map((index) => /* @__PURE__ */ jsx(Skeleton, {
|
|
40
|
+
height: "4",
|
|
41
|
+
_last: { maxW: noOfLines === 1 ? "100%" : "80%" },
|
|
42
|
+
...skeletonProps
|
|
43
|
+
}, index));
|
|
44
|
+
$[7] = noOfLines;
|
|
45
|
+
$[8] = skeletonProps;
|
|
46
|
+
$[9] = t1;
|
|
47
|
+
$[10] = t2;
|
|
48
|
+
} else t2 = $[10];
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[11] !== gap || $[12] !== ref || $[13] !== rootProps || $[14] !== t2) {
|
|
51
|
+
t3 = /* @__PURE__ */ jsx(Stack, {
|
|
52
|
+
ref,
|
|
53
|
+
gap,
|
|
54
|
+
width: "full",
|
|
55
|
+
...rootProps,
|
|
56
|
+
children: t2
|
|
57
|
+
});
|
|
58
|
+
$[11] = gap;
|
|
59
|
+
$[12] = ref;
|
|
60
|
+
$[13] = rootProps;
|
|
61
|
+
$[14] = t2;
|
|
62
|
+
$[15] = t3;
|
|
63
|
+
} else t3 = $[15];
|
|
64
|
+
return t3;
|
|
14
65
|
});
|
|
15
66
|
|
|
16
67
|
//#endregion
|
|
@@ -2,6 +2,7 @@ import * as react from "react";
|
|
|
2
2
|
import { ComponentProps, ReactNode } 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 "react/jsx-runtime";
|
|
5
6
|
import * as _ark_ui_react0 from "@ark-ui/react";
|
|
6
7
|
import { Slider as Slider$1 } from "@ark-ui/react/slider";
|
|
7
8
|
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { ark } from "@ark-ui/react/factory";
|
|
4
4
|
import { HStack, VisuallyHidden, createStyleContext } from "@pyck/styled-system/jsx";
|
|
5
5
|
import { slider } from "@pyck/styled-system/recipes";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Show } from "@pyck/react/show";
|
|
7
8
|
import { Wrap } from "@pyck/react/wrap";
|
|
8
9
|
import { For } from "@pyck/react/for";
|
|
9
10
|
import { Slider as Slider$1, SliderContext as Context, useSliderContext } from "@ark-ui/react/slider";
|
|
10
11
|
|
|
11
12
|
//#region src/components/slider/slider.tsx
|
|
12
|
-
var slider_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
-
Context: () => Context,
|
|
14
|
-
Control: () => Control,
|
|
15
|
-
DraggingIndicator: () => DraggingIndicator,
|
|
16
|
-
HiddenInput: () => HiddenInput,
|
|
17
|
-
Label: () => Label,
|
|
18
|
-
Marker: () => Marker,
|
|
19
|
-
MarkerGroup: () => MarkerGroup,
|
|
20
|
-
MarkerIndicator: () => MarkerIndicator,
|
|
21
|
-
Marks: () => Marks,
|
|
22
|
-
Range: () => Range,
|
|
23
|
-
Root: () => Root,
|
|
24
|
-
Thumb: () => Thumb,
|
|
25
|
-
Thumbs: () => Thumbs,
|
|
26
|
-
Track: () => Track,
|
|
27
|
-
ValueText: () => ValueText
|
|
28
|
-
});
|
|
29
13
|
const { withProvider, withContext } = createStyleContext(slider);
|
|
30
14
|
const Root = withProvider(Slider$1.Root, "root");
|
|
31
15
|
const Control = withContext(Slider$1.Control, "control");
|
|
@@ -40,54 +24,189 @@ const Track = withContext(Slider$1.Track, "track");
|
|
|
40
24
|
const ValueText = withContext(Slider$1.ValueText, "valueText");
|
|
41
25
|
const HiddenInput = Slider$1.HiddenInput;
|
|
42
26
|
const Marks = forwardRef(function Marks(props, ref) {
|
|
43
|
-
const
|
|
27
|
+
const $ = c(9);
|
|
28
|
+
let marks;
|
|
29
|
+
let rest;
|
|
30
|
+
if ($[0] !== props) {
|
|
31
|
+
({marks, ...rest} = props);
|
|
32
|
+
$[0] = props;
|
|
33
|
+
$[1] = marks;
|
|
34
|
+
$[2] = rest;
|
|
35
|
+
} else {
|
|
36
|
+
marks = $[1];
|
|
37
|
+
rest = $[2];
|
|
38
|
+
}
|
|
44
39
|
if (!marks?.length) return null;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
let t0;
|
|
41
|
+
if ($[3] !== marks) {
|
|
42
|
+
t0 = /* @__PURE__ */ jsx(For, {
|
|
43
|
+
each: marks,
|
|
44
|
+
children: _temp$1
|
|
45
|
+
});
|
|
46
|
+
$[3] = marks;
|
|
47
|
+
$[4] = t0;
|
|
48
|
+
} else t0 = $[4];
|
|
49
|
+
let t1;
|
|
50
|
+
if ($[5] !== ref || $[6] !== rest || $[7] !== t0) {
|
|
51
|
+
t1 = /* @__PURE__ */ jsx(MarkerGroup, {
|
|
52
|
+
ref,
|
|
53
|
+
...rest,
|
|
54
|
+
children: t0
|
|
55
|
+
});
|
|
56
|
+
$[5] = ref;
|
|
57
|
+
$[6] = rest;
|
|
58
|
+
$[7] = t0;
|
|
59
|
+
$[8] = t1;
|
|
60
|
+
} else t1 = $[8];
|
|
61
|
+
return t1;
|
|
57
62
|
});
|
|
58
63
|
const Thumbs = (props) => {
|
|
64
|
+
const $ = c(5);
|
|
59
65
|
const slider = useSliderContext();
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
let t0;
|
|
67
|
+
if ($[0] !== props) {
|
|
68
|
+
t0 = (_, index) => /* @__PURE__ */ jsx(Thumb, {
|
|
69
|
+
index,
|
|
70
|
+
...props,
|
|
71
|
+
children: /* @__PURE__ */ jsx(HiddenInput, {})
|
|
72
|
+
}, index);
|
|
73
|
+
$[0] = props;
|
|
74
|
+
$[1] = t0;
|
|
75
|
+
} else t0 = $[1];
|
|
76
|
+
let t1;
|
|
77
|
+
if ($[2] !== slider.value || $[3] !== t0) {
|
|
78
|
+
t1 = /* @__PURE__ */ jsx(For, {
|
|
79
|
+
each: slider.value,
|
|
80
|
+
children: t0
|
|
81
|
+
});
|
|
82
|
+
$[2] = slider.value;
|
|
83
|
+
$[3] = t0;
|
|
84
|
+
$[4] = t1;
|
|
85
|
+
} else t1 = $[4];
|
|
86
|
+
return t1;
|
|
65
87
|
};
|
|
88
|
+
function _temp$1(mark, index) {
|
|
89
|
+
const value = typeof mark === "number" ? mark : mark.value;
|
|
90
|
+
const label = typeof mark === "number" ? void 0 : mark.label;
|
|
91
|
+
return /* @__PURE__ */ jsxs(Marker, {
|
|
92
|
+
value,
|
|
93
|
+
children: [/* @__PURE__ */ jsx(MarkerIndicator, {}), label != null && /* @__PURE__ */ jsx("span", { children: label })]
|
|
94
|
+
}, index);
|
|
95
|
+
}
|
|
66
96
|
|
|
67
97
|
//#endregion
|
|
68
98
|
//#region src/components/slider/sllider.closed.tsx
|
|
69
99
|
const Slider = forwardRef(function Slider(props, ref) {
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
const $ = c(28);
|
|
101
|
+
let children;
|
|
102
|
+
let hideLabel;
|
|
103
|
+
let label;
|
|
104
|
+
let marks;
|
|
105
|
+
let rest;
|
|
106
|
+
let showValue;
|
|
107
|
+
if ($[0] !== props) {
|
|
108
|
+
({label, hideLabel, showValue, children, marks, ...rest} = props);
|
|
109
|
+
$[0] = props;
|
|
110
|
+
$[1] = children;
|
|
111
|
+
$[2] = hideLabel;
|
|
112
|
+
$[3] = label;
|
|
113
|
+
$[4] = marks;
|
|
114
|
+
$[5] = rest;
|
|
115
|
+
$[6] = showValue;
|
|
116
|
+
} else {
|
|
117
|
+
children = $[1];
|
|
118
|
+
hideLabel = $[2];
|
|
119
|
+
label = $[3];
|
|
120
|
+
marks = $[4];
|
|
121
|
+
rest = $[5];
|
|
122
|
+
showValue = $[6];
|
|
123
|
+
}
|
|
124
|
+
let t0;
|
|
125
|
+
if ($[7] !== label) {
|
|
126
|
+
t0 = /* @__PURE__ */ jsx(Label, { children: label });
|
|
127
|
+
$[7] = label;
|
|
128
|
+
$[8] = t0;
|
|
129
|
+
} else t0 = $[8];
|
|
130
|
+
let t1;
|
|
131
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
|
+
t1 = /* @__PURE__ */ jsx(ValueText, {});
|
|
133
|
+
$[9] = t1;
|
|
134
|
+
} else t1 = $[9];
|
|
135
|
+
let t2;
|
|
136
|
+
if ($[10] !== showValue) {
|
|
137
|
+
t2 = /* @__PURE__ */ jsx(Show, {
|
|
138
|
+
when: showValue,
|
|
139
|
+
children: t1
|
|
140
|
+
});
|
|
141
|
+
$[10] = showValue;
|
|
142
|
+
$[11] = t2;
|
|
143
|
+
} else t2 = $[11];
|
|
144
|
+
let t3;
|
|
145
|
+
if ($[12] !== t0 || $[13] !== t2) {
|
|
146
|
+
t3 = /* @__PURE__ */ jsxs(HStack, {
|
|
147
|
+
justify: "space-between",
|
|
148
|
+
children: [t0, t2]
|
|
149
|
+
});
|
|
150
|
+
$[12] = t0;
|
|
151
|
+
$[13] = t2;
|
|
152
|
+
$[14] = t3;
|
|
153
|
+
} else t3 = $[14];
|
|
154
|
+
let t4;
|
|
155
|
+
if ($[15] !== hideLabel || $[16] !== t3) {
|
|
156
|
+
t4 = /* @__PURE__ */ jsx(Wrap, {
|
|
157
|
+
when: hideLabel,
|
|
158
|
+
with: _temp,
|
|
159
|
+
children: t3
|
|
160
|
+
});
|
|
161
|
+
$[15] = hideLabel;
|
|
162
|
+
$[16] = t3;
|
|
163
|
+
$[17] = t4;
|
|
164
|
+
} else t4 = $[17];
|
|
165
|
+
let t5;
|
|
166
|
+
let t6;
|
|
167
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
168
|
+
t5 = /* @__PURE__ */ jsx(Track, { children: /* @__PURE__ */ jsx(Range, {}) });
|
|
169
|
+
t6 = /* @__PURE__ */ jsx(Thumbs, {});
|
|
170
|
+
$[18] = t5;
|
|
171
|
+
$[19] = t6;
|
|
172
|
+
} else {
|
|
173
|
+
t5 = $[18];
|
|
174
|
+
t6 = $[19];
|
|
175
|
+
}
|
|
176
|
+
let t7;
|
|
177
|
+
if ($[20] !== marks) {
|
|
178
|
+
t7 = /* @__PURE__ */ jsxs(Control, { children: [
|
|
179
|
+
t5,
|
|
180
|
+
t6,
|
|
181
|
+
/* @__PURE__ */ jsx(Marks, { marks })
|
|
182
|
+
] });
|
|
183
|
+
$[20] = marks;
|
|
184
|
+
$[21] = t7;
|
|
185
|
+
} else t7 = $[21];
|
|
186
|
+
let t8;
|
|
187
|
+
if ($[22] !== children || $[23] !== ref || $[24] !== rest || $[25] !== t4 || $[26] !== t7) {
|
|
188
|
+
t8 = /* @__PURE__ */ jsxs(Root, {
|
|
189
|
+
ref,
|
|
190
|
+
...rest,
|
|
191
|
+
children: [
|
|
192
|
+
t4,
|
|
193
|
+
t7,
|
|
194
|
+
children
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
$[22] = children;
|
|
198
|
+
$[23] = ref;
|
|
199
|
+
$[24] = rest;
|
|
200
|
+
$[25] = t4;
|
|
201
|
+
$[26] = t7;
|
|
202
|
+
$[27] = t8;
|
|
203
|
+
} else t8 = $[27];
|
|
204
|
+
return t8;
|
|
89
205
|
});
|
|
90
206
|
const SliderContext = Context;
|
|
207
|
+
function _temp(node) {
|
|
208
|
+
return /* @__PURE__ */ jsx(VisuallyHidden, { children: node });
|
|
209
|
+
}
|
|
91
210
|
|
|
92
211
|
//#endregion
|
|
93
212
|
export { Slider, SliderContext };
|