southpaw 0.2.7
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 +51 -0
- package/api/client.ts +83 -0
- package/api/helpers/fs.ts +98 -0
- package/api/helpers/stream.ts +6 -0
- package/api/index.ts +50 -0
- package/api/server.ts +566 -0
- package/constants/fonts.ts +1583 -0
- package/constants/icons.ts +2124 -0
- package/constants/langs.ts +2592 -0
- package/constants/ssr-loading.tsx +17 -0
- package/contexts/dev.tsx +124 -0
- package/hooks/useDebounceCb.ts +21 -0
- package/modules/app.tsx +102 -0
- package/modules/behaviors.ts +161 -0
- package/modules/component.tsx +483 -0
- package/modules/config/index.ts +8 -0
- package/modules/database.ts +25 -0
- package/modules/document.tsx +23 -0
- package/modules/error.tsx +16 -0
- package/modules/page/autozoom.tsx +92 -0
- package/modules/page/browser.tsx +166 -0
- package/modules/page/index.tsx +327 -0
- package/modules/page/insert-modal.tsx +225 -0
- package/modules/page/inspect/index.tsx +237 -0
- package/modules/page/inspect/wrapper.tsx +88 -0
- package/modules/page/knobs/action.tsx +58 -0
- package/modules/page/knobs/color.tsx +78 -0
- package/modules/page/knobs/helpers.ts +71 -0
- package/modules/page/knobs/icon.tsx +85 -0
- package/modules/page/knobs/linker.tsx +188 -0
- package/modules/page/knobs/list-json.tsx +149 -0
- package/modules/page/knobs/list-text.tsx +129 -0
- package/modules/page/knobs/number.tsx +84 -0
- package/modules/page/knobs/segmented.tsx +81 -0
- package/modules/page/knobs/select.tsx +89 -0
- package/modules/page/knobs/size.tsx +106 -0
- package/modules/page/knobs/switch.tsx +75 -0
- package/modules/page/knobs/text.tsx +93 -0
- package/modules/page/left-tabs.tsx +36 -0
- package/modules/page/right-tabs.tsx +31 -0
- package/modules/page/seo.tsx +69 -0
- package/modules/page/tree.tsx +860 -0
- package/modules/state.ts +787 -0
- package/modules/store.ts +37 -0
- package/modules/theme.ts +105 -0
- package/modules/translations.ts +15 -0
- package/package.json +68 -0
- package/scripts/bin.js +607 -0
- package/scripts/test.js +145 -0
- package/themes/base.tsx +8962 -0
- package/themes/index.ts +4 -0
- package/themes/m2.ts +39 -0
- package/themes/newspaper.ts +39 -0
- package/types/api.ts +57 -0
- package/types/fiber_node.ts +69 -0
- package/types/react_element.ts +14 -0
- package/ui/accordion.tsx +70 -0
- package/ui/actionicon.tsx +41 -0
- package/ui/affix.tsx +14 -0
- package/ui/alert.tsx +37 -0
- package/ui/anchor.tsx +52 -0
- package/ui/arrow.tsx +116 -0
- package/ui/aspectratio.tsx +21 -0
- package/ui/autocomplete.tsx +34 -0
- package/ui/avatar.tsx +36 -0
- package/ui/backgroundimage.tsx +16 -0
- package/ui/badge.tsx +28 -0
- package/ui/blockquote.tsx +15 -0
- package/ui/blocks/faq.tsx +145 -0
- package/ui/blocks/features.tsx +167 -0
- package/ui/blocks/footer.tsx +182 -0
- package/ui/blocks/herobanner.tsx +391 -0
- package/ui/blocks/index.ts +44 -0
- package/ui/blocks/leftnav.tsx +141 -0
- package/ui/blocks/pricing.tsx +210 -0
- package/ui/blocks/testimonials.tsx +149 -0
- package/ui/blocks/uidocs.tsx +1429 -0
- package/ui/box.tsx +27 -0
- package/ui/breadcrumbs.tsx +33 -0
- package/ui/burger.tsx +23 -0
- package/ui/button.tsx +85 -0
- package/ui/card.tsx +28 -0
- package/ui/center.tsx +26 -0
- package/ui/checkbox.tsx +35 -0
- package/ui/chip.tsx +32 -0
- package/ui/closebutton.tsx +15 -0
- package/ui/code.tsx +104 -0
- package/ui/collapse.tsx +16 -0
- package/ui/colorinput.tsx +32 -0
- package/ui/colorpicker.tsx +26 -0
- package/ui/colorswatch.tsx +17 -0
- package/ui/combobox.tsx +80 -0
- package/ui/container.tsx +27 -0
- package/ui/dialog.tsx +15 -0
- package/ui/divider.tsx +58 -0
- package/ui/drawer.tsx +28 -0
- package/ui/fieldset.tsx +15 -0
- package/ui/filebutton.tsx +23 -0
- package/ui/fileinput.tsx +36 -0
- package/ui/flex.tsx +139 -0
- package/ui/focustrap.tsx +15 -0
- package/ui/form.tsx +26 -0
- package/ui/grid.tsx +69 -0
- package/ui/highlight.tsx +15 -0
- package/ui/hoverable.tsx +66 -0
- package/ui/hovercard.tsx +45 -0
- package/ui/icon.tsx +76 -0
- package/ui/image.tsx +32 -0
- package/ui/index.ts +1355 -0
- package/ui/indicator.tsx +42 -0
- package/ui/infobox.tsx +200 -0
- package/ui/input.tsx +18 -0
- package/ui/inviewport.tsx +23 -0
- package/ui/jsoninput.tsx +35 -0
- package/ui/kbd.tsx +20 -0
- package/ui/list.tsx +33 -0
- package/ui/loader.tsx +26 -0
- package/ui/loadingoverlay.tsx +22 -0
- package/ui/mark.tsx +15 -0
- package/ui/menu.tsx +89 -0
- package/ui/modal.tsx +27 -0
- package/ui/multiselect.tsx +42 -0
- package/ui/nativeselect.tsx +17 -0
- package/ui/navlink.tsx +40 -0
- package/ui/notification.tsx +25 -0
- package/ui/numberformatter.tsx +15 -0
- package/ui/numberinput.tsx +37 -0
- package/ui/overlay.tsx +15 -0
- package/ui/pagination.tsx +21 -0
- package/ui/paper.tsx +33 -0
- package/ui/passwordinput.tsx +36 -0
- package/ui/pill.tsx +17 -0
- package/ui/pillsinput.tsx +37 -0
- package/ui/pininput.tsx +30 -0
- package/ui/popover.tsx +43 -0
- package/ui/portal.tsx +15 -0
- package/ui/progress.tsx +49 -0
- package/ui/props.ts +91 -0
- package/ui/propsDef.ts +38 -0
- package/ui/radio.tsx +30 -0
- package/ui/rating.tsx +25 -0
- package/ui/ringprogress.tsx +17 -0
- package/ui/scrollarea.tsx +27 -0
- package/ui/segmentedcontrol.tsx +38 -0
- package/ui/select.tsx +43 -0
- package/ui/simplegrid.tsx +23 -0
- package/ui/skeleton.tsx +15 -0
- package/ui/slider.tsx +31 -0
- package/ui/space.tsx +19 -0
- package/ui/spoiler.tsx +23 -0
- package/ui/stepper.tsx +63 -0
- package/ui/switch.tsx +29 -0
- package/ui/table.tsx +93 -0
- package/ui/tabs.tsx +80 -0
- package/ui/tagsinput.tsx +19 -0
- package/ui/terminal.tsx +44 -0
- package/ui/text.tsx +168 -0
- package/ui/textarea.tsx +36 -0
- package/ui/textinput.tsx +34 -0
- package/ui/timeline.tsx +30 -0
- package/ui/title.tsx +42 -0
- package/ui/tooltip.tsx +32 -0
- package/ui/transition.tsx +21 -0
- package/ui/tree.tsx +42 -0
- package/ui/typographystylesprovider.tsx +20 -0
- package/ui/unstyledbutton.tsx +18 -0
- package/ui/video.tsx +16 -0
- package/ui/visuallyhidden.tsx +15 -0
- package/utils/index.ts +76 -0
package/ui/index.ts
ADDED
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
import dynamic from "next/dynamic";
|
|
2
|
+
import { loading } from "../constants/ssr-loading";
|
|
3
|
+
|
|
4
|
+
export const UI = {
|
|
5
|
+
/**
|
|
6
|
+
* @description The affix UI element to pin content to the top or bottom of the page
|
|
7
|
+
*/
|
|
8
|
+
affix: (() => {
|
|
9
|
+
const Comp = dynamic(() => import("./affix"), { loading });
|
|
10
|
+
Comp.displayName = "UI.affix";
|
|
11
|
+
return Comp;
|
|
12
|
+
})(),
|
|
13
|
+
/**
|
|
14
|
+
* @description The alert UI element to display important messages or notifications
|
|
15
|
+
* @example <UI.alert title="Hello World" />
|
|
16
|
+
* @example <UI.alert title="Hello World" color="red" />
|
|
17
|
+
* @example <UI.alert title="Hello World" withCloseButton />
|
|
18
|
+
*/ alert: (() => {
|
|
19
|
+
const Comp = dynamic(() => import("./alert"), { loading });
|
|
20
|
+
Comp.displayName = "UI.alert";
|
|
21
|
+
return Comp;
|
|
22
|
+
})(),
|
|
23
|
+
/**
|
|
24
|
+
* @description The accordion UI element for collapsible content sections
|
|
25
|
+
* @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} />
|
|
26
|
+
* @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} defaultValue="1" />
|
|
27
|
+
* @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} defaultValue="1" variant="separated" />
|
|
28
|
+
*/
|
|
29
|
+
accordion: (() => {
|
|
30
|
+
const Comp = dynamic(() => import("./accordion"), { loading });
|
|
31
|
+
Comp.displayName = "UI.accordion";
|
|
32
|
+
return Comp;
|
|
33
|
+
})(),
|
|
34
|
+
/**
|
|
35
|
+
* @description The terminal UI element for displaying command-line interface
|
|
36
|
+
* @example <UI.terminal commands={["npm install", "npm start"]} />
|
|
37
|
+
* @example <UI.terminal commands={["npm install"]} autorun />
|
|
38
|
+
*/
|
|
39
|
+
terminal: (() => {
|
|
40
|
+
const Comp = dynamic(() => import("./terminal"), { loading });
|
|
41
|
+
Comp.displayName = "UI.terminal";
|
|
42
|
+
return Comp;
|
|
43
|
+
})(),
|
|
44
|
+
/**
|
|
45
|
+
* @description The form UI element for collecting user input
|
|
46
|
+
* @example <UI.form onSubmit={(values) => console.log(values)} />
|
|
47
|
+
* @example <UI.form initialValues={{ name: "John" }} onSubmit={(values) => console.log(values)} />
|
|
48
|
+
*/
|
|
49
|
+
form: (() => {
|
|
50
|
+
const Comp = dynamic(() => import("./form"), { loading });
|
|
51
|
+
Comp.displayName = "UI.form";
|
|
52
|
+
return Comp;
|
|
53
|
+
})(),
|
|
54
|
+
/**
|
|
55
|
+
* @description The list UI element for displaying items in an organized manner
|
|
56
|
+
* @example <UI.list
|
|
57
|
+
* listStyleType="none"
|
|
58
|
+
* items={[
|
|
59
|
+
* {
|
|
60
|
+
* children: (
|
|
61
|
+
* <UI.alert title="Dynamic Imports" color="blue">
|
|
62
|
+
* Efficiently load components with dynamic imports to
|
|
63
|
+
* improve performance.
|
|
64
|
+
* </UI.alert>
|
|
65
|
+
* ),
|
|
66
|
+
* },
|
|
67
|
+
*
|
|
68
|
+
* {
|
|
69
|
+
* children: (
|
|
70
|
+
* <UI.alert title="SSR Support" color="green">
|
|
71
|
+
* Server-side rendering capabilities for faster initial
|
|
72
|
+
* page loads and SEO benefits.
|
|
73
|
+
* </UI.alert>
|
|
74
|
+
* ),
|
|
75
|
+
* },
|
|
76
|
+
*
|
|
77
|
+
* {
|
|
78
|
+
* children: (
|
|
79
|
+
* <UI.alert
|
|
80
|
+
* title="Customizable UI Elements"
|
|
81
|
+
* color="purple"
|
|
82
|
+
* >
|
|
83
|
+
* Easily customize UI components like alerts, tabs, and
|
|
84
|
+
* grids to fit your design needs.
|
|
85
|
+
* </UI.alert>
|
|
86
|
+
* ),
|
|
87
|
+
* },
|
|
88
|
+
* ]}
|
|
89
|
+
* />
|
|
90
|
+
* @example <UI.list items={[{ children: <UI.text text="Item 1" /> }, { children: <UI.text text="Item 2" /> }]} />
|
|
91
|
+
*/
|
|
92
|
+
list: (() => {
|
|
93
|
+
const Comp = dynamic(() => import("./list"), { loading });
|
|
94
|
+
Comp.displayName = "UI.list";
|
|
95
|
+
return Comp;
|
|
96
|
+
})(),
|
|
97
|
+
/**
|
|
98
|
+
* @description The actionicon UI element for icon buttons
|
|
99
|
+
* @example <UI.actionicon><UI.icon icon="add" /></UI.actionicon>
|
|
100
|
+
* @example <UI.actionicon variant="filled" color="blue"><UI.icon icon="search" /></UI.actionicon>
|
|
101
|
+
*/
|
|
102
|
+
actionicon: (() => {
|
|
103
|
+
const Comp = dynamic(() => import("./actionicon"), { loading });
|
|
104
|
+
Comp.displayName = "UI.actionicon";
|
|
105
|
+
return Comp;
|
|
106
|
+
})(),
|
|
107
|
+
/**
|
|
108
|
+
* @description The aspectratio UI element to maintain width/height ratio
|
|
109
|
+
* @example <UI.aspectratio ratio={16/9}>Content here</UI.aspectratio>
|
|
110
|
+
* @example <UI.aspectratio ratio={1}>Square content</UI.aspectratio>
|
|
111
|
+
*/
|
|
112
|
+
aspectratio: (() => {
|
|
113
|
+
const Comp = dynamic(() => import("./aspectratio"), { loading });
|
|
114
|
+
Comp.displayName = "UI.aspectratio";
|
|
115
|
+
return Comp;
|
|
116
|
+
})(),
|
|
117
|
+
/**
|
|
118
|
+
* @description The box UI element, a basic container for layout
|
|
119
|
+
* @example <UI.box>Content here</UI.box>
|
|
120
|
+
* @example <UI.box p={16} bg="gray.1">Content with padding and background</UI.box>
|
|
121
|
+
*/
|
|
122
|
+
box: (() => {
|
|
123
|
+
const Comp = dynamic(() => import("./box"), { loading });
|
|
124
|
+
Comp.displayName = "UI.box";
|
|
125
|
+
return Comp;
|
|
126
|
+
})(),
|
|
127
|
+
/**
|
|
128
|
+
* @description The video UI element for displaying video content
|
|
129
|
+
* @example <UI.video src="https://example.com/video.mp4" />
|
|
130
|
+
* @example <UI.video src="https://example.com/video.mp4" autoPlay />
|
|
131
|
+
*/
|
|
132
|
+
video: (() => {
|
|
133
|
+
const Comp = dynamic(() => import("./video"), { loading });
|
|
134
|
+
Comp.displayName = "UI.video";
|
|
135
|
+
return Comp;
|
|
136
|
+
})(),
|
|
137
|
+
/**
|
|
138
|
+
* @description The badge UI element for labels and status indicators
|
|
139
|
+
* @example <UI.badge>New</UI.badge>
|
|
140
|
+
* @example <UI.badge color="red">Important</UI.badge>
|
|
141
|
+
*/
|
|
142
|
+
badge: (() => {
|
|
143
|
+
const Comp = dynamic(() => import("./badge"), { loading });
|
|
144
|
+
Comp.displayName = "UI.badge";
|
|
145
|
+
return Comp;
|
|
146
|
+
})(),
|
|
147
|
+
/**
|
|
148
|
+
* @description The card UI element for content containers with optional border and shadow
|
|
149
|
+
* @example <UI.card>Card content</UI.card>
|
|
150
|
+
* @example <UI.card withBorder shadow="md" p="md">Card with border and shadow</UI.card>
|
|
151
|
+
*/
|
|
152
|
+
card: (() => {
|
|
153
|
+
const Comp = dynamic(() => import("./card"), { loading });
|
|
154
|
+
Comp.displayName = "UI.card";
|
|
155
|
+
return Comp;
|
|
156
|
+
})(),
|
|
157
|
+
/**
|
|
158
|
+
* @description The center UI element for centering content horizontally and vertically
|
|
159
|
+
* @example <UI.center>Centered content</UI.center>
|
|
160
|
+
* @example <UI.center h={200}>Centered vertically and horizontally</UI.center>
|
|
161
|
+
*/
|
|
162
|
+
center: (() => {
|
|
163
|
+
const Comp = dynamic(() => import("./center"), { loading });
|
|
164
|
+
Comp.displayName = "UI.center";
|
|
165
|
+
return Comp;
|
|
166
|
+
})(),
|
|
167
|
+
/**
|
|
168
|
+
* @description The code UI element for displaying formatted code snippets
|
|
169
|
+
* @example <UI.code code="const x = 5;" codeLang="javascript" />
|
|
170
|
+
* @example <UI.code code="function hello() { return 'world'; }" codeLang="typescript" colorScheme="dark" />
|
|
171
|
+
*/
|
|
172
|
+
code: (() => {
|
|
173
|
+
const Comp = dynamic(() => import("./code"), { loading });
|
|
174
|
+
Comp.displayName = "UI.code";
|
|
175
|
+
return Comp;
|
|
176
|
+
})(),
|
|
177
|
+
/**
|
|
178
|
+
* @description The container UI element for responsive content width
|
|
179
|
+
* @example <UI.container>Content with responsive max-width</UI.container>
|
|
180
|
+
* @example <UI.container size="sm">Small container</UI.container>
|
|
181
|
+
*/
|
|
182
|
+
container: (() => {
|
|
183
|
+
const Comp = dynamic(() => import("./container"), { loading });
|
|
184
|
+
Comp.displayName = "UI.container";
|
|
185
|
+
return Comp;
|
|
186
|
+
})(),
|
|
187
|
+
/**
|
|
188
|
+
* @description The divider UI element for visual separation
|
|
189
|
+
* @example <UI.divider />
|
|
190
|
+
* @example <UI.divider label="Section" labelPosition="center" />
|
|
191
|
+
*/
|
|
192
|
+
divider: (() => {
|
|
193
|
+
const Comp = dynamic(() => import("./divider"), { loading });
|
|
194
|
+
Comp.displayName = "UI.divider";
|
|
195
|
+
return Comp;
|
|
196
|
+
})(),
|
|
197
|
+
/**
|
|
198
|
+
* @description The flex UI element for flexible layouts using flexbox
|
|
199
|
+
* @example <UI.flex>Flex container</UI.flex>
|
|
200
|
+
* @example <UI.flex direction="column" gap={8} align="center">Column flex layout</UI.flex>
|
|
201
|
+
*/
|
|
202
|
+
flex: (() => {
|
|
203
|
+
const Comp = dynamic(() => import("./flex"), { loading });
|
|
204
|
+
Comp.displayName = "UI.flex";
|
|
205
|
+
return Comp;
|
|
206
|
+
})(),
|
|
207
|
+
/**
|
|
208
|
+
* @description The grid UI element for creating grid layouts
|
|
209
|
+
* @example <UI.grid>Grid container</UI.grid>
|
|
210
|
+
* @example <UI.grid cols={3} gutter="md">Three column grid</UI.grid>
|
|
211
|
+
*/
|
|
212
|
+
grid: (() => {
|
|
213
|
+
const Comp = dynamic(() => import("./grid"), { loading });
|
|
214
|
+
Comp.displayName = "UI.grid";
|
|
215
|
+
return Comp;
|
|
216
|
+
})(),
|
|
217
|
+
/**
|
|
218
|
+
* @description The simplegrid UI element for basic grid layouts
|
|
219
|
+
* @example <UI.simplegrid>Simple grid</UI.simplegrid>
|
|
220
|
+
* @example <UI.simplegrid cols={2}>Two column grid</UI.simplegrid>
|
|
221
|
+
*/
|
|
222
|
+
simplegrid: (() => {
|
|
223
|
+
const Comp = dynamic(() => import("./simplegrid"), { loading });
|
|
224
|
+
Comp.displayName = "UI.simplegrid";
|
|
225
|
+
return Comp;
|
|
226
|
+
})(),
|
|
227
|
+
/**
|
|
228
|
+
* @description The space UI element for adding vertical or horizontal space
|
|
229
|
+
* @example <UI.space h={20} />
|
|
230
|
+
* @example <UI.space w={10} />
|
|
231
|
+
*/
|
|
232
|
+
space: (() => {
|
|
233
|
+
const Comp = dynamic(() => import("./space"), { loading });
|
|
234
|
+
Comp.displayName = "UI.space";
|
|
235
|
+
return Comp;
|
|
236
|
+
})(),
|
|
237
|
+
/**
|
|
238
|
+
* @description The checkbox UI element for boolean selections
|
|
239
|
+
* @example <UI.checkbox label="Accept terms" />
|
|
240
|
+
* @example <UI.checkbox label="Subscribe" defaultChecked />
|
|
241
|
+
*/
|
|
242
|
+
checkbox: (() => {
|
|
243
|
+
const Comp = dynamic(() => import("./checkbox"), { loading });
|
|
244
|
+
Comp.displayName = "UI.checkbox";
|
|
245
|
+
return Comp;
|
|
246
|
+
})(),
|
|
247
|
+
/**
|
|
248
|
+
* @description The chip UI element for toggleable selection items
|
|
249
|
+
* @example <UI.chip value="react">React</UI.chip>
|
|
250
|
+
* @example <UI.chip value="vue" checked>Vue</UI.chip>
|
|
251
|
+
*/
|
|
252
|
+
chip: (() => {
|
|
253
|
+
const Comp = dynamic(() => import("./chip"), { loading });
|
|
254
|
+
Comp.displayName = "UI.chip";
|
|
255
|
+
return Comp;
|
|
256
|
+
})(),
|
|
257
|
+
/**
|
|
258
|
+
* @description The colorinput UI element for selecting colors with text input
|
|
259
|
+
* @example <UI.colorinput label="Pick a color" />
|
|
260
|
+
* @example <UI.colorinput label="Theme color" defaultValue="#1C7ED6" />
|
|
261
|
+
*/
|
|
262
|
+
colorinput: (() => {
|
|
263
|
+
const Comp = dynamic(() => import("./colorinput"), { loading });
|
|
264
|
+
Comp.displayName = "UI.colorinput";
|
|
265
|
+
return Comp;
|
|
266
|
+
})(),
|
|
267
|
+
/**
|
|
268
|
+
* @description The colorpicker UI element for selecting colors visually
|
|
269
|
+
* @example <UI.colorpicker />
|
|
270
|
+
* @example <UI.colorpicker format="rgba" swatches={['#F44336', '#2196F3']} />
|
|
271
|
+
*/
|
|
272
|
+
colorpicker: (() => {
|
|
273
|
+
const Comp = dynamic(() => import("./colorpicker"), { loading });
|
|
274
|
+
Comp.displayName = "UI.colorpicker";
|
|
275
|
+
return Comp;
|
|
276
|
+
})(),
|
|
277
|
+
/**
|
|
278
|
+
* @description The fieldset UI element for grouping form controls
|
|
279
|
+
* @example <UI.fieldset legend="Personal Information">Form fields here</UI.fieldset>
|
|
280
|
+
* @example <UI.fieldset legend="Contact" variant="filled">Contact fields</UI.fieldset>
|
|
281
|
+
*/
|
|
282
|
+
fieldset: (() => {
|
|
283
|
+
const Comp = dynamic(() => import("./fieldset"), { loading });
|
|
284
|
+
Comp.displayName = "UI.fieldset";
|
|
285
|
+
return Comp;
|
|
286
|
+
})(),
|
|
287
|
+
/**
|
|
288
|
+
* @description The fileinput UI element for file uploads
|
|
289
|
+
* @example <UI.fileinput label="Upload file" />
|
|
290
|
+
* @example <UI.fileinput label="Upload resume" accept=".pdf,.docx" />
|
|
291
|
+
*/
|
|
292
|
+
fileinput: (() => {
|
|
293
|
+
const Comp = dynamic(() => import("./fileinput"), { loading });
|
|
294
|
+
Comp.displayName = "UI.fileinput";
|
|
295
|
+
return Comp;
|
|
296
|
+
})(),
|
|
297
|
+
/**
|
|
298
|
+
* @description The input UI element, base component for text inputs
|
|
299
|
+
* @example <UI.input placeholder="Enter value" />
|
|
300
|
+
* @example <UI.input placeholder="Search" leftSection={<UI.icon icon="search" />} />
|
|
301
|
+
*/
|
|
302
|
+
input: (() => {
|
|
303
|
+
const Comp = dynamic(() => import("./input"), { loading });
|
|
304
|
+
Comp.displayName = "UI.input";
|
|
305
|
+
return Comp;
|
|
306
|
+
})(),
|
|
307
|
+
/**
|
|
308
|
+
* @description The jsoninput UI element for structured JSON data entry
|
|
309
|
+
* @example <UI.jsoninput label="Config" />
|
|
310
|
+
* @example <UI.jsoninput label="Settings" defaultValue={{ theme: "light" }} />
|
|
311
|
+
*/
|
|
312
|
+
jsoninput: (() => {
|
|
313
|
+
const Comp = dynamic(() => import("./jsoninput"), { loading });
|
|
314
|
+
Comp.displayName = "UI.jsoninput";
|
|
315
|
+
return Comp;
|
|
316
|
+
})(),
|
|
317
|
+
/**
|
|
318
|
+
* @description The nativeselect UI element for dropdown selection using native controls
|
|
319
|
+
* @example <UI.nativeselect data={["Option 1", "Option 2"]} />
|
|
320
|
+
* @example <UI.nativeselect label="Country" data={["USA", "Canada", "UK"]} />
|
|
321
|
+
*/
|
|
322
|
+
nativeselect: (() => {
|
|
323
|
+
const Comp = dynamic(() => import("./nativeselect"), { loading });
|
|
324
|
+
Comp.displayName = "UI.nativeselect";
|
|
325
|
+
return Comp;
|
|
326
|
+
})(),
|
|
327
|
+
/**
|
|
328
|
+
* @description The numberinput UI element for numeric value entry
|
|
329
|
+
* @example <UI.numberinput label="Quantity" />
|
|
330
|
+
* @example <UI.numberinput label="Price" min={0} step={0.01} precision={2} />
|
|
331
|
+
*/
|
|
332
|
+
numberinput: (() => {
|
|
333
|
+
const Comp = dynamic(() => import("./numberinput"), { loading });
|
|
334
|
+
Comp.displayName = "UI.numberinput";
|
|
335
|
+
return Comp;
|
|
336
|
+
})(),
|
|
337
|
+
/**
|
|
338
|
+
* @description The passwordinput UI element for secure password entry
|
|
339
|
+
* @example <UI.passwordinput label="Password" />
|
|
340
|
+
* @example <UI.passwordinput label="Password" withStrengthMeter />
|
|
341
|
+
*/
|
|
342
|
+
passwordinput: (() => {
|
|
343
|
+
const Comp = dynamic(() => import("./passwordinput"), { loading });
|
|
344
|
+
Comp.displayName = "UI.passwordinput";
|
|
345
|
+
return Comp;
|
|
346
|
+
})(),
|
|
347
|
+
/**
|
|
348
|
+
* @description The pininput UI element for code verification input
|
|
349
|
+
* @example <UI.pininput length={4} />
|
|
350
|
+
* @example <UI.pininput length={6} oneTimeCode />
|
|
351
|
+
*/
|
|
352
|
+
pininput: (() => {
|
|
353
|
+
const Comp = dynamic(() => import("./pininput"), { loading });
|
|
354
|
+
Comp.displayName = "UI.pininput";
|
|
355
|
+
return Comp;
|
|
356
|
+
})(),
|
|
357
|
+
/**
|
|
358
|
+
* @description The radio UI element for single-option selection
|
|
359
|
+
* @example <UI.radio label="Option 1" name="option" value="1" />
|
|
360
|
+
* @example <UI.radio label="Option 2" name="option" value="2" defaultChecked />
|
|
361
|
+
*/
|
|
362
|
+
radio: (() => {
|
|
363
|
+
const Comp = dynamic(() => import("./radio"), { loading });
|
|
364
|
+
Comp.displayName = "UI.radio";
|
|
365
|
+
return Comp;
|
|
366
|
+
})(),
|
|
367
|
+
/**
|
|
368
|
+
* @description The rating UI element for visual scoring
|
|
369
|
+
* @example <UI.rating defaultValue={3} />
|
|
370
|
+
* @example <UI.rating count={10} fractions={2} />
|
|
371
|
+
*/
|
|
372
|
+
rating: (() => {
|
|
373
|
+
const Comp = dynamic(() => import("./rating"), { loading });
|
|
374
|
+
Comp.displayName = "UI.rating";
|
|
375
|
+
return Comp;
|
|
376
|
+
})(),
|
|
377
|
+
/**
|
|
378
|
+
* @description The segmentedcontrol UI element for button-like option selection
|
|
379
|
+
* @example <UI.segmentedcontrol data={["React", "Angular", "Vue"]} />
|
|
380
|
+
* @example <UI.segmentedcontrol data={[{label: "S", value: "sm"}, {label: "M", value: "md"}]} />
|
|
381
|
+
*/
|
|
382
|
+
segmentedcontrol: (() => {
|
|
383
|
+
const Comp = dynamic(() => import("./segmentedcontrol"), { loading });
|
|
384
|
+
Comp.displayName = "UI.segmentedcontrol";
|
|
385
|
+
return Comp;
|
|
386
|
+
})(),
|
|
387
|
+
/**
|
|
388
|
+
* @description The slider UI element for selecting value from a range
|
|
389
|
+
* @example <UI.slider defaultValue={50} />
|
|
390
|
+
* @example <UI.slider min={0} max={100} step={5} marks={[{value: 20, label: '20%'}, {value: 80, label: '80%'}]} />
|
|
391
|
+
*/
|
|
392
|
+
slider: (() => {
|
|
393
|
+
const Comp = dynamic(() => import("./slider"), { loading });
|
|
394
|
+
Comp.displayName = "UI.slider";
|
|
395
|
+
return Comp;
|
|
396
|
+
})(),
|
|
397
|
+
/**
|
|
398
|
+
* @description The switch UI element for toggling options
|
|
399
|
+
* @example <UI.switch label="Dark mode" />
|
|
400
|
+
* @example <UI.switch label="Notifications" defaultChecked size="lg" />
|
|
401
|
+
*/
|
|
402
|
+
switch: (() => {
|
|
403
|
+
const Comp = dynamic(() => import("./switch"), { loading });
|
|
404
|
+
Comp.displayName = "UI.switch";
|
|
405
|
+
return Comp;
|
|
406
|
+
})(),
|
|
407
|
+
/**
|
|
408
|
+
* @description The textarea UI element for multi-line text input
|
|
409
|
+
* @example <UI.textarea placeholder="Enter description" />
|
|
410
|
+
* @example <UI.textarea label="Bio" autosize minRows={3} maxRows={6} />
|
|
411
|
+
*/
|
|
412
|
+
textarea: (() => {
|
|
413
|
+
const Comp = dynamic(() => import("./textarea"), { loading });
|
|
414
|
+
Comp.displayName = "UI.textarea";
|
|
415
|
+
return Comp;
|
|
416
|
+
})(),
|
|
417
|
+
/**
|
|
418
|
+
* @description The textinput UI element for single-line text input
|
|
419
|
+
* @example <UI.textinput placeholder="Username" />
|
|
420
|
+
* @example <UI.textinput label="Email" type="email" required />
|
|
421
|
+
*/
|
|
422
|
+
textinput: (() => {
|
|
423
|
+
const Comp = dynamic(() => import("./textinput"), { loading });
|
|
424
|
+
Comp.displayName = "UI.textinput";
|
|
425
|
+
return Comp;
|
|
426
|
+
})(),
|
|
427
|
+
/**
|
|
428
|
+
* @description The autocomplete UI element for text input with suggestions
|
|
429
|
+
* @example <UI.autocomplete data={["React", "Angular", "Vue"]} label="Framework" />
|
|
430
|
+
* @example <UI.autocomplete data={["USA", "Canada", "UK"]} placeholder="Country" limit={5} />
|
|
431
|
+
*/
|
|
432
|
+
autocomplete: (() => {
|
|
433
|
+
const Comp = dynamic(() => import("./autocomplete"), { loading });
|
|
434
|
+
Comp.displayName = "UI.autocomplete";
|
|
435
|
+
return Comp;
|
|
436
|
+
})(),
|
|
437
|
+
/**
|
|
438
|
+
* @description The combobox UI element for customizable dropdown selection
|
|
439
|
+
* @example <UI.combobox data={["Option 1", "Option 2"]} />
|
|
440
|
+
* @example <UI.combobox data={[{value: "1", label: "Option 1"}, {value: "2", label: "Option 2"}]} searchable />
|
|
441
|
+
*/
|
|
442
|
+
combobox: (() => {
|
|
443
|
+
const Comp = dynamic(() => import("./combobox"), { loading });
|
|
444
|
+
Comp.displayName = "UI.combobox";
|
|
445
|
+
return Comp;
|
|
446
|
+
})(),
|
|
447
|
+
/**
|
|
448
|
+
* @description The multiselect UI element for selecting multiple options
|
|
449
|
+
* @example <UI.multiselect data={["React", "Angular", "Vue"]} label="Frameworks" />
|
|
450
|
+
* @example <UI.multiselect data={["JavaScript", "TypeScript", "Python"]} label="Languages" searchable />
|
|
451
|
+
*/
|
|
452
|
+
multiselect: (() => {
|
|
453
|
+
const Comp = dynamic(() => import("./multiselect"), { loading });
|
|
454
|
+
Comp.displayName = "UI.multiselect";
|
|
455
|
+
return Comp;
|
|
456
|
+
})(),
|
|
457
|
+
/**
|
|
458
|
+
* @description The pill UI element for displaying compact information
|
|
459
|
+
* @example <UI.pill>New</UI.pill>
|
|
460
|
+
* @example <UI.pill withRemoveButton>Removable</UI.pill>
|
|
461
|
+
*/
|
|
462
|
+
pill: (() => {
|
|
463
|
+
const Comp = dynamic(() => import("./pill"), { loading });
|
|
464
|
+
Comp.displayName = "UI.pill";
|
|
465
|
+
return Comp;
|
|
466
|
+
})(),
|
|
467
|
+
/**
|
|
468
|
+
* @description The pillsinput UI element for creating tags/pills from input
|
|
469
|
+
* @example <UI.pillsinput label="Tags" />
|
|
470
|
+
* @example <UI.pillsinput label="Skills" defaultValue={["React", "TypeScript"]} />
|
|
471
|
+
*/
|
|
472
|
+
pillsinput: (() => {
|
|
473
|
+
const Comp = dynamic(() => import("./pillsinput"), { loading });
|
|
474
|
+
Comp.displayName = "UI.pillsinput";
|
|
475
|
+
return Comp;
|
|
476
|
+
})(),
|
|
477
|
+
/**
|
|
478
|
+
* @description The select UI element for dropdown selection
|
|
479
|
+
* @example <UI.select data={["Option 1", "Option 2"]} label="Choose one" />
|
|
480
|
+
* @example <UI.select data={[{value: "js", label: "JavaScript"}, {value: "ts", label: "TypeScript"}]} searchable />
|
|
481
|
+
*/
|
|
482
|
+
select: (() => {
|
|
483
|
+
const Comp = dynamic(() => import("./select"), { loading });
|
|
484
|
+
Comp.displayName = "UI.select";
|
|
485
|
+
return Comp;
|
|
486
|
+
})(),
|
|
487
|
+
/**
|
|
488
|
+
* @description The tagsinput UI element for creating tags from input
|
|
489
|
+
* @example <UI.tagsinput label="Tags" />
|
|
490
|
+
* @example <UI.tagsinput label="Technologies" defaultValue={["React", "Next.js"]} />
|
|
491
|
+
*/
|
|
492
|
+
tagsinput: (() => {
|
|
493
|
+
const Comp = dynamic(() => import("./tagsinput"), { loading });
|
|
494
|
+
Comp.displayName = "UI.tagsinput";
|
|
495
|
+
return Comp;
|
|
496
|
+
})(),
|
|
497
|
+
/**
|
|
498
|
+
* @description The icon UI element for displaying vector icons
|
|
499
|
+
* @example <UI.icon icon="user" />
|
|
500
|
+
* @example <UI.icon icon="settings" color="blue" size={24} />
|
|
501
|
+
*/
|
|
502
|
+
icon: (() => {
|
|
503
|
+
const Comp = dynamic(() => import("./icon"), { loading });
|
|
504
|
+
Comp.displayName = "UI.icon";
|
|
505
|
+
return Comp;
|
|
506
|
+
})(),
|
|
507
|
+
/**
|
|
508
|
+
* @description The button UI element for user interaction
|
|
509
|
+
* @example <UI.button>Click me</UI.button>
|
|
510
|
+
* @example <UI.button variant="filled" color="green" size="lg">Submit</UI.button>
|
|
511
|
+
*/
|
|
512
|
+
button: (() => {
|
|
513
|
+
const Comp = dynamic(() => import("./button"), { loading });
|
|
514
|
+
Comp.displayName = "UI.button";
|
|
515
|
+
return Comp;
|
|
516
|
+
})(),
|
|
517
|
+
/**
|
|
518
|
+
* @description The closebutton UI element for dismissing content
|
|
519
|
+
* @example <UI.closebutton />
|
|
520
|
+
* @example <UI.closebutton size="lg" color="red" />
|
|
521
|
+
*/
|
|
522
|
+
closebutton: (() => {
|
|
523
|
+
const Comp = dynamic(() => import("./closebutton"), { loading });
|
|
524
|
+
Comp.displayName = "UI.closebutton";
|
|
525
|
+
return Comp;
|
|
526
|
+
})(),
|
|
527
|
+
/**
|
|
528
|
+
* @description The filebutton UI element for file selection with button appearance
|
|
529
|
+
* @example <UI.filebutton>Upload file</UI.filebutton>
|
|
530
|
+
* @example <UI.filebutton accept="image/*" multiple>Select images</UI.filebutton>
|
|
531
|
+
*/
|
|
532
|
+
filebutton: (() => {
|
|
533
|
+
const Comp = dynamic(() => import("./filebutton"), { loading });
|
|
534
|
+
Comp.displayName = "UI.filebutton";
|
|
535
|
+
return Comp;
|
|
536
|
+
})(),
|
|
537
|
+
/**
|
|
538
|
+
* @description The unstyledbutton UI element for button functionality without styling
|
|
539
|
+
* @example <UI.unstyledbutton>Text only button</UI.unstyledbutton>
|
|
540
|
+
* @example <UI.unstyledbutton onClick={() => alert('Clicked')}>Custom styled button</UI.unstyledbutton>
|
|
541
|
+
*/
|
|
542
|
+
unstyledbutton: (() => {
|
|
543
|
+
const Comp = dynamic(() => import("./unstyledbutton"), { loading });
|
|
544
|
+
Comp.displayName = "UI.unstyledbutton";
|
|
545
|
+
return Comp;
|
|
546
|
+
})(),
|
|
547
|
+
/**
|
|
548
|
+
* @description The anchor UI element for navigation links
|
|
549
|
+
* @example <UI.anchor href="/about">About</UI.anchor>
|
|
550
|
+
* @example <UI.anchor href="https://example.com" target="_blank">External link</UI.anchor>
|
|
551
|
+
*/
|
|
552
|
+
anchor: (() => {
|
|
553
|
+
const Comp = dynamic(() => import("./anchor"), { loading });
|
|
554
|
+
Comp.displayName = "UI.anchor";
|
|
555
|
+
return Comp;
|
|
556
|
+
})(),
|
|
557
|
+
/**
|
|
558
|
+
* @description The breadcrumbs UI element for navigation path display
|
|
559
|
+
* @example <UI.breadcrumbs items={[{title: 'Home', href: '/'}, {title: 'Blog', href: '/blog'}]} />
|
|
560
|
+
* @example <UI.breadcrumbs separator="→" items={[{title: 'Dashboard', href: '/dashboard'}, {title: 'Settings'}]} />
|
|
561
|
+
*/
|
|
562
|
+
breadcrumbs: (() => {
|
|
563
|
+
const Comp = dynamic(() => import("./breadcrumbs"), { loading });
|
|
564
|
+
Comp.displayName = "UI.breadcrumbs";
|
|
565
|
+
return Comp;
|
|
566
|
+
})(),
|
|
567
|
+
/**
|
|
568
|
+
* @description The burger UI element for toggle button (typically for mobile menus)
|
|
569
|
+
* @example <UI.burger opened={false} onClick={() => setOpened(!opened)} />
|
|
570
|
+
* @example <UI.burger opened={menuOpen} color="blue" size="lg" />
|
|
571
|
+
*/
|
|
572
|
+
burger: (() => {
|
|
573
|
+
const Comp = dynamic(() => import("./burger"), { loading });
|
|
574
|
+
Comp.displayName = "UI.burger";
|
|
575
|
+
return Comp;
|
|
576
|
+
})(),
|
|
577
|
+
/**
|
|
578
|
+
* @description The navlink UI element for navigation menu items
|
|
579
|
+
* @example <UI.navlink label="Dashboard" />
|
|
580
|
+
* @example <UI.navlink label="Settings" icon={<UI.icon icon="settings" />} active />
|
|
581
|
+
*/
|
|
582
|
+
navlink: (() => {
|
|
583
|
+
const Comp = dynamic(() => import("./navlink"), { loading });
|
|
584
|
+
Comp.displayName = "UI.navlink";
|
|
585
|
+
return Comp;
|
|
586
|
+
})(),
|
|
587
|
+
/**
|
|
588
|
+
* @description The pagination UI element for navigating through pages
|
|
589
|
+
* @example <UI.pagination total={10} />
|
|
590
|
+
* @example <UI.pagination total={20} initialPage={3} boundaries={1} siblings={1} />
|
|
591
|
+
*/
|
|
592
|
+
pagination: (() => {
|
|
593
|
+
const Comp = dynamic(() => import("./pagination"), { loading });
|
|
594
|
+
Comp.displayName = "UI.pagination";
|
|
595
|
+
return Comp;
|
|
596
|
+
})(),
|
|
597
|
+
/**
|
|
598
|
+
* @description The stepper UI element for multi-step processes
|
|
599
|
+
* @example <UI.stepper active={1} steps={["Step 1", "Step 2", "Step 3"]} />
|
|
600
|
+
* @example <UI.stepper active={0} orientation="vertical" steps={["Account", "Address", "Confirm"]} />
|
|
601
|
+
*/
|
|
602
|
+
stepper: (() => {
|
|
603
|
+
const Comp = dynamic(() => import("./stepper"), { loading });
|
|
604
|
+
Comp.displayName = "UI.stepper";
|
|
605
|
+
return Comp;
|
|
606
|
+
})(),
|
|
607
|
+
/**
|
|
608
|
+
* @description The tabs UI element for tabbed content navigation
|
|
609
|
+
* @example <UI.tabs tabs={[{header: "Tab 1", content: "Content 1", value: "1"}, {header: "Tab 2", content: "Content 2", value: "2"}]} />
|
|
610
|
+
* @example <UI.tabs tabs={[{header: "Profile", icon: <UI.icon icon="user" />, content: "Profile content", value: "profile"}]} variant="pills" />
|
|
611
|
+
*/
|
|
612
|
+
tabs: (() => {
|
|
613
|
+
const Comp = dynamic(() => import("./tabs"), { loading });
|
|
614
|
+
Comp.displayName = "UI.tabs";
|
|
615
|
+
return Comp;
|
|
616
|
+
})(),
|
|
617
|
+
/**
|
|
618
|
+
* @description The table UI element for displaying tabular data with sorting, pagination and customization options
|
|
619
|
+
* @example <UI.table
|
|
620
|
+
* data={[
|
|
621
|
+
* { id: 1, name: 'John', age: 30 },
|
|
622
|
+
* { id: 2, name: 'Jane', age: 25 }
|
|
623
|
+
* ]}
|
|
624
|
+
* columns={[
|
|
625
|
+
* { accessor: 'name', title: 'Name' },
|
|
626
|
+
* { accessor: 'age', title: 'Age' }
|
|
627
|
+
* ]}
|
|
628
|
+
* />
|
|
629
|
+
* @example <UI.table
|
|
630
|
+
* data={products}
|
|
631
|
+
* columns={[
|
|
632
|
+
* { accessor: 'name', title: 'Product' },
|
|
633
|
+
* { accessor: 'price', title: 'Price', render: (item) => `$${item.price}` }
|
|
634
|
+
* ]}
|
|
635
|
+
* striped
|
|
636
|
+
* highlightOnHover
|
|
637
|
+
* withColumnBorders
|
|
638
|
+
* />
|
|
639
|
+
*/
|
|
640
|
+
table: (() => {
|
|
641
|
+
const Comp = dynamic(() => import("./table"), { loading });
|
|
642
|
+
Comp.displayName = "UI.table";
|
|
643
|
+
return Comp;
|
|
644
|
+
})(),
|
|
645
|
+
/**
|
|
646
|
+
* @description The title UI element for section headings
|
|
647
|
+
* @example <UI.title text="Welcome" />
|
|
648
|
+
* @example <UI.title order={2} text="Section Title" />
|
|
649
|
+
*/
|
|
650
|
+
title: (() => {
|
|
651
|
+
const Comp = dynamic(() => import("./title"), { loading });
|
|
652
|
+
Comp.displayName = "UI.title";
|
|
653
|
+
return Comp;
|
|
654
|
+
})(),
|
|
655
|
+
/**
|
|
656
|
+
* @description The text UI element for displaying and styling text content with extensive typography controls
|
|
657
|
+
* @example <UI.text text="Hello World" /> // Basic text
|
|
658
|
+
* @example <UI.text
|
|
659
|
+
* text="Styled text"
|
|
660
|
+
* fz={20} // Font size
|
|
661
|
+
* fw={500} // Font weight
|
|
662
|
+
* tt="capitalize" // Text transform
|
|
663
|
+
* c="blue" // Color
|
|
664
|
+
* ta="center" // Text align
|
|
665
|
+
* lh={1.5} // Line height
|
|
666
|
+
* fs="italic" // Font style
|
|
667
|
+
* td="underline" // Text decoration
|
|
668
|
+
* />
|
|
669
|
+
* @example <UI.text
|
|
670
|
+
* text="Responsive text"
|
|
671
|
+
* fz={{ base: 14, sm: 16, lg: 18 }} // Responsive font sizes
|
|
672
|
+
* c={{ light: 'dark.9', dark: 'gray.2' }} // Theme-aware colors
|
|
673
|
+
* />
|
|
674
|
+
*/
|
|
675
|
+
text: (() => {
|
|
676
|
+
const Comp = dynamic(() => import("./text"), { loading });
|
|
677
|
+
Comp.displayName = "UI.text";
|
|
678
|
+
return Comp;
|
|
679
|
+
})(),
|
|
680
|
+
/**
|
|
681
|
+
* @description The tree UI element for hierarchical data display
|
|
682
|
+
* @example <UI.tree data={[{label: "Parent", children: [{label: "Child"}]}]} />
|
|
683
|
+
* @example <UI.tree data={[{label: "Documents", children: [{label: "Reports"}]}]} initiallyOpened={["0"]} />
|
|
684
|
+
*/
|
|
685
|
+
tree: (() => {
|
|
686
|
+
const Comp = dynamic(() => import("./tree"), { loading });
|
|
687
|
+
Comp.displayName = "UI.tree";
|
|
688
|
+
return Comp;
|
|
689
|
+
})(),
|
|
690
|
+
/**
|
|
691
|
+
* @description The transition UI element for animating content appearance
|
|
692
|
+
* @example <UI.transition mounted transition="fade-up">{(styles) => <UI.text text="Text fades up" style={styles} />}</UI.transition>
|
|
693
|
+
* @example <UI.transition mounted transition="fade-down">{(styles) => <UI.text text="Text fades down" style={styles} />}</UI.transition>
|
|
694
|
+
*/
|
|
695
|
+
transition: (() => {
|
|
696
|
+
const Comp = dynamic(() => import("./transition"), { loading });
|
|
697
|
+
Comp.displayName = "UI.transition";
|
|
698
|
+
return Comp;
|
|
699
|
+
})(),
|
|
700
|
+
/**
|
|
701
|
+
* @description The image UI element for displaying images with responsive sizing and loading optimizations
|
|
702
|
+
* @example <UI.image src="/image.jpg" alt="Description" /> // Basic image
|
|
703
|
+
* @example <UI.image
|
|
704
|
+
* src="/image.jpg"
|
|
705
|
+
* alt="Description"
|
|
706
|
+
* height={300}
|
|
707
|
+
* width={400}
|
|
708
|
+
* fit="contain" // 'cover', 'fill', 'none', 'scale-down'
|
|
709
|
+
* radius="md" // Border radius
|
|
710
|
+
* withPlaceholder // Shows placeholder while loading
|
|
711
|
+
* loading="lazy" // Lazy loading
|
|
712
|
+
* />
|
|
713
|
+
* @example <UI.image
|
|
714
|
+
* src="/banner.jpg"
|
|
715
|
+
* alt="Banner"
|
|
716
|
+
* height="auto"
|
|
717
|
+
* width="100%"
|
|
718
|
+
* styles={{ image: { objectPosition: 'top center' } }}
|
|
719
|
+
* />
|
|
720
|
+
*/
|
|
721
|
+
image: (() => {
|
|
722
|
+
const Comp = dynamic(() => import("./image"), { loading });
|
|
723
|
+
Comp.displayName = "UI.image";
|
|
724
|
+
return Comp;
|
|
725
|
+
})(),
|
|
726
|
+
/**
|
|
727
|
+
* @description The inviewport UI element to detect when content is visible in viewport
|
|
728
|
+
* @example <UI.inviewport onEnterViewport={() => console.log('Visible')}>Content</UI.inviewport>
|
|
729
|
+
* @example <UI.inviewport threshold={0.5}>Appears when 50% visible</UI.inviewport>
|
|
730
|
+
*/
|
|
731
|
+
inviewport: (() => {
|
|
732
|
+
const Comp = dynamic(() => import("./inviewport"), { loading });
|
|
733
|
+
Comp.displayName = "UI.inviewport";
|
|
734
|
+
return Comp;
|
|
735
|
+
})(),
|
|
736
|
+
/**
|
|
737
|
+
* @description The hoverable UI element for hover state detection
|
|
738
|
+
* @example <UI.hoverable>{(hovered) => <div>Hover me: {hovered ? 'Hovered' : 'Not hovered'}</div>}</UI.hoverable>
|
|
739
|
+
* @example <UI.hoverable>{(hovered) => <UI.box bg={hovered ? 'blue.1' : 'transparent'}>Hover effect</UI.box>}</UI.hoverable>
|
|
740
|
+
*/
|
|
741
|
+
hoverable: (() => {
|
|
742
|
+
const Comp = dynamic(() => import("./hoverable"), { loading });
|
|
743
|
+
Comp.displayName = "UI.hoverable";
|
|
744
|
+
return Comp;
|
|
745
|
+
})(),
|
|
746
|
+
/**
|
|
747
|
+
* @description The arrow UI element for pointers and indicators
|
|
748
|
+
* @example <UI.arrow />
|
|
749
|
+
* @example <UI.arrow size={12} position="center" />
|
|
750
|
+
*/
|
|
751
|
+
arrow: (() => {
|
|
752
|
+
const Comp = dynamic(() => import("./arrow"), { loading });
|
|
753
|
+
Comp.displayName = "UI.arrow";
|
|
754
|
+
return Comp;
|
|
755
|
+
})(),
|
|
756
|
+
/**
|
|
757
|
+
* @description The infobox UI element for displaying information in a box
|
|
758
|
+
* @example <UI.infobox title="Info" description="This is an info box" />
|
|
759
|
+
* @example <UI.infobox title="Warning" description="This is a warning box" color="red" />
|
|
760
|
+
*/
|
|
761
|
+
infobox: (() => {
|
|
762
|
+
const Comp = dynamic(() => import("./infobox"), { loading });
|
|
763
|
+
Comp.displayName = "UI.infobox";
|
|
764
|
+
return Comp;
|
|
765
|
+
})(),
|
|
766
|
+
/**
|
|
767
|
+
* @description The drawer UI element
|
|
768
|
+
*/
|
|
769
|
+
drawer: (() => {
|
|
770
|
+
const Comp = dynamic(() => import("./drawer"), { loading });
|
|
771
|
+
Comp.displayName = "UI.drawer";
|
|
772
|
+
return Comp;
|
|
773
|
+
})(),
|
|
774
|
+
/**
|
|
775
|
+
* @description The avatar UI element for displaying user profile pictures
|
|
776
|
+
* @example <UI.avatar src="https://example.com/avatar.jpg" />
|
|
777
|
+
* @example <UI.avatar src="https://example.com/avatar.jpg" radius="xl" size="md" />
|
|
778
|
+
*/
|
|
779
|
+
avatar: (() => {
|
|
780
|
+
const Comp = dynamic(() => import("./avatar"), { loading });
|
|
781
|
+
Comp.displayName = "UI.avatar";
|
|
782
|
+
return Comp;
|
|
783
|
+
})(),
|
|
784
|
+
/**
|
|
785
|
+
* @description The menu UI element for dropdown menus
|
|
786
|
+
* @example <UI.menu label="Options" items={[{ type: 'item', text: 'Settings' }]} />
|
|
787
|
+
*/
|
|
788
|
+
menu: (() => {
|
|
789
|
+
const Comp = dynamic(() => import("./menu"), { loading });
|
|
790
|
+
Comp.displayName = "UI.menu";
|
|
791
|
+
return Comp;
|
|
792
|
+
})(),
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
// import Affix from "./affix";
|
|
796
|
+
// import Alert from "./alert";
|
|
797
|
+
// import Accordion from "./accordion";
|
|
798
|
+
// import Terminal from "./terminal";
|
|
799
|
+
// import Form from "./form";
|
|
800
|
+
// import List from "./list";
|
|
801
|
+
// import ActionIcon from "./actionicon";
|
|
802
|
+
// import AspectRatio from "./aspectratio";
|
|
803
|
+
// import Box from "./box";
|
|
804
|
+
// import Video from "./video";
|
|
805
|
+
// import Badge from "./badge";
|
|
806
|
+
// import Card from "./card";
|
|
807
|
+
// import Center from "./center";
|
|
808
|
+
// import Code from "./code";
|
|
809
|
+
// import Container from "./container";
|
|
810
|
+
// import Divider from "./divider";
|
|
811
|
+
// import Flex from "./flex";
|
|
812
|
+
// import Grid from "./grid";
|
|
813
|
+
// import SimpleGrid from "./simplegrid";
|
|
814
|
+
// import Space from "./space";
|
|
815
|
+
// import Checkbox from "./checkbox";
|
|
816
|
+
// import Chip from "./chip";
|
|
817
|
+
// import ColorInput from "./colorinput";
|
|
818
|
+
// import ColorPicker from "./colorpicker";
|
|
819
|
+
// import Fieldset from "./fieldset";
|
|
820
|
+
// import FileInput from "./fileinput";
|
|
821
|
+
// import Input from "./input";
|
|
822
|
+
// import JsonInput from "./jsoninput";
|
|
823
|
+
// import NativeSelect from "./nativeselect";
|
|
824
|
+
// import NumberInput from "./numberinput";
|
|
825
|
+
// import PasswordInput from "./passwordinput";
|
|
826
|
+
// import PinInput from "./pininput";
|
|
827
|
+
// import Radio from "./radio";
|
|
828
|
+
// import Rating from "./rating";
|
|
829
|
+
// import SegmentedControl from "./segmentedcontrol";
|
|
830
|
+
// import Slider from "./slider";
|
|
831
|
+
// import Switch from "./switch";
|
|
832
|
+
// import Textarea from "./textarea";
|
|
833
|
+
// import TextInput from "./textinput";
|
|
834
|
+
// import Autocomplete from "./autocomplete";
|
|
835
|
+
// import Combobox from "./combobox";
|
|
836
|
+
// import MultiSelect from "./multiselect";
|
|
837
|
+
// import Pill from "./pill";
|
|
838
|
+
// import PillsInput from "./pillsinput";
|
|
839
|
+
// import Select from "./select";
|
|
840
|
+
// import TagsInput from "./tagsinput";
|
|
841
|
+
// import Icon from "./icon";
|
|
842
|
+
// import Button from "./button";
|
|
843
|
+
// import CloseButton from "./closebutton";
|
|
844
|
+
// import FileButton from "./filebutton";
|
|
845
|
+
// import UnstyledButton from "./unstyledbutton";
|
|
846
|
+
// import Anchor from "./anchor";
|
|
847
|
+
// import Breadcrumbs from "./breadcrumbs";
|
|
848
|
+
// import Burger from "./burger";
|
|
849
|
+
// import NavLink from "./navlink";
|
|
850
|
+
// import Pagination from "./pagination";
|
|
851
|
+
// import Stepper from "./stepper";
|
|
852
|
+
// import Tabs from "./tabs";
|
|
853
|
+
// import Table from "./table";
|
|
854
|
+
// import Title from "./title";
|
|
855
|
+
// import Text from "./text";
|
|
856
|
+
// import Tree from "./tree";
|
|
857
|
+
// import Transition from "./transition";
|
|
858
|
+
// import Image from "./image";
|
|
859
|
+
// import InViewport from "./inviewport";
|
|
860
|
+
// import Hoverable from "./hoverable";
|
|
861
|
+
// import Arrow from "./arrow";
|
|
862
|
+
// import InfoBox from "./infobox";
|
|
863
|
+
|
|
864
|
+
// export const UI = {
|
|
865
|
+
// /**
|
|
866
|
+
// * @description The affix UI element to pin content to the top or bottom of the page
|
|
867
|
+
// */
|
|
868
|
+
// affix: Affix,
|
|
869
|
+
// /**
|
|
870
|
+
// * @description The alert UI element to display important messages or notifications
|
|
871
|
+
// * @example <UI.alert title="Hello World" />
|
|
872
|
+
// * @example <UI.alert title="Hello World" color="red" />
|
|
873
|
+
// * @example <UI.alert title="Hello World" withCloseButton />
|
|
874
|
+
// */
|
|
875
|
+
// alert: Alert,
|
|
876
|
+
// /**
|
|
877
|
+
// * @description The accordion UI element for collapsible content sections
|
|
878
|
+
// * @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} />
|
|
879
|
+
// * @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} defaultValue="1" />
|
|
880
|
+
// * @example <UI.accordion items={[{ id: "1", label: "Hello World", content: "Content here" }]} defaultValue="1" variant="separated" />
|
|
881
|
+
// */
|
|
882
|
+
// accordion: Accordion,
|
|
883
|
+
// /**
|
|
884
|
+
// * @description The terminal UI element for displaying command-line interface
|
|
885
|
+
// * @example <UI.terminal commands={["npm install", "npm start"]} />
|
|
886
|
+
// * @example <UI.terminal commands={["npm install"]} autorun />
|
|
887
|
+
// */
|
|
888
|
+
// terminal: Terminal,
|
|
889
|
+
// /**
|
|
890
|
+
// * @description The form UI element for collecting user input
|
|
891
|
+
// * @example <UI.form onSubmit={(values) => console.log(values)} />
|
|
892
|
+
// * @example <UI.form initialValues={{ name: "John" }} onSubmit={(values) => console.log(values)} />
|
|
893
|
+
// */
|
|
894
|
+
// form: Form,
|
|
895
|
+
// /**
|
|
896
|
+
// * @description The list UI element for displaying items in an organized manner
|
|
897
|
+
// * @example <UI.list
|
|
898
|
+
// * listStyleType="none"
|
|
899
|
+
// * items={[
|
|
900
|
+
// * {
|
|
901
|
+
// * children: (
|
|
902
|
+
// * <UI.alert title="Dynamic Imports" color="blue">
|
|
903
|
+
// * Efficiently load components with dynamic imports to
|
|
904
|
+
// * improve performance.
|
|
905
|
+
// * </UI.alert>
|
|
906
|
+
// * ),
|
|
907
|
+
// * },
|
|
908
|
+
// *
|
|
909
|
+
// * {
|
|
910
|
+
// * children: (
|
|
911
|
+
// * <UI.alert title="SSR Support" color="green">
|
|
912
|
+
// * Server-side rendering capabilities for faster initial
|
|
913
|
+
// * page loads and SEO benefits.
|
|
914
|
+
// * </UI.alert>
|
|
915
|
+
// * ),
|
|
916
|
+
// * },
|
|
917
|
+
// *
|
|
918
|
+
// * {
|
|
919
|
+
// * children: (
|
|
920
|
+
// * <UI.alert
|
|
921
|
+
// * title="Customizable UI Elements"
|
|
922
|
+
// * color="purple"
|
|
923
|
+
// * >
|
|
924
|
+
// * Easily customize UI components like alerts, tabs, and
|
|
925
|
+
// * grids to fit your design needs.
|
|
926
|
+
// * </UI.alert>
|
|
927
|
+
// * ),
|
|
928
|
+
// * },
|
|
929
|
+
// * ]}
|
|
930
|
+
// * />
|
|
931
|
+
// * @example <UI.list items={[{ children: <UI.text text="Item 1" /> }, { children: <UI.text text="Item 2" /> }]} />
|
|
932
|
+
// */
|
|
933
|
+
// list: List,
|
|
934
|
+
// /**
|
|
935
|
+
// * @description The actionicon UI element for icon buttons
|
|
936
|
+
// * @example <UI.actionicon><UI.icon icon="add" /></UI.actionicon>
|
|
937
|
+
// * @example <UI.actionicon variant="filled" color="blue"><UI.icon icon="search" /></UI.actionicon>
|
|
938
|
+
// */
|
|
939
|
+
// actionicon: ActionIcon,
|
|
940
|
+
// /**
|
|
941
|
+
// * @description The aspectratio UI element to maintain width/height ratio
|
|
942
|
+
// * @example <UI.aspectratio ratio={16/9}>Content here</UI.aspectratio>
|
|
943
|
+
// * @example <UI.aspectratio ratio={1}>Square content</UI.aspectratio>
|
|
944
|
+
// */
|
|
945
|
+
// aspectratio: AspectRatio,
|
|
946
|
+
// /**
|
|
947
|
+
// * @description The box UI element, a basic container for layout
|
|
948
|
+
// * @example <UI.box>Content here</UI.box>
|
|
949
|
+
// * @example <UI.box p={16} bg="gray.1">Content with padding and background</UI.box>
|
|
950
|
+
// */
|
|
951
|
+
// box: Box,
|
|
952
|
+
// /**
|
|
953
|
+
// * @description The video UI element for displaying video content
|
|
954
|
+
// * @example <UI.video src="https://example.com/video.mp4" />
|
|
955
|
+
// * @example <UI.video src="https://example.com/video.mp4" autoPlay />
|
|
956
|
+
// */
|
|
957
|
+
// video: Video,
|
|
958
|
+
// /**
|
|
959
|
+
// * @description The badge UI element for labels and status indicators
|
|
960
|
+
// * @example <UI.badge>New</UI.badge>
|
|
961
|
+
// * @example <UI.badge color="red">Important</UI.badge>
|
|
962
|
+
// */
|
|
963
|
+
// badge: Badge,
|
|
964
|
+
// /**
|
|
965
|
+
// * @description The card UI element for content containers with optional border and shadow
|
|
966
|
+
// * @example <UI.card>Card content</UI.card>
|
|
967
|
+
// * @example <UI.card withBorder shadow="md" p="md">Card with border and shadow</UI.card>
|
|
968
|
+
// */
|
|
969
|
+
// card: Card,
|
|
970
|
+
// /**
|
|
971
|
+
// * @description The center UI element for centering content horizontally and vertically
|
|
972
|
+
// * @example <UI.center>Centered content</UI.center>
|
|
973
|
+
// * @example <UI.center h={200}>Centered vertically and horizontally</UI.center>
|
|
974
|
+
// */
|
|
975
|
+
// center: Center,
|
|
976
|
+
// /**
|
|
977
|
+
// * @description The code UI element for displaying formatted code snippets
|
|
978
|
+
// * @example <UI.code code="const x = 5;" codeLang="javascript" />
|
|
979
|
+
// * @example <UI.code code="function hello() { return 'world'; }" codeLang="typescript" colorScheme="dark" />
|
|
980
|
+
// */
|
|
981
|
+
// code: Code,
|
|
982
|
+
// /**
|
|
983
|
+
// * @description The container UI element for responsive content width
|
|
984
|
+
// * @example <UI.container>Content with responsive max-width</UI.container>
|
|
985
|
+
// * @example <UI.container size="sm">Small container</UI.container>
|
|
986
|
+
// */
|
|
987
|
+
// container: Container,
|
|
988
|
+
// /**
|
|
989
|
+
// * @description The divider UI element for visual separation
|
|
990
|
+
// * @example <UI.divider />
|
|
991
|
+
// * @example <UI.divider label="Section" labelPosition="center" />
|
|
992
|
+
// */
|
|
993
|
+
// divider: Divider,
|
|
994
|
+
// /**
|
|
995
|
+
// * @description The flex UI element for flexible layouts using flexbox
|
|
996
|
+
// * @example <UI.flex>Flex container</UI.flex>
|
|
997
|
+
// * @example <UI.flex direction="column" gap={8} align="center">Column flex layout</UI.flex>
|
|
998
|
+
// */
|
|
999
|
+
// flex: Flex,
|
|
1000
|
+
// /**
|
|
1001
|
+
// * @description The grid UI element for creating grid layouts
|
|
1002
|
+
// * @example <UI.grid>Grid container</UI.grid>
|
|
1003
|
+
// * @example <UI.grid cols={3} gutter="md">Three column grid</UI.grid>
|
|
1004
|
+
// */
|
|
1005
|
+
// grid: Grid,
|
|
1006
|
+
// /**
|
|
1007
|
+
// * @description The simplegrid UI element for basic grid layouts
|
|
1008
|
+
// * @example <UI.simplegrid>Simple grid</UI.simplegrid>
|
|
1009
|
+
// * @example <UI.simplegrid cols={2}>Two column grid</UI.simplegrid>
|
|
1010
|
+
// */
|
|
1011
|
+
// simplegrid: SimpleGrid,
|
|
1012
|
+
// /**
|
|
1013
|
+
// * @description The space UI element for adding vertical or horizontal space
|
|
1014
|
+
// * @example <UI.space h={20} />
|
|
1015
|
+
// * @example <UI.space w={10} />
|
|
1016
|
+
// */
|
|
1017
|
+
// space: Space,
|
|
1018
|
+
// /**
|
|
1019
|
+
// * @description The checkbox UI element for boolean selections
|
|
1020
|
+
// * @example <UI.checkbox label="Accept terms" />
|
|
1021
|
+
// * @example <UI.checkbox label="Subscribe" defaultChecked />
|
|
1022
|
+
// */
|
|
1023
|
+
// checkbox: Checkbox,
|
|
1024
|
+
// /**
|
|
1025
|
+
// * @description The chip UI element for toggleable selection items
|
|
1026
|
+
// * @example <UI.chip value="react">React</UI.chip>
|
|
1027
|
+
// * @example <UI.chip value="vue" checked>Vue</UI.chip>
|
|
1028
|
+
// */
|
|
1029
|
+
// chip: Chip,
|
|
1030
|
+
// /**
|
|
1031
|
+
// * @description The colorinput UI element for selecting colors with text input
|
|
1032
|
+
// * @example <UI.colorinput label="Pick a color" />
|
|
1033
|
+
// * @example <UI.colorinput label="Theme color" defaultValue="#1C7ED6" />
|
|
1034
|
+
// */
|
|
1035
|
+
// colorinput: ColorInput,
|
|
1036
|
+
// /**
|
|
1037
|
+
// * @description The colorpicker UI element for selecting colors visually
|
|
1038
|
+
// * @example <UI.colorpicker />
|
|
1039
|
+
// * @example <UI.colorpicker format="rgba" swatches={['#F44336', '#2196F3']} />
|
|
1040
|
+
// */
|
|
1041
|
+
// colorpicker: ColorPicker,
|
|
1042
|
+
// /**
|
|
1043
|
+
// * @description The fieldset UI element for grouping form controls
|
|
1044
|
+
// * @example <UI.fieldset legend="Personal Information">Form fields here</UI.fieldset>
|
|
1045
|
+
// * @example <UI.fieldset legend="Contact" variant="filled">Contact fields</UI.fieldset>
|
|
1046
|
+
// */
|
|
1047
|
+
// fieldset: Fieldset,
|
|
1048
|
+
// /**
|
|
1049
|
+
// * @description The fileinput UI element for file uploads
|
|
1050
|
+
// * @example <UI.fileinput label="Upload file" />
|
|
1051
|
+
// * @example <UI.fileinput label="Upload resume" accept=".pdf,.docx" />
|
|
1052
|
+
// */
|
|
1053
|
+
// fileinput: FileInput,
|
|
1054
|
+
// /**
|
|
1055
|
+
// * @description The input UI element, base component for text inputs
|
|
1056
|
+
// * @example <UI.input placeholder="Enter value" />
|
|
1057
|
+
// * @example <UI.input placeholder="Search" leftSection={<UI.icon icon="search" />} />
|
|
1058
|
+
// */
|
|
1059
|
+
// input: Input,
|
|
1060
|
+
// /**
|
|
1061
|
+
// * @description The jsoninput UI element for structured JSON data entry
|
|
1062
|
+
// * @example <UI.jsoninput label="Config" />
|
|
1063
|
+
// * @example <UI.jsoninput label="Settings" defaultValue={{ theme: "light" }} />
|
|
1064
|
+
// */
|
|
1065
|
+
// jsoninput: JsonInput,
|
|
1066
|
+
// /**
|
|
1067
|
+
// * @description The nativeselect UI element for dropdown selection using native controls
|
|
1068
|
+
// * @example <UI.nativeselect data={["Option 1", "Option 2"]} />
|
|
1069
|
+
// * @example <UI.nativeselect label="Country" data={["USA", "Canada", "UK"]} />
|
|
1070
|
+
// */
|
|
1071
|
+
// nativeselect: NativeSelect,
|
|
1072
|
+
// /**
|
|
1073
|
+
// * @description The numberinput UI element for numeric value entry
|
|
1074
|
+
// * @example <UI.numberinput label="Quantity" />
|
|
1075
|
+
// * @example <UI.numberinput label="Price" min={0} step={0.01} precision={2} />
|
|
1076
|
+
// */
|
|
1077
|
+
// numberinput: NumberInput,
|
|
1078
|
+
// /**
|
|
1079
|
+
// * @description The passwordinput UI element for secure password entry
|
|
1080
|
+
// * @example <UI.passwordinput label="Password" />
|
|
1081
|
+
// * @example <UI.passwordinput label="Password" withStrengthMeter />
|
|
1082
|
+
// */
|
|
1083
|
+
// passwordinput: PasswordInput,
|
|
1084
|
+
// /**
|
|
1085
|
+
// * @description The pininput UI element for code verification input
|
|
1086
|
+
// * @example <UI.pininput length={4} />
|
|
1087
|
+
// * @example <UI.pininput length={6} oneTimeCode />
|
|
1088
|
+
// */
|
|
1089
|
+
// pininput: PinInput,
|
|
1090
|
+
// /**
|
|
1091
|
+
// * @description The radio UI element for single-option selection
|
|
1092
|
+
// * @example <UI.radio label="Option 1" name="option" value="1" />
|
|
1093
|
+
// * @example <UI.radio label="Option 2" name="option" value="2" defaultChecked />
|
|
1094
|
+
// */
|
|
1095
|
+
// radio: Radio,
|
|
1096
|
+
// /**
|
|
1097
|
+
// * @description The rating UI element for visual scoring
|
|
1098
|
+
// * @example <UI.rating defaultValue={3} />
|
|
1099
|
+
// * @example <UI.rating count={10} fractions={2} />
|
|
1100
|
+
// */
|
|
1101
|
+
// rating: Rating,
|
|
1102
|
+
// /**
|
|
1103
|
+
// * @description The segmentedcontrol UI element for button-like option selection
|
|
1104
|
+
// * @example <UI.segmentedcontrol data={["React", "Angular", "Vue"]} />
|
|
1105
|
+
// * @example <UI.segmentedcontrol data={[{label: "S", value: "sm"}, {label: "M", value: "md"}]} />
|
|
1106
|
+
// */
|
|
1107
|
+
// segmentedcontrol: SegmentedControl,
|
|
1108
|
+
// /**
|
|
1109
|
+
// * @description The slider UI element for selecting value from a range
|
|
1110
|
+
// * @example <UI.slider defaultValue={50} />
|
|
1111
|
+
// * @example <UI.slider min={0} max={100} step={5} marks={[{value: 20, label: '20%'}, {value: 80, label: '80%'}]} />
|
|
1112
|
+
// */
|
|
1113
|
+
// slider: Slider,
|
|
1114
|
+
// /**
|
|
1115
|
+
// * @description The switch UI element for toggling options
|
|
1116
|
+
// * @example <UI.switch label="Dark mode" />
|
|
1117
|
+
// * @example <UI.switch label="Notifications" defaultChecked size="lg" />
|
|
1118
|
+
// */
|
|
1119
|
+
// switch: Switch,
|
|
1120
|
+
// /**
|
|
1121
|
+
// * @description The textarea UI element for multi-line text input
|
|
1122
|
+
// * @example <UI.textarea placeholder="Enter description" />
|
|
1123
|
+
// * @example <UI.textarea label="Bio" autosize minRows={3} maxRows={6} />
|
|
1124
|
+
// */
|
|
1125
|
+
// textarea: Textarea,
|
|
1126
|
+
// /**
|
|
1127
|
+
// * @description The textinput UI element for single-line text input
|
|
1128
|
+
// * @example <UI.textinput placeholder="Username" />
|
|
1129
|
+
// * @example <UI.textinput label="Email" type="email" required />
|
|
1130
|
+
// */
|
|
1131
|
+
// textinput: TextInput,
|
|
1132
|
+
// /**
|
|
1133
|
+
// * @description The autocomplete UI element for text input with suggestions
|
|
1134
|
+
// * @example <UI.autocomplete data={["React", "Angular", "Vue"]} label="Framework" />
|
|
1135
|
+
// * @example <UI.autocomplete data={["USA", "Canada", "UK"]} placeholder="Country" limit={5} />
|
|
1136
|
+
// */
|
|
1137
|
+
// autocomplete: Autocomplete,
|
|
1138
|
+
// /**
|
|
1139
|
+
// * @description The combobox UI element for customizable dropdown selection
|
|
1140
|
+
// * @example <UI.combobox data={["Option 1", "Option 2"]} />
|
|
1141
|
+
// * @example <UI.combobox data={[{value: "1", label: "Option 1"}, {value: "2", label: "Option 2"}]} searchable />
|
|
1142
|
+
// */
|
|
1143
|
+
// combobox: Combobox,
|
|
1144
|
+
// /**
|
|
1145
|
+
// * @description The multiselect UI element for selecting multiple options
|
|
1146
|
+
// * @example <UI.multiselect data={["React", "Angular", "Vue"]} label="Frameworks" />
|
|
1147
|
+
// * @example <UI.multiselect data={["JavaScript", "TypeScript", "Python"]} label="Languages" searchable />
|
|
1148
|
+
// */
|
|
1149
|
+
// multiselect: MultiSelect,
|
|
1150
|
+
// /**
|
|
1151
|
+
// * @description The pill UI element for displaying compact information
|
|
1152
|
+
// * @example <UI.pill>New</UI.pill>
|
|
1153
|
+
// * @example <UI.pill withRemoveButton>Removable</UI.pill>
|
|
1154
|
+
// */
|
|
1155
|
+
// pill: Pill,
|
|
1156
|
+
// /**
|
|
1157
|
+
// * @description The pillsinput UI element for creating tags/pills from input
|
|
1158
|
+
// * @example <UI.pillsinput label="Tags" />
|
|
1159
|
+
// * @example <UI.pillsinput label="Skills" defaultValue={["React", "TypeScript"]} />
|
|
1160
|
+
// */
|
|
1161
|
+
// pillsinput: PillsInput,
|
|
1162
|
+
// /**
|
|
1163
|
+
// * @description The select UI element for dropdown selection
|
|
1164
|
+
// * @example <UI.select data={["Option 1", "Option 2"]} label="Choose one" />
|
|
1165
|
+
// * @example <UI.select data={[{value: "js", label: "JavaScript"}, {value: "ts", label: "TypeScript"}]} searchable />
|
|
1166
|
+
// */
|
|
1167
|
+
// select: Select,
|
|
1168
|
+
// /**
|
|
1169
|
+
// * @description The tagsinput UI element for creating tags from input
|
|
1170
|
+
// * @example <UI.tagsinput label="Tags" />
|
|
1171
|
+
// * @example <UI.tagsinput label="Technologies" defaultValue={["React", "Next.js"]} />
|
|
1172
|
+
// */
|
|
1173
|
+
// tagsinput: TagsInput,
|
|
1174
|
+
// /**
|
|
1175
|
+
// * @description The icon UI element for displaying vector icons
|
|
1176
|
+
// * @example <UI.icon icon="user" />
|
|
1177
|
+
// * @example <UI.icon icon="settings" color="blue" size={24} />
|
|
1178
|
+
// */
|
|
1179
|
+
// icon: Icon,
|
|
1180
|
+
// /**
|
|
1181
|
+
// * @description The button UI element for user interaction
|
|
1182
|
+
// * @example <UI.button>Click me</UI.button>
|
|
1183
|
+
// * @example <UI.button variant="filled" color="green" size="lg">Submit</UI.button>
|
|
1184
|
+
// */
|
|
1185
|
+
// button: Button,
|
|
1186
|
+
// /**
|
|
1187
|
+
// * @description The closebutton UI element for dismissing content
|
|
1188
|
+
// * @example <UI.closebutton />
|
|
1189
|
+
// * @example <UI.closebutton size="lg" color="red" />
|
|
1190
|
+
// */
|
|
1191
|
+
// closebutton: CloseButton,
|
|
1192
|
+
// /**
|
|
1193
|
+
// * @description The filebutton UI element for file selection with button appearance
|
|
1194
|
+
// * @example <UI.filebutton>Upload file</UI.filebutton>
|
|
1195
|
+
// * @example <UI.filebutton accept="image/*" multiple>Select images</UI.filebutton>
|
|
1196
|
+
// */
|
|
1197
|
+
// filebutton: FileButton,
|
|
1198
|
+
// /**
|
|
1199
|
+
// * @description The unstyledbutton UI element for button functionality without styling
|
|
1200
|
+
// * @example <UI.unstyledbutton>Text only button</UI.unstyledbutton>
|
|
1201
|
+
// * @example <UI.unstyledbutton onClick={() => alert('Clicked')}>Custom styled button</UI.unstyledbutton>
|
|
1202
|
+
// */
|
|
1203
|
+
// unstyledbutton: UnstyledButton,
|
|
1204
|
+
// /**
|
|
1205
|
+
// * @description The anchor UI element for navigation links
|
|
1206
|
+
// * @example <UI.anchor href="/about">About</UI.anchor>
|
|
1207
|
+
// * @example <UI.anchor href="https://example.com" target="_blank">External link</UI.anchor>
|
|
1208
|
+
// */
|
|
1209
|
+
// anchor: Anchor,
|
|
1210
|
+
// /**
|
|
1211
|
+
// * @description The breadcrumbs UI element for navigation path display
|
|
1212
|
+
// * @example <UI.breadcrumbs items={[{title: 'Home', href: '/'}, {title: 'Blog', href: '/blog'}]} />
|
|
1213
|
+
// * @example <UI.breadcrumbs separator="→" items={[{title: 'Dashboard', href: '/dashboard'}, {title: 'Settings'}]} />
|
|
1214
|
+
// */
|
|
1215
|
+
// breadcrumbs: Breadcrumbs,
|
|
1216
|
+
// /**
|
|
1217
|
+
// * @description The burger UI element for toggle button (typically for mobile menus)
|
|
1218
|
+
// * @example <UI.burger opened={false} onClick={() => setOpened(!opened)} />
|
|
1219
|
+
// * @example <UI.burger opened={menuOpen} color="blue" size="lg" />
|
|
1220
|
+
// */
|
|
1221
|
+
// burger: Burger,
|
|
1222
|
+
// /**
|
|
1223
|
+
// * @description The navlink UI element for navigation menu items
|
|
1224
|
+
// * @example <UI.navlink label="Dashboard" />
|
|
1225
|
+
// * @example <UI.navlink label="Settings" icon={<UI.icon icon="settings" />} active />
|
|
1226
|
+
// */
|
|
1227
|
+
// navlink: NavLink,
|
|
1228
|
+
// /**
|
|
1229
|
+
// * @description The pagination UI element for navigating through pages
|
|
1230
|
+
// * @example <UI.pagination total={10} />
|
|
1231
|
+
// * @example <UI.pagination total={20} initialPage={3} boundaries={1} siblings={1} />
|
|
1232
|
+
// */
|
|
1233
|
+
// pagination: Pagination,
|
|
1234
|
+
// /**
|
|
1235
|
+
// * @description The stepper UI element for multi-step processes
|
|
1236
|
+
// * @example <UI.stepper active={1} steps={["Step 1", "Step 2", "Step 3"]} />
|
|
1237
|
+
// * @example <UI.stepper active={0} orientation="vertical" steps={["Account", "Address", "Confirm"]} />
|
|
1238
|
+
// */
|
|
1239
|
+
// stepper: Stepper,
|
|
1240
|
+
// /**
|
|
1241
|
+
// * @description The tabs UI element for tabbed content navigation
|
|
1242
|
+
// * @example <UI.tabs tabs={[{header: "Tab 1", content: "Content 1", value: "1"}, {header: "Tab 2", content: "Content 2", value: "2"}]} />
|
|
1243
|
+
// * @example <UI.tabs tabs={[{header: "Profile", icon: <UI.icon icon="user" />, content: "Profile content", value: "profile"}]} variant="pills" />
|
|
1244
|
+
// */
|
|
1245
|
+
// tabs: Tabs,
|
|
1246
|
+
// /**
|
|
1247
|
+
// * @description The table UI element for displaying tabular data with sorting, pagination and customization options
|
|
1248
|
+
// * @example <UI.table
|
|
1249
|
+
// * data={[
|
|
1250
|
+
// * { id: 1, name: 'John', age: 30 },
|
|
1251
|
+
// * { id: 2, name: 'Jane', age: 25 }
|
|
1252
|
+
// * ]}
|
|
1253
|
+
// * columns={[
|
|
1254
|
+
// * { accessor: 'name', title: 'Name' },
|
|
1255
|
+
// * { accessor: 'age', title: 'Age' }
|
|
1256
|
+
// * ]}
|
|
1257
|
+
// * />
|
|
1258
|
+
// * @example <UI.table
|
|
1259
|
+
// * data={products}
|
|
1260
|
+
// * columns={[
|
|
1261
|
+
// * { accessor: 'name', title: 'Product' },
|
|
1262
|
+
// * { accessor: 'price', title: 'Price', render: (item) => `$${item.price}` }
|
|
1263
|
+
// * ]}
|
|
1264
|
+
// * striped
|
|
1265
|
+
// * highlightOnHover
|
|
1266
|
+
// * withColumnBorders
|
|
1267
|
+
// * />
|
|
1268
|
+
// */
|
|
1269
|
+
// table: Table,
|
|
1270
|
+
// /**
|
|
1271
|
+
// * @description The title UI element for section headings
|
|
1272
|
+
// * @example <UI.title text="Welcome" />
|
|
1273
|
+
// * @example <UI.title order={2} text="Section Title" />
|
|
1274
|
+
// */
|
|
1275
|
+
// title: Title,
|
|
1276
|
+
// /**
|
|
1277
|
+
// * @description The text UI element for displaying and styling text content with extensive typography controls
|
|
1278
|
+
// * @example <UI.text text="Hello World" /> // Basic text
|
|
1279
|
+
// * @example <UI.text
|
|
1280
|
+
// * text="Styled text"
|
|
1281
|
+
// * fz={20} // Font size
|
|
1282
|
+
// * fw={500} // Font weight
|
|
1283
|
+
// * tt="capitalize" // Text transform
|
|
1284
|
+
// * c="blue" // Color
|
|
1285
|
+
// * ta="center" // Text align
|
|
1286
|
+
// * lh={1.5} // Line height
|
|
1287
|
+
// * fs="italic" // Font style
|
|
1288
|
+
// * td="underline" // Text decoration
|
|
1289
|
+
// * />
|
|
1290
|
+
// * @example <UI.text
|
|
1291
|
+
// * text="Responsive text"
|
|
1292
|
+
// * fz={{ base: 14, sm: 16, lg: 18 }} // Responsive font sizes
|
|
1293
|
+
// * c={{ light: 'dark.9', dark: 'gray.2' }} // Theme-aware colors
|
|
1294
|
+
// * />
|
|
1295
|
+
// */
|
|
1296
|
+
// text: Text,
|
|
1297
|
+
// /**
|
|
1298
|
+
// * @description The tree UI element for hierarchical data display
|
|
1299
|
+
// * @example <UI.tree data={[{label: "Parent", children: [{label: "Child"}]}]} />
|
|
1300
|
+
// * @example <UI.tree data={[{label: "Documents", children: [{label: "Reports"}]}]} initiallyOpened={["0"]} />
|
|
1301
|
+
// */
|
|
1302
|
+
// tree: Tree,
|
|
1303
|
+
// /**
|
|
1304
|
+
// * @description The transition UI element for animating content appearance
|
|
1305
|
+
// * @example <UI.transition mounted transition="fade-up">{(styles) => <UI.text text="Text fades up" style={styles} />}</UI.transition>
|
|
1306
|
+
// * @example <UI.transition mounted transition="fade-down">{(styles) => <UI.text text="Text fades down" style={styles} />}</UI.transition>
|
|
1307
|
+
// */
|
|
1308
|
+
// transition: Transition,
|
|
1309
|
+
// /**
|
|
1310
|
+
// * @description The image UI element for displaying images with responsive sizing and loading optimizations
|
|
1311
|
+
// * @example <UI.image src="/image.jpg" alt="Description" /> // Basic image
|
|
1312
|
+
// * @example <UI.image
|
|
1313
|
+
// * src="/image.jpg"
|
|
1314
|
+
// * alt="Description"
|
|
1315
|
+
// * height={300}
|
|
1316
|
+
// * width={400}
|
|
1317
|
+
// * fit="contain" // 'cover', 'fill', 'none', 'scale-down'
|
|
1318
|
+
// * radius="md" // Border radius
|
|
1319
|
+
// * withPlaceholder // Shows placeholder while loading
|
|
1320
|
+
// * loading="lazy" // Lazy loading
|
|
1321
|
+
// * />
|
|
1322
|
+
// * @example <UI.image
|
|
1323
|
+
// * src="/banner.jpg"
|
|
1324
|
+
// * alt="Banner"
|
|
1325
|
+
// * height="auto"
|
|
1326
|
+
// * width="100%"
|
|
1327
|
+
// * styles={{ image: { objectPosition: 'top center' } }}
|
|
1328
|
+
// * />
|
|
1329
|
+
// */
|
|
1330
|
+
// image: Image,
|
|
1331
|
+
// /**
|
|
1332
|
+
// * @description The inviewport UI element to detect when content is visible in viewport
|
|
1333
|
+
// * @example <UI.inviewport onEnterViewport={() => console.log('Visible')}>Content</UI.inviewport>
|
|
1334
|
+
// * @example <UI.inviewport threshold={0.5}>Appears when 50% visible</UI.inviewport>
|
|
1335
|
+
// */
|
|
1336
|
+
// inviewport: InViewport,
|
|
1337
|
+
// /**
|
|
1338
|
+
// * @description The hoverable UI element for hover state detection
|
|
1339
|
+
// * @example <UI.hoverable>{(hovered) => <div>Hover me: {hovered ? 'Hovered' : 'Not hovered'}</div>}</UI.hoverable>
|
|
1340
|
+
// * @example <UI.hoverable>{(hovered) => <UI.box bg={hovered ? 'blue.1' : 'transparent'}>Hover effect</UI.box>}</UI.hoverable>
|
|
1341
|
+
// */
|
|
1342
|
+
// hoverable: Hoverable,
|
|
1343
|
+
// /**
|
|
1344
|
+
// * @description The arrow UI element for pointers and indicators
|
|
1345
|
+
// * @example <UI.arrow />
|
|
1346
|
+
// * @example <UI.arrow size={12} position="center" />
|
|
1347
|
+
// */
|
|
1348
|
+
// arrow: Arrow,
|
|
1349
|
+
// /**
|
|
1350
|
+
// * @description The infobox UI element for displaying information in a box
|
|
1351
|
+
// * @example <UI.infobox title="Info" description="This is an info box" />
|
|
1352
|
+
// * @example <UI.infobox title="Warning" description="This is a warning box" color="red" />
|
|
1353
|
+
// */
|
|
1354
|
+
// infobox: InfoBox,
|
|
1355
|
+
// };
|