@oc-digital/react-component-library 7.2.3-beta.0 → 7.2.3-beta.10

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 (88) hide show
  1. package/build/Alert/Alert.d.ts +5 -0
  2. package/build/Alert/Alert.types.d.ts +14 -0
  3. package/build/AlphabeticalList/AlphabeticalList.d.ts +5 -0
  4. package/build/AlphabeticalList/AlphabeticalList.types.d.ts +22 -0
  5. package/build/AutoSave/Select/AutoSave.types.d.ts +11 -0
  6. package/build/AutoSave/Select/index.d.ts +4 -0
  7. package/build/AutoSave/Text/AutoSave.types.d.ts +17 -0
  8. package/build/AutoSave/Text/index.d.ts +4 -0
  9. package/build/Breadcrumbs/Breadcrumbs.d.ts +5 -0
  10. package/build/Breadcrumbs/Breadcrumbs.types.d.ts +24 -0
  11. package/build/Button/Button.d.ts +4 -0
  12. package/build/Button/Button.types.d.ts +10 -0
  13. package/build/ButtonWithConfirm/ButtonWithConfirm.d.ts +5 -0
  14. package/build/ButtonWithConfirm/ButtonWithConfirm.types.d.ts +9 -0
  15. package/build/ContentBox/ContentBox.d.ts +5 -0
  16. package/build/ContentBox/ContentBox.types.d.ts +7 -0
  17. package/build/ContentLabel/ContentLabel.d.ts +5 -0
  18. package/build/ContentLabel/ContentLabel.types.d.ts +5 -0
  19. package/build/DatePicker/DatePicker.d.ts +5 -0
  20. package/build/DatePicker/DatePicker.types.d.ts +6 -0
  21. package/build/EditableTable/EditableTable.d.ts +5 -0
  22. package/build/EditableTable/EditableTable.types.d.ts +107 -0
  23. package/build/EditableTable/components/TableCheckbox.d.ts +8 -0
  24. package/build/EditableTable/components/TableDateInput.d.ts +8 -0
  25. package/build/EditableTable/components/TableTextInput.d.ts +21 -0
  26. package/build/EditableTable/components/utils/getTextWidth.d.ts +13 -0
  27. package/build/EditableTable/defaultCells.d.ts +31 -0
  28. package/build/EntityList/EntityList.d.ts +5 -0
  29. package/build/EntityList/EntityList.types.d.ts +15 -0
  30. package/build/ErrorIndicator/ErrorIndicator.d.ts +5 -0
  31. package/build/ErrorIndicator/ErrorIndicator.types.d.ts +5 -0
  32. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.d.ts +5 -0
  33. package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.d.ts +9 -0
  34. package/build/KeyboardDatePicker/KeyboardDatePicker.d.ts +5 -0
  35. package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +6 -0
  36. package/build/LeftNavigation/LeftNavigation.d.ts +5 -0
  37. package/build/LeftNavigation/LeftNavigation.types.d.ts +97 -0
  38. package/build/LeftNavigation/NavListItem.d.ts +5 -0
  39. package/build/LeftNavigation/PrimaryLeftNavigation.d.ts +5 -0
  40. package/build/LeftNavigation/SecondaryLeftNavigation.d.ts +5 -0
  41. package/build/LoadingSpinner/LoadingSpinner.d.ts +5 -0
  42. package/build/LoadingSpinner/LoadingSpinner.types.d.ts +6 -0
  43. package/build/MainLayout/MainLayout.d.ts +5 -0
  44. package/build/MainLayout/MainLayout.types.d.ts +11 -0
  45. package/build/MobileDatePicker/MobileDatePicker.d.ts +5 -0
  46. package/build/MobileDatePicker/MobileDatePicker.types.d.ts +6 -0
  47. package/build/NavbarLayout/Navbar.d.ts +13 -0
  48. package/build/NavbarLayout/NavbarLayout.d.ts +17 -0
  49. package/build/NavbarLayout/index.d.ts +2 -0
  50. package/build/SearchBar/SearchBar.d.ts +5 -0
  51. package/build/SearchBar/SearchBar.types.d.ts +33 -0
  52. package/build/Select/Select.d.ts +5 -0
  53. package/build/Select/Select.types.d.ts +16 -0
  54. package/build/StaticTable/StaticTable.d.ts +5 -0
  55. package/build/StaticTable/StaticTable.types.d.ts +21 -0
  56. package/build/SvgComponents/ContainedPartnersLogo.d.ts +5 -0
  57. package/build/SvgComponents/HomeSvg.d.ts +5 -0
  58. package/build/SvgComponents/NovelLogoSvg.d.ts +5 -0
  59. package/build/SvgComponents/OrganisationList.d.ts +5 -0
  60. package/build/SvgComponents/ProjectsSvg.d.ts +5 -0
  61. package/build/SvgComponents/index.d.ts +5 -0
  62. package/build/SvgComponents/types.d.ts +6 -0
  63. package/build/TextField/TextField.d.ts +16 -0
  64. package/build/TextField/TextField.types.d.ts +8 -0
  65. package/build/Tooltip/OptionalTooltip.d.ts +9 -0
  66. package/build/Tooltip/index.d.ts +1 -0
  67. package/build/globals/index.d.ts +26 -0
  68. package/build/hooks/index.d.ts +3 -0
  69. package/build/hooks/useDebounceEffect.d.ts +2 -0
  70. package/build/hooks/useInterval.d.ts +2 -0
  71. package/build/hooks/useWhyDidYouUpdate.d.ts +1 -0
  72. package/build/index.d.ts +38 -0
  73. package/build/index.js +413 -62833
  74. package/build/index.js.map +1 -1
  75. package/build/stories/Button.d.ts +28 -0
  76. package/build/stories/Button.stories.d.ts +10 -0
  77. package/build/stories/Header.d.ts +12 -0
  78. package/build/stories/Header.stories.d.ts +8 -0
  79. package/build/stories/Page.d.ts +3 -0
  80. package/build/stories/Page.stories.d.ts +8 -0
  81. package/build/styles/colours.d.ts +3 -0
  82. package/build/styles/font.d.ts +1 -0
  83. package/build/styles/index.d.ts +3 -0
  84. package/build/styles/layout.d.ts +1 -0
  85. package/build/styles/spacing.d.ts +1 -0
  86. package/build/styles/themes.d.ts +2 -0
  87. package/build/utils/index.d.ts +6 -0
  88. package/package.json +6 -7
