@vygruppen/spor-react 4.1.1 → 5.0.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@4.1.1 build
2
+ > @vygruppen/spor-react@5.0.0 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 490.53 KB
13
- CJS ⚡️ Build success in 2250ms
14
12
  ESM dist/index.mjs 2.10 KB
15
- ESM dist/CountryCodeSelect-7MAIS4VT.mjs 1.19 KB
16
- ESM dist/chunk-U2IWIWOD.mjs 382.91 KB
17
- ESM ⚡️ Build success in 2252ms
18
- DTS ⚡️ Build success in 12839ms
19
- DTS dist/index.d.ts 262.48 KB
20
- DTS dist/index.d.mts 262.48 KB
13
+ ESM dist/CountryCodeSelect-YOBYHYCF.mjs 1.19 KB
14
+ ESM dist/chunk-UOZQ4EDI.mjs 382.90 KB
15
+ ESM ⚡️ Build success in 2307ms
16
+ CJS dist/index.js 490.51 KB
17
+ CJS ⚡️ Build success in 2308ms
18
+ DTS ⚡️ Build success in 13078ms
19
+ DTS dist/index.d.ts 262.47 KB
20
+ DTS dist/index.d.mts 262.47 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 24963270: Breaking: Rename <Button variant="additional" /> to <Button variant="tertiary" />
8
+
9
+ Due to a… minor screwup on ~our~ @selbekk's side, we deprecated the wrong name earlier on.
10
+
11
+ To mitigate my screwup, please search through your code base for "additional", and replace it with "tertiary". It should be a simple enough upgrade. Make sure to do this with all Button and IconButton components.
12
+
13
+ Sorry. - @selbekk.
14
+
15
+ ### Patch Changes
16
+
17
+ - 799d47bb: Button: bugfix changed primary button color to pine
18
+
3
19
  ## 4.1.1
4
20
 
5
21
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-U2IWIWOD.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-UOZQ4EDI.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -3416,7 +3416,7 @@ var texts14 = createTexts({
3416
3416
  sv: "Telefonnummer"
3417
3417
  }
3418
3418
  });
3419
- var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-7MAIS4VT.mjs'));
3419
+ var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-YOBYHYCF.mjs'));
3420
3420
  var Radio = forwardRef((props, ref) => {
3421
3421
  return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
3422
3422
  });
