@vygruppen/spor-react 9.8.0 → 9.8.1

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.0 build
2
+ > @vygruppen/spor-react@9.8.1 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.25 KB
13
+ CJS ⚡️ Build success in 2175ms
12
14
  ESM dist/index.mjs 2.11 KB
13
- ESM dist/CountryCodeSelect-EKYAUNTI.mjs 1.19 KB
14
- ESM dist/chunk-3P7NVQKW.mjs 397.80 KB
15
- ESM ⚡️ Build success in 2067ms
16
- CJS dist/index.js 508.29 KB
17
- CJS ⚡️ Build success in 2068ms
18
- DTS ⚡️ Build success in 11221ms
19
- DTS dist/index.d.ts 337.50 KB
20
- DTS dist/index.d.mts 337.50 KB
15
+ ESM dist/chunk-S335RZ6M.mjs 397.76 KB
16
+ ESM dist/CountryCodeSelect-FODJ4ZSF.mjs 1.19 KB
17
+ ESM ⚡️ Build success in 2175ms
18
+ DTS ⚡️ Build success in 11477ms
19
+ DTS dist/index.d.ts 337.73 KB
20
+ DTS dist/index.d.mts 337.73 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 9.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6852a42: Update docs for PressableCard and RadioCard
8
+
3
9
  ## 9.8.0
4
10
 
5
11
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-3P7NVQKW.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-S335RZ6M.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -848,11 +848,10 @@ var StaticCard = forwardRef(
848
848
  var PressableCard = ({
849
849
  children,
850
850
  as = "button",
851
- size: size2 = "sm",
852
851
  variant = "base",
853
852
  ...props
854
853
  }) => {
855
- const styles3 = useStyleConfig("PressableCard", { variant, size: size2 });
854
+ const styles3 = useStyleConfig("PressableCard", { variant });
856
855
  return /* @__PURE__ */ React73__default.createElement(Box, { as, __css: styles3, ...props }, children);
857
856
  };
858
857
  var AccordionContext = React73__default.createContext(null);
@@ -3428,7 +3427,7 @@ var texts14 = createTexts({
3428
3427
  sv: "Telefonnummer"
3429
3428
  }
3430
3429
  });
3431
- var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-EKYAUNTI.mjs'));
3430
+ var LazyCountryCodeSelect = React73__default.lazy(() => import('./CountryCodeSelect-FODJ4ZSF.mjs'));
3432
3431
  var Radio = forwardRef((props, ref) => {
3433
3432
  return /* @__PURE__ */ React73__default.createElement(Radio$1, { ...props, ref });
3434
3433
  });
package/dist/index.d.mts CHANGED
@@ -67,6 +67,7 @@ declare const Stack: _chakra_ui_system_dist_system_types.ComponentWithAs<"div",
67
67
 
68
68
  type RadioCardProps = UseRadioProps & BoxProps & {
69
69
  children: React.ReactNode;
70
+ /** Defaults to "base" */
70
71
  variant: "floating" | "base";
71
72
  };
72
73
  /**
@@ -116,7 +117,16 @@ declare const RadioCard: _chakra_ui_system_dist_system_types.ComponentWithAs<"di
116
117
  type RadioCardGroupProps = RadioGroupProps$1 & {
117
118
  children: React.ReactNode;
118
119
  props?: RadioGroupProps$1;
120
+ /** Defaults to "row" */
119
121
  direction?: StackDirection;
122
+ /** Defaults to "base" */
123
+ variant?: string;
124
+ /** The name of the radio group */
125
+ name?: string;
126
+ /** The default value of the radio group */
127
+ defaultValue?: string;
128
+ /** The callback function to be called when the radio group value changes */
129
+ onChange?: (value: string) => void;
120
130
  };
121
131
  /**
122
132
  * Radio card groups are used to group several radio cards together.
@@ -200,11 +210,9 @@ type StaticCardProps = BoxProps & {
200
210
  declare const StaticCard: _chakra_ui_system_dist_system_types.ComponentWithAs<As, StaticCardProps>;
201
211
 
202
212
  type PressableCardProps = Omit<BoxProps, "as"> & {
203
- /** Use "floating" | "accent" | "base". Defaults to base */
213
+ /** Defaults to "base" */
204
214
  variant: "floating" | "accent" | "base";
205
- /** Use "sm" | "lg". Defaults to sm */
206
- size?: "sm" | "lg";
207
- /** Use "button" | "a" | "label". Defaults to button */
215
+ /** Defaults to "button" */
208
216
  as: "button" | "a" | "label";
209
217
  };
210
218
  /**
@@ -237,7 +245,7 @@ type PressableCardProps = Omit<BoxProps, "as"> & {
237
245
  *
238
246
  * @see StaticCard
239
247
  */
240
- declare const PressableCard: ({ children, as, size, variant, ...props }: PressableCardProps) => React.JSX.Element;
248
+ declare const PressableCard: ({ children, as, variant, ...props }: PressableCardProps) => React.JSX.Element;
241
249
 
242
250
  type AccordionProps = Omit<AccordionProps$1, "variant" | "size"> & {
243
251
  /**
package/dist/index.d.ts CHANGED
@@ -67,6 +67,7 @@ declare const Stack: _chakra_ui_system_dist_system_types.ComponentWithAs<"div",
67
67
 
68
68
  type RadioCardProps = UseRadioProps & BoxProps & {
69
69
  children: React.ReactNode;
70
+ /** Defaults to "base" */
70
71
  variant: "floating" | "base";
71
72
  };
