zaravand-ui 1.7.0 → 1.9.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.
- package/dist/components/Table/Table.interface.d.ts +7 -0
- package/dist/components/Table/Table.utils.d.ts +2 -0
- package/dist/components/Table/Table.variant.d.ts +1 -0
- package/dist/components/shared/responsiveScale.d.ts +30 -0
- package/dist/index.cjs +12 -12
- package/dist/index.css +1 -1
- package/dist/index.js +4354 -4348
- package/package.json +1 -1
|
@@ -56,6 +56,13 @@ export type TableSchemaColumn = {
|
|
|
56
56
|
type: TableFieldType;
|
|
57
57
|
options?: TableSelectOption[];
|
|
58
58
|
optionsSource?: TableSelectOptionsSource;
|
|
59
|
+
/**
|
|
60
|
+
* Fixed column width. Numbers are treated as pixels (e.g. `160` -> `160px`);
|
|
61
|
+
* strings are used as-is (e.g. `"20%"`, `"12rem"`). When omitted, the
|
|
62
|
+
* column keeps the default behavior of splitting remaining space evenly
|
|
63
|
+
* with the other un-sized columns.
|
|
64
|
+
*/
|
|
65
|
+
width?: number | string;
|
|
59
66
|
};
|
|
60
67
|
export type TableSchemaPagination = {
|
|
61
68
|
page: number;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
1
2
|
import type { DynamicTableRow, TablePaginationToken, TableRowId, TableRowIdResolver, TableSchemaColumn } from './Table.interface';
|
|
3
|
+
export declare function resolveColumnWidthStyle(width: TableSchemaColumn['width']): React.CSSProperties | undefined;
|
|
2
4
|
export declare function resolveLoadingRowsCount(pageSize: number | undefined, dataLength: number): number;
|
|
3
5
|
export declare function resolveLoadingCellSkeletonClassName(column: TableSchemaColumn, rowIndex: number): string;
|
|
4
6
|
export declare function buildPaginationTokens(currentPage: number, totalPages: number): TablePaginationToken[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const tableContainerVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
2
|
export declare const tableVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const TABLE_MIN_WIDTH_PER_COLUMN_REM = 6;
|
|
3
4
|
export declare const ticketContainerVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
4
5
|
export declare const ticketControlsVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
6
|
export declare const ticketTableShellVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One shared fluid-sizing contract for the whole library: every dimension listed
|
|
3
|
+
* below scales linearly with the viewport between 320px and 768px, shrinking down
|
|
4
|
+
* to exactly 80% of its desktop value at 320px and staying at 100% from 768px up.
|
|
5
|
+
* Ship this in the compiled CSS so any app importing zaravand-ui gets the same
|
|
6
|
+
* shrink/grow behavior automatically, with no per-app configuration.
|
|
7
|
+
*
|
|
8
|
+
* clamp(MIN, MIN + (MAX-MIN) * (100vw-320px)/448, MAX) — 448 = 768-320.
|
|
9
|
+
*/
|
|
10
|
+
declare const CONTROL_HEIGHT_SM = "zui:h-[clamp(2.304rem,calc(2.304rem_+_0.576*(100vw_-_320px)/448),2.88rem)]";
|
|
11
|
+
declare const CONTROL_HEIGHT_DEFAULT = "zui:h-[clamp(2.592rem,calc(2.592rem_+_0.648*(100vw_-_320px)/448),3.24rem)]";
|
|
12
|
+
declare const CONTROL_HEIGHT_LG = "zui:h-[clamp(2.88rem,calc(2.88rem_+_0.72*(100vw_-_320px)/448),3.6rem)]";
|
|
13
|
+
declare const controlHeightBySize: {
|
|
14
|
+
readonly sm: "zui:h-[clamp(2.304rem,calc(2.304rem_+_0.576*(100vw_-_320px)/448),2.88rem)]";
|
|
15
|
+
readonly default: "zui:h-[clamp(2.592rem,calc(2.592rem_+_0.648*(100vw_-_320px)/448),3.24rem)]";
|
|
16
|
+
readonly lg: "zui:h-[clamp(2.88rem,calc(2.88rem_+_0.72*(100vw_-_320px)/448),3.6rem)]";
|
|
17
|
+
};
|
|
18
|
+
declare const CONTROL_PADDING_X = "zui:px-[clamp(0.6rem,calc(0.6rem_+_0.15*(100vw_-_320px)/448),0.75rem)]";
|
|
19
|
+
declare const CONTROL_PADDING_Y = "zui:py-[clamp(0.6rem,calc(0.6rem_+_0.15*(100vw_-_320px)/448),0.75rem)]";
|
|
20
|
+
declare const BUTTON_PADDING_X = "zui:px-[clamp(0.8rem,calc(0.8rem_+_0.2*(100vw_-_320px)/448),1rem)]";
|
|
21
|
+
declare const TEXTAREA_MIN_HEIGHT = "zui:min-h-[clamp(3.84rem,calc(3.84rem_+_0.96*(100vw_-_320px)/448),4.8rem)]";
|
|
22
|
+
declare const TABLE_HEADER_HEIGHT = "zui:h-[clamp(2.8rem,calc(2.8rem_+_0.7*(100vw_-_320px)/448),3.5rem)]";
|
|
23
|
+
declare const DATEPICKER_DAY_SIZE = "zui:size-[clamp(1.6rem,calc(1.6rem_+_0.4*(100vw_-_320px)/448),2rem)]";
|
|
24
|
+
declare const DATEPICKER_NAV_SIZE = "zui:size-[clamp(1.4rem,calc(1.4rem_+_0.35*(100vw_-_320px)/448),1.75rem)]";
|
|
25
|
+
declare const DATEPICKER_CONTROL_HEIGHT = "zui:h-[clamp(1.6rem,calc(1.6rem_+_0.4*(100vw_-_320px)/448),2rem)]";
|
|
26
|
+
declare const OVERLAY_PANEL_PADDING = "zui:p-[clamp(1.2rem,calc(1.2rem_+_0.3*(100vw_-_320px)/448),1.5rem)]";
|
|
27
|
+
declare const TOAST_PADDING = "zui:p-[clamp(0.8rem,calc(0.8rem_+_0.2*(100vw_-_320px)/448),1rem)]";
|
|
28
|
+
declare const DATEPICKER_MANUAL_SEGMENT_WIDTH = "zui:w-[clamp(5.2rem,calc(5.2rem_+_1.3*(100vw_-_320px)/448),6.5rem)]";
|
|
29
|
+
declare const SQUARE_ICON_BUTTON_SIZE_IMPORTANT = "zui:[&>button]:!h-[clamp(2.304rem,calc(2.304rem_+_0.576*(100vw_-_320px)/448),2.88rem)] zui:[&>button]:!w-[clamp(2.304rem,calc(2.304rem_+_0.576*(100vw_-_320px)/448),2.88rem)]";
|
|
30
|
+
export { controlHeightBySize, CONTROL_HEIGHT_SM, CONTROL_HEIGHT_DEFAULT, CONTROL_HEIGHT_LG, CONTROL_PADDING_X, CONTROL_PADDING_Y, BUTTON_PADDING_X, TEXTAREA_MIN_HEIGHT, TABLE_HEADER_HEIGHT, DATEPICKER_DAY_SIZE, DATEPICKER_NAV_SIZE, DATEPICKER_CONTROL_HEIGHT, OVERLAY_PANEL_PADDING, TOAST_PADDING, DATEPICKER_MANUAL_SEGMENT_WIDTH, SQUARE_ICON_BUTTON_SIZE_IMPORTANT, };
|