@vygruppen/spor-react 3.5.0 → 3.5.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.
- package/.turbo/turbo-build.log +12 -11
- package/CHANGELOG.md +10 -0
- package/dist/CountryCodeSelect-IS3VUSPZ.mjs +40 -0
- package/dist/{chunk-ELSHBTSG.mjs → chunk-HZ6V7HFA.mjs} +105 -15
- package/dist/index.d.mts +7092 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +118 -6556
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
- package/src/button/Button.tsx +1 -1
- package/src/button/FloatingActionButton.tsx +1 -1
- package/src/button/IconButton.tsx +1 -1
- package/src/datepicker/DateRangePicker.tsx +2 -2
- package/src/input/ChoiceChip.tsx +1 -1
- package/src/input/PasswordInput.tsx +1 -1
- package/src/input/SearchInput.tsx +3 -3
- package/src/layout/Divider.tsx +1 -1
- package/src/loader/ColorSpinner.tsx +1 -1
- package/src/loader/ContentLoader.tsx +1 -1
- package/src/loader/LightSpinner.tsx +4 -2
- package/src/stepper/StepperStep.tsx +1 -1
- package/dist/CountryCodeSelect-46KAQXG4.mjs +0 -6522
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, 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, 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, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tr, TravelTag, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-
|
1
|
+
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, 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, 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, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tr, TravelTag, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-HZ6V7HFA.mjs';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vygruppen/spor-react",
|
3
|
-
"version": "3.5.
|
3
|
+
"version": "3.5.1",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -25,18 +25,19 @@
|
|
25
25
|
"@vygruppen/spor-design-tokens": "*",
|
26
26
|
"@vygruppen/spor-icon-react": "*",
|
27
27
|
"@vygruppen/spor-loader": "*",
|
28
|
-
"
|
28
|
+
"awesome-phonenumber": "^5.10.0",
|
29
|
+
"framer-motion": "^10.16.4",
|
29
30
|
"lottie-react": "^2.3.1",
|
30
31
|
"react-aria": "^3.27.0",
|
31
|
-
"react-stately": "^3.
|
32
|
+
"react-stately": "^3.25.0",
|
32
33
|
"react-swipeable": "^7.0.0"
|
33
34
|
},
|
34
35
|
"devDependencies": {
|
35
|
-
"@testing-library/jest-dom": "^
|
36
|
-
"@testing-library/react": "^
|
36
|
+
"@testing-library/jest-dom": "^6.1.3",
|
37
|
+
"@testing-library/react": "^14.0.0",
|
37
38
|
"react": "^18.2.0",
|
38
39
|
"react-dom": "^18.2.0",
|
39
|
-
"tsup": "^
|
40
|
+
"tsup": "^7.2.0",
|
40
41
|
"vitest": "^0.26.3",
|
41
42
|
"vitest-axe": "^0.1.0",
|
42
43
|
"vitest-canvas-mock": "^0.2.0"
|
package/src/button/Button.tsx
CHANGED
@@ -93,7 +93,7 @@ type ScrollDirection = "up" | "down" | null;
|
|
93
93
|
const useScrollDirection = () => {
|
94
94
|
const [scrollDirection, setScrollDirection] =
|
95
95
|
React.useState<ScrollDirection>(null);
|
96
|
-
const lastScrollPosition = React.useRef(window.scrollY);
|
96
|
+
const lastScrollPosition = React.useRef(typeof window !== "undefined" ? window.scrollY : 0);
|
97
97
|
React.useEffect(() => {
|
98
98
|
const onScroll = () => {
|
99
99
|
const delta = window.scrollY - lastScrollPosition.current;
|
@@ -136,7 +136,7 @@ export function DateRangePicker({
|
|
136
136
|
minHeight={minHeight}
|
137
137
|
>
|
138
138
|
{!hasTrigger && (
|
139
|
-
<CalendarOutline24Icon
|
139
|
+
<CalendarOutline24Icon marginRight={2} alignSelf="center" />
|
140
140
|
)}
|
141
141
|
<DateField
|
142
142
|
{...startFieldProps}
|
@@ -145,7 +145,7 @@ export function DateRangePicker({
|
|
145
145
|
ref={hasTrigger ? undefined : ref}
|
146
146
|
labelProps={labelProps}
|
147
147
|
/>
|
148
|
-
<Box as="span" aria-hidden="true"
|
148
|
+
<Box as="span" aria-hidden="true" paddingX="2">
|
149
149
|
–
|
150
150
|
</Box>
|
151
151
|
<DateField
|
package/src/input/ChoiceChip.tsx
CHANGED
@@ -94,7 +94,7 @@ export const ChoiceChip = forwardRef((props: ChoiceChipProps, ref) => {
|
|
94
94
|
{variant !== "icon" && children}
|
95
95
|
</chakra.span>
|
96
96
|
{variant === "filter" && state.isChecked && (
|
97
|
-
<CloseOutline24Icon
|
97
|
+
<CloseOutline24Icon marginLeft={1.5} />
|
98
98
|
)}
|
99
99
|
</chakra.div>
|
100
100
|
</chakra.label>
|
@@ -39,8 +39,8 @@ export const SearchInput = forwardRef<SearchInputProps, "input">(
|
|
39
39
|
<SearchOutline24Icon />
|
40
40
|
</InputLeftElement>
|
41
41
|
<ChakraInput
|
42
|
-
|
43
|
-
|
42
|
+
paddingLeft={7}
|
43
|
+
paddingRight={7}
|
44
44
|
{...props}
|
45
45
|
id={inputId}
|
46
46
|
type="search"
|
@@ -62,7 +62,7 @@ export const SearchInput = forwardRef<SearchInputProps, "input">(
|
|
62
62
|
variant="ghost"
|
63
63
|
type="button"
|
64
64
|
size="sm"
|
65
|
-
|
65
|
+
marginRight={1}
|
66
66
|
aria-label={t(texts.reset)}
|
67
67
|
icon={<CloseOutline24Icon />}
|
68
68
|
onClick={onReset}
|
package/src/layout/Divider.tsx
CHANGED
@@ -7,7 +7,7 @@ export type DividerProps = BoxProps;
|
|
7
7
|
* You can specify margins if you need to give the content some space, or use a `Stack` component to do it for you
|
8
8
|
*
|
9
9
|
* ```tsx
|
10
|
-
* <Divider
|
10
|
+
* <Divider marginTop={4} marginBottom={6} />
|
11
11
|
* ```
|
12
12
|
*/
|
13
13
|
export const Divider = forwardRef<BoxProps, As>((props, ref) => {
|
@@ -12,7 +12,7 @@ export type ContentLoaderProps = BoxProps;
|
|
12
12
|
export const ContentLoader = ({ children, ...props }: ContentLoaderProps) => {
|
13
13
|
return (
|
14
14
|
<Box {...props}>
|
15
|
-
<Box maxWidth="140px"
|
15
|
+
<Box maxWidth="140px" marginX="auto">
|
16
16
|
<ClientOnly>
|
17
17
|
{() => <Lottie animationData={contentLoaderData} />}
|
18
18
|
</ClientOnly>
|
@@ -29,10 +29,12 @@ export const LightSpinner = ({
|
|
29
29
|
return (
|
30
30
|
<Center flexDirection="column" {...props}>
|
31
31
|
<Box width={width} maxWidth={maxWidth}>
|
32
|
-
<ClientOnly>
|
32
|
+
<ClientOnly>
|
33
|
+
{() => <Lottie animationData={spinnerLightData} />}
|
34
|
+
</ClientOnly>
|
33
35
|
</Box>
|
34
36
|
{children && (
|
35
|
-
<Box
|
37
|
+
<Box marginTop={3} fontWeight="bold">
|
36
38
|
{children}
|
37
39
|
</Box>
|
38
40
|
)}
|
@@ -19,7 +19,7 @@ export const StepperStep = ({ children, stepNumber }: StepperStepProps) => {
|
|
19
19
|
return (
|
20
20
|
<Box __css={style.stepContainer}>
|
21
21
|
{stepNumber > 1 && (
|
22
|
-
<DropdownRightFill18Icon
|
22
|
+
<DropdownRightFill18Icon marginX={5} display={["none", "block"]} />
|
23
23
|
)}
|
24
24
|
|
25
25
|
<Flex
|