greenole-design-system 1.1.44 → 1.1.45
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/README.md +24 -1
- package/dist/base-components/Dropdown/Dropdown.stories.d.ts +2 -0
- package/dist/base-components/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/base-components/Pills/Pills.stories.d.ts +1 -0
- package/dist/base-components/Pills/Pills.styles.d.ts +2 -0
- package/dist/base-components/Pills/Pills.types.d.ts +3 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +4 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.styles.d.ts +13 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +16 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +8 -1
- package/dist/components/Calendar/Calendar.stories.d.ts +7 -4
- package/dist/components/Calendar/Calendar.styles.d.ts +5 -2
- package/dist/components/Calendar/Calendar.types.d.ts +10 -2
- package/dist/components/Calendar/Calendar.utils.d.ts +5 -1
- package/dist/components/Calendar/DateRangePicker.d.ts +9 -2
- package/dist/components/Calendar/Presets.d.ts +2 -0
- package/dist/components/Icons/ArrowLeft.d.ts +9 -0
- package/dist/components/Icons/ChevronRight.d.ts +9 -0
- package/dist/components/Icons/Icons.d.ts +2 -0
- package/dist/components/PageHeader/PageHeader.d.ts +4 -0
- package/dist/components/PageHeader/PageHeader.stories.d.ts +14 -0
- package/dist/components/PageHeader/PageHeader.styles.d.ts +15 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts +35 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.styles.d.ts +1 -0
- package/dist/greenole-design-system.cjs.js +641 -408
- package/dist/greenole-design-system.es.js +3091 -2456
- package/dist/greenole.css +1 -19
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -96,9 +96,11 @@ To contribute to or test the library locally:
|
|
|
96
96
|
To generate the library bundle:
|
|
97
97
|
|
|
98
98
|
1. Run the build command:
|
|
99
|
+
|
|
99
100
|
```bash
|
|
100
101
|
npm run build
|
|
101
102
|
```
|
|
103
|
+
|
|
102
104
|
This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
|
|
103
105
|
|
|
104
106
|
2. To test locally in another project, use `npm link`:
|
|
@@ -109,11 +111,32 @@ To generate the library bundle:
|
|
|
109
111
|
npm link greenole-design-system
|
|
110
112
|
```
|
|
111
113
|
3. When ready to publish:
|
|
114
|
+
|
|
112
115
|
```bash
|
|
113
116
|
npm login
|
|
114
117
|
npm publish --access public
|
|
115
118
|
```
|
|
116
119
|
|
|
120
|
+
## Publishing Storybook to GitHub Pages
|
|
121
|
+
|
|
122
|
+
1. Build the Storybook:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm run build-storybook
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This generates the static files for your Storybook.
|
|
129
|
+
|
|
130
|
+
2. Deploy to GitHub Pages:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm run deploy-storybook
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This will automatically push the built files to the configured branch (`gh-pages`).
|
|
137
|
+
|
|
138
|
+
After that, you can access the updated Storybook at: [Design System](https://greenole-iot.github.io/greenole-design-system)
|
|
139
|
+
|
|
117
140
|
## Contributing
|
|
118
141
|
|
|
119
142
|
Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
|
|
@@ -121,4 +144,4 @@ Contributions are welcome! If you would like to help evolve the **Greenole Desig
|
|
|
121
144
|
1. Fork the repository.
|
|
122
145
|
2. Create a branch for your feature (`git checkout -b my-feature`).
|
|
123
146
|
3. Commit your changes.
|
|
124
|
-
4. Open a pull request for review.
|
|
147
|
+
4. Open a pull request for review.
|
|
@@ -25,6 +25,8 @@ export interface DropdownTypes {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
displayValue?: string;
|
|
27
27
|
isRequired?: boolean;
|
|
28
|
+
showClearButton?: boolean;
|
|
29
|
+
container?: HTMLElement;
|
|
28
30
|
t?: THookTypes;
|
|
29
31
|
onChange: (value: string | string[]) => void;
|
|
30
32
|
onSearch?: (searchTerm: string) => void;
|
|
@@ -2,5 +2,7 @@ import { PillsVariant } from './Pills.types';
|
|
|
2
2
|
export declare const PillsWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$variant: PillsVariant;
|
|
4
4
|
$padding?: string;
|
|
5
|
+
$background?: string;
|
|
6
|
+
$color?: string;
|
|
5
7
|
}>> & string;
|
|
6
8
|
export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypographyVariant } from '../../components/Typography/Typography';
|
|
2
|
-
export type PillsVariant =
|
|
2
|
+
export type PillsVariant = "neutral" | "success" | "danger" | "warning" | "info" | "primary";
|
|
3
3
|
export interface PillsProps {
|
|
4
4
|
label: string;
|
|
5
5
|
variant?: PillsVariant;
|
|
@@ -8,4 +8,6 @@ export interface PillsProps {
|
|
|
8
8
|
iconLeft?: React.ReactNode;
|
|
9
9
|
iconRight?: React.ReactNode;
|
|
10
10
|
className?: string;
|
|
11
|
+
background?: string;
|
|
12
|
+
color?: string;
|
|
11
13
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Breadcrumb } from './Breadcrumb';
|
|
3
|
+
declare const meta: Meta<typeof Breadcrumb>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Breadcrumb>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithIcons: Story;
|
|
8
|
+
export declare const WithHomeIcon: Story;
|
|
9
|
+
export declare const WithClickHandlers: Story;
|
|
10
|
+
export declare const WithMaxItems: Story;
|
|
11
|
+
export declare const CustomSeparator: Story;
|
|
12
|
+
export declare const LongPath: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const BreadcrumbContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
2
|
+
export declare const BreadcrumbItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$isActive: boolean;
|
|
4
|
+
$isClickable: boolean;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const BreadcrumbLink: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
|
|
7
|
+
$isActive: boolean;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const BreadcrumbButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
10
|
+
$isActive: boolean;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const BreadcrumbSeparator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
13
|
+
export declare const IconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface BreadcrumbProps {
|
|
9
|
+
items: BreadcrumbItem[];
|
|
10
|
+
separator?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
maxItems?: number;
|
|
13
|
+
showHomeIcon?: boolean;
|
|
14
|
+
homeIcon?: ReactNode;
|
|
15
|
+
onHomeClick?: () => void;
|
|
16
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from '../../base-components/Input/Input.types';
|
|
3
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
4
|
import { CalendarProps } from './Calendar.types';
|
|
3
|
-
|
|
5
|
+
interface ExtendedCalendarProps extends CalendarProps {
|
|
6
|
+
inputProps?: InputProps;
|
|
7
|
+
autoClose?: boolean;
|
|
8
|
+
t?: THookTypes;
|
|
9
|
+
}
|
|
10
|
+
export declare const Calendar: React.FC<ExtendedCalendarProps>;
|
|
4
11
|
export default Calendar;
|
|
@@ -3,7 +3,10 @@ import { Calendar } from './Calendar';
|
|
|
3
3
|
declare const meta: Meta<typeof Calendar>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Calendar>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const InlineSingle: Story;
|
|
7
|
+
export declare const InlineRange: Story;
|
|
8
|
+
export declare const AsInputSingle: Story;
|
|
9
|
+
export declare const AsInputRange: Story;
|
|
10
|
+
export declare const AsInputRangeNoAutoClose: Story;
|
|
11
|
+
export declare const AsInputWithMinMax: Story;
|
|
12
|
+
export declare const AsInputSingleWithDisabledWeekends: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const CalendarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
2
|
export declare const PresetsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
3
|
export declare const PresetButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
4
|
-
$isActive
|
|
4
|
+
$isActive?: boolean;
|
|
5
5
|
}>> & string;
|
|
6
6
|
export declare const DateRangeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
7
|
export declare const MonthContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -11,5 +11,8 @@ export declare const NavButton: import('styled-components/dist/types').IStyledCo
|
|
|
11
11
|
export declare const DaysOfWeekContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
12
|
export declare const DaysGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
13
|
export declare const DayButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
14
|
-
$
|
|
14
|
+
$isSelected?: boolean;
|
|
15
|
+
$inRange?: boolean;
|
|
16
|
+
$isStart?: boolean;
|
|
17
|
+
$isEnd?: boolean;
|
|
15
18
|
}>> & string;
|
|
@@ -4,6 +4,14 @@ export type DateRange = {
|
|
|
4
4
|
end: Dayjs | null;
|
|
5
5
|
};
|
|
6
6
|
export interface CalendarProps {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
mode?: "single" | "range";
|
|
8
|
+
selectedDate?: Dayjs | null;
|
|
9
|
+
selectedRange?: DateRange;
|
|
10
|
+
onChange: (date: Dayjs | null, range?: DateRange) => void;
|
|
11
|
+
minDate?: Dayjs;
|
|
12
|
+
maxDate?: Dayjs;
|
|
13
|
+
locale?: string;
|
|
14
|
+
inline?: boolean;
|
|
15
|
+
disabledDates?: Dayjs[];
|
|
16
|
+
showPresets?: boolean;
|
|
9
17
|
}
|
|
@@ -6,5 +6,9 @@ export declare const isSameRange: (a: {
|
|
|
6
6
|
start: Dayjs | null;
|
|
7
7
|
end: Dayjs | null;
|
|
8
8
|
}) => boolean | undefined;
|
|
9
|
-
export declare const formatDate: (date: Dayjs | null) => string;
|
|
9
|
+
export declare const formatDate: (date: Dayjs | null, locale?: string) => string;
|
|
10
|
+
export declare const formatRange: (range: {
|
|
11
|
+
start: Dayjs | null;
|
|
12
|
+
end: Dayjs | null;
|
|
13
|
+
}, locale?: string) => string;
|
|
10
14
|
export declare const getDaysOfWeek: (locale?: string) => string[];
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
import { DateRange } from './Calendar.types';
|
|
3
4
|
interface Props {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
mode: "single" | "range";
|
|
6
|
+
selectedDate?: Dayjs | null;
|
|
7
|
+
selectedRange?: DateRange;
|
|
8
|
+
onChange: (date: Dayjs | null, range?: DateRange) => void;
|
|
9
|
+
minDate?: Dayjs;
|
|
10
|
+
maxDate?: Dayjs;
|
|
11
|
+
locale: string;
|
|
12
|
+
disabledDates: Dayjs[];
|
|
6
13
|
}
|
|
7
14
|
export declare const DateRangePicker: React.FC<Props>;
|
|
8
15
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { THookTypes } from '../../utils/i18n/types';
|
|
2
3
|
import { DateRange } from './Calendar.types';
|
|
3
4
|
interface PresetsProps {
|
|
4
5
|
currentRange: DateRange;
|
|
5
6
|
onSelect: (range: DateRange) => void;
|
|
7
|
+
t?: THookTypes;
|
|
6
8
|
}
|
|
7
9
|
export declare const Presets: React.FC<PresetsProps>;
|
|
8
10
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as ArrowBack } from './ArrowBack';
|
|
2
2
|
export { default as ArrowForward } from './ArrowForward';
|
|
3
|
+
export { default as ArrowLeft } from './ArrowLeft';
|
|
3
4
|
export { default as ChevronDown } from './ChevronDown';
|
|
5
|
+
export { default as ChevronRight } from './ChevronRight';
|
|
4
6
|
export { default as Home } from './Home';
|
|
5
7
|
export { default as Checkbox } from './Checkbox';
|
|
6
8
|
export { default as DashEdit } from './DashEdit';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { PageHeader } from './PageHeader';
|
|
3
|
+
declare const meta: Meta<typeof PageHeader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof PageHeader>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithBreadcrumb: Story;
|
|
8
|
+
export declare const WithBackButton: Story;
|
|
9
|
+
export declare const WithSearch: Story;
|
|
10
|
+
export declare const WithButtons: Story;
|
|
11
|
+
export declare const WithTabs: Story;
|
|
12
|
+
export declare const Complete: Story;
|
|
13
|
+
export declare const WithCustomIcons: Story;
|
|
14
|
+
export declare const Responsive: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const PageHeaderContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
2
|
+
export declare const TopSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const MainSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const LeftContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const SubtitleWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const SearchToggleButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
7
|
+
export declare const TitleContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
export declare const BackButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
9
|
+
export declare const RightContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export declare const ButtonsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
export declare const TabsSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
export declare const TabsRightContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
export declare const TabsContentSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
export declare const SearchInputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
|
+
export declare const ResponsiveContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';
|
|
3
|
+
import { ButtonVariant } from '../../base-components/Button/Button.types';
|
|
4
|
+
export interface PageHeaderTab {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface Button {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
variant?: ButtonVariant;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface PageHeaderProps {
|
|
19
|
+
title: string;
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
breadcrumb?: BreadcrumbProps;
|
|
22
|
+
tabs?: PageHeaderTab[];
|
|
23
|
+
search?: {
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
value?: string;
|
|
26
|
+
onChange?: (value: string) => void;
|
|
27
|
+
onSearch?: (value: string) => void;
|
|
28
|
+
onToggle?: (isOpen: boolean) => void;
|
|
29
|
+
};
|
|
30
|
+
buttons?: Button[];
|
|
31
|
+
backButton?: {
|
|
32
|
+
onClick?: () => void;
|
|
33
|
+
};
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
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';
|
|
2
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle-medium' | '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;
|
|
@@ -5,6 +5,7 @@ declare const typographyVariants: {
|
|
|
5
5
|
h4: import('styled-components').RuleSet<object>;
|
|
6
6
|
h5: import('styled-components').RuleSet<object>;
|
|
7
7
|
h6: import('styled-components').RuleSet<object>;
|
|
8
|
+
'subtitle-medium': import('styled-components').RuleSet<object>;
|
|
8
9
|
'body-xl-bold': import('styled-components').RuleSet<object>;
|
|
9
10
|
'body-xl-semibold': import('styled-components').RuleSet<object>;
|
|
10
11
|
'body-xl-medium': import('styled-components').RuleSet<object>;
|