greenole-design-system 1.1.9 → 1.1.11
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/base-components/Avatar/Avatar.d.ts +4 -0
- package/dist/base-components/Avatar/Avatar.stories.d.ts +10 -0
- package/dist/base-components/Avatar/Avatar.types.d.ts +12 -0
- package/dist/base-components/Pills/Pills.d.ts +4 -0
- package/dist/base-components/Pills/Pills.stories.d.ts +15 -0
- package/dist/base-components/Pills/Pills.types.d.ts +11 -0
- package/dist/base-components/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/base-components/ProgressBar/ProgressBar.stories.d.ts +9 -0
- package/dist/base-components/ProgressBar/ProgressBar.types.d.ts +19 -0
- package/dist/base-components/Space/Space.d.ts +4 -0
- package/dist/base-components/Space/Space.stories.d.ts +9 -0
- package/dist/base-components/Space/Space.types.d.ts +9 -0
- package/dist/base-components/TextField/TextField.d.ts +4 -0
- package/dist/base-components/TextField/TextField.stories.d.ts +8 -0
- package/dist/base-components/TextField/TextField.types.d.ts +27 -0
- package/dist/base-components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/base-components/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/base-components/Tooltip/Tooltip.types.d.ts +13 -0
- package/dist/components/Icons/Avatar.d.ts +6 -0
- package/dist/greenole-design-system.cjs.js +16 -16
- package/dist/greenole-design-system.es.js +1388 -955
- package/dist/greenole.css +364 -0
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Avatar } from './Avatar';
|
|
3
|
+
declare const avatarMeta: Meta<typeof Avatar>;
|
|
4
|
+
export default avatarMeta;
|
|
5
|
+
type Story = StoryObj<typeof Avatar>;
|
|
6
|
+
export declare const WithTextFallback: Story;
|
|
7
|
+
export declare const WithIconOnly: Story;
|
|
8
|
+
export declare const TransparentBackground: Story;
|
|
9
|
+
export declare const WithStarIcon: Story;
|
|
10
|
+
export declare const ImageExample: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
export declare const avatarSizes: Record<AvatarSize, string>;
|
|
3
|
+
export interface AvatarProps {
|
|
4
|
+
src?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
shape?: 'circle' | 'rounded';
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
fallbackText?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
bgColor?: 'bg-[var(--neutral-soft)]' | 'bg-[var(--neutral-medium)]' | 'bg-[var(--brandcolor-softest)]' | 'bg-[var(--green-500)]' | 'bg-[var(--red-500)]' | 'bg-[var(--blue-400)]' | 'bg-transparent';
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Pills } from './Pills';
|
|
3
|
+
declare const meta: Meta<typeof Pills>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pills>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Success: Story;
|
|
9
|
+
export declare const Danger: Story;
|
|
10
|
+
export declare const Warning: Story;
|
|
11
|
+
export declare const Infor: Story;
|
|
12
|
+
export declare const Neutral: Story;
|
|
13
|
+
export declare const WithIcons: Story;
|
|
14
|
+
export declare const CustomTypography: Story;
|
|
15
|
+
export declare const CustomPadding: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TypographyVariant } from '../../components/Typography/Typography';
|
|
2
|
+
export type PillsVariant = 'neutral' | 'success' | 'danger' | 'warning' | 'info' | 'primary';
|
|
3
|
+
export interface PillsProps {
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: PillsVariant;
|
|
6
|
+
typography?: TypographyVariant;
|
|
7
|
+
padding?: string;
|
|
8
|
+
iconLeft?: React.ReactNode;
|
|
9
|
+
iconRight?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as ProgressBar } from './ProgressBar';
|
|
3
|
+
declare const meta: Meta<typeof ProgressBar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ProgressBar>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const PercentProgress: Story;
|
|
8
|
+
export declare const CustomColorHex: Story;
|
|
9
|
+
export declare const WithoutText: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ProgressBarType = "percent" | "file";
|
|
2
|
+
export type ProgressBarHeight = "sm" | "md" | "lg";
|
|
3
|
+
export interface ProgressBarProps {
|
|
4
|
+
type?: ProgressBarType;
|
|
5
|
+
value: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
height?: ProgressBarHeight;
|
|
8
|
+
color?: keyof typeof colorMap | string;
|
|
9
|
+
showText?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const progressHeights: Record<ProgressBarHeight, string>;
|
|
13
|
+
export declare const colorMap: {
|
|
14
|
+
brand: string;
|
|
15
|
+
green: string;
|
|
16
|
+
red: string;
|
|
17
|
+
blue: string;
|
|
18
|
+
neutral: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Space } from './Space';
|
|
3
|
+
declare const meta: Meta<typeof Space>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Space>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const AllSpacings: Story;
|
|
8
|
+
export declare const CustomColorHex: Story;
|
|
9
|
+
export declare const CustomWidth: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type SpaceHeight = "spacing-1" | "spacing-2" | "spacing-4" | "spacing-8" | "spacing-12" | "spacing-16" | "spacing-24" | "spacing-32" | "spacing-40" | "spacing-48" | "spacing-56" | "spacing-64" | "spacing-72" | "spacing-80" | "spacing-104";
|
|
2
|
+
export declare const spaceHeights: Record<SpaceHeight, string>;
|
|
3
|
+
export interface SpaceProps {
|
|
4
|
+
height?: SpaceHeight;
|
|
5
|
+
color?: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as TextField } from './TextField';
|
|
3
|
+
declare const meta: Meta<typeof TextField>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof TextField>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const ValidationExamples: Story;
|
|
8
|
+
export declare const States: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TypographyVariant } from '../../components/Typography/Typography';
|
|
2
|
+
export type TextFieldTheme = "light" | "dark";
|
|
3
|
+
export type ValidationType = "text" | "email" | "number" | "password" | "tel" | "url";
|
|
4
|
+
export type InputType = React.HTMLInputTypeAttribute;
|
|
5
|
+
export interface TextFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
+
label?: string;
|
|
7
|
+
labelSize?: TypographyVariant;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
subtitleIcon?: React.ReactNode;
|
|
10
|
+
error?: string;
|
|
11
|
+
valid?: boolean;
|
|
12
|
+
iconLeft?: React.ReactNode;
|
|
13
|
+
iconRight?: React.ReactNode;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
theme?: TextFieldTheme;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
validationType?: ValidationType;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
minLength?: number;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
pattern?: string;
|
|
24
|
+
validateOnBlur?: boolean;
|
|
25
|
+
onValidation?: (isValid: boolean) => void;
|
|
26
|
+
type?: InputType;
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TypographyVariant } from '../../components/Typography/Typography';
|
|
2
|
+
export type TooltipPosition = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export type TooltipTheme = "light" | "dark";
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
text: string;
|
|
7
|
+
position?: TooltipPosition;
|
|
8
|
+
variant?: TypographyVariant;
|
|
9
|
+
bgColor?: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
darkMode?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|