@vygruppen/spor-react 13.6.0 → 13.7.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 +3 -4
- package/CHANGELOG.md +28 -0
- package/__tests__/toast.test.tsx +108 -0
- package/dist/index.cjs +126 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -2
- package/dist/index.d.ts +29 -2
- package/dist/index.mjs +127 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/input/Autocomplete.tsx +2 -0
- package/src/input/Field.tsx +2 -4
- package/src/layout/RadioCard.tsx +2 -1
- package/src/link/TextLink.tsx +27 -11
- package/src/theme/recipes/badge.ts +20 -0
- package/src/theme/recipes/input.ts +8 -1
- package/src/theme/recipes/separator.ts +4 -3
- package/src/theme/slot-recipes/input-chip.ts +4 -5
- package/src/theme/slot-recipes/select.ts +5 -0
- package/src/theme/slot-recipes/toast.ts +38 -1
- package/src/toast/toast.tsx +10 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@13.
|
|
2
|
+
> @vygruppen/spor-react@13.7.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
|
-
ESM dist/icons/index.mjs 110.00 B
|
|
16
|
-
ESM dist/icons/index.mjs.map 157.00 B
|
|
17
|
-
ESM dist/index.mjs.map 752.22 KB
|
|
18
|
-
ESM ⚡️ Build success in 2851ms
|
|
19
|
-
CJS dist/index.cjs 378.29 KB
|
|
14
|
+
CJS dist/index.cjs 381.85 KB
|
|
20
15
|
CJS dist/icons/index.cjs 381.00 B
|
|
16
|
+
CJS dist/index.cjs.map 757.94 KB
|
|
21
17
|
CJS dist/icons/index.cjs.map 157.00 B
|
|
22
|
-
CJS
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
CJS ⚡️ Build success in 2364ms
|
|
19
|
+
ESM dist/index.mjs 357.12 KB
|
|
20
|
+
ESM dist/icons/index.mjs 110.00 B
|
|
21
|
+
ESM dist/index.mjs.map 757.94 KB
|
|
22
|
+
ESM dist/icons/index.mjs.map 157.00 B
|
|
23
|
+
ESM ⚡️ Build success in 2366ms
|
|
24
|
+
DTS ⚡️ Build success in 21092ms
|
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
|
26
|
-
DTS dist/index.d.ts
|
|
26
|
+
DTS dist/index.d.ts 156.60 KB
|
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
|
28
|
-
DTS dist/index.d.cts
|
|
28
|
+
DTS dist/index.d.cts 156.60 KB
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@13.
|
|
2
|
+
> @vygruppen/spor-react@13.7.1 postinstall /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> chakra typegen src/theme/index.ts
|
|
4
4
|
|
|
5
|
-
◇ injected env (0) from .env // tip: ◈
|
|
5
|
+
◇ injected env (0) from .env // tip: ◈ encrypted .env [www.dotenvx.com]
|
|
6
6
|
[90m┌[39m Chakra CLI ⚡️
|
|
7
7
|
[?25l[90m│[39m
|
|
8
|
-
[
|
|
9
|
-
[1G[J[32m◇[39m ✅ Generated conditions typings
|
|
8
|
+
[32m◇[39m ✅ Generated conditions typings
|
|
10
9
|
[?25h[?25l[90m│[39m
|
|
11
10
|
[35m◒[39m Generating recipe types...
|
|
12
11
|
[1G[J[32m◇[39m ✅ Generated recipe typings
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @vygruppen/spor-react
|
|
2
2
|
|
|
3
|
+
## 13.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 15a6c48: Badge: Added outline on badges
|
|
8
|
+
- e4c369c: truncate long select labels when selected
|
|
9
|
+
- ac7ec72: Remove aria-hidden property from Field component to support better screen reading of form elements.
|
|
10
|
+
- 1272e1d: RadioCard bug: make the children of a RadioCard to by default be placed in a column instead of a row.
|
|
11
|
+
- Updated dependencies [1272e1d]
|
|
12
|
+
- @vygruppen/spor-icon-react@5.0.3
|
|
13
|
+
|
|
14
|
+
## 13.7.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- b80fda2: Toast: Introduce "inverted" as a prop, that uses darkmode colors in lightmode, and lightmode colors in darkmode.
|
|
19
|
+
- a1d5a12: Autocomplete: add a size-prop that can be set to either 'md' or 'sm'.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- e6bfa69: override safari autofill for input fields with spor colors
|
|
24
|
+
- 6d0bf57: TextLink: Add non-breaking space for external icon so that it never breaks over to a newline alone.
|
|
25
|
+
- 022e894: Separator: Change borderColor of the dashed separator to use the outline.default token
|
|
26
|
+
InputChip: Adjust the height of the different sizes to match with design.
|
|
27
|
+
TextLink: Change the ExternalLink-Icon to be of size 30x30 when TextLink is of size "lg"
|
|
28
|
+
- Updated dependencies [783c84f]
|
|
29
|
+
- @vygruppen/spor-design-tokens@5.1.1
|
|
30
|
+
|
|
3
31
|
## 13.6.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { render, screen, waitFor } from "@testing-library/react";
|
|
2
|
+
import userEvent from "@testing-library/user-event";
|
|
3
|
+
import { Button, createToast, SporProvider } from "@vygruppen/spor-react";
|
|
4
|
+
import { describe, expect, test, vi } from "vitest";
|
|
5
|
+
|
|
6
|
+
// SporProvider renders the Toaster internally, so toasts appear within it
|
|
7
|
+
|
|
8
|
+
describe("Toast", () => {
|
|
9
|
+
test("shows toast triggered by a button click", async () => {
|
|
10
|
+
const user = userEvent.setup();
|
|
11
|
+
|
|
12
|
+
render(
|
|
13
|
+
<SporProvider>
|
|
14
|
+
<Button
|
|
15
|
+
variant="secondary"
|
|
16
|
+
onClick={() =>
|
|
17
|
+
createToast({
|
|
18
|
+
variant: "success",
|
|
19
|
+
text: "Button triggered toast",
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
>
|
|
23
|
+
Show toast
|
|
24
|
+
</Button>
|
|
25
|
+
</SporProvider>,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
expect(
|
|
29
|
+
screen.queryByText("Button triggered toast"),
|
|
30
|
+
).not.toBeInTheDocument();
|
|
31
|
+
|
|
32
|
+
await user.click(screen.getByRole("button", { name: "Show toast" }));
|
|
33
|
+
|
|
34
|
+
await waitFor(() => {
|
|
35
|
+
expect(screen.getByText("Button triggered toast")).toBeInTheDocument();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("close toast by a close trigger button click", async () => {
|
|
40
|
+
const user = userEvent.setup();
|
|
41
|
+
|
|
42
|
+
render(
|
|
43
|
+
<SporProvider>
|
|
44
|
+
<Button
|
|
45
|
+
variant="secondary"
|
|
46
|
+
onClick={() =>
|
|
47
|
+
createToast({
|
|
48
|
+
variant: "success",
|
|
49
|
+
text: "Button triggered toast 2",
|
|
50
|
+
duration: 10_000,
|
|
51
|
+
closable: true,
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
Show toast
|
|
56
|
+
</Button>
|
|
57
|
+
</SporProvider>,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
expect(
|
|
61
|
+
screen.queryByText("Button triggered toast 2"),
|
|
62
|
+
).not.toBeInTheDocument();
|
|
63
|
+
|
|
64
|
+
await user.click(screen.getByRole("button", { name: "Show toast" }));
|
|
65
|
+
|
|
66
|
+
await waitFor(() => {
|
|
67
|
+
expect(screen.getByText("Button triggered toast 2")).toBeInTheDocument();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
await user.click(screen.getByRole("button", { name: "Lukk" }));
|
|
71
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
72
|
+
expect(
|
|
73
|
+
screen.queryByText("Button triggered toast 2"),
|
|
74
|
+
).not.toBeInTheDocument();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test("click on custom action button in toast", async () => {
|
|
78
|
+
const user = userEvent.setup();
|
|
79
|
+
const onButtonClick = vi.fn();
|
|
80
|
+
|
|
81
|
+
render(
|
|
82
|
+
<SporProvider>
|
|
83
|
+
<Button
|
|
84
|
+
variant="secondary"
|
|
85
|
+
onClick={() =>
|
|
86
|
+
createToast({
|
|
87
|
+
variant: "success",
|
|
88
|
+
text: "Button triggered toast 3",
|
|
89
|
+
action: {
|
|
90
|
+
label: "Undo",
|
|
91
|
+
onClick: onButtonClick,
|
|
92
|
+
},
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
>
|
|
96
|
+
Show toast
|
|
97
|
+
</Button>
|
|
98
|
+
</SporProvider>,
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
await user.click(screen.getByRole("button", { name: "Show toast" }));
|
|
102
|
+
await waitFor(() => {
|
|
103
|
+
expect(screen.getByText("Button triggered toast 3")).toBeInTheDocument();
|
|
104
|
+
});
|
|
105
|
+
await user.click(screen.getByRole("button", { name: "Undo" }));
|
|
106
|
+
expect(onButtonClick).toHaveBeenCalled();
|
|
107
|
+
});
|
|
108
|
+
});
|
package/dist/index.cjs
CHANGED
|
@@ -692,58 +692,70 @@ var badgeRecipie = react.defineRecipe({
|
|
|
692
692
|
alignItems: "center",
|
|
693
693
|
justifyContent: "center",
|
|
694
694
|
height: "fit-content",
|
|
695
|
-
gap: "0.5"
|
|
695
|
+
gap: "0.5",
|
|
696
|
+
outline: "1px solid",
|
|
697
|
+
outlineOffset: "-1px"
|
|
696
698
|
},
|
|
697
699
|
variants: {
|
|
698
700
|
colorPalette: {
|
|
699
701
|
neutral: {
|
|
700
702
|
backgroundColor: "surface",
|
|
701
703
|
color: "text",
|
|
704
|
+
outlineColor: "outline",
|
|
702
705
|
"& svg": { color: "icon" }
|
|
703
706
|
},
|
|
704
707
|
grey: {
|
|
705
708
|
backgroundColor: "surface.neutral",
|
|
706
709
|
color: "text.neutral",
|
|
710
|
+
outlineColor: "outline.neutral",
|
|
707
711
|
"& svg": { color: "icon.neutral" }
|
|
708
712
|
},
|
|
709
713
|
green: {
|
|
710
714
|
backgroundColor: "surface.success",
|
|
711
715
|
color: "text.success",
|
|
716
|
+
outlineColor: "outline.success",
|
|
712
717
|
"& svg": { color: "icon.success" }
|
|
713
718
|
},
|
|
714
719
|
blue: {
|
|
715
720
|
backgroundColor: "surface.info",
|
|
716
721
|
color: "text.info",
|
|
722
|
+
outlineColor: "outline.info",
|
|
717
723
|
"& svg": { color: "icon.info" }
|
|
718
724
|
},
|
|
719
725
|
cream: {
|
|
720
726
|
backgroundColor: "surface.warning",
|
|
721
727
|
color: "text.warning",
|
|
728
|
+
outlineColor: "outline.warning",
|
|
722
729
|
"& svg": { color: "icon.warning" }
|
|
723
730
|
},
|
|
724
731
|
yellow: {
|
|
725
732
|
backgroundColor: "surface.notice",
|
|
726
733
|
color: "text.notice",
|
|
734
|
+
outlineColor: "outline.notice",
|
|
727
735
|
"& svg": { color: "icon.notice" }
|
|
728
736
|
},
|
|
729
737
|
orange: {
|
|
730
738
|
backgroundColor: "surface.caution",
|
|
731
739
|
color: "text.caution",
|
|
740
|
+
outlineColor: "outline.caution",
|
|
732
741
|
"& svg": { color: "icon.caution" }
|
|
733
742
|
},
|
|
734
743
|
red: {
|
|
735
744
|
backgroundColor: "surface.critical",
|
|
736
745
|
color: "text.critical",
|
|
746
|
+
outlineColor: "outline.critical",
|
|
737
747
|
"& svg": { color: "icon.critical" }
|
|
738
748
|
},
|
|
739
749
|
brightRed: {
|
|
740
750
|
backgroundColor: { _light: "brightRed", _dark: "brightRed" },
|
|
741
751
|
color: { _light: "pink", _dark: "pink" },
|
|
752
|
+
outlineColor: "outline.error",
|
|
742
753
|
"& svg": { color: { _light: "pink", _dark: "pink" } }
|
|
743
754
|
},
|
|
744
755
|
disabled: {
|
|
745
756
|
backgroundColor: "surface.disabled",
|
|
746
757
|
color: "text.disabled",
|
|
758
|
+
outlineColor: "outline.disabled",
|
|
747
759
|
"& svg": { color: "icon.disabled" }
|
|
748
760
|
}
|
|
749
761
|
},
|
|
@@ -786,6 +798,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
786
798
|
css: {
|
|
787
799
|
backgroundColor: { _light: "darkBlue", _dark: "lightBlue" },
|
|
788
800
|
color: { _light: "icyBlue", _dark: "royal" },
|
|
801
|
+
outlineColor: { _light: "ocean", _dark: "cloudy" },
|
|
789
802
|
"& svg": { color: { _light: "royal", _dark: "icyBlue" } }
|
|
790
803
|
}
|
|
791
804
|
},
|
|
@@ -795,6 +808,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
795
808
|
css: {
|
|
796
809
|
backgroundColor: { _light: "darkTeal", _dark: "seaMist" },
|
|
797
810
|
color: { _light: "mint", _dark: "jungle" },
|
|
811
|
+
outlineColor: { _light: "greenHaze", _dark: "coralGreen" },
|
|
798
812
|
"& svg": { color: { _light: "mint", _dark: "jungle" } }
|
|
799
813
|
}
|
|
800
814
|
},
|
|
@@ -804,6 +818,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
804
818
|
css: {
|
|
805
819
|
backgroundColor: { _light: "carbon", _dark: "platinum" },
|
|
806
820
|
color: { _light: "white", _dark: "darkGrey" },
|
|
821
|
+
outlineColor: { _light: "iron", _dark: "silver" },
|
|
807
822
|
"& svg": { color: { _light: "white", _dark: "darkGrey" } }
|
|
808
823
|
}
|
|
809
824
|
},
|
|
@@ -814,6 +829,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
814
829
|
css: {
|
|
815
830
|
backgroundColor: { _light: "coffee", _dark: "blonde" },
|
|
816
831
|
color: { _light: "cornsilk", _dark: "coffee" },
|
|
832
|
+
outlineColor: { _light: "bronze", _dark: "banana" },
|
|
817
833
|
"& svg": { color: { _light: "cornsilk", _dark: "coffee" } }
|
|
818
834
|
}
|
|
819
835
|
},
|
|
@@ -823,6 +839,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
823
839
|
css: {
|
|
824
840
|
backgroundColor: { _light: "bronze", _dark: "banana" },
|
|
825
841
|
color: { _light: "cornsilk", _dark: "coffee" },
|
|
842
|
+
outlineColor: { _light: "golden", _dark: "banana" },
|
|
826
843
|
"& svg": { color: { _light: "cornsilk", _dark: "coffee" } }
|
|
827
844
|
}
|
|
828
845
|
},
|
|
@@ -832,6 +849,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
832
849
|
css: {
|
|
833
850
|
backgroundColor: { _light: "wood", _dark: "champagne" },
|
|
834
851
|
color: { _light: "bisque", _dark: "wood" },
|
|
852
|
+
outlineColor: { _light: "russet", _dark: "saffron" },
|
|
835
853
|
"& svg": { color: { _light: "bisque", _dark: "wood" } }
|
|
836
854
|
}
|
|
837
855
|
},
|
|
@@ -841,6 +859,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
841
859
|
css: {
|
|
842
860
|
backgroundColor: { _light: "burgundy", _dark: "lightRed" },
|
|
843
861
|
color: { _light: "pink", _dark: "maroon" },
|
|
862
|
+
outlineColor: { _light: "crimson", _dark: "salmon" },
|
|
844
863
|
"& svg": { color: { _light: "pink", _dark: "maroon" } }
|
|
845
864
|
}
|
|
846
865
|
},
|
|
@@ -850,6 +869,7 @@ var badgeRecipie = react.defineRecipe({
|
|
|
850
869
|
inverted: true,
|
|
851
870
|
css: {
|
|
852
871
|
backgroundColor: { _light: "ink", _dark: "white" },
|
|
872
|
+
outlineColor: { _light: "whiteAlpha.400", _dark: "blackAlpha.400" },
|
|
853
873
|
color: { _light: "white", _dark: "darkGrey" },
|
|
854
874
|
"& svg": { color: { _light: "white", _dark: "darkGrey" } }
|
|
855
875
|
}
|
|
@@ -1590,7 +1610,7 @@ var RadioCard = ({
|
|
|
1590
1610
|
),
|
|
1591
1611
|
/* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.ItemControl, { id: itemControlId, "aria-hidden": true, children: [
|
|
1592
1612
|
showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemIndicator, {}),
|
|
1593
|
-
children
|
|
1613
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: "column", children })
|
|
1594
1614
|
] })
|
|
1595
1615
|
] });
|
|
1596
1616
|
};
|
|
@@ -2108,18 +2128,17 @@ var Field3 = ({
|
|
|
2108
2128
|
id,
|
|
2109
2129
|
gap,
|
|
2110
2130
|
children: [
|
|
2111
|
-
label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { asChild: labelAsChild,
|
|
2112
|
-
children,
|
|
2131
|
+
label && !floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { asChild: labelAsChild, css: styles.label, children: renderLabelWithIndicator(label, labelAsChild) }),
|
|
2113
2132
|
label && floatingLabel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2114
2133
|
FloatingLabel,
|
|
2115
2134
|
{
|
|
2116
2135
|
"data-float": shouldFloat ? true : void 0,
|
|
2117
2136
|
asChild: labelAsChild,
|
|
2118
|
-
"aria-hidden": true,
|
|
2119
2137
|
css: styles.label,
|
|
2120
2138
|
children: renderLabelWithIndicator(label, labelAsChild)
|
|
2121
2139
|
}
|
|
2122
2140
|
),
|
|
2141
|
+
children,
|
|
2123
2142
|
errorText && /* @__PURE__ */ jsxRuntime.jsx(react.Field.ErrorText, { "aria-live": "polite", children: errorText })
|
|
2124
2143
|
]
|
|
2125
2144
|
}
|
|
@@ -3304,10 +3323,29 @@ var texts14 = createTexts({
|
|
|
3304
3323
|
var ExternalIcon = ({
|
|
3305
3324
|
label,
|
|
3306
3325
|
size
|
|
3307
|
-
}) =>
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3326
|
+
}) => {
|
|
3327
|
+
const getIcon = () => {
|
|
3328
|
+
switch (size) {
|
|
3329
|
+
case "lg": {
|
|
3330
|
+
return /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline30Icon, { "aria-hidden": true, display: "inline" });
|
|
3331
|
+
}
|
|
3332
|
+
case "md": {
|
|
3333
|
+
return /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" });
|
|
3334
|
+
}
|
|
3335
|
+
case "sm": {
|
|
3336
|
+
return /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" });
|
|
3337
|
+
}
|
|
3338
|
+
default: {
|
|
3339
|
+
return /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" });
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
};
|
|
3343
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { whiteSpace: "nowrap" }, children: [
|
|
3344
|
+
"\u2060",
|
|
3345
|
+
getIcon(),
|
|
3346
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.VisuallyHidden, { children: label })
|
|
3347
|
+
] });
|
|
3348
|
+
};
|
|
3311
3349
|
var TextLink = ({
|
|
3312
3350
|
ref,
|
|
3313
3351
|
children,
|
|
@@ -3668,6 +3706,7 @@ function Autocomplete({
|
|
|
3668
3706
|
openOnClick = true,
|
|
3669
3707
|
openOnFocus = true,
|
|
3670
3708
|
ref,
|
|
3709
|
+
size = "md",
|
|
3671
3710
|
...rest
|
|
3672
3711
|
}) {
|
|
3673
3712
|
const { contains } = react.useFilter({ sensitivity: "base" });
|
|
@@ -3726,7 +3765,8 @@ function Autocomplete({
|
|
|
3726
3765
|
onFocus == null ? void 0 : onFocus(event);
|
|
3727
3766
|
if (openOnFocus && filteredChildren.length > 0)
|
|
3728
3767
|
combobox.setOpen(true);
|
|
3729
|
-
}
|
|
3768
|
+
},
|
|
3769
|
+
size
|
|
3730
3770
|
}
|
|
3731
3771
|
) }),
|
|
3732
3772
|
/* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts16.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
|
|
@@ -6699,31 +6739,38 @@ var createToast = ({
|
|
|
6699
6739
|
duration = 6e3,
|
|
6700
6740
|
width = "sm",
|
|
6701
6741
|
action,
|
|
6702
|
-
closable = false
|
|
6742
|
+
closable = false,
|
|
6743
|
+
inverted = false
|
|
6703
6744
|
}) => toaster.create({
|
|
6704
6745
|
description: text,
|
|
6705
6746
|
type: variant,
|
|
6706
6747
|
id: id ?? crypto.randomUUID(),
|
|
6707
6748
|
duration,
|
|
6708
6749
|
action,
|
|
6709
|
-
meta: { width },
|
|
6750
|
+
meta: { width, inverted },
|
|
6710
6751
|
closable
|
|
6711
6752
|
});
|
|
6712
6753
|
var Toaster = () => {
|
|
6713
6754
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Toaster, { toaster, insetInline: { mdDown: "4" }, children: (toast) => {
|
|
6714
|
-
var _a6;
|
|
6755
|
+
var _a6, _b5;
|
|
6715
6756
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6716
6757
|
react.Toast.Root,
|
|
6717
6758
|
{
|
|
6718
6759
|
width: { md: (_a6 = toast.meta) == null ? void 0 : _a6.width },
|
|
6719
|
-
|
|
6720
|
-
borderColor: `outline.${toast.type}`,
|
|
6721
|
-
boxShadow: "sm",
|
|
6760
|
+
"data-inverted": ((_b5 = toast.meta) == null ? void 0 : _b5.inverted) ? "" : void 0,
|
|
6722
6761
|
role: "alert",
|
|
6723
6762
|
children: [
|
|
6724
6763
|
/* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: toast.type }),
|
|
6725
6764
|
/* @__PURE__ */ jsxRuntime.jsx(react.Stack, { gap: "1", flex: "1", maxWidth: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(react.Toast.Description, { children: toast.description }) }),
|
|
6726
|
-
toast.action && /* @__PURE__ */ jsxRuntime.jsx(react.Toast.ActionTrigger, {
|
|
6765
|
+
toast.action && /* @__PURE__ */ jsxRuntime.jsx(react.Toast.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6766
|
+
Button,
|
|
6767
|
+
{
|
|
6768
|
+
variant: "ghost",
|
|
6769
|
+
size: "xs",
|
|
6770
|
+
onClick: toast.action.onClick,
|
|
6771
|
+
children: toast.action.label
|
|
6772
|
+
}
|
|
6773
|
+
) }),
|
|
6727
6774
|
toast.closable && /* @__PURE__ */ jsxRuntime.jsx(react.Toast.CloseTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs" }) })
|
|
6728
6775
|
]
|
|
6729
6776
|
}
|
|
@@ -7395,6 +7442,10 @@ var inputRecipe = react.defineRecipe({
|
|
|
7395
7442
|
_focus: {
|
|
7396
7443
|
outline: "2px solid",
|
|
7397
7444
|
outlineColor: "outline.focus"
|
|
7445
|
+
},
|
|
7446
|
+
"&:-webkit-autofill, &:-webkit-autofill:focus": {
|
|
7447
|
+
boxShadow: "0 0 0 1000px var(--spor-colors-surface-info-hover) inset",
|
|
7448
|
+
WebkitTextFillColor: "var(--spor-colors-text)"
|
|
7398
7449
|
}
|
|
7399
7450
|
},
|
|
7400
7451
|
floating: {
|
|
@@ -7414,6 +7465,10 @@ var inputRecipe = react.defineRecipe({
|
|
|
7414
7465
|
focus: {
|
|
7415
7466
|
outline: "1px solid",
|
|
7416
7467
|
outlineColor: "outline.focus"
|
|
7468
|
+
},
|
|
7469
|
+
"&:-webkit-autofill, &:-webkit-autofill:focus": {
|
|
7470
|
+
boxShadow: "0 0 0 1000px var(--spor-colors-surface-info-hover) inset",
|
|
7471
|
+
WebkitTextFillColor: "var(--spor-colors-text)"
|
|
7417
7472
|
}
|
|
7418
7473
|
}
|
|
7419
7474
|
},
|
|
@@ -7587,13 +7642,14 @@ var separatorRecipe = react.defineRecipe({
|
|
|
7587
7642
|
borderStyle: "solid"
|
|
7588
7643
|
},
|
|
7589
7644
|
dashed: {
|
|
7645
|
+
"--dash-color": "var(--spor-colors-outline)",
|
|
7590
7646
|
borderImageSlice: 1,
|
|
7591
7647
|
borderImageSource: `repeating-linear-gradient(
|
|
7592
7648
|
var(--gradient-direction),
|
|
7593
|
-
var(--
|
|
7594
|
-
var(--
|
|
7649
|
+
var(--dash-color) 0,
|
|
7650
|
+
var(--dash-color) var(--dash-size),
|
|
7595
7651
|
transparent var(--dash-size),
|
|
7596
|
-
transparent calc(var(--dash-size) + var(--dash-gap))
|
|
7652
|
+
transparent calc(var(--dash-size) + var(--dash-gap))
|
|
7597
7653
|
)`
|
|
7598
7654
|
}
|
|
7599
7655
|
},
|
|
@@ -10367,7 +10423,7 @@ var inputChipSlotRecipe = react.defineSlotRecipe({
|
|
|
10367
10423
|
root: {
|
|
10368
10424
|
fontSize: "desktop.xs",
|
|
10369
10425
|
paddingX: "1.5",
|
|
10370
|
-
|
|
10426
|
+
height: 5,
|
|
10371
10427
|
fontWeight: "normal",
|
|
10372
10428
|
borderRadius: "xs"
|
|
10373
10429
|
}
|
|
@@ -10376,17 +10432,16 @@ var inputChipSlotRecipe = react.defineSlotRecipe({
|
|
|
10376
10432
|
root: {
|
|
10377
10433
|
fontSize: "desktop.sm",
|
|
10378
10434
|
paddingX: "2",
|
|
10379
|
-
|
|
10435
|
+
height: 6,
|
|
10380
10436
|
fontWeight: "bold",
|
|
10381
10437
|
borderRadius: "9px"
|
|
10382
10438
|
}
|
|
10383
10439
|
},
|
|
10384
10440
|
md: {
|
|
10385
10441
|
root: {
|
|
10386
|
-
padding: 5,
|
|
10387
10442
|
fontSize: "desktop.md",
|
|
10388
10443
|
paddingX: "2",
|
|
10389
|
-
|
|
10444
|
+
height: 7,
|
|
10390
10445
|
fontWeight: "bold",
|
|
10391
10446
|
borderRadius: "sm"
|
|
10392
10447
|
}
|
|
@@ -10395,7 +10450,7 @@ var inputChipSlotRecipe = react.defineSlotRecipe({
|
|
|
10395
10450
|
root: {
|
|
10396
10451
|
fontSize: "desktop.md",
|
|
10397
10452
|
paddingX: "2",
|
|
10398
|
-
|
|
10453
|
+
height: "8",
|
|
10399
10454
|
fontWeight: "bold",
|
|
10400
10455
|
borderRadius: "md"
|
|
10401
10456
|
}
|
|
@@ -11552,6 +11607,11 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
|
11552
11607
|
outlineColor: "outline.error"
|
|
11553
11608
|
}
|
|
11554
11609
|
},
|
|
11610
|
+
valueText: {
|
|
11611
|
+
textOverflow: "ellipsis",
|
|
11612
|
+
whiteSpace: "nowrap",
|
|
11613
|
+
overflow: "hidden"
|
|
11614
|
+
},
|
|
11555
11615
|
itemText: {
|
|
11556
11616
|
flex: "1",
|
|
11557
11617
|
alignItems: "center"
|
|
@@ -12292,6 +12352,7 @@ var toastSlotRecipe = react.defineSlotRecipe({
|
|
|
12292
12352
|
translate: "var(--x) var(--y)",
|
|
12293
12353
|
opacity: "var(--opacity)",
|
|
12294
12354
|
willChange: "translate, opacity, scale",
|
|
12355
|
+
outline: "1px solid",
|
|
12295
12356
|
borderRadius: "sm",
|
|
12296
12357
|
transition: "translate 400ms, scale 400ms, opacity 400ms, height 400ms, box-shadow 200ms",
|
|
12297
12358
|
transitionTimingFunction: "cubic-bezier(0.21, 1.02, 0.73, 1)",
|
|
@@ -12299,16 +12360,52 @@ var toastSlotRecipe = react.defineSlotRecipe({
|
|
|
12299
12360
|
transition: "translate 400ms, scale 400ms, opacity 200ms",
|
|
12300
12361
|
transitionTimingFunction: "cubic-bezier(0.06, 0.71, 0.55, 1)"
|
|
12301
12362
|
},
|
|
12302
|
-
boxShadow: "
|
|
12363
|
+
boxShadow: "sm",
|
|
12303
12364
|
color: "text",
|
|
12304
12365
|
"&[data-type=success]": {
|
|
12305
|
-
backgroundColor: "surface.success"
|
|
12366
|
+
backgroundColor: "surface.success",
|
|
12367
|
+
outlineColor: "outline.success"
|
|
12306
12368
|
},
|
|
12307
12369
|
"&[data-type=error]": {
|
|
12308
|
-
backgroundColor: "surface.critical"
|
|
12370
|
+
backgroundColor: "surface.critical",
|
|
12371
|
+
outlineColor: "outline.critical"
|
|
12309
12372
|
},
|
|
12310
12373
|
"&[data-type=info]": {
|
|
12311
|
-
backgroundColor: "surface.info"
|
|
12374
|
+
backgroundColor: "surface.info",
|
|
12375
|
+
outlineColor: "outline.info"
|
|
12376
|
+
},
|
|
12377
|
+
"&[data-inverted][data-type=success]": {
|
|
12378
|
+
backgroundColor: { _light: "darkTeal", _dark: "seaMist" },
|
|
12379
|
+
color: { _light: "mint", _dark: "jungle" },
|
|
12380
|
+
outlineColor: { _light: "greenHaze", _dark: "coralGreen" },
|
|
12381
|
+
"& path:first-of-type": {
|
|
12382
|
+
fill: { _light: "mint", _dark: "jungle" }
|
|
12383
|
+
},
|
|
12384
|
+
"& path:not(:first-of-type)": {
|
|
12385
|
+
fill: { _light: "darkTeal", _dark: "seaMist" }
|
|
12386
|
+
}
|
|
12387
|
+
},
|
|
12388
|
+
"&[data-inverted][data-type=error]": {
|
|
12389
|
+
backgroundColor: { _light: "burgundy", _dark: "lightRed" },
|
|
12390
|
+
color: { _light: "pink", _dark: "maroon" },
|
|
12391
|
+
outlineColor: { _light: "crimson", _dark: "salmon" },
|
|
12392
|
+
"& path:first-of-type": {
|
|
12393
|
+
fill: { _light: "pink", _dark: "maroon" }
|
|
12394
|
+
},
|
|
12395
|
+
"& path:not(:first-of-type)": {
|
|
12396
|
+
fill: { _light: "burgundy", _dark: "lightRed" }
|
|
12397
|
+
}
|
|
12398
|
+
},
|
|
12399
|
+
"&[data-inverted][data-type=info]": {
|
|
12400
|
+
backgroundColor: { _light: "darkBlue", _dark: "lightBlue" },
|
|
12401
|
+
color: { _light: "icyBlue", _dark: "royal" },
|
|
12402
|
+
outlineColor: { _light: "ocean", _dark: "cloudy" },
|
|
12403
|
+
"& path:first-of-type": {
|
|
12404
|
+
fill: { _light: "icyBlue", _dark: "navy" }
|
|
12405
|
+
},
|
|
12406
|
+
"& path:not(:first-of-type)": {
|
|
12407
|
+
fill: { _light: "darkBlue", _dark: "lightBlue" }
|
|
12408
|
+
}
|
|
12312
12409
|
}
|
|
12313
12410
|
},
|
|
12314
12411
|
title: {
|