@lctafrica/ui 0.1.0 → 0.2.0
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/Label/Label.d.ts +4 -0
- package/dist/components/ui/ModalFooter.d.ts +7 -0
- package/dist/components/ui/autosuggest-input/AutoSuggestInput.d.ts +10 -0
- package/dist/components/ui/autosuggest-input/AutoSuggestInput.stories.d.ts +25 -0
- package/dist/components/ui/badge/Badge.d.ts +19 -0
- package/dist/components/ui/badge/Badge.stories.d.ts +10 -0
- package/dist/components/ui/badge/Badge.test.d.ts +1 -0
- package/dist/components/ui/button/Button.d.ts +11 -0
- package/dist/components/ui/button/Button.stories.d.ts +18 -0
- package/dist/components/ui/button/Button.test.d.ts +1 -0
- package/dist/components/ui/button-group/ButtonGroup.d.ts +24 -0
- package/dist/components/ui/button-group/ButtonGroup.stories.d.ts +10 -0
- package/dist/components/ui/button-group/ButtonGroup.test.d.ts +1 -0
- package/dist/components/ui/calendar.d.ts +10 -0
- package/dist/components/ui/checkbox/Checkbox.d.ts +15 -0
- package/dist/components/ui/checkbox/Checkbox.stories.d.ts +333 -0
- package/dist/components/ui/checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/ui/confirm-modal/ConfirmModal.d.ts +4 -0
- package/dist/components/ui/confirm-modal/ConfirmModal.stories.d.ts +25 -0
- package/dist/components/ui/data-state-renderer/DataStateRendere.stories.d.ts +102 -0
- package/dist/components/ui/data-state-renderer/DataStateRenderer.d.ts +19 -0
- package/dist/components/ui/date-picker/DatePicker.d.ts +7 -0
- package/dist/components/ui/date-picker/DatePicker.stories.d.ts +30 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/field/Field.d.ts +24 -0
- package/dist/components/ui/field/Field.stories.d.ts +10 -0
- package/dist/components/ui/field/Filed.test.d.ts +1 -0
- package/dist/components/ui/input/Input.d.ts +6 -0
- package/dist/components/ui/input/Input.stories.d.ts +13 -0
- package/dist/components/ui/input/Input.test.d.ts +1 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/loading-indicator/LoadingIndicator.d.ts +6 -0
- package/dist/components/ui/loading-indicator/LoadingIndicator.stories.d.ts +6 -0
- package/dist/components/ui/loading-indicator/loading-animation/LoadingAnimation.d.ts +16 -0
- package/dist/components/ui/main-wrapper/MainWrapper.d.ts +2 -0
- package/dist/components/ui/main-wrapper/MainWrapper.stories.d.ts +19 -0
- package/dist/components/ui/modal/Modal.d.ts +11 -0
- package/dist/components/ui/modal/Modal.stories.d.ts +29 -0
- 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/popover.d.ts +10 -0
- package/dist/components/ui/prompt-modal/PromptModal.d.ts +8 -0
- package/dist/components/ui/prompt-modal/PromptModal.stories.d.ts +29 -0
- package/dist/components/ui/radio-group/RadioGroup.d.ts +7 -0
- package/dist/components/ui/radio-group/RadioGroup.stories.d.ts +13 -0
- package/dist/components/ui/radio-group/RadioGroup.test.d.ts +1 -0
- package/dist/components/ui/search-input/SearchInput.d.ts +9 -0
- package/dist/components/ui/search-input/SearchInput.stories.d.ts +6 -0
- package/dist/components/ui/searchable-select/SearchableSelect.d.ts +16 -0
- package/dist/components/ui/searchable-select/SearchableSelect.stories.d.ts +25 -0
- package/dist/components/ui/select/Select.d.ts +17 -0
- package/dist/components/ui/select/Select.stories.d.ts +6 -0
- package/dist/components/ui/select/select-components.d.ts +18 -0
- package/dist/components/ui/separator/separator.d.ts +4 -0
- package/dist/components/ui/state-indicator/StateIndicator.d.ts +22 -0
- package/dist/components/ui/state-indicator/StateIndicator.stories.d.ts +33 -0
- package/dist/components/ui/success-modal/SuccessAnimation.d.ts +1 -0
- package/dist/components/ui/success-modal/SuccessModal.d.ts +12 -0
- package/dist/components/ui/success-modal/SuccessModal.stories.d.ts +37 -0
- package/dist/components/ui/success-modal/SuccessTickIcon.d.ts +6 -0
- package/dist/components/ui/switch/Switch.d.ts +6 -0
- package/dist/components/ui/switch/Switch.stories.d.ts +37 -0
- 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 +11 -0
- package/dist/components/ui/text/Text.stories.d.ts +9 -0
- package/dist/components/ui/text/Text.test.d.ts +1 -0
- package/dist/components/ui/textarea/Textarea.d.ts +3 -0
- package/dist/components/ui/textarea/Textarea.stories.d.ts +29 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +25746 -0
- package/dist/lct-logo.svg +3 -0
- package/dist/lib/utils.d.ts +2 -0
- package/package.json +4 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as StateIndicator } from './StateIndicator';
|
|
3
|
+
declare const meta: Meta<typeof StateIndicator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StateIndicator>;
|
|
6
|
+
/**
|
|
7
|
+
* Default state (no illustration)
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Empty state (shows illustration + fallback title)
|
|
12
|
+
*/
|
|
13
|
+
export declare const EmptyState: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Error state (shows illustration + fallback title)
|
|
16
|
+
*/
|
|
17
|
+
export declare const ErrorState: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Custom title override
|
|
20
|
+
*/
|
|
21
|
+
export declare const CustomTitle: Story;
|
|
22
|
+
/**
|
|
23
|
+
* With action button
|
|
24
|
+
*/
|
|
25
|
+
export declare const WithAction: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Default variant with action
|
|
28
|
+
*/
|
|
29
|
+
export declare const DefaultWithAction: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Long content
|
|
32
|
+
*/
|
|
33
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SuccessAnimation(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type SuccessModalProps = {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
shouldShowCloseButton?: boolean | undefined;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
autoCloseDelay?: number;
|
|
10
|
+
};
|
|
11
|
+
export default function SuccessModal({ onClose, isOpen, title, description, shouldShowCloseButton, children, autoCloseDelay, }: SuccessModalProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as SuccessModal } from './SuccessModal';
|
|
3
|
+
declare const meta: Meta<typeof SuccessModal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SuccessModal>;
|
|
6
|
+
/**
|
|
7
|
+
* Default
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* With close button
|
|
12
|
+
*/
|
|
13
|
+
export declare const WithCloseButton: Story;
|
|
14
|
+
/**
|
|
15
|
+
* With auto close (NEW)
|
|
16
|
+
*/
|
|
17
|
+
export declare const AutoClose: Story;
|
|
18
|
+
/**
|
|
19
|
+
* With actions (children)
|
|
20
|
+
*/
|
|
21
|
+
export declare const WithActions: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Without description
|
|
24
|
+
*/
|
|
25
|
+
export declare const WithoutDescription: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Without title
|
|
28
|
+
*/
|
|
29
|
+
export declare const WithoutTitle: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Animation only
|
|
32
|
+
*/
|
|
33
|
+
export declare const AnimationOnly: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Long content
|
|
36
|
+
*/
|
|
37
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Switch as SwitchPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Switch({ className, size, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Switch } from './Switch';
|
|
3
|
+
declare const meta: Meta<typeof Switch>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Switch>;
|
|
6
|
+
/**
|
|
7
|
+
* Default switch (unchecked)
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Checked state
|
|
12
|
+
*/
|
|
13
|
+
export declare const Checked: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Small size
|
|
16
|
+
*/
|
|
17
|
+
export declare const Small: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Disabled switch
|
|
20
|
+
*/
|
|
21
|
+
export declare const Disabled: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Disabled & checked
|
|
24
|
+
*/
|
|
25
|
+
export declare const DisabledChecked: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Controlled example
|
|
28
|
+
*/
|
|
29
|
+
export declare const Controlled: Story;
|
|
30
|
+
/**
|
|
31
|
+
* With label
|
|
32
|
+
*/
|
|
33
|
+
export declare const WithLabel: Story;
|
|
34
|
+
/**
|
|
35
|
+
* All sizes preview
|
|
36
|
+
*/
|
|
37
|
+
export declare const AllSizes: Story;
|
|
@@ -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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
variant?: "heading" | "description" | "subheading" | "paragraph" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface Props extends VariantProps<typeof textVariants> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Text({ children, className, variant }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Text } from './Text';
|
|
3
|
+
declare const meta: Meta<typeof Text>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Text>;
|
|
6
|
+
export declare const Heading: Story;
|
|
7
|
+
export declare const Subheading: Story;
|
|
8
|
+
export declare const paragraph: Story;
|
|
9
|
+
export declare const Description: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Textarea } from './Textarea';
|
|
3
|
+
declare const meta: Meta<typeof Textarea>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Textarea>;
|
|
6
|
+
/**
|
|
7
|
+
* Default textarea
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* With predefined value
|
|
12
|
+
*/
|
|
13
|
+
export declare const WithValue: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Disabled state
|
|
16
|
+
*/
|
|
17
|
+
export declare const Disabled: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Invalid state (aria-invalid)
|
|
20
|
+
*/
|
|
21
|
+
export declare const Invalid: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Controlled example
|
|
24
|
+
*/
|
|
25
|
+
export declare const Controlled: Story;
|
|
26
|
+
/**
|
|
27
|
+
* With custom height
|
|
28
|
+
*/
|
|
29
|
+
export declare const CustomHeight: Story;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './components/ui/autosuggest-input/AutoSuggestInput';
|
|
2
|
+
export * from './components/ui/badge/Badge';
|
|
3
|
+
export * from './components/ui/button-group/ButtonGroup';
|
|
4
|
+
export * from './components/ui/button/Button';
|
|
5
|
+
export * from './components/ui/checkbox/Checkbox';
|
|
6
|
+
export * from './components/ui/confirm-modal/ConfirmModal';
|
|
7
|
+
export * from './components/ui/data-state-renderer/DataStateRenderer';
|
|
8
|
+
export * from './components/ui/date-picker/DatePicker';
|
|
9
|
+
export * from './components/ui/field/Field';
|
|
10
|
+
export * from './components/ui/input/Input';
|
|
11
|
+
export * from './components/ui/loading-indicator/LoadingIndicator';
|
|
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';
|
|
16
|
+
export * from './components/ui/radio-group/RadioGroup';
|
|
17
|
+
export * from './components/ui/search-input/SearchInput';
|
|
18
|
+
export * from './components/ui/searchable-select/SearchableSelect';
|
|
19
|
+
export * from './components/ui/select/Select';
|
|
20
|
+
export * from './components/ui/state-indicator/StateIndicator';
|
|
21
|
+
export * from './components/ui/success-modal/SuccessModal';
|
|
22
|
+
export * from './components/ui/switch/Switch';
|
|
23
|
+
export * from './components/ui/table/Table';
|
|
24
|
+
export * from './components/ui/text/Text';
|
|
25
|
+
export * from './components/ui/textarea/Textarea';
|