@vygruppen/spor-react 3.0.0 → 3.0.2
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 +13 -0
- package/dist/{CountryCodeSelect-57KCWSW3.mjs → CountryCodeSelect-QGMCRWO6.mjs} +1 -1
- package/dist/{chunk-YVNVHFTG.mjs → chunk-CIZ54LAU.mjs} +13 -5
- package/dist/index.d.ts +4 -1
- package/dist/index.js +12 -4
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/input/Combobox.tsx +1 -0
- package/src/input/NumericStepper.tsx +4 -0
- package/src/theme/components/input.ts +1 -0
- package/src/typography/Heading.tsx +5 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@3.0.
|
2
|
+
> @vygruppen/spor-react@3.0.2 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -10,12 +10,12 @@
|
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
12
|
"toTime" is imported from external module "@internationalized/date" but never used in "dist/index.js".
|
13
|
-
"toTime" is imported from external module "@internationalized/date" but never used in "dist/chunk-
|
14
|
-
[32mCJS[39m [1mdist/index.js [22m[32m896.11 KB[39m
|
15
|
-
[32mCJS[39m ⚡️ Build success in 4412ms
|
16
|
-
[32mESM[39m [1mdist/CountryCodeSelect-57KCWSW3.mjs [22m[32m351.65 KB[39m
|
13
|
+
"toTime" is imported from external module "@internationalized/date" but never used in "dist/chunk-CIZ54LAU.mjs".
|
17
14
|
[32mESM[39m [1mdist/index.mjs [22m[32m2.01 KB[39m
|
18
|
-
[32mESM[39m [1mdist/
|
19
|
-
[32mESM[39m
|
20
|
-
[
|
21
|
-
[
|
15
|
+
[32mESM[39m [1mdist/CountryCodeSelect-QGMCRWO6.mjs [22m[32m351.65 KB[39m
|
16
|
+
[32mESM[39m [1mdist/chunk-CIZ54LAU.mjs [22m[32m416.53 KB[39m
|
17
|
+
[32mESM[39m ⚡️ Build success in 5751ms
|
18
|
+
[32mCJS[39m [1mdist/index.js [22m[32m896.28 KB[39m
|
19
|
+
[32mCJS[39m ⚡️ Build success in 5752ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 23047ms
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m259.22 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 3.0.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- ed4dc214: NumericStepper: Make label work as "add one" button if the value is zero
|
8
|
+
- 0e951ddf: Input: Display text cursor for form labels inside of inputs.
|
9
|
+
|
10
|
+
## 3.0.1
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 828e4f38: Fix a typing issue with Heading
|
15
|
+
|
3
16
|
## 3.0.0
|
4
17
|
|
5
18
|
### Major Changes
|
@@ -3226,7 +3226,11 @@ var Badge = forwardRef(
|
|
3226
3226
|
}
|
3227
3227
|
);
|
3228
3228
|
var Code = forwardRef((props, ref) => /* @__PURE__ */ React49__default.createElement(Code$1, { ...props, ref }));
|
3229
|
-
var Heading = ({
|
3229
|
+
var Heading = ({
|
3230
|
+
as,
|
3231
|
+
variant = "xl-display",
|
3232
|
+
...props
|
3233
|
+
}) => {
|
3230
3234
|
return /* @__PURE__ */ React49__default.createElement(Text, { as, textStyle: variant, ...props });
|
3231
3235
|
};
|
3232
3236
|
var Text4 = forwardRef(
|
@@ -4220,7 +4224,8 @@ function Combobox({
|
|
4220
4224
|
...rest,
|
4221
4225
|
defaultFilter: contains2,
|
4222
4226
|
allowsEmptyCollection: Boolean(emptyContent),
|
4223
|
-
shouldCloseOnBlur: true
|
4227
|
+
shouldCloseOnBlur: true,
|
4228
|
+
label
|
4224
4229
|
});
|
4225
4230
|
const {
|
4226
4231
|
inputProps: { size: size2, ...inputProps },
|
@@ -4669,6 +4674,7 @@ function NumericStepper({
|
|
4669
4674
|
name: nameProp,
|
4670
4675
|
value,
|
4671
4676
|
...formControlProps,
|
4677
|
+
id: value !== 0 ? formControlProps.id : void 0,
|
4672
4678
|
fontSize: "sm",
|
4673
4679
|
fontWeight: "bold",
|
4674
4680
|
width: "3ch",
|
@@ -4716,7 +4722,8 @@ function NumericStepper({
|
|
4716
4722
|
"aria-label": t2(texts11.incrementButtonAriaLabel),
|
4717
4723
|
onClick: () => onChange(value + 1),
|
4718
4724
|
visibility: value >= maxValue ? "hidden" : "visible",
|
4719
|
-
isDisabled: formControlProps.disabled
|
4725
|
+
isDisabled: formControlProps.disabled,
|
4726
|
+
id: value === 0 ? formControlProps.id : void 0
|
4720
4727
|
}
|
4721
4728
|
));
|
4722
4729
|
}
|
@@ -4921,7 +4928,7 @@ var texts13 = createTexts({
|
|
4921
4928
|
sv: "Telefonnummer"
|
4922
4929
|
}
|
4923
4930
|
});
|
4924
|
-
var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-
|
4931
|
+
var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-QGMCRWO6.mjs'));
|
4925
4932
|
var Radio = forwardRef((props, ref) => {
|
4926
4933
|
return /* @__PURE__ */ React49__default.createElement(Radio$1, { ...props, ref });
|
4927
4934
|
});
|
@@ -12739,7 +12746,8 @@ var config21 = helpers13.defineMultiStyleConfig({
|
|
12739
12746
|
position: "absolute",
|
12740
12747
|
my: 2,
|
12741
12748
|
transition: ".1s ease-out",
|
12742
|
-
transformOrigin: "top left"
|
12749
|
+
transformOrigin: "top left",
|
12750
|
+
cursor: "text"
|
12743
12751
|
},
|
12744
12752
|
"&:not(:placeholder-shown)": {
|
12745
12753
|
pt: "16px",
|
package/dist/index.d.ts
CHANGED
@@ -3383,6 +3383,7 @@ declare const theme: {
|
|
3383
3383
|
my: number;
|
3384
3384
|
transition: string;
|
3385
3385
|
transformOrigin: string;
|
3386
|
+
cursor: string;
|
3386
3387
|
};
|
3387
3388
|
"&:not(:placeholder-shown)": {
|
3388
3389
|
pt: string;
|
@@ -4047,6 +4048,7 @@ declare const theme: {
|
|
4047
4048
|
my: number;
|
4048
4049
|
transition: string;
|
4049
4050
|
transformOrigin: string;
|
4051
|
+
cursor: string;
|
4050
4052
|
};
|
4051
4053
|
"&:not(:placeholder-shown)": {
|
4052
4054
|
pt: string;
|
@@ -4827,6 +4829,7 @@ declare const theme: {
|
|
4827
4829
|
my: number;
|
4828
4830
|
transition: string;
|
4829
4831
|
transformOrigin: string;
|
4832
|
+
cursor: string;
|
4830
4833
|
};
|
4831
4834
|
"&:not(:placeholder-shown)": {
|
4832
4835
|
pt: string;
|
@@ -6988,7 +6991,7 @@ type HeadingProps = Omit<HeadingProps$1, "textStyle" | "as"> & {
|
|
6988
6991
|
* <Heading as="h1" variant="2xl">Look at me!</Heading>
|
6989
6992
|
* ```
|
6990
6993
|
*/
|
6991
|
-
declare const Heading: ({ as, variant, ...props }:
|
6994
|
+
declare const Heading: ({ as, variant, ...props }: HeadingProps) => React__default.JSX.Element;
|
6992
6995
|
|
6993
6996
|
type TextProps = Omit<TextProps$1, "textStyle"> & {
|
6994
6997
|
/** The size and style of the text.
|
package/dist/index.js
CHANGED
@@ -2825,7 +2825,11 @@ var init_Code = __esm({
|
|
2825
2825
|
exports.Heading = void 0;
|
2826
2826
|
var init_Heading = __esm({
|
2827
2827
|
"src/typography/Heading.tsx"() {
|
2828
|
-
exports.Heading = ({
|
2828
|
+
exports.Heading = ({
|
2829
|
+
as,
|
2830
|
+
variant = "xl-display",
|
2831
|
+
...props
|
2832
|
+
}) => {
|
2829
2833
|
return /* @__PURE__ */ React49__namespace.default.createElement(react.Text, { as, textStyle: variant, ...props });
|
2830
2834
|
};
|
2831
2835
|
}
|
@@ -4730,7 +4734,8 @@ function Combobox({
|
|
4730
4734
|
...rest,
|
4731
4735
|
defaultFilter: contains2,
|
4732
4736
|
allowsEmptyCollection: Boolean(emptyContent),
|
4733
|
-
shouldCloseOnBlur: true
|
4737
|
+
shouldCloseOnBlur: true,
|
4738
|
+
label
|
4734
4739
|
});
|
4735
4740
|
const {
|
4736
4741
|
inputProps: { size: size2, ...inputProps },
|
@@ -5248,6 +5253,7 @@ function NumericStepper({
|
|
5248
5253
|
name: nameProp,
|
5249
5254
|
value,
|
5250
5255
|
...formControlProps,
|
5256
|
+
id: value !== 0 ? formControlProps.id : void 0,
|
5251
5257
|
fontSize: "sm",
|
5252
5258
|
fontWeight: "bold",
|
5253
5259
|
width: "3ch",
|
@@ -5295,7 +5301,8 @@ function NumericStepper({
|
|
5295
5301
|
"aria-label": t2(texts11.incrementButtonAriaLabel),
|
5296
5302
|
onClick: () => onChange(value + 1),
|
5297
5303
|
visibility: value >= maxValue ? "hidden" : "visible",
|
5298
|
-
isDisabled: formControlProps.disabled
|
5304
|
+
isDisabled: formControlProps.disabled,
|
5305
|
+
id: value === 0 ? formControlProps.id : void 0
|
5299
5306
|
}
|
5300
5307
|
));
|
5301
5308
|
}
|
@@ -20866,7 +20873,8 @@ var init_input2 = __esm({
|
|
20866
20873
|
position: "absolute",
|
20867
20874
|
my: 2,
|
20868
20875
|
transition: ".1s ease-out",
|
20869
|
-
transformOrigin: "top left"
|
20876
|
+
transformOrigin: "top left",
|
20877
|
+
cursor: "text"
|
20870
20878
|
},
|
20871
20879
|
"&:not(:placeholder-shown)": {
|
20872
20880
|
pt: "16px",
|
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-CIZ54LAU.mjs';
|
package/package.json
CHANGED
package/src/input/Combobox.tsx
CHANGED
@@ -94,6 +94,7 @@ export function NumericStepper({
|
|
94
94
|
name={nameProp}
|
95
95
|
value={value}
|
96
96
|
{...formControlProps}
|
97
|
+
id={value !== 0 ? formControlProps.id : undefined}
|
97
98
|
fontSize="sm"
|
98
99
|
fontWeight="bold"
|
99
100
|
width="3ch"
|
@@ -140,6 +141,7 @@ export function NumericStepper({
|
|
140
141
|
onClick={() => onChange(value + 1)}
|
141
142
|
visibility={value >= maxValue ? "hidden" : "visible"}
|
142
143
|
isDisabled={formControlProps.disabled}
|
144
|
+
id={value === 0 ? formControlProps.id : undefined}
|
143
145
|
/>
|
144
146
|
</Flex>
|
145
147
|
);
|
@@ -156,6 +158,8 @@ type VerySmallButtonProps = {
|
|
156
158
|
visibility?: "visible" | "hidden";
|
157
159
|
/** Whether or not the button is disabled */
|
158
160
|
isDisabled?: boolean;
|
161
|
+
/** The ID of the button */
|
162
|
+
id?: string;
|
159
163
|
};
|
160
164
|
/** Internal override for extra small icon buttons */
|
161
165
|
const VerySmallButton = (props: VerySmallButtonProps) => {
|
@@ -26,6 +26,10 @@ export type HeadingProps = Omit<ChakraHeadingProps, "textStyle" | "as"> & {
|
|
26
26
|
* <Heading as="h1" variant="2xl">Look at me!</Heading>
|
27
27
|
* ```
|
28
28
|
*/
|
29
|
-
export const Heading = ({
|
29
|
+
export const Heading = ({
|
30
|
+
as,
|
31
|
+
variant = "xl-display",
|
32
|
+
...props
|
33
|
+
}: HeadingProps) => {
|
30
34
|
return <Text as={as} textStyle={variant} {...props} />;
|
31
35
|
};
|