@vygruppen/spor-react 10.6.1 → 10.7.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.
- package/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +16 -0
- package/dist/{CountryCodeSelect-SIB4RO26.mjs → CountryCodeSelect-NZI7KBTH.mjs} +1 -1
- package/dist/{chunk-RQ4CWVFZ.mjs → chunk-Q3JX25BX.mjs} +71 -59
- package/dist/index.d.mts +26 -16
- package/dist/index.d.ts +26 -16
- package/dist/index.js +72 -60
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/alert/ServiceAlert.tsx +77 -77
- package/src/loader/ProgressBar.tsx +10 -2
- package/src/theme/components/alert-service.ts +5 -4
- package/src/theme/components/divider.ts +36 -35
- package/src/theme/components/progress-bar.ts +9 -8
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@10.
|
2
|
+
> @vygruppen/spor-react@10.7.0 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -9,12 +9,12 @@
|
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m539.38 KB[39m
|
13
|
+
[32mCJS[39m ⚡️ Build success in 2260ms
|
12
14
|
[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
|
-
[
|
17
|
-
[
|
18
|
-
[32mDTS[39m
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m339.80 KB[39m
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m339.80 KB[39m
|
15
|
+
[32mESM[39m [1mdist/CountryCodeSelect-NZI7KBTH.mjs [22m[32m1.22 KB[39m
|
16
|
+
[32mESM[39m [1mdist/chunk-Q3JX25BX.mjs [22m[32m425.89 KB[39m
|
17
|
+
[32mESM[39m ⚡️ Build success in 2261ms
|
18
|
+
[32mDTS[39m ⚡️ Build success in 15580ms
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m340.55 KB[39m
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m340.55 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 10.7.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 13a1c22: ProgressBar: New isActive prop
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- 4603ee1: Divider: Update styling for dashed variant
|
12
|
+
|
13
|
+
## 10.6.2
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- 297ab85: ServiceAlert: Fix bug with border
|
18
|
+
|
3
19
|
## 10.6.1
|
4
20
|
|
5
21
|
### Patch Changes
|
@@ -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-NZI7KBTH.mjs'));
|
1845
1845
|
var Radio = forwardRef((props, ref) => {
|
1846
1846
|
return /* @__PURE__ */ React85__default.createElement(Radio$1, { ...props, ref });
|
1847
1847
|
});
|
@@ -2323,6 +2323,7 @@ var ProgressBar = ({
|
|
2323
2323
|
height = "0.5rem",
|
2324
2324
|
width = "100%",
|
2325
2325
|
"aria-label": ariaLabel,
|
2326
|
+
isActive = true,
|
2326
2327
|
...rest
|
2327
2328
|
}) => {
|
2328
2329
|
const { t: t2 } = useTranslation();
|
@@ -2335,7 +2336,7 @@ var ProgressBar = ({
|
|
2335
2336
|
value,
|
2336
2337
|
"aria-label": ariaLabel || t2(texts6.label(value))
|
2337
2338
|
});
|
2338
|
-
const styles3 = useMultiStyleConfig("ProgressBar", {});
|
2339
|
+
const styles3 = useMultiStyleConfig("ProgressBar", { isActive });
|
2339
2340
|
return /* @__PURE__ */ React85__default.createElement(React85__default.Fragment, null, /* @__PURE__ */ React85__default.createElement(
|
2340
2341
|
Box,
|
2341
2342
|
{
|
@@ -2344,7 +2345,14 @@ var ProgressBar = ({
|
|
2344
2345
|
__css: styles3.container,
|
2345
2346
|
...rest
|
2346
2347
|
},
|
2347
|
-
/* @__PURE__ */ React85__default.createElement(Box, { width, __css: styles3.background }, /* @__PURE__ */ React85__default.createElement(
|
2348
|
+
/* @__PURE__ */ React85__default.createElement(Box, { width, __css: styles3.background }, /* @__PURE__ */ React85__default.createElement(
|
2349
|
+
Box,
|
2350
|
+
{
|
2351
|
+
__css: styles3.progress,
|
2352
|
+
height,
|
2353
|
+
width: isActive ? `${value}%` : "100%"
|
2354
|
+
}
|
2355
|
+
)),
|
2348
2356
|
currentLoadingText && /* @__PURE__ */ React85__default.createElement(Text, { sx: styles3.description, ...labelProps }, currentLoadingText)
|
2349
2357
|
));
|
2350
2358
|
};
|
@@ -2868,14 +2876,14 @@ var ServiceAlert = ({
|
|
2868
2876
|
variant = "service";
|
2869
2877
|
const { t: t2 } = useTranslation();
|
2870
2878
|
const styles3 = useMultiStyleConfig("AlertService");
|
2871
|
-
return /* @__PURE__ */ React85__default.createElement(
|
2879
|
+
return /* @__PURE__ */ React85__default.createElement(
|
2872
2880
|
BaseAlert,
|
2873
2881
|
{
|
2874
2882
|
variant,
|
2875
2883
|
...boxProps,
|
2876
2884
|
paddingX: 0,
|
2877
2885
|
paddingY: 0,
|
2878
|
-
sx: styles3.
|
2886
|
+
sx: styles3.outerBox
|
2879
2887
|
},
|
2880
2888
|
/* @__PURE__ */ React85__default.createElement(
|
2881
2889
|
Accordion$1,
|
@@ -2883,7 +2891,9 @@ var ServiceAlert = ({
|
|
2883
2891
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
2884
2892
|
defaultIndex: defaultOpen ? 0 : -1,
|
2885
2893
|
allowToggle: true,
|
2886
|
-
flexGrow:
|
2894
|
+
flexGrow: 1,
|
2895
|
+
sx: { outline: "none" },
|
2896
|
+
variant
|
2887
2897
|
},
|
2888
2898
|
/* @__PURE__ */ React85__default.createElement(AccordionItem, null, /* @__PURE__ */ React85__default.createElement(AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React85__default.createElement(
|
2889
2899
|
Stack$1,
|
@@ -2891,14 +2901,14 @@ var ServiceAlert = ({
|
|
2891
2901
|
flexDirection: "row",
|
2892
2902
|
justifyContent: "center",
|
2893
2903
|
width: "100%",
|
2894
|
-
paddingX:
|
2904
|
+
paddingX: 2
|
2895
2905
|
},
|
2896
2906
|
/* @__PURE__ */ React85__default.createElement(
|
2897
2907
|
Flex,
|
2898
2908
|
{
|
2899
2909
|
justifyContent: "space-between",
|
2900
2910
|
alignItems: "center",
|
2901
|
-
flexGrow:
|
2911
|
+
flexGrow: 1,
|
2902
2912
|
maxWidth: contentWidth
|
2903
2913
|
},
|
2904
2914
|
/* @__PURE__ */ React85__default.createElement(Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React85__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React85__default.createElement(
|
@@ -2919,11 +2929,11 @@ var ServiceAlert = ({
|
|
2919
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, { color: "white" }))
|
2920
2930
|
)
|
2921
2931
|
)), /* @__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
|
-
|
2932
|
+
Stack$1,
|
2923
2933
|
{
|
2924
|
-
justifyContent: "
|
2934
|
+
justifyContent: "center",
|
2925
2935
|
alignItems: "center",
|
2926
|
-
flexGrow:
|
2936
|
+
flexGrow: 1,
|
2927
2937
|
maxWidth: contentWidth,
|
2928
2938
|
flexFlow: "column",
|
2929
2939
|
gap: 2,
|
@@ -2940,7 +2950,7 @@ var ServiceAlert = ({
|
|
2940
2950
|
children
|
2941
2951
|
))))
|
2942
2952
|
)
|
2943
|
-
)
|
2953
|
+
);
|
2944
2954
|
};
|
2945
2955
|
var texts12 = createTexts({
|
2946
2956
|
notification: (notification) => {
|
@@ -10869,7 +10879,7 @@ var alert_expandable_default = config4;
|
|
10869
10879
|
// src/theme/components/alert-service.ts
|
10870
10880
|
var parts3 = anatomy("alertService").parts(
|
10871
10881
|
"container",
|
10872
|
-
"
|
10882
|
+
"outerBox",
|
10873
10883
|
"notificationText",
|
10874
10884
|
"serviceMessageContent"
|
10875
10885
|
);
|
@@ -10883,7 +10893,7 @@ var config5 = helpers4.defineMultiStyleConfig({
|
|
10883
10893
|
transitionProperty: "outline, border-radius",
|
10884
10894
|
transitionDuration: "fast",
|
10885
10895
|
borderTopRadius: "none",
|
10886
|
-
borderBottomRadius: "
|
10896
|
+
borderBottomRadius: "md",
|
10887
10897
|
_hover: {
|
10888
10898
|
outline: "2px solid",
|
10889
10899
|
outlineColor: "blueGreen"
|
@@ -10893,12 +10903,13 @@ var config5 = helpers4.defineMultiStyleConfig({
|
|
10893
10903
|
outlineColor: "pine"
|
10894
10904
|
}
|
10895
10905
|
},
|
10896
|
-
|
10906
|
+
outerBox: {
|
10897
10907
|
outline: "1px solid",
|
10898
10908
|
outlineColor: "blueGreen",
|
10899
10909
|
backgroundColor: "darkTeal",
|
10900
|
-
borderBottomRadius: "
|
10901
|
-
borderTopRadius: "none"
|
10910
|
+
borderBottomRadius: "md",
|
10911
|
+
borderTopRadius: "none",
|
10912
|
+
width: "100%"
|
10902
10913
|
},
|
10903
10914
|
notificationText: {
|
10904
10915
|
color: "white",
|
@@ -12022,37 +12033,41 @@ var config14 = helpers8.defineMultiStyleConfig({
|
|
12022
12033
|
}
|
12023
12034
|
});
|
12024
12035
|
var datepicker_default = config14;
|
12025
|
-
var
|
12026
|
-
|
12027
|
-
|
12028
|
-
|
12029
|
-
|
12030
|
-
})
|
12031
|
-
|
12032
|
-
|
12033
|
-
|
12034
|
-
|
12035
|
-
|
12036
|
-
|
12037
|
-
|
12038
|
-
|
12039
|
-
|
12040
|
-
|
12041
|
-
|
12036
|
+
var isSolid = (props) => props.variant === "solid";
|
12037
|
+
var isDashed = (props) => props.variant === "dashed";
|
12038
|
+
var divider_default = defineStyleConfig({
|
12039
|
+
baseStyle: (props) => ({
|
12040
|
+
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props)
|
12041
|
+
}),
|
12042
|
+
variants: {
|
12043
|
+
solid: {
|
12044
|
+
borderStyle: "solid"
|
12045
|
+
},
|
12046
|
+
dashed: (props) => ({
|
12047
|
+
backgroundImage: `repeating-linear-gradient(90deg, ${mode("blackAlpha.300", "whiteAlpha.300")(props)}, ${mode("blackAlpha.300", "whiteAlpha.300")(props)} 4px, transparent 4px, transparent 10px)`,
|
12048
|
+
backgroundPosition: "left bottom",
|
12049
|
+
backgroundRepeat: "repeat-x",
|
12050
|
+
backgroundSize: "100% 3px",
|
12051
|
+
borderRadius: props.size === "sm" ? "0.5px" : props.size === "md" ? "1px" : "1.5px"
|
12052
|
+
})
|
12042
12053
|
},
|
12043
|
-
|
12044
|
-
|
12045
|
-
|
12054
|
+
sizes: {
|
12055
|
+
sm: (props) => ({
|
12056
|
+
borderWidth: isSolid(props) ? "1px" : void 0,
|
12057
|
+
borderRadius: isSolid(props) ? "0.5px" : void 0,
|
12058
|
+
height: isDashed(props) ? "1px" : void 0
|
12059
|
+
}),
|
12060
|
+
md: (props) => ({
|
12061
|
+
borderWidth: isSolid(props) ? "2px" : void 0,
|
12062
|
+
borderRadius: isSolid(props) ? "1px" : "10px",
|
12063
|
+
height: isDashed(props) ? "2px" : void 0
|
12064
|
+
}),
|
12065
|
+
lg: (props) => ({
|
12066
|
+
borderWidth: isSolid(props) ? "3px" : void 0,
|
12067
|
+
borderRadius: isSolid(props) ? "1.5px" : void 0,
|
12068
|
+
height: isDashed(props) ? "3px" : void 0
|
12069
|
+
})
|
12046
12070
|
},
|
12047
|
-
lg: {
|
12048
|
-
borderWidth: "3px",
|
12049
|
-
borderRadius: "1.5px"
|
12050
|
-
}
|
12051
|
-
};
|
12052
|
-
var divider_default = defineStyleConfig({
|
12053
|
-
baseStyle: baseStyle43,
|
12054
|
-
variants: variants14,
|
12055
|
-
sizes: sizes25,
|
12056
12071
|
defaultProps: {
|
12057
12072
|
variant: "solid",
|
12058
12073
|
size: "md"
|
@@ -13011,7 +13026,7 @@ var link_default = config24;
|
|
13011
13026
|
|
13012
13027
|
// src/theme/components/list.ts
|
13013
13028
|
var { defineMultiStyleConfig: defineMultiStyleConfig28, definePartsStyle: definePartsStyle28 } = createMultiStyleConfigHelpers(listAnatomy.keys);
|
13014
|
-
var
|
13029
|
+
var baseStyle43 = definePartsStyle28({
|
13015
13030
|
container: {
|
13016
13031
|
fontSize: ["mobile.sm", "desktop.sm"]
|
13017
13032
|
},
|
@@ -13025,7 +13040,7 @@ var baseStyle44 = definePartsStyle28({
|
|
13025
13040
|
}
|
13026
13041
|
});
|
13027
13042
|
var list_default = defineMultiStyleConfig28({
|
13028
|
-
baseStyle:
|
13043
|
+
baseStyle: baseStyle43
|
13029
13044
|
});
|
13030
13045
|
function outlineBorder(state2, props) {
|
13031
13046
|
switch (state2) {
|
@@ -13474,19 +13489,16 @@ var config31 = helpers23.defineMultiStyleConfig({
|
|
13474
13489
|
},
|
13475
13490
|
background: {
|
13476
13491
|
display: "flex",
|
13477
|
-
backgroundColor: mode(
|
13492
|
+
backgroundColor: props.isActive ? mode(
|
13478
13493
|
"brand.surface.default.dark",
|
13479
13494
|
"brand.surface.default.light"
|
13480
|
-
)(props),
|
13495
|
+
)(props) : void 0,
|
13481
13496
|
borderRadius: "sm",
|
13482
13497
|
justifyContent: "flex-start",
|
13483
13498
|
marginX: "auto"
|
13484
13499
|
},
|
13485
13500
|
progress: {
|
13486
|
-
backgroundColor: mode(
|
13487
|
-
"brand.surface.active.light",
|
13488
|
-
"brand.surface.active.dark"
|
13489
|
-
)(props),
|
13501
|
+
backgroundColor: props.isActive ? mode("brand.surface.active.light", "brand.surface.active.dark")(props) : mode("icon.disabled.light", "icon.disabled.dark")(props),
|
13490
13502
|
borderRadius: "sm",
|
13491
13503
|
maxWidth: "100%",
|
13492
13504
|
transition: "width .2s ease-out"
|
@@ -14753,17 +14765,17 @@ function useSizes({
|
|
14753
14765
|
getNodes,
|
14754
14766
|
observeMutation = true
|
14755
14767
|
}) {
|
14756
|
-
const [
|
14768
|
+
const [sizes25, setSizes] = useState([]);
|
14757
14769
|
const [count, setCount] = useState(0);
|
14758
14770
|
useSafeLayoutEffect(() => {
|
14759
14771
|
const elements = getNodes();
|
14760
14772
|
const cleanups = elements.map(
|
14761
14773
|
(element, index) => trackElementSize(element, (size2) => {
|
14762
|
-
setSizes((
|
14774
|
+
setSizes((sizes26) => {
|
14763
14775
|
return [
|
14764
|
-
...
|
14776
|
+
...sizes26.slice(0, index),
|
14765
14777
|
size2,
|
14766
|
-
...
|
14778
|
+
...sizes26.slice(index + 1)
|
14767
14779
|
];
|
14768
14780
|
});
|
14769
14781
|
})
|
@@ -14782,7 +14794,7 @@ function useSizes({
|
|
14782
14794
|
});
|
14783
14795
|
};
|
14784
14796
|
}, [count]);
|
14785
|
-
return
|
14797
|
+
return sizes25;
|
14786
14798
|
}
|
14787
14799
|
function isRef(ref) {
|
14788
14800
|
return typeof ref === "object" && ref !== null && "current" in ref;
|
package/dist/index.d.mts
CHANGED
@@ -1760,6 +1760,8 @@ type ProgressBarProps = BoxProps & {
|
|
1760
1760
|
* Defaults to 5000 (5 seconds).
|
1761
1761
|
*/
|
1762
1762
|
labelRotationDelay?: number;
|
1763
|
+
/** Pass to disable the color of the component */
|
1764
|
+
isActive?: boolean;
|
1763
1765
|
};
|
1764
1766
|
/**
|
1765
1767
|
* Shows the progress of a loading process.
|
@@ -1788,7 +1790,7 @@ type ProgressBarProps = BoxProps & {
|
|
1788
1790
|
* <ProgressBar value={50} aria-label="Loading..." />
|
1789
1791
|
* ```
|
1790
1792
|
*/
|
1791
|
-
declare const ProgressBar: ({ value, label, labelRotationDelay, height, width, "aria-label": ariaLabel, ...rest }: ProgressBarProps) => React.JSX.Element;
|
1793
|
+
declare const ProgressBar: ({ value, label, labelRotationDelay, height, width, "aria-label": ariaLabel, isActive, ...rest }: ProgressBarProps) => React.JSX.Element;
|
1792
1794
|
|
1793
1795
|
type ProgressLoaderProps = BoxProps & {
|
1794
1796
|
/** The percentage of progress made.
|
@@ -2664,12 +2666,13 @@ declare const theme: {
|
|
2664
2666
|
outlineColor: string;
|
2665
2667
|
};
|
2666
2668
|
};
|
2667
|
-
|
2669
|
+
outerBox: {
|
2668
2670
|
outline: string;
|
2669
2671
|
outlineColor: string;
|
2670
2672
|
backgroundColor: string;
|
2671
2673
|
borderBottomRadius: string;
|
2672
2674
|
borderTopRadius: string;
|
2675
|
+
width: string;
|
2673
2676
|
};
|
2674
2677
|
notificationText: {
|
2675
2678
|
color: string;
|
@@ -2686,12 +2689,12 @@ declare const theme: {
|
|
2686
2689
|
} | undefined;
|
2687
2690
|
sizes?: {
|
2688
2691
|
[key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
|
2689
|
-
keys: ("container" | "
|
2692
|
+
keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2690
2693
|
}>;
|
2691
2694
|
} | undefined;
|
2692
2695
|
variants?: {
|
2693
2696
|
[key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
|
2694
|
-
keys: ("container" | "
|
2697
|
+
keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2695
2698
|
}>;
|
2696
2699
|
} | undefined;
|
2697
2700
|
defaultProps?: {
|
@@ -2699,7 +2702,7 @@ declare const theme: {
|
|
2699
2702
|
variant?: string | number | undefined;
|
2700
2703
|
colorScheme?: string | undefined;
|
2701
2704
|
} | undefined;
|
2702
|
-
parts: ("container" | "
|
2705
|
+
parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2703
2706
|
};
|
2704
2707
|
Badge: {
|
2705
2708
|
baseStyle?: (({ colorScheme }: _chakra_ui_styled_system.StyleFunctionProps) => {
|
@@ -3758,25 +3761,32 @@ declare const theme: {
|
|
3758
3761
|
borderColor: string;
|
3759
3762
|
}) | undefined;
|
3760
3763
|
sizes?: {
|
3761
|
-
sm: {
|
3762
|
-
borderWidth: string;
|
3763
|
-
borderRadius: string;
|
3764
|
+
sm: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3765
|
+
borderWidth: string | undefined;
|
3766
|
+
borderRadius: string | undefined;
|
3767
|
+
height: string | undefined;
|
3764
3768
|
};
|
3765
|
-
md: {
|
3766
|
-
borderWidth: string;
|
3769
|
+
md: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3770
|
+
borderWidth: string | undefined;
|
3767
3771
|
borderRadius: string;
|
3772
|
+
height: string | undefined;
|
3768
3773
|
};
|
3769
|
-
lg: {
|
3770
|
-
borderWidth: string;
|
3771
|
-
borderRadius: string;
|
3774
|
+
lg: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3775
|
+
borderWidth: string | undefined;
|
3776
|
+
borderRadius: string | undefined;
|
3777
|
+
height: string | undefined;
|
3772
3778
|
};
|
3773
3779
|
} | undefined;
|
3774
3780
|
variants?: {
|
3775
3781
|
solid: {
|
3776
3782
|
borderStyle: string;
|
3777
3783
|
};
|
3778
|
-
dashed: {
|
3779
|
-
|
3784
|
+
dashed: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3785
|
+
backgroundImage: string;
|
3786
|
+
backgroundPosition: string;
|
3787
|
+
backgroundRepeat: string;
|
3788
|
+
backgroundSize: string;
|
3789
|
+
borderRadius: string;
|
3780
3790
|
};
|
3781
3791
|
} | undefined;
|
3782
3792
|
defaultProps?: {
|
@@ -5452,7 +5462,7 @@ declare const theme: {
|
|
5452
5462
|
};
|
5453
5463
|
background: {
|
5454
5464
|
display: string;
|
5455
|
-
backgroundColor: string;
|
5465
|
+
backgroundColor: string | undefined;
|
5456
5466
|
borderRadius: string;
|
5457
5467
|
justifyContent: string;
|
5458
5468
|
marginX: string;
|
package/dist/index.d.ts
CHANGED
@@ -1760,6 +1760,8 @@ type ProgressBarProps = BoxProps & {
|
|
1760
1760
|
* Defaults to 5000 (5 seconds).
|
1761
1761
|
*/
|
1762
1762
|
labelRotationDelay?: number;
|
1763
|
+
/** Pass to disable the color of the component */
|
1764
|
+
isActive?: boolean;
|
1763
1765
|
};
|
1764
1766
|
/**
|
1765
1767
|
* Shows the progress of a loading process.
|
@@ -1788,7 +1790,7 @@ type ProgressBarProps = BoxProps & {
|
|
1788
1790
|
* <ProgressBar value={50} aria-label="Loading..." />
|
1789
1791
|
* ```
|
1790
1792
|
*/
|
1791
|
-
declare const ProgressBar: ({ value, label, labelRotationDelay, height, width, "aria-label": ariaLabel, ...rest }: ProgressBarProps) => React.JSX.Element;
|
1793
|
+
declare const ProgressBar: ({ value, label, labelRotationDelay, height, width, "aria-label": ariaLabel, isActive, ...rest }: ProgressBarProps) => React.JSX.Element;
|
1792
1794
|
|
1793
1795
|
type ProgressLoaderProps = BoxProps & {
|
1794
1796
|
/** The percentage of progress made.
|
@@ -2664,12 +2666,13 @@ declare const theme: {
|
|
2664
2666
|
outlineColor: string;
|
2665
2667
|
};
|
2666
2668
|
};
|
2667
|
-
|
2669
|
+
outerBox: {
|
2668
2670
|
outline: string;
|
2669
2671
|
outlineColor: string;
|
2670
2672
|
backgroundColor: string;
|
2671
2673
|
borderBottomRadius: string;
|
2672
2674
|
borderTopRadius: string;
|
2675
|
+
width: string;
|
2673
2676
|
};
|
2674
2677
|
notificationText: {
|
2675
2678
|
color: string;
|
@@ -2686,12 +2689,12 @@ declare const theme: {
|
|
2686
2689
|
} | undefined;
|
2687
2690
|
sizes?: {
|
2688
2691
|
[key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
|
2689
|
-
keys: ("container" | "
|
2692
|
+
keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2690
2693
|
}>;
|
2691
2694
|
} | undefined;
|
2692
2695
|
variants?: {
|
2693
2696
|
[key: string]: _chakra_ui_styled_system.PartsStyleInterpolation<{
|
2694
|
-
keys: ("container" | "
|
2697
|
+
keys: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2695
2698
|
}>;
|
2696
2699
|
} | undefined;
|
2697
2700
|
defaultProps?: {
|
@@ -2699,7 +2702,7 @@ declare const theme: {
|
|
2699
2702
|
variant?: string | number | undefined;
|
2700
2703
|
colorScheme?: string | undefined;
|
2701
2704
|
} | undefined;
|
2702
|
-
parts: ("container" | "
|
2705
|
+
parts: ("container" | "outerBox" | "serviceMessageContent" | "notificationText")[];
|
2703
2706
|
};
|
2704
2707
|
Badge: {
|
2705
2708
|
baseStyle?: (({ colorScheme }: _chakra_ui_styled_system.StyleFunctionProps) => {
|
@@ -3758,25 +3761,32 @@ declare const theme: {
|
|
3758
3761
|
borderColor: string;
|
3759
3762
|
}) | undefined;
|
3760
3763
|
sizes?: {
|
3761
|
-
sm: {
|
3762
|
-
borderWidth: string;
|
3763
|
-
borderRadius: string;
|
3764
|
+
sm: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3765
|
+
borderWidth: string | undefined;
|
3766
|
+
borderRadius: string | undefined;
|
3767
|
+
height: string | undefined;
|
3764
3768
|
};
|
3765
|
-
md: {
|
3766
|
-
borderWidth: string;
|
3769
|
+
md: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3770
|
+
borderWidth: string | undefined;
|
3767
3771
|
borderRadius: string;
|
3772
|
+
height: string | undefined;
|
3768
3773
|
};
|
3769
|
-
lg: {
|
3770
|
-
borderWidth: string;
|
3771
|
-
borderRadius: string;
|
3774
|
+
lg: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3775
|
+
borderWidth: string | undefined;
|
3776
|
+
borderRadius: string | undefined;
|
3777
|
+
height: string | undefined;
|
3772
3778
|
};
|
3773
3779
|
} | undefined;
|
3774
3780
|
variants?: {
|
3775
3781
|
solid: {
|
3776
3782
|
borderStyle: string;
|
3777
3783
|
};
|
3778
|
-
dashed: {
|
3779
|
-
|
3784
|
+
dashed: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3785
|
+
backgroundImage: string;
|
3786
|
+
backgroundPosition: string;
|
3787
|
+
backgroundRepeat: string;
|
3788
|
+
backgroundSize: string;
|
3789
|
+
borderRadius: string;
|
3780
3790
|
};
|
3781
3791
|
} | undefined;
|
3782
3792
|
defaultProps?: {
|
@@ -5452,7 +5462,7 @@ declare const theme: {
|
|
5452
5462
|
};
|
5453
5463
|
background: {
|
5454
5464
|
display: string;
|
5455
|
-
backgroundColor: string;
|
5465
|
+
backgroundColor: string | undefined;
|
5456
5466
|
borderRadius: string;
|
5457
5467
|
justifyContent: string;
|
5458
5468
|
marginX: string;
|
package/dist/index.js
CHANGED
@@ -2726,6 +2726,7 @@ var init_ProgressBar = __esm({
|
|
2726
2726
|
height = "0.5rem",
|
2727
2727
|
width = "100%",
|
2728
2728
|
"aria-label": ariaLabel,
|
2729
|
+
isActive = true,
|
2729
2730
|
...rest
|
2730
2731
|
}) => {
|
2731
2732
|
const { t: t2 } = useTranslation();
|
@@ -2738,7 +2739,7 @@ var init_ProgressBar = __esm({
|
|
2738
2739
|
value,
|
2739
2740
|
"aria-label": ariaLabel || t2(texts7.label(value))
|
2740
2741
|
});
|
2741
|
-
const styles3 = react.useMultiStyleConfig("ProgressBar", {});
|
2742
|
+
const styles3 = react.useMultiStyleConfig("ProgressBar", { isActive });
|
2742
2743
|
return /* @__PURE__ */ React86__namespace.default.createElement(React86__namespace.default.Fragment, null, /* @__PURE__ */ React86__namespace.default.createElement(
|
2743
2744
|
react.Box,
|
2744
2745
|
{
|
@@ -2747,7 +2748,14 @@ var init_ProgressBar = __esm({
|
|
2747
2748
|
__css: styles3.container,
|
2748
2749
|
...rest
|
2749
2750
|
},
|
2750
|
-
/* @__PURE__ */ React86__namespace.default.createElement(react.Box, { width, __css: styles3.background }, /* @__PURE__ */ React86__namespace.default.createElement(
|
2751
|
+
/* @__PURE__ */ React86__namespace.default.createElement(react.Box, { width, __css: styles3.background }, /* @__PURE__ */ React86__namespace.default.createElement(
|
2752
|
+
react.Box,
|
2753
|
+
{
|
2754
|
+
__css: styles3.progress,
|
2755
|
+
height,
|
2756
|
+
width: isActive ? `${value}%` : "100%"
|
2757
|
+
}
|
2758
|
+
)),
|
2751
2759
|
currentLoadingText && /* @__PURE__ */ React86__namespace.default.createElement(react.Text, { sx: styles3.description, ...labelProps }, currentLoadingText)
|
2752
2760
|
));
|
2753
2761
|
};
|
@@ -3390,14 +3398,14 @@ var init_ServiceAlert = __esm({
|
|
3390
3398
|
variant = "service";
|
3391
3399
|
const { t: t2 } = useTranslation();
|
3392
3400
|
const styles3 = react.useMultiStyleConfig("AlertService");
|
3393
|
-
return /* @__PURE__ */ React86__namespace.default.createElement(
|
3401
|
+
return /* @__PURE__ */ React86__namespace.default.createElement(
|
3394
3402
|
BaseAlert,
|
3395
3403
|
{
|
3396
3404
|
variant,
|
3397
3405
|
...boxProps,
|
3398
3406
|
paddingX: 0,
|
3399
3407
|
paddingY: 0,
|
3400
|
-
sx: styles3.
|
3408
|
+
sx: styles3.outerBox
|
3401
3409
|
},
|
3402
3410
|
/* @__PURE__ */ React86__namespace.default.createElement(
|
3403
3411
|
react.Accordion,
|
@@ -3405,7 +3413,9 @@ var init_ServiceAlert = __esm({
|
|
3405
3413
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
3406
3414
|
defaultIndex: defaultOpen ? 0 : -1,
|
3407
3415
|
allowToggle: true,
|
3408
|
-
flexGrow:
|
3416
|
+
flexGrow: 1,
|
3417
|
+
sx: { outline: "none" },
|
3418
|
+
variant
|
3409
3419
|
},
|
3410
3420
|
/* @__PURE__ */ React86__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React86__namespace.default.createElement(react.AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React86__namespace.default.createElement(
|
3411
3421
|
react.Stack,
|
@@ -3413,14 +3423,14 @@ var init_ServiceAlert = __esm({
|
|
3413
3423
|
flexDirection: "row",
|
3414
3424
|
justifyContent: "center",
|
3415
3425
|
width: "100%",
|
3416
|
-
paddingX:
|
3426
|
+
paddingX: 2
|
3417
3427
|
},
|
3418
3428
|
/* @__PURE__ */ React86__namespace.default.createElement(
|
3419
3429
|
react.Flex,
|
3420
3430
|
{
|
3421
3431
|
justifyContent: "space-between",
|
3422
3432
|
alignItems: "center",
|
3423
|
-
flexGrow:
|
3433
|
+
flexGrow: 1,
|
3424
3434
|
maxWidth: contentWidth
|
3425
3435
|
},
|
3426
3436
|
/* @__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 +3451,11 @@ var init_ServiceAlert = __esm({
|
|
3441
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, { color: "white" }))
|
3442
3452
|
)
|
3443
3453
|
)), /* @__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.
|
3454
|
+
react.Stack,
|
3445
3455
|
{
|
3446
|
-
justifyContent: "
|
3456
|
+
justifyContent: "center",
|
3447
3457
|
alignItems: "center",
|
3448
|
-
flexGrow:
|
3458
|
+
flexGrow: 1,
|
3449
3459
|
maxWidth: contentWidth,
|
3450
3460
|
flexFlow: "column",
|
3451
3461
|
gap: 2,
|
@@ -3462,7 +3472,7 @@ var init_ServiceAlert = __esm({
|
|
3462
3472
|
children
|
3463
3473
|
))))
|
3464
3474
|
)
|
3465
|
-
)
|
3475
|
+
);
|
3466
3476
|
};
|
3467
3477
|
texts13 = createTexts({
|
3468
3478
|
notification: (notification) => {
|
@@ -12258,7 +12268,7 @@ var init_alert_service = __esm({
|
|
12258
12268
|
init_dist3();
|
12259
12269
|
parts3 = anatomy("alertService").parts(
|
12260
12270
|
"container",
|
12261
|
-
"
|
12271
|
+
"outerBox",
|
12262
12272
|
"notificationText",
|
12263
12273
|
"serviceMessageContent"
|
12264
12274
|
);
|
@@ -12272,7 +12282,7 @@ var init_alert_service = __esm({
|
|
12272
12282
|
transitionProperty: "outline, border-radius",
|
12273
12283
|
transitionDuration: "fast",
|
12274
12284
|
borderTopRadius: "none",
|
12275
|
-
borderBottomRadius: "
|
12285
|
+
borderBottomRadius: "md",
|
12276
12286
|
_hover: {
|
12277
12287
|
outline: "2px solid",
|
12278
12288
|
outlineColor: "blueGreen"
|
@@ -12282,12 +12292,13 @@ var init_alert_service = __esm({
|
|
12282
12292
|
outlineColor: "pine"
|
12283
12293
|
}
|
12284
12294
|
},
|
12285
|
-
|
12295
|
+
outerBox: {
|
12286
12296
|
outline: "1px solid",
|
12287
12297
|
outlineColor: "blueGreen",
|
12288
12298
|
backgroundColor: "darkTeal",
|
12289
|
-
borderBottomRadius: "
|
12290
|
-
borderTopRadius: "none"
|
12299
|
+
borderBottomRadius: "md",
|
12300
|
+
borderTopRadius: "none",
|
12301
|
+
width: "100%"
|
12291
12302
|
},
|
12292
12303
|
notificationText: {
|
12293
12304
|
color: "white",
|
@@ -13592,41 +13603,45 @@ var init_datepicker2 = __esm({
|
|
13592
13603
|
datepicker_default = config14;
|
13593
13604
|
}
|
13594
13605
|
});
|
13595
|
-
var
|
13606
|
+
var isSolid, isDashed, divider_default;
|
13596
13607
|
var init_divider = __esm({
|
13597
13608
|
"src/theme/components/divider.ts"() {
|
13598
13609
|
init_dist3();
|
13599
|
-
|
13600
|
-
|
13601
|
-
|
13602
|
-
|
13603
|
-
|
13604
|
-
|
13605
|
-
|
13606
|
-
|
13607
|
-
|
13608
|
-
|
13609
|
-
|
13610
|
-
|
13611
|
-
|
13612
|
-
|
13613
|
-
|
13614
|
-
|
13615
|
-
|
13610
|
+
isSolid = (props) => props.variant === "solid";
|
13611
|
+
isDashed = (props) => props.variant === "dashed";
|
13612
|
+
divider_default = defineStyleConfig({
|
13613
|
+
baseStyle: (props) => ({
|
13614
|
+
borderColor: themeTools.mode("blackAlpha.300", "whiteAlpha.300")(props)
|
13615
|
+
}),
|
13616
|
+
variants: {
|
13617
|
+
solid: {
|
13618
|
+
borderStyle: "solid"
|
13619
|
+
},
|
13620
|
+
dashed: (props) => ({
|
13621
|
+
backgroundImage: `repeating-linear-gradient(90deg, ${themeTools.mode("blackAlpha.300", "whiteAlpha.300")(props)}, ${themeTools.mode("blackAlpha.300", "whiteAlpha.300")(props)} 4px, transparent 4px, transparent 10px)`,
|
13622
|
+
backgroundPosition: "left bottom",
|
13623
|
+
backgroundRepeat: "repeat-x",
|
13624
|
+
backgroundSize: "100% 3px",
|
13625
|
+
borderRadius: props.size === "sm" ? "0.5px" : props.size === "md" ? "1px" : "1.5px"
|
13626
|
+
})
|
13616
13627
|
},
|
13617
|
-
|
13618
|
-
|
13619
|
-
|
13628
|
+
sizes: {
|
13629
|
+
sm: (props) => ({
|
13630
|
+
borderWidth: isSolid(props) ? "1px" : void 0,
|
13631
|
+
borderRadius: isSolid(props) ? "0.5px" : void 0,
|
13632
|
+
height: isDashed(props) ? "1px" : void 0
|
13633
|
+
}),
|
13634
|
+
md: (props) => ({
|
13635
|
+
borderWidth: isSolid(props) ? "2px" : void 0,
|
13636
|
+
borderRadius: isSolid(props) ? "1px" : "10px",
|
13637
|
+
height: isDashed(props) ? "2px" : void 0
|
13638
|
+
}),
|
13639
|
+
lg: (props) => ({
|
13640
|
+
borderWidth: isSolid(props) ? "3px" : void 0,
|
13641
|
+
borderRadius: isSolid(props) ? "1.5px" : void 0,
|
13642
|
+
height: isDashed(props) ? "3px" : void 0
|
13643
|
+
})
|
13620
13644
|
},
|
13621
|
-
lg: {
|
13622
|
-
borderWidth: "3px",
|
13623
|
-
borderRadius: "1.5px"
|
13624
|
-
}
|
13625
|
-
};
|
13626
|
-
divider_default = defineStyleConfig({
|
13627
|
-
baseStyle: baseStyle43,
|
13628
|
-
variants: variants14,
|
13629
|
-
sizes: sizes25,
|
13630
13645
|
defaultProps: {
|
13631
13646
|
variant: "solid",
|
13632
13647
|
size: "md"
|
@@ -14668,13 +14683,13 @@ var init_link2 = __esm({
|
|
14668
14683
|
});
|
14669
14684
|
|
14670
14685
|
// src/theme/components/list.ts
|
14671
|
-
var defineMultiStyleConfig28, definePartsStyle28,
|
14686
|
+
var defineMultiStyleConfig28, definePartsStyle28, baseStyle43, list_default;
|
14672
14687
|
var init_list2 = __esm({
|
14673
14688
|
"src/theme/components/list.ts"() {
|
14674
14689
|
init_dist4();
|
14675
14690
|
init_dist3();
|
14676
14691
|
({ defineMultiStyleConfig: defineMultiStyleConfig28, definePartsStyle: definePartsStyle28 } = createMultiStyleConfigHelpers(listAnatomy.keys));
|
14677
|
-
|
14692
|
+
baseStyle43 = definePartsStyle28({
|
14678
14693
|
container: {
|
14679
14694
|
fontSize: ["mobile.sm", "desktop.sm"]
|
14680
14695
|
},
|
@@ -14688,7 +14703,7 @@ var init_list2 = __esm({
|
|
14688
14703
|
}
|
14689
14704
|
});
|
14690
14705
|
list_default = defineMultiStyleConfig28({
|
14691
|
-
baseStyle:
|
14706
|
+
baseStyle: baseStyle43
|
14692
14707
|
});
|
14693
14708
|
}
|
14694
14709
|
});
|
@@ -15197,19 +15212,16 @@ var init_progress_bar = __esm({
|
|
15197
15212
|
},
|
15198
15213
|
background: {
|
15199
15214
|
display: "flex",
|
15200
|
-
backgroundColor: themeTools.mode(
|
15215
|
+
backgroundColor: props.isActive ? themeTools.mode(
|
15201
15216
|
"brand.surface.default.dark",
|
15202
15217
|
"brand.surface.default.light"
|
15203
|
-
)(props),
|
15218
|
+
)(props) : void 0,
|
15204
15219
|
borderRadius: "sm",
|
15205
15220
|
justifyContent: "flex-start",
|
15206
15221
|
marginX: "auto"
|
15207
15222
|
},
|
15208
15223
|
progress: {
|
15209
|
-
backgroundColor: themeTools.mode(
|
15210
|
-
"brand.surface.active.light",
|
15211
|
-
"brand.surface.active.dark"
|
15212
|
-
)(props),
|
15224
|
+
backgroundColor: props.isActive ? themeTools.mode("brand.surface.active.light", "brand.surface.active.dark")(props) : themeTools.mode("icon.disabled.light", "icon.disabled.dark")(props),
|
15213
15225
|
borderRadius: "sm",
|
15214
15226
|
maxWidth: "100%",
|
15215
15227
|
transition: "width .2s ease-out"
|
@@ -16757,17 +16769,17 @@ function useSizes({
|
|
16757
16769
|
getNodes,
|
16758
16770
|
observeMutation = true
|
16759
16771
|
}) {
|
16760
|
-
const [
|
16772
|
+
const [sizes25, setSizes] = React86.useState([]);
|
16761
16773
|
const [count, setCount] = React86.useState(0);
|
16762
16774
|
useSafeLayoutEffect(() => {
|
16763
16775
|
const elements = getNodes();
|
16764
16776
|
const cleanups = elements.map(
|
16765
16777
|
(element, index) => trackElementSize(element, (size2) => {
|
16766
|
-
setSizes((
|
16778
|
+
setSizes((sizes26) => {
|
16767
16779
|
return [
|
16768
|
-
...
|
16780
|
+
...sizes26.slice(0, index),
|
16769
16781
|
size2,
|
16770
|
-
...
|
16782
|
+
...sizes26.slice(index + 1)
|
16771
16783
|
];
|
16772
16784
|
});
|
16773
16785
|
})
|
@@ -16786,7 +16798,7 @@ function useSizes({
|
|
16786
16798
|
});
|
16787
16799
|
};
|
16788
16800
|
}, [count]);
|
16789
|
-
return
|
16801
|
+
return sizes25;
|
16790
16802
|
}
|
16791
16803
|
function isRef(ref) {
|
16792
16804
|
return typeof ref === "object" && ref !== null && "current" in ref;
|
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-Q3JX25BX.mjs';
|
package/package.json
CHANGED
@@ -60,92 +60,92 @@ export const ServiceAlert = ({
|
|
60
60
|
const { t } = useTranslation();
|
61
61
|
const styles = useMultiStyleConfig("AlertService");
|
62
62
|
return (
|
63
|
-
<
|
64
|
-
|
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
|
-
<
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
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
|
-
|
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
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
110
|
+
<Flex alignItems="center">
|
111
|
+
{notification && (
|
112
|
+
<Text sx={styles.notificationText}>
|
113
|
+
{t(texts.notification(notification))}
|
114
|
+
</Text>
|
115
|
+
)}
|
115
116
|
|
116
|
-
|
117
|
-
</Flex>
|
117
|
+
<AccordionIcon color="white" />
|
118
118
|
</Flex>
|
119
|
-
</
|
120
|
-
</
|
119
|
+
</Flex>
|
120
|
+
</Stack>
|
121
|
+
</AccordionButton>
|
121
122
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
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
|
-
</
|
145
|
-
</
|
146
|
-
</
|
147
|
-
</
|
148
|
-
</
|
144
|
+
</Stack>
|
145
|
+
</AccordionPanel>
|
146
|
+
</AccordionItem>
|
147
|
+
</Accordion>
|
148
|
+
</BaseAlert>
|
149
149
|
);
|
150
150
|
};
|
151
151
|
|
@@ -31,6 +31,9 @@ type ProgressBarProps = BoxProps & {
|
|
31
31
|
* Defaults to 5000 (5 seconds).
|
32
32
|
*/
|
33
33
|
labelRotationDelay?: number;
|
34
|
+
|
35
|
+
/** Pass to disable the color of the component */
|
36
|
+
isActive?: boolean;
|
34
37
|
};
|
35
38
|
|
36
39
|
/**
|
@@ -67,6 +70,7 @@ export const ProgressBar = ({
|
|
67
70
|
height = "0.5rem",
|
68
71
|
width = "100%",
|
69
72
|
"aria-label": ariaLabel,
|
73
|
+
isActive = true,
|
70
74
|
...rest
|
71
75
|
}: ProgressBarProps) => {
|
72
76
|
const { t } = useTranslation();
|
@@ -79,7 +83,7 @@ export const ProgressBar = ({
|
|
79
83
|
value,
|
80
84
|
"aria-label": ariaLabel || t(texts.label(value)),
|
81
85
|
});
|
82
|
-
const styles = useMultiStyleConfig("ProgressBar", {});
|
86
|
+
const styles = useMultiStyleConfig("ProgressBar", { isActive });
|
83
87
|
return (
|
84
88
|
<>
|
85
89
|
<Box
|
@@ -89,7 +93,11 @@ export const ProgressBar = ({
|
|
89
93
|
{...rest}
|
90
94
|
>
|
91
95
|
<Box width={width} __css={styles.background}>
|
92
|
-
<Box
|
96
|
+
<Box
|
97
|
+
__css={styles.progress}
|
98
|
+
height={height}
|
99
|
+
width={isActive ? `${value}%` : "100%"}
|
100
|
+
/>
|
93
101
|
</Box>
|
94
102
|
{currentLoadingText && (
|
95
103
|
<Text sx={styles.description} {...labelProps}>
|
@@ -3,7 +3,7 @@ import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
|
|
3
3
|
|
4
4
|
const parts = anatomy("alertService").parts(
|
5
5
|
"container",
|
6
|
-
"
|
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: "
|
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
|
-
|
31
|
+
outerBox: {
|
32
32
|
outline: "1px solid",
|
33
33
|
outlineColor: "blueGreen",
|
34
34
|
backgroundColor: "darkTeal",
|
35
|
-
borderBottomRadius: "
|
35
|
+
borderBottomRadius: "md",
|
36
36
|
borderTopRadius: "none",
|
37
|
+
width: "100%",
|
37
38
|
},
|
38
39
|
notificationText: {
|
39
40
|
color: "white",
|
@@ -1,42 +1,43 @@
|
|
1
|
-
import {
|
2
|
-
import { mode } from "@chakra-ui/theme-tools";
|
1
|
+
import { defineStyleConfig } from "@chakra-ui/styled-system";
|
2
|
+
import { mode, StyleFunctionProps } from "@chakra-ui/theme-tools";
|
3
3
|
|
4
|
-
const
|
5
|
-
|
6
|
-
}));
|
4
|
+
const isSolid = (props: StyleFunctionProps) => props.variant === "solid";
|
5
|
+
const isDashed = (props: StyleFunctionProps) => props.variant === "dashed";
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
borderRadius: "0.5px",
|
25
|
-
},
|
26
|
-
md: {
|
27
|
-
borderWidth: "2px",
|
28
|
-
borderRadius: "1px",
|
7
|
+
export default defineStyleConfig({
|
8
|
+
baseStyle: (props) => ({
|
9
|
+
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props),
|
10
|
+
}),
|
11
|
+
variants: {
|
12
|
+
solid: {
|
13
|
+
borderStyle: "solid",
|
14
|
+
},
|
15
|
+
dashed: (props) => ({
|
16
|
+
backgroundImage: `repeating-linear-gradient(90deg, ${mode("blackAlpha.300", "whiteAlpha.300")(props)}, ${mode("blackAlpha.300", "whiteAlpha.300")(props)} 4px, transparent 4px, transparent 10px)`,
|
17
|
+
backgroundPosition: "left bottom",
|
18
|
+
backgroundRepeat: "repeat-x",
|
19
|
+
backgroundSize: "100% 3px",
|
20
|
+
borderRadius:
|
21
|
+
props.size === "sm" ? "0.5px" : props.size === "md" ? "1px" : "1.5px",
|
22
|
+
}),
|
29
23
|
},
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
sizes: {
|
25
|
+
sm: (props) => ({
|
26
|
+
borderWidth: isSolid(props) ? "1px" : undefined,
|
27
|
+
borderRadius: isSolid(props) ? "0.5px" : undefined,
|
28
|
+
height: isDashed(props) ? "1px" : undefined,
|
29
|
+
}),
|
30
|
+
md: (props) => ({
|
31
|
+
borderWidth: isSolid(props) ? "2px" : undefined,
|
32
|
+
borderRadius: isSolid(props) ? "1px" : "10px",
|
33
|
+
height: isDashed(props) ? "2px" : undefined,
|
34
|
+
}),
|
35
|
+
lg: (props) => ({
|
36
|
+
borderWidth: isSolid(props) ? "3px" : undefined,
|
37
|
+
borderRadius: isSolid(props) ? "1.5px" : undefined,
|
38
|
+
height: isDashed(props) ? "3px" : undefined,
|
39
|
+
}),
|
33
40
|
},
|
34
|
-
};
|
35
|
-
|
36
|
-
export default defineStyleConfig({
|
37
|
-
baseStyle,
|
38
|
-
variants,
|
39
|
-
sizes,
|
40
41
|
defaultProps: {
|
41
42
|
variant: "solid",
|
42
43
|
size: "md",
|
@@ -17,19 +17,20 @@ const config = helpers.defineMultiStyleConfig({
|
|
17
17
|
},
|
18
18
|
background: {
|
19
19
|
display: "flex",
|
20
|
-
backgroundColor:
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
backgroundColor: props.isActive
|
21
|
+
? mode(
|
22
|
+
"brand.surface.default.dark",
|
23
|
+
"brand.surface.default.light",
|
24
|
+
)(props)
|
25
|
+
: undefined,
|
24
26
|
borderRadius: "sm",
|
25
27
|
justifyContent: "flex-start",
|
26
28
|
marginX: "auto",
|
27
29
|
},
|
28
30
|
progress: {
|
29
|
-
backgroundColor:
|
30
|
-
"brand.surface.active.light",
|
31
|
-
"
|
32
|
-
)(props),
|
31
|
+
backgroundColor: props.isActive
|
32
|
+
? mode("brand.surface.active.light", "brand.surface.active.dark")(props)
|
33
|
+
: mode("icon.disabled.light", "icon.disabled.dark")(props),
|
33
34
|
borderRadius: "sm",
|
34
35
|
maxWidth: "100%",
|
35
36
|
transition: "width .2s ease-out",
|