@@ -0,0 +1,28 @@
1
+
2
+ interface ButtonProps {
3
+ /**
4
+ * Is this the principal call to action on the page?
5
+ */
6
+ primary?: boolean;
7
+ /**
8
+ * What background color to use
9
+ */
10
+ backgroundColor?: string;
11
+ /**
12
+ * How large should the button be?
13
+ */
14
+ size?: 'small' | 'medium' | 'large';
15
+ /**
16
+ * Button contents
17
+ */
18
+ label: string;
19
+ /**
20
+ * Optional click handler
21
+ */
22
+ onClick?: () => void;
23
+ }
24
+ /**
25
+ * Primary UI component for user interaction
26
+ */
27
+ export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
28
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from './Button';
3
+
4
+ declare const meta: Meta<typeof Button>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Button>;
7
+ export declare const Primary: Story;
8
+ export declare const Secondary: Story;
9
+ export declare const Large: Story;
10
+ export declare const Small: Story;
@@ -0,0 +1,12 @@
1
+
2
+ type User = {
3
+ name: string;
4
+ };
5
+ interface HeaderProps {
6
+ user?: User;
7
+ onLogin: () => void;
8
+ onLogout: () => void;
9
+ onCreateAccount: () => void;
10
+ }
11
+ export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Header } from './Header';
3
+
4
+ declare const meta: Meta<typeof Header>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Header>;
7
+ export declare const LoggedIn: Story;
8
+ export declare const LoggedOut: Story;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const Page: React.FC;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Page } from './Page';
3
+
4
+ declare const meta: Meta<typeof Page>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Page>;
7
+ export declare const LoggedOut: Story;
8
+ export declare const LoggedIn: Story;
@@ -0,0 +1,3 @@
1
+ export declare const RED = "#d32f2f";
2
+ export declare const GREY = "rgb(158, 158, 158)";
3
+ export declare const PRIMARY = "rgb(115, 196, 202)";
@@ -0,0 +1 @@
1
+ export declare const useFontStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"boldText" | "bolderText" | "smallText" | "warningColor" | "centerText">;
@@ -0,0 +1,3 @@
1
+ export * from './spacing';
2
+ export * from './font';
3
+ export * from './layout';
@@ -0,0 +1 @@
1
+ export declare const useLayoutStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"contentBox" | "limitWidth60rem" | "limitWidth50rem" | "limitWidth45rem" | "limitWidth40rem" | "limitWidth35rem" | "limitWidth30rem" | "limitWidth25rem" | "centeredText" | "startAlignedText" | "width20" | "width49" | "width50" | "width60" | "width100" | "flexCenter" | "centerJustify" | "leftJustify" | "rightJustify" | "adornmentGap">;
@@ -0,0 +1 @@
1
+ export declare const useSpacingStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"labelBreak" | "contentBreak" | "sectionBreak" | "doubleSectionBreak" | "rightSpacer1" | "rightSpacer2" | "leftSpacer1" | "leftSpacer2" | "buttonSpacing" | "leftRightPadding1" | "leftRightPadding2" | "topBottomPadding1" | "topBottomPadding2">;
@@ -0,0 +1,2 @@
1
+ export declare const novelTheme: import('@mui/material/styles').Theme;
2
+ export declare const partnersTheme: import('@mui/material/styles').Theme;
@@ -0,0 +1,6 @@
1
+ import { TableCellValues } from '../EditableTable/EditableTable.types';
2
+
3
+ export declare function sortDescendingStartDateString<T extends {
4
+ startDate: string;
5
+ }>(array: T[]): T[];
6
+ export declare const didCellValueChange: (oldVal: TableCellValues, newVal: TableCellValues, isDateValue?: boolean) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oc-digital/react-component-library",
3
3
  "type": "module",
