@lctafrica/ui 0.1.1 → 0.2.1
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/ui/pagination/Pagination.d.ts +10 -0
- package/dist/components/ui/pagination/Pagination.stories.d.ts +43 -0
- package/dist/components/ui/select/Select.d.ts +3 -1
- package/dist/components/ui/select/select-components.d.ts +2 -1
- package/dist/components/ui/table/Table.d.ts +13 -0
- package/dist/components/ui/table/Table.stories.d.ts +37 -0
- package/dist/components/ui/text/Text.d.ts +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +17875 -7254
- package/package.json +3 -2
- /package/dist/components/ui/{loading-state → loading-indicator}/LoadingIndicator.d.ts +0 -0
- /package/dist/components/ui/{loading-state → loading-indicator}/LoadingIndicator.stories.d.ts +0 -0
- /package/dist/components/ui/{loading-state → loading-indicator}/loading-animation/LoadingAnimation.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type PaginationProps = {
|
|
2
|
+
totalElements: number;
|
|
3
|
+
totalPages: number;
|
|
4
|
+
pageNumber: number;
|
|
5
|
+
onPageNumberClick: (page: number) => void;
|
|
6
|
+
onSizeChange: (size: number) => void;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export default function Pagination({ totalElements, totalPages, pageNumber, onPageNumberClick, onSizeChange, pageSize, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as Pagination } from './Pagination';
|
|
3
|
+
/**
|
|
4
|
+
* Pagination component for navigating paginated data.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Page navigation with ellipsis
|
|
8
|
+
* - Page size selection via Select component
|
|
9
|
+
* - Previous / Next controls
|
|
10
|
+
*
|
|
11
|
+
* Controlled component: parent manages page and page size state.
|
|
12
|
+
*/
|
|
13
|
+
declare const meta: Meta<typeof Pagination>;
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof Pagination>;
|
|
16
|
+
/**
|
|
17
|
+
* Default
|
|
18
|
+
*/
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
/**
|
|
21
|
+
* Few pages (no ellipsis)
|
|
22
|
+
*/
|
|
23
|
+
export declare const FewPages: Story;
|
|
24
|
+
/**
|
|
25
|
+
* Many pages (ellipsis behavior)
|
|
26
|
+
*/
|
|
27
|
+
export declare const ManyPages: Story;
|
|
28
|
+
/**
|
|
29
|
+
* At first page
|
|
30
|
+
*/
|
|
31
|
+
export declare const AtStart: Story;
|
|
32
|
+
/**
|
|
33
|
+
* At last page
|
|
34
|
+
*/
|
|
35
|
+
export declare const AtEnd: Story;
|
|
36
|
+
/**
|
|
37
|
+
* Custom styling
|
|
38
|
+
*/
|
|
39
|
+
export declare const CustomStyling: Story;
|
|
40
|
+
/**
|
|
41
|
+
* Large dataset simulation
|
|
42
|
+
*/
|
|
43
|
+
export declare const LargeDataset: Story;
|
|
@@ -10,6 +10,8 @@ export type SelectProps = {
|
|
|
10
10
|
name?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
showClearButton?: boolean | undefined;
|
|
13
15
|
};
|
|
14
|
-
declare function SelectComposite({ value, onChange, options, placeholder, name, disabled, required, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function SelectComposite({ value, onChange, options, placeholder, name, disabled, required, className, showClearButton, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export { SelectComposite as Select };
|
|
@@ -3,10 +3,11 @@ import * as React from "react";
|
|
|
3
3
|
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function SelectTrigger({ className, size, children, hasValue, onClear, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
6
|
+
declare function SelectTrigger({ className, size, children, hasValue, onClear, showClearButton, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
7
|
size?: "sm" | "default";
|
|
8
8
|
hasValue?: boolean;
|
|
9
9
|
onClear?(): void;
|
|
10
|
+
showClearButton?: boolean;
|
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export type TableProps = ComponentProps<"table">;
|
|
3
|
+
export type TableHeadProps = ComponentProps<"thead">;
|
|
4
|
+
export type TableBodyProps = ComponentProps<"tbody">;
|
|
5
|
+
export type TableRowProps = ComponentProps<"tr">;
|
|
6
|
+
export type TableHeaderCellProps = ComponentProps<"th">;
|
|
7
|
+
export type TableDataCellProps = ComponentProps<"td">;
|
|
8
|
+
export default function Table({ className, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function TableHead({ className, ...props }: TableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TableBody({ className, ...props }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function TableRow({ className, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function TableHeaderCell({ className, ...props }: TableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function TableDataCell({ className, ...props }: TableDataCellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as Table } from './Table';
|
|
3
|
+
/**
|
|
4
|
+
* Table component for displaying structured data.
|
|
5
|
+
*
|
|
6
|
+
* Subcomponents:
|
|
7
|
+
* - TableHead
|
|
8
|
+
* - TableBody
|
|
9
|
+
* - TableRow
|
|
10
|
+
* - TableHeaderCell
|
|
11
|
+
* - TableDataCell
|
|
12
|
+
*
|
|
13
|
+
* Provides a flexible and composable API for building tables.
|
|
14
|
+
*/
|
|
15
|
+
declare const meta: Meta<typeof Table>;
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof Table>;
|
|
18
|
+
/**
|
|
19
|
+
* Basic table
|
|
20
|
+
*/
|
|
21
|
+
export declare const Default: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Many rows
|
|
24
|
+
*/
|
|
25
|
+
export declare const ManyRows: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Long content (ellipsis)
|
|
28
|
+
*/
|
|
29
|
+
export declare const LongContent: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Empty state
|
|
32
|
+
*/
|
|
33
|
+
export declare const Empty: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Custom styling
|
|
36
|
+
*/
|
|
37
|
+
export declare const CustomStyling: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
declare const textVariants: (props?: ({
|
|
4
|
-
variant?: "heading" | "
|
|
4
|
+
variant?: "heading" | "description" | "subheading" | "paragraph" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
interface Props extends VariantProps<typeof textVariants> {
|
|
7
7
|
children: React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,23 @@ export * from './components/ui/badge/Badge';
|
|
|
3
3
|
export * from './components/ui/button-group/ButtonGroup';
|
|
4
4
|
export * from './components/ui/button/Button';
|
|
5
5
|
export * from './components/ui/checkbox/Checkbox';
|
|
6
|
+
export * from './components/ui/confirm-modal/ConfirmModal';
|
|
7
|
+
export * from './components/ui/data-state-renderer/DataStateRenderer';
|
|
6
8
|
export * from './components/ui/date-picker/DatePicker';
|
|
7
9
|
export * from './components/ui/field/Field';
|
|
8
10
|
export * from './components/ui/input/Input';
|
|
11
|
+
export * from './components/ui/loading-indicator/LoadingIndicator';
|
|
9
12
|
export * from './components/ui/main-wrapper/MainWrapper';
|
|
13
|
+
export * from './components/ui/modal/Modal';
|
|
14
|
+
export * from './components/ui/pagination/Pagination';
|
|
15
|
+
export * from './components/ui/prompt-modal/PromptModal';
|
|
10
16
|
export * from './components/ui/radio-group/RadioGroup';
|
|
11
17
|
export * from './components/ui/search-input/SearchInput';
|
|
12
18
|
export * from './components/ui/searchable-select/SearchableSelect';
|
|
13
19
|
export * from './components/ui/select/Select';
|
|
20
|
+
export * from './components/ui/state-indicator/StateIndicator';
|
|
21
|
+
export * from './components/ui/success-modal/SuccessModal';
|
|
14
22
|
export * from './components/ui/switch/Switch';
|
|
23
|
+
export * from './components/ui/table/Table';
|
|
15
24
|
export * from './components/ui/text/Text';
|
|
16
25
|
export * from './components/ui/textarea/Textarea';
|