@vygruppen/spor-react 12.8.6 → 12.8.8

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@12.8.6 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.8.8 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,17 +11,17 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- ESM dist/index.mjs 293.20 KB
14
+ ESM dist/index.mjs 293.57 KB
15
15
  ESM dist/icons/index.mjs 110.00 B
16
+ ESM dist/index.mjs.map 628.65 KB
16
17
  ESM dist/icons/index.mjs.map 157.00 B
17
- ESM dist/index.mjs.map 628.09 KB
18
- ESM ⚡️ Build success in 3384ms
19
- CJS dist/index.cjs 314.03 KB
18
+ ESM ⚡️ Build success in 2969ms
19
+ CJS dist/index.cjs 314.45 KB
20
20
  CJS dist/icons/index.cjs 381.00 B
21
+ CJS dist/index.cjs.map 628.65 KB
21
22
  CJS dist/icons/index.cjs.map 157.00 B
22
- CJS dist/index.cjs.map 628.09 KB
23
- CJS ⚡️ Build success in 3385ms
24
- DTS ⚡️ Build success in 30082ms
23
+ CJS ⚡️ Build success in 2970ms
24
+ DTS ⚡️ Build success in 29941ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
26
  DTS dist/index.d.ts 156.34 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@12.8.6 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.8.8 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
5
  ┌ Chakra CLI ⚡️
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 12.8.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 7f7c933: field: Render RequiredIndicator when required is true
8
+ heading: Fix bug where autoId was used when externalId was specified
9
+
10
+ ## 12.8.7
11
+
12
+ ### Patch Changes
13
+
14
+ - f697959: - Checkbox: Prevent input control box from shrinking.
15
+ - TextLink: Simplify styling and ensure underline appears correctly on multiline links.
16
+
3
17
  ## 12.8.6
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -773,8 +773,15 @@ var Heading = React27.forwardRef(
773
773
  id: externalId,
774
774
  ...rest
775
775
  } = props;
776
- const id = externalId ?? (autoId && typeof rest.children === "string") ? slugify(rest.children) : void 0;
777
- return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as, textStyle: variant, id, ref, ...rest });
776
+ const reactId = React27.useId();
777
+ function getId() {
778
+ if (externalId !== void 0)
779
+ return externalId;
780
+ if (!autoId)
781
+ return;
782
+ return typeof rest.children === "string" ? slugify(rest.children) : reactId;
783
+ }
784
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as, textStyle: variant, id: getId(), ref, ...rest });
778
785
  }
779
786
  );
