@digital-ai/dot-components 1.21.2 → 2.0.0-rc.2

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 (121) hide show
  1. package/CHANGE_LOG.md +1 -34
  2. package/README.md +1 -1
  3. package/fonts/fonts.ts +6 -0
  4. package/index.d.ts +1 -0
  5. package/index.esm.js +489 -806
  6. package/index.umd.js +702 -1027
  7. package/lib/components/BaseButtonProps.d.ts +0 -2
  8. package/lib/components/accordion/Accordion.d.ts +1 -3
  9. package/lib/components/accordion/Accordion.styles.d.ts +1 -1
  10. package/lib/components/action-toolbar/ActionToolbar.styles.d.ts +1 -1
  11. package/lib/components/alert-banner/AlertBanner.styles.d.ts +1 -1
  12. package/lib/components/app-toolbar/AppToolbar.d.ts +1 -3
  13. package/lib/components/app-toolbar/AppToolbar.stories.data.d.ts +0 -1
  14. package/lib/components/app-toolbar/AppToolbar.styles.d.ts +0 -1
  15. package/lib/components/auto-complete/AutoComplete.d.ts +2 -2
  16. package/lib/components/auto-complete/AutoComplete.stories.styles.d.ts +2 -0
  17. package/lib/components/auto-complete/AutoComplete.styles.d.ts +1 -1
  18. package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +1 -0
  19. package/lib/components/auto-complete/index.d.ts +1 -1
  20. package/lib/components/auto-complete/utils/helpers.d.ts +1 -2
  21. package/lib/components/avatar/Avatar.styles.d.ts +1 -1
  22. package/lib/components/avatar-group/AvatarGroup.d.ts +0 -1
  23. package/lib/components/avatar-group/AvatarGroup.styles.d.ts +3 -0
  24. package/lib/components/badge/Badge.styles.d.ts +1 -1
  25. package/lib/components/breadcrumbs/Breadcrumbs.d.ts +2 -4
  26. package/lib/components/breadcrumbs/Breadcrumbs.styles.d.ts +1 -1
  27. package/lib/components/breadcrumbs/utils/helpers.d.ts +2 -2
  28. package/lib/components/button/Button.d.ts +2 -2
  29. package/lib/components/button/Button.styles.d.ts +1 -1
  30. package/lib/components/button/IconButton.d.ts +1 -3
  31. package/lib/components/button/IconButton.styles.d.ts +1 -1
  32. package/lib/components/button-toggle/ButtonToggle.stories.data.d.ts +0 -1
  33. package/lib/components/button-toggle/ButtonToggle.styles.d.ts +1 -1
  34. package/lib/components/checkbox/Checkbox.d.ts +1 -2
  35. package/lib/components/checkbox/Checkbox.styles.d.ts +1 -1
  36. package/lib/components/chip/Chip.styles.d.ts +1 -1
  37. package/lib/components/css-grid/CssCell.d.ts +1 -1
  38. package/lib/components/css-grid/CssGrid.d.ts +14 -8
  39. package/lib/components/css-grid/CssGridDebug.d.ts +0 -1
  40. package/lib/components/dialog/Dialog.styles.d.ts +1 -1
  41. package/lib/components/divider/Divider.d.ts +0 -1
  42. package/lib/components/divider/Divider.styles.d.ts +1 -1
  43. package/lib/components/draggable-list/DraggableList.d.ts +0 -1
  44. package/lib/components/draggable-list/DraggableList.stories.data.d.ts +0 -1
  45. package/lib/components/draggable-list/utils/models.d.ts +1 -1
  46. package/lib/components/drawer/Drawer.styles.d.ts +1 -1
  47. package/lib/components/dynamic-form/DynamicForm.d.ts +0 -1
  48. package/lib/components/dynamic-form/DynamicForm.styles.d.ts +0 -1
  49. package/lib/components/dynamic-form/models.d.ts +1 -1
  50. package/lib/components/empty-state/EmptyState.d.ts +0 -1
  51. package/lib/components/file-upload/FileListItem.styles.d.ts +21 -25
  52. package/lib/components/file-upload/FileUpload.d.ts +1 -1
  53. package/lib/components/file-upload/FileUpload.stories.data.d.ts +0 -1
  54. package/lib/components/file-upload/uploadHelpers.d.ts +12 -0
  55. package/lib/components/form-controls/FormControl.styles.d.ts +1 -1
  56. package/lib/components/form-controls/FormControlLabel.styles.d.ts +1 -1
  57. package/lib/components/form-group/FormGroup.styles.d.ts +1 -1
  58. package/lib/components/icon/Icon.d.ts +2 -5
  59. package/lib/components/icon/Icon.styles.d.ts +3 -1
  60. package/lib/components/inline-edit/InlineEdit.d.ts +0 -1
  61. package/lib/components/input-form-fields/Input.stories.data.d.ts +0 -1
  62. package/lib/components/input-form-fields/InputFormFields.styles.d.ts +3 -2
  63. package/lib/components/input-form-fields/InputLabel.d.ts +0 -1
  64. package/lib/components/input-form-fields/InputSelect.d.ts +0 -1
  65. package/lib/components/input-form-fields/InputText.d.ts +7 -5
  66. package/lib/components/link/Link.d.ts +1 -3
  67. package/lib/components/link/Link.styles.d.ts +1 -1
  68. package/lib/components/list/List.d.ts +1 -2
  69. package/lib/components/list/List.styles.d.ts +1 -1
  70. package/lib/components/list/ListItem.styles.d.ts +21 -25
  71. package/lib/components/list/NestedList.styles.d.ts +0 -1
  72. package/lib/components/list/utils/models.d.ts +1 -9
  73. package/lib/components/menu/Menu.stories.data.d.ts +0 -1
  74. package/lib/components/menu/Menu.styles.d.ts +2 -3
  75. package/lib/components/menu/MenuList.d.ts +2 -2
  76. package/lib/components/menu/MenuList.styles.d.ts +1 -2
  77. package/lib/components/navigation-rail/NavigationRail.d.ts +0 -1
  78. package/lib/components/pill/Pill.d.ts +2 -2
  79. package/lib/components/pill/Pill.styles.d.ts +1 -1
  80. package/lib/components/popper/Popper.d.ts +1 -1
  81. package/lib/components/popper/Popper.stories.data.d.ts +0 -1
  82. package/lib/components/popper/Popper.styles.d.ts +2 -2
  83. package/lib/components/popper/index.d.ts +1 -1
  84. package/lib/components/progress/Progress.d.ts +2 -5
  85. package/lib/components/progress/Progress.styles.d.ts +1 -1
  86. package/lib/components/progress-button/ProgressButton.d.ts +0 -1
  87. package/lib/components/radio/RadioButton.styles.d.ts +1 -1
  88. package/lib/components/radio/RadioGroup.styles.d.ts +1 -1
  89. package/lib/components/sidebar/Sidebar.stories.data.d.ts +11 -5
  90. package/lib/components/skeleton/Skeleton.styles.d.ts +1 -1
  91. package/lib/components/snackbar/Snackbar.styles.d.ts +1 -1
  92. package/lib/components/snackbar/index.d.ts +1 -1
  93. package/lib/components/split-button/SplitButton.d.ts +1 -2
  94. package/lib/components/split-button/SplitButton.styles.d.ts +1 -2
  95. package/lib/components/switch/Switch.styles.d.ts +1 -1
  96. package/lib/components/table/Table.data.d.ts +0 -1
  97. package/lib/components/table/Table.stories.data.d.ts +1 -2
  98. package/lib/components/table/Table.styles.d.ts +2 -4
  99. package/lib/components/table/TableActions.d.ts +0 -1
  100. package/lib/components/table/TableActions.styles.d.ts +0 -1
  101. package/lib/components/table/TableBody.styles.d.ts +1 -1
  102. package/lib/components/table/TableBodyCheckboxCell.styles.d.ts +1 -1
  103. package/lib/components/table/TableCell.styles.d.ts +1 -1
  104. package/lib/components/table/TableHeader.d.ts +1 -4
  105. package/lib/components/table/TableHeaderCell.d.ts +1 -3
  106. package/lib/components/table/TableHeaderCell.styles.d.ts +1 -1
  107. package/lib/components/table/TableHeaderCheckboxCell.styles.d.ts +1 -1
  108. package/lib/components/table/TablePagination.d.ts +3 -3
  109. package/lib/components/table/TableRow.styles.d.ts +1 -1
  110. package/lib/components/table/TableSelectionToolbar.styles.d.ts +0 -1
  111. package/lib/components/table/utils/helpers.d.ts +1 -3
  112. package/lib/components/table/utils/models.d.ts +1 -1
  113. package/lib/components/tabs/Tabs.d.ts +1 -2
  114. package/lib/components/tabs/Tabs.styles.d.ts +1 -1
  115. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.d.ts +0 -1
  116. package/lib/components/truncate-with-tooltip/TruncateWithTooltip.styles.d.ts +1 -1
  117. package/lib/components/typography/Typography.d.ts +1 -1
  118. package/lib/testing-utils/index.d.ts +2 -2
  119. package/lib/theme-provider/ThemeProvider.d.ts +4 -7
  120. package/lib/theme-provider/colors/light-theme-colors.d.ts +1 -2
  121. package/package.json +4 -5
