@dendelion/func-ui 0.4.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dendelion/func-ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Glossy, noisy, cosy React component library — frosted glass, film grain, and lava glow",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -78,11 +78,14 @@
78
78
  },
79
79
  "devDependencies": {
80
80
  "@biomejs/biome": "^1.9.4",
81
+ "@testing-library/dom": "^10.4.2",
82
+ "@testing-library/react": "^16.3.3",
81
83
  "@types/react": "^18.3.12",
82
84
  "@types/react-dom": "^18.3.1",
83
85
  "@vitejs/plugin-react-swc": "^3.7.1",
84
86
  "autoprefixer": "^10.4.20",
85
87
  "gsap": "^3.15.0",
88
+ "jsdom": "^25.0.1",
86
89
  "postcss": "^8.4.47",
87
90
  "postcss-scss": "^4.0.9",
88
91
  "publint": "^0.3.21",
package/src/globals.scss CHANGED
@@ -105,7 +105,11 @@
105
105
  --fui-lamp-red: radial-gradient(circle at 50% 50%, #ff5050 39%, #f99696 100%);
106
106
  --fui-lamp-red-glow: rgba(255, 80, 80, 0.5);
107
107
  --fui-lamp-red-glow-strong: rgba(192, 79, 79, 0.7);
108
- --fui-lamp-dark: radial-gradient(circle at 50% 50%, #61675f 0%, #36302b 100%);
108
+ --fui-lamp-dark: radial-gradient(
109
+ circle at 50% 30%,
110
+ rgba(70, 66, 60, 0.45) 0%,
111
+ rgba(14, 12, 10, 0.7) 100%
112
+ );
109
113
  --fui-lamp-dark-glow: transparent;
110
114
  --fui-lamp-dark-glow-strong: transparent;
111
115
  }
@@ -139,20 +143,3 @@
139
143
  --fui-lamp-red-glow: rgba(255, 80, 80, 0.4);
140
144
  --fui-lamp-red-glow-strong: rgba(255, 80, 80, 0.6);
141
145
  }
142
-
143
- // ─── Base ──────────────────────────────────────────────────────
144
- html,
145
- body {
146
- height: 100%;
147
- }
148
-
149
- body {
150
- margin: 0;
151
- font-family: $font-family-sans;
152
- line-height: 1.6;
153
- background-color: var(--fui-bg);
154
- color: var(--fui-text);
155
- transition:
156
- background-color 0.3s ease,
157
- color 0.3s ease;
158
- }
@@ -49,7 +49,9 @@ $lamp-bezel-soft-shadow:
49
49
  0 4px 8px -2px rgba(0, 0, 0, 0.3),
50
50
  0 2px 4px -1px rgba(0, 0, 0, 0.2);
51
51
 
52
- $lamp-socket-color: #1a1a1a;
52
+ // Translucent so the unlit (dark) tone reads as smoked glass over whatever
53
+ // is behind the lamp; the lit tones are opaque and cover it entirely.
54
+ $lamp-socket-color: rgba(10, 9, 8, 0.45);
53
55
  $lamp-socket-shadow:
54
56
  1px 1px 2px rgba(0, 0, 0, 0.2),
55
57
  3px 3px 2px rgba(0, 0, 0, 0.05),
@@ -61,6 +63,11 @@ $lamp-frosted-shadow:
61
63
  $lamp-frosted-shadow-subtle:
62
64
  inset 5px 2px 5px 2px rgba(0, 0, 0, 0.1),
63
65
  inset -1px 3px 6px 1px rgba(255, 255, 255, 0.2);
66
+ // The unlit lamp: smoked glass with a thin rim of light on top, not the
67
+ // lit tones' milky frost.
68
+ $lamp-smoked-shadow:
69
+ inset 0 1px 1px rgba(255, 255, 255, 0.14),
70
+ inset 0 -3px 6px rgba(0, 0, 0, 0.45);
64
71
 
65
72
  $lamp-transition: all 200ms ease-out;
66
73
 
@@ -94,8 +101,10 @@ $lamp-transition: all 200ms ease-out;
94
101
  transition: $lamp-transition;
95
102
  }
96
103
 
97
- @mixin lamp-frosted-inner($subtle: false) {
98
- @if $subtle {
104
+ @mixin lamp-frosted-inner($subtle: false, $tone: null) {
105
+ @if $tone == 'dark' {
106
+ box-shadow: $lamp-smoked-shadow;
107
+ } @else if $subtle {
99
108
  box-shadow: $lamp-frosted-shadow-subtle;
100
109
  } @else {
101
110
  box-shadow: $lamp-frosted-shadow;
@@ -107,11 +116,11 @@ $lamp-transition: all 200ms ease-out;
107
116
  }
108
117
 
109
118
  @mixin lamp-glow($tone) {
110
- @include lamp-frosted-inner;
119
+ @include lamp-frosted-inner($tone: $tone);
111
120
 
112
121
  &:hover {
113
122
  box-shadow:
114
- $lamp-frosted-shadow,
123
+ if($tone == 'dark', $lamp-smoked-shadow, $lamp-frosted-shadow),
115
124
  0 0 10px 2px var(--fui-lamp-#{$tone}-glow),
116
125
  0 0 20px 0 var(--fui-lamp-#{$tone}-glow-strong);
117
126
  }
@@ -29,9 +29,9 @@ $space-6: 1.5rem;
29
29
  $space-8: 2rem;
30
30
 
31
31
  // ─── Type scale ────────────────────────────────────────────────
32
- $font-family-sans: 'Montserrat Alternates', sans-serif;
32
+ $font-family-sans: var(--fui-font, 'Montserrat Alternates', sans-serif);
33
33
  $font-family-title: 'KyivType Serif', Georgia, serif;
34
- $font-family-mono: 'Montserrat Alternates', sans-serif;
34
+ $font-family-mono: var(--fui-font, 'Montserrat Alternates', sans-serif);
35
35
 
36
36
  $font-size-sm: 0.875rem;
37
37
  $font-size-md: 1rem;