@vygruppen/spor-react 9.8.3 → 9.10.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.
@@ -1,7 +1,7 @@
1
1
  import tokens11__default from '@vygruppen/spor-design-tokens';
2
2
  import * as tokens11 from '@vygruppen/spor-design-tokens';
3
3
  export { tokens11 as tokens };
4
- import { forwardRef, Divider as Divider$1, Stack as Stack$1, useRadio, useStyleConfig, chakra, Box, Card, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Center, Flex, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, useMultiStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, useFormControlContext, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, Button as Button$1, useControllableState, Radio as Radio$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Textarea as Textarea$1, Link, ModalHeader as ModalHeader$1, useModalContext, DrawerContent as DrawerContent$1, Tabs as Tabs$1, Table as Table$1, defineStyleConfig as defineStyleConfig$1, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, useRadioGroup, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, useColorMode, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, useColorModeValue, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerBody, DrawerHeader, useMediaQuery, DrawerCloseButton, DarkMode, PopoverCloseButton, usePopoverContext, UnorderedList, ChakraProvider, useToast as useToast$1, useInterval } from '@chakra-ui/react';
4
+ import { forwardRef, Divider as Divider$1, Stack as Stack$1, useMultiStyleConfig, Box, chakra, useStyleConfig, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Center, Flex, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, useFormControlContext, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, Button as Button$1, useControllableState, Radio as Radio$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Textarea as Textarea$1, Link, ModalHeader as ModalHeader$1, useModalContext, DrawerContent as DrawerContent$1, Tabs as Tabs$1, Table as Table$1, defineStyleConfig as defineStyleConfig$1, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, useRadioGroup, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, useColorMode, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, useColorModeValue, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerBody, DrawerHeader, useMediaQuery, DrawerCloseButton, DarkMode, PopoverCloseButton, usePopoverContext, UnorderedList, ChakraProvider, useToast as useToast$1, useInterval } from '@chakra-ui/react';
5
5
  export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Collapse, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, OrderedList, Portal, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, defineStyleConfig, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
6
6
  import * as React73 from 'react';
7
7
  import React73__default, { useId, createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, Suspense, useContext, useCallback, useMemo, useLayoutEffect } from 'react';
@@ -778,39 +778,34 @@ var Stack = forwardRef(
778
778
  return /* @__PURE__ */ React73__default.createElement(Stack$1, { ...props, direction: flexDirection, ref });
779
779
  }
780
780
  );
