@getsoren/design-system 4.88.0 → 4.89.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,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { InvalidColor } from '../../../utils/getInvalidColor';
2
+ import { InvalidColor } from '../../../utils/colors';
3
3
  export interface CounterProps {
4
4
  label: ReactNode;
5
5
  /** Secondary line under the label */
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { InvalidColor } from '../../../utils/getInvalidColor';
2
+ import { InvalidColor } from '../../../utils/colors';
3
3
  export interface PillOption {
4
4
  value: string;
5
5
  label: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
2
  import { PropsWithChildren, ReactNode } from 'react';
3
- import { InvalidColor } from '../../../utils/getInvalidColor';
3
+ import { InvalidColor } from '../../../utils/colors';
4
4
  export interface TextFieldGroupProps extends PropsWithChildren {
5
5
  /** `row` puts two short fields side by side */
6
6
  direction?: "column" | "row";
@@ -144,9 +144,9 @@ export { default as useSnackbar } from './hooks/useSnackbar/useSnackbar';
144
144
  export * from './hooks/useTabs/useTabs';
145
145
  export { default as useTabs } from './hooks/useTabs/useTabs';
146
146
  export type { DataAttributes } from './types/dataAttributes';
147
+ export * from './utils/colors';
147
148
  export * from './utils/getBackgroundImageElevation';
148
149
  export { default as getBackgroundImageElevation } from './utils/getBackgroundImageElevation';
149
- export type { InvalidColor } from './utils/getInvalidColor';
150
150
  export { default as isoToEmojiFlag } from './utils/isoToEmojiFlag';
151
151
  export { default as pickDataAttributes } from './utils/pickDataAttributes';
152
152
  export * from './utils/pxToRem';
@@ -0,0 +1,14 @@
1
+ import { Theme } from '@mui/material';
2
+ import { Palette } from '@mui/material/styles';
3
+ export type InvalidColor = "error" | "warning";
4
+ /** Resting border of a control: grey 400 in light mode, the translucent outline of the dark palette otherwise */
5
+ export declare const getOutlineColor: (theme: Theme) => string;
6
+ /**
7
+ * Resting border of a surface read as content rather than as a form control (card, text area): grey 200 in light
8
+ * mode, the same dark outline as a control otherwise
9
+ */
10
+ export declare const getSoftOutlineColor: ({ border, grey, mode }: Palette) => string;
11
+ /** Colour of an invalid control: the error palette, or the softer warning one for an answer still to be given */
12
+ export declare const getInvalidColor: (theme: Theme, color?: InvalidColor) => string;
13
+ /** Grey that sets a surface apart from the paper it sits on (avatar round, own message, filled composer), in both modes. */
14
+ export declare const getSubtleSurfaceColor: ({ grey, mode }: Palette) => string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@getsoren/design-system",
3
3
  "description": "Design System React library",
4
4
  "sideEffects": false,
5
- "version": "4.88.0",
5
+ "version": "4.89.0",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",
@@ -1,5 +0,0 @@
1
- import { Theme } from '@mui/material';
2
- export type InvalidColor = "error" | "warning";
3
- /** Colour of an invalid control: the error palette, or the softer warning one for an answer still to be given */
4
- declare const getInvalidColor: (theme: Theme, color?: InvalidColor) => string;
5
- export default getInvalidColor;
@@ -1,4 +0,0 @@
1
- import { Theme } from '@mui/material';
2
- /** Resting border of a control: grey 400 in light mode, the translucent outline of the dark palette otherwise */
3
- declare const getOutlineColor: (theme: Theme) => string;
4
- export default getOutlineColor;
@@ -1,4 +0,0 @@
1
- import { Palette } from '@mui/material/styles';
2
- /** Grey that sets a surface apart from the paper it sits on (avatar round, own message, filled composer), in both modes. */
3
- declare const getSubtleSurfaceColor: ({ grey, mode }: Palette) => string;
4
- export default getSubtleSurfaceColor;