@vygruppen/spor-react 3.7.2 → 3.7.3

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@3.7.2 build
2
+ > @vygruppen/spor-react@3.7.3 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
  DTS Build start
12
12
  "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
13
- "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-YVEFEGE4.mjs".
14
- CJS dist/index.js 534.04 KB
15
- CJS ⚡️ Build success in 4013ms
13
+ "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-D2XVZVE6.mjs".
14
+ CJS dist/index.js 534.96 KB
15
+ CJS ⚡️ Build success in 3732ms
16
16
  ESM dist/index.mjs 2.09 KB
17
- ESM dist/CountryCodeSelect-LFJGSTTV.mjs 1.19 KB
18
- ESM dist/chunk-YVEFEGE4.mjs 426.82 KB
19
- ESM ⚡️ Build success in 4013ms
20
- DTS ⚡️ Build success in 18729ms
21
- DTS dist/index.d.ts 254.99 KB
22
- DTS dist/index.d.mts 254.99 KB
17
+ ESM dist/CountryCodeSelect-WGNXQHWO.mjs 1.19 KB
18
+ ESM dist/chunk-D2XVZVE6.mjs 427.44 KB
19
+ ESM ⚡️ Build success in 3733ms
20
+ DTS ⚡️ Build success in 18018ms
21
+ DTS dist/index.d.ts 255.09 KB
22
+ DTS dist/index.d.mts 255.09 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 3.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 05f55861: Updated styles for TextLink, and added dark mode support.
8
+ Variant `tertiary` is now deprecated as we are updating our visual structure
9
+ with a more minimalistic selection; please use `secondary` instead.
10
+ - 6cef81ca: Add font family to list and accordion button
11
+
3
12
  ## 3.7.2
4
13
 
5
14
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-YVEFEGE4.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-D2XVZVE6.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -5083,7 +5083,7 @@ var texts14 = createTexts({
5083
5083
  sv: "Telefonnummer"
5084
5084
  }
5085
5085
  });
5086
- var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-LFJGSTTV.mjs'));
5086
+ var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-WGNXQHWO.mjs'));
5087
5087
  var Radio = forwardRef((props, ref) => {
5088
5088
  return /* @__PURE__ */ React50__default.createElement(Radio$1, { ...props, ref });
5089
5089
  });
