@getsoren/design-system 4.64.0 → 4.66.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.
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const RefreshIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default RefreshIcon;
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@mui/material/SvgIcon';
2
+ declare const StorefrontIcon: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default StorefrontIcon;
@@ -0,0 +1,15 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ export interface LogoAvatarProps {
4
+ src?: string | null;
5
+ alt?: string;
6
+ size?: number;
7
+ fallbackIcon?: ReactNode;
8
+ sx?: SxProps<Theme>;
9
+ }
10
+ /**
11
+ * Rounded square avatar for an entity logo (supplier, agency, brand…). Falls back to a storefront
12
+ * icon when the logo is missing or broken; pass `fallbackIcon` for other entity kinds.
13
+ */
14
+ declare const LogoAvatar: ({ src, alt, size, sx, fallbackIcon }: LogoAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export default LogoAvatar;
@@ -0,0 +1,17 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ export interface NumberBadgeProps {
4
+ children: ReactNode;
5
+ /** Palette key driving the fill (`<color>.main`) and the text (`<color>.contrastText`) */
6
+ color?: "primary" | "secondary" | "error" | "info" | "success" | "warning";
7
+ /** Injected by MapView from the marker `size` when used as a marker IconComponent */
8
+ width?: number;
9
+ height?: number;
10
+ sx?: SxProps<Theme>;
11
+ }
12
+ /**
13
+ * Standalone numbered disc badge. Made to identify the same item across two surfaces —
14
+ * e.g. a card in a list and its marker on a map — at a glance.
15
+ */
16
+ declare const NumberBadge: ({ children, color, width, height, sx }: NumberBadgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
+ export default NumberBadge;
@@ -1,7 +1,12 @@
1
+ import { SxProps, Theme } from '@mui/material';
1
2
  import { MouseEvent } from 'react';
2
3
  export interface DialogCloseProps {
3
4
  onClick?: (e: MouseEvent) => void;
4
5
  position?: "absolute" | "relative";
6
+ sx?: SxProps<Theme>;
5
7
  }
6
- declare const DialogCloseIcon: ({ onClick, position }: DialogCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ /**
9
+ * Dialog close button: permanent grey outline, icon and hairline reinforced on hover.
10
+ */
11
+ declare const DialogCloseIcon: ({ onClick, position, sx }: DialogCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
12
  export default DialogCloseIcon;
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ErrorStateProps {
3
+ /** Shows the brand logo above the message (full-page crash screens) */
4
+ fullPage?: boolean;
5
+ /** Reload/retry callback — the host app owns the navigation strategy */
6
+ onReload?: () => void;
7
+ title?: ReactNode;
8
+ description?: ReactNode;
9
+ actionLabel?: ReactNode;
10
+ }
11
+ /**
12
+ * Error screen counterpart of EmptyState: headline, hairline divider and a reload action.
13
+ * Router-agnostic — the reload behaviour comes from `onReload`.
14
+ */
15
+ declare const ErrorState: ({ fullPage, onReload, title, description, actionLabel }: ErrorStateProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export default ErrorState;
@@ -0,0 +1,90 @@
1
+ import { AutocompleteChangeReason, AutocompleteProps, AutocompleteRenderGroupParams, AutocompleteRenderOptionState, PopperProps, SxProps, TextFieldProps } from '@mui/material';
2
+ import { HTMLAttributes, JSXElementConstructor, KeyboardEvent, ReactNode, Ref, SyntheticEvent } from 'react';
3
+ interface ActionEndOption {
4
+ label?: ReactNode;
5
+ onClick?: () => void;
6
+ value?: unknown;
7
+ isActionEndOption?: boolean;
8
+ }
9
+ export interface ApiAutocompleteProps<Value, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false> {
10
+ /**
11
+ * Action added in and of options
12
+ */
13
+ actionEndOption?: ActionEndOption;
14
+ /** Replaces the default dropdown caret (e.g. a switcher's up/down chevrons). */
15
+ popupIcon?: ReactNode;
16
+ limitTags?: number;
17
+ defaultValue?: Value;
18
+ value?: Multiple extends true ? Value[] | null : Value | null;
19
+ label?: string;
20
+ placeholder?: string;
21
+ name?: string;
22
+ keyOptionLabel: string | string[];
23
+ noOptionsText?: ReactNode;
24
+ getOptionLabel?: (option: Value) => string;
25
+ renderOption?: (props: HTMLAttributes<HTMLLIElement>, option: Value & ActionEndOption, state: AutocompleteRenderOptionState) => ReactNode;
26
+ searchKey?: string;
27
+ required?: boolean;
28
+ queryParams?: Record<string, unknown>;
29
+ queryParamsOnFocus?: Record<string, unknown>;
30
+ queryOptions?: Record<string, unknown>;
31
+ helperMessage?: string | false;
32
+ disabled?: boolean;
33
+ disableClearable?: DisableClearable;
34
+ width?: number | string;
35
+ sx?: SxProps;
36
+ error?: boolean;
37
+ openOnFocus?: boolean;
38
+ autoHighlight?: boolean;
39
+ getOptionKey?: (option: Value) => string;
40
+ size?: AutocompleteProps<Value, false, false, false>["size"];
41
+ renderInput?: AutocompleteProps<Value, false, false, false>["renderInput"];
42
+ InputProps?: TextFieldProps["InputProps"];
43
+ setSelectedValue?: (value: Multiple extends true ? Value[] | null : Value | null) => void;
44
+ shrink?: boolean;
45
+ onFocus?: () => void;
46
+ onBlur?: () => void;
47
+ variant?: "standard" | "outlined" | "filled";
48
+ endAdornment?: ReactNode;
49
+ /** Hide the circular loader shown in the input while fetching; the listbox loading state is unaffected. */
50
+ disableInputLoader?: boolean;
51
+ fetchOnFocus?: boolean;
52
+ filterOptions?: (options: Value[], state: {
53
+ inputValue: string;
54
+ }) => Value[];
55
+ groupBy?: (option: Value) => string;
56
+ slotProps?: AutocompleteProps<Value, false, false, false>["slotProps"];
57
+ inputSlotProps?: TextFieldProps["slotProps"];
58
+ disableCloseOnSelect?: boolean;
59
+ PopperComponent?: JSXElementConstructor<PopperProps>;
60
+ ListboxProps?: AutocompleteProps<Value, false, false, false>["ListboxProps"];
61
+ renderGroup?: (params: AutocompleteRenderGroupParams) => ReactNode;
62
+ filterSelectedOptions?: boolean;
63
+ inputRef?: Ref<HTMLInputElement>;
64
+ multiple?: Multiple;
65
+ open?: boolean;
66
+ onOpen?: () => void;
67
+ onClose?: () => void;
68
+ blurOnSelect?: "touch" | "mouse" | true | false;
69
+ autoFocus?: boolean;
70
+ onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
71
+ onNoResults?: (search: string) => void;
72
+ /** Resolves the option `image` field to a displayable URL (e.g. a CDN path adapter). Identity by default. */
73
+ getOptionImageSrc?: (imagePath: string) => string | undefined;
74
+ onChange?(event: SyntheticEvent, value: Value | Value[] | null, reason: AutocompleteChangeReason): void;
75
+ /**
76
+ * Injected query hook. Structurally typed so any data layer fits (react-query hooks match as-is)
77
+ * without making the library depend on one.
78
+ */
79
+ useQuery(params?: Record<string, unknown>, options?: {
80
+ query: {
81
+ enabled: boolean;
82
+ };
83
+ }): {
84
+ data?: Value[];
85
+ isFetching: boolean;
86
+ refetch: (refetchOptions?: Record<string, unknown>) => Promise<unknown>;
87
+ };
88
+ }
89
+ declare const ApiAutocomplete: <Value extends Record<string | symbol, any>>({ actionEndOption, popupIcon, blurOnSelect, label, placeholder, name, slotProps, disableClearable, setSelectedValue, useQuery, noOptionsText, renderOption, getOptionLabel: getOptionLabelProp, keyOptionLabel, queryParams, openOnFocus, autoHighlight, queryParamsOnFocus, queryOptions, required, helperMessage, error, disabled, defaultValue, onFocus, onBlur, onChange, sx, renderInput, variant, InputProps, size, shrink, getOptionKey, width, limitTags, groupBy, disableCloseOnSelect, renderGroup, value, PopperComponent, ListboxProps, multiple, filterSelectedOptions, autoFocus, onKeyDown, onNoResults, endAdornment, inputSlotProps, inputRef, open, onOpen, onClose, searchKey, disableInputLoader, fetchOnFocus, filterOptions, getOptionImageSrc, }: ApiAutocompleteProps<Value>) => import("@emotion/react/jsx-runtime").JSX.Element;
90
+ export default ApiAutocomplete;
@@ -0,0 +1,24 @@
1
+ import { Breakpoint, SxProps } from '@mui/material';
2
+ import { PropsWithChildren, ReactNode } from 'react';
3
+ export type ResponsiveStyleValue<T> = T | Array<T | null> | {
4
+ [key: string]: T | null;
5
+ };
6
+ export interface PageHeaderProps extends PropsWithChildren {
7
+ title?: ReactNode;
8
+ children?: ReactNode;
9
+ maxWidth?: Breakpoint | false;
10
+ sx?: SxProps;
11
+ RightContent?: ReactNode;
12
+ LeftContent?: ReactNode;
13
+ marginBottom?: number;
14
+ disableDivider?: boolean;
15
+ direction?: ResponsiveStyleValue<"row" | "row-reverse" | "column" | "column-reverse">;
16
+ alignItems?: ResponsiveStyleValue<"flex-start" | "center" | "flex-end" | "stretch" | "baseline">;
17
+ }
18
+ /**
19
+ * Page header block: title, optional side slots and filters as children.
20
+ * The title block's vertical padding is asymmetric on purpose: a page title belongs to the content
21
+ * below it, so it sits closer to that content than to the app bar above.
22
+ */
23
+ declare const PageHeader: ({ title, children, sx, RightContent, LeftContent, disableDivider, alignItems, direction, marginBottom, maxWidth, }: PageHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
24
+ export default PageHeader;
@@ -15,6 +15,9 @@ declare module "@mui/material/Button" {
15
15
  interface ButtonPropsColorOverrides {
16
16
  contrast: true;
17
17
  }
18
+ interface ButtonPropsSizeOverrides {
19
+ xSmall: true;
20
+ }
18
21
  interface ButtonPropsVariantOverrides {
19
22
  dashed: true;
20
23
  "dashed-rounded": true;
@@ -78,7 +78,9 @@ declare const light: {
78
78
  "16p": string;
79
79
  "30p": string;
80
80
  "50p": string;
81
+ "160p": string;
81
82
  black: string;
83
+ contrastText: string;
82
84
  dark: string;
83
85
  light: string;
84
86
  main: string;
@@ -208,6 +210,7 @@ declare const dark: {
208
210
  "16p": string;
209
211
  "30p": string;
210
212
  "50p": string;
213
+ "160p": string;
211
214
  black: string;
212
215
  contrastText: string;
213
216
  dark: string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ anErrorOccurred: string;
2
3
  apply: string;
3
4
  clear: string;
4
5
  clickToUpload: string;
@@ -11,9 +12,12 @@ declare const _default: {
11
12
  files: string;
12
13
  month: string;
13
14
  noResult: string;
15
+ oops: string;
14
16
  open: string;
15
17
  openFullPage: string;
16
18
  openFullScreen: string;
19
+ orDragAndDrop: string;
20
+ reload: string;
17
21
  reset: string;
18
22
  selectAll: string;
19
23
  today: string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ anErrorOccurred: string;
2
3
  apply: string;
3
4
  clear: string;
4
5
  clickToUpload: string;
@@ -11,9 +12,12 @@ declare const _default: {
11
12
  files: string;
12
13
  month: string;
13
14
  noResult: string;
15
+ oops: string;
14
16
  open: string;
15
17
  openFullPage: string;
16
18
  openFullScreen: string;
19
+ orDragAndDrop: string;
20
+ reload: string;
17
21
  reset: string;
18
22
  selectAll: string;
19
23
  today: string;
@@ -33,6 +33,11 @@ export * from './components/DataDisplay/ListItemCard';
33
33
  export { default as ListItemCard } from './components/DataDisplay/ListItemCard';
34
34
  export * from './components/DataDisplay/Logo';
35
35
  export { default as Logo } from './components/DataDisplay/Logo';
36
+ export type { LogoAvatarProps } from './components/DataDisplay/LogoAvatar/LogoAvatar';
37
+ export * from './components/DataDisplay/LogoAvatar/LogoAvatar';
38
+ export { default as LogoAvatar } from './components/DataDisplay/LogoAvatar/LogoAvatar';
39
+ export * from './components/DataDisplay/NumberBadge/NumberBadge';
40
+ export { default as NumberBadge } from './components/DataDisplay/NumberBadge/NumberBadge';
36
41
  export { default as PlanningTimeline } from './components/DataDisplay/PlanningTimeline/PlanningTimeline';
37
42
  export * from './components/DataDisplay/PlanningTimeline/types';
38
43
  export * from './components/DataDisplay/StatusIcon';
@@ -49,10 +54,14 @@ export * from './components/Feedback/Dialog/DialogValidation/DialogValidation';
49
54
  export { default as DialogValidation } from './components/Feedback/Dialog/DialogValidation/DialogValidation';
50
55
  export type { EmptyStateProps } from './components/Feedback/EmptyState/EmptyState';
51
56
  export { default as EmptyState } from './components/Feedback/EmptyState/EmptyState';
57
+ export * from './components/Feedback/ErrorState/ErrorState';
58
+ export { default as ErrorState } from './components/Feedback/ErrorState/ErrorState';
52
59
  export * from './components/Feedback/Lightbox';
53
60
  export { default as Lightbox } from './components/Feedback/Lightbox';
54
61
  export * from './components/Inputs/ActionAppBar';
55
62
  export { default as ActionAppBar } from './components/Inputs/ActionAppBar';
63
+ export * from './components/Inputs/ApiAutocomplete/ApiAutocomplete';
64
+ export { default as ApiAutocomplete } from './components/Inputs/ApiAutocomplete/ApiAutocomplete';
56
65
  export * from './components/Inputs/AutocompleteFilter';
57
66
  export { default as AutocompleteFilter } from './components/Inputs/AutocompleteFilter';
58
67
  export type { ButtonProps } from './components/Inputs/Button';
@@ -75,6 +84,8 @@ export * from './components/Layout/Backoffice';
75
84
  export { default as Backoffice } from './components/Layout/Backoffice';
76
85
  export { default as CollapsingHeader } from './components/Layout/CollapsingHeader/CollapsingHeader';
77
86
  export * from './components/Layout/CollapsingHeader/types';
87
+ export * from './components/Layout/PageHeader/PageHeader';
88
+ export { default as PageHeader } from './components/Layout/PageHeader/PageHeader';
78
89
  export * from './components/Navigation/NavigationMenu/NavigationMenu';
79
90
  export { default as NavigationMenu } from './components/Navigation/NavigationMenu/NavigationMenu';
80
91
  export * from './components/Navigation/TabPanel';
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.64.0",
5
+ "version": "4.66.0",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",