@vygruppen/spor-react 5.3.0 → 5.4.0

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@5.3.0 build
2
+ > @vygruppen/spor-react@5.4.0 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,15 +8,15 @@
8
8
  CLI Target: node16
9
9
  CJS Build start
10
10
  ESM Build start
11
+ "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-S2IJI3LY.mjs".
11
12
  "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/index.js".
12
13
  DTS Build start
13
- "Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-55HLEY3T.mjs".
14
- CJS dist/index.js 507.32 KB
15
- CJS ⚡️ Build success in 2031ms
16
14
  ESM dist/index.mjs 2.16 KB
17
- ESM dist/CountryCodeSelect-BITN7VNA.mjs 1.19 KB
18
- ESM dist/chunk-55HLEY3T.mjs 397.85 KB
19
- ESM ⚡️ Build success in 2033ms
20
- DTS ⚡️ Build success in 12838ms
21
- DTS dist/index.d.ts 265.02 KB
22
- DTS dist/index.d.mts 265.02 KB
15
+ ESM dist/CountryCodeSelect-HHNSD6TX.mjs 1.19 KB
16
+ ESM dist/chunk-S2IJI3LY.mjs 397.83 KB
17
+ ESM ⚡️ Build success in 2102ms
18
+ CJS dist/index.js 507.24 KB
19
+ CJS ⚡️ Build success in 2103ms
20
+ DTS ⚡️ Build success in 12028ms
21
+ DTS dist/index.d.ts 265.18 KB
22
+ DTS dist/index.d.mts 265.18 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 5.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3781bb2: CardSelect: added dark mode update and new prop for background also changed outline to base and card to float in variants
8
+
3
9
  ## 5.3.0
4
10
 
5
11
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-55HLEY3T.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-S2IJI3LY.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -2523,7 +2523,10 @@ var CardSelect = forwardRef(
2523
2523
  triggerRef
2524
2524
  );
2525
2525
  const { buttonProps } = useButton(triggerProps, triggerRef);
2526
- const styles3 = useMultiStyleConfig("CardSelect", { variant, size: size2 });
2526
+ const styles3 = useMultiStyleConfig("CardSelect", {
2527
+ variant,
2528
+ size: size2
2529
+ });
2527
2530
  useForceRerender(state2.isOpen);
2528
2531
  const ChevronIcon = size2 === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
2529
2532
  return /* @__PURE__ */ React69__default.createElement(Box, { ...props }, /* @__PURE__ */ React69__default.createElement(
@@ -3423,7 +3426,7 @@ var texts14 = createTexts({
3423
3426
  sv: "Telefonnummer"
3424
3427
  }
3425
3428
  });
3426
- var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-BITN7VNA.mjs'));
3429
+ var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-HHNSD6TX.mjs'));
3427
3430
  var Radio = forwardRef((props, ref) => {
3428
3431
  return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
3429
3432
  });
@@ -10470,6 +10473,92 @@ var getColorSchemeActiveProps = (props) => {
10470
10473
  };
10471
10474
  }
10472
10475
  };
10476
+ function baseBackground(state2, props) {
10477
+ switch (state2) {
10478
+ case "active":
10479
+ return {
10480
+ backgroundColor: mode("mint", "whiteAlpha.100")(props)
10481
+ };
10482
+ case "selected":
10483
+ return {
10484
+ backgroundColor: mode("pine", "coralGreen")(props)
10485
+ };
10486
+ case "disabled":
10487
+ return {
10488
+ backgroundColor: mode("silver", "whiteAlpha.100")(props)
10489
+ };
10490
+ default:
10491
+ return {
10492
+ backgroundColor: "transparent"
10493
+ };
10494
+ }
10495
+ }
10496
+ function ghostBackground(state2, props) {
10497
+ switch (state2) {
10498
+ case "hover": {
10499
+ return {
10500
+ backgroundColor: mode("seaMist", "whiteAlpha.100")(props)
10501
+ };
10502
+ }
10503
+ case "active":
10504
+ return {
10505
+ backgroundColor: mode("seaMist", "whiteAlpha.200")(props)
10506
+ };
10507
+ case "focus":
10508
+ return {
10509
+ backgroundColor: "transparent"
10510
+ };
10511
+ case "selected": {
10512
+ return {
10513
+ backgroundColor: mode("mint", "whiteAlpha.200")(props)
10514
+ };
10515
+ }
10516
+ case "default":
10517
+ default:
10518
+ return {
10519
+ backgroundColor: "transparent"
10520
+ };
10521
+ }
10522
+ }
10523
+ function floatingBackground(state2, props) {
10524
+ switch (state2) {
10525
+ case "selected":
10526
+ return {
10527
+ backgroundColor: mode("mint", "pine")(props)
10528
+ };
10529
+ case "active":
10530
+ return {
10531
+ backgroundColor: mode(
10532
+ "mint",
10533
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 30%)`
10534
+ )(props)
10535
+ };
10536
+ case "hover":
10537
+ return {
10538
+ backgroundColor: mode(
10539
+ "white",
10540
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 20%)`
10541
+ )(props)
10542
+ };
10543
+ case "focus":
10544
+ return {
10545
+ backgroundColor: mode(
10546
+ "white",
10547
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 40%)`
10548
+ )(props)
10549
+ };
10550
+ case "default":
10551
+ default:
10552
+ return {
10553
+ backgroundColor: mode(
10554
+ "white",
10555
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 10%)`
10556
+ )(props)
10557
+ };
10558
+ }
10559
+ }
10560
+
10561
+ // src/theme/components/card-select.ts
10473
10562
  var parts2 = anatomy("card-select").parts("trigger", "card");