@@ -10806,6 +10806,7 @@ __export(components_exports, {
10806
10806
  Input: () => input_default,
10807
10807
  LineIcon: () => line_icon_default,
10808
10808
  Link: () => link_default,
10809
+ List: () => list_default,
10809
10810
  ListBox: () => listbox_default,
10810
10811
  MediaControllerButton: () => media_controller_button_default,
10811
10812
  Modal: () => modal_default,
@@ -11073,6 +11074,7 @@ var config3 = helpers.defineMultiStyleConfig({
11073
11074
  justifyContent: "space-between",
11074
11075
  color: "darkGrey",
11075
11076
  textAlign: "left",
11077
+ fontFamily: "body",
11076
11078
  fontWeight: "bold",
11077
11079
  ...focusVisible({
11078
11080
  notFocus: {
@@ -13231,80 +13233,79 @@ var config23 = defineStyleConfig$1({
13231
13233
  }
13232
13234
  },
13233
13235
  variants: {
13234
- primary: {
13235
- color: "pine",
13236
+ primary: (props) => ({
13237
+ color: mode("pine", "seaMist")(props),
13236
13238
  ...focusVisible({
13237
13239
  focus: {
13238
- color: "white",
13239
- backgroundColor: "pine",
13240
+ backgroundColor: "transparent",
13240
13241
  boxShadow: getBoxShadowString({
13241
- borderColor: "pine",
13242
- borderWidth: 3,
13242
+ borderColor: "azure",
13243
+ borderWidth: 2,
13243
13244
  isInset: false
13244
13245
  })
13245
13246
  },
13246
13247
  notFocus: {
13247
13248
  color: "pine",
13248
- boxShadow: "none",
13249
- backgroundColor: "transparent"
13249
+ backgroundColor: "transparent",
13250
+ boxShadow: "none"
13250
13251
  }
13251
13252
  }),
13252
13253
  _hover: {
13253
- backgroundColor: "coralGreen",
13254
- color: "darkTeal",
13254
+ color: "white",
13255
+ backgroundColor: "pine",
13255
13256
  boxShadow: getBoxShadowString({
13256
- borderColor: "coralGreen",
13257
- borderWidth: 3,
13257
+ borderColor: "pine",
13258
+ borderWidth: 2,
13258
13259
  isInset: false
13259
13260
  })
13260
13261
  },
13261
13262
  _active: {
13262
- backgroundColor: "mint",
13263
+ color: "white",
13264
+ backgroundColor: "azure",
13263
13265
  boxShadow: getBoxShadowString({
13264
- borderColor: "mint",
13265
- borderWidth: 3,
13266
+ borderColor: "azure",
13267
+ borderWidth: 2,
13266
13268
  isInset: false
13267
- }),
13268
- color: "pine"
13269
+ })
13269
13270
  }
13270
- },
13271
+ }),
13271
13272
  secondary: (props) => ({
13272
- color: "darkGrey",
13273
+ color: mode("darkGrey", "white")(props),
13273
13274
  ...focusVisible({
13274
13275
  focus: {
13275
- color: "white",
13276
- backgroundColor: "darkGrey",
13276
+ backgroundColor: "transparent",
13277
13277
  boxShadow: getBoxShadowString({
13278
- borderColor: "darkGrey",
13279
- borderWidth: 3,
13278
+ borderColor: "azure",
13279
+ borderWidth: 2,
13280
13280
  isInset: false
13281
13281
  })
13282
13282
  },
13283
13283
  notFocus: {
13284
- color: "darkGrey",
13285
13284
  boxShadow: "none",
13286
13285
  backgroundColor: "transparent"
13287
13286
  }
13288
13287
  }),
13289
13288
  _hover: {
13290
- color: "darkGrey",
13291
- backgroundColor: "blackAlpha.100",
13289
+ backgroundColor: mode("seaMist", "pine")(props),
13292
13290
  boxShadow: getBoxShadowString({
13293
- borderColor: props.theme.colors.blackAlpha[100],
13294
- borderWidth: 3,
13291
+ borderColor: mode("seaMist", "pine")(props),
13292
+ borderWidth: 2,
13295
13293
  isInset: false
13296
13294
  })
13297
13295
  },
13298
13296
  _active: {
13299
- color: "darkTeal",
13300
- backgroundColor: "mint",
13297
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
13301
13298
  boxShadow: getBoxShadowString({
13302
- borderColor: "mint",
13303
- borderWidth: 3,
13299
+ borderColor: mode("mint", "whiteAlpha.200")(props),
13300
+ borderWidth: 2,
13304
13301
  isInset: false
13305
13302
  })
13306
13303
  }
13307
13304
  }),
13305
+ /**
13306
+ * @deprecated tertiary style will be deprecated in the future.
13307
+ * Please use the secondary style instead.
13308
+ */
13308
13309
  tertiary: (props) => ({
13309
13310
  color: "white",
13310
13311
  ...focusVisible({
@@ -13348,6 +13349,21 @@ var config23 = defineStyleConfig$1({
13348
13349
  }
13349
13350
  });
13350
13351
  var link_default = config23;
13352
+
13353
+ // src/theme/components/list.ts
13354
+ var { defineMultiStyleConfig: defineMultiStyleConfig28, definePartsStyle: definePartsStyle28 } = createMultiStyleConfigHelpers(listAnatomy.keys);
13355
+ var baseStyleIcon8 = defineStyle({
13356
+ marginEnd: "2",
13357
+ display: "inline",
13358
+ verticalAlign: "text-bottom",
13359
+ fontFamily: "body"
13360
+ });
13361
+ var baseStyle45 = definePartsStyle28({
13362
+ icon: baseStyleIcon8
13363
+ });
13364
+ var list_default = defineMultiStyleConfig28({
13365
+ baseStyle: baseStyle45
13366
+ });
13351
13367
  var parts10 = anatomy("ListBox").parts(
13352
13368
  "container",
13353
13369
  "item",
package/dist/index.d.mts CHANGED
@@ -1412,7 +1412,9 @@ type TravelTagProps = TagProps & BoxProps & {
1412
1412
  declare const TravelTag: _chakra_ui_system_dist_system_types.ComponentWithAs<As, TravelTagProps>;
1413
1413
 
1414
1414
  type LinkProps = Omit<LinkProps$1, "variant"> & {
1415
- variant?: "primary" | "secondary" | "tertiary";
1415
+ variant?: "primary" | "secondary"
1416
+ /** @deprecated Use `secondary` instead */
1417
+ | "tertiary";
1416
1418
  };
1417
1419
  /** Link to different sites or parts of site
1418
1420
  *
@@ -1982,6 +1984,7 @@ declare const theme: {
1982
1984
  justifyContent: string;
1983
1985
  color: string;
1984
1986
  textAlign: string;
1987
+ fontFamily: string;
1985
1988
  fontWeight: string;
1986
1989
  };
1987
1990
  panel: {
@@ -3744,16 +3747,16 @@ declare const theme: {
3744
3747
  [key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
3745
3748
  } | undefined;
3746
3749
  variants?: {
3747
- primary: {
3750
+ primary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3748
3751
  _hover: {
3749
- backgroundColor: string;
3750
3752
  color: string;
3753
+ backgroundColor: string;
3751
3754
  boxShadow: string;
3752
3755
  };
3753
3756
  _active: {
3757
+ color: string;
3754
3758
  backgroundColor: string;
3755
3759
  boxShadow: string;
3756
- color: string;
3757
3760
  };
3758
3761
  _focus: _chakra_ui_styled_system.SystemStyleObject;
3759
3762
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -3762,12 +3765,10 @@ declare const theme: {
3762
3765
  };
3763
3766
  secondary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3764
3767
  _hover: {
3765
- color: string;
3766
3768
  backgroundColor: string;
3767
3769
  boxShadow: string;
3768
3770
  };
3769
3771
  _active: {
3770
- color: string;
3771
3772
  backgroundColor: string;
3772
3773
  boxShadow: string;
3773
3774
  };
@@ -3799,6 +3800,32 @@ declare const theme: {
3799
3800
  colorScheme?: string | undefined;
3800
3801
  } | undefined;
3801
3802
  };
3803
+ List: {
3804
+ baseStyle?: {
3805
+ icon: {
3806
+ marginEnd: string;
3807
+ display: string;
3808
+ verticalAlign: string;
3809
+ fontFamily: string;
3810
+ };
3811
+ } | undefined;
3812
+ sizes?: {
3813
+ [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
3814
+ keys: ("container" | "icon" | "item")[];
3815
+ }>;
3816
+ } | undefined;
3817
+ variants?: {
3818
+ [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
3819
+ keys: ("container" | "icon" | "item")[];
3820
+ }>;
3821
+ } | undefined;
3822
+ defaultProps?: {
3823
+ size?: string | number | undefined;
3824
+ variant?: string | number | undefined;
3825
+ colorScheme?: string | undefined;
3826
+ } | undefined;
3827
+ parts: ("container" | "icon" | "item")[];
3828
+ };
3802
3829
  ListBox: {
3803
3830
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
3804
3831
  container: {
@@ -5689,31 +5716,6 @@ declare const theme: {
5689
5716
  colorScheme?: string | undefined;
5690
5717
  } | undefined;
5691
5718
  };
5692
- List: {
5693
- baseStyle?: {
5694
- icon: {
5695
- marginEnd: string;
5696
- display: string;
5697
- verticalAlign: string;
5698
- };
5699
- } | undefined;
5700
- sizes?: {
5701
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5702
- keys: ("container" | "icon" | "item")[];
5703
- }>;
5704
- } | undefined;
5705
- variants?: {
5706
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5707
- keys: ("container" | "icon" | "item")[];
5708
- }>;
5709
- } | undefined;
5710
- defaultProps?: {
5711
- size?: string | number | undefined;
5712
- variant?: string | number | undefined;
5713
- colorScheme?: string | undefined;
5714
- } | undefined;
5715
- parts: ("container" | "icon" | "item")[];
5716
- };
5717
5719
  Menu: {
5718
5720
  baseStyle?: {
5719
5721
  button: {
package/dist/index.d.ts CHANGED
@@ -1412,7 +1412,9 @@ type TravelTagProps = TagProps & BoxProps & {
1412
1412
  declare const TravelTag: _chakra_ui_system_dist_system_types.ComponentWithAs<As, TravelTagProps>;
1413
1413
 
1414
1414
  type LinkProps = Omit<LinkProps$1, "variant"> & {
1415
- variant?: "primary" | "secondary" | "tertiary";
1415
+ variant?: "primary" | "secondary"
1416
+ /** @deprecated Use `secondary` instead */
1417
+ | "tertiary";
1416
1418
  };
1417
1419
  /** Link to different sites or parts of site
1418
1420
  *
@@ -1982,6 +1984,7 @@ declare const theme: {
1982
1984
  justifyContent: string;
1983
1985
  color: string;
1984
1986
  textAlign: string;
1987
+ fontFamily: string;
1985
1988
  fontWeight: string;
1986
1989
  };
1987
1990
  panel: {
@@ -3744,16 +3747,16 @@ declare const theme: {
3744
3747
  [key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
3745
3748
  } | undefined;
3746
3749
  variants?: {
3747
- primary: {
3750
+ primary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3748
3751
  _hover: {
3749
- backgroundColor: string;
3750
3752
  color: string;
3753
+ backgroundColor: string;
3751
3754
  boxShadow: string;
3752
3755
  };
3753
3756
  _active: {
3757
+ color: string;
3754
3758
  backgroundColor: string;
3755
3759
  boxShadow: string;
3756
- color: string;
3757
3760
  };
3758
3761
  _focus: _chakra_ui_styled_system.SystemStyleObject;
3759
3762
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -3762,12 +3765,10 @@ declare const theme: {
3762
3765
  };
3763
3766
  secondary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3764
3767
  _hover: {
3765
- color: string;
3766
3768
  backgroundColor: string;
3767
3769
  boxShadow: string;
3768
3770
  };
3769
3771
  _active: {
3770
- color: string;
3771
3772
  backgroundColor: string;
3772
3773
  boxShadow: string;
3773
3774
  };
@@ -3799,6 +3800,32 @@ declare const theme: {
3799
3800
  colorScheme?: string | undefined;
3800
3801
  } | undefined;
3801
3802
  };
3803
+ List: {
3804
+ baseStyle?: {
3805
+ icon: {
3806
+ marginEnd: string;
3807
+ display: string;
3808
+ verticalAlign: string;
3809
+ fontFamily: string;
3810
+ };
3811
+ } | undefined;
3812
+ sizes?: {
3813
+ [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
3814
+ keys: ("container" | "icon" | "item")[];
3815
+ }>;
3816
+ } | undefined;
3817
+ variants?: {
3818
+ [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
3819
+ keys: ("container" | "icon" | "item")[];
3820
+ }>;
3821
+ } | undefined;
3822
+ defaultProps?: {
3823
+ size?: string | number | undefined;
3824
+ variant?: string | number | undefined;
3825
+ colorScheme?: string | undefined;
3826
+ } | undefined;
3827
+ parts: ("container" | "icon" | "item")[];
3828
+ };
3802
3829
  ListBox: {
3803
3830
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
3804
3831
  container: {
@@ -5689,31 +5716,6 @@ declare const theme: {
5689
5716
  colorScheme?: string | undefined;
5690
5717
  } | undefined;
5691
5718
  };
5692
- List: {
5693
- baseStyle?: {
5694
- icon: {
5695
- marginEnd: string;
5696
- display: string;
5697
- verticalAlign: string;
5698
- };
5699
- } | undefined;
5700
- sizes?: {
5701
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5702
- keys: ("container" | "icon" | "item")[];
5703
- }>;
5704
- } | undefined;
5705
- variants?: {
5706
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5707
- keys: ("container" | "icon" | "item")[];
5708
- }>;
5709
- } | undefined;
5710
- defaultProps?: {
5711
- size?: string | number | undefined;
5712
- variant?: string | number | undefined;
5713
- colorScheme?: string | undefined;
5714
- } | undefined;
5715
- parts: ("container" | "icon" | "item")[];
5716
- };
5717
5719
  Menu: {
5718
5720
  baseStyle?: {
5719
5721
  button: {
package/dist/index.js CHANGED
@@ -12560,6 +12560,7 @@ var init_accordion2 = __esm({
12560
12560
  justifyContent: "space-between",
12561
12561
  color: "darkGrey",
12562
12562
  textAlign: "left",
12563
+ fontFamily: "body",
12563
12564
  fontWeight: "bold",
12564
12565
  ...focusVisible({
12565
12566
  notFocus: {
@@ -14869,80 +14870,79 @@ var init_link2 = __esm({
14869
14870
  }
14870
14871
  },
14871
14872
  variants: {
14872
- primary: {
14873
- color: "pine",
14873
+ primary: (props) => ({
14874
+ color: themeTools.mode("pine", "seaMist")(props),
14874
14875
  ...focusVisible({
14875
14876
  focus: {
14876
- color: "white",
14877
- backgroundColor: "pine",
14877
+ backgroundColor: "transparent",
14878
14878
  boxShadow: getBoxShadowString({
14879
- borderColor: "pine",
14880
- borderWidth: 3,
14879
+ borderColor: "azure",
14880
+ borderWidth: 2,
14881
14881
  isInset: false
14882
14882
  })
14883
14883
  },
14884
14884
  notFocus: {
14885
14885
  color: "pine",
14886
- boxShadow: "none",
14887
- backgroundColor: "transparent"
14886
+ backgroundColor: "transparent",
14887
+ boxShadow: "none"
14888
14888
  }
14889
14889
  }),
14890
14890
  _hover: {
14891
- backgroundColor: "coralGreen",
14892
- color: "darkTeal",
14891
+ color: "white",
14892
+ backgroundColor: "pine",
14893
14893
  boxShadow: getBoxShadowString({
14894
- borderColor: "coralGreen",
14895
- borderWidth: 3,
14894
+ borderColor: "pine",
14895
+ borderWidth: 2,
14896
14896
  isInset: false
14897
14897
  })
14898
14898
  },
14899
14899
  _active: {
14900
- backgroundColor: "mint",
14900
+ color: "white",
14901
+ backgroundColor: "azure",
14901
14902
  boxShadow: getBoxShadowString({
14902
- borderColor: "mint",
14903
- borderWidth: 3,
14903
+ borderColor: "azure",
14904
+ borderWidth: 2,
14904
14905
  isInset: false
14905
- }),
14906
- color: "pine"
14906
+ })
14907
14907
  }
14908
- },
14908
+ }),
14909
14909
  secondary: (props) => ({
14910
- color: "darkGrey",
14910
+ color: themeTools.mode("darkGrey", "white")(props),
14911
14911
  ...focusVisible({
14912
14912
  focus: {
14913
- color: "white",
14914
- backgroundColor: "darkGrey",
14913
+ backgroundColor: "transparent",
14915
14914
  boxShadow: getBoxShadowString({
14916
- borderColor: "darkGrey",
14917
- borderWidth: 3,
14915
+ borderColor: "azure",
14916
+ borderWidth: 2,
14918
14917
  isInset: false
14919
14918
  })
14920
14919
  },
14921
14920
  notFocus: {
14922
- color: "darkGrey",
14923
14921
  boxShadow: "none",
14924
14922
  backgroundColor: "transparent"
14925
14923
  }
14926
14924
  }),
14927
14925
  _hover: {
14928
- color: "darkGrey",
14929
- backgroundColor: "blackAlpha.100",
14926
+ backgroundColor: themeTools.mode("seaMist", "pine")(props),
14930
14927
  boxShadow: getBoxShadowString({
14931
- borderColor: props.theme.colors.blackAlpha[100],
14932
- borderWidth: 3,
14928
+ borderColor: themeTools.mode("seaMist", "pine")(props),
14929
+ borderWidth: 2,
14933
14930
  isInset: false
14934
14931
  })
14935
14932
  },
14936
14933
  _active: {
14937
- color: "darkTeal",
14938
- backgroundColor: "mint",
14934
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props),
14939
14935
  boxShadow: getBoxShadowString({
14940
- borderColor: "mint",
14941
- borderWidth: 3,
14936
+ borderColor: themeTools.mode("mint", "whiteAlpha.200")(props),
14937
+ borderWidth: 2,
14942
14938
  isInset: false
14943
14939
  })
14944
14940
  }
14945
14941
  }),
14942
+ /**
14943
+ * @deprecated tertiary style will be deprecated in the future.
14944
+ * Please use the secondary style instead.
14945
+ */
14946
14946
  tertiary: (props) => ({
14947
14947
  color: "white",
14948
14948
  ...focusVisible({
@@ -14988,6 +14988,28 @@ var init_link2 = __esm({
14988
14988
  link_default = config23;
14989
14989
  }
14990
14990
  });
14991
+
14992
+ // src/theme/components/list.ts
14993
+ var defineMultiStyleConfig28, definePartsStyle28, baseStyleIcon8, baseStyle45, list_default;
14994
+ var init_list2 = __esm({
14995
+ "src/theme/components/list.ts"() {
14996
+ init_dist4();
14997
+ init_dist3();
14998
+ ({ defineMultiStyleConfig: defineMultiStyleConfig28, definePartsStyle: definePartsStyle28 } = createMultiStyleConfigHelpers(listAnatomy.keys));
14999
+ baseStyleIcon8 = defineStyle({
15000
+ marginEnd: "2",
15001
+ display: "inline",
15002
+ verticalAlign: "text-bottom",
15003
+ fontFamily: "body"
15004
+ });
15005
+ baseStyle45 = definePartsStyle28({
15006
+ icon: baseStyleIcon8
15007
+ });
15008
+ list_default = defineMultiStyleConfig28({
15009
+ baseStyle: baseStyle45
15010
+ });
15011
+ }
15012
+ });
14991
15013
  var parts10, helpers15, config24, listbox_default;
14992
15014
  var init_listbox = __esm({
14993
15015
  "src/theme/components/listbox.ts"() {
@@ -16455,6 +16477,7 @@ __export(components_exports, {
16455
16477
  Input: () => input_default,
16456
16478
  LineIcon: () => line_icon_default,
16457
16479
  Link: () => link_default,
16480
+ List: () => list_default,
16458
16481
  ListBox: () => listbox_default,
16459
16482
  MediaControllerButton: () => media_controller_button_default,
16460
16483
  Modal: () => modal_default,
@@ -16494,6 +16517,7 @@ var init_components = __esm({
16494
16517
  init_input2();
16495
16518
  init_line_icon();
16496
16519
  init_link2();
16520
+ init_list2();
16497
16521
  init_listbox();
16498
16522
  init_media_controller_button();
16499
16523
  init_modal2();
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, 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, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, 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, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-YVEFEGE4.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, 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, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, 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, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-D2XVZVE6.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "3.7.2",
3
+ "version": "3.7.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -8,7 +8,11 @@ import React from "react";
8
8
  import { createTexts, useTranslation } from "..";
9
9
 
10
10
  type LinkProps = Omit<ChakraLinkProps, "variant"> & {
11
- variant?: "primary" | "secondary" | "tertiary";
11
+ variant?:
12
+ | "primary"
13
+ | "secondary"
14
+ /** @deprecated Use `secondary` instead */
15
+ | "tertiary";
12
16
  };
13
17
  /** Link to different sites or parts of site
14
18
  *
@@ -21,6 +21,7 @@ const config = helpers.defineMultiStyleConfig({
21
21
  justifyContent: "space-between",
22
22
  color: "darkGrey",
23
23
  textAlign: "left",
24
+ fontFamily: "body",
24
25
  fontWeight: "bold",
25
26
  ...focusVisible({
26
27
  notFocus: {
@@ -20,6 +20,7 @@ export { default as InfoTag } from "./info-tag";
20
20
  export { default as Input } from "./input";
21
21
  export { default as LineIcon } from "./line-icon";
22
22
  export { default as Link } from "./link";
23
+ export { default as List } from "./list";
23
24
  export { default as ListBox } from "./listbox";
24
25
  export { default as MediaControllerButton } from "./media-controller-button";
25
26
  export { default as Modal } from "./modal";
@@ -34,4 +35,3 @@ export { default as Tabs } from "./tabs";
34
35
  export { default as Textarea } from "./textarea";
35
36
  export { default as Toast } from "./toast";
36
37
  export { default as TravelTag } from "./travel-tag";
37
-
@@ -1,6 +1,7 @@
1
1
  import { defineStyleConfig } from "@chakra-ui/react";
2
2
  import { getBoxShadowString } from "../utils/box-shadow-utils";
3
3
  import { focusVisible } from "../utils/focus-utils";
4
+ import { mode } from "@chakra-ui/theme-tools";
4
5
 
5
6
  const config = defineStyleConfig({
6
7
  baseStyle: {
@@ -35,80 +36,79 @@ const config = defineStyleConfig({
35
36
  },
36
37
  },
37
38
  variants: {
38
- primary: {
39
- color: "pine",
39
+ primary: (props) => ({
40
+ color: mode("pine", "seaMist")(props),
40
41
  ...focusVisible({
41
42
  focus: {
42
- color: "white",
43
- backgroundColor: "pine",
43
+ backgroundColor: "transparent",
44
44
  boxShadow: getBoxShadowString({
45
- borderColor: "pine",
46
- borderWidth: 3,
45
+ borderColor: "azure",
46
+ borderWidth: 2,
47
47
  isInset: false,
48
48
  }),
49
49
  },
50
50
  notFocus: {
51
51
  color: "pine",
52
- boxShadow: "none",
53
52
  backgroundColor: "transparent",
53
+ boxShadow: "none",
54
54
  },
55
55
  }),
56
56
  _hover: {
57
- backgroundColor: "coralGreen",
58
- color: "darkTeal",
57
+ color: "white",
58
+ backgroundColor: "pine",
59
59
  boxShadow: getBoxShadowString({
60
- borderColor: "coralGreen",
61
- borderWidth: 3,
60
+ borderColor: "pine",
61
+ borderWidth: 2,
62
62
  isInset: false,
63
63
  }),
64
64
  },
65
65
  _active: {
66
- backgroundColor: "mint",
66
+ color: "white",
67
+ backgroundColor: "azure",
67
68
  boxShadow: getBoxShadowString({
68
- borderColor: "mint",
69
- borderWidth: 3,
69
+ borderColor: "azure",
70
+ borderWidth: 2,
70
71
  isInset: false,
71
72
  }),
72
- color: "pine",
73
73
  },
74
- },
74
+ }),
75
75
  secondary: (props) => ({
76
- color: "darkGrey",
76
+ color: mode("darkGrey", "white")(props),
77
77
  ...focusVisible({
78
78
  focus: {
79
- color: "white",
80
- backgroundColor: "darkGrey",
79
+ backgroundColor: "transparent",
81
80
  boxShadow: getBoxShadowString({
82
- borderColor: "darkGrey",
83
- borderWidth: 3,
81
+ borderColor: "azure",
82
+ borderWidth: 2,
84
83
  isInset: false,
85
84
  }),
86
85
  },
87
86
  notFocus: {
88
- color: "darkGrey",
89
87
  boxShadow: "none",
90
88
  backgroundColor: "transparent",
91
89
  },
92
90
  }),
93
91
  _hover: {
94
- color: "darkGrey",
95
- backgroundColor: "blackAlpha.100",
92
+ backgroundColor: mode("seaMist", "pine")(props),
96
93
  boxShadow: getBoxShadowString({
97
- borderColor: props.theme.colors.blackAlpha[100],
98
- borderWidth: 3,
94
+ borderColor: mode("seaMist", "pine")(props),
95
+ borderWidth: 2,
99
96
  isInset: false,
100
97
  }),
101
98
  },
102
99
  _active: {
103
- color: "darkTeal",
104
- backgroundColor: "mint",
100
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
105
101
  boxShadow: getBoxShadowString({
106
- borderColor: "mint",
107
- borderWidth: 3,
102
+ borderColor: mode("mint", "whiteAlpha.200")(props),
103
+ borderWidth: 2,
108
104
  isInset: false,
109
105
  }),
110
106
  },
111
107
  }),
108
+ /**
109
+ * @deprecated tertiary style will be deprecated in the future.
110
+ * Please use the secondary style instead.
111
+ */
112
112
  tertiary: (props) => ({
113
113
  color: "white",
114
114
  ...focusVisible({
@@ -0,0 +1,23 @@
1
+ import { listAnatomy as parts } from "@chakra-ui/anatomy";
2
+ import {
3
+ createMultiStyleConfigHelpers,
4
+ defineStyle,
5
+ } from "@chakra-ui/styled-system";
6
+
7
+ const { defineMultiStyleConfig, definePartsStyle } =
8
+ createMultiStyleConfigHelpers(parts.keys);
9
+
10
+ const baseStyleIcon = defineStyle({
11
+ marginEnd: "2",
12
+ display: "inline",
13
+ verticalAlign: "text-bottom",
14
+ fontFamily: "body",
15
+ });
16
+
17
+ const baseStyle = definePartsStyle({
18
+ icon: baseStyleIcon,
19
+ });
20
+
21
+ export default defineMultiStyleConfig({
22
+ baseStyle,
23
+ });