@vygruppen/spor-react 3.4.3 → 3.5.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 +12 -0
- package/dist/{CountryCodeSelect-EGTCLFUV.mjs → CountryCodeSelect-46KAQXG4.mjs} +1 -1
- package/dist/{chunk-LHZ4TUAK.mjs → chunk-ELSHBTSG.mjs} +332 -282
- package/dist/index.d.ts +71 -48
- package/dist/index.js +446 -374
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +37 -0
- package/src/breadcrumb/index.tsx +1 -0
- package/src/index.tsx +1 -0
- package/src/input/Input.tsx +8 -2
- package/src/theme/components/breadcrumb.ts +47 -0
- package/src/theme/components/index.ts +1 -0
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, 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-ELSHBTSG.mjs';
|
package/package.json
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
Breadcrumb as ChakraBreadcrumb,
|
3
|
+
BreadcrumbItem as ChakraBreadcrumbItem,
|
4
|
+
BreadcrumbLink as ChakraBreadcrumbLink,
|
5
|
+
BreadcrumbProps as ChakraBreadcrumbProps,
|
6
|
+
} from "@chakra-ui/react";
|
7
|
+
import { DropdownRightFill18Icon } from "@vygruppen/spor-icon-react";
|
8
|
+
import React from "react";
|
9
|
+
|
10
|
+
type BreadcrumbProps = ChakraBreadcrumbProps;
|
11
|
+
/**
|
12
|
+
* A breadcrumb component.
|
13
|
+
*
|
14
|
+
* Used to create customizable breadcrumbs.
|
15
|
+
*
|
16
|
+
* ```tsx
|
17
|
+
* <Breadcrumb>
|
18
|
+
* <BreadcrumbItem>
|
19
|
+
* <BreadcrumbLink href="/">Home</BreadcrumbLink>
|
20
|
+
* </BreadcrumbItem>
|
21
|
+
* <BreadcrumbItem isCurrentPage={true}>
|
22
|
+
* <BreadcrumbLink href="/about">About</BreadcrumbLink>
|
23
|
+
* </BreadcrumbItem>
|
24
|
+
* </Breadcrumb>
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
export const Breadcrumb = (props: BreadcrumbProps) => {
|
28
|
+
return (
|
29
|
+
<ChakraBreadcrumb
|
30
|
+
separator={<DropdownRightFill18Icon color="blackAlpha.400" />}
|
31
|
+
{...props}
|
32
|
+
/>
|
33
|
+
);
|
34
|
+
};
|
35
|
+
|
36
|
+
export const BreadcrumbItem = ChakraBreadcrumbItem;
|
37
|
+
export const BreadcrumbLink = ChakraBreadcrumbLink;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./Breadcrumb";
|
package/src/index.tsx
CHANGED
@@ -2,6 +2,7 @@ export { extendTheme } from "@chakra-ui/react";
|
|
2
2
|
export * as tokens from "@vygruppen/spor-design-tokens";
|
3
3
|
export * from "./accordion";
|
4
4
|
export * from "./alert";
|
5
|
+
export * from "./breadcrumb";
|
5
6
|
export * from "./button";
|
6
7
|
export * from "./card";
|
7
8
|
export * from "./datepicker";
|
package/src/input/Input.tsx
CHANGED
@@ -40,7 +40,9 @@ export const Input = forwardRef<InputProps, "input">(
|
|
40
40
|
const inputId = id ?? formControlProps?.id ?? fallbackId;
|
41
41
|
return (
|
42
42
|
<InputGroup position="relative">
|
43
|
-
{leftIcon &&
|
43
|
+
{leftIcon && (
|
44
|
+
<InputLeftElement pointerEvents="none">{leftIcon}</InputLeftElement>
|
45
|
+
)}
|
44
46
|
<ChakraInput
|
45
47
|
data-attachable
|
46
48
|
paddingLeft={leftIcon ? 7 : undefined}
|
@@ -51,7 +53,11 @@ export const Input = forwardRef<InputProps, "input">(
|
|
51
53
|
placeholder=" " // This is needed to make the label work as expected
|
52
54
|
/>
|
53
55
|
<FormLabel htmlFor={inputId}>{label}</FormLabel>
|
54
|
-
{rightIcon &&
|
56
|
+
{rightIcon && (
|
57
|
+
<InputRightElement pointerEvents="none">
|
58
|
+
{rightIcon}
|
59
|
+
</InputRightElement>
|
60
|
+
)}
|
55
61
|
</InputGroup>
|
56
62
|
);
|
57
63
|
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { breadcrumbAnatomy as parts } from "@chakra-ui/anatomy";
|
2
|
+
import {
|
3
|
+
createMultiStyleConfigHelpers,
|
4
|
+
defineStyle,
|
5
|
+
} from "@chakra-ui/styled-system";
|
6
|
+
import { getBoxShadowString } from "../utils/box-shadow-utils";
|
7
|
+
|
8
|
+
const { defineMultiStyleConfig, definePartsStyle } =
|
9
|
+
createMultiStyleConfigHelpers(parts.keys);
|
10
|
+
|
11
|
+
const baseStyleLink = defineStyle({
|
12
|
+
transitionProperty: "common",
|
13
|
+
transitionDuration: "fast",
|
14
|
+
transitionTimingFunction: "ease-out",
|
15
|
+
outline: "none",
|
16
|
+
color: "inherit",
|
17
|
+
textDecoration: "none",
|
18
|
+
"&:not([aria-current=page])": {
|
19
|
+
cursor: "pointer",
|
20
|
+
paddingX: 0.5,
|
21
|
+
borderRadius: "xs",
|
22
|
+
_hover: {
|
23
|
+
backgroundColor: "coralGreen",
|
24
|
+
},
|
25
|
+
_focusVisible: {
|
26
|
+
boxShadow: getBoxShadowString({
|
27
|
+
borderColor: "greenHaze",
|
28
|
+
borderWidth: 2,
|
29
|
+
}),
|
30
|
+
},
|
31
|
+
_active: {
|
32
|
+
backgroundColor: "mint",
|
33
|
+
},
|
34
|
+
},
|
35
|
+
});
|
36
|
+
|
37
|
+
const baseStyle = definePartsStyle({
|
38
|
+
link: baseStyleLink,
|
39
|
+
list: {
|
40
|
+
flexWrap: "wrap",
|
41
|
+
alignItems: "flex-start",
|
42
|
+
},
|
43
|
+
});
|
44
|
+
|
45
|
+
export default defineMultiStyleConfig({
|
46
|
+
baseStyle,
|
47
|
+
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export { default as Accordion } from "./accordion";
|
2
2
|
export { default as Alert } from "./alert";
|
3
3
|
export { default as Badge } from "./badge";
|
4
|
+
export { default as Breadcrumb } from "./breadcrumb";
|
4
5
|
export { default as Button } from "./button";
|
5
6
|
export { default as Card } from "./card";
|
6
7
|
export { default as CardSelect } from "./card-select";
|