781
-
782
- // ../../node_modules/@chakra-ui/utils/dist/chunk-O3SWHQEE.mjs
783
- var dataAttr = (condition) => condition ? "" : void 0;
784
781
  var RadioCard = forwardRef(
785
- ({ children, variant = "base", ...props }, ref) => {
786
- const { getInputProps, getRadioProps, getRootProps, state: state2 } = useRadio(props);
787
- const styles3 = useStyleConfig("RadioCard", { variant });
788
- const input = getInputProps({}, ref);
789
- const radio = getRadioProps();
782
+ ({ children, variant = "base", isChecked, onChange, ...props }, ref) => {
783
+ const styles3 = useMultiStyleConfig("RadioCard", { variant });
790
784
  const id = `radio-card-${useId()}`;
791
- return /* @__PURE__ */ React73__default.createElement(
792
- chakra.label,
785
+ const handleChange = (event) => {
786
+ onChange && onChange(event);
787
+ };
788
+ return /* @__PURE__ */ React73__default.createElement(Box, { as: "label", htmlFor: id, "aria-label": String(children), ref }, /* @__PURE__ */ React73__default.createElement(
789
+ chakra.input,
793
790
  {
794
- htmlFor: id,
795
- ...getRootProps(),
796
- "aria-label": String(children)
791
+ type: "radio",
792
+ id,
793
+ checked: isChecked,
794
+ onChange: handleChange,
795
+ ...props,
796
+ sx: styles3.radioInput
797
+ }
798
+ ), /* @__PURE__ */ React73__default.createElement(
799
+ Box,
800
+ {
801
+ ...props,
802
+ __css: {
803
+ ...styles3.container,
804
+ ...isChecked && styles3.checked
805
+ }
797
806
  },
798
- /* @__PURE__ */ React73__default.createElement(chakra.input, { ...input, id, disabled: state2.isDisabled }),
799
- /* @__PURE__ */ React73__default.createElement(
800
- chakra.div,
801
- {
802
- __css: styles3,
803
- ...radio,
804
- "data-checked": dataAttr(state2.isChecked),
805
- "data-hover": dataAttr(state2.isHovered),
806
- "data-focus": dataAttr(state2.isFocused),
807
- "data-active": dataAttr(state2.isActive),
808
- "data-disabled": dataAttr(state2.isDisabled),
809
- ...props
810
- },
811
- children
812
- )
813
- );
807
+ children
808
+ ));
814
809
  }
815
810
  );
816
811
  var RadioCardGroup = ({
@@ -828,14 +823,18 @@ var RadioCardGroup = ({
828
823
  onChange,
829
824
  ...props
830
825
  });
831
- const group = getRootProps();
832
- return /* @__PURE__ */ React73__default.createElement(Stack$1, { direction: direction2, ...group }, recursiveMap(children, (child) => {
826
+ const rootProps = getRootProps();
827
+ return /* @__PURE__ */ React73__default.createElement(Stack$1, { direction: direction2, ...rootProps }, recursiveMap(children, (child) => {
833
828
  if (child.type === RadioCard) {
834
- const radio = getRadioProps({ value: child.props.value });
829
+ const radioProps = getRadioProps({ value: child.props.value });
835
830
  const variantValue = variant;
836
831
  return React73__default.cloneElement(
837
832
  child,
838
- { ...radio, variant: variantValue, ...props }
833
+ {
834
+ ...radioProps,
835
+ variant: variantValue,
836
+ ...props
837
+ }
839
838
  );
840
839
  }
841
840
  return child;
@@ -859,11 +858,11 @@ var StaticCard = forwardRef(
859
858
  const styles3 = useStyleConfig("StaticCard", {
860
859
  colorScheme
861
860
  });
862
- return /* @__PURE__ */ React73__default.createElement(Box, { __css: styles3, ...props, ref }, children, /* @__PURE__ */ React73__default.createElement(Card, null));
861
+ return /* @__PURE__ */ React73__default.createElement(Box, { __css: styles3, ...props, ref }, children);
863
862
  }
864
863
  );
865
864
  var PressableCard = forwardRef(
866
- ({ children, variant = "base", ...props }, ref) => {
865
+ ({ children, variant = "floating", ...props }, ref) => {
867
866
  const styles3 = useStyleConfig("PressableCard", {
868
867
  variant
869
868
  });
@@ -1546,6 +1545,7 @@ var BaseAlert = ({
1546
1545
  // src/alert/ClosableAlert.tsx
1547
1546
  var ClosableAlert = ({
1548
1547
  variant,
1548
+ title,
1549
1549
  children,
1550
1550
  onClose: externalOnClose = () => {
1551
1551
  }
@@ -1570,7 +1570,7 @@ var ClosableAlert = ({
1570
1570
  "aria-label": t2(texts6.close),
1571
1571
  sx: styles3.closeButton
1572
1572
  }
1573
- ), /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant }), children);
1573
+ ), /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React73__default.createElement(Flex, { direction: "column", gap: title ? 2 : void 0, textAlign: "left" }, title && /* @__PURE__ */ React73__default.createElement(Box, { fontWeight: "bold" }, title), /* @__PURE__ */ React73__default.createElement(Box, { marginRight: 1 }, children)));
1574
1574
  };
1575
1575
  var texts6 = createTexts({
1576
1576
  close: {
@@ -1616,16 +1616,21 @@ var ExpandableAlert = ({
1616
1616
  overflow: "hidden",
1617
1617
  "-webkit-line-clamp": "1",
1618
1618
  "-webkit-box-orient": "vertical"
1619
- }
1619
+ },
1620
+ color: "darkGrey"
1620
1621
  },
1621
1622
  title
1622
1623
  )),
1623
- /* @__PURE__ */ React73__default.createElement(AccordionIcon, null)
1624
+ /* @__PURE__ */ React73__default.createElement(AccordionIcon, { color: "darkGrey" })
1624
1625
  )), /* @__PURE__ */ React73__default.createElement(AccordionPanel, null, children))
1625
1626
  ));
1626
1627
  };
1627
- var StaticAlert = ({ children, ...props }) => {
1628
- return /* @__PURE__ */ React73__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant: props.variant }), children);
1628
+ var StaticAlert = ({
1629
+ children,
1630
+ title,
1631
+ ...props
1632
+ }) => {
1633
+ return /* @__PURE__ */ React73__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant: props.variant }), /* @__PURE__ */ React73__default.createElement(Flex, { direction: "column", gap: title ? 2 : void 0, textAlign: "left" }, title && /* @__PURE__ */ React73__default.createElement(Box, { fontWeight: "bold" }, title), /* @__PURE__ */ React73__default.createElement(Box, null, children)));
1629
1634
  };
