panelui-native 0.16.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/lib/module/components/bottom-sheet/index.js +38 -10
  2. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  3. package/lib/module/components/checkbox/index.js +24 -11
  4. package/lib/module/components/checkbox/index.js.map +1 -1
  5. package/lib/module/components/field/index.js +337 -0
  6. package/lib/module/components/field/index.js.map +1 -0
  7. package/lib/module/components/flow/flow-paths.js +378 -0
  8. package/lib/module/components/flow/flow-paths.js.map +1 -0
  9. package/lib/module/components/flow/index.js +1598 -0
  10. package/lib/module/components/flow/index.js.map +1 -0
  11. package/lib/module/components/form/index.js +77 -0
  12. package/lib/module/components/form/index.js.map +1 -0
  13. package/lib/module/components/form/use-field.js +50 -0
  14. package/lib/module/components/form/use-field.js.map +1 -0
  15. package/lib/module/components/form/use-form.js +217 -0
  16. package/lib/module/components/form/use-form.js.map +1 -0
  17. package/lib/module/components/frame/index.js +124 -22
  18. package/lib/module/components/frame/index.js.map +1 -1
  19. package/lib/module/components/otp-input/index.js +303 -0
  20. package/lib/module/components/otp-input/index.js.map +1 -0
  21. package/lib/module/components/signature/index.js +500 -0
  22. package/lib/module/components/signature/index.js.map +1 -0
  23. package/lib/module/icons/index.js +218 -0
  24. package/lib/module/icons/index.js.map +1 -1
  25. package/lib/module/index.js +6 -1
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/typescript/src/components/bottom-sheet/index.d.ts +15 -1
  28. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  29. package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
  30. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  31. package/lib/typescript/src/components/field/index.d.ts +94 -0
  32. package/lib/typescript/src/components/field/index.d.ts.map +1 -0
  33. package/lib/typescript/src/components/flow/flow-paths.d.ts +89 -0
  34. package/lib/typescript/src/components/flow/flow-paths.d.ts.map +1 -0
  35. package/lib/typescript/src/components/flow/index.d.ts +310 -0
  36. package/lib/typescript/src/components/flow/index.d.ts.map +1 -0
  37. package/lib/typescript/src/components/form/index.d.ts +64 -0
  38. package/lib/typescript/src/components/form/index.d.ts.map +1 -0
  39. package/lib/typescript/src/components/form/use-field.d.ts +16 -0
  40. package/lib/typescript/src/components/form/use-field.d.ts.map +1 -0
  41. package/lib/typescript/src/components/form/use-form.d.ts +37 -0
  42. package/lib/typescript/src/components/form/use-form.d.ts.map +1 -0
  43. package/lib/typescript/src/components/frame/index.d.ts +39 -2
  44. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  45. package/lib/typescript/src/components/otp-input/index.d.ts +141 -0
  46. package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -0
  47. package/lib/typescript/src/components/signature/index.d.ts +254 -0
  48. package/lib/typescript/src/components/signature/index.d.ts.map +1 -0
  49. package/lib/typescript/src/icons/index.d.ts +17 -0
  50. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  51. package/lib/typescript/src/index.d.ts +7 -2
  52. package/lib/typescript/src/index.d.ts.map +1 -1
  53. package/package.json +9 -1
  54. package/src/components/bottom-sheet/index.tsx +50 -12
  55. package/src/components/checkbox/index.tsx +40 -12
  56. package/src/components/field/index.tsx +329 -0
  57. package/src/components/flow/flow-paths.ts +348 -0
  58. package/src/components/flow/index.tsx +1924 -0
  59. package/src/components/form/index.tsx +85 -0
  60. package/src/components/form/use-field.ts +65 -0
  61. package/src/components/form/use-form.ts +252 -0
  62. package/src/components/frame/index.tsx +162 -14
  63. package/src/components/otp-input/index.tsx +396 -0
  64. package/src/components/signature/index.tsx +681 -0
  65. package/src/icons/index.tsx +159 -0
  66. package/src/index.ts +72 -0
@@ -80,6 +80,21 @@ export function CheckIcon({ size = 14, color, ...props }: IconProps) {
80
80
  );
81
81
  }
82
82
 
