@scbt-ecom/ui 0.120.2 → 0.121.1

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 { TableProps } from './model';
2
+ export declare const InfoTable: <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element;
3
+ export default InfoTable;
@@ -1,2 +1,2 @@
1
- export { Table } from './Table';
1
+ export { InfoTable } from './InfoTable';
2
2
  export type { TableProps } from './model';
@@ -1,4 +1,5 @@
1
1
  import { BuiltInSortingFn } from '@tanstack/react-table';
2
+ import { DataTableClasses } from '../../../shared/ui/table/model/types';
2
3
  export type ColumnDefinition<Key extends string> = {
3
4
  title: Key;
4
5
  visibleTitle?: string;
@@ -31,5 +32,16 @@ export interface TableProps<Key extends string, TData extends Record<Key, unknow
31
32
  mode: 'solid' | 'odd';
32
33
  pagination: boolean;
33
34
  pageSize?: number;
35
+ classes?: InfoTableClasses;
34
36
  }
37
+ export type InfoTableClasses = {
38
+ root?: string;
39
+ container?: string;
40
+ textContainer?: string;
41
+ title?: string;
42
+ subtitle?: string;
43
+ tableContainer?: string;
44
+ helperText?: string;
45
+ baseTableClasses?: DataTableClasses;
46
+ };
35
47
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.120.2",
3
+ "version": "0.121.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.js","sources":["../../../../lib/widgets/table/Table.tsx"],"sourcesContent":["import { TableUtils } from '../../shared/ui/table/model'\nimport { cn } from '../../shared/utils'\nimport { getHeaderAccessors, isHorizontalTable, type TableProps } from './model'\nimport { DataTable, ResponsiveContainer } from '$/shared/ui'\n\nexport const Table = <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => {\n const { title, subtitle, helperText, pagination = false, columns, data, horizontal, ...restTableProps } = props\n\n const { accessors, sortingColumns, sortingFn } = getHeaderAccessors(columns)\n\n const cols = TableUtils.getColumns(data[0], {\n headerAccessor: accessors,\n enableSorting: sortingColumns,\n sortingFn\n })\n\n const isHorizontal = isHorizontalTable(horizontal)\n\n return (\n <section className='w-full'>\n <ResponsiveContainer className={cn('flex flex-col gap-12 mobile:max-w-[360px]')}>\n <div className='flex flex-col gap-[16px]'>\n <div className='mob-headline-bold-s desktop:desk-headline-bold-m' dangerouslySetInnerHTML={{ __html: title }} />\n <div className='desktop:desk-body-regular-l' dangerouslySetInnerHTML={{ __html: subtitle }} />\n </div>\n\n <div className='flex flex-col gap-4'>\n <DataTable\n {...restTableProps}\n horizontal={isHorizontal}\n data={data}\n columns={cols}\n mode='odd'\n pagination={pagination}\n />\n {helperText && (\n <div className='desk-body-regular-m text-color-tetriary' dangerouslySetInnerHTML={{ __html: helperText }} />\n )}\n </div>\n </ResponsiveContainer>\n </section>\n )\n}\n\nexport default Table\n"],"names":["Table","props","title","subtitle","helperText","pagination","columns","data","horizontal","restTableProps","accessors","sortingColumns","sortingFn","getHeaderAccessors","cols","TableUtils","isHorizontal","isHorizontalTable","jsx","ResponsiveContainer","cn","jsxs","DataTable"],"mappings":"4oEAKO,MAAMA,GAAiEC,GAAkC,CAC9G,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,WAAAC,EAAY,WAAAC,EAAa,GAAO,QAAAC,EAAS,KAAAC,EAAM,WAAAC,EAAY,GAAGC,CAAA,EAAmBR,EAEpG,CAAE,UAAAS,EAAW,eAAAC,EAAgB,UAAAC,CAAA,EAAcC,EAAmBP,CAAO,EAErEQ,EAAOC,EAAW,WAAWR,EAAK,CAAC,EAAG,CAC1C,eAAgBG,EAChB,cAAeC,EACf,UAAAC,CAAA,CACD,EAEKI,EAAeC,EAAkBT,CAAU,EAEjD,OACEU,EAAC,WAAQ,UAAU,SACjB,WAACC,EAAA,CAAoB,UAAWC,EAAG,2CAA2C,EAC5E,SAAA,CAAAC,EAAC,MAAA,CAAI,UAAU,2BACb,SAAA,CAAAH,EAAC,OAAI,UAAU,mDAAmD,wBAAyB,CAAE,OAAQhB,GAAS,EAC9GgB,EAAC,OAAI,UAAU,8BAA8B,wBAAyB,CAAE,OAAQf,EAAS,CAAG,CAAA,EAC9F,EAEAkB,EAAC,MAAA,CAAI,UAAU,sBACb,SAAA,CAAAH,EAACI,EAAA,CACE,GAAGb,EACJ,WAAYO,EACZ,KAAAT,EACA,QAASO,EACT,KAAK,MACL,WAAAT,CAAA,CAAA,EAEDD,KACE,MAAA,CAAI,UAAU,0CAA0C,wBAAyB,CAAE,OAAQA,EAAW,CAAG,CAAA,CAAA,CAE9G,CAAA,CAAA,CACF,CAAA,CACF,CAEJ"}
@@ -1,3 +0,0 @@
1
- import { TableProps } from './model';
2
- export declare const Table: <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element;
3
- export default Table;