@carto/ps-react-ui 1.3.1 → 2.0.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/index.cjs +27 -0
- package/dist/index.js +878 -0
- package/dist/types/components/index.d.ts +4 -23
- package/dist/types/components/list-data/index.d.ts +2 -0
- package/dist/types/components/{list/list.component.d.ts → list-data/list-data.component.d.ts} +7 -6
- package/dist/types/components/list-data/list-data.stories.d.ts +53 -0
- package/dist/types/components/list-data/list-data.styles.d.ts +6 -0
- package/dist/types/components/{list → list-data}/types.d.ts +7 -7
- package/dist/types/components/map/components/deckgl-map/deckgl-maps.component.d.ts +2 -0
- package/dist/types/components/map/components/deckgl-map/deckgl-maps.stories.d.ts +83 -0
- package/dist/types/components/map/components/google-maps/google-maps.component.d.ts +2 -0
- package/dist/types/components/map/components/google-maps/google-maps.stories.d.ts +85 -0
- package/dist/types/components/map/index.d.ts +4 -0
- package/dist/types/components/map/map.component.d.ts +2 -0
- package/dist/types/components/map/map.stories.d.ts +92 -0
- package/dist/types/components/map/types.d.ts +67 -0
- package/dist/types/components/scroll-to-anchor/index.d.ts +2 -0
- package/dist/types/components/scroll-to-anchor/scroll-to-anchor.component.d.ts +34 -0
- package/dist/types/components/scroll-to-anchor/scroll-to-anchor.stories.d.ts +42 -0
- package/dist/types/components/scroll-to-anchor/scroll-to-anchor.styles.d.ts +13 -0
- package/dist/types/components/scroll-to-anchor/types.d.ts +10 -0
- package/dist/types/components/section-container/index.d.ts +2 -0
- package/dist/types/components/section-container/section-container.component.d.ts +1 -0
- package/dist/types/components/section-container/section-container.stories.d.ts +5 -0
- package/dist/types/components/section-container/section-container.styles.d.ts +32 -0
- package/dist/types/components/section-container/types.d.ts +2 -1
- package/dist/types/components/tabs-to-anchor/index.d.ts +2 -0
- package/dist/types/components/tabs-to-anchor/tabs-to-anchor.component.d.ts +1 -1
- package/dist/types/components/tabs-to-anchor/tabs-to-anchor.stories.d.ts +30 -0
- package/dist/types/components/tabs-to-anchor/tabs-to-anchor.styles.d.ts +23 -0
- package/dist/types/components/tabs-to-anchor/types.d.ts +2 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/create-select-options-from-array.utils.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +49 -36
- package/dist/ps-react-ui.js +0 -21290
- package/dist/types/components/button-warning/button-warning.component.d.ts +0 -31
- package/dist/types/components/button-warning/icon-button-warning.d.ts +0 -31
- package/dist/types/components/button-warning/styles.d.ts +0 -29
- package/dist/types/components/button-warning/types.d.ts +0 -16
- package/dist/types/components/grouped-chips/grouped-chips.component.d.ts +0 -30
- package/dist/types/components/grouped-chips/types.d.ts +0 -15
- package/dist/types/components/input-file/input-file.component.d.ts +0 -45
- package/dist/types/components/input-file/types.d.ts +0 -17
- package/dist/types/components/selects/autocomplete/autocomplete-select/autocomplete-select.component.d.ts +0 -39
- package/dist/types/components/selects/autocomplete/autocomplete-select-simple/autocomplete-select-simple.component.d.ts +0 -35
- package/dist/types/components/selects/autocomplete/commons/autocomplete-select-option.component.d.ts +0 -2
- package/dist/types/components/selects/autocomplete/commons/listbox-select.component.d.ts +0 -19
- package/dist/types/components/selects/simple-select/create-options-from-array.utils.d.ts +0 -2
- package/dist/types/components/selects/simple-select/simple-select.component.d.ts +0 -25
- package/dist/types/components/selects/types.d.ts +0 -36
- package/dist/types/components/table/components/table-body.component.d.ts +0 -32
- package/dist/types/components/table/components/table-cell.component.d.ts +0 -31
- package/dist/types/components/table/components/table-header.component.d.ts +0 -27
- package/dist/types/components/table/table.component.d.ts +0 -39
- package/dist/types/components/table/types.d.ts +0 -90
- package/dist/types/components/table/utils.d.ts +0 -4
- package/dist/types/styling/index.d.ts +0 -1
- package/dist/types/styling/types.d.ts +0 -4
@@ -0,0 +1,32 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
3
|
+
import { SectionContainerProps } from './types';
|
4
|
+
export declare const styles: {
|
5
|
+
contentBox: {
|
6
|
+
paddingBottom: number;
|
7
|
+
paddingX: number;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
type StyledSectionContainerBoxProps = {
|
11
|
+
scrollMarginTop: SectionContainerProps['scrollMarginTop'];
|
12
|
+
};
|
13
|
+
export declare const StyledSectionContainerBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
|
14
|
+
children?: import("react").ReactNode;
|
15
|
+
component?: import("react").ElementType<any> | undefined;
|
16
|
+
ref?: import("react").Ref<unknown> | undefined;
|
17
|
+
sx?: SxProps<Theme> | undefined;
|
18
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
20
|
+
}, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & StyledSectionContainerBoxProps, {}, {}>;
|
21
|
+
type StyledTitleBoxProp = {
|
22
|
+
scrollMarginTop: SectionContainerProps['scrollMarginTop'];
|
23
|
+
};
|
24
|
+
export declare const StyledTitleBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
|
25
|
+
children?: import("react").ReactNode;
|
26
|
+
component?: import("react").ElementType<any> | undefined;
|
27
|
+
ref?: import("react").Ref<unknown> | undefined;
|
28
|
+
sx?: SxProps<Theme> | undefined;
|
29
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
30
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
31
|
+
}, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & StyledTitleBoxProp, {}, {}>;
|
32
|
+
export {};
|
@@ -22,4 +22,4 @@ import { TabsToAnchorProps } from './types';
|
|
22
22
|
* </TabsToAnchor>
|
23
23
|
* ```
|
24
24
|
*/
|
25
|
-
export declare function TabsToAnchor({ children, anchor, TabsProps, variant, onChange, }: TabsToAnchorProps): JSX.Element;
|
25
|
+
export declare function TabsToAnchor({ children, anchor, TabsProps, variant, onChange, }: TabsToAnchorProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
2
|
+
import { TabsToAnchor } from './tabs-to-anchor.component';
|
3
|
+
declare const meta: {
|
4
|
+
title: string;
|
5
|
+
component: typeof TabsToAnchor;
|
6
|
+
parameters: {
|
7
|
+
layout: string;
|
8
|
+
docs: {
|
9
|
+
page: null;
|
10
|
+
description: {
|
11
|
+
component: string;
|
12
|
+
};
|
13
|
+
};
|
14
|
+
};
|
15
|
+
argTypes: {
|
16
|
+
children: {
|
17
|
+
control: {
|
18
|
+
type: null;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
22
|
+
args: {
|
23
|
+
anchor: string;
|
24
|
+
variant: "fullWidth";
|
25
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export default meta;
|
29
|
+
type Story = StoryObj<typeof meta>;
|
30
|
+
export declare const Default: Story;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Theme } from '@mui/material';
|
2
|
+
export declare const styles: {
|
3
|
+
tabsWrapper: {
|
4
|
+
backgroundColor: ({ palette }: Theme) => string;
|
5
|
+
left: number;
|
6
|
+
position: "sticky";
|
7
|
+
top: number;
|
8
|
+
width: string;
|
9
|
+
zIndex: number;
|
10
|
+
'& .MuiTab-root:last-of-type': {
|
11
|
+
marginRight: number;
|
12
|
+
};
|
13
|
+
'& .MuiTab-textColorPrimary': {
|
14
|
+
color: ({ palette }: Theme) => string;
|
15
|
+
'&.Mui-selected': {
|
16
|
+
color: ({ palette }: Theme) => string;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
'& .MuiTabs-indicator.colorPrimary': {
|
20
|
+
backgroundColor: ({ palette }: Theme) => string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
};
|
package/dist/types/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export * from './components';
|
2
|
-
export * from './
|
2
|
+
export * from './utils';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './create-select-options-from-array.utils';
|
package/package.json
CHANGED
@@ -1,69 +1,82 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carto/ps-react-ui",
|
3
|
-
"version": "
|
3
|
+
"version": "2.0.0",
|
4
4
|
"description": "CARTO's Professional Service React UI library",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
7
7
|
],
|
8
8
|
"type": "module",
|
9
9
|
"types": "./dist/types/index.d.ts",
|
10
|
-
"main": "./dist/
|
11
|
-
"module": "./dist/
|
10
|
+
"main": "./dist/index.cjs",
|
11
|
+
"module": "./dist/index.js",
|
12
12
|
"exports": {
|
13
13
|
".": {
|
14
|
-
"
|
14
|
+
"types": "./dist/types/index.d.ts",
|
15
|
+
"import": "./dist/index.js",
|
16
|
+
"require": "./dist/index.cjs"
|
15
17
|
}
|
16
18
|
},
|
17
19
|
"scripts": {
|
18
20
|
"start": "npm run storybook:start",
|
19
|
-
"
|
20
|
-
"
|
21
|
+
"prebuild": "npm exec rimraf dist",
|
22
|
+
"build": "tsc && vite build",
|
23
|
+
"lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore --ignore-pattern '.storybook'",
|
21
24
|
"format": "prettier --write . --ignore-path ../../.gitignore",
|
22
25
|
"test:watch": "vitest",
|
23
26
|
"test:related": "vitest --run --passWithNoTests",
|
24
27
|
"test:coverage": "vitest run --coverage",
|
25
|
-
"storybook:start": "
|
26
|
-
"storybook:build": "build
|
28
|
+
"storybook:start": "storybook dev --no-open -p 6006",
|
29
|
+
"storybook:build": "storybook build"
|
27
30
|
},
|
28
31
|
"typedoc": {
|
29
32
|
"entryPoint": "./src/index.ts",
|
30
33
|
"readmeFile": "./README.md"
|
31
34
|
},
|
32
35
|
"dependencies": {
|
33
|
-
"@
|
34
|
-
"@
|
35
|
-
"@
|
36
|
-
"@material
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
36
|
+
"@deck.gl/google-maps": "8.9.17",
|
37
|
+
"@deck.gl/react": "8.9.17",
|
38
|
+
"@emotion/react": "11.11.0",
|
39
|
+
"@mui/icons-material": "5.11.16",
|
40
|
+
"@mui/lab": "5.0.0-alpha.132",
|
41
|
+
"@mui/material": "5.13.3",
|
42
|
+
"@react-google-maps/api": "2.18.1",
|
43
|
+
"echarts": "5.4.2",
|
44
|
+
"echarts-for-react": "3.0.2",
|
45
|
+
"maplibre-gl": "3.0.1",
|
46
|
+
"react-map-gl": "7.0.25",
|
47
|
+
"react-window": "1.8.9"
|
41
48
|
},
|
42
49
|
"devDependencies": {
|
43
|
-
"@carto/eslint-config-ps-react": "1.0.
|
44
|
-
"@carto/react-ui": "
|
45
|
-
"@
|
46
|
-
"@storybook/addon-
|
47
|
-
"@storybook/addon-
|
48
|
-
"@storybook/addon-
|
49
|
-
"@storybook/
|
50
|
-
"@storybook/builder-vite": "0.
|
51
|
-
"@storybook/react": "
|
52
|
-
"@storybook/
|
53
|
-
"@
|
54
|
-
"@
|
55
|
-
"
|
50
|
+
"@carto/eslint-config-ps-react": "1.0.1",
|
51
|
+
"@carto/react-ui": "2.0.5",
|
52
|
+
"@storybook/addon-actions": "7.0.18",
|
53
|
+
"@storybook/addon-essentials": "7.0.18",
|
54
|
+
"@storybook/addon-interactions": "7.0.18",
|
55
|
+
"@storybook/addon-links": "7.0.18",
|
56
|
+
"@storybook/blocks": "7.0.18",
|
57
|
+
"@storybook/builder-vite": "7.0.18",
|
58
|
+
"@storybook/react": "7.0.18",
|
59
|
+
"@storybook/react-vite": "7.0.18",
|
60
|
+
"@storybook/testing-library": "0.1.0",
|
61
|
+
"@types/google.maps": "3.53.2",
|
62
|
+
"@vitejs/plugin-react-swc": "3.3.1",
|
63
|
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
64
|
+
"storybook": "7.0.18"
|
56
65
|
},
|
57
66
|
"peerDependencies": {
|
58
|
-
"@
|
59
|
-
"@
|
60
|
-
"@
|
61
|
-
"@material
|
62
|
-
"
|
67
|
+
"@deck.gl/google-maps": "8.x",
|
68
|
+
"@deck.gl/react": "8.x",
|
69
|
+
"@emotion/react": "11.x",
|
70
|
+
"@mui/icons-material": "5.x",
|
71
|
+
"@mui/lab": "5.x",
|
72
|
+
"@mui/material": "5.x",
|
73
|
+
"@react-google-maps/api": "2.x",
|
63
74
|
"echarts": "5.x",
|
64
75
|
"echarts-for-react": "3.x",
|
65
|
-
"
|
66
|
-
"react
|
76
|
+
"maplibre-gl": "3.x",
|
77
|
+
"react": "17.x || 18.x",
|
78
|
+
"react-dom": "17.x || 18.x",
|
79
|
+
"react-map-gl": ">=7.0.25",
|
67
80
|
"react-window": "1.x"
|
68
81
|
},
|
69
82
|
"eslintConfig": {
|