@vygruppen/spor-react 2.5.0 → 2.5.1

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@2.5.0 build
2
+ > @vygruppen/spor-react@2.5.1 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -10,12 +10,12 @@
10
10
  ESM Build start
11
11
  DTS 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-7GRTZA6T.mjs".
14
- CJS dist/index.js 895.46 KB
15
- CJS ⚡️ Build success in 5694ms
13
+ "toTime" is imported from external module "@internationalized/date" but never used in "dist/chunk-QEKFPZKV.mjs".
14
+ CJS dist/index.js 895.50 KB
15
+ CJS ⚡️ Build success in 4556ms
16
16
  ESM dist/index.mjs 2.06 KB
17
- ESM dist/CountryCodeSelect-ZTEYBERS.mjs 351.67 KB
18
- ESM dist/chunk-7GRTZA6T.mjs 415.76 KB
19
- ESM ⚡️ Build success in 5707ms
20
- DTS ⚡️ Build success in 21517ms
21
- DTS dist/index.d.ts 259.31 KB
17
+ ESM dist/CountryCodeSelect-JL2OVNXX.mjs 351.67 KB
18
+ ESM dist/chunk-QEKFPZKV.mjs 415.80 KB
19
+ ESM ⚡️ Build success in 4557ms
20
+ DTS ⚡️ Build success in 17324ms
21
+ DTS dist/index.d.ts 259.33 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 2.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 28a772f4: Datepicker, Timepicker: Changed color to meet contrast minimum requriement
8
+ - f49fa9d2: TimePicker: Fixes typing bug in onChange prop
9
+ - 643afb0d: Combobox: Fix glitchy loading state
10
+
3
11
  ## 2.5.0
4
12
 
5
13
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, SelectItem } from './chunk-7GRTZA6T.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, SelectItem } from './chunk-QEKFPZKV.mjs';
2
2
  import React from 'react';
3
3
 
4
4
  // ../../node_modules/awesome-phonenumber/index-esm.mjs
