@vygruppen/spor-react 3.7.1 → 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.1 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
@@ -9,14 +9,14 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-IP63HI2Y.mjs".
13
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-D2XVZVE6.mjs".
14
+ CJS dist/index.js 534.96 KB
15
+ CJS ⚡️ Build success in 3732ms
14
16
  ESM dist/index.mjs 2.09 KB
15
- ESM dist/CountryCodeSelect-3P7RFAM2.mjs 1.19 KB
16
- ESM dist/chunk-IP63HI2Y.mjs 426.15 KB
17
- ESM ⚡️ Build success in 3846ms
18
- CJS dist/index.js 533.19 KB
19
- CJS ⚡️ Build success in 3846ms
20
- DTS ⚡️ Build success in 17440ms
21
- DTS dist/index.d.ts 254.47 KB
22
- DTS dist/index.d.mts 254.47 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,23 @@
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
+
12
+ ## 3.7.2
13
+
14
+ ### Patch Changes
15
+
16
+ - 0e5ef35c: Adjust active color on Ghost-btn and add dark mode to Floating-btn
17
+ - bd1c6655: Added missing colors for Input in darkmode
18
+ - Updated dependencies [88d6fc75]
19
+ - @vygruppen/spor-icon-react@3.3.0
20
+
3
21
  ## 3.7.1
4
22
 
