@vygruppen/spor-react 10.6.0 → 10.6.2

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@10.6.0 build
2
+ > @vygruppen/spor-react@10.6.2 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
+ CJS dist/index.js 538.50 KB
13
+ CJS ⚡️ Build success in 2340ms
12
14
  ESM dist/index.mjs 2.16 KB
13
- ESM dist/CountryCodeSelect-R27DZ2PB.mjs 1.22 KB
14
- ESM dist/chunk-WSGO53OP.mjs 424.74 KB
15
- ESM ⚡️ Build success in 2252ms
16
- CJS dist/index.js 538.15 KB
17
- CJS ⚡️ Build success in 2253ms
18
- DTS ⚡️ Build success in 15042ms
19
- DTS dist/index.d.ts 339.27 KB
20
- DTS dist/index.d.mts 339.27 KB
15
+ ESM dist/CountryCodeSelect-ANPDQEJN.mjs 1.22 KB
16
+ ESM dist/chunk-CILVSJHM.mjs 425.04 KB
17
+ ESM ⚡️ Build success in 2341ms
18
+ DTS ⚡️ Build success in 16295ms
19
+ DTS dist/index.d.ts 339.85 KB
20
+ DTS dist/index.d.mts 339.85 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 10.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 297ab85: ServiceAlert: Fix bug with border
8
+
9
+ ## 10.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 22459d4: Added outline color of ExpandableAlert like the design
14
+
3
15
  ## 10.6.0
4
16
 
5
17
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-WSGO53OP.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-CILVSJHM.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -1841,7 +1841,7 @@ var texts4 = createTexts({
1841
1841
  sv: "Landskod"
1842
1842
  }
1843
1843
  });
1844
- var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-R27DZ2PB.mjs'));
1844
+ var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-ANPDQEJN.mjs'));
1845
1845
  var Radio = forwardRef((props, ref) => {
1846
1846
  return /* @__PURE__ */ React85__default.createElement(Radio$1, { ...props, ref });
1847
1847
  });
