@oxcide-ui/schema 0.0.3 → 0.0.4

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.
@@ -1,715 +0,0 @@
1
- import type { IconName } from '@oxcide-ui/icons'
2
- import { z } from 'zod'
3
-
4
- export const checkboxPropsSchema = z.object({
5
- /** V-model value */
6
- modelValue: z.any().optional(),
7
- /** Value for array-based checkboxes */
8
- value: z.any().optional(),
9
- /** Value when checked */
10
- onValue: z.any().default(true),
11
- /** Value when unchecked */
12
- offValue: z.any().default(false),
13
- /** Treat modelValue as boolean regardless of value or switch to boolean mode */
14
- binary: z.boolean().default(false),
15
- /** Disabled state */
16
- disabled: z.boolean().default(false),
17
- /** Invalid / Error state */
18
- invalid: z.boolean().default(false),
19
- /** Readonly state */
20
- readonly: z.boolean().default(false),
21
- /** Label text (next to checkbox) */
22
- label: z.string().optional(),
23
- /** Position of the label */
24
- labelPosition: z.enum(['left', 'right']).default('right'),
25
- /** Custom icon when checked */
26
- icon: z.string().optional() as z.ZodType<IconName | undefined>,
27
- /** Indeterminate state */
28
- indeterminate: z.boolean().default(false),
29
- /** Size */
30
- size: z.enum(['sm', 'md', 'lg']).default('md'),
31
- /** Severity */
32
- severity: z
33
- .enum(['primary', 'secondary', 'success', 'info', 'warning', 'danger', 'help', 'contrast'])
34
- .default('primary'),
35
- /** Native name attribute */
36
- name: z.string().optional(),
37
- /** Native id attribute */
38
- id: z.string().optional()
39
- })
40
-
41
- // Internal inference (NOT exported with the public name to avoid Vue resolver confusion)
42
- /* @oxcide-sync:source
43
- export type CheckboxProps = z.input<typeof checkboxPropsSchema>
44
- export type CheckboxResolvedProps = z.infer<typeof checkboxPropsSchema>
45
- @oxcide-sync:end */
46
- export interface CheckboxProps {
47
- modelValue?: any
48
- value?: any
49
- onValue?: any
50
- offValue?: any
51
- binary?: boolean | undefined
52
- disabled?: boolean | undefined
53
- invalid?: boolean | undefined
54
- readonly?: boolean | undefined
55
- label?: string | undefined
56
- labelPosition?: 'left' | 'right' | undefined
57
- indeterminate?: boolean | undefined
58
- size?: 'sm' | 'md' | 'lg' | undefined
59
- severity?: 'warning' | 'help' | 'info' | 'danger' | 'primary' | 'secondary' | 'success' | 'contrast' | undefined
60
- name?: string | undefined
61
- id?: string | undefined
62
- icon?:
63
- | 'folderPlus'
64
- | 'receipt'
65
- | 'asterisk'
66
- | 'star'
67
- | 'faceSmile'
68
- | 'pinterest'
69
- | 'image'
70
- | 'expand'
71
- | 'penToSquare'
72
- | 'wavePulse'
73
- | 'turkishLira'
74
- | 'spinnerDotted'
75
- | 'crown'
76
- | 'pauseCircle'
77
- | 'stop'
78
- | 'warehouse'
79
- | 'objectsColumn'
80
- | 'clipboard'
81
- | 'copy'
82
- | 'playCircle'
83
- | 'play'
84
- | 'venus'
85
- | 'cartMinus'
86
- | 'filePlus'
87
- | 'microchip'
88
- | 'twitch'
89
- | 'video'
90
- | 'buildingColumns'
91
- | 'fileCheck'
92
- | 'verified'
93
- | 'microchipAi'
94
- | 'trophy'
95
- | 'barcode'
96
- | 'code'
97
- | 'fileArrowUp'
98
- | 'upload'
99
- | 'send'
100
- | 'mars'
101
- | 'tiktok'
102
- | 'arrowUpRightAndArrowDownLeftFromCenter'
103
- | 'ethereum'
104
- | 'listCheck'
105
- | 'thumbtack'
106
- | 'arrowDownLeftAndArrowUpRightToCenter'
107
- | 'equals'
108
- | 'lightbulb'
109
- | 'starHalf'
110
- | 'addressBook'
111
- | 'chartScatter'
112
- | 'indianRupee'
113
- | 'starHalfFill'
114
- | 'cartArrowDown'
115
- | 'calendarClock'
116
- | 'sortUpFill'
117
- | 'sparkles'
118
- | 'bullseye'
119
- | 'sortDownFill'
120
- | 'graduationCap'
121
- | 'hammer'
122
- | 'bellSlash'
123
- | 'gauge'
124
- | 'shop'
125
- | 'headphones'
126
- | 'eraser'
127
- | 'stopwatch'
128
- | 'deleteLeft'
129
- | 'hourglass'
130
- | 'truck'
131
- | 'wrench'
132
- | 'microphone'
133
- | 'megaphone'
134
- | 'arrowRightArrowLeft'
135
- | 'bitcoin'
136
- | 'fileEdit'
137
- | 'language'
138
- | 'fileExport'
139
- | 'save'
140
- | 'fileImport'
141
- | 'fileWord'
142
- | 'microsoft'
143
- | 'gift'
144
- | 'box'
145
- | 'cartPlus'
146
- | 'thumbsDownFill'
147
- | 'thumbsUpFill'
148
- | 'arrowsAlt'
149
- | 'calculator'
150
- | 'sortAltSlash'
151
- | 'arrowsH'
152
- | 'arrowsV'
153
- | 'pound'
154
- | 'prime'
155
- | 'chartPie'
156
- | 'reddit'
157
- | 'sync'
158
- | 'refresh'
159
- | 'shoppingBag'
160
- | 'server'
161
- | 'cloud'
162
- | 'database'
163
- | 'hashtag'
164
- | 'tag'
165
- | 'bookmarkFill'
166
- | 'filterFill'
167
- | 'heartFill'
168
- | 'flagFill'
169
- | 'circle'
170
- | 'circleFill'
171
- | 'bolt'
172
- | 'history'
173
- | 'at'
174
- | 'arrowUpRight'
175
- | 'arrowUpLeft'
176
- | 'arrowDownLeft'
177
- | 'arrowDownRight'
178
- | 'telegram'
179
- | 'stopCircle'
180
- | 'whatsapp'
181
- | 'building'
182
- | 'qrcode'
183
- | 'car'
184
- | 'instagram'
185
- | 'linkedin'
186
- | 'slack'
187
- | 'moon'
188
- | 'sun'
189
- | 'youtube'
190
- | 'vimeo'
191
- | 'flag'
192
- | 'wallet'
193
- | 'map'
194
- | 'link'
195
- | 'creditCard'
196
- | 'discord'
197
- | 'percentage'
198
- | 'euro'
199
- | 'book'
200
- | 'shield'
201
- | 'paypal'
202
- | 'amazon'
203
- | 'phone'
204
- | 'filterSlash'
205
- | 'facebook'
206
- | 'github'
207
- | 'twitter'
208
- | 'stepBackwardAlt'
209
- | 'stepForwardAlt'
210
- | 'forward'
211
- | 'backward'
212
- | 'fastBackward'
213
- | 'fastForward'
214
- | 'pause'
215
- | 'compass'
216
- | 'idCard'
217
- | 'ticket'
218
- | 'fileO'
219
- | 'reply'
220
- | 'directionsAlt'
221
- | 'directions'
222
- | 'thumbsUp'
223
- | 'thumbsDown'
224
- | 'sortNumericDownAlt'
225
- | 'sortNumericUpAlt'
226
- | 'sortAlphaDownAlt'
227
- | 'sortAlphaUpAlt'
228
- | 'sortNumericDown'
229
- | 'sortNumericUp'
230
- | 'sortAlphaDown'
231
- | 'sortAlphaUp'
232
- | 'sortAlt'
233
- | 'sortAmountUp'
234
- | 'sortAmountDown'
235
- | 'sortAmountDownAlt'
236
- | 'sortAmountUpAlt'
237
- | 'palette'
238
- | 'undo'
239
- | 'desktop'
240
- | 'slidersV'
241
- | 'slidersH'
242
- | 'searchPlus'
243
- | 'searchMinus'
244
- | 'fileExcel'
245
- | 'filePdf'
246
- | 'checkSquare'
247
- | 'chartLine'
248
- | 'userEdit'
249
- | 'exclamationCircle'
250
- | 'android'
251
- | 'mobile'
252
- | 'google'
253
- | 'search'
254
- | 'apple'
255
- | 'heart'
256
- | 'tablet'
257
- | 'key'
258
- | 'unlock'
259
- | 'shoppingCart'
260
- | 'comments'
261
- | 'comment'
262
- | 'briefcase'
263
- | 'bell'
264
- | 'paperclip'
265
- | 'shareAlt'
266
- | 'envelope'
267
- | 'volumeDown'
268
- | 'volumeUp'
269
- | 'volumeOff'
270
- | 'eject'
271
- | 'moneyBill'
272
- | 'images'
273
- | 'signIn'
274
- | 'signOut'
275
- | 'wifi'
276
- | 'sitemap'
277
- | 'chartBar'
278
- | 'camera'
279
- | 'dollar'
280
- | 'lockOpen'
281
- | 'table'
282
- | 'mapMarker'
283
- | 'list'
284
- | 'eyeSlash'
285
- | 'eye'
286
- | 'folderOpen'
287
- | 'folder'
288
- | 'inbox'
289
- | 'lock'
290
- | 'tags'
291
- | 'powerOff'
292
- | 'questionCircle'
293
- | 'info'
294
- | 'question'
295
- | 'clone'
296
- | 'file'
297
- | 'calendarTimes'
298
- | 'calendarMinus'
299
- | 'calendarPlus'
300
- | 'ellipsisV'
301
- | 'ellipsisH'
302
- | 'bookmark'
303
- | 'globe'
304
- | 'replay'
305
- | 'filter'
306
- | 'sort'
307
- | 'print'
308
- | 'alignRight'
309
- | 'alignLeft'
310
- | 'alignCenter'
311
- | 'alignJustify'
312
- | 'cog'
313
- | 'cloudDownload'
314
- | 'download'
315
- | 'cloudUpload'
316
- | 'pencil'
317
- | 'users'
318
- | 'clock'
319
- | 'userMinus'
320
- | 'userPlus'
321
- | 'trash'
322
- | 'windowMinimize'
323
- | 'windowMaximize'
324
- | 'externalLink'
325
- | 'user'
326
- | 'exclamationTriangle'
327
- | 'calendar'
328
- | 'chevronCircleLeft'
329
- | 'chevronCircleDown'
330
- | 'chevronCircleRight'
331
- | 'chevronCircleUp'
332
- | 'angleDoubleDown'
333
- | 'angleDoubleLeft'
334
- | 'angleDoubleRight'
335
- | 'angleDoubleUp'
336
- | 'angleDown'
337
- | 'angleLeft'
338
- | 'angleRight'
339
- | 'angleUp'
340
- | 'ban'
341
- | 'starFill'
342
- | 'chevronLeft'
343
- | 'chevronRight'
344
- | 'chevronDown'
345
- | 'chevronUp'
346
- | 'caretLeft'
347
- | 'caretRight'
348
- | 'caretDown'
349
- | 'caretUp'
350
- | 'check'
351
- | 'checkCircle'
352
- | 'times'
353
- | 'timesCircle'
354
- | 'plus'
355
- | 'plusCircle'
356
- | 'minus'
357
- | 'minusCircle'
358
- | 'circleOn'
359
- | 'circleOff'
360
- | 'sortDown'
361
- | 'sortUp'
362
- | 'stepBackward'
363
- | 'stepForward'
364
- | 'thLarge'
365
- | 'arrowDown'
366
- | 'arrowLeft'
367
- | 'arrowRight'
368
- | 'arrowUp'
369
- | 'bars'
370
- | 'arrowCircleDown'
371
- | 'arrowCircleLeft'
372
- | 'arrowCircleRight'
373
- | 'arrowCircleUp'
374
- | 'infoCircle'
375
- | 'home'
376
- | 'spinner'
377
- | undefined
378
- }
379
- export type CheckboxResolvedProps = {
380
- binary: boolean
381
- disabled: boolean
382
- invalid: boolean
383
- readonly: boolean
384
- labelPosition: 'left' | 'right'
385
- indeterminate: boolean
386
- size: 'sm' | 'md' | 'lg'
387
- severity: 'warning' | 'help' | 'info' | 'danger' | 'primary' | 'secondary' | 'success' | 'contrast'
388
- modelValue?: any
389
- value?: any
390
- onValue?: any
391
- offValue?: any
392
- label?: string | undefined
393
- name?: string | undefined
394
- id?: string | undefined
395
- icon?:
396
- | 'folderPlus'
397
- | 'receipt'
398
- | 'asterisk'
399
- | 'star'
400
- | 'faceSmile'
401
- | 'pinterest'
402
- | 'image'
403
- | 'expand'
404
- | 'penToSquare'
405
- | 'wavePulse'
406
- | 'turkishLira'
407
- | 'spinnerDotted'
408
- | 'crown'
409
- | 'pauseCircle'
410
- | 'stop'
411
- | 'warehouse'
412
- | 'objectsColumn'
413
- | 'clipboard'
414
- | 'copy'
415
- | 'playCircle'
416
- | 'play'
417
- | 'venus'
418
- | 'cartMinus'
419
- | 'filePlus'
420
- | 'microchip'
421
- | 'twitch'
422
- | 'video'
423
- | 'buildingColumns'
424
- | 'fileCheck'
425
- | 'verified'
426
- | 'microchipAi'
427
- | 'trophy'
428
- | 'barcode'
429
- | 'code'
430
- | 'fileArrowUp'
431
- | 'upload'
432
- | 'send'
433
- | 'mars'
434
- | 'tiktok'
435
- | 'arrowUpRightAndArrowDownLeftFromCenter'
436
- | 'ethereum'
437
- | 'listCheck'
438
- | 'thumbtack'
439
- | 'arrowDownLeftAndArrowUpRightToCenter'
440
- | 'equals'
441
- | 'lightbulb'
442
- | 'starHalf'
443
- | 'addressBook'
444
- | 'chartScatter'
445
- | 'indianRupee'
446
- | 'starHalfFill'
447
- | 'cartArrowDown'
448
- | 'calendarClock'
449
- | 'sortUpFill'
450
- | 'sparkles'
451
- | 'bullseye'
452
- | 'sortDownFill'
453
- | 'graduationCap'
454
- | 'hammer'
455
- | 'bellSlash'
456
- | 'gauge'
457
- | 'shop'
458
- | 'headphones'
459
- | 'eraser'
460
- | 'stopwatch'
461
- | 'deleteLeft'
462
- | 'hourglass'
463
- | 'truck'
464
- | 'wrench'
465
- | 'microphone'
466
- | 'megaphone'
467
- | 'arrowRightArrowLeft'
468
- | 'bitcoin'
469
- | 'fileEdit'
470
- | 'language'
471
- | 'fileExport'
472
- | 'save'
473
- | 'fileImport'
474
- | 'fileWord'
475
- | 'microsoft'
476
- | 'gift'
477
- | 'box'
478
- | 'cartPlus'
479
- | 'thumbsDownFill'
480
- | 'thumbsUpFill'
481
- | 'arrowsAlt'
482
- | 'calculator'
483
- | 'sortAltSlash'
484
- | 'arrowsH'
485
- | 'arrowsV'
486
- | 'pound'
487
- | 'prime'
488
- | 'chartPie'
489
- | 'reddit'
490
- | 'sync'
491
- | 'refresh'
492
- | 'shoppingBag'
493
- | 'server'
494
- | 'cloud'
495
- | 'database'
496
- | 'hashtag'
497
- | 'tag'
498
- | 'bookmarkFill'
499
- | 'filterFill'
500
- | 'heartFill'
501
- | 'flagFill'
502
- | 'circle'
503
- | 'circleFill'
504
- | 'bolt'
505
- | 'history'
506
- | 'at'
507
- | 'arrowUpRight'
508
- | 'arrowUpLeft'
509
- | 'arrowDownLeft'
510
- | 'arrowDownRight'
511
- | 'telegram'
512
- | 'stopCircle'
513
- | 'whatsapp'
514
- | 'building'
515
- | 'qrcode'
516
- | 'car'
517
- | 'instagram'
518
- | 'linkedin'
519
- | 'slack'
520
- | 'moon'
521
- | 'sun'
522
- | 'youtube'
523
- | 'vimeo'
524
- | 'flag'
525
- | 'wallet'
526
- | 'map'
527
- | 'link'
528
- | 'creditCard'
529
- | 'discord'
530
- | 'percentage'
531
- | 'euro'
532
- | 'book'
533
- | 'shield'
534
- | 'paypal'
535
- | 'amazon'
536
- | 'phone'
537
- | 'filterSlash'
538
- | 'facebook'
539
- | 'github'
540
- | 'twitter'
541
- | 'stepBackwardAlt'
542
- | 'stepForwardAlt'
543
- | 'forward'
544
- | 'backward'
545
- | 'fastBackward'
546
- | 'fastForward'
547
- | 'pause'
548
- | 'compass'
549
- | 'idCard'
550
- | 'ticket'
551
- | 'fileO'
552
- | 'reply'
553
- | 'directionsAlt'
554
- | 'directions'
555
- | 'thumbsUp'
556
- | 'thumbsDown'
557
- | 'sortNumericDownAlt'
558
- | 'sortNumericUpAlt'
559
- | 'sortAlphaDownAlt'
560
- | 'sortAlphaUpAlt'
561
- | 'sortNumericDown'
562
- | 'sortNumericUp'
563
- | 'sortAlphaDown'
564
- | 'sortAlphaUp'
565
- | 'sortAlt'
566
- | 'sortAmountUp'
567
- | 'sortAmountDown'
568
- | 'sortAmountDownAlt'
569
- | 'sortAmountUpAlt'
570
- | 'palette'
571
- | 'undo'
572
- | 'desktop'
573
- | 'slidersV'
574
- | 'slidersH'
575
- | 'searchPlus'
576
- | 'searchMinus'
577
- | 'fileExcel'
578
- | 'filePdf'
579
- | 'checkSquare'
580
- | 'chartLine'
581
- | 'userEdit'
582
- | 'exclamationCircle'
583
- | 'android'
584
- | 'mobile'
585
- | 'google'
586
- | 'search'
587
- | 'apple'
588
- | 'heart'
589
- | 'tablet'
590
- | 'key'
591
- | 'unlock'
592
- | 'shoppingCart'
593
- | 'comments'
594
- | 'comment'
595
- | 'briefcase'
596
- | 'bell'
597
- | 'paperclip'
598
- | 'shareAlt'
599
- | 'envelope'
600
- | 'volumeDown'
601
- | 'volumeUp'
602
- | 'volumeOff'
603
- | 'eject'
604
- | 'moneyBill'
605
- | 'images'
606
- | 'signIn'
607
- | 'signOut'
608
- | 'wifi'
609
- | 'sitemap'
610
- | 'chartBar'
611
- | 'camera'
612
- | 'dollar'
613
- | 'lockOpen'
614
- | 'table'
615
- | 'mapMarker'
616
- | 'list'
617
- | 'eyeSlash'
618
- | 'eye'
619
- | 'folderOpen'
620
- | 'folder'
621
- | 'inbox'
622
- | 'lock'
623
- | 'tags'
624
- | 'powerOff'
625
- | 'questionCircle'
626
- | 'info'
627
- | 'question'
628
- | 'clone'
629
- | 'file'
630
- | 'calendarTimes'
631
- | 'calendarMinus'
632
- | 'calendarPlus'
633
- | 'ellipsisV'
634
- | 'ellipsisH'
635
- | 'bookmark'
636
- | 'globe'
637
- | 'replay'
638
- | 'filter'
639
- | 'sort'
640
- | 'print'
641
- | 'alignRight'
642
- | 'alignLeft'
643
- | 'alignCenter'
644
- | 'alignJustify'
645
- | 'cog'
646
- | 'cloudDownload'
647
- | 'download'
648
- | 'cloudUpload'
649
- | 'pencil'
650
- | 'users'
651
- | 'clock'
652
- | 'userMinus'
653
- | 'userPlus'
654
- | 'trash'
655
- | 'windowMinimize'
656
- | 'windowMaximize'
657
- | 'externalLink'
658
- | 'user'
659
- | 'exclamationTriangle'
660
- | 'calendar'
661
- | 'chevronCircleLeft'
662
- | 'chevronCircleDown'
663
- | 'chevronCircleRight'
664
- | 'chevronCircleUp'
665
- | 'angleDoubleDown'
666
- | 'angleDoubleLeft'
667
- | 'angleDoubleRight'
668
- | 'angleDoubleUp'
669
- | 'angleDown'
670
- | 'angleLeft'
671
- | 'angleRight'
672
- | 'angleUp'
673
- | 'ban'
674
- | 'starFill'
675
- | 'chevronLeft'
676
- | 'chevronRight'
677
- | 'chevronDown'
678
- | 'chevronUp'
679
- | 'caretLeft'
680
- | 'caretRight'
681
- | 'caretDown'
682
- | 'caretUp'
683
- | 'check'
684
- | 'checkCircle'
685
- | 'times'
686
- | 'timesCircle'
687
- | 'plus'
688
- | 'plusCircle'
689
- | 'minus'
690
- | 'minusCircle'
691
- | 'circleOn'
692
- | 'circleOff'
693
- | 'sortDown'
694
- | 'sortUp'
695
- | 'stepBackward'
696
- | 'stepForward'
697
- | 'thLarge'
698
- | 'arrowDown'
699
- | 'arrowLeft'
700
- | 'arrowRight'
701
- | 'arrowUp'
702
- | 'bars'
703
- | 'arrowCircleDown'
704
- | 'arrowCircleLeft'
705
- | 'arrowCircleRight'
706
- | 'arrowCircleUp'
707
- | 'infoCircle'
708
- | 'home'
709
- | 'spinner'
710
- | undefined
711
- }
712
-
713
- export function getCheckboxDefaults(props: CheckboxProps = {}): CheckboxResolvedProps {
714
- return checkboxPropsSchema.parse(props)
715
- }