@f0rbit/ui 0.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/README.md +149 -0
- package/dist/components.css +1054 -0
- package/dist/index.d.ts +217 -0
- package/dist/index.js +1137 -0
- package/dist/index.jsx +752 -0
- package/dist/reset.css +93 -0
- package/dist/server.js +794 -0
- package/dist/server.jsx +752 -0
- package/dist/styles.css +1582 -0
- package/dist/tokens.css +121 -0
- package/dist/utilities.css +298 -0
- package/package.json +84 -0
- package/src/components/Badge.tsx +38 -0
- package/src/components/Button.tsx +55 -0
- package/src/components/Card.tsx +82 -0
- package/src/components/Checkbox.tsx +50 -0
- package/src/components/Chevron.tsx +36 -0
- package/src/components/Clamp.tsx +51 -0
- package/src/components/Collapsible.tsx +39 -0
- package/src/components/Dropdown.tsx +114 -0
- package/src/components/Empty.tsx +22 -0
- package/src/components/FormField.tsx +33 -0
- package/src/components/Input.tsx +35 -0
- package/src/components/Modal.tsx +106 -0
- package/src/components/Spinner.tsx +31 -0
- package/src/components/Stat.tsx +18 -0
- package/src/components/Status.tsx +43 -0
- package/src/components/Stepper.tsx +139 -0
- package/src/components/Tabs.tsx +120 -0
- package/src/components/Timeline.tsx +66 -0
- package/src/components/Toggle.tsx +29 -0
- package/src/index.tsx +65 -0
- package/src/styles/components.css +1054 -0
- package/src/styles/reset.css +93 -0
- package/src/styles/tokens.css +121 -0
- package/src/styles/utilities.css +298 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
4
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
5
|
+
interface ButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
icon?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function Button(props: ButtonProps): JSX.Element;
|
|
13
|
+
|
|
14
|
+
type BadgeVariant = "default" | "success" | "error" | "warning" | "info" | "accent";
|
|
15
|
+
interface BadgeProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
16
|
+
variant?: BadgeVariant;
|
|
17
|
+
}
|
|
18
|
+
declare function Badge(props: BadgeProps): JSX.Element;
|
|
19
|
+
|
|
20
|
+
interface CardProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
interactive?: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface CardHeaderProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
}
|
|
25
|
+
interface CardTitleProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
|
|
26
|
+
}
|
|
27
|
+
interface CardDescriptionProps extends JSX.HTMLAttributes<HTMLParagraphElement> {
|
|
28
|
+
}
|
|
29
|
+
interface CardContentProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
}
|
|
31
|
+
interface CardFooterProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
32
|
+
}
|
|
33
|
+
declare function Card(props: CardProps): JSX.Element;
|
|
34
|
+
declare function CardHeader(props: CardHeaderProps): JSX.Element;
|
|
35
|
+
declare function CardTitle(props: CardTitleProps): JSX.Element;
|
|
36
|
+
declare function CardDescription(props: CardDescriptionProps): JSX.Element;
|
|
37
|
+
declare function CardContent(props: CardContentProps): JSX.Element;
|
|
38
|
+
declare function CardFooter(props: CardFooterProps): JSX.Element;
|
|
39
|
+
|
|
40
|
+
interface InputProps extends JSX.InputHTMLAttributes<HTMLInputElement> {
|
|
41
|
+
error?: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface TextareaProps extends JSX.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
44
|
+
error?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface SelectProps extends JSX.SelectHTMLAttributes<HTMLSelectElement> {
|
|
47
|
+
error?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare function Input(props: InputProps): JSX.Element;
|
|
50
|
+
declare function Textarea(props: TextareaProps): JSX.Element;
|
|
51
|
+
declare function Select(props: SelectProps): JSX.Element;
|
|
52
|
+
|
|
53
|
+
type StatusState = "active" | "inactive" | "error" | "pending";
|
|
54
|
+
interface StatusProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
55
|
+
state: StatusState;
|
|
56
|
+
label?: string;
|
|
57
|
+
}
|
|
58
|
+
declare function Status(props: StatusProps): JSX.Element;
|
|
59
|
+
|
|
60
|
+
type StatProps = {
|
|
61
|
+
value: string | number;
|
|
62
|
+
label: string;
|
|
63
|
+
} & Omit<JSX.HTMLAttributes<HTMLDivElement>, "children">;
|
|
64
|
+
declare function Stat(props: StatProps): JSX.Element;
|
|
65
|
+
|
|
66
|
+
type SpinnerSize = "sm" | "md" | "lg";
|
|
67
|
+
interface SpinnerProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
68
|
+
size?: SpinnerSize;
|
|
69
|
+
}
|
|
70
|
+
declare function Spinner(props: SpinnerProps): JSX.Element;
|
|
71
|
+
|
|
72
|
+
type ChevronFacing = "right" | "down";
|
|
73
|
+
interface ChevronProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
|
|
74
|
+
expanded?: boolean;
|
|
75
|
+
/** Which way the chevron points. Default: "right" */
|
|
76
|
+
facing?: ChevronFacing;
|
|
77
|
+
size?: number | string;
|
|
78
|
+
}
|
|
79
|
+
declare function Chevron(props: ChevronProps): JSX.Element;
|
|
80
|
+
|
|
81
|
+
type EmptyProps = {
|
|
82
|
+
icon?: JSX.Element;
|
|
83
|
+
title?: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
children?: JSX.Element;
|
|
86
|
+
};
|
|
87
|
+
declare function Empty(props: EmptyProps): JSX.Element;
|
|
88
|
+
|
|
89
|
+
interface ModalProps extends JSX.DialogHtmlAttributes<HTMLDialogElement> {
|
|
90
|
+
open: boolean;
|
|
91
|
+
onClose: () => void;
|
|
92
|
+
}
|
|
93
|
+
interface ModalHeaderProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
94
|
+
}
|
|
95
|
+
interface ModalTitleProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
|
|
96
|
+
}
|
|
97
|
+
interface ModalBodyProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
98
|
+
}
|
|
99
|
+
interface ModalFooterProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
100
|
+
}
|
|
101
|
+
declare function Modal(props: ModalProps): JSX.Element;
|
|
102
|
+
declare function ModalHeader(props: ModalHeaderProps): JSX.Element;
|
|
103
|
+
declare function ModalTitle(props: ModalTitleProps): JSX.Element;
|
|
104
|
+
declare function ModalBody(props: ModalBodyProps): JSX.Element;
|
|
105
|
+
declare function ModalFooter(props: ModalFooterProps): JSX.Element;
|
|
106
|
+
|
|
107
|
+
interface DropdownProps {
|
|
108
|
+
children: JSX.Element;
|
|
109
|
+
}
|
|
110
|
+
interface DropdownTriggerProps {
|
|
111
|
+
children: JSX.Element;
|
|
112
|
+
}
|
|
113
|
+
interface DropdownMenuProps {
|
|
114
|
+
children: JSX.Element;
|
|
115
|
+
}
|
|
116
|
+
interface DropdownItemProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
117
|
+
onClick?: () => void;
|
|
118
|
+
active?: boolean;
|
|
119
|
+
children: JSX.Element;
|
|
120
|
+
}
|
|
121
|
+
declare function Dropdown(props: DropdownProps): JSX.Element;
|
|
122
|
+
declare function DropdownTrigger(props: DropdownTriggerProps): JSX.Element;
|
|
123
|
+
declare function DropdownMenu(props: DropdownMenuProps): JSX.Element;
|
|
124
|
+
declare function DropdownItem(props: DropdownItemProps): JSX.Element;
|
|
125
|
+
declare function DropdownDivider(): JSX.Element;
|
|
126
|
+
|
|
127
|
+
interface ClampProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
128
|
+
lines?: number;
|
|
129
|
+
showMoreText?: string;
|
|
130
|
+
showLessText?: string;
|
|
131
|
+
}
|
|
132
|
+
declare function Clamp(props: ClampProps): JSX.Element;
|
|
133
|
+
|
|
134
|
+
interface CollapsibleProps {
|
|
135
|
+
defaultOpen?: boolean;
|
|
136
|
+
open?: boolean;
|
|
137
|
+
onOpenChange?: (open: boolean) => void;
|
|
138
|
+
children: JSX.Element;
|
|
139
|
+
trigger: JSX.Element | string;
|
|
140
|
+
}
|
|
141
|
+
declare function Collapsible(props: CollapsibleProps): JSX.Element;
|
|
142
|
+
|
|
143
|
+
type StepStatus = "completed" | "current" | "upcoming";
|
|
144
|
+
interface StepperProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
145
|
+
orientation?: "horizontal" | "vertical";
|
|
146
|
+
children: JSX.Element;
|
|
147
|
+
}
|
|
148
|
+
interface StepProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
149
|
+
title: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
icon?: JSX.Element;
|
|
152
|
+
status?: StepStatus;
|
|
153
|
+
}
|
|
154
|
+
declare function Step(props: StepProps): JSX.Element;
|
|
155
|
+
declare function Stepper(props: StepperProps): JSX.Element;
|
|
156
|
+
|
|
157
|
+
interface TabsProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
158
|
+
defaultValue?: string;
|
|
159
|
+
value?: string;
|
|
160
|
+
onValueChange?: (value: string) => void;
|
|
161
|
+
children: JSX.Element;
|
|
162
|
+
}
|
|
163
|
+
interface TabListProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
164
|
+
children: JSX.Element;
|
|
165
|
+
}
|
|
166
|
+
interface TabProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
167
|
+
value: string;
|
|
168
|
+
children: JSX.Element;
|
|
169
|
+
}
|
|
170
|
+
interface TabPanelProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
171
|
+
value: string;
|
|
172
|
+
children: JSX.Element;
|
|
173
|
+
}
|
|
174
|
+
declare function Tabs(props: TabsProps): JSX.Element;
|
|
175
|
+
declare function TabList(props: TabListProps): JSX.Element;
|
|
176
|
+
declare function Tab(props: TabProps): JSX.Element;
|
|
177
|
+
declare function TabPanel(props: TabPanelProps): JSX.Element;
|
|
178
|
+
|
|
179
|
+
interface CheckboxProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
180
|
+
label?: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
indeterminate?: boolean;
|
|
183
|
+
}
|
|
184
|
+
declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
185
|
+
|
|
186
|
+
interface ToggleProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
187
|
+
label?: string;
|
|
188
|
+
description?: string;
|
|
189
|
+
size?: "sm" | "md";
|
|
190
|
+
}
|
|
191
|
+
declare function Toggle(props: ToggleProps): JSX.Element;
|
|
192
|
+
|
|
193
|
+
interface FormFieldProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
194
|
+
label: string;
|
|
195
|
+
error?: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
required?: boolean;
|
|
198
|
+
children: JSX.Element;
|
|
199
|
+
id?: string;
|
|
200
|
+
}
|
|
201
|
+
declare function FormField(props: FormFieldProps): JSX.Element;
|
|
202
|
+
|
|
203
|
+
type TimelineItemVariant = "default" | "success" | "error" | "warning" | "info";
|
|
204
|
+
interface TimelineItem {
|
|
205
|
+
id: string | number;
|
|
206
|
+
icon?: JSX.Element;
|
|
207
|
+
title: string | JSX.Element;
|
|
208
|
+
description?: string | JSX.Element;
|
|
209
|
+
timestamp?: string | JSX.Element;
|
|
210
|
+
variant?: TimelineItemVariant;
|
|
211
|
+
}
|
|
212
|
+
interface TimelineProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
213
|
+
items: TimelineItem[];
|
|
214
|
+
}
|
|
215
|
+
declare function Timeline(props: TimelineProps): JSX.Element;
|
|
216
|
+
|
|
217
|
+
export { Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Chevron, type ChevronFacing, type ChevronProps, Clamp, type ClampProps, Collapsible, type CollapsibleProps, Dropdown, DropdownDivider, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, DropdownTrigger, type DropdownTriggerProps, Empty, type EmptyProps, FormField, type FormFieldProps, Input, type InputProps, Modal, ModalBody, ModalFooter, ModalHeader, type ModalProps, ModalTitle, Select, type SelectProps, Spinner, type SpinnerProps, type SpinnerSize, Stat, type StatProps, Status, type StatusProps, type StatusState, Step, type StepProps, type StepStatus, Stepper, type StepperProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineItemVariant, type TimelineProps, Toggle, type ToggleProps };
|