@vygruppen/spor-react 9.8.2 → 9.9.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,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@9.8.2 build
2
+ > @vygruppen/spor-react@9.9.0 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- CJS dist/index.js 508.50 KB
13
- CJS ⚡️ Build success in 2284ms
12
+ CJS dist/index.js 511.25 KB
13
+ CJS ⚡️ Build success in 2246ms
14
14
  ESM dist/index.mjs 2.11 KB
15
- ESM dist/CountryCodeSelect-46ZPAYGJ.mjs 1.19 KB
16
- ESM dist/chunk-4QF4PJTK.mjs 397.96 KB
17
- ESM ⚡️ Build success in 2286ms
18
- DTS ⚡️ Build success in 11777ms
19
- DTS dist/index.d.ts 337.72 KB
20
- DTS dist/index.d.mts 337.72 KB
15
+ ESM dist/CountryCodeSelect-U25NF65N.mjs 1.19 KB
16
+ ESM dist/chunk-TEDOVPXZ.mjs 400.45 KB
17
+ ESM ⚡️ Build success in 2246ms
18
+ DTS ⚡️ Build success in 11587ms
19
+ DTS dist/index.d.ts 338.81 KB
20
+ DTS dist/index.d.mts 338.81 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 9.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 70e5a92: InfoSelect: bugfixes. #1043
8
+ - d4f8abf: Added possibility for title with ClosableAlert and StaticAlert. Some minor bugfixes with colors on darkmode.
9
+
10
+ ### Patch Changes
11
+
12
+ - 0baf753: PressableCard: Make variant optional. Fix background on darkmode.
13
+
14
+ ## 9.8.3
15
+
16
+ ### Patch Changes
17
+
18
+ - 50a42b2: Fix render of RadioCardGroup and RadioCard
19
+ - 72afbd7: Removed static values Table styles
20
+
3
21
  ## 9.8.2
4
22
 
5
23
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-4QF4PJTK.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-TEDOVPXZ.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -1,10 +1,10 @@
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, useRadio, useStyleConfig, chakra, Box, 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';
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
- import React73__default, { useId, createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, Suspense, Children, useContext, useCallback, useMemo, useLayoutEffect } from 'react';
7
+ import React73__default, { useId, createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, Suspense, useContext, useCallback, useMemo, useLayoutEffect } from 'react';
8
8
  import { CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CalendarOutline24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, DropdownRightFill18Icon, DropdownLeftFill18Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, ArrowRightFill18Icon, ArrowLeftFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, TrainFill18Icon, TrainFill24Icon, TrainFill30Icon, ExpressBusFill18Icon, ExpressBusFill24Icon, ExpressBusFill30Icon, BusFill18Icon, BusFill24Icon, BusFill30Icon, FerryFill18Icon, FerryFill24Icon, FerryFill30Icon, SubwayFill18Icon, SubwayFill24Icon, SubwayFill30Icon, TramFill18Icon, TramFill24Icon, TramFill30Icon, AltTransportFill18Icon, AltTransportFill24Icon, AltTransportFill30Icon, WalkFill18Icon, WalkFill24Icon, WalkFill30Icon } from '@vygruppen/spor-icon-react';
9
9
  import { inlineLoaderColorData, spinnerColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, fullScreenLoaderBlackData, inlineLoaderLightData, spinnerLightData, spinnerDarkData } from '@vygruppen/spor-loader';
10
10
  import { useLottie } from 'lottie-react';
@@ -829,24 +829,41 @@ var RadioCardGroup = ({
829
829
  ...props
830
830
  });
831
831
  const group = getRootProps();
832
- return /* @__PURE__ */ React73__default.createElement(Stack$1, { direction: direction2, ...group }, Children.map(
833
- children,
834
- (child) => {
832
+ return /* @__PURE__ */ React73__default.createElement(Stack$1, { direction: direction2, ...group }, recursiveMap(children, (child) => {
833
+ if (child.type === RadioCard) {
835
834
  const radio = getRadioProps({ value: child.props.value });
836
- return React73__default.cloneElement(child, { ...radio, variant, ...props });
835
+ const variantValue = variant;
836
+ return React73__default.cloneElement(
837
+ child,
838
+ { ...radio, variant: variantValue, ...props }
839
+ );
837
840
  }
838
- ));
841
+ return child;
842
+ }));
839
843
  };
