@vygruppen/spor-react 12.3.0 → 12.3.2
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 -11
- package/.turbo/turbo-typegen.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/index.d.mts +44 -42
- package/dist/index.d.ts +44 -42
- package/dist/index.js +236 -225
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +241 -230
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- 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/src/theme/slot-recipes/table.ts +1 -0
package/dist/index.mjs
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group as Group$1, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement,
|
1
|
+
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group as Group$1, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
|
2
2
|
export { Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableBody, TableCaption, TableCell, TableColumn, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
|
3
|
-
import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill30Icon, CloseFill24Icon,
|
3
|
+
import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, InformationFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, LinkOutOutline24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
|
4
4
|
import * as React28 from 'react';
|
5
|
-
import React28__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef,
|
5
|
+
import React28__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef, isValidElement, useState, useMemo, useLayoutEffect, useContext } from 'react';
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
7
7
|
import { spinnerColorData, inlineLoaderColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerLightData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData } from '@vygruppen/spor-loader';
|
8
8
|
import ReactLottie from 'lottie-react';
|
9
9
|
import { useInterval } from 'usehooks-ts';
|
10
10
|
export { useIsClient, useMap, useOnClickOutside } from 'usehooks-ts';
|
11
|
-
import { useProgressBar, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay,
|
11
|
+
import { useProgressBar, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay, useCalendar, useCalendarGrid, useCalendarCell, useButton, useId as useId$1, useDateRangePicker, useFilter, useComboBox, useListBox, useOption, useListBoxSection, useRangeCalendar, useTimeField } from 'react-aria';
|
12
12
|
import { useTheme, ThemeProvider } from 'next-themes';
|
13
13
|
import { LuMoon, LuSun } from 'react-icons/lu';
|
14
|
-
import { useDateFieldState, useDatePickerState,
|
14
|
+
import { useDateFieldState, useDatePickerState, useCalendarState, useDateRangePickerState, useTimeFieldState, useComboBoxState, useRangeCalendarState } from 'react-stately';
|
15
15
|
export { Item, Section } from 'react-stately';
|
16
16
|
import { createAnatomy } from '@ark-ui/react/anatomy';
|
17
17
|
import { popoverAnatomy as popoverAnatomy$1 } from '@ark-ui/react/popover';
|
@@ -392,7 +392,7 @@ var ProgressLoader = forwardRef(
|
|
392
392
|
"aria-label": ariaLabel,
|
393
393
|
width,
|
394
394
|
...rest
|
395
|
-
}) => {
|
395
|
+
}, ref) => {
|
396
396
|
const { t } = useTranslation();
|
397
397
|
const currentLoadingText = useRotatingLabel({
|
398
398
|
label,
|
@@ -420,6 +420,7 @@ var ProgressLoader = forwardRef(
|
|
420
420
|
"aria-valuemax": 100,
|
421
421
|
"aria-label": ariaLabel ?? t(texts.fallbackLabel(value ?? "?")),
|
422
422
|
...rest,
|
423
|
+
ref,
|
423
424
|
children: [
|
424
425
|
/* @__PURE__ */ jsxs(chakra.svg, { as: "svg", viewBox: "0 0 246 78", fill: "none", children: [
|
425
426
|
/* @__PURE__ */ jsx(
|
@@ -605,7 +606,7 @@ var LoadingContent = ({
|
|
605
606
|
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
606
607
|
/* @__PURE__ */ jsx(Flex, { gap: "1", visibility: "hidden", children }),
|
607
608
|
/* @__PURE__ */ jsxs(Center, { position: "absolute", inset: "1px 0", children: [
|
608
|
-
/* @__PURE__ */ jsx(ColorInlineLoader, {
|
609
|
+
/* @__PURE__ */ jsx(ColorInlineLoader, { maxWidth: "8", marginX: 2, marginY: 2 }),
|
609
610
|
loadingText && /* @__PURE__ */ jsx(Box, { children: loadingText })
|
610
611
|
] })
|
611
612
|
] });
|
@@ -902,9 +903,9 @@ var IconButton = forwardRef(
|
|
902
903
|
{
|
903
904
|
"aria-label": props["aria-label"],
|
904
905
|
size,
|
905
|
-
ref,
|
906
906
|
position: "relative",
|
907
907
|
...rest,
|
908
|
+
ref,
|
908
909
|
children: loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "2em", height: "2em", margin: 1 }) : icon
|
909
910
|
}
|
910
911
|
);
|
@@ -917,18 +918,18 @@ var CloseButton = forwardRef(
|
|
917
918
|
return /* @__PURE__ */ jsx(
|
918
919
|
IconButton,
|
919
920
|
{
|
920
|
-
ref,
|
921
921
|
variant: "ghost",
|
922
|
-
icon:
|
922
|
+
icon: /* @__PURE__ */ jsx(CloseIcon, { size }),
|
923
923
|
size,
|
924
924
|
"aria-label": props["aria-label"] || t(texts4.close),
|
925
|
-
...props
|
925
|
+
...props,
|
926
|
+
ref
|
926
927
|
}
|
927
928
|
);
|
928
929
|
}
|
929
930
|
);
|
930
931
|
CloseButton.displayName = "CloseButton";
|
931
|
-
var
|
932
|
+
var CloseIcon = ({ size }) => {
|
932
933
|
switch (size) {
|
933
934
|
case "xs":
|
934
935
|
case "sm": {
|
@@ -940,6 +941,9 @@ var getIcon = (size) => {
|
|
940
941
|
case "lg": {
|
941
942
|
return /* @__PURE__ */ jsx(CloseFill30Icon, {});
|
942
943
|
}
|
944
|
+
default: {
|
945
|
+
return /* @__PURE__ */ jsx(CloseFill18Icon, {});
|
946
|
+
}
|
943
947
|
}
|
944
948
|
};
|
945
949
|
var texts4 = createTexts({
|
@@ -1020,19 +1024,23 @@ var useScrollDirection = () => {
|
|
1020
1024
|
}, [scrollDirection]);
|
1021
1025
|
return scrollDirection;
|
1022
1026
|
};
|
1023
|
-
var AlertIcon = (
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
}
|
1035
|
-
|
1027
|
+
var AlertIcon = forwardRef(
|
1028
|
+
({ variant, customIcon }, ref) => {
|
1029
|
+
const { t } = useTranslation();
|
1030
|
+
const Icon2 = customIcon ?? getIcon(variant);
|
1031
|
+
return /* @__PURE__ */ jsx(
|
1032
|
+
Box,
|
1033
|
+
{
|
1034
|
+
as: Icon2,
|
1035
|
+
ref,
|
1036
|
+
"aria-label": t(texts5[variant]),
|
1037
|
+
color: customIcon ? `alert.${variant}.icon` : void 0
|
1038
|
+
}
|
1039
|
+
);
|
1040
|
+
}
|
1041
|
+
);
|
1042
|
+
AlertIcon.displayName = "AlertIcon";
|
1043
|
+
var getIcon = (variant) => {
|
1036
1044
|
switch (variant) {
|
1037
1045
|
case "info": {
|
1038
1046
|
return InformationFill24Icon;
|
@@ -2229,14 +2237,14 @@ var texts8 = createTexts({
|
|
2229
2237
|
en: "Calendar"
|
2230
2238
|
}
|
2231
2239
|
});
|
2232
|
-
var CalendarTriggerButton = forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }) => {
|
2240
|
+
var CalendarTriggerButton = forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }, ref) => {
|
2233
2241
|
const { t } = useTranslation();
|
2234
2242
|
const recipe = useSlotRecipe({
|
2235
2243
|
key: "datePicker",
|
2236
2244
|
recipe: datePickerSlotRecipe
|
2237
2245
|
});
|
2238
2246
|
const styles = recipe({ variant });
|
2239
|
-
return /* @__PURE__ */ jsx(PopoverAnchor, { ...buttonProps, children: /* @__PURE__ */ jsx(
|
2247
|
+
return /* @__PURE__ */ jsx(PopoverAnchor, { ...buttonProps, ref, children: /* @__PURE__ */ jsx(
|
2240
2248
|
IconButton,
|
2241
2249
|
{
|
2242
2250
|
icon: /* @__PURE__ */ jsx(CalendarOutline24Icon, {}),
|
@@ -2433,6 +2441,7 @@ var DatePicker = forwardRef(
|
|
2433
2441
|
width = "auto",
|
2434
2442
|
invalid = false,
|
2435
2443
|
helperText,
|
2444
|
+
positioning,
|
2436
2445
|
...props
|
2437
2446
|
}, externalRef) => {
|
2438
2447
|
const chakraFieldProps = useFieldContext();
|
@@ -2476,7 +2485,7 @@ var DatePicker = forwardRef(
|
|
2476
2485
|
display: "inline-flex",
|
2477
2486
|
flexDirection: "column",
|
2478
2487
|
width,
|
2479
|
-
children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
|
2488
|
+
children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, positioning, children: [
|
2480
2489
|
/* @__PURE__ */ jsx(
|
2481
2490
|
Field3,
|
2482
2491
|
{
|
@@ -2568,6 +2577,7 @@ function DateRangePicker({
|
|
2568
2577
|
errorText,
|
2569
2578
|
helperText,
|
2570
2579
|
invalid,
|
2580
|
+
positioning,
|
2571
2581
|
...props
|
2572
2582
|
}) {
|
2573
2583
|
const fieldContextPRops = useFieldContext();
|
@@ -2602,7 +2612,7 @@ function DateRangePicker({
|
|
2602
2612
|
const popoverContent = /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsx(Popover$1.Content, { css: styles.calendarPopover, children: /* @__PURE__ */ jsx(Popover$1.Body, { maxWidth: "60rem", children: /* @__PURE__ */ jsx(RangeCalendar, { variant: "core", ...calendarProps }) }) }) });
|
2603
2613
|
return /* @__PURE__ */ jsx(I18nProvider, { locale, children: /* @__PURE__ */ jsxs(Box, { position: "relative", display: "inline-flex", flexDirection: "column", children: [
|
2604
2614
|
props.label && /* @__PURE__ */ jsx("label", { ...labelProps, htmlFor: datePickerId, children: props.label }),
|
2605
|
-
/* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
|
2615
|
+
/* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, positioning, children: [
|
2606
2616
|
/* @__PURE__ */ jsx(
|
2607
2617
|
Field3,
|
2608
2618
|
{
|
@@ -3140,147 +3150,145 @@ var Popover = forwardRef(
|
|
3140
3150
|
}
|
3141
3151
|
);
|
3142
3152
|
Popover.displayName = "Popover";
|
3143
|
-
var Combobox =
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
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
|
-
|
3153
|
+
var Combobox = (props) => {
|
3154
|
+
const {
|
3155
|
+
label,
|
3156
|
+
loading,
|
3157
|
+
lefticon,
|
3158
|
+
righticon,
|
3159
|
+
borderBottomLeftRadius = "sm",
|
3160
|
+
borderBottomRightRadius = "sm",
|
3161
|
+
borderTopLeftRadius = "sm",
|
3162
|
+
borderTopRightRadius = "sm",
|
3163
|
+
marginBottom,
|
3164
|
+
marginTop,
|
3165
|
+
marginX,
|
3166
|
+
marginY,
|
3167
|
+
marginRight,
|
3168
|
+
marginLeft,
|
3169
|
+
paddingBottom,
|
3170
|
+
paddingRight,
|
3171
|
+
paddingTop,
|
3172
|
+
paddingLeft,
|
3173
|
+
paddingX,
|
3174
|
+
paddingY,
|
3175
|
+
emptyContent,
|
3176
|
+
inputRef: externalInputRef,
|
3177
|
+
children,
|
3178
|
+
variant
|
3179
|
+
} = props;
|
3180
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
3181
|
+
const fallbackInputRef = useRef(null);
|
3182
|
+
const inputRef = externalInputRef ?? fallbackInputRef;
|
3183
|
+
const listBoxRef = useRef(null);
|
3184
|
+
const popoverRef = useRef(null);
|
3185
|
+
const listboxId = `${useId()}-listbox`;
|
3186
|
+
const inputWidth = useInputWidth(inputRef);
|
3187
|
+
const state = useComboBoxState({
|
3188
|
+
defaultFilter: contains,
|
3189
|
+
shouldCloseOnBlur: true,
|
3190
|
+
...props
|
3191
|
+
});
|
3192
|
+
const comboBoxProps = {
|
3193
|
+
borderTopLeftRadius,
|
3194
|
+
borderTopRightRadius,
|
3195
|
+
marginBottom,
|
3196
|
+
marginTop,
|
3197
|
+
marginRight,
|
3198
|
+
marginLeft,
|
3199
|
+
marginX,
|
3200
|
+
marginY,
|
3201
|
+
paddingBottom,
|
3202
|
+
paddingRight,
|
3203
|
+
paddingTop,
|
3204
|
+
paddingLeft,
|
3205
|
+
paddingX,
|
3206
|
+
paddingY,
|
3207
|
+
lefticon
|
3208
|
+
};
|
3209
|
+
const {
|
3210
|
+
inputProps: { ...inputProps },
|
3211
|
+
listBoxProps
|
3212
|
+
} = useComboBox(
|
3213
|
+
{
|
3214
|
+
...props,
|
3215
|
+
inputRef,
|
3216
|
+
listBoxRef,
|
3217
|
+
popoverRef,
|
3218
|
+
label
|
3219
|
+
},
|
3220
|
+
state
|
3221
|
+
);
|
3222
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
3223
|
+
/* @__PURE__ */ jsx(
|
3224
|
+
Input,
|
3204
3225
|
{
|
3205
|
-
...
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
_active: { backgroundColor: "core.surface.active" },
|
3234
|
-
...inputProps,
|
3235
|
-
endElement: loading ? /* @__PURE__ */ jsx(
|
3236
|
-
ColorSpinner,
|
3237
|
-
{
|
3238
|
-
width: "1.5rem",
|
3239
|
-
alignSelf: "center",
|
3240
|
-
paddingRight,
|
3241
|
-
css: {
|
3242
|
-
div: {
|
3243
|
-
display: "flex",
|
3244
|
-
alignItems: "center"
|
3245
|
-
}
|
3226
|
+
...styleProps(comboBoxProps),
|
3227
|
+
"aria-haspopup": "listbox",
|
3228
|
+
ref: inputRef,
|
3229
|
+
role: "combobox",
|
3230
|
+
errorText: props.errorText,
|
3231
|
+
helperText: props.helperText,
|
3232
|
+
required: props.required,
|
3233
|
+
disabled: props.disabled,
|
3234
|
+
invalid: props.invalid,
|
3235
|
+
label,
|
3236
|
+
variant,
|
3237
|
+
"aria-expanded": state.isOpen,
|
3238
|
+
"aria-autocomplete": "list",
|
3239
|
+
"aria-controls": listboxId,
|
3240
|
+
borderBottomLeftRadius: state.isOpen && !loading ? 0 : borderBottomLeftRadius,
|
3241
|
+
borderBottomRightRadius: state.isOpen && !loading ? 0 : borderBottomRightRadius,
|
3242
|
+
_active: { backgroundColor: "core.surface.active" },
|
3243
|
+
...inputProps,
|
3244
|
+
endElement: loading ? /* @__PURE__ */ jsx(
|
3245
|
+
ColorSpinner,
|
3246
|
+
{
|
3247
|
+
width: "1.5rem",
|
3248
|
+
alignSelf: "center",
|
3249
|
+
paddingRight,
|
3250
|
+
css: {
|
3251
|
+
div: {
|
3252
|
+
display: "flex",
|
3253
|
+
alignItems: "center"
|
3246
3254
|
}
|
3247
3255
|
}
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
|
3255
|
-
|
3256
|
-
|
3257
|
-
|
3258
|
-
|
3259
|
-
|
3260
|
-
|
3261
|
-
|
3262
|
-
|
3263
|
-
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3282
|
-
}
|
3283
|
-
|
3256
|
+
}
|
3257
|
+
) : righticon,
|
3258
|
+
placeholder: ""
|
3259
|
+
}
|
3260
|
+
),
|
3261
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-trigger": "multiselect" }),
|
3262
|
+
state.isOpen && !loading && /* @__PURE__ */ jsx(
|
3263
|
+
Popover,
|
3264
|
+
{
|
3265
|
+
state,
|
3266
|
+
triggerRef: inputRef,
|
3267
|
+
ref: popoverRef,
|
3268
|
+
isNonModal: true,
|
3269
|
+
placement: "bottom start",
|
3270
|
+
shouldFlip: false,
|
3271
|
+
hasBackdrop: false,
|
3272
|
+
containerPadding: 0,
|
3273
|
+
children: /* @__PURE__ */ jsx(
|
3274
|
+
ListBox,
|
3275
|
+
{
|
3276
|
+
...{
|
3277
|
+
autoFocus: typeof listBoxProps.autoFocus === "boolean" ? listBoxProps.autoFocus : void 0
|
3278
|
+
},
|
3279
|
+
state,
|
3280
|
+
id: listboxId,
|
3281
|
+
listBoxRef,
|
3282
|
+
emptyContent,
|
3283
|
+
maxWidth: inputWidth,
|
3284
|
+
variant,
|
3285
|
+
children
|
3286
|
+
}
|
3287
|
+
)
|
3288
|
+
}
|
3289
|
+
)
|
3290
|
+
] });
|
3291
|
+
};
|
3284
3292
|
Combobox.displayName = "Combobox";
|
3285
3293
|
var useInputWidth = (inputRef) => {
|
3286
3294
|
const [inputWidth, setInputWidth] = useState("auto");
|
@@ -3445,31 +3453,29 @@ var Input = forwardRef(
|
|
3445
3453
|
}
|
3446
3454
|
);
|
3447
3455
|
Input.displayName = "Input";
|
3448
|
-
var ListBox =
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3458
|
-
|
3459
|
-
|
3460
|
-
|
3461
|
-
|
3462
|
-
|
3463
|
-
|
3464
|
-
|
3465
|
-
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
3470
|
-
|
3471
|
-
}
|
3472
|
-
);
|
3456
|
+
var ListBox = (props) => {
|
3457
|
+
const { loading, listBoxRef, state, maxWidth, variant, children } = props;
|
3458
|
+
const { listBoxProps } = useListBox(props, state, listBoxRef);
|
3459
|
+
const recipe = useSlotRecipe({ key: "listBox" });
|
3460
|
+
const styles = recipe({ variant });
|
3461
|
+
return /* @__PURE__ */ jsxs(
|
3462
|
+
List,
|
3463
|
+
{
|
3464
|
+
...listBoxProps,
|
3465
|
+
ref: listBoxRef,
|
3466
|
+
css: styles.root,
|
3467
|
+
"aria-busy": loading,
|
3468
|
+
maxWidth,
|
3469
|
+
children: [
|
3470
|
+
state.collection.size === 0 && props.emptyContent,
|
3471
|
+
[...state.collection].map(
|
3472
|
+
(item) => item.type === "section" ? /* @__PURE__ */ jsx(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx(Option, { item, state }, item.key)
|
3473
|
+
),
|
3474
|
+
children
|
3475
|
+
]
|
3476
|
+
}
|
3477
|
+
);
|
3478
|
+
};
|
3473
3479
|
ListBox.displayName = "ListBox";
|
3474
3480
|
function ItemLabel({ children }) {
|
3475
3481
|
const { labelProps } = useOptionContext();
|
@@ -3849,7 +3855,7 @@ var numericStepperRecipe = defineSlotRecipe({
|
|
3849
3855
|
}
|
3850
3856
|
}
|
3851
3857
|
});
|
3852
|
-
var NumericStepper = React28__default.forwardRef((props) => {
|
3858
|
+
var NumericStepper = React28__default.forwardRef((props, ref) => {
|
3853
3859
|
const {
|
3854
3860
|
name: nameProp,
|
3855
3861
|
id: idProp,
|
@@ -3879,7 +3885,7 @@ var NumericStepper = React28__default.forwardRef((props) => {
|
|
3879
3885
|
var _a5;
|
3880
3886
|
(_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
|
3881
3887
|
};
|
3882
|
-
return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, children: [
|
3888
|
+
return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
|
3883
3889
|
/* @__PURE__ */ jsx(
|
3884
3890
|
VerySmallButton,
|
3885
3891
|
{
|
@@ -4425,42 +4431,44 @@ var SelectValueText = React28.forwardRef(function SelectValueText2(props, ref) {
|
|
4425
4431
|
var SelectLabel = Select$1.Label;
|
4426
4432
|
var SelectItemText = Select$1.ItemText;
|
4427
4433
|
var SelectRoot = Select$1.Root;
|
4428
|
-
var Switch = forwardRef(
|
4429
|
-
|
4430
|
-
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
errorText,
|
4435
|
-
helperText,
|
4436
|
-
...rest
|
4437
|
-
} = props;
|
4438
|
-
const recipe = useSlotRecipe({ key: "switch" });
|
4439
|
-
const styles = recipe({ size });
|
4440
|
-
return /* @__PURE__ */ jsx(
|
4441
|
-
Field3,
|
4442
|
-
{
|
4443
|
-
style: { width: "auto" },
|
4434
|
+
var Switch = forwardRef(
|
4435
|
+
(props, ref) => {
|
4436
|
+
const {
|
4437
|
+
rootRef,
|
4438
|
+
size = "md",
|
4439
|
+
label,
|
4444
4440
|
invalid,
|
4445
4441
|
errorText,
|
4446
4442
|
helperText,
|
4447
|
-
|
4448
|
-
|
4449
|
-
|
4450
|
-
|
4451
|
-
|
4452
|
-
|
4453
|
-
|
4454
|
-
|
4455
|
-
|
4456
|
-
|
4457
|
-
|
4458
|
-
|
4459
|
-
|
4460
|
-
|
4461
|
-
|
4462
|
-
|
4463
|
-
|
4443
|
+
...rest
|
4444
|
+
} = props;
|
4445
|
+
const recipe = useSlotRecipe({ key: "switch" });
|
4446
|
+
const styles = recipe({ size });
|
4447
|
+
return /* @__PURE__ */ jsx(
|
4448
|
+
Field3,
|
4449
|
+
{
|
4450
|
+
style: { width: "auto" },
|
4451
|
+
invalid,
|
4452
|
+
errorText,
|
4453
|
+
helperText,
|
4454
|
+
children: /* @__PURE__ */ jsxs(
|
4455
|
+
Switch$1.Root,
|
4456
|
+
{
|
4457
|
+
ref: rootRef,
|
4458
|
+
...rest,
|
4459
|
+
checked: props.checked,
|
4460
|
+
css: styles.root,
|
4461
|
+
children: [
|
4462
|
+
/* @__PURE__ */ jsx(Switch$1.Label, { children: label }),
|
4463
|
+
/* @__PURE__ */ jsx(Switch$1.HiddenInput, { ref }),
|
4464
|
+
/* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) })
|
4465
|
+
]
|
4466
|
+
}
|
4467
|
+
)
|
4468
|
+
}
|
4469
|
+
);
|
4470
|
+
}
|
4471
|
+
);
|
4464
4472
|
Switch.displayName = "Switch";
|
4465
4473
|
var useLabelHeight = (label) => {
|
4466
4474
|
const labelRef = useRef(null);
|
@@ -4841,7 +4849,7 @@ var LineIcon = forwardRef(
|
|
4841
4849
|
target = "lineIcon",
|
4842
4850
|
label,
|
4843
4851
|
...rest
|
4844
|
-
}) {
|
4852
|
+
}, ref) {
|
4845
4853
|
const recipe = useSlotRecipe({ key: "lineIcon" });
|
4846
4854
|
const styles = recipe({ variant, size, ...rest });
|
4847
4855
|
const targetPadding = () => {
|
@@ -4871,6 +4879,7 @@ var LineIcon = forwardRef(
|
|
4871
4879
|
borderWidth: borderContainer(),
|
4872
4880
|
borderColor: variant === "walk" ? "core.outline" : "transparent",
|
4873
4881
|
"aria-label": label,
|
4882
|
+
ref,
|
4874
4883
|
children: /* @__PURE__ */ jsx(Icon2, { css: styles.icon })
|
4875
4884
|
}
|
4876
4885
|
);
|
@@ -5964,7 +5973,7 @@ var ProgressDot = ({ isActive }) => {
|
|
5964
5973
|
}
|
5965
5974
|
);
|
5966
5975
|
};
|
5967
|
-
var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }) => {
|
5976
|
+
var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }, ref) => {
|
5968
5977
|
const { t } = useTranslation();
|
5969
5978
|
const recipe = useSlotRecipe({
|
5970
5979
|
key: "progressIndicator"
|
@@ -5979,6 +5988,7 @@ var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }) => {
|
|
5979
5988
|
"aria-valuemax": numberOfSteps,
|
5980
5989
|
"aria-valuenow": activeStep,
|
5981
5990
|
"aria-valuetext": t(texts24.stepsOf(activeStep, numberOfSteps)),
|
5991
|
+
ref,
|
5982
5992
|
children: /* @__PURE__ */ jsx(Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ jsx(
|
5983
5993
|
ProgressDot,
|
5984
5994
|
{
|
@@ -6353,7 +6363,8 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
6353
6363
|
cell: {
|
6354
6364
|
...numericStyles,
|
6355
6365
|
paddingX: 1.5,
|
6356
|
-
paddingY: 1
|
6366
|
+
paddingY: 1,
|
6367
|
+
width: "100%"
|
6357
6368
|
},
|
6358
6369
|
footer: {
|
6359
6370
|
fontWeight: "medium"
|