@granularjs/ui 0.1.3 → 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.
@@ -392,6 +392,11 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
392
392
  --g-ui-primary-strong: var(--g-ui-primary-active);
393
393
  --g-ui-shadow: var(--g-ui-shadow-md);
394
394
 
395
+ /* Overlays (themeable) */
396
+ --g-ui-overlay-light: rgba(0,0,0,0.4);
397
+ --g-ui-overlay-normal: rgba(0,0,0,0.6);
398
+ --g-ui-overlay-dark: rgba(0,0,0,0.8);
399
+
395
400
  /* Misc */
396
401
  --g-ui-radius: 4px;
397
402
  --g-ui-font: 'Inter', 'Arimo', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
@@ -612,6 +617,13 @@ var zr="granular-ui-styles",It=new URL("./fonts/Poppins-400.ttf",import.meta.url
612
617
  --g-ui-shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
613
618
  --g-ui-shadow-2xl: 0px 24px 48px -12px rgba(16, 24, 40, 0.18);
614
619
  }
620
+
621
+ * {
622
+ box-sizing: border-box;
623
+ margin: 0;
624
+ padding: 0;
625
+ }
626
+
615
627
  body {
616
628
  margin: 0;
617
629
  padding: 0;
@@ -985,15 +997,15 @@ body {
985
997
  .g-ui-modal-overlay {
986
998
  position: fixed;
987
999
  inset: 0;
988
- background: rgba(0,0,0,0.6);
1000
+ background: var(--g-ui-overlay-normal);
989
1001
  display: flex;
990
1002
  align-items: center;
991
1003
  justify-content: center;
992
1004
  z-index: 999;
993
1005
  }
994
- .g-ui-modal-overlay-light { background: rgba(0,0,0,0.4); }
995
- .g-ui-modal-overlay-normal { background: rgba(0,0,0,0.6); }
996
- .g-ui-modal-overlay-dark { background: rgba(0,0,0,0.8); }
1006
+ .g-ui-modal-overlay-light { background: var(--g-ui-overlay-light); }
1007
+ .g-ui-modal-overlay-normal { background: var(--g-ui-overlay-normal); }
1008
+ .g-ui-modal-overlay-dark { background: var(--g-ui-overlay-dark); }
997
1009
  .g-ui-modal-centered { align-items: center; justify-content: center; }
998
1010
  .g-ui-modal-top { align-items: flex-start; justify-content: center; padding-top: var(--g-ui-space-40); }
999
1011
  .g-ui-modal-position-top-left { align-items: flex-start; justify-content: flex-start; padding: var(--g-ui-space-40) var(--g-ui-space-20); }
@@ -1142,7 +1154,7 @@ body {
1142
1154
  width: var(--g-ui-switch-thumb, 14px);
1143
1155
  height: var(--g-ui-switch-thumb, 14px);
1144
1156
  border-radius: 50%;
1145
- background: #fff;
1157
+ background: var(--g-ui-white);
1146
1158
  top: var(--g-ui-switch-offset, 2px);
1147
1159
  left: var(--g-ui-switch-offset, 2px);
1148
1160
  transition: transform .15s ease;
@@ -1410,9 +1422,9 @@ body {
1410
1422
  inset: 0;
1411
1423
  z-index: 998;
1412
1424
  }
1413
- .g-ui-drawer-overlay-normal { background: rgba(0,0,0,0.6); }
1414
- .g-ui-drawer-overlay-light { background: rgba(0,0,0,0.4); }
1415
- .g-ui-drawer-overlay-dark { background: rgba(0,0,0,0.8); }
1425
+ .g-ui-drawer-overlay-normal { background: var(--g-ui-overlay-normal); }
1426
+ .g-ui-drawer-overlay-light { background: var(--g-ui-overlay-light); }
1427
+ .g-ui-drawer-overlay-dark { background: var(--g-ui-overlay-dark); }
1416
1428
  .g-ui-drawer {
1417
1429
  position: fixed;
1418
1430
  top: 0;
@@ -3140,7 +3152,7 @@ body {
3140
3152
  .g-ui-loading-overlay {
3141
3153
  position: absolute;
3142
3154
  inset: 0;
3143
- background: rgba(15,17,21,0.6);
3155
+ background: var(--g-ui-overlay-normal);
3144
3156
  display: flex;
3145
3157
  align-items: center;
3146
3158
  justify-content: center;
@@ -3660,7 +3672,7 @@ body {
3660
3672
  position: fixed;
3661
3673
  inset: 0;
3662
3674
  z-index: 998;
3663
- background: rgba(0,0,0,0.6);
3675
+ background: var(--g-ui-overlay-normal);
3664
3676
  opacity: 0;
3665
3677
  pointer-events: none;
3666
3678
  transition: opacity .22s ease, backdrop-filter .22s ease;