greenole-design-system 1.1.1 → 1.1.2
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/Dropdown/Dropdown.d.ts +4 -0
- package/dist/base-components/Dropdown/Dropdown.stories.d.ts +7 -0
- package/dist/base-components/Dropdown/Dropdown.types.d.ts +20 -0
- package/dist/base-components/Dropdown/DropdownOptionItem.d.ts +10 -0
- package/dist/base-components/Dropdown/index.d.ts +2 -0
- package/dist/components/Accordion/Accordion.d.ts +4 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +6 -0
- package/dist/components/Accordion/types.d.ts +8 -0
- package/dist/components/Calendar/Calendar.d.ts +4 -0
- package/dist/components/Calendar/Calendar.stories.d.ts +9 -0
- package/dist/components/Calendar/Calendar.styles.d.ts +11 -0
- package/dist/components/Calendar/Calendar.types.d.ts +9 -0
- package/dist/components/Calendar/Calendar.utils.d.ts +10 -0
- package/dist/components/Calendar/DateRangePicker.d.ts +8 -0
- package/dist/components/Calendar/Presets.d.ts +8 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Icons/ChevronUp.d.ts +6 -0
- package/dist/components/Icons/Info.d.ts +6 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/greenole-design-system.es.js +1513 -741
- package/dist/greenole-design-system.umd.js +40 -10
- package/dist/index.d.ts +7 -1
- package/package.json +5 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Dropdown } from './';
|
|
3
|
+
declare const meta: Meta<typeof Dropdown>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Dropdown>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const DarkTheme: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
options: DropdownOption[];
|
|
4
|
+
selectedValue?: string;
|
|
5
|
+
onChange?: (selected: string) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
width?: string;
|
|
8
|
+
theme?: "light" | "dark";
|
|
9
|
+
hasSearch?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
subtitleIcon?: React.ReactNode;
|
|
14
|
+
labelSize?: "body-sm" | "body-md" | "body-lg" | "body-xl";
|
|
15
|
+
labelWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
16
|
+
}
|
|
17
|
+
export interface DropdownOption {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DropdownOption } from './Dropdown.types';
|
|
3
|
+
interface Props {
|
|
4
|
+
option: DropdownOption;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
theme: "light" | "dark";
|
|
8
|
+
}
|
|
9
|
+
declare const DropdownOptionItem: React.FC<Props>;
|
|
10
|
+
export default DropdownOptionItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Calendar } from './Calendar';
|
|
3
|
+
declare const meta: Meta<typeof Calendar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Calendar>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const CustomRange: Story;
|
|
9
|
+
export declare const InsideCard: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export declare const isSameRange: (a: {
|
|
3
|
+
start: Dayjs | null;
|
|
4
|
+
end: Dayjs | null;
|
|
5
|
+
}, b: {
|
|
6
|
+
start: Dayjs | null;
|
|
7
|
+
end: Dayjs | null;
|
|
8
|
+
}) => boolean | undefined;
|
|
9
|
+
export declare const formatDate: (date: Dayjs | null) => string;
|
|
10
|
+
export declare const getDaysOfWeek: (locale?: string) => string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-xl-bold' | 'body-xl-semibold' | 'body-xl-medium' | 'body-xl-regular' | 'body-lg-bold' | 'body-lg-semibold' | 'body-lg-medium' | 'body-lg-regular' | 'body-md-bold' | 'body-md-semibold' | 'body-md-medium' | 'body-md-regular' | 'body-sm-bold' | 'body-sm-semibold' | 'body-sm-medium' | 'body-sm-regular' | 'caption-bold' | 'caption-semibold' | 'caption-medium' | 'caption-regular';
|
|
2
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-xl-bold' | 'body-xl-semibold' | 'body-xl-medium' | 'body-xl-regular' | 'body-lg-bold' | 'body-lg-semibold' | 'body-lg-medium' | 'body-lg-regular' | 'body-md-bold' | 'body-md-semibold' | 'body-md-medium' | 'body-md-regular' | 'body-sm-bold' | 'body-sm-semibold' | 'body-sm-medium' | 'body-sm-regular' | 'caption-bold' | 'caption-semibold' | 'caption-medium' | 'caption-regular';
|
|
3
3
|
interface TypographyProps {
|
|
4
4
|
variant?: TypographyVariant;
|
|
5
5
|
children: React.ReactNode;
|