jy-headless 0.0.3 → 0.0.4
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/index.css +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.es.js +773 -588
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/buttons/BaseButton.d.ts +3 -0
- package/dist/src/components/buttons/BaseButton.stories.d.ts +10 -0
- package/dist/src/components/icons/SpinnerIcon.d.ts +3 -0
- package/dist/src/components/types.d.ts +9 -1
- package/dist/src/utils/ArrayUtils.d.ts +5 -2
- package/package.json +1 -1
- package/dist/src/components/buttons/CommonButton.d.ts +0 -6
- package/dist/src/components/buttons/CommonButton.stories.d.ts +0 -9
- package/dist/src/components/buttons/iconButton/IconButton.d.ts +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as BaseButton } from './BaseButton.tsx';
|
|
3
|
+
declare const meta: Meta<typeof BaseButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BaseButton>;
|
|
6
|
+
export declare const Common: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
8
|
+
export declare const Loading: Story;
|
|
9
|
+
export declare const SquareIcon: Story;
|
|
10
|
+
export declare const CustomClass: Story;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
1
2
|
export type Size = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type Variants = 'primary' | 'secondary' | 'tertiary';
|
|
2
4
|
export interface BaseProps {
|
|
3
|
-
additionalClass?: string;
|
|
4
5
|
size?: Size;
|
|
6
|
+
variant: Variants;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
spinColor?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseProps {
|
|
11
|
+
isCircular?: boolean;
|
|
5
12
|
}
|
|
6
13
|
export interface IconProps {
|
|
7
14
|
color?: string;
|
|
@@ -9,4 +16,5 @@ export interface IconProps {
|
|
|
9
16
|
width?: string;
|
|
10
17
|
height?: string;
|
|
11
18
|
fill?: string;
|
|
19
|
+
className?: string;
|
|
12
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { BaseProps } from '../types.ts';
|
|
3
|
-
export interface CommonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseProps {
|
|
4
|
-
}
|
|
5
|
-
declare const CommonButton: ({ children, additionalClass, className, size, ...rest }: CommonButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default CommonButton;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as CommonButton } from './CommonButton.tsx';
|
|
3
|
-
declare const meta: Meta<typeof CommonButton>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CommonButton>;
|
|
6
|
-
export declare const Common: Story;
|
|
7
|
-
export declare const Disabled: Story;
|
|
8
|
-
export declare const AdditionalClass: Story;
|
|
9
|
-
export declare const CustomClass: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare const IconButton: () => void;
|