@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@8.2.0 build
2
+ > @vygruppen/spor-react@8.2.1 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -10,13 +10,13 @@
10
10
  ESM Build start
11
11
  "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/index.js".
12
12
  DTS Build start
13
- "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-D4IHIS3H.mjs".
14
- CJS dist/index.js 503.28 KB
15
- CJS ⚡️ Build success in 2095ms
13
+ "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-AKOJGLTQ.mjs".
14
+ CJS dist/index.js 504.49 KB
15
+ CJS ⚡️ Build success in 2019ms
16
16
  ESM dist/index.mjs 2.01 KB
17
- ESM dist/CountryCodeSelect-POM47KR5.mjs 1.19 KB
18
- ESM dist/chunk-D4IHIS3H.mjs 395.57 KB
19
- ESM ⚡️ Build success in 2097ms
20
- DTS ⚡️ Build success in 10536ms
21
- DTS dist/index.d.ts 271.35 KB
22
- DTS dist/index.d.mts 271.35 KB
17
+ ESM dist/CountryCodeSelect-NEASN3EC.mjs 1.19 KB
18
+ ESM dist/chunk-AKOJGLTQ.mjs 396.46 KB
19
+ ESM ⚡️ Build success in 2021ms
20
+ DTS ⚡️ Build success in 10225ms
21
+ DTS dist/index.d.ts 271.48 KB
22
+ DTS dist/index.d.mts 271.48 KB
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
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-D4IHIS3H.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-AKOJGLTQ.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -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-POM47KR5.mjs'));
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("silver", "whiteAlpha.100")(props)
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
- backgroundColor: "white",
10876
- borderColor: "primaryGreen"
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: "darkTeal",
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
- backgroundColor: "primaryGreen",
10911
- borderColor: "primaryGreen",
10912
- color: "white",
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
- backgroundColor: "lightGrey",
10916
- borderColor: "steel",
10917
- color: "steel"
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
- backgroundColor: "lightGrey",
10926
- borderColor: "steel"
10928
+ ...baseBackground("disabled", props),
10929
+ borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props)
10927
10930
  },
10928
10931
  _invalid: {
10929
- backgroundColor: "white",
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: "white",
12739
- borderColor: "primaryGreen"
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: "white",
12757
+ backgroundColor: "inherit",
12754
12758
  border: "2px solid",
12755
- borderColor: "primaryGreen",
12759
+ borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
12756
12760
  borderRadius: "50%",
12757
12761
  ...focusVisibleStyles(props),
12758
12762
  _disabled: {
12759
- backgroundColor: "lightGrey",
12760
- borderColor: "steel"
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: "currentColor",
12764
- color: "primaryGreen",
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: "lightGrey",
12776
- borderColor: "steel"
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("silver", "whiteAlpha.100")(props)
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
- backgroundColor: "white",
12354
- borderColor: "primaryGreen"
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: "darkTeal",
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
- backgroundColor: "primaryGreen",
12389
- borderColor: "primaryGreen",
12390
- color: "white",
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
- backgroundColor: "lightGrey",
12394
- borderColor: "steel",
12395
- color: "steel"
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
- backgroundColor: "lightGrey",
12404
- borderColor: "steel"
12408
+ ...baseBackground("disabled", props),
12409
+ borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
12405
12410
  },
12406
12411
  _invalid: {
12407
- backgroundColor: "white",
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: "white",
14366
- borderColor: "primaryGreen"
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: "white",
14386
+ backgroundColor: "inherit",
14381
14387
  border: "2px solid",
14382
- borderColor: "primaryGreen",
14388
+ borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props),
14383
14389
  borderRadius: "50%",
14384
14390
  ...focusVisibleStyles(props),
14385
14391
  _disabled: {
14386
- backgroundColor: "lightGrey",
14387
- borderColor: "steel"
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: "currentColor",
14391
- color: "primaryGreen",
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: "lightGrey",
14403
- borderColor: "steel"
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-D4IHIS3H.mjs';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -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
- backgroundColor: "white",
13
- borderColor: "primaryGreen",
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: "darkTeal",
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
- backgroundColor: "primaryGreen",
49
- borderColor: "primaryGreen",
50
- color: "white",
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
- backgroundColor: "lightGrey",
56
- borderColor: "steel",
57
- color: "steel",
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
- backgroundColor: "lightGrey",
68
- borderColor: "steel",
71
+ ...baseBackground("disabled", props),
72
+ borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
69
73
  },
70
74
  _invalid: {
71
- backgroundColor: "white",
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: "white",
13
- borderColor: "primaryGreen",
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: "white",
29
+ backgroundColor: "inherit",
28
30
  border: "2px solid",
29
- borderColor: "primaryGreen",
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: "lightGrey",
36
- borderColor: "steel",
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: "currentColor",
40
- color: "primaryGreen",
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: "lightGrey",
52
- borderColor: "steel",
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
  },
@@ -21,7 +21,7 @@ export function baseBackground(
21
21
  };
22
22
  case "disabled":
23
23
  return {
24
- backgroundColor: mode("silver", "whiteAlpha.100")(props),
24
+ backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
25
25
  };
26
26
  case "hover":
27
27
  return {