@vygruppen/spor-react 10.8.2 → 10.9.1
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +17 -0
- package/dist/{CountryCodeSelect-AKXDN47A.mjs → CountryCodeSelect-KKDPTYI3.mjs} +1 -1
- package/dist/{chunk-LA5DSNRV.mjs → chunk-RK3GOXNY.mjs} +70 -21
- package/dist/index.d.mts +54 -15
- package/dist/index.d.ts +54 -15
- package/dist/index.js +68 -19
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/alert/AlertIcon.tsx +10 -1
- package/src/alert/BaseAlert.tsx +2 -1
- package/src/alert/ServiceAlert.tsx +10 -6
- package/src/theme/components/alert-service.ts +46 -10
- package/src/theme/components/alert.ts +5 -0
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@10.
|
2
|
+
> @vygruppen/spor-react@10.9.1 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -10,11 +10,11 @@
|
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
12
|
[32mESM[39m [1mdist/index.mjs [22m[32m2.16 KB[39m
|
13
|
-
[32mESM[39m [1mdist/CountryCodeSelect-
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
16
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
17
|
-
[32mCJS[39m ⚡️ Build success in
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
13
|
+
[32mESM[39m [1mdist/CountryCodeSelect-KKDPTYI3.mjs [22m[32m1.22 KB[39m
|
14
|
+
[32mESM[39m [1mdist/chunk-RK3GOXNY.mjs [22m[32m427.00 KB[39m
|
15
|
+
[32mESM[39m ⚡️ Build success in 2129ms
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m540.68 KB[39m
|
17
|
+
[32mCJS[39m ⚡️ Build success in 2130ms
|
18
|
+
[32mDTS[39m ⚡️ Build success in 15384ms
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m342.08 KB[39m
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m342.08 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 10.9.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 0299f59: Fix import bug in file for ServiceAlert
|
8
|
+
|
9
|
+
## 10.9.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 6c3e196: new variant for ServiceAlert
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- Updated dependencies [6c3e196]
|
18
|
+
- @vygruppen/spor-icon-react@3.12.0
|
19
|
+
|
3
20
|
## 10.8.2
|
4
21
|
|
5
22
|
### Patch Changes
|
@@ -5,7 +5,7 @@ import { forwardRef, Divider as Divider$1, Stack as Stack$1, Box, useMultiStyleC
|
|
5
5
|
export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Collapse, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, OrderedList, Portal, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, defineStyleConfig, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
6
6
|
import * as React85 from 'react';
|
7
7
|
import React85__default, { forwardRef as forwardRef$1, useRef, useState, useEffect, useId, Suspense, useContext, createContext, useCallback, useMemo, useLayoutEffect } from 'react';
|
8
|
-
import { CloseOutline24Icon, SearchOutline24Icon, CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CalendarOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, DropdownRightFill18Icon, DropdownLeftFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowLeftFill24Icon, ArrowLeftFill30Icon, ArrowRightFill18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, TrainFill18Icon, TrainFill24Icon, TrainFill30Icon, ExpressBusFill18Icon, ExpressBusFill24Icon, ExpressBusFill30Icon, BusFill18Icon, BusFill24Icon, BusFill30Icon, FerryFill18Icon, FerryFill24Icon, FerryFill30Icon, SubwayFill18Icon, SubwayFill24Icon, SubwayFill30Icon, TramFill18Icon, TramFill24Icon, TramFill30Icon, AltTransportFill18Icon, AltTransportFill24Icon, AltTransportFill30Icon, WalkFill18Icon, WalkFill24Icon, WalkFill30Icon } from '@vygruppen/spor-icon-react';
|
8
|
+
import { CloseOutline24Icon, SearchOutline24Icon, CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CalendarOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, DropdownRightFill18Icon, DropdownLeftFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowLeftFill24Icon, ArrowLeftFill30Icon, ArrowRightFill18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, ServiceFill24Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, TrainFill18Icon, TrainFill24Icon, TrainFill30Icon, ExpressBusFill18Icon, ExpressBusFill24Icon, ExpressBusFill30Icon, BusFill18Icon, BusFill24Icon, BusFill30Icon, FerryFill18Icon, FerryFill24Icon, FerryFill30Icon, SubwayFill18Icon, SubwayFill24Icon, SubwayFill30Icon, TramFill18Icon, TramFill24Icon, TramFill30Icon, AltTransportFill18Icon, AltTransportFill24Icon, AltTransportFill30Icon, WalkFill18Icon, WalkFill24Icon, WalkFill30Icon } from '@vygruppen/spor-icon-react';
|
9
9
|
import { usePopover, DismissButton, Overlay, useOverlayTrigger, useButton, useDateSegment, useDateField, useDatePicker, I18nProvider, useDialog, useFilter, useComboBox, useListBox, useOption, useListBoxSection, useSelect, HiddenSelect, useProgressBar, useCalendar, useDateRangePicker, useCalendarGrid, useRangeCalendar, useTimeField, useCalendarCell } from 'react-aria';
|
10
10
|
import { useOverlayTriggerState, Item, useDateFieldState, useDatePickerState, useComboBoxState, useSelectState, useCalendarState, useDateRangePickerState, useTimeFieldState, useRangeCalendarState } from 'react-stately';
|
11
11
|
export { Item, Section } from 'react-stately';
|
@@ -1841,7 +1841,7 @@ var texts4 = createTexts({
|
|
1841
1841
|
sv: "Landskod"
|
1842
1842
|
}
|
1843
1843
|
});
|
1844
|
-
var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-
|
1844
|
+
var LazyCountryCodeSelect = React85__default.lazy(() => import('./CountryCodeSelect-KKDPTYI3.mjs'));
|
1845
1845
|
var Radio = forwardRef((props, ref) => {
|
1846
1846
|
return /* @__PURE__ */ React85__default.createElement(Radio$1, { ...props, ref });
|
1847
1847
|
});
|
@@ -2715,8 +2715,10 @@ var getIcon2 = (variant) => {
|
|
2715
2715
|
return AltTransportOutline24Icon;
|
2716
2716
|
case "error":
|
2717
2717
|
return ErrorOutline24Icon;
|
2718
|
-
case "
|
2718
|
+
case "global-deviation":
|
2719
2719
|
return WarningFill24Icon;
|
2720
|
+
case "service":
|
2721
|
+
return ServiceFill24Icon;
|
2720
2722
|
}
|
2721
2723
|
};
|
2722
2724
|
var texts10 = createTexts({
|
@@ -2755,6 +2757,12 @@ var texts10 = createTexts({
|
|
2755
2757
|
nn: "Driftsmelding",
|
2756
2758
|
sv: "Servicemeddelande",
|
2757
2759
|
en: "Service message"
|
2760
|
+
},
|
2761
|
+
"global-deviation": {
|
2762
|
+
nb: "Trafikkmelding",
|
2763
|
+
nn: "Trafikkmelding",
|
2764
|
+
sv: "Trafikmeddelande",
|
2765
|
+
en: "Traffic announcement"
|
2758
2766
|
}
|
2759
2767
|
});
|
2760
2768
|
var BaseAlert = ({
|
@@ -2862,7 +2870,7 @@ var StaticAlert = ({
|
|
2862
2870
|
return /* @__PURE__ */ React85__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React85__default.createElement(AlertIcon, { variant: props.variant }), /* @__PURE__ */ React85__default.createElement(Flex, { direction: "column", gap: title ? 2 : void 0, textAlign: "left" }, title && /* @__PURE__ */ React85__default.createElement(Box, { fontWeight: "bold" }, title), /* @__PURE__ */ React85__default.createElement(Box, null, children)));
|
2863
2871
|
};
|
2864
2872
|
var ServiceAlert = ({
|
2865
|
-
variant,
|
2873
|
+
variant = "service",
|
2866
2874
|
children,
|
2867
2875
|
title,
|
2868
2876
|
notification,
|
@@ -2873,9 +2881,8 @@ var ServiceAlert = ({
|
|
2873
2881
|
},
|
2874
2882
|
...boxProps
|
2875
2883
|
}) => {
|
2876
|
-
variant = "service";
|
2877
2884
|
const { t: t2 } = useTranslation();
|
2878
|
-
const styles3 = useMultiStyleConfig("AlertService");
|
2885
|
+
const styles3 = useMultiStyleConfig("AlertService", { variant });
|
2879
2886
|
return /* @__PURE__ */ React85__default.createElement(
|
2880
2887
|
BaseAlert,
|
2881
2888
|
{
|
@@ -2921,12 +2928,11 @@ var ServiceAlert = ({
|
|
2921
2928
|
overflow: "hidden",
|
2922
2929
|
WebkitLineClamp: "1",
|
2923
2930
|
WebkitBoxOrient: "vertical"
|
2924
|
-
}
|
2925
|
-
color: "white"
|
2931
|
+
}
|
2926
2932
|
},
|
2927
2933
|
title
|
2928
2934
|
)),
|
2929
|
-
/* @__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,
|
2935
|
+
/* @__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, null))
|
2930
2936
|
)
|
2931
2937
|
)), /* @__PURE__ */ React85__default.createElement(AccordionPanel, { sx: styles3.serviceMessageContent }, /* @__PURE__ */ React85__default.createElement(Stack$1, { flexDirection: "row", justifyContent: "center", width: "100%" }, /* @__PURE__ */ React85__default.createElement(
|
2932
2938
|
Stack$1,
|
@@ -2940,7 +2946,8 @@ var ServiceAlert = ({
|
|
2940
2946
|
sx: {
|
2941
2947
|
p: {
|
2942
2948
|
padding: "0.8rem 0",
|
2943
|
-
borderBottom: "0.08rem solid
|
2949
|
+
borderBottom: "0.08rem solid",
|
2950
|
+
borderColor: variant === "global-deviation" ? "blackAlpha.400" : "whiteAlpha.400"
|
2944
2951
|
},
|
2945
2952
|
"p:last-child": {
|
2946
2953
|
borderBottom: "none"
|
@@ -10761,6 +10768,11 @@ var config3 = helpers2.defineMultiStyleConfig({
|
|
10761
10768
|
backgroundColor: "banana"
|
10762
10769
|
}
|
10763
10770
|
},
|
10771
|
+
"global-deviation": {
|
10772
|
+
container: {
|
10773
|
+
backgroundColor: "blonde"
|
10774
|
+
}
|
10775
|
+
},
|
10764
10776
|
service: {
|
10765
10777
|
container: {
|
10766
10778
|
backgroundColor: "darkTeal",
|
@@ -10895,24 +10907,16 @@ var config5 = helpers4.defineMultiStyleConfig({
|
|
10895
10907
|
borderTopRadius: "none",
|
10896
10908
|
borderBottomRadius: "md",
|
10897
10909
|
_hover: {
|
10898
|
-
outline: "2px solid"
|
10899
|
-
outlineColor: "blueGreen"
|
10900
|
-
},
|
10901
|
-
_active: {
|
10902
|
-
backgroundColor: "pine",
|
10903
|
-
outlineColor: "pine"
|
10910
|
+
outline: "2px solid"
|
10904
10911
|
}
|
10905
10912
|
},
|
10906
10913
|
outerBox: {
|
10907
10914
|
outline: "1px solid",
|
10908
|
-
outlineColor: "blueGreen",
|
10909
|
-
backgroundColor: "darkTeal",
|
10910
10915
|
borderBottomRadius: "md",
|
10911
10916
|
borderTopRadius: "none",
|
10912
10917
|
width: "100%"
|
10913
10918
|
},
|
10914
10919
|
notificationText: {
|
10915
|
-
color: "white",
|
10916
10920
|
fontWeight: "400",
|
10917
10921
|
fontSize: "1rem",
|
10918
10922
|
pr: "0.375rem"
|
@@ -10920,8 +10924,53 @@ var config5 = helpers4.defineMultiStyleConfig({
|
|
10920
10924
|
serviceMessageContent: {
|
10921
10925
|
paddingX: "0.75rem",
|
10922
10926
|
paddingTop: "0.375rem",
|
10923
|
-
paddingBottom: "0.9375rem"
|
10924
|
-
|
10927
|
+
paddingBottom: "0.9375rem"
|
10928
|
+
}
|
10929
|
+
},
|
10930
|
+
variants: {
|
10931
|
+
"global-deviation": {
|
10932
|
+
container: {
|
10933
|
+
_hover: {
|
10934
|
+
outlineColor: "primrose"
|
10935
|
+
},
|
10936
|
+
_active: {
|
10937
|
+
backgroundColor: "blonde",
|
10938
|
+
outlineColor: "primrose"
|
10939
|
+
},
|
10940
|
+
color: "darkGrey"
|
10941
|
+
},
|
10942
|
+
outerBox: {
|
10943
|
+
outlineColor: "primrose",
|
10944
|
+
backgroundColor: "blonde"
|
10945
|
+
},
|
10946
|
+
notificationText: {
|
10947
|
+
color: "darkGrey"
|
10948
|
+
},
|
10949
|
+
serviceMessageContent: {
|
10950
|
+
color: "darkGrey"
|
10951
|
+
}
|
10952
|
+
},
|
10953
|
+
service: {
|
10954
|
+
container: {
|
10955
|
+
_hover: {
|
10956
|
+
outlineColor: "blueGreen"
|
10957
|
+
},
|
10958
|
+
_active: {
|
10959
|
+
backgroundColor: "pine",
|
10960
|
+
outlineColor: "pine"
|
10961
|
+
},
|
10962
|
+
color: "white"
|
10963
|
+
},
|
10964
|
+
outerBox: {
|
10965
|
+
outlineColor: "blueGreen",
|
10966
|
+
backgroundColor: "darkTeal"
|
10967
|
+
},
|
10968
|
+
notificationText: {
|
10969
|
+
color: "white"
|
10970
|
+
},
|
10971
|
+
serviceMessageContent: {
|
10972
|
+
color: "white"
|
10973
|
+
}
|
10925
10974
|
}
|
10926
10975
|
}
|
10927
10976
|
});
|
package/dist/index.d.mts
CHANGED
@@ -296,7 +296,7 @@ declare const ExpandableItem: ({ children, title, headingLevel, leftIcon, ...res
|
|
296
296
|
|
297
297
|
type BaseAlertProps = BoxProps & {
|
298
298
|
/** The color scheme and icon of the alert */
|
299
|
-
variant: "info" | "success" | "warning" | "alt-transport" | "error" | "service";
|
299
|
+
variant: "info" | "success" | "warning" | "alt-transport" | "error" | "service" | "global-deviation";
|
300
300
|
/** The body content of the alert */
|
301
301
|
children: React.ReactNode;
|
302
302
|
/** The title of the alert */
|
@@ -389,6 +389,8 @@ type ServiceAlertProps = BaseAlertProps & {
|
|
389
389
|
*
|
390
390
|
* Defaults to h3 */
|
391
391
|
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
|
392
|
+
/** The variant of Service Alert. Default: service */
|
393
|
+
variant?: "service" | "global-deviation";
|
392
394
|
};
|
393
395
|
/**
|
394
396
|
* A service alert component.
|
@@ -2528,6 +2530,11 @@ declare const theme: {
|
|
2528
2530
|
backgroundColor: string;
|
2529
2531
|
};
|
2530
2532
|
};
|
2533
|
+
"global-deviation": {
|
2534
|
+
container: {
|
2535
|
+
backgroundColor: string;
|
2536
|
+
};
|
2537
|
+
};
|
2531
2538
|
service: {
|
2532
2539
|
container: {
|
2533
2540
|
backgroundColor: string;
|
@@ -2537,7 +2544,7 @@ declare const theme: {
|
|
2537
2544
|
} | undefined;
|
2538
2545
|
defaultProps?: {
|
2539
2546
|
size?: string | number | undefined;
|
2540
|
-
variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | undefined;
|
2547
|
+
variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | "global-deviation" | undefined;
|
2541
2548
|
colorScheme?: string | undefined;
|
2542
2549
|
} | undefined;
|
2543
2550
|
parts: ("container" | "icon" | "closeButton")[];
|
@@ -2659,23 +2666,15 @@ declare const theme: {
|
|
2659
2666
|
borderBottomRadius: string;
|
2660
2667
|
_hover: {
|
2661
2668
|
outline: string;
|
2662
|
-
outlineColor: string;
|
2663
|
-
};
|
2664
|
-
_active: {
|
2665
|
-
backgroundColor: string;
|
2666
|
-
outlineColor: string;
|
2667
2669
|
};
|
2668
2670
|
};
|
2669
2671
|
outerBox: {
|
2670
2672
|
outline: string;
|
2671
|
-
outlineColor: string;
|
2672
|
-
backgroundColor: string;
|
2673
2673
|
borderBottomRadius: string;
|
2674
2674
|
borderTopRadius: string;
|
2675
2675
|
width: string;
|
2676
2676
|
};
|
2677
2677
|
notificationText: {
|
2678
|
-
color: string;
|
2679
2678
|
fontWeight: string;
|
2680
2679
|
fontSize: string;
|
2681
2680
|
pr: string;
|
@@ -2684,7 +2683,6 @@ declare const theme: {
|
|
2684
2683
|
paddingX: string;
|
2685
2684
|
paddingTop: string;
|
2686
2685
|
paddingBottom: string;
|
2687
|
-
color: string;
|
2688
2686
|
};
|
2689
2687
|
} | undefined;
|
2690
2688
|
sizes?: {
|
@@ -2693,13 +2691,54 @@ declare const theme: {
|
|
2693
2691
|
}>;
|
2694
2692
|
} | undefined;
|
2695
2693
|
variants?: {
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2694
|
+
"global-deviation": {
|
2695
|
+
container: {
|
2696
|
+
_hover: {
|
2697
|
+
outlineColor: string;
|
2698
|
+
};
|
2699
|
+
_active: {
|
2700
|
+
backgroundColor: string;
|
2701
|
+
outlineColor: string;
|
2702
|
+
};
|
2703
|
+
color: string;
|
2704
|
+
};
|
2705
|
+
outerBox: {
|
2706
|
+
outlineColor: string;
|
2707
|
+
backgroundColor: string;
|
2708
|
+
};
|
2709
|
+
notificationText: {
|
2710
|
+
color: string;
|
2711
|
+
};
|
2712
|
+
serviceMessageContent: {
|
2713
|
+
color: string;
|
2714
|
+
};
|
2715
|
+
};
|
2716
|
+
service: {
|
2717
|
+
container: {
|
2718
|
+
_hover: {
|
2719
|
+
outlineColor: string;
|
2720
|
+
};
|
2721
|
+
_active: {
|
2722
|
+
backgroundColor: string;
|
2723
|
+
outlineColor: string;
|
2724
|
+
};
|
2725
|
+
color: string;
|
2726
|
+
};
|
2727
|
+
outerBox: {
|
2728
|
+
outlineColor: string;
|
2729
|
+
backgroundColor: string;
|
2730
|
+
};
|
2731
|
+
notificationText: {
|
2732
|
+
color: string;
|
2733
|
+
};
|
2734
|
+
serviceMessageContent: {
|
2735
|
+
color: string;
|
2736
|
+
};
|
2737
|
+
};
|
2699
2738
|
} | undefined;
|
2700
2739
|
defaultProps?: {
|
2701
2740
|
size?: string | number | undefined;
|
2702
|
-
variant?:
|
2741
|
+
variant?: "service" | "global-deviation" | undefined;
|
2703
2742
|
colorScheme?: string | undefined;
|
2704
2743
|
} | undefined;
|
2705
2744
|
parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
package/dist/index.d.ts
CHANGED
@@ -296,7 +296,7 @@ declare const ExpandableItem: ({ children, title, headingLevel, leftIcon, ...res
|
|
296
296
|
|
297
297
|
type BaseAlertProps = BoxProps & {
|
298
298
|
/** The color scheme and icon of the alert */
|
299
|
-
variant: "info" | "success" | "warning" | "alt-transport" | "error" | "service";
|
299
|
+
variant: "info" | "success" | "warning" | "alt-transport" | "error" | "service" | "global-deviation";
|
300
300
|
/** The body content of the alert */
|
301
301
|
children: React.ReactNode;
|
302
302
|
/** The title of the alert */
|
@@ -389,6 +389,8 @@ type ServiceAlertProps = BaseAlertProps & {
|
|
389
389
|
*
|
390
390
|
* Defaults to h3 */
|
391
391
|
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
|
392
|
+
/** The variant of Service Alert. Default: service */
|
393
|
+
variant?: "service" | "global-deviation";
|
392
394
|
};
|
393
395
|
/**
|
394
396
|
* A service alert component.
|
@@ -2528,6 +2530,11 @@ declare const theme: {
|
|
2528
2530
|
backgroundColor: string;
|
2529
2531
|
};
|
2530
2532
|
};
|
2533
|
+
"global-deviation": {
|
2534
|
+
container: {
|
2535
|
+
backgroundColor: string;
|
2536
|
+
};
|
2537
|
+
};
|
2531
2538
|
service: {
|
2532
2539
|
container: {
|
2533
2540
|
backgroundColor: string;
|
@@ -2537,7 +2544,7 @@ declare const theme: {
|
|
2537
2544
|
} | undefined;
|
2538
2545
|
defaultProps?: {
|
2539
2546
|
size?: string | number | undefined;
|
2540
|
-
variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | undefined;
|
2547
|
+
variant?: "error" | "info" | "success" | "warning" | "alt-transport" | "service" | "global-deviation" | undefined;
|
2541
2548
|
colorScheme?: string | undefined;
|
2542
2549
|
} | undefined;
|
2543
2550
|
parts: ("container" | "icon" | "closeButton")[];
|
@@ -2659,23 +2666,15 @@ declare const theme: {
|
|
2659
2666
|
borderBottomRadius: string;
|
2660
2667
|
_hover: {
|
2661
2668
|
outline: string;
|
2662
|
-
outlineColor: string;
|
2663
|
-
};
|
2664
|
-
_active: {
|
2665
|
-
backgroundColor: string;
|
2666
|
-
outlineColor: string;
|
2667
2669
|
};
|
2668
2670
|
};
|
2669
2671
|
outerBox: {
|
2670
2672
|
outline: string;
|
2671
|
-
outlineColor: string;
|
2672
|
-
backgroundColor: string;
|
2673
2673
|
borderBottomRadius: string;
|
2674
2674
|
borderTopRadius: string;
|
2675
2675
|
width: string;
|
2676
2676
|
};
|
2677
2677
|
notificationText: {
|
2678
|
-
color: string;
|
2679
2678
|
fontWeight: string;
|
2680
2679
|
fontSize: string;
|
2681
2680
|
pr: string;
|
@@ -2684,7 +2683,6 @@ declare const theme: {
|
|
2684
2683
|
paddingX: string;
|
2685
2684
|
paddingTop: string;
|
2686
2685
|
paddingBottom: string;
|
2687
|
-
color: string;
|
2688
2686
|
};
|
2689
2687
|
} | undefined;
|
2690
2688
|
sizes?: {
|
@@ -2693,13 +2691,54 @@ declare const theme: {
|
|
2693
2691
|
}>;
|
2694
2692
|
} | undefined;
|
2695
2693
|
variants?: {
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2694
|
+
"global-deviation": {
|
2695
|
+
container: {
|
2696
|
+
_hover: {
|
2697
|
+
outlineColor: string;
|
2698
|
+
};
|
2699
|
+
_active: {
|
2700
|
+
backgroundColor: string;
|
2701
|
+
outlineColor: string;
|
2702
|
+
};
|
2703
|
+
color: string;
|
2704
|
+
};
|
2705
|
+
outerBox: {
|
2706
|
+
outlineColor: string;
|
2707
|
+
backgroundColor: string;
|
2708
|
+
};
|
2709
|
+
notificationText: {
|
2710
|
+
color: string;
|
2711
|
+
};
|
2712
|
+
serviceMessageContent: {
|
2713
|
+
color: string;
|
2714
|
+
};
|
2715
|
+
};
|
2716
|
+
service: {
|
2717
|
+
container: {
|
2718
|
+
_hover: {
|
2719
|
+
outlineColor: string;
|
2720
|
+
};
|
2721
|
+
_active: {
|
2722
|
+
backgroundColor: string;
|
2723
|
+
outlineColor: string;
|
2724
|
+
};
|
2725
|
+
color: string;
|
2726
|
+
};
|
2727
|
+
outerBox: {
|
2728
|
+
outlineColor: string;
|
2729
|
+
backgroundColor: string;
|
2730
|
+
};
|
2731
|
+
notificationText: {
|
2732
|
+
color: string;
|
2733
|
+
};
|
2734
|
+
serviceMessageContent: {
|
2735
|
+
color: string;
|
2736
|
+
};
|
2737
|
+
};
|
2699
2738
|
} | undefined;
|
2700
2739
|
defaultProps?: {
|
2701
2740
|
size?: string | number | undefined;
|
2702
|
-
variant?:
|
2741
|
+
variant?: "service" | "global-deviation" | undefined;
|
2703
2742
|
colorScheme?: string | undefined;
|
2704
2743
|
} | undefined;
|
2705
2744
|
parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
package/dist/index.js
CHANGED
@@ -3203,8 +3203,10 @@ var init_AlertIcon = __esm({
|
|
3203
3203
|
return sporIconReact.AltTransportOutline24Icon;
|
3204
3204
|
case "error":
|
3205
3205
|
return sporIconReact.ErrorOutline24Icon;
|
3206
|
-
case "
|
3206
|
+
case "global-deviation":
|
3207
3207
|
return sporIconReact.WarningFill24Icon;
|
3208
|
+
case "service":
|
3209
|
+
return sporIconReact.ServiceFill24Icon;
|
3208
3210
|
}
|
3209
3211
|
};
|
3210
3212
|
texts11 = createTexts({
|
@@ -3243,6 +3245,12 @@ var init_AlertIcon = __esm({
|
|
3243
3245
|
nn: "Driftsmelding",
|
3244
3246
|
sv: "Servicemeddelande",
|
3245
3247
|
en: "Service message"
|
3248
|
+
},
|
3249
|
+
"global-deviation": {
|
3250
|
+
nb: "Trafikkmelding",
|
3251
|
+
nn: "Trafikkmelding",
|
3252
|
+
sv: "Trafikmeddelande",
|
3253
|
+
en: "Traffic announcement"
|
3246
3254
|
}
|
3247
3255
|
});
|
3248
3256
|
}
|
@@ -3384,7 +3392,7 @@ var init_ServiceAlert = __esm({
|
|
3384
3392
|
init_BaseAlert();
|
3385
3393
|
init_i18n();
|
3386
3394
|
exports.ServiceAlert = ({
|
3387
|
-
variant,
|
3395
|
+
variant = "service",
|
3388
3396
|
children,
|
3389
3397
|
title,
|
3390
3398
|
notification,
|
@@ -3395,9 +3403,8 @@ var init_ServiceAlert = __esm({
|
|
3395
3403
|
},
|
3396
3404
|
...boxProps
|
3397
3405
|
}) => {
|
3398
|
-
variant = "service";
|
3399
3406
|
const { t: t2 } = useTranslation();
|
3400
|
-
const styles3 = react.useMultiStyleConfig("AlertService");
|
3407
|
+
const styles3 = react.useMultiStyleConfig("AlertService", { variant });
|
3401
3408
|
return /* @__PURE__ */ React86__namespace.default.createElement(
|
3402
3409
|
BaseAlert,
|
3403
3410
|
{
|
@@ -3443,12 +3450,11 @@ var init_ServiceAlert = __esm({
|
|
3443
3450
|
overflow: "hidden",
|
3444
3451
|
WebkitLineClamp: "1",
|
3445
3452
|
WebkitBoxOrient: "vertical"
|
3446
|
-
}
|
3447
|
-
color: "white"
|
3453
|
+
}
|
3448
3454
|
},
|
3449
3455
|
title
|
3450
3456
|
)),
|
3451
|
-
/* @__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,
|
3457
|
+
/* @__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, null))
|
3452
3458
|
)
|
3453
3459
|
)), /* @__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(
|
3454
3460
|
react.Stack,
|
@@ -3462,7 +3468,8 @@ var init_ServiceAlert = __esm({
|
|
3462
3468
|
sx: {
|
3463
3469
|
p: {
|
3464
3470
|
padding: "0.8rem 0",
|
3465
|
-
borderBottom: "0.08rem solid
|
3471
|
+
borderBottom: "0.08rem solid",
|
3472
|
+
borderColor: variant === "global-deviation" ? "blackAlpha.400" : "whiteAlpha.400"
|
3466
3473
|
},
|
3467
3474
|
"p:last-child": {
|
3468
3475
|
borderBottom: "none"
|
@@ -12136,6 +12143,11 @@ var init_alert2 = __esm({
|
|
12136
12143
|
backgroundColor: "banana"
|
12137
12144
|
}
|
12138
12145
|
},
|
12146
|
+
"global-deviation": {
|
12147
|
+
container: {
|
12148
|
+
backgroundColor: "blonde"
|
12149
|
+
}
|
12150
|
+
},
|
12139
12151
|
service: {
|
12140
12152
|
container: {
|
12141
12153
|
backgroundColor: "darkTeal",
|
@@ -12284,24 +12296,16 @@ var init_alert_service = __esm({
|
|
12284
12296
|
borderTopRadius: "none",
|
12285
12297
|
borderBottomRadius: "md",
|
12286
12298
|
_hover: {
|
12287
|
-
outline: "2px solid"
|
12288
|
-
outlineColor: "blueGreen"
|
12289
|
-
},
|
12290
|
-
_active: {
|
12291
|
-
backgroundColor: "pine",
|
12292
|
-
outlineColor: "pine"
|
12299
|
+
outline: "2px solid"
|
12293
12300
|
}
|
12294
12301
|
},
|
12295
12302
|
outerBox: {
|
12296
12303
|
outline: "1px solid",
|
12297
|
-
outlineColor: "blueGreen",
|
12298
|
-
backgroundColor: "darkTeal",
|
12299
12304
|
borderBottomRadius: "md",
|
12300
12305
|
borderTopRadius: "none",
|
12301
12306
|
width: "100%"
|
12302
12307
|
},
|
12303
12308
|
notificationText: {
|
12304
|
-
color: "white",
|
12305
12309
|
fontWeight: "400",
|
12306
12310
|
fontSize: "1rem",
|
12307
12311
|
pr: "0.375rem"
|
@@ -12309,8 +12313,53 @@ var init_alert_service = __esm({
|
|
12309
12313
|
serviceMessageContent: {
|
12310
12314
|
paddingX: "0.75rem",
|
12311
12315
|
paddingTop: "0.375rem",
|
12312
|
-
paddingBottom: "0.9375rem"
|
12313
|
-
|
12316
|
+
paddingBottom: "0.9375rem"
|
12317
|
+
}
|
12318
|
+
},
|
12319
|
+
variants: {
|
12320
|
+
"global-deviation": {
|
12321
|
+
container: {
|
12322
|
+
_hover: {
|
12323
|
+
outlineColor: "primrose"
|
12324
|
+
},
|
12325
|
+
_active: {
|
12326
|
+
backgroundColor: "blonde",
|
12327
|
+
outlineColor: "primrose"
|
12328
|
+
},
|
12329
|
+
color: "darkGrey"
|
12330
|
+
},
|
12331
|
+
outerBox: {
|
12332
|
+
outlineColor: "primrose",
|
12333
|
+
backgroundColor: "blonde"
|
12334
|
+
},
|
12335
|
+
notificationText: {
|
12336
|
+
color: "darkGrey"
|
12337
|
+
},
|
12338
|
+
serviceMessageContent: {
|
12339
|
+
color: "darkGrey"
|
12340
|
+
}
|
12341
|
+
},
|
12342
|
+
service: {
|
12343
|
+
container: {
|
12344
|
+
_hover: {
|
12345
|
+
outlineColor: "blueGreen"
|
12346
|
+
},
|
12347
|
+
_active: {
|
12348
|
+
backgroundColor: "pine",
|
12349
|
+
outlineColor: "pine"
|
12350
|
+
},
|
12351
|
+
color: "white"
|
12352
|
+
},
|
12353
|
+
outerBox: {
|
12354
|
+
outlineColor: "blueGreen",
|
12355
|
+
backgroundColor: "darkTeal"
|
12356
|
+
},
|
12357
|
+
notificationText: {
|
12358
|
+
color: "white"
|
12359
|
+
},
|
12360
|
+
serviceMessageContent: {
|
12361
|
+
color: "white"
|
12362
|
+
}
|
12314
12363
|
}
|
12315
12364
|
}
|
12316
12365
|
});
|
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-
|
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-RK3GOXNY.mjs';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vygruppen/spor-react",
|
3
|
-
"version": "10.
|
3
|
+
"version": "10.9.1",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"@emotion/styled": "^11.11.5",
|
24
24
|
"@internationalized/date": "^3.5.4",
|
25
25
|
"@vygruppen/spor-design-tokens": "^3.7.0",
|
26
|
-
"@vygruppen/spor-icon-react": "^3.
|
26
|
+
"@vygruppen/spor-icon-react": "^3.12.0",
|
27
27
|
"@vygruppen/spor-loader": "^0.4.0",
|
28
28
|
"awesome-phonenumber": "^5.11.0",
|
29
29
|
"deepmerge": "^4.3.1",
|
package/src/alert/AlertIcon.tsx
CHANGED
@@ -5,6 +5,7 @@ import {
|
|
5
5
|
SuccessOutline24Icon,
|
6
6
|
WarningOutline24Icon,
|
7
7
|
WarningFill24Icon,
|
8
|
+
ServiceFill24Icon,
|
8
9
|
} from "@vygruppen/spor-icon-react";
|
9
10
|
import React from "react";
|
10
11
|
import { createTexts, useTranslation } from "../i18n";
|
@@ -39,8 +40,10 @@ const getIcon = (variant: BaseAlertProps["variant"]) => {
|
|
39
40
|
return AltTransportOutline24Icon;
|
40
41
|
case "error":
|
41
42
|
return ErrorOutline24Icon;
|
42
|
-
case "
|
43
|
+
case "global-deviation":
|
43
44
|
return WarningFill24Icon;
|
45
|
+
case "service":
|
46
|
+
return ServiceFill24Icon;
|
44
47
|
}
|
45
48
|
};
|
46
49
|
|
@@ -81,4 +84,10 @@ const texts = createTexts({
|
|
81
84
|
sv: "Servicemeddelande",
|
82
85
|
en: "Service message",
|
83
86
|
},
|
87
|
+
"global-deviation": {
|
88
|
+
nb: "Trafikkmelding",
|
89
|
+
nn: "Trafikkmelding",
|
90
|
+
sv: "Trafikmeddelande",
|
91
|
+
en: "Traffic announcement",
|
92
|
+
},
|
84
93
|
});
|
package/src/alert/BaseAlert.tsx
CHANGED
@@ -33,6 +33,8 @@ type ServiceAlertProps = BaseAlertProps & {
|
|
33
33
|
*
|
34
34
|
* Defaults to h3 */
|
35
35
|
headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
|
36
|
+
/** The variant of Service Alert. Default: service */
|
37
|
+
variant?: "service" | "global-deviation";
|
36
38
|
};
|
37
39
|
/**
|
38
40
|
* A service alert component.
|
@@ -46,7 +48,7 @@ type ServiceAlertProps = BaseAlertProps & {
|
|
46
48
|
* ```
|
47
49
|
*/
|
48
50
|
export const ServiceAlert = ({
|
49
|
-
variant,
|
51
|
+
variant = "service",
|
50
52
|
children,
|
51
53
|
title,
|
52
54
|
notification,
|
@@ -56,9 +58,8 @@ export const ServiceAlert = ({
|
|
56
58
|
onToggle = () => {},
|
57
59
|
...boxProps
|
58
60
|
}: ServiceAlertProps) => {
|
59
|
-
variant = "service";
|
60
61
|
const { t } = useTranslation();
|
61
|
-
const styles = useMultiStyleConfig("AlertService");
|
62
|
+
const styles = useMultiStyleConfig("AlertService", { variant });
|
62
63
|
return (
|
63
64
|
<BaseAlert
|
64
65
|
variant={variant}
|
@@ -101,7 +102,6 @@ export const ServiceAlert = ({
|
|
101
102
|
WebkitLineClamp: "1",
|
102
103
|
WebkitBoxOrient: "vertical",
|
103
104
|
}}
|
104
|
-
color="white"
|
105
105
|
>
|
106
106
|
{title}
|
107
107
|
</Box>
|
@@ -114,7 +114,7 @@ export const ServiceAlert = ({
|
|
114
114
|
</Text>
|
115
115
|
)}
|
116
116
|
|
117
|
-
<AccordionIcon
|
117
|
+
<AccordionIcon />
|
118
118
|
</Flex>
|
119
119
|
</Flex>
|
120
120
|
</Stack>
|
@@ -132,7 +132,11 @@ export const ServiceAlert = ({
|
|
132
132
|
sx={{
|
133
133
|
p: {
|
134
134
|
padding: "0.8rem 0",
|
135
|
-
borderBottom: "0.08rem solid
|
135
|
+
borderBottom: "0.08rem solid",
|
136
|
+
borderColor:
|
137
|
+
variant === "global-deviation"
|
138
|
+
? "blackAlpha.400"
|
139
|
+
: "whiteAlpha.400",
|
136
140
|
},
|
137
141
|
"p:last-child": {
|
138
142
|
borderBottom: "none",
|
@@ -8,7 +8,6 @@ const parts = anatomy("alertService").parts(
|
|
8
8
|
"serviceMessageContent",
|
9
9
|
);
|
10
10
|
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
11
|
-
|
12
11
|
const config = helpers.defineMultiStyleConfig({
|
13
12
|
baseStyle: {
|
14
13
|
container: {
|
@@ -21,23 +20,15 @@ const config = helpers.defineMultiStyleConfig({
|
|
21
20
|
borderBottomRadius: "md",
|
22
21
|
_hover: {
|
23
22
|
outline: "2px solid",
|
24
|
-
outlineColor: "blueGreen",
|
25
|
-
},
|
26
|
-
_active: {
|
27
|
-
backgroundColor: "pine",
|
28
|
-
outlineColor: "pine",
|
29
23
|
},
|
30
24
|
},
|
31
25
|
outerBox: {
|
32
26
|
outline: "1px solid",
|
33
|
-
outlineColor: "blueGreen",
|
34
|
-
backgroundColor: "darkTeal",
|
35
27
|
borderBottomRadius: "md",
|
36
28
|
borderTopRadius: "none",
|
37
29
|
width: "100%",
|
38
30
|
},
|
39
31
|
notificationText: {
|
40
|
-
color: "white",
|
41
32
|
fontWeight: "400",
|
42
33
|
fontSize: "1rem",
|
43
34
|
pr: "0.375rem",
|
@@ -46,7 +37,52 @@ const config = helpers.defineMultiStyleConfig({
|
|
46
37
|
paddingX: "0.75rem",
|
47
38
|
paddingTop: "0.375rem",
|
48
39
|
paddingBottom: "0.9375rem",
|
49
|
-
|
40
|
+
},
|
41
|
+
},
|
42
|
+
variants: {
|
43
|
+
"global-deviation": {
|
44
|
+
container: {
|
45
|
+
_hover: {
|
46
|
+
outlineColor: "primrose",
|
47
|
+
},
|
48
|
+
_active: {
|
49
|
+
backgroundColor: "blonde",
|
50
|
+
outlineColor: "primrose",
|
51
|
+
},
|
52
|
+
color: "darkGrey",
|
53
|
+
},
|
54
|
+
outerBox: {
|
55
|
+
outlineColor: "primrose",
|
56
|
+
backgroundColor: "blonde",
|
57
|
+
},
|
58
|
+
notificationText: {
|
59
|
+
color: "darkGrey",
|
60
|
+
},
|
61
|
+
serviceMessageContent: {
|
62
|
+
color: "darkGrey",
|
63
|
+
},
|
64
|
+
},
|
65
|
+
service: {
|
66
|
+
container: {
|
67
|
+
_hover: {
|
68
|
+
outlineColor: "blueGreen",
|
69
|
+
},
|
70
|
+
_active: {
|
71
|
+
backgroundColor: "pine",
|
72
|
+
outlineColor: "pine",
|
73
|
+
},
|
74
|
+
color: "white",
|
75
|
+
},
|
76
|
+
outerBox: {
|
77
|
+
outlineColor: "blueGreen",
|
78
|
+
backgroundColor: "darkTeal",
|
79
|
+
},
|
80
|
+
notificationText: {
|
81
|
+
color: "white",
|
82
|
+
},
|
83
|
+
serviceMessageContent: {
|
84
|
+
color: "white",
|
85
|
+
},
|
50
86
|
},
|
51
87
|
},
|
52
88
|
});
|