5
23
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-IP63HI2Y.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-3P7RFAM2.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: {
@@ -11502,7 +11504,7 @@ var config6 = defineStyleConfig$1({
11502
11504
  colors.blackAlpha[400],
11503
11505
  colors.whiteAlpha[300]
11504
11506
  )(props)}`,
11505
- backgroundColor: mode("mint", "whiteAlpha.300")(props)
11507
+ backgroundColor: mode("mint", "whiteAlpha.200")(props)
11506
11508
  }
11507
11509
  }),
11508
11510
  ghost: (props) => ({
@@ -11527,28 +11529,36 @@ var config6 = defineStyleConfig$1({
11527
11529
  }
11528
11530
  },
11529
11531
  _active: {
11530
- backgroundColor: mode("mint", "whiteAlpha.300")(props)
11532
+ backgroundColor: mode("mint", "whiteAlpha.200")(props)
11531
11533
  }
11532
11534
  }),
11533
- floating: {
11534
- backgroundColor: "white",
11535
- boxShadow: "sm",
11535
+ floating: (props) => ({
11536
+ backgroundColor: mode("white", "whiteAlpha.100")(props),
11537
+ boxShadow: getBoxShadowString({
11538
+ borderColor: mode("grey.200", "whiteAlpha.400")(props),
11539
+ baseShadow: "sm"
11540
+ }),
11536
11541
  _active: {
11537
- backgroundColor: "mint"
11542
+ backgroundColor: mode("mint", "whiteAlpha.300")(props)
11538
11543
  },
11539
11544
  _hover: {
11540
- boxShadow: "md"
11545
+ backgroundColor: mode("white", "whiteAlpha.200")(props),
11546
+ boxShadow: getBoxShadowString({
11547
+ borderColor: mode("grey.300", "white")(props),
11548
+ baseShadow: "md",
11549
+ borderWidth: 2
11550
+ })
11541
11551
  },
11542
11552
  ...focusVisible({
11543
11553
  focus: {
11544
11554
  boxShadow: getBoxShadowString({
11545
- borderColor: "greenHaze",
11555
+ borderColor: mode("greenHaze", "azure")(props),
11546
11556
  borderWidth: 2,
11547
11557
  baseShadow: "sm"
11548
11558
  }),
11549
11559
  _hover: {
11550
11560
  boxShadow: getBoxShadowString({
11551
- borderColor: "greenHaze",
11561
+ borderColor: mode("greenHaze", "azure")(props),
11552
11562
  borderWidth: 2,
11553
11563
  baseShadow: "md"
11554
11564
  })
@@ -11559,7 +11569,7 @@ var config6 = defineStyleConfig$1({
11559
11569
  boxShadow: "sm"
11560
11570
  }
11561
11571
  })
11562
- }
11572
+ })
11563
11573
  },
11564
11574
  sizes: {
11565
11575
  lg: {
@@ -12999,16 +13009,22 @@ var config21 = helpers13.defineMultiStyleConfig({
12999
13009
  boxShadow: getBoxShadowString({
13000
13010
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
13001
13011
  }),
13012
+ _active: {
13013
+ backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
13014
+ boxShadow: getBoxShadowString({
13015
+ borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
13016
+ })
13017
+ },
13002
13018
  _hover: {
13003
13019
  boxShadow: getBoxShadowString({
13004
- borderColor: mode("darkGrey", "whiteAlpha.600")(props),
13020
+ borderColor: mode("darkGrey", "white")(props),
13005
13021
  borderWidth: 2
13006
13022
  })
13007
13023
  },
13008
13024
  ...focusVisible({
13009
13025
  focus: {
13010
13026
  boxShadow: getBoxShadowString({
13011
- borderColor: "greenHaze",
13027
+ borderColor: mode("greenHaze", "azure")(props),
13012
13028
  borderWidth: 2
13013
13029
  })
13014
13030
  },
@@ -13035,7 +13051,7 @@ var config21 = helpers13.defineMultiStyleConfig({
13035
13051
  ...focusVisible({
13036
13052
  focus: {
13037
13053
  boxShadow: getBoxShadowString({
13038
- borderColor: "greenHaze",
13054
+ borderColor: mode("greenHaze", "azure")(props),
13039
13055
  borderWidth: 2
13040
13056
  })
13041
13057
  },
@@ -13217,80 +13233,79 @@ var config23 = defineStyleConfig$1({
13217
13233
  }
13218
13234
  },
13219
13235
  variants: {
13220
- primary: {
13221
- color: "pine",
13236
+ primary: (props) => ({
13237
+ color: mode("pine", "seaMist")(props),
13222
13238
  ...focusVisible({
13223
13239
  focus: {
13224
- color: "white",
13225
- backgroundColor: "pine",
13240
+ backgroundColor: "transparent",
13226
13241
  boxShadow: getBoxShadowString({
13227
- borderColor: "pine",
13228
- borderWidth: 3,
13242
+ borderColor: "azure",
13243
+ borderWidth: 2,
13229
13244
  isInset: false
13230
13245
  })
13231
13246
  },
13232
13247
  notFocus: {
13233
13248
  color: "pine",
13234
- boxShadow: "none",
13235
- backgroundColor: "transparent"
13249
+ backgroundColor: "transparent",
13250
+ boxShadow: "none"
13236
13251
  }
13237
13252
  }),
13238
13253
  _hover: {
13239
- backgroundColor: "coralGreen",
13240
- color: "darkTeal",
13254
+ color: "white",
13255
+ backgroundColor: "pine",
13241
13256
  boxShadow: getBoxShadowString({
13242
- borderColor: "coralGreen",
13243
- borderWidth: 3,
13257
+ borderColor: "pine",
13258
+ borderWidth: 2,
13244
13259
  isInset: false
13245
13260
  })
13246
13261
  },
13247
13262
  _active: {
13248
- backgroundColor: "mint",
13263
+ color: "white",
13264
+ backgroundColor: "azure",
13249
13265
  boxShadow: getBoxShadowString({
13250
- borderColor: "mint",
13251
- borderWidth: 3,
13266
+ borderColor: "azure",
13267
+ borderWidth: 2,
13252
13268
  isInset: false
13253
- }),
13254
- color: "pine"
13269
+ })
13255
13270
  }
13256
- },
13271
+ }),
13257
13272
  secondary: (props) => ({
13258
- color: "darkGrey",
13273
+ color: mode("darkGrey", "white")(props),
13259
13274
  ...focusVisible({
13260
13275
  focus: {
13261
- color: "white",
13262
- backgroundColor: "darkGrey",
13276
+ backgroundColor: "transparent",
13263
13277
  boxShadow: getBoxShadowString({
13264
- borderColor: "darkGrey",
13265
- borderWidth: 3,
13278
+ borderColor: "azure",
13279
+ borderWidth: 2,
13266
13280
  isInset: false
13267
13281
  })
13268
13282
  },
13269
13283
  notFocus: {
13270
- color: "darkGrey",
13271
13284
  boxShadow: "none",
13272
13285
  backgroundColor: "transparent"
13273
13286
  }
13274
13287
  }),
13275
13288
  _hover: {
13276
- color: "darkGrey",
13277
- backgroundColor: "blackAlpha.100",
13289
+ backgroundColor: mode("seaMist", "pine")(props),
13278
13290
  boxShadow: getBoxShadowString({
13279
- borderColor: props.theme.colors.blackAlpha[100],
13280
- borderWidth: 3,
13291
+ borderColor: mode("seaMist", "pine")(props),
13292
+ borderWidth: 2,
13281
13293
  isInset: false
13282
13294
  })
13283
13295
  },
13284
13296
  _active: {
13285
- color: "darkTeal",
13286
- backgroundColor: "mint",
13297
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
13287
13298
  boxShadow: getBoxShadowString({
13288
- borderColor: "mint",
13289
- borderWidth: 3,
13299
+ borderColor: mode("mint", "whiteAlpha.200")(props),
13300
+ borderWidth: 2,
13290
13301
  isInset: false
13291
13302
  })
13292
13303
  }
13293
13304
  }),
13305
+ /**
13306
+ * @deprecated tertiary style will be deprecated in the future.
13307
+ * Please use the secondary style instead.
13308
+ */
13294
13309
  tertiary: (props) => ({
13295
13310
  color: "white",
13296
13311
  ...focusVisible({
@@ -13334,6 +13349,21 @@ var config23 = defineStyleConfig$1({
13334
13349
  }
13335
13350
  });
13336
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
+ });
13337
13367
  var parts10 = anatomy("ListBox").parts(
13338
13368
  "container",
13339
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: {
@@ -2353,7 +2356,7 @@ declare const theme: {
2353
2356
  color: string;
2354
2357
  fontWeight: string;
2355
2358
  };
2356
- floating: {
2359
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2357
2360
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2358
2361
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
2359
2362
  "&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
@@ -2363,6 +2366,7 @@ declare const theme: {
2363
2366
  backgroundColor: string;
2364
2367
  };
2365
2368
  _hover: {
2369
+ backgroundColor: string;
2366
2370
  boxShadow: string;
2367
2371
  };
2368
2372
  };
@@ -3565,6 +3569,10 @@ declare const theme: {
3565
3569
  height: string;
3566
3570
  fontSize: string;
3567
3571
  boxShadow: string;
3572
+ _active: {
3573
+ backgroundColor: string;
3574
+ boxShadow: string;
3575
+ };
3568
3576
  _hover: {
3569
3577
  boxShadow: string;
3570
3578
  };
@@ -3739,16 +3747,16 @@ declare const theme: {
3739
3747
  [key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
3740
3748
  } | undefined;
3741
3749
  variants?: {
3742
- primary: {
3750
+ primary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3743
3751
  _hover: {
3744
- backgroundColor: string;
3745
3752
  color: string;
3753
+ backgroundColor: string;
3746
3754
  boxShadow: string;
3747
3755
  };
3748
3756
  _active: {
3757
+ color: string;
3749
3758
  backgroundColor: string;
3750
3759
  boxShadow: string;
3751
- color: string;
3752
3760
  };
3753
3761
  _focus: _chakra_ui_styled_system.SystemStyleObject;
3754
3762
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -3757,12 +3765,10 @@ declare const theme: {
3757
3765
  };
3758
3766
  secondary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3759
3767
  _hover: {
3760
- color: string;
3761
3768
  backgroundColor: string;
3762
3769
  boxShadow: string;
3763
3770
  };
3764
3771
  _active: {
3765
- color: string;
3766
3772
  backgroundColor: string;
3767
3773
  boxShadow: string;
3768
3774
  };
@@ -3794,6 +3800,32 @@ declare const theme: {
3794
3800
  colorScheme?: string | undefined;
3795
3801
  } | undefined;
3796
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
+ };
3797
3829
  ListBox: {
3798
3830
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
3799
3831
  container: {
@@ -4229,6 +4261,10 @@ declare const theme: {
4229
4261
  height: string;
4230
4262
  fontSize: string;
4231
4263
  boxShadow: string;
4264
+ _active: {
4265
+ backgroundColor: string;
4266
+ boxShadow: string;
4267
+ };
4232
4268
  _hover: {
4233
4269
  boxShadow: string;
4234
4270
  };
@@ -5012,6 +5048,10 @@ declare const theme: {
5012
5048
  height: string;
5013
5049
  fontSize: string;
5014
5050
  boxShadow: string;
5051
+ _active: {
5052
+ backgroundColor: string;
5053
+ boxShadow: string;
5054
+ };
5015
5055
  _hover: {
5016
5056
  boxShadow: string;
5017
5057
  };
@@ -5676,31 +5716,6 @@ declare const theme: {
5676
5716
  colorScheme?: string | undefined;
5677
5717
  } | undefined;
5678
5718
  };
5679
- List: {
5680
- baseStyle?: {
5681
- icon: {
5682
- marginEnd: string;
5683
- display: string;
5684
- verticalAlign: string;
5685
- };
5686
- } | undefined;
5687
- sizes?: {
5688
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5689
- keys: ("container" | "icon" | "item")[];
5690
- }>;
5691
- } | undefined;
5692
- variants?: {
5693
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5694
- keys: ("container" | "icon" | "item")[];
5695
- }>;
5696
- } | undefined;
5697
- defaultProps?: {
5698
- size?: string | number | undefined;
5699
- variant?: string | number | undefined;
5700
- colorScheme?: string | undefined;
5701
- } | undefined;
5702
- parts: ("container" | "icon" | "item")[];
5703
- };
5704
5719
  Menu: {
5705
5720
  baseStyle?: {
5706
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: {
@@ -2353,7 +2356,7 @@ declare const theme: {
2353
2356
  color: string;
2354
2357
  fontWeight: string;
2355
2358
  };
2356
- floating: {
2359
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2357
2360
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2358
2361
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
2359
2362
  "&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
@@ -2363,6 +2366,7 @@ declare const theme: {
2363
2366
  backgroundColor: string;
2364
2367
  };
2365
2368
  _hover: {
2369
+ backgroundColor: string;
2366
2370
  boxShadow: string;
2367
2371
  };
2368
2372
  };
@@ -3565,6 +3569,10 @@ declare const theme: {
3565
3569
  height: string;
3566
3570
  fontSize: string;
3567
3571
  boxShadow: string;
3572
+ _active: {
3573
+ backgroundColor: string;
3574
+ boxShadow: string;
3575
+ };
3568
3576
  _hover: {
3569
3577
  boxShadow: string;
3570
3578
  };
@@ -3739,16 +3747,16 @@ declare const theme: {
3739
3747
  [key: string]: _chakra_ui_styled_system.SystemStyleInterpolation;
3740
3748
  } | undefined;
3741
3749
  variants?: {
3742
- primary: {
3750
+ primary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3743
3751
  _hover: {
3744
- backgroundColor: string;
3745
3752
  color: string;
3753
+ backgroundColor: string;
3746
3754
  boxShadow: string;
3747
3755
  };
3748
3756
  _active: {
3757
+ color: string;
3749
3758
  backgroundColor: string;
3750
3759
  boxShadow: string;
3751
- color: string;
3752
3760
  };
3753
3761
  _focus: _chakra_ui_styled_system.SystemStyleObject;
3754
3762
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -3757,12 +3765,10 @@ declare const theme: {
3757
3765
  };
3758
3766
  secondary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
3759
3767
  _hover: {
3760
- color: string;
3761
3768
  backgroundColor: string;
3762
3769
  boxShadow: string;
3763
3770
  };
3764
3771
  _active: {
3765
- color: string;
3766
3772
  backgroundColor: string;
3767
3773
  boxShadow: string;
3768
3774
  };
@@ -3794,6 +3800,32 @@ declare const theme: {
3794
3800
  colorScheme?: string | undefined;
3795
3801
  } | undefined;
3796
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
+ };
3797
3829
  ListBox: {
3798
3830
  baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
3799
3831
  container: {
@@ -4229,6 +4261,10 @@ declare const theme: {
4229
4261
  height: string;
4230
4262
  fontSize: string;
4231
4263
  boxShadow: string;
4264
+ _active: {
4265
+ backgroundColor: string;
4266
+ boxShadow: string;
4267
+ };
4232
4268
  _hover: {
4233
4269
  boxShadow: string;
4234
4270
  };
@@ -5012,6 +5048,10 @@ declare const theme: {
5012
5048
  height: string;
5013
5049
  fontSize: string;
5014
5050
  boxShadow: string;
5051
+ _active: {
5052
+ backgroundColor: string;
5053
+ boxShadow: string;
5054
+ };
5015
5055
  _hover: {
5016
5056
  boxShadow: string;
5017
5057
  };
@@ -5676,31 +5716,6 @@ declare const theme: {
5676
5716
  colorScheme?: string | undefined;
5677
5717
  } | undefined;
5678
5718
  };
5679
- List: {
5680
- baseStyle?: {
5681
- icon: {
5682
- marginEnd: string;
5683
- display: string;
5684
- verticalAlign: string;
5685
- };
5686
- } | undefined;
5687
- sizes?: {
5688
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5689
- keys: ("container" | "icon" | "item")[];
5690
- }>;
5691
- } | undefined;
5692
- variants?: {
5693
- [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
5694
- keys: ("container" | "icon" | "item")[];
5695
- }>;
5696
- } | undefined;
5697
- defaultProps?: {
5698
- size?: string | number | undefined;
5699
- variant?: string | number | undefined;
5700
- colorScheme?: string | undefined;
5701
- } | undefined;
5702
- parts: ("container" | "icon" | "item")[];
5703
- };
5704
5719
  Menu: {
5705
5720
  baseStyle?: {
5706
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: {
@@ -13017,7 +13018,7 @@ var init_button2 = __esm({
13017
13018
  colors.blackAlpha[400],
13018
13019
  colors.whiteAlpha[300]
13019
13020
  )(props)}`,
13020
- backgroundColor: themeTools.mode("mint", "whiteAlpha.300")(props)
13021
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
13021
13022
  }
