automoby-kit 1.0.0
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 +172 -0
- package/dist/index.cjs.js +3022 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +3006 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/types/components/Accordion/Accordion.d.ts +25 -0
- package/dist/types/components/Accordion/Accordion.stories.d.ts +174 -0
- package/dist/types/components/Backdrop/Backdrop.d.ts +20 -0
- package/dist/types/components/Backdrop/Backdrop.stories.d.ts +9 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts +176 -0
- package/dist/types/components/Button/Button.d.ts +13 -0
- package/dist/types/components/Button/Button.stories.d.ts +100 -0
- package/dist/types/components/Chips/Chips.d.ts +37 -0
- package/dist/types/components/Chips/Chips.stories.d.ts +90 -0
- package/dist/types/components/Divider/Divider.d.ts +25 -0
- package/dist/types/components/Divider/Divider.stories.d.ts +88 -0
- package/dist/types/components/Drawer/Drawer.d.ts +12 -0
- package/dist/types/components/Drawer/Drawer.stories.d.ts +115 -0
- package/dist/types/components/Input/Input.d.ts +16 -0
- package/dist/types/components/Input/Input.stories.d.ts +130 -0
- package/dist/types/components/Menu/Menu.d.ts +39 -0
- package/dist/types/components/Menu/Menu.stories.d.ts +89 -0
- package/dist/types/components/Pagination/Pagination.d.ts +8 -0
- package/dist/types/components/Pagination/Pagination.stories.d.ts +61 -0
- package/dist/types/components/ProtectedComponent.d.ts +5 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +55 -0
- package/dist/types/components/RadioGroup/RadioGroup.stories.d.ts +86 -0
- package/dist/types/components/Tabs/Tabs.d.ts +43 -0
- package/dist/types/components/Tabs/Tabs.stories.d.ts +66 -0
- package/dist/types/components/Typography/Typography.d.ts +9 -0
- package/dist/types/components/Typography/Typography.stories.d.ts +57 -0
- package/dist/types/contexts/MobileContext.d.ts +13 -0
- package/dist/types/contexts/index.d.ts +2 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/licensing/LicenseManager.d.ts +41 -0
- package/dist/types/licensing/index.d.ts +30 -0
- package/dist/types/utils/cn.d.ts +2 -0
- package/package.json +90 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AccordionProps {
|
|
3
|
+
/** The header text content */
|
|
4
|
+
title: string;
|
|
5
|
+
/** The body text content */
|
|
6
|
+
body: string;
|
|
7
|
+
/** Icon to display at the start of the header */
|
|
8
|
+
startIcon?: React.ReactNode;
|
|
9
|
+
/** Whether the accordion is expanded (controlled) */
|
|
10
|
+
isExpanded?: boolean;
|
|
11
|
+
/** Callback when the accordion state changes */
|
|
12
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
13
|
+
/** Default expanded state (uncontrolled) */
|
|
14
|
+
defaultExpanded?: boolean;
|
|
15
|
+
/** Additional CSS classes for the root element */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Unique identifier for the accordion */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** Whether the accordion is disabled */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Force mobile mode (optional, for testing/storybook) */
|
|
22
|
+
forceMobile?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { Accordion };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type AccordionProps } from './Accordion';
|
|
2
|
+
type StoryArgs = AccordionProps & {
|
|
3
|
+
startIconType?: 'none' | 'number' | 'user' | 'help' | 'settings' | 'info';
|
|
4
|
+
};
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
argTypes: {
|
|
16
|
+
title: {
|
|
17
|
+
name: string;
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
body: {
|
|
23
|
+
name: string;
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
startIconType: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
defaultExpanded: {
|
|
36
|
+
name: string;
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
name: string;
|
|
43
|
+
control: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
forceMobile: {
|
|
48
|
+
name: string;
|
|
49
|
+
control: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
startIcon: {
|
|
54
|
+
table: {
|
|
55
|
+
disable: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
isExpanded: {
|
|
59
|
+
table: {
|
|
60
|
+
disable: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
onToggle: {
|
|
64
|
+
table: {
|
|
65
|
+
disable: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
71
|
+
export declare const Default: {
|
|
72
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
storyName: string;
|
|
74
|
+
args: {
|
|
75
|
+
title: string;
|
|
76
|
+
body: string;
|
|
77
|
+
startIconType: string;
|
|
78
|
+
defaultExpanded: boolean;
|
|
79
|
+
disabled: boolean;
|
|
80
|
+
forceMobile: boolean;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export declare const Mobile: {
|
|
84
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
storyName: string;
|
|
86
|
+
args: {
|
|
87
|
+
title: string;
|
|
88
|
+
body: string;
|
|
89
|
+
startIconType: string;
|
|
90
|
+
defaultExpanded: boolean;
|
|
91
|
+
disabled: boolean;
|
|
92
|
+
forceMobile: boolean;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export declare const Desktop: {
|
|
96
|
+
({ startIconType, ...args }: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
storyName: string;
|
|
98
|
+
args: {
|
|
99
|
+
defaultExpanded: boolean;
|
|
100
|
+
title: string;
|
|
101
|
+
body: string;
|
|
102
|
+
startIconType: string;
|
|
103
|
+
disabled: boolean;
|
|
104
|
+
forceMobile: boolean;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export declare const ExpandedByDefault: {
|
|
108
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
storyName: string;
|
|
110
|
+
args: {
|
|
111
|
+
defaultExpanded: boolean;
|
|
112
|
+
title: string;
|
|
113
|
+
body: string;
|
|
114
|
+
startIconType: string;
|
|
115
|
+
disabled: boolean;
|
|
116
|
+
forceMobile: boolean;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export declare const Disabled: {
|
|
120
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
121
|
+
storyName: string;
|
|
122
|
+
args: {
|
|
123
|
+
disabled: boolean;
|
|
124
|
+
title: string;
|
|
125
|
+
body: string;
|
|
126
|
+
startIconType: string;
|
|
127
|
+
defaultExpanded: boolean;
|
|
128
|
+
forceMobile: boolean;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare const WithDifferentIcons: {
|
|
132
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
storyName: string;
|
|
134
|
+
args: {
|
|
135
|
+
body: string;
|
|
136
|
+
title: string;
|
|
137
|
+
startIconType: string;
|
|
138
|
+
defaultExpanded: boolean;
|
|
139
|
+
disabled: boolean;
|
|
140
|
+
forceMobile: boolean;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export declare const MultipleAccordions: {
|
|
144
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
storyName: string;
|
|
146
|
+
};
|
|
147
|
+
export declare const MobileFAQ: {
|
|
148
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
storyName: string;
|
|
150
|
+
};
|
|
151
|
+
export declare const Controlled: {
|
|
152
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
153
|
+
storyName: string;
|
|
154
|
+
args: {
|
|
155
|
+
title: string;
|
|
156
|
+
body: string;
|
|
157
|
+
startIconType: string;
|
|
158
|
+
defaultExpanded: boolean;
|
|
159
|
+
disabled: boolean;
|
|
160
|
+
forceMobile: boolean;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export declare const LongContent: {
|
|
164
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
165
|
+
storyName: string;
|
|
166
|
+
args: {
|
|
167
|
+
title: string;
|
|
168
|
+
body: string;
|
|
169
|
+
startIconType: string;
|
|
170
|
+
defaultExpanded: boolean;
|
|
171
|
+
disabled: boolean;
|
|
172
|
+
forceMobile: boolean;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BackdropProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the backdrop is visible
|
|
5
|
+
*/
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Callback function when backdrop is clicked
|
|
9
|
+
*/
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show a blur effect
|
|
13
|
+
*/
|
|
14
|
+
blur?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Custom z-index (defaults to z-51 which is drawer z-index + 1)
|
|
17
|
+
*/
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const Backdrop: React.ForwardRefExoticComponent<BackdropProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Backdrop } from './Backdrop';
|
|
3
|
+
declare const meta: Meta<typeof Backdrop>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const Interactive: Story;
|
|
8
|
+
export declare const WithBlur: Story;
|
|
9
|
+
export declare const WithContent: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface BreadcrumbProps {
|
|
8
|
+
items: BreadcrumbItem[];
|
|
9
|
+
className?: string;
|
|
10
|
+
testIsMobile?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
export { Breadcrumb };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { BreadcrumbProps } from './Breadcrumb';
|
|
2
|
+
type StoryArgs = BreadcrumbProps;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
items: {
|
|
15
|
+
name: string;
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
className: {
|
|
22
|
+
name: string;
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
testIsMobile: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
args: {
|
|
37
|
+
items: ({
|
|
38
|
+
label: string;
|
|
39
|
+
href: string;
|
|
40
|
+
onClick: () => void;
|
|
41
|
+
} | {
|
|
42
|
+
label: string;
|
|
43
|
+
href?: undefined;
|
|
44
|
+
onClick?: undefined;
|
|
45
|
+
})[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
49
|
+
export declare const Default: {
|
|
50
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
storyName: string;
|
|
52
|
+
args: {
|
|
53
|
+
items: ({
|
|
54
|
+
label: string;
|
|
55
|
+
href: string;
|
|
56
|
+
onClick: () => void;
|
|
57
|
+
} | {
|
|
58
|
+
label: string;
|
|
59
|
+
href?: undefined;
|
|
60
|
+
onClick?: undefined;
|
|
61
|
+
})[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const ShortBreadcrumb: {
|
|
65
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
storyName: string;
|
|
67
|
+
args: {
|
|
68
|
+
items: ({
|
|
69
|
+
label: string;
|
|
70
|
+
href: string;
|
|
71
|
+
onClick: () => void;
|
|
72
|
+
} | {
|
|
73
|
+
label: string;
|
|
74
|
+
href?: undefined;
|
|
75
|
+
onClick?: undefined;
|
|
76
|
+
})[];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const LongBreadcrumb: {
|
|
80
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
storyName: string;
|
|
82
|
+
args: {
|
|
83
|
+
items: ({
|
|
84
|
+
label: string;
|
|
85
|
+
href: string;
|
|
86
|
+
onClick: () => void;
|
|
87
|
+
} | {
|
|
88
|
+
label: string;
|
|
89
|
+
href?: undefined;
|
|
90
|
+
onClick?: undefined;
|
|
91
|
+
})[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const WithClickHandlers: {
|
|
95
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
storyName: string;
|
|
97
|
+
args: {
|
|
98
|
+
items: ({
|
|
99
|
+
label: string;
|
|
100
|
+
onClick: () => void;
|
|
101
|
+
} | {
|
|
102
|
+
label: string;
|
|
103
|
+
onClick?: undefined;
|
|
104
|
+
})[];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export declare const WithMixedNavigation: {
|
|
108
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
storyName: string;
|
|
110
|
+
args: {
|
|
111
|
+
items: ({
|
|
112
|
+
label: string;
|
|
113
|
+
href: string;
|
|
114
|
+
onClick?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
label: string;
|
|
117
|
+
onClick: () => void;
|
|
118
|
+
href?: undefined;
|
|
119
|
+
} | {
|
|
120
|
+
label: string;
|
|
121
|
+
href: string;
|
|
122
|
+
onClick: () => void;
|
|
123
|
+
} | {
|
|
124
|
+
label: string;
|
|
125
|
+
href?: undefined;
|
|
126
|
+
onClick?: undefined;
|
|
127
|
+
})[];
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export declare const EnglishContent: {
|
|
131
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
132
|
+
storyName: string;
|
|
133
|
+
args: {
|
|
134
|
+
items: ({
|
|
135
|
+
label: string;
|
|
136
|
+
href: string;
|
|
137
|
+
onClick: () => void;
|
|
138
|
+
} | {
|
|
139
|
+
label: string;
|
|
140
|
+
href?: undefined;
|
|
141
|
+
onClick?: undefined;
|
|
142
|
+
})[];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export declare const DesktopView: {
|
|
146
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
147
|
+
storyName: string;
|
|
148
|
+
args: {
|
|
149
|
+
testIsMobile: boolean;
|
|
150
|
+
items: ({
|
|
151
|
+
label: string;
|
|
152
|
+
onClick: () => void;
|
|
153
|
+
} | {
|
|
154
|
+
label: string;
|
|
155
|
+
onClick?: undefined;
|
|
156
|
+
})[];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const MobileView: {
|
|
160
|
+
(args: StoryArgs): import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
storyName: string;
|
|
162
|
+
args: {
|
|
163
|
+
testIsMobile: boolean;
|
|
164
|
+
items: ({
|
|
165
|
+
label: string;
|
|
166
|
+
onClick: () => void;
|
|
167
|
+
} | {
|
|
168
|
+
label: string;
|
|
169
|
+
onClick?: undefined;
|
|
170
|
+
})[];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
export declare const ResponsiveComparison: {
|
|
174
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
175
|
+
storyName: string;
|
|
176
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyVariant } from '../Typography/Typography';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
4
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
textVariant?: TypographyVariant;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
iconPosition?: 'left' | 'right';
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<import("@/components/Button/Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
name: string;
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
options: string[];
|
|
18
|
+
defaultValue: string;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
name: string;
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
options: string[];
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
};
|
|
28
|
+
textVariant: {
|
|
29
|
+
name: string;
|
|
30
|
+
control: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
name: string;
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
defaultValue: boolean;
|
|
41
|
+
};
|
|
42
|
+
loading: {
|
|
43
|
+
name: string;
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
defaultValue: boolean;
|
|
48
|
+
};
|
|
49
|
+
iconPosition: {
|
|
50
|
+
name: string;
|
|
51
|
+
control: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
options: string[];
|
|
55
|
+
defaultValue: string;
|
|
56
|
+
};
|
|
57
|
+
children: {
|
|
58
|
+
name: string;
|
|
59
|
+
control: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
defaultValue: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
67
|
+
type StoryProps = {
|
|
68
|
+
variant: 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
69
|
+
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
loading: boolean;
|
|
72
|
+
children: string;
|
|
73
|
+
};
|
|
74
|
+
export declare const Playground: {
|
|
75
|
+
(args: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
storyName: string;
|
|
77
|
+
args: {
|
|
78
|
+
variant: string;
|
|
79
|
+
size: string;
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
loading: boolean;
|
|
82
|
+
children: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const AllVariantsAndSizes: {
|
|
86
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
storyName: string;
|
|
88
|
+
};
|
|
89
|
+
export declare const WithIcon: {
|
|
90
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
storyName: string;
|
|
92
|
+
};
|
|
93
|
+
export declare const DisabledStates: {
|
|
94
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
storyName: string;
|
|
96
|
+
};
|
|
97
|
+
export declare const WithCustomTypography: {
|
|
98
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
storyName: string;
|
|
100
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChipsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The variant/color of the chip
|
|
5
|
+
*/
|
|
6
|
+
variant?: 'purple' | 'red' | 'green' | 'orange' | 'blue' | 'white' | 'disabled';
|
|
7
|
+
/**
|
|
8
|
+
* Size of the chip - affects padding and font size. If not provided, automatically detected from MobileContext
|
|
9
|
+
*/
|
|
10
|
+
size?: 'mobile' | 'desktop';
|
|
11
|
+
/**
|
|
12
|
+
* Text content of the chip
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the chip is disabled
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Click handler for the chip
|
|
21
|
+
*/
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Click handler for the X icon/close button
|
|
25
|
+
*/
|
|
26
|
+
onIconClick?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Custom class name
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Override mobile detection
|
|
33
|
+
*/
|
|
34
|
+
isMobile?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare const Chips: React.ForwardRefExoticComponent<ChipsProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export default Chips;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.ForwardRefExoticComponent<import("@/components/Chips/Chips").ChipsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
name: string;
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
options: string[];
|
|
19
|
+
defaultValue: string;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
name: string;
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
options: string[];
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
};
|
|
29
|
+
isMobile: {
|
|
30
|
+
name: string;
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
defaultValue: boolean;
|
|
35
|
+
};
|
|
36
|
+
disabled: {
|
|
37
|
+
name: string;
|
|
38
|
+
control: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
defaultValue: boolean;
|
|
42
|
+
};
|
|
43
|
+
children: {
|
|
44
|
+
name: string;
|
|
45
|
+
control: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
defaultValue: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
53
|
+
type StoryProps = {
|
|
54
|
+
variant: 'purple' | 'red' | 'green' | 'orange' | 'blue' | 'white';
|
|
55
|
+
size: 'mobile' | 'desktop';
|
|
56
|
+
isMobile: boolean;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
children: string;
|
|
59
|
+
};
|
|
60
|
+
export declare const Playground: {
|
|
61
|
+
(args: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
storyName: string;
|
|
63
|
+
args: {
|
|
64
|
+
variant: string;
|
|
65
|
+
size: string;
|
|
66
|
+
isMobile: boolean;
|
|
67
|
+
disabled: boolean;
|
|
68
|
+
children: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export declare const AllVariants: {
|
|
72
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
storyName: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const AutoResponsive: {
|
|
76
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
storyName: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const DisabledStates: {
|
|
80
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
storyName: string;
|
|
82
|
+
};
|
|
83
|
+
export declare const InteractiveExample: {
|
|
84
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
storyName: string;
|
|
86
|
+
};
|
|
87
|
+
export declare const ResponsiveComparison: {
|
|
88
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
storyName: string;
|
|
90
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Width of the divider
|
|
5
|
+
* @default "100%"
|
|
6
|
+
*/
|
|
7
|
+
width?: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* Height (thickness) of the divider
|
|
10
|
+
* @default 1
|
|
11
|
+
*/
|
|
12
|
+
height?: string | number;
|
|
13
|
+
/**
|
|
14
|
+
* Orientation of the divider
|
|
15
|
+
* @default "horizontal"
|
|
16
|
+
*/
|
|
17
|
+
orientation?: 'horizontal' | 'vertical';
|
|
18
|
+
/**
|
|
19
|
+
* Color variant of the divider
|
|
20
|
+
* @default "neutral-light"
|
|
21
|
+
*/
|
|
22
|
+
variant?: 'neutral-light' | 'neutral-main' | 'primary';
|
|
23
|
+
}
|
|
24
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { Divider };
|