@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.
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +65 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +65 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/datepicker/DatePicker.tsx +1 -0
- package/src/datepicker/DateRangePicker.tsx +1 -0
- package/src/input/Field.tsx +12 -2
- package/src/input/Input.tsx +2 -0
- package/src/input/Select.tsx +6 -1
- package/src/input/Switch.tsx +1 -0
- package/src/link/TextLink.tsx +2 -2
- package/src/theme/recipes/link.ts +14 -23
- package/src/theme/slot-recipes/checkbox.ts +3 -1
- package/src/theme/slot-recipes/field.ts +3 -0
- package/src/typography/Heading.tsx +13 -6
package/dist/index.mjs
CHANGED
@@ -753,8 +753,15 @@ var Heading = forwardRef(
|
|
753
753
|
id: externalId,
|
754
754
|
...rest
|
755
755
|
} = props;
|
756
|
-
const
|
757
|
-
|
756
|
+
const reactId = useId();
|
757
|
+
function getId() {
|
758
|
+
if (externalId !== void 0)
|
759
|
+
return externalId;
|
760
|
+
if (!autoId)
|
761
|
+
return;
|
762
|
+
return typeof rest.children === "string" ? slugify(rest.children) : reactId;
|
763
|
+
}
|
764
|
+
return /* @__PURE__ */ jsx(Text, { as, textStyle: variant, id: getId(), ref, ...rest });
|
758
765
|
}
|
759
766
|
);
|
760
767
|
function resolveTextProps({
|
@@ -1385,9 +1392,15 @@ var Field3 = React27.forwardRef(
|
|
1385
1392
|
css: styles.root,
|
1386
1393
|
direction,
|
1387
1394
|
children: [
|
1388
|
-
label && !floatingLabel && /* @__PURE__ */
|
1395
|
+
label && !floatingLabel && /* @__PURE__ */ jsxs(Label, { children: [
|
1396
|
+
label,
|
1397
|
+
/* @__PURE__ */ jsx(Field.RequiredIndicator, {})
|
1398
|
+
] }),
|
1389
1399
|
children,
|
1390
|
-
label && floatingLabel && /* @__PURE__ */
|
1400
|
+
label && floatingLabel && /* @__PURE__ */ jsxs(FloatingLabel, { children: [
|
1401
|
+
label,
|
1402
|
+
/* @__PURE__ */ jsx(Field.RequiredIndicator, {})
|
1403
|
+
] }),
|
1391
1404
|
errorText && /* @__PURE__ */ jsx(Field.ErrorText, { children: errorText })
|
1392
1405
|
]
|
1393
1406
|
}
|
@@ -1953,6 +1966,7 @@ var DatePicker = forwardRef(
|
|
1953
1966
|
errorText,
|
1954
1967
|
invalid,
|
1955
1968
|
helperText,
|
1969
|
+
required: props.required,
|
1956
1970
|
children: /* @__PURE__ */ jsx(PopoverAnchor, { children: /* @__PURE__ */ jsxs(
|
1957
1971
|
StyledField,
|
1958
1972
|
{
|
@@ -2076,6 +2090,7 @@ function DateRangePicker({
|
|
2076
2090
|
errorText,
|
2077
2091
|
helperText,
|
2078
2092
|
invalid,
|
2093
|
+
required: props.required,
|
2079
2094
|
children: /* @__PURE__ */ jsx(PopoverAnchor, { children: /* @__PURE__ */ jsxs(
|
2080
2095
|
StyledField,
|
2081
2096
|
{
|
@@ -2785,6 +2800,7 @@ var Input = forwardRef(
|
|
2785
2800
|
invalid,
|
2786
2801
|
helperText,
|
2787
2802
|
errorText,
|
2803
|
+
required,
|
2788
2804
|
...props
|
2789
2805
|
}, ref) => {
|
2790
2806
|
const recipe = useRecipe({ key: "input" });
|
@@ -2795,6 +2811,7 @@ var Input = forwardRef(
|
|
2795
2811
|
{
|
2796
2812
|
invalid,
|
2797
2813
|
helperText,
|
2814
|
+
required,
|
2798
2815
|
errorText,
|
2799
2816
|
label: (
|
2800
2817
|
// Render startElement invisibly to align label text with input content when an icon is present
|
@@ -3467,22 +3484,31 @@ var Select = React27.forwardRef(
|
|
3467
3484
|
} = props;
|
3468
3485
|
const recipe = useSlotRecipe({ key: "select" });
|
3469
3486
|
const styles = recipe({ variant });
|
3470
|
-
return /* @__PURE__ */ jsx(
|
3471
|
-
|
3487
|
+
return /* @__PURE__ */ jsx(
|
3488
|
+
Field3,
|
3472
3489
|
{
|
3473
|
-
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
|
3481
|
-
|
3482
|
-
|
3483
|
-
|
3490
|
+
errorText,
|
3491
|
+
invalid,
|
3492
|
+
helperText,
|
3493
|
+
required: props.required,
|
3494
|
+
children: /* @__PURE__ */ jsxs(
|
3495
|
+
Select$1.Root,
|
3496
|
+
{
|
3497
|
+
...rest,
|
3498
|
+
ref,
|
3499
|
+
positioning: { sameWidth: true, ...positioning },
|
3500
|
+
variant,
|
3501
|
+
css: styles.root,
|
3502
|
+
position: "relative",
|
3503
|
+
children: [
|
3504
|
+
/* @__PURE__ */ jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
|
3505
|
+
label && /* @__PURE__ */ jsx(SelectLabel, { css: styles.label, children: label }),
|
3506
|
+
/* @__PURE__ */ jsx(SelectContent, { css: styles.selectContent, children })
|
3507
|
+
]
|
3508
|
+
}
|
3509
|
+
)
|
3484
3510
|
}
|
3485
|
-
)
|
3511
|
+
);
|
3486
3512
|
}
|
3487
3513
|
);
|
3488
3514
|
var SelectLabel = (props) => {
|
@@ -3589,6 +3615,7 @@ var Switch = forwardRef(
|
|
3589
3615
|
invalid,
|
3590
3616
|
errorText,
|
3591
3617
|
helperText,
|
3618
|
+
required: props.required,
|
3592
3619
|
children: /* @__PURE__ */ jsxs(
|
3593
3620
|
Switch$1.Root,
|
3594
3621
|
{
|
@@ -3929,7 +3956,7 @@ var ExternalIcon = ({
|
|
3929
3956
|
label,
|
3930
3957
|
size
|
3931
3958
|
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
3932
|
-
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true }),
|
3959
|
+
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
|
3933
3960
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
3934
3961
|
] });
|
3935
3962
|
var TextLink = forwardRef(
|
@@ -5594,32 +5621,22 @@ var inputRecipe = defineRecipe({
|
|
5594
5621
|
});
|
5595
5622
|
var linkRecipe = defineRecipe({
|
5596
5623
|
base: {
|
5597
|
-
|
5598
|
-
transitionDuration: "fast",
|
5599
|
-
transitionTimingFunction: "ease-out",
|
5600
|
-
cursor: "pointer",
|
5601
|
-
backgroundImage: "linear-gradient(currentColor, currentColor)",
|
5602
|
-
backgroundSize: "100% 1px",
|
5603
|
-
backgroundPosition: "0 100%",
|
5604
|
-
backgroundRepeat: "no-repeat",
|
5605
|
-
borderRadius: "none",
|
5606
|
-
paddingX: "2px",
|
5607
|
-
paddingY: "0",
|
5624
|
+
display: "inline",
|
5608
5625
|
color: "inherit",
|
5609
|
-
|
5610
|
-
|
5611
|
-
|
5612
|
-
|
5613
|
-
|
5614
|
-
|
5615
|
-
"
|
5616
|
-
|
5617
|
-
|
5618
|
-
|
5619
|
-
|
5626
|
+
cursor: "pointer",
|
5627
|
+
textDecorationLine: "underline",
|
5628
|
+
textDecorationSkipInk: "none",
|
5629
|
+
textUnderlineOffset: "auto",
|
5630
|
+
textUnderlinePosition: "from-font",
|
5631
|
+
gap: "0.5",
|
5632
|
+
borderRadius: "xs",
|
5633
|
+
paddingX: "0.5",
|
5634
|
+
whiteSpace: "normal",
|
5635
|
+
wordBreak: "break-word",
|
5636
|
+
_hover: {
|
5637
|
+
textDecoration: "none"
|
5620
5638
|
},
|
5621
5639
|
"& svg": {
|
5622
|
-
display: "inline-block",
|
5623
5640
|
width: "1.125em",
|
5624
5641
|
height: "1.125em",
|
5625
5642
|
position: "relative",
|
@@ -6728,6 +6745,8 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6728
6745
|
slots: checkboxAnatomy.keys(),
|
6729
6746
|
base: {
|
6730
6747
|
root: {
|
6748
|
+
whiteSpace: "normal",
|
6749
|
+
wordBreak: "break-word",
|
6731
6750
|
display: "flex",
|
6732
6751
|
gap: 1.5,
|
6733
6752
|
_hover: {
|
@@ -6754,6 +6773,7 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6754
6773
|
control: {
|
6755
6774
|
width: 4,
|
6756
6775
|
height: 4,
|
6776
|
+
flexShrink: 0,
|
6757
6777
|
transitionProperty: "background, border-color",
|
6758
6778
|
transitionDuration: "moderate",
|
6759
6779
|
border: "2px solid",
|
@@ -6793,7 +6813,6 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6793
6813
|
}
|
6794
6814
|
},
|
6795
6815
|
label: {
|
6796
|
-
userSelect: "none",
|
6797
6816
|
_disabled: { opacity: 0.4 }
|
6798
6817
|
}
|
6799
6818
|
}
|
@@ -7617,6 +7636,9 @@ var fieldSlotRecipe = defineSlotRecipe({
|
|
7617
7636
|
marginStart: 1,
|
7618
7637
|
color: "brightRed"
|
7619
7638
|
},
|
7639
|
+
label: {
|
7640
|
+
display: "flex"
|
7641
|
+
},
|
7620
7642
|
helperText: {
|
7621
7643
|
marginTop: 2,
|
7622
7644
|
color: "text.tertiary",
|