@axzydev/axzy_ui_system 1.2.9 → 1.2.11
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 +6 -0
- package/dist/index.cjs +141 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +141 -5
- package/dist/index.d.ts +141 -5
- package/dist/index.js +141 -73
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/snippets/axzy-ui-system.code-snippets +547 -0
- package/src/App.tsx +37 -34
- package/src/components/avatar/avatar.props.ts +12 -1
- package/src/components/avatar/avatar.stories.tsx +19 -0
- package/src/components/avatar/avatar.tsx +26 -3
- package/src/components/confirm-dialog/confirm-dialog.tsx +1 -1
- package/src/components/data-table/dataTable.props.ts +10 -0
- package/src/components/data-table/dataTable.tsx +24 -13
- package/src/components/date-picker/datePicker.tsx +1 -1
- package/src/components/dialog/dialog.tsx +2 -1
- package/src/components/drawer/drawer.tsx +1 -1
- package/src/components/dropfile/dropfile.props.ts +6 -0
- package/src/components/dropfile/dropfile.tsx +51 -16
- package/src/components/layout/layout.tsx +1 -1
- package/src/components/navbar/navbar.tsx +2 -2
- package/src/components/popover/popover.tsx +1 -1
- package/src/components/search-select/search-select.tsx +4 -4
- package/src/components/select/select.tsx +6 -8
- package/src/components/sidebar/sidebar.tsx +15 -15
- package/src/components/stepper/stepper.props.ts +4 -0
- package/src/components/table/table.props.ts +21 -3
- package/src/components/table/table.tsx +24 -13
- package/src/components/theme-provider/themeProvider.props.ts +21 -3
- package/src/components/time-picker/timePicker.tsx +1 -1
- package/src/components/toast/toast.tsx +1 -1
- package/src/components/tooltip/tooltip.tsx +1 -1
- package/src/components/topbar/topbar.tsx +1 -1
- package/src/dev.css +1 -1
- package/src/hooks/useClickOutside.ts +8 -0
- package/src/hooks/useTableState.ts +5 -2
- package/src/index.css +1 -1
- package/src/showcases/HomeShowcase.tsx +95 -3
- package/src/theme/theme.ts +21 -0
- package/src/types/field.types.ts +70 -7
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"packageManager": "pnpm@10.34.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"version": "1.2.
|
|
7
|
+
"version": "1.2.11",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"sideEffects": [
|
|
10
10
|
"*.css"
|
|
@@ -23,11 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
|
-
"src"
|
|
26
|
+
"src",
|
|
27
|
+
"snippets"
|
|
27
28
|
],
|
|
28
29
|
"scripts": {
|
|
29
30
|
"dev": "vite",
|
|
30
|
-
"build": "
|
|
31
|
+
"build": "pnpm bundle",
|
|
31
32
|
"build:app": "tsc -b && vite build -c vite.app.config.ts",
|
|
32
33
|
"build:css": "node scripts/build-css.mjs",
|
|
33
34
|
"lint": "eslint .",
|
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ITAlert": {
|
|
3
|
+
"prefix": "italert",
|
|
4
|
+
"description": "AXZY UI: Alert banner",
|
|
5
|
+
"body": [
|
|
6
|
+
"<ITAlert variant=\"${1|info,success,warning,error|}\" title=\"${2:Title}\">",
|
|
7
|
+
" ${3:Message}",
|
|
8
|
+
"</ITAlert>",
|
|
9
|
+
"$0"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"ITAvatar": {
|
|
13
|
+
"prefix": "itavatar",
|
|
14
|
+
"description": "AXZY UI: Avatar",
|
|
15
|
+
"body": [
|
|
16
|
+
"<ITAvatar initials=\"${1:AB}\" size=\"${2|small,medium,large|}\" />",
|
|
17
|
+
"$0"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"ITBadget": {
|
|
21
|
+
"prefix": "itbadget",
|
|
22
|
+
"description": "AXZY UI: Badge",
|
|
23
|
+
"body": [
|
|
24
|
+
"<ITBadget label=\"${1:Label}\" color=\"${2|primary,secondary,success,danger,warning,info,purple|}\" variant=\"${3|filled,outlined|}\" />",
|
|
25
|
+
"$0"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"ITBreadcrumbs": {
|
|
29
|
+
"prefix": "itbreadcrumbs",
|
|
30
|
+
"description": "AXZY UI: Breadcrumbs",
|
|
31
|
+
"body": [
|
|
32
|
+
"<ITBreadcrumbs",
|
|
33
|
+
" items={[",
|
|
34
|
+
" { label: \"${1:Home}\", href: \"${2:/}\" },",
|
|
35
|
+
" { label: \"${3:Current}\" },",
|
|
36
|
+
" ]}",
|
|
37
|
+
"/>",
|
|
38
|
+
"$0"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"ITButton": {
|
|
42
|
+
"prefix": "itbutton",
|
|
43
|
+
"description": "AXZY UI: Button",
|
|
44
|
+
"body": [
|
|
45
|
+
"<ITButton",
|
|
46
|
+
" variant=\"${1|filled,outlined,raised,rounded,text,raised-text,icon-only,link|}\"",
|
|
47
|
+
" color=\"${2|primary,secondary,success,danger,warning,info,purple|}\"",
|
|
48
|
+
" size=\"${3|small,medium,large|}\"",
|
|
49
|
+
" onClick={${4:handleClick}}",
|
|
50
|
+
">",
|
|
51
|
+
" ${5:Label}",
|
|
52
|
+
"</ITButton>",
|
|
53
|
+
"$0"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"ITCalendar": {
|
|
57
|
+
"prefix": "itcalendar",
|
|
58
|
+
"description": "AXZY UI: Calendar",
|
|
59
|
+
"body": [
|
|
60
|
+
"<ITCalendar",
|
|
61
|
+
" mode=\"${1|month,week,day|}\"",
|
|
62
|
+
" events={${2:events}}",
|
|
63
|
+
" onEventClick={(event) => {$3}}",
|
|
64
|
+
"/>",
|
|
65
|
+
"$0"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"ITCard": {
|
|
69
|
+
"prefix": "itcard",
|
|
70
|
+
"description": "AXZY UI: Card",
|
|
71
|
+
"body": [
|
|
72
|
+
"<ITCard title=\"${1:Title}\">",
|
|
73
|
+
" ${2:Content}",
|
|
74
|
+
"</ITCard>",
|
|
75
|
+
"$0"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"ITCheckbox": {
|
|
79
|
+
"prefix": "itcheckbox",
|
|
80
|
+
"description": "AXZY UI: Checkbox",
|
|
81
|
+
"body": [
|
|
82
|
+
"<ITCheckbox",
|
|
83
|
+
" checked={${1:checked}}",
|
|
84
|
+
" onChange={(checked) => {$2}}",
|
|
85
|
+
" label=\"${3:Label}\"",
|
|
86
|
+
"/>",
|
|
87
|
+
"$0"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"ITConfirmDialog": {
|
|
91
|
+
"prefix": "itconfirmdialog",
|
|
92
|
+
"description": "AXZY UI: Confirm dialog",
|
|
93
|
+
"body": [
|
|
94
|
+
"<ITConfirmDialog",
|
|
95
|
+
" isOpen={${1:isOpen}}",
|
|
96
|
+
" onClose={${2:handleClose}}",
|
|
97
|
+
" onConfirm={${3:handleConfirm}}",
|
|
98
|
+
" title=\"${4:Are you sure?}\"",
|
|
99
|
+
" message=\"${5:This action cannot be undone.}\"",
|
|
100
|
+
"/>",
|
|
101
|
+
"$0"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"ITDataTable": {
|
|
105
|
+
"prefix": "itdatatable",
|
|
106
|
+
"description": "AXZY UI: Server-side data table",
|
|
107
|
+
"body": [
|
|
108
|
+
"<ITDataTable",
|
|
109
|
+
" title=\"${1:Title}\"",
|
|
110
|
+
" columns={[",
|
|
111
|
+
" { key: \"${2:field}\", label: \"${3:Label}\", type: \"string\", sortable: true, filter: true },",
|
|
112
|
+
" ]}",
|
|
113
|
+
" fetchData={async ({ page, limit, filters, sort }) => {",
|
|
114
|
+
" ${4:const response = await api.fetchItems({ page, limit, filters, sort });}",
|
|
115
|
+
" return { data: ${5:response.data}, total: ${6:response.total} };",
|
|
116
|
+
" }}",
|
|
117
|
+
"/>",
|
|
118
|
+
"$0"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"ITDatePicker": {
|
|
122
|
+
"prefix": "itdatepicker",
|
|
123
|
+
"description": "AXZY UI: Date picker",
|
|
124
|
+
"body": [
|
|
125
|
+
"<ITDatePicker",
|
|
126
|
+
" name=\"${1:date}\"",
|
|
127
|
+
" label=\"${2:Date}\"",
|
|
128
|
+
" value={${3:value}}",
|
|
129
|
+
" onChange={(e) => {$4}}",
|
|
130
|
+
"/>",
|
|
131
|
+
"$0"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"ITDialog": {
|
|
135
|
+
"prefix": "itdialog",
|
|
136
|
+
"description": "AXZY UI: Dialog / modal",
|
|
137
|
+
"body": [
|
|
138
|
+
"<ITDialog isOpen={${1:isOpen}} onClose={${2:handleClose}}>",
|
|
139
|
+
" ${3:Content}",
|
|
140
|
+
"</ITDialog>",
|
|
141
|
+
"$0"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"ITDivider": {
|
|
145
|
+
"prefix": "itdivider",
|
|
146
|
+
"description": "AXZY UI: Divider",
|
|
147
|
+
"body": [
|
|
148
|
+
"<ITDivider orientation=\"${1|horizontal,vertical|}\" />",
|
|
149
|
+
"$0"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"ITDrawer": {
|
|
153
|
+
"prefix": "itdrawer",
|
|
154
|
+
"description": "AXZY UI: Slide-in drawer",
|
|
155
|
+
"body": [
|
|
156
|
+
"<ITDrawer isOpen={${1:isOpen}} onClose={${2:handleClose}} position=\"${3|left,right|}\">",
|
|
157
|
+
" ${4:Content}",
|
|
158
|
+
"</ITDrawer>",
|
|
159
|
+
"$0"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"ITDropfile": {
|
|
163
|
+
"prefix": "itdropfile",
|
|
164
|
+
"description": "AXZY UI: File drop/upload area",
|
|
165
|
+
"body": [
|
|
166
|
+
"<ITDropfile onFileSelect={(file) => {$1}} />",
|
|
167
|
+
"$0"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"ITEmptyState": {
|
|
171
|
+
"prefix": "itemptystate",
|
|
172
|
+
"description": "AXZY UI: Empty state placeholder",
|
|
173
|
+
"body": [
|
|
174
|
+
"<ITEmptyState title=\"${1:No results found}\" description=\"${2:Try adjusting your filters.}\" />",
|
|
175
|
+
"$0"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"ITFlex": {
|
|
179
|
+
"prefix": "itflex",
|
|
180
|
+
"description": "AXZY UI: Flex layout",
|
|
181
|
+
"body": [
|
|
182
|
+
"<ITFlex direction=\"${1|row,column|}\" align=\"${2|start,center,end,stretch|}\" justify=\"${3|start,center,end,between,around|}\" gap={${4:4}}>",
|
|
183
|
+
" $5",
|
|
184
|
+
"</ITFlex>",
|
|
185
|
+
"$0"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"ITFormBuilder": {
|
|
189
|
+
"prefix": "itformbuilder",
|
|
190
|
+
"description": "AXZY UI: Dynamic form builder (Formik-driven)",
|
|
191
|
+
"body": [
|
|
192
|
+
"<ITFormBuilder",
|
|
193
|
+
" config={[",
|
|
194
|
+
" { name: \"${1:field}\", label: \"${2:Label}\", type: \"text\" },",
|
|
195
|
+
" ]}",
|
|
196
|
+
" values={${3:values}}",
|
|
197
|
+
" handleChange={${4:handleChange}}",
|
|
198
|
+
" handleBlur={${5:handleBlur}}",
|
|
199
|
+
" touched={${6:touched}}",
|
|
200
|
+
" errors={${7:errors}}",
|
|
201
|
+
"/>",
|
|
202
|
+
"$0"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"ITFormHeader": {
|
|
206
|
+
"prefix": "itformheader",
|
|
207
|
+
"description": "AXZY UI: Form/modal header",
|
|
208
|
+
"body": [
|
|
209
|
+
"<ITFormHeader title=\"${1:Title}\" />",
|
|
210
|
+
"$0"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"ITGrid": {
|
|
214
|
+
"prefix": "itgrid",
|
|
215
|
+
"description": "AXZY UI: CSS grid layout",
|
|
216
|
+
"body": [
|
|
217
|
+
"<ITGrid columns={${1:12}} spacing={${2:4}}>",
|
|
218
|
+
" $3",
|
|
219
|
+
"</ITGrid>",
|
|
220
|
+
"$0"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"ITImage": {
|
|
224
|
+
"prefix": "itimage",
|
|
225
|
+
"description": "AXZY UI: Image with fallback",
|
|
226
|
+
"body": [
|
|
227
|
+
"<ITImage src=\"${1:/path/to/image.png}\" alt=\"${2:Description}\" />",
|
|
228
|
+
"$0"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"ITInput": {
|
|
232
|
+
"prefix": "itinput",
|
|
233
|
+
"description": "AXZY UI: Text input",
|
|
234
|
+
"body": [
|
|
235
|
+
"<ITInput",
|
|
236
|
+
" name=\"${1:field}\"",
|
|
237
|
+
" label=\"${2:Label}\"",
|
|
238
|
+
" type=\"${3|text,password,email,number,textarea|}\"",
|
|
239
|
+
" value={${4:value}}",
|
|
240
|
+
" onChange={${5:handleChange}}",
|
|
241
|
+
"/>",
|
|
242
|
+
"$0"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"ITLayout": {
|
|
246
|
+
"prefix": "itlayout",
|
|
247
|
+
"description": "AXZY UI: App shell (sidebar + topbar)",
|
|
248
|
+
"body": [
|
|
249
|
+
"<ITLayout",
|
|
250
|
+
" topBar={{ userName: \"${1:User}\", menuItems: [] }}",
|
|
251
|
+
" sidebar={{ navigationItems: ${2:navigationItems} }}",
|
|
252
|
+
">",
|
|
253
|
+
" $3",
|
|
254
|
+
"</ITLayout>",
|
|
255
|
+
"$0"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"ITLoader": {
|
|
259
|
+
"prefix": "itloader",
|
|
260
|
+
"description": "AXZY UI: Loading spinner",
|
|
261
|
+
"body": [
|
|
262
|
+
"<ITLoader size=\"${1|small,medium,large|}\" />",
|
|
263
|
+
"$0"
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"ITNavbar": {
|
|
267
|
+
"prefix": "itnavbar",
|
|
268
|
+
"description": "AXZY UI: All-in-one nav layout",
|
|
269
|
+
"body": [
|
|
270
|
+
"<ITNavbar navigationItems={${1:navigationItems}} userName=\"${2:User}\">",
|
|
271
|
+
" $3",
|
|
272
|
+
"</ITNavbar>",
|
|
273
|
+
"$0"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"ITPage": {
|
|
277
|
+
"prefix": "itpage",
|
|
278
|
+
"description": "AXZY UI: Full page template",
|
|
279
|
+
"body": [
|
|
280
|
+
"<ITPage title=\"${1:Title}\" description=\"${2:Description}\">",
|
|
281
|
+
" $3",
|
|
282
|
+
"</ITPage>",
|
|
283
|
+
"$0"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"ITPageHeader": {
|
|
287
|
+
"prefix": "itpageheader",
|
|
288
|
+
"description": "AXZY UI: Page header",
|
|
289
|
+
"body": [
|
|
290
|
+
"<ITPageHeader title=\"${1:Title}\" />",
|
|
291
|
+
"$0"
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
"ITPagination": {
|
|
295
|
+
"prefix": "itpagination",
|
|
296
|
+
"description": "AXZY UI: Pagination",
|
|
297
|
+
"body": [
|
|
298
|
+
"<ITPagination",
|
|
299
|
+
" currentPage={${1:currentPage}}",
|
|
300
|
+
" totalPages={${2:totalPages}}",
|
|
301
|
+
" onPageChange={${3:setCurrentPage}}",
|
|
302
|
+
"/>",
|
|
303
|
+
"$0"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"ITPopover": {
|
|
307
|
+
"prefix": "itpopover",
|
|
308
|
+
"description": "AXZY UI: Popover",
|
|
309
|
+
"body": [
|
|
310
|
+
"<ITPopover trigger={${1:<ITButton>Open</ITButton>}}>",
|
|
311
|
+
" ${2:Popover content}",
|
|
312
|
+
"</ITPopover>",
|
|
313
|
+
"$0"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"ITProgress": {
|
|
317
|
+
"prefix": "itprogress",
|
|
318
|
+
"description": "AXZY UI: Progress bar",
|
|
319
|
+
"body": [
|
|
320
|
+
"<ITProgress value={${1:50}} color=\"${2|primary,secondary,success,danger,warning,info,purple|}\" />",
|
|
321
|
+
"$0"
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"ITRadioGroup": {
|
|
325
|
+
"prefix": "itradio",
|
|
326
|
+
"description": "AXZY UI: Radio group",
|
|
327
|
+
"body": [
|
|
328
|
+
"<ITRadioGroup",
|
|
329
|
+
" name=\"${1:field}\"",
|
|
330
|
+
" value={${2:value}}",
|
|
331
|
+
" onChange={(value) => {$3}}",
|
|
332
|
+
" options={[",
|
|
333
|
+
" { value: \"${4:a}\", label: \"${5:Option A}\" },",
|
|
334
|
+
" { value: \"${6:b}\", label: \"${7:Option B}\" },",
|
|
335
|
+
" ]}",
|
|
336
|
+
"/>",
|
|
337
|
+
"$0"
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
"ITSearchSelect": {
|
|
341
|
+
"prefix": "itsearchselect",
|
|
342
|
+
"description": "AXZY UI: Searchable select",
|
|
343
|
+
"body": [
|
|
344
|
+
"<ITSearchSelect",
|
|
345
|
+
" name=\"${1:field}\"",
|
|
346
|
+
" label=\"${2:Label}\"",
|
|
347
|
+
" options={${3:options}}",
|
|
348
|
+
" value={${4:value}}",
|
|
349
|
+
" onChange={${5:handleChange}}",
|
|
350
|
+
"/>",
|
|
351
|
+
"$0"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"ITSearchTable": {
|
|
355
|
+
"prefix": "itsearchtable",
|
|
356
|
+
"description": "AXZY UI: Search + sort + inline-edit table",
|
|
357
|
+
"body": [
|
|
358
|
+
"<ITSearchTable",
|
|
359
|
+
" columns={[",
|
|
360
|
+
" { key: \"${1:field}\", label: \"${2:Label}\", type: \"string\", sortable: true },",
|
|
361
|
+
" ]}",
|
|
362
|
+
" data={${3:data}}",
|
|
363
|
+
" pageIndex={${4:pageIndex}}",
|
|
364
|
+
" totalCount={${5:totalCount}}",
|
|
365
|
+
" totalPages={${6:totalPages}}",
|
|
366
|
+
" hasPreviousPage={${7:hasPreviousPage}}",
|
|
367
|
+
" hasNextPage={${8:hasNextPage}}",
|
|
368
|
+
"/>",
|
|
369
|
+
"$0"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
"ITSegmentedControl": {
|
|
373
|
+
"prefix": "itsegmented",
|
|
374
|
+
"description": "AXZY UI: Segmented control",
|
|
375
|
+
"body": [
|
|
376
|
+
"<ITSegmentedControl",
|
|
377
|
+
" value={${1:value}}",
|
|
378
|
+
" onChange={(value) => {$2}}",
|
|
379
|
+
" options={[",
|
|
380
|
+
" { value: \"${3:a}\", label: \"${4:Option A}\" },",
|
|
381
|
+
" { value: \"${5:b}\", label: \"${6:Option B}\" },",
|
|
382
|
+
" ]}",
|
|
383
|
+
"/>",
|
|
384
|
+
"$0"
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"ITSidebar": {
|
|
388
|
+
"prefix": "itsidebar",
|
|
389
|
+
"description": "AXZY UI: Sidebar navigation",
|
|
390
|
+
"body": [
|
|
391
|
+
"<ITSidebar navigationItems={${1:navigationItems}} />",
|
|
392
|
+
"$0"
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
"ITSkeleton": {
|
|
396
|
+
"prefix": "itskeleton",
|
|
397
|
+
"description": "AXZY UI: Loading skeleton placeholder",
|
|
398
|
+
"body": [
|
|
399
|
+
"<ITSkeleton variant=\"${1|text,circular,rectangular|}\" width=\"${2:100%}\" height=\"${3:1rem}\" />",
|
|
400
|
+
"$0"
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"ITSlideToggle": {
|
|
404
|
+
"prefix": "itslidetoggle",
|
|
405
|
+
"description": "AXZY UI: Switch toggle",
|
|
406
|
+
"body": [
|
|
407
|
+
"<ITSlideToggle isOn={${1:isOn}} onToggle={(isOn) => {$2}} />",
|
|
408
|
+
"$0"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"ITSlider": {
|
|
412
|
+
"prefix": "itslider",
|
|
413
|
+
"description": "AXZY UI: Range slider",
|
|
414
|
+
"body": [
|
|
415
|
+
"<ITSlider value={${1:value}} onChange={(value) => {$2}} min={${3:0}} max={${4:100}} />",
|
|
416
|
+
"$0"
|
|
417
|
+
]
|
|
418
|
+
},
|
|
419
|
+
"ITStack": {
|
|
420
|
+
"prefix": "itstack",
|
|
421
|
+
"description": "AXZY UI: Vertical/horizontal stack",
|
|
422
|
+
"body": [
|
|
423
|
+
"<ITStack direction=\"${1|row,column|}\" spacing={${2:4}}>",
|
|
424
|
+
" $3",
|
|
425
|
+
"</ITStack>",
|
|
426
|
+
"$0"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"ITStatCard": {
|
|
430
|
+
"prefix": "itstatcard",
|
|
431
|
+
"description": "AXZY UI: Metric/stat card",
|
|
432
|
+
"body": [
|
|
433
|
+
"<ITStatCard label=\"${1:Label}\" value={${2:0}} />",
|
|
434
|
+
"$0"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"ITStepper": {
|
|
438
|
+
"prefix": "itstepper",
|
|
439
|
+
"description": "AXZY UI: Step wizard",
|
|
440
|
+
"body": [
|
|
441
|
+
"<ITStepper",
|
|
442
|
+
" currentStep={${1:currentStep}}",
|
|
443
|
+
" onStepChange={${2:setCurrentStep}}",
|
|
444
|
+
" steps={[",
|
|
445
|
+
" { label: \"${3:Step 1}\", content: $4 },",
|
|
446
|
+
" { label: \"${5:Step 2}\", content: $6 },",
|
|
447
|
+
" ]}",
|
|
448
|
+
"/>",
|
|
449
|
+
"$0"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
"ITTable": {
|
|
453
|
+
"prefix": "ittable",
|
|
454
|
+
"description": "AXZY UI: Client-side table",
|
|
455
|
+
"body": [
|
|
456
|
+
"<ITTable",
|
|
457
|
+
" title=\"${1:Title}\"",
|
|
458
|
+
" columns={[",
|
|
459
|
+
" { key: \"${2:field}\", label: \"${3:Label}\", type: \"string\", sortable: true, filter: true },",
|
|
460
|
+
" ]}",
|
|
461
|
+
" data={${4:data}}",
|
|
462
|
+
"/>",
|
|
463
|
+
"$0"
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
"ITTabs": {
|
|
467
|
+
"prefix": "ittabs",
|
|
468
|
+
"description": "AXZY UI: Tabs",
|
|
469
|
+
"body": [
|
|
470
|
+
"<ITTabs",
|
|
471
|
+
" items={[",
|
|
472
|
+
" { id: \"${1:tab1}\", label: \"${2:Tab 1}\", content: $3 },",
|
|
473
|
+
" { id: \"${4:tab2}\", label: \"${5:Tab 2}\", content: $6 },",
|
|
474
|
+
" ]}",
|
|
475
|
+
"/>",
|
|
476
|
+
"$0"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"ITText": {
|
|
480
|
+
"prefix": "ittext",
|
|
481
|
+
"description": "AXZY UI: Typography",
|
|
482
|
+
"body": [
|
|
483
|
+
"<ITText as=\"${1|p,span,h1,h2,h3,h4,label|}\">${2:Text}</ITText>",
|
|
484
|
+
"$0"
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
"ITTextarea": {
|
|
488
|
+
"prefix": "ittextarea",
|
|
489
|
+
"description": "AXZY UI: Textarea",
|
|
490
|
+
"body": [
|
|
491
|
+
"<ITTextarea name=\"${1:field}\" label=\"${2:Label}\" value={${3:value}} onChange={${4:handleChange}} rows={${5:4}} />",
|
|
492
|
+
"$0"
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
"ITThemeProvider": {
|
|
496
|
+
"prefix": "itthemeprovider",
|
|
497
|
+
"description": "AXZY UI: Theme provider (wrap app root)",
|
|
498
|
+
"body": [
|
|
499
|
+
"<ITThemeProvider showFab={${1|true,false|}}>",
|
|
500
|
+
" $2",
|
|
501
|
+
"</ITThemeProvider>",
|
|
502
|
+
"$0"
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
"ITTimePicker": {
|
|
506
|
+
"prefix": "ittimepicker",
|
|
507
|
+
"description": "AXZY UI: Time picker",
|
|
508
|
+
"body": [
|
|
509
|
+
"<ITTimePicker name=\"${1:time}\" label=\"${2:Time}\" value={${3:value}} onChange={${4:handleChange}} />",
|
|
510
|
+
"$0"
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
"ITToast": {
|
|
514
|
+
"prefix": "ittoast",
|
|
515
|
+
"description": "AXZY UI: Toast notification",
|
|
516
|
+
"body": [
|
|
517
|
+
"<ITToast message=\"${1:Saved successfully}\" variant=\"${2|success,error,warning,info|}\" />",
|
|
518
|
+
"$0"
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"ITTooltip": {
|
|
522
|
+
"prefix": "ittooltip",
|
|
523
|
+
"description": "AXZY UI: Tooltip",
|
|
524
|
+
"body": [
|
|
525
|
+
"<ITTooltip content=\"${1:Tooltip text}\">",
|
|
526
|
+
" ${2:<span>Hover me</span>}",
|
|
527
|
+
"</ITTooltip>",
|
|
528
|
+
"$0"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"ITTripleFilter": {
|
|
532
|
+
"prefix": "ittriplefilter",
|
|
533
|
+
"description": "AXZY UI: 3-state filter",
|
|
534
|
+
"body": [
|
|
535
|
+
"<ITTripleFilter",
|
|
536
|
+
" value={${1:value}}",
|
|
537
|
+
" onChange={(value) => {$2}}",
|
|
538
|
+
" options={[",
|
|
539
|
+
" { label: \"${3:All}\", value: ${4:undefined} },",
|
|
540
|
+
" { label: \"${5:Active}\", value: ${6:true} },",
|
|
541
|
+
" { label: \"${7:Inactive}\", value: ${8:false} },",
|
|
542
|
+
" ]}",
|
|
543
|
+
"/>",
|
|
544
|
+
"$0"
|
|
545
|
+
]
|
|
546
|
+
}
|
|
547
|
+
}
|