@dinofront/design_system 1.6.3 → 1.7.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.
@@ -2,8 +2,8 @@ import { HTMLAttributes, ReactElement } from 'react';
2
2
  import { RefCallBack, SetValueConfig } from 'react-hook-form';
3
3
  import { BaseProps } from '../../types';
4
4
  /** Deliberately untyped `value`/`onChange`: this render prop feeds whichever
5
- * input the consumer wires up (native `value`, Select's `string`, Checkbox's
6
- * `boolean`, ...). */
5
+ * input the consumer wires up (native `value`, SelectV2's `OptionValue`,
6
+ * Checkbox's `boolean`, ...). */
7
7
  export interface FormFieldRenderProps {
8
8
  name: string;
9
9
  value: any;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Column, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnResizeMode, OnChangeFn, PaginationState, Row, RowSelectionState, SortingState, VisibilityState } from '@tanstack/react-table';
3
- import { BaseProps } from '../../types';
3
+ import { BaseProps, TranslationLocale } from '../../types';
4
4
  export type TableV2Density = 'comfortable' | 'compact';
5
5
  export type TableV2Align = 'left' | 'center' | 'right';
6
6
  export type TableV2FilterVariant = 'text' | 'select' | 'date' | 'custom';
@@ -76,6 +76,8 @@ export interface TableV2Props<TData, TValue = unknown> extends BaseProps {
76
76
  manualPagination?: boolean;
77
77
  pageCount?: number;
78
78
  rowCount?: number;
79
+ /** Translates the pagination footer's built-in strings ("Rows per page", the row-range summary, "No results"). @default 'en-US' */
80
+ locale?: TranslationLocale;
79
81
  enableVirtualization?: boolean;
80
82
  estimatedRowHeight?: number;
81
83
  /**
@@ -1,7 +1,9 @@
1
1
  import { Table } from '@tanstack/react-table';
2
+ import { TranslationLocale } from '../../types';
2
3
  export interface TableV2PaginationProps<TData> {
3
4
  table: Table<TData>;
4
5
  pageSizeOptions?: number[];
6
+ locale?: TranslationLocale;
5
7
  }
6
8
  /** Footer bar: page-size select, row-range summary, and page controls. Works for both client and manual (server) pagination. */
7
- export declare function TableV2Pagination<TData>({ table, pageSizeOptions, }: TableV2PaginationProps<TData>): import("react").JSX.Element;
9
+ export declare function TableV2Pagination<TData>({ table, pageSizeOptions, locale, }: TableV2PaginationProps<TData>): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { TranslationLocale } from '../../types';
2
+ interface TableV2PaginationTranslations {
3
+ rowsPerPage: string;
4
+ noResults: string;
5
+ rangeSummary: (start: number, end: number, total: number) => string;
6
+ }
7
+ export declare const TABLE_V2_PAGINATION_TRANSLATIONS: Record<TranslationLocale, TableV2PaginationTranslations>;
8
+ export {};
package/dist/index.d.ts CHANGED
@@ -32,7 +32,6 @@ export * from './components/Popover';
32
32
  export * from './components/Progress';
33
33
  export * from './components/Radio';
34
34
  export * from './components/ReadMore';
35
- export * from './components/Select';
36
35
  export * from './components/SelectV2';
37
36
  export * from './components/Sidebar';
38
37
  export * from './components/Skeleton';