@vygruppen/spor-react 8.2.0 → 8.2.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 +10 -10
- package/CHANGELOG.md +8 -0
- package/dist/{CountryCodeSelect-POM47KR5.mjs → CountryCodeSelect-NEASN3EC.mjs} +1 -1
- package/dist/{chunk-D4IHIS3H.mjs → chunk-AKOJGLTQ.mjs} +36 -30
- package/dist/index.d.mts +18 -15
- package/dist/index.d.ts +18 -15
- package/dist/index.js +37 -29
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/button/Button.tsx +2 -0
- package/src/theme/components/checkbox.ts +21 -17
- package/src/theme/components/radio.ts +15 -11
- package/src/theme/utils/background-utils.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@8.2.
|
2
|
+
> @vygruppen/spor-react@8.2.1 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -10,13 +10,13 @@
|
|
10
10
|
[34mESM[39m Build start
|
11
11
|
"Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/index.js".
|
12
12
|
[34mDTS[39m Build start
|
13
|
-
"Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-
|
14
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
13
|
+
"Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-AKOJGLTQ.mjs".
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m504.49 KB[39m
|
15
|
+
[32mCJS[39m ⚡️ Build success in 2019ms
|
16
16
|
[32mESM[39m [1mdist/index.mjs [22m[32m2.01 KB[39m
|
17
|
-
[32mESM[39m [1mdist/CountryCodeSelect-
|
18
|
-
[32mESM[39m [1mdist/chunk-
|
19
|
-
[32mESM[39m ⚡️ Build success in
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
21
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m271.
|
22
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m271.
|
17
|
+
[32mESM[39m [1mdist/CountryCodeSelect-NEASN3EC.mjs [22m[32m1.19 KB[39m
|
18
|
+
[32mESM[39m [1mdist/chunk-AKOJGLTQ.mjs [22m[32m396.46 KB[39m
|
19
|
+
[32mESM[39m ⚡️ Build success in 2021ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 10225ms
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m271.48 KB[39m
|
22
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m271.48 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 8.2.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 6c2a831: Fixes bug where Button component did not have a default type.
|
8
|
+
- f259d1d: Checkbox: Facelift and dark mode support
|
9
|
+
Radio: Facelift and dark mode support
|
10
|
+
|
3
11
|
## 8.2.0
|
4
12
|
|
5
13
|
### Minor Changes
|
@@ -1163,6 +1163,7 @@ var SkeletonText = (props) => /* @__PURE__ */ React69__default.createElement(Ske
|
|
1163
1163
|
var Button = forwardRef((props, ref) => {
|
1164
1164
|
const {
|
1165
1165
|
as = "button",
|
1166
|
+
type = "button",
|
1166
1167
|
fontWeight,
|
1167
1168
|
size: size2,
|
1168
1169
|
children,
|
@@ -1191,6 +1192,7 @@ var Button = forwardRef((props, ref) => {
|
|
1191
1192
|
{
|
1192
1193
|
...rest,
|
1193
1194
|
as,
|
1195
|
+
type,
|
1194
1196
|
sx: { ...styles3, ...sx },
|
1195
1197
|
ref,
|
1196
1198
|
"aria-label": ariaLabel,
|
@@ -3433,7 +3435,7 @@ var texts14 = createTexts({
|
|
3433
3435
|
sv: "Telefonnummer"
|
3434
3436
|
}
|
3435
3437
|
});
|
3436
|
-
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-
|
3438
|
+
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-NEASN3EC.mjs'));
|
3437
3439
|
var Radio = forwardRef((props, ref) => {
|
3438
3440
|
return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
|
3439
3441
|
});
|
@@ -9802,7 +9804,7 @@ function baseBackground(state2, props) {
|
|
9802
9804
|
};
|
9803
9805
|
case "disabled":
|
9804
9806
|
return {
|
9805
|
-
backgroundColor: mode("
|
9807
|
+
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props)
|
9806
9808
|
};
|
9807
9809
|
case "hover":
|
9808
9810
|
return {
|
@@ -10872,16 +10874,16 @@ var config9 = helpers4.defineMultiStyleConfig({
|
|
10872
10874
|
container: {
|
10873
10875
|
_hover: {
|
10874
10876
|
"input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
|
10875
|
-
|
10876
|
-
borderColor: "
|
10877
|
+
...baseBackground("hover", props),
|
10878
|
+
borderColor: mode("darkGrey", "white")(props)
|
10877
10879
|
},
|
10878
10880
|
"input:enabled[aria-invalid] + .chakra-checkbox__control": {
|
10879
|
-
backgroundColor: "white",
|
10881
|
+
backgroundColor: mode("white", "inherit")(props),
|
10880
10882
|
borderColor: "brightRed"
|
10881
10883
|
},
|
10882
10884
|
"input:enabled:checked:not([aria-invalid]) + .chakra-checkbox__control": {
|
10883
|
-
backgroundColor: "darkTeal",
|
10884
|
-
borderColor: "darkTeal"
|
10885
|
+
backgroundColor: mode("darkTeal", "blueGreen")(props),
|
10886
|
+
borderColor: mode("darkTeal", "blueGreen")(props)
|
10885
10887
|
},
|
10886
10888
|
"input:enabled:checked[aria-invalid] + .chakra-checkbox__control": {
|
10887
10889
|
backgroundColor: "brightRed",
|
@@ -10901,20 +10903,21 @@ var config9 = helpers4.defineMultiStyleConfig({
|
|
10901
10903
|
height: 4,
|
10902
10904
|
transitionProperty: "background, border-color",
|
10903
10905
|
transitionDuration: "normal",
|
10904
|
-
backgroundColor: "white",
|
10905
10906
|
border: "2px solid",
|
10906
|
-
borderColor: "
|
10907
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
|
10907
10908
|
borderRadius: "xs",
|
10908
|
-
color: "white",
|
10909
|
+
color: mode("white", "darkTeal")(props),
|
10910
|
+
...baseBackground("default", props),
|
10909
10911
|
_checked: {
|
10910
|
-
|
10911
|
-
borderColor: "
|
10912
|
-
|
10912
|
+
...baseBackground("selected", props),
|
10913
|
+
borderColor: mode("pine", "coralGreen")(props),
|
10914
|
+
...baseText("default", props),
|
10915
|
+
color: mode("white", "darkTeal")(props),
|
10913
10916
|
...focusVisibleStyles(props),
|
10914
10917
|
_disabled: {
|
10915
|
-
|
10916
|
-
borderColor: "
|
10917
|
-
color: "
|
10918
|
+
...baseBackground("disabled", props),
|
10919
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
10920
|
+
color: mode("blackAlpha.200", "whiteAlpha.200")(props)
|
10918
10921
|
},
|
10919
10922
|
_invalid: {
|
10920
10923
|
backgroundColor: "brightRed",
|
@@ -10922,11 +10925,11 @@ var config9 = helpers4.defineMultiStyleConfig({
|
|
10922
10925
|
}
|
10923
10926
|
},
|
10924
10927
|
_disabled: {
|
10925
|
-
|
10926
|
-
borderColor: "
|
10928
|
+
...baseBackground("disabled", props),
|
10929
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props)
|
10927
10930
|
},
|
10928
10931
|
_invalid: {
|
10929
|
-
|
10932
|
+
...baseBackground("default", props),
|
10930
10933
|
borderColor: "brightRed"
|
10931
10934
|
}
|
10932
10935
|
},
|
@@ -12735,11 +12738,12 @@ var config29 = helpers20.defineMultiStyleConfig({
|
|
12735
12738
|
container: {
|
12736
12739
|
_hover: {
|
12737
12740
|
"input:enabled + .chakra-radio__control": {
|
12738
|
-
backgroundColor: "
|
12739
|
-
borderColor: "
|
12741
|
+
backgroundColor: "inherit",
|
12742
|
+
borderColor: mode("darkGrey", "white")(props)
|
12740
12743
|
},
|
12741
12744
|
"input:enabled:checked + .chakra-radio__control": {
|
12742
|
-
color: "darkTeal"
|
12745
|
+
color: mode("darkTeal", "blueGreen")(props),
|
12746
|
+
borderColor: mode("darkTeal", "blueGreen")(props)
|
12743
12747
|
}
|
12744
12748
|
}
|
12745
12749
|
},
|
@@ -12750,18 +12754,19 @@ var config29 = helpers20.defineMultiStyleConfig({
|
|
12750
12754
|
control: {
|
12751
12755
|
width: 4,
|
12752
12756
|
height: 4,
|
12753
|
-
backgroundColor: "
|
12757
|
+
backgroundColor: "inherit",
|
12754
12758
|
border: "2px solid",
|
12755
|
-
borderColor: "
|
12759
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
|
12756
12760
|
borderRadius: "50%",
|
12757
12761
|
...focusVisibleStyles(props),
|
12758
12762
|
_disabled: {
|
12759
|
-
backgroundColor: "
|
12760
|
-
borderColor: "
|
12763
|
+
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
|
12764
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
12765
|
+
color: mode("blackAlpha.200", "whiteAlpha.300")(props)
|
12761
12766
|
},
|
12762
12767
|
_checked: {
|
12763
|
-
borderColor: "
|
12764
|
-
color: "
|
12768
|
+
borderColor: mode("pine", "coralGreen")(props),
|
12769
|
+
color: mode("pine", "coralGreen")(props),
|
12765
12770
|
_before: {
|
12766
12771
|
content: `""`,
|
12767
12772
|
display: "inline-block",
|
@@ -12772,8 +12777,9 @@ var config29 = helpers20.defineMultiStyleConfig({
|
|
12772
12777
|
background: "currentColor"
|
12773
12778
|
},
|
12774
12779
|
_disabled: {
|
12775
|
-
backgroundColor: "
|
12776
|
-
borderColor: "
|
12780
|
+
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
|
12781
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
12782
|
+
color: mode("blackAlpha.200", "whiteAlpha.300")(props)
|
12777
12783
|
}
|
12778
12784
|
}
|
12779
12785
|
}
|
package/dist/index.d.mts
CHANGED
@@ -2791,8 +2791,8 @@ declare const theme: {
|
|
2791
2791
|
container: {
|
2792
2792
|
_hover: {
|
2793
2793
|
"input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
|
2794
|
-
backgroundColor: string;
|
2795
2794
|
borderColor: string;
|
2795
|
+
backgroundColor: string;
|
2796
2796
|
};
|
2797
2797
|
"input:enabled[aria-invalid] + .chakra-checkbox__control": {
|
2798
2798
|
backgroundColor: string;
|
@@ -2815,20 +2815,11 @@ declare const theme: {
|
|
2815
2815
|
strokeWidth: string;
|
2816
2816
|
};
|
2817
2817
|
control: {
|
2818
|
-
width: number;
|
2819
|
-
height: number;
|
2820
|
-
transitionProperty: string;
|
2821
|
-
transitionDuration: string;
|
2822
|
-
backgroundColor: string;
|
2823
|
-
border: string;
|
2824
|
-
borderColor: string;
|
2825
|
-
borderRadius: string;
|
2826
|
-
color: string;
|
2827
2818
|
_checked: {
|
2828
2819
|
_disabled: {
|
2829
|
-
backgroundColor: string;
|
2830
2820
|
borderColor: string;
|
2831
2821
|
color: string;
|
2822
|
+
backgroundColor: string;
|
2832
2823
|
};
|
2833
2824
|
_invalid: {
|
2834
2825
|
backgroundColor: string;
|
@@ -2840,18 +2831,27 @@ declare const theme: {
|
|
2840
2831
|
outlineStyle: string;
|
2841
2832
|
outlineOffset: string;
|
2842
2833
|
};
|
2843
|
-
backgroundColor: string;
|
2844
|
-
borderColor: string;
|
2845
2834
|
color: string;
|
2835
|
+
borderColor: string;
|
2836
|
+
backgroundColor: string;
|
2846
2837
|
};
|
2847
2838
|
_disabled: {
|
2848
|
-
backgroundColor: string;
|
2849
2839
|
borderColor: string;
|
2840
|
+
backgroundColor: string;
|
2850
2841
|
};
|
2851
2842
|
_invalid: {
|
2852
|
-
backgroundColor: string;
|
2853
2843
|
borderColor: string;
|
2844
|
+
backgroundColor: string;
|
2854
2845
|
};
|
2846
|
+
backgroundColor: string;
|
2847
|
+
width: number;
|
2848
|
+
height: number;
|
2849
|
+
transitionProperty: string;
|
2850
|
+
transitionDuration: string;
|
2851
|
+
border: string;
|
2852
|
+
borderColor: string;
|
2853
|
+
borderRadius: string;
|
2854
|
+
color: string;
|
2855
2855
|
};
|
2856
2856
|
label: {
|
2857
2857
|
userSelect: string;
|
@@ -4666,6 +4666,7 @@ declare const theme: {
|
|
4666
4666
|
};
|
4667
4667
|
"input:enabled:checked + .chakra-radio__control": {
|
4668
4668
|
color: string;
|
4669
|
+
borderColor: string;
|
4669
4670
|
};
|
4670
4671
|
};
|
4671
4672
|
};
|
@@ -4679,6 +4680,7 @@ declare const theme: {
|
|
4679
4680
|
_disabled: {
|
4680
4681
|
backgroundColor: string;
|
4681
4682
|
borderColor: string;
|
4683
|
+
color: string;
|
4682
4684
|
};
|
4683
4685
|
_checked: {
|
4684
4686
|
borderColor: string;
|
@@ -4695,6 +4697,7 @@ declare const theme: {
|
|
4695
4697
|
_disabled: {
|
4696
4698
|
backgroundColor: string;
|
4697
4699
|
borderColor: string;
|
4700
|
+
color: string;
|
4698
4701
|
};
|
4699
4702
|
};
|
4700
4703
|
_focusVisible: {
|
package/dist/index.d.ts
CHANGED
@@ -2791,8 +2791,8 @@ declare const theme: {
|
|
2791
2791
|
container: {
|
2792
2792
|
_hover: {
|
2793
2793
|
"input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
|
2794
|
-
backgroundColor: string;
|
2795
2794
|
borderColor: string;
|
2795
|
+
backgroundColor: string;
|
2796
2796
|
};
|
2797
2797
|
"input:enabled[aria-invalid] + .chakra-checkbox__control": {
|
2798
2798
|
backgroundColor: string;
|
@@ -2815,20 +2815,11 @@ declare const theme: {
|
|
2815
2815
|
strokeWidth: string;
|
2816
2816
|
};
|
2817
2817
|
control: {
|
2818
|
-
width: number;
|
2819
|
-
height: number;
|
2820
|
-
transitionProperty: string;
|
2821
|
-
transitionDuration: string;
|
2822
|
-
backgroundColor: string;
|
2823
|
-
border: string;
|
2824
|
-
borderColor: string;
|
2825
|
-
borderRadius: string;
|
2826
|
-
color: string;
|
2827
2818
|
_checked: {
|
2828
2819
|
_disabled: {
|
2829
|
-
backgroundColor: string;
|
2830
2820
|
borderColor: string;
|
2831
2821
|
color: string;
|
2822
|
+
backgroundColor: string;
|
2832
2823
|
};
|
2833
2824
|
_invalid: {
|
2834
2825
|
backgroundColor: string;
|
@@ -2840,18 +2831,27 @@ declare const theme: {
|
|
2840
2831
|
outlineStyle: string;
|
2841
2832
|
outlineOffset: string;
|
2842
2833
|
};
|
2843
|
-
backgroundColor: string;
|
2844
|
-
borderColor: string;
|
2845
2834
|
color: string;
|
2835
|
+
borderColor: string;
|
2836
|
+
backgroundColor: string;
|
2846
2837
|
};
|
2847
2838
|
_disabled: {
|
2848
|
-
backgroundColor: string;
|
2849
2839
|
borderColor: string;
|
2840
|
+
backgroundColor: string;
|
2850
2841
|
};
|
2851
2842
|
_invalid: {
|
2852
|
-
backgroundColor: string;
|
2853
2843
|
borderColor: string;
|
2844
|
+
backgroundColor: string;
|
2854
2845
|
};
|
2846
|
+
backgroundColor: string;
|
2847
|
+
width: number;
|
2848
|
+
height: number;
|
2849
|
+
transitionProperty: string;
|
2850
|
+
transitionDuration: string;
|
2851
|
+
border: string;
|
2852
|
+
borderColor: string;
|
2853
|
+
borderRadius: string;
|
2854
|
+
color: string;
|
2855
2855
|
};
|
2856
2856
|
label: {
|
2857
2857
|
userSelect: string;
|
@@ -4666,6 +4666,7 @@ declare const theme: {
|
|
4666
4666
|
};
|
4667
4667
|
"input:enabled:checked + .chakra-radio__control": {
|
4668
4668
|
color: string;
|
4669
|
+
borderColor: string;
|
4669
4670
|
};
|
4670
4671
|
};
|
4671
4672
|
};
|
@@ -4679,6 +4680,7 @@ declare const theme: {
|
|
4679
4680
|
_disabled: {
|
4680
4681
|
backgroundColor: string;
|
4681
4682
|
borderColor: string;
|
4683
|
+
color: string;
|
4682
4684
|
};
|
4683
4685
|
_checked: {
|
4684
4686
|
borderColor: string;
|
@@ -4695,6 +4697,7 @@ declare const theme: {
|
|
4695
4697
|
_disabled: {
|
4696
4698
|
backgroundColor: string;
|
4697
4699
|
borderColor: string;
|
4700
|
+
color: string;
|
4698
4701
|
};
|
4699
4702
|
};
|
4700
4703
|
_focusVisible: {
|
package/dist/index.js
CHANGED
@@ -663,6 +663,7 @@ var init_Button = __esm({
|
|
663
663
|
exports.Button = react.forwardRef((props, ref) => {
|
664
664
|
const {
|
665
665
|
as = "button",
|
666
|
+
type = "button",
|
666
667
|
fontWeight,
|
667
668
|
size: size2,
|
668
669
|
children,
|
@@ -691,6 +692,7 @@ var init_Button = __esm({
|
|
691
692
|
{
|
692
693
|
...rest,
|
693
694
|
as,
|
695
|
+
type,
|
694
696
|
sx: { ...styles3, ...sx },
|
695
697
|
ref,
|
696
698
|
"aria-label": ariaLabel,
|
@@ -11198,7 +11200,7 @@ function baseBackground(state2, props) {
|
|
11198
11200
|
};
|
11199
11201
|
case "disabled":
|
11200
11202
|
return {
|
11201
|
-
backgroundColor: themeTools.mode("
|
11203
|
+
backgroundColor: themeTools.mode("blackAlpha.100", "whiteAlpha.100")(props)
|
11202
11204
|
};
|
11203
11205
|
case "hover":
|
11204
11206
|
return {
|
@@ -12344,22 +12346,24 @@ var init_checkbox = __esm({
|
|
12344
12346
|
"src/theme/components/checkbox.ts"() {
|
12345
12347
|
init_dist4();
|
12346
12348
|
init_focus_util();
|
12349
|
+
init_background_utils();
|
12350
|
+
init_text_utils();
|
12347
12351
|
helpers4 = react.createMultiStyleConfigHelpers(checkboxAnatomy.keys);
|
12348
12352
|
config9 = helpers4.defineMultiStyleConfig({
|
12349
12353
|
baseStyle: (props) => ({
|
12350
12354
|
container: {
|
12351
12355
|
_hover: {
|
12352
12356
|
"input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
|
12353
|
-
|
12354
|
-
borderColor: "
|
12357
|
+
...baseBackground("hover", props),
|
12358
|
+
borderColor: themeTools.mode("darkGrey", "white")(props)
|
12355
12359
|
},
|
12356
12360
|
"input:enabled[aria-invalid] + .chakra-checkbox__control": {
|
12357
|
-
backgroundColor: "white",
|
12361
|
+
backgroundColor: themeTools.mode("white", "inherit")(props),
|
12358
12362
|
borderColor: "brightRed"
|
12359
12363
|
},
|
12360
12364
|
"input:enabled:checked:not([aria-invalid]) + .chakra-checkbox__control": {
|
12361
|
-
backgroundColor: "darkTeal",
|
12362
|
-
borderColor: "darkTeal"
|
12365
|
+
backgroundColor: themeTools.mode("darkTeal", "blueGreen")(props),
|
12366
|
+
borderColor: themeTools.mode("darkTeal", "blueGreen")(props)
|
12363
12367
|
},
|
12364
12368
|
"input:enabled:checked[aria-invalid] + .chakra-checkbox__control": {
|
12365
12369
|
backgroundColor: "brightRed",
|
@@ -12379,20 +12383,21 @@ var init_checkbox = __esm({
|
|
12379
12383
|
height: 4,
|
12380
12384
|
transitionProperty: "background, border-color",
|
12381
12385
|
transitionDuration: "normal",
|
12382
|
-
backgroundColor: "white",
|
12383
12386
|
border: "2px solid",
|
12384
|
-
borderColor: "
|
12387
|
+
borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props),
|
12385
12388
|
borderRadius: "xs",
|
12386
|
-
color: "white",
|
12389
|
+
color: themeTools.mode("white", "darkTeal")(props),
|
12390
|
+
...baseBackground("default", props),
|
12387
12391
|
_checked: {
|
12388
|
-
|
12389
|
-
borderColor: "
|
12390
|
-
|
12392
|
+
...baseBackground("selected", props),
|
12393
|
+
borderColor: themeTools.mode("pine", "coralGreen")(props),
|
12394
|
+
...baseText("default", props),
|
12395
|
+
color: themeTools.mode("white", "darkTeal")(props),
|
12391
12396
|
...focusVisibleStyles(props),
|
12392
12397
|
_disabled: {
|
12393
|
-
|
12394
|
-
borderColor: "
|
12395
|
-
color: "
|
12398
|
+
...baseBackground("disabled", props),
|
12399
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props),
|
12400
|
+
color: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
|
12396
12401
|
},
|
12397
12402
|
_invalid: {
|
12398
12403
|
backgroundColor: "brightRed",
|
@@ -12400,11 +12405,11 @@ var init_checkbox = __esm({
|
|
12400
12405
|
}
|
12401
12406
|
},
|
12402
12407
|
_disabled: {
|
12403
|
-
|
12404
|
-
borderColor: "
|
12408
|
+
...baseBackground("disabled", props),
|
12409
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
|
12405
12410
|
},
|
12406
12411
|
_invalid: {
|
12407
|
-
|
12412
|
+
...baseBackground("default", props),
|
12408
12413
|
borderColor: "brightRed"
|
12409
12414
|
}
|
12410
12415
|
},
|
@@ -14362,11 +14367,12 @@ var init_radio = __esm({
|
|
14362
14367
|
container: {
|
14363
14368
|
_hover: {
|
14364
14369
|
"input:enabled + .chakra-radio__control": {
|
14365
|
-
backgroundColor: "
|
14366
|
-
borderColor: "
|
14370
|
+
backgroundColor: "inherit",
|
14371
|
+
borderColor: themeTools.mode("darkGrey", "white")(props)
|
14367
14372
|
},
|
14368
14373
|
"input:enabled:checked + .chakra-radio__control": {
|
14369
|
-
color: "darkTeal"
|
14374
|
+
color: themeTools.mode("darkTeal", "blueGreen")(props),
|
14375
|
+
borderColor: themeTools.mode("darkTeal", "blueGreen")(props)
|
14370
14376
|
}
|
14371
14377
|
}
|
14372
14378
|
},
|
@@ -14377,18 +14383,19 @@ var init_radio = __esm({
|
|
14377
14383
|
control: {
|
14378
14384
|
width: 4,
|
14379
14385
|
height: 4,
|
14380
|
-
backgroundColor: "
|
14386
|
+
backgroundColor: "inherit",
|
14381
14387
|
border: "2px solid",
|
14382
|
-
borderColor: "
|
14388
|
+
borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props),
|
14383
14389
|
borderRadius: "50%",
|
14384
14390
|
...focusVisibleStyles(props),
|
14385
14391
|
_disabled: {
|
14386
|
-
backgroundColor: "
|
14387
|
-
borderColor: "
|
14392
|
+
backgroundColor: themeTools.mode("blackAlpha.100", "whiteAlpha.100")(props),
|
14393
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props),
|
14394
|
+
color: themeTools.mode("blackAlpha.200", "whiteAlpha.300")(props)
|
14388
14395
|
},
|
14389
14396
|
_checked: {
|
14390
|
-
borderColor: "
|
14391
|
-
color: "
|
14397
|
+
borderColor: themeTools.mode("pine", "coralGreen")(props),
|
14398
|
+
color: themeTools.mode("pine", "coralGreen")(props),
|
14392
14399
|
_before: {
|
14393
14400
|
content: `""`,
|
14394
14401
|
display: "inline-block",
|
@@ -14399,8 +14406,9 @@ var init_radio = __esm({
|
|
14399
14406
|
background: "currentColor"
|
14400
14407
|
},
|
14401
14408
|
_disabled: {
|
14402
|
-
backgroundColor: "
|
14403
|
-
borderColor: "
|
14409
|
+
backgroundColor: themeTools.mode("blackAlpha.100", "whiteAlpha.100")(props),
|
14410
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props),
|
14411
|
+
color: themeTools.mode("blackAlpha.200", "whiteAlpha.300")(props)
|
14404
14412
|
}
|
14405
14413
|
}
|
14406
14414
|
}
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-
|
1
|
+
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-AKOJGLTQ.mjs';
|
package/package.json
CHANGED
package/src/button/Button.tsx
CHANGED
@@ -65,6 +65,7 @@ export type ButtonProps = Exclude<
|
|
65
65
|
export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
|
66
66
|
const {
|
67
67
|
as = "button",
|
68
|
+
type = "button",
|
68
69
|
fontWeight,
|
69
70
|
size,
|
70
71
|
children,
|
@@ -97,6 +98,7 @@ export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
|
|
97
98
|
<Box
|
98
99
|
{...rest}
|
99
100
|
as={as}
|
101
|
+
type={type}
|
100
102
|
sx={{ ...styles, ...sx }}
|
101
103
|
ref={ref}
|
102
104
|
aria-label={ariaLabel}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { checkboxAnatomy as parts } from "@chakra-ui/anatomy";
|
2
2
|
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
3
|
import { focusVisibleStyles } from "../utils/focus-util";
|
4
|
+
import { mode } from "@chakra-ui/theme-tools";
|
5
|
+
import { baseBackground } from "../utils/background-utils";
|
6
|
+
import { baseText } from "../utils/text-utils";
|
4
7
|
|
5
8
|
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
6
9
|
|
@@ -9,17 +12,17 @@ const config = helpers.defineMultiStyleConfig({
|
|
9
12
|
container: {
|
10
13
|
_hover: {
|
11
14
|
"input:enabled:not([aria-invalid]) + .chakra-checkbox__control": {
|
12
|
-
|
13
|
-
borderColor: "
|
15
|
+
...baseBackground("hover", props),
|
16
|
+
borderColor: mode("darkGrey", "white")(props),
|
14
17
|
},
|
15
18
|
"input:enabled[aria-invalid] + .chakra-checkbox__control": {
|
16
|
-
backgroundColor: "white",
|
19
|
+
backgroundColor: mode("white", "inherit")(props),
|
17
20
|
borderColor: "brightRed",
|
18
21
|
},
|
19
22
|
"input:enabled:checked:not([aria-invalid]) + .chakra-checkbox__control":
|
20
23
|
{
|
21
|
-
backgroundColor: "darkTeal",
|
22
|
-
borderColor: "darkTeal",
|
24
|
+
backgroundColor: mode("darkTeal", "blueGreen")(props),
|
25
|
+
borderColor: mode("darkTeal", "blueGreen")(props),
|
23
26
|
},
|
24
27
|
"input:enabled:checked[aria-invalid] + .chakra-checkbox__control": {
|
25
28
|
backgroundColor: "brightRed",
|
@@ -38,23 +41,24 @@ const config = helpers.defineMultiStyleConfig({
|
|
38
41
|
height: 4,
|
39
42
|
transitionProperty: "background, border-color",
|
40
43
|
transitionDuration: "normal",
|
41
|
-
backgroundColor: "white",
|
42
44
|
border: "2px solid",
|
43
|
-
borderColor: "
|
45
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
|
44
46
|
borderRadius: "xs",
|
45
|
-
color: "white",
|
47
|
+
color: mode("white", "darkTeal")(props),
|
48
|
+
...baseBackground("default", props),
|
46
49
|
|
47
50
|
_checked: {
|
48
|
-
|
49
|
-
borderColor: "
|
50
|
-
|
51
|
+
...baseBackground("selected", props),
|
52
|
+
borderColor: mode("pine", "coralGreen")(props),
|
53
|
+
...baseText("default", props),
|
54
|
+
color: mode("white", "darkTeal")(props),
|
51
55
|
|
52
56
|
...focusVisibleStyles(props),
|
53
57
|
|
54
58
|
_disabled: {
|
55
|
-
|
56
|
-
borderColor: "
|
57
|
-
color: "
|
59
|
+
...baseBackground("disabled", props),
|
60
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
61
|
+
color: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
58
62
|
},
|
59
63
|
|
60
64
|
_invalid: {
|
@@ -64,11 +68,11 @@ const config = helpers.defineMultiStyleConfig({
|
|
64
68
|
},
|
65
69
|
|
66
70
|
_disabled: {
|
67
|
-
|
68
|
-
borderColor: "
|
71
|
+
...baseBackground("disabled", props),
|
72
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
69
73
|
},
|
70
74
|
_invalid: {
|
71
|
-
|
75
|
+
...baseBackground("default", props),
|
72
76
|
borderColor: "brightRed",
|
73
77
|
},
|
74
78
|
},
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { radioAnatomy as parts } from "@chakra-ui/anatomy";
|
2
2
|
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
3
|
import { focusVisibleStyles } from "../utils/focus-util";
|
4
|
+
import { mode } from "@chakra-ui/theme-tools";
|
4
5
|
|
5
6
|
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
6
7
|
|
@@ -9,11 +10,12 @@ const config = helpers.defineMultiStyleConfig({
|
|
9
10
|
container: {
|
10
11
|
_hover: {
|
11
12
|
"input:enabled + .chakra-radio__control": {
|
12
|
-
backgroundColor: "
|
13
|
-
borderColor: "
|
13
|
+
backgroundColor: "inherit",
|
14
|
+
borderColor: mode("darkGrey", "white")(props),
|
14
15
|
},
|
15
16
|
"input:enabled:checked + .chakra-radio__control": {
|
16
|
-
color: "darkTeal",
|
17
|
+
color: mode("darkTeal", "blueGreen")(props),
|
18
|
+
borderColor: mode("darkTeal", "blueGreen")(props),
|
17
19
|
},
|
18
20
|
},
|
19
21
|
},
|
@@ -24,20 +26,21 @@ const config = helpers.defineMultiStyleConfig({
|
|
24
26
|
control: {
|
25
27
|
width: 4,
|
26
28
|
height: 4,
|
27
|
-
backgroundColor: "
|
29
|
+
backgroundColor: "inherit",
|
28
30
|
border: "2px solid",
|
29
|
-
borderColor: "
|
31
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
|
30
32
|
borderRadius: "50%",
|
31
33
|
|
32
34
|
...focusVisibleStyles(props),
|
33
35
|
|
34
36
|
_disabled: {
|
35
|
-
backgroundColor: "
|
36
|
-
borderColor: "
|
37
|
+
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
|
38
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
39
|
+
color: mode("blackAlpha.200", "whiteAlpha.300")(props),
|
37
40
|
},
|
38
41
|
_checked: {
|
39
|
-
borderColor: "
|
40
|
-
color: "
|
42
|
+
borderColor: mode("pine", "coralGreen")(props),
|
43
|
+
color: mode("pine", "coralGreen")(props),
|
41
44
|
_before: {
|
42
45
|
content: `""`,
|
43
46
|
display: "inline-block",
|
@@ -48,8 +51,9 @@ const config = helpers.defineMultiStyleConfig({
|
|
48
51
|
background: "currentColor",
|
49
52
|
},
|
50
53
|
_disabled: {
|
51
|
-
backgroundColor: "
|
52
|
-
borderColor: "
|
54
|
+
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
|
55
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
56
|
+
color: mode("blackAlpha.200", "whiteAlpha.300")(props),
|
53
57
|
},
|
54
58
|
},
|
55
59
|
},
|