72
73
  /**
@@ -116,7 +117,16 @@ declare const RadioCard: _chakra_ui_system_dist_system_types.ComponentWithAs<"di
116
117
  type RadioCardGroupProps = RadioGroupProps$1 & {
117
118
  children: React.ReactNode;
118
119
  props?: RadioGroupProps$1;
120
+ /** Defaults to "row" */
119
121
  direction?: StackDirection;
122
+ /** Defaults to "base" */
123
+ variant?: string;
124
+ /** The name of the radio group */
125
+ name?: string;
126
+ /** The default value of the radio group */
127
+ defaultValue?: string;
128
+ /** The callback function to be called when the radio group value changes */
129
+ onChange?: (value: string) => void;
120
130
  };
121
131
  /**
122
132
  * Radio card groups are used to group several radio cards together.
@@ -200,11 +210,9 @@ type StaticCardProps = BoxProps & {
200
210
  declare const StaticCard: _chakra_ui_system_dist_system_types.ComponentWithAs<As, StaticCardProps>;
201
211
 
202
212
  type PressableCardProps = Omit<BoxProps, "as"> & {
203
- /** Use "floating" | "accent" | "base". Defaults to base */
213
+ /** Defaults to "base" */
204
214
  variant: "floating" | "accent" | "base";
205
- /** Use "sm" | "lg". Defaults to sm */
206
- size?: "sm" | "lg";
207
- /** Use "button" | "a" | "label". Defaults to button */
215
+ /** Defaults to "button" */
208
216
  as: "button" | "a" | "label";
209
217
  };
210
218
  /**
@@ -237,7 +245,7 @@ type PressableCardProps = Omit<BoxProps, "as"> & {
237
245
  *
238
246
  * @see StaticCard
239
247
  */
240
- declare const PressableCard: ({ children, as, size, variant, ...props }: PressableCardProps) => React.JSX.Element;
248
+ declare const PressableCard: ({ children, as, variant, ...props }: PressableCardProps) => React.JSX.Element;
241
249
 
242
250
  type AccordionProps = Omit<AccordionProps$1, "variant" | "size"> & {
243
251
  /**
package/dist/index.js CHANGED
@@ -926,11 +926,10 @@ var init_PressableCard = __esm({
926
926
  exports.PressableCard = ({
927
927
  children,
928
928
  as = "button",
929
- size: size2 = "sm",
930
929
  variant = "base",
931
930
  ...props
932
931
  }) => {
933
- const styles3 = react.useStyleConfig("PressableCard", { variant, size: size2 });
932
+ const styles3 = react.useStyleConfig("PressableCard", { variant });
934
933
  return /* @__PURE__ */ React73__namespace.default.createElement(react.Box, { as, __css: styles3, ...props }, children);
935
934
  };
936
935
  }
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-3P7NVQKW.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-S335RZ6M.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "9.8.0",
3
+ "version": "9.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -2,11 +2,9 @@ import React from "react";
2
2
  import { Box, BoxProps, useStyleConfig } from "@chakra-ui/react";
3
3
 
4
4
  type PressableCardProps = Omit<BoxProps, "as"> & {
5
- /** Use "floating" | "accent" | "base". Defaults to base */
5
+ /** Defaults to "base" */
6
6
  variant: "floating" | "accent" | "base";
7
- /** Use "sm" | "lg". Defaults to sm */
8
- size?: "sm" | "lg";
9
- /** Use "button" | "a" | "label". Defaults to button */
7
+ /** Defaults to "button" */
10
8
  as: "button" | "a" | "label";
11
9
  };
12
10
 
@@ -44,11 +42,10 @@ type PressableCardProps = Omit<BoxProps, "as"> & {
44
42
  export const PressableCard = ({
45
43
  children,
46
44
  as = "button",
47
- size = "sm",
48
45
  variant = "base",
49
46
  ...props
50
47
  }: PressableCardProps) => {
51
- const styles = useStyleConfig("PressableCard", { variant, size });
48
+ const styles = useStyleConfig("PressableCard", { variant });
52
49
  return (
53
50
  <Box as={as} __css={styles} {...props}>
54
51
  {children}
@@ -12,6 +12,7 @@ import React, { useId } from "react";
12
12
  type RadioCardProps = UseRadioProps &
13
13
  BoxProps & {
14
14
  children: React.ReactNode;
15
+ /** Defaults to "base" */
15
16
  variant: "floating" | "base";
16
17
  };
17
18
 
@@ -9,7 +9,16 @@ import React, { Children } from "react";
9
9
  type RadioCardGroupProps = RadioGroupProps & {
10
10
  children: React.ReactNode;
11
11
  props?: RadioGroupProps;
12
+ /** Defaults to "row" */
12
13
  direction?: StackDirection;
14
+ /** Defaults to "base" */
15
+ variant?: string;
16
+ /** The name of the radio group */
17
+ name?: string;
18
+ /** The default value of the radio group */
19
+ defaultValue?: string;
20
+ /** The callback function to be called when the radio group value changes */
21
+ onChange?: (value: string) => void;
13
22
  };
14
23
 
15
24
  /**