@vygruppen/spor-react 11.0.0 → 11.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@11.0.0 build
2
+ > @vygruppen/spor-react@11.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,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- CJS dist/index.js 542.03 KB
13
- CJS ⚡️ Build success in 2210ms
14
12
  ESM dist/index.mjs 2.16 KB
15
- ESM dist/CountryCodeSelect-46H2DYJ5.mjs 1.22 KB
16
- ESM dist/chunk-ROHXFJX2.mjs 428.12 KB
17
- ESM ⚡️ Build success in 2211ms
18
- DTS ⚡️ Build success in 15356ms
13
+ ESM dist/CountryCodeSelect-AWMN54K6.mjs 1.22 KB
14
+ ESM dist/chunk-QXIAB7O5.mjs 428.26 KB
15
+ ESM ⚡️ Build success in 2120ms
16
+ CJS dist/index.js 542.18 KB
17
+ CJS ⚡️ Build success in 2120ms
18
+ DTS ⚡️ Build success in 15580ms
19
19
  DTS dist/index.d.ts 342.86 KB
20
20
  DTS dist/index.d.mts 342.86 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 11.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 89d1702: Text for multiple notifications
8
+
9
+ ## 11.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - e2d26fd: Fix isDisabled for RadioCard and ChoiceChip
14
+
3
15
  ## 11.0.0
4
16
 
5
17
  ### Major Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-ROHXFJX2.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-QXIAB7O5.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -1010,7 +1010,7 @@ var ChoiceChip = forwardRef(
1010
1010
  {
1011
1011
  ...getInputProps({}, ref),
1012
1012
  id,
1013
- disabled: isDisabled
1013
+ disabled: isDisabled || state2.isDisabled
1014
1014
  }
1015
1015
  ),
