@carto/meridian-ds 2.7.0-alpha-loader.3 → 2.7.0-alpha-loader.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +8 -7
- package/dist/components/index.js +8 -7
- package/dist/types/components/Loader/Loader.d.ts +5 -3
- package/dist/types/components/Loader/Loader.d.ts.map +1 -1
- package/dist/types/components/Loader/Loader.stories.d.ts +6 -3
- package/dist/types/components/Loader/Loader.stories.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -877,15 +877,16 @@ function _ToggleButtonGroup({
|
|
|
877
877
|
}
|
|
878
878
|
const ToggleButtonGroup = React.forwardRef(_ToggleButtonGroup);
|
|
879
879
|
const Wrapper = material.styled(material.Stack, {
|
|
880
|
-
shouldForwardProp: (prop) => prop !== "
|
|
881
|
-
})(({
|
|
880
|
+
shouldForwardProp: (prop) => prop !== "contentHeight"
|
|
881
|
+
})(({ contentHeight, theme }) => ({
|
|
882
882
|
alignItems: "center",
|
|
883
883
|
justifyContent: "center",
|
|
884
884
|
gap: theme.spacing(1.5),
|
|
885
885
|
width: "100%",
|
|
886
|
-
...
|
|
886
|
+
...contentHeight && {
|
|
887
887
|
flex: 1,
|
|
888
|
-
height:
|
|
888
|
+
height: contentHeight,
|
|
889
|
+
minHeight: contentHeight
|
|
889
890
|
}
|
|
890
891
|
}));
|
|
891
892
|
function _Loader({
|
|
@@ -893,7 +894,7 @@ function _Loader({
|
|
|
893
894
|
secondLabel,
|
|
894
895
|
color = "primary",
|
|
895
896
|
size = 40,
|
|
896
|
-
|
|
897
|
+
contentHeight,
|
|
897
898
|
labelTypographyProps,
|
|
898
899
|
secondLabelTypographyProps,
|
|
899
900
|
sx,
|
|
@@ -904,13 +905,13 @@ function _Loader({
|
|
|
904
905
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
905
906
|
Wrapper,
|
|
906
907
|
{
|
|
907
|
-
|
|
908
|
+
contentHeight,
|
|
908
909
|
sx,
|
|
909
910
|
...otherProps,
|
|
910
911
|
ref,
|
|
911
912
|
"aria-busy": true,
|
|
912
913
|
"data-name": "loader",
|
|
913
|
-
"data-
|
|
914
|
+
"data-content-height": contentHeight,
|
|
914
915
|
children: [
|
|
915
916
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
916
917
|
material.CircularProgress,
|
package/dist/components/index.js
CHANGED
|
@@ -877,15 +877,16 @@ function _ToggleButtonGroup({
|
|
|
877
877
|
}
|
|
878
878
|
const ToggleButtonGroup = forwardRef(_ToggleButtonGroup);
|
|
879
879
|
const Wrapper = styled(Stack, {
|
|
880
|
-
shouldForwardProp: (prop) => prop !== "
|
|
881
|
-
})(({
|
|
880
|
+
shouldForwardProp: (prop) => prop !== "contentHeight"
|
|
881
|
+
})(({ contentHeight, theme }) => ({
|
|
882
882
|
alignItems: "center",
|
|
883
883
|
justifyContent: "center",
|
|
884
884
|
gap: theme.spacing(1.5),
|
|
885
885
|
width: "100%",
|
|
886
|
-
...
|
|
886
|
+
...contentHeight && {
|
|
887
887
|
flex: 1,
|
|
888
|
-
height:
|
|
888
|
+
height: contentHeight,
|
|
889
|
+
minHeight: contentHeight
|
|
889
890
|
}
|
|
890
891
|
}));
|
|
891
892
|
function _Loader({
|
|
@@ -893,7 +894,7 @@ function _Loader({
|
|
|
893
894
|
secondLabel,
|
|
894
895
|
color = "primary",
|
|
895
896
|
size = 40,
|
|
896
|
-
|
|
897
|
+
contentHeight,
|
|
897
898
|
labelTypographyProps,
|
|
898
899
|
secondLabelTypographyProps,
|
|
899
900
|
sx,
|
|
@@ -904,13 +905,13 @@ function _Loader({
|
|
|
904
905
|
return /* @__PURE__ */ jsxs(
|
|
905
906
|
Wrapper,
|
|
906
907
|
{
|
|
907
|
-
|
|
908
|
+
contentHeight,
|
|
908
909
|
sx,
|
|
909
910
|
...otherProps,
|
|
910
911
|
ref,
|
|
911
912
|
"aria-busy": true,
|
|
912
913
|
"data-name": "loader",
|
|
913
|
-
"data-
|
|
914
|
+
"data-content-height": contentHeight,
|
|
914
915
|
children: [
|
|
915
916
|
/* @__PURE__ */ jsx(
|
|
916
917
|
CircularProgress,
|
|
@@ -34,10 +34,12 @@ export type LoaderProps = {
|
|
|
34
34
|
*/
|
|
35
35
|
size?: number | string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
37
|
+
* The height of the component.
|
|
38
|
+
* If using a number, the pixel unit is assumed.
|
|
39
|
+
* If using a string, you need to provide the CSS unit, for example '3rem'.
|
|
40
|
+
* @default undefined
|
|
39
41
|
*/
|
|
40
|
-
|
|
42
|
+
contentHeight?: number | string;
|
|
41
43
|
/**
|
|
42
44
|
* The props to pass to the container element to override the default styles.
|
|
43
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAmC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAA;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;OAEG;IACH,0BAA0B,CAAC,EAAE,eAAe,CAAA;IAC5C;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB
|
|
1
|
+
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAmC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAA;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;OAEG;IACH,0BAA0B,CAAC,EAAE,eAAe,CAAA;IAC5C;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;CACpB,CAAA;AAgFD,QAAA,MAAM,MAAM,wGAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
|
|
@@ -24,13 +24,13 @@ declare const options: {
|
|
|
24
24
|
secondLabelTypographyProps: {
|
|
25
25
|
control: "object";
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
contentHeight: {
|
|
28
28
|
table: {
|
|
29
29
|
defaultValue: {
|
|
30
30
|
summary: string;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
control: "
|
|
33
|
+
control: "text";
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
args: {
|
|
@@ -65,8 +65,11 @@ export declare const Size: {
|
|
|
65
65
|
export declare const LabelAndSecondLabel: {
|
|
66
66
|
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
};
|
|
68
|
-
export declare const
|
|
68
|
+
export declare const ContentHeight: {
|
|
69
69
|
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
args: {
|
|
71
|
+
contentHeight: number;
|
|
72
|
+
};
|
|
70
73
|
};
|
|
71
74
|
export declare const CustomSXStyles: {
|
|
72
75
|
render: (args: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE9C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CG,CAAA;AAChB,eAAe,OAAO,CAAA;AAsFtB,eAAO,MAAM,UAAU;mBApFC,WAAW;;;;;;CAyFlC,CAAA;AAED,eAAO,MAAM,KAAK;mBAzFW,WAAW;CA2FvC,CAAA;AAED,eAAO,MAAM,IAAI;mBA/EW,WAAW;CAiFtC,CAAA;AAED,eAAO,MAAM,mBAAmB;mBA9DH,WAAW;CAgEvC,CAAA;AAED,eAAO,MAAM,aAAa;mBAvGF,WAAW;;;;CA4GlC,CAAA;AAED,eAAO,MAAM,cAAc;mBA9GH,WAAW;;;;;;CAmHlC,CAAA"}
|