780
787
  function resolveTextProps({
@@ -1405,9 +1412,15 @@ var Field3 = React27__namespace.forwardRef(
1405
1412
  css: styles.root,
1406
1413
  direction,
1407
1414
  children: [
1408
- label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
1415
+ label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsxs(Label, { children: [
1416
+ label,
1417
+ /* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
1418
+ ] }),
1409
1419
  children,
1410
- label && floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(FloatingLabel, { children: label }),
1420
+ label && floatingLabel && /* @__PURE__ */ jsxRuntime.jsxs(FloatingLabel, { children: [
1421
+ label,
1422
+ /* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
1423
+ ] }),
1411
1424
  errorText && /* @__PURE__ */ jsxRuntime.jsx(react.Field.ErrorText, { children: errorText })
1412
1425
  ]
1413
1426
  }
@@ -1973,6 +1986,7 @@ var DatePicker = React27.forwardRef(
1973
1986
  errorText,
1974
1987
  invalid,
1975
1988
  helperText,
1989
+ required: props.required,
1976
1990
  children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1977
1991
  StyledField,
1978
1992
  {
@@ -2096,6 +2110,7 @@ function DateRangePicker({
2096
2110
  errorText,
2097
2111
  helperText,
2098
2112
  invalid,
2113
+ required: props.required,
2099
2114
  children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { children: /* @__PURE__ */ jsxRuntime.jsxs(
2100
2115
  StyledField,
2101
2116
  {
@@ -2805,6 +2820,7 @@ var Input = React27.forwardRef(
2805
2820
  invalid,
2806
2821
  helperText,
2807
2822
  errorText,
2823
+ required,
2808
2824
  ...props
2809
2825
  }, ref) => {
2810
2826
  const recipe = react.useRecipe({ key: "input" });
@@ -2815,6 +2831,7 @@ var Input = React27.forwardRef(
2815
2831
  {
2816
2832
  invalid,
2817
2833
  helperText,
2834
+ required,
2818
2835
  errorText,
2819
2836
  label: (
2820
2837
  // Render startElement invisibly to align label text with input content when an icon is present
@@ -3487,22 +3504,31 @@ var Select = React27__namespace.forwardRef(
3487
3504
  } = props;
3488
3505
  const recipe = react.useSlotRecipe({ key: "select" });
3489
3506
  const styles = recipe({ variant });
3490
- return /* @__PURE__ */ jsxRuntime.jsx(Field3, { errorText, invalid, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
3491
- react.Select.Root,
3507
+ return /* @__PURE__ */ jsxRuntime.jsx(
3508
+ Field3,
3492
3509
  {
3493
- ...rest,
3494
- ref,
3495
- positioning: { sameWidth: true, ...positioning },
3496
- variant,
3497
- css: styles.root,
3498
- position: "relative",
3499
- children: [
3500
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
3501
- label && /* @__PURE__ */ jsxRuntime.jsx(SelectLabel, { css: styles.label, children: label }),
3502
- /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { css: styles.selectContent, children })
3503
- ]
3510
+ errorText,
3511
+ invalid,
3512
+ helperText,
3513
+ required: props.required,
3514
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3515
+ react.Select.Root,
3516
+ {
3517
+ ...rest,
3518
+ ref,
3519
+ positioning: { sameWidth: true, ...positioning },
3520
+ variant,
3521
+ css: styles.root,
3522
+ position: "relative",
3523
+ children: [
3524
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
3525
+ label && /* @__PURE__ */ jsxRuntime.jsx(SelectLabel, { css: styles.label, children: label }),
3526
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { css: styles.selectContent, children })
3527
+ ]
3528
+ }
3529
+ )
3504
3530
  }
3505
- ) });
3531
+ );
3506
3532
  }
3507
3533
  );
3508
3534
  var SelectLabel = (props) => {
@@ -3609,6 +3635,7 @@ var Switch = React27.forwardRef(
3609
3635
  invalid,
3610
3636
  errorText,
3611
3637
  helperText,
3638
+ required: props.required,
3612
3639
  children: /* @__PURE__ */ jsxRuntime.jsxs(
3613
3640
  react.Switch.Root,
3614
3641
  {
@@ -3949,7 +3976,7 @@ var ExternalIcon = ({
3949
3976
  label,
3950
3977
  size
3951
3978
  }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3952
- size === "lg" || size === "md" ? /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.LinkOutOutline24Icon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.LinkOutOutline18Icon, { "aria-hidden": true }),
3979
+ size === "lg" || size === "md" ? /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
3953
3980
  /* @__PURE__ */ jsxRuntime.jsx(react.VisuallyHidden, { children: label })
3954
3981
  ] });
3955
3982
  var TextLink = React27.forwardRef(
@@ -5614,32 +5641,22 @@ var inputRecipe = react.defineRecipe({
5614
5641
  });
5615
5642
  var linkRecipe = react.defineRecipe({
5616
5643
  base: {
5617
- transitionProperty: "common",
5618
- transitionDuration: "fast",
5619
- transitionTimingFunction: "ease-out",
5620
- cursor: "pointer",
5621
- backgroundImage: "linear-gradient(currentColor, currentColor)",
5622
- backgroundSize: "100% 1px",
5623
- backgroundPosition: "0 100%",
5624
- backgroundRepeat: "no-repeat",
5625
- borderRadius: "none",
5626
- paddingX: "2px",
5627
- paddingY: "0",
5644
+ display: "inline",
5628
5645
  color: "inherit",
5629
- display: "inline-flex",
5630
- alignItems: "center",
5631
- gap: "0",
5632
- position: "relative",
5633
- boxDecorationBreak: "clone",
5634
- textUnderlineOffset: "0",
5635
- "&:focus, &:focus-visible, &:active, &:hover": {
5636
- backgroundImage: "none",
5637
- backgroundSize: "100%",
5638
- outline: "none",
5639
- borderRadius: "xs"
5646
+ cursor: "pointer",
5647
+ textDecorationLine: "underline",
5648
+ textDecorationSkipInk: "none",
5649
+ textUnderlineOffset: "auto",
5650
+ textUnderlinePosition: "from-font",
5651
+ gap: "0.5",
5652
+ borderRadius: "xs",
5653
+ paddingX: "0.5",
5654
+ whiteSpace: "normal",
5655
+ wordBreak: "break-word",
5656
+ _hover: {
5657
+ textDecoration: "none"
5640
5658
  },
5641
5659
  "& svg": {
5642
- display: "inline-block",
5643
5660
  width: "1.125em",
5644
5661
  height: "1.125em",
5645
5662
  position: "relative",
@@ -6748,6 +6765,8 @@ var checkboxSlotRecipe = react.defineSlotRecipe({
6748
6765
  slots: checkboxAnatomy.keys(),
6749
6766
  base: {
6750
6767
  root: {
6768
+ whiteSpace: "normal",
6769
+ wordBreak: "break-word",
6751
6770
  display: "flex",
6752
6771
  gap: 1.5,
6753
6772
  _hover: {
@@ -6774,6 +6793,7 @@ var checkboxSlotRecipe = react.defineSlotRecipe({
6774
6793
  control: {
6775
6794
  width: 4,
6776
6795
  height: 4,
6796
+ flexShrink: 0,
6777
6797
  transitionProperty: "background, border-color",
6778
6798
  transitionDuration: "moderate",
6779
6799
  border: "2px solid",
@@ -6813,7 +6833,6 @@ var checkboxSlotRecipe = react.defineSlotRecipe({
6813
6833
  }
6814
6834
  },
6815
6835
  label: {
6816
- userSelect: "none",
6817
6836
  _disabled: { opacity: 0.4 }
6818
6837
  }
6819
6838
  }
@@ -7637,6 +7656,9 @@ var fieldSlotRecipe = react.defineSlotRecipe({
7637
7656
  marginStart: 1,
7638
7657
  color: "brightRed"
7639
7658
  },
7659
+ label: {
7660
+ display: "flex"
7661
+ },
7640
7662
  helperText: {
7641
7663
  marginTop: 2,
7642
7664
  color: "text.tertiary",