4
- "version": "7.2.3-beta.0",
4
+ "version": "7.2.3-beta.10",
5
5
  "description": "React component library for Optimal Compliance",
6
6
  "main": "build/index.js",
7
7
  "types": "build/index.d.ts",
@@ -43,6 +43,10 @@
43
43
  "@storybook/react": "^8.0.10",
44
44
  "@storybook/react-webpack5": "^8.0.10",
45
45
  "@storybook/test": "^8.0.10",
46
+ "@chromatic-com/storybook": "^1.3.4",
47
+ "@storybook/react-dom-shim": "^8.0.10",
48
+ "@storybook/react-vite": "^8.0.10",
49
+ "vite": "^5.2.11",
46
50
  "@types/react": "^17.0.21",
47
51
  "@types/react-table": "^7.7.8",
48
52
  "@typescript-eslint/eslint-plugin": "^4.31.1",
@@ -72,6 +76,7 @@
72
76
  "storybook": "^8.0.10",
73
77
  "tslib": "^2.3.1",
74
78
  "typescript": "^4.4.3",
79
+ "vite-plugin-dts": "^3.9.1",
75
80
  "yup": "^0.32.11"
76
81
  },
77
82
  "peerDependencies": {
@@ -134,11 +139,5 @@
134
139
  "lint-staged": {
135
140
  "*.+(js|ts|jsx|tsx)": "eslint --fix",
136
141
  "*.+(json|css|md)": "prettier --write"
137
- },
138
- "dependencies": {
139
- "@chromatic-com/storybook": "^1.3.4",
140
- "@storybook/react-dom-shim": "^8.0.10",
141
- "@storybook/react-vite": "^8.0.10",
142
- "vite": "^5.2.11"
143
142
  }
144
143
  }