@vygruppen/spor-react 3.5.1 → 3.6.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 +10 -10
- package/CHANGELOG.md +26 -0
- package/dist/{CountryCodeSelect-IS3VUSPZ.mjs → CountryCodeSelect-V4MXCPSH.mjs} +1 -1
- package/dist/{chunk-HZ6V7HFA.mjs → chunk-ESGJSWZ3.mjs} +51 -25
- package/dist/index.d.mts +51 -34
- package/dist/index.d.ts +51 -34
- package/dist/index.js +56 -23
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/alert/BaseAlert.tsx +1 -1
- package/src/alert/ExpandableAlert.tsx +3 -3
- package/src/layout/Divider.tsx +15 -14
- package/src/theme/components/accordion.ts +6 -6
- package/src/theme/components/divider.ts +44 -0
- package/src/theme/components/index.ts +2 -0
- package/src/theme/foundations/lineHeights.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@3.
|
2
|
+
> @vygruppen/spor-react@3.6.0 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -9,14 +9,14 @@
|
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
|
-
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-HZ6V7HFA.mjs".
|
13
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-ESGJSWZ3.mjs".
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m532.57 KB[39m
|
15
|
+
[32mCJS[39m ⚡️ Build success in 4314ms
|
14
16
|
[32mESM[39m [1mdist/index.mjs [22m[32m2.06 KB[39m
|
15
|
-
[32mESM[39m [1mdist/CountryCodeSelect-
|
16
|
-
[32mESM[39m [1mdist/chunk-
|
17
|
-
[32mESM[39m ⚡️ Build success in
|
18
|
-
[
|
19
|
-
[
|
20
|
-
[32mDTS[39m
|
21
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m253.60 KB[39m
|
22
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m253.60 KB[39m
|
17
|
+
[32mESM[39m [1mdist/CountryCodeSelect-V4MXCPSH.mjs [22m[32m1.19 KB[39m
|
18
|
+
[32mESM[39m [1mdist/chunk-ESGJSWZ3.mjs [22m[32m426.03 KB[39m
|
19
|
+
[32mESM[39m ⚡️ Build success in 4318ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 22259ms
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m254.26 KB[39m
|
22
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m254.26 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 3.6.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 8d2cf4d3: Divider: Implement size and variant props
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- 1d30e122: Icons: Re-add viewBox prop to all icons, making them scalable
|
12
|
+
ExpandableAlert: Ensure the text size is equal across title and content
|
13
|
+
- Updated dependencies [1d30e122]
|
14
|
+
- @vygruppen/spor-icon-react@3.2.3
|
15
|
+
|
16
|
+
## 3.5.2
|
17
|
+
|
18
|
+
### Patch Changes
|
19
|
+
|
20
|
+
- cfa3ebb1: ExpandableAlert: Fix double padding bug
|
21
|
+
Other:
|
22
|
+
|
23
|
+
- Set the document-level line height to a valid value
|
24
|
+
- Fix a bug with icon generation
|
25
|
+
|
26
|
+
- Updated dependencies [cfa3ebb1]
|
27
|
+
- @vygruppen/spor-icon-react@3.2.2
|
28
|
+
|
3
29
|
## 3.5.1
|
4
30
|
|
5
31
|
### Patch Changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { forwardRef,
|
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, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, useMultiStyleConfig, PopoverAnchor, FormLabel, Flex, useFormControlContext, useBreakpointValue, 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
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, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, 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, 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';
|
@@ -770,19 +770,7 @@ var require_lodash = __commonJS({
|
|
770
770
|
}
|
771
771
|
});
|
772
772
|
var Divider = forwardRef((props, ref) => {
|
773
|
-
return /* @__PURE__ */ React50__default.createElement(
|
774
|
-
Box,
|
775
|
-
{
|
776
|
-
as: "hr",
|
777
|
-
height: "2px",
|
778
|
-
border: "0",
|
779
|
-
borderRadius: "1px",
|
780
|
-
backgroundColor: "blackAlpha.200",
|
781
|
-
width: "100%",
|
782
|
-
...props,
|
783
|
-
ref
|
784
|
-
}
|
785
|
-
);
|
773
|
+
return /* @__PURE__ */ React50__default.createElement(Divider$1, { ...props, ref });
|
786
774
|
});
|
787
775
|
var Stack = forwardRef(
|
788
776
|
({ flexDirection, ...props }, ref) => {
|
@@ -1438,7 +1426,7 @@ var texts5 = createTexts({
|
|
1438
1426
|
});
|
1439
1427
|
var BaseAlert = ({ variant, children, ...boxProps }) => {
|
1440
1428
|
const styles2 = useMultiStyleConfig("Alert", { variant });
|
1441
|
-
return /* @__PURE__ */ React50__default.createElement(Box, {
|
1429
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { __css: styles2.container, ...boxProps }, children);
|
1442
1430
|
};
|
1443
1431
|
|
1444
1432
|
// src/alert/ClosableAlert.tsx
|
@@ -1488,7 +1476,7 @@ var ExpandableAlert = ({
|
|
1488
1476
|
},
|
1489
1477
|
...boxProps
|
1490
1478
|
}) => {
|
1491
|
-
return /* @__PURE__ */ React50__default.createElement(BaseAlert, { variant, paddingX: 0, paddingY: 0
|
1479
|
+
return /* @__PURE__ */ React50__default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React50__default.createElement(
|
1492
1480
|
Accordion$1,
|
1493
1481
|
{
|
1494
1482
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1496,14 +1484,14 @@ var ExpandableAlert = ({
|
|
1496
1484
|
allowToggle: true,
|
1497
1485
|
flexGrow: "1"
|
1498
1486
|
},
|
1499
|
-
/* @__PURE__ */ React50__default.createElement(AccordionItem, null, /* @__PURE__ */ React50__default.createElement(AccordionButton, { paddingX: 3, paddingY: 2 }, /* @__PURE__ */ React50__default.createElement(
|
1487
|
+
/* @__PURE__ */ React50__default.createElement(AccordionItem, null, /* @__PURE__ */ React50__default.createElement(AccordionButton, { paddingX: 3, paddingY: 2, fontSize: "inherit" }, /* @__PURE__ */ React50__default.createElement(
|
1500
1488
|
Flex,
|
1501
1489
|
{
|
1502
1490
|
justifyContent: "space-between",
|
1503
1491
|
alignItems: "center",
|
1504
1492
|
flexGrow: "1"
|
1505
1493
|
},
|
1506
|
-
/* @__PURE__ */ React50__default.createElement(Flex, { as: headingLevel }, /* @__PURE__ */ React50__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React50__default.createElement(
|
1494
|
+
/* @__PURE__ */ React50__default.createElement(Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React50__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React50__default.createElement(
|
1507
1495
|
Box,
|
1508
1496
|
{
|
1509
1497
|
as: "span",
|
@@ -5095,7 +5083,7 @@ var texts14 = createTexts({
|
|
5095
5083
|
sv: "Telefonnummer"
|
5096
5084
|
}
|
5097
5085
|
});
|
5098
|
-
var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-
|
5086
|
+
var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-V4MXCPSH.mjs'));
|
5099
5087
|
var Radio = forwardRef((props, ref) => {
|
5100
5088
|
return /* @__PURE__ */ React50__default.createElement(Radio$1, { ...props, ref });
|
5101
5089
|
});
|
@@ -10816,6 +10804,7 @@ __export(components_exports, {
|
|
10816
10804
|
CloseButton: () => close_button_default,
|
10817
10805
|
Code: () => code_default,
|
10818
10806
|
Datepicker: () => datepicker_default,
|
10807
|
+
Divider: () => divider_default,
|
10819
10808
|
Drawer: () => drawer_default,
|
10820
10809
|
FloatingActionButton: () => fab_default,
|
10821
10810
|
Form: () => form_default,
|
@@ -10923,6 +10912,7 @@ var fontWeights = {
|
|
10923
10912
|
bold: 700
|
10924
10913
|
};
|
10925
10914
|
var lineHeights = {
|
10915
|
+
base: tokens10__default.font.style.lg["line-height"],
|
10926
10916
|
normal: tokens10__default.font.style.lg["line-height"]
|
10927
10917
|
};
|
10928
10918
|
var radii2 = {
|
@@ -11166,34 +11156,34 @@ var config3 = helpers.defineMultiStyleConfig({
|
|
11166
11156
|
sizes: {
|
11167
11157
|
sm: {
|
11168
11158
|
button: {
|
11169
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
11159
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
11170
11160
|
paddingX: 2,
|
11171
11161
|
paddingY: 1
|
11172
11162
|
},
|
11173
11163
|
panel: {
|
11174
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
11164
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
11175
11165
|
paddingX: 2
|
11176
11166
|
}
|
11177
11167
|
},
|
11178
11168
|
md: {
|
11179
11169
|
button: {
|
11180
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
11170
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
11181
11171
|
paddingX: 3,
|
11182
11172
|
paddingY: 1
|
11183
11173
|
},
|
11184
11174
|
panel: {
|
11185
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
11175
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
11186
11176
|
paddingX: 3
|
11187
11177
|
}
|
11188
11178
|
},
|
11189
11179
|
lg: {
|
11190
11180
|
button: {
|
11191
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
11181
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
11192
11182
|
paddingX: 3,
|
11193
11183
|
paddingY: 2
|
11194
11184
|
},
|
11195
11185
|
panel: {
|
11196
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
11186
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
11197
11187
|
paddingX: 3
|
11198
11188
|
}
|
11199
11189
|
}
|
@@ -12334,6 +12324,42 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12334
12324
|
}
|
12335
12325
|
});
|
12336
12326
|
var datepicker_default = config13;
|
12327
|
+
var baseStyle44 = defineStyle((props) => ({
|
12328
|
+
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props)
|
12329
|
+
}));
|
12330
|
+
var variantSolid5 = defineStyle({
|
12331
|
+
borderStyle: "solid"
|
12332
|
+
});
|
12333
|
+
var variantDashed2 = defineStyle({
|
12334
|
+
borderStyle: "dashed"
|
12335
|
+
});
|
12336
|
+
var variants14 = {
|
12337
|
+
solid: variantSolid5,
|
12338
|
+
dashed: variantDashed2
|
12339
|
+
};
|
12340
|
+
var sizes25 = {
|
12341
|
+
sm: {
|
12342
|
+
borderWidth: "1px",
|
12343
|
+
borderRadius: "0.5px"
|
12344
|
+
},
|
12345
|
+
md: {
|
12346
|
+
borderWidth: "2px",
|
12347
|
+
borderRadius: "1px"
|
12348
|
+
},
|
12349
|
+
lg: {
|
12350
|
+
borderWidth: "3px",
|
12351
|
+
borderRadius: "1.5px"
|
12352
|
+
}
|
12353
|
+
};
|
12354
|
+
var divider_default = defineStyleConfig({
|
12355
|
+
baseStyle: baseStyle44,
|
12356
|
+
variants: variants14,
|
12357
|
+
sizes: sizes25,
|
12358
|
+
defaultProps: {
|
12359
|
+
variant: "solid",
|
12360
|
+
size: "md"
|
12361
|
+
}
|
12362
|
+
});
|
12337
12363
|
var helpers7 = createMultiStyleConfigHelpers$1(modalAnatomy.keys);
|
12338
12364
|
var config14 = helpers7.defineMultiStyleConfig({
|
12339
12365
|
baseStyle: (props) => ({
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
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, 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
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, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, 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, 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';
|
@@ -17,7 +17,10 @@ export { Item, Section } from 'react-stately';
|
|
17
17
|
import * as _chakra_ui_theme_tools_dist_component from '@chakra-ui/theme-tools/dist/component';
|
18
18
|
import * as _chakra_ui_styled_system from '@chakra-ui/styled-system';
|
19
19
|
|
20
|
-
type DividerProps =
|
20
|
+
type DividerProps = DividerProps$1 & {
|
21
|
+
size?: "sm" | "md" | "lg";
|
22
|
+
variant?: "solid" | "dashed";
|
23
|
+
};
|
21
24
|
/** A dividing line, used to divide content.
|
22
25
|
*
|
23
26
|
* You can specify margins if you need to give the content some space, or use a `Stack` component to do it for you
|
@@ -25,6 +28,9 @@ type DividerProps = BoxProps;
|
|
25
28
|
* ```tsx
|
26
29
|
* <Divider marginTop={4} marginBottom={6} />
|
27
30
|
* ```
|
31
|
+
*
|
32
|
+
* There are three different sizes available: `sm`, `md` and `lg`. The default is `md`.
|
33
|
+
* There are two different variants available: `solid` and `dashed`. The default is `solid`.
|
28
34
|
*/
|
29
35
|
declare const Divider: _chakra_ui_system_dist_system_types.ComponentWithAs<As, BoxProps>;
|
30
36
|
|
@@ -1990,34 +1996,34 @@ declare const theme: {
|
|
1990
1996
|
sizes?: {
|
1991
1997
|
sm: {
|
1992
1998
|
button: {
|
1993
|
-
fontSize: ("mobile.xs" | "desktop.xs")[];
|
1999
|
+
fontSize: ("mobile.xs" | "desktop.xs" | null)[];
|
1994
2000
|
paddingX: number;
|
1995
2001
|
paddingY: number;
|
1996
2002
|
};
|
1997
2003
|
panel: {
|
1998
|
-
fontSize: ("mobile.xs" | "desktop.xs")[];
|
2004
|
+
fontSize: ("mobile.xs" | "desktop.xs" | null)[];
|
1999
2005
|
paddingX: number;
|
2000
2006
|
};
|
2001
2007
|
};
|
2002
2008
|
md: {
|
2003
2009
|
button: {
|
2004
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2010
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2005
2011
|
paddingX: number;
|
2006
2012
|
paddingY: number;
|
2007
2013
|
};
|
2008
2014
|
panel: {
|
2009
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2015
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2010
2016
|
paddingX: number;
|
2011
2017
|
};
|
2012
2018
|
};
|
2013
2019
|
lg: {
|
2014
2020
|
button: {
|
2015
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2021
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2016
2022
|
paddingX: number;
|
2017
2023
|
paddingY: number;
|
2018
2024
|
};
|
2019
2025
|
panel: {
|
2020
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2026
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2021
2027
|
paddingX: number;
|
2022
2028
|
};
|
2023
2029
|
};
|
@@ -2163,7 +2169,7 @@ declare const theme: {
|
|
2163
2169
|
} | undefined;
|
2164
2170
|
defaultProps?: {
|
2165
2171
|
size?: string | number | undefined;
|
2166
|
-
variant?: "
|
2172
|
+
variant?: "solid" | "outline" | undefined;
|
2167
2173
|
colorScheme?: string | undefined;
|
2168
2174
|
} | undefined;
|
2169
2175
|
};
|
@@ -2784,7 +2790,7 @@ declare const theme: {
|
|
2784
2790
|
} | undefined;
|
2785
2791
|
defaultProps?: {
|
2786
2792
|
size?: string | number | undefined;
|
2787
|
-
variant?: "
|
2793
|
+
variant?: "solid" | "outline" | undefined;
|
2788
2794
|
colorScheme?: string | undefined;
|
2789
2795
|
} | undefined;
|
2790
2796
|
};
|
@@ -2937,6 +2943,38 @@ declare const theme: {
|
|
2937
2943
|
} | undefined;
|
2938
2944
|
parts: ("dateCell" | "weekdays" | "weekend" | "calendar" | "calendarTriggerButton" | "dateTimeSegment" | "inputLabel" | "wrapper" | "arrow")[];
|
2939
2945
|
};
|
2946
|
+
Divider: {
|
2947
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2948
|
+
borderColor: string;
|
2949
|
+
}) | undefined;
|
2950
|
+
sizes?: {
|
2951
|
+
sm: {
|
2952
|
+
borderWidth: string;
|
2953
|
+
borderRadius: string;
|
2954
|
+
};
|
2955
|
+
md: {
|
2956
|
+
borderWidth: string;
|
2957
|
+
borderRadius: string;
|
2958
|
+
};
|
2959
|
+
lg: {
|
2960
|
+
borderWidth: string;
|
2961
|
+
borderRadius: string;
|
2962
|
+
};
|
2963
|
+
} | undefined;
|
2964
|
+
variants?: {
|
2965
|
+
solid: {
|
2966
|
+
borderStyle: string;
|
2967
|
+
};
|
2968
|
+
dashed: {
|
2969
|
+
borderStyle: string;
|
2970
|
+
};
|
2971
|
+
} | undefined;
|
2972
|
+
defaultProps?: {
|
2973
|
+
size?: "sm" | "md" | "lg" | undefined;
|
2974
|
+
variant?: "solid" | "dashed" | undefined;
|
2975
|
+
colorScheme?: string | undefined;
|
2976
|
+
} | undefined;
|
2977
|
+
};
|
2940
2978
|
Drawer: {
|
2941
2979
|
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2942
2980
|
overlay: {
|
@@ -4511,7 +4549,7 @@ declare const theme: {
|
|
4511
4549
|
} | undefined;
|
4512
4550
|
defaultProps?: {
|
4513
4551
|
size?: "sm" | "md" | "lg" | undefined;
|
4514
|
-
variant?: "
|
4552
|
+
variant?: "solid" | "outline" | undefined;
|
4515
4553
|
colorScheme?: string | undefined;
|
4516
4554
|
} | undefined;
|
4517
4555
|
parts: ("track" | "container" | "thumb")[];
|
@@ -5466,28 +5504,6 @@ declare const theme: {
|
|
5466
5504
|
colorScheme?: string | undefined;
|
5467
5505
|
} | undefined;
|
5468
5506
|
};
|
5469
|
-
Divider: {
|
5470
|
-
baseStyle?: {
|
5471
|
-
opacity: number;
|
5472
|
-
borderColor: string;
|
5473
|
-
} | undefined;
|
5474
|
-
sizes?: {
|
5475
|
-
[key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
|
5476
|
-
} | undefined;
|
5477
|
-
variants?: {
|
5478
|
-
solid: {
|
5479
|
-
borderStyle: string;
|
5480
|
-
};
|
5481
|
-
dashed: {
|
5482
|
-
borderStyle: string;
|
5483
|
-
};
|
5484
|
-
} | undefined;
|
5485
|
-
defaultProps?: {
|
5486
|
-
size?: string | number | undefined;
|
5487
|
-
variant?: "dashed" | "solid" | undefined;
|
5488
|
-
colorScheme?: string | undefined;
|
5489
|
-
} | undefined;
|
5490
|
-
};
|
5491
5507
|
Editable: {
|
5492
5508
|
baseStyle?: {
|
5493
5509
|
preview: {
|
@@ -6515,7 +6531,7 @@ declare const theme: {
|
|
6515
6531
|
} | undefined;
|
6516
6532
|
defaultProps?: {
|
6517
6533
|
size?: "sm" | "md" | "lg" | undefined;
|
6518
|
-
variant?: "
|
6534
|
+
variant?: "solid" | "outline" | "subtle" | undefined;
|
6519
6535
|
colorScheme?: string | undefined;
|
6520
6536
|
} | undefined;
|
6521
6537
|
parts: ("label" | "container" | "closeButton")[];
|
@@ -6612,6 +6628,7 @@ declare const theme: {
|
|
6612
6628
|
bold: number;
|
6613
6629
|
};
|
6614
6630
|
lineHeights: {
|
6631
|
+
base: string;
|
6615
6632
|
normal: string;
|
6616
6633
|
};
|
6617
6634
|
radii: {
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
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, 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
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, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, 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, 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';
|
@@ -17,7 +17,10 @@ export { Item, Section } from 'react-stately';
|
|
17
17
|
import * as _chakra_ui_theme_tools_dist_component from '@chakra-ui/theme-tools/dist/component';
|
18
18
|
import * as _chakra_ui_styled_system from '@chakra-ui/styled-system';
|
19
19
|
|
20
|
-
type DividerProps =
|
20
|
+
type DividerProps = DividerProps$1 & {
|
21
|
+
size?: "sm" | "md" | "lg";
|
22
|
+
variant?: "solid" | "dashed";
|
23
|
+
};
|
21
24
|
/** A dividing line, used to divide content.
|
22
25
|
*
|
23
26
|
* You can specify margins if you need to give the content some space, or use a `Stack` component to do it for you
|
@@ -25,6 +28,9 @@ type DividerProps = BoxProps;
|
|
25
28
|
* ```tsx
|
26
29
|
* <Divider marginTop={4} marginBottom={6} />
|
27
30
|
* ```
|
31
|
+
*
|
32
|
+
* There are three different sizes available: `sm`, `md` and `lg`. The default is `md`.
|
33
|
+
* There are two different variants available: `solid` and `dashed`. The default is `solid`.
|
28
34
|
*/
|
29
35
|
declare const Divider: _chakra_ui_system_dist_system_types.ComponentWithAs<As, BoxProps>;
|
30
36
|
|
@@ -1990,34 +1996,34 @@ declare const theme: {
|
|
1990
1996
|
sizes?: {
|
1991
1997
|
sm: {
|
1992
1998
|
button: {
|
1993
|
-
fontSize: ("mobile.xs" | "desktop.xs")[];
|
1999
|
+
fontSize: ("mobile.xs" | "desktop.xs" | null)[];
|
1994
2000
|
paddingX: number;
|
1995
2001
|
paddingY: number;
|
1996
2002
|
};
|
1997
2003
|
panel: {
|
1998
|
-
fontSize: ("mobile.xs" | "desktop.xs")[];
|
2004
|
+
fontSize: ("mobile.xs" | "desktop.xs" | null)[];
|
1999
2005
|
paddingX: number;
|
2000
2006
|
};
|
2001
2007
|
};
|
2002
2008
|
md: {
|
2003
2009
|
button: {
|
2004
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2010
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2005
2011
|
paddingX: number;
|
2006
2012
|
paddingY: number;
|
2007
2013
|
};
|
2008
2014
|
panel: {
|
2009
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2015
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2010
2016
|
paddingX: number;
|
2011
2017
|
};
|
2012
2018
|
};
|
2013
2019
|
lg: {
|
2014
2020
|
button: {
|
2015
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2021
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2016
2022
|
paddingX: number;
|
2017
2023
|
paddingY: number;
|
2018
2024
|
};
|
2019
2025
|
panel: {
|
2020
|
-
fontSize: ("mobile.sm" | "desktop.sm")[];
|
2026
|
+
fontSize: ("mobile.sm" | "desktop.sm" | null)[];
|
2021
2027
|
paddingX: number;
|
2022
2028
|
};
|
2023
2029
|
};
|
@@ -2163,7 +2169,7 @@ declare const theme: {
|
|
2163
2169
|
} | undefined;
|
2164
2170
|
defaultProps?: {
|
2165
2171
|
size?: string | number | undefined;
|
2166
|
-
variant?: "
|
2172
|
+
variant?: "solid" | "outline" | undefined;
|
2167
2173
|
colorScheme?: string | undefined;
|
2168
2174
|
} | undefined;
|
2169
2175
|
};
|
@@ -2784,7 +2790,7 @@ declare const theme: {
|
|
2784
2790
|
} | undefined;
|
2785
2791
|
defaultProps?: {
|
2786
2792
|
size?: string | number | undefined;
|
2787
|
-
variant?: "
|
2793
|
+
variant?: "solid" | "outline" | undefined;
|
2788
2794
|
colorScheme?: string | undefined;
|
2789
2795
|
} | undefined;
|
2790
2796
|
};
|
@@ -2937,6 +2943,38 @@ declare const theme: {
|
|
2937
2943
|
} | undefined;
|
2938
2944
|
parts: ("dateCell" | "weekdays" | "weekend" | "calendar" | "calendarTriggerButton" | "dateTimeSegment" | "inputLabel" | "wrapper" | "arrow")[];
|
2939
2945
|
};
|
2946
|
+
Divider: {
|
2947
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2948
|
+
borderColor: string;
|
2949
|
+
}) | undefined;
|
2950
|
+
sizes?: {
|
2951
|
+
sm: {
|
2952
|
+
borderWidth: string;
|
2953
|
+
borderRadius: string;
|
2954
|
+
};
|
2955
|
+
md: {
|
2956
|
+
borderWidth: string;
|
2957
|
+
borderRadius: string;
|
2958
|
+
};
|
2959
|
+
lg: {
|
2960
|
+
borderWidth: string;
|
2961
|
+
borderRadius: string;
|
2962
|
+
};
|
2963
|
+
} | undefined;
|
2964
|
+
variants?: {
|
2965
|
+
solid: {
|
2966
|
+
borderStyle: string;
|
2967
|
+
};
|
2968
|
+
dashed: {
|
2969
|
+
borderStyle: string;
|
2970
|
+
};
|
2971
|
+
} | undefined;
|
2972
|
+
defaultProps?: {
|
2973
|
+
size?: "sm" | "md" | "lg" | undefined;
|
2974
|
+
variant?: "solid" | "dashed" | undefined;
|
2975
|
+
colorScheme?: string | undefined;
|
2976
|
+
} | undefined;
|
2977
|
+
};
|
2940
2978
|
Drawer: {
|
2941
2979
|
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2942
2980
|
overlay: {
|
@@ -4511,7 +4549,7 @@ declare const theme: {
|
|
4511
4549
|
} | undefined;
|
4512
4550
|
defaultProps?: {
|
4513
4551
|
size?: "sm" | "md" | "lg" | undefined;
|
4514
|
-
variant?: "
|
4552
|
+
variant?: "solid" | "outline" | undefined;
|
4515
4553
|
colorScheme?: string | undefined;
|
4516
4554
|
} | undefined;
|
4517
4555
|
parts: ("track" | "container" | "thumb")[];
|
@@ -5466,28 +5504,6 @@ declare const theme: {
|
|
5466
5504
|
colorScheme?: string | undefined;
|
5467
5505
|
} | undefined;
|
5468
5506
|
};
|
5469
|
-
Divider: {
|
5470
|
-
baseStyle?: {
|
5471
|
-
opacity: number;
|
5472
|
-
borderColor: string;
|
5473
|
-
} | undefined;
|
5474
|
-
sizes?: {
|
5475
|
-
[key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
|
5476
|
-
} | undefined;
|
5477
|
-
variants?: {
|
5478
|
-
solid: {
|
5479
|
-
borderStyle: string;
|
5480
|
-
};
|
5481
|
-
dashed: {
|
5482
|
-
borderStyle: string;
|
5483
|
-
};
|
5484
|
-
} | undefined;
|
5485
|
-
defaultProps?: {
|
5486
|
-
size?: string | number | undefined;
|
5487
|
-
variant?: "dashed" | "solid" | undefined;
|
5488
|
-
colorScheme?: string | undefined;
|
5489
|
-
} | undefined;
|
5490
|
-
};
|
5491
5507
|
Editable: {
|
5492
5508
|
baseStyle?: {
|
5493
5509
|
preview: {
|
@@ -6515,7 +6531,7 @@ declare const theme: {
|
|
6515
6531
|
} | undefined;
|
6516
6532
|
defaultProps?: {
|
6517
6533
|
size?: "sm" | "md" | "lg" | undefined;
|
6518
|
-
variant?: "
|
6534
|
+
variant?: "solid" | "outline" | "subtle" | undefined;
|
6519
6535
|
colorScheme?: string | undefined;
|
6520
6536
|
} | undefined;
|
6521
6537
|
parts: ("label" | "container" | "closeButton")[];
|
@@ -6612,6 +6628,7 @@ declare const theme: {
|
|
6612
6628
|
bold: number;
|
6613
6629
|
};
|
6614
6630
|
lineHeights: {
|
6631
|
+
base: string;
|
6615
6632
|
normal: string;
|
6616
6633
|
};
|
6617
6634
|
radii: {
|
package/dist/index.js
CHANGED
@@ -72,19 +72,7 @@ exports.Divider = void 0;
|
|
72
72
|
var init_Divider = __esm({
|
73
73
|
"src/layout/Divider.tsx"() {
|
74
74
|
exports.Divider = react.forwardRef((props, ref) => {
|
75
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(
|
76
|
-
react.Box,
|
77
|
-
{
|
78
|
-
as: "hr",
|
79
|
-
height: "2px",
|
80
|
-
border: "0",
|
81
|
-
borderRadius: "1px",
|
82
|
-
backgroundColor: "blackAlpha.200",
|
83
|
-
width: "100%",
|
84
|
-
...props,
|
85
|
-
ref
|
86
|
-
}
|
87
|
-
);
|
75
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Divider, { ...props, ref });
|
88
76
|
});
|
89
77
|
}
|
90
78
|
});
|
@@ -958,7 +946,7 @@ var init_BaseAlert = __esm({
|
|
958
946
|
"src/alert/BaseAlert.tsx"() {
|
959
947
|
BaseAlert = ({ variant, children, ...boxProps }) => {
|
960
948
|
const styles2 = react.useMultiStyleConfig("Alert", { variant });
|
961
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, {
|
949
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: styles2.container, ...boxProps }, children);
|
962
950
|
};
|
963
951
|
}
|
964
952
|
});
|
@@ -1022,7 +1010,7 @@ var init_ExpandableAlert = __esm({
|
|
1022
1010
|
},
|
1023
1011
|
...boxProps
|
1024
1012
|
}) => {
|
1025
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(BaseAlert, { variant, paddingX: 0, paddingY: 0
|
1013
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React50__namespace.default.createElement(
|
1026
1014
|
react.Accordion,
|
1027
1015
|
{
|
1028
1016
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1030,14 +1018,14 @@ var init_ExpandableAlert = __esm({
|
|
1030
1018
|
allowToggle: true,
|
1031
1019
|
flexGrow: "1"
|
1032
1020
|
},
|
1033
|
-
/* @__PURE__ */ React50__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionButton, { paddingX: 3, paddingY: 2 }, /* @__PURE__ */ React50__namespace.default.createElement(
|
1021
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionButton, { paddingX: 3, paddingY: 2, fontSize: "inherit" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
1034
1022
|
react.Flex,
|
1035
1023
|
{
|
1036
1024
|
justifyContent: "space-between",
|
1037
1025
|
alignItems: "center",
|
1038
1026
|
flexGrow: "1"
|
1039
1027
|
},
|
1040
|
-
/* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { as: headingLevel }, /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React50__namespace.default.createElement(
|
1028
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React50__namespace.default.createElement(
|
1041
1029
|
react.Box,
|
1042
1030
|
{
|
1043
1031
|
as: "span",
|
@@ -12327,6 +12315,7 @@ var lineHeights;
|
|
12327
12315
|
var init_lineHeights = __esm({
|
12328
12316
|
"src/theme/foundations/lineHeights.ts"() {
|
12329
12317
|
lineHeights = {
|
12318
|
+
base: tokens10__namespace.default.font.style.lg["line-height"],
|
12330
12319
|
normal: tokens10__namespace.default.font.style.lg["line-height"]
|
12331
12320
|
};
|
12332
12321
|
}
|
@@ -12644,34 +12633,34 @@ var init_accordion2 = __esm({
|
|
12644
12633
|
sizes: {
|
12645
12634
|
sm: {
|
12646
12635
|
button: {
|
12647
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
12636
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
12648
12637
|
paddingX: 2,
|
12649
12638
|
paddingY: 1
|
12650
12639
|
},
|
12651
12640
|
panel: {
|
12652
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
12641
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
12653
12642
|
paddingX: 2
|
12654
12643
|
}
|
12655
12644
|
},
|
12656
12645
|
md: {
|
12657
12646
|
button: {
|
12658
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
12647
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
12659
12648
|
paddingX: 3,
|
12660
12649
|
paddingY: 1
|
12661
12650
|
},
|
12662
12651
|
panel: {
|
12663
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
12652
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
12664
12653
|
paddingX: 3
|
12665
12654
|
}
|
12666
12655
|
},
|
12667
12656
|
lg: {
|
12668
12657
|
button: {
|
12669
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
12658
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
12670
12659
|
paddingX: 3,
|
12671
12660
|
paddingY: 2
|
12672
12661
|
},
|
12673
12662
|
panel: {
|
12674
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
12663
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
12675
12664
|
paddingX: 3
|
12676
12665
|
}
|
12677
12666
|
}
|
@@ -13892,6 +13881,48 @@ var init_datepicker2 = __esm({
|
|
13892
13881
|
datepicker_default = config13;
|
13893
13882
|
}
|
13894
13883
|
});
|
13884
|
+
var baseStyle44, variantSolid5, variantDashed2, variants14, sizes25, divider_default;
|
13885
|
+
var init_divider = __esm({
|
13886
|
+
"src/theme/components/divider.ts"() {
|
13887
|
+
init_dist3();
|
13888
|
+
baseStyle44 = defineStyle((props) => ({
|
13889
|
+
borderColor: themeTools.mode("blackAlpha.300", "whiteAlpha.300")(props)
|
13890
|
+
}));
|
13891
|
+
variantSolid5 = defineStyle({
|
13892
|
+
borderStyle: "solid"
|
13893
|
+
});
|
13894
|
+
variantDashed2 = defineStyle({
|
13895
|
+
borderStyle: "dashed"
|
13896
|
+
});
|
13897
|
+
variants14 = {
|
13898
|
+
solid: variantSolid5,
|
13899
|
+
dashed: variantDashed2
|
13900
|
+
};
|
13901
|
+
sizes25 = {
|
13902
|
+
sm: {
|
13903
|
+
borderWidth: "1px",
|
13904
|
+
borderRadius: "0.5px"
|
13905
|
+
},
|
13906
|
+
md: {
|
13907
|
+
borderWidth: "2px",
|
13908
|
+
borderRadius: "1px"
|
13909
|
+
},
|
13910
|
+
lg: {
|
13911
|
+
borderWidth: "3px",
|
13912
|
+
borderRadius: "1.5px"
|
13913
|
+
}
|
13914
|
+
};
|
13915
|
+
divider_default = defineStyleConfig({
|
13916
|
+
baseStyle: baseStyle44,
|
13917
|
+
variants: variants14,
|
13918
|
+
sizes: sizes25,
|
13919
|
+
defaultProps: {
|
13920
|
+
variant: "solid",
|
13921
|
+
size: "md"
|
13922
|
+
}
|
13923
|
+
});
|
13924
|
+
}
|
13925
|
+
});
|
13895
13926
|
function getSize5(value) {
|
13896
13927
|
if (value === "full") {
|
13897
13928
|
return {
|
@@ -16386,6 +16417,7 @@ __export(components_exports, {
|
|
16386
16417
|
CloseButton: () => close_button_default,
|
16387
16418
|
Code: () => code_default,
|
16388
16419
|
Datepicker: () => datepicker_default,
|
16420
|
+
Divider: () => divider_default,
|
16389
16421
|
Drawer: () => drawer_default,
|
16390
16422
|
FloatingActionButton: () => fab_default,
|
16391
16423
|
Form: () => form_default,
|
@@ -16424,6 +16456,7 @@ var init_components = __esm({
|
|
16424
16456
|
init_close_button();
|
16425
16457
|
init_code();
|
16426
16458
|
init_datepicker2();
|
16459
|
+
init_divider();
|
16427
16460
|
init_drawer();
|
16428
16461
|
init_fab();
|
16429
16462
|
init_form();
|
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-ESGJSWZ3.mjs';
|
package/package.json
CHANGED
package/src/alert/BaseAlert.tsx
CHANGED
@@ -14,7 +14,7 @@ export type BaseAlertProps = BoxProps & {
|
|
14
14
|
export const BaseAlert = ({ variant, children, ...boxProps }: BaseAlertProps) => {
|
15
15
|
const styles = useMultiStyleConfig("Alert", { variant });
|
16
16
|
return (
|
17
|
-
<Box
|
17
|
+
<Box __css={styles.container} {...boxProps}>
|
18
18
|
{children}
|
19
19
|
</Box>
|
20
20
|
);
|
@@ -45,7 +45,7 @@ export const ExpandableAlert = ({
|
|
45
45
|
...boxProps
|
46
46
|
}: ExpandableAlertProps) => {
|
47
47
|
return (
|
48
|
-
<BaseAlert variant={variant}
|
48
|
+
<BaseAlert variant={variant} {...boxProps} paddingX={0} paddingY={0}>
|
49
49
|
<Accordion
|
50
50
|
onChange={(expandedIndex) => onToggle(expandedIndex === 0)}
|
51
51
|
defaultIndex={defaultOpen ? 0 : -1}
|
@@ -53,13 +53,13 @@ export const ExpandableAlert = ({
|
|
53
53
|
flexGrow="1"
|
54
54
|
>
|
55
55
|
<AccordionItem>
|
56
|
-
<AccordionButton paddingX={3} paddingY={2}>
|
56
|
+
<AccordionButton paddingX={3} paddingY={2} fontSize="inherit">
|
57
57
|
<Flex
|
58
58
|
justifyContent="space-between"
|
59
59
|
alignItems="center"
|
60
60
|
flexGrow="1"
|
61
61
|
>
|
62
|
-
<Flex as={headingLevel}>
|
62
|
+
<Flex as={headingLevel} alignItems="center">
|
63
63
|
<AlertIcon variant={variant} />
|
64
64
|
<Box
|
65
65
|
as="span"
|
package/src/layout/Divider.tsx
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
As,
|
3
|
+
BoxProps,
|
4
|
+
Divider as ChakraDivider,
|
5
|
+
DividerProps as ChakraDividerProps,
|
6
|
+
forwardRef,
|
7
|
+
} from "@chakra-ui/react";
|
2
8
|
import React from "react";
|
3
9
|
|
4
|
-
export type DividerProps =
|
10
|
+
export type DividerProps = ChakraDividerProps & {
|
11
|
+
size?: "sm" | "md" | "lg";
|
12
|
+
variant?: "solid" | "dashed";
|
13
|
+
};
|
5
14
|
/** A dividing line, used to divide content.
|
6
15
|
*
|
7
16
|
* You can specify margins if you need to give the content some space, or use a `Stack` component to do it for you
|
@@ -9,18 +18,10 @@ export type DividerProps = BoxProps;
|
|
9
18
|
* ```tsx
|
10
19
|
* <Divider marginTop={4} marginBottom={6} />
|
11
20
|
* ```
|
21
|
+
*
|
22
|
+
* There are three different sizes available: `sm`, `md` and `lg`. The default is `md`.
|
23
|
+
* There are two different variants available: `solid` and `dashed`. The default is `solid`.
|
12
24
|
*/
|
13
25
|
export const Divider = forwardRef<BoxProps, As>((props, ref) => {
|
14
|
-
return
|
15
|
-
<Box
|
16
|
-
as="hr"
|
17
|
-
height="2px"
|
18
|
-
border="0"
|
19
|
-
borderRadius="1px"
|
20
|
-
backgroundColor="blackAlpha.200"
|
21
|
-
width="100%"
|
22
|
-
{...props}
|
23
|
-
ref={ref}
|
24
|
-
/>
|
25
|
-
);
|
26
|
+
return <ChakraDivider {...props} ref={ref} />;
|
26
27
|
});
|
@@ -107,34 +107,34 @@ const config = helpers.defineMultiStyleConfig({
|
|
107
107
|
sizes: {
|
108
108
|
sm: {
|
109
109
|
button: {
|
110
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
110
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
111
111
|
paddingX: 2,
|
112
112
|
paddingY: 1,
|
113
113
|
},
|
114
114
|
panel: {
|
115
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
115
|
+
fontSize: ["mobile.xs", null, "desktop.xs"],
|
116
116
|
paddingX: 2,
|
117
117
|
},
|
118
118
|
},
|
119
119
|
md: {
|
120
120
|
button: {
|
121
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
121
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
122
122
|
paddingX: 3,
|
123
123
|
paddingY: 1,
|
124
124
|
},
|
125
125
|
panel: {
|
126
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
126
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
127
127
|
paddingX: 3,
|
128
128
|
},
|
129
129
|
},
|
130
130
|
lg: {
|
131
131
|
button: {
|
132
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
132
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
133
133
|
paddingX: 3,
|
134
134
|
paddingY: 2,
|
135
135
|
},
|
136
136
|
panel: {
|
137
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
137
|
+
fontSize: ["mobile.sm", null, "desktop.sm"],
|
138
138
|
paddingX: 3,
|
139
139
|
},
|
140
140
|
},
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { defineStyle, defineStyleConfig } from "@chakra-ui/styled-system"
|
2
|
+
import { mode } from "@chakra-ui/theme-tools"
|
3
|
+
|
4
|
+
const baseStyle = defineStyle(props => ({
|
5
|
+
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props)
|
6
|
+
}))
|
7
|
+
|
8
|
+
const variantSolid = defineStyle({
|
9
|
+
borderStyle: "solid",
|
10
|
+
})
|
11
|
+
|
12
|
+
const variantDashed = defineStyle({
|
13
|
+
borderStyle: "dashed",
|
14
|
+
})
|
15
|
+
|
16
|
+
const variants = {
|
17
|
+
solid: variantSolid,
|
18
|
+
dashed: variantDashed,
|
19
|
+
}
|
20
|
+
|
21
|
+
const sizes = {
|
22
|
+
sm: {
|
23
|
+
borderWidth: '1px',
|
24
|
+
borderRadius: '0.5px',
|
25
|
+
},
|
26
|
+
md: {
|
27
|
+
borderWidth: '2px',
|
28
|
+
borderRadius: '1px',
|
29
|
+
},
|
30
|
+
lg: {
|
31
|
+
borderWidth: '3px',
|
32
|
+
borderRadius: '1.5px',
|
33
|
+
},
|
34
|
+
}
|
35
|
+
|
36
|
+
export default defineStyleConfig({
|
37
|
+
baseStyle,
|
38
|
+
variants,
|
39
|
+
sizes,
|
40
|
+
defaultProps: {
|
41
|
+
variant: "solid",
|
42
|
+
size: 'md',
|
43
|
+
},
|
44
|
+
})
|
@@ -10,6 +10,7 @@ export { default as ChoiceChip } from "./choice-chip";
|
|
10
10
|
export { default as CloseButton } from "./close-button";
|
11
11
|
export { default as Code } from "./code";
|
12
12
|
export { default as Datepicker } from "./datepicker";
|
13
|
+
export { default as Divider } from "./divider";
|
13
14
|
export { default as Drawer } from "./drawer";
|
14
15
|
export { default as FloatingActionButton } from "./fab";
|
15
16
|
export { default as Form } from "./form";
|
@@ -33,3 +34,4 @@ export { default as Tabs } from "./tabs";
|
|
33
34
|
export { default as Textarea } from "./textarea";
|
34
35
|
export { default as Toast } from "./toast";
|
35
36
|
export { default as TravelTag } from "./travel-tag";
|
37
|
+
|