@vygruppen/spor-react 12.2.0 → 12.3.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/index.mjs CHANGED
@@ -1,4 +1,4 @@
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 as Field$1, 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, Fieldset as Fieldset$1, InputElement, Input as Input$1, List as List$1, ListItem, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, Textarea as Textarea$1, FieldLabel as FieldLabel$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, useCheckbox, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
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, List as List$1, ListItem, 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, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, 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
3
  import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, LinkOutOutline24Icon, QuestionFill24Icon, ErrorOutline24Icon, SuccessFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React28 from 'react';
@@ -1378,25 +1378,94 @@ var ColorModeButton = React28.forwardRef(function ColorModeButton2(props, ref) {
1378
1378
  }
1379
1379
  ) });
1380
1380
  });
1381
- var Field = React28.forwardRef(
1381
+ var FloatingLabel = forwardRef(
1382
+ (props, ref) => /* @__PURE__ */ jsx(Field.Label, { ref, ...props, css: floatingLabelStyles })
1383
+ );
1384
+ FloatingLabel.displayName = "FloatingLabel";
1385
+ var floatingLabelStyles = defineStyle({
1386
+ paddingX: 3,
1387
+ fontWeight: "normal",
1388
+ fontSize: ["mobile.xs", "desktop.xs"],
1389
+ color: "text",
1390
+ pointerEvents: "none",
1391
+ zIndex: "docked",
1392
+ _disabled: {
1393
+ opacity: 0.4
1394
+ },
1395
+ pos: "absolute",
1396
+ top: "0.3rem",
1397
+ transition: "position",
1398
+ _peerPlaceholderShown: {
1399
+ /* For when input is not in focus */
1400
+ top: "0.9rem",
1401
+ color: "text",
1402
+ fontSize: ["mobile.sm", "desktop.sm"]
1403
+ },
1404
+ _peerFocusVisible: {
1405
+ /* For when input is in focus */
1406
+ fontSize: ["mobile.xs", "desktop.xs"],
1407
+ color: "text",
1408
+ top: "0.3rem"
1409
+ }
1410
+ });
1411
+ var Label = (props) => /* @__PURE__ */ jsx(Field.Label, { ...props, css: labelStyles });
1412
+ var labelStyles = defineStyle({
1413
+ fontWeight: "normal",
1414
+ paddingBottom: 1,
1415
+ paddingX: 1,
1416
+ fontSize: ["mobile.xs", "desktop.xs"],
1417
+ color: "text",
1418
+ pointerEvents: "none",
1419
+ zIndex: "docked",
1420
+ _disabled: {
1421
+ opacity: 0.4
1422
+ }
1423
+ });
1424
+ var Field3 = React28.forwardRef(
1382
1425
  (props, ref) => {
1383
- const { label, children, helperText, errorText, ...rest } = props;
1384
- const recipe = useSlotRecipe({ key: "field" });
1385
- const styles = recipe({ label, helperText, errorText });
1386
- return /* @__PURE__ */ jsxs(Field$1.Root, { ref, ...rest, css: styles.root, children: [
1426
+ const {
1427
+ label,
1387
1428
  children,
1388
- helperText && /* @__PURE__ */ jsx(Field$1.HelperText, { children: helperText }),
1389
- label && /* @__PURE__ */ jsx(Field$1.Label, { css: styles.label, children: label }),
1390
- errorText && /* @__PURE__ */ jsx(Field$1.ErrorText, { children: errorText })
1429
+ helperText,
1430
+ errorText,
1431
+ floatingLabel = false,
1432
+ disabled,
1433
+ invalid,
1434
+ readOnly,
1435
+ required,
1436
+ direction,
1437
+ ...rest
1438
+ } = props;
1439
+ const recipe = useSlotRecipe({ key: "field" });
1440
+ const styles = recipe();
1441
+ return /* @__PURE__ */ jsxs(Stack, { gap: "2", ref, ...rest, width: "100%", children: [
1442
+ /* @__PURE__ */ jsxs(
1443
+ Field.Root,
1444
+ {
1445
+ disabled,
1446
+ invalid,
1447
+ readOnly,
1448
+ required,
1449
+ css: styles.root,
1450
+ direction,
1451
+ children: [
1452
+ label && !floatingLabel && /* @__PURE__ */ jsx(Label, { children: label }),
1453
+ children,
1454
+ label && floatingLabel && /* @__PURE__ */ jsx(FloatingLabel, { children: label }),
1455
+ errorText && /* @__PURE__ */ jsx(Field.ErrorText, { children: errorText })
1456
+ ]
1457
+ }
1458
+ ),
1459
+ helperText && /* @__PURE__ */ jsx(Text3, { fontSize: "sm", color: "text.tertiary", children: helperText })
1391
1460
  ] });
1392
1461
  }
1393
1462
  );
1394
- Field.displayName = "Field";
1463
+ Field3.displayName = "Field";
1395
1464
  var FieldErrorText = React28.forwardRef((props, ref) => {
1396
- return /* @__PURE__ */ jsx(Field$1.ErrorText, { ref, children: props.children });
1465
+ return /* @__PURE__ */ jsx(Field.ErrorText, { ref, children: props.children });
1397
1466
  });
1398
1467
  FieldErrorText.displayName = "FieldErrorText";
1399
- var FieldLabel = Field$1.Label;
1468
+ var FieldLabel = Field.Label;
1400
1469
  var accordionAnatomy = createAnatomy("accordion").parts(
1401
1470
  "root",
1402
1471
  "itemTrigger",
@@ -1637,6 +1706,15 @@ var datepickerAnatomy = createAnatomy("datepicker").parts(
1637
1706
  "box",
1638
1707
  "rangeCalendarPopover"
1639
1708
  );
1709
+ var checkboxCardAnatomy = createAnatomy("checkbox-card", [
1710
+ "root",
1711
+ "control",
1712
+ "label",
1713
+ "description",
1714
+ "addon",
1715
+ "indicator",
1716
+ "content"
1717
+ ]);
1640
1718
 
1641
1719
  // src/theme/slot-recipes/datepicker.ts
1642
1720
  var datePickerSlotRecipe = defineSlotRecipe({
@@ -2348,18 +2426,20 @@ var StyledField = forwardRef(
2348
2426
  var DatePicker = forwardRef(
2349
2427
  ({
2350
2428
  variant,
2351
- errorMessage,
2429
+ errorText,
2352
2430
  minHeight,
2353
2431
  showYearNavigation,
2354
2432
  withPortal = true,
2355
2433
  width = "auto",
2434
+ invalid = false,
2435
+ helperText,
2356
2436
  ...props
2357
2437
  }, externalRef) => {
2358
2438
  const chakraFieldProps = useFieldContext();
2359
2439
  const state = useDatePickerState({
2360
2440
  ...props,
2361
2441
  shouldCloseOnSelect: true,
2362
- errorMessage,
2442
+ errorMessage: errorText,
2363
2443
  isRequired: props.isRequired ?? (chakraFieldProps == null ? void 0 : chakraFieldProps.required),
2364
2444
  validationState: (chakraFieldProps == null ? void 0 : chakraFieldProps.invalid) ? "invalid" : "valid"
2365
2445
  });
@@ -2398,12 +2478,14 @@ var DatePicker = forwardRef(
2398
2478
  width,
2399
2479
  children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
2400
2480
  /* @__PURE__ */ jsx(
2401
- Field,
2481
+ Field3,
2402
2482
  {
2403
2483
  display: "inline-flex",
2404
2484
  id: inputGroupId,
2405
2485
  "aria-labelledby": labelId,
2406
- errorText: errorMessage,
2486
+ errorText,
2487
+ invalid,
2488
+ helperText,
2407
2489
  children: /* @__PURE__ */ jsx(PopoverAnchor, { children: /* @__PURE__ */ jsxs(
2408
2490
  StyledField,
2409
2491
  {
@@ -2483,13 +2565,18 @@ function DateRangePicker({
2483
2565
  startName,
2484
2566
  endName,
2485
2567
  withPortal = true,
2568
+ errorText,
2569
+ helperText,
2570
+ invalid,
2486
2571
  ...props
2487
2572
  }) {
2488
2573
  const fieldContextPRops = useFieldContext();
2489
2574
  const state = useDateRangePickerState({
2490
2575
  ...props,
2491
2576
  shouldCloseOnSelect: true,
2492
- isRequired: props.isRequired ?? (fieldContextPRops == null ? void 0 : fieldContextPRops.required),
2577
+ isInvalid: invalid,
2578
+ errorMessage: errorText,
2579
+ isRequired: props.required ?? (fieldContextPRops == null ? void 0 : fieldContextPRops.required),
2493
2580
  validationState: (fieldContextPRops == null ? void 0 : fieldContextPRops.invalid) ? "invalid" : "valid"
2494
2581
  });
2495
2582
  const ref = useRef(null);
@@ -2516,54 +2603,65 @@ function DateRangePicker({
2516
2603
  return /* @__PURE__ */ jsx(I18nProvider, { locale, children: /* @__PURE__ */ jsxs(Box, { position: "relative", display: "inline-flex", flexDirection: "column", children: [
2517
2604
  props.label && /* @__PURE__ */ jsx("label", { ...labelProps, htmlFor: datePickerId, children: props.label }),
2518
2605
  /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
2519
- /* @__PURE__ */ jsx(Field, { width: "auto", display: "inline-flex", id: datePickerId, children: /* @__PURE__ */ jsx(PopoverAnchor, { children: /* @__PURE__ */ jsxs(
2520
- StyledField,
2606
+ /* @__PURE__ */ jsx(
2607
+ Field3,
2521
2608
  {
2522
- alignItems: "center",
2523
- paddingX: 3,
2524
- variant,
2525
- onClick: onFieldClick,
2526
- minHeight,
2527
- children: [
2528
- variant && /* @__PURE__ */ jsx(Popover$1.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
2529
- CalendarTriggerButton,
2530
- {
2531
- variant,
2532
- ref,
2533
- ...buttonProps
2534
- }
2535
- ) }),
2536
- /* @__PURE__ */ jsx(
2537
- DateField,
2538
- {
2539
- ...startFieldProps,
2540
- name: startName,
2541
- label: props.startLabel,
2542
- labelProps
2543
- }
2544
- ),
2545
- /* @__PURE__ */ jsx(
2546
- Box,
2547
- {
2548
- as: "span",
2549
- "aria-hidden": "true",
2550
- paddingRight: "2",
2551
- paddingLeft: "2",
2552
- children: "\u2013"
2553
- }
2554
- ),
2555
- /* @__PURE__ */ jsx(
2556
- DateField,
2557
- {
2558
- ...endFieldProps,
2559
- name: endName,
2560
- label: props.endLabel,
2561
- labelProps
2562
- }
2563
- )
2564
- ]
2609
+ width: "auto",
2610
+ display: "inline-flex",
2611
+ id: datePickerId,
2612
+ errorText,
2613
+ helperText,
2614
+ invalid,
2615
+ children: /* @__PURE__ */ jsx(PopoverAnchor, { children: /* @__PURE__ */ jsxs(
2616
+ StyledField,
2617
+ {
2618
+ alignItems: "center",
2619
+ paddingX: 3,
2620
+ variant,
2621
+ onClick: onFieldClick,
2622
+ minHeight,
2623
+ children: [
2624
+ variant && /* @__PURE__ */ jsx(Popover$1.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
2625
+ CalendarTriggerButton,
2626
+ {
2627
+ variant,
2628
+ ref,
2629
+ ...buttonProps
2630
+ }
2631
+ ) }),
2632
+ /* @__PURE__ */ jsx(
2633
+ DateField,
2634
+ {
2635
+ ...startFieldProps,
2636
+ name: startName,
2637
+ label: props.startLabel,
2638
+ labelProps
2639
+ }
2640
+ ),
2641
+ /* @__PURE__ */ jsx(
2642
+ Box,
2643
+ {
2644
+ as: "span",
2645
+ "aria-hidden": "true",
2646
+ paddingRight: "2",
2647
+ paddingLeft: "2",
2648
+ children: "\u2013"
2649
+ }
2650
+ ),
2651
+ /* @__PURE__ */ jsx(
2652
+ DateField,
2653
+ {
2654
+ ...endFieldProps,
2655
+ name: endName,
2656
+ label: props.endLabel,
2657
+ labelProps
2658
+ }
2659
+ )
2660
+ ]
2661
+ }
2662
+ ) })
2565
2663
  }
2566
- ) }) }),
2664
+ ),
2567
2665
  state.isOpen && withPortal && /* @__PURE__ */ jsx(Portal, { children: popoverContent }),
2568
2666
  state.isOpen && !withPortal && popoverContent
2569
2667
  ] })
@@ -2610,7 +2708,7 @@ var TimePicker = ({
2610
2708
  name,
2611
2709
  ...boxProps
2612
2710
  }) => {
2613
- const { disabled: fieldDisabled, invalid: fieldInvalid } = useFieldContext4() ?? {};
2711
+ const { disabled: fieldDisabled, invalid: fieldInvalid } = useFieldContext() ?? {};
2614
2712
  const isDisabled = isDisabledExternally ?? fieldDisabled ?? false;
2615
2713
  const { t } = useTranslation();
2616
2714
  const locale = useCurrentLocale();
@@ -2657,7 +2755,7 @@ var TimePicker = ({
2657
2755
  const ariaLabel = `${inputLabel} \u2013 ${t(
2658
2756
  texts11.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
2659
2757
  )}`;
2660
- return /* @__PURE__ */ jsx(Field, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxs(
2758
+ return /* @__PURE__ */ jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxs(
2661
2759
  StyledField,
2662
2760
  {
2663
2761
  width: "fit-content",
@@ -2737,9 +2835,6 @@ var texts11 = createTexts({
2737
2835
  sv: "minuter"
2738
2836
  }
2739
2837
  });
2740
- function useFieldContext4() {
2741
- throw new Error("Function not implemented.");
2742
- }
2743
2838
  var DialogContent = React28.forwardRef((props, ref) => {
2744
2839
  const {
2745
2840
  children,
@@ -2971,184 +3066,28 @@ var CheckboxGroup = forwardRef(
2971
3066
  }
2972
3067
  );
2973
3068
  CheckboxGroup.displayName = "CheckboxGroup";
2974
- var choiceChipRecipe = defineRecipe({
2975
- base: {
2976
- display: "inline-flex",
2977
- alignItems: "center",
2978
- boxAlign: "center",
2979
- fontSize: "xs",
2980
- cursor: "pointer",
2981
- transitionProperty: "all",
2982
- borderRadius: "xl",
2983
- transitionDuration: "fast",
2984
- height: 6,
2985
- paddingInlineStart: "2",
2986
- paddingInlineEnd: "2",
2987
- outline: "1px solid",
2988
- outlineColor: "base.outline",
2989
- _checked: {
2990
- backgroundColor: "brand.surface",
2991
- borderRadius: "sm",
2992
- outline: "none",
2993
- color: "brand.text",
2994
- _hover: {
2995
- backgroundColor: "brand.surface.hover",
2996
- _active: {
2997
- backgroundColor: "brand.surface.active"
2998
- }
2999
- }
3000
- },
3001
- _focusVisible: {
3002
- outline: "2px solid",
3003
- outlineColor: "outline.focus",
3004
- outlineOffset: "1px"
3005
- },
3006
- _disabled: {
3007
- pointerEvents: "none",
3008
- boxShadow: "none",
3009
- backgroundColor: "surface.disabled",
3010
- color: "text.disabled",
3011
- outline: "none",
3012
- _hover: {
3013
- backgroundColor: "core.surface.disabled",
3014
- boxShadow: "none",
3015
- color: "core.text.disabled"
3016
- },
3017
- _checked: {
3018
- cursor: "not-allowed",
3019
- boxShadow: "none",
3020
- color: "core.text.disabled",
3021
- backgroundColor: "core.surface.disabled",
3022
- _hover: {
3023
- backgroundColor: "core.surface.disabled",
3024
- boxShadow: "none",
3025
- color: "core.text.disabled"
3026
- }
3027
- }
3028
- }
3029
- },
3030
- variants: {
3031
- variant: {
3032
- core: {
3033
- color: "core.text",
3034
- outlineColor: "core.outline",
3035
- _hover: {
3036
- outline: "2px solid",
3037
- outlineColor: "core.outline.hover",
3038
- _active: {
3039
- outline: "1px solid",
3040
- outlineColor: "core.outline",
3041
- backgroundColor: "core.surface.active"
3042
- }
3043
- }
3044
- },
3045
- accent: {
3046
- backgroundColor: "accent.surface",
3047
- color: "accent.text",
3048
- outline: "none",
3049
- _hover: {
3050
- backgroundColor: "accent.surface.hover",
3051
- _active: {
3052
- backgroundColor: "accent.surface.active"
3053
- }
3054
- }
3055
- },
3056
- floating: {
3057
- backgroundColor: "floating.surface",
3058
- outline: "1px solid",
3059
- outlineColor: "floating.outline",
3060
- color: "floating.text",
3061
- boxShadow: "sm",
3062
- _hover: {
3063
- backgroundColor: "floating.surface.hover",
3064
- outline: "1px solid",
3065
- outlineColor: "floating.outline.hover",
3066
- _active: {
3067
- backgroundColor: "floating.surface.active",
3068
- outline: "1px solid",
3069
- outlineColor: "floating.outline"
3070
- }
3071
- }
3072
- }
3073
- },
3074
- size: {
3075
- xs: {
3076
- _checked: {
3077
- borderRadius: "0.563rem"
3078
- },
3079
- height: 5,
3080
- paddingX: 1.5
3081
- },
3082
- sm: {
3083
- _checked: {
3084
- borderRadius: "sm"
3085
- },
3086
- height: 6,
3087
- paddingX: 2
3088
- },
3089
- md: {
3090
- _checked: {
3091
- borderRadius: "sm"
3092
- },
3093
- height: 7,
3094
- paddingX: 2
3095
- },
3096
- lg: {
3097
- _checked: {
3098
- borderRadius: "md"
3069
+ var ChoiceChip = forwardRef(
3070
+ ({ children, icon, onCheckedChange, ...rootProps }, ref) => {
3071
+ return /* @__PURE__ */ jsx(
3072
+ CheckboxCard.Root,
3073
+ {
3074
+ ...rootProps,
3075
+ ...onCheckedChange && {
3076
+ onCheckedChange: (details) => onCheckedChange(!!details.checked)
3099
3077
  },
3100
- height: 8,
3101
- paddingX: 3
3078
+ children: /* @__PURE__ */ jsx(CheckboxCard.Context, { children: ({ checked }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3079
+ /* @__PURE__ */ jsx(CheckboxCard.HiddenInput, { ref }),
3080
+ /* @__PURE__ */ jsx(CheckboxCard.Control, { children: /* @__PURE__ */ jsx(CheckboxCard.Content, { children: /* @__PURE__ */ jsxs(CheckboxCard.Label, { children: [
3081
+ icon && /* @__PURE__ */ jsx(Span, { width: "24px", children: checked ? icon.checked : icon.default }),
3082
+ rootProps.chipType !== "icon" && children,
3083
+ rootProps.chipType === "filter" && checked && /* @__PURE__ */ jsx(CloseOutline24Icon, {})
3084
+ ] }) }) })
3085
+ ] }) })
3102
3086
  }
3103
- }
3087
+ );
3104
3088
  }
3105
- });
3106
- var ChoiceChipStyledDiv = chakra("div", choiceChipRecipe);
3107
- var ChoiceChip = ({
3108
- children,
3109
- icon,
3110
- size = "sm",
3111
- chipType = "choice",
3112
- variant = "core",
3113
- ...props
3114
- }) => {
3115
- const {
3116
- getControlProps,
3117
- disabled,
3118
- getLabelProps,
3119
- getHiddenInputProps,
3120
- setChecked,
3121
- checked
3122
- } = useCheckbox(props);
3123
- return /* @__PURE__ */ jsxs(
3124
- chakra.label,
3125
- {
3126
- ...getLabelProps(),
3127
- "aria-label": props["aria-label"] ?? String(children),
3128
- children: [
3129
- /* @__PURE__ */ jsx(
3130
- chakra.input,
3131
- {
3132
- ...getHiddenInputProps(),
3133
- disabled,
3134
- defaultChecked: checked,
3135
- value: checked ? "on" : "off",
3136
- type: "checkbox",
3137
- "aria-checked": checked,
3138
- onClick: () => {
3139
- setChecked(!checked);
3140
- }
3141
- }
3142
- ),
3143
- /* @__PURE__ */ jsxs(ChoiceChipStyledDiv, { ...getControlProps(), size, variant, children: [
3144
- icon && /* @__PURE__ */ jsx(Span, { children: checked ? icon.checked : icon.default }),
3145
- chipType !== "icon" && /* @__PURE__ */ jsx(Span, { children }),
3146
- chipType === "filter" && checked && /* @__PURE__ */ jsx(CloseOutline24Icon, { marginLeft: 1.5 })
3147
- ] })
3148
- ]
3149
- }
3150
- );
3151
- };
3089
+ );
3090
+ ChoiceChip.displayName = "ChoiceChip";
3152
3091
  var Popover = forwardRef(
3153
3092
  ({
3154
3093
  children,
@@ -3279,6 +3218,11 @@ var Combobox = forwardRef(
3279
3218
  "aria-haspopup": "listbox",
3280
3219
  ref: inputRef,
3281
3220
  role: "combobox",
3221
+ errorText: props.errorText,
3222
+ helperText: props.helperText,
3223
+ required: props.required,
3224
+ disabled: props.disabled,
3225
+ invalid: props.invalid,
3282
3226
  label,
3283
3227
  variant,
3284
3228
  "aria-expanded": state.isOpen,
@@ -3453,36 +3397,6 @@ var inputRecipe = defineRecipe({
3453
3397
  variant: "core"
3454
3398
  }
3455
3399
  });
3456
- var InputGroup = React28.forwardRef(
3457
- (props, ref) => {
3458
- const {
3459
- startElement,
3460
- startElementProps,
3461
- endElement,
3462
- endElementProps,
3463
- label,
3464
- children,
3465
- ...rest
3466
- } = props;
3467
- return /* @__PURE__ */ jsxs(Group$1, { ref, ...rest, children: [
3468
- startElement && /* @__PURE__ */ jsx(
3469
- InputElement,
3470
- {
3471
- pointerEvents: "none",
3472
- paddingX: 2,
3473
- ...startElementProps,
3474
- children: startElement
3475
- }
3476
- ),
3477
- React28.cloneElement(children, {
3478
- ...children.props
3479
- }),
3480
- label && /* @__PURE__ */ jsx(FieldLabel, { left: startElement ? 4 : "0", right: endElement ? 4 : 0, children: label }),
3481
- endElement && /* @__PURE__ */ jsx(InputElement, { placement: "end", paddingX: 2, ...endElementProps, children: endElement })
3482
- ] });
3483
- }
3484
- );
3485
- InputGroup.displayName = "InputGroup";
3486
3400
  var StyledInput = chakra(Input$1, inputRecipe);
3487
3401
  var Input = forwardRef(
3488
3402
  ({
@@ -3494,29 +3408,40 @@ var Input = forwardRef(
3494
3408
  errorText,
3495
3409
  ...props
3496
3410
  }, ref) => {
3497
- return /* @__PURE__ */ jsx(Field, { invalid, helperText, errorText, children: /* @__PURE__ */ jsx(
3498
- InputGroup,
3411
+ return /* @__PURE__ */ jsxs(
3412
+ Field3,
3499
3413
  {
3500
- endElement: endElement && endElement,
3501
- startElement: startElement && startElement,
3502
- width: "100%",
3503
- position: "relative",
3504
- label,
3505
- children: /* @__PURE__ */ jsx(
3506
- StyledInput,
3507
- {
3508
- "data-attachable": true,
3509
- ref,
3510
- className: "peer",
3511
- overflow: "hidden",
3512
- paddingLeft: startElement ? "2.6rem" : void 0,
3513
- paddingRight: endElement ? "2.6rem" : void 0,
3514
- placeholder: "",
3515
- ...props
3516
- }
3517
- )
3414
+ invalid,
3415
+ helperText,
3416
+ errorText,
3417
+ label: (
3418
+ // Render startElement invisibly to align label text with input content when an icon is present
3419
+ /* @__PURE__ */ jsxs(Flex, { children: [
3420
+ /* @__PURE__ */ jsx(Box, { visibility: "hidden", children: startElement }),
3421
+ label
3422
+ ] })
3423
+ ),
3424
+ floatingLabel: true,
3425
+ children: [
3426
+ startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: "none", paddingX: 2, children: startElement }),
3427
+ /* @__PURE__ */ jsx(
3428
+ StyledInput,
3429
+ {
3430
+ "data-attachable": true,
3431
+ ref,
3432
+ focusVisibleRing: "outside",
3433
+ overflow: "hidden",
3434
+ paddingLeft: startElement ? "2.6rem" : void 0,
3435
+ paddingRight: endElement ? "2.6rem" : void 0,
3436
+ ...props,
3437
+ className: `peer ${props.className}`,
3438
+ placeholder: ""
3439
+ }
3440
+ ),
3441
+ endElement && /* @__PURE__ */ jsx(InputElement, { placement: "end", paddingX: 2, children: endElement })
3442
+ ]
3518
3443
  }
3519
- ) });
3444
+ );
3520
3445
  }
3521
3446
  );
3522
3447
  Input.displayName = "Input";
@@ -3821,46 +3746,66 @@ var NativeSelect = React28.forwardRef(function NativeSelect2(props, ref) {
3821
3746
  label,
3822
3747
  invalid,
3823
3748
  disabled,
3749
+ required,
3750
+ helperText,
3751
+ errorText,
3824
3752
  ...rest
3825
3753
  } = props;
3826
3754
  const recipe = useSlotRecipe({ recipe: nativeSelectSlotRecipe });
3827
3755
  const styles = recipe({ variant });
3828
- return /* @__PURE__ */ jsx(Field, { label, invalid, disabled, children: /* @__PURE__ */ jsxs(
3829
- NativeSelect$1.Root,
3756
+ return /* @__PURE__ */ jsx(
3757
+ Field3,
3830
3758
  {
3831
- ref,
3832
- css: styles.root,
3833
- "aria-disabled": disabled,
3834
- children: [
3835
- /* @__PURE__ */ jsx(
3836
- NativeSelect$1.Field,
3837
- {
3838
- css: styles.field,
3839
- "aria-invalid": invalid,
3840
- ...rest,
3841
- children
3842
- }
3843
- ),
3844
- /* @__PURE__ */ jsx(NativeSelect$1.Indicator, { css: styles.icon, children: /* @__PURE__ */ jsx(DropdownDownFill18Icon, {}) })
3845
- ]
3759
+ label,
3760
+ invalid,
3761
+ disabled,
3762
+ required,
3763
+ helperText,
3764
+ errorText,
3765
+ floatingLabel: true,
3766
+ children: /* @__PURE__ */ jsxs(
3767
+ NativeSelect$1.Root,
3768
+ {
3769
+ ref,
3770
+ css: styles.root,
3771
+ "aria-disabled": disabled,
3772
+ children: [
3773
+ /* @__PURE__ */ jsx(
3774
+ NativeSelect$1.Field,
3775
+ {
3776
+ css: styles.field,
3777
+ "aria-invalid": invalid,
3778
+ ...rest,
3779
+ children
3780
+ }
3781
+ ),
3782
+ /* @__PURE__ */ jsx(NativeSelect$1.Indicator, { css: styles.icon, children: /* @__PURE__ */ jsx(DropdownDownFill18Icon, {}) })
3783
+ ]
3784
+ }
3785
+ )
3846
3786
  }
3847
- ) });
3787
+ );
3848
3788
  });
3849
3789
  var numericStepperRecipe = defineSlotRecipe({
3850
3790
  slots: numericStepperAnatomy.keys(),
3851
3791
  className: "spor-numeric-stepper",
3852
3792
  base: {
3853
3793
  root: {
3854
- display: "flex",
3855
- flexDirection: "row",
3856
- alignItems: "center"
3794
+ "& > div": {
3795
+ display: "flex",
3796
+ flexDirection: "row",
3797
+ alignItems: "center"
3798
+ }
3857
3799
  },
3858
3800
  input: {
3859
3801
  fontSize: "sm",
3860
3802
  fontWeight: "bold",
3861
3803
  marginX: 0.5,
3804
+ padding: 0,
3862
3805
  paddingX: 0.5,
3863
3806
  borderRadius: "xs",
3807
+ outline: "none",
3808
+ height: "auto",
3864
3809
  textAlign: "center",
3865
3810
  transitionProperty: "common",
3866
3811
  transitionDuration: "fast",
@@ -3904,8 +3849,8 @@ var numericStepperRecipe = defineSlotRecipe({
3904
3849
  }
3905
3850
  }
3906
3851
  });
3907
- var NumericStepper = React28__default.forwardRef(
3908
- ({
3852
+ var NumericStepper = React28__default.forwardRef((props) => {
3853
+ const {
3909
3854
  name: nameProp,
3910
3855
  id: idProp,
3911
3856
  value: valueProp,
@@ -3917,99 +3862,99 @@ var NumericStepper = React28__default.forwardRef(
3917
3862
  withInput = true,
3918
3863
  stepSize = 1,
3919
3864
  showZero = false,
3920
- ariaLabelContext = { singular: "", plural: "" }
3921
- }) => {
3922
- const addButtonRef = useRef(null);
3923
- const { t } = useTranslation();
3924
- const recipe = useSlotRecipe({ recipe: numericStepperRecipe });
3925
- const styles = recipe();
3926
- const [value, onChange] = useControllableState({
3927
- value: valueProp,
3928
- onChange: onChangeProp,
3929
- defaultValue
3930
- });
3931
- const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
3932
- const focusOnAddButton = () => {
3933
- var _a5;
3934
- (_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
3935
- };
3936
- return /* @__PURE__ */ jsxs(Field, { css: styles.root, flexDirection: "row", width: "auto", children: [
3937
- /* @__PURE__ */ jsx(
3938
- VerySmallButton,
3939
- {
3940
- icon: /* @__PURE__ */ jsx(SubtractIcon, { stepLabel: clampedStepSize }),
3941
- "aria-label": t(
3942
- texts13.decrementButtonAriaLabel(
3943
- clampedStepSize,
3944
- stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
3945
- )
3946
- ),
3947
- onClick: () => {
3948
- onChange(Math.max(value - clampedStepSize, minValue));
3949
- if (Math.max(value - clampedStepSize, minValue) <= minValue) {
3950
- focusOnAddButton();
3951
- }
3952
- },
3953
- visibility: value <= minValue ? "hidden" : "visible",
3954
- disabled,
3955
- id: value <= minValue ? void 0 : idProp
3956
- }
3957
- ),
3958
- withInput ? /* @__PURE__ */ jsx(
3959
- chakra.input,
3960
- {
3961
- min: minValue,
3962
- max: maxValue,
3963
- name: nameProp,
3964
- value,
3965
- disabled,
3966
- id: !showZero && value === 0 ? void 0 : idProp,
3967
- css: styles.input,
3968
- width: `${Math.max(value.toString().length + 1, 3)}ch`,
3969
- visibility: !showZero && value === 0 ? "hidden" : "visible",
3970
- "aria-live": "assertive",
3971
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts13.currentNumberAriaLabel(ariaLabelContext.plural)),
3972
- onChange: (e) => {
3973
- const numericInput = Number(e.target.value);
3974
- if (Number.isNaN(numericInput)) {
3975
- return;
3976
- }
3977
- onChange(Math.max(Math.min(numericInput, maxValue), minValue));
3978
- if (!showZero && Math.max(Math.min(numericInput, maxValue), minValue) === 0) {
3979
- focusOnAddButton();
3980
- }
3865
+ ariaLabelContext = { singular: "", plural: "" },
3866
+ ...rest
3867
+ } = props;
3868
+ const addButtonRef = useRef(null);
3869
+ const { t } = useTranslation();
3870
+ const recipe = useSlotRecipe({ recipe: numericStepperRecipe });
3871
+ const styles = recipe();
3872
+ const [value, onChange] = useControllableState({
3873
+ value: valueProp,
3874
+ onChange: onChangeProp,
3875
+ defaultValue
3876
+ });
3877
+ const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
3878
+ const focusOnAddButton = () => {
3879
+ var _a5;
3880
+ (_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
3881
+ };
3882
+ return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, children: [
3883
+ /* @__PURE__ */ jsx(
3884
+ VerySmallButton,
3885
+ {
3886
+ icon: /* @__PURE__ */ jsx(SubtractIcon, { stepLabel: clampedStepSize }),
3887
+ "aria-label": t(
3888
+ texts13.decrementButtonAriaLabel(
3889
+ clampedStepSize,
3890
+ stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
3891
+ )
3892
+ ),
3893
+ onClick: () => {
3894
+ onChange(Math.max(value - clampedStepSize, minValue));
3895
+ if (Math.max(value - clampedStepSize, minValue) <= minValue) {
3896
+ focusOnAddButton();
3897
+ }
3898
+ },
3899
+ visibility: value <= minValue ? "hidden" : "visible",
3900
+ disabled,
3901
+ id: value <= minValue ? void 0 : idProp
3902
+ }
3903
+ ),
3904
+ withInput ? /* @__PURE__ */ jsx(
3905
+ Input$1,
3906
+ {
3907
+ min: minValue,
3908
+ max: maxValue,
3909
+ name: nameProp,
3910
+ value,
3911
+ disabled,
3912
+ id: !showZero && value === 0 ? void 0 : idProp,
3913
+ css: styles.input,
3914
+ width: `${Math.max(value.toString().length + 1, 3)}ch`,
3915
+ visibility: !showZero && value === 0 ? "hidden" : "visible",
3916
+ "aria-live": "assertive",
3917
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts13.currentNumberAriaLabel(ariaLabelContext.plural)),
3918
+ onChange: (e) => {
3919
+ const numericInput = Number(e.target.value);
3920
+ if (Number.isNaN(numericInput)) {
3921
+ return;
3922
+ }
3923
+ onChange(Math.max(Math.min(numericInput, maxValue), minValue));
3924
+ if (!showZero && Math.max(Math.min(numericInput, maxValue), minValue) === 0) {
3925
+ focusOnAddButton();
3981
3926
  }
3982
3927
  }
3983
- ) : /* @__PURE__ */ jsx(
3984
- chakra.text,
3985
- {
3986
- css: styles,
3987
- visibility: !showZero && value === 0 ? "hidden" : "visible",
3988
- "aria-live": "assertive",
3989
- "aria-label": ariaLabelContext.plural === "" ? "" : t(texts13.currentNumberAriaLabel(ariaLabelContext.plural)),
3990
- children: value
3991
- }
3992
- ),
3993
- /* @__PURE__ */ jsx(
3994
- VerySmallButton,
3995
- {
3996
- ref: addButtonRef,
3997
- icon: /* @__PURE__ */ jsx(AddIcon, { stepLabel: clampedStepSize }),
3998
- "aria-label": t(
3999
- texts13.incrementButtonAriaLabel(
4000
- clampedStepSize,
4001
- stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
4002
- )
4003
- ),
4004
- onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
4005
- visibility: value >= maxValue ? "hidden" : "visible",
4006
- disabled,
4007
- id: value >= maxValue ? void 0 : idProp
4008
- }
4009
- )
4010
- ] });
4011
- }
4012
- );
3928
+ }
3929
+ ) : /* @__PURE__ */ jsx(
3930
+ chakra.text,
3931
+ {
3932
+ css: styles,
3933
+ visibility: !showZero && value === 0 ? "hidden" : "visible",
3934
+ "aria-live": "assertive",
3935
+ "aria-label": ariaLabelContext.plural === "" ? "" : t(texts13.currentNumberAriaLabel(ariaLabelContext.plural)),
3936
+ children: value
3937
+ }
3938
+ ),
3939
+ /* @__PURE__ */ jsx(
3940
+ VerySmallButton,
3941
+ {
3942
+ ref: addButtonRef,
3943
+ icon: /* @__PURE__ */ jsx(AddIcon, { stepLabel: clampedStepSize }),
3944
+ "aria-label": t(
3945
+ texts13.incrementButtonAriaLabel(
3946
+ clampedStepSize,
3947
+ stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
3948
+ )
3949
+ ),
3950
+ onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
3951
+ visibility: value >= maxValue ? "hidden" : "visible",
3952
+ disabled,
3953
+ id: value >= maxValue ? void 0 : idProp
3954
+ }
3955
+ )
3956
+ ] });
3957
+ });
4013
3958
  NumericStepper.displayName = "NumericStepper";
4014
3959
  var VerySmallButton = React28__default.forwardRef((props, ref) => {
4015
3960
  const recipe = useSlotRecipe({ recipe: numericStepperRecipe });
@@ -4375,10 +4320,19 @@ var texts17 = createTexts({
4375
4320
  });
4376
4321
  var Select = React28.forwardRef(
4377
4322
  (props, ref) => {
4378
- const { variant = "core", children, positioning, label, ...rest } = props;
4323
+ const {
4324
+ variant = "core",
4325
+ children,
4326
+ positioning,
4327
+ label,
4328
+ errorText,
4329
+ invalid,
4330
+ helperText,
4331
+ ...rest
4332
+ } = props;
4379
4333
  const recipe = useSlotRecipe({ key: "select" });
4380
4334
  const styles = recipe({ variant });
4381
- return /* @__PURE__ */ jsxs(
4335
+ return /* @__PURE__ */ jsx(Field3, { errorText, invalid, helperText, children: /* @__PURE__ */ jsxs(
4382
4336
  Select$1.Root,
4383
4337
  {
4384
4338
  ...rest,
@@ -4393,7 +4347,7 @@ var Select = React28.forwardRef(
4393
4347
  /* @__PURE__ */ jsx(SelectContent, { css: styles.selectContent, children })
4394
4348
  ]
4395
4349
  }
4396
- );
4350
+ ) });
4397
4351
  }
4398
4352
  );
4399
4353
  Select.displayName = "Select";
@@ -4472,23 +4426,40 @@ var SelectLabel = Select$1.Label;
4472
4426
  var SelectItemText = Select$1.ItemText;
4473
4427
  var SelectRoot = Select$1.Root;
4474
4428
  var Switch = forwardRef((props) => {
4475
- const { rootRef, size = "md", label, ...rest } = props;
4429
+ const {
4430
+ rootRef,
4431
+ size = "md",
4432
+ label,
4433
+ invalid,
4434
+ errorText,
4435
+ helperText,
4436
+ ...rest
4437
+ } = props;
4476
4438
  const recipe = useSlotRecipe({ key: "switch" });
4477
4439
  const styles = recipe({ size });
4478
- return /* @__PURE__ */ jsx(Field, { style: { width: "auto" }, children: /* @__PURE__ */ jsxs(
4479
- Switch$1.Root,
4440
+ return /* @__PURE__ */ jsx(
4441
+ Field3,
4480
4442
  {
4481
- ref: rootRef,
4482
- ...rest,
4483
- checked: props.checked,
4484
- css: styles.root,
4485
- children: [
4486
- /* @__PURE__ */ jsx(Switch$1.Label, { children: label }),
4487
- /* @__PURE__ */ jsx(Switch$1.HiddenInput, {}),
4488
- /* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) })
4489
- ]
4443
+ style: { width: "auto" },
4444
+ invalid,
4445
+ errorText,
4446
+ helperText,
4447
+ children: /* @__PURE__ */ jsxs(
4448
+ Switch$1.Root,
4449
+ {
4450
+ ref: rootRef,
4451
+ ...rest,
4452
+ checked: props.checked,
4453
+ css: styles.root,
4454
+ children: [
4455
+ /* @__PURE__ */ jsx(Switch$1.Label, { children: label }),
4456
+ /* @__PURE__ */ jsx(Switch$1.HiddenInput, {}),
4457
+ /* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) })
4458
+ ]
4459
+ }
4460
+ )
4490
4461
  }
4491
- ) });
4462
+ );
4492
4463
  });
4493
4464
  Switch.displayName = "Switch";
4494
4465
  var useLabelHeight = (label) => {
@@ -4520,7 +4491,7 @@ var Textarea = forwardRef(
4520
4491
  const recipe = useRecipe({ key: "textarea" });
4521
4492
  const styles = recipe({ variant });
4522
4493
  const { labelRef, labelHeight } = useLabelHeight(label);
4523
- return /* @__PURE__ */ jsxs(Field, { ...fieldProps, position: "relative", children: [
4494
+ return /* @__PURE__ */ jsxs(Field3, { ...fieldProps, position: "relative", children: [
4524
4495
  /* @__PURE__ */ jsx(
4525
4496
  Textarea$1,
4526
4497
  {
@@ -4532,7 +4503,7 @@ var Textarea = forwardRef(
4532
4503
  placeholder: " "
4533
4504
  }
4534
4505
  ),
4535
- /* @__PURE__ */ jsx(FieldLabel$1, { ref: labelRef, children: label })
4506
+ /* @__PURE__ */ jsx(FloatingLabel, { ref: labelRef, children: label })
4536
4507
  ] });
4537
4508
  }
4538
4509
  );
@@ -7497,6 +7468,170 @@ var checkboxSlotRecipe = defineSlotRecipe({
7497
7468
  }
7498
7469
  }
7499
7470
  });
7471
+ var choiceChipSlotRecipe = defineSlotRecipe({
7472
+ slots: checkboxCardAnatomy.keys(),
7473
+ className: "chakra-checkbox-card",
7474
+ base: {
7475
+ root: {
7476
+ display: "inline-flex",
7477
+ alignItems: "center",
7478
+ boxAlign: "center",
7479
+ fontSize: "xs",
7480
+ cursor: "pointer",
7481
+ transitionProperty: "all",
7482
+ borderRadius: "xl",
7483
+ transitionDuration: "fast",
7484
+ paddingInlineStart: "2",
7485
+ paddingInlineEnd: "2",
7486
+ outline: "1px solid",
7487
+ outlineColor: "base.outline",
7488
+ _checked: {
7489
+ backgroundColor: "brand.surface",
7490
+ borderRadius: "sm",
7491
+ outline: "none",
7492
+ color: "brand.text",
7493
+ _hover: {
7494
+ backgroundColor: "brand.surface.hover",
7495
+ _active: {
7496
+ backgroundColor: "brand.surface.active"
7497
+ }
7498
+ }
7499
+ },
7500
+ _focusVisible: {
7501
+ outline: "2px solid",
7502
+ outlineColor: "outline.focus",
7503
+ outlineOffset: "1px"
7504
+ },
7505
+ _disabled: {
7506
+ pointerEvents: "none",
7507
+ boxShadow: "none",
7508
+ backgroundColor: "surface.disabled",
7509
+ color: "text.disabled",
7510
+ outline: "none",
7511
+ _hover: {
7512
+ backgroundColor: "core.surface.disabled",
7513
+ boxShadow: "none",
7514
+ color: "core.text.disabled"
7515
+ },
7516
+ _checked: {
7517
+ cursor: "not-allowed",
7518
+ boxShadow: "none",
7519
+ color: "core.text.disabled",
7520
+ backgroundColor: "core.surface.disabled",
7521
+ _hover: {
7522
+ backgroundColor: "core.surface.disabled",
7523
+ boxShadow: "none",
7524
+ color: "core.text.disabled"
7525
+ }
7526
+ }
7527
+ }
7528
+ },
7529
+ label: {
7530
+ display: "flex",
7531
+ alignItems: "center",
7532
+ fontSize: "xs"
7533
+ }
7534
+ },
7535
+ variants: {
7536
+ size: {
7537
+ xs: {
7538
+ root: {
7539
+ _checked: {
7540
+ borderRadius: "0.563rem"
7541
+ },
7542
+ height: 5,
7543
+ paddingX: 1.5
7544
+ }
7545
+ },
7546
+ sm: {
7547
+ root: {
7548
+ _checked: {
7549
+ borderRadius: "sm"
7550
+ },
7551
+ height: 6,
7552
+ paddingX: 2
7553
+ }
7554
+ },
7555
+ md: {
7556
+ root: {
7557
+ _checked: {
7558
+ borderRadius: "sm"
7559
+ },
7560
+ height: 7,
7561
+ paddingX: 2
7562
+ }
7563
+ },
7564
+ lg: {
7565
+ root: {
7566
+ _checked: {
7567
+ borderRadius: "md"
7568
+ },
7569
+ height: 8,
7570
+ paddingX: 3
7571
+ }
7572
+ }
7573
+ },
7574
+ variant: {
7575
+ core: {
7576
+ root: {
7577
+ color: "core.text",
7578
+ outlineColor: "core.outline",
7579
+ _hover: {
7580
+ outline: "2px solid",
7581
+ outlineColor: "core.outline.hover",
7582
+ _active: {
7583
+ outline: "1px solid",
7584
+ outlineColor: "core.outline",
7585
+ backgroundColor: "core.surface.active"
7586
+ }
7587
+ }
7588
+ }
7589
+ },
7590
+ accent: {
7591
+ root: {
7592
+ backgroundColor: "accent.surface",
7593
+ color: "accent.text",
7594
+ outline: "none",
7595
+ _hover: {
7596
+ backgroundColor: "accent.surface.hover",
7597
+ _active: {
7598
+ backgroundColor: "accent.surface.active"
7599
+ }
7600
+ }
7601
+ }
7602
+ },
7603
+ floating: {
7604
+ root: {
7605
+ backgroundColor: "floating.surface",
7606
+ outline: "1px solid",
7607
+ outlineColor: "floating.outline",
7608
+ color: "floating.text",
7609
+ boxShadow: "sm",
7610
+ _hover: {
7611
+ backgroundColor: "floating.surface.hover",
7612
+ outline: "1px solid",
7613
+ outlineColor: "floating.outline.hover",
7614
+ _active: {
7615
+ backgroundColor: "floating.surface.active",
7616
+ outline: "1px solid",
7617
+ outlineColor: "floating.outline"
7618
+ }
7619
+ }
7620
+ }
7621
+ }
7622
+ },
7623
+ chipType: {
7624
+ icon: {},
7625
+ choice: {},
7626
+ filter: {}
7627
+ }
7628
+ },
7629
+ defaultVariants: {
7630
+ size: "md",
7631
+ variant: "core",
7632
+ chipType: "choice"
7633
+ }
7634
+ });
7500
7635
  var dialogSlotRecipe = defineSlotRecipe({
7501
7636
  slots: dialogAnatomy.keys(),
7502
7637
  className: "spor-dialog",
@@ -7919,33 +8054,6 @@ var fieldSlotRecipe = defineSlotRecipe({
7919
8054
  position: "relative",
7920
8055
  flexDirection: "column"
7921
8056
  },
7922
- label: {
7923
- /* For when input is filled */
7924
- pos: "absolute",
7925
- paddingX: 3,
7926
- top: "0.3rem",
7927
- fontWeight: "normal",
7928
- fontSize: ["mobile.xs", "desktop.xs"],
7929
- color: "text",
7930
- pointerEvents: "none",
7931
- transition: "position",
7932
- zIndex: "docked",
7933
- _peerPlaceholderShown: {
7934
- /* For when input is not in focus */
7935
- top: "0.9rem",
7936
- color: "text",
7937
- fontSize: ["mobile.sm", "desktop.sm"]
7938
- },
7939
- _peerFocusVisible: {
7940
- /* For when input is in focus */
7941
- fontSize: ["mobile.xs", "desktop.xs"],
7942
- color: "text",
7943
- top: "0.3rem"
7944
- },
7945
- _disabled: {
7946
- opacity: 0.4
7947
- }
7948
- },
7949
8057
  requiredIndicator: {
7950
8058
  marginStart: 1,
7951
8059
  color: "brightRed"
@@ -7965,7 +8073,7 @@ var fieldSlotRecipe = defineSlotRecipe({
7965
8073
  textStyle: "xs",
7966
8074
  width: "fit-content",
7967
8075
  position: "absolute",
7968
- bottom: -4,
8076
+ bottom: -5,
7969
8077
  left: 3,
7970
8078
  zIndex: "dropdown",
7971
8079
  maxWidth: "50ch",
@@ -9211,6 +9319,10 @@ var selectSlotRecipe = defineSlotRecipe({
9211
9319
  },
9212
9320
  _open: {
9213
9321
  borderBottomRadius: 0
9322
+ },
9323
+ _invalid: {
9324
+ outline: "2px solid",
9325
+ outlineColor: "outline.error"
9214
9326
  }
9215
9327
  },
9216
9328
  itemText: {
@@ -9245,10 +9357,6 @@ var selectSlotRecipe = defineSlotRecipe({
9245
9357
  _active: {
9246
9358
  backgroundColor: "brand.surface.active"
9247
9359
  },
9248
- _invalid: {
9249
- outline: "2px solid",
9250
- outlineColor: "outline.error"
9251
- },
9252
9360
  _disabled: {
9253
9361
  pointerEvents: "none",
9254
9362
  color: "text.disabled",
@@ -9819,7 +9927,8 @@ var slotRecipes = {
9819
9927
  table: tableSlotRecipe,
9820
9928
  tabs: tabsSlotRecipe,
9821
9929
  travelTag: travelTagSlotRecipe,
9822
- toast: toastSlotRecipe
9930
+ toast: toastSlotRecipe,
9931
+ checkboxCard: choiceChipSlotRecipe
9823
9932
  };
9824
9933
  var animations = defineTokens.animations({
9825
9934
  spin: {
@@ -10637,6 +10746,6 @@ var themes = {
10637
10746
  };
10638
10747
  var system = themes["VyDigital" /* VyDigital */];
10639
10748
 
10640
- export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Badge, Brand, Breadcrumb, Button, ButtonGroup, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useColorMode, useColorModeValue, useTranslation };
10749
+ export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Badge, Brand, Breadcrumb, Button, ButtonGroup, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useColorMode, useColorModeValue, useTranslation };
10641
10750
  //# sourceMappingURL=out.js.map
10642
10751
  //# sourceMappingURL=index.mjs.map