@max-ts/kit 1.6.0 → 1.8.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/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/checkbox.css.d.ts +2 -1
- package/lib/components/Checkbox/checkbox.css.d.ts.map +1 -1
- package/lib/components/DataGrid/Body/Body.d.ts +5 -2
- package/lib/components/DataGrid/Body/Body.d.ts.map +1 -1
- package/lib/components/DataGrid/DataGrid.d.ts +6 -2
- package/lib/components/DataGrid/DataGrid.d.ts.map +1 -1
- package/lib/components/DataGrid/Header/Header.d.ts +6 -1
- package/lib/components/DataGrid/Header/Header.d.ts.map +1 -1
- package/lib/components/DataGrid/Header/styles.css.d.ts +1 -0
- package/lib/components/DataGrid/Header/styles.css.d.ts.map +1 -1
- package/lib/components/DataGrid/Row/Row.d.ts +6 -3
- package/lib/components/DataGrid/Row/Row.d.ts.map +1 -1
- package/lib/components/DataGrid/Row/styles.css.d.ts +1 -0
- package/lib/components/DataGrid/Row/styles.css.d.ts.map +1 -1
- package/lib/components/DataGrid/types.d.ts +1 -0
- package/lib/components/DataGrid/types.d.ts.map +1 -1
- package/lib/components/Switch/Switch.d.ts +3 -0
- package/lib/components/Switch/Switch.d.ts.map +1 -0
- package/lib/components/Switch/index.d.ts +2 -0
- package/lib/components/Switch/index.d.ts.map +1 -0
- package/lib/components/Switch/styles.css.d.ts +3 -0
- package/lib/components/Switch/styles.css.d.ts.map +1 -0
- package/lib/components/Switch/types.d.ts +7 -0
- package/lib/components/Switch/types.d.ts.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/index.mjs +155 -35
- package/lib/stories/Checkbox.stories.d.ts +3 -0
- package/lib/stories/Checkbox.stories.d.ts.map +1 -1
- package/lib/stories/DataGrid.stories.d.ts +1 -0
- package/lib/stories/DataGrid.stories.d.ts.map +1 -1
- package/lib/stories/Switch.stories.d.ts +16 -0
- package/lib/stories/Switch.stories.d.ts.map +1 -0
- package/lib/styles.css +104 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM1D,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;AAEpD,eAAO,MAAM,QAAQ,GAAI,yBAAyB,aAAa,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM1D,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;AAEpD,eAAO,MAAM,QAAQ,GAAI,yBAAyB,aAAa,gCAW9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/checkbox.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAyBf,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/checkbox.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAyBf,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,SAAS,QAMpB,CAAC;AAEH,eAAO,MAAM,SAAS,QAMpB,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { DataGridProps } from '../DataGrid';
|
|
2
|
-
|
|
2
|
+
import type { DataGridRowId } from '../types';
|
|
3
|
+
export type BodyProps<TRow> = Pick<DataGridProps<TRow>, 'emptyState' | 'errorState' | 'isLoading' | 'isError' | 'columns' | 'rows' | 'onRowClick' | 'keyId' | 'isRowSelectionEnabled'> & {
|
|
3
4
|
rowHeight: number;
|
|
5
|
+
selectedRowIdSet: Set<DataGridRowId>;
|
|
6
|
+
onRowSelectionChange: (rowId: DataGridRowId, isSelected: boolean) => void;
|
|
4
7
|
};
|
|
5
|
-
export declare function Body<TRow>({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick, }: BodyProps<TRow>): import("react").JSX.Element;
|
|
8
|
+
export declare function Body<TRow>({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick, isRowSelectionEnabled, selectedRowIdSet, onRowSelectionChange, }: BodyProps<TRow>): import("react").JSX.Element;
|
|
6
9
|
//# sourceMappingURL=Body.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Body/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Body/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,SAAS,CAAC,IAAI,IAAI,IAAI,CACjC,aAAa,CAAC,IAAI,CAAC,EACjB,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,SAAS,GACT,SAAS,GACT,MAAM,GACN,YAAY,GACZ,OAAO,GACP,uBAAuB,CACzB,GAAG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC,oBAAoB,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,wBAAgB,IAAI,CAAC,IAAI,EAAE,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,EACP,IAAI,EACJ,SAAS,EACT,KAAK,EACL,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,GACpB,EAAE,SAAS,CAAC,IAAI,CAAC,+BAqCjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import type { ContentStateProps } from '../ContentState';
|
|
3
|
-
import type { DataGridColumn, DataGridEmptyState, DataGridSorting, DataGridSortMode } from './types';
|
|
3
|
+
import type { DataGridColumn, DataGridEmptyState, DataGridRowId, DataGridSorting, DataGridSortMode } from './types';
|
|
4
4
|
export type DataGridProps<TRow> = {
|
|
5
5
|
rows: TRow[];
|
|
6
6
|
columns: DataGridColumn<TRow>[];
|
|
@@ -17,10 +17,14 @@ export type DataGridProps<TRow> = {
|
|
|
17
17
|
sorting?: DataGridSorting<TRow>;
|
|
18
18
|
onSortingChange?: (sorting: DataGridSorting<TRow>) => void;
|
|
19
19
|
sortMode?: DataGridSortMode;
|
|
20
|
+
isRowSelectionEnabled?: boolean;
|
|
21
|
+
selectedRowIds?: DataGridRowId[];
|
|
22
|
+
defaultSelectedRowIds?: DataGridRowId[];
|
|
23
|
+
onSelectedRowIdsChange?: (rowIds: DataGridRowId[]) => void;
|
|
20
24
|
onSelectRow?: (row: TRow[]) => void;
|
|
21
25
|
onRowClick?: (row: TRow) => void;
|
|
22
26
|
title?: string;
|
|
23
27
|
footer?: ReactNode;
|
|
24
28
|
};
|
|
25
|
-
export declare function DataGrid<TRow>({ rows, columns, height, className, rowHeight, headerHeight, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, sorting, onSortingChange, sortMode, footer, title, }: DataGridProps<TRow>): import("react").JSX.Element;
|
|
29
|
+
export declare function DataGrid<TRow>({ rows, columns, height, className, rowHeight, headerHeight, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, sorting, onSortingChange, sortMode, isRowSelectionEnabled, selectedRowIds, defaultSelectedRowIds, onSelectedRowIdsChange, onSelectRow, footer, title, }: DataGridProps<TRow>): import("react").JSX.Element;
|
|
26
30
|
//# sourceMappingURL=DataGrid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAazD,OAAO,KAAK,EACX,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,aAAa,CAAC,IAAI,IAAI;IACjC,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC;IAC1C,OAAO,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAChC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,qBAAqB,CAAC,EAAE,aAAa,EAAE,CAAC;IACxC,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,EAC9B,IAAI,EACJ,OAAO,EACP,MAAe,EACf,SAAS,EACT,SAAsB,EACtB,YAAyB,EACzB,KAAK,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,OAAO,EACP,eAAe,EACf,QAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,qBAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,MAAM,EACN,KAAK,GACL,EAAE,aAAa,CAAC,IAAI,CAAC,+BAoJrB"}
|
|
@@ -5,7 +5,12 @@ type HeaderProps<TData> = {
|
|
|
5
5
|
height: CSSProperties['height'];
|
|
6
6
|
sorting?: DataGridSorting<TData>;
|
|
7
7
|
onSortingChange?: (sorting: DataGridSorting<TData>) => void;
|
|
8
|
+
isSelectionEnabled?: boolean;
|
|
9
|
+
isAllRowsSelected?: boolean;
|
|
10
|
+
isSomeRowsSelected?: boolean;
|
|
11
|
+
isSelectionDisabled?: boolean;
|
|
12
|
+
onAllRowsSelectionChange?: (isSelected: boolean) => void;
|
|
8
13
|
};
|
|
9
|
-
export declare function Header<TData>({ columns, height, sorting, onSortingChange, }: HeaderProps<TData>): import("react").JSX.Element;
|
|
14
|
+
export declare function Header<TData>({ columns, height, sorting, onSortingChange, isSelectionEnabled, isAllRowsSelected, isSomeRowsSelected, isSelectionDisabled, onAllRowsSelectionChange, }: HeaderProps<TData>): import("react").JSX.Element;
|
|
10
15
|
export {};
|
|
11
16
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,WAAW,CAAC,KAAK,IAAI;IACzB,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACzD,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,EAC7B,OAAO,EACP,MAAM,EACN,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,GACxB,EAAE,WAAW,CAAC,KAAK,CAAC,+BAgCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Header/styles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Header/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,mBAAmB,QAK9B,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import type { DataGridColumn } from '../types';
|
|
1
|
+
import type { DataGridColumn, DataGridRowId } from '../types';
|
|
2
2
|
type RowProps<TRow> = {
|
|
3
3
|
row: TRow;
|
|
4
4
|
columns: DataGridColumn<TRow>[];
|
|
5
5
|
rowIndex: number;
|
|
6
|
-
rowId:
|
|
6
|
+
rowId: DataGridRowId;
|
|
7
7
|
rowHeight: number;
|
|
8
8
|
onRowClick?: (row: TRow) => void;
|
|
9
|
+
isSelectionEnabled?: boolean;
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
onSelectionChange?: (rowId: DataGridRowId, isSelected: boolean) => void;
|
|
9
12
|
};
|
|
10
|
-
export declare function Row<TRow>({ row, rowHeight, onRowClick, columns, rowIndex, rowId, }: RowProps<TRow>): import("react").JSX.Element;
|
|
13
|
+
export declare function Row<TRow>({ row, rowHeight, onRowClick, columns, rowIndex, rowId, isSelectionEnabled, isSelected, onSelectionChange, }: RowProps<TRow>): import("react").JSX.Element;
|
|
11
14
|
export {};
|
|
12
15
|
//# sourceMappingURL=Row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Row/Row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Row/Row.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9D,KAAK,QAAQ,CAAC,IAAI,IAAI;IACrB,GAAG,EAAE,IAAI,CAAC;IACV,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACxE,CAAC;AACF,wBAAgB,GAAG,CAAC,IAAI,EAAE,EACzB,GAAG,EACH,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,kBAAkB,EAClB,UAAU,EACV,iBAAiB,GACjB,EAAE,QAAQ,CAAC,IAAI,CAAC,+BAyChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Row/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAGnB,CAAC;AAMH,eAAO,MAAM,eAAe,QAK1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/Row/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAGnB,CAAC;AAMH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AAO,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACtB,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACR,EAAE,WAAW,CAAC,IAAI,+BAclB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAiCf,CAAC;AAEH,eAAO,MAAM,KAAK,QAMhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,yBAAiB,WAAW,CAAC;IAC5B,KAAY,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG;QACtC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;KACxB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;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AAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
package/lib/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Accordion, Checkbox } from "@base-ui/react";
|
|
3
3
|
import clsx_0, { clsx } from "clsx";
|
|
4
|
-
import { ArrowDownNarrowWide, ArrowDownUp, ArrowDownWideNarrow, ArrowLeft, ArrowRight, Calendar1, Check, CheckIcon, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronRight, ChevronRightIcon, ChevronUp, CircleCheck, CircleIcon, Copy, Ellipsis as external_lucide_react_Ellipsis, EllipsisVertical, Info, Loader, MoreHorizontalIcon, OctagonAlert, PanelLeftIcon, TriangleAlert, XIcon } from "lucide-react";
|
|
4
|
+
import { ArrowDownNarrowWide, ArrowDownUp, ArrowDownWideNarrow, ArrowLeft, ArrowRight, Calendar1, Check, CheckIcon, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronRight, ChevronRightIcon, ChevronUp, CircleCheck, CircleIcon, Copy, Ellipsis as external_lucide_react_Ellipsis, EllipsisVertical, Info, Loader, Minus, MoreHorizontalIcon, OctagonAlert, PanelLeftIcon, TriangleAlert, XIcon } from "lucide-react";
|
|
5
5
|
import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
6
6
|
import { Button } from "@base-ui/react/button";
|
|
7
7
|
import react, { Component as external_react_Component, createContext, createElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -29,6 +29,7 @@ import { resolveSelectedLabel, stringifyAsLabel } from "@base-ui/react/internals
|
|
|
29
29
|
import { Select } from "@base-ui/react/select";
|
|
30
30
|
import { createChangeEventDetails } from "@base-ui/react/internals/createBaseUIEventDetails";
|
|
31
31
|
import { REASONS } from "@base-ui/react/internals/reasons";
|
|
32
|
+
import { Switch } from "@base-ui/react/switch";
|
|
32
33
|
import { Tabs } from "@base-ui/react/tabs";
|
|
33
34
|
import * as __rspack_external_react from "react";
|
|
34
35
|
var __webpack_require__ = {};
|
|
@@ -1610,18 +1611,24 @@ Carousel.Content = Content_Content;
|
|
|
1610
1611
|
Carousel.Item = Item_Item;
|
|
1611
1612
|
Carousel.Arrows = Arrows;
|
|
1612
1613
|
Carousel.Dots = Dots;
|
|
1613
|
-
var
|
|
1614
|
+
var checkIcon = 'style__b7yo4k2';
|
|
1614
1615
|
var indicator = 'style__b7yo4k1';
|
|
1616
|
+
var minusIcon = 'style__b7yo4k3';
|
|
1615
1617
|
var checkbox_css_root = 'style__b7yo4k0';
|
|
1616
1618
|
const Checkbox_Checkbox = ({ className, ...props })=>/*#__PURE__*/ jsx(Checkbox.Root, {
|
|
1617
1619
|
"data-slot": "checkbox",
|
|
1618
1620
|
className: clsx(checkbox_css_root, className),
|
|
1619
1621
|
...props,
|
|
1620
|
-
children: /*#__PURE__*/
|
|
1622
|
+
children: /*#__PURE__*/ jsxs(Checkbox.Indicator, {
|
|
1621
1623
|
className: indicator,
|
|
1622
|
-
children:
|
|
1623
|
-
|
|
1624
|
-
|
|
1624
|
+
children: [
|
|
1625
|
+
/*#__PURE__*/ jsx(Check, {
|
|
1626
|
+
className: checkIcon
|
|
1627
|
+
}),
|
|
1628
|
+
/*#__PURE__*/ jsx(Minus, {
|
|
1629
|
+
className: minusIcon
|
|
1630
|
+
})
|
|
1631
|
+
]
|
|
1625
1632
|
})
|
|
1626
1633
|
});
|
|
1627
1634
|
function Collapsible_Collapsible({ ...props }) {
|
|
@@ -2103,28 +2110,45 @@ function Cell({ row, column, rowIndex, height }) {
|
|
|
2103
2110
|
}
|
|
2104
2111
|
var rowClass = 'style__gsm9mv0';
|
|
2105
2112
|
var selectableClass = 'style__gsm9mv1';
|
|
2106
|
-
|
|
2113
|
+
var selectionCellClass = 'style__gsm9mv2';
|
|
2114
|
+
function Row({ row, rowHeight, onRowClick, columns, rowIndex, rowId, isSelectionEnabled, isSelected, onSelectionChange }) {
|
|
2107
2115
|
const handleSelect = useCallback(()=>{
|
|
2108
2116
|
onRowClick?.(row);
|
|
2109
2117
|
}, [
|
|
2110
2118
|
onRowClick,
|
|
2111
2119
|
row
|
|
2112
2120
|
]);
|
|
2113
|
-
return /*#__PURE__*/
|
|
2121
|
+
return /*#__PURE__*/ jsxs("tr", {
|
|
2114
2122
|
onClick: handleSelect,
|
|
2115
2123
|
onKeyDown: handleSelect,
|
|
2116
2124
|
className: clsx(rowClass, {
|
|
2117
2125
|
[selectableClass]: Boolean(onRowClick)
|
|
2118
2126
|
}),
|
|
2119
|
-
children:
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2127
|
+
children: [
|
|
2128
|
+
isSelectionEnabled && /*#__PURE__*/ jsx("td", {
|
|
2129
|
+
className: selectionCellClass,
|
|
2130
|
+
style: {
|
|
2131
|
+
height: rowHeight,
|
|
2132
|
+
width: rowHeight
|
|
2133
|
+
},
|
|
2134
|
+
children: /*#__PURE__*/ jsx(Checkbox_Checkbox, {
|
|
2135
|
+
checked: isSelected,
|
|
2136
|
+
"aria-label": "Select row",
|
|
2137
|
+
onClick: (event)=>event.stopPropagation(),
|
|
2138
|
+
onKeyDown: (event)=>event.stopPropagation(),
|
|
2139
|
+
onCheckedChange: (checked)=>onSelectionChange?.(rowId, checked)
|
|
2140
|
+
})
|
|
2141
|
+
}),
|
|
2142
|
+
columns.map((column, index)=>{
|
|
2143
|
+
const cellId = `${rowId}-${index}`;
|
|
2144
|
+
return /*#__PURE__*/ jsx(Cell, {
|
|
2145
|
+
row: row,
|
|
2146
|
+
rowIndex: rowIndex,
|
|
2147
|
+
column: column,
|
|
2148
|
+
height: rowHeight
|
|
2149
|
+
}, cellId);
|
|
2150
|
+
})
|
|
2151
|
+
]
|
|
2128
2152
|
});
|
|
2129
2153
|
}
|
|
2130
2154
|
var cell = 'style__15m2ib82';
|
|
@@ -2185,9 +2209,10 @@ function State({ isLoading, isEmpty, columnsLength, emptyState = {
|
|
|
2185
2209
|
return null;
|
|
2186
2210
|
}
|
|
2187
2211
|
var Body_styles_css_container = 'style__82af400';
|
|
2188
|
-
function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick }) {
|
|
2212
|
+
function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick, isRowSelectionEnabled, selectedRowIdSet, onRowSelectionChange }) {
|
|
2189
2213
|
const isEmpty = 0 === rows.length;
|
|
2190
2214
|
const isStateVisible = isError || isLoading || isEmpty;
|
|
2215
|
+
const columnsLength = columns.length + (isRowSelectionEnabled ? 1 : 0);
|
|
2191
2216
|
return isStateVisible ? /*#__PURE__*/ jsx("tbody", {
|
|
2192
2217
|
className: Body_styles_css_container,
|
|
2193
2218
|
children: /*#__PURE__*/ jsx(State, {
|
|
@@ -2196,23 +2221,30 @@ function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHe
|
|
|
2196
2221
|
isEmpty: isEmpty,
|
|
2197
2222
|
isError: isError,
|
|
2198
2223
|
isLoading: isLoading,
|
|
2199
|
-
columnsLength:
|
|
2224
|
+
columnsLength: columnsLength
|
|
2200
2225
|
})
|
|
2201
2226
|
}) : /*#__PURE__*/ jsx("tbody", {
|
|
2202
2227
|
className: Body_styles_css_container,
|
|
2203
2228
|
children: rows.map((row, index)=>{
|
|
2204
|
-
const rowId =
|
|
2229
|
+
const rowId = getRowId(row[keyId]);
|
|
2205
2230
|
return /*#__PURE__*/ jsx(Row, {
|
|
2206
2231
|
row: row,
|
|
2207
2232
|
rowId: rowId,
|
|
2208
2233
|
rowHeight: rowHeight,
|
|
2209
2234
|
columns: columns,
|
|
2210
2235
|
onRowClick: onRowClick,
|
|
2211
|
-
rowIndex: index
|
|
2212
|
-
|
|
2236
|
+
rowIndex: index,
|
|
2237
|
+
isSelectionEnabled: isRowSelectionEnabled,
|
|
2238
|
+
isSelected: selectedRowIdSet.has(rowId),
|
|
2239
|
+
onSelectionChange: onRowSelectionChange
|
|
2240
|
+
}, rowId);
|
|
2213
2241
|
})
|
|
2214
2242
|
});
|
|
2215
2243
|
}
|
|
2244
|
+
function getRowId(value) {
|
|
2245
|
+
if ('string' == typeof value || 'number' == typeof value) return value;
|
|
2246
|
+
return String(value);
|
|
2247
|
+
}
|
|
2216
2248
|
var styles_css_footerClass = 'style__2s55b60';
|
|
2217
2249
|
function Footer_Footer({ children, className }) {
|
|
2218
2250
|
return /*#__PURE__*/ jsx("footer", {
|
|
@@ -2280,17 +2312,35 @@ function HeaderCell({ column, height, width, sorting, onSortingChange }) {
|
|
|
2280
2312
|
});
|
|
2281
2313
|
}
|
|
2282
2314
|
var headerRow = 'style__fkgoub0';
|
|
2283
|
-
|
|
2315
|
+
var selectionHeaderCell = 'style__fkgoub1';
|
|
2316
|
+
function Header_Header({ columns, height, sorting, onSortingChange, isSelectionEnabled, isAllRowsSelected, isSomeRowsSelected, isSelectionDisabled, onAllRowsSelectionChange }) {
|
|
2284
2317
|
return /*#__PURE__*/ jsx("thead", {
|
|
2285
|
-
children: /*#__PURE__*/
|
|
2318
|
+
children: /*#__PURE__*/ jsxs("tr", {
|
|
2286
2319
|
className: clsx(headerRow),
|
|
2287
|
-
children:
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2320
|
+
children: [
|
|
2321
|
+
isSelectionEnabled && /*#__PURE__*/ jsx("th", {
|
|
2322
|
+
className: selectionHeaderCell,
|
|
2323
|
+
style: {
|
|
2324
|
+
height,
|
|
2325
|
+
width: height
|
|
2326
|
+
},
|
|
2327
|
+
"aria-label": "Select all rows",
|
|
2328
|
+
children: /*#__PURE__*/ jsx(Checkbox_Checkbox, {
|
|
2329
|
+
checked: isAllRowsSelected,
|
|
2330
|
+
indeterminate: !isAllRowsSelected && isSomeRowsSelected,
|
|
2331
|
+
disabled: isSelectionDisabled,
|
|
2332
|
+
"aria-label": "Select all rows",
|
|
2333
|
+
onCheckedChange: onAllRowsSelectionChange
|
|
2334
|
+
})
|
|
2335
|
+
}),
|
|
2336
|
+
columns.map((col)=>/*#__PURE__*/ jsx(HeaderCell, {
|
|
2337
|
+
column: col,
|
|
2338
|
+
height: height,
|
|
2339
|
+
width: col.width,
|
|
2340
|
+
sorting: sorting,
|
|
2341
|
+
onSortingChange: onSortingChange
|
|
2342
|
+
}, col.label))
|
|
2343
|
+
]
|
|
2294
2344
|
})
|
|
2295
2345
|
});
|
|
2296
2346
|
}
|
|
@@ -2300,7 +2350,8 @@ var fullHeight = 'style__1gqvluf2';
|
|
|
2300
2350
|
var DataGrid_styles_css_loading = 'style__1gqvluf4';
|
|
2301
2351
|
var table = 'style__1gqvluf1';
|
|
2302
2352
|
var titleClass = 'style__1gqvluf5';
|
|
2303
|
-
function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, headerHeight = 40, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, sorting, onSortingChange, sortMode = 'client', footer, title }) {
|
|
2353
|
+
function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, headerHeight = 40, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, sorting, onSortingChange, sortMode = 'client', isRowSelectionEnabled, selectedRowIds, defaultSelectedRowIds = [], onSelectedRowIdsChange, onSelectRow, footer, title }) {
|
|
2354
|
+
const [uncontrolledSelectedRowIds, setUncontrolledSelectedRowIds] = useState(defaultSelectedRowIds);
|
|
2304
2355
|
const sortedRows = useMemo(()=>{
|
|
2305
2356
|
if (!sorting || 'manual' === sortMode) return rows;
|
|
2306
2357
|
const column = columns.find(({ field })=>field === sorting.key);
|
|
@@ -2318,6 +2369,49 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
|
|
|
2318
2369
|
sortMode,
|
|
2319
2370
|
sorting
|
|
2320
2371
|
]);
|
|
2372
|
+
const activeSelectedRowIds = selectedRowIds ?? uncontrolledSelectedRowIds;
|
|
2373
|
+
const selectedRowIdSet = useMemo(()=>new Set(activeSelectedRowIds), [
|
|
2374
|
+
activeSelectedRowIds
|
|
2375
|
+
]);
|
|
2376
|
+
const visibleRowIds = useMemo(()=>sortedRows.map((row)=>DataGrid_getRowId(row[keyId])), [
|
|
2377
|
+
keyId,
|
|
2378
|
+
sortedRows
|
|
2379
|
+
]);
|
|
2380
|
+
const isAllRowsSelected = visibleRowIds.length > 0 && visibleRowIds.every((rowId)=>selectedRowIdSet.has(rowId));
|
|
2381
|
+
const isSomeRowsSelected = visibleRowIds.some((rowId)=>selectedRowIdSet.has(rowId));
|
|
2382
|
+
const handleSelectedRowIdsChange = useCallback((nextSelectedRowIds)=>{
|
|
2383
|
+
if (!selectedRowIds) setUncontrolledSelectedRowIds(nextSelectedRowIds);
|
|
2384
|
+
onSelectedRowIdsChange?.(nextSelectedRowIds);
|
|
2385
|
+
if (onSelectRow) {
|
|
2386
|
+
const nextSelectedRowIdSet = new Set(nextSelectedRowIds);
|
|
2387
|
+
onSelectRow(rows.filter((row)=>nextSelectedRowIdSet.has(DataGrid_getRowId(row[keyId]))));
|
|
2388
|
+
}
|
|
2389
|
+
}, [
|
|
2390
|
+
keyId,
|
|
2391
|
+
onSelectRow,
|
|
2392
|
+
onSelectedRowIdsChange,
|
|
2393
|
+
rows,
|
|
2394
|
+
selectedRowIds
|
|
2395
|
+
]);
|
|
2396
|
+
const handleRowSelectionChange = useCallback((rowId, isSelected)=>{
|
|
2397
|
+
const nextSelectedRowIdSet = new Set(activeSelectedRowIds);
|
|
2398
|
+
if (isSelected) nextSelectedRowIdSet.add(rowId);
|
|
2399
|
+
else nextSelectedRowIdSet.delete(rowId);
|
|
2400
|
+
handleSelectedRowIdsChange(Array.from(nextSelectedRowIdSet));
|
|
2401
|
+
}, [
|
|
2402
|
+
activeSelectedRowIds,
|
|
2403
|
+
handleSelectedRowIdsChange
|
|
2404
|
+
]);
|
|
2405
|
+
const handleAllRowsSelectionChange = useCallback((isSelected)=>{
|
|
2406
|
+
const nextSelectedRowIdSet = new Set(activeSelectedRowIds);
|
|
2407
|
+
for (const rowId of visibleRowIds)if (isSelected) nextSelectedRowIdSet.add(rowId);
|
|
2408
|
+
else nextSelectedRowIdSet.delete(rowId);
|
|
2409
|
+
handleSelectedRowIdsChange(Array.from(nextSelectedRowIdSet));
|
|
2410
|
+
}, [
|
|
2411
|
+
activeSelectedRowIds,
|
|
2412
|
+
handleSelectedRowIdsChange,
|
|
2413
|
+
visibleRowIds
|
|
2414
|
+
]);
|
|
2321
2415
|
const isFullHeight = isLoading || isError || 0 === rows.length;
|
|
2322
2416
|
return /*#__PURE__*/ jsxs("div", {
|
|
2323
2417
|
"data-slot": "data-grid",
|
|
@@ -2341,7 +2435,12 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
|
|
|
2341
2435
|
columns: columns,
|
|
2342
2436
|
height: headerHeight,
|
|
2343
2437
|
sorting: sorting,
|
|
2344
|
-
onSortingChange: onSortingChange
|
|
2438
|
+
onSortingChange: onSortingChange,
|
|
2439
|
+
isSelectionEnabled: isRowSelectionEnabled,
|
|
2440
|
+
isAllRowsSelected: isAllRowsSelected,
|
|
2441
|
+
isSomeRowsSelected: isSomeRowsSelected,
|
|
2442
|
+
isSelectionDisabled: 0 === visibleRowIds.length,
|
|
2443
|
+
onAllRowsSelectionChange: handleAllRowsSelectionChange
|
|
2345
2444
|
}),
|
|
2346
2445
|
/*#__PURE__*/ jsx(Body, {
|
|
2347
2446
|
rows: sortedRows,
|
|
@@ -2352,7 +2451,10 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
|
|
|
2352
2451
|
isLoading: isLoading,
|
|
2353
2452
|
emptyState: emptyState,
|
|
2354
2453
|
errorState: errorState,
|
|
2355
|
-
isError: isError
|
|
2454
|
+
isError: isError,
|
|
2455
|
+
isRowSelectionEnabled: isRowSelectionEnabled,
|
|
2456
|
+
selectedRowIdSet: selectedRowIdSet,
|
|
2457
|
+
onRowSelectionChange: handleRowSelectionChange
|
|
2356
2458
|
})
|
|
2357
2459
|
]
|
|
2358
2460
|
}),
|
|
@@ -2362,6 +2464,10 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
|
|
|
2362
2464
|
]
|
|
2363
2465
|
});
|
|
2364
2466
|
}
|
|
2467
|
+
function DataGrid_getRowId(value) {
|
|
2468
|
+
if ('string' == typeof value || 'number' == typeof value) return value;
|
|
2469
|
+
return String(value);
|
|
2470
|
+
}
|
|
2365
2471
|
function compareValues(a, b) {
|
|
2366
2472
|
if (null == a && null == b) return 0;
|
|
2367
2473
|
if (null == a) return -1;
|
|
@@ -5320,6 +5426,20 @@ const Sidebar_Sidebar = Object.assign(SidebarRoot, {
|
|
|
5320
5426
|
MenuSubItem: MenuSubItem,
|
|
5321
5427
|
MenuSubButton: MenuSubButton
|
|
5322
5428
|
});
|
|
5429
|
+
var Switch_styles_css_root = 'style__gj1ia10';
|
|
5430
|
+
var Switch_styles_css_thumb = 'style__gj1ia11';
|
|
5431
|
+
function Switch_Switch({ className, size = 'default', ...props }) {
|
|
5432
|
+
return /*#__PURE__*/ jsx(Switch.Root, {
|
|
5433
|
+
"data-slot": "switch",
|
|
5434
|
+
"data-size": size,
|
|
5435
|
+
className: clsx(Switch_styles_css_root, className),
|
|
5436
|
+
...props,
|
|
5437
|
+
children: /*#__PURE__*/ jsx(Switch.Thumb, {
|
|
5438
|
+
"data-slot": "switch-thumb",
|
|
5439
|
+
className: Switch_styles_css_thumb
|
|
5440
|
+
})
|
|
5441
|
+
});
|
|
5442
|
+
}
|
|
5323
5443
|
var Tabs_styles_css_contentClass = 'style__hworoa5';
|
|
5324
5444
|
var listClass = 'style__hworoa0';
|
|
5325
5445
|
var Tabs_styles_css_sizes = {
|
|
@@ -5404,4 +5524,4 @@ const ToggleGroup = ({ value, onChange, options, size, className, label, multipl
|
|
|
5404
5524
|
]
|
|
5405
5525
|
});
|
|
5406
5526
|
};
|
|
5407
|
-
export { Accordion_Accordion as Accordion, AlertDialog_AlertDialog as AlertDialog, Autocomplete, Avatar_Avatar as Avatar, Badge_Badge as Badge, Breadcrumb, ButtonGroup, Button_Button as Button, Button_buttonSizes as buttonSizes, Button_buttonVariants as buttonVariants, Calendar, Card, Carousel, Checkbox_Checkbox as Checkbox, CircularProgress, Collapsible_Collapsible as Collapsible, Combobox_Combobox as Combobox, ConfirmAction, ContentState, CopyTypography, DEFAULT_SEPARATOR, DEFAULT_SYMBOL, DESCRIPTION_ROOT_CLASSNAME, DashboardLayout, DataGrid, DataGridActionCell, DataGridSortHeader, DataList, DatePicker, Description_Description as Description, Dialog_Dialog as Dialog, Drawer_Drawer as Drawer, DropdownMenu, Empty_Empty as Empty, ImageCarousel, Image_Image as Image, InputGroup, InputOTP, Input_Input as Input, Label, MaskField, NOTIFICATION_POSITIONS, NOTIFY_CLASSNAME, Notification, NotificationContainer, OverflowTypography, PageLayout, Pagination, PeriodPicker, Placeholder, Popover_Popover as Popover, RadioGroupItem, RadioGroup_RadioGroup as RadioGroup, RangeInput, ScrollTopButton, Select_Select as Select, Sheet, Sidebar_Sidebar as Sidebar, Slider_Slider as Slider, Spinner, Tabs_Tabs as Tabs, TextField, Textarea_Textarea as Textarea, ToggleGroup, Tooltip_Tooltip as Tooltip, Typography, alignments, badgeVariants, calculateSize, constants_NotificationVariantTypes as NotificationVariantTypes, createHandle, displays, negativeSpacing, notification, spacing, styles_css_colors as colors, styles_css_variants as variants, theme, transforms, useComboboxAnchor, useDashboard, useIsMobile, useOverflowed, useSidebar, weights };
|
|
5527
|
+
export { Accordion_Accordion as Accordion, AlertDialog_AlertDialog as AlertDialog, Autocomplete, Avatar_Avatar as Avatar, Badge_Badge as Badge, Breadcrumb, ButtonGroup, Button_Button as Button, Button_buttonSizes as buttonSizes, Button_buttonVariants as buttonVariants, Calendar, Card, Carousel, Checkbox_Checkbox as Checkbox, CircularProgress, Collapsible_Collapsible as Collapsible, Combobox_Combobox as Combobox, ConfirmAction, ContentState, CopyTypography, DEFAULT_SEPARATOR, DEFAULT_SYMBOL, DESCRIPTION_ROOT_CLASSNAME, DashboardLayout, DataGrid, DataGridActionCell, DataGridSortHeader, DataList, DatePicker, Description_Description as Description, Dialog_Dialog as Dialog, Drawer_Drawer as Drawer, DropdownMenu, Empty_Empty as Empty, ImageCarousel, Image_Image as Image, InputGroup, InputOTP, Input_Input as Input, Label, MaskField, NOTIFICATION_POSITIONS, NOTIFY_CLASSNAME, Notification, NotificationContainer, OverflowTypography, PageLayout, Pagination, PeriodPicker, Placeholder, Popover_Popover as Popover, RadioGroupItem, RadioGroup_RadioGroup as RadioGroup, RangeInput, ScrollTopButton, Select_Select as Select, Sheet, Sidebar_Sidebar as Sidebar, Slider_Slider as Slider, Spinner, Switch_Switch as Switch, Tabs_Tabs as Tabs, TextField, Textarea_Textarea as Textarea, ToggleGroup, Tooltip_Tooltip as Tooltip, Typography, alignments, badgeVariants, calculateSize, constants_NotificationVariantTypes as NotificationVariantTypes, createHandle, displays, negativeSpacing, notification, spacing, styles_css_colors as colors, styles_css_variants as variants, theme, transforms, useComboboxAnchor, useDashboard, useIsMobile, useOverflowed, useSidebar, weights };
|
|
@@ -8,4 +8,7 @@ declare const _default: {
|
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
10
|
export declare const Default: () => import("react").JSX.Element;
|
|
11
|
+
export declare const Checked: () => import("react").JSX.Element;
|
|
12
|
+
export declare const Indeterminate: () => import("react").JSX.Element;
|
|
13
|
+
export declare const Disabled: () => import("react").JSX.Element;
|
|
11
14
|
//# sourceMappingURL=Checkbox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Checkbox.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAOkC;AAElC,eAAO,MAAM,OAAO,mCAUnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Checkbox.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAOkC;AAElC,eAAO,MAAM,OAAO,mCAUnB,CAAC;AAEF,eAAO,MAAM,OAAO,mCAUnB,CAAC;AAEF,eAAO,MAAM,aAAa,mCAUzB,CAAC;AAEF,eAAO,MAAM,QAAQ,mCAQpB,CAAC"}
|
|
@@ -11,6 +11,7 @@ export default _default;
|
|
|
11
11
|
export declare const BaseExample: () => import("react").JSX.Element;
|
|
12
12
|
export declare const WithActions: () => import("react").JSX.Element;
|
|
13
13
|
export declare const WithSorting: () => import("react").JSX.Element;
|
|
14
|
+
export declare const WithSelection: () => import("react").JSX.Element;
|
|
14
15
|
export declare const Loading: () => import("react").JSX.Element;
|
|
15
16
|
export declare const ErrorState: () => import("react").JSX.Element;
|
|
16
17
|
export declare const EmptyState: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.stories.d.ts","sourceRoot":"","sources":["../../src/stories/DataGrid.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EACN,QAAQ,
|
|
1
|
+
{"version":3,"file":"DataGrid.stories.d.ts","sourceRoot":"","sources":["../../src/stories/DataGrid.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EACN,QAAQ,EAMR,MAAM,cAAc,CAAC;;;;;;;;;AAGtB,wBAOkC;AA6JlC,eAAO,MAAM,WAAW,mCAMvB,CAAC;AAEF,eAAO,MAAM,WAAW,mCA6BvB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAoCvB,CAAC;AAEF,eAAO,MAAM,aAAa,mCAgBzB,CAAC;AAEF,eAAO,MAAM,OAAO,mCAEnB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAEtB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAsB1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Switch } from '../components/index.ts';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof Switch;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export declare const Default: () => import("react").JSX.Element;
|
|
12
|
+
export declare const Checked: () => import("react").JSX.Element;
|
|
13
|
+
export declare const Small: () => import("react").JSX.Element;
|
|
14
|
+
export declare const Disabled: () => import("react").JSX.Element;
|
|
15
|
+
export declare const DisabledChecked: () => import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Switch.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAE,MAAM,cAAc,CAAC;;;;;;;;;AAE7C,wBAOgC;AAEhC,eAAO,MAAM,OAAO,mCAUnB,CAAC;AAEF,eAAO,MAAM,OAAO,mCAUnB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAUjB,CAAC;AAEF,eAAO,MAAM,QAAQ,mCAQpB,CAAC;AAEF,eAAO,MAAM,eAAe,mCAQ3B,CAAC"}
|
package/lib/styles.css
CHANGED
|
@@ -2104,11 +2104,12 @@ a.outline__1af895x4:hover {
|
|
|
2104
2104
|
border: 1px solid var(--colors-primary);
|
|
2105
2105
|
background-color: var(--colors-background-paper);
|
|
2106
2106
|
cursor: pointer;
|
|
2107
|
-
border-radius:
|
|
2107
|
+
border-radius: 4px;
|
|
2108
2108
|
flex-shrink: 0;
|
|
2109
2109
|
width: 1rem;
|
|
2110
2110
|
height: 1rem;
|
|
2111
2111
|
transition: all .2s;
|
|
2112
|
+
display: block;
|
|
2112
2113
|
position: relative;
|
|
2113
2114
|
}
|
|
2114
2115
|
|
|
@@ -2134,10 +2135,23 @@ a.outline__1af895x4:hover {
|
|
|
2134
2135
|
}
|
|
2135
2136
|
|
|
2136
2137
|
.style__b7yo4k2 {
|
|
2137
|
-
width:
|
|
2138
|
-
height:
|
|
2138
|
+
width: 100%;
|
|
2139
|
+
height: 100%;
|
|
2139
2140
|
stroke: var(--colors-foreground-primary);
|
|
2140
2141
|
stroke-width: 3px;
|
|
2142
|
+
display: none;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
.style__b7yo4k3 {
|
|
2146
|
+
width: 100%;
|
|
2147
|
+
height: 100%;
|
|
2148
|
+
stroke: var(--colors-primary);
|
|
2149
|
+
stroke-width: 3px;
|
|
2150
|
+
display: none;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
.style__b7yo4k1[data-checked] .style__b7yo4k2, .style__b7yo4k1[data-indeterminate] .style__b7yo4k3 {
|
|
2154
|
+
display: block;
|
|
2141
2155
|
}
|
|
2142
2156
|
|
|
2143
2157
|
@keyframes style__1xy4jvu0 {
|
|
@@ -2542,6 +2556,13 @@ a.outline__1af895x4:hover {
|
|
|
2542
2556
|
background-color: var(--colors-background-elementHover);
|
|
2543
2557
|
}
|
|
2544
2558
|
|
|
2559
|
+
.style__gsm9mv2 {
|
|
2560
|
+
border-bottom: 1px solid var(--colors-border);
|
|
2561
|
+
justify-content: center;
|
|
2562
|
+
align-items: center;
|
|
2563
|
+
display: flex;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2545
2566
|
.style__15m2ib80 {
|
|
2546
2567
|
width: 100%;
|
|
2547
2568
|
height: 100%;
|
|
@@ -2639,6 +2660,13 @@ a.outline__1af895x4:hover {
|
|
|
2639
2660
|
top: 0;
|
|
2640
2661
|
}
|
|
2641
2662
|
|
|
2663
|
+
.style__fkgoub1 {
|
|
2664
|
+
border-bottom: 1px solid var(--colors-border);
|
|
2665
|
+
justify-content: center;
|
|
2666
|
+
align-items: center;
|
|
2667
|
+
display: flex;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2642
2670
|
.style__1gqvluf0 {
|
|
2643
2671
|
background-color: var(--colors-background-paper);
|
|
2644
2672
|
border: 1px solid var(--colors-border);
|
|
@@ -5514,6 +5542,79 @@ a.outline__1af895x4:hover {
|
|
|
5514
5542
|
}
|
|
5515
5543
|
}
|
|
5516
5544
|
|
|
5545
|
+
.style__gj1ia10 {
|
|
5546
|
+
cursor: pointer;
|
|
5547
|
+
border: 1px solid #0000;
|
|
5548
|
+
border-radius: 9999px;
|
|
5549
|
+
outline: none;
|
|
5550
|
+
flex-shrink: 0;
|
|
5551
|
+
align-items: center;
|
|
5552
|
+
transition: all .2s;
|
|
5553
|
+
display: inline-flex;
|
|
5554
|
+
position: relative;
|
|
5555
|
+
}
|
|
5556
|
+
|
|
5557
|
+
.style__gj1ia10[data-size="sm"] {
|
|
5558
|
+
width: 24px;
|
|
5559
|
+
height: 14px;
|
|
5560
|
+
}
|
|
5561
|
+
|
|
5562
|
+
.style__gj1ia10[data-size="default"] {
|
|
5563
|
+
width: 32px;
|
|
5564
|
+
height: 18.4px;
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5567
|
+
.style__gj1ia10[data-checked] {
|
|
5568
|
+
background-color: var(--colors-primary);
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
.style__gj1ia10[data-unchecked] {
|
|
5572
|
+
background-color: var(--colors-border);
|
|
5573
|
+
}
|
|
5574
|
+
|
|
5575
|
+
.style__gj1ia10:focus-visible {
|
|
5576
|
+
box-shadow: 0 0 0 2px var(--colors-background-paper), 0 0 0 4px var(--colors-primary);
|
|
5577
|
+
}
|
|
5578
|
+
|
|
5579
|
+
.style__gj1ia10[data-disabled] {
|
|
5580
|
+
cursor: not-allowed;
|
|
5581
|
+
opacity: .5;
|
|
5582
|
+
}
|
|
5583
|
+
|
|
5584
|
+
.style__gj1ia11 {
|
|
5585
|
+
background-color: var(--colors-background-paper);
|
|
5586
|
+
pointer-events: none;
|
|
5587
|
+
border-radius: 9999px;
|
|
5588
|
+
transition: transform .2s;
|
|
5589
|
+
display: block;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
.style__gj1ia10[data-size="sm"] .style__gj1ia11 {
|
|
5593
|
+
width: 12px;
|
|
5594
|
+
height: 12px;
|
|
5595
|
+
}
|
|
5596
|
+
|
|
5597
|
+
.style__gj1ia10[data-size="default"] .style__gj1ia11 {
|
|
5598
|
+
width: 16px;
|
|
5599
|
+
height: 16px;
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
.style__gj1ia10[data-size="sm"][data-unchecked] .style__gj1ia11 {
|
|
5603
|
+
transform: translateX(0);
|
|
5604
|
+
}
|
|
5605
|
+
|
|
5606
|
+
.style__gj1ia10[data-size="sm"][data-checked] .style__gj1ia11 {
|
|
5607
|
+
transform: translateX(calc(100% - 2px));
|
|
5608
|
+
}
|
|
5609
|
+
|
|
5610
|
+
.style__gj1ia10[data-size="default"][data-unchecked] .style__gj1ia11 {
|
|
5611
|
+
transform: translateX(0);
|
|
5612
|
+
}
|
|
5613
|
+
|
|
5614
|
+
.style__gj1ia10[data-size="default"][data-checked] .style__gj1ia11 {
|
|
5615
|
+
transform: translateX(calc(100% - 2px));
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5517
5618
|
.style__hworoa0 {
|
|
5518
5619
|
justify-content: center;
|
|
5519
5620
|
align-items: center;
|