13022
13023
  }),
13023
13024
  ghost: (props) => ({
@@ -13042,28 +13043,36 @@ var init_button2 = __esm({
13042
13043
  }
13043
13044
  },
13044
13045
  _active: {
13045
- backgroundColor: themeTools.mode("mint", "whiteAlpha.300")(props)
13046
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
13046
13047
  }
13047
13048
  }),
13048
- floating: {
13049
- backgroundColor: "white",
13050
- boxShadow: "sm",
13049
+ floating: (props) => ({
13050
+ backgroundColor: themeTools.mode("white", "whiteAlpha.100")(props),
13051
+ boxShadow: getBoxShadowString({
13052
+ borderColor: themeTools.mode("grey.200", "whiteAlpha.400")(props),
13053
+ baseShadow: "sm"
13054
+ }),
13051
13055
  _active: {
13052
- backgroundColor: "mint"
13056
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.300")(props)
13053
13057
  },
13054
13058
  _hover: {
13055
- boxShadow: "md"
13059
+ backgroundColor: themeTools.mode("white", "whiteAlpha.200")(props),
13060
+ boxShadow: getBoxShadowString({
13061
+ borderColor: themeTools.mode("grey.300", "white")(props),
13062
+ baseShadow: "md",
13063
+ borderWidth: 2
13064
+ })
13056
13065
  },
13057
13066
  ...focusVisible({
13058
13067
  focus: {
13059
13068
  boxShadow: getBoxShadowString({
13060
- borderColor: "greenHaze",
13069
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
13061
13070
  borderWidth: 2,
13062
13071
  baseShadow: "sm"
13063
13072
  }),
13064
13073
  _hover: {
13065
13074
  boxShadow: getBoxShadowString({
13066
- borderColor: "greenHaze",
13075
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
13067
13076
  borderWidth: 2,
13068
13077
  baseShadow: "md"
13069
13078
  })
@@ -13074,7 +13083,7 @@ var init_button2 = __esm({
13074
13083
  boxShadow: "sm"
13075
13084
  }
13076
13085
  })
13077
- }
13086
+ })
13078
13087
  },
13079
13088
  sizes: {
13080
13089
  lg: {
@@ -14625,16 +14634,22 @@ var init_input2 = __esm({
14625
14634
  boxShadow: getBoxShadowString({
14626
14635
  borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
14627
14636
  }),
14637
+ _active: {
14638
+ backgroundColor: themeTools.mode("blackAlpha.100", "whiteAlpha.100")(props),
14639
+ boxShadow: getBoxShadowString({
14640
+ borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
14641
+ })
14642
+ },
14628
14643
  _hover: {
14629
14644
  boxShadow: getBoxShadowString({
14630
- borderColor: themeTools.mode("darkGrey", "whiteAlpha.600")(props),
14645
+ borderColor: themeTools.mode("darkGrey", "white")(props),
14631
14646
  borderWidth: 2
14632
14647
  })
14633
14648
  },
14634
14649
  ...focusVisible({
14635
14650
  focus: {
14636
14651
  boxShadow: getBoxShadowString({
14637
- borderColor: "greenHaze",
14652
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
14638
14653
  borderWidth: 2
14639
14654
  })
14640
14655
  },
@@ -14661,7 +14676,7 @@ var init_input2 = __esm({
14661
14676
  ...focusVisible({
14662
14677
  focus: {
14663
14678
  boxShadow: getBoxShadowString({
14664
- borderColor: "greenHaze",
14679
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
14665
14680
  borderWidth: 2
14666
14681
  })
14667
14682
  },
@@ -14855,80 +14870,79 @@ var init_link2 = __esm({
14855
14870
  }
14856
14871
  },
14857
14872
  variants: {
14858
- primary: {
14859
- color: "pine",
14873
+ primary: (props) => ({
14874
+ color: themeTools.mode("pine", "seaMist")(props),
14860
14875
  ...focusVisible({
14861
14876
  focus: {
14862
- color: "white",
14863
- backgroundColor: "pine",
14877
+ backgroundColor: "transparent",
14864
14878
  boxShadow: getBoxShadowString({
14865
- borderColor: "pine",
14866
- borderWidth: 3,
14879
+ borderColor: "azure",
14880
+ borderWidth: 2,
14867
14881
  isInset: false
14868
14882
  })
14869
14883
  },
14870
14884
  notFocus: {
14871
14885
  color: "pine",
14872
- boxShadow: "none",
14873
- backgroundColor: "transparent"
14886
+ backgroundColor: "transparent",
14887
+ boxShadow: "none"
14874
14888
  }
14875
14889
  }),
14876
14890
  _hover: {
14877
- backgroundColor: "coralGreen",
14878
- color: "darkTeal",
14891
+ color: "white",
14892
+ backgroundColor: "pine",
14879
14893
  boxShadow: getBoxShadowString({
14880
- borderColor: "coralGreen",
14881
- borderWidth: 3,
14894
+ borderColor: "pine",
14895
+ borderWidth: 2,
14882
14896
  isInset: false
14883
14897
  })
14884
14898
  },
14885
14899
  _active: {
14886
- backgroundColor: "mint",
14900
+ color: "white",
14901
+ backgroundColor: "azure",
14887
14902
  boxShadow: getBoxShadowString({
14888
- borderColor: "mint",
14889
- borderWidth: 3,
14903
+ borderColor: "azure",
14904
+ borderWidth: 2,
14890
14905
  isInset: false
14891
- }),
14892
- color: "pine"
14906
+ })
14893
14907
  }
14894
- },
14908
+ }),
14895
14909
  secondary: (props) => ({
14896
- color: "darkGrey",
14910
+ color: themeTools.mode("darkGrey", "white")(props),
14897
14911
  ...focusVisible({
14898
14912
  focus: {
14899
- color: "white",
14900
- backgroundColor: "darkGrey",
14913
+ backgroundColor: "transparent",
14901
14914
  boxShadow: getBoxShadowString({
14902
- borderColor: "darkGrey",
14903
- borderWidth: 3,
14915
+ borderColor: "azure",
14916
+ borderWidth: 2,
14904
14917
  isInset: false
14905
14918
  })
14906
14919
  },
14907
14920
  notFocus: {
14908
- color: "darkGrey",
14909
14921
  boxShadow: "none",
14910
14922
  backgroundColor: "transparent"
14911
14923
  }
14912
14924
  }),
14913
14925
  _hover: {
14914
- color: "darkGrey",
14915
- backgroundColor: "blackAlpha.100",
14926
+ backgroundColor: themeTools.mode("seaMist", "pine")(props),
14916
14927
  boxShadow: getBoxShadowString({
14917
- borderColor: props.theme.colors.blackAlpha[100],
14918
- borderWidth: 3,
14928
+ borderColor: themeTools.mode("seaMist", "pine")(props),
14929
+ borderWidth: 2,
14919
14930
  isInset: false
14920
14931
  })
14921
14932
  },
14922
14933
  _active: {
14923
- color: "darkTeal",
14924
- backgroundColor: "mint",
14934
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props),
14925
14935
  boxShadow: getBoxShadowString({
14926
- borderColor: "mint",
14927
- borderWidth: 3,
14936
+ borderColor: themeTools.mode("mint", "whiteAlpha.200")(props),
14937
+ borderWidth: 2,
14928
14938
  isInset: false
14929
14939
  })
14930
14940
  }
14931
14941
  }),
14942
+ /**
14943
+ * @deprecated tertiary style will be deprecated in the future.
14944
+ * Please use the secondary style instead.
14945
+ */
14932
14946
  tertiary: (props) => ({
14933
14947
  color: "white",
14934
14948
  ...focusVisible({
@@ -14974,6 +14988,28 @@ var init_link2 = __esm({
14974
14988
  link_default = config23;
14975
14989
  }
14976
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
+ });
14977
15013
  var parts10, helpers15, config24, listbox_default;
14978
15014
  var init_listbox = __esm({
14979
15015
  "src/theme/components/listbox.ts"() {
@@ -16441,6 +16477,7 @@ __export(components_exports, {
16441
16477
  Input: () => input_default,
16442
16478
  LineIcon: () => line_icon_default,
16443
16479
  Link: () => link_default,
16480
+ List: () => list_default,
16444
16481
  ListBox: () => listbox_default,
16445
16482
  MediaControllerButton: () => media_controller_button_default,
16446
16483
  Modal: () => modal_default,
@@ -16480,6 +16517,7 @@ var init_components = __esm({
16480
16517
  init_input2();
16481
16518
  init_line_icon();
16482
16519
  init_link2();
16520
+ init_list2();
16483
16521
  init_listbox();
16484
16522
  init_media_controller_button();
16485
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-IP63HI2Y.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.1",
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: {
@@ -126,7 +126,7 @@ const config = defineStyleConfig({
126
126
  colors.blackAlpha[400],
127
127
  colors.whiteAlpha[300]
128
128
  )(props)}`,
129
- backgroundColor: mode("mint", "whiteAlpha.300")(props),
129
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
130
130
  },
131
131
  }),
132
132
  ghost: (props) => ({
@@ -151,30 +151,38 @@ const config = defineStyleConfig({
151
151
  },
152
152
  },
153
153
  _active: {
154
- backgroundColor: mode("mint", "whiteAlpha.300")(props),
154
+ backgroundColor: mode("mint", "whiteAlpha.200")(props),
155
155
  },
156
156
  }),
157
- floating: {
158
- backgroundColor: "white",
159
- boxShadow: "sm",
157
+ floating: (props) => ({
158
+ backgroundColor: mode("white", "whiteAlpha.100")(props),
159
+ boxShadow: getBoxShadowString({
160
+ borderColor: mode("grey.200", "whiteAlpha.400")(props),
161
+ baseShadow: "sm",
162
+ }),
160
163
  _active: {
161
- backgroundColor: "mint",
164
+ backgroundColor: mode("mint", "whiteAlpha.300")(props),
162
165
  },
163
166
  _hover: {
164
- boxShadow: "md",
167
+ backgroundColor: mode("white", "whiteAlpha.200")(props),
168
+ boxShadow: getBoxShadowString({
169
+ borderColor: mode("grey.300", "white")(props),
170
+ baseShadow: "md",
171
+ borderWidth: 2,
172
+ }),
165
173
  },
166
174
  ...focusVisible({
167
175
  focus: {
168
176
  boxShadow: getBoxShadowString({
169
- borderColor: "greenHaze",
177
+ borderColor: mode("greenHaze", "azure")(props),
170
178
  borderWidth: 2,
171
179
  baseShadow: "sm",
172
180
  }),
173
181
  _hover: {
174
182
  boxShadow: getBoxShadowString({
175
- borderColor: "greenHaze",
183
+ borderColor: mode("greenHaze", "azure")(props),
176
184
  borderWidth: 2,
177
- baseShadow: "md",
185
+ baseShadow: "md"
178
186
  }),
179
187
  },
180
188
  },
@@ -183,7 +191,7 @@ const config = defineStyleConfig({
183
191
  boxShadow: "sm",
184
192
  },
185
193
  }),
186
- },
194
+ }),
187
195
  },
188
196
  sizes: {
189
197
  lg: {
@@ -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
-
@@ -25,16 +25,22 @@ const config = helpers.defineMultiStyleConfig({
25
25
  boxShadow: getBoxShadowString({
26
26
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
27
27
  }),
28
+ _active: {
29
+ backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
30
+ boxShadow: getBoxShadowString({
31
+ borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
32
+ }),
33
+ },
28
34
  _hover: {
29
35
  boxShadow: getBoxShadowString({
30
- borderColor: mode("darkGrey", "whiteAlpha.600")(props),
36
+ borderColor: mode("darkGrey", "white")(props),
31
37
  borderWidth: 2,
32
38
  }),
33
39
  },
34
40
  ...focusVisible({
35
41
  focus: {
36
42
  boxShadow: getBoxShadowString({
37
- borderColor: "greenHaze",
43
+ borderColor: mode("greenHaze", "azure")(props),
38
44
  borderWidth: 2,
39
45
  }),
40
46
  },
@@ -61,7 +67,7 @@ const config = helpers.defineMultiStyleConfig({
61
67
  ...focusVisible({
62
68
  focus: {
63
69
  boxShadow: getBoxShadowString({
64
- borderColor: "greenHaze",
70
+ borderColor: mode("greenHaze", "azure")(props),
65
71
  borderWidth: 2,
66
72
  }),
67
73
  },
@@ -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
+ });