@xds/react 0.2.0 → 1.0.0
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/Accordion.js +3 -2
- package/dist/Button.js +5 -3
- package/dist/Card.js +1 -1
- package/dist/DatePicker.js +167 -170
- package/dist/DateRangePicker.js +91 -94
- package/dist/Menu.js +83 -75
- package/dist/SearchField.js +4 -2
- package/dist/Select.js +123 -98
- package/dist/Slider.d.ts +1 -1
- package/dist/Slider.js +44 -35
- package/dist/TextField.js +130 -107
- package/dist/Toast.d.ts +1 -1
- package/dist/Toast.js +50 -45
- package/dist/Tooltip.js +54 -40
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/picture.js +2 -2
- package/dist/portal.d.ts +6 -4
- package/dist/portal.js +61 -9
- package/eject/files/Accordion.tsx +5 -2
- package/eject/files/Avatar.tsx +1 -1
- package/eject/files/AvatarStack.tsx +1 -1
- package/eject/files/Badge.tsx +1 -1
- package/eject/files/Banner.tsx +1 -1
- package/eject/files/Button.tsx +9 -5
- package/eject/files/Card.tsx +2 -2
- package/eject/files/Checkbox.tsx +1 -1
- package/eject/files/Chip.tsx +1 -1
- package/eject/files/ChipBar.tsx +1 -1
- package/eject/files/CountBadge.tsx +1 -1
- package/eject/files/DatePicker.tsx +32 -23
- package/eject/files/DateRangePicker.tsx +34 -23
- package/eject/files/Dialog.tsx +1 -1
- package/eject/files/Divider.tsx +1 -1
- package/eject/files/EmptyState.tsx +1 -1
- package/eject/files/Icon.tsx +1 -1
- package/eject/files/IconButton.tsx +1 -1
- package/eject/files/ListRow.tsx +1 -1
- package/eject/files/MediaCard.tsx +1 -1
- package/eject/files/Menu.tsx +7 -7
- package/eject/files/ProgressBar.tsx +1 -1
- package/eject/files/RadioGroup.tsx +1 -1
- package/eject/files/SearchField.tsx +6 -2
- package/eject/files/SectionHeader.tsx +1 -1
- package/eject/files/SegmentedControl.tsx +1 -1
- package/eject/files/Select.tsx +20 -22
- package/eject/files/Sidebar.tsx +1 -1
- package/eject/files/Skeleton.tsx +1 -1
- package/eject/files/Slider.tsx +11 -5
- package/eject/files/Spinner.tsx +1 -1
- package/eject/files/Switch.tsx +1 -1
- package/eject/files/Tabs.tsx +1 -1
- package/eject/files/Text.tsx +1 -1
- package/eject/files/TextField.tsx +18 -4
- package/eject/files/Thumbnail.tsx +1 -1
- package/eject/files/Toast.tsx +11 -15
- package/eject/files/Tooltip.tsx +9 -3
- package/eject/files/accordion.css +1 -1
- package/eject/files/accordion.ts +1 -1
- package/eject/files/avatar-stack.ts +1 -1
- package/eject/files/avatar.ts +1 -1
- package/eject/files/badge.ts +1 -1
- package/eject/files/banner.ts +1 -1
- package/eject/files/base.css +1 -1
- package/eject/files/button.css +3 -3
- package/eject/files/button.ts +1 -1
- package/eject/files/card.ts +1 -1
- package/eject/files/checkbox.ts +1 -1
- package/eject/files/chip-bar.ts +1 -1
- package/eject/files/chip.ts +1 -1
- package/eject/files/count-badge.ts +1 -1
- package/eject/files/date-picker.css +5 -5
- package/eject/files/date-picker.ts +30 -11
- package/eject/files/date-range-picker.ts +16 -8
- package/eject/files/dialog.css +6 -6
- package/eject/files/dialog.ts +1 -1
- package/eject/files/divider.ts +1 -1
- package/eject/files/empty-state.ts +1 -1
- package/eject/files/icon.ts +1 -1
- package/eject/files/list-row.ts +1 -1
- package/eject/files/media-card.ts +1 -1
- package/eject/files/menu.css +4 -4
- package/eject/files/menu.ts +1 -1
- package/eject/files/overlay.css +40 -0
- package/eject/files/parts.ts +1 -1
- package/eject/files/progress-bar.ts +1 -1
- package/eject/files/radio-group.css +1 -1
- package/eject/files/radio-group.ts +1 -1
- package/eject/files/section-header.ts +1 -1
- package/eject/files/segmented-control.ts +1 -1
- package/eject/files/select.css +17 -6
- package/eject/files/select.ts +1 -1
- package/eject/files/sidebar.ts +1 -1
- package/eject/files/skeleton.ts +1 -1
- package/eject/files/slider.css +1 -1
- package/eject/files/slider.ts +17 -5
- package/eject/files/spinner.ts +1 -1
- package/eject/files/switch.ts +1 -1
- package/eject/files/tabs.css +1 -1
- package/eject/files/tabs.ts +1 -1
- package/eject/files/text-field.css +4 -8
- package/eject/files/text-field.ts +1 -1
- package/eject/files/text.ts +1 -1
- package/eject/files/thumbnail.ts +1 -1
- package/eject/files/toast.ts +1 -1
- package/eject/files/tooltip.css +3 -3
- package/eject/files/tooltip.ts +1 -1
- package/eject/manifest.json +4 -2
- package/package.json +3 -3
- package/styles.css +15 -11
- package/tailwind.css +21 -14
package/dist/Select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { space } from "@xds/tokens";
|
|
3
|
-
import { classes, keepListKeys, selectOptionIds } from "@xds/core";
|
|
3
|
+
import { classes, keepListKeys, readCssPx, selectOptionIds, underlayLayerStyle } from "@xds/core";
|
|
4
4
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
5
5
|
import * as select from "@zag-js/select";
|
|
6
6
|
import { useId, useMemo, useRef } from "react";
|
|
@@ -10,7 +10,7 @@ import { Portal } from "./portal.js";
|
|
|
10
10
|
import { usePresence } from "./presence.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export function Select(t0) {
|
|
13
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(38);
|
|
14
14
|
const {
|
|
15
15
|
label,
|
|
16
16
|
options,
|
|
@@ -66,19 +66,26 @@ export function Select(t0) {
|
|
|
66
66
|
}
|
|
67
67
|
let t5;
|
|
68
68
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
-
t5 =
|
|
70
|
-
placement: "bottom-start",
|
|
71
|
-
gutter: space[1],
|
|
72
|
-
sameWidth: true,
|
|
73
|
-
overflowPadding: space[3]
|
|
74
|
-
};
|
|
69
|
+
t5 = readCssPx(null, "--xds-space-1", space[1]);
|
|
75
70
|
$[6] = t5;
|
|
76
71
|
} else {
|
|
77
72
|
t5 = $[6];
|
|
78
73
|
}
|
|
79
74
|
let t6;
|
|
80
|
-
if ($[7]
|
|
75
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
76
|
t6 = {
|
|
77
|
+
placement: "bottom-start",
|
|
78
|
+
gutter: t5,
|
|
79
|
+
sameWidth: true,
|
|
80
|
+
overflowPadding: readCssPx(null, "--xds-space-3", space[3])
|
|
81
|
+
};
|
|
82
|
+
$[7] = t6;
|
|
83
|
+
} else {
|
|
84
|
+
t6 = $[7];
|
|
85
|
+
}
|
|
86
|
+
let t7;
|
|
87
|
+
if ($[8] !== collection || $[9] !== disabled || $[10] !== id || $[11] !== invalid || $[12] !== name || $[13] !== t3 || $[14] !== t4) {
|
|
88
|
+
t7 = {
|
|
82
89
|
id,
|
|
83
90
|
collection,
|
|
84
91
|
value: t3,
|
|
@@ -86,30 +93,30 @@ export function Select(t0) {
|
|
|
86
93
|
disabled,
|
|
87
94
|
invalid,
|
|
88
95
|
name,
|
|
89
|
-
positioning:
|
|
96
|
+
positioning: t6
|
|
90
97
|
};
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
98
|
+
$[8] = collection;
|
|
99
|
+
$[9] = disabled;
|
|
100
|
+
$[10] = id;
|
|
101
|
+
$[11] = invalid;
|
|
102
|
+
$[12] = name;
|
|
103
|
+
$[13] = t3;
|
|
104
|
+
$[14] = t4;
|
|
105
|
+
$[15] = t7;
|
|
99
106
|
} else {
|
|
100
|
-
|
|
107
|
+
t7 = $[15];
|
|
101
108
|
}
|
|
102
|
-
const service = useMachine(select.machine,
|
|
109
|
+
const service = useMachine(select.machine, t7);
|
|
103
110
|
const api = select.connect(service, normalizeProps);
|
|
104
|
-
let
|
|
105
|
-
if ($[
|
|
106
|
-
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
111
|
+
let t8;
|
|
112
|
+
if ($[16] !== service) {
|
|
113
|
+
t8 = () => select.connect(service, normalizeProps);
|
|
114
|
+
$[16] = service;
|
|
115
|
+
$[17] = t8;
|
|
109
116
|
} else {
|
|
110
|
-
|
|
117
|
+
t8 = $[17];
|
|
111
118
|
}
|
|
112
|
-
const current =
|
|
119
|
+
const current = t8;
|
|
113
120
|
const {
|
|
114
121
|
htmlFor: _for,
|
|
115
122
|
...labelProps
|
|
@@ -134,89 +141,106 @@ export function Select(t0) {
|
|
|
134
141
|
current().getContentProps().onKeyDown?.(event);
|
|
135
142
|
}
|
|
136
143
|
};
|
|
137
|
-
let
|
|
138
|
-
if ($[
|
|
139
|
-
|
|
140
|
-
$[
|
|
144
|
+
let t9;
|
|
145
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146
|
+
t9 = () => positioner.current;
|
|
147
|
+
$[18] = t9;
|
|
141
148
|
} else {
|
|
142
|
-
|
|
149
|
+
t9 = $[18];
|
|
143
150
|
}
|
|
144
|
-
useModalPopover(api.open,
|
|
151
|
+
useModalPopover(api.open, t9);
|
|
145
152
|
const present = usePresence(api.open, () => [surface.current]);
|
|
146
|
-
const
|
|
153
|
+
const positionerProps = api.getPositionerProps();
|
|
154
|
+
const t10 = mergeProps(api.getRootProps(), {
|
|
147
155
|
className: classes("xds-select", className),
|
|
148
156
|
style
|
|
149
157
|
});
|
|
150
|
-
let
|
|
151
|
-
if ($[
|
|
152
|
-
|
|
158
|
+
let t11;
|
|
159
|
+
if ($[19] !== current) {
|
|
160
|
+
t11 = event_0 => {
|
|
153
161
|
const now = current();
|
|
154
162
|
if (!now.open && (event_0.key === "Home" || event_0.key === "End")) {
|
|
155
163
|
return;
|
|
156
164
|
}
|
|
157
165
|
now.getTriggerProps().onKeyDown?.(event_0);
|
|
158
166
|
};
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
167
|
+
$[19] = current;
|
|
168
|
+
$[20] = t11;
|
|
161
169
|
} else {
|
|
162
|
-
|
|
170
|
+
t11 = $[20];
|
|
163
171
|
}
|
|
164
|
-
let
|
|
165
|
-
if ($[
|
|
166
|
-
|
|
172
|
+
let t12;
|
|
173
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t12 = /*#__PURE__*/_jsx(Icon, {
|
|
167
175
|
name: "chevrons-up-down",
|
|
168
176
|
size: "sm",
|
|
169
177
|
className: "text-xds-field-placeholder"
|
|
170
178
|
});
|
|
171
|
-
$[
|
|
179
|
+
$[21] = t12;
|
|
172
180
|
} else {
|
|
173
|
-
|
|
181
|
+
t12 = $[21];
|
|
174
182
|
}
|
|
175
|
-
let
|
|
176
|
-
if ($[
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
className: "xds-select__error",
|
|
182
|
-
children: error
|
|
183
|
-
}) : /*#__PURE__*/_jsx("span", {
|
|
184
|
-
id: descriptionId,
|
|
185
|
-
className: "xds-select__description",
|
|
186
|
-
children: description
|
|
187
|
-
})
|
|
183
|
+
let t13;
|
|
184
|
+
if ($[22] !== description || $[23] !== descriptionId || $[24] !== invalid) {
|
|
185
|
+
t13 = !invalid && description && /*#__PURE__*/_jsx("span", {
|
|
186
|
+
id: descriptionId,
|
|
187
|
+
className: "xds-select__description",
|
|
188
|
+
children: description
|
|
188
189
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[25] = invalid;
|
|
194
|
-
$[26] = t12;
|
|
190
|
+
$[22] = description;
|
|
191
|
+
$[23] = descriptionId;
|
|
192
|
+
$[24] = invalid;
|
|
193
|
+
$[25] = t13;
|
|
195
194
|
} else {
|
|
196
|
-
|
|
195
|
+
t13 = $[25];
|
|
197
196
|
}
|
|
198
|
-
const t13 = api.getHiddenSelectProps();
|
|
199
197
|
let t14;
|
|
200
|
-
if ($[27]
|
|
201
|
-
t14 = /*#__PURE__*/_jsx("
|
|
202
|
-
|
|
198
|
+
if ($[26] !== error || $[27] !== errorId) {
|
|
199
|
+
t14 = /*#__PURE__*/_jsx("span", {
|
|
200
|
+
id: errorId,
|
|
201
|
+
className: "xds-select__error",
|
|
202
|
+
"aria-live": "polite",
|
|
203
|
+
children: error
|
|
203
204
|
});
|
|
204
|
-
$[
|
|
205
|
+
$[26] = error;
|
|
206
|
+
$[27] = errorId;
|
|
207
|
+
$[28] = t14;
|
|
205
208
|
} else {
|
|
206
|
-
t14 = $[
|
|
209
|
+
t14 = $[28];
|
|
207
210
|
}
|
|
208
211
|
let t15;
|
|
209
|
-
if ($[
|
|
210
|
-
t15 =
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
if ($[29] !== t13 || $[30] !== t14) {
|
|
213
|
+
t15 = /*#__PURE__*/_jsxs("div", {
|
|
214
|
+
className: "xds-select__footer",
|
|
215
|
+
children: [t13, t14]
|
|
216
|
+
});
|
|
217
|
+
$[29] = t13;
|
|
218
|
+
$[30] = t14;
|
|
219
|
+
$[31] = t15;
|
|
220
|
+
} else {
|
|
221
|
+
t15 = $[31];
|
|
222
|
+
}
|
|
223
|
+
const t16 = api.getHiddenSelectProps();
|
|
224
|
+
let t17;
|
|
225
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t17 = /*#__PURE__*/_jsx("option", {
|
|
227
|
+
value: ""
|
|
228
|
+
});
|
|
229
|
+
$[32] = t17;
|
|
230
|
+
} else {
|
|
231
|
+
t17 = $[32];
|
|
232
|
+
}
|
|
233
|
+
let t18;
|
|
234
|
+
if ($[33] !== options) {
|
|
235
|
+
t18 = options.map(_temp3);
|
|
236
|
+
$[33] = options;
|
|
237
|
+
$[34] = t18;
|
|
213
238
|
} else {
|
|
214
|
-
|
|
239
|
+
t18 = $[34];
|
|
215
240
|
}
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const t19 = collection.items.map((option_2, index) => {
|
|
241
|
+
const t19 = api.getListProps();
|
|
242
|
+
const t20 = "xds-select__list";
|
|
243
|
+
const t21 = collection.items.map((option_2, index) => {
|
|
220
244
|
const ids = selectOptionIds(id, index);
|
|
221
245
|
return /*#__PURE__*/_jsxs("div", {
|
|
222
246
|
...api.getItemProps({
|
|
@@ -247,21 +271,21 @@ export function Select(t0) {
|
|
|
247
271
|
})]
|
|
248
272
|
}, option_2.value);
|
|
249
273
|
});
|
|
250
|
-
let
|
|
251
|
-
if ($[
|
|
252
|
-
|
|
253
|
-
...
|
|
254
|
-
className:
|
|
255
|
-
children:
|
|
274
|
+
let t22;
|
|
275
|
+
if ($[35] !== t19 || $[36] !== t21) {
|
|
276
|
+
t22 = /*#__PURE__*/_jsx("div", {
|
|
277
|
+
...t19,
|
|
278
|
+
className: t20,
|
|
279
|
+
children: t21
|
|
256
280
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
281
|
+
$[35] = t19;
|
|
282
|
+
$[36] = t21;
|
|
283
|
+
$[37] = t22;
|
|
260
284
|
} else {
|
|
261
|
-
|
|
285
|
+
t22 = $[37];
|
|
262
286
|
}
|
|
263
287
|
return /*#__PURE__*/_jsxs("div", {
|
|
264
|
-
...
|
|
288
|
+
...t10,
|
|
265
289
|
children: [/*#__PURE__*/_jsx("span", {
|
|
266
290
|
...labelProps,
|
|
267
291
|
className: "xds-select__label",
|
|
@@ -270,7 +294,7 @@ export function Select(t0) {
|
|
|
270
294
|
...triggerProps,
|
|
271
295
|
"aria-labelledby": `${valueId} ${labelProps.id}`,
|
|
272
296
|
"aria-describedby": invalid ? errorId : description ? descriptionId : undefined,
|
|
273
|
-
onKeyDown:
|
|
297
|
+
onKeyDown: t11,
|
|
274
298
|
type: "button",
|
|
275
299
|
className: "xds-select__trigger",
|
|
276
300
|
children: [/*#__PURE__*/_jsx("span", {
|
|
@@ -278,16 +302,17 @@ export function Select(t0) {
|
|
|
278
302
|
id: valueId,
|
|
279
303
|
className: "xds-select__value",
|
|
280
304
|
children: api.valueAsString || placeholder
|
|
281
|
-
}),
|
|
282
|
-
}),
|
|
283
|
-
...
|
|
284
|
-
children: [
|
|
305
|
+
}), t12]
|
|
306
|
+
}), t15, /*#__PURE__*/_jsxs("select", {
|
|
307
|
+
...t16,
|
|
308
|
+
children: [t17, t18]
|
|
285
309
|
}), /*#__PURE__*/_jsxs(Portal, {
|
|
286
310
|
children: [api.open && /*#__PURE__*/_jsx("div", {
|
|
287
311
|
className: "xds-select__underlay",
|
|
312
|
+
style: underlayLayerStyle(positionerProps.style),
|
|
288
313
|
onMouseDown: _temp4
|
|
289
314
|
}), /*#__PURE__*/_jsx("div", {
|
|
290
|
-
...
|
|
315
|
+
...positionerProps,
|
|
291
316
|
ref: positioner,
|
|
292
317
|
className: "xds-select__positioner",
|
|
293
318
|
children: /*#__PURE__*/_jsx("div", {
|
|
@@ -295,7 +320,7 @@ export function Select(t0) {
|
|
|
295
320
|
ref: surface,
|
|
296
321
|
hidden: !present,
|
|
297
322
|
className: "xds-select__content",
|
|
298
|
-
children:
|
|
323
|
+
children: t22
|
|
299
324
|
})
|
|
300
325
|
})]
|
|
301
326
|
})]
|
package/dist/Slider.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export type SliderProps = SliderBaseProps & RootProps & {
|
|
|
10
10
|
* It is a slider named by its label with its value, minimum and maximum, and each arrow key
|
|
11
11
|
* moves it one step.
|
|
12
12
|
*/
|
|
13
|
-
export declare function Slider({ label, value, onChange, min, max, step, disabled, showValue, className, style, }: SliderProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Slider({ label, value, onChange, min, max, step, disabled, showValue, name, locale, className, style, }: SliderProps): import("react").JSX.Element;
|
package/dist/Slider.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useId, useRef } from "react";
|
|
|
6
6
|
import { useMergedProps } from "./trigger.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export function Slider(t0) {
|
|
9
|
-
const $ = _c(
|
|
9
|
+
const $ = _c(12);
|
|
10
10
|
const {
|
|
11
11
|
label,
|
|
12
12
|
value,
|
|
@@ -16,6 +16,8 @@ export function Slider(t0) {
|
|
|
16
16
|
step: t3,
|
|
17
17
|
disabled: t4,
|
|
18
18
|
showValue: t5,
|
|
19
|
+
name,
|
|
20
|
+
locale,
|
|
19
21
|
className,
|
|
20
22
|
style
|
|
21
23
|
} = t0;
|
|
@@ -38,8 +40,17 @@ export function Slider(t0) {
|
|
|
38
40
|
} else {
|
|
39
41
|
t6 = $[2];
|
|
40
42
|
}
|
|
43
|
+
let t7;
|
|
44
|
+
if ($[3] !== locale) {
|
|
45
|
+
t7 = details_0 => sliderValueText(details_0.value, locale);
|
|
46
|
+
$[3] = locale;
|
|
47
|
+
$[4] = t7;
|
|
48
|
+
} else {
|
|
49
|
+
t7 = $[4];
|
|
50
|
+
}
|
|
41
51
|
const service = useMachine(slider.machine, {
|
|
42
52
|
id: useId(),
|
|
53
|
+
name,
|
|
43
54
|
value: [value],
|
|
44
55
|
onValueChange: t6,
|
|
45
56
|
min,
|
|
@@ -48,7 +59,7 @@ export function Slider(t0) {
|
|
|
48
59
|
largeStep: pageSize,
|
|
49
60
|
disabled,
|
|
50
61
|
thumbAlignment: "center",
|
|
51
|
-
getAriaValueText:
|
|
62
|
+
getAriaValueText: t7
|
|
52
63
|
});
|
|
53
64
|
const api = slider.connect(service, normalizeProps);
|
|
54
65
|
const thumbElement = useRef(null);
|
|
@@ -67,62 +78,63 @@ export function Slider(t0) {
|
|
|
67
78
|
pageSize
|
|
68
79
|
});
|
|
69
80
|
if (next !== undefined) {
|
|
81
|
+
event.preventDefault();
|
|
70
82
|
api.setThumbValue(0, next);
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
});
|
|
74
|
-
let
|
|
75
|
-
if ($[
|
|
76
|
-
|
|
86
|
+
let t8;
|
|
87
|
+
if ($[5] !== disabled) {
|
|
88
|
+
t8 = {
|
|
77
89
|
onPointerDown: event_0 => {
|
|
78
90
|
if (!disabled) {
|
|
79
91
|
focusThumbOnPress(event_0, thumbElement.current);
|
|
80
92
|
}
|
|
81
93
|
}
|
|
82
94
|
};
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
95
|
+
$[5] = disabled;
|
|
96
|
+
$[6] = t8;
|
|
85
97
|
} else {
|
|
86
|
-
|
|
98
|
+
t8 = $[6];
|
|
87
99
|
}
|
|
88
|
-
const control = useMergedProps(api.getControlProps(),
|
|
89
|
-
const
|
|
100
|
+
const control = useMergedProps(api.getControlProps(), t8);
|
|
101
|
+
const t9 = mergeProps(api.getRootProps(), {
|
|
90
102
|
className: classes("xds-slider", className),
|
|
91
103
|
style
|
|
92
104
|
});
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
105
|
+
const t10 = api.getLabelProps().id;
|
|
106
|
+
const t11 = "xds-slider__thumb";
|
|
107
|
+
const t12 = api.getHiddenInputProps({
|
|
96
108
|
index: 0
|
|
97
109
|
});
|
|
98
|
-
let
|
|
99
|
-
if ($[
|
|
100
|
-
|
|
101
|
-
...
|
|
110
|
+
let t13;
|
|
111
|
+
if ($[7] !== t12) {
|
|
112
|
+
t13 = /*#__PURE__*/_jsx("input", {
|
|
113
|
+
...t12
|
|
102
114
|
});
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
115
|
+
$[7] = t12;
|
|
116
|
+
$[8] = t13;
|
|
105
117
|
} else {
|
|
106
|
-
|
|
118
|
+
t13 = $[8];
|
|
107
119
|
}
|
|
108
|
-
let
|
|
109
|
-
if ($[
|
|
110
|
-
|
|
120
|
+
let t14;
|
|
121
|
+
if ($[9] !== t13 || $[10] !== thumb) {
|
|
122
|
+
t14 = /*#__PURE__*/_jsx("div", {
|
|
111
123
|
...thumb,
|
|
112
124
|
ref: thumbElement,
|
|
113
|
-
className:
|
|
114
|
-
children:
|
|
125
|
+
className: t11,
|
|
126
|
+
children: t13
|
|
115
127
|
});
|
|
116
|
-
$[7] = t12;
|
|
117
|
-
$[8] = thumb;
|
|
118
128
|
$[9] = t13;
|
|
129
|
+
$[10] = thumb;
|
|
130
|
+
$[11] = t14;
|
|
119
131
|
} else {
|
|
120
|
-
|
|
132
|
+
t14 = $[11];
|
|
121
133
|
}
|
|
122
134
|
return /*#__PURE__*/_jsxs("div", {
|
|
123
|
-
...
|
|
135
|
+
...t9,
|
|
124
136
|
role: "group",
|
|
125
|
-
"aria-labelledby":
|
|
137
|
+
"aria-labelledby": t10,
|
|
126
138
|
children: [/*#__PURE__*/_jsx("label", {
|
|
127
139
|
...api.getLabelProps(),
|
|
128
140
|
className: "xds-slider__label",
|
|
@@ -131,7 +143,7 @@ export function Slider(t0) {
|
|
|
131
143
|
...api.getValueTextProps(),
|
|
132
144
|
"aria-live": "off",
|
|
133
145
|
className: "xds-slider__output",
|
|
134
|
-
children: sliderValueText(api.value[0] ?? value)
|
|
146
|
+
children: sliderValueText(api.value[0] ?? value, locale)
|
|
135
147
|
}), /*#__PURE__*/_jsxs("div", {
|
|
136
148
|
...control,
|
|
137
149
|
className: "xds-slider__control",
|
|
@@ -142,10 +154,7 @@ export function Slider(t0) {
|
|
|
142
154
|
...api.getRangeProps(),
|
|
143
155
|
className: "xds-slider__range"
|
|
144
156
|
})
|
|
145
|
-
}),
|
|
157
|
+
}), t14]
|
|
146
158
|
})]
|
|
147
159
|
});
|
|
148
160
|
}
|
|
149
|
-
function _temp(details_0) {
|
|
150
|
-
return sliderValueText(details_0.value);
|
|
151
|
-
}
|