10474
10563
  var helpers3 = createMultiStyleConfigHelpers(parts2.keys);
10475
10564
  var config8 = helpers3.defineMultiStyleConfig({
@@ -10478,9 +10567,6 @@ var config8 = helpers3.defineMultiStyleConfig({
10478
10567
  appearance: "none",
10479
10568
  display: "flex",
10480
10569
  alignItems: "center",
10481
- _expanded: {
10482
- backgroundColor: mode("mint", "night")(props)
10483
- },
10484
10570
  ...focusVisible({
10485
10571
  notFocus: {},
10486
10572
  focus: {
@@ -10495,21 +10581,12 @@ var config8 = helpers3.defineMultiStyleConfig({
10495
10581
  card: {
10496
10582
  borderRadius: "sm",
10497
10583
  boxShadow: "md",
10498
- padding: 3
10584
+ padding: 3,
10585
+ color: mode("darkGrey", "white")(props)
10499
10586
  }
10500
10587
  }),
10501
10588
  variants: {
10502
- ghost: (props) => ({
10503
- trigger: {
10504
- _hover: {
10505
- backgroundColor: mode("seaMist", "pine")(props)
10506
- },
10507
- _active: {
10508
- backgroundColor: mode("mint", "whiteAlpha.200")(props)
10509
- }
10510
- }
10511
- }),
10512
- outline: (props) => ({
10589
+ base: (props) => ({
10513
10590
  trigger: {
10514
10591
  boxShadow: getBoxShadowString({
10515
10592
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
@@ -10531,19 +10608,20 @@ var config8 = helpers3.defineMultiStyleConfig({
10531
10608
  })
10532
10609
  },
10533
10610
  _active: {
10534
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
10611
+ ...baseBackground("active", props),
10535
10612
  boxShadow: getBoxShadowString({
10536
10613
  borderColor: mode("darkGrey", "whiteAlpha.400")(props),
10537
10614
  borderWidth: 1
10538
10615
  })
10539
10616
  },
10540
10617
  _expanded: {
10618
+ ...baseBackground("active", props),
10541
10619
  _hover: {
10542
- backgroundColor: mode("seaMist", "todo")(props),
10620
+ ...baseBackground("active", props),
10543
10621
  boxShadow: "none"
10544
10622
  },
10545
10623
  _active: {
10546
- backgroundColor: mode("mint", "todo")(props),
10624
+ ...baseBackground("active", props),
10547
10625
  boxShadow: getBoxShadowString({
10548
10626
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
10549
10627
  borderWidth: 1
@@ -10552,13 +10630,26 @@ var config8 = helpers3.defineMultiStyleConfig({
10552
10630
  }
10553
10631
  }
10554
10632
  }),
10555
- card: (props) => ({
10633
+ ghost: (props) => ({
10634
+ trigger: {
10635
+ _hover: {
10636
+ ...ghostBackground("hover", props)
10637
+ },
10638
+ _active: {
10639
+ ...ghostBackground("active", props)
10640
+ },
10641
+ _expanded: {
10642
+ ...ghostBackground("selected", props)
10643
+ }
10644
+ }
10645
+ }),
10646
+ floating: (props) => ({
10556
10647
  trigger: {
10557
- backgroundColor: mode("transparent", "whiteAlpha.100")(props),
10648
+ ...floatingBackground("default", props),
10558
10649
  boxShadow: "sm",
10559
10650
  transition: "all .1s ease-out",
10560
10651
  _hover: {
10561
- backgroundColor: mode("seaMist", "pine")(props),
10652
+ ...floatingBackground("hover", props),
10562
10653
  boxShadow: getBoxShadowString({
10563
10654
  borderColor: mode("silver", "whiteAlpha.400")(props),
10564
10655
  borderWidth: 1,
@@ -10566,7 +10657,7 @@ var config8 = helpers3.defineMultiStyleConfig({
10566
10657
  })
10567
10658
  },
10568
10659
  _active: {
10569
- backgroundColor: mode("mint", "whiteAlpha.100")(props),
10660
+ ...floatingBackground("active", props),
10570
10661
  boxShadow: getBoxShadowString({
10571
10662
  borderColor: mode("silver", "whiteAlpha.400")(props),
10572
10663
  borderWidth: mode(0, 1)(props),
@@ -10574,6 +10665,7 @@ var config8 = helpers3.defineMultiStyleConfig({
10574
10665
  })
10575
10666
  },
10576
10667
  _expanded: {
10668
+ ...floatingBackground("active", props),
10577
10669
  _hover: {
10578
10670
  boxShadow: getBoxShadowString({
10579
10671
  borderColor: "darkGrey",
@@ -10581,7 +10673,7 @@ var config8 = helpers3.defineMultiStyleConfig({
10581
10673
  })
10582
10674
  },
10583
10675
  _active: {
10584
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
10676
+ ...floatingBackground("active", props),
10585
10677
  boxShadow: "none"
10586
10678
  }
10587
10679
  }
@@ -11615,90 +11707,6 @@ function floatingBorder(state2, props) {
11615
11707
  };
11616
11708
  }
11617
11709
  }
11618
- function baseBackground(state2, props) {
11619
- switch (state2) {
11620
- case "active":
11621
- return {
11622
- backgroundColor: mode("mint", "whiteAlpha.100")(props)
11623
- };
11624
- case "selected":
11625
- return {
11626
- backgroundColor: "pine"
11627
- };
11628
- case "disabled":
11629
- return {
11630
- backgroundColor: mode("silver", "whiteAlpha.100")(props)
11631
- };
11632
- default:
11633
- return {
11634
- backgroundColor: "transparent"
11635
- };
11636
- }
11637
- }
11638
- function ghostBackground(state2, props) {
11639
- switch (state2) {
11640
- case "hover": {
11641
- return {
11642
- backgroundColor: mode("seaMist", "whiteAlpha.100")(props)
11643
- };
11644
- }
11645
- case "active":
11646
- return {
11647
- backgroundColor: mode("seaMist", "whiteAlpha.200")(props)
11648
- };
11649
- case "focus":
11650
- return {
11651
- backgroundColor: "transparent"
11652
- };
11653
- case "selected": {
11654
- return {
11655
- backgroundColor: mode("mint", "whiteAlpha.200")(props)
11656
- };
11657
- }
11658
- case "default":
11659
- default:
11660
- return {
11661
- backgroundColor: "transparent"
11662
- };
11663
- }
11664
- }
11665
- function floatingBackground(state2, props) {
11666
- switch (state2) {
11667
- case "selected":
11668
- return {
11669
- backgroundColor: mode("mint", "pine")(props)
11670
- };
11671
- case "active":
11672
- return {
11673
- backgroundColor: mode(
11674
- "mint",
11675
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 30%)`
11676
- )(props)
11677
- };
11678
- case "hover":
11679
- return {
11680
- backgroundColor: mode(
11681
- "white",
11682
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 20%)`
11683
- )(props)
11684
- };
11685
- case "focus":
11686
- return {
11687
- backgroundColor: mode(
11688
- "white",
11689
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 40%)`
11690
- )(props)
11691
- };
11692
- case "default":
11693
- default:
11694
- return {
11695
- backgroundColor: mode(
11696
- "white",
11697
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 10%)`
11698
- )(props)
11699
- };
11700
- }
11701
- }
11702
11710
 
11703
11711
  // src/theme/components/info-select.ts
11704
11712
  var parts6 = anatomy("InfoSelect").parts(
package/dist/index.d.mts CHANGED
@@ -686,6 +686,7 @@ type CardSelectProps = BoxProps & {
686
686
  * ```
687
687
  *
688
688
  * @see https://spor.vy.no/components/card-select
689
+ *
689
690
  */
690
691
  declare const CardSelect: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", CardSelectProps>;
691
692
 
@@ -2538,14 +2539,12 @@ declare const theme: {
2538
2539
  appearance: string;
2539
2540
  display: string;
2540
2541
  alignItems: string;
2541
- _expanded: {
2542
- backgroundColor: string;
2543
- };
2544
2542
  };
2545
2543
  card: {
2546
2544
  borderRadius: string;
2547
2545
  boxShadow: string;
2548
2546
  padding: number;
2547
+ color: string;
2549
2548
  };
2550
2549
  }) | undefined;
2551
2550
  sizes?: {
@@ -2578,34 +2577,25 @@ declare const theme: {
2578
2577
  };
2579
2578
  } | undefined;
2580
2579
  variants?: {
2581
- ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2582
- trigger: {
2583
- _hover: {
2584
- backgroundColor: string;
2585
- };
2586
- _active: {
2587
- backgroundColor: string;
2588
- };
2589
- };
2590
- };
2591
- outline: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2580
+ base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2592
2581
  trigger: {
2593
2582
  _hover: {
2594
2583
  boxShadow: string;
2595
2584
  };
2596
2585
  _active: {
2597
- backgroundColor: string;
2598
2586
  boxShadow: string;
2587
+ backgroundColor: string;
2599
2588
  };
2600
2589
  _expanded: {
2601
2590
  _hover: {
2602
- backgroundColor: string;
2603
2591
  boxShadow: string;
2592
+ backgroundColor: string;
2604
2593
  };
2605
2594
  _active: {
2606
- backgroundColor: string;
2607
2595
  boxShadow: string;
2596
+ backgroundColor: string;
2608
2597
  };
2598
+ backgroundColor: string;
2609
2599
  };
2610
2600
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2611
2601
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -2613,34 +2603,48 @@ declare const theme: {
2613
2603
  boxShadow: string;
2614
2604
  };
2615
2605
  };
2616
- card: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2606
+ ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2607
+ trigger: {
2608
+ _hover: {
2609
+ backgroundColor: string;
2610
+ };
2611
+ _active: {
2612
+ backgroundColor: string;
2613
+ };
2614
+ _expanded: {
2615
+ backgroundColor: string;
2616
+ };
2617
+ };
2618
+ };
2619
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2617
2620
  trigger: {
2618
- backgroundColor: string;
2619
2621
  boxShadow: string;
2620
2622
  transition: string;
2621
2623
  _hover: {
2622
- backgroundColor: string;
2623
2624
  boxShadow: string;
2625
+ backgroundColor: string;
2624
2626
  };
2625
2627
  _active: {
2626
- backgroundColor: string;
2627
2628
  boxShadow: string;
2629
+ backgroundColor: string;
2628
2630
  };
2629
2631
  _expanded: {
2630
2632
  _hover: {
2631
2633
  boxShadow: string;
2632
2634
  };
2633
2635
  _active: {
2634
- backgroundColor: string;
2635
2636
  boxShadow: string;
2637
+ backgroundColor: string;
2636
2638
  };
2639
+ backgroundColor: string;
2637
2640
  };
2641
+ backgroundColor: string;
2638
2642
  };
2639
2643
  };
2640
2644
  } | undefined;
2641
2645
  defaultProps?: {
2642
2646
  size?: "sm" | "md" | "lg" | undefined;
2643
- variant?: "outline" | "card" | "ghost" | undefined;
2647
+ variant?: "base" | "ghost" | "floating" | undefined;
2644
2648
  colorScheme?: string | undefined;
2645
2649
  } | undefined;
2646
2650
  parts: ("card" | "trigger")[];
package/dist/index.d.ts CHANGED
@@ -686,6 +686,7 @@ type CardSelectProps = BoxProps & {
686
686
  * ```
687
687
  *
688
688
  * @see https://spor.vy.no/components/card-select
689
+ *
689
690
  */
690
691
  declare const CardSelect: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", CardSelectProps>;
691
692
 
@@ -2538,14 +2539,12 @@ declare const theme: {
2538
2539
  appearance: string;
2539
2540
  display: string;
2540
2541
  alignItems: string;
2541
- _expanded: {
2542
- backgroundColor: string;
2543
- };
2544
2542
  };
2545
2543
  card: {
2546
2544
  borderRadius: string;
2547
2545
  boxShadow: string;
2548
2546
  padding: number;
2547
+ color: string;
2549
2548
  };
2550
2549
  }) | undefined;
2551
2550
  sizes?: {
@@ -2578,34 +2577,25 @@ declare const theme: {
2578
2577
  };
2579
2578
  } | undefined;
2580
2579
  variants?: {
2581
- ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2582
- trigger: {
2583
- _hover: {
2584
- backgroundColor: string;
2585
- };
2586
- _active: {
2587
- backgroundColor: string;
2588
- };
2589
- };
2590
- };
2591
- outline: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2580
+ base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2592
2581
  trigger: {
2593
2582
  _hover: {
2594
2583
  boxShadow: string;
2595
2584
  };
2596
2585
  _active: {
2597
- backgroundColor: string;
2598
2586
  boxShadow: string;
2587
+ backgroundColor: string;
2599
2588
  };
2600
2589
  _expanded: {
2601
2590
  _hover: {
2602
- backgroundColor: string;
2603
2591
  boxShadow: string;
2592
+ backgroundColor: string;
2604
2593
  };
2605
2594
  _active: {
2606
- backgroundColor: string;
2607
2595
  boxShadow: string;
2596
+ backgroundColor: string;
2608
2597
  };
2598
+ backgroundColor: string;
2609
2599
  };
2610
2600
  _focus: _chakra_ui_styled_system.SystemStyleObject;
2611
2601
  _focusVisible: _chakra_ui_styled_system.SystemStyleObject;
@@ -2613,34 +2603,48 @@ declare const theme: {
2613
2603
  boxShadow: string;
2614
2604
  };
2615
2605
  };
2616
- card: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2606
+ ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2607
+ trigger: {
2608
+ _hover: {
2609
+ backgroundColor: string;
2610
+ };
2611
+ _active: {
2612
+ backgroundColor: string;
2613
+ };
2614
+ _expanded: {
2615
+ backgroundColor: string;
2616
+ };
2617
+ };
2618
+ };
2619
+ floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
2617
2620
  trigger: {
2618
- backgroundColor: string;
2619
2621
  boxShadow: string;
2620
2622
  transition: string;
2621
2623
  _hover: {
2622
- backgroundColor: string;
2623
2624
  boxShadow: string;
2625
+ backgroundColor: string;
2624
2626
  };
2625
2627
  _active: {
2626
- backgroundColor: string;
2627
2628
  boxShadow: string;
2629
+ backgroundColor: string;
2628
2630
  };
2629
2631
  _expanded: {
2630
2632
  _hover: {
2631
2633
  boxShadow: string;
2632
2634
  };
2633
2635
  _active: {
2634
- backgroundColor: string;
2635
2636
  boxShadow: string;
2637
+ backgroundColor: string;
2636
2638
  };
2639
+ backgroundColor: string;
2637
2640
  };
2641
+ backgroundColor: string;
2638
2642
  };
2639
2643
  };
2640
2644
  } | undefined;
2641
2645
  defaultProps?: {
2642
2646
  size?: "sm" | "md" | "lg" | undefined;
2643
- variant?: "outline" | "card" | "ghost" | undefined;
2647
+ variant?: "base" | "ghost" | "floating" | undefined;
2644
2648
  colorScheme?: string | undefined;
2645
2649
  } | undefined;
2646
2650
  parts: ("card" | "trigger")[];
package/dist/index.js CHANGED
@@ -2269,7 +2269,10 @@ var init_CardSelect = __esm({
2269
2269
  triggerRef
2270
2270
  );
2271
2271
  const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
2272
- const styles3 = react.useMultiStyleConfig("CardSelect", { variant, size: size2 });
2272
+ const styles3 = react.useMultiStyleConfig("CardSelect", {
2273
+ variant,
2274
+ size: size2
2275
+ });
2273
2276
  useForceRerender(state2.isOpen);
2274
2277
  const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
2275
2278
  return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(
@@ -11925,6 +11928,95 @@ var init_card2 = __esm({
11925
11928
  };
11926
11929
  }
11927
11930
  });
11931
+ function baseBackground(state2, props) {
11932
+ switch (state2) {
11933
+ case "active":
11934
+ return {
11935
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props)
11936
+ };
11937
+ case "selected":
11938
+ return {
11939
+ backgroundColor: themeTools.mode("pine", "coralGreen")(props)
11940
+ };
11941
+ case "disabled":
11942
+ return {
11943
+ backgroundColor: themeTools.mode("silver", "whiteAlpha.100")(props)
11944
+ };
11945
+ default:
11946
+ return {
11947
+ backgroundColor: "transparent"
11948
+ };
11949
+ }
11950
+ }
11951
+ function ghostBackground(state2, props) {
11952
+ switch (state2) {
11953
+ case "hover": {
11954
+ return {
11955
+ backgroundColor: themeTools.mode("seaMist", "whiteAlpha.100")(props)
11956
+ };
11957
+ }
11958
+ case "active":
11959
+ return {
11960
+ backgroundColor: themeTools.mode("seaMist", "whiteAlpha.200")(props)
11961
+ };
11962
+ case "focus":
11963
+ return {
11964
+ backgroundColor: "transparent"
11965
+ };
11966
+ case "selected": {
11967
+ return {
11968
+ backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
11969
+ };
11970
+ }
11971
+ case "default":
11972
+ default:
11973
+ return {
11974
+ backgroundColor: "transparent"
11975
+ };
11976
+ }
11977
+ }
11978
+ function floatingBackground(state2, props) {
11979
+ switch (state2) {
11980
+ case "selected":
11981
+ return {
11982
+ backgroundColor: themeTools.mode("mint", "pine")(props)
11983
+ };
11984
+ case "active":
11985
+ return {
11986
+ backgroundColor: themeTools.mode(
11987
+ "mint",
11988
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 30%)`
11989
+ )(props)
11990
+ };
11991
+ case "hover":
11992
+ return {
11993
+ backgroundColor: themeTools.mode(
11994
+ "white",
11995
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 20%)`
11996
+ )(props)
11997
+ };
11998
+ case "focus":
11999
+ return {
12000
+ backgroundColor: themeTools.mode(
12001
+ "white",
12002
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 40%)`
12003
+ )(props)
12004
+ };
12005
+ case "default":
12006
+ default:
12007
+ return {
12008
+ backgroundColor: themeTools.mode(
12009
+ "white",
12010
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 10%)`
12011
+ )(props)
12012
+ };
12013
+ }
12014
+ }
12015
+ var init_background_utils = __esm({
12016
+ "src/theme/utils/background-utils.ts"() {
12017
+ init_foundations();
12018
+ }
12019
+ });
11928
12020
  var parts2, helpers3, config8, card_select_default;
11929
12021
  var init_card_select = __esm({
11930
12022
  "src/theme/components/card-select.ts"() {
@@ -11932,6 +12024,7 @@ var init_card_select = __esm({
11932
12024
  init_dist3();
11933
12025
  init_box_shadow_utils();
11934
12026
  init_focus_utils();
12027
+ init_background_utils();
11935
12028
  parts2 = anatomy("card-select").parts("trigger", "card");
11936
12029
  helpers3 = createMultiStyleConfigHelpers(parts2.keys);
11937
12030
  config8 = helpers3.defineMultiStyleConfig({
@@ -11940,9 +12033,6 @@ var init_card_select = __esm({
11940
12033
  appearance: "none",
11941
12034
  display: "flex",
11942
12035
  alignItems: "center",
11943
- _expanded: {
11944
- backgroundColor: themeTools.mode("mint", "night")(props)
11945
- },
11946
12036
  ...focusVisible({
11947
12037
  notFocus: {},
11948
12038
  focus: {
@@ -11957,21 +12047,12 @@ var init_card_select = __esm({
11957
12047
  card: {
11958
12048
  borderRadius: "sm",
11959
12049
  boxShadow: "md",
11960
- padding: 3
12050
+ padding: 3,
12051
+ color: themeTools.mode("darkGrey", "white")(props)
11961
12052
  }
11962
12053
  }),
11963
12054
  variants: {
11964
- ghost: (props) => ({
11965
- trigger: {
11966
- _hover: {
11967
- backgroundColor: themeTools.mode("seaMist", "pine")(props)
11968
- },
11969
- _active: {
11970
- backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
11971
- }
11972
- }
11973
- }),
11974
- outline: (props) => ({
12055
+ base: (props) => ({
11975
12056
  trigger: {
11976
12057
  boxShadow: getBoxShadowString({
11977
12058
  borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
@@ -11993,19 +12074,20 @@ var init_card_select = __esm({
11993
12074
  })
11994
12075
  },
11995
12076
  _active: {
11996
- backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props),
12077
+ ...baseBackground("active", props),
11997
12078
  boxShadow: getBoxShadowString({
11998
12079
  borderColor: themeTools.mode("darkGrey", "whiteAlpha.400")(props),
11999
12080
  borderWidth: 1
12000
12081
  })
12001
12082
  },
12002
12083
  _expanded: {
12084
+ ...baseBackground("active", props),
12003
12085
  _hover: {
12004
- backgroundColor: themeTools.mode("seaMist", "todo")(props),
12086
+ ...baseBackground("active", props),
12005
12087
  boxShadow: "none"
12006
12088
  },
12007
12089
  _active: {
12008
- backgroundColor: themeTools.mode("mint", "todo")(props),
12090
+ ...baseBackground("active", props),
12009
12091
  boxShadow: getBoxShadowString({
12010
12092
  borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props),
12011
12093
  borderWidth: 1
@@ -12014,13 +12096,26 @@ var init_card_select = __esm({
12014
12096
  }
12015
12097
  }
12016
12098
  }),
12017
- card: (props) => ({
12099
+ ghost: (props) => ({
12018
12100
  trigger: {
12019
- backgroundColor: themeTools.mode("transparent", "whiteAlpha.100")(props),
12101
+ _hover: {
12102
+ ...ghostBackground("hover", props)
12103
+ },
12104
+ _active: {
12105
+ ...ghostBackground("active", props)
12106
+ },
12107
+ _expanded: {
12108
+ ...ghostBackground("selected", props)
12109
+ }
12110
+ }
12111
+ }),
12112
+ floating: (props) => ({
12113
+ trigger: {
12114
+ ...floatingBackground("default", props),
12020
12115
  boxShadow: "sm",
12021
12116
  transition: "all .1s ease-out",
12022
12117
  _hover: {
12023
- backgroundColor: themeTools.mode("seaMist", "pine")(props),
12118
+ ...floatingBackground("hover", props),
12024
12119
  boxShadow: getBoxShadowString({
12025
12120
  borderColor: themeTools.mode("silver", "whiteAlpha.400")(props),
12026
12121
  borderWidth: 1,
@@ -12028,7 +12123,7 @@ var init_card_select = __esm({
12028
12123
  })
12029
12124
  },
12030
12125
  _active: {
12031
- backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props),
12126
+ ...floatingBackground("active", props),
12032
12127
  boxShadow: getBoxShadowString({
12033
12128
  borderColor: themeTools.mode("silver", "whiteAlpha.400")(props),
12034
12129
  borderWidth: themeTools.mode(0, 1)(props),
@@ -12036,6 +12131,7 @@ var init_card_select = __esm({
12036
12131
  })
12037
12132
  },
12038
12133
  _expanded: {
12134
+ ...floatingBackground("active", props),
12039
12135
  _hover: {
12040
12136
  boxShadow: getBoxShadowString({
12041
12137
  borderColor: "darkGrey",
@@ -12043,7 +12139,7 @@ var init_card_select = __esm({
12043
12139
  })
12044
12140
  },
12045
12141
  _active: {
12046
- backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props),
12142
+ ...floatingBackground("active", props),
12047
12143
  boxShadow: "none"
12048
12144
  }
12049
12145
  }
@@ -13153,95 +13249,6 @@ var init_border_utils = __esm({
13153
13249
  init_box_shadow_utils();
13154
13250
  }
13155
13251
  });
13156
- function baseBackground(state2, props) {
13157
- switch (state2) {
13158
- case "active":
13159
- return {
13160
- backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props)
13161
- };
13162
- case "selected":
13163
- return {
13164
- backgroundColor: "pine"
13165
- };
13166
- case "disabled":
13167
- return {
13168
- backgroundColor: themeTools.mode("silver", "whiteAlpha.100")(props)
13169
- };
13170
- default:
13171
- return {
13172
- backgroundColor: "transparent"
13173
- };
13174
- }
13175
- }
13176
- function ghostBackground(state2, props) {
13177
- switch (state2) {
13178
- case "hover": {
13179
- return {
13180
- backgroundColor: themeTools.mode("seaMist", "whiteAlpha.100")(props)
13181
- };
13182
- }
13183
- case "active":
13184
- return {
13185
- backgroundColor: themeTools.mode("seaMist", "whiteAlpha.200")(props)
13186
- };
13187
- case "focus":
13188
- return {
13189
- backgroundColor: "transparent"
13190
- };
13191
- case "selected": {
13192
- return {
13193
- backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
13194
- };
13195
- }
13196
- case "default":
13197
- default:
13198
- return {
13199
- backgroundColor: "transparent"
13200
- };
13201
- }
13202
- }
13203
- function floatingBackground(state2, props) {
13204
- switch (state2) {
13205
- case "selected":
13206
- return {
13207
- backgroundColor: themeTools.mode("mint", "pine")(props)
13208
- };
13209
- case "active":
13210
- return {
13211
- backgroundColor: themeTools.mode(
13212
- "mint",
13213
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 30%)`
13214
- )(props)
13215
- };
13216
- case "hover":
13217
- return {
13218
- backgroundColor: themeTools.mode(
13219
- "white",
13220
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 20%)`
13221
- )(props)
13222
- };
13223
- case "focus":
13224
- return {
13225
- backgroundColor: themeTools.mode(
13226
- "white",
13227
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 40%)`
13228
- )(props)
13229
- };
13230
- case "default":
13231
- default:
13232
- return {
13233
- backgroundColor: themeTools.mode(
13234
- "white",
13235
- `color-mix(in srgb, ${props.theme.darkBackgroundColor ?? colors.darkGrey}, ${colors.white} 10%)`
13236
- )(props)
13237
- };
13238
- }
13239
- }
13240
- var init_background_utils = __esm({
13241
- "src/theme/utils/background-utils.ts"() {
13242
- init_foundations();
13243
- }
13244
- });
13245
13252
  var parts6, helpers10, config18, info_select_default;
13246
13253
  var init_info_select = __esm({
13247
13254
  "src/theme/components/info-select.ts"() {
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, Portal, ProgressBar, ProgressIndicator, 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, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-55HLEY3T.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, Portal, ProgressBar, ProgressIndicator, 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, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-S2IJI3LY.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -59,6 +59,7 @@ type CardSelectProps = BoxProps & {
59
59
  * ```
60
60
  *
61
61
  * @see https://spor.vy.no/components/card-select
62
+ *
62
63
  */
63
64
  export const CardSelect = forwardRef<CardSelectProps, "button">(
64
65
  (
@@ -96,7 +97,10 @@ export const CardSelect = forwardRef<CardSelectProps, "button">(
96
97
 
97
98
  const { buttonProps } = useButton(triggerProps, triggerRef);
98
99
 
99
- const styles = useMultiStyleConfig("CardSelect", { variant, size });
100
+ const styles = useMultiStyleConfig("CardSelect", {
101
+ variant,
102
+ size,
103
+ });
100
104
  useForceRerender(state.isOpen);
101
105
 
102
106
  const ChevronIcon =
@@ -1,8 +1,13 @@
1
1
  import { anatomy } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
3
- import { mode } from "@chakra-ui/theme-tools";
3
+ import { StyleFunctionProps, mode } from "@chakra-ui/theme-tools";
4
4
  import { getBoxShadowString } from "../utils/box-shadow-utils";
5
5
  import { focusVisible } from "../utils/focus-utils";
6
+ import {
7
+ baseBackground,
8
+ floatingBackground,
9
+ ghostBackground,
10
+ } from "../utils/background-utils";
6
11
 
7
12
  const parts = anatomy("card-select").parts("trigger", "card");
8
13
 
@@ -13,9 +18,6 @@ const config = helpers.defineMultiStyleConfig({
13
18
  appearance: "none",
14
19
  display: "flex",
15
20
  alignItems: "center",
16
- _expanded: {
17
- backgroundColor: mode("mint", "night")(props),
18
- },
19
21
  ...focusVisible({
20
22
  notFocus: {},
21
23
  focus: {
@@ -31,20 +33,11 @@ const config = helpers.defineMultiStyleConfig({
31
33
  borderRadius: "sm",
32
34
  boxShadow: "md",
33
35
  padding: 3,
36
+ color: mode("darkGrey", "white")(props),
34
37
  },
35
38
  }),
36
39
  variants: {
37
- ghost: (props) => ({
38
- trigger: {
39
- _hover: {
40
- backgroundColor: mode("seaMist", "pine")(props),
41
- },
42
- _active: {
43
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
44
- },
45
- },
46
- }),
47
- outline: (props) => ({
40
+ base: (props) => ({
48
41
  trigger: {
49
42
  boxShadow: getBoxShadowString({
50
43
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
@@ -66,20 +59,20 @@ const config = helpers.defineMultiStyleConfig({
66
59
  }),
67
60
  },
68
61
  _active: {
69
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
62
+ ...baseBackground("active", props),
70
63
  boxShadow: getBoxShadowString({
71
64
  borderColor: mode("darkGrey", "whiteAlpha.400")(props),
72
65
  borderWidth: 1,
73
66
  }),
74
67
  },
75
-
76
68
  _expanded: {
69
+ ...baseBackground("active", props),
77
70
  _hover: {
78
- backgroundColor: mode("seaMist", "todo")(props),
71
+ ...baseBackground("active", props),
79
72
  boxShadow: "none",
80
73
  },
81
74
  _active: {
82
- backgroundColor: mode("mint", "todo")(props),
75
+ ...baseBackground("active", props),
83
76
  boxShadow: getBoxShadowString({
84
77
  borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props),
85
78
  borderWidth: 1,
@@ -88,13 +81,26 @@ const config = helpers.defineMultiStyleConfig({
88
81
  },
89
82
  },
90
83
  }),
91
- card: (props) => ({
84
+ ghost: (props) => ({
85
+ trigger: {
86
+ _hover: {
87
+ ...ghostBackground("hover", props),
88
+ },
89
+ _active: {
90
+ ...ghostBackground("active", props),
91
+ },
92
+ _expanded: {
93
+ ...ghostBackground("selected", props),
94
+ },
95
+ },
96
+ }),
97
+ floating: (props) => ({
92
98
  trigger: {
93
- backgroundColor: mode("transparent", "whiteAlpha.100")(props),
99
+ ...floatingBackground("default", props),
94
100
  boxShadow: "sm",
95
101
  transition: "all .1s ease-out",
96
102
  _hover: {
97
- backgroundColor: mode("seaMist", "pine")(props),
103
+ ...floatingBackground("hover", props),
98
104
  boxShadow: getBoxShadowString({
99
105
  borderColor: mode("silver", "whiteAlpha.400")(props),
100
106
  borderWidth: 1,
@@ -102,7 +108,7 @@ const config = helpers.defineMultiStyleConfig({
102
108
  }),
103
109
  },
104
110
  _active: {
105
- backgroundColor: mode("mint", "whiteAlpha.100")(props),
111
+ ...floatingBackground("active", props),
106
112
  boxShadow: getBoxShadowString({
107
113
  borderColor: mode("silver", "whiteAlpha.400")(props),
108
114
  borderWidth: mode(0, 1)(props),
@@ -110,6 +116,7 @@ const config = helpers.defineMultiStyleConfig({
110
116
  }),
111
117
  },
112
118
  _expanded: {
119
+ ...floatingBackground("active", props),
113
120
  _hover: {
114
121
  boxShadow: getBoxShadowString({
115
122
  borderColor: "darkGrey",
@@ -117,7 +124,7 @@ const config = helpers.defineMultiStyleConfig({
117
124
  }),
118
125
  },
119
126
  _active: {
120
- backgroundColor: mode("mint", "whiteAlpha.200")(props),
127
+ ...floatingBackground("active", props),
121
128
  boxShadow: "none",
122
129
  },
123
130
  },
@@ -17,7 +17,7 @@ export function baseBackground(
17
17
  };
18
18
  case "selected":
19
19
  return {
20
- backgroundColor: "pine",
20
+ backgroundColor: mode("pine", "coralGreen")(props),
21
21
  };
22
22
  case "disabled":
23
23
  return {
@@ -84,27 +84,21 @@ export function floatingBackground(
84
84
  return {
85
85
  backgroundColor: mode(
86
86
  "mint",
87
- `color-mix(in srgb, ${
88
- props.theme.darkBackgroundColor ?? colors.darkGrey
89
- }, ${colors.white} 30%)`,
87
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 30%)`,
90
88
  )(props),
91
89
  };
92
90
  case "hover":
93
91
  return {
94
92
  backgroundColor: mode(
95
93
  "white",
96
- `color-mix(in srgb, ${
97
- props.theme.darkBackgroundColor ?? colors.darkGrey
98
- }, ${colors.white} 20%)`,
94
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 20%)`,
99
95
  )(props),
100
96
  };
101
97
  case "focus":
102
98
  return {
103
99
  backgroundColor: mode(
104
100
  "white",
105
- `color-mix(in srgb, ${
106
- props.theme.darkBackgroundColor ?? colors.darkGrey
107
- }, ${colors.white} 40%)`,
101
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 40%)`,
108
102
  )(props),
109
103
  };
110
104
  case "default":
@@ -112,9 +106,7 @@ export function floatingBackground(
112
106
  return {
113
107
  backgroundColor: mode(
114
108
  "white",
115
- `color-mix(in srgb, ${
116
- props.theme.darkBackgroundColor ?? colors.darkGrey
117
- }, ${colors.white} 10%)`,
109
+ `color-mix(in srgb, ${props.theme.colors.accent}, ${colors.white} 10%)`,
118
110
  )(props),
119
111
  };
120
112
  }