@vygruppen/spor-react 12.20.2 → 12.21.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.
- package/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +25 -0
- package/dist/index.cjs +150 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +150 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/alert/AlertIcon.tsx +1 -5
- package/src/datepicker/DateField.tsx +1 -6
- package/src/input/Input.tsx +14 -3
- package/src/input/Select.tsx +1 -6
- package/src/theme/recipes/badge.ts +118 -24
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.21.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
|
-
|
|
15
|
-
CJS dist/icons/index.cjs 381.00 B
|
|
16
|
-
CJS dist/icons/index.cjs.map 157.00 B
|
|
17
|
-
CJS dist/index.cjs.map 668.38 KB
|
|
18
|
-
CJS ⚡️ Build success in 2728ms
|
|
19
|
-
ESM dist/index.mjs 313.92 KB
|
|
14
|
+
ESM dist/index.mjs 316.18 KB
|
|
20
15
|
ESM dist/icons/index.mjs 110.00 B
|
|
16
|
+
ESM dist/index.mjs.map 672.11 KB
|
|
21
17
|
ESM dist/icons/index.mjs.map 157.00 B
|
|
22
|
-
ESM
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
ESM ⚡️ Build success in 2690ms
|
|
19
|
+
CJS dist/index.cjs 339.46 KB
|
|
20
|
+
CJS dist/icons/index.cjs 381.00 B
|
|
21
|
+
CJS dist/icons/index.cjs.map 157.00 B
|
|
22
|
+
CJS dist/index.cjs.map 672.11 KB
|
|
23
|
+
CJS ⚡️ Build success in 2691ms
|
|
24
|
+
DTS ⚡️ Build success in 19346ms
|
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
|
26
|
-
DTS dist/index.d.ts 158.
|
|
26
|
+
DTS dist/index.d.ts 158.97 KB
|
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
|
28
|
-
DTS dist/index.d.cts 158.
|
|
28
|
+
DTS dist/index.d.cts 158.97 KB
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.21.1 postinstall /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> chakra typegen src/theme/index.ts
|
|
4
4
|
|
|
5
|
-
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️
|
|
5
|
+
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ load multiple .env files with { path: ['.env.local', '.env'] }
|
|
6
6
|
[90m┌[39m Chakra CLI ⚡️
|
|
7
7
|
[?25l[90m│[39m
|
|
8
8
|
[35m◒[39m Generating conditions types...
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @vygruppen/spor-react
|
|
2
2
|
|
|
3
|
+
## 12.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7b2b1a4: New icon for usb-charging on board
|
|
8
|
+
- Updated dependencies [7b2b1a4]
|
|
9
|
+
- @vygruppen/spor-icon-react@4.5.1
|
|
10
|
+
|
|
11
|
+
## 12.21.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 680088f: Restore correct fill color for feedback icons to improve appearance in dark mode.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 71ff08b: Fix console warnings caused by forwardRef usage
|
|
20
|
+
- ef1c670: Add inverted colors for badge component
|
|
21
|
+
- 4cef922: Possibility to change fontsize in input and search input field
|
|
22
|
+
- dc87d26: Revert non-working portalled logic for SelectContent
|
|
23
|
+
- Updated dependencies [ef1c670]
|
|
24
|
+
- Updated dependencies [680088f]
|
|
25
|
+
- @vygruppen/spor-design-tokens@4.3.1
|
|
26
|
+
- @vygruppen/spor-icon-react@4.5.0
|
|
27
|
+
|
|
3
28
|
## 12.20.2
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -634,59 +634,59 @@ var badgeRecipie = react.defineRecipe({
|
|
|
634
634
|
variants: {
|
|
635
635
|
colorPalette: {
|
|
636
636
|
neutral: {
|
|
637
|
-
backgroundColor: "surface
|
|
638
|
-
color: "
|
|
637
|
+
backgroundColor: "badge.surface",
|
|
638
|
+
color: "badge.text",
|
|
639
639
|
"& svg": {
|
|
640
|
-
color: "
|
|
640
|
+
color: "badge.icon"
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
grey: {
|
|
644
|
-
backgroundColor: "
|
|
645
|
-
color: "
|
|
644
|
+
backgroundColor: "badge.grey.surface",
|
|
645
|
+
color: "badge.grey.text",
|
|
646
646
|
"& svg": {
|
|
647
|
-
color: "
|
|
647
|
+
color: "badge.grey.icon"
|
|
648
648
|
}
|
|
649
649
|
},
|
|
650
650
|
green: {
|
|
651
|
-
backgroundColor: "
|
|
652
|
-
color: "
|
|
651
|
+
backgroundColor: "badge.green.surface",
|
|
652
|
+
color: "badge.green.text",
|
|
653
653
|
"& svg": {
|
|
654
|
-
color: "
|
|
654
|
+
color: "badge.green.icon"
|
|
655
655
|
}
|
|
656
656
|
},
|
|
657
657
|
blue: {
|
|
658
|
-
backgroundColor: "
|
|
659
|
-
color: "
|
|
658
|
+
backgroundColor: "badge.blue.surface",
|
|
659
|
+
color: "badge.blue.text",
|
|
660
660
|
"& svg": {
|
|
661
|
-
color: "
|
|
661
|
+
color: "badge.blue.icon"
|
|
662
662
|
}
|
|
663
663
|
},
|
|
664
664
|
cream: {
|
|
665
|
-
backgroundColor: "
|
|
666
|
-
color: "
|
|
665
|
+
backgroundColor: "badge.cream.surface",
|
|
666
|
+
color: "badge.cream.text",
|
|
667
667
|
"& svg": {
|
|
668
|
-
color: "
|
|
668
|
+
color: "badge.cream.icon"
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
671
|
yellow: {
|
|
672
|
-
backgroundColor: "
|
|
673
|
-
color: "
|
|
672
|
+
backgroundColor: "badge.yellow.surface",
|
|
673
|
+
color: "badge.yellow.text",
|
|
674
674
|
"& svg": {
|
|
675
|
-
color: "
|
|
675
|
+
color: "badge.yellow.icon"
|
|
676
676
|
}
|
|
677
677
|
},
|
|
678
678
|
orange: {
|
|
679
|
-
backgroundColor: "
|
|
680
|
-
color: "
|
|
679
|
+
backgroundColor: "badge.orange.surface",
|
|
680
|
+
color: "badge.orange.text",
|
|
681
681
|
"& svg": {
|
|
682
|
-
color: "
|
|
682
|
+
color: "badge.orange.icon"
|
|
683
683
|
}
|
|
684
684
|
},
|
|
685
685
|
red: {
|
|
686
|
-
backgroundColor: "
|
|
687
|
-
color: "
|
|
686
|
+
backgroundColor: "badge.red.surface",
|
|
687
|
+
color: "badge.red.text",
|
|
688
688
|
"& svg": {
|
|
689
|
-
color: "
|
|
689
|
+
color: "badge.red.icon"
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
},
|
|
@@ -717,13 +717,107 @@ var badgeRecipie = react.defineRecipe({
|
|
|
717
717
|
true: {
|
|
718
718
|
borderBottomRadius: "none"
|
|
719
719
|
}
|
|
720
|
-
}
|
|
720
|
+
},
|
|
721
|
+
inverted: { true: {} }
|
|
721
722
|
},
|
|
722
723
|
defaultVariants: {
|
|
723
724
|
colorPalette: "grey",
|
|
724
725
|
size: "md",
|
|
725
|
-
attached: false
|
|
726
|
-
|
|
726
|
+
attached: false,
|
|
727
|
+
inverted: false
|
|
728
|
+
},
|
|
729
|
+
compoundVariants: [
|
|
730
|
+
{
|
|
731
|
+
colorPalette: "blue",
|
|
732
|
+
inverted: true,
|
|
733
|
+
css: {
|
|
734
|
+
backgroundColor: "badge.blue.surface.inverted",
|
|
735
|
+
color: "badge.blue.text.inverted",
|
|
736
|
+
"& svg": {
|
|
737
|
+
color: "badge.blue.icon.inverted"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
colorPalette: "green",
|
|
743
|
+
inverted: true,
|
|
744
|
+
css: {
|
|
745
|
+
backgroundColor: "badge.green.surface.inverted",
|
|
746
|
+
color: "badge.green.text.inverted",
|
|
747
|
+
"& svg": {
|
|
748
|
+
color: "badge.green.icon.inverted"
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
colorPalette: "grey",
|
|
754
|
+
inverted: true,
|
|
755
|
+
css: {
|
|
756
|
+
backgroundColor: "badge.grey.surface.inverted",
|
|
757
|
+
color: "badge.grey.text.inverted",
|
|
758
|
+
"& svg": {
|
|
759
|
+
color: "badge.grey.icon.inverted"
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
// @ts-expect-error Chakra gir feilmelding fordi "cream" ikke eksisterer i built-in ColorPalette-typen
|
|
765
|
+
colorPalette: "cream",
|
|
766
|
+
inverted: true,
|
|
767
|
+
css: {
|
|
768
|
+
backgroundColor: "badge.cream.surface.inverted",
|
|
769
|
+
color: "badge.cream.text.inverted",
|
|
770
|
+
"& svg": {
|
|
771
|
+
color: "badge.cream.icon.inverted"
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
colorPalette: "yellow",
|
|
777
|
+
inverted: true,
|
|
778
|
+
css: {
|
|
779
|
+
backgroundColor: "badge.yellow.surface.inverted",
|
|
780
|
+
color: "badge.yellow.text.inverted",
|
|
781
|
+
"& svg": {
|
|
782
|
+
color: "badge.yellow.icon.inverted"
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
colorPalette: "orange",
|
|
788
|
+
inverted: true,
|
|
789
|
+
css: {
|
|
790
|
+
backgroundColor: "badge.orange.surface.inverted",
|
|
791
|
+
color: "badge.orange.text.inverted",
|
|
792
|
+
"& svg": {
|
|
793
|
+
color: "badge.orange.icon.inverted"
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
colorPalette: "red",
|
|
799
|
+
inverted: true,
|
|
800
|
+
css: {
|
|
801
|
+
backgroundColor: "badge.red.surface.inverted",
|
|
802
|
+
color: "badge.red.text.inverted",
|
|
803
|
+
"& svg": {
|
|
804
|
+
color: "badge.red.icon.inverted"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
// @ts-expect-error Chakra gir feilmelding fordi "neutral" ikke eksisterer i built-in typen
|
|
810
|
+
colorPalette: "neutral",
|
|
811
|
+
inverted: true,
|
|
812
|
+
css: {
|
|
813
|
+
backgroundColor: "badge.surface.inverted",
|
|
814
|
+
color: "badge.text.inverted",
|
|
815
|
+
"& svg": {
|
|
816
|
+
color: "badge.icon.inverted"
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
]
|
|
727
821
|
});
|
|
728
822
|
|
|
729
823
|
// src/theme/recipes/code.ts
|
|
@@ -948,15 +1042,7 @@ var useScrollDirection = () => {
|
|
|
948
1042
|
var AlertIcon = React29.forwardRef(
|
|
949
1043
|
({ variant, customIcon: CustomAlertIcon }, ref) => {
|
|
950
1044
|
const { t } = useTranslation();
|
|
951
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
952
|
-
react.Box,
|
|
953
|
-
{
|
|
954
|
-
asChild: true,
|
|
955
|
-
ref,
|
|
956
|
-
"aria-label": t(texts5[variant]),
|
|
957
|
-
children: CustomAlertIcon ? /* @__PURE__ */ jsxRuntime.jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsxRuntime.jsx(BaseAlertIcon, { variant })
|
|
958
|
-
}
|
|
959
|
-
);
|
|
1045
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { ref, "aria-label": t(texts5[variant]), children: CustomAlertIcon ? /* @__PURE__ */ jsxRuntime.jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsxRuntime.jsx(BaseAlertIcon, { variant }) });
|
|
960
1046
|
}
|
|
961
1047
|
);
|
|
962
1048
|
AlertIcon.displayName = "AlertIcon";
|
|
@@ -2295,20 +2381,11 @@ var DateField = React29.forwardRef(
|
|
|
2295
2381
|
ref
|
|
2296
2382
|
);
|
|
2297
2383
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { minWidth: "6rem", width: "100%", children: [
|
|
2298
|
-
props.label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
position: "absolute",
|
|
2304
|
-
paddingTop: "2px",
|
|
2305
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Label, { padding: "0", ...props.labelProps, children: [
|
|
2306
|
-
props.label,
|
|
2307
|
-
" ",
|
|
2308
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
|
|
2309
|
-
] })
|
|
2310
|
-
}
|
|
2311
|
-
),
|
|
2384
|
+
props.label && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.inputLabel, position: "absolute", paddingTop: "2px", children: /* @__PURE__ */ jsxRuntime.jsxs(Label, { padding: "0", ...props.labelProps, children: [
|
|
2385
|
+
props.label,
|
|
2386
|
+
" ",
|
|
2387
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
|
|
2388
|
+
] }) }),
|
|
2312
2389
|
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2313
2390
|
DateTimeSegment,
|
|
2314
2391
|
{
|
|
@@ -3406,6 +3483,7 @@ var Input = React29.forwardRef(
|
|
|
3406
3483
|
errorText,
|
|
3407
3484
|
required,
|
|
3408
3485
|
hidden,
|
|
3486
|
+
fontSize,
|
|
3409
3487
|
...props
|
|
3410
3488
|
}, ref) => {
|
|
3411
3489
|
const recipe = react.useRecipe({ key: "input" });
|
|
@@ -3430,14 +3508,22 @@ var Input = React29.forwardRef(
|
|
|
3430
3508
|
hidden,
|
|
3431
3509
|
errorText,
|
|
3432
3510
|
id: props.id,
|
|
3433
|
-
label: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { children: [
|
|
3511
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { fontSize: fontSize ?? "mobile.md", children: [
|
|
3434
3512
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { visibility: "hidden", children: startElement }),
|
|
3435
3513
|
label
|
|
3436
3514
|
] }),
|
|
3437
3515
|
floatingLabel: true,
|
|
3438
3516
|
shouldFloat,
|
|
3439
3517
|
children: [
|
|
3440
|
-
startElement && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3518
|
+
startElement && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3519
|
+
react.InputElement,
|
|
3520
|
+
{
|
|
3521
|
+
pointerEvents: "none",
|
|
3522
|
+
paddingX: 2,
|
|
3523
|
+
fontSize: fontSize ?? "mobile.md",
|
|
3524
|
+
children: startElement
|
|
3525
|
+
}
|
|
3526
|
+
),
|
|
3441
3527
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3442
3528
|
react.Input,
|
|
3443
3529
|
{
|
|
@@ -3454,10 +3540,19 @@ var Input = React29.forwardRef(
|
|
|
3454
3540
|
onBlur: handleBlur,
|
|
3455
3541
|
onChange: handleChange,
|
|
3456
3542
|
placeholder: "",
|
|
3457
|
-
css: styles
|
|
3543
|
+
css: styles,
|
|
3544
|
+
fontSize: fontSize ?? "mobile.md"
|
|
3458
3545
|
}
|
|
3459
3546
|
),
|
|
3460
|
-
endElement && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3547
|
+
endElement && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3548
|
+
react.InputElement,
|
|
3549
|
+
{
|
|
3550
|
+
placement: "end",
|
|
3551
|
+
paddingX: 2,
|
|
3552
|
+
fontSize: fontSize ?? "mobile.md",
|
|
3553
|
+
children: endElement
|
|
3554
|
+
}
|
|
3555
|
+
)
|
|
3461
3556
|
]
|
|
3462
3557
|
}
|
|
3463
3558
|
);
|
|
@@ -4127,14 +4222,7 @@ var Select = React29__namespace.forwardRef(
|
|
|
4127
4222
|
children: [
|
|
4128
4223
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
|
|
4129
4224
|
label && /* @__PURE__ */ jsxRuntime.jsx(SelectLabel, { css: styles.label, children: label }),
|
|
4130
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4131
|
-
SelectContent,
|
|
4132
|
-
{
|
|
4133
|
-
css: styles.selectContent,
|
|
4134
|
-
portalled: typeof document !== "undefined",
|
|
4135
|
-
children
|
|
4136
|
-
}
|
|
4137
|
-
)
|
|
4225
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { css: styles.selectContent, children })
|
|
4138
4226
|
]
|
|
4139
4227
|
}
|
|
4140
4228
|
)
|