844
+ function recursiveMap(children, fn) {
845
+ return React73__default.Children.map(children, (child) => {
846
+ if (React73__default.isValidElement(child) && child.props.children) {
847
+ child = React73__default.cloneElement(child, {
848
+ children: recursiveMap(child.props.children, fn)
849
+ });
850
+ }
851
+ if (React73__default.isValidElement(child)) {
852
+ return fn(child);
853
+ }
854
+ return child;
855
+ });
856
+ }
840
857
  var StaticCard = forwardRef(
841
858
  ({ colorScheme = "white", children, ...props }, ref) => {
842
859
  const styles3 = useStyleConfig("StaticCard", {
843
860
  colorScheme
844
861
  });
845
- return /* @__PURE__ */ React73__default.createElement(Box, { __css: styles3, ...props, ref }, children, /* @__PURE__ */ React73__default.createElement(Card, null));
862
+ return /* @__PURE__ */ React73__default.createElement(Box, { __css: styles3, ...props, ref }, children);
846
863
  }
847
864
  );
848
865
  var PressableCard = forwardRef(
849
- ({ children, variant = "base", ...props }, ref) => {
866
+ ({ children, variant = "floating", ...props }, ref) => {
850
867
  const styles3 = useStyleConfig("PressableCard", {
851
868
  variant
852
869
  });
@@ -1529,6 +1546,7 @@ var BaseAlert = ({
1529
1546
  // src/alert/ClosableAlert.tsx
1530
1547
  var ClosableAlert = ({
1531
1548
  variant,
1549
+ title,
1532
1550
  children,
1533
1551
  onClose: externalOnClose = () => {
1534
1552
  }
@@ -1553,7 +1571,7 @@ var ClosableAlert = ({
1553
1571
  "aria-label": t2(texts6.close),
1554
1572
  sx: styles3.closeButton
1555
1573
  }
1556
- ), /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant }), children);
1574
+ ), /* @__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)));
1557
1575
  };
1558
1576
  var texts6 = createTexts({
1559
1577
  close: {
@@ -1599,16 +1617,21 @@ var ExpandableAlert = ({
1599
1617
  overflow: "hidden",
1600
1618
  "-webkit-line-clamp": "1",
1601
1619
  "-webkit-box-orient": "vertical"
1602
- }
1620
+ },
1621
+ color: "darkGrey"
1603
1622
  },
1604
1623
  title
1605
1624
  )),
1606
- /* @__PURE__ */ React73__default.createElement(AccordionIcon, null)
1625
+ /* @__PURE__ */ React73__default.createElement(AccordionIcon, { color: "darkGrey" })
1607
1626
  )), /* @__PURE__ */ React73__default.createElement(AccordionPanel, null, children))
1608
1627
  ));
1609
1628
  };
1610
- var StaticAlert = ({ children, ...props }) => {
1611
- return /* @__PURE__ */ React73__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React73__default.createElement(AlertIcon, { variant: props.variant }), children);
1629
+ var StaticAlert = ({
1630
+ children,
1631
+ title,
1632
+ ...props
1633
+ }) => {
1634
+ 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)));
1612
1635
  };
