@orbit_ui_toolkit/orbitui-kit 0.1.20 → 0.1.22

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,22 @@
1
+ import { default as React } from 'react';
2
+ export interface Column<T> {
3
+ header: string;
4
+ accessor: keyof T | ((row: T) => React.ReactNode);
5
+ className?: string;
6
+ width?: string;
7
+ }
8
+ export interface DataTableProps<T> {
9
+ data: T[];
10
+ columns: Column<T>[];
11
+ keyExtractor: (item: T) => string | number;
12
+ isLoading?: boolean;
13
+ onSort?: (column: Column<T>) => void;
14
+ pagination?: {
15
+ currentPage: number;
16
+ totalPages: number;
17
+ onPageChange: (page: number) => void;
18
+ };
19
+ emptyMessage?: string;
20
+ className?: string;
21
+ }
22
+ export declare const DataTable: <T extends any>({ data, columns, keyExtractor, isLoading, onSort, pagination, emptyMessage, className, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { DataTable } from './DataTable';
3
+ declare const meta: Meta<typeof DataTable>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DataTable>;
6
+ export declare const Default: Story;
7
+ export declare const Loading: Story;
8
+ export declare const WithPagination: Story;
9
+ export declare const Empty: Story;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface MultiSelectOption {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface MultiSelectProps {
7
+ label?: string;
8
+ error?: string;
9
+ options: MultiSelectOption[];
10
+ value: string[];
11
+ onChange: (value: string[]) => void;
12
+ placeholder?: string;
13
+ variant?: 'default' | 'glass' | 'dark';
14
+ rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
15
+ className?: string;
16
+ }
17
+ export declare const MultiSelect: React.FC<MultiSelectProps>;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MultiSelect } from './MultiSelect';
3
+ declare const meta: Meta<typeof MultiSelect>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MultiSelect>;
6
+ export declare const Default: Story;
7
+ export declare const Glass: Story;
8
+ export declare const Dark: Story;
9
+ export declare const WithError: Story;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface OrbitSelectOption {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface OrbitSelectProps {
7
+ label?: string;
8
+ error?: string;
9
+ options: OrbitSelectOption[];
10
+ value: string;
11
+ onChange: (e: {
12
+ target: {
13
+ value: string;
14
+ };
15
+ }) => void;
16
+ placeholder?: string;
17
+ variant?: 'default' | 'glass' | 'dark';
18
+ rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
19
+ shadow?: boolean;
20
+ leftIcon?: React.ReactNode;
21
+ className?: string;
22
+ }
23
+ export declare const OrbitSelect: React.FC<OrbitSelectProps>;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { OrbitSelect } from './OrbitSelect';
3
+ declare const meta: Meta<typeof OrbitSelect>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof OrbitSelect>;
6
+ export declare const Default: Story;
7
+ export declare const Glass: Story;
8
+ export declare const Dark: Story;
9
+ export declare const WithError: Story;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './components/Button/Button';
2
2
  export * from './components/Input/Input';
3
+ export * from './components/Select/OrbitSelect';
4
+ export * from './components/MultiSelect/MultiSelect';
3
5
  export * from './components/Card/Card';
4
6
  export * from './components/Post/Post';
5
7
  export * from './components/Loader/Loader';
@@ -15,3 +17,4 @@ export * from './components/Avatar/Avatar';
15
17
  export * from './components/Chat';
16
18
  export * from './components/Stack';
17
19
  export * from './components/Dialog/BaseDialog';
20
+ export * from './components/DataTable/DataTable';