@@ -4222,7 +4222,8 @@ function Combobox({
4222
4222
  const state2 = useComboBoxState({
4223
4223
  ...rest,
4224
4224
  defaultFilter: contains2,
4225
- allowsEmptyCollection: Boolean(emptyContent)
4225
+ allowsEmptyCollection: Boolean(emptyContent),
4226
+ shouldCloseOnBlur: true
4226
4227
  });
4227
4228
  const {
4228
4229
  inputProps: { size: size2, ...inputProps },
@@ -4242,8 +4243,8 @@ function Combobox({
4242
4243
  ...inputProps,
4243
4244
  ref: inputRef,
4244
4245
  label,
4245
- borderBottomLeftRadius: state2.isOpen ? 0 : borderBottomLeftRadius,
4246
- borderBottomRightRadius: state2.isOpen ? 0 : borderBottomRightRadius,
4246
+ borderBottomLeftRadius: state2.isOpen && !isLoading ? 0 : borderBottomLeftRadius,
4247
+ borderBottomRightRadius: state2.isOpen && !isLoading ? 0 : borderBottomRightRadius,
4247
4248
  borderTopLeftRadius,
4248
4249
  borderTopRightRadius,
4249
4250
  marginBottom,
@@ -4273,7 +4274,7 @@ function Combobox({
4273
4274
  }
4274
4275
  ) : rightIcon
4275
4276
  }
4276
- ), state2.isOpen && /* @__PURE__ */ React49__default.createElement(
4277
+ ), state2.isOpen && !isLoading && /* @__PURE__ */ React49__default.createElement(
4277
4278
  Popover3,
4278
4279
  {
4279
4280
  state: state2,
@@ -4900,7 +4901,7 @@ var texts13 = createTexts({
4900
4901
  sv: "Telefonnummer"
4901
4902
  }
4902
4903
  });
4903
- var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-ZTEYBERS.mjs'));
4904
+ var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-JL2OVNXX.mjs'));
4904
4905
  var Radio = forwardRef((props, ref) => {
4905
4906
  return /* @__PURE__ */ React49__default.createElement(Radio$1, { ...props, ref });
4906
4907
  });
@@ -11883,7 +11884,7 @@ var config13 = helpers6.defineMultiStyleConfig({
11883
11884
  },
11884
11885
  dateTimeSegment: {
11885
11886
  color: mode(
11886
- props.isPlaceholder ? "dimGrey" : props.isEditable ? "darkGrey" : "osloGrey",
11887
+ props.isEditable ? "darkGrey" : "dimGrey",
11887
11888
  props.isPlaceholder ? "whiteAlpha.400" : "white"
11888
11889
  )(props)
11889
11890
  },
package/dist/index.d.ts CHANGED
@@ -452,7 +452,7 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
452
452
  */
453
453
  declare function DateRangePicker({ variant, minHeight, startName, endName, ...props }: DateRangePickerProps): React__default.JSX.Element;
454
454
 
455
- type TimePickerProps = Omit<BoxProps, "defaultValue"> & {
455
+ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
456
456
  /** The label. Defaults to a localized version of "Time" */
457
457
  label?: string;
458
458
  /** The name of the form field, if used in a regular form */
package/dist/index.js CHANGED
@@ -4732,7 +4732,8 @@ function Combobox({
4732
4732
  const state2 = reactStately.useComboBoxState({
4733
4733
  ...rest,
4734
4734
  defaultFilter: contains2,
4735
- allowsEmptyCollection: Boolean(emptyContent)
4735
+ allowsEmptyCollection: Boolean(emptyContent),
4736
+ shouldCloseOnBlur: true
4736
4737
  });
4737
4738
  const {
4738
4739
  inputProps: { size: size2, ...inputProps },
@@ -4752,8 +4753,8 @@ function Combobox({
4752
4753
  ...inputProps,
4753
4754
  ref: inputRef,
4754
4755
  label,
4755
- borderBottomLeftRadius: state2.isOpen ? 0 : borderBottomLeftRadius,
4756
- borderBottomRightRadius: state2.isOpen ? 0 : borderBottomRightRadius,
4756
+ borderBottomLeftRadius: state2.isOpen && !isLoading ? 0 : borderBottomLeftRadius,
4757
+ borderBottomRightRadius: state2.isOpen && !isLoading ? 0 : borderBottomRightRadius,
4757
4758
  borderTopLeftRadius,
4758
4759
  borderTopRightRadius,
4759
4760
  marginBottom,
@@ -4783,7 +4784,7 @@ function Combobox({
4783
4784
  }
4784
4785
  ) : rightIcon
4785
4786
  }
4786
- ), state2.isOpen && /* @__PURE__ */ React49__namespace.default.createElement(
4787
+ ), state2.isOpen && !isLoading && /* @__PURE__ */ React49__namespace.default.createElement(
4787
4788
  Popover3,
4788
4789
  {
4789
4790
  state: state2,
@@ -19954,7 +19955,7 @@ var init_datepicker2 = __esm({
19954
19955
  },
19955
19956
  dateTimeSegment: {
19956
19957
  color: themeTools.mode(
19957
- props.isPlaceholder ? "dimGrey" : props.isEditable ? "darkGrey" : "osloGrey",
19958
+ props.isEditable ? "darkGrey" : "dimGrey",
19958
19959
  props.isPlaceholder ? "whiteAlpha.400" : "white"
19959
19960
  )(props)
19960
19961
  },
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, SelectItem, SelectItemDescription, SelectItemLabel, 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-7GRTZA6T.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, SelectItem, SelectItemDescription, SelectItemLabel, 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-QEKFPZKV.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -12,7 +12,7 @@ import { StyledField } from "./StyledField";
12
12
  import { TimeField } from "./TimeField";
13
13
  import { getCurrentTime, useCurrentLocale } from "./utils";
14
14
 
15
- type TimePickerProps = Omit<BoxProps, "defaultValue"> & {
15
+ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
16
16
  /** The label. Defaults to a localized version of "Time" */
17
17
  label?: string;
18
18
  /** The name of the form field, if used in a regular form */
@@ -90,6 +90,7 @@ export function Combobox<T extends object>({
90
90
  ...rest,
91
91
  defaultFilter: contains,
92
92
  allowsEmptyCollection: Boolean(emptyContent),
93
+ shouldCloseOnBlur: true,
93
94
  });
94
95
 
95
96
  const {
@@ -111,8 +112,12 @@ export function Combobox<T extends object>({
111
112
  {...inputProps}
112
113
  ref={inputRef}
113
114
  label={label}
114
- borderBottomLeftRadius={state.isOpen ? 0 : borderBottomLeftRadius}
115
- borderBottomRightRadius={state.isOpen ? 0 : borderBottomRightRadius}
115
+ borderBottomLeftRadius={
116
+ state.isOpen && !isLoading ? 0 : borderBottomLeftRadius
117
+ }
118
+ borderBottomRightRadius={
119
+ state.isOpen && !isLoading ? 0 : borderBottomRightRadius
120
+ }
116
121
  borderTopLeftRadius={borderTopLeftRadius}
117
122
  borderTopRightRadius={borderTopRightRadius}
118
123
  marginBottom={marginBottom}
@@ -145,7 +150,7 @@ export function Combobox<T extends object>({
145
150
  )
146
151
  }
147
152
  />
148
- {state.isOpen && (
153
+ {state.isOpen && !isLoading && (
149
154
  <Popover
150
155
  state={state}
151
156
  triggerRef={inputRef}
@@ -73,7 +73,7 @@ const config = helpers.defineMultiStyleConfig({
73
73
  },
74
74
  dateTimeSegment: {
75
75
  color: mode(
76
- props.isPlaceholder ? "dimGrey" : props.isEditable ? "darkGrey" : "osloGrey",
76
+ props.isEditable ? "darkGrey" : "dimGrey",
77
77
  props.isPlaceholder ? "whiteAlpha.400" : "white"
78
78
  )(props),
79
79
  },