oziko-ui-kit 0.0.136 → 0.0.139

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,30 @@
1
+ import React from "react";
2
+ import { TypeFlexElement } from "../../../components/atoms/flex-element/FlexElement";
3
+ export declare const parsePx: (value: string | undefined) => number;
4
+ export type TableColumnContainerProps = {
5
+ columnKey?: string;
6
+ children?: React.ReactNode;
7
+ className?: string;
8
+ width?: string;
9
+ minWidth?: string;
10
+ updateColumnWidth?: (key: string, newWidth: string) => void;
11
+ noResizeable?: boolean;
12
+ style?: React.CSSProperties;
13
+ };
14
+ export type TableHeaderCellProps = TypeFlexElement & {
15
+ border?: boolean;
16
+ headerAlign?: "left" | "center" | "right";
17
+ };
18
+ export type TableCellProps = React.HTMLAttributes<HTMLDivElement> & {
19
+ focused?: boolean;
20
+ };
21
+ export declare const HeaderCell: ({ border, headerAlign, children, ...props }: TableHeaderCellProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const Cell: ({ children, focused, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const DefaultSkeletonCell: () => import("react/jsx-runtime").JSX.Element;
24
+ declare const Column: React.NamedExoticComponent<TableColumnContainerProps> & {
25
+ readonly type: ({ columnKey, children, className, width, minWidth, updateColumnWidth, noResizeable, style, }: TableColumnContainerProps) => import("react/jsx-runtime").JSX.Element;
26
+ } & {
27
+ Header: ({ border, headerAlign, children, ...props }: TableHeaderCellProps) => import("react/jsx-runtime").JSX.Element;
28
+ Cell: ({ children, focused, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
29
+ };
30
+ export default Column;
@@ -1,11 +1,16 @@
1
1
  import React from "react";
2
- import { TypeFlexElement } from "../../../components/atoms/flex-element/FlexElement";
2
+ import Column from "./Column";
3
3
  export type TableColumnRenderCellParams<TRow = any> = {
4
4
  row: TRow;
5
5
  rowIndex: number;
6
6
  isFocused: boolean;
7
7
  columnKey: string;
8
8
  };
9
+ export type TableCellParams<TRow = any> = {
10
+ row: TRow;
11
+ rowIndex: number;
12
+ columnKey: string;
13
+ };
9
14
  export type TableColumn<TRow = any> = {
10
15
  key: string;
11
16
  header: React.ReactNode;
@@ -22,11 +27,16 @@ export type TableCellKeyDownParams = {
22
27
  rowIndex: number;
23
28
  event: KeyboardEvent;
24
29
  };
30
+ export type TableRowClickParams<TRow = any> = {
31
+ row: TRow;
32
+ rowIndex: number;
33
+ event: React.MouseEvent<HTMLDivElement>;
34
+ };
25
35
  export type TableSkeletonCellParams<TRow = any> = {
26
36
  column: TableColumn<TRow>;
27
37
  rowIndex: number;
28
38
  };
29
- export type TypeTable<TRow = any> = {
39
+ export type TableProps<TRow = any> = {
30
40
  columns: TableColumn<TRow>[];
31
41
  data: TRow[];
32
42
  loading?: boolean;
@@ -35,34 +45,24 @@ export type TypeTable<TRow = any> = {
35
45
  saveToLocalStorage?: TableSaveToLocalStorage;
36
46
  fixedColumns?: string[];
37
47
  noResizeableColumns?: string[];
48
+ isCellFocusable?: (params: TableCellParams<TRow>) => boolean;
38
49
  onCellKeyDown?: (params: TableCellKeyDownParams) => void;
50
+ onRowClick?: (params: TableRowClickParams<TRow>) => void;
39
51
  tableClassName?: string;
40
52
  columnClassName?: string;
41
53
  headerClassName?: string;
42
54
  cellClassName?: string;
43
55
  };
44
- declare const MemoizedTable: <TRow = any>(props: TypeTable<TRow>) => React.ReactElement;
45
- export default MemoizedTable;
46
- export type TypeColumn = {
47
- columnKey?: string;
48
- children?: React.ReactNode;
49
- className?: string;
50
- width?: string;
51
- minWidth?: string;
52
- updateColumnWidth?: (key: string, newWidth: string) => void;
53
- noResizeable?: boolean;
54
- style?: React.CSSProperties;
55
- };
56
- export type TypeColumnComponent = React.FC<TypeColumn> & {
57
- Header: typeof HeaderCell;
58
- Cell: typeof Cell;
59
- };
60
- export type TypeHeaderCell = TypeFlexElement & {
61
- border?: boolean;
62
- headerAlign?: "left" | "center" | "right";
63
- };
64
- declare const HeaderCell: ({ border, headerAlign, children, ...props }: TypeHeaderCell) => import("react/jsx-runtime").JSX.Element;
65
- export type TypeCell = React.HTMLAttributes<HTMLDivElement> & {
66
- focused?: boolean;
67
- };
68
- declare const Cell: ({ children, focused, ...props }: TypeCell) => import("react/jsx-runtime").JSX.Element;
56
+ export type { TableColumnContainerProps, TableHeaderCellProps, TableCellProps, } from "./Column";
57
+ /** @deprecated Use TableProps instead */
58
+ export type TypeTable<TRow = any> = TableProps<TRow>;
59
+ /** @deprecated Use TableColumnContainerProps instead */
60
+ export type { TableColumnContainerProps as TypeColumn } from "./Column";
61
+ /** @deprecated Use TableHeaderCellProps instead */
62
+ export type { TableHeaderCellProps as TypeHeaderCell } from "./Column";
63
+ /** @deprecated Use TableCellProps instead */
64
+ export type { TableCellProps as TypeCell } from "./Column";
65
+ /** @deprecated Internal type; no replacement needed */
66
+ export type TypeColumnComponent = typeof Column;
67
+ declare const Table: <TRow = any>(props: TableProps<TRow>) => React.ReactElement;
68
+ export default Table;
package/dist/index.css CHANGED
@@ -1300,10 +1300,11 @@ code {
1300
1300
  background: var(--oziko-color-menu-background);
1301
1301
  }
1302
1302
  .Portal-module_container__QcS9f {
1303
- position: absolute;
1303
+ position: fixed;
1304
+ inset: 0;
1304
1305
  width: 100vw;
1305
1306
  height: 100vh;
1306
- top: 0;
1307
+ z-index: 1000;
1307
1308
  }
1308
1309
  .SelectOption-module_option__wQb8V {
1309
1310
  cursor: pointer;
@@ -2231,10 +2232,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
2231
2232
  align-items: center;
2232
2233
  }
2233
2234
  .Modal-module_modalContainer__CnoII {
2234
- position: absolute;
2235
+ position: fixed;
2236
+ inset: 0;
2235
2237
  width: 100% !important;
2236
2238
  height: 100% !important;
2237
- top: 0;
2239
+ padding: 24px;
2240
+ box-sizing: border-box;
2238
2241
  }
2239
2242
 
2240
2243
  .Modal-module_modalContent__HNEeB {
@@ -171,8 +171,15 @@ export { type TypeSection } from "./components/organisms/section/Section";
171
171
  export { type TypeSectionComponent } from "./components/organisms/section/Section";
172
172
  export { type TableColumn } from "./components/organisms/table/Table";
173
173
  export { type TableColumnRenderCellParams } from "./components/organisms/table/Table";
174
+ export { type TableCellParams } from "./components/organisms/table/Table";
174
175
  export { type TableSaveToLocalStorage } from "./components/organisms/table/Table";
175
176
  export { type TableCellKeyDownParams } from "./components/organisms/table/Table";
177
+ export { type TableRowClickParams } from "./components/organisms/table/Table";
178
+ export { type TableSkeletonCellParams } from "./components/organisms/table/Table";
179
+ export { type TableProps } from "./components/organisms/table/Table";
180
+ export { type TableColumnContainerProps } from "./components/organisms/table/Table";
181
+ export { type TableHeaderCellProps } from "./components/organisms/table/Table";
182
+ export { type TableCellProps } from "./components/organisms/table/Table";
176
183
  export { type TypeTable } from "./components/organisms/table/Table";
177
184
  export { type TypeColumn } from "./components/organisms/table/Table";
178
185
  export { type TypeColumnComponent } from "./components/organisms/table/Table";