@vygruppen/spor-react 3.7.3 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -266,7 +266,9 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
266
266
  *
267
267
  * Defaults to "primary"
268
268
  */
269
- variant?: "control" | "primary" | "secondary" | "tertiary" | "additional" | "ghost" | "floating";
269
+ variant?: "control" | "primary" | "secondary"
270
+ /** @deprecated Use `secondary` instead */
271
+ | "tertiary" | "additional" | "ghost" | "floating";
270
272
  };
271
273
  /**
272
274
  * Buttons are used to trigger actions.
@@ -1963,7 +1965,7 @@ declare const fontFaces: string;
1963
1965
  declare const theme: {
1964
1966
  components: {
1965
1967
  Accordion: {
1966
- baseStyle?: {
1968
+ baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
1967
1969
  container: {
1968
1970
  border: string;
1969
1971
  borderRadius: string;
@@ -1994,13 +1996,14 @@ declare const theme: {
1994
1996
  icon: {
1995
1997
  fontSize: string;
1996
1998
  };
1997
- } | undefined;
1999
+ }) | undefined;
1998
2000
  sizes?: {
1999
2001
  sm: {
2000
2002
  button: {
2001
2003
  fontSize: ("mobile.xs" | "desktop.xs" | null)[];
2002
2004
  paddingX: number;
2003
2005
  paddingY: number;
2006
+ minHeight: number;
2004
2007
  };
2005
2008
  panel: {
2006
2009
  fontSize: ("mobile.xs" | "desktop.xs" | null)[];
@@ -2012,6 +2015,7 @@ declare const theme: {
2012
2015
  fontSize: ("mobile.sm" | "desktop.sm" | null)[];
2013
2016
  paddingX: number;
2014
2017
  paddingY: number;
2018
+ minHeight: number;
2015
2019
  };
2016
2020
  panel: {
2017
2021
  fontSize: ("mobile.sm" | "desktop.sm" | null)[];
@@ -2023,6 +2027,7 @@ declare const theme: {
2023
2027
  fontSize: ("mobile.sm" | "desktop.sm" | null)[];
2024
2028
  paddingX: number;
2025
2029
  paddingY: number;
2030
+ minHeight: number;
2026
2031
  };
2027
2032
  panel: {
2028
2033
  fontSize: ("mobile.sm" | "desktop.sm" | null)[];
@@ -2031,7 +2036,7 @@ declare const theme: {
2031
2036
  };
2032
2037
  } | undefined;
2033
2038
  variants?: {
2034
- list: {
2039
+ list: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2035
2040
  button: {
2036
2041
  boxShadow: string;
2037
2042
  _hover: {
@@ -2042,7 +2047,7 @@ declare const theme: {
2042
2047
  };
2043
2048
  };
2044
2049
  };
2045
- outline: {
2050
+ outline: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2046
2051
  container: {
2047
2052
  boxShadow: string;
2048
2053
  };
@@ -2059,8 +2064,9 @@ declare const theme: {
2059
2064
  };
2060
2065
  };
2061
2066
  };
2062
- card: {
2067
+ card: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2063
2068
  container: {
2069
+ backgroundColor: string;
2064
2070
  boxShadow: string;
2065
2071
  };
2066
2072
  button: {
@@ -2069,9 +2075,11 @@ declare const theme: {
2069
2075
  };
2070
2076
  _hover: {
2071
2077
  backgroundColor: string;
2078
+ boxShadow: string;
2072
2079
  };
2073
2080
  _active: {
2074
2081
  backgroundColor: string;
2082
+ boxShadow: string;
2075
2083
  };
2076
2084
  };
2077
2085
  };
@@ -2176,7 +2184,7 @@ declare const theme: {
2176
2184
  } | undefined;
2177
2185
  };
2178
2186
  Breadcrumb: {
2179
- baseStyle?: {
2187
+ baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
2180
2188
  link: {
2181
2189
  transitionProperty: string;
2182
2190
  transitionDuration: string;
@@ -2194,6 +2202,11 @@ declare const theme: {
2194
2202
  };
2195
2203
  _focusVisible: {
2196
2204
  boxShadow: string;
2205
+ notFocus: {
2206
+ notFocus: {
2207
+ boxShadow: string;
2208
+ };
2209
+ };
2197
2210
  };
2198
2211
  _active: {
2199
2212
  backgroundColor: string;
@@ -2204,7 +2217,7 @@ declare const theme: {
2204
2217
  flexWrap: string;
2205
2218
  alignItems: string;
2206
2219
  };
2207
- } | undefined;
2220
+ }) | undefined;
2208
2221
  sizes?: {
2209
2222
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2210
2223
  keys: ("link" | "container" | "separator" | "item")[];
@@ -2270,7 +2283,7 @@ declare const theme: {
2270
2283
  };
2271
2284
  } | undefined;
2272
2285
  variants?: {
2273
- control: {
2286
+ control: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2274
2287
  _hover: {
2275
2288
  backgroundColor: string;
2276
2289
  };
@@ -2283,7 +2296,7 @@ declare const theme: {
2283
2296
  backgroundColor: string;
2284
2297
  color: string;
2285
2298
  };
2286
- primary: {
2299
+ primary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2287
2300
  _hover: {
2288
2301
  backgroundColor: string;
2289
2302
  };
@@ -2296,18 +2309,22 @@ declare const theme: {
2296
2309
  backgroundColor: string;
2297
2310
  color: string;
2298
2311
  };
2299
- secondary: {
2300
- _hover: {
2301
- backgroundColor: string;
2302
- };
2312
+ secondary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2303
2313
  _active: {
2304
2314
  backgroundColor: string;
2315
+ boxShadow: string;
2316
+ _hover: {
2317
+ boxShadow: string;
2318
+ };
2305
2319
  };
2306
2320
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2307
2321
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
2308
2322
  "&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
2309
2323
  backgroundColor: string;
2310
2324
  color: string;
2325
+ _hover: {
2326
+ backgroundColor: string;
2327
+ };
2311
2328
  };
2312
2329
  tertiary: {
2313
2330
  _hover: {
@@ -2668,6 +2685,7 @@ declare const theme: {
2668
2685
  fontSize: string;
2669
2686
  px: number;
2670
2687
  _checked: {
2688
+ color: string;
2671
2689
  background: string;
2672
2690
  boxShadow: string;
2673
2691
  };
@@ -2676,11 +2694,16 @@ declare const theme: {
2676
2694
  };
2677
2695
  "@media (hover:hover)": {
2678
2696
  _hover: {
2697
+ color: string;
2679
2698
  boxShadow: string;
2680
2699
  background: string;
2681
2700
  cursor: string;
2682
2701
  };
2683
2702
  };
2703
+ _active: {
2704
+ backgroundColor: string;
2705
+ boxShadow: string;
2706
+ };
2684
2707
  };
2685
2708
  icon: {
2686
2709
  mr: number;
package/dist/index.js CHANGED
@@ -791,10 +791,10 @@ var init_FloatingActionButton = __esm({
791
791
  ...props
792
792
  }) => {
793
793
  const [isTextVisible, setIsTextVisible] = React50__namespace.default.useState(
794
- externalIsTextVisible !== void 0 ? externalIsTextVisible : true
794
+ externalIsTextVisible !== void 0 ? externalIsTextVisible : false
795
795
  );
796
796
  const scrollDirection = useScrollDirection();
797
- React50__namespace.default.useEffect(() => {
797
+ React50.useEffect(() => {
798
798
  if (externalIsTextVisible !== void 0) {
799
799
  return;
800
800
  }
@@ -804,7 +804,7 @@ var init_FloatingActionButton = __esm({
804
804
  );
805
805
  return () => window.clearTimeout(id);
806
806
  }, [scrollDirection, externalIsTextVisible]);
807
- React50__namespace.default.useEffect(() => {
807
+ React50.useEffect(() => {
808
808
  setIsTextVisible(!!externalIsTextVisible);
809
809
  }, [externalIsTextVisible]);
810
810
  const style = react.useMultiStyleConfig("FloatingActionButton", {
@@ -825,7 +825,7 @@ var init_FloatingActionButton = __esm({
825
825
  MotionBox,
826
826
  {
827
827
  animate: isTextVisible ? "show" : "hide",
828
- initial: "show",
828
+ initial: externalIsTextVisible ? "show" : "hide",
829
829
  variants: {
830
830
  show: {
831
831
  opacity: 1,
@@ -846,7 +846,9 @@ var init_FloatingActionButton = __esm({
846
846
  };
847
847
  useScrollDirection = () => {
848
848
  const [scrollDirection, setScrollDirection] = React50__namespace.default.useState(null);
849
- const lastScrollPosition = React50__namespace.default.useRef(typeof window !== "undefined" ? window.scrollY : 0);
849
+ const lastScrollPosition = React50__namespace.default.useRef(
850
+ typeof window !== "undefined" ? window.scrollY : 0
851
+ );
850
852
  React50__namespace.default.useEffect(() => {
851
853
  const onScroll = () => {
852
854
  const delta = window.scrollY - lastScrollPosition.current;
@@ -4824,7 +4826,9 @@ var init_ChoiceChip = __esm({
4824
4826
  __css: styles3.container,
4825
4827
  "data-checked": dataAttr(state2.isChecked),
4826
4828
  "data-hover": dataAttr(state2.isHovered),
4827
- "data-focus": dataAttr(state2.isFocused)
4829
+ "data-focus": dataAttr(state2.isFocused),
4830
+ "data-active": dataAttr(state2.isActive),
4831
+ "data-disabled": dataAttr(state2.isDisabled)
4828
4832
  },
4829
4833
  icon && /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
4830
4834
  /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles3.label, ...getCheckboxProps() }, variant !== "icon" && children),
@@ -12534,8 +12538,6 @@ var init_foundations = __esm({
12534
12538
  init_styles();
12535
12539
  }
12536
12540
  });
12537
-
12538
- // src/theme/components/accordion.ts
12539
12541
  var helpers, config3, accordion_default;
12540
12542
  var init_accordion2 = __esm({
12541
12543
  "src/theme/components/accordion.ts"() {
@@ -12546,7 +12548,7 @@ var init_accordion2 = __esm({
12546
12548
  init_focus_utils();
12547
12549
  helpers = createMultiStyleConfigHelpers(accordionAnatomy.keys);
12548
12550
  config3 = helpers.defineMultiStyleConfig({
12549
- baseStyle: {
12551
+ baseStyle: (props) => ({
12550
12552
  container: {
12551
12553
  border: "none",
12552
12554
  borderRadius: "sm"
@@ -12558,7 +12560,7 @@ var init_accordion2 = __esm({
12558
12560
  borderRadius: "sm",
12559
12561
  display: "flex",
12560
12562
  justifyContent: "space-between",
12561
- color: "darkGrey",
12563
+ color: themeTools.mode("darkGrey", "white")(props),
12562
12564
  textAlign: "left",
12563
12565
  fontFamily: "body",
12564
12566
  fontWeight: "bold",
@@ -12570,7 +12572,7 @@ var init_accordion2 = __esm({
12570
12572
  },
12571
12573
  focus: {
12572
12574
  boxShadow: getBoxShadowString({
12573
- borderColor: "greenHaze",
12575
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
12574
12576
  borderWidth: 2
12575
12577
  })
12576
12578
  }
@@ -12587,23 +12589,26 @@ var init_accordion2 = __esm({
12587
12589
  icon: {
12588
12590
  fontSize: "1.25em"
12589
12591
  }
12590
- },
12592
+ }),
12591
12593
  variants: {
12592
- list: {
12594
+ list: (props) => ({
12593
12595
  button: {
12594
12596
  boxShadow: "none",
12595
12597
  _hover: {
12596
- backgroundColor: "seaMist"
12598
+ backgroundColor: themeTools.mode("seaMist", "pine")(props)
12597
12599
  },
12598
12600
  _active: {
12599
- backgroundColor: "mint"
12601
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
12600
12602
  }
12601
12603
  }
12602
- },
12603
- outline: {
12604
+ }),
12605
+ outline: (props) => ({
12604
12606
  container: {
12605
12607
  boxShadow: getBoxShadowString({
12606
- borderColor: colors.blackAlpha["400"]
12608
+ borderColor: themeTools.mode(
12609
+ colors.blackAlpha["400"],
12610
+ colors.whiteAlpha["400"]
12611
+ )(props)
12607
12612
  })
12608
12613
  },
12609
12614
  button: {
@@ -12612,23 +12617,24 @@ var init_accordion2 = __esm({
12612
12617
  },
12613
12618
  _hover: {
12614
12619
  boxShadow: getBoxShadowString({
12615
- borderColor: "darkGrey",
12620
+ borderColor: themeTools.mode("darkGrey", "white")(props),
12616
12621
  borderWidth: 2
12617
12622
  })
12618
12623
  },
12619
12624
  _active: {
12620
- backgroundColor: "mint",
12625
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props),
12621
12626
  boxShadow: getBoxShadowString({
12622
- borderColor: "darkGrey"
12627
+ borderColor: themeTools.mode("darkGrey", colors.whiteAlpha[400])(props)
12623
12628
  })
12624
12629
  }
12625
12630
  }
12626
- },
12627
- card: {
12631
+ }),
12632
+ card: (props) => ({
12628
12633
  container: {
12634
+ backgroundColor: themeTools.mode("white", "whiteAlpha.100")(props),
12629
12635
  boxShadow: getBoxShadowString({
12630
- baseShadow: "sm",
12631
- borderColor: "silver"
12636
+ baseShadow: themeTools.mode("sm", "none")(props),
12637
+ borderColor: themeTools.mode("silver", "whiteAlpha.400")(props)
12632
12638
  })
12633
12639
  },
12634
12640
  button: {
@@ -12636,20 +12642,30 @@ var init_accordion2 = __esm({
12636
12642
  borderBottomRadius: "none"
12637
12643
  },
12638
12644
  _hover: {
12639
- backgroundColor: "seaMist"
12645
+ backgroundColor: themeTools.mode("seaMist", "whiteAlpha.200")(props),
12646
+ boxShadow: getBoxShadowString({
12647
+ borderColor: themeTools.mode("darkGrey", "white")(props),
12648
+ borderWidth: 1
12649
+ })
12640
12650
  },
12641
12651
  _active: {
12642
- backgroundColor: "mint"
12652
+ backgroundColor: themeTools.mode("mint", "inherit")(props),
12653
+ boxShadow: getBoxShadowString({
12654
+ baseShadow: "none",
12655
+ borderWidth: 1,
12656
+ borderColor: themeTools.mode("darkGrey", "whiteAlpha.400")(props)
12657
+ })
12643
12658
  }
12644
12659
  }
12645
- }
12660
+ })
12646
12661
  },
12647
12662
  sizes: {
12648
12663
  sm: {
12649
12664
  button: {
12650
12665
  fontSize: ["mobile.xs", null, "desktop.xs"],
12651
12666
  paddingX: 2,
12652
- paddingY: 1
12667
+ paddingY: 1,
12668
+ minHeight: 6
12653
12669
  },
12654
12670
  panel: {
12655
12671
  fontSize: ["mobile.xs", null, "desktop.xs"],
@@ -12660,7 +12676,8 @@ var init_accordion2 = __esm({
12660
12676
  button: {
12661
12677
  fontSize: ["mobile.sm", null, "desktop.sm"],
12662
12678
  paddingX: 3,
12663
- paddingY: 1
12679
+ paddingY: 1,
12680
+ minHeight: 7
12664
12681
  },
12665
12682
  panel: {
12666
12683
  fontSize: ["mobile.sm", null, "desktop.sm"],
@@ -12671,7 +12688,8 @@ var init_accordion2 = __esm({
12671
12688
  button: {
12672
12689
  fontSize: ["mobile.sm", null, "desktop.sm"],
12673
12690
  paddingX: 3,
12674
- paddingY: 2
12691
+ paddingY: 2,
12692
+ minHeight: 8
12675
12693
  },
12676
12694
  panel: {
12677
12695
  fontSize: ["mobile.sm", null, "desktop.sm"],
@@ -12843,8 +12861,6 @@ var init_badge = __esm({
12843
12861
  };
12844
12862
  }
12845
12863
  });
12846
-
12847
- // src/theme/components/breadcrumb.ts
12848
12864
  var defineMultiStyleConfig27, definePartsStyle27, baseStyleLink2, baseStyle43, breadcrumb_default;
12849
12865
  var init_breadcrumb2 = __esm({
12850
12866
  "src/theme/components/breadcrumb.ts"() {
@@ -12852,7 +12868,7 @@ var init_breadcrumb2 = __esm({
12852
12868
  init_dist3();
12853
12869
  init_box_shadow_utils();
12854
12870
  ({ defineMultiStyleConfig: defineMultiStyleConfig27, definePartsStyle: definePartsStyle27 } = createMultiStyleConfigHelpers(breadcrumbAnatomy.keys));
12855
- baseStyleLink2 = defineStyle({
12871
+ baseStyleLink2 = defineStyle((props) => ({
12856
12872
  transitionProperty: "common",
12857
12873
  transitionDuration: "fast",
12858
12874
  transitionTimingFunction: "ease-out",
@@ -12865,26 +12881,29 @@ var init_breadcrumb2 = __esm({
12865
12881
  paddingX: 0.5,
12866
12882
  borderRadius: "xs",
12867
12883
  _hover: {
12868
- backgroundColor: "coralGreen"
12884
+ backgroundColor: themeTools.mode("seaMist", "pine")(props)
12869
12885
  },
12870
12886
  _focusVisible: {
12871
12887
  boxShadow: getBoxShadowString({
12872
- borderColor: "greenHaze",
12888
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
12873
12889
  borderWidth: 2
12874
- })
12890
+ }),
12891
+ notFocus: {
12892
+ notFocus: { boxShadow: "none" }
12893
+ }
12875
12894
  },
12876
12895
  _active: {
12877
- backgroundColor: "mint"
12896
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
12878
12897
  }
12879
12898
  }
12880
- });
12881
- baseStyle43 = definePartsStyle27({
12882
- link: baseStyleLink2,
12899
+ }));
12900
+ baseStyle43 = definePartsStyle27((props) => ({
12901
+ link: baseStyleLink2(props),
12883
12902
  list: {
12884
12903
  flexWrap: "wrap",
12885
12904
  alignItems: "flex-start"
12886
12905
  }
12887
- });
12906
+ }));
12888
12907
  breadcrumb_default = defineMultiStyleConfig27({
12889
12908
  baseStyle: baseStyle43
12890
12909
  });
@@ -12921,28 +12940,39 @@ var init_button2 = __esm({
12921
12940
  }
12922
12941
  },
12923
12942
  variants: {
12924
- control: {
12925
- backgroundColor: "darkTeal",
12926
- color: "white",
12943
+ control: (props) => ({
12944
+ backgroundColor: themeTools.mode("darkTeal", "mint")(props),
12945
+ color: themeTools.mode("white", "darkTeal")(props),
12927
12946
  ...focusVisible({
12928
12947
  focus: {
12929
- boxShadow: `inset 0 0 0 4px ${colors.darkTeal}, inset 0 0 0 6px currentColor`
12948
+ boxShadow: `inset 0 0 0 4px ${themeTools.mode(
12949
+ colors.darkTeal,
12950
+ colors.seaMist
12951
+ )(props)}, inset 0 0 0 6px currentColor`
12930
12952
  },
12931
12953
  notFocus: { boxShadow: "none" }
12932
12954
  }),
12933
12955
  _hover: {
12934
- backgroundColor: "night"
12956
+ backgroundColor: themeTools.mode("night", "coralGreen")(props)
12935
12957
  },
12936
12958
  _active: {
12937
- backgroundColor: "pine"
12959
+ backgroundColor: themeTools.mode("pine", "white")(props)
12938
12960
  }
12939
- },
12940
- primary: {
12961
+ }),
12962
+ primary: (props) => ({
12963
+ // FIXME: Update to use a global defined background color for darkMode whenever it is available.
12964
+ // hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
12941
12965
  backgroundColor: "primaryGreen",
12942
12966
  color: "white",
12943
12967
  ...focusVisible({
12944
12968
  focus: {
12945
- boxShadow: `inset 0 0 0 4px ${colors.primaryGreen}, inset 0 0 0 4px ${colors.primaryGreen}, inset 0 0 0 6px currentColor`
12969
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
12970
+ colors.greenHaze,
12971
+ colors.azure
12972
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
12973
+ colors.white,
12974
+ colors.darkGrey
12975
+ )(props)}`
12946
12976
  },
12947
12977
  notFocus: { boxShadow: "none" }
12948
12978
  }),
@@ -12952,25 +12982,61 @@ var init_button2 = __esm({
12952
12982
  _active: {
12953
12983
  backgroundColor: "azure"
12954
12984
  }
12955
- },
12956
- secondary: {
12957
- backgroundColor: "coralGreen",
12958
- color: "darkTeal",
12985
+ }),
12986
+ secondary: (props) => ({
12987
+ // FIXME: Update to use global defined background color for darkMode whenever it is available instead of alpha
12988
+ backgroundColor: themeTools.mode("seaMist", "whiteAlpha.100")(props),
12989
+ color: themeTools.mode("darkTeal", "white")(props),
12990
+ // order is important here for now while we do not have global defined background color for darkMode
12991
+ _hover: {
12992
+ backgroundColor: themeTools.mode("coralGreen", "whiteAlpha.200")(props)
12993
+ },
12959
12994
  ...focusVisible({
12960
12995
  focus: {
12961
- boxShadow: `inset 0 0 0 4px ${colors.coralGreen}, inset 0 0 0 4px ${colors.coralGreen}, inset 0 0 0 6px currentColor`
12996
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
12997
+ colors.greenHaze,
12998
+ colors.azure
12999
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
13000
+ colors.white,
13001
+ colors.blackAlpha[300]
13002
+ )(props)}`,
13003
+ _hover: {
13004
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
13005
+ colors.greenHaze,
13006
+ colors.azure
13007
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
13008
+ colors.white,
13009
+ colors.blackAlpha[500]
13010
+ )(props)}`
13011
+ }
12962
13012
  },
12963
13013
  notFocus: {
12964
13014
  boxShadow: "none"
12965
13015
  }
12966
13016
  }),
12967
- _hover: {
12968
- backgroundColor: "blueGreen"
12969
- },
12970
13017
  _active: {
12971
- backgroundColor: "mint"
13018
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.300")(props),
13019
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
13020
+ colors.greenHaze,
13021
+ colors.azure
13022
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
13023
+ colors.white,
13024
+ colors.blackAlpha[600]
13025
+ )(props)}`,
13026
+ _hover: {
13027
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
13028
+ colors.greenHaze,
13029
+ colors.azure
13030
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
13031
+ colors.white,
13032
+ colors.blackAlpha[600]
13033
+ )(props)}`
13034
+ }
12972
13035
  }
12973
- },
13036
+ }),
13037
+ /**
13038
+ * @deprecated use `secondary` instead.
13039
+ */
12974
13040
  tertiary: {
12975
13041
  backgroundColor: "mint",
12976
13042
  color: "darkGrey",
@@ -12999,7 +13065,7 @@ var init_button2 = __esm({
12999
13065
  ...focusVisible({
13000
13066
  focus: {
13001
13067
  boxShadow: getBoxShadowString({
13002
- borderWidth: 3,
13068
+ borderWidth: 2,
13003
13069
  borderColor: "greenHaze"
13004
13070
  })
13005
13071
  },
@@ -13530,37 +13596,49 @@ var parts3, helpers5, config10, choice_chip_default;
13530
13596
  var init_choice_chip = __esm({
13531
13597
  "src/theme/components/choice-chip.ts"() {
13532
13598
  init_box_shadow_utils();
13599
+ init_foundations();
13533
13600
  parts3 = themeTools.anatomy("choice-chip").parts("container", "icon", "label");
13534
13601
  helpers5 = react.createMultiStyleConfigHelpers(parts3.keys);
13535
13602
  config10 = helpers5.defineMultiStyleConfig({
13536
13603
  baseStyle: (props) => ({
13537
13604
  container: {
13538
- backgroundColor: "white",
13605
+ backgroundColor: themeTools.mode("white", "transparent")(props),
13539
13606
  boxShadow: getBoxShadowString({ borderColor: "celadon" }),
13540
- color: "darkTeal",
13607
+ color: themeTools.mode("darkTeal", "white")(props),
13541
13608
  display: "inline-flex",
13542
13609
  alignItems: "center",
13543
13610
  fontSize: "16px",
13544
13611
  px: 1,
13545
13612
  _checked: {
13546
- background: "seaMist",
13613
+ color: "white",
13614
+ background: "pine",
13547
13615
  boxShadow: getBoxShadowString({ borderColor: "celadon" })
13548
13616
  },
13549
13617
  "input:focus-visible + &": {
13550
- boxShadow: getBoxShadowString({
13551
- borderColor: "greenHaze",
13552
- borderWidth: 2
13553
- })
13618
+ boxShadow: `inset 0 0 0 2px ${themeTools.mode(
13619
+ colors.greenHaze,
13620
+ colors.azure
13621
+ )(props)}, inset 0 0 0 4px ${themeTools.mode(
13622
+ colors.white,
13623
+ colors.darkGrey
13624
+ )(props)}`
13554
13625
  },
13555
13626
  "@media (hover:hover)": {
13556
13627
  _hover: {
13628
+ color: themeTools.mode("darkTeal", "white")(props),
13557
13629
  boxShadow: getBoxShadowString({
13558
13630
  borderColor: "greenHaze",
13559
13631
  borderWidth: 2
13560
13632
  }),
13561
- background: "mint",
13633
+ background: themeTools.mode("coralGreen", "whiteAlpha.200")(props),
13562
13634
  cursor: "pointer"
13563
13635
  }
13636
+ },
13637
+ _active: {
13638
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.300")(props),
13639
+ boxShadow: getBoxShadowString({
13640
+ borderColor: "pine"
13641
+ })
13564
13642
  }
13565
13643
  },
13566
13644
  icon: {
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-D2XVZVE6.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-TMLJPE4H.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "3.7.3",
3
+ "version": "3.7.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -28,6 +28,7 @@ export type ButtonProps = Exclude<
28
28
  | "control"
29
29
  | "primary"
30
30
  | "secondary"
31
+ /** @deprecated Use `secondary` instead */
31
32
  | "tertiary"
32
33
  | "additional"
33
34
  | "ghost"