@carto/ps-react-ui 4.0.3-canary.0 → 4.1.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/dist/components.js +932 -637
- package/dist/components.js.map +1 -1
- package/dist/types/components/basemaps/basemaps.d.ts +3 -0
- package/dist/types/components/basemaps/const.d.ts +2 -0
- package/dist/types/components/basemaps/group-wrapper.d.ts +6 -0
- package/dist/types/components/basemaps/group.d.ts +6 -0
- package/dist/types/components/basemaps/header.d.ts +6 -0
- package/dist/types/components/basemaps/styles.d.ts +71 -0
- package/dist/types/components/basemaps/types.d.ts +26 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/measurement-tools/styles.d.ts +81 -0
- package/dist/types/components/responsive-drawer/responsive-drawer.d.ts +12 -0
- package/package.json +1 -1
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export declare function GroupWrapper({ title, children, collapsed, }: {
|
3
|
+
title: string;
|
4
|
+
children: ReactNode;
|
5
|
+
collapsed?: boolean;
|
6
|
+
}): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { Theme } from '@mui/material';
|
2
|
+
export declare const BASEMAPS_WIDTH = 288;
|
3
|
+
export declare const styles: {
|
4
|
+
root: {
|
5
|
+
width: number;
|
6
|
+
overflow: "auto";
|
7
|
+
};
|
8
|
+
toggle: {
|
9
|
+
padding: ({ spacing }: Theme) => string;
|
10
|
+
img: {
|
11
|
+
width: string;
|
12
|
+
aspectRatio: "1 / 1";
|
13
|
+
borderRadius: ({ spacing }: Theme) => string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
header: {
|
17
|
+
display: "flex";
|
18
|
+
alignItems: "center";
|
19
|
+
justifyContent: "space-between";
|
20
|
+
padding: ({ spacing }: Theme) => string;
|
21
|
+
paddingInlineStart: ({ spacing }: Theme) => string;
|
22
|
+
position: "sticky";
|
23
|
+
top: number;
|
24
|
+
zIndex: number;
|
25
|
+
background: ({ palette }: Theme) => string;
|
26
|
+
};
|
27
|
+
groupWrapper: {
|
28
|
+
content: {
|
29
|
+
paddingInline: ({ spacing }: Theme) => string;
|
30
|
+
paddingBlock: ({ spacing }: Theme) => string;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
group: {
|
34
|
+
display: "flex";
|
35
|
+
flexDirection: "row";
|
36
|
+
flexWrap: "wrap";
|
37
|
+
justifyContent: "space-between";
|
38
|
+
alignItems: "center";
|
39
|
+
gap: ({ spacing }: Theme) => string;
|
40
|
+
paddingInline: ({ spacing }: Theme) => string;
|
41
|
+
paddingBlock: ({ spacing }: Theme) => string;
|
42
|
+
};
|
43
|
+
item: {
|
44
|
+
container: {
|
45
|
+
display: "flex";
|
46
|
+
alignItems: "center";
|
47
|
+
flexDirection: "column";
|
48
|
+
gap: ({ spacing }: Theme) => string;
|
49
|
+
background: "transparent";
|
50
|
+
border: "none";
|
51
|
+
cursor: "pointer";
|
52
|
+
padding: number;
|
53
|
+
height: ({ spacing }: Theme) => string;
|
54
|
+
img: {
|
55
|
+
maxWidth: ({ spacing }: Theme) => string;
|
56
|
+
aspectRatio: "1 / 1";
|
57
|
+
borderRadius: ({ spacing }: Theme) => string;
|
58
|
+
border: "2px solid transparent";
|
59
|
+
'&:hover': {
|
60
|
+
borderColor: ({ palette }: Theme) => string;
|
61
|
+
};
|
62
|
+
'&[data-active="true"]': {
|
63
|
+
borderColor: ({ palette }: Theme) => string;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
};
|
67
|
+
selected: {
|
68
|
+
color: ({ palette }: Theme) => string;
|
69
|
+
};
|
70
|
+
};
|
71
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
2
|
+
export interface BasemapsUILabels {
|
3
|
+
toggle: {
|
4
|
+
title: string;
|
5
|
+
};
|
6
|
+
header: {
|
7
|
+
title: string;
|
8
|
+
actions: {
|
9
|
+
close: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
}
|
13
|
+
export interface BasemapOption {
|
14
|
+
id: string;
|
15
|
+
label: string;
|
16
|
+
icon: string;
|
17
|
+
group?: string;
|
18
|
+
}
|
19
|
+
export interface BasemapsUIProps {
|
20
|
+
options: BasemapOption[];
|
21
|
+
labels?: BasemapsUILabels;
|
22
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
23
|
+
selected: string | null | undefined;
|
24
|
+
sx?: SxProps<Theme>;
|
25
|
+
onChange: (id: string) => void;
|
26
|
+
}
|
@@ -14,3 +14,5 @@ export type { ZoomControlProps } from './zoom-controls/types';
|
|
14
14
|
export { ZoomControlsUI } from './zoom-controls/zoom-controls';
|
15
15
|
export type { ListDataProps, DataItem } from './list-data/types';
|
16
16
|
export { ListDataUI } from './list-data/list-data';
|
17
|
+
export { BasemapsUI } from './basemaps/basemaps';
|
18
|
+
export type { BasemapsUIProps } from './basemaps/types';
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { Theme } from '@mui/material';
|
2
|
+
import { CSSProperties } from 'react';
|
3
|
+
export declare const styles: {
|
4
|
+
container: {
|
5
|
+
display: "flex";
|
6
|
+
flexDirection: "row";
|
7
|
+
alignItems: "center";
|
8
|
+
justifyContent: "flex-start";
|
9
|
+
gap: ({ spacing }: Theme) => string;
|
10
|
+
overflow: "hidden";
|
11
|
+
};
|
12
|
+
actions: {
|
13
|
+
icon: {
|
14
|
+
width: ({ spacing }: Theme) => string;
|
15
|
+
height: ({ spacing }: Theme) => string;
|
16
|
+
borderRadius: number;
|
17
|
+
'.MuiTouchRipple-ripple .MuiTouchRipple-child': {
|
18
|
+
borderRadius: number;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
22
|
+
options: {
|
23
|
+
menu: {
|
24
|
+
marginTop: ({ spacing }: Theme) => string;
|
25
|
+
};
|
26
|
+
icon: {
|
27
|
+
width: ({ spacing }: Theme) => string;
|
28
|
+
};
|
29
|
+
title: {
|
30
|
+
paddingX: ({ spacing }: Theme) => string;
|
31
|
+
paddingY: ({ spacing }: Theme) => string;
|
32
|
+
};
|
33
|
+
icons: {
|
34
|
+
color: ({ palette }: Theme) => string;
|
35
|
+
};
|
36
|
+
tag: {
|
37
|
+
borderRadius: ({ spacing }: Theme) => string;
|
38
|
+
border: "1px solid";
|
39
|
+
borderColor: ({ palette }: Theme) => string;
|
40
|
+
paddingX: ({ spacing }: Theme) => string;
|
41
|
+
color: ({ palette }: Theme) => string;
|
42
|
+
backgroundColor: ({ palette }: Theme) => string;
|
43
|
+
};
|
44
|
+
modal: {
|
45
|
+
toggle: {
|
46
|
+
boxShadow: "none";
|
47
|
+
backgroundColor: "#F8F9F9";
|
48
|
+
padding: ({ spacing }: Theme) => string;
|
49
|
+
marginTop: ({ spacing }: Theme) => string;
|
50
|
+
marginBottom: ({ spacing }: Theme) => string;
|
51
|
+
'.MuiToggleButtonGroup-grouped': ({ typography }: Theme) => CSSProperties;
|
52
|
+
};
|
53
|
+
subtitle: ({ typography, palette }: Theme) => CSSProperties;
|
54
|
+
optionsGroup: {
|
55
|
+
marginLeft: ({ spacing }: Theme) => string;
|
56
|
+
'.MuiTypography-root': ({ typography }: Theme) => CSSProperties;
|
57
|
+
};
|
58
|
+
title: {
|
59
|
+
display: "flex";
|
60
|
+
justifyContent: "space-between";
|
61
|
+
alignItems: "center";
|
62
|
+
padding: ({ spacing }: Theme) => string;
|
63
|
+
};
|
64
|
+
content: {
|
65
|
+
paddingX: ({ spacing }: Theme) => string;
|
66
|
+
minWidth: ({ spacing }: Theme) => string;
|
67
|
+
};
|
68
|
+
actions: {
|
69
|
+
paddingX: ({ spacing }: Theme) => string;
|
70
|
+
};
|
71
|
+
};
|
72
|
+
};
|
73
|
+
chip: {
|
74
|
+
chip: {
|
75
|
+
marginRight: ({ spacing }: Theme) => string;
|
76
|
+
};
|
77
|
+
disabled: {
|
78
|
+
opacity: ({ palette }: Theme) => number;
|
79
|
+
};
|
80
|
+
};
|
81
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { PopoverProps } from '@mui/material';
|
2
|
+
import { ReactNode } from 'react';
|
3
|
+
export declare function ResponsiveDrawer<T extends {
|
4
|
+
collapsed: boolean;
|
5
|
+
onChangeCollapsed: (collapsed: boolean) => void;
|
6
|
+
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
7
|
+
slotProps?: PopoverProps['slotProps'];
|
8
|
+
}>({ ref, children, collapsed, isMobile, position, sx, slotProps, onChangeCollapsed, }: Required<Pick<T, 'collapsed' | 'onChangeCollapsed' | 'position'>> & Pick<PopoverProps, 'slotProps' | 'sx'> & {
|
9
|
+
ref: HTMLElement | null;
|
10
|
+
isMobile: boolean;
|
11
|
+
children: ReactNode;
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|