am-shared-assets 0.0.5 → 0.0.7
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/App.d.ts +2 -0
- package/dist/am-shared-assets.js +10199 -1713
- package/dist/components/Alert.d.ts +18 -0
- package/dist/components/Badge.d.ts +9 -0
- package/dist/components/Button.d.ts +14 -0
- package/dist/components/Chip.d.ts +10 -0
- package/dist/components/Input.d.ts +17 -0
- package/dist/components/Radio.d.ts +13 -0
- package/dist/components/RangeSlider.d.ts +13 -0
- package/dist/components/Select.d.ts +1 -0
- package/dist/components/Switch.d.ts +11 -0
- package/dist/components/Tooltip.d.ts +11 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/icons/components/AddIcon.d.ts +5 -0
- package/dist/icons/components/ArrowDownIcon.d.ts +5 -0
- package/dist/icons/components/ArrowRightIcon.d.ts +5 -0
- package/dist/icons/components/BagIcon.d.ts +5 -0
- package/dist/icons/components/BoxIcon.d.ts +5 -0
- package/dist/icons/components/BoxTimeIcon.d.ts +5 -0
- package/dist/icons/components/CardTickIcon.d.ts +5 -0
- package/dist/icons/components/CardsIcon.d.ts +5 -0
- package/dist/icons/components/CategoryIcon.d.ts +5 -0
- package/dist/icons/components/ChevronBottomIcon.d.ts +5 -0
- package/dist/icons/components/ChevronLeftIcon.d.ts +5 -0
- package/dist/icons/components/ChevronRightIcon.d.ts +5 -0
- package/dist/icons/components/ChevronTopIcon.d.ts +5 -0
- package/dist/icons/components/CloseCircleIcon.d.ts +5 -0
- package/dist/icons/components/CloseIcon.d.ts +5 -0
- package/dist/icons/components/DislikeIcon.d.ts +5 -0
- package/dist/icons/components/EditIcon.d.ts +5 -0
- package/dist/icons/components/HeartIcon.d.ts +5 -0
- package/dist/icons/components/HomeIcon.d.ts +5 -0
- package/dist/icons/components/InfoIcon.d.ts +5 -0
- package/dist/icons/components/LikeIcon.d.ts +5 -0
- package/dist/icons/components/MessageIcon.d.ts +5 -0
- package/dist/icons/components/MoneyIcon.d.ts +5 -0
- package/dist/icons/components/MoreIcon.d.ts +5 -0
- package/dist/icons/components/OutlineTickCircleIcon.d.ts +5 -0
- package/dist/icons/components/RotateBoxIcon.d.ts +5 -0
- package/dist/icons/components/RotateInfoIcon.d.ts +5 -0
- package/dist/icons/components/SearchIcon.d.ts +5 -0
- package/dist/icons/components/SettingIcon.d.ts +5 -0
- package/dist/icons/components/ShareIcon.d.ts +5 -0
- package/dist/icons/components/ShopIcon.d.ts +5 -0
- package/dist/icons/components/ShoppingCartIcon.d.ts +5 -0
- package/dist/icons/components/SpinnerIcon.d.ts +5 -0
- package/dist/icons/components/StarIcon.d.ts +5 -0
- package/dist/icons/components/TickCircleIcon.d.ts +5 -0
- package/dist/icons/components/TrashIcon.d.ts +5 -0
- package/dist/icons/components/TruckIcon.d.ts +5 -0
- package/dist/icons/components/UserIcon.d.ts +5 -0
- package/dist/icons/components/WalletCheckIcon.d.ts +5 -0
- package/dist/icons/components/WarningIcon.d.ts +5 -0
- package/dist/icons/index.d.ts +41 -0
- package/dist/index.d.ts +2 -0
- package/dist/main.d.ts +0 -0
- package/dist/stories/Button.stories.d.ts +75 -0
- package/dist/stories/IconGallery.stories.d.ts +13 -0
- package/dist/stories/RangeSlider.stories.d.ts +35 -0
- package/dist/stories/Select.stories.d.ts +12 -0
- package/package.json +10 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface AlertProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
5
|
+
size?: "sm" | "md";
|
|
6
|
+
width?: "default" | "full";
|
|
7
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
8
|
+
infoIconAlignment?: "start" | "center";
|
|
9
|
+
isInfoIcon?: boolean;
|
|
10
|
+
hasCloseButton?: boolean;
|
|
11
|
+
hasButton?: boolean;
|
|
12
|
+
buttonTitle?: string;
|
|
13
|
+
buttonTextColor?: "black" | "white";
|
|
14
|
+
buttonClickHandler?: () => void;
|
|
15
|
+
closeAlertHandler?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const Alert: ({ title, description, color, size, width, rounded, infoIconAlignment, isInfoIcon, hasCloseButton, hasButton, buttonTitle, buttonTextColor, buttonClickHandler, closeAlertHandler, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface IBadgeProps {
|
|
2
|
+
label: string;
|
|
3
|
+
size?: "sm" | "md" | "lg";
|
|
4
|
+
color?: "neutral" | "default" | "primary" | "danger" | "success";
|
|
5
|
+
textColor?: "white" | "black";
|
|
6
|
+
type?: "pill" | "Rectangle";
|
|
7
|
+
}
|
|
8
|
+
export declare const Badge: ({ label, color, type, size, textColor, }: IBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
variant?: "solid" | "bordered" | "light" | "flat" | "faded" | "shadow";
|
|
4
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
5
|
+
textColor?: "black" | "white";
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
8
|
+
label?: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
iconPosition?: "right" | "left";
|
|
11
|
+
width?: "full" | "auto";
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const Button: ({ variant, color, textColor, size, rounded, label, icon, iconPosition, width, onClick, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface IChipProps {
|
|
2
|
+
variant?: "solid" | "bordered" | "light" | "flat" | "faded" | "shadow" | "dot";
|
|
3
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
4
|
+
textColor?: "black" | "white";
|
|
5
|
+
size?: "sm" | "md" | "lg";
|
|
6
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Chip: ({ variant, color, textColor, label, size, rounded, }: IChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface IInputProps {
|
|
2
|
+
id: string | number;
|
|
3
|
+
label?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
placeHolder?: string;
|
|
8
|
+
variant?: "flat" | "bordered" | "faded";
|
|
9
|
+
color?: "default" | "primary" | "success" | "warning" | "danger";
|
|
10
|
+
size?: "sm" | "lg";
|
|
11
|
+
rounded?: "sm" | "full";
|
|
12
|
+
description?: string;
|
|
13
|
+
errorMsg?: string;
|
|
14
|
+
hasError?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Input: ({ id, label, required, value, onChange, placeHolder, variant, color, size, rounded, description, errorMsg, hasError, }: IInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface IRadioProps {
|
|
3
|
+
name: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
color?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral";
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Radio: ({ name, value, checked, disabled, onChange, size, color, children, }: IRadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
interface IRangeSliderProps {
|
|
3
|
+
value: number | number[];
|
|
4
|
+
setValue: Dispatch<SetStateAction<any>>;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
color?: "foreground" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
9
|
+
tooltipColor?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
10
|
+
tooltipTextColor?: "white" | "black";
|
|
11
|
+
}
|
|
12
|
+
export declare const RangeSlider: ({ value, setValue, min, max, step, color, tooltipColor, tooltipTextColor, }: IRangeSliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Select: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ISwitchProps {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
onChange: () => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
labelPosition?: "right" | "left";
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Switch: ({ enabled, onChange, label, labelPosition, size, color, disabled, }: ISwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ITooltipProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
4
|
+
textColor?: "black" | "white";
|
|
5
|
+
size?: "sm" | "md" | "lg";
|
|
6
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
7
|
+
direction?: "top" | "right" | "left" | "bottom";
|
|
8
|
+
position?: "start" | "center" | "end";
|
|
9
|
+
}
|
|
10
|
+
export declare const Tooltip: ({ label, color, textColor, size, rounded, direction, position, }: ITooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Alert } from './Alert';
|
|
2
|
+
export { Badge } from './Badge';
|
|
3
|
+
export { Button } from './Button';
|
|
4
|
+
export { Chip } from './Chip';
|
|
5
|
+
export { Input } from './Input';
|
|
6
|
+
export { Radio } from './Radio';
|
|
7
|
+
export { RangeSlider } from './RangeSlider';
|
|
8
|
+
export { Select } from './Select';
|
|
9
|
+
export { Switch } from './Switch';
|
|
10
|
+
export { Tooltip } from './Tooltip';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as CloseIcon } from './components/CloseIcon';
|
|
2
|
+
import { default as InfoIcon } from './components/InfoIcon';
|
|
3
|
+
import { default as WarningIcon } from './components/WarningIcon';
|
|
4
|
+
import { default as CloseCircleIcon } from './components/CloseCircleIcon';
|
|
5
|
+
import { default as TickCircleIcon } from './components/TickCircleIcon';
|
|
6
|
+
import { default as ShoppingCartIcon } from './components/ShoppingCartIcon';
|
|
7
|
+
import { default as SearchIcon } from './components/SearchIcon';
|
|
8
|
+
import { default as ArrowRightIcon } from './components/ArrowRightIcon';
|
|
9
|
+
import { default as ChevronLeftIcon } from './components/ChevronLeftIcon';
|
|
10
|
+
import { default as ChevronRightIcon } from './components/ChevronRightIcon';
|
|
11
|
+
import { default as ChevronTopIcon } from './components/ChevronTopIcon';
|
|
12
|
+
import { default as ShopIcon } from './components/ShopIcon';
|
|
13
|
+
import { default as StarIcon } from './components/StarIcon';
|
|
14
|
+
import { default as HeartIcon } from './components/HeartIcon';
|
|
15
|
+
import { default as ShareIcon } from './components/ShareIcon';
|
|
16
|
+
import { default as TruckIcon } from './components/TruckIcon';
|
|
17
|
+
import { default as BoxIcon } from './components/BoxIcon';
|
|
18
|
+
import { default as CardTickIcon } from './components/CardTickIcon';
|
|
19
|
+
import { default as CardsIcon } from './components/CardsIcon';
|
|
20
|
+
import { default as WalletCheckIcon } from './components/WalletCheckIcon';
|
|
21
|
+
import { default as RotateBoxIcon } from './components/RotateBoxIcon';
|
|
22
|
+
import { default as LikeIcon } from './components/LikeIcon';
|
|
23
|
+
import { default as DislikeIcon } from './components/DislikeIcon';
|
|
24
|
+
import { default as RotateInfoIcon } from './components/RotateInfoIcon';
|
|
25
|
+
import { default as ChevronBottomIcon } from './components/ChevronBottomIcon';
|
|
26
|
+
import { default as EditIcon } from './components/EditIcon';
|
|
27
|
+
import { default as SettingIcon } from './components/SettingIcon';
|
|
28
|
+
import { default as UserIcon } from './components/UserIcon';
|
|
29
|
+
import { default as BagIcon } from './components/BagIcon';
|
|
30
|
+
import { default as CategoryIcon } from './components/CategoryIcon';
|
|
31
|
+
import { default as HomeIcon } from './components/HomeIcon';
|
|
32
|
+
import { default as TrashIcon } from './components/TrashIcon';
|
|
33
|
+
import { default as MoreIcon } from './components/MoreIcon';
|
|
34
|
+
import { default as MessageIcon } from './components/MessageIcon';
|
|
35
|
+
import { default as AddIcon } from './components/AddIcon';
|
|
36
|
+
import { default as BoxTimeIcon } from './components/BoxTimeIcon';
|
|
37
|
+
import { default as MoneyIcon } from './components/MoneyIcon';
|
|
38
|
+
import { default as ArrowDownIcon } from './components/ArrowDownIcon';
|
|
39
|
+
import { default as SpinnerIcon } from './components/SpinnerIcon';
|
|
40
|
+
import { default as OutlineTickCircleIcon } from './components/OutlineTickCircleIcon';
|
|
41
|
+
export { CloseIcon, InfoIcon, WarningIcon, CloseCircleIcon, TickCircleIcon, ShoppingCartIcon, SearchIcon, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon, ChevronTopIcon, ShopIcon, StarIcon, HeartIcon, ShareIcon, TruckIcon, BoxIcon, CardTickIcon, CardsIcon, WalletCheckIcon, RotateBoxIcon, LikeIcon, DislikeIcon, RotateInfoIcon, ChevronBottomIcon, EditIcon, SettingIcon, UserIcon, BagIcon, CategoryIcon, HomeIcon, TrashIcon, MoreIcon, MessageIcon, AddIcon, BoxTimeIcon, MoneyIcon, ArrowDownIcon, SpinnerIcon, OutlineTickCircleIcon };
|
package/dist/index.d.ts
ADDED
package/dist/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import * as icons from "../icons";
|
|
3
|
+
type IconName = keyof typeof icons;
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: (args: {
|
|
7
|
+
icon?: IconName;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
iconSize?: number;
|
|
10
|
+
variant?: "solid" | "bordered" | "light" | "flat" | "faded" | "shadow";
|
|
11
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
12
|
+
textColor?: "black" | "white";
|
|
13
|
+
size?: "sm" | "md" | "lg";
|
|
14
|
+
width?: "full" | "auto";
|
|
15
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
16
|
+
iconPosition?: "right" | "left";
|
|
17
|
+
label?: string;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: string;
|
|
21
|
+
docs: {
|
|
22
|
+
source: {
|
|
23
|
+
transform: (_: any, context: any) => string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
tags: string[];
|
|
28
|
+
argTypes: {
|
|
29
|
+
variant: {
|
|
30
|
+
control: "select";
|
|
31
|
+
options: string[];
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
control: "select";
|
|
35
|
+
options: string[];
|
|
36
|
+
};
|
|
37
|
+
textColor: {
|
|
38
|
+
control: "select";
|
|
39
|
+
options: string[];
|
|
40
|
+
};
|
|
41
|
+
size: {
|
|
42
|
+
control: "select";
|
|
43
|
+
options: string[];
|
|
44
|
+
};
|
|
45
|
+
width: {
|
|
46
|
+
control: "select";
|
|
47
|
+
options: string[];
|
|
48
|
+
};
|
|
49
|
+
rounded: {
|
|
50
|
+
control: "select";
|
|
51
|
+
options: string[];
|
|
52
|
+
};
|
|
53
|
+
iconPosition: {
|
|
54
|
+
control: "select";
|
|
55
|
+
options: string[];
|
|
56
|
+
};
|
|
57
|
+
icon: {
|
|
58
|
+
control: "text";
|
|
59
|
+
};
|
|
60
|
+
iconColor: {
|
|
61
|
+
control: "color";
|
|
62
|
+
};
|
|
63
|
+
iconSize: {
|
|
64
|
+
control: {
|
|
65
|
+
type: "range";
|
|
66
|
+
min: number;
|
|
67
|
+
max: number;
|
|
68
|
+
step: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export default meta;
|
|
74
|
+
type Story = StoryObj<typeof meta>;
|
|
75
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import * as icons from "../icons";
|
|
3
|
+
type IconName = keyof typeof icons;
|
|
4
|
+
type IconProps = {
|
|
5
|
+
icon: IconName;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Icon: ({ icon, size, color }: IconProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
declare const meta: Meta<typeof Icon>;
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof Icon>;
|
|
13
|
+
export declare const Gallery: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (args: any) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
min: {
|
|
11
|
+
control: "number";
|
|
12
|
+
};
|
|
13
|
+
max: {
|
|
14
|
+
control: "number";
|
|
15
|
+
};
|
|
16
|
+
step: {
|
|
17
|
+
control: "number";
|
|
18
|
+
};
|
|
19
|
+
color: {
|
|
20
|
+
control: "select";
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
tooltipColor: {
|
|
24
|
+
control: "select";
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
tooltipTextColor: {
|
|
28
|
+
control: "select";
|
|
29
|
+
options: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Primary: Story;
|