@vygruppen/spor-react 12.3.1 → 12.3.3
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/.turbo/turbo-build.log +11 -32
- package/.turbo/{turbo-typegen.log → turbo-postinstall.log} +4 -6
- package/CHANGELOG.md +14 -0
- package/dist/index.d.mts +44 -42
- package/dist/index.d.ts +44 -42
- package/dist/index.js +234 -224
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -229
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -5
- package/src/alert/AlertIcon.tsx +17 -11
- package/src/button/Button.tsx +1 -1
- package/src/button/CloseButton.tsx +6 -3
- package/src/button/IconButton.tsx +1 -1
- package/src/datepicker/CalendarTriggerButton.tsx +2 -2
- package/src/datepicker/DatePicker.tsx +5 -1
- package/src/datepicker/DateRangePicker.tsx +4 -1
- package/src/input/Combobox.tsx +149 -157
- package/src/input/ListBox.tsx +27 -34
- package/src/input/NumericStepper.tsx +2 -2
- package/src/input/Switch.tsx +35 -33
- package/src/linjetag/LineIcon.tsx +14 -10
- package/src/loader/ProgressLoader.tsx +12 -8
- package/src/progress-indicator/ProgressIndicator.tsx +2 -1
package/dist/index.js
CHANGED
@@ -417,7 +417,7 @@ var ProgressLoader = React28.forwardRef(
|
|
417
417
|
"aria-label": ariaLabel,
|
418
418
|
width,
|
419
419
|
...rest
|
420
|
-
}) => {
|
420
|
+
}, ref) => {
|
421
421
|
const { t } = useTranslation();
|
422
422
|
const currentLoadingText = useRotatingLabel({
|
423
423
|
label,
|
@@ -445,6 +445,7 @@ var ProgressLoader = React28.forwardRef(
|
|
445
445
|
"aria-valuemax": 100,
|
446
446
|
"aria-label": ariaLabel ?? t(texts.fallbackLabel(value ?? "?")),
|
447
447
|
...rest,
|
448
|
+
ref,
|
448
449
|
children: [
|
449
450
|
/* @__PURE__ */ jsxRuntime.jsxs(react.chakra.svg, { as: "svg", viewBox: "0 0 246 78", fill: "none", children: [
|
450
451
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -630,7 +631,7 @@ var LoadingContent = ({
|
|
630
631
|
}) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
631
632
|
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { gap: "1", visibility: "hidden", children }),
|
632
633
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Center, { position: "absolute", inset: "1px 0", children: [
|
633
|
-
/* @__PURE__ */ jsxRuntime.jsx(ColorInlineLoader, {
|
634
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColorInlineLoader, { maxWidth: "8", marginX: 2, marginY: 2 }),
|
634
635
|
loadingText && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: loadingText })
|
635
636
|
] })
|
636
637
|
] });
|
@@ -927,9 +928,9 @@ var IconButton = React28.forwardRef(
|
|
927
928
|
{
|
928
929
|
"aria-label": props["aria-label"],
|
929
930
|
size,
|
930
|
-
ref,
|
931
931
|
position: "relative",
|
932
932
|
...rest,
|
933
|
+
ref,
|
933
934
|
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "2em", height: "2em", margin: 1 }) : icon
|
934
935
|
}
|
935
936
|
);
|
@@ -942,18 +943,18 @@ var CloseButton = React28.forwardRef(
|
|
942
943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
943
944
|
IconButton,
|
944
945
|
{
|
945
|
-
ref,
|
946
946
|
variant: "ghost",
|
947
|
-
icon:
|
947
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, { size }),
|
948
948
|
size,
|
949
949
|
"aria-label": props["aria-label"] || t(texts4.close),
|
950
|
-
...props
|
950
|
+
...props,
|
951
|
+
ref
|
951
952
|
}
|
952
953
|
);
|
953
954
|
}
|
954
955
|
);
|
955
956
|
CloseButton.displayName = "CloseButton";
|
956
|
-
var
|
957
|
+
var CloseIcon = ({ size }) => {
|
957
958
|
switch (size) {
|
958
959
|
case "xs":
|
959
960
|
case "sm": {
|
@@ -965,6 +966,9 @@ var getIcon = (size) => {
|
|
965
966
|
case "lg": {
|
966
967
|
return /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseFill30Icon, {});
|
967
968
|
}
|
969
|
+
default: {
|
970
|
+
return /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseFill18Icon, {});
|
971
|
+
}
|
968
972
|
}
|
969
973
|
};
|
970
974
|
var texts4 = createTexts({
|
@@ -1045,19 +1049,23 @@ var useScrollDirection = () => {
|
|
1045
1049
|
}, [scrollDirection]);
|
1046
1050
|
return scrollDirection;
|
1047
1051
|
};
|
1048
|
-
var AlertIcon = (
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
}
|
1060
|
-
|
1052
|
+
var AlertIcon = React28.forwardRef(
|
1053
|
+
({ variant, customIcon }, ref) => {
|
1054
|
+
const { t } = useTranslation();
|
1055
|
+
const Icon2 = customIcon ?? getIcon(variant);
|
1056
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
1057
|
+
react.Box,
|
1058
|
+
{
|
1059
|
+
as: Icon2,
|
1060
|
+
ref,
|
1061
|
+
"aria-label": t(texts5[variant]),
|
1062
|
+
color: customIcon ? `alert.${variant}.icon` : void 0
|
1063
|
+
}
|
1064
|
+
);
|
1065
|
+
}
|
1066
|
+
);
|
1067
|
+
AlertIcon.displayName = "AlertIcon";
|
1068
|
+
var getIcon = (variant) => {
|
1061
1069
|
switch (variant) {
|
1062
1070
|
case "info": {
|
1063
1071
|
return sporIconReact.InformationFill24Icon;
|
@@ -2254,14 +2262,14 @@ var texts8 = createTexts({
|
|
2254
2262
|
en: "Calendar"
|
2255
2263
|
}
|
2256
2264
|
});
|
2257
|
-
var CalendarTriggerButton = React28.forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }) => {
|
2265
|
+
var CalendarTriggerButton = React28.forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }, ref) => {
|
2258
2266
|
const { t } = useTranslation();
|
2259
2267
|
const recipe = react.useSlotRecipe({
|
2260
2268
|
key: "datePicker",
|
2261
2269
|
recipe: datePickerSlotRecipe
|
2262
2270
|
});
|
2263
2271
|
const styles = recipe({ variant });
|
2264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { ...buttonProps, children: /* @__PURE__ */ jsxRuntime.jsx(
|
2272
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { ...buttonProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
|
2265
2273
|
IconButton,
|
2266
2274
|
{
|
2267
2275
|
icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CalendarOutline24Icon, {}),
|
@@ -2458,6 +2466,7 @@ var DatePicker = React28.forwardRef(
|
|
2458
2466
|
width = "auto",
|
2459
2467
|
invalid = false,
|
2460
2468
|
helperText,
|
2469
|
+
positioning,
|
2461
2470
|
...props
|
2462
2471
|
}, externalRef) => {
|
2463
2472
|
const chakraFieldProps = react.useFieldContext();
|
@@ -2501,7 +2510,7 @@ var DatePicker = React28.forwardRef(
|
|
2501
2510
|
display: "inline-flex",
|
2502
2511
|
flexDirection: "column",
|
2503
2512
|
width,
|
2504
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, children: [
|
2513
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, positioning, children: [
|
2505
2514
|
/* @__PURE__ */ jsxRuntime.jsx(
|
2506
2515
|
Field3,
|
2507
2516
|
{
|
@@ -2593,6 +2602,7 @@ function DateRangePicker({
|
|
2593
2602
|
errorText,
|
2594
2603
|
helperText,
|
2595
2604
|
invalid,
|
2605
|
+
positioning,
|
2596
2606
|
...props
|
2597
2607
|
}) {
|
2598
2608
|
const fieldContextPRops = react.useFieldContext();
|
@@ -2627,7 +2637,7 @@ function DateRangePicker({
|
|
2627
2637
|
const popoverContent = /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Content, { css: styles.calendarPopover, children: /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Body, { maxWidth: "60rem", children: /* @__PURE__ */ jsxRuntime.jsx(RangeCalendar, { variant: "core", ...calendarProps }) }) }) });
|
2628
2638
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAria.I18nProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column", children: [
|
2629
2639
|
props.label && /* @__PURE__ */ jsxRuntime.jsx("label", { ...labelProps, htmlFor: datePickerId, children: props.label }),
|
2630
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, children: [
|
2640
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, positioning, children: [
|
2631
2641
|
/* @__PURE__ */ jsxRuntime.jsx(
|
2632
2642
|
Field3,
|
2633
2643
|
{
|
@@ -3165,147 +3175,145 @@ var Popover = React28.forwardRef(
|
|
3165
3175
|
}
|
3166
3176
|
);
|
3167
3177
|
Popover.displayName = "Popover";
|
3168
|
-
var Combobox =
|
3169
|
-
|
3170
|
-
|
3171
|
-
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3179
|
-
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3178
|
+
var Combobox = (props) => {
|
3179
|
+
const {
|
3180
|
+
label,
|
3181
|
+
loading,
|
3182
|
+
lefticon,
|
3183
|
+
righticon,
|
3184
|
+
borderBottomLeftRadius = "sm",
|
3185
|
+
borderBottomRightRadius = "sm",
|
3186
|
+
borderTopLeftRadius = "sm",
|
3187
|
+
borderTopRightRadius = "sm",
|
3188
|
+
marginBottom,
|
3189
|
+
marginTop,
|
3190
|
+
marginX,
|
3191
|
+
marginY,
|
3192
|
+
marginRight,
|
3193
|
+
marginLeft,
|
3194
|
+
paddingBottom,
|
3195
|
+
paddingRight,
|
3196
|
+
paddingTop,
|
3197
|
+
paddingLeft,
|
3198
|
+
paddingX,
|
3199
|
+
paddingY,
|
3200
|
+
emptyContent,
|
3201
|
+
inputRef: externalInputRef,
|
3202
|
+
children,
|
3203
|
+
variant
|
3204
|
+
} = props;
|
3205
|
+
const { contains } = reactAria.useFilter({ sensitivity: "base" });
|
3206
|
+
const fallbackInputRef = React28.useRef(null);
|
3207
|
+
const inputRef = externalInputRef ?? fallbackInputRef;
|
3208
|
+
const listBoxRef = React28.useRef(null);
|
3209
|
+
const popoverRef = React28.useRef(null);
|
3210
|
+
const listboxId = `${React28.useId()}-listbox`;
|
3211
|
+
const inputWidth = useInputWidth(inputRef);
|
3212
|
+
const state = reactStately.useComboBoxState({
|
3213
|
+
defaultFilter: contains,
|
3214
|
+
shouldCloseOnBlur: true,
|
3215
|
+
...props
|
3216
|
+
});
|
3217
|
+
const comboBoxProps = {
|
3218
|
+
borderTopLeftRadius,
|
3219
|
+
borderTopRightRadius,
|
3220
|
+
marginBottom,
|
3221
|
+
marginTop,
|
3222
|
+
marginRight,
|
3223
|
+
marginLeft,
|
3224
|
+
marginX,
|
3225
|
+
marginY,
|
3226
|
+
paddingBottom,
|
3227
|
+
paddingRight,
|
3228
|
+
paddingTop,
|
3229
|
+
paddingLeft,
|
3230
|
+
paddingX,
|
3231
|
+
paddingY,
|
3232
|
+
lefticon
|
3233
|
+
};
|
3234
|
+
const {
|
3235
|
+
inputProps: { ...inputProps },
|
3236
|
+
listBoxProps
|
3237
|
+
} = reactAria.useComboBox(
|
3238
|
+
{
|
3239
|
+
...props,
|
3240
|
+
inputRef,
|
3241
|
+
listBoxRef,
|
3242
|
+
popoverRef,
|
3243
|
+
label
|
3244
|
+
},
|
3245
|
+
state
|
3246
|
+
);
|
3247
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
3248
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
3249
|
+
Input,
|
3229
3250
|
{
|
3230
|
-
...
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
|
3255
|
-
|
3256
|
-
|
3257
|
-
|
3258
|
-
_active: { backgroundColor: "core.surface.active" },
|
3259
|
-
...inputProps,
|
3260
|
-
endElement: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
3261
|
-
ColorSpinner,
|
3262
|
-
{
|
3263
|
-
width: "1.5rem",
|
3264
|
-
alignSelf: "center",
|
3265
|
-
paddingRight,
|
3266
|
-
css: {
|
3267
|
-
div: {
|
3268
|
-
display: "flex",
|
3269
|
-
alignItems: "center"
|
3270
|
-
}
|
3251
|
+
...styleProps(comboBoxProps),
|
3252
|
+
"aria-haspopup": "listbox",
|
3253
|
+
ref: inputRef,
|
3254
|
+
role: "combobox",
|
3255
|
+
errorText: props.errorText,
|
3256
|
+
helperText: props.helperText,
|
3257
|
+
required: props.required,
|
3258
|
+
disabled: props.disabled,
|
3259
|
+
invalid: props.invalid,
|
3260
|
+
label,
|
3261
|
+
variant,
|
3262
|
+
"aria-expanded": state.isOpen,
|
3263
|
+
"aria-autocomplete": "list",
|
3264
|
+
"aria-controls": listboxId,
|
3265
|
+
borderBottomLeftRadius: state.isOpen && !loading ? 0 : borderBottomLeftRadius,
|
3266
|
+
borderBottomRightRadius: state.isOpen && !loading ? 0 : borderBottomRightRadius,
|
3267
|
+
_active: { backgroundColor: "core.surface.active" },
|
3268
|
+
...inputProps,
|
3269
|
+
endElement: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
3270
|
+
ColorSpinner,
|
3271
|
+
{
|
3272
|
+
width: "1.5rem",
|
3273
|
+
alignSelf: "center",
|
3274
|
+
paddingRight,
|
3275
|
+
css: {
|
3276
|
+
div: {
|
3277
|
+
display: "flex",
|
3278
|
+
alignItems: "center"
|
3271
3279
|
}
|
3272
3280
|
}
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
|
3298
|
-
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3307
|
-
}
|
3308
|
-
|
3281
|
+
}
|
3282
|
+
) : righticon,
|
3283
|
+
placeholder: ""
|
3284
|
+
}
|
3285
|
+
),
|
3286
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", "data-trigger": "multiselect" }),
|
3287
|
+
state.isOpen && !loading && /* @__PURE__ */ jsxRuntime.jsx(
|
3288
|
+
Popover,
|
3289
|
+
{
|
3290
|
+
state,
|
3291
|
+
triggerRef: inputRef,
|
3292
|
+
ref: popoverRef,
|
3293
|
+
isNonModal: true,
|
3294
|
+
placement: "bottom start",
|
3295
|
+
shouldFlip: false,
|
3296
|
+
hasBackdrop: false,
|
3297
|
+
containerPadding: 0,
|
3298
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
3299
|
+
ListBox,
|
3300
|
+
{
|
3301
|
+
...{
|
3302
|
+
autoFocus: typeof listBoxProps.autoFocus === "boolean" ? listBoxProps.autoFocus : void 0
|
3303
|
+
},
|
3304
|
+
state,
|
3305
|
+
id: listboxId,
|
3306
|
+
listBoxRef,
|
3307
|
+
emptyContent,
|
3308
|
+
maxWidth: inputWidth,
|
3309
|
+
variant,
|
3310
|
+
children
|
3311
|
+
}
|
3312
|
+
)
|
3313
|
+
}
|
3314
|
+
)
|
3315
|
+
] });
|
3316
|
+
};
|
3309
3317
|
Combobox.displayName = "Combobox";
|
3310
3318
|
var useInputWidth = (inputRef) => {
|
3311
3319
|
const [inputWidth, setInputWidth] = React28.useState("auto");
|
@@ -3470,31 +3478,29 @@ var Input = React28.forwardRef(
|
|
3470
3478
|
}
|
3471
3479
|
);
|
3472
3480
|
Input.displayName = "Input";
|
3473
|
-
var ListBox =
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
|
3481
|
-
|
3482
|
-
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3486
|
-
|
3487
|
-
|
3488
|
-
|
3489
|
-
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
}
|
3497
|
-
);
|
3481
|
+
var ListBox = (props) => {
|
3482
|
+
const { loading, listBoxRef, state, maxWidth, variant, children } = props;
|
3483
|
+
const { listBoxProps } = reactAria.useListBox(props, state, listBoxRef);
|
3484
|
+
const recipe = react.useSlotRecipe({ key: "listBox" });
|
3485
|
+
const styles = recipe({ variant });
|
3486
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
3487
|
+
List,
|
3488
|
+
{
|
3489
|
+
...listBoxProps,
|
3490
|
+
ref: listBoxRef,
|
3491
|
+
css: styles.root,
|
3492
|
+
"aria-busy": loading,
|
3493
|
+
maxWidth,
|
3494
|
+
children: [
|
3495
|
+
state.collection.size === 0 && props.emptyContent,
|
3496
|
+
[...state.collection].map(
|
3497
|
+
(item) => item.type === "section" ? /* @__PURE__ */ jsxRuntime.jsx(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsxRuntime.jsx(Option, { item, state }, item.key)
|
3498
|
+
),
|
3499
|
+
children
|
3500
|
+
]
|
3501
|
+
}
|
3502
|
+
);
|
3503
|
+
};
|
3498
3504
|
ListBox.displayName = "ListBox";
|
3499
3505
|
function ItemLabel({ children }) {
|
3500
3506
|
const { labelProps } = useOptionContext();
|
@@ -3874,7 +3880,7 @@ var numericStepperRecipe = react.defineSlotRecipe({
|
|
3874
3880
|
}
|
3875
3881
|
}
|
3876
3882
|
});
|
3877
|
-
var NumericStepper = React28__namespace.default.forwardRef((props) => {
|
3883
|
+
var NumericStepper = React28__namespace.default.forwardRef((props, ref) => {
|
3878
3884
|
const {
|
3879
3885
|
name: nameProp,
|
3880
3886
|
id: idProp,
|
@@ -3904,7 +3910,7 @@ var NumericStepper = React28__namespace.default.forwardRef((props) => {
|
|
3904
3910
|
var _a5;
|
3905
3911
|
(_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
|
3906
3912
|
};
|
3907
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, children: [
|
3913
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
|
3908
3914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
3909
3915
|
VerySmallButton,
|
3910
3916
|
{
|
@@ -4450,42 +4456,44 @@ var SelectValueText = React28__namespace.forwardRef(function SelectValueText2(pr
|
|
4450
4456
|
var SelectLabel = react.Select.Label;
|
4451
4457
|
var SelectItemText = react.Select.ItemText;
|
4452
4458
|
var SelectRoot = react.Select.Root;
|
4453
|
-
var Switch = React28.forwardRef(
|
4454
|
-
|
4455
|
-
|
4456
|
-
|
4457
|
-
|
4458
|
-
|
4459
|
-
errorText,
|
4460
|
-
helperText,
|
4461
|
-
...rest
|
4462
|
-
} = props;
|
4463
|
-
const recipe = react.useSlotRecipe({ key: "switch" });
|
4464
|
-
const styles = recipe({ size });
|
4465
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
4466
|
-
Field3,
|
4467
|
-
{
|
4468
|
-
style: { width: "auto" },
|
4459
|
+
var Switch = React28.forwardRef(
|
4460
|
+
(props, ref) => {
|
4461
|
+
const {
|
4462
|
+
rootRef,
|
4463
|
+
size = "md",
|
4464
|
+
label,
|
4469
4465
|
invalid,
|
4470
4466
|
errorText,
|
4471
4467
|
helperText,
|
4472
|
-
|
4473
|
-
|
4474
|
-
|
4475
|
-
|
4476
|
-
|
4477
|
-
|
4478
|
-
|
4479
|
-
|
4480
|
-
|
4481
|
-
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4485
|
-
|
4486
|
-
|
4487
|
-
|
4488
|
-
|
4468
|
+
...rest
|
4469
|
+
} = props;
|
4470
|
+
const recipe = react.useSlotRecipe({ key: "switch" });
|
4471
|
+
const styles = recipe({ size });
|
4472
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
4473
|
+
Field3,
|
4474
|
+
{
|
4475
|
+
style: { width: "auto" },
|
4476
|
+
invalid,
|
4477
|
+
errorText,
|
4478
|
+
helperText,
|
4479
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
4480
|
+
react.Switch.Root,
|
4481
|
+
{
|
4482
|
+
ref: rootRef,
|
4483
|
+
...rest,
|
4484
|
+
checked: props.checked,
|
4485
|
+
css: styles.root,
|
4486
|
+
children: [
|
4487
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Switch.Label, { children: label }),
|
4488
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Switch.HiddenInput, { ref }),
|
4489
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Switch.Control, { css: styles.control, children: /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Thumb, {}) })
|
4490
|
+
]
|
4491
|
+
}
|
4492
|
+
)
|
4493
|
+
}
|
4494
|
+
);
|
4495
|
+
}
|
4496
|
+
);
|
4489
4497
|
Switch.displayName = "Switch";
|
4490
4498
|
var useLabelHeight = (label) => {
|
4491
4499
|
const labelRef = React28.useRef(null);
|
@@ -4866,7 +4874,7 @@ var LineIcon = React28.forwardRef(
|
|
4866
4874
|
target = "lineIcon",
|
4867
4875
|
label,
|
4868
4876
|
...rest
|
4869
|
-
}) {
|
4877
|
+
}, ref) {
|
4870
4878
|
const recipe = react.useSlotRecipe({ key: "lineIcon" });
|
4871
4879
|
const styles = recipe({ variant, size, ...rest });
|
4872
4880
|
const targetPadding = () => {
|
@@ -4896,6 +4904,7 @@ var LineIcon = React28.forwardRef(
|
|
4896
4904
|
borderWidth: borderContainer(),
|
4897
4905
|
borderColor: variant === "walk" ? "core.outline" : "transparent",
|
4898
4906
|
"aria-label": label,
|
4907
|
+
ref,
|
4899
4908
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { css: styles.icon })
|
4900
4909
|
}
|
4901
4910
|
);
|
@@ -5989,7 +5998,7 @@ var ProgressDot = ({ isActive }) => {
|
|
5989
5998
|
}
|
5990
5999
|
);
|
5991
6000
|
};
|
5992
|
-
var ProgressIndicator = React28.forwardRef(({ numberOfSteps, activeStep }) => {
|
6001
|
+
var ProgressIndicator = React28.forwardRef(({ numberOfSteps, activeStep }, ref) => {
|
5993
6002
|
const { t } = useTranslation();
|
5994
6003
|
const recipe = react.useSlotRecipe({
|
5995
6004
|
key: "progressIndicator"
|
@@ -6004,6 +6013,7 @@ var ProgressIndicator = React28.forwardRef(({ numberOfSteps, activeStep }) => {
|
|
6004
6013
|
"aria-valuemax": numberOfSteps,
|
6005
6014
|
"aria-valuenow": activeStep,
|
6006
6015
|
"aria-valuetext": t(texts24.stepsOf(activeStep, numberOfSteps)),
|
6016
|
+
ref,
|
6007
6017
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
6008
6018
|
ProgressDot,
|
6009
6019
|
{
|