@vygruppen/spor-react 13.3.2 → 13.4.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@13.3.2 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@13.4.1 build /home/runner/work/spor/spor/packages/spor-react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx, src/icons/index.tsx
@@ -11,18 +11,18 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- ESM dist/index.mjs 348.86 KB
15
- ESM dist/icons/index.mjs 110.00 B
16
- ESM dist/index.mjs.map 741.95 KB
17
- ESM dist/icons/index.mjs.map 157.00 B
18
- ESM ⚡️ Build success in 2868ms
19
- CJS dist/index.cjs 373.39 KB
20
14
  CJS dist/icons/index.cjs 381.00 B
15
+ CJS dist/index.cjs 375.20 KB
21
16
  CJS dist/icons/index.cjs.map 157.00 B
22
- CJS dist/index.cjs.map 741.95 KB
23
- CJS ⚡️ Build success in 2869ms
24
- DTS ⚡️ Build success in 21449ms
17
+ CJS dist/index.cjs.map 745.37 KB
18
+ CJS ⚡️ Build success in 3155ms
19
+ ESM dist/icons/index.mjs 110.00 B
20
+ ESM dist/index.mjs 350.63 KB
21
+ ESM dist/icons/index.mjs.map 157.00 B
22
+ ESM dist/index.mjs.map 745.37 KB
23
+ ESM ⚡️ Build success in 3156ms
24
+ DTS ⚡️ Build success in 22936ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
- DTS dist/index.d.ts 150.59 KB
26
+ DTS dist/index.d.ts 151.03 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
28
- DTS dist/index.d.cts 150.59 KB
28
+ DTS dist/index.d.cts 151.03 KB
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@13.3.2 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@13.4.1 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
5
  ◇ injected env (0) from .env // tip: ⌘ enable debugging { debug: true }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 13.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e5b9c5e: Added customization option for travel and info tags `descriptionProps` & `titleProps`
8
+ - b6495d6: Update TravelTag background colours and walk LineIcon dark mode colour
9
+
10
+ ## 13.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 6412d40: Add size variant with options between small and medium for form elements, including Input, PasswordInput, PhonenumberInput, SearchInput, and Select
15
+
16
+ ### Patch Changes
17
+
18
+ - e864f09: Phonenumber input: remove red border from countrycode select when invalid
19
+ - 17a00b7: Remove padding around link in breadcrumb to prevent text from moving 3px when navigating between elements
20
+ - @vygruppen/spor-icon-react@5.0.0
21
+
3
22
  ## 13.3.2
4
23
 
5
24
  ### Patch Changes
@@ -0,0 +1,69 @@
1
+ import { RadioGroupRootProps } from "@chakra-ui/react";
2
+ import { render, screen } from "@testing-library/react";
3
+ import userEvent from "@testing-library/user-event";
4
+ import { Radio, RadioGroup, SporProvider } from "@vygruppen/spor-react";
5
+ import { Ref } from "react";
6
+ import { JSX } from "react/jsx-runtime";
7
+ import { describe, expect, test } from "vitest";
8
+
9
+ const value1 = "My first value";
10
+ const label1 = "World's best radio label";
11
+ const value2 = "Life changing value";
12
+ const label2 = "Radio label of the year";
13
+
14
+ const RadioGroupTest = (
15
+ props: JSX.IntrinsicAttributes &
16
+ Omit<RadioGroupRootProps, "colorPalette" | "size" | "variant"> & {
17
+ ref?: Ref<HTMLDivElement>;
18
+ },
19
+ ) => (
20
+ <SporProvider>
21
+ <RadioGroup {...props}>
22
+ <Radio value={value1}>{label1}</Radio>
23
+ <Radio value={value2}>{label2}</Radio>
24
+ </RadioGroup>
25
+ </SporProvider>
26
+ );
27
+
28
+ describe("Uncontrolled RadioGroup", () => {
29
+ test("handles state correctly", async () => {
30
+ const user = userEvent.setup();
31
+
32
+ render(<RadioGroupTest />);
33
+
34
+ const input1 = screen.getByRole("radio", {
35
+ name: label1,
36
+ }) as HTMLInputElement;
37
+ const input2 = screen.getByRole("radio", {
38
+ name: label2,
39
+ }) as HTMLInputElement;
40
+
41
+ expect(input1.checked).toBe(false);
42
+ expect(input2.checked).toBe(false);
43
+
44
+ await user.click(screen.getByRole("radio", { name: label2 }));
45
+
46
+ expect(input1.checked).toBe(false);
47
+ expect(input2.checked).toBe(true);
48
+ });
49
+
50
+ test("handles defaultValue correctly", async () => {
51
+ const user = userEvent.setup();
52
+ render(<RadioGroupTest defaultValue={value1} />);
53
+
54
+ const input1 = screen.getByRole("radio", {
55
+ name: label1,
56
+ }) as HTMLInputElement;
57
+ const input2 = screen.getByRole("radio", {
58
+ name: label2,
59
+ }) as HTMLInputElement;
60
+
61
+ expect(input1.checked).toBe(true);
62
+ expect(input2.checked).toBe(false);
63
+
64
+ await user.click(screen.getByRole("radio", { name: label2 }));
65
+
66
+ expect(input1.checked).toBe(false);
67
+ expect(input2.checked).toBe(true);
68
+ });
69
+ });