@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.
- package/dist/granular-ui.min.js +22 -10
- package/dist/granular-ui.min.js.map +2 -2
- package/package.json +1 -1
- package/src/theme/styles.js +22 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granularjs/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "90+ production-ready UI components for Granular. Dark/light themes, CSS variables, accessible, zero dependencies beyond @granularjs/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/granular-ui.min.js",
|
package/src/theme/styles.js
CHANGED
|
@@ -409,6 +409,11 @@ const css = `
|
|
|
409
409
|
--g-ui-primary-strong: var(--g-ui-primary-active);
|
|
410
410
|
--g-ui-shadow: var(--g-ui-shadow-md);
|
|
411
411
|
|
|
412
|
+
/* Overlays (themeable) */
|
|
413
|
+
--g-ui-overlay-light: rgba(0,0,0,0.4);
|
|
414
|
+
--g-ui-overlay-normal: rgba(0,0,0,0.6);
|
|
415
|
+
--g-ui-overlay-dark: rgba(0,0,0,0.8);
|
|
416
|
+
|
|
412
417
|
/* Misc */
|
|
413
418
|
--g-ui-radius: 4px;
|
|
414
419
|
--g-ui-font: 'Inter', 'Arimo', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
@@ -629,6 +634,13 @@ const css = `
|
|
|
629
634
|
--g-ui-shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
|
|
630
635
|
--g-ui-shadow-2xl: 0px 24px 48px -12px rgba(16, 24, 40, 0.18);
|
|
631
636
|
}
|
|
637
|
+
|
|
638
|
+
* {
|
|
639
|
+
box-sizing: border-box;
|
|
640
|
+
margin: 0;
|
|
641
|
+
padding: 0;
|
|
642
|
+
}
|
|
643
|
+
|
|
632
644
|
body {
|
|
633
645
|
margin: 0;
|
|
634
646
|
padding: 0;
|
|
@@ -1002,15 +1014,15 @@ body {
|
|
|
1002
1014
|
.g-ui-modal-overlay {
|
|
1003
1015
|
position: fixed;
|
|
1004
1016
|
inset: 0;
|
|
1005
|
-
background:
|
|
1017
|
+
background: var(--g-ui-overlay-normal);
|
|
1006
1018
|
display: flex;
|
|
1007
1019
|
align-items: center;
|
|
1008
1020
|
justify-content: center;
|
|
1009
1021
|
z-index: 999;
|
|
1010
1022
|
}
|
|
1011
|
-
.g-ui-modal-overlay-light { background:
|
|
1012
|
-
.g-ui-modal-overlay-normal { background:
|
|
1013
|
-
.g-ui-modal-overlay-dark { background:
|
|
1023
|
+
.g-ui-modal-overlay-light { background: var(--g-ui-overlay-light); }
|
|
1024
|
+
.g-ui-modal-overlay-normal { background: var(--g-ui-overlay-normal); }
|
|
1025
|
+
.g-ui-modal-overlay-dark { background: var(--g-ui-overlay-dark); }
|
|
1014
1026
|
.g-ui-modal-centered { align-items: center; justify-content: center; }
|
|
1015
1027
|
.g-ui-modal-top { align-items: flex-start; justify-content: center; padding-top: var(--g-ui-space-40); }
|
|
1016
1028
|
.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); }
|
|
@@ -1159,7 +1171,7 @@ body {
|
|
|
1159
1171
|
width: var(--g-ui-switch-thumb, 14px);
|
|
1160
1172
|
height: var(--g-ui-switch-thumb, 14px);
|
|
1161
1173
|
border-radius: 50%;
|
|
1162
|
-
background:
|
|
1174
|
+
background: var(--g-ui-white);
|
|
1163
1175
|
top: var(--g-ui-switch-offset, 2px);
|
|
1164
1176
|
left: var(--g-ui-switch-offset, 2px);
|
|
1165
1177
|
transition: transform .15s ease;
|
|
@@ -1427,9 +1439,9 @@ body {
|
|
|
1427
1439
|
inset: 0;
|
|
1428
1440
|
z-index: 998;
|
|
1429
1441
|
}
|
|
1430
|
-
.g-ui-drawer-overlay-normal { background:
|
|
1431
|
-
.g-ui-drawer-overlay-light { background:
|
|
1432
|
-
.g-ui-drawer-overlay-dark { background:
|
|
1442
|
+
.g-ui-drawer-overlay-normal { background: var(--g-ui-overlay-normal); }
|
|
1443
|
+
.g-ui-drawer-overlay-light { background: var(--g-ui-overlay-light); }
|
|
1444
|
+
.g-ui-drawer-overlay-dark { background: var(--g-ui-overlay-dark); }
|
|
1433
1445
|
.g-ui-drawer {
|
|
1434
1446
|
position: fixed;
|
|
1435
1447
|
top: 0;
|
|
@@ -3157,7 +3169,7 @@ body {
|
|
|
3157
3169
|
.g-ui-loading-overlay {
|
|
3158
3170
|
position: absolute;
|
|
3159
3171
|
inset: 0;
|
|
3160
|
-
background:
|
|
3172
|
+
background: var(--g-ui-overlay-normal);
|
|
3161
3173
|
display: flex;
|
|
3162
3174
|
align-items: center;
|
|
3163
3175
|
justify-content: center;
|
|
@@ -3677,7 +3689,7 @@ body {
|
|
|
3677
3689
|
position: fixed;
|
|
3678
3690
|
inset: 0;
|
|
3679
3691
|
z-index: 998;
|
|
3680
|
-
background:
|
|
3692
|
+
background: var(--g-ui-overlay-normal);
|
|
3681
3693
|
opacity: 0;
|
|
3682
3694
|
pointer-events: none;
|
|
3683
3695
|
transition: opacity .22s ease, backdrop-filter .22s ease;
|