1613
1636
  var Breadcrumb = (props) => {
1614
1637
  const iconColor = useColorModeValue("blackAlpha.400", "whiteAlpha.400");
@@ -3029,13 +3052,11 @@ function ListBoxSection({ section, state: state2 }) {
3029
3052
  // src/input/InfoSelect.tsx
3030
3053
  function InfoSelect({
3031
3054
  placeholder,
3032
- width = "100%",
3033
- height = "auto",
3034
3055
  onChange,
3035
3056
  value,
3036
3057
  isLabelSrOnly,
3037
3058
  defaultValue,
3038
- variant = "base",
3059
+ variant,
3039
3060
  ...props
3040
3061
  }) {
3041
3062
  const renamedProps = {
@@ -3062,7 +3083,8 @@ function InfoSelect({
3062
3083
  const { buttonProps } = useButton(triggerProps, triggerRef);
3063
3084
  const { t: t2 } = useTranslation();
3064
3085
  const formControl = useFormControlProps(props);
3065
- 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(
3086
+ const hasChosenValue = state2.selectedItem !== null;
3087
+ return /* @__PURE__ */ React73__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React73__default.createElement(
3066
3088
  HiddenSelect,
3067
3089
  {
3068
3090
  state: state2,
@@ -3077,13 +3099,36 @@ function InfoSelect({
3077
3099
  ref: triggerRef,
3078
3100
  sx: styles3.button,
3079
3101
  ...buttonProps,
3080
- width,
3081
- height,
3082
3102
  "data-attachable": true,
3083
3103
  "aria-invalid": formControl.isInvalid,
3084
3104
  "aria-describedby": formControl["aria-describedby"]
3085
3105
  },
3086
- /* @__PURE__ */ React73__default.createElement(Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
3106
+ /* @__PURE__ */ React73__default.createElement(chakra.div, { sx: styles3.innerButton }, /* @__PURE__ */ React73__default.createElement(
3107
+ chakra.div,
3108
+ {
3109
+ ...labelProps,
3110
+ sx: {
3111
+ ...styles3.label,
3112
+ ...hasChosenValue && {
3113
+ transform: "scale(0.825) translateY(-10px) translateX(-10%)",
3114
+ transitionProperty: "var(--spor-transition-property-common)",
3115
+ transitionDuration: "var(--spor-transition-duration-normal)"
3116
+ }
3117
+ }
3118
+ },
3119
+ props.label
3120
+ ), /* @__PURE__ */ React73__default.createElement(
3121
+ Box,
3122
+ {
3123
+ ...valueProps,
3124
+ h: !hasChosenValue ? "0px" : "18px",
3125
+ hidden: !hasChosenValue,
3126
+ transform: "scale(1) translateY(-10px)",
3127
+ transitionProperty: "var(--spor-transition-property-common)",
3128
+ transitionDuration: "var(--spor-transition-duration-normal)"
3129
+ },
3130
+ state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)
3131
+ )),
3087
3132
  /* @__PURE__ */ React73__default.createElement(Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React73__default.createElement(DropdownUpFill24Icon, null) : /* @__PURE__ */ React73__default.createElement(DropdownDownFill24Icon, null))
3088
3133
  ), state2.isOpen && /* @__PURE__ */ React73__default.createElement(
3089
3134
  Popover3,
@@ -3428,7 +3473,7 @@ var texts14 = createTexts({
3428
3473
  sv: "Telefonnummer"
3429
3474
  }
3430
3475
  });
3431
- var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-46ZPAYGJ.mjs'));
3476
+ var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-U25NF65N.mjs'));
3432
3477
  var Radio = forwardRef((props, ref) => {
3433
3478
  return /* @__PURE__ */ React73__default.createElement(Radio$1, { ...props, ref });
3434
3479
  });
@@ -9943,14 +9988,14 @@ function floatingBackground(state2, props) {
9943
9988
  return {
9944
9989
  backgroundColor: mode(
9945
9990
  "floating.surface.hover.light",
9946
- "floating.surface.hover.dark"
9991
+ `color-mix(in srgb, white 10%, var(--spor-colors-bg-default-dark))`
9947
9992
  )(props)
9948
9993
  };
9949
9994
  case "default":
9950
9995
  return {
9951
9996
  backgroundColor: mode(
9952
- "floating.surface.default.light",
9953
- "floating.surface.default.dark"
9997
+ "white",
9998
+ `color-mix(in srgb, white 10%, var(--spor-colors-bg-default-dark))`
9954
9999
  )(props)
9955
10000
  };
9956
10001
  }
@@ -10007,7 +10052,10 @@ function ghostBackground(state2, props) {
10007
10052
  };
10008
10053
  case "selected": {
10009
10054
  return {
10010
- backgroundColor: mode("mint", "whiteAlpha.200")(props)
10055
+ backgroundColor: mode(
10056
+ "ghost.surface.selected.light",
10057
+ "ghost.surface.selected.dark"
10058
+ )(props)
10011
10059
  };
10012
10060
  }
10013
10061
  case "default":
@@ -10016,6 +10064,18 @@ function ghostBackground(state2, props) {
10016
10064
  };
10017
10065
  }
10018
10066
  }
10067
+ function ghostText(state2, props) {
10068
+ switch (state2) {
10069
+ case "selected":
10070
+ return {
10071
+ color: mode("ghost.text.light", "ghost.text.dark")(props)
10072
+ };
10073
+ default:
10074
+ return {
10075
+ color: mode("ghost.text.light", "ghost.text.dark")(props)
10076
+ };
10077
+ }
10078
+ }
10019
10079
 
10020
10080
  // src/theme/components/accordion.ts
10021
10081
  var helpers = createMultiStyleConfigHelpers(accordionAnatomy.keys);
@@ -10165,7 +10225,8 @@ var config3 = helpers2.defineMultiStyleConfig({
10165
10225
  closeButton: {
10166
10226
  position: "absolute",
10167
10227
  top: 1,
10168
- right: 1
10228
+ right: 1,
10229
+ color: "darkGrey"
10169
10230
  }
10170
10231
  },
10171
10232
  variants: {
@@ -11852,18 +11913,28 @@ var config19 = helpers11.defineMultiStyleConfig({
11852
11913
  container: {},
11853
11914
  label: {
11854
11915
  position: "relative",
11916
+ fontSize: ["mobile.xs", "desktop.sm"],
11855
11917
  ...props.isLabelSrOnly ? srOnly2 : {}
11856
11918
  },
11919
+ innerButton: {
11920
+ display: "flex",
11921
+ flexDir: "column",
11922
+ alignItems: "start",
11923
+ justifyContent: "start"
11924
+ },
11857
11925
  button: {
11926
+ display: "flex",
11858
11927
  appearance: "none",
11928
+ width: "100%",
11929
+ height: "54px",
11859
11930
  borderTopRadius: "sm",
11860
11931
  borderBottomRadius: props.isOpen ? 0 : "sm",
11861
11932
  paddingY: 1.5,
11862
11933
  paddingX: 3,
11863
- display: "flex",
11864
11934
  justifyContent: "space-between",
11865
11935
  alignItems: "center",
11866
11936
  fontSize: "mobile.md",
11937
+ h: 8,
11867
11938
  ...baseBorder("default", props),
11868
11939
  _hover: {
11869
11940
  ...baseBorder("hover", props)
@@ -11881,6 +11952,7 @@ var config19 = helpers11.defineMultiStyleConfig({
11881
11952
  ...baseBorder("invalid", props)
11882
11953
  }
11883
11954
  },
11955
+ placeholder: {},
11884
11956
  arrowIcon: {}
11885
11957
  }),
11886
11958
  variants: {
@@ -12510,7 +12582,7 @@ var config25 = helpers16.defineMultiStyleConfig({
12510
12582
  marginY: 1,
12511
12583
  marginX: 1,
12512
12584
  borderRadius: "sm",
12513
- color: mode("darkGrey", "white")(props),
12585
+ ...ghostText("default", props),
12514
12586
  cursor: "pointer",
12515
12587
  outline: "none",
12516
12588
  _active: {
@@ -12523,15 +12595,15 @@ var config25 = helpers16.defineMultiStyleConfig({
12523
12595
  ...ghostBackground("selected", props)
12524
12596
  },
12525
12597
  _selected: {
12526
- ...ghostBackground("selected", props)
12598
+ ...ghostBackground("active", props)
12527
12599
  }
12528
12600
  },
12529
12601
  label: {},
12530
12602
  description: {
12531
12603
  fontSize: ["mobile.xs", "desktop.xs"],
12532
- color: mode("dimGrey", "silver")(props),
12604
+ ...ghostText("default", props),
12533
12605
  "[aria-selected='true'] &": {
12534
- color: mode("lightGrey", "platinum")(props)
12606
+ ...ghostText("selected", props)
12535
12607
  }
12536
12608
  }
12537
12609
  })
@@ -13330,13 +13402,11 @@ var config39 = helpers28.defineMultiStyleConfig({
13330
13402
  table: {
13331
13403
  borderCollapse: "collapse",
13332
13404
  ...baseText("default", props),
13333
- width: "100%",
13334
- minWidth: "600px"
13405
+ width: "100%"
13335
13406
  },
13336
13407
  th: {
13337
13408
  fontWeight: "bold",
13338
- textAlign: "start",
13339
- minWidth: "68px"
13409
+ textAlign: "start"
13340
13410
  },
13341
13411
  td: {
13342
13412
  textAlign: "start"
@@ -13710,9 +13780,14 @@ var config44 = defineStyleConfig$1({
13710
13780
  display: "block",
13711
13781
  borderRadius: "md",
13712
13782
  cursor: "pointer",
13713
- ...focusVisibleStyles(props),
13783
+ transitionProperty: "common",
13784
+ transitionDuration: "fast",
13785
+ "button&, a&, label&, &.is-clickable": {
13786
+ ...focusVisibleStyles(props)
13787
+ },
13714
13788
  _disabled: {
13715
13789
  ...baseBackground("disabled", props),
13790
+ ...baseBorder("disabled", props),
13716
13791
  ...baseText("disabled", props),
13717
13792
  outline: "none",
13718
13793
  pointerEvents: "none"
package/dist/index.d.mts CHANGED
@@ -211,7 +211,7 @@ declare const StaticCard: _chakra_ui_system_dist_system_types.ComponentWithAs<As
211
211
 
212
212
  type PressableCardProps = BoxProps & {
213
213
  /** Defaults to "base" */
214
- variant: "floating" | "accent" | "base";
214
+ variant?: "floating" | "accent" | "base";
215
215
  };
216
216
  /**
217
217
  * `PressableCard` is a component that renders a pressable card.
@@ -333,6 +333,8 @@ type BaseAlertProps = BoxProps & {
333
333
  variant: "info" | "success" | "warning" | "alt-transport" | "error";
334
334
  /** The body content of the alert */
335
335
  children: React.ReactNode;
336
+ /** The title of the alert */
337
+ title?: string;
336
338
  };
337
339
 
338
340
  type ClosableAlertProps = BaseAlertProps & {
@@ -361,7 +363,7 @@ type ClosableAlertProps = BaseAlertProps & {
361
363
  * <Text>Some info here</Text>
362
364
  * </ClosableAlert>
363
365
  */
364
- declare const ClosableAlert: ({ variant, children, onClose: externalOnClose, }: ClosableAlertProps) => React.JSX.Element | null;
366
+ declare const ClosableAlert: ({ variant, title, children, onClose: externalOnClose, }: ClosableAlertProps) => React.JSX.Element | null;
365
367
 
366
368
  type ExpandableAlertProps = BaseAlertProps & {
367
369
  /** The title string */
@@ -401,7 +403,7 @@ type StaticAlertProps = BaseAlertProps;
401
403
  * </StaticAlert>
402
404
  * ```
403
405
  */
404
- declare const StaticAlert: ({ children, ...props }: StaticAlertProps) => React.JSX.Element;
406
+ declare const StaticAlert: ({ children, title, ...props }: StaticAlertProps) => React.JSX.Element;
405
407
 
406
408
  type BreadcrumbProps = Omit<BreadcrumbProps$1, "variant"> & {
407
409
  variant?: "base" | "ghost";
@@ -1174,7 +1176,7 @@ type InfoSelectProps<T extends object> = {
1174
1176
  *
1175
1177
  * @see https://spor.vy.no/components/info-select
1176
1178
  */
1177
- declare function InfoSelect<T extends object>({ placeholder, width, height, onChange, value, isLabelSrOnly, defaultValue, variant, ...props }: InfoSelectProps<T>): React.JSX.Element;
1179
+ declare function InfoSelect<T extends object>({ placeholder, onChange, value, isLabelSrOnly, defaultValue, variant, ...props }: InfoSelectProps<T>): React.JSX.Element;
1178
1180
 
1179
1181
  type InputProps = Omit<InputProps$1, "variant" | "size"> & {
1180
1182
  /** The input's label */
@@ -2534,6 +2536,7 @@ declare const theme: {
2534
2536
  position: string;
2535
2537
  top: number;
2536
2538
  right: number;
2539
+ color: string;
2537
2540
  };
2538
2541
  } | undefined;
2539
2542
  sizes?: {
@@ -4619,6 +4622,13 @@ declare const theme: {
4619
4622
  position: string;
4620
4623
  width?: string | undefined;
4621
4624
  whiteSpace?: string | undefined;
4625
+ fontSize: ("desktop.sm" | "mobile.xs")[];
4626
+ };
4627
+ innerButton: {
4628
+ display: string;
4629
+ flexDir: string;
4630
+ alignItems: string;
4631
+ justifyContent: string;
4622
4632
  };
4623
4633
  button: {
4624
4634
  _disabled: {
@@ -4657,15 +4667,18 @@ declare const theme: {
4657
4667
  outlineColor: string;
4658
4668
  outlineStyle: string;
4659
4669
  outlineOffset: string;
4670
+ display: string;
4660
4671
  appearance: string;
4672
+ width: string;
4673
+ height: string;
4661
4674
  borderTopRadius: string;
4662
4675
  borderBottomRadius: string | number;
4663
4676
  paddingY: number;
4664
4677
  paddingX: number;
4665
- display: string;
4666
4678
  justifyContent: string;
4667
4679
  alignItems: string;
4668
4680
  fontSize: string;
4681
+ h: number;
4669
4682
  } | {
4670
4683
  _disabled: {
4671
4684
  backgroundColor: string;
@@ -4701,16 +4714,20 @@ declare const theme: {
4701
4714
  };
4702
4715
  outline: string;
4703
4716
  outlineColor: string;
4717
+ display: string;
4704
4718
  appearance: string;
4719
+ width: string;
4720
+ height: string;
4705
4721
  borderTopRadius: string;
4706
4722
  borderBottomRadius: string | number;
4707
4723
  paddingY: number;
4708
4724
  paddingX: number;
4709
- display: string;
4710
4725
  justifyContent: string;
4711
4726
  alignItems: string;
4712
4727
  fontSize: string;
4728
+ h: number;
4713
4729
  };
4730
+ placeholder: {};
4714
4731
  arrowIcon: {};
4715
4732
  }) | undefined;
4716
4733
  sizes?: {
@@ -5369,12 +5386,6 @@ declare const theme: {
5369
5386
  backgroundColor: string;
5370
5387
  };
5371
5388
  item: {
5372
- paddingX: number;
5373
- paddingY: number;
5374
- marginY: number;
5375
- marginX: number;
5376
- borderRadius: string;
5377
- color: string;
5378
5389
  cursor: string;
5379
5390
  outline: string;
5380
5391
  _active: {
@@ -5389,14 +5400,20 @@ declare const theme: {
5389
5400
  _selected: {
5390
5401
  backgroundColor: string;
5391
5402
  };
5403
+ color: string;
5404
+ paddingX: number;
5405
+ paddingY: number;
5406
+ marginY: number;
5407
+ marginX: number;
5408
+ borderRadius: string;
5392
5409
  };
5393
5410
  label: {};
5394
5411
  description: {
5395
- fontSize: ("mobile.xs" | "desktop.xs")[];
5396
- color: string;
5397
5412
  "[aria-selected='true'] &": {
5398
5413
  color: string;
5399
5414
  };
5415
+ color: string;
5416
+ fontSize: ("mobile.xs" | "desktop.xs")[];
5400
5417
  };
5401
5418
  }) | undefined;
5402
5419
  sizes?: {
@@ -6627,14 +6644,12 @@ declare const theme: {
6627
6644
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
6628
6645
  table: {
6629
6646
  width: string;
6630
- minWidth: string;
6631
6647
  color: string;
6632
6648
  borderCollapse: string;
6633
6649
  };
6634
6650
  th: {
6635
6651
  fontWeight: string;
6636
6652
  textAlign: string;
6637
- minWidth: string;
6638
6653
  };
6639
6654
  td: {
6640
6655
  textAlign: string;
@@ -7226,25 +7241,39 @@ declare const theme: {
7226
7241
  };
7227
7242
  PressableCard: {
7228
7243
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
7244
+ appearance: string;
7245
+ border: string;
7246
+ overflow: string;
7247
+ fontSize: string;
7248
+ display: string;
7249
+ borderRadius: string;
7250
+ cursor: string;
7251
+ transitionProperty: string;
7252
+ transitionDuration: string;
7253
+ "button&, a&, label&, &.is-clickable": {
7254
+ _focusVisible: {
7255
+ outlineWidth: string;
7256
+ outlineColor: string;
7257
+ outlineStyle: string;
7258
+ outlineOffset: string;
7259
+ };
7260
+ };
7229
7261
  _disabled: {
7230
7262
  outline: string;
7231
7263
  pointerEvents: string;
7232
7264
  color: string;
7233
- backgroundColor: string;
7234
- };
7235
- _focusVisible: {
7236
7265
  outlineWidth: string;
7237
7266
  outlineColor: string;
7238
7267
  outlineStyle: string;
7239
7268
  outlineOffset: string;
7269
+ backgroundColor: string;
7270
+ } | {
7271
+ outline: string;
7272
+ pointerEvents: string;
7273
+ color: string;
7274
+ outlineColor: string;
7275
+ backgroundColor: string;
7240
7276
  };
7241
- appearance: string;
7242
- border: string;
7243
- overflow: string;
7244
- fontSize: string;
7245
- display: string;
7246
- borderRadius: string;
7247
- cursor: string;
7248
7277
  }) | undefined;
7249
7278
  sizes?: {
7250
7279
  [key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
@@ -9417,4 +9446,4 @@ declare const Text: _chakra_ui_system_dist_system_types.ComponentWithAs<"p", Tex
9417
9446
  **/
9418
9447
  declare function slugify(text: string | string[], maxLength?: number): string;
9419
9448
 
9420
- export { Accordion, AccordionProps, AttachedInputs, Badge, BadgeProps, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, CardSelect, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChoiceChip, ChoiceChipProps, ClosableAlert, CloseButton, CloseButtonProps, Code, CodeProps, ColorInlineLoader, ColorInlineLoaderProps, ColorSpinner, ColorSpinnerProps, Combobox, ComboboxProps, ContentLoader, ContentLoaderProps, DarkFullScreenLoader, DarkInlineLoader, DarkInlineLoaderProps, DarkSpinner, DarkSpinnerProps, DatePicker, DateRangePicker, Divider, DividerProps, Drawer, DrawerContent, ModalHeader as DrawerHeader, Expandable, ExpandableAlert, ExpandableItem, ExpandableItemProps, FloatingActionButton, FormControl, FormControlProps, FormErrorMessage, FormErrorMessageProps, FormLabel, FormLabelProps, FullScreenDrawer, Heading, HeadingProps, IconButton, IconButtonProps, InfoSelect, InfoTag, InfoTagProps, Input, InputElementProps, InputLeftElement, InputProps, InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightInlineLoaderProps, LightSpinner, LightSpinnerProps, LineIcon, LineIconProps, ListBox, ModalHeader, ModalHeaderProps, NativeSelect, NativeSelectProps, Nudge, NudgeProps, NumericStepper, Pagination, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, StaticCard, StaticCardProps, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, Tooltip, TooltipProps, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoProps, WizardNudge, WizardNudgeProps, brandTheme, createTexts, fontFaces, slugify, theme, useToast, useTranslation };
9449
+ export { Accordion, AccordionProps, AttachedInputs, Badge, BadgeProps, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, CardSelect, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChoiceChip, ChoiceChipProps, ClosableAlert, CloseButton, CloseButtonProps, Code, CodeProps, ColorInlineLoader, ColorInlineLoaderProps, ColorSpinner, ColorSpinnerProps, Combobox, ComboboxProps, ContentLoader, ContentLoaderProps, DarkFullScreenLoader, DarkInlineLoader, DarkInlineLoaderProps, DarkSpinner, DarkSpinnerProps, DatePicker, DateRangePicker, Divider, DividerProps, Drawer, DrawerContent, ModalHeader as DrawerHeader, Expandable, ExpandableAlert, ExpandableItem, ExpandableItemProps, FloatingActionButton, FormControl, FormControlProps, FormErrorMessage, FormErrorMessageProps, FormLabel, FormLabelProps, FullScreenDrawer, Heading, HeadingProps, IconButton, IconButtonProps, InfoSelect, InfoTag, InfoTagProps, Input, InputElementProps, InputLeftElement, InputProps, InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightInlineLoaderProps, LightSpinner, LightSpinnerProps, LineIcon, LineIconProps, ListBox, ModalHeader, ModalHeaderProps, NativeSelect, NativeSelectProps, Nudge, NudgeProps, NumericStepper, Pagination, PasswordInput, PasswordInputProps, PhoneNumberInput, PlayPauseButton, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, SearchInput, SearchInputProps, SimpleDrawer, SimpleDrawerProps, Skeleton, SkeletonCircle, SkeletonCircleProps, SkeletonProps, SkeletonText, SkeletonTextProps, SkipButton, SpinnerProps, SporProvider, Stack, StackProps, StaticAlert, StaticCard, StaticCardProps, Stepper, StepperStep, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, Text, TextLink, TextProps, Textarea, TextareaProps, TimePicker, ToastOptions, Tooltip, TooltipProps, Translations, TravelTag, TravelTagProps, VyLogo, VyLogoProps, WizardNudge, WizardNudgeProps, brandTheme, createTexts, fontFaces, slugify, theme, useToast, useTranslation };