@poly-x/react 0.1.1 → 0.2.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.
package/dist/styles.css CHANGED
@@ -709,6 +709,157 @@
709
709
  color: var(--polyx-muted-fg);
710
710
  }
711
711
 
712
+ /* --- User profile dialog (v0.4) ------------------------------------------ */
713
+
714
+ .polyx-userprofile__trigger {
715
+ font: inherit;
716
+ font-size: 0.875rem;
717
+ color: var(--polyx-fg);
718
+ background: none;
719
+ border: none;
720
+ padding: 0;
721
+ cursor: pointer;
722
+ }
723
+
724
+ .polyx-userprofile__overlay {
725
+ position: fixed;
726
+ inset: 0;
727
+ z-index: 50;
728
+ display: flex;
729
+ align-items: center;
730
+ justify-content: center;
731
+ padding: 1rem;
732
+ background: rgb(0 0 0 / 0.45);
733
+ overflow-y: auto;
734
+ }
735
+
736
+ .polyx-userprofile__dialog {
737
+ width: 100%;
738
+ max-width: 28rem;
739
+ padding: 1.5rem;
740
+ background: var(--polyx-bg);
741
+ color: var(--polyx-fg);
742
+ border: 1px solid var(--polyx-border);
743
+ border-radius: var(--polyx-radius);
744
+ box-shadow: var(--polyx-shadow);
745
+ }
746
+
747
+ .polyx-userprofile__header {
748
+ margin-bottom: 1.25rem;
749
+ }
750
+
751
+ .polyx-userprofile__title {
752
+ margin: 0;
753
+ font-size: 1.0625rem;
754
+ font-weight: 600;
755
+ }
756
+
757
+ .polyx-userprofile__description {
758
+ margin: 0.25rem 0 0;
759
+ font-size: 0.8125rem;
760
+ color: var(--polyx-muted-fg);
761
+ }
762
+
763
+ .polyx-userprofile__status {
764
+ margin: 0;
765
+ font-size: 0.875rem;
766
+ color: var(--polyx-muted-fg);
767
+ }
768
+
769
+ .polyx-userprofile__photo {
770
+ display: flex;
771
+ align-items: center;
772
+ gap: 0.875rem;
773
+ }
774
+
775
+ .polyx-userprofile__photo-actions {
776
+ display: flex;
777
+ flex-direction: column;
778
+ gap: 0.25rem;
779
+ }
780
+
781
+ .polyx-userprofile__photo-button {
782
+ font: inherit;
783
+ font-size: 0.8125rem;
784
+ font-weight: 500;
785
+ color: var(--polyx-brand);
786
+ background: none;
787
+ border: none;
788
+ padding: 0;
789
+ text-align: left;
790
+ cursor: pointer;
791
+ }
792
+
793
+ /* Hidden from sight but not from assistive technology — the visible control is the button. */
794
+ .polyx-userprofile__file {
795
+ position: absolute;
796
+ width: 1px;
797
+ height: 1px;
798
+ padding: 0;
799
+ margin: -1px;
800
+ overflow: hidden;
801
+ clip: rect(0, 0, 0, 0);
802
+ white-space: nowrap;
803
+ border: 0;
804
+ }
805
+
806
+ .polyx-userprofile__row {
807
+ display: grid;
808
+ grid-template-columns: 1fr 1fr;
809
+ gap: 0.75rem;
810
+ }
811
+
812
+ @media (max-width: 24rem) {
813
+ .polyx-userprofile__row {
814
+ grid-template-columns: 1fr;
815
+ }
816
+ }
817
+
818
+ .polyx-userprofile__optional {
819
+ font-weight: 400;
820
+ color: var(--polyx-muted-fg);
821
+ }
822
+
823
+ .polyx-userprofile__field-error {
824
+ margin: 0;
825
+ font-size: 0.8125rem;
826
+ color: var(--polyx-danger);
827
+ }
828
+
829
+ .polyx-userprofile__success {
830
+ margin: 0;
831
+ padding: 0.625rem 0.75rem;
832
+ font-size: 0.8125rem;
833
+ color: var(--polyx-fg);
834
+ background: var(--polyx-panel-bg);
835
+ border: 1px solid var(--polyx-border);
836
+ border-radius: var(--polyx-radius-sm);
837
+ }
838
+
839
+ .polyx-userprofile__actions {
840
+ display: flex;
841
+ justify-content: flex-end;
842
+ gap: 0.625rem;
843
+ }
844
+
845
+ .polyx-userprofile__cancel {
846
+ font: inherit;
847
+ font-size: 0.875rem;
848
+ font-weight: 500;
849
+ height: 2.5rem;
850
+ padding: 0 0.875rem;
851
+ color: var(--polyx-fg);
852
+ background: none;
853
+ border: 1px solid var(--polyx-border);
854
+ border-radius: var(--polyx-radius-sm);
855
+ cursor: pointer;
856
+ }
857
+
858
+ .polyx-userprofile__actions .polyx-signin__submit {
859
+ width: auto;
860
+ padding: 0 1.125rem;
861
+ }
862
+
712
863
  /* Closes `@layer polyx` — opened at the top of the file. The rules above are left
713
864
  unindented deliberately: wrapping the sheet in a layer is a cascade change, not a
714
865
  reformat, and re-indenting 600 lines would bury it in the diff. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poly-x/react",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "PolyX SDK for React SPAs - provider, hooks, drop-in auth UI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "module": "./dist/index.mjs",
28
28
  "types": "./dist/index.d.cts",
29
29
  "dependencies": {
30
- "@poly-x/core": "0.1.1"
30
+ "@poly-x/core": "0.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=18",