@majoo-ui/react 1.44.0 → 1.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # react
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Running unit tests
6
-
7
- Run `nx test react` to execute the unit tests via [Jest](https://jestjs.io).
1
+ React
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ Running unit tests
6
+
7
+ Run `nx test react` to execute the unit tests via [Jest](https://jestjs.io).
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+ import { PrimitiveButtonProps } from '@radix-ui/react-popover';
4
+ import { BaseRadixNoCss, BaseRadixProps } from '../../type/base.types';
5
+ declare type AccordionPrimitiveProps = Omit<AccordionPrimitive.AccordionSingleProps, keyof Omit<AccordionPrimitive.PrimitiveDivProps, 'defaultValue'>> | Omit<AccordionPrimitive.AccordionMultipleProps, keyof Omit<AccordionPrimitive.PrimitiveDivProps, 'defaultValue'>>;
6
+ declare type AccordionProps = {
7
+ /**
8
+ * Determines whether one or multiple items can be opened at the same time.
9
+ */
10
+ type: string;
11
+ children: React.ReactNode;
12
+ } & AccordionPrimitiveProps & BaseRadixProps;
13
+ export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare type AccordionTriggerPrimitiveProps = Omit<AccordionPrimitive.AccordionTriggerProps, keyof PrimitiveButtonProps>;
15
+ interface AccordionTriggerProps extends AccordionTriggerPrimitiveProps, BaseRadixProps {
16
+ /**
17
+ * If the value is 'false' then it will hide the arrow icon.
18
+ */
19
+ hasContent?: boolean;
20
+ /**
21
+ * Specify the arrow position.
22
+ */
23
+ arrowPosition?: 'right' | 'left';
24
+ /**
25
+ * Specify the arrow icon color.
26
+ */
27
+ arrowColor?: string;
28
+ children: React.ReactNode;
29
+ }
30
+ export declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
31
+ export declare const AccordionItem: React.FC<Omit<AccordionPrimitive.AccordionItemProps, keyof AccordionPrimitive.PrimitiveDivProps> & BaseRadixNoCss>;
32
+ export declare const AccordionContent: React.FC<Omit<AccordionPrimitive.AccordionContentProps, keyof AccordionPrimitive.PrimitiveDivProps> & BaseRadixNoCss>;
33
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Accordion';
@@ -0,0 +1,2 @@
1
+ export { default as Image } from './Image';
2
+ export * from './Image';
@@ -387,16 +387,421 @@ export declare const ModalDialogTrigger: import("@stitches/react/types/styled-co
387
387
  }>>;
388
388
  declare type IDialog = React.ComponentProps<typeof Dialog>;
389
389
  interface ModalDialogProps extends IDialog, DialogContentProps {
390
+ /** set PageDialog zIndex, default is set to 1400 */
390
391
  layer?: number | string;
392
+ /** Force to mobile view or desktop view, if undefined ModalDialog will be responsive according to current screen size */
391
393
  isMobile?: boolean | undefined;
392
394
  /**
393
395
  * @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
394
396
  */
395
397
  width?: string | number;
398
+ /** Set default behavior when opening dialog with form. Usually used with prevent default*/
396
399
  onOpenAutoFocus?(): void;
397
400
  }
401
+ /**
402
+ * ModalDialog are used to focus and display content that contains one specific task that requires interaction from the user and is separate from the main page.
403
+ * https://react-majoo-ui.mangkujagat.com/?path=/story/core-components-pagedialog--default
404
+ * @param size - default fullsize
405
+ * @param layer - z-index default 1400
406
+ * @param isMobile - force mobile/desktop view, default is responsive
407
+ * @param onOpenAutoFocus - set default open behaviour
408
+ *
409
+ * @example
410
+ * // Uncontrolled Example
411
+ * <ModalDialog>
412
+ * <ModalDialogTrigger>Button Trigger</ModalDialogTrigger>
413
+ * <ModalDialogTitle>Title</ModalDialogTitle>
414
+ * <ModalDialogContent>Content</ModalDialogContent>
415
+ * <ModalDialogFooter>Footer</ModalDialogFooter>
416
+ * </ModalDialog>
417
+ * @component
418
+ */
398
419
  declare const ModalDialog: {
399
420
  (props: ModalDialogProps): JSX.Element;
421
+ Trigger: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
422
+ sm: "(min-width: 359px)";
423
+ md: "(min-width: 767px)";
424
+ lg: "(min-width: 1023px)";
425
+ xl: "(min-width: 1199px)";
426
+ '2xl': "(min-width: 1399px)";
427
+ '3xl': "(min-width: 1600px)";
428
+ }, import("@stitches/react/types/css-util").CSS<{
429
+ sm: "(min-width: 359px)";
430
+ md: "(min-width: 767px)";
431
+ lg: "(min-width: 1023px)";
432
+ xl: "(min-width: 1199px)";
433
+ '2xl': "(min-width: 1399px)";
434
+ '3xl': "(min-width: 1600px)";
435
+ }, {
436
+ colors: unknown;
437
+ space: unknown;
438
+ shadows: unknown;
439
+ fontSizes: unknown;
440
+ fonts: unknown;
441
+ lineHeights: unknown;
442
+ letterSpacings: unknown;
443
+ radii: unknown;
444
+ sizes: unknown;
445
+ zIndices: unknown;
446
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
447
+ m: (value: {
448
+ readonly [$$ScaleValue]: "space";
449
+ }) => {
450
+ margin: {
451
+ readonly [$$ScaleValue]: "space";
452
+ };
453
+ };
454
+ mt: (value: {
455
+ readonly [$$ScaleValue]: "space";
456
+ }) => {
457
+ marginTop: {
458
+ readonly [$$ScaleValue]: "space";
459
+ };
460
+ };
461
+ mr: (value: {
462
+ readonly [$$ScaleValue]: "space";
463
+ }) => {
464
+ marginRight: {
465
+ readonly [$$ScaleValue]: "space";
466
+ };
467
+ };
468
+ mb: (value: {
469
+ readonly [$$ScaleValue]: "space";
470
+ }) => {
471
+ marginBottom: {
472
+ readonly [$$ScaleValue]: "space";
473
+ };
474
+ };
475
+ ml: (value: {
476
+ readonly [$$ScaleValue]: "space";
477
+ }) => {
478
+ marginLeft: {
479
+ readonly [$$ScaleValue]: "space";
480
+ };
481
+ };
482
+ mx: (value: {
483
+ readonly [$$ScaleValue]: "space";
484
+ }) => {
485
+ marginLeft: {
486
+ readonly [$$ScaleValue]: "space";
487
+ };
488
+ marginRight: {
489
+ readonly [$$ScaleValue]: "space";
490
+ };
491
+ };
492
+ my: (value: {
493
+ readonly [$$ScaleValue]: "space";
494
+ }) => {
495
+ marginTop: {
496
+ readonly [$$ScaleValue]: "space";
497
+ };
498
+ marginBottom: {
499
+ readonly [$$ScaleValue]: "space";
500
+ };
501
+ };
502
+ size: (value: {
503
+ readonly [$$PropertyValue]: "width";
504
+ }) => {
505
+ width: {
506
+ readonly [$$PropertyValue]: "width";
507
+ };
508
+ height: {
509
+ readonly [$$PropertyValue]: "width";
510
+ };
511
+ };
512
+ subtleColor: (value: string) => {
513
+ color: string;
514
+ backgroundColor: string;
515
+ };
516
+ }>>;
517
+ Title: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
518
+ sm: "(min-width: 359px)";
519
+ md: "(min-width: 767px)";
520
+ lg: "(min-width: 1023px)";
521
+ xl: "(min-width: 1199px)";
522
+ '2xl': "(min-width: 1399px)";
523
+ '3xl': "(min-width: 1600px)";
524
+ }, import("@stitches/react/types/css-util").CSS<{
525
+ sm: "(min-width: 359px)";
526
+ md: "(min-width: 767px)";
527
+ lg: "(min-width: 1023px)";
528
+ xl: "(min-width: 1199px)";
529
+ '2xl': "(min-width: 1399px)";
530
+ '3xl': "(min-width: 1600px)";
531
+ }, {
532
+ colors: unknown;
533
+ space: unknown;
534
+ shadows: unknown;
535
+ fontSizes: unknown;
536
+ fonts: unknown;
537
+ lineHeights: unknown;
538
+ letterSpacings: unknown;
539
+ radii: unknown;
540
+ sizes: unknown;
541
+ zIndices: unknown;
542
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
543
+ m: (value: {
544
+ readonly [$$ScaleValue]: "space";
545
+ }) => {
546
+ margin: {
547
+ readonly [$$ScaleValue]: "space";
548
+ };
549
+ };
550
+ mt: (value: {
551
+ readonly [$$ScaleValue]: "space";
552
+ }) => {
553
+ marginTop: {
554
+ readonly [$$ScaleValue]: "space";
555
+ };
556
+ };
557
+ mr: (value: {
558
+ readonly [$$ScaleValue]: "space";
559
+ }) => {
560
+ marginRight: {
561
+ readonly [$$ScaleValue]: "space";
562
+ };
563
+ };
564
+ mb: (value: {
565
+ readonly [$$ScaleValue]: "space";
566
+ }) => {
567
+ marginBottom: {
568
+ readonly [$$ScaleValue]: "space";
569
+ };
570
+ };
571
+ ml: (value: {
572
+ readonly [$$ScaleValue]: "space";
573
+ }) => {
574
+ marginLeft: {
575
+ readonly [$$ScaleValue]: "space";
576
+ };
577
+ };
578
+ mx: (value: {
579
+ readonly [$$ScaleValue]: "space";
580
+ }) => {
581
+ marginLeft: {
582
+ readonly [$$ScaleValue]: "space";
583
+ };
584
+ marginRight: {
585
+ readonly [$$ScaleValue]: "space";
586
+ };
587
+ };
588
+ my: (value: {
589
+ readonly [$$ScaleValue]: "space";
590
+ }) => {
591
+ marginTop: {
592
+ readonly [$$ScaleValue]: "space";
593
+ };
594
+ marginBottom: {
595
+ readonly [$$ScaleValue]: "space";
596
+ };
597
+ };
598
+ size: (value: {
599
+ readonly [$$PropertyValue]: "width";
600
+ }) => {
601
+ width: {
602
+ readonly [$$PropertyValue]: "width";
603
+ };
604
+ height: {
605
+ readonly [$$PropertyValue]: "width";
606
+ };
607
+ };
608
+ subtleColor: (value: string) => {
609
+ color: string;
610
+ backgroundColor: string;
611
+ };
612
+ }>>;
613
+ Content: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
614
+ sm: "(min-width: 359px)";
615
+ md: "(min-width: 767px)";
616
+ lg: "(min-width: 1023px)";
617
+ xl: "(min-width: 1199px)";
618
+ '2xl': "(min-width: 1399px)";
619
+ '3xl': "(min-width: 1600px)";
620
+ }, import("@stitches/react/types/css-util").CSS<{
621
+ sm: "(min-width: 359px)";
622
+ md: "(min-width: 767px)";
623
+ lg: "(min-width: 1023px)";
624
+ xl: "(min-width: 1199px)";
625
+ '2xl': "(min-width: 1399px)";
626
+ '3xl': "(min-width: 1600px)";
627
+ }, {
628
+ colors: unknown;
629
+ space: unknown;
630
+ shadows: unknown;
631
+ fontSizes: unknown;
632
+ fonts: unknown;
633
+ lineHeights: unknown;
634
+ letterSpacings: unknown;
635
+ radii: unknown;
636
+ sizes: unknown;
637
+ zIndices: unknown;
638
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
639
+ m: (value: {
640
+ readonly [$$ScaleValue]: "space";
641
+ }) => {
642
+ margin: {
643
+ readonly [$$ScaleValue]: "space";
644
+ };
645
+ };
646
+ mt: (value: {
647
+ readonly [$$ScaleValue]: "space";
648
+ }) => {
649
+ marginTop: {
650
+ readonly [$$ScaleValue]: "space";
651
+ };
652
+ };
653
+ mr: (value: {
654
+ readonly [$$ScaleValue]: "space";
655
+ }) => {
656
+ marginRight: {
657
+ readonly [$$ScaleValue]: "space";
658
+ };
659
+ };
660
+ mb: (value: {
661
+ readonly [$$ScaleValue]: "space";
662
+ }) => {
663
+ marginBottom: {
664
+ readonly [$$ScaleValue]: "space";
665
+ };
666
+ };
667
+ ml: (value: {
668
+ readonly [$$ScaleValue]: "space";
669
+ }) => {
670
+ marginLeft: {
671
+ readonly [$$ScaleValue]: "space";
672
+ };
673
+ };
674
+ mx: (value: {
675
+ readonly [$$ScaleValue]: "space";
676
+ }) => {
677
+ marginLeft: {
678
+ readonly [$$ScaleValue]: "space";
679
+ };
680
+ marginRight: {
681
+ readonly [$$ScaleValue]: "space";
682
+ };
683
+ };
684
+ my: (value: {
685
+ readonly [$$ScaleValue]: "space";
686
+ }) => {
687
+ marginTop: {
688
+ readonly [$$ScaleValue]: "space";
689
+ };
690
+ marginBottom: {
691
+ readonly [$$ScaleValue]: "space";
692
+ };
693
+ };
694
+ size: (value: {
695
+ readonly [$$PropertyValue]: "width";
696
+ }) => {
697
+ width: {
698
+ readonly [$$PropertyValue]: "width";
699
+ };
700
+ height: {
701
+ readonly [$$PropertyValue]: "width";
702
+ };
703
+ };
704
+ subtleColor: (value: string) => {
705
+ color: string;
706
+ backgroundColor: string;
707
+ };
708
+ }>>;
709
+ Footer: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
710
+ sm: "(min-width: 359px)";
711
+ md: "(min-width: 767px)";
712
+ lg: "(min-width: 1023px)";
713
+ xl: "(min-width: 1199px)";
714
+ '2xl': "(min-width: 1399px)";
715
+ '3xl': "(min-width: 1600px)";
716
+ }, import("@stitches/react/types/css-util").CSS<{
717
+ sm: "(min-width: 359px)";
718
+ md: "(min-width: 767px)";
719
+ lg: "(min-width: 1023px)";
720
+ xl: "(min-width: 1199px)";
721
+ '2xl': "(min-width: 1399px)";
722
+ '3xl': "(min-width: 1600px)";
723
+ }, {
724
+ colors: unknown;
725
+ space: unknown;
726
+ shadows: unknown;
727
+ fontSizes: unknown;
728
+ fonts: unknown;
729
+ lineHeights: unknown;
730
+ letterSpacings: unknown;
731
+ radii: unknown;
732
+ sizes: unknown;
733
+ zIndices: unknown;
734
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
735
+ m: (value: {
736
+ readonly [$$ScaleValue]: "space";
737
+ }) => {
738
+ margin: {
739
+ readonly [$$ScaleValue]: "space";
740
+ };
741
+ };
742
+ mt: (value: {
743
+ readonly [$$ScaleValue]: "space";
744
+ }) => {
745
+ marginTop: {
746
+ readonly [$$ScaleValue]: "space";
747
+ };
748
+ };
749
+ mr: (value: {
750
+ readonly [$$ScaleValue]: "space";
751
+ }) => {
752
+ marginRight: {
753
+ readonly [$$ScaleValue]: "space";
754
+ };
755
+ };
756
+ mb: (value: {
757
+ readonly [$$ScaleValue]: "space";
758
+ }) => {
759
+ marginBottom: {
760
+ readonly [$$ScaleValue]: "space";
761
+ };
762
+ };
763
+ ml: (value: {
764
+ readonly [$$ScaleValue]: "space";
765
+ }) => {
766
+ marginLeft: {
767
+ readonly [$$ScaleValue]: "space";
768
+ };
769
+ };
770
+ mx: (value: {
771
+ readonly [$$ScaleValue]: "space";
772
+ }) => {
773
+ marginLeft: {
774
+ readonly [$$ScaleValue]: "space";
775
+ };
776
+ marginRight: {
777
+ readonly [$$ScaleValue]: "space";
778
+ };
779
+ };
780
+ my: (value: {
781
+ readonly [$$ScaleValue]: "space";
782
+ }) => {
783
+ marginTop: {
784
+ readonly [$$ScaleValue]: "space";
785
+ };
786
+ marginBottom: {
787
+ readonly [$$ScaleValue]: "space";
788
+ };
789
+ };
790
+ size: (value: {
791
+ readonly [$$PropertyValue]: "width";
792
+ }) => {
793
+ width: {
794
+ readonly [$$PropertyValue]: "width";
795
+ };
796
+ height: {
797
+ readonly [$$PropertyValue]: "width";
798
+ };
799
+ };
800
+ subtleColor: (value: string) => {
801
+ color: string;
802
+ backgroundColor: string;
803
+ };
804
+ }>>;
400
805
  defaultProps: {
401
806
  size: string;
402
807
  layer: string;