@vygruppen/spor-react 3.0.4 → 3.1.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 +9 -9
- package/CHANGELOG.md +11 -0
- package/dist/{CountryCodeSelect-PXKYFQHM.mjs → CountryCodeSelect-WPMTKT2L.mjs} +308 -423
- package/dist/{chunk-ETCK74GR.mjs → chunk-V6MFUVYF.mjs} +124 -173
- package/dist/index.d.ts +111 -104
- package/dist/index.js +694 -753
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/input/Combobox.tsx +2 -7
- package/src/input/Textarea.tsx +12 -6
- package/src/loader/SkeletonText.tsx +3 -2
- package/src/theme/components/textarea.ts +9 -1
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, 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-V6MFUVYF.mjs';
|
package/package.json
CHANGED
package/src/input/Combobox.tsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { AriaComboBoxProps, useComboBox, useFilter } from "react-aria";
|
3
3
|
import { useComboBoxState } from "react-stately";
|
4
|
-
import { ColorSpinner, Input, InputProps, ListBox
|
4
|
+
import { ColorSpinner, Input, InputProps, ListBox } from "..";
|
5
5
|
import { Popover } from "./Popover";
|
6
6
|
|
7
7
|
export type ComboboxProps<T> = AriaComboBoxProps<T> & {
|
@@ -96,12 +96,6 @@ export function Combobox<T extends object>({
|
|
96
96
|
label,
|
97
97
|
});
|
98
98
|
|
99
|
-
useOutsideClick({
|
100
|
-
ref: listBoxRef,
|
101
|
-
handler: state.close,
|
102
|
-
enabled: true,
|
103
|
-
});
|
104
|
-
|
105
99
|
const {
|
106
100
|
inputProps: { size, ...inputProps },
|
107
101
|
listBoxProps,
|
@@ -165,6 +159,7 @@ export function Combobox<T extends object>({
|
|
165
159
|
state={state}
|
166
160
|
triggerRef={inputRef as any}
|
167
161
|
ref={popoverRef}
|
162
|
+
isNonModal
|
168
163
|
placement="bottom start"
|
169
164
|
shouldFlip={false}
|
170
165
|
hasBackdrop={false}
|
package/src/input/Textarea.tsx
CHANGED
@@ -5,16 +5,17 @@ import {
|
|
5
5
|
Textarea as ChakraTextarea,
|
6
6
|
TextareaProps as ChakraTextareaProps,
|
7
7
|
useFormControlContext,
|
8
|
+
InputGroup,
|
8
9
|
} from "@chakra-ui/react";
|
9
10
|
import React, { useId } from "react";
|
10
11
|
|
11
12
|
export type TextareaProps = Exclude<ChakraTextareaProps, "variant" | "size"> & {
|
12
|
-
label
|
13
|
+
label?: string;
|
13
14
|
};
|
14
15
|
/**
|
15
16
|
* Text area that works with the `FormControl` component.
|
16
17
|
*
|
17
|
-
*
|
18
|
+
* Providing a label is optional.
|
18
19
|
*
|
19
20
|
* ```tsx
|
20
21
|
* <FormControl>
|
@@ -30,11 +31,16 @@ export const Textarea = forwardRef<TextareaProps, "textarea">((props, ref) => {
|
|
30
31
|
const formControlProps = useFormControlContext();
|
31
32
|
const fallbackId = `textarea-${useId()}`;
|
32
33
|
const inputId = props.id ?? formControlProps?.id ?? fallbackId;
|
34
|
+
|
33
35
|
return (
|
34
|
-
<
|
35
|
-
<
|
36
|
-
|
37
|
-
|
36
|
+
<InputGroup position="relative" {...spacingProps}>
|
37
|
+
<ChakraTextarea {...rest} id={inputId} ref={ref} placeholder=" " />
|
38
|
+
{label && (
|
39
|
+
<FormLabel htmlFor={inputId} id={`${inputId}-label`}>
|
40
|
+
{label}
|
41
|
+
</FormLabel>
|
42
|
+
)}
|
43
|
+
</InputGroup>
|
38
44
|
);
|
39
45
|
});
|
40
46
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { SkeletonText as ChakraSkeletonText, SkeletonTextProps as ChakraSkeletonTextProps } from "@chakra-ui/react";
|
2
2
|
import React from "react";
|
3
3
|
|
4
|
-
export type SkeletonTextProps =
|
4
|
+
export type SkeletonTextProps = ChakraSkeletonTextProps
|
5
|
+
|
5
6
|
/**
|
6
7
|
* SkeletonText renders a loading animation for a given text. It works great as a placeholder to avoid layout shifts.
|
7
8
|
*/
|
@@ -5,9 +5,17 @@ const config = defineStyleConfig({
|
|
5
5
|
baseStyle: (props) => ({
|
6
6
|
...Input.baseStyle!(props).field,
|
7
7
|
minHeight: "5rem",
|
8
|
-
py: 3,
|
9
8
|
verticalAlign: "top",
|
10
9
|
appearance: "none",
|
10
|
+
paddingTop: 2,
|
11
|
+
"&:not(:placeholder-shown)": {
|
12
|
+
"&:has(+ label)": {
|
13
|
+
paddingTop: 4
|
14
|
+
},
|
15
|
+
"& + label": {
|
16
|
+
transform: "scale(0.825) translateY(-10px)",
|
17
|
+
},
|
18
|
+
},
|
11
19
|
}),
|
12
20
|
});
|
13
21
|
|