@@ -4098,7 +4098,7 @@ var NextStepButton = ({ isLastStep, onNext }) => {
4098
4098
  return /* @__PURE__ */ React69.createElement(
4099
4099
  Button,
4100
4100
  {
4101
- variant: "additional",
4101
+ variant: "tertiary",
4102
4102
  size: "sm",
4103
4103
  color: "white",
4104
4104
  leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React69.createElement(ArrowRightFill18Icon, null),
@@ -4269,7 +4269,7 @@ var StepperStep = ({
4269
4269
  Button,
4270
4270
  {
4271
4271
  size: "xs",
4272
- variant: state2 === "active" ? "primary" : state2 === "completed" ? "additional" : "ghost",
4272
+ variant: state2 === "active" ? "primary" : state2 === "completed" ? "tertiary" : "ghost",
4273
4273
  ...adjustedProps,
4274
4274
  onClick: () => onClick(stepNumber)
4275
4275
  },
@@ -9799,7 +9799,7 @@ var config6 = defineStyleConfig$1({
9799
9799
  primary: (props) => ({
9800
9800
  // FIXME: Update to use a global defined background color for darkMode whenever it is available.
9801
9801
  // hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
9802
- backgroundColor: mode("primaryGreen", "coralGreen")(props),
9802
+ backgroundColor: mode("pine", "coralGreen")(props),
9803
9803
  color: mode("white", "darkTeal")(props),
9804
9804
  ...focusVisible({
9805
9805
  focus: {
@@ -13459,7 +13459,7 @@ var ActionToast = ({
13459
13459
  buttonText,
13460
13460
  id
13461
13461
  }) => {
13462
- return /* @__PURE__ */ React69__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__default.createElement(Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__default.createElement(Button, { variant: "additional", size: "sm", onClick }, buttonText));
13462
+ return /* @__PURE__ */ React69__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__default.createElement(Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__default.createElement(Button, { variant: "tertiary", size: "sm", onClick }, buttonText));
13463
13463
  };
13464
13464
  var ClosableToast = ({
13465
13465
  children,
package/dist/index.d.mts CHANGED
@@ -266,7 +266,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
266
266
  *
267
267
  * Defaults to "primary"
268
268
  */
269
- variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
269
+ variant?: "control" | "primary" | "secondary" | "tertiary" | "ghost" | "floating";
270
270
  };
271
271
  /**
272
272
  * Buttons are used to trigger actions.
@@ -276,7 +276,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
276
276
  * - `control`: This button is used for ticket controls only.
277
277
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
278
278
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
279
- * - `additional`: Used for additional choices, like a less important secondary action.
279
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
280
280
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
281
281
  * - `floating`: Used for floating actions, like a menu button in a menu.
282
282
  *
@@ -334,7 +334,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
334
334
  declare const ButtonGroup: _chakra_ui_system_dist_system_types.ComponentWithAs<"div", ButtonGroupProps$1>;
335
335
 
336
336
  type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
337
- variant: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
337
+ variant: "control" | "primary" | "secondary" | "tertiary" | "ghost" | "floating";
338
338
  };
339
339
  /**
340
340
  * An icon-only button.
@@ -346,7 +346,7 @@ type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
346
346
  * - `control`: This button is used for ticket controls only.
347
347
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
348
348
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
349
- * - `additional`: Used for additional choices, like a less important secondary action.
349
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
350
350
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
351
351
  * - `floating`: Used for floating actions, like a menu button in a menu.
352
352
  *
@@ -2363,7 +2363,7 @@ declare const theme: {
2363
2363
  } | undefined;
2364
2364
  defaultProps?: {
2365
2365
  size?: "sm" | "md" | "lg" | "xs" | undefined;
2366
- variant?: "primary" | "secondary" | "ghost" | "floating" | "tertiary" | undefined;
2366
+ variant?: "primary" | "secondary" | "tertiary" | "ghost" | "floating" | undefined;
2367
2367
  colorScheme?: string | undefined;
2368
2368
  } | undefined;
2369
2369
  };
package/dist/index.d.ts CHANGED
@@ -266,7 +266,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
266
266
  *
267
267
  * Defaults to "primary"
268
268
  */
269
- variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
269
+ variant?: "control" | "primary" | "secondary" | "tertiary" | "ghost" | "floating";
270
270
  };
271
271
  /**
272
272
  * Buttons are used to trigger actions.
@@ -276,7 +276,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
276
276
  * - `control`: This button is used for ticket controls only.
277
277
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
278
278
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
279
- * - `additional`: Used for additional choices, like a less important secondary action.
279
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
280
280
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
281
281
  * - `floating`: Used for floating actions, like a menu button in a menu.
282
282
  *
@@ -334,7 +334,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
334
334
  declare const ButtonGroup: _chakra_ui_system_dist_system_types.ComponentWithAs<"div", ButtonGroupProps$1>;
335
335
 
336
336
  type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
337
- variant: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
337
+ variant: "control" | "primary" | "secondary" | "tertiary" | "ghost" | "floating";
338
338
  };
339
339
  /**
340
340
  * An icon-only button.
@@ -346,7 +346,7 @@ type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
346
346
  * - `control`: This button is used for ticket controls only.
347
347
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
348
348
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
349
- * - `additional`: Used for additional choices, like a less important secondary action.
349
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
350
350
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
351
351
  * - `floating`: Used for floating actions, like a menu button in a menu.
352
352
  *
@@ -2363,7 +2363,7 @@ declare const theme: {
2363
2363
  } | undefined;
2364
2364
  defaultProps?: {
2365
2365
  size?: "sm" | "md" | "lg" | "xs" | undefined;
2366
- variant?: "primary" | "secondary" | "ghost" | "floating" | "tertiary" | undefined;
2366
+ variant?: "primary" | "secondary" | "tertiary" | "ghost" | "floating" | undefined;
2367
2367
  colorScheme?: string | undefined;
2368
2368
  } | undefined;
2369
2369
  };
package/dist/index.js CHANGED
@@ -4912,7 +4912,7 @@ var init_PopoverWizardBody = __esm({
4912
4912
  return /* @__PURE__ */ React69__namespace.createElement(
4913
4913
  exports.Button,
4914
4914
  {
4915
- variant: "additional",
4915
+ variant: "tertiary",
4916
4916
  size: "sm",
4917
4917
  color: "white",
4918
4918
  leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React69__namespace.createElement(sporIconReact.ArrowRightFill18Icon, null),
@@ -5133,7 +5133,7 @@ var init_StepperStep = __esm({
5133
5133
  exports.Button,
5134
5134
  {
5135
5135
  size: "xs",
5136
- variant: state2 === "active" ? "primary" : state2 === "completed" ? "additional" : "ghost",
5136
+ variant: state2 === "active" ? "primary" : state2 === "completed" ? "tertiary" : "ghost",
5137
5137
  ...adjustedProps,
5138
5138
  onClick: () => onClick(stepNumber)
5139
5139
  },
@@ -11286,7 +11286,7 @@ var init_button2 = __esm({
11286
11286
  primary: (props) => ({
11287
11287
  // FIXME: Update to use a global defined background color for darkMode whenever it is available.
11288
11288
  // hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
11289
- backgroundColor: themeTools.mode("primaryGreen", "coralGreen")(props),
11289
+ backgroundColor: themeTools.mode("pine", "coralGreen")(props),
11290
11290
  color: themeTools.mode("white", "darkTeal")(props),
11291
11291
  ...focusVisible({
11292
11292
  focus: {
@@ -15295,7 +15295,7 @@ var init_ActionToast = __esm({
15295
15295
  buttonText,
15296
15296
  id
15297
15297
  }) => {
15298
- return /* @__PURE__ */ React69__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__namespace.default.createElement(exports.Button, { variant: "additional", size: "sm", onClick }, buttonText));
15298
+ return /* @__PURE__ */ React69__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__namespace.default.createElement(exports.Button, { variant: "tertiary", size: "sm", onClick }, buttonText));
15299
15299
  };
15300
15300
  }
15301
15301
  });
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, 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, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, Portal, 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, UnorderedList, 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-U2IWIWOD.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, 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, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, Portal, 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, UnorderedList, 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-UOZQ4EDI.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "4.1.1",
3
+ "version": "5.0.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@ export type ButtonProps = Exclude<
28
28
  | "control"
29
29
  | "primary"
30
30
  | "secondary"
31
- | "additional"
31
+ | "tertiary"
32
32
  | "ghost"
33
33
  | "floating";
34
34
  };
@@ -40,7 +40,7 @@ export type ButtonProps = Exclude<
40
40
  * - `control`: This button is used for ticket controls only.
41
41
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
42
42
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
43
- * - `additional`: Used for additional choices, like a less important secondary action.
43
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
44
44
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
45
45
  * - `floating`: Used for floating actions, like a menu button in a menu.
46
46
  *
@@ -12,7 +12,7 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
12
12
  | "control"
13
13
  | "primary"
14
14
  | "secondary"
15
- | "additional"
15
+ | "tertiary"
16
16
  | "ghost"
17
17
  | "floating";
18
18
  };
@@ -26,7 +26,7 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
26
26
  * - `control`: This button is used for ticket controls only.
27
27
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
28
28
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
29
- * - `additional`: Used for additional choices, like a less important secondary action.
29
+ * - `tertiary`: Used for additional choices, like a less important secondary action.
30
30
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
31
31
  * - `floating`: Used for floating actions, like a menu button in a menu.
32
32
  *
@@ -64,7 +64,7 @@ const NextStepButton = ({ isLastStep, onNext }: NextStepButtonProps) => {
64
64
  const { t } = useTranslation();
65
65
  return (
66
66
  <Button
67
- variant="additional"
67
+ variant="tertiary"
68
68
  size="sm"
69
69
  color="white"
70
70
  leftIcon={isLastStep ? undefined : <ArrowRightFill18Icon />}
@@ -35,7 +35,7 @@ export const StepperStep = ({
35
35
  state === "active"
36
36
  ? "primary"
37
37
  : state === "completed"
38
- ? "additional"
38
+ ? "tertiary"
39
39
  : "ghost"
40
40
  }
41
41
  {...adjustedProps}
@@ -34,7 +34,7 @@ const config = defineStyleConfig({
34
34
  primary: (props) => ({
35
35
  // FIXME: Update to use a global defined background color for darkMode whenever it is available.
36
36
  // hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
37
- backgroundColor: mode("primaryGreen", "coralGreen")(props),
37
+ backgroundColor: mode("pine", "coralGreen")(props),
38
38
  color: mode("white", "darkTeal")(props),
39
39
  ...focusVisible({
40
40
  focus: {
@@ -20,7 +20,7 @@ export const ActionToast = ({
20
20
  <Box marginRight={2} flexGrow="1">
21
21
  {children}
22
22
  </Box>
23
- <Button variant="additional" size="sm" onClick={onClick}>
23
+ <Button variant="tertiary" size="sm" onClick={onClick}>
24
24
  {buttonText}
25
25
  </Button>
26
26
  </BaseToast>