1630
1635
  var Breadcrumb = (props) => {
1631
1636
  const iconColor = useColorModeValue("blackAlpha.400", "whiteAlpha.400");
@@ -2685,6 +2690,9 @@ var CheckboxGroup = ({
2685
2690
  }) => {
2686
2691
  return /* @__PURE__ */ React73__default.createElement(CheckboxGroup$1, { ...props }, /* @__PURE__ */ React73__default.createElement(Stack$1, { direction: direction2 }, children));
2687
2692
  };
2693
+
2694
+ // ../../node_modules/@chakra-ui/utils/dist/chunk-O3SWHQEE.mjs
2695
+ var dataAttr = (condition) => condition ? "" : void 0;
2688
2696
  var ChoiceChip = forwardRef((props, ref) => {
2689
2697
  const {
2690
2698
  children,
@@ -3046,13 +3054,11 @@ function ListBoxSection({ section, state: state2 }) {
3046
3054
  // src/input/InfoSelect.tsx
3047
3055
  function InfoSelect({
3048
3056
  placeholder,
3049
- width = "100%",
3050
- height = "auto",
3051
3057
  onChange,
3052
3058
  value,
3053
3059
  isLabelSrOnly,
3054
3060
  defaultValue,
3055
- variant = "base",
3061
+ variant,
3056
3062
  ...props
3057
3063
  }) {
3058
3064
  const renamedProps = {
@@ -3079,7 +3085,8 @@ function InfoSelect({
3079
3085
  const { buttonProps } = useButton(triggerProps, triggerRef);
3080
3086
  const { t: t2 } = useTranslation();
3081
3087
  const formControl = useFormControlProps(props);
3082
- return /* @__PURE__ */ React73__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React73__default.createElement(chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React73__default.createElement(
3088
+ const hasChosenValue = state2.selectedItem !== null;
3089
+ return /* @__PURE__ */ React73__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React73__default.createElement(
3083
3090
  HiddenSelect,
3084
3091
  {
3085
3092
  state: state2,
@@ -3094,13 +3101,36 @@ function InfoSelect({
3094
3101
  ref: triggerRef,
3095
3102
  sx: styles3.button,
3096
3103
  ...buttonProps,
3097
- width,
3098
- height,
3099
3104
  "data-attachable": true,
3100
3105
  "aria-invalid": formControl.isInvalid,
3101
3106
  "aria-describedby": formControl["aria-describedby"]
3102
3107
  },
3103
- /* @__PURE__ */ React73__default.createElement(Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
3108
+ /* @__PURE__ */ React73__default.createElement(chakra.div, { sx: styles3.innerButton }, /* @__PURE__ */ React73__default.createElement(
3109
+ chakra.div,
3110
+ {
3111
+ ...labelProps,
3112
+ sx: {
3113
+ ...styles3.label,
3114
+ ...hasChosenValue && {
3115
+ transform: "scale(0.825) translateY(-10px) translateX(-10%)",
3116
+ transitionProperty: "var(--spor-transition-property-common)",
3117
+ transitionDuration: "var(--spor-transition-duration-normal)"
3118
+ }
3119
+ }
3120
+ },
3121
+ props.label
3122
+ ), /* @__PURE__ */ React73__default.createElement(
3123
+ Box,
3124
+ {
3125
+ ...valueProps,
3126
+ h: !hasChosenValue ? "0px" : "18px",
3127
+ hidden: !hasChosenValue,
3128
+ transform: "scale(1) translateY(-10px)",
3129
+ transitionProperty: "var(--spor-transition-property-common)",
3130
+ transitionDuration: "var(--spor-transition-duration-normal)"
3131
+ },
3132
+ state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)
3133
+ )),
3104
3134
  /* @__PURE__ */ React73__default.createElement(Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React73__default.createElement(DropdownUpFill24Icon, null) : /* @__PURE__ */ React73__default.createElement(DropdownDownFill24Icon, null))
3105
3135
  ), state2.isOpen && /* @__PURE__ */ React73__default.createElement(
3106
3136
  Popover3,
@@ -3445,7 +3475,7 @@ var texts14 = createTexts({
3445
3475
  sv: "Telefonnummer"
3446
3476
  }
3447
3477
  });
3448
- var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-C2XKHNTP.mjs'));
3478
+ var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-FVCL47RT.mjs'));
3449
3479
  var Radio = forwardRef((props, ref) => {
3450
3480
  return /* @__PURE__ */ React73__default.createElement(Radio$1, { ...props, ref });
3451
3481
  });
@@ -6486,13 +6516,13 @@ function defineStyle(styles3) {
6486
6516
  function defineStyleConfig(config45) {
6487
6517
  return config45;
6488
6518
  }
6489
- function createMultiStyleConfigHelpers(parts19) {
6519
+ function createMultiStyleConfigHelpers(parts20) {
6490
6520
  return {
6491
6521
  definePartsStyle(config45) {
6492
6522
  return config45;
6493
6523
  },
6494
6524
  defineMultiStyleConfig(config45) {
6495
- return { parts: parts19, ...config45 };
6525
+ return { parts: parts20, ...config45 };
6496
6526
  }
6497
6527
  };
6498
6528
  }
@@ -6655,7 +6685,7 @@ function anatomy(name, map = {}) {
6655
6685
  "[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?"
6656
6686
  );
6657
6687
  }
6658
- function parts19(...values) {
6688
+ function parts20(...values) {
6659
6689
  assert();
6660
6690
  for (const part of values) {
6661
6691
  map[part] = toPart(part);
@@ -6695,7 +6725,7 @@ function anatomy(name, map = {}) {
6695
6725
  }
6696
6726
  const __type = {};
6697
6727
  return {
6698
- parts: parts19,
6728
+ parts: parts20,
6699
6729
  toPart,
6700
6730
  extend,
6701
6731
  selectors,
@@ -9908,8 +9938,11 @@ function baseBorder(state2, props) {
9908
9938
  }
9909
9939
  case "active": {
9910
9940
  return {
9911
- outline: "2px solid",
9912
- outlineColor: mode("base.outline.light", "base.outline.dark")(props)
9941
+ outline: "1px solid",
9942
+ outlineColor: mode(
9943
+ "base.outline.default.light",
9944
+ "base.outline.default.dark"
9945
+ )(props)
9913
9946
  };
9914
9947
  }
9915
9948
  case "invalid": {
@@ -9960,14 +9993,14 @@ function floatingBackground(state2, props) {
9960
9993
  return {
9961
9994
  backgroundColor: mode(
9962
9995
  "floating.surface.hover.light",
9963
- "floating.surface.hover.dark"
9996
+ `color-mix(in srgb, white 10%, var(--spor-colors-bg-default-dark))`
9964
9997
  )(props)
9965
9998
  };
9966
9999
  case "default":
9967
10000
  return {
9968
10001
  backgroundColor: mode(
9969
- "floating.surface.default.light",
9970
- "floating.surface.default.dark"
10002
+ "white",
10003
+ `color-mix(in srgb, white 10%, var(--spor-colors-bg-default-dark))`
9971
10004
  )(props)
9972
10005
  };
9973
10006
  }
@@ -10024,7 +10057,10 @@ function ghostBackground(state2, props) {
10024
10057
  };
10025
10058
  case "selected": {
10026
10059
  return {
10027
- backgroundColor: mode("mint", "whiteAlpha.200")(props)
10060
+ backgroundColor: mode(
10061
+ "ghost.surface.selected.light",
10062
+ "ghost.surface.selected.dark"
10063
+ )(props)
10028
10064
  };
10029
10065
  }
10030
10066
  case "default":
@@ -10033,6 +10069,18 @@ function ghostBackground(state2, props) {
10033
10069
  };
10034
10070
  }
10035
10071
  }
10072
+ function ghostText(state2, props) {
10073
+ switch (state2) {
10074
+ case "selected":
10075
+ return {
10076
+ color: mode("ghost.text.light", "ghost.text.dark")(props)
10077
+ };
10078
+ default:
10079
+ return {
10080
+ color: mode("ghost.text.light", "ghost.text.dark")(props)
10081
+ };
10082
+ }
10083
+ }
10036
10084
 
10037
10085
  // src/theme/components/accordion.ts
10038
10086
  var helpers = createMultiStyleConfigHelpers(accordionAnatomy.keys);
@@ -10182,7 +10230,8 @@ var config3 = helpers2.defineMultiStyleConfig({
10182
10230
  closeButton: {
10183
10231
  position: "absolute",
10184
10232
  top: 1,
10185
- right: 1
10233
+ right: 1,
10234
+ color: "darkGrey"
10186
10235
  }
10187
10236
  },
10188
10237
  variants: {
@@ -11869,18 +11918,28 @@ var config19 = helpers11.defineMultiStyleConfig({
11869
11918
  container: {},
11870
11919
  label: {
11871
11920
  position: "relative",
11921
+ fontSize: ["mobile.xs", "desktop.sm"],
11872
11922
  ...props.isLabelSrOnly ? srOnly2 : {}
11873
11923
  },
11924
+ innerButton: {
11925
+ display: "flex",
11926
+ flexDir: "column",
11927
+ alignItems: "start",
11928
+ justifyContent: "start"
11929
+ },
11874
11930
  button: {
11931
+ display: "flex",
11875
11932
  appearance: "none",
11933
+ width: "100%",
11934
+ height: "54px",
11876
11935
  borderTopRadius: "sm",
11877
11936
  borderBottomRadius: props.isOpen ? 0 : "sm",
11878
11937
  paddingY: 1.5,
11879
11938
  paddingX: 3,
11880
- display: "flex",
11881
11939
  justifyContent: "space-between",
11882
11940
  alignItems: "center",
11883
11941
  fontSize: "mobile.md",
11942
+ h: 8,
11884
11943
  ...baseBorder("default", props),
11885
11944
  _hover: {
11886
11945
  ...baseBorder("hover", props)
@@ -11898,6 +11957,7 @@ var config19 = helpers11.defineMultiStyleConfig({
11898
11957
  ...baseBorder("invalid", props)
11899
11958
  }
11900
11959
  },
11960
+ placeholder: {},
11901
11961
  arrowIcon: {}
11902
11962
  }),
11903
11963
  variants: {
@@ -12527,7 +12587,7 @@ var config25 = helpers16.defineMultiStyleConfig({
12527
12587
  marginY: 1,
12528
12588
  marginX: 1,
12529
12589
  borderRadius: "sm",
12530
- color: mode("darkGrey", "white")(props),
12590
+ ...ghostText("default", props),
12531
12591
  cursor: "pointer",
12532
12592
  outline: "none",
12533
12593
  _active: {
@@ -12540,15 +12600,15 @@ var config25 = helpers16.defineMultiStyleConfig({
12540
12600
  ...ghostBackground("selected", props)
12541
12601
  },
12542
12602
  _selected: {
12543
- ...ghostBackground("selected", props)
12603
+ ...ghostBackground("active", props)
12544
12604
  }
12545
12605
  },
12546
12606
  label: {},
12547
12607
  description: {
12548
12608
  fontSize: ["mobile.xs", "desktop.xs"],
12549
- color: mode("dimGrey", "silver")(props),
12609
+ ...ghostText("default", props),
12550
12610
  "[aria-selected='true'] &": {
12551
- color: mode("lightGrey", "platinum")(props)
12611
+ ...ghostText("selected", props)
12552
12612
  }
12553
12613
  }
12554
12614
  })
@@ -12967,66 +13027,119 @@ var config32 = helpers23.defineMultiStyleConfig({
12967
13027
  }
12968
13028
  });
12969
13029
  var progress_indicator_default = config32;
12970
- var config33 = defineStyleConfig$1({
13030
+ function outlineBorder(state2, props) {
13031
+ switch (state2) {
13032
+ case "error":
13033
+ return {
13034
+ outlineColor: mode("outline.error.light", "outline.error.dark")(props)
13035
+ };
13036
+ case "focus":
13037
+ return {
13038
+ outlineColor: mode("outline.focus.light", "outline.focus.dark")(props)
13039
+ };
13040
+ default:
13041
+ return {
13042
+ outlineColor: mode(
13043
+ "outline.default.light",
13044
+ "outline.default.dark"
13045
+ )(props)
13046
+ };
13047
+ }
13048
+ }
13049
+
13050
+ // src/theme/components/radio-card.ts
13051
+ var parts17 = anatomy$1("radio-card").parts("container", "checked", "radioInput");
13052
+ var helpers24 = createMultiStyleConfigHelpers$1(parts17.keys);
13053
+ var config33 = helpers24.defineMultiStyleConfig({
12971
13054
  baseStyle: (props) => ({
12972
- appearance: "none",
12973
- border: "none",
12974
- overflow: "hidden",
12975
- fontSize: "inherit",
12976
- display: "block",
12977
- borderRadius: "sm",
12978
- ...focusVisibleStyles(props),
12979
- _checked: {
12980
- outline: "1px solid",
12981
- outlineColor: "greenHaze",
12982
- ...floatingBackground("active", props),
12983
- _hover: {
12984
- ...floatingBackground("active", props)
13055
+ container: {
13056
+ appearance: "none",
13057
+ border: "none",
13058
+ overflow: "hidden",
13059
+ fontSize: "inherit",
13060
+ display: "block",
13061
+ cursor: "pointer",
13062
+ borderRadius: "sm",
13063
+ ...focusVisibleStyles(props),
13064
+ transitionProperty: "common",
13065
+ transitionDuration: "fast",
13066
+ _disabled: {
13067
+ pointerEvents: "none",
13068
+ ...baseBackground("disabled", props),
13069
+ ...baseBorder("disabled", props),
13070
+ ...baseText("disabled", props)
12985
13071
  }
12986
13072
  },
12987
- _disabled: {
12988
- pointerEvents: "none",
12989
- ...baseBackground("disabled", props),
12990
- ...baseBorder("disabled", props),
12991
- ...baseText("disabled", props)
13073
+ checked: {
13074
+ outline: "2px solid",
13075
+ ...outlineBorder("focus", props),
13076
+ ...floatingBackground("active", props)
13077
+ },
13078
+ radioInput: {
13079
+ appearance: "none",
13080
+ position: "absolute",
13081
+ opacity: 0,
13082
+ zIndex: -1
12992
13083
  }
12993
13084
  }),
12994
13085
  variants: {
12995
13086
  base: (props) => ({
12996
- ...baseBackground("default", props),
12997
- ...baseBorder("default", props),
12998
- _hover: {
12999
- ...baseBackground("hover", props),
13000
- ...baseBorder("hover", props)
13087
+ container: {
13088
+ ...baseText("default", props),
13089
+ ...baseBackground("default", props),
13090
+ ...baseBorder("default", props),
13091
+ _hover: {
13092
+ ...baseBackground("hover", props),
13093
+ ...baseBorder("hover", props)
13094
+ },
13095
+ _active: {
13096
+ ...baseBackground("active", props),
13097
+ ...baseBorder("active", props)
13098
+ }
13001
13099
  },
13002
- _active: {
13003
- ...baseBackground("active", props)
13100
+ checked: {
13101
+ _hover: {
13102
+ ...baseBorder("hover", props)
13103
+ },
13104
+ _active: {
13105
+ ...baseBackground("active", props),
13106
+ ...baseBorder("active", props)
13107
+ }
13004
13108
  }
13005
13109
  }),
13006
13110
  floating: (props) => ({
13007
- ...floatingBackground("default", props),
13008
- boxShadow: "sm",
13009
- _hover: {
13010
- ...floatingBackground("hover", props),
13011
- ...floatingBorder("hover", props),
13012
- boxShadow: "md"
13013
- },
13014
- _active: {
13015
- ...floatingBackground("active", props),
13016
- ...floatingBorder("active", props)
13111
+ container: {
13112
+ ...baseText("default", props),
13113
+ ...baseBackground("default", props),
13114
+ ...floatingBackground("default", props),
13115
+ ...floatingBorder("default", props),
13116
+ boxShadow: "sm",
13117
+ _hover: {
13118
+ ...floatingBackground("hover", props),
13119
+ ...floatingBorder("hover", props),
13120
+ boxShadow: "md"
13121
+ },
13122
+ _active: {
13123
+ ...floatingBackground("active", props),
13124
+ ...floatingBorder("active", props)
13125
+ }
13017
13126
  },
13018
- _checked: {
13127
+ checked: {
13128
+ cursor: "normal",
13019
13129
  _hover: {
13020
- outline: "1px solid",
13021
- outlineColor: "silver"
13130
+ ...floatingBorder("hover", props)
13131
+ },
13132
+ _active: {
13133
+ ...floatingBackground("active", props),
13134
+ ...floatingBorder("active", props)
13022
13135
  }
13023
13136
  }
13024
13137
  })
13025
13138
  }
13026
13139
  });
13027
13140
  var radio_card_default = config33;
13028
- var helpers24 = createMultiStyleConfigHelpers$1(radioAnatomy.keys);
13029
- var config34 = helpers24.defineMultiStyleConfig({
13141
+ var helpers25 = createMultiStyleConfigHelpers$1(radioAnatomy.keys);
13142
+ var config34 = helpers25.defineMultiStyleConfig({
13030
13143
  baseStyle: (props) => ({
13031
13144
  container: {
13032
13145
  _hover: {
@@ -13080,9 +13193,9 @@ var config34 = helpers24.defineMultiStyleConfig({
13080
13193
  })
13081
13194
  });
13082
13195
  var radio_default = config34;
13083
- var parts17 = selectAnatomy.extend("root");
13084
- var helpers25 = createMultiStyleConfigHelpers$1(parts17.keys);
13085
- var config35 = helpers25.defineMultiStyleConfig({
13196
+ var parts18 = selectAnatomy.extend("root");
13197
+ var helpers26 = createMultiStyleConfigHelpers$1(parts18.keys);
13198
+ var config35 = helpers26.defineMultiStyleConfig({
13086
13199
  baseStyle: (props) => ({
13087
13200
  root: {
13088
13201
  width: "100%",
@@ -13153,7 +13266,7 @@ var config36 = defineStyleConfig$1({
13153
13266
  }
13154
13267
  });
13155
13268
  var skeleton_default = config36;
13156
- var parts18 = anatomy$1("stepper").parts(
13269
+ var parts19 = anatomy$1("stepper").parts(
13157
13270
  "root",
13158
13271
  "container",
13159
13272
  "innerContainer",
@@ -13165,8 +13278,8 @@ var parts18 = anatomy$1("stepper").parts(
13165
13278
  "stepTitle",
13166
13279
  "closeButton"
13167
13280
  );
13168
- var helpers26 = createMultiStyleConfigHelpers$1(parts18.keys);
13169
- var config37 = helpers26.defineMultiStyleConfig({
13281
+ var helpers27 = createMultiStyleConfigHelpers$1(parts19.keys);
13282
+ var config37 = helpers27.defineMultiStyleConfig({
13170
13283
  baseStyle: {
13171
13284
  root: {
13172
13285
  display: "flex",
@@ -13241,8 +13354,8 @@ var $height3 = cssVar$1("switch-track-height");
13241
13354
  var $diff2 = cssVar$1("switch-track-diff");
13242
13355
  var diffValue2 = calc$1.subtract($width2, $height3);
13243
13356
  var $translateX2 = cssVar$1("switch-thumb-x");
13244
- var helpers27 = createMultiStyleConfigHelpers$1(switchAnatomy.keys);
13245
- var config38 = helpers27.defineMultiStyleConfig({
13357
+ var helpers28 = createMultiStyleConfigHelpers$1(switchAnatomy.keys);
13358
+ var config38 = helpers28.defineMultiStyleConfig({
13246
13359
  baseStyle: (props) => ({
13247
13360
  container: {
13248
13361
  [$diff2.variable]: diffValue2,
@@ -13336,13 +13449,13 @@ var config38 = helpers27.defineMultiStyleConfig({
13336
13449
  }
13337
13450
  });
13338
13451
  var switch_default = config38;
13339
- var helpers28 = createMultiStyleConfigHelpers$1(tableAnatomy.keys);
13452
+ var helpers29 = createMultiStyleConfigHelpers$1(tableAnatomy.keys);
13340
13453
  var numericStyles2 = {
13341
13454
  "&[data-is-numeric=true]": {
13342
13455
  textAlign: "end"
13343
13456
  }
13344
13457
  };
13345
- var config39 = helpers28.defineMultiStyleConfig({
13458
+ var config39 = helpers29.defineMultiStyleConfig({
13346
13459
  baseStyle: (props) => ({
13347
13460
  table: {
13348
13461
  borderCollapse: "collapse",
@@ -13489,8 +13602,8 @@ var config39 = helpers28.defineMultiStyleConfig({
13489
13602
  }
13490
13603
  });
13491
13604
  var table_default = config39;
13492
- var helpers29 = createMultiStyleConfigHelpers$1(tabsAnatomy.keys);
13493
- var config40 = helpers29.defineMultiStyleConfig({
13605
+ var helpers30 = createMultiStyleConfigHelpers$1(tabsAnatomy.keys);
13606
+ var config40 = helpers30.defineMultiStyleConfig({
13494
13607
  baseStyle: (props) => ({
13495
13608
  root: {
13496
13609
  display: "flex",
@@ -13725,9 +13838,14 @@ var config44 = defineStyleConfig$1({
13725
13838
  display: "block",
13726
13839
  borderRadius: "md",
13727
13840
  cursor: "pointer",
13728
- ...focusVisibleStyles(props),
13841
+ transitionProperty: "common",
13842
+ transitionDuration: "fast",
13843
+ "button&, a&, label&, &.is-clickable": {
13844
+ ...focusVisibleStyles(props)
13845
+ },
13729
13846
  _disabled: {
13730
13847
  ...baseBackground("disabled", props),
13848
+ ...baseBorder("disabled", props),
13731
13849
  ...baseText("disabled", props),
13732
13850
  outline: "none",
13733
13851
  pointerEvents: "none"
@@ -13735,6 +13853,7 @@ var config44 = defineStyleConfig$1({
13735
13853
  }),
13736
13854
  variants: {
13737
13855
  base: (props) => ({
13856
+ cursor: "pointer",
13738
13857
  ...baseBorder("default", props),
13739
13858
  _hover: {
13740
13859
  ...baseBorder("hover", props)
@@ -13749,7 +13868,7 @@ var config44 = defineStyleConfig$1({
13749
13868
  boxShadow: "sm",
13750
13869
  _hover: {
13751
13870
  ...accentBackground("hover", props),
13752
- boxShadow: "sm"
13871
+ boxShadow: "md"
13753
13872
  },
13754
13873
  _active: {
13755
13874
  ...accentBackground("active", props),
@@ -13758,6 +13877,7 @@ var config44 = defineStyleConfig$1({
13758
13877
  }),
13759
13878
  floating: (props) => ({
13760
13879
  ...floatingBackground("default", props),
13880
+ ...floatingBorder("default", props),
13761
13881
  boxShadow: "sm",
13762
13882
  _hover: {
13763
13883
  ...floatingBackground("hover", props),
@@ -13765,6 +13885,7 @@ var config44 = defineStyleConfig$1({
13765
13885
  boxShadow: "md"
13766
13886
  },
13767
13887
  _active: {
13888
+ ...floatingBorder("default", props),
13768
13889
  ...floatingBackground("active", props),
13769
13890
  boxShadow: "none"
13770
13891
  }