@vygruppen/spor-react 12.8.7 → 12.8.9
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 +13 -0
- package/dist/index.cjs +55 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +55 -19
- 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 +14 -2
- package/src/input/Input.tsx +3 -0
- package/src/input/NativeSelect.tsx +1 -0
- package/src/input/NumericStepper.tsx +1 -1
- package/src/input/Select.tsx +7 -1
- package/src/input/Switch.tsx +2 -0
- package/src/theme/slot-recipes/field.ts +3 -0
- package/src/typography/Heading.tsx +13 -6
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.8.
|
2
|
+
> @vygruppen/spor-react@12.8.9 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
|
-
CJS dist/index.cjs
|
14
|
+
CJS dist/index.cjs 314.57 KB
|
15
15
|
CJS dist/icons/index.cjs 381.00 B
|
16
|
-
CJS dist/index.cjs.map 627.68 KB
|
17
16
|
CJS dist/icons/index.cjs.map 157.00 B
|
18
|
-
CJS
|
19
|
-
|
17
|
+
CJS dist/index.cjs.map 628.88 KB
|
18
|
+
CJS ⚡️ Build success in 2988ms
|
19
|
+
ESM dist/index.mjs 293.69 KB
|
20
20
|
ESM dist/icons/index.mjs 110.00 B
|
21
|
-
ESM dist/index.mjs.map
|
21
|
+
ESM dist/index.mjs.map 628.88 KB
|
22
22
|
ESM dist/icons/index.mjs.map 157.00 B
|
23
|
-
ESM ⚡️ Build success in
|
24
|
-
DTS ⚡️ Build success in
|
23
|
+
ESM ⚡️ Build success in 2990ms
|
24
|
+
DTS ⚡️ Build success in 29591ms
|
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
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 12.8.9
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 979903e: Fix bug where specifying id on inputs gives missing label error.
|
8
|
+
|
9
|
+
## 12.8.8
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 7f7c933: field: Render RequiredIndicator when required is true
|
14
|
+
heading: Fix bug where autoId was used when externalId was specified
|
15
|
+
|
3
16
|
## 12.8.7
|
4
17
|
|
5
18
|
### 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
|
777
|
-
|
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({
|
@@ -1390,6 +1397,7 @@ var Field3 = React27__namespace.forwardRef(
|
|
1390
1397
|
readOnly,
|
1391
1398
|
required,
|
1392
1399
|
direction,
|
1400
|
+
id,
|
1393
1401
|
...rest
|
1394
1402
|
} = props;
|
1395
1403
|
const recipe = react.useSlotRecipe({ key: "field" });
|
@@ -1404,10 +1412,17 @@ var Field3 = React27__namespace.forwardRef(
|
|
1404
1412
|
required,
|
1405
1413
|
css: styles.root,
|
1406
1414
|
direction,
|
1415
|
+
id,
|
1407
1416
|
children: [
|
1408
|
-
label && !floatingLabel && /* @__PURE__ */ jsxRuntime.
|
1417
|
+
label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsxs(Label, { children: [
|
1418
|
+
label,
|
1419
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
|
1420
|
+
] }),
|
1409
1421
|
children,
|
1410
|
-
label && floatingLabel && /* @__PURE__ */ jsxRuntime.
|
1422
|
+
label && floatingLabel && /* @__PURE__ */ jsxRuntime.jsxs(FloatingLabel, { children: [
|
1423
|
+
label,
|
1424
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
|
1425
|
+
] }),
|
1411
1426
|
errorText && /* @__PURE__ */ jsxRuntime.jsx(react.Field.ErrorText, { children: errorText })
|
1412
1427
|
]
|
1413
1428
|
}
|
@@ -1973,6 +1988,7 @@ var DatePicker = React27.forwardRef(
|
|
1973
1988
|
errorText,
|
1974
1989
|
invalid,
|
1975
1990
|
helperText,
|
1991
|
+
required: props.required,
|
1976
1992
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
1977
1993
|
StyledField,
|
1978
1994
|
{
|
@@ -2096,6 +2112,7 @@ function DateRangePicker({
|
|
2096
2112
|
errorText,
|
2097
2113
|
helperText,
|
2098
2114
|
invalid,
|
2115
|
+
required: props.required,
|
2099
2116
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
2100
2117
|
StyledField,
|
2101
2118
|
{
|
@@ -2805,6 +2822,7 @@ var Input = React27.forwardRef(
|
|
2805
2822
|
invalid,
|
2806
2823
|
helperText,
|
2807
2824
|
errorText,
|
2825
|
+
required,
|
2808
2826
|
...props
|
2809
2827
|
}, ref) => {
|
2810
2828
|
const recipe = react.useRecipe({ key: "input" });
|
@@ -2815,7 +2833,9 @@ var Input = React27.forwardRef(
|
|
2815
2833
|
{
|
2816
2834
|
invalid,
|
2817
2835
|
helperText,
|
2836
|
+
required,
|
2818
2837
|
errorText,
|
2838
|
+
id: props.id,
|
2819
2839
|
label: (
|
2820
2840
|
// Render startElement invisibly to align label text with input content when an icon is present
|
2821
2841
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { children: [
|
@@ -2978,6 +2998,7 @@ var NativeSelect = React27__namespace.forwardRef(function NativeSelect2(props, r
|
|
2978
2998
|
required,
|
2979
2999
|
helperText,
|
2980
3000
|
errorText,
|
3001
|
+
id: rest.id,
|
2981
3002
|
floatingLabel: true,
|
2982
3003
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
2983
3004
|
react.NativeSelect.Root,
|
@@ -3032,7 +3053,7 @@ var NumericStepper = React27__namespace.default.forwardRef((props, ref) => {
|
|
3032
3053
|
var _a5;
|
3033
3054
|
(_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
|
3034
3055
|
};
|
3035
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
|
3056
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, id: idProp, ref, children: [
|
3036
3057
|
/* @__PURE__ */ jsxRuntime.jsx(
|
3037
3058
|
VerySmallButton,
|
3038
3059
|
{
|
@@ -3487,22 +3508,32 @@ var Select = React27__namespace.forwardRef(
|
|
3487
3508
|
} = props;
|
3488
3509
|
const recipe = react.useSlotRecipe({ key: "select" });
|
3489
3510
|
const styles = recipe({ variant });
|
3490
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
3491
|
-
|
3511
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
3512
|
+
Field3,
|
3492
3513
|
{
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3499
|
-
|
3500
|
-
|
3501
|
-
|
3502
|
-
|
3503
|
-
|
3514
|
+
errorText,
|
3515
|
+
invalid,
|
3516
|
+
helperText,
|
3517
|
+
required: props.required,
|
3518
|
+
id: rest.id,
|
3519
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
3520
|
+
react.Select.Root,
|
3521
|
+
{
|
3522
|
+
...rest,
|
3523
|
+
ref,
|
3524
|
+
positioning: { sameWidth: true, ...positioning },
|
3525
|
+
variant,
|
3526
|
+
css: styles.root,
|
3527
|
+
position: "relative",
|
3528
|
+
children: [
|
3529
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
|
3530
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(SelectLabel, { css: styles.label, children: label }),
|
3531
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { css: styles.selectContent, children })
|
3532
|
+
]
|
3533
|
+
}
|
3534
|
+
)
|
3504
3535
|
}
|
3505
|
-
)
|
3536
|
+
);
|
3506
3537
|
}
|
3507
3538
|
);
|
3508
3539
|
var SelectLabel = (props) => {
|
@@ -3609,6 +3640,8 @@ var Switch = React27.forwardRef(
|
|
3609
3640
|
invalid,
|
3610
3641
|
errorText,
|
3611
3642
|
helperText,
|
3643
|
+
required: props.required,
|
3644
|
+
id: rest.id,
|
3612
3645
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
3613
3646
|
react.Switch.Root,
|
3614
3647
|
{
|
@@ -7629,6 +7662,9 @@ var fieldSlotRecipe = react.defineSlotRecipe({
|
|
7629
7662
|
marginStart: 1,
|
7630
7663
|
color: "brightRed"
|
7631
7664
|
},
|
7665
|
+
label: {
|
7666
|
+
display: "flex"
|
7667
|
+
},
|
7632
7668
|
helperText: {
|
7633
7669
|
marginTop: 2,
|
7634
7670
|
color: "text.tertiary",
|