@scbt-ecom/ui 0.72.0 → 0.73.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.
@@ -6,11 +6,11 @@ export declare const allowedIcons: {
6
6
  readonly communication: readonly ["communication/phone"];
7
7
  readonly editor: readonly ["editor/bold", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo"];
8
8
  readonly files: readonly ["files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/upload"];
9
- readonly general: readonly ["general/calendar", "general/check", "general/close", "general/edit", "general/hiddenEye", "general/menu", "general/plus", "general/reorder", "general/shield", "general/showEye"];
9
+ readonly general: readonly ["general/calendar", "general/check", "general/close", "general/edit", "general/hiddenEye", "general/menu", "general/plus", "general/reorder", "general/search", "general/shield", "general/showEye"];
10
10
  readonly info: readonly ["info/helpCircle", "info/warningCircle"];
11
11
  readonly logos: readonly ["logos/beeline", "logos/megafon", "logos/mts"];
12
12
  readonly social: readonly ["social/classmates", "social/telegram", "social/vk"];
13
13
  readonly status: readonly ["status/badSmile", "status/iconMark", "status/iconRetry", "status/iconUser"];
14
14
  };
15
- readonly flatten: readonly ["arrows/arrowCircle", "arrows/arrowDownRight", "arrows/arrowLink", "arrows/arrowRight", "arrows/arrowRotate", "arrows/arrowScroll", "brandLogos/logoBlack", "brandLogos/logoBusiness", "brandLogos/logoGray", "brandLogos/logoInsurance", "brandLogos/logoMain", "brandLogos/logoWhite", "communication/phone", "editor/bold", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo", "files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/upload", "general/calendar", "general/check", "general/close", "general/edit", "general/hiddenEye", "general/menu", "general/plus", "general/reorder", "general/shield", "general/showEye", "info/helpCircle", "info/warningCircle", "logos/beeline", "logos/megafon", "logos/mts", "social/classmates", "social/telegram", "social/vk", "status/badSmile", "status/iconMark", "status/iconRetry", "status/iconUser"];
15
+ readonly flatten: readonly ["arrows/arrowCircle", "arrows/arrowDownRight", "arrows/arrowLink", "arrows/arrowRight", "arrows/arrowRotate", "arrows/arrowScroll", "brandLogos/logoBlack", "brandLogos/logoBusiness", "brandLogos/logoGray", "brandLogos/logoInsurance", "brandLogos/logoMain", "brandLogos/logoWhite", "communication/phone", "editor/bold", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo", "files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/upload", "general/calendar", "general/check", "general/close", "general/edit", "general/hiddenEye", "general/menu", "general/plus", "general/reorder", "general/search", "general/shield", "general/showEye", "info/helpCircle", "info/warningCircle", "logos/beeline", "logos/megafon", "logos/mts", "social/classmates", "social/telegram", "social/vk", "status/badSmile", "status/iconMark", "status/iconRetry", "status/iconUser"];
16
16
  };
@@ -233,6 +233,12 @@ export declare const iconsMap: {
233
233
  desc?: string;
234
234
  descId?: string;
235
235
  }>;
236
+ 'general/search': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
237
+ title?: string;
238
+ titleId?: string;
239
+ desc?: string;
240
+ descId?: string;
241
+ }>;
236
242
  'general/shield': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
237
243
  title?: string;
238
244
  titleId?: string;
@@ -4,7 +4,7 @@ export interface SpritesMap {
4
4
  communication: 'phone';
5
5
  editor: 'bold' | 'heading' | 'italic' | 'link' | 'list' | 'palette' | 'redo' | 'removeFormatting' | 'space' | 'strikethrough' | 'typography' | 'underline' | 'undo';
6
6
  files: 'border' | 'borderError' | 'documentFilled' | 'documentOutline' | 'upload';
7
- general: 'calendar' | 'check' | 'close' | 'edit' | 'hiddenEye' | 'menu' | 'plus' | 'reorder' | 'shield' | 'showEye';
7
+ general: 'calendar' | 'check' | 'close' | 'edit' | 'hiddenEye' | 'menu' | 'plus' | 'reorder' | 'search' | 'shield' | 'showEye';
8
8
  info: 'helpCircle' | 'warningCircle';
9
9
  logos: 'beeline' | 'megafon' | 'mts';
10
10
  social: 'classmates' | 'telegram' | 'vk';
@@ -1,7 +1,7 @@
1
1
  import { Table as TTable } from '@tanstack/react-table';
2
2
  import { DataTableProps } from './model';
3
- type DesktopTableProps<TData extends {}> = Pick<DataTableProps<TData>, 'enableHeaders' | 'classes' | 'mode' | 'pagination'> & {
3
+ type DesktopTableProps<TData extends {}> = Pick<DataTableProps<TData>, 'enableHeaders' | 'classes' | 'mode' | 'pagination' | 'empty'> & {
4
4
  table: TTable<TData>;
5
5
  };
6
- export declare const Desktop: <TData extends {}>({ mode, enableHeaders, table, classes, pagination }: DesktopTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Desktop: <TData extends {}>({ mode, enableHeaders, table, classes, pagination, empty }: DesktopTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Table } from '@tanstack/react-table';
2
2
  import { DataTableProps } from './model';
3
- export declare const Mobile: <TData extends {}>({ mode, enableHeaders, table, classes }: Pick<DataTableProps<TData>, "enableHeaders" | "classes" | "mode"> & {
3
+ export declare const Mobile: <TData extends {}>({ mode, enableHeaders, table, classes, empty }: Pick<DataTableProps<TData>, "enableHeaders" | "classes" | "mode" | "empty"> & {
4
4
  table: Table<TData>;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DataTableProps } from './model';
2
- export declare const DataTable: <TData extends {}>({ columns, data, enableHeaders, mode, classes, pagination, pageSize }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DataTable: <TData extends {}>({ columns, data, enableHeaders, mode, classes, pagination, empty, pageSize }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
@@ -59,5 +59,9 @@ export type DataTableProps<TData extends {}> = {
59
59
  * количество элементов на странице
60
60
  */
61
61
  pageSize?: number;
62
+ /**
63
+ * для переопределения пустой таблицы
64
+ */
65
+ empty?: React.ReactNode;
62
66
  };
63
67
  export {};
@@ -1,7 +1,10 @@
1
1
  import { CellContext } from '@tanstack/react-table';
2
- interface EditableCellProps<TData, TValue> extends CellContext<TData, TValue> {
2
+ type Cell<TData, TValue> = CellContext<TData, TValue> & {
3
+ rowIndex?: number;
4
+ };
5
+ interface EditableCellProps<TData, TValue> extends Cell<TData, TValue> {
3
6
  target: keyof TData;
4
- update: (values: TData) => void;
7
+ update: (target: number, values: TData) => void;
5
8
  }
6
- export declare const EditableCell: <TData, TValue extends string | undefined>({ row, getValue, update, target }: EditableCellProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const EditableCell: <TData, TValue extends string | undefined>({ row, getValue, update, target, rowIndex }: EditableCellProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
7
10
  export {};
@@ -1 +1 @@
1
- <svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="calendar" fill="none" viewBox="0 0 19 20"><path fill="currentColor" fill-rule="evenodd" d="M4.56 0a1 1 0 0 1 1 1v.543h8.19V1a1 1 0 1 1 2 0v.604c1.714.317 3 1.834 3 3.639V16.3c0 2.032-1.63 3.7-3.667 3.7H4.417C2.38 20 .75 18.332.75 16.3V5.243a3.696 3.696 0 0 1 2.81-3.599V1a1 1 0 0 1 1-1Zm-.02 3.543h-.123c-.91 0-1.667.75-1.667 1.7v.671h14v-.671c0-.95-.758-1.7-1.667-1.7H4.58a1.066 1.066 0 0 1-.04 0Zm12.21 4.371h-14V16.3c0 .95.758 1.7 1.667 1.7h10.666c.91 0 1.667-.75 1.667-1.7V7.914Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="check" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m4.892 13.269 4.274 4.274L18.709 8"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="close" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M5.293 5.293a1 1 0 0 1 1.414 0L12 10.586l5.293-5.293a1 1 0 1 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 0-1.414Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="edit" fill="none" viewBox="0 0 19 19"><path fill="currentColor" d="M13.293.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-13 13A1 1 0 0 1 5 19H1a1 1 0 0 1-1-1v-4a1 1 0 0 1 .293-.707l13-13ZM14 2.414l-12 12V17h2.586l12-12L14 2.414Z"/><path fill="currentColor" fill-rule="evenodd" d="M9 18a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2h-8a1 1 0 0 1-1-1Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="hiddenEye" fill="none" viewBox="0 0 20 18"><path fill="currentColor" d="M2.707.293a1 1 0 0 0-1.414 1.414l2.424 2.424C2.287 5.207 1.04 6.685.106 8.553a1 1 0 0 0 0 .894C2.264 13.764 6.096 16 10 16c1.555 0 3.1-.355 4.53-1.055l2.763 2.762a1 1 0 0 0 1.414-1.414l-16-16Zm10.307 13.135c-.98.383-2 .572-3.014.572-2.969 0-6.002-1.62-7.87-5 .817-1.479 1.858-2.62 3.018-3.437l2.144 2.144a3 3 0 0 0 4.001 4.001l1.72 1.72Zm3.538-2.532c.483-.556.926-1.187 1.318-1.896-1.868-3.38-4.9-5-7.87-5-.112 0-.224.002-.336.007L7.879 2.223A10.215 10.215 0 0 1 10 2c3.903 0 7.736 2.236 9.894 6.553a1 1 0 0 1 0 .894 13.107 13.107 0 0 1-1.925 2.865l-1.417-1.416Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="menu" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M2 5.75c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25C2.56 7 2 6.44 2 5.75ZM2 12c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25C2.56 13.25 2 12.69 2 12Zm0 6.25c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25c-.69 0-1.25-.56-1.25-1.25Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="plus" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8 0a1 1 0 0 1 1 1v6h6a1 1 0 1 1 0 2H9v6a1 1 0 1 1-2 0V9H1a1 1 0 1 1 0-2h6V1a1 1 0 0 1 1-1Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="reorder" fill="none" viewBox="0 0 12 18"><path fill="currentColor" d="M2.5 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm2 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm5-12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm2 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-2 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="shield" fill="none" viewBox="0 0 25 24"><path fill="currentColor" d="M12.123 2.034 5.092 5.035a.967.967 0 0 0-.594.906c0 4.38.175 6.34.969 8.597 1.039 2.955 3.079 5.31 6.53 7.283.308.176.694.176 1 0 3.484-1.99 5.533-4.338 6.563-7.283.784-2.24.938-4.105.938-8.597a.973.973 0 0 0-.594-.906l-6.969-3a1.06 1.06 0 0 0-.812 0Zm.375 1.97 5.996 2.602c.087 7.175-1.32 10.32-5.987 13.181-4.79-2.979-6.061-6.158-6.012-13.173 1.363-.582 4.85-2.119 6.003-2.61Z"/><path fill="currentColor" d="M6.495 6.614c-.05 7.015 1.223 10.194 6.012 13.173l-.01-15.784c-1.152.492-4.64 2.03-6.002 2.611Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="showEye" fill="none" viewBox="0 0 20 14"><path fill="currentColor" d="M13 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/><path fill="currentColor" d="M19.894 6.553C17.736 2.236 13.904 0 10 0 6.097 0 2.264 2.236.106 6.553a1 1 0 0 0 0 .894C2.264 11.764 6.096 14 10 14c3.903 0 7.736-2.236 9.894-6.553a1 1 0 0 0 0-.894ZM10 12c-2.969 0-6.002-1.62-7.87-5C3.998 3.62 7.03 2 10 2c2.969 0 6.002 1.62 7.87 5-1.868 3.38-4.901 5-7.87 5Z"/></symbol></svg>
1
+ <svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="calendar" fill="none" viewBox="0 0 19 20"><path fill="currentColor" fill-rule="evenodd" d="M4.56 0a1 1 0 0 1 1 1v.543h8.19V1a1 1 0 1 1 2 0v.604c1.714.317 3 1.834 3 3.639V16.3c0 2.032-1.63 3.7-3.667 3.7H4.417C2.38 20 .75 18.332.75 16.3V5.243a3.696 3.696 0 0 1 2.81-3.599V1a1 1 0 0 1 1-1Zm-.02 3.543h-.123c-.91 0-1.667.75-1.667 1.7v.671h14v-.671c0-.95-.758-1.7-1.667-1.7H4.58a1.066 1.066 0 0 1-.04 0Zm12.21 4.371h-14V16.3c0 .95.758 1.7 1.667 1.7h10.666c.91 0 1.667-.75 1.667-1.7V7.914Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="check" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m4.892 13.269 4.274 4.274L18.709 8"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="close" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M5.293 5.293a1 1 0 0 1 1.414 0L12 10.586l5.293-5.293a1 1 0 1 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 0-1.414Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="edit" fill="none" viewBox="0 0 19 19"><path fill="currentColor" d="M13.293.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-13 13A1 1 0 0 1 5 19H1a1 1 0 0 1-1-1v-4a1 1 0 0 1 .293-.707l13-13ZM14 2.414l-12 12V17h2.586l12-12L14 2.414Z"/><path fill="currentColor" fill-rule="evenodd" d="M9 18a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2h-8a1 1 0 0 1-1-1Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="hiddenEye" fill="none" viewBox="0 0 20 18"><path fill="currentColor" d="M2.707.293a1 1 0 0 0-1.414 1.414l2.424 2.424C2.287 5.207 1.04 6.685.106 8.553a1 1 0 0 0 0 .894C2.264 13.764 6.096 16 10 16c1.555 0 3.1-.355 4.53-1.055l2.763 2.762a1 1 0 0 0 1.414-1.414l-16-16Zm10.307 13.135c-.98.383-2 .572-3.014.572-2.969 0-6.002-1.62-7.87-5 .817-1.479 1.858-2.62 3.018-3.437l2.144 2.144a3 3 0 0 0 4.001 4.001l1.72 1.72Zm3.538-2.532c.483-.556.926-1.187 1.318-1.896-1.868-3.38-4.9-5-7.87-5-.112 0-.224.002-.336.007L7.879 2.223A10.215 10.215 0 0 1 10 2c3.903 0 7.736 2.236 9.894 6.553a1 1 0 0 1 0 .894 13.107 13.107 0 0 1-1.925 2.865l-1.417-1.416Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="menu" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M2 5.75c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25C2.56 7 2 6.44 2 5.75ZM2 12c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25C2.56 13.25 2 12.69 2 12Zm0 6.25c0-.69.56-1.25 1.25-1.25h17.5a1.25 1.25 0 1 1 0 2.5H3.25c-.69 0-1.25-.56-1.25-1.25Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="plus" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8 0a1 1 0 0 1 1 1v6h6a1 1 0 1 1 0 2H9v6a1 1 0 1 1-2 0V9H1a1 1 0 1 1 0-2h6V1a1 1 0 0 1 1-1Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="reorder" fill="none" viewBox="0 0 12 18"><path fill="currentColor" d="M2.5 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm2 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm5-12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm2 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-2 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="search" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm-8 6a8 8 0 1 1 14.32 4.906l5.387 5.387a1 1 0 0 1-1.414 1.414l-5.387-5.387A8 8 0 0 1 2 10Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="shield" fill="none" viewBox="0 0 25 24"><path fill="currentColor" d="M12.123 2.034 5.092 5.035a.967.967 0 0 0-.594.906c0 4.38.175 6.34.969 8.597 1.039 2.955 3.079 5.31 6.53 7.283.308.176.694.176 1 0 3.484-1.99 5.533-4.338 6.563-7.283.784-2.24.938-4.105.938-8.597a.973.973 0 0 0-.594-.906l-6.969-3a1.06 1.06 0 0 0-.812 0Zm.375 1.97 5.996 2.602c.087 7.175-1.32 10.32-5.987 13.181-4.79-2.979-6.061-6.158-6.012-13.173 1.363-.582 4.85-2.119 6.003-2.61Z"/><path fill="currentColor" d="M6.495 6.614c-.05 7.015 1.223 10.194 6.012 13.173l-.01-15.784c-1.152.492-4.64 2.03-6.002 2.611Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="showEye" fill="none" viewBox="0 0 20 14"><path fill="currentColor" d="M13 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/><path fill="currentColor" d="M19.894 6.553C17.736 2.236 13.904 0 10 0 6.097 0 2.264 2.236.106 6.553a1 1 0 0 0 0 .894C2.264 11.764 6.096 14 10 14c3.903 0 7.736-2.236 9.894-6.553a1 1 0 0 0 0-.894ZM10 12c-2.969 0-6.002-1.62-7.87-5C3.998 3.62 7.03 2 10 2c2.969 0 6.002 1.62 7.87 5-1.868 3.38-4.901 5-7.87 5Z"/></symbol></svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4ZM2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 11.8487 17.3729 13.551 16.3199 14.9056L21.7071 20.2929C22.0976 20.6834 22.0976 21.3166 21.7071 21.7071C21.3166 22.0976 20.6834 22.0976 20.2929 21.7071L14.9056 16.3199C13.551 17.3729 11.8487 18 10 18C5.58172 18 2 14.4183 2 10Z" fill="currentColor"/>
3
+ </svg>