@@ -2815,7 +2815,7 @@ var ExpandableAlert = ({
2815
2815
  allowToggle: true,
2816
2816
  flexGrow: "1"
2817
2817
  },
2818
- /* @__PURE__ */ React85__default.createElement(AccordionItem, null, /* @__PURE__ */ React85__default.createElement(AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React85__default.createElement(
2818
+ /* @__PURE__ */ React85__default.createElement(AccordionItem, { sx: styles3.accordion }, /* @__PURE__ */ React85__default.createElement(AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React85__default.createElement(
2819
2819
  Flex,
2820
2820
  {
2821
2821
  justifyContent: "space-between",
@@ -2868,14 +2868,14 @@ var ServiceAlert = ({
2868
2868
  variant = "service";
2869
2869
  const { t: t2 } = useTranslation();
2870
2870
  const styles3 = useMultiStyleConfig("AlertService");
2871
- return /* @__PURE__ */ React85__default.createElement(Box, { flexDirection: "column", sx: styles3.box }, /* @__PURE__ */ React85__default.createElement(
2871
+ return /* @__PURE__ */ React85__default.createElement(
2872
2872
  BaseAlert,
2873
2873
  {
2874
2874
  variant,
2875
2875
  ...boxProps,
2876
2876
  paddingX: 0,
2877
2877
  paddingY: 0,
2878
- sx: styles3.box
2878
+ sx: styles3.outerBox
2879
2879
  },
2880
2880
  /* @__PURE__ */ React85__default.createElement(
2881
2881
  Accordion$1,
@@ -2883,7 +2883,9 @@ var ServiceAlert = ({
2883
2883
  onChange: (expandedIndex) => onToggle(expandedIndex === 0),
2884
2884
  defaultIndex: defaultOpen ? 0 : -1,
2885
2885
  allowToggle: true,
2886
- flexGrow: "1"
2886
+ flexGrow: 1,
2887
+ sx: { outline: "none" },
2888
+ variant
2887
2889
  },
2888
2890
  /* @__PURE__ */ React85__default.createElement(AccordionItem, null, /* @__PURE__ */ React85__default.createElement(AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React85__default.createElement(
2889
2891
  Stack$1,
@@ -2891,14 +2893,14 @@ var ServiceAlert = ({
2891
2893
  flexDirection: "row",
2892
2894
  justifyContent: "center",
2893
2895
  width: "100%",
2894
- paddingX: "12px"
2896
+ paddingX: 2
2895
2897
  },
2896
2898
  /* @__PURE__ */ React85__default.createElement(
2897
2899
  Flex,
2898
2900
  {
2899
2901
  justifyContent: "space-between",
2900
2902
  alignItems: "center",
2901
- flexGrow: "1",
2903
+ flexGrow: 1,
2902
2904
  maxWidth: contentWidth
2903
2905
  },
2904
2906
  /* @__PURE__ */ React85__default.createElement(Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React85__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React85__default.createElement(
@@ -2919,11 +2921,11 @@ var ServiceAlert = ({
2919
2921
  /* @__PURE__ */ React85__default.createElement(Flex, { alignItems: "center" }, notification && /* @__PURE__ */ React85__default.createElement(Text, { sx: styles3.notificationText }, t2(texts12.notification(notification))), /* @__PURE__ */ React85__default.createElement(AccordionIcon, { color: "white" }))
2920
2922
  )
2921
2923
  )), /* @__PURE__ */ React85__default.createElement(AccordionPanel, { sx: styles3.serviceMessageContent }, /* @__PURE__ */ React85__default.createElement(Stack$1, { flexDirection: "row", justifyContent: "center", width: "100%" }, /* @__PURE__ */ React85__default.createElement(
2922
- Flex,
2924
+ Stack$1,
2923
2925
  {
2924
- justifyContent: "space-between",
2926
+ justifyContent: "center",
2925
2927
  alignItems: "center",
2926
- flexGrow: "1",
2928
+ flexGrow: 1,
2927
2929
  maxWidth: contentWidth,
2928
2930
  flexFlow: "column",
2929
2931
  gap: 2,
@@ -2940,7 +2942,7 @@ var ServiceAlert = ({
2940
2942
  children
2941
2943
  ))))
2942
2944
  )
2943
- ));
2945
+ );
2944
2946
  };
2945
2947
  var texts12 = createTexts({
2946
2948
  notification: (notification) => {
@@ -10765,7 +10767,7 @@ var config3 = helpers2.defineMultiStyleConfig({
10765
10767
  var alert_default = config3;
10766
10768
 
10767
10769
  // src/theme/components/alert-expandable.ts
10768
- var parts2 = anatomy("alertExpandable").parts("container");
10770
+ var parts2 = anatomy("alertExpandable").parts("container", "accordion");
10769
10771
  var helpers3 = createMultiStyleConfigHelpers(parts2.keys);
10770
10772
  var config4 = helpers3.defineMultiStyleConfig({
10771
10773
  baseStyle: {
@@ -10785,6 +10787,9 @@ var config4 = helpers3.defineMultiStyleConfig({
10785
10787
  },
10786
10788
  variants: {
10787
10789
  info: {
10790
+ accordion: {
10791
+ outlineColor: "cloudy"
10792
+ },
10788
10793
  container: {
10789
10794
  _hover: {
10790
10795
  outlineColor: "sky"
@@ -10795,6 +10800,9 @@ var config4 = helpers3.defineMultiStyleConfig({
10795
10800
  }
10796
10801
  },
10797
10802
  success: {
10803
+ accordion: {
10804
+ outlineColor: "coralGreen"
10805
+ },
10798
10806
  container: {
10799
10807
  _hover: {
10800
10808
  outlineColor: "blueGreen"
@@ -10805,6 +10813,9 @@ var config4 = helpers3.defineMultiStyleConfig({
10805
10813
  }
10806
10814
  },
10807
10815
  warning: {
10816
+ accordion: {
10817
+ outlineColor: "primrose"
10818
+ },
10808
10819
  container: {
10809
10820
  _hover: {
10810
10821
  outlineColor: "sunshine"
@@ -10815,6 +10826,9 @@ var config4 = helpers3.defineMultiStyleConfig({
10815
10826
  }
10816
10827
  },
10817
10828
  "alt-transport": {
10829
+ accordion: {
10830
+ outlineColor: "burntYellow"
10831
+ },
10818
10832
  container: {
10819
10833
  _hover: {
10820
10834
  outlineColor: "golden"
@@ -10825,6 +10839,9 @@ var config4 = helpers3.defineMultiStyleConfig({
10825
10839
  }
10826
10840
  },
10827
10841
  error: {
10842
+ accordion: {
10843
+ outlineColor: "salmon"
10844
+ },
10828
10845
  container: {
10829
10846
  _hover: {
10830
10847
  outlineColor: "apricot"
@@ -10854,7 +10871,7 @@ var alert_expandable_default = config4;
10854
10871
  // src/theme/components/alert-service.ts
10855
10872
  var parts3 = anatomy("alertService").parts(
10856
10873
  "container",
10857
- "box",
10874
+ "outerBox",
10858
10875
  "notificationText",
10859
10876
  "serviceMessageContent"
10860
10877
  );
@@ -10868,7 +10885,7 @@ var config5 = helpers4.defineMultiStyleConfig({
10868
10885
  transitionProperty: "outline, border-radius",
10869
10886
  transitionDuration: "fast",
10870
10887
  borderTopRadius: "none",
10871
- borderBottomRadius: "18px",
10888
+ borderBottomRadius: "md",
10872
10889
  _hover: {
10873
10890
  outline: "2px solid",
10874
10891
  outlineColor: "blueGreen"
@@ -10878,12 +10895,13 @@ var config5 = helpers4.defineMultiStyleConfig({
10878
10895
  outlineColor: "pine"
10879
10896
  }
10880
10897
  },
10881
- box: {
10898
+ outerBox: {
10882
10899
  outline: "1px solid",
10883
10900
  outlineColor: "blueGreen",
10884
10901
  backgroundColor: "darkTeal",
10885
- borderBottomRadius: "1.125rem",
10886
- borderTopRadius: "none"
10902
+ borderBottomRadius: "md",
10903
+ borderTopRadius: "none",
10904
+ width: "100%"
10887
10905
  },
10888
10906
  notificationText: {
10889
10907
  color: "white",
package/dist/index.d.mts CHANGED
@@ -2558,11 +2558,14 @@ declare const theme: {
2558
2558
  } | undefined;
2559
2559
  sizes?: {
2560
2560
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2561
- keys: "container"[];
2561
+ keys: ("container" | "accordion")[];
2562
2562
  }>;
2563
2563
  } | undefined;
2564
2564
  variants?: {
2565
2565
  info: {
2566
+ accordion: {
2567
+ outlineColor: string;
2568
+ };
2566
2569
  container: {
2567
2570
  _hover: {
2568
2571
  outlineColor: string;
@@ -2573,6 +2576,9 @@ declare const theme: {
2573
2576
  };
2574
2577
  };
2575
2578
  success: {
2579
+ accordion: {
2580
+ outlineColor: string;
2581
+ };
2576
2582
  container: {
2577
2583
  _hover: {
2578
2584
  outlineColor: string;
@@ -2583,6 +2589,9 @@ declare const theme: {
2583
2589
  };
2584
2590
  };
2585
2591
  warning: {
2592
+ accordion: {
2593
+ outlineColor: string;
2594
+ };
2586
2595
  container: {
2587
2596
  _hover: {
2588
2597
  outlineColor: string;
@@ -2593,6 +2602,9 @@ declare const theme: {
2593
2602
  };
2594
2603
  };
2595
2604
  "alt-transport": {
2605
+ accordion: {
2606
+ outlineColor: string;
2607
+ };
2596
2608
  container: {
2597
2609
  _hover: {
2598
2610
  outlineColor: string;
@@ -2603,6 +2615,9 @@ declare const theme: {
2603
2615
  };
2604
2616
  };
2605
2617
  error: {
2618
+ accordion: {
2619
+ outlineColor: string;
2620
+ };
2606
2621
  container: {
2607
2622
  _hover: {
2608
2623
  outlineColor: string;
@@ -2628,7 +2643,7 @@ declare const theme: {
2628
2643
  variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | undefined;
2629
2644
  colorScheme?: string | undefined;
2630
2645
  } | undefined;
2631
- parts: "container"[];
2646
+ parts: ("container" | "accordion")[];
2632
2647
  };
2633
2648
  AlertService: {
2634
2649
  baseStyle?: {
@@ -2649,12 +2664,13 @@ declare const theme: {
2649
2664
  outlineColor: string;
2650
2665
  };
2651
2666
  };
2652
- box: {
2667
+ outerBox: {
2653
2668
  outline: string;
2654
2669
  outlineColor: string;
2655
2670
  backgroundColor: string;
2656
2671
  borderBottomRadius: string;
2657
2672
  borderTopRadius: string;
2673
+ width: string;
2658
2674
  };
2659
2675
  notificationText: {
2660
2676
  color: string;
@@ -2671,12 +2687,12 @@ declare const theme: {
2671
2687
  } | undefined;
2672
2688
  sizes?: {
2673
2689
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2674
- keys: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2690
+ keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2675
2691
  }>;
2676
2692
  } | undefined;
2677
2693
  variants?: {
2678
2694
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2679
- keys: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2695
+ keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2680
2696
  }>;
2681
2697
  } | undefined;
2682
2698
  defaultProps?: {
@@ -2684,7 +2700,7 @@ declare const theme: {
2684
2700
  variant?: string | number | undefined;
2685
2701
  colorScheme?: string | undefined;
2686
2702
  } | undefined;
2687
- parts: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2703
+ parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2688
2704
  };
2689
2705
  Badge: {
2690
2706
  baseStyle?: (({ colorScheme }: _chakra_ui_styled_system.StyleFunctionProps) => {
package/dist/index.d.ts CHANGED
@@ -2558,11 +2558,14 @@ declare const theme: {
2558
2558
  } | undefined;
2559
2559
  sizes?: {
2560
2560
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2561
- keys: "container"[];
2561
+ keys: ("container" | "accordion")[];
2562
2562
  }>;
2563
2563
  } | undefined;
2564
2564
  variants?: {
2565
2565
  info: {
2566
+ accordion: {
2567
+ outlineColor: string;
2568
+ };
2566
2569
  container: {
2567
2570
  _hover: {
2568
2571
  outlineColor: string;
@@ -2573,6 +2576,9 @@ declare const theme: {
2573
2576
  };
2574
2577
  };
2575
2578
  success: {
2579
+ accordion: {
2580
+ outlineColor: string;
2581
+ };
2576
2582
  container: {
2577
2583
  _hover: {
2578
2584
  outlineColor: string;
@@ -2583,6 +2589,9 @@ declare const theme: {
2583
2589
  };
2584
2590
  };
2585
2591
  warning: {
2592
+ accordion: {
2593
+ outlineColor: string;
2594
+ };
2586
2595
  container: {
2587
2596
  _hover: {
2588
2597
  outlineColor: string;
@@ -2593,6 +2602,9 @@ declare const theme: {
2593
2602
  };
2594
2603
  };
2595
2604
  "alt-transport": {
2605
+ accordion: {
2606
+ outlineColor: string;
2607
+ };
2596
2608
  container: {
2597
2609
  _hover: {
2598
2610
  outlineColor: string;
@@ -2603,6 +2615,9 @@ declare const theme: {
2603
2615
  };
2604
2616
  };
2605
2617
  error: {
2618
+ accordion: {
2619
+ outlineColor: string;
2620
+ };
2606
2621
  container: {
2607
2622
  _hover: {
2608
2623
  outlineColor: string;
@@ -2628,7 +2643,7 @@ declare const theme: {
2628
2643
  variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | undefined;
2629
2644
  colorScheme?: string | undefined;
2630
2645
  } | undefined;
2631
- parts: "container"[];
2646
+ parts: ("container" | "accordion")[];
2632
2647
  };
2633
2648
  AlertService: {
2634
2649
  baseStyle?: {
@@ -2649,12 +2664,13 @@ declare const theme: {
2649
2664
  outlineColor: string;
2650
2665
  };
2651
2666
  };
2652
- box: {
2667
+ outerBox: {
2653
2668
  outline: string;
2654
2669
  outlineColor: string;
2655
2670
  backgroundColor: string;
2656
2671
  borderBottomRadius: string;
2657
2672
  borderTopRadius: string;
2673
+ width: string;
2658
2674
  };
2659
2675
  notificationText: {
2660
2676
  color: string;
@@ -2671,12 +2687,12 @@ declare const theme: {
2671
2687
  } | undefined;
2672
2688
  sizes?: {
2673
2689
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2674
- keys: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2690
+ keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2675
2691
  }>;
2676
2692
  } | undefined;
2677
2693
  variants?: {
2678
2694
  [key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
2679
- keys: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2695
+ keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2680
2696
  }>;
2681
2697
  } | undefined;
2682
2698
  defaultProps?: {
@@ -2684,7 +2700,7 @@ declare const theme: {
2684
2700
  variant?: string | number | undefined;
2685
2701
  colorScheme?: string | undefined;
2686
2702
  } | undefined;
2687
- parts: ("container" | "box" | "serviceMessageContent" | "notificationText")[];
2703
+ parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
2688
2704
  };
2689
2705
  Badge: {
2690
2706
  baseStyle?: (({ colorScheme }: _chakra_ui_styled_system.StyleFunctionProps) => {
package/dist/index.js CHANGED
@@ -3322,7 +3322,7 @@ var init_ExpandableAlert = __esm({
3322
3322
  allowToggle: true,
3323
3323
  flexGrow: "1"
3324
3324
  },
3325
- /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React86__namespace.default.createElement(
3325
+ /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionItem, { sx: styles3.accordion }, /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React86__namespace.default.createElement(
3326
3326
  react.Flex,
3327
3327
  {
3328
3328
  justifyContent: "space-between",
@@ -3390,14 +3390,14 @@ var init_ServiceAlert = __esm({
3390
3390
  variant = "service";
3391
3391
  const { t: t2 } = useTranslation();
3392
3392
  const styles3 = react.useMultiStyleConfig("AlertService");
3393
- return /* @__PURE__ */ React86__namespace.default.createElement(react.Box, { flexDirection: "column", sx: styles3.box }, /* @__PURE__ */ React86__namespace.default.createElement(
3393
+ return /* @__PURE__ */ React86__namespace.default.createElement(
3394
3394
  BaseAlert,
3395
3395
  {
3396
3396
  variant,
3397
3397
  ...boxProps,
3398
3398
  paddingX: 0,
3399
3399
  paddingY: 0,
3400
- sx: styles3.box
3400
+ sx: styles3.outerBox
3401
3401
  },
3402
3402
  /* @__PURE__ */ React86__namespace.default.createElement(
3403
3403
  react.Accordion,
@@ -3405,7 +3405,9 @@ var init_ServiceAlert = __esm({
3405
3405
  onChange: (expandedIndex) => onToggle(expandedIndex === 0),
3406
3406
  defaultIndex: defaultOpen ? 0 : -1,
3407
3407
  allowToggle: true,
3408
- flexGrow: "1"
3408
+ flexGrow: 1,
3409
+ sx: { outline: "none" },
3410
+ variant
3409
3411
  },
3410
3412
  /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React86__namespace.default.createElement(
3411
3413
  react.Stack,
@@ -3413,14 +3415,14 @@ var init_ServiceAlert = __esm({
3413
3415
  flexDirection: "row",
3414
3416
  justifyContent: "center",
3415
3417
  width: "100%",
3416
- paddingX: "12px"
3418
+ paddingX: 2
3417
3419
  },
3418
3420
  /* @__PURE__ */ React86__namespace.default.createElement(
3419
3421
  react.Flex,
3420
3422
  {
3421
3423
  justifyContent: "space-between",
3422
3424
  alignItems: "center",
3423
- flexGrow: "1",
3425
+ flexGrow: 1,
3424
3426
  maxWidth: contentWidth
3425
3427
  },
3426
3428
  /* @__PURE__ */ React86__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React86__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React86__namespace.default.createElement(
@@ -3441,11 +3443,11 @@ var init_ServiceAlert = __esm({
3441
3443
  /* @__PURE__ */ React86__namespace.default.createElement(react.Flex, { alignItems: "center" }, notification && /* @__PURE__ */ React86__namespace.default.createElement(react.Text, { sx: styles3.notificationText }, t2(texts13.notification(notification))), /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionIcon, { color: "white" }))
3442
3444
  )
3443
3445
  )), /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionPanel, { sx: styles3.serviceMessageContent }, /* @__PURE__ */ React86__namespace.default.createElement(react.Stack, { flexDirection: "row", justifyContent: "center", width: "100%" }, /* @__PURE__ */ React86__namespace.default.createElement(
3444
- react.Flex,
3446
+ react.Stack,
3445
3447
  {
3446
- justifyContent: "space-between",
3448
+ justifyContent: "center",
3447
3449
  alignItems: "center",
3448
- flexGrow: "1",
3450
+ flexGrow: 1,
3449
3451
  maxWidth: contentWidth,
3450
3452
  flexFlow: "column",
3451
3453
  gap: 2,
@@ -3462,7 +3464,7 @@ var init_ServiceAlert = __esm({
3462
3464
  children
3463
3465
  ))))
3464
3466
  )
3465
- ));
3467
+ );
3466
3468
  };
3467
3469
  texts13 = createTexts({
3468
3470
  notification: (notification) => {
@@ -12147,7 +12149,7 @@ var init_alert_expandable = __esm({
12147
12149
  "src/theme/components/alert-expandable.ts"() {
12148
12150
  init_dist4();
12149
12151
  init_dist3();
12150
- parts2 = anatomy("alertExpandable").parts("container");
12152
+ parts2 = anatomy("alertExpandable").parts("container", "accordion");
12151
12153
  helpers3 = createMultiStyleConfigHelpers(parts2.keys);
12152
12154
  config4 = helpers3.defineMultiStyleConfig({
12153
12155
  baseStyle: {
@@ -12167,6 +12169,9 @@ var init_alert_expandable = __esm({
12167
12169
  },
12168
12170
  variants: {
12169
12171
  info: {
12172
+ accordion: {
12173
+ outlineColor: "cloudy"
12174
+ },
12170
12175
  container: {
12171
12176
  _hover: {
12172
12177
  outlineColor: "sky"
@@ -12177,6 +12182,9 @@ var init_alert_expandable = __esm({
12177
12182
  }
12178
12183
  },
12179
12184
  success: {
12185
+ accordion: {
12186
+ outlineColor: "coralGreen"
12187
+ },
12180
12188
  container: {
12181
12189
  _hover: {
12182
12190
  outlineColor: "blueGreen"
@@ -12187,6 +12195,9 @@ var init_alert_expandable = __esm({
12187
12195
  }
12188
12196
  },
12189
12197
  warning: {
12198
+ accordion: {
12199
+ outlineColor: "primrose"
12200
+ },
12190
12201
  container: {
12191
12202
  _hover: {
12192
12203
  outlineColor: "sunshine"
@@ -12197,6 +12208,9 @@ var init_alert_expandable = __esm({
12197
12208
  }
12198
12209
  },
12199
12210
  "alt-transport": {
12211
+ accordion: {
12212
+ outlineColor: "burntYellow"
12213
+ },
12200
12214
  container: {
12201
12215
  _hover: {
12202
12216
  outlineColor: "golden"
@@ -12207,6 +12221,9 @@ var init_alert_expandable = __esm({
12207
12221
  }
12208
12222
  },
12209
12223
  error: {
12224
+ accordion: {
12225
+ outlineColor: "salmon"
12226
+ },
12210
12227
  container: {
12211
12228
  _hover: {
12212
12229
  outlineColor: "apricot"
@@ -12243,7 +12260,7 @@ var init_alert_service = __esm({
12243
12260
  init_dist3();
12244
12261
  parts3 = anatomy("alertService").parts(
12245
12262
  "container",
12246
- "box",
12263
+ "outerBox",
12247
12264
  "notificationText",
12248
12265
  "serviceMessageContent"
12249
12266
  );
@@ -12257,7 +12274,7 @@ var init_alert_service = __esm({
12257
12274
  transitionProperty: "outline, border-radius",
12258
12275
  transitionDuration: "fast",
12259
12276
  borderTopRadius: "none",
12260
- borderBottomRadius: "18px",
12277
+ borderBottomRadius: "md",
12261
12278
  _hover: {
12262
12279
  outline: "2px solid",
12263
12280
  outlineColor: "blueGreen"
@@ -12267,12 +12284,13 @@ var init_alert_service = __esm({
12267
12284
  outlineColor: "pine"
12268
12285
  }
12269
12286
  },
12270
- box: {
12287
+ outerBox: {
12271
12288
  outline: "1px solid",
12272
12289
  outlineColor: "blueGreen",
12273
12290
  backgroundColor: "darkTeal",
12274
- borderBottomRadius: "1.125rem",
12275
- borderTopRadius: "none"
12291
+ borderBottomRadius: "md",
12292
+ borderTopRadius: "none",
12293
+ width: "100%"
12276
12294
  },
12277
12295
  notificationText: {
12278
12296
  color: "white",
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, CardSelect, CargonetLogo, 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, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, ServiceAlert, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-WSGO53OP.mjs';
1
+ export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Brand, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, CardSelect, CargonetLogo, 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, FullScreenDrawer, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, Nudge, NumericStepper, OrderedList, Pagination, PasswordInput, PhoneNumberInput, PlayPauseButton, Portal, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardGroupContext, RadioGroup, ScaleFade, SearchInput, Section, ServiceAlert, SimpleDrawer, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, StaticCard, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tooltip, Tr, TravelTag, UnorderedList, VStack, VyLogo, VyLogoPride, WizardNudge, Wrap, WrapItem, brandTheme, createTexts, defineStyleConfig, extendTheme, fontFaces, slugify, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-CILVSJHM.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "10.6.0",
3
+ "version": "10.6.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -54,7 +54,7 @@ export const ExpandableAlert = ({
54
54
  allowToggle
55
55
  flexGrow="1"
56
56
  >
57
- <AccordionItem>
57
+ <AccordionItem sx={styles.accordion}>
58
58
  <AccordionButton sx={styles.container}>
59
59
  <Flex
60
60
  justifyContent="space-between"
@@ -60,92 +60,92 @@ export const ServiceAlert = ({
60
60
  const { t } = useTranslation();
61
61
  const styles = useMultiStyleConfig("AlertService");
62
62
  return (
63
- <Box flexDirection="column" sx={styles.box}>
64
- <BaseAlert
63
+ <BaseAlert
64
+ variant={variant}
65
+ {...boxProps}
66
+ paddingX={0}
67
+ paddingY={0}
68
+ sx={styles.outerBox}
69
+ >
70
+ <Accordion
71
+ onChange={(expandedIndex) => onToggle(expandedIndex === 0)}
72
+ defaultIndex={defaultOpen ? 0 : -1}
73
+ allowToggle
74
+ flexGrow={1}
75
+ sx={{ outline: "none" }}
65
76
  variant={variant}
66
- {...boxProps}
67
- paddingX={0}
68
- paddingY={0}
69
- sx={styles.box}
70
77
  >
71
- <Accordion
72
- onChange={(expandedIndex) => onToggle(expandedIndex === 0)}
73
- defaultIndex={defaultOpen ? 0 : -1}
74
- allowToggle
75
- flexGrow="1"
76
- >
77
- <AccordionItem>
78
- <AccordionButton sx={styles.container}>
79
- <Stack
80
- flexDirection="row"
81
- justifyContent="center"
82
- width="100%"
83
- paddingX="12px"
78
+ <AccordionItem>
79
+ <AccordionButton sx={styles.container}>
80
+ <Stack
81
+ flexDirection="row"
82
+ justifyContent="center"
83
+ width="100%"
84
+ paddingX={2}
85
+ >
86
+ <Flex
87
+ justifyContent="space-between"
88
+ alignItems="center"
89
+ flexGrow={1}
90
+ maxWidth={contentWidth}
84
91
  >
85
- <Flex
86
- justifyContent="space-between"
87
- alignItems="center"
88
- flexGrow="1"
89
- maxWidth={contentWidth}
90
- >
91
- <Flex as={headingLevel} alignItems="center">
92
- <AlertIcon variant={variant} />
92
+ <Flex as={headingLevel} alignItems="center">
93
+ <AlertIcon variant={variant} />
93
94
 
94
- <Box
95
- as="span"
96
- sx={{
97
- // Truncate the title to one line
98
- display: "-webkit-box",
99
- overflow: "hidden",
100
- WebkitLineClamp: "1",
101
- WebkitBoxOrient: "vertical",
102
- }}
103
- color="white"
104
- >
105
- {title}
106
- </Box>
107
- </Flex>
95
+ <Box
96
+ as="span"
97
+ sx={{
98
+ // Truncate the title to one line
99
+ display: "-webkit-box",
100
+ overflow: "hidden",
101
+ WebkitLineClamp: "1",
102
+ WebkitBoxOrient: "vertical",
103
+ }}
104
+ color="white"
105
+ >
106
+ {title}
107
+ </Box>
108
+ </Flex>
108
109
 
109
- <Flex alignItems="center">
110
- {notification && (
111
- <Text sx={styles.notificationText}>
112
- {t(texts.notification(notification))}
113
- </Text>
114
- )}
110
+ <Flex alignItems="center">
111
+ {notification && (
112
+ <Text sx={styles.notificationText}>
113
+ {t(texts.notification(notification))}
114
+ </Text>
115
+ )}
115
116
 
116
- <AccordionIcon color="white" />
117
- </Flex>
117
+ <AccordionIcon color="white" />
118
118
  </Flex>
119
- </Stack>
120
- </AccordionButton>
119
+ </Flex>
120
+ </Stack>
121
+ </AccordionButton>
121
122
 
122
- <AccordionPanel sx={styles.serviceMessageContent}>
123
- <Stack flexDirection="row" justifyContent="center" width="100%">
124
- <Flex
125
- justifyContent="space-between"
126
- alignItems="center"
127
- flexGrow="1"
128
- maxWidth={contentWidth}
129
- flexFlow="column"
130
- gap={2}
131
- sx={{
132
- p: {
133
- padding: "0.8rem 0",
134
- borderBottom: "0.08rem solid rgba(255, 255, 255, 0.4)",
135
- },
136
- "p:last-child": {
137
- borderBottom: "none",
138
- },
139
- }}
140
- >
141
- {children}
142
- </Flex>
123
+ <AccordionPanel sx={styles.serviceMessageContent}>
124
+ <Stack flexDirection="row" justifyContent="center" width="100%">
125
+ <Stack
126
+ justifyContent="center"
127
+ alignItems="center"
128
+ flexGrow={1}
129
+ maxWidth={contentWidth}
130
+ flexFlow="column"
131
+ gap={2}
132
+ sx={{
133
+ p: {
134
+ padding: "0.8rem 0",
135
+ borderBottom: "0.08rem solid rgba(255, 255, 255, 0.4)",
136
+ },
137
+ "p:last-child": {
138
+ borderBottom: "none",
139
+ },
140
+ }}
141
+ >
142
+ {children}
143
143
  </Stack>
144
- </AccordionPanel>
145
- </AccordionItem>
146
- </Accordion>
147
- </BaseAlert>
148
- </Box>
144
+ </Stack>
145
+ </AccordionPanel>
146
+ </AccordionItem>
147
+ </Accordion>
148
+ </BaseAlert>
149
149
  );
150
150
  };
151
151
 
@@ -1,7 +1,7 @@
1
1
  import { anatomy } from "@chakra-ui/anatomy";
2
2
  import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
3
3
 
4
- const parts = anatomy("alertExpandable").parts("container");
4
+ const parts = anatomy("alertExpandable").parts("container", "accordion");
5
5
  const helpers = createMultiStyleConfigHelpers(parts.keys);
6
6
 
7
7
  const config = helpers.defineMultiStyleConfig({
@@ -22,6 +22,9 @@ const config = helpers.defineMultiStyleConfig({
22
22
  },
23
23
  variants: {
24
24
  info: {
25
+ accordion: {
26
+ outlineColor: "cloudy",
27
+ },
25
28
  container: {
26
29
  _hover: {
27
30
  outlineColor: "sky",
@@ -32,6 +35,9 @@ const config = helpers.defineMultiStyleConfig({
32
35
  },
33
36
  },
34
37
  success: {
38
+ accordion: {
39
+ outlineColor: "coralGreen",
40
+ },
35
41
  container: {
36
42
  _hover: {
37
43
  outlineColor: "blueGreen",
@@ -42,6 +48,9 @@ const config = helpers.defineMultiStyleConfig({
42
48
  },
43
49
  },
44
50
  warning: {
51
+ accordion: {
52
+ outlineColor: "primrose",
53
+ },
45
54
  container: {
46
55
  _hover: {
47
56
  outlineColor: "sunshine",
@@ -52,6 +61,9 @@ const config = helpers.defineMultiStyleConfig({
52
61
  },
53
62
  },
54
63
  "alt-transport": {
64
+ accordion: {
65
+ outlineColor: "burntYellow",
66
+ },
55
67
  container: {
56
68
  _hover: {
57
69
  outlineColor: "golden",
@@ -62,6 +74,9 @@ const config = helpers.defineMultiStyleConfig({
62
74
  },
63
75
  },
64
76
  error: {
77
+ accordion: {
78
+ outlineColor: "salmon",
79
+ },
65
80
  container: {
66
81
  _hover: {
67
82
  outlineColor: "apricot",
@@ -3,7 +3,7 @@ import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
3
3
 
4
4
  const parts = anatomy("alertService").parts(
5
5
  "container",
6
- "box",
6
+ "outerBox",
7
7
  "notificationText",
8
8
  "serviceMessageContent",
9
9
  );
@@ -18,7 +18,7 @@ const config = helpers.defineMultiStyleConfig({
18
18
  transitionProperty: "outline, border-radius",
19
19
  transitionDuration: "fast",
20
20
  borderTopRadius: "none",
21
- borderBottomRadius: "18px",
21
+ borderBottomRadius: "md",
22
22
  _hover: {
23
23
  outline: "2px solid",
24
24
  outlineColor: "blueGreen",
@@ -28,12 +28,13 @@ const config = helpers.defineMultiStyleConfig({
28
28
  outlineColor: "pine",
29
29
  },
30
30
  },
31
- box: {
31
+ outerBox: {
32
32
  outline: "1px solid",
33
33
  outlineColor: "blueGreen",
34
34
  backgroundColor: "darkTeal",
35
- borderBottomRadius: "1.125rem",
35
+ borderBottomRadius: "md",
36
36
  borderTopRadius: "none",
37
+ width: "100%",
37
38
  },
38
39
  notificationText: {
39
40
  color: "white",