@sellgar/kit 0.0.97 → 0.0.99
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/index.css +2 -2
- package/dist/index.js +115667 -6517
- package/dist/theme-viewport.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +5 -4
- package/types/components/helpers/select/index.d.ts +1 -0
- package/types/components/helpers/select/select.d.ts +1 -1
- package/types/components/symbols/index.d.ts +2 -0
- package/types/components/symbols/input-numeral/index.d.ts +1 -0
- package/types/components/symbols/input-numeral/input-numeral.d.ts +12 -0
- package/types/components/symbols/select-tree/empty/empty.d.ts +6 -0
- package/types/components/symbols/select-tree/empty/index.d.ts +1 -0
- package/types/components/symbols/select-tree/index.d.ts +1 -0
- package/types/components/symbols/select-tree/option/index.d.ts +1 -0
- package/types/components/symbols/select-tree/option/option.d.ts +6 -0
- package/types/components/symbols/select-tree/placeholder/index.d.ts +1 -0
- package/types/components/symbols/select-tree/placeholder/placeholder.d.ts +5 -0
- package/types/components/symbols/select-tree/select-tree.d.ts +23 -0
- package/types/components/symbols/select-tree/tree/index.d.ts +1 -0
- package/types/components/symbols/select-tree/tree/tree.d.ts +11 -0
- package/types/components/table/cell/cell.context.d.ts +8 -0
- package/types/components/table/cell/cell.d.ts +5 -0
- package/types/components/table/cell/hook/useCellData.d.ts +4 -0
- package/types/components/table/cell/index.d.ts +4 -0
- package/types/components/table/column/column.context.d.ts +9 -0
- package/types/components/table/column/column.d.ts +14 -0
- package/types/components/table/column/index.d.ts +2 -0
- package/types/components/table/empty/empty.d.ts +5 -0
- package/types/components/table/empty/index.d.ts +1 -0
- package/types/components/table/expand/expand.d.ts +5 -0
- package/types/components/table/expand/index.d.ts +1 -0
- package/types/components/table/head/head.d.ts +2 -0
- package/types/components/table/head/index.d.ts +1 -0
- package/types/components/table/index.d.ts +8 -0
- package/types/components/table/row/index.d.ts +2 -0
- package/types/components/table/row/row.context.d.ts +10 -0
- package/types/components/table/row/row.d.ts +9 -0
- package/types/components/table/table.context.d.ts +10 -0
- package/types/components/table/table.d.ts +12 -0
- package/types/components/table/title/index.d.ts +2 -0
- package/types/components/table/title/title.d.ts +5 -0
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellgar/kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.99",
|
|
5
5
|
"description": "Storybook",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@floating-ui/dom": "1.6.13",
|
|
37
|
-
"@floating-ui/react": "0.27.
|
|
37
|
+
"@floating-ui/react": "0.27.6",
|
|
38
38
|
"@react-input/mask": "2.0.4",
|
|
39
|
+
"@react-input/number-format": "2.0.3",
|
|
39
40
|
"@types/react-slider": "1.3.6",
|
|
40
41
|
"classnames": "2.5.1",
|
|
41
42
|
"date-fns": "4.1.0",
|
|
@@ -59,8 +60,8 @@
|
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@vitejs/plugin-react": "4.3.4",
|
|
62
|
-
"typescript": "5.8.
|
|
63
|
-
"vite": "6.2.
|
|
63
|
+
"typescript": "5.8.3",
|
|
64
|
+
"vite": "6.2.5",
|
|
64
65
|
"vite-plugin-dts": "4.5.3",
|
|
65
66
|
"vite-plugin-lib-inject-css": "2.2.1",
|
|
66
67
|
"vite-plugin-webfont-dl": "3.10.4"
|
|
@@ -67,7 +67,7 @@ declare const useSelect: (options: IOptions) => {
|
|
|
67
67
|
onBlur: (() => void) | undefined;
|
|
68
68
|
onFocus: (() => void) | undefined;
|
|
69
69
|
};
|
|
70
|
-
type TSelectContext = ReturnType<typeof useSelect>;
|
|
70
|
+
export type TSelectContext = ReturnType<typeof useSelect>;
|
|
71
71
|
export declare const useSelectContext: () => {
|
|
72
72
|
open: boolean | undefined;
|
|
73
73
|
setOpen: (open: boolean) => void;
|
|
@@ -8,6 +8,7 @@ export * from './radio';
|
|
|
8
8
|
export * from './checkbox';
|
|
9
9
|
export * from './input';
|
|
10
10
|
export * from './input-mask';
|
|
11
|
+
export * from './input-numeral';
|
|
11
12
|
export * from './input-select';
|
|
12
13
|
export * from './textarea';
|
|
13
14
|
export * from './label-field';
|
|
@@ -24,6 +25,7 @@ export * from './breadcrumb';
|
|
|
24
25
|
export * from './notification';
|
|
25
26
|
export * from './modal';
|
|
26
27
|
export * from './select';
|
|
28
|
+
export * from './select-tree';
|
|
27
29
|
export * from './datepicker';
|
|
28
30
|
export * from './tab-menu';
|
|
29
31
|
export * from './card';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputNumeral } from './input-numeral.tsx';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { format, unformat } from '@react-input/number-format';
|
|
3
|
+
import { IProps as IInputProps } from '../input/input.tsx';
|
|
4
|
+
export interface IProps extends IInputProps {
|
|
5
|
+
}
|
|
6
|
+
declare const InputNumeralComponent: React.FC<IProps>;
|
|
7
|
+
type TInputNumeral = typeof InputNumeralComponent & {
|
|
8
|
+
format: typeof format;
|
|
9
|
+
unFormat: typeof unformat;
|
|
10
|
+
};
|
|
11
|
+
export declare const InputNumeral: TInputNumeral;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Empty } from './empty.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectTree } from './select-tree.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Option } from './option.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Placeholder } from './placeholder.tsx';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IProps<T extends Record<string, any>, K extends keyof T> {
|
|
3
|
+
leadIcon?: React.ReactNode;
|
|
4
|
+
tailIcon?: React.ReactNode;
|
|
5
|
+
badge?: string | number;
|
|
6
|
+
size?: 'xs' | 'md';
|
|
7
|
+
target?: 'destructive';
|
|
8
|
+
accessor: K;
|
|
9
|
+
optionKey: K;
|
|
10
|
+
optionValue: K;
|
|
11
|
+
options: T[];
|
|
12
|
+
value?: T[K];
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
isClearable?: boolean;
|
|
17
|
+
templateValue?(option?: T): React.ReactNode;
|
|
18
|
+
templateOption?(option: T): React.ReactNode;
|
|
19
|
+
onChange?: (value: T[K] | undefined) => void;
|
|
20
|
+
onFocus?: () => void;
|
|
21
|
+
onBlur?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const SelectTree: <T extends Record<string, any>, K extends keyof T>({ value, placeholder, tabIndex, options, accessor, optionKey, optionValue, templateValue, templateOption, onBlur, onFocus, onChange, disabled, isClearable, ...props }: IProps<T, K>) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tree } from './tree.tsx';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IProps<T extends Record<string, any>, K extends keyof T> {
|
|
3
|
+
index: number;
|
|
4
|
+
options: T[];
|
|
5
|
+
accessor: K;
|
|
6
|
+
optionKey: K;
|
|
7
|
+
optionValue: K;
|
|
8
|
+
templateOption?(option: T): React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Tree: <T extends Record<string, any>, K extends keyof T>(props: IProps<T, K>) => (string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>)[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IColumn<T> {
|
|
3
|
+
accessor?: keyof T;
|
|
4
|
+
width?: number;
|
|
5
|
+
dynamicWidth: number;
|
|
6
|
+
setWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const context: React.Context<IColumn<any>>;
|
|
9
|
+
export declare const Provider: React.Provider<IColumn<any>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Title } from '../title';
|
|
3
|
+
import { Cell } from '../cell';
|
|
4
|
+
interface IProps<T> {
|
|
5
|
+
accessor?: keyof T;
|
|
6
|
+
width?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const ColumnComponent: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
|
|
9
|
+
type TColumn = typeof ColumnComponent & {
|
|
10
|
+
Title: typeof Title;
|
|
11
|
+
Cell: typeof Cell;
|
|
12
|
+
};
|
|
13
|
+
export declare const Column: TColumn;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Empty } from './empty.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Expand } from './expand.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Head } from './head.tsx';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Table } from './table.tsx';
|
|
2
|
+
export { Column } from './column';
|
|
3
|
+
export { Expand } from './expand';
|
|
4
|
+
export { context as rowContext } from './row';
|
|
5
|
+
export { context as cellContext } from './cell';
|
|
6
|
+
export { useCellData } from './cell/hook/useCellData.ts';
|
|
7
|
+
export { type ITitleProps } from './title';
|
|
8
|
+
export { type ICellProps } from './cell';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IColumn<T> {
|
|
3
|
+
data: T;
|
|
4
|
+
deps: number;
|
|
5
|
+
hasExpanded: boolean;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
setExpand(state: boolean): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const context: React.Context<IColumn<any>>;
|
|
10
|
+
export declare const Provider: React.Provider<IColumn<any>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ITree<T> {
|
|
3
|
+
accessor: keyof T;
|
|
4
|
+
defaultExpanded?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IContext<T> {
|
|
7
|
+
tree?: ITree<T>;
|
|
8
|
+
}
|
|
9
|
+
export declare const context: React.Context<IContext<any>>;
|
|
10
|
+
export declare const Provider: React.Provider<IContext<any>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ITree<T> {
|
|
3
|
+
accessor: keyof T;
|
|
4
|
+
defaultExpanded?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface IProps<T> {
|
|
7
|
+
data: T[];
|
|
8
|
+
tree?: ITree<T>;
|
|
9
|
+
empty?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Table: <T extends Record<string, any>>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
|
|
12
|
+
export {};
|
package/types/index.d.ts
CHANGED