@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.
Files changed (59) hide show
  1. package/dist/index.cjs +27 -0
  2. package/dist/index.js +878 -0
  3. package/dist/types/components/index.d.ts +4 -23
  4. package/dist/types/components/list-data/index.d.ts +2 -0
  5. package/dist/types/components/{list/list.component.d.ts → list-data/list-data.component.d.ts} +7 -6
  6. package/dist/types/components/list-data/list-data.stories.d.ts +53 -0
  7. package/dist/types/components/list-data/list-data.styles.d.ts +6 -0
  8. package/dist/types/components/{list → list-data}/types.d.ts +7 -7
  9. package/dist/types/components/map/components/deckgl-map/deckgl-maps.component.d.ts +2 -0
  10. package/dist/types/components/map/components/deckgl-map/deckgl-maps.stories.d.ts +83 -0
  11. package/dist/types/components/map/components/google-maps/google-maps.component.d.ts +2 -0
  12. package/dist/types/components/map/components/google-maps/google-maps.stories.d.ts +85 -0
  13. package/dist/types/components/map/index.d.ts +4 -0
  14. package/dist/types/components/map/map.component.d.ts +2 -0
  15. package/dist/types/components/map/map.stories.d.ts +92 -0
  16. package/dist/types/components/map/types.d.ts +67 -0
  17. package/dist/types/components/scroll-to-anchor/index.d.ts +2 -0
  18. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.component.d.ts +34 -0
  19. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.stories.d.ts +42 -0
  20. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.styles.d.ts +13 -0
  21. package/dist/types/components/scroll-to-anchor/types.d.ts +10 -0
  22. package/dist/types/components/section-container/index.d.ts +2 -0
  23. package/dist/types/components/section-container/section-container.component.d.ts +1 -0
  24. package/dist/types/components/section-container/section-container.stories.d.ts +5 -0
  25. package/dist/types/components/section-container/section-container.styles.d.ts +32 -0
  26. package/dist/types/components/section-container/types.d.ts +2 -1
  27. package/dist/types/components/tabs-to-anchor/index.d.ts +2 -0
  28. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.component.d.ts +1 -1
  29. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.stories.d.ts +30 -0
  30. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.styles.d.ts +23 -0
  31. package/dist/types/components/tabs-to-anchor/types.d.ts +2 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/types/utils/create-select-options-from-array.utils.d.ts +5 -0
  34. package/dist/types/utils/index.d.ts +1 -0
  35. package/package.json +49 -36
  36. package/dist/ps-react-ui.js +0 -21290
  37. package/dist/types/components/button-warning/button-warning.component.d.ts +0 -31
  38. package/dist/types/components/button-warning/icon-button-warning.d.ts +0 -31
  39. package/dist/types/components/button-warning/styles.d.ts +0 -29
  40. package/dist/types/components/button-warning/types.d.ts +0 -16
  41. package/dist/types/components/grouped-chips/grouped-chips.component.d.ts +0 -30
  42. package/dist/types/components/grouped-chips/types.d.ts +0 -15
  43. package/dist/types/components/input-file/input-file.component.d.ts +0 -45
  44. package/dist/types/components/input-file/types.d.ts +0 -17
  45. package/dist/types/components/selects/autocomplete/autocomplete-select/autocomplete-select.component.d.ts +0 -39
  46. package/dist/types/components/selects/autocomplete/autocomplete-select-simple/autocomplete-select-simple.component.d.ts +0 -35
  47. package/dist/types/components/selects/autocomplete/commons/autocomplete-select-option.component.d.ts +0 -2
  48. package/dist/types/components/selects/autocomplete/commons/listbox-select.component.d.ts +0 -19
  49. package/dist/types/components/selects/simple-select/create-options-from-array.utils.d.ts +0 -2
  50. package/dist/types/components/selects/simple-select/simple-select.component.d.ts +0 -25
  51. package/dist/types/components/selects/types.d.ts +0 -36
  52. package/dist/types/components/table/components/table-body.component.d.ts +0 -32
  53. package/dist/types/components/table/components/table-cell.component.d.ts +0 -31
  54. package/dist/types/components/table/components/table-header.component.d.ts +0 -27
  55. package/dist/types/components/table/table.component.d.ts +0 -39
  56. package/dist/types/components/table/types.d.ts +0 -90
  57. package/dist/types/components/table/utils.d.ts +0 -4
  58. package/dist/types/styling/index.d.ts +0 -1
  59. 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 {};
@@ -1,4 +1,5 @@
1
- import type { BoxProps } from '@material-ui/core';
1
+ /// <reference types="react" />
2
+ import type { BoxProps } from '@mui/material';
2
3
  export interface SectionContainerProps {
3
4
  title: string;
4
5
  id: string;
@@ -0,0 +1,2 @@
1
+ export * from './tabs-to-anchor.component';
2
+ export * from './types';
@@ -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
+ };
@@ -1,4 +1,5 @@
1
- import type { TabsProps } from '@material-ui/core';
1
+ /// <reference types="react" />
2
+ import type { TabsProps } from '@mui/material';
2
3
  export interface TabsToAnchorProps {
3
4
  children: JSX.Element[];
4
5
  anchor?: string;
@@ -1,2 +1,2 @@
1
1
  export * from './components';
2
- export * from './styling';
2
+ export * from './utils';
@@ -0,0 +1,5 @@
1
+ export type SelectOptions = {
2
+ value: string | number;
3
+ label: string;
4
+ };
5
+ export declare function createSelectOptionsFromArray(data: (number | string)[]): SelectOptions[];
@@ -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": "1.3.1",
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/ps-react-ui.js",
11
- "module": "./dist/ps-react-ui.js",
10
+ "main": "./dist/index.cjs",
11
+ "module": "./dist/index.js",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./dist/ps-react-ui.js"
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
- "build": "vite build",
20
- "lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore",
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": "start-storybook -p 6006 --no-open",
26
- "storybook:build": "build-storybook"
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
- "@material-ui/core": "4.x",
34
- "@material-ui/icons": "4.x",
35
- "@material-ui/lab": "4.0.0-alpha.61",
36
- "@material-ui/styles": "4.x",
37
- "clsx": "1.x",
38
- "echarts": "5.x",
39
- "echarts-for-react": "3.x",
40
- "react-window": "1.x"
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.0",
44
- "@carto/react-ui": "1.4.9",
45
- "@rollup/pluginutils": "5.0.2",
46
- "@storybook/addon-actions": "6.5.15",
47
- "@storybook/addon-essentials": "6.5.15",
48
- "@storybook/addon-interactions": "6.5.15",
49
- "@storybook/addon-links": "6.5.15",
50
- "@storybook/builder-vite": "0.3.0",
51
- "@storybook/react": "6.5.15",
52
- "@storybook/testing-library": "0.0.13",
53
- "@types/react-dom": "17.0.15",
54
- "@vitejs/plugin-react-swc": "3.0.1",
55
- "eslint-plugin-jsx-a11y": "6.7.1"
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
- "@material-ui/core": "4.x",
59
- "@material-ui/icons": "4.x",
60
- "@material-ui/lab": "4.0.0-alpha.61",
61
- "@material-ui/styles": "4.x",
62
- "clsx": "1.x",
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
- "react": "17.x",
66
- "react-dom": "17.x",
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": {