@vygruppen/spor-react 3.8.0 → 4.0.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/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +33 -0
- package/dist/{CountryCodeSelect-BA3A7ODU.mjs → CountryCodeSelect-7WPJ6BDU.mjs} +1 -1
- package/dist/{chunk-HL3ESNVB.mjs → chunk-B77QE6EZ.mjs} +68 -99
- package/dist/index.d.mts +34 -75
- package/dist/index.d.ts +34 -75
- package/dist/index.js +72 -97
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/button/Button.tsx +2 -5
- package/src/button/ButtonGroup.tsx +1 -1
- package/src/button/FloatingActionButton.tsx +2 -11
- package/src/button/IconButton.tsx +1 -3
- package/src/datepicker/DatePicker.tsx +21 -13
- package/src/datepicker/DateRangePicker.tsx +2 -2
- package/src/link/TextLink.tsx +2 -6
- package/src/modal/Drawer.tsx +2 -2
- package/src/tab/Tabs.tsx +1 -11
- package/src/theme/components/button.ts +0 -20
- package/src/theme/components/card.ts +7 -7
- package/src/theme/components/close-button.ts +1 -1
- package/src/theme/components/drawer.ts +4 -3
- package/src/theme/components/link.ts +5 -46
- package/src/theme/components/modal.ts +1 -1
- package/src/theme/components/popover.ts +20 -4
- package/src/util/externals.tsx +2 -0
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@
|
2
|
+
> @vygruppen/spor-react@4.0.0 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -8,15 +8,15 @@
|
|
8
8
|
[34mCLI[39m Target: node16
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
|
-
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-HL3ESNVB.mjs".
|
12
|
-
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
|
13
11
|
[34mDTS[39m Build start
|
14
|
-
|
15
|
-
|
16
|
-
[
|
17
|
-
[
|
18
|
-
[
|
19
|
-
[
|
20
|
-
[
|
21
|
-
[
|
22
|
-
[32mDTS[39m
|
12
|
+
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
|
13
|
+
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-B77QE6EZ.mjs".
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m547.83 KB[39m
|
15
|
+
[32mCJS[39m ⚡️ Build success in 4018ms
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m2.10 KB[39m
|
17
|
+
[32mESM[39m [1mdist/CountryCodeSelect-7WPJ6BDU.mjs [22m[32m1.19 KB[39m
|
18
|
+
[32mESM[39m [1mdist/chunk-B77QE6EZ.mjs [22m[32m437.32 KB[39m
|
19
|
+
[32mESM[39m ⚡️ Build success in 4019ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 17985ms
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m262.81 KB[39m
|
22
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m262.81 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,38 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 4.0.0
|
4
|
+
|
5
|
+
### Major Changes
|
6
|
+
|
7
|
+
- 8d9d381c: This major version removes a bunch of deprecated properties, and revamps our Datepicker component.
|
8
|
+
|
9
|
+
To migrate, please follow the following instructions:
|
10
|
+
|
11
|
+
DatePicker, DateRangePicker: `variant="simple"` and `variant="with-trigger"` has been removed (without a deprecation warning – sorry! 🙈). In their place, you'll find "base", "floating" and "ghost".
|
12
|
+
|
13
|
+
Button: The deprecated `variant="tertiary" is removed. To migrate, use `variant="secondary"` instead.
|
14
|
+
|
15
|
+
TextLink: The deprecated `variant="tertiary" is removed. To migrate, use `variant="secondary"` instead.
|
16
|
+
|
17
|
+
FloatingActionButton: The deprecated variants "green", "light" and "dark" are deprecated. To migrate, use "accent" for all three versions.
|
18
|
+
|
19
|
+
Tabs: The deprecated color schemes "dark", "light", "green" and "grey" are all removed. For "dark" and "green", please use "accent". For "light" and "grey", please use "default"
|
20
|
+
|
21
|
+
### Minor Changes
|
22
|
+
|
23
|
+
- 8d9d381c: Add new Portal component
|
24
|
+
|
25
|
+
### Patch Changes
|
26
|
+
|
27
|
+
- 7b828801: Drawer: added dark mode support
|
28
|
+
- 342931bc: Popover: Add dark mode support
|
29
|
+
|
30
|
+
## 3.8.1
|
31
|
+
|
32
|
+
### Patch Changes
|
33
|
+
|
34
|
+
- c1e025e0: Card: add support for clickable labels, and .is-clickable override
|
35
|
+
|
3
36
|
## 3.8.0
|
4
37
|
|
5
38
|
### Minor Changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { forwardRef, Divider as Divider$1, Stack as Stack$1, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Button as Button$1, Box, Center, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, useMultiStyleConfig, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, Flex, useFormControlContext, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, chakra, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, 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, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useColorModeValue, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerCloseButton, DrawerBody, usePopoverContext, DarkMode, PopoverCloseButton, ChakraProvider, HStack, useToast as useToast$1, useInterval } from '@chakra-ui/react';
|
2
|
-
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, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
2
|
+
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, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
3
3
|
import tokens10__default from '@vygruppen/spor-design-tokens';
|
4
4
|
import * as tokens10 from '@vygruppen/spor-design-tokens';
|
5
5
|
export { tokens10 as tokens };
|
@@ -3785,37 +3785,53 @@ var DatePicker = forwardRef$1(
|
|
3785
3785
|
showYearNavigation
|
3786
3786
|
}
|
3787
3787
|
))));
|
3788
|
-
return /* @__PURE__ */ React69__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React69__default.createElement(
|
3789
|
-
|
3788
|
+
return /* @__PURE__ */ React69__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React69__default.createElement(
|
3789
|
+
Box,
|
3790
3790
|
{
|
3791
|
-
|
3792
|
-
|
3793
|
-
|
3794
|
-
|
3791
|
+
position: "relative",
|
3792
|
+
display: "inline-flex",
|
3793
|
+
flexDirection: "column",
|
3794
|
+
width
|
3795
3795
|
},
|
3796
|
-
/* @__PURE__ */ React69__default.createElement(
|
3797
|
-
|
3796
|
+
/* @__PURE__ */ React69__default.createElement(
|
3797
|
+
Popover,
|
3798
3798
|
{
|
3799
|
-
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3799
|
+
...dialogProps,
|
3800
|
+
isOpen: state2.isOpen,
|
3801
|
+
onOpen: state2.open,
|
3802
|
+
onClose: state2.close
|
3803
3803
|
},
|
3804
|
-
/* @__PURE__ */ React69__default.createElement(
|
3805
|
-
|
3806
|
-
DateField,
|
3804
|
+
/* @__PURE__ */ React69__default.createElement(InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React69__default.createElement(
|
3805
|
+
StyledField,
|
3807
3806
|
{
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
}
|
3813
|
-
|
3814
|
-
|
3815
|
-
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3807
|
+
variant,
|
3808
|
+
onClick: onFieldClick,
|
3809
|
+
paddingX: 3,
|
3810
|
+
minHeight
|
3811
|
+
},
|
3812
|
+
/* @__PURE__ */ React69__default.createElement(PopoverTrigger, null, /* @__PURE__ */ React69__default.createElement(
|
3813
|
+
CalendarTriggerButton,
|
3814
|
+
{
|
3815
|
+
variant,
|
3816
|
+
ref,
|
3817
|
+
...buttonProps
|
3818
|
+
}
|
3819
|
+
)),
|
3820
|
+
/* @__PURE__ */ React69__default.createElement(
|
3821
|
+
DateField,
|
3822
|
+
{
|
3823
|
+
label: props.label,
|
3824
|
+
labelProps,
|
3825
|
+
name: props.name,
|
3826
|
+
...fieldProps
|
3827
|
+
}
|
3828
|
+
)
|
3829
|
+
))),
|
3830
|
+
/* @__PURE__ */ React69__default.createElement(FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3831
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__default.createElement(Portal, null, popoverContent),
|
3832
|
+
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3833
|
+
)
|
3834
|
+
));
|
3819
3835
|
}
|
3820
3836
|
);
|
3821
3837
|
function RangeCalendar(props) {
|
@@ -5085,7 +5101,7 @@ var texts14 = createTexts({
|
|
5085
5101
|
sv: "Telefonnummer"
|
5086
5102
|
}
|
5087
5103
|
});
|
5088
|
-
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-
|
5104
|
+
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-7WPJ6BDU.mjs'));
|
5089
5105
|
var Radio = forwardRef((props, ref) => {
|
5090
5106
|
return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
|
5091
5107
|
});
|
@@ -5696,7 +5712,7 @@ var Notch = forwardRef((props, ref) => {
|
|
5696
5712
|
/* @__PURE__ */ React69__default.createElement(
|
5697
5713
|
Center,
|
5698
5714
|
{
|
5699
|
-
background:
|
5715
|
+
background: placement === "bottom" ? "bottom" : "top",
|
5700
5716
|
padding: 2,
|
5701
5717
|
borderRadius: "md"
|
5702
5718
|
},
|
@@ -11522,26 +11538,6 @@ var config6 = defineStyleConfig$1({
|
|
11522
11538
|
}
|
11523
11539
|
}
|
11524
11540
|
}),
|
11525
|
-
/**
|
11526
|
-
* @deprecated use `secondary` instead.
|
11527
|
-
*/
|
11528
|
-
tertiary: {
|
11529
|
-
backgroundColor: "mint",
|
11530
|
-
color: "darkGrey",
|
11531
|
-
fontWeight: "normal",
|
11532
|
-
...focusVisible({
|
11533
|
-
focus: {
|
11534
|
-
boxShadow: `inset 0 0 0 4px ${colors.mint}, inset 0 0 0 4px ${colors.mint}, inset 0 0 0 6px currentColor`
|
11535
|
-
},
|
11536
|
-
notFocus: { boxShadow: "none" }
|
11537
|
-
}),
|
11538
|
-
_hover: {
|
11539
|
-
backgroundColor: "seaMist"
|
11540
|
-
},
|
11541
|
-
_active: {
|
11542
|
-
backgroundColor: "lightGrey"
|
11543
|
-
}
|
11544
|
-
},
|
11545
11541
|
additional: (props) => ({
|
11546
11542
|
backgroundColor: "transparent",
|
11547
11543
|
color: mode("darkGrey", "white")(props),
|
@@ -11679,7 +11675,7 @@ var config7 = defineStyleConfig$1({
|
|
11679
11675
|
transitionDuration: "fast",
|
11680
11676
|
borderRadius: "md",
|
11681
11677
|
...getColorSchemeBaseProps(props),
|
11682
|
-
"button&, a
|
11678
|
+
"button&, a&, label&, &.is-clickable": {
|
11683
11679
|
...getColorSchemeClickableProps(props),
|
11684
11680
|
_hover: getColorSchemeHoverProps(props),
|
11685
11681
|
_active: getColorSchemeActiveProps(props),
|
@@ -12170,7 +12166,7 @@ var config11 = defineStyleConfig$1({
|
|
12170
12166
|
}
|
12171
12167
|
}),
|
12172
12168
|
_hover: {
|
12173
|
-
backgroundColor: mode("seaMist", "
|
12169
|
+
backgroundColor: mode("seaMist", "whiteAlpha.100")(props),
|
12174
12170
|
_disabled: {
|
12175
12171
|
color: "dimGrey"
|
12176
12172
|
}
|
@@ -12519,7 +12515,8 @@ var config14 = helpers7.defineMultiStyleConfig({
|
|
12519
12515
|
baseStyle: (props) => ({
|
12520
12516
|
overlay: {
|
12521
12517
|
backgroundColor: "blackAlpha.600",
|
12522
|
-
zIndex: "modal"
|
12518
|
+
zIndex: "modal",
|
12519
|
+
color: "red"
|
12523
12520
|
},
|
12524
12521
|
dialogContainer: {
|
12525
12522
|
display: "flex",
|
@@ -12529,8 +12526,8 @@ var config14 = helpers7.defineMultiStyleConfig({
|
|
12529
12526
|
overflow: props.scrollBehavior === "inside" ? "hidden" : "auto"
|
12530
12527
|
},
|
12531
12528
|
dialog: {
|
12532
|
-
|
12533
|
-
color: "inherit",
|
12529
|
+
backgroundColor: mode("white", "pine")(props),
|
12530
|
+
color: mode("inherit", "white")(props),
|
12534
12531
|
zIndex: "modal",
|
12535
12532
|
maxHeight: props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : void 0,
|
12536
12533
|
boxShadow: "md"
|
@@ -13510,47 +13507,6 @@ var config23 = defineStyleConfig$1({
|
|
13510
13507
|
backgroundColor: mode("mint", "whiteAlpha.100")(props),
|
13511
13508
|
color: mode("darkGrey", "white")(props)
|
13512
13509
|
}
|
13513
|
-
}),
|
13514
|
-
/**
|
13515
|
-
* @deprecated tertiary style will be deprecated in the future.
|
13516
|
-
* Please use the secondary style instead.
|
13517
|
-
*/
|
13518
|
-
tertiary: (props) => ({
|
13519
|
-
color: "white",
|
13520
|
-
...focusVisible({
|
13521
|
-
focus: {
|
13522
|
-
color: "pine",
|
13523
|
-
backgroundColor: "white",
|
13524
|
-
boxShadow: getBoxShadowString({
|
13525
|
-
borderColor: "white",
|
13526
|
-
borderWidth: 3,
|
13527
|
-
isInset: false
|
13528
|
-
})
|
13529
|
-
},
|
13530
|
-
notFocus: {
|
13531
|
-
color: "white",
|
13532
|
-
boxShadow: "none",
|
13533
|
-
backgroundColor: "transparent"
|
13534
|
-
}
|
13535
|
-
}),
|
13536
|
-
_hover: {
|
13537
|
-
color: "white",
|
13538
|
-
backgroundColor: "whiteAlpha.200",
|
13539
|
-
boxShadow: getBoxShadowString({
|
13540
|
-
borderColor: props.theme.colors.whiteAlpha[200],
|
13541
|
-
borderWidth: 3,
|
13542
|
-
isInset: false
|
13543
|
-
})
|
13544
|
-
},
|
13545
|
-
_active: {
|
13546
|
-
color: "white",
|
13547
|
-
backgroundColor: "whiteAlpha.400",
|
13548
|
-
boxShadow: getBoxShadowString({
|
13549
|
-
borderColor: props.theme.colors.whiteAlpha[400],
|
13550
|
-
borderWidth: 3,
|
13551
|
-
isInset: false
|
13552
|
-
})
|
13553
|
-
}
|
13554
13510
|
})
|
13555
13511
|
},
|
13556
13512
|
defaultProps: {
|
@@ -13768,7 +13724,7 @@ var config26 = helpers17.defineMultiStyleConfig({
|
|
13768
13724
|
},
|
13769
13725
|
dialog: {
|
13770
13726
|
borderRadius: "md",
|
13771
|
-
background: mode("white", "
|
13727
|
+
background: mode("white", "pine")(props),
|
13772
13728
|
color: mode("inherit", "white")(props),
|
13773
13729
|
my: "3.75rem",
|
13774
13730
|
zIndex: "modal",
|
@@ -13839,12 +13795,12 @@ var $arrowBg3 = cssVar$1("popper-arrow-bg");
|
|
13839
13795
|
var $arrowShadowColor2 = cssVar$1("popper-arrow-shadow-color");
|
13840
13796
|
var helpers18 = createMultiStyleConfigHelpers$1(popoverAnatomy.keys);
|
13841
13797
|
var config27 = helpers18.defineMultiStyleConfig({
|
13842
|
-
baseStyle: {
|
13798
|
+
baseStyle: (props) => ({
|
13843
13799
|
popper: {
|
13844
13800
|
zIndex: "popover"
|
13845
13801
|
},
|
13846
13802
|
content: {
|
13847
|
-
[$popperBg2.variable]: `colors.darkTeal`,
|
13803
|
+
[$popperBg2.variable]: mode(`colors.darkTeal`, `colors.pine`)(props),
|
13848
13804
|
backgroundColor: $popperBg2.reference,
|
13849
13805
|
[$arrowBg3.variable]: $popperBg2.reference,
|
13850
13806
|
[$arrowShadowColor2.variable]: `colors.blackAlpha.300`,
|
@@ -13865,6 +13821,19 @@ var config27 = helpers18.defineMultiStyleConfig({
|
|
13865
13821
|
},
|
13866
13822
|
closeButton: {
|
13867
13823
|
position: "absolute",
|
13824
|
+
color: "white",
|
13825
|
+
hover: "whiteAlpha.100",
|
13826
|
+
...focusVisible({
|
13827
|
+
focus: {
|
13828
|
+
boxShadow: getBoxShadowString({ borderColor: "azure" })
|
13829
|
+
},
|
13830
|
+
notFocus: {
|
13831
|
+
boxShadow: "none"
|
13832
|
+
}
|
13833
|
+
}),
|
13834
|
+
_active: {
|
13835
|
+
backgroundColor: "whiteAlpha.200"
|
13836
|
+
},
|
13868
13837
|
borderRadius: "xs",
|
13869
13838
|
top: 1,
|
13870
13839
|
insetEnd: 1,
|
@@ -13872,7 +13841,7 @@ var config27 = helpers18.defineMultiStyleConfig({
|
|
13872
13841
|
height: 2,
|
13873
13842
|
padding: 1
|
13874
13843
|
}
|
13875
|
-
},
|
13844
|
+
}),
|
13876
13845
|
sizes: {
|
13877
13846
|
sm: {
|
13878
13847
|
content: {
|
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DividerProps as DividerProps$1, As, BoxProps, StackProps as StackProps$1, AccordionProps as AccordionProps$1, AccordionItemProps, BreadcrumbProps as BreadcrumbProps$1, ButtonProps as ButtonProps$1, ButtonGroupProps as ButtonGroupProps$1, IconButtonProps as IconButtonProps$1, ComponentWithAs, ResponsiveValue, FlexProps, CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, StackDirection, FormControlProps as FormControlProps$1, FormLabelProps as FormLabelProps$1, InputProps as InputProps$1, InputElementProps as InputElementProps$1, SelectProps, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SwitchProps as SwitchProps$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, SkeletonTextProps as SkeletonTextProps$1, ModalHeaderProps as ModalHeaderProps$1, DrawerContentProps, DrawerProps as DrawerProps$1, PopoverProps, ChakraProviderProps, TabsProps as TabsProps$1, TableProps as TableProps$1, BadgeProps as BadgeProps$1, CodeProps as CodeProps$1, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
2
|
-
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, Center, CenterProps, Collapse, CollapseProps, Container, ContainerProps, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormHelperText, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Img, ImgProps, InputGroup, InputGroupProps, LightMode, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, ScaleFade, ScaleFadeProps, SimpleGrid, SimpleGridProps, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, SpacerProps, Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableFooterProps, TableHeadProps, TableRowProps, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, UseClipboardOptions, UseDisclosureProps, UseOutsideClickProps, VStack, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
2
|
+
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, Center, CenterProps, Collapse, CollapseProps, Container, ContainerProps, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormHelperText, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Img, ImgProps, InputGroup, InputGroupProps, LightMode, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, ScaleFade, ScaleFadeProps, SimpleGrid, SimpleGridProps, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, SpacerProps, Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableFooterProps, TableHeadProps, TableRowProps, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, UseClipboardOptions, UseDisclosureProps, UseOutsideClickProps, VStack, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
3
3
|
import tokens__default from '@vygruppen/spor-design-tokens';
|
4
4
|
import * as tokens from '@vygruppen/spor-design-tokens';
|
5
5
|
export { tokens };
|
@@ -266,9 +266,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
266
266
|
*
|
267
267
|
* Defaults to "primary"
|
268
268
|
*/
|
269
|
-
variant?: "control" | "primary" | "secondary"
|
270
|
-
/** @deprecated Use `secondary` instead */
|
271
|
-
| "tertiary" | "additional" | "ghost" | "floating";
|
269
|
+
variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
|
272
270
|
};
|
273
271
|
/**
|
274
272
|
* Buttons are used to trigger actions.
|
@@ -278,8 +276,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
278
276
|
* - `control`: This button is used for ticket controls only.
|
279
277
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
280
278
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
281
|
-
* - `
|
282
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
279
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
283
280
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
284
281
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
285
282
|
*
|
@@ -292,7 +289,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
292
289
|
* There are also different sizes. You can specify which one you want with the `size` prop. The available sizes are "lg", "md", "sm" and "xs".
|
293
290
|
*
|
294
291
|
* ```tsx
|
295
|
-
* <Button variant="
|
292
|
+
* <Button variant="secondary" size="sm" onClick={cancelOrder}>
|
296
293
|
* Cancel trip
|
297
294
|
* </Button>
|
298
295
|
* ```
|
@@ -309,7 +306,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
|
|
309
306
|
*
|
310
307
|
* ```tsx
|
311
308
|
* <ButtonGroup>
|
312
|
-
* <Button variant="
|
309
|
+
* <Button variant="secondary">Cancel</Button>
|
313
310
|
* <Button variant="primary">Save</Button>
|
314
311
|
* </ButtonGroup>
|
315
312
|
* ```
|
@@ -337,7 +334,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
|
|
337
334
|
declare const ButtonGroup: _chakra_ui_system_dist_system_types.ComponentWithAs<"div", ButtonGroupProps$1>;
|
338
335
|
|
339
336
|
type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
|
340
|
-
variant: "control" | "primary" | "secondary" | "
|
337
|
+
variant: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
|
341
338
|
};
|
342
339
|
/**
|
343
340
|
* An icon-only button.
|
@@ -349,8 +346,7 @@ type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
|
|
349
346
|
* - `control`: This button is used for ticket controls only.
|
350
347
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
351
348
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
352
|
-
* - `
|
353
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
349
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
354
350
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
355
351
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
356
352
|
*
|
@@ -393,13 +389,7 @@ type CloseButtonProps = Omit<IconButtonProps, "variant" | "aria-label"> & {
|
|
393
389
|
declare const CloseButton: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", CloseButtonProps>;
|
394
390
|
|
395
391
|
type FloatingActionButtonProps = BoxProps & {
|
396
|
-
variant?:
|
397
|
-
/** @deprecated dark is deprecated please use accent*/
|
398
|
-
"green"
|
399
|
-
/** @deprecated dark is deprecated please use accent*/
|
400
|
-
| "light"
|
401
|
-
/** @deprecated dark is deprecated please use accent*/
|
402
|
-
| "dark" | "accent" | "base" | "brand";
|
392
|
+
variant?: "accent" | "base" | "brand";
|
403
393
|
placement?: "bottom right" | "bottom left" | "top right" | "top left";
|
404
394
|
icon: React__default.ReactNode;
|
405
395
|
children: React__default.ReactNode;
|
@@ -412,7 +402,7 @@ type FloatingActionButtonProps = BoxProps & {
|
|
412
402
|
*
|
413
403
|
* ```tsx
|
414
404
|
* <FloatingActionButton
|
415
|
-
* variant="
|
405
|
+
* variant="accent"
|
416
406
|
* icon={<TicketControlFill30Icon />}
|
417
407
|
* placement="bottom right"
|
418
408
|
* />
|
@@ -459,10 +449,10 @@ declare const Card: _chakra_ui_system_dist_system_types.ComponentWithAs<As, Card
|
|
459
449
|
/**
|
460
450
|
* A date picker component.
|
461
451
|
*
|
462
|
-
* There are
|
452
|
+
* There are three different variants – `base`, `floating` and `ghost`.
|
463
453
|
*
|
464
454
|
* ```tsx
|
465
|
-
* <DatePicker label="Dato" variant="
|
455
|
+
* <DatePicker label="Dato" variant="base" />
|
466
456
|
* ```
|
467
457
|
*/
|
468
458
|
declare const DatePicker: React__default.ForwardRefExoticComponent<AriaDatePickerProps<DateValue> & Pick<BoxProps, "width" | "minHeight"> & {
|
@@ -483,10 +473,10 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
|
|
483
473
|
/**
|
484
474
|
* A date range picker component.
|
485
475
|
*
|
486
|
-
* There are
|
476
|
+
* There are three variants to choose from – `base`, `floating` and `ghost`.
|
487
477
|
*
|
488
478
|
* ```tsx
|
489
|
-
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="
|
479
|
+
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="base" />
|
490
480
|
* ```
|
491
481
|
*/
|
492
482
|
declare function DateRangePicker({ variant, minHeight, startName, endName, withPortal, ...props }: DateRangePickerProps): React__default.JSX.Element;
|
@@ -1424,13 +1414,11 @@ type TravelTagProps = TagProps & BoxProps & {
|
|
1424
1414
|
declare const TravelTag: _chakra_ui_system_dist_system_types.ComponentWithAs<As, TravelTagProps>;
|
1425
1415
|
|
1426
1416
|
type LinkProps = Omit<LinkProps$1, "variant"> & {
|
1427
|
-
variant?: "primary" | "secondary"
|
1428
|
-
/** @deprecated Use `secondary` instead */
|
1429
|
-
| "tertiary";
|
1417
|
+
variant?: "primary" | "secondary";
|
1430
1418
|
};
|
1431
1419
|
/** Link to different sites or parts of site
|
1432
1420
|
*
|
1433
|
-
* You can specify the `variant` prop to get different link designs.
|
1421
|
+
* You can specify the `variant` prop to get different link designs.
|
1434
1422
|
*/
|
1435
1423
|
declare const TextLink: _chakra_ui_system_dist_system_types.ComponentWithAs<"a", LinkProps>;
|
1436
1424
|
|
@@ -1895,15 +1883,7 @@ type StepperStepProps = {
|
|
1895
1883
|
declare const StepperStep: ({ children, stepNumber }: StepperStepProps) => React__default.JSX.Element;
|
1896
1884
|
|
1897
1885
|
type TabsProps = Exclude<TabsProps$1, "colorScheme" | "variant" | "orientation" | "size"> & {
|
1898
|
-
colorScheme:
|
1899
|
-
/** @deprecated dark is deprecated please use accent*/
|
1900
|
-
"dark"
|
1901
|
-
/** @deprecated light is deprecated please use default*/
|
1902
|
-
| "light"
|
1903
|
-
/** @deprecated green is deprecated please use accent*/
|
1904
|
-
| "green"
|
1905
|
-
/** @deprecated grey is deprecated please use default*/
|
1906
|
-
| "grey" | "base" | "accent";
|
1886
|
+
colorScheme: "base" | "accent";
|
1907
1887
|
/** Defaults to `md` */
|
1908
1888
|
size?: "sm" | "md" | "lg" | "xl";
|
1909
1889
|
/** Defaults to `round` */
|
@@ -2341,20 +2321,6 @@ declare const theme: {
|
|
2341
2321
|
backgroundColor: string;
|
2342
2322
|
};
|
2343
2323
|
};
|
2344
|
-
tertiary: {
|
2345
|
-
_hover: {
|
2346
|
-
backgroundColor: string;
|
2347
|
-
};
|
2348
|
-
_active: {
|
2349
|
-
backgroundColor: string;
|
2350
|
-
};
|
2351
|
-
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
2352
|
-
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
2353
|
-
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
2354
|
-
backgroundColor: string;
|
2355
|
-
color: string;
|
2356
|
-
fontWeight: string;
|
2357
|
-
};
|
2358
2324
|
additional: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2359
2325
|
_hover: {
|
2360
2326
|
boxShadow: string;
|
@@ -2405,13 +2371,13 @@ declare const theme: {
|
|
2405
2371
|
} | undefined;
|
2406
2372
|
defaultProps?: {
|
2407
2373
|
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
2408
|
-
variant?: "control" | "primary" | "secondary" | "
|
2374
|
+
variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating" | undefined;
|
2409
2375
|
colorScheme?: string | undefined;
|
2410
2376
|
} | undefined;
|
2411
2377
|
};
|
2412
2378
|
Card: {
|
2413
2379
|
baseStyle?: ((props: any) => {
|
2414
|
-
"button&, a
|
2380
|
+
"button&, a&, label&, &.is-clickable": {
|
2415
2381
|
_disabled: {
|
2416
2382
|
backgroundColor: string;
|
2417
2383
|
boxShadow: string;
|
@@ -2469,7 +2435,7 @@ declare const theme: {
|
|
2469
2435
|
transitionDuration: string;
|
2470
2436
|
borderRadius: string;
|
2471
2437
|
} | {
|
2472
|
-
"button&, a
|
2438
|
+
"button&, a&, label&, &.is-clickable": {
|
2473
2439
|
_disabled: {
|
2474
2440
|
backgroundColor: string;
|
2475
2441
|
boxShadow: string;
|
@@ -3123,6 +3089,7 @@ declare const theme: {
|
|
3123
3089
|
overlay: {
|
3124
3090
|
backgroundColor: string;
|
3125
3091
|
zIndex: string;
|
3092
|
+
color: string;
|
3126
3093
|
};
|
3127
3094
|
dialogContainer: {
|
3128
3095
|
display: string;
|
@@ -3132,7 +3099,7 @@ declare const theme: {
|
|
3132
3099
|
overflow: string;
|
3133
3100
|
};
|
3134
3101
|
dialog: {
|
3135
|
-
|
3102
|
+
backgroundColor: string;
|
3136
3103
|
color: string;
|
3137
3104
|
zIndex: string;
|
3138
3105
|
maxHeight: string | undefined;
|
@@ -3435,7 +3402,7 @@ declare const theme: {
|
|
3435
3402
|
} | undefined;
|
3436
3403
|
defaultProps?: {
|
3437
3404
|
size?: string | number | undefined;
|
3438
|
-
variant?: "base" | "green" | "light" | "
|
3405
|
+
variant?: "base" | "green" | "light" | "accent" | "brand" | "dark" | undefined;
|
3439
3406
|
colorScheme?: string | undefined;
|
3440
3407
|
} | undefined;
|
3441
3408
|
parts: ("text" | "container" | "icon")[];
|
@@ -3962,26 +3929,10 @@ declare const theme: {
|
|
3962
3929
|
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
3963
3930
|
color: string;
|
3964
3931
|
};
|
3965
|
-
tertiary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3966
|
-
_hover: {
|
3967
|
-
color: string;
|
3968
|
-
backgroundColor: string;
|
3969
|
-
boxShadow: string;
|
3970
|
-
};
|
3971
|
-
_active: {
|
3972
|
-
color: string;
|
3973
|
-
backgroundColor: string;
|
3974
|
-
boxShadow: string;
|
3975
|
-
};
|
3976
|
-
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
3977
|
-
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
3978
|
-
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
3979
|
-
color: string;
|
3980
|
-
};
|
3981
3932
|
} | undefined;
|
3982
3933
|
defaultProps?: {
|
3983
3934
|
size?: string | number | undefined;
|
3984
|
-
variant?: "primary" | "secondary" |
|
3935
|
+
variant?: "primary" | "secondary" | undefined;
|
3985
3936
|
colorScheme?: string | undefined;
|
3986
3937
|
} | undefined;
|
3987
3938
|
};
|
@@ -4239,7 +4190,7 @@ declare const theme: {
|
|
4239
4190
|
parts: ("body" | "dialog" | "footer" | "header" | "overlay" | "closeButton" | "dialogContainer")[];
|
4240
4191
|
};
|
4241
4192
|
Popover: {
|
4242
|
-
baseStyle?: {
|
4193
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
4243
4194
|
popper: {
|
4244
4195
|
zIndex: string;
|
4245
4196
|
};
|
@@ -4265,15 +4216,23 @@ declare const theme: {
|
|
4265
4216
|
clipPath: string;
|
4266
4217
|
};
|
4267
4218
|
closeButton: {
|
4268
|
-
|
4219
|
+
_active: {
|
4220
|
+
backgroundColor: string;
|
4221
|
+
};
|
4269
4222
|
borderRadius: string;
|
4270
4223
|
top: number;
|
4271
4224
|
insetEnd: number;
|
4272
4225
|
width: number;
|
4273
4226
|
height: number;
|
4274
4227
|
padding: number;
|
4228
|
+
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
4229
|
+
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
4230
|
+
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
4231
|
+
position: string;
|
4232
|
+
color: string;
|
4233
|
+
hover: string;
|
4275
4234
|
};
|
4276
|
-
} | undefined;
|
4235
|
+
}) | undefined;
|
4277
4236
|
sizes?: {
|
4278
4237
|
sm: {
|
4279
4238
|
content: {
|