akku-kit 1.0.0-alpha.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/assets/images/ImagePaths.d.ts +5 -0
- package/dist/assets/images/arrowRightBlack-9e202c8a68eabcc8.png +0 -0
- package/dist/assets/images/nodata-04bb1c9b346f46fd.png +0 -0
- package/dist/components/Badge/Badge.d.ts +8 -0
- package/dist/components/Badge/Badge.stories.d.ts +19 -0
- package/dist/components/Badge/Badge.types.d.ts +50 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.stories.d.ts +9 -0
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/ButtonV1/Button.types.d.ts +18 -0
- package/dist/components/ButtonV1/ButtonV1.d.ts +3 -0
- package/dist/components/ButtonV1/ButtonV1.stories.d.ts +12 -0
- package/dist/components/ButtonV1/index.d.ts +1 -0
- package/dist/components/Charts/donut-chart/DonutChart.d.ts +16 -0
- package/dist/components/Charts/donut-chart/DonutChart.stories.d.ts +10 -0
- package/dist/components/Charts/donut-chart/index.d.ts +1 -0
- package/dist/components/Charts/spiral-chart/SpiralChart.d.ts +13 -0
- package/dist/components/Charts/spiral-chart/SpiralChart.stories.d.ts +10 -0
- package/dist/components/Charts/spiral-chart/index.d.ts +1 -0
- package/dist/components/Form/CheckboxField/CheckboxField.d.ts +4 -0
- package/dist/components/Form/CheckboxField/CheckboxField.stories.d.ts +14 -0
- package/dist/components/Form/CheckboxField/CheckboxField.types.d.ts +14 -0
- package/dist/components/Form/CheckboxField/index.d.ts +2 -0
- package/dist/components/Form/EmailField/EmailField.d.ts +4 -0
- package/dist/components/Form/EmailField/EmailField.stories.d.ts +10 -0
- package/dist/components/Form/EmailField/EmailField.types.d.ts +16 -0
- package/dist/components/Form/EmailField/index.d.ts +2 -0
- package/dist/components/Form/MultiSelectField/MultiSelect.stories.d.ts +11 -0
- package/dist/components/Form/MultiSelectField/MultiSelectField.d.ts +4 -0
- package/dist/components/Form/MultiSelectField/MultiSelectField.types.d.ts +26 -0
- package/dist/components/Form/MultiSelectField/index.d.ts +2 -0
- package/dist/components/Form/NumberField/NumberField.d.ts +4 -0
- package/dist/components/Form/NumberField/NumberField.stories.d.ts +12 -0
- package/dist/components/Form/NumberField/NumberField.types.d.ts +28 -0
- package/dist/components/Form/NumberField/index.d.ts +2 -0
- package/dist/components/Form/PhoneField/PhoneField.d.ts +4 -0
- package/dist/components/Form/PhoneField/PhoneField.stories.d.ts +12 -0
- package/dist/components/Form/PhoneField/PhoneField.types.d.ts +17 -0
- package/dist/components/Form/PhoneField/helper.d.ts +10 -0
- package/dist/components/Form/PhoneField/index.d.ts +2 -0
- package/dist/components/Form/RadioGroupField/RadioGroupField.d.ts +4 -0
- package/dist/components/Form/RadioGroupField/RadioGroupField.stories.d.ts +8 -0
- package/dist/components/Form/RadioGroupField/RadioGroupField.types.d.ts +13 -0
- package/dist/components/Form/RadioGroupField/index.d.ts +2 -0
- package/dist/components/Form/Search/Search.d.ts +4 -0
- package/dist/components/Form/Search/Search.stories.d.ts +10 -0
- package/dist/components/Form/Search/Search.types.d.ts +12 -0
- package/dist/components/Form/Search/index.d.ts +2 -0
- package/dist/components/Form/SwitchButtonField/SwitchButtonField.d.ts +4 -0
- package/dist/components/Form/SwitchButtonField/SwitchButtonField.stories.d.ts +13 -0
- package/dist/components/Form/SwitchButtonField/SwitchButtonField.types.d.ts +14 -0
- package/dist/components/Form/SwitchButtonField/index.d.ts +2 -0
- package/dist/components/Form/TextAreaField/TextAreaField.d.ts +4 -0
- package/dist/components/Form/TextAreaField/TextAreaField.stories.d.ts +11 -0
- package/dist/components/Form/TextAreaField/TextAreaField.types.d.ts +27 -0
- package/dist/components/Form/TextAreaField/index.d.ts +2 -0
- package/dist/components/Form/TextField/TextField.d.ts +4 -0
- package/dist/components/Form/TextField/TextField.stories.d.ts +11 -0
- package/dist/components/Form/TextField/TextField.types.d.ts +17 -0
- package/dist/components/Form/TextField/index.d.ts +2 -0
- package/dist/components/Form/URLField/URLField.d.ts +4 -0
- package/dist/components/Form/URLField/URLField.stories.d.ts +9 -0
- package/dist/components/Form/URLField/URLField.types.d.ts +22 -0
- package/dist/components/Form/URLField/index.d.ts +2 -0
- package/dist/components/Form/index.d.ts +19 -0
- package/dist/components/Input.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Modal/Modal.stories.d.ts +12 -0
- package/dist/components/Modal/Modal.types.d.ts +56 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +52 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +12 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +8 -0
- package/dist/components/Table/components/TableBody.d.ts +8 -0
- package/dist/components/Table/components/TableFooter.d.ts +8 -0
- package/dist/components/Table/components/TableHeader.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +8 -0
- package/dist/components/Typography/Display/Display.d.ts +4 -0
- package/dist/components/Typography/Display/Display.stories.d.ts +50 -0
- package/dist/components/Typography/Display/Display.types.d.ts +13 -0
- package/dist/components/Typography/Display/index.d.ts +2 -0
- package/dist/components/Typography/Text/Text.d.ts +4 -0
- package/dist/components/Typography/Text/Text.stories.d.ts +62 -0
- package/dist/components/Typography/Text/Text.types.d.ts +13 -0
- package/dist/components/Typography/Text/index.d.ts +2 -0
- package/dist/index.cjs.js +49 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.esm.js +48 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/storybook/Button.d.ts +15 -0
- package/dist/storybook/Button.stories.d.ts +23 -0
- package/dist/storybook/Header.d.ts +12 -0
- package/dist/storybook/Header.stories.d.ts +18 -0
- package/dist/storybook/Page.d.ts +3 -0
- package/dist/storybook/Page.stories.d.ts +12 -0
- package/dist/styles.css +1 -0
- package/dist/utils/ui/cn.d.ts +1 -0
- package/package.json +72 -0
Binary file
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { BadgeProps } from './Badge.types';
|
3
|
+
/**
|
4
|
+
* A versatile Badge component for displaying small, informative labels.
|
5
|
+
* It supports different visual variants and sizes.
|
6
|
+
*/
|
7
|
+
declare const Badge: React.FC<BadgeProps>;
|
8
|
+
export default Badge;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react';
|
2
|
+
import Badge from './Badge';
|
3
|
+
import { BadgeProps } from './Badge.types';
|
4
|
+
declare const meta: Meta<typeof Badge>;
|
5
|
+
export default meta;
|
6
|
+
export declare const Primary: StoryFn<BadgeProps>;
|
7
|
+
export declare const Secondary: StoryFn<BadgeProps>;
|
8
|
+
export declare const Danger: StoryFn<BadgeProps>;
|
9
|
+
export declare const Success: StoryFn<BadgeProps>;
|
10
|
+
export declare const Warning: StoryFn<BadgeProps>;
|
11
|
+
export declare const InfoBadge: StoryFn<BadgeProps>;
|
12
|
+
export declare const Small: StoryFn<BadgeProps>;
|
13
|
+
export declare const Large: StoryFn<BadgeProps>;
|
14
|
+
export declare const CustomColors: StoryFn<BadgeProps>;
|
15
|
+
export declare const WithPrefixIcon: StoryFn<BadgeProps>;
|
16
|
+
export declare const WithPostfixIcon: StoryFn<BadgeProps>;
|
17
|
+
export declare const WithBothIcons: StoryFn<BadgeProps>;
|
18
|
+
export declare const CustomColorWithIcons: StoryFn<BadgeProps>;
|
19
|
+
export declare const MultipleBadgesWithOverflow: StoryFn<BadgeProps>;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
/**
|
3
|
+
* Defines the props for the Badge component.
|
4
|
+
*/
|
5
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
6
|
+
/**
|
7
|
+
* The content to be displayed inside the badge.
|
8
|
+
*/
|
9
|
+
children: React.ReactNode;
|
10
|
+
/**
|
11
|
+
* Defines the visual style of the badge.
|
12
|
+
* 'primary': Default blue-ish style (like 'Developers' in your image).
|
13
|
+
* 'secondary': Light purple style (like 'Everyone' in your image).
|
14
|
+
* 'danger': Light red style (like 'Admin' in your image).
|
15
|
+
* 'success': Green-ish style for positive indicators.
|
16
|
+
* 'warning': Yellow-ish style for warnings.
|
17
|
+
* 'info': Cyan-ish style for informational badges.
|
18
|
+
*/
|
19
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'info';
|
20
|
+
/**
|
21
|
+
* Defines the size of the badge.
|
22
|
+
* 'sm': Small size.
|
23
|
+
* 'md': Medium size (default).
|
24
|
+
* 'lg': Large size.
|
25
|
+
*/
|
26
|
+
size?: 'sm' | 'md' | 'lg';
|
27
|
+
/**
|
28
|
+
* Custom text color for the badge. Overrides variant text color.
|
29
|
+
* Should be a Tailwind CSS class (e.g., 'text-red-500').
|
30
|
+
*/
|
31
|
+
textColor?: string;
|
32
|
+
/**
|
33
|
+
* Custom background color for the badge. Overrides variant background color.
|
34
|
+
* Should be a Tailwind CSS class (e.g., 'bg-red-100').
|
35
|
+
*/
|
36
|
+
backgroundColor?: string;
|
37
|
+
/**
|
38
|
+
* Custom border color for the badge. Overrides variant border color.
|
39
|
+
* Should be a Tailwind CSS class (e.g., 'border-red-300').
|
40
|
+
*/
|
41
|
+
borderColor?: string;
|
42
|
+
/**
|
43
|
+
* An icon or element to display before the children.
|
44
|
+
*/
|
45
|
+
prefixIcon?: React.ReactNode;
|
46
|
+
/**
|
47
|
+
* An icon or element to display after the children.
|
48
|
+
*/
|
49
|
+
postfixIcon?: React.ReactNode;
|
50
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import Button from "./Button";
|
3
|
+
declare const meta: Meta<typeof Button>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof Button>;
|
6
|
+
export declare const Primary: Story;
|
7
|
+
export declare const Secondary: Story;
|
8
|
+
export declare const Danger: Story;
|
9
|
+
export declare const Disabled: Story;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
2
|
+
type Variant = "text" | "contained" | "outlined";
|
3
|
+
type Color = "primary" | "secondary" | "success" | "error";
|
4
|
+
type Size = "small" | "medium" | "large";
|
5
|
+
type LoadingPosition = "start" | "end" | "center";
|
6
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
7
|
+
children?: ReactNode;
|
8
|
+
variant?: Variant;
|
9
|
+
color?: Color;
|
10
|
+
size?: Size;
|
11
|
+
fullWidth?: boolean;
|
12
|
+
startIcon?: ReactNode;
|
13
|
+
endIcon?: ReactNode;
|
14
|
+
loading?: boolean;
|
15
|
+
loadingIndicator?: ReactNode | string;
|
16
|
+
loadingPosition?: LoadingPosition;
|
17
|
+
}
|
18
|
+
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { ButtonProps } from "./Button.types";
|
2
|
+
declare const ButtonV1: ({ children, variant, color, size, fullWidth, startIcon, endIcon, loading, loadingIndicator, loadingPosition, disabled, className, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
export default ButtonV1;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import ButtonV1 from "./ButtonV1";
|
3
|
+
declare const meta: Meta<typeof ButtonV1>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof ButtonV1>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Variants: Story;
|
8
|
+
export declare const Colors: Story;
|
9
|
+
export declare const Sizes: Story;
|
10
|
+
export declare const WithIcons: Story;
|
11
|
+
export declare const LoadingStates: Story;
|
12
|
+
export declare const Disabled: Story;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./ButtonV1";
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from "react";
|
2
|
+
interface DonutChartProps {
|
3
|
+
active: number;
|
4
|
+
inactive: number;
|
5
|
+
activeColor: string;
|
6
|
+
inActiveColor?: string;
|
7
|
+
size?: number;
|
8
|
+
thickness?: number;
|
9
|
+
totalCount: number;
|
10
|
+
toolTipLabel: {
|
11
|
+
active: string;
|
12
|
+
inActive: string;
|
13
|
+
};
|
14
|
+
}
|
15
|
+
declare const DonutChart: React.FC<DonutChartProps>;
|
16
|
+
export default DonutChart;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import DonutChart from "./DonutChart";
|
3
|
+
declare const meta: Meta<typeof DonutChart>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof DonutChart>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const CustomSize: Story;
|
8
|
+
export declare const HighProgress: Story;
|
9
|
+
export declare const CustomTooltips: Story;
|
10
|
+
export declare const EmptyChart: Story;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./DonutChart";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type Ring = {
|
2
|
+
radius: number;
|
3
|
+
stroke: string;
|
4
|
+
strokeWidth: number;
|
5
|
+
percentage: number;
|
6
|
+
label: string;
|
7
|
+
};
|
8
|
+
interface ThreatDetectionChartProps {
|
9
|
+
data: Ring[];
|
10
|
+
chartSize: number;
|
11
|
+
}
|
12
|
+
declare const SpiralChart: ({ data, chartSize }: ThreatDetectionChartProps) => import("react/jsx-runtime").JSX.Element;
|
13
|
+
export default SpiralChart;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import SpiralChart from "./SpiralChart";
|
3
|
+
declare const meta: Meta<typeof SpiralChart>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof SpiralChart>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const ThickStrokes: Story;
|
8
|
+
export declare const MultipleRings: Story;
|
9
|
+
export declare const VaryingStrokes: Story;
|
10
|
+
export declare const LowPercentages: Story;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./SpiralChart";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import CheckboxField from "./CheckboxField";
|
3
|
+
declare const meta: Meta<typeof CheckboxField>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof CheckboxField>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Checked: Story;
|
8
|
+
export declare const DisabledChecked: Story;
|
9
|
+
export declare const DisabledUnchecked: Story;
|
10
|
+
export declare const WithError: Story;
|
11
|
+
export declare const LabelTop: Story;
|
12
|
+
export declare const LabelBottom: Story;
|
13
|
+
export declare const Sizes: Story;
|
14
|
+
export declare const Colors: Story;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface CheckboxFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
3
|
+
id: string;
|
4
|
+
label: string;
|
5
|
+
required?: boolean;
|
6
|
+
error?: string;
|
7
|
+
disabled?: boolean;
|
8
|
+
color?: "primary" | "secondary" | "success" | "error";
|
9
|
+
labelPosition?: "top" | "bottom" | "right";
|
10
|
+
className?: string;
|
11
|
+
form?: any;
|
12
|
+
field?: any;
|
13
|
+
size?: any;
|
14
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import EmailField from "./EmailField";
|
3
|
+
import type { EmailFieldProps } from "./EmailField.types";
|
4
|
+
declare const meta: Meta<typeof EmailField>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<EmailFieldProps>;
|
7
|
+
export declare const Default: Story;
|
8
|
+
export declare const Required: Story;
|
9
|
+
export declare const WithError: Story;
|
10
|
+
export declare const Disabled: Story;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface EmailFieldProps {
|
3
|
+
id: string;
|
4
|
+
name: string;
|
5
|
+
label: string;
|
6
|
+
value: string;
|
7
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
8
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
9
|
+
placeholder?: string;
|
10
|
+
error?: string;
|
11
|
+
required?: boolean;
|
12
|
+
disabled?: boolean;
|
13
|
+
touched?: boolean;
|
14
|
+
className?: string;
|
15
|
+
[key: string]: any;
|
16
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import MultiSelectField from "./MultiSelectField";
|
3
|
+
import type { MultiSelectFieldProps } from "./MultiSelectField.types";
|
4
|
+
declare const meta: Meta<typeof MultiSelectField>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<MultiSelectFieldProps>;
|
7
|
+
export declare const Default: Story;
|
8
|
+
export declare const WithPreselected: any;
|
9
|
+
export declare const WithError: Story;
|
10
|
+
export declare const Required: Story;
|
11
|
+
export declare const Disabled: any;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export interface MultiSelectFieldOption {
|
2
|
+
label: string;
|
3
|
+
value: string;
|
4
|
+
}
|
5
|
+
export interface MultiSelectFieldProps {
|
6
|
+
id?: string;
|
7
|
+
name?: string;
|
8
|
+
label?: string;
|
9
|
+
options: MultiSelectFieldOption[];
|
10
|
+
className?: string;
|
11
|
+
placeholder?: string;
|
12
|
+
required?: boolean;
|
13
|
+
disabled?: boolean;
|
14
|
+
error?: string;
|
15
|
+
value?: string[];
|
16
|
+
onChange?: (value: string[]) => void;
|
17
|
+
field?: {
|
18
|
+
name: string;
|
19
|
+
value: string[];
|
20
|
+
onBlur: () => void;
|
21
|
+
};
|
22
|
+
form?: {
|
23
|
+
values: Record<string, any>;
|
24
|
+
setFieldValue: (name: string, value: any) => void;
|
25
|
+
};
|
26
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import NumberField from "./NumberField";
|
3
|
+
import type { NumberFieldProps } from "./NumberField.types";
|
4
|
+
declare const meta: Meta<typeof NumberField>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<NumberFieldProps>;
|
7
|
+
export declare const Default: Story;
|
8
|
+
export declare const WithMaxLength: Story;
|
9
|
+
export declare const WithError: Story;
|
10
|
+
export declare const Disabled: Story;
|
11
|
+
export declare const AllowScrollFalse: Story;
|
12
|
+
export declare const AllowScrollTrue: Story;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface NumberFieldProps {
|
3
|
+
id: string;
|
4
|
+
name: string;
|
5
|
+
label: string;
|
6
|
+
value: number | string;
|
7
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
8
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
9
|
+
placeholder?: string;
|
10
|
+
error?: string;
|
11
|
+
required?: boolean;
|
12
|
+
touched?: boolean;
|
13
|
+
disabled?: boolean;
|
14
|
+
step?: number;
|
15
|
+
className?: string;
|
16
|
+
maxLength?: number;
|
17
|
+
allowScroll?: boolean;
|
18
|
+
field?: any;
|
19
|
+
form?: {
|
20
|
+
errors?: {
|
21
|
+
[key: string]: any;
|
22
|
+
};
|
23
|
+
touched?: {
|
24
|
+
[key: string]: boolean;
|
25
|
+
};
|
26
|
+
setFieldValue?: (field: string, value: any, shouldValidate?: boolean) => void;
|
27
|
+
};
|
28
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import PhoneField from "./PhoneField";
|
3
|
+
declare const meta: Meta<typeof PhoneField>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof PhoneField>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Autocomplete: Story;
|
8
|
+
export declare const WithError: Story;
|
9
|
+
export declare const Disabled: Story;
|
10
|
+
export declare const RequiredField: Story;
|
11
|
+
export declare const WithPlaceholder: Story;
|
12
|
+
export declare const WithLabelAndError: Story;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface PhoneFieldProps {
|
3
|
+
id: string;
|
4
|
+
name: string;
|
5
|
+
label: string;
|
6
|
+
value: string;
|
7
|
+
className?: string;
|
8
|
+
countryCode?: string;
|
9
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
10
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
11
|
+
placeholder?: string;
|
12
|
+
error?: string;
|
13
|
+
required?: boolean;
|
14
|
+
disabled?: boolean;
|
15
|
+
touched?: boolean;
|
16
|
+
[key: string]: any;
|
17
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { RadioGroupFieldProps } from "./RadioGroupField.types";
|
2
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, RadioGroupFieldProps>;
|
3
|
+
export default _default;
|
4
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, Partial<RadioGroupFieldProps>>;
|
5
|
+
export declare const WithError: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, Partial<RadioGroupFieldProps>>;
|
6
|
+
export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, Partial<RadioGroupFieldProps>>;
|
7
|
+
export declare const ColumnLayout: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, Partial<RadioGroupFieldProps>>;
|
8
|
+
export declare const Required: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, Partial<RadioGroupFieldProps>>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface RadioGroupFieldProps {
|
2
|
+
label: string;
|
3
|
+
position?: "row" | "column";
|
4
|
+
required?: boolean;
|
5
|
+
disabled?: boolean;
|
6
|
+
size?: "small" | "medium" | "large";
|
7
|
+
color?: "primary" | "secondary";
|
8
|
+
options: [{
|
9
|
+
label: string;
|
10
|
+
value: string;
|
11
|
+
}];
|
12
|
+
[key: string]: any;
|
13
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import Search from "./Search";
|
3
|
+
declare const meta: Meta<typeof Search>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof Search>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const WithInitialValue: Story;
|
8
|
+
export declare const WithoutShortcut: Story;
|
9
|
+
export declare const Disabled: Story;
|
10
|
+
export declare const AutoFocus: Story;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface SearchProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
3
|
+
placeholder?: string;
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
5
|
+
value?: string;
|
6
|
+
id?: string;
|
7
|
+
name?: string;
|
8
|
+
className?: string;
|
9
|
+
disabled?: boolean;
|
10
|
+
autoFocus?: boolean;
|
11
|
+
showShortcut?: boolean;
|
12
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import SwitchButtonField from "./SwitchButtonField";
|
3
|
+
declare const meta: Meta<typeof SwitchButtonField>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof SwitchButtonField>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Checked: Story;
|
8
|
+
export declare const Disabled: Story;
|
9
|
+
export declare const WithError: Story;
|
10
|
+
export declare const LabelPositions: Story;
|
11
|
+
export declare const RequiredField: Story;
|
12
|
+
export declare const AllColors: Story;
|
13
|
+
export declare const AllSizes: Story;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface ToggleButtonFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
3
|
+
id: string;
|
4
|
+
label: string;
|
5
|
+
required?: boolean;
|
6
|
+
error?: string;
|
7
|
+
disabled?: boolean;
|
8
|
+
color?: "primary" | "secondary" | "success" | "error";
|
9
|
+
labelPosition?: "top" | "bottom" | "right";
|
10
|
+
className?: string;
|
11
|
+
form?: any;
|
12
|
+
field?: any;
|
13
|
+
size?: any;
|
14
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
2
|
+
import TextAreaField from "./TextAreaField";
|
3
|
+
import type { TextAreaFieldProps } from "./TextAreaField.types";
|
4
|
+
declare const meta: Meta<typeof TextAreaField>;
|
5
|
+
export default meta;
|
6
|
+
type Story = StoryObj<TextAreaFieldProps>;
|
7
|
+
export declare const Default: Story;
|
8
|
+
export declare const WithError: Story;
|
9
|
+
export declare const Required: Story;
|
10
|
+
export declare const Disabled: Story;
|
11
|
+
export declare const MaxLength: Story;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface TextAreaFieldProps {
|
3
|
+
id: string;
|
4
|
+
name: string;
|
5
|
+
label: string;
|
6
|
+
value: string;
|
7
|
+
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
8
|
+
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
9
|
+
placeholder?: string;
|
10
|
+
rows?: number;
|
11
|
+
error?: string;
|
12
|
+
required?: boolean;
|
13
|
+
disabled?: boolean;
|
14
|
+
className?: string;
|
15
|
+
width?: string;
|
16
|
+
maxLength?: number;
|
17
|
+
field?: any;
|
18
|
+
form?: {
|
19
|
+
errors?: {
|
20
|
+
[key: string]: any;
|
21
|
+
};
|
22
|
+
touched?: {
|
23
|
+
[key: string]: boolean;
|
24
|
+
};
|
25
|
+
setFieldValue?: (field: string, value: any, shouldValidate?: boolean) => void;
|
26
|
+
};
|
27
|
+
}
|