1016
1016
  /* @__PURE__ */ React85__default.createElement(
@@ -1022,7 +1022,7 @@ var ChoiceChip = forwardRef(
1022
1022
  "data-hover": dataAttr(state2.isHovered),
1023
1023
  "data-focus": dataAttr(state2.isFocused),
1024
1024
  "data-active": dataAttr(state2.isActive),
1025
- "data-disabled": dataAttr(state2.isDisabled)
1025
+ "data-disabled": dataAttr(isDisabled || state2.isDisabled)
1026
1026
  },
1027
1027
  icon && /* @__PURE__ */ React85__default.createElement(chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
1028
1028
  chipType !== "icon" && /* @__PURE__ */ React85__default.createElement(chakra.span, { __css: styles3.label, ...getCheckboxProps() }, children),
@@ -1844,7 +1844,7 @@ var texts4 = createTexts({
1844
1844
  sv: "Landskod"
1845
1845
  }
1846
1846
  });
1847
- var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-46H2DYJ5.mjs'));
1847
+ var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-AWMN54K6.mjs'));
1848
1848
  var Radio = forwardRef((props, ref) => {
1849
1849
  return /* @__PURE__ */ React85__default.createElement(Radio$1, { ...props, ref });
1850
1850
  });
@@ -2090,9 +2090,9 @@ var RadioCard = forwardRef(
2090
2090
  as: "label",
2091
2091
  name,
2092
2092
  htmlFor: inputId,
2093
- "aria-checked": isChecked,
2094
- "data-checked": isChecked,
2095
- "data-disabled": isDisabled,
2093
+ "aria-checked": dataAttr(isChecked),
2094
+ "data-checked": dataAttr(isChecked),
2095
+ "data-disabled": dataAttr(isDisabled),
2096
2096
  ...props,
2097
2097
  __css: {
2098
2098
  ...styles3.container,
@@ -2989,8 +2989,8 @@ var texts12 = createTexts({
2989
2989
  notification: (notification) => {
2990
2990
  const numNotification = Number(notification);
2991
2991
  return {
2992
- nb: `${numNotification} varsel`,
2993
- nn: `${numNotification} varsel`,
2992
+ nb: `${numNotification} ${numNotification > 1 ? "varsler" : "varsel"}`,
2993
+ nn: `${numNotification} ${numNotification > 1 ? "varslar" : "varsel"}`,
2994
2994
  sv: `${numNotification} ${numNotification > 1 ? "underr\xE4ttelser" : "underr\xE4ttelse"}`,
2995
2995
  en: `${numNotification} ${numNotification > 1 ? "notifications" : "notification"}`
2996
2996
  };
package/dist/index.js CHANGED
@@ -1105,7 +1105,7 @@ var init_ChoiceChip = __esm({
1105
1105
  {
1106
1106
  ...getInputProps({}, ref),
1107
1107
  id,
1108
- disabled: isDisabled
1108
+ disabled: isDisabled || state2.isDisabled
1109
1109
  }
1110
1110
  ),
1111
1111
  /* @__PURE__ */ React86__namespace.default.createElement(
@@ -1117,7 +1117,7 @@ var init_ChoiceChip = __esm({
1117
1117
  "data-hover": dataAttr(state2.isHovered),
1118
1118
  "data-focus": dataAttr(state2.isFocused),
1119
1119
  "data-active": dataAttr(state2.isActive),
1120
- "data-disabled": dataAttr(state2.isDisabled)
1120
+ "data-disabled": dataAttr(isDisabled || state2.isDisabled)
1121
1121
  },
1122
1122
  icon && /* @__PURE__ */ React86__namespace.default.createElement(react.chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
1123
1123
  chipType !== "icon" && /* @__PURE__ */ React86__namespace.default.createElement(react.chakra.span, { __css: styles3.label, ...getCheckboxProps() }, children),
@@ -2301,6 +2301,7 @@ exports.RadioCard = void 0;
2301
2301
  var init_RadioCard = __esm({
2302
2302
  "src/layout/RadioCard.tsx"() {
2303
2303
  init_RadioCardGroup();
2304
+ init_dist();
2304
2305
  exports.RadioCard = react.forwardRef(
2305
2306
  ({ children, value, isDisabled, ...props }, ref) => {
2306
2307
  const context = React86.useContext(exports.RadioCardGroupContext);
@@ -2363,9 +2364,9 @@ var init_RadioCard = __esm({
2363
2364
  as: "label",
2364
2365
  name,
2365
2366
  htmlFor: inputId,
2366
- "aria-checked": isChecked,
2367
- "data-checked": isChecked,
2368
- "data-disabled": isDisabled,
2367
+ "aria-checked": dataAttr(isChecked),
2368
+ "data-checked": dataAttr(isChecked),
2369
+ "data-disabled": dataAttr(isDisabled),
2369
2370
  ...props,
2370
2371
  __css: {
2371
2372
  ...styles3.container,
@@ -3511,8 +3512,8 @@ var init_ServiceAlert = __esm({
3511
3512
  notification: (notification) => {
3512
3513
  const numNotification = Number(notification);
3513
3514
  return {
3514
- nb: `${numNotification} varsel`,
3515
- nn: `${numNotification} varsel`,
3515
+ nb: `${numNotification} ${numNotification > 1 ? "varsler" : "varsel"}`,
3516
+ nn: `${numNotification} ${numNotification > 1 ? "varslar" : "varsel"}`,
3516
3517
  sv: `${numNotification} ${numNotification > 1 ? "underr\xE4ttelser" : "underr\xE4ttelse"}`,
3517
3518
  en: `${numNotification} ${numNotification > 1 ? "notifications" : "notification"}`
3518
3519
  };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, CardSelect, CargonetLogo, 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, FullScreenDrawer, 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, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, ServiceAlert, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-ROHXFJX2.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, CardSelect, CargonetLogo, 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, FullScreenDrawer, 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, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, ServiceAlert, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-QXIAB7O5.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "11.0.0",
3
+ "version": "11.0.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -157,8 +157,8 @@ const texts = createTexts({
157
157
  notification: (notification) => {
158
158
  const numNotification = Number(notification);
159
159
  return {
160
- nb: `${numNotification} varsel`,
161
- nn: `${numNotification} varsel`,
160
+ nb: `${numNotification} ${numNotification > 1 ? "varsler" : "varsel"}`,
161
+ nn: `${numNotification} ${numNotification > 1 ? "varslar" : "varsel"}`,
162
162
  sv: `${numNotification} ${numNotification > 1 ? "underrättelser" : "underrättelse"}`,
163
163
  en: `${numNotification} ${numNotification > 1 ? "notifications" : "notification"}`,
164
164
  };
@@ -93,7 +93,7 @@ export const ChoiceChip = forwardRef(
93
93
  <chakra.input
94
94
  {...getInputProps({}, ref)}
95
95
  id={id}
96
- disabled={isDisabled}
96
+ disabled={isDisabled || state.isDisabled}
97
97
  />
98
98
  <chakra.div
99
99
  {...getLabelProps()}
@@ -102,7 +102,7 @@ export const ChoiceChip = forwardRef(
102
102
  data-hover={dataAttr(state.isHovered)}
103
103
  data-focus={dataAttr(state.isFocused)}
104
104
  data-active={dataAttr(state.isActive)}
105
- data-disabled={dataAttr(state.isDisabled)}
105
+ data-disabled={dataAttr(isDisabled || state.isDisabled)}
106
106
  >
107
107
  {icon && (
108
108
  <chakra.span __css={styles.icon}>
@@ -7,6 +7,7 @@ import {
7
7
  } from "@chakra-ui/react";
8
8
  import React, { useContext, useEffect, useId, useState } from "react";
9
9
  import { RadioCardGroupContext } from "./RadioCardGroup";
10
+ import { dataAttr } from "@chakra-ui/utils";
10
11
 
11
12
  /**
12
13
  * Radio cards are used to present a set of options where only one option can be selected.
@@ -107,9 +108,9 @@ export const RadioCard = forwardRef(
107
108
  as="label"
108
109
  name={name}
109
110
  htmlFor={inputId}
110
- aria-checked={isChecked}
111
- data-checked={isChecked}
112
- data-disabled={isDisabled}
111
+ aria-checked={dataAttr(isChecked)}
112
+ data-checked={dataAttr(isChecked)}
113
+ data-disabled={dataAttr(isDisabled)}
113
114
  {...props}
114
115
  __css={{
115
116
  ...styles.container,