83
+ export function MinusIcon({ size = 14, color, ...props }: IconProps) {
84
+ const resolved = useResolvedColor(color, '#fff');
85
+ return (
86
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
87
+ <Path
88
+ d="M5 12h14"
89
+ stroke={resolved}
90
+ strokeWidth={3}
91
+ strokeLinecap="round"
92
+ strokeLinejoin="round"
93
+ />
94
+ </Svg>
95
+ );
96
+ }
97
+
83
98
  export function ChevronDownIcon({ size = 16, color, ...props }: IconProps) {
84
99
  const resolved = useResolvedColor(color, '#737373');
85
100
  return (
@@ -546,3 +561,147 @@ export function PauseIcon({ size = 16, color, ...props }: IconProps) {
546
561
  </Svg>
547
562
  );
548
563
  }
564
+
565
+ /** A pencil at an angle — draw, sign, edit by hand. */
566
+ export function PencilIcon({ size = 16, color, ...props }: IconProps) {
567
+ const resolved = useResolvedColor(color, '#737373');
568
+ return (
569
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
570
+ <Path
571
+ d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z"
572
+ stroke={resolved}
573
+ strokeWidth={2}
574
+ strokeLinecap="round"
575
+ strokeLinejoin="round"
576
+ />
577
+ </Svg>
578
+ );
579
+ }
580
+
581
+ /** An arrow curling anticlockwise — undo, reset, start over. */
582
+ export function RotateCcwIcon({ size = 16, color, ...props }: IconProps) {
583
+ const resolved = useResolvedColor(color, '#737373');
584
+ return (
585
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
586
+ <Path
587
+ d="M3 12a9 9 0 1 0 2.64-6.36L3 8"
588
+ stroke={resolved}
589
+ strokeWidth={2}
590
+ strokeLinecap="round"
591
+ strokeLinejoin="round"
592
+ />
593
+ <Path
594
+ d="M3 3v5h5"
595
+ stroke={resolved}
596
+ strokeWidth={2}
597
+ strokeLinecap="round"
598
+ strokeLinejoin="round"
599
+ />
600
+ </Svg>
601
+ );
602
+ }
603
+
604
+ /** A bin — discard what is there. */
605
+ export function TrashIcon({ size = 16, color, ...props }: IconProps) {
606
+ const resolved = useResolvedColor(color, '#737373');
607
+ return (
608
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
609
+ <Path
610
+ d="M4 7h16M10 4h4M6 7l1 13h10l1-13"
611
+ stroke={resolved}
612
+ strokeWidth={2}
613
+ strokeLinecap="round"
614
+ strokeLinejoin="round"
615
+ />
616
+ </Svg>
617
+ );
618
+ }
619
+
620
+ /** An arrow into a tray — save the thing to a file. */
621
+ export function DownloadIcon({ size = 16, color, ...props }: IconProps) {
622
+ const resolved = useResolvedColor(color, '#737373');
623
+ return (
624
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
625
+ <Path
626
+ d="M12 3v12m0 0 4-4m-4 4-4-4M4 19h16"
627
+ stroke={resolved}
628
+ strokeWidth={2}
629
+ strokeLinecap="round"
630
+ strokeLinejoin="round"
631
+ />
632
+ </Svg>
633
+ );
634
+ }
635
+
636
+ /** A cross of two strokes — zoom in, add. Pairs with MinusIcon. */
637
+ export function PlusIcon({ size = 16, color, ...props }: IconProps) {
638
+ const resolved = useResolvedColor(color, '#737373');
639
+ return (
640
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
641
+ <Path
642
+ d="M12 5v14M5 12h14"
643
+ stroke={resolved}
644
+ strokeWidth={2}
645
+ strokeLinecap="round"
646
+ />
647
+ </Svg>
648
+ );
649
+ }
650
+
651
+ /** Four corners pushing outward — fit everything into view. */
652
+ export function MaximizeIcon({ size = 16, color, ...props }: IconProps) {
653
+ const resolved = useResolvedColor(color, '#737373');
654
+ return (
655
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
656
+ <Path
657
+ d="M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5"
658
+ stroke={resolved}
659
+ strokeWidth={2}
660
+ strokeLinecap="round"
661
+ strokeLinejoin="round"
662
+ />
663
+ </Svg>
664
+ );
665
+ }
666
+
667
+ /** A closed padlock — the thing behind it cannot be moved. */
668
+ export function LockIcon({ size = 16, color, ...props }: IconProps) {
669
+ const resolved = useResolvedColor(color, '#737373');
670
+ return (
671
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
672
+ <Path
673
+ d="M5 11h14v10H5z"
674
+ stroke={resolved}
675
+ strokeWidth={2}
676
+ strokeLinejoin="round"
677
+ />
678
+ <Path
679
+ d="M8 11V7a4 4 0 0 1 8 0v4"
680
+ stroke={resolved}
681
+ strokeWidth={2}
682
+ strokeLinecap="round"
683
+ />
684
+ </Svg>
685
+ );
686
+ }
687
+
688
+ /** The same padlock with its shackle swung open — freely movable. */
689
+ export function UnlockIcon({ size = 16, color, ...props }: IconProps) {
690
+ const resolved = useResolvedColor(color, '#737373');
691
+ return (
692
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" {...props}>
693
+ <Path
694
+ d="M5 11h14v10H5z"
695
+ stroke={resolved}
696
+ strokeWidth={2}
697
+ strokeLinejoin="round"
698
+ />
699
+ <Path
700
+ d="M8 11V7a4 4 0 0 1 7.5-2"
701
+ stroke={resolved}
702
+ strokeWidth={2}
703
+ strokeLinecap="round"
704
+ />
705
+ </Svg>
706
+ );
707
+ }
package/src/index.ts CHANGED
@@ -104,6 +104,24 @@ export {
104
104
  type DirectionProps,
105
105
  type DirectionValue,
106
106
  } from './components/direction';
107
+ export {
108
+ Flow,
109
+ type FlowProps,
110
+ type FlowNodeProps,
111
+ type FlowHandleProps,
112
+ type FlowEdgeProps,
113
+ type FlowGroupProps,
114
+ type FlowBackgroundProps,
115
+ type FlowControlsProps,
116
+ type FlowMiniMapProps,
117
+ type FlowConnection,
118
+ type FlowViewport,
119
+ type FlowNodePosition,
120
+ type FlowEdgeVariant,
121
+ type FlowSide,
122
+ type FlowRect,
123
+ type FlowPoint,
124
+ } from './components/flow';
107
125
  export {
108
126
  Frame,
109
127
  type FrameProps,
@@ -111,6 +129,11 @@ export {
111
129
  type FramePanelProps,
112
130
  type FrameRowProps,
113
131
  type FrameSectionProps,
132
+ type FrameHeaderProps,
133
+ type FrameActionProps,
134
+ type FrameMediaProps,
135
+ type FrameContentProps,
136
+ type FrameActionsProps,
114
137
  type FrameVariant,
115
138
  } from './components/frame';
116
139
  export {
@@ -167,6 +190,34 @@ export {
167
190
  type EmptyStateProps,
168
191
  type EmptyStateMediaProps,
169
192
  } from './components/empty-state';
193
+ export {
194
+ Field,
195
+ type FieldProps,
196
+ type FieldContentProps,
197
+ type FieldLabelProps,
198
+ type FieldDescriptionProps,
199
+ type FieldErrorProps,
200
+ type FieldSetProps,
201
+ type FieldLegendProps,
202
+ type FieldGroupProps,
203
+ type FieldSeparatorProps,
204
+ type FieldTitleProps,
205
+ } from './components/field';
206
+ export {
207
+ Form,
208
+ useForm,
209
+ useField,
210
+ type FormProps,
211
+ type FormFieldProps,
212
+ type FormApi,
213
+ type FieldErrors,
214
+ type FieldTouched,
215
+ type FieldState,
216
+ type UseFormOptions,
217
+ type Validator,
218
+ type FormFieldRenderProps,
219
+ type UseFieldOptions,
220
+ } from './components/form';
170
221
  export { Input, type InputProps } from './components/input';
171
222
  export {
172
223
  InputGroup,
@@ -174,6 +225,7 @@ export {
174
225
  type InputGroupInputProps,
175
226
  type InputGroupDecoratorProps,
176
227
  } from './components/input-group';
228
+ export { OtpInput, type OtpInputProps } from './components/otp-input';
177
229
  export {
178
230
  Item,
179
231
  type ItemProps,
@@ -255,6 +307,17 @@ export {
255
307
  type ScrollFadeProps,
256
308
  } from './components/scroll-fade';
257
309
  export { Separator, type SeparatorProps } from './components/separator';
310
+ export {
311
+ Signature,
312
+ hasSignatureFileSystem,
313
+ hasSignatureRaster,
314
+ type SignatureProps,
315
+ type SignatureHandle,
316
+ type SignatureFile,
317
+ type SignatureSaveOptions,
318
+ type SignatureToolbarProps,
319
+ type SignatureButtonProps,
320
+ } from './components/signature';
258
321
  export { Shimmer, type ShimmerProps } from './components/shimmer';
259
322
  export {
260
323
  ScrollText,
@@ -331,26 +394,35 @@ export {
331
394
  ChevronDownIcon,
332
395
  ChevronLeftIcon,
333
396
  ChevronRightIcon,
397
+ DownloadIcon,
334
398
  FacebookIcon,
335
399
  FileIcon,
336
400
  GoogleIcon,
337
401
  IconColorProvider,
338
402
  InfoIcon,
339
403
  ImageIcon,
404
+ LockIcon,
405
+ MaximizeIcon,
340
406
  MicIcon,
407
+ MinusIcon,
341
408
  MoonIcon,
342
409
  PackageIcon,
343
410
  PaperclipIcon,
344
411
  PauseIcon,
412
+ PencilIcon,
345
413
  PlayIcon,
414
+ PlusIcon,
346
415
  PlusSquareIcon,
347
416
  ReceiptIcon,
417
+ RotateCcwIcon,
348
418
  SearchIcon,
349
419
  SendIcon,
350
420
  ShareNodesIcon,
351
421
  ShieldAlertIcon,
352
422
  ShieldCheckIcon,
353
423
  SunIcon,
424
+ TrashIcon,
425
+ UnlockIcon,
354
426
  XIcon,
355
427
  useIconColor,
356
428
  type IconProps,