@@ -7,9 +7,9 @@ export interface TablePaginationProps extends CommonProps {
7
7
  /** Total number of rows (-1 if unknown) */
8
8
  count: number;
9
9
  /** Callback fired when the page is changed */
10
- onChangePage: (newPage: number) => void;
10
+ onPageChange: (newPage: number) => void;
11
11
  /** Callback fired when the number of rows per page is changed */
12
- onChangeRowsPerPage?: (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => void;
12
+ onRowsPerPageChange?: (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => void;
13
13
  /** The zero-based index of the current page */
14
14
  page?: number;
15
15
  /** The number of rows per page */
@@ -18,4 +18,4 @@ export interface TablePaginationProps extends CommonProps {
18
18
  typography: TypographyVariant;
19
19
  }
20
20
  /** This component wraps the TablePagination component from @material-ui. */
21
- export declare const DotTablePagination: ({ ariaLabel, className, count, "data-testid": dataTestId, onChangePage, onChangeRowsPerPage, page, rowsPerPage, typography, }: TablePaginationProps) => JSX.Element;
21
+ export declare const DotTablePagination: ({ ariaLabel, className, count, "data-testid": dataTestId, onPageChange, onRowsPerPageChange, page, rowsPerPage, typography, }: TablePaginationProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export declare const rootClassName = "dot-tr";
2
- export declare const StyledTableRowStyles: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").TableRowTypeMap<{}, "tr">>, any, {}, never>;
2
+ export declare const StyledTableRowStyles: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TableRowTypeMap<{}, "tr">>, any, {}, never>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const rootClassName = "dot-table-selection-toolbar";
3
2
  export declare const StyledTableSelectionToolbar: import("styled-components").StyledComponent<({ ariaLabel, children, className, "data-testid": dataTestId, variant, }: import("../action-toolbar/ActionToolbar").DotActionBarProps) => JSX.Element, any, {}, never>;
@@ -1,9 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TypographyVariant } from '../../typography/Typography';
3
3
  import { TableRowProps } from '../Table';
4
- import { DotColumnHeader } from '../TableHeader';
5
- export declare const getFormattedTableCellValue: (value: unknown, typographyVariant: TypographyVariant) => ReactNode;
4
+ export declare const getFormattedTableCellValue: (value: any, typographyVariant: TypographyVariant) => ReactNode;
6
5
  export declare const getContainerMaxHeightStyle: (stickyHeader?: boolean, maxHeight?: string) => string;
7
- export declare const checkIfActionColumnExist: (columns: DotColumnHeader[], tableData: TableRowProps[]) => boolean;
8
6
  export declare const getSelectedRowIds: (id: string, isChecked: boolean, selectedIds: string[]) => string[];
9
7
  export declare const getBulkSelectedRowIds: (isChecked: boolean, selectedIds: string[], pageData: TableRowProps[]) => string[];
@@ -1,5 +1,5 @@
1
- import { TableRowProps } from '../Table';
2
1
  import { ReactNode } from 'react';
2
+ import { TableRowProps } from '../Table';
3
3
  export declare type RowSelectionChangeHandler = (isChecked: boolean, rowId: string) => void;
4
4
  export declare type MultiSelectState = 'unchecked' | 'checked' | 'indeterminate';
5
5
  export declare type TableRowSelectChangeHandler = (isChecked: boolean, selectedTableRowIds: string[]) => void;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { CommonProps } from '../CommonProps';
3
2
  export declare type TabsColor = 'primary' | 'secondary';
4
- export declare type TabsScrollButtons = 'auto' | 'desktop' | 'off' | 'on';
3
+ export declare type TabsScrollButtons = 'auto' | boolean;
5
4
  export declare type TabsVariant = 'fullWidth' | 'scrollable' | 'standard';
6
5
  export interface TabProps extends CommonProps {
7
6
  /** If true, the tab will be disabled. */
@@ -1,2 +1,2 @@
1
1
  export declare const rootClassName = "dot-tabs";
2
- export declare const StyledTabs: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").TabsTypeMap<{}, import("@material-ui/core").ExtendButtonBase<import("@material-ui/core").ButtonBaseTypeMap<{}, "button">>>>, any, {}, never>;
2
+ export declare const StyledTabs: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TabsTypeMap<{}, import("@mui/material").ExtendButtonBase<import("@mui/material").ButtonBaseTypeMap<{}, "button">>>>, any, {}, never>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CommonProps } from '../CommonProps';
3
2
  export interface TruncateWithTooltipProps extends CommonProps {
4
3
  charactersLimit?: number;
@@ -1,3 +1,3 @@
1
- import { Tooltip } from '@material-ui/core';
1
+ import { Tooltip } from '@mui/material';
2
2
  export declare const rootClassName = "dot-truncate-with-tooltip";
3
3
  export declare const StyledTruncateWithTooltip: import("styled-components").StyledComponent<typeof Tooltip, any, {}, never>;
@@ -1,6 +1,6 @@
1
1
  import { ElementType, ReactNode } from 'react';
2
2
  import { CommonProps } from '../CommonProps';
3
- export declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline' | 'srOnly' | 'inherit';
3
+ export declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline' | 'inherit';
4
4
  export interface TypographyProps extends CommonProps {
5
5
  /** The content of the component. */
6
6
  children: ReactNode;
@@ -1,10 +1,10 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export { mockResizeObserver } from './resize-observer-mock';
3
3
  declare const renderWithTheme: (ui: ReactNode) => {
4
4
  container: HTMLElement;
5
5
  baseElement: Element;
6
6
  debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[], maxLength?: number, options?: import("pretty-format").PrettyFormatOptions) => void;
7
- rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
7
+ rerender: (ui: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => void;
8
8
  unmount: () => void;
9
9
  asFragment: () => DocumentFragment;
10
10
  getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions) => HTMLElement;
@@ -1,17 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
- import { Theme } from '@material-ui/core';
3
- import { TypographyOptions } from '@material-ui/core/styles/createTypography';
2
+ import { Theme } from '@mui/material';
3
+ import { TypographyOptions } from '@mui/material/styles/createTypography';
4
4
  import { AvatarPaletteColorOptions } from '../../../../../typings/material/index';
5
- export declare type ThemeOptions = 'light' | 'dark' | 'agility-light' | 'agility-dark';
5
+ export declare type ThemeOptions = 'light' | 'dark';
6
6
  export declare const typographyOptions: TypographyOptions;
7
7
  export declare const avatarColors: AvatarPaletteColorOptions;
8
- export declare const agilityLightTheme: Theme;
9
- export declare const agilityDarkTheme: Theme;
10
8
  export declare const darkTheme: Theme;
11
9
  export declare const lightTheme: Theme;
12
- interface ThemeProviderProps {
10
+ export interface ThemeProviderProps {
13
11
  children: ReactNode;
14
12
  theme?: Theme | ThemeOptions;
15
13
  }
16
14
  export declare function DotThemeProvider({ children, theme, }: ThemeProviderProps): JSX.Element;
17
- export {};
@@ -99,5 +99,4 @@ export declare const pA100 = "#ff9cd1";
99
99
  export declare const pA200 = "#ff69b9";
100
100
  export declare const pA400 = "#ff36a2";
101
101
  export declare const pA700 = "#ff1d96";
102
- export declare const agilityGreen = "#79b522";
103
- export declare const agilityLightGreen = "#e4efd3";
102
+ export declare const selectedGray = "rgba(0, 0, 0, 0.12)";
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "1.21.2",
3
+ "version": "2.0.0-rc.2",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
7
7
  "Keith Stewart <kstewart@digial.ai>",
8
8
  "Matt Haff <mhaff@digital.ai>",
9
- "Josh Schoen <jschoen@digital.ai>",
10
9
  "Bojan Kocijan <Bojan.Kocijan@digital.ai>"
11
10
  ],
12
11
  "repository": {
@@ -26,13 +25,13 @@
26
25
  },
27
26
  "author": "Keith Stewart",
28
27
  "dependencies": {
29
- "@material-ui/lab": "4.0.0-alpha.56",
30
- "@material-ui/core": "4.12.3",
28
+ "@mui/material": "^5.2.5",
29
+ "@mui/styles": "^5.2.3",
31
30
  "react-dropzone": "^11.4.2",
32
31
  "react-grid-layout": "^1.3.4",
33
32
  "styled-components": "^5.2.1"
34
33
  },
35
34
  "peerDependencies": {
36
- "react": "^16.8.0 || ^17.0.0"
35
+ "react": "^17.0.2 || ^18.0.0"
37
36
  }
38
37
  }