@am92/react-design-system 2.10.1 → 2.10.4-beta.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.
@@ -1,2 +1,2 @@
1
- import type { IDsFileUploaderProps, TContentType, TMultiple } from './DsFileUploader.Types';
2
- export declare const DsFileUploader: <Multiple extends TMultiple, ContentType extends TContentType>(inProps: IDsFileUploaderProps<Multiple, ContentType>) => import("react/jsx-runtime").JSX.Element;
1
+ import type { DsFileUploaderProps, TContentType, TMultiple } from './DsFileUploader.Types';
2
+ export declare const DsFileUploader: <Multiple extends TMultiple, ContentType extends TContentType>(inProps: DsFileUploaderProps<Multiple, ContentType>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  export declare const DsFileUploaderOverrides: {
2
2
  DsFileUploader: {
3
- defaultProps: import("./DsFileUploader.Types").IDsFileUploaderProps<import("./DsFileUploader.Types").TMultiple, "FILE">;
3
+ defaultProps: import("./DsFileUploader.Types").DsFileUploaderProps<import("./DsFileUploader.Types").TMultiple, "FILE">;
4
4
  };
5
5
  };
@@ -58,7 +58,7 @@ export type TErrorFile<CONTENT_TYPE> = {
58
58
  errorCode: TErrorCodes;
59
59
  };
60
60
  export type TErrorValue<Multiple, CONTENT_TYPE> = Multiple extends false ? TErrorFile<CONTENT_TYPE> | null : TErrorFile<CONTENT_TYPE>[];
61
- export interface IDsFileUploaderProps<Multiple extends TMultiple = true, ContentType extends TContentType = 'FILE'> {
61
+ export interface DsFileUploaderProps<Multiple extends TMultiple = true, ContentType extends TContentType = 'FILE'> {
62
62
  InputLabelProps?: Omit<DsInputLabelProps, 'ref' | 'error' | 'success' | 'htmlFor' | 'disabled'>;
63
63
  /**
64
64
  * Name attribute of the input element.
@@ -177,7 +177,7 @@ export interface IDsFileUploaderDropZoneProps extends DsStackProps {
177
177
  * @param {TFileUploaderVariant} variant The variant of file uploader component.
178
178
  * @default 'FULL'
179
179
  */
180
- variant?: IDsFileUploaderProps['variant'];
180
+ variant?: DsFileUploaderProps['variant'];
181
181
  /**
182
182
  * The `iconProps` component to be used for the file uploader.
183
183
  */
@@ -226,29 +226,29 @@ export interface IDsFileUploaderItemSegmentProps extends DsStackProps {
226
226
  * @param {string} name The name provided to the component.
227
227
  * @param {TFile<TContentType>} [file] This would be the valid `TFile<TContentType>` type objects selected with its content value depending on `contentType` props or as provided in value.
228
228
  */
229
- onPreview?: IDsFileUploaderProps['onPreview'];
229
+ onPreview?: DsFileUploaderProps['onPreview'];
230
230
  /**
231
231
  * Callback fired when an existing file is removed.
232
232
  *
233
233
  * @param {string} name The name provided to the component.
234
234
  * @param {TFile<TContentType>} [file] This would be the valid `TFile<TContentType>` type objects selected with its content value depending on `contentType` props or as provided in value.
235
235
  */
236
- onDelete?: IDsFileUploaderProps['onDelete'];
236
+ onDelete?: DsFileUploaderProps['onDelete'];
237
237
  /**
238
238
  * Callback fired when an download button is clicked for an existing file.
239
239
  *
240
240
  * @param {string} name The name provided to the component.
241
241
  * @param {TFile<TContentType>} [file] This would be the valid `TFile<TContentType>` type objects selected with its content value depending on `contentType` props or as provided in value.
242
242
  */
243
- onDownload?: IDsFileUploaderProps['onDownload'];
243
+ onDownload?: DsFileUploaderProps['onDownload'];
244
244
  /**
245
245
  slots prop is used to provide custom slots components to the file uploader
246
246
  */
247
- slots?: IDsFileUploaderProps['slots'];
247
+ slots?: DsFileUploaderProps['slots'];
248
248
  /**
249
249
  slotPros used to provide custom props to the individual slots of the file uploader
250
250
  */
251
- slotProps?: IDsFileUploaderProps['slotProps'];
251
+ slotProps?: DsFileUploaderProps['slotProps'];
252
252
  }
253
253
  export interface IDsFileUploaderActionButtonProps extends DsIconButtonProps {
254
254
  /**
@@ -308,5 +308,5 @@ export type TDsFileUploaderSlotProps = {
308
308
  */
309
309
  DownloadButton?: IDsFileUploaderActionButtonProps;
310
310
  };
311
- export declare const DsFileUploaderDefaultProps: IDsFileUploaderProps<TMultiple, 'FILE'>;
311
+ export declare const DsFileUploaderDefaultProps: DsFileUploaderProps<TMultiple, 'FILE'>;
312
312
  export declare const DsFileUploaderDropzoneDefaultProps: IDsFileUploaderDropZoneProps;
@@ -1,8 +1,8 @@
1
- import type { IDsFileUploaderProps, TContentType, TErrorValue, TFile, TMultiple, TFileValue } from './DsFileUploader.Types';
1
+ import type { DsFileUploaderProps, TContentType, TErrorValue, TFile, TMultiple, TFileValue } from './DsFileUploader.Types';
2
2
  export declare const mergeProps: <T extends Record<string, any>>(inProps: Partial<T>, defaultProps: T) => T;
3
3
  export declare const getFileTypeIcon: <ContentType extends TContentType>(file: TFile<ContentType>) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const humanizeFileSize: (bytes: number, decimals?: number) => string;
5
- export declare const getDefaultValue: <Multiple extends TMultiple, ContentType extends TContentType>(props: IDsFileUploaderProps<Multiple, ContentType>) => TFileValue<Multiple, ContentType> | null;
5
+ export declare const getDefaultValue: <Multiple extends TMultiple, ContentType extends TContentType>(props: DsFileUploaderProps<Multiple, ContentType>) => TFileValue<Multiple, ContentType> | null;
6
6
  export declare const getValidProcessedFile: <Multiple extends TMultiple, ContentType extends TContentType>(filesToProcess: FileList, files: TFileValue<Multiple, ContentType> | null, accept: string, minSize?: number, maxSize?: number, contentType?: TContentType) => Promise<{
7
7
  valid: TFileValue<Multiple, ContentType>;
8
8
  invalid: TErrorValue<Multiple, ContentType>;
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEmotionNonce } from "../../Hooks/nonce";
2
3
  export function SingleDotLoader() {
4
+ const nonce = useEmotionNonce();
3
5
  return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1000 1000", preserveAspectRatio: "xMidYMid slice", style: {
4
6
  width: '100%',
5
7
  height: '100%',
6
8
  transform: 'translate3d(0px, 0px, 0px)',
7
9
  contentVisibility: 'visible'
8
- }, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: "__loader_element_11", children: _jsx("rect", { width: "1000", height: "1000", x: "0", y: "0" }) }), _jsx("style", { children: `@keyframes ball {
10
+ }, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: "__loader_element_11", children: _jsx("rect", { width: "1000", height: "1000", x: "0", y: "0" }) }), _jsx("style", { nonce: nonce, children: `@keyframes ball {
9
11
  0%{
10
12
  transform: matrix(2.428800106048584,0,0,2.428800106048584,491.30035400390625,444.7691650390625)
11
13
  }
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEmotionNonce } from "../../Hooks/nonce";
2
3
  export function ThreeDotLoader() {
4
+ const nonce = useEmotionNonce();
3
5
  return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1000 1000", preserveAspectRatio: "xMidYMid slice", style: {
4
6
  width: '100%',
5
7
  height: '100%',
6
8
  transform: 'translate3d(0px, 0px, 0px)',
7
9
  contentVisibility: 'visible'
8
- }, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: `__loader_element_524`, children: _jsx("rect", { width: "1000", height: "1000", x: "0", y: "0" }) }), _jsx("style", { children: `@keyframes ball1 {
10
+ }, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: `__loader_element_524`, children: _jsx("rect", { width: "1000", height: "1000", x: "0", y: "0" }) }), _jsx("style", { nonce: nonce, children: `@keyframes ball1 {
9
11
  0%{
10
12
  transform: matrix(1.3200000524520874,0,0,1.3200000524520874,178.98719787597656,413.82720947265625)
11
13
  }
@@ -18,7 +18,7 @@ export const PALETTE = {
18
18
  secondaryGrey30: '#E2E2E2',
19
19
  secondaryGrey20: '#F1F1F1',
20
20
  secondaryGrey10: '#F9F9F9',
21
- tertiary100: '#12877F',
21
+ tertiary100: '#0C746C',
22
22
  tertiary80: '#49A49E',
23
23
  tertiary60: '#81C1BD',
24
24
  tertiary40: '#B8DDDB',
@@ -0,0 +1 @@
1
+ export declare const useEmotionNonce: () => string | undefined;
@@ -0,0 +1,5 @@
1
+ import { __unsafe_useEmotionCache } from '@emotion/react';
2
+ export const useEmotionNonce = () => {
3
+ const cache = __unsafe_useEmotionCache();
4
+ return cache?.nonce;
5
+ };
@@ -1031,7 +1031,7 @@ declare const componentOverrides: {
1031
1031
  };
1032
1032
  };
1033
1033
  DsFileUploader: {
1034
- defaultProps: import("../Components").IDsFileUploaderProps<import("../Components").TMultiple, "FILE">;
1034
+ defaultProps: import("../Components").DsFileUploaderProps<import("../Components").TMultiple, "FILE">;
1035
1035
  };
1036
1036
  MuiFab: {
1037
1037
  defaultProps: import("../Components").DsFabProps;
@@ -11,8 +11,8 @@ export default function getLightModeColorScheme(colorPalette) {
11
11
  surfaceSecondary: secondaryGrey10,
12
12
  surfaceTertiary: secondaryGrey100,
13
13
  typoPrimary: primaryBlackLight,
14
- typoSecondary: secondaryGrey80,
15
- typoTertiary: secondaryGrey60,
14
+ typoSecondary: secondaryGrey90,
15
+ typoTertiary: secondaryGrey80,
16
16
  typoActionPrimary: primary,
17
17
  typoActionSecondary: secondary100,
18
18
  typoActionTertiary: tertiary100,
@@ -0,0 +1 @@
1
+ export { CacheProvider as DsCacheProvider } from '@emotion/react';
@@ -0,0 +1 @@
1
+ export { CacheProvider as DsCacheProvider } from '@emotion/react';
package/dist/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export * from './utils';
11
11
  export * from './x-datepicker';
12
12
  export * from './x-charts';
13
13
  export * from './Hooks';
14
+ export * from './emotionReact';
package/dist/index.js CHANGED
@@ -11,3 +11,4 @@ export * from './utils';
11
11
  export * from './x-datepicker';
12
12
  export * from './x-charts';
13
13
  export * from './Hooks';
14
+ export * from './emotionReact';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@am92/react-design-system",
3
- "version": "2.10.1",
3
+ "version": "2.10.4-beta.0",
4
4
  "description": "ReactJS Design System using Material UI",
5
5
  "sideEffects": false,
6
6
  "types": "dist/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  "dist/**/*.json"
14
14
  ],
15
15
  "dependencies": {
16
- "@emotion/react": "~11.11.4",
17
- "@emotion/styled": "~11.11.0",
16
+ "@emotion/react": "~11.14.0",
17
+ "@emotion/styled": "~11.14.0",
18
18
  "@mui/base": "~5.0.0-beta.26",
19
19
  "@mui/lab": "5.0.0-alpha.155",
20
20
  "@mui/material": "~5.16.7",
@@ -49,7 +49,9 @@
49
49
  "test": "echo 'Error: no test specified'",
50
50
  "preversion": "npm-run-all build test",
51
51
  "version": "echo 'Versioning'",
52
- "postversion": "git push && git push --tags && npm run publish:pkg",
52
+ "postversion": "if [ \"$BETA\" = \"true\" ]; then echo 'Skipping stable publish for beta'; else git push && git push --tags && npm run publish:pkg; fi",
53
+ "release:beta": "BETA=true npm version prerelease --preid=beta && npm publish --tag beta && git push && git push --tags",
54
+ "release:beta:dry": "BETA=true npm version prerelease --preid=beta --no-git-tag-version && npm publish --tag beta --dry-run",
53
55
  "publish:pkg": "npm publish"
54
56
  },
55
57
  "repository": "git@github.com:heliumtank92/am92-react-design-system.git",