@vygruppen/spor-react 3.0.1 → 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@3.0.1 build
2
+ > @vygruppen/spor-react@3.0.2 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,13 +9,13 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- "toTime" is imported from external module "@internationalized/date" but never used in "dist/chunk-B6U7OYV3.mjs".
13
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-CIZ54LAU.mjs".
14
14
  ESM dist/index.mjs 2.01 KB
15
- ESM dist/CountryCodeSelect-ZP44HPNI.mjs 351.65 KB
16
- ESM dist/chunk-B6U7OYV3.mjs 416.39 KB
17
- ESM ⚡️ Build success in 4795ms
18
- CJS dist/index.js 896.14 KB
19
- CJS ⚡️ Build success in 4796ms
20
- DTS ⚡️ Build success in 19473ms
21
- DTS dist/index.d.ts 259.11 KB
15
+ ESM dist/CountryCodeSelect-QGMCRWO6.mjs 351.65 KB
16
+ ESM dist/chunk-CIZ54LAU.mjs 416.53 KB
17
+ ESM ⚡️ Build success in 5751ms
18
+ CJS dist/index.js 896.28 KB
19
+ CJS ⚡️ Build success in 5752ms
20
+ DTS ⚡️ Build success in 23047ms
21
+ DTS dist/index.d.ts 259.22 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
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
+
3
10
  ## 3.0.1
4
11
 
5
12
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-B6U7OYV3.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-CIZ54LAU.mjs';
2
2
  import React from 'react';
3
3
 
4
4
  // ../../node_modules/awesome-phonenumber/index-esm.mjs
@@ -4224,7 +4224,8 @@ function Combobox({
4224
4224
  ...rest,
4225
4225
  defaultFilter: contains2,
4226
4226
  allowsEmptyCollection: Boolean(emptyContent),
4227
- shouldCloseOnBlur: true
4227
+ shouldCloseOnBlur: true,
4228
+ label
4228
4229
  });
4229
4230
  const {
4230
4231
  inputProps: { size: size2, ...inputProps },
@@ -4673,6 +4674,7 @@ function NumericStepper({
4673
4674
  name: nameProp,
4674
4675
  value,
4675
4676
  ...formControlProps,
4677
+ id: value !== 0 ? formControlProps.id : void 0,
4676
4678
  fontSize: "sm",
4677
4679
  fontWeight: "bold",
4678
4680
  width: "3ch",
@@ -4720,7 +4722,8 @@ function NumericStepper({
4720
4722
  "aria-label": t2(texts11.incrementButtonAriaLabel),
4721
4723
  onClick: () => onChange(value + 1),
4722
4724
  visibility: value >= maxValue ? "hidden" : "visible",
4723
- isDisabled: formControlProps.disabled
4725
+ isDisabled: formControlProps.disabled,
4726
+ id: value === 0 ? formControlProps.id : void 0
4724
4727
  }
4725
4728
  ));
4726
4729
  }
@@ -4925,7 +4928,7 @@ var texts13 = createTexts({
4925
4928
  sv: "Telefonnummer"
4926
4929
  }
4927
4930
  });
4928
- var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-ZP44HPNI.mjs'));
4931
+ var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-QGMCRWO6.mjs'));
4929
4932
  var Radio = forwardRef((props, ref) => {
4930
4933
  return /* @__PURE__ */ React49__default.createElement(Radio$1, { ...props, ref });
4931
4934
  });
@@ -12743,7 +12746,8 @@ var config21 = helpers13.defineMultiStyleConfig({
12743
12746
  position: "absolute",
12744
12747
  my: 2,
12745
12748
  transition: ".1s ease-out",
12746
- transformOrigin: "top left"
12749
+ transformOrigin: "top left",
12750
+ cursor: "text"
12747
12751
  },
12748
12752
  "&:not(:placeholder-shown)": {
12749
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;
package/dist/index.js CHANGED
@@ -4734,7 +4734,8 @@ function Combobox({
4734
4734
  ...rest,
4735
4735
  defaultFilter: contains2,
4736
4736
  allowsEmptyCollection: Boolean(emptyContent),
4737
- shouldCloseOnBlur: true
4737
+ shouldCloseOnBlur: true,
4738
+ label
4738
4739
  });
4739
4740
  const {
4740
4741
  inputProps: { size: size2, ...inputProps },
@@ -5252,6 +5253,7 @@ function NumericStepper({
5252
5253
  name: nameProp,
5253
5254
  value,
5254
5255
  ...formControlProps,
5256
+ id: value !== 0 ? formControlProps.id : void 0,
5255
5257
  fontSize: "sm",
5256
5258
  fontWeight: "bold",
5257
5259
  width: "3ch",
@@ -5299,7 +5301,8 @@ function NumericStepper({
5299
5301
  "aria-label": t2(texts11.incrementButtonAriaLabel),
5300
5302
  onClick: () => onChange(value + 1),
5301
5303
  visibility: value >= maxValue ? "hidden" : "visible",
5302
- isDisabled: formControlProps.disabled
5304
+ isDisabled: formControlProps.disabled,
5305
+ id: value === 0 ? formControlProps.id : void 0
5303
5306
  }
5304
5307
  ));
5305
5308
  }
@@ -20870,7 +20873,8 @@ var init_input2 = __esm({
20870
20873
  position: "absolute",
20871
20874
  my: 2,
20872
20875
  transition: ".1s ease-out",
20873
- transformOrigin: "top left"
20876
+ transformOrigin: "top left",
20877
+ cursor: "text"
20874
20878
  },
20875
20879
  "&:not(:placeholder-shown)": {
20876
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-B6U7OYV3.mjs';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -93,6 +93,7 @@ export function Combobox<T extends object>({
93
93
  defaultFilter: contains,
94
94
  allowsEmptyCollection: Boolean(emptyContent),
95
95
  shouldCloseOnBlur: true,
96
+ label,
96
97
  });
97
98
 
98
99
  const {
@@ -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) => {
@@ -82,6 +82,7 @@ const config = helpers.defineMultiStyleConfig({
82
82
  my: 2,
83
83
  transition: ".1s ease-out",
84
84
  transformOrigin: "top left",
85
+ cursor: "text",
85
86
  },
86
87
  "&:not(:placeholder-shown)": {
87
88
  pt: "16px",