@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.
Files changed (42) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.js +115667 -6517
  3. package/dist/theme-viewport.css +1 -1
  4. package/dist/theme.css +1 -1
  5. package/package.json +5 -4
  6. package/types/components/helpers/select/index.d.ts +1 -0
  7. package/types/components/helpers/select/select.d.ts +1 -1
  8. package/types/components/symbols/index.d.ts +2 -0
  9. package/types/components/symbols/input-numeral/index.d.ts +1 -0
  10. package/types/components/symbols/input-numeral/input-numeral.d.ts +12 -0
  11. package/types/components/symbols/select-tree/empty/empty.d.ts +6 -0
  12. package/types/components/symbols/select-tree/empty/index.d.ts +1 -0
  13. package/types/components/symbols/select-tree/index.d.ts +1 -0
  14. package/types/components/symbols/select-tree/option/index.d.ts +1 -0
  15. package/types/components/symbols/select-tree/option/option.d.ts +6 -0
  16. package/types/components/symbols/select-tree/placeholder/index.d.ts +1 -0
  17. package/types/components/symbols/select-tree/placeholder/placeholder.d.ts +5 -0
  18. package/types/components/symbols/select-tree/select-tree.d.ts +23 -0
  19. package/types/components/symbols/select-tree/tree/index.d.ts +1 -0
  20. package/types/components/symbols/select-tree/tree/tree.d.ts +11 -0
  21. package/types/components/table/cell/cell.context.d.ts +8 -0
  22. package/types/components/table/cell/cell.d.ts +5 -0
  23. package/types/components/table/cell/hook/useCellData.d.ts +4 -0
  24. package/types/components/table/cell/index.d.ts +4 -0
  25. package/types/components/table/column/column.context.d.ts +9 -0
  26. package/types/components/table/column/column.d.ts +14 -0
  27. package/types/components/table/column/index.d.ts +2 -0
  28. package/types/components/table/empty/empty.d.ts +5 -0
  29. package/types/components/table/empty/index.d.ts +1 -0
  30. package/types/components/table/expand/expand.d.ts +5 -0
  31. package/types/components/table/expand/index.d.ts +1 -0
  32. package/types/components/table/head/head.d.ts +2 -0
  33. package/types/components/table/head/index.d.ts +1 -0
  34. package/types/components/table/index.d.ts +8 -0
  35. package/types/components/table/row/index.d.ts +2 -0
  36. package/types/components/table/row/row.context.d.ts +10 -0
  37. package/types/components/table/row/row.d.ts +9 -0
  38. package/types/components/table/table.context.d.ts +10 -0
  39. package/types/components/table/table.d.ts +12 -0
  40. package/types/components/table/title/index.d.ts +2 -0
  41. package/types/components/table/title/title.d.ts +5 -0
  42. 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.97",
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.5",
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.2",
63
- "vite": "6.2.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"
@@ -1 +1,2 @@
1
1
  export { Select } from './select.tsx';
2
+ export type { TSelectContext } from './select.tsx';
@@ -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,6 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ title: string;
4
+ disabled?: boolean;
5
+ }
6
+ export declare const Empty: React.FC<IProps>;
@@ -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,6 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ title: string;
4
+ disabled?: boolean;
5
+ }
6
+ export declare const Option: React.FC<IProps>;
@@ -0,0 +1 @@
1
+ export { Placeholder } from './placeholder.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ title: string;
4
+ }
5
+ export declare const Placeholder: React.FC<IProps>;
@@ -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,8 @@
1
+ import { default as React } from 'react';
2
+ interface IColumn {
3
+ data: any;
4
+ deps: number;
5
+ }
6
+ export declare const context: React.Context<IColumn>;
7
+ export declare const Provider: React.Provider<IColumn>;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ data: any;
4
+ }
5
+ export declare const Cell: React.FC<React.PropsWithChildren>;
@@ -0,0 +1,4 @@
1
+ export declare const useCellData: () => {
2
+ data: any;
3
+ deps: number;
4
+ };
@@ -0,0 +1,4 @@
1
+ export { Cell } from './cell.tsx';
2
+ export { context, Provider } from './cell.context.ts';
3
+ export { useCellData } from './hook/useCellData.ts';
4
+ export type { IProps as ICellProps } from './cell.tsx';
@@ -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,2 @@
1
+ export { Column } from './column.tsx';
2
+ export { Provider, context } from './column.context.ts';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ data: any;
4
+ }
5
+ export declare const Empty: React.FC<React.PropsWithChildren>;
@@ -0,0 +1 @@
1
+ export { Empty } from './empty.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface IProps {
3
+ }
4
+ export declare const Expand: React.FC<IProps>;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { Expand } from './expand.tsx';
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Head: React.FC<React.PropsWithChildren>;
@@ -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,2 @@
1
+ export { Row } from './row.tsx';
2
+ export { context } from './row.context.ts';
@@ -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,9 @@
1
+ import { default as React } from 'react';
2
+ interface IProps<T> {
3
+ data: T;
4
+ deps: number;
5
+ expanded: boolean;
6
+ setExpand(state: boolean): void;
7
+ }
8
+ export declare const Row: <T>(props: React.PropsWithChildren<IProps<T>>) => React.JSX.Element;
9
+ export {};
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ export { Title } from './title.tsx';
2
+ export type { IProps as ITitleProps } from './title.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ data: any;
4
+ }
5
+ export declare const Title: React.FC<React.PropsWithChildren>;
package/types/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './components/symbols';
3
3
  export * from './components/wrappers';
4
4
  export * from './subcomponents';
5
5
  export * from './components/helpers/animate';
6
+ export * from './components/table';