@soppiya/elementus 1.2.1 → 1.2.3
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/drovia/Drovia.d.ts +43 -0
- package/dist/components/drovia/Drovia.stories.d.ts +22 -0
- package/dist/components/drovia/index.d.ts +1 -0
- package/dist/components/input/Input.props.d.ts +2 -0
- package/dist/index.cjs.js +15 -15
- package/dist/index.es.js +1106 -1101
- package/package.json +3 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FontWeightProps, Placement, ResponsiveFontWeightProps } from '../../utils/types/types';
|
|
2
|
+
/*************************
|
|
3
|
+
* Type definition
|
|
4
|
+
*************************/
|
|
5
|
+
export type Sizes = "xs" | "sm" | "md" | "lg";
|
|
6
|
+
type Color = "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "white" | "blue";
|
|
7
|
+
type Variant = "solid" | "outline" | "fill" | "plain" | "link";
|
|
8
|
+
export type DroviaButtonType = {
|
|
9
|
+
color?: Color;
|
|
10
|
+
variant?: Variant;
|
|
11
|
+
size?: {
|
|
12
|
+
xs?: Sizes;
|
|
13
|
+
sm?: Sizes;
|
|
14
|
+
md?: Sizes;
|
|
15
|
+
lg?: Sizes;
|
|
16
|
+
} | Sizes;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
block?: boolean;
|
|
19
|
+
spinnerColor?: string;
|
|
20
|
+
weight?: ResponsiveFontWeightProps | FontWeightProps;
|
|
21
|
+
className?: string;
|
|
22
|
+
onAction?: () => void;
|
|
23
|
+
};
|
|
24
|
+
export type AlignPopover = "start" | "end";
|
|
25
|
+
type IconSizes = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
26
|
+
export interface DroviaProps {
|
|
27
|
+
icon?: string;
|
|
28
|
+
iconSize?: {
|
|
29
|
+
xs: IconSizes;
|
|
30
|
+
sm?: IconSizes;
|
|
31
|
+
md?: IconSizes;
|
|
32
|
+
lg?: IconSizes;
|
|
33
|
+
} | IconSizes;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
actionButton?: DroviaButtonType;
|
|
36
|
+
droviaClass?: string;
|
|
37
|
+
droviaAlignment?: AlignPopover;
|
|
38
|
+
droviaPlacement?: Placement;
|
|
39
|
+
portalClass?: string;
|
|
40
|
+
onActiveChange?: (active: boolean) => void;
|
|
41
|
+
}
|
|
42
|
+
declare const Drovia: ({ icon, iconSize, children, actionButton, droviaClass, droviaAlignment, droviaPlacement, portalClass, onActiveChange }: DroviaProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export default Drovia;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as Drovia } from './Drovia';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: ({ icon, iconSize, children, actionButton, droviaClass, droviaAlignment, droviaPlacement, portalClass, onActiveChange }: import('./Drovia').DroviaProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
title: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
iconSize: {
|
|
12
|
+
control: "radio";
|
|
13
|
+
};
|
|
14
|
+
actionButton: {
|
|
15
|
+
control: "radio";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof Drovia>;
|
|
22
|
+
export declare const Neutral: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Drovia } from './Drovia';
|