formhell 1.0.0 → 1.0.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 +4 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/dist/{styles-UY6N5SPU.css → styles-MTB5P5LP.css} +223 -12
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
.raf-schema-form {
|
|
2
|
-
--raf-color-border: #d9dce1;
|
|
3
|
-
--raf-color-border-focus: #1976d2;
|
|
4
|
-
--raf-color-label: #2a3340;
|
|
5
|
-
--raf-color-muted: #6c7684;
|
|
6
|
-
--raf-color-surface: #ffffff;
|
|
7
|
-
--raf-color-surface-alt: #f8f9fb;
|
|
8
|
-
--raf-color-danger: #b42318;
|
|
9
|
-
--raf-shadow-sm: 0 1px 2px rgba(
|
|
10
|
-
--raf-shadow-md: 0 8px 20px rgba(
|
|
11
|
-
color: #101828;
|
|
2
|
+
--raf-color-border: var(--mui-palette-divider, #d9dce1);
|
|
3
|
+
--raf-color-border-focus: var(--mui-palette-primary-main, #1976d2);
|
|
4
|
+
--raf-color-label: var(--mui-palette-text-primary, #2a3340);
|
|
5
|
+
--raf-color-muted: var(--mui-palette-text-secondary, #6c7684);
|
|
6
|
+
--raf-color-surface: var(--mui-palette-background-paper, #ffffff);
|
|
7
|
+
--raf-color-surface-alt: color-mix(in srgb, var(--mui-palette-background-paper, #f8f9fb) 82%, var(--mui-palette-background-default, #ffffff));
|
|
8
|
+
--raf-color-danger: var(--mui-palette-error-main, #b42318);
|
|
9
|
+
--raf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
|
|
10
|
+
--raf-shadow-md: 0 8px 20px rgba(0, 0, 0, 0.32);
|
|
11
|
+
color: var(--mui-palette-text-primary, #101828);
|
|
12
12
|
font-family: "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
border-radius: 0.625rem;
|
|
57
57
|
font-size: 0.95rem;
|
|
58
58
|
padding: 0.625rem 0.75rem;
|
|
59
|
-
color: #101828;
|
|
59
|
+
color: var(--mui-palette-text-primary, #101828);
|
|
60
60
|
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
61
61
|
box-shadow: var(--raf-shadow-sm);
|
|
62
62
|
}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
.raf-select:focus {
|
|
66
66
|
border-color: var(--raf-color-border-focus);
|
|
67
67
|
outline: none;
|
|
68
|
-
box-shadow: 0 0 0 3px
|
|
68
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mui-palette-primary-main, #1976d2) 24%, transparent);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.raf-input:disabled,
|
|
@@ -221,6 +221,7 @@
|
|
|
221
221
|
overflow: hidden;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
|
|
224
225
|
.raf-button-row[aria-label$="type chooser"] {
|
|
225
226
|
flex-wrap: wrap;
|
|
226
227
|
gap: 0.375rem;
|
|
@@ -597,3 +598,213 @@
|
|
|
597
598
|
height: calc(100% - 3.5rem);
|
|
598
599
|
}
|
|
599
600
|
}
|
|
601
|
+
|
|
602
|
+
/* Consume MUI CSS variables when a host application provides them. */
|
|
603
|
+
.raf-schema-form {
|
|
604
|
+
--raf-mui-surface: var(--mui-palette-background-paper, #ffffff);
|
|
605
|
+
--raf-mui-surface-alt: var(--mui-palette-background-default, #f8f9fb);
|
|
606
|
+
--raf-mui-text: var(--mui-palette-text-primary, #101828);
|
|
607
|
+
--raf-mui-muted: var(--mui-palette-text-secondary, #6c7684);
|
|
608
|
+
--raf-mui-border: var(--mui-palette-divider, #d9dce1);
|
|
609
|
+
--raf-mui-primary: var(--mui-palette-primary-main, #1976d2);
|
|
610
|
+
--raf-mui-secondary: var(--mui-palette-secondary-main, #667085);
|
|
611
|
+
--raf-mui-error: var(--mui-palette-error-main, #b42318);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.raf-schema-form .raf-input,
|
|
615
|
+
.raf-schema-form .raf-select,
|
|
616
|
+
.raf-schema-form .raf-array-item,
|
|
617
|
+
.raf-schema-form .raf-info-button,
|
|
618
|
+
.raf-schema-form .raf-builder-control,
|
|
619
|
+
.raf-schema-form .raf-info-modal,
|
|
620
|
+
.raf-schema-form .raf-helper-panel {
|
|
621
|
+
background: var(--raf-mui-surface);
|
|
622
|
+
border-color: var(--raf-mui-border);
|
|
623
|
+
color: var(--raf-mui-text);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.raf-schema-form .raf-object,
|
|
627
|
+
.raf-schema-form .raf-builder-block,
|
|
628
|
+
.raf-schema-form .raf-typeahead-menu,
|
|
629
|
+
.raf-schema-form .raf-json-preview {
|
|
630
|
+
background: var(--raf-mui-surface-alt);
|
|
631
|
+
border-color: var(--raf-mui-border);
|
|
632
|
+
color: var(--raf-mui-text);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.raf-schema-form .raf-field-label,
|
|
636
|
+
.raf-schema-form .raf-object-summary,
|
|
637
|
+
.raf-schema-form .raf-builder-heading,
|
|
638
|
+
.raf-schema-form .raf-helper-title,
|
|
639
|
+
.raf-schema-form .raf-helper-subtitle,
|
|
640
|
+
.raf-schema-form .raf-info-modal-header,
|
|
641
|
+
.raf-schema-form .raf-info-modal-body,
|
|
642
|
+
.raf-schema-form .raf-builder-control {
|
|
643
|
+
color: var(--raf-mui-text);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.raf-schema-form .raf-field-summary,
|
|
647
|
+
.raf-schema-form .raf-field-optional,
|
|
648
|
+
.raf-schema-form .raf-muted,
|
|
649
|
+
.raf-schema-form .raf-loading-state,
|
|
650
|
+
.raf-schema-form .raf-helper-empty {
|
|
651
|
+
color: var(--raf-mui-muted);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.raf-schema-form .raf-input:focus,
|
|
655
|
+
.raf-schema-form .raf-select:focus,
|
|
656
|
+
.raf-schema-form .raf-textarea:focus,
|
|
657
|
+
.raf-schema-form .raf-builder-control:focus,
|
|
658
|
+
.raf-schema-form .raf-info-button:focus {
|
|
659
|
+
border-color: var(--raf-mui-primary);
|
|
660
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--raf-mui-primary) 24%, transparent);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.raf-schema-form .raf-button-primary,
|
|
664
|
+
.raf-schema-builder .raf-button-primary,
|
|
665
|
+
.raf-schema-form .raf-button-row[aria-label$="type chooser"] .raf-button[aria-pressed="true"] {
|
|
666
|
+
background: var(--raf-mui-primary);
|
|
667
|
+
color: #ffffff;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.raf-schema-form .raf-button-secondary {
|
|
671
|
+
background: color-mix(in srgb, var(--raf-mui-secondary) 18%, var(--raf-mui-surface));
|
|
672
|
+
color: var(--raf-mui-secondary);
|
|
673
|
+
border-color: var(--raf-mui-secondary);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.raf-schema-form .raf-info-button {
|
|
677
|
+
background: var(--raf-mui-surface-alt);
|
|
678
|
+
color: var(--raf-mui-text);
|
|
679
|
+
border-color: var(--raf-mui-border);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.raf-schema-form .raf-button-danger,
|
|
683
|
+
.raf-schema-form .raf-error {
|
|
684
|
+
background: color-mix(in srgb, var(--raf-mui-error) 18%, var(--raf-mui-surface));
|
|
685
|
+
border-color: var(--raf-mui-error);
|
|
686
|
+
color: var(--raf-mui-error);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.raf-schema-builder,
|
|
690
|
+
.raf-helper-panel {
|
|
691
|
+
--raf-mui-surface: var(--mui-palette-background-paper, #ffffff);
|
|
692
|
+
--raf-mui-surface-alt: var(--mui-palette-background-default, #f8f9fb);
|
|
693
|
+
--raf-mui-text: var(--mui-palette-text-primary, #101828);
|
|
694
|
+
--raf-mui-muted: var(--mui-palette-text-secondary, #6c7684);
|
|
695
|
+
--raf-mui-border: var(--mui-palette-divider, #d9dce1);
|
|
696
|
+
--raf-mui-primary: var(--mui-palette-primary-main, #1976d2);
|
|
697
|
+
--raf-mui-secondary: var(--mui-palette-secondary-main, #667085);
|
|
698
|
+
--raf-mui-error: var(--mui-palette-error-main, #b42318);
|
|
699
|
+
color: var(--raf-mui-text);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.raf-schema-builder .raf-builder-block,
|
|
703
|
+
.raf-schema-builder .raf-builder-property,
|
|
704
|
+
.raf-schema-builder .raf-builder-disclosure,
|
|
705
|
+
.raf-schema-builder .raf-typeahead-menu,
|
|
706
|
+
.raf-helper-panel .raf-helper-results,
|
|
707
|
+
.raf-helper-panel .raf-helper-snippet,
|
|
708
|
+
.raf-schema-builder .raf-info-modal,
|
|
709
|
+
.raf-helper-panel .raf-info-modal {
|
|
710
|
+
background: var(--raf-mui-surface-alt);
|
|
711
|
+
border-color: var(--raf-mui-border);
|
|
712
|
+
color: var(--raf-mui-text);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.raf-schema-builder .raf-input,
|
|
716
|
+
.raf-schema-builder .raf-select,
|
|
717
|
+
.raf-schema-builder .raf-textarea,
|
|
718
|
+
.raf-schema-builder .raf-builder-control,
|
|
719
|
+
.raf-helper-panel .raf-input,
|
|
720
|
+
.raf-helper-panel .raf-builder-control {
|
|
721
|
+
background: var(--raf-mui-surface);
|
|
722
|
+
border-color: var(--raf-mui-border);
|
|
723
|
+
color: var(--raf-mui-text);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.raf-schema-builder .raf-field-label,
|
|
727
|
+
.raf-schema-builder .raf-object-summary,
|
|
728
|
+
.raf-schema-builder .raf-builder-heading,
|
|
729
|
+
.raf-schema-builder .raf-builder-disclosure-summary,
|
|
730
|
+
.raf-helper-panel .raf-helper-title,
|
|
731
|
+
.raf-helper-panel .raf-helper-snippet-body,
|
|
732
|
+
.raf-schema-builder .raf-info-modal-body,
|
|
733
|
+
.raf-helper-panel .raf-info-modal-body {
|
|
734
|
+
color: var(--raf-mui-text);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.raf-schema-builder .raf-field-summary,
|
|
738
|
+
.raf-schema-builder .raf-field-optional,
|
|
739
|
+
.raf-helper-panel .raf-helper-subtitle,
|
|
740
|
+
.raf-helper-panel .raf-helper-empty {
|
|
741
|
+
color: var(--raf-mui-muted);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.raf-helper-panel .raf-helper-snippet-keyword,
|
|
745
|
+
.raf-schema-builder .raf-info-link {
|
|
746
|
+
color: var(--raf-mui-primary);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.raf-helper-panel .raf-helper-snippet-body strong {
|
|
750
|
+
color: var(--raf-mui-text);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.raf-schema-builder .raf-typeahead-option {
|
|
754
|
+
color: var(--raf-mui-text);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.raf-schema-builder .raf-typeahead-option:hover,
|
|
758
|
+
.raf-schema-builder .raf-typeahead-option[aria-selected="true"] {
|
|
759
|
+
background: color-mix(in srgb, var(--raf-mui-primary) 18%, var(--raf-mui-surface));
|
|
760
|
+
color: var(--raf-mui-text);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.raf-schema-builder .raf-textarea:focus,
|
|
764
|
+
.raf-schema-builder .raf-builder-control:focus,
|
|
765
|
+
.raf-helper-panel .raf-builder-control:focus {
|
|
766
|
+
border-color: var(--raf-mui-primary);
|
|
767
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--raf-mui-primary) 24%, transparent);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.raf-info-modal {
|
|
771
|
+
--raf-mui-surface: var(--mui-palette-background-paper, #ffffff);
|
|
772
|
+
--raf-mui-surface-alt: var(--mui-palette-background-default, #f8fafc);
|
|
773
|
+
--raf-mui-text: var(--mui-palette-text-primary, #344054);
|
|
774
|
+
--raf-mui-border: var(--mui-palette-divider, #cfd7e3);
|
|
775
|
+
--raf-mui-primary: var(--mui-palette-primary-main, #1976d2);
|
|
776
|
+
--raf-mui-secondary: var(--mui-palette-secondary-main, #667085);
|
|
777
|
+
--raf-mui-error: var(--mui-palette-error-main, #b42318);
|
|
778
|
+
background: var(--raf-mui-surface);
|
|
779
|
+
border-color: var(--raf-mui-border);
|
|
780
|
+
color: var(--raf-mui-text);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.raf-info-modal .raf-info-modal-header {
|
|
784
|
+
background: var(--raf-mui-surface-alt);
|
|
785
|
+
border-bottom-color: var(--raf-mui-border);
|
|
786
|
+
color: var(--raf-mui-text);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.raf-info-modal .raf-info-modal-body,
|
|
790
|
+
.raf-info-modal .raf-info-modal-body p {
|
|
791
|
+
color: var(--raf-mui-text);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.raf-info-modal .raf-info-link {
|
|
795
|
+
color: var(--raf-mui-primary);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.raf-schema-builder .raf-builder-add-property {
|
|
799
|
+
background: var(--raf-mui-primary);
|
|
800
|
+
border-color: var(--raf-mui-primary);
|
|
801
|
+
color: #ffffff;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.raf-schema-builder .raf-button-secondary,
|
|
805
|
+
.raf-schema-builder .raf-info-button,
|
|
806
|
+
.raf-info-modal .raf-button-secondary {
|
|
807
|
+
background: color-mix(in srgb, var(--raf-mui-secondary, var(--raf-mui-error)) 18%, var(--raf-mui-surface));
|
|
808
|
+
border-color: var(--raf-mui-secondary, var(--raf-mui-error));
|
|
809
|
+
color: var(--raf-mui-secondary, var(--raf-mui-error));
|
|
810
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formhell",
|
|
3
3
|
"author": "Ryan Rutkin",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "React JSON Schema form and schema builder library with draft 2020-12 support, robust $ref resolution, and strong defaults handling",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.cjs",
|