@nurihaus/web-design-system 1.2.16 → 1.2.17
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/badge/badge-props.d.ts +44 -0
- package/dist/components/button/button-props.d.ts +12 -0
- package/dist/components/check-box/check-box-props.d.ts +7 -0
- package/dist/components/table/base-table.d.ts +3 -4
- package/dist/components/table/data-table.d.ts +4 -6
- package/dist/components/table/table-type.d.ts +6 -7
- package/dist/components/table/table.stories.d.ts +2 -2
- package/dist/helpers/types/propsDef.d.ts +11 -0
- package/dist/index.js +1053 -1184
- package/package.json +22 -13
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const iconTextBadgeProps: {
|
|
2
|
+
size: {
|
|
3
|
+
className: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
borderColor: {
|
|
8
|
+
className: string;
|
|
9
|
+
values: string[];
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
textColor: {
|
|
13
|
+
className: string;
|
|
14
|
+
values: string[];
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
backgroundColor: {
|
|
18
|
+
className: string;
|
|
19
|
+
values: string[];
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const iconTextOptionBadgeProps: {
|
|
24
|
+
size: {
|
|
25
|
+
className: string;
|
|
26
|
+
values: string[];
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
borderColor: {
|
|
30
|
+
className: string;
|
|
31
|
+
values: string[];
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
textColor: {
|
|
35
|
+
className: string;
|
|
36
|
+
values: string[];
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
backgroundColor: {
|
|
40
|
+
className: string;
|
|
41
|
+
values: string[];
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { TableBodyProps, TableCellProps, TableHeaderProps, TableRowProps } from "./table-type";
|
|
1
|
+
import { TableBodyProps, TableCellProps, TableHeaderProps, TableRootProps, TableRowProps } from './table-type';
|
|
2
|
+
import './table-style.css';
|
|
4
3
|
declare const TableRoot: {
|
|
5
|
-
(props:
|
|
4
|
+
(props: TableRootProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
Header: (props: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
Body: (props: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
Row: (props: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import
|
|
3
|
-
import { TableHeaderProps } from "./table-type";
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import './table-style.css';
|
|
4
3
|
export interface RowItem {
|
|
5
4
|
id: string;
|
|
6
5
|
value: ReactNode;
|
|
7
|
-
onClickRow?: (id: RowItem[
|
|
6
|
+
onClickRow?: (id: RowItem['id']) => void;
|
|
8
7
|
}
|
|
9
8
|
type ColumnsType<T extends readonly RowItem[]> = Array<{
|
|
10
|
-
[K in T[number][
|
|
9
|
+
[K in T[number]['id']]: {
|
|
11
10
|
value: ReactNode;
|
|
12
11
|
onClickCell?: () => void;
|
|
13
12
|
};
|
|
14
13
|
}>;
|
|
15
14
|
export interface DataTableProps<T extends readonly RowItem[]> {
|
|
16
|
-
header: TableHeaderProps;
|
|
17
15
|
rows: T;
|
|
18
16
|
columns: ColumnsType<T>;
|
|
19
17
|
fixedRowsIndex?: number;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { ComponentPropsWithRef } from
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface TableProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export interface TableRootProps extends Omit<TableProps,
|
|
5
|
+
export interface TableRootProps extends Omit<TableProps, 'children'>, ComponentPropsWithRef<'table'> {
|
|
6
6
|
}
|
|
7
|
-
export interface TableHeaderProps extends Omit<TableProps,
|
|
8
|
-
justify?: "center" | "start" | "end";
|
|
7
|
+
export interface TableHeaderProps extends Omit<TableProps, 'children'>, ComponentPropsWithRef<'thead'> {
|
|
9
8
|
}
|
|
10
|
-
export interface TableRowProps extends Omit<TableProps,
|
|
9
|
+
export interface TableRowProps extends Omit<TableProps, 'children'>, ComponentPropsWithRef<'tr'> {
|
|
11
10
|
}
|
|
12
|
-
export interface TableBodyProps extends Omit<TableProps,
|
|
11
|
+
export interface TableBodyProps extends Omit<TableProps, 'children'>, ComponentPropsWithRef<'tbody'> {
|
|
13
12
|
}
|
|
14
|
-
export interface TableCellProps extends Omit<TableProps,
|
|
13
|
+
export interface TableCellProps extends Omit<TableProps, 'children'>, ComponentPropsWithRef<'td'> {
|
|
15
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { StoryObj } from
|
|
2
|
-
import { DataTableProps } from
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { DataTableProps } from './data-table';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: <T extends readonly import("./data-table").RowItem[]>(props: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ClassNamePropsType<T extends any[] = any[]> = {
|
|
2
|
+
className: string;
|
|
3
|
+
values: T;
|
|
4
|
+
default: T[number];
|
|
5
|
+
};
|
|
6
|
+
export type DataAttributePropsType<T extends any[] = any[]> = {
|
|
7
|
+
dataAttribute: string;
|
|
8
|
+
values: T;
|
|
9
|
+
default: T[number];
|
|
10
|
+
};
|
|
11
|
+
export type PropDef<T extends any[] = any[]> = ClassNamePropsType<T> | DataAttributePropsType<T>;
|