@citrusworx/juiceui 0.2.0 → 0.3.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/README.md +19 -0
- package/dist/index.js +154 -80
- package/dist/themes/aquaflux.css +71 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -184,8 +184,27 @@ This is intended for describing project-level branding concerns like:
|
|
|
184
184
|
- typography roles
|
|
185
185
|
- experimental integration options
|
|
186
186
|
|
|
187
|
+
Juice can also generate full theme artifacts from config.
|
|
188
|
+
|
|
189
|
+
Library-owned themes can still come from `src/themes/<id>/<id>.config.yaml`.
|
|
190
|
+
The generator writes those derived theme contracts into `src/.generated/themes/<id>/` and the build automatically compiles them into `dist/themes/<id>.css`.
|
|
191
|
+
|
|
192
|
+
App-owned themes can be generated from an app config and committed or imported locally:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
yarn workspace @citrusworx/juiceui generate:themes --config ../../apps/blackwatersound/front/juice.theme.yaml --css-out ../../apps/blackwatersound/front/src/generated/blackwatersound-theme.css
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
That lets an app keep its brand config while still relying on Juice for spacing, layout, surfaces, and responsive structure.
|
|
199
|
+
|
|
187
200
|
Config is not required to use Juice. The most stable current entrypoint is still the compiled stylesheet plus the existing attribute system.
|
|
188
201
|
|
|
202
|
+
Generate/discover themes directly with:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
yarn workspace @citrusworx/juiceui generate:themes
|
|
206
|
+
```
|
|
207
|
+
|
|
189
208
|
## Build
|
|
190
209
|
|
|
191
210
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,104 @@
|
|
|
1
1
|
//#region ../sig/dist/signal.js
|
|
2
|
-
var e = null;
|
|
3
|
-
function
|
|
4
|
-
|
|
2
|
+
var e = !1, t = /* @__PURE__ */ new Set(), n = null, r = null;
|
|
3
|
+
function i(e) {
|
|
4
|
+
e?.();
|
|
5
|
+
}
|
|
6
|
+
function a(n) {
|
|
7
|
+
if (e) {
|
|
8
|
+
t.add(n);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
n.notify();
|
|
12
|
+
}
|
|
13
|
+
function o(e) {
|
|
14
|
+
r?.cleanups.add(e);
|
|
15
|
+
}
|
|
16
|
+
function s(e) {
|
|
17
|
+
let t = r, n = { cleanups: /* @__PURE__ */ new Set() };
|
|
18
|
+
r = n;
|
|
19
|
+
try {
|
|
20
|
+
let t = e(), r = !1;
|
|
21
|
+
return {
|
|
22
|
+
value: t,
|
|
23
|
+
dispose: () => {
|
|
24
|
+
if (!r) {
|
|
25
|
+
r = !0;
|
|
26
|
+
for (let e of n.cleanups) i(e);
|
|
27
|
+
n.cleanups.clear();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
} finally {
|
|
32
|
+
r = t;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function c(e) {
|
|
36
|
+
let t = /* @__PURE__ */ new Set();
|
|
5
37
|
function r() {
|
|
6
|
-
return
|
|
38
|
+
return n && (t.add(n), n.addDependency(t)), e;
|
|
7
39
|
}
|
|
8
|
-
function i(
|
|
9
|
-
|
|
40
|
+
function i(n) {
|
|
41
|
+
e = n, [...t].forEach((e) => a(e));
|
|
10
42
|
}
|
|
11
43
|
return {
|
|
12
44
|
get: r,
|
|
13
45
|
set: i
|
|
14
46
|
};
|
|
15
47
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
48
|
+
function l(e) {
|
|
49
|
+
let r = /* @__PURE__ */ new Set(), a, s = !1, c = {
|
|
50
|
+
addDependency(e) {
|
|
51
|
+
r.add(e);
|
|
52
|
+
},
|
|
53
|
+
notify() {
|
|
54
|
+
s || l();
|
|
55
|
+
},
|
|
56
|
+
dispose() {
|
|
57
|
+
if (!s) {
|
|
58
|
+
s = !0;
|
|
59
|
+
for (let e of r) e.delete(c);
|
|
60
|
+
r.clear(), i(a), a = void 0, t.delete(c);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
function l() {
|
|
65
|
+
for (let e of r) e.delete(c);
|
|
66
|
+
r.clear(), i(a), a = void 0;
|
|
67
|
+
let t = n;
|
|
68
|
+
n = c;
|
|
69
|
+
let o;
|
|
70
|
+
try {
|
|
71
|
+
o = e();
|
|
72
|
+
} finally {
|
|
73
|
+
n = t;
|
|
74
|
+
}
|
|
75
|
+
typeof o == "function" && (a = o);
|
|
76
|
+
}
|
|
77
|
+
l();
|
|
78
|
+
let u = () => c.dispose();
|
|
79
|
+
return o(u), u;
|
|
18
80
|
}
|
|
19
81
|
//#endregion
|
|
20
82
|
//#region ../sig/dist/jsx-runtime.js
|
|
21
|
-
|
|
83
|
+
var u = /* @__PURE__ */ new WeakMap();
|
|
84
|
+
function d(e, t) {
|
|
85
|
+
if (e.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
86
|
+
e.childNodes.forEach((e) => d(e, t));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
let n = u.get(e) ?? /* @__PURE__ */ new Set();
|
|
90
|
+
n.add(t), u.set(e, n);
|
|
91
|
+
}
|
|
92
|
+
function f(e, t) {
|
|
22
93
|
if (t != null) {
|
|
23
94
|
if (Array.isArray(t)) {
|
|
24
|
-
t.forEach((t) =>
|
|
95
|
+
t.forEach((t) => f(e, t));
|
|
25
96
|
return;
|
|
26
97
|
}
|
|
27
98
|
if (typeof t == "function") {
|
|
28
|
-
let
|
|
29
|
-
e.appendChild(
|
|
30
|
-
|
|
99
|
+
let n = document.createTextNode("");
|
|
100
|
+
e.appendChild(n), l(() => {
|
|
101
|
+
n.textContent = String(t());
|
|
31
102
|
});
|
|
32
103
|
return;
|
|
33
104
|
}
|
|
@@ -38,7 +109,7 @@ function r(e, t) {
|
|
|
38
109
|
e.appendChild(t);
|
|
39
110
|
}
|
|
40
111
|
}
|
|
41
|
-
function
|
|
112
|
+
function p(e, t, n) {
|
|
42
113
|
if (t !== "children") {
|
|
43
114
|
if (t === "ref" && typeof n == "function") {
|
|
44
115
|
n(e);
|
|
@@ -56,68 +127,71 @@ function i(e, t, n) {
|
|
|
56
127
|
n === !0 ? e.setAttribute(t, "") : n === !1 || n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
57
128
|
}
|
|
58
129
|
}
|
|
59
|
-
function
|
|
60
|
-
if (typeof e == "function")
|
|
130
|
+
function m(e, t) {
|
|
131
|
+
if (typeof e == "function") {
|
|
132
|
+
let { value: n, dispose: r } = s(() => e(t));
|
|
133
|
+
return n instanceof Node && d(n, r), n;
|
|
134
|
+
}
|
|
61
135
|
let n = document.createElement(e);
|
|
62
136
|
if (t) {
|
|
63
|
-
for (let e in t)
|
|
64
|
-
|
|
137
|
+
for (let e in t) p(n, e, t[e]);
|
|
138
|
+
f(n, t.children);
|
|
65
139
|
}
|
|
66
140
|
return n;
|
|
67
141
|
}
|
|
68
|
-
var
|
|
142
|
+
var h = m;
|
|
69
143
|
//#endregion
|
|
70
144
|
//#region src/components/accordion/accordion.tsx
|
|
71
|
-
function
|
|
72
|
-
let
|
|
73
|
-
|
|
145
|
+
function g(e) {
|
|
146
|
+
let t = c(e.defaultExpanded ?? !1), n = e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "accordion", r = `${n}-trigger`, i = `${n}-panel`, a = null, o = null, s = (e) => {
|
|
147
|
+
a?.setAttribute("aria-expanded", String(e)), o && (o.hidden = !e, o.setAttribute("aria-hidden", String(!e)), o.setAttribute("content", e ? "active" : "hidden"));
|
|
74
148
|
};
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
}), /* @__PURE__ */
|
|
149
|
+
return l(() => {
|
|
150
|
+
s(t.get());
|
|
151
|
+
}), /* @__PURE__ */ h("section", {
|
|
78
152
|
accordion: !0,
|
|
79
153
|
name: e.name,
|
|
80
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ m("button", {
|
|
81
155
|
...e.attributes ?? {},
|
|
82
156
|
ref: (e) => {
|
|
83
|
-
|
|
157
|
+
a = e, s(t.get());
|
|
84
158
|
},
|
|
85
159
|
type: "button",
|
|
86
|
-
id:
|
|
160
|
+
id: r,
|
|
87
161
|
"accordion-item": !0,
|
|
88
|
-
"aria-expanded": String(
|
|
89
|
-
"aria-controls":
|
|
90
|
-
onclick: () =>
|
|
162
|
+
"aria-expanded": String(t.get()),
|
|
163
|
+
"aria-controls": i,
|
|
164
|
+
onclick: () => t.set(!t.get()),
|
|
91
165
|
children: e.title ?? e.name
|
|
92
|
-
}), /* @__PURE__ */
|
|
166
|
+
}), /* @__PURE__ */ m("div", {
|
|
93
167
|
ref: (e) => {
|
|
94
|
-
|
|
168
|
+
o = e, s(t.get());
|
|
95
169
|
},
|
|
96
|
-
id:
|
|
170
|
+
id: i,
|
|
97
171
|
role: "region",
|
|
98
|
-
"aria-labelledby":
|
|
99
|
-
content:
|
|
100
|
-
hidden: !
|
|
101
|
-
"aria-hidden": String(!
|
|
172
|
+
"aria-labelledby": r,
|
|
173
|
+
content: t.get() ? "active" : "hidden",
|
|
174
|
+
hidden: !t.get(),
|
|
175
|
+
"aria-hidden": String(!t.get()),
|
|
102
176
|
children: e.children
|
|
103
177
|
})]
|
|
104
178
|
});
|
|
105
179
|
}
|
|
106
180
|
//#endregion
|
|
107
181
|
//#region src/js/src/nav/navigation.ts
|
|
108
|
-
var
|
|
182
|
+
var _ = {
|
|
109
183
|
root: typeof document < "u" ? document : {},
|
|
110
184
|
navSelector: "nav[type=\"bar\"], nav[type=\"links\"]",
|
|
111
185
|
sidebarSelector: "nav[type=\"sidebar\"]",
|
|
112
186
|
toggleSelector: "nav[type=\"mobile\"]",
|
|
113
187
|
mobileBreakpoint: 960
|
|
114
|
-
},
|
|
188
|
+
}, v = (e) => Array.from(e), y = "juice-sidebar", b = "Toggle navigation menu", x = (e, t) => {
|
|
115
189
|
if (t) {
|
|
116
190
|
e.removeAttribute("hidden");
|
|
117
191
|
return;
|
|
118
192
|
}
|
|
119
193
|
e.setAttribute("hidden", "true");
|
|
120
|
-
},
|
|
194
|
+
}, S = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, C = (e = {}) => {
|
|
121
195
|
if (typeof window > "u" || typeof document > "u") return {
|
|
122
196
|
destroy: () => {},
|
|
123
197
|
openSidebar: () => {},
|
|
@@ -127,72 +201,72 @@ var c = {
|
|
|
127
201
|
isMobile: () => !1
|
|
128
202
|
};
|
|
129
203
|
let t = {
|
|
130
|
-
...
|
|
204
|
+
..._,
|
|
131
205
|
...e
|
|
132
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
206
|
+
}, n = t.root ?? document, r = n, i = () => v(n.querySelectorAll(t.navSelector)), a = () => v(n.querySelectorAll(t.sidebarSelector)), o = () => v(n.querySelectorAll(t.toggleSelector)), s = () => window.innerWidth <= t.mobileBreakpoint, c = 0, l = null, u = (e) => {
|
|
133
207
|
if (e.id) return e.id;
|
|
134
|
-
|
|
135
|
-
let t = `${
|
|
208
|
+
c += 1;
|
|
209
|
+
let t = `${y}-${c}`;
|
|
136
210
|
return e.id = t, t;
|
|
137
|
-
},
|
|
211
|
+
}, d = (e, t) => {
|
|
138
212
|
if (!e) return;
|
|
139
213
|
let n = e.children.length > 0 || (e.textContent?.trim().length ?? 0) > 0;
|
|
140
|
-
t && e.setAttribute("aria-controls",
|
|
141
|
-
},
|
|
214
|
+
t && e.setAttribute("aria-controls", u(t)), n ? e.removeAttribute("data-nav-toggle-icon") : e.setAttribute("data-nav-toggle-icon", "default"), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && (e.textContent?.trim() ?? "").length === 0 && e.setAttribute("aria-label", b), S(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0"));
|
|
215
|
+
}, f = (e) => {
|
|
142
216
|
let n = a();
|
|
143
217
|
if (n.length === 0) return null;
|
|
144
218
|
if (!e) return n[0] ?? null;
|
|
145
219
|
let r = e.parentElement;
|
|
146
220
|
if (r) {
|
|
147
|
-
let e =
|
|
221
|
+
let e = v(r.querySelectorAll(t.sidebarSelector))[0];
|
|
148
222
|
if (e) return e;
|
|
149
223
|
}
|
|
150
224
|
let i = e;
|
|
151
225
|
for (; i;) {
|
|
152
|
-
let e =
|
|
226
|
+
let e = v(i.querySelectorAll(t.sidebarSelector))[0];
|
|
153
227
|
if (e) return e;
|
|
154
228
|
i = i.parentElement;
|
|
155
229
|
}
|
|
156
230
|
return n[0] ?? null;
|
|
157
|
-
},
|
|
231
|
+
}, p = (e) => {
|
|
158
232
|
let n = o();
|
|
159
233
|
if (n.length === 0) return null;
|
|
160
234
|
if (!e) return n[0] ?? null;
|
|
161
235
|
let r = e.parentElement;
|
|
162
236
|
if (r) {
|
|
163
|
-
let e =
|
|
237
|
+
let e = v(r.querySelectorAll(t.toggleSelector))[0];
|
|
164
238
|
if (e) return e;
|
|
165
239
|
}
|
|
166
240
|
let i = e;
|
|
167
241
|
for (; i;) {
|
|
168
|
-
let e =
|
|
242
|
+
let e = v(i.querySelectorAll(t.toggleSelector))[0];
|
|
169
243
|
if (e) return e;
|
|
170
244
|
i = i.parentElement;
|
|
171
245
|
}
|
|
172
246
|
return n[0] ?? null;
|
|
173
|
-
},
|
|
174
|
-
let t =
|
|
175
|
-
t && (
|
|
176
|
-
},
|
|
177
|
-
let t =
|
|
178
|
-
t && (
|
|
179
|
-
},
|
|
180
|
-
let t =
|
|
247
|
+
}, m = (e) => {
|
|
248
|
+
let t = f(e), n = e ?? p(t);
|
|
249
|
+
t && (u(t), d(n, t), t.removeAttribute("hidden"), t.setAttribute("aria-hidden", "false"), n?.setAttribute("aria-expanded", "true"), l = n ?? null);
|
|
250
|
+
}, h = (e) => {
|
|
251
|
+
let t = f(e), n = e ?? p(t);
|
|
252
|
+
t && (u(t), d(n, t), s() && t.setAttribute("hidden", "true"), t.setAttribute("aria-hidden", String(s())), n?.setAttribute("aria-expanded", "false"), s() && n && n.focus());
|
|
253
|
+
}, g = (e) => {
|
|
254
|
+
let t = f(e);
|
|
181
255
|
if (t) {
|
|
182
256
|
if (!t.hasAttribute("hidden")) {
|
|
183
|
-
|
|
257
|
+
h(e);
|
|
184
258
|
return;
|
|
185
259
|
}
|
|
186
|
-
|
|
260
|
+
m(e);
|
|
187
261
|
}
|
|
188
262
|
}, C = () => {
|
|
189
263
|
let e = s(), t = i(), n = o(), r = a();
|
|
190
|
-
t.forEach((t) =>
|
|
191
|
-
|
|
264
|
+
t.forEach((t) => x(t, !e)), n.forEach((t) => {
|
|
265
|
+
d(t, f(t)), x(t, e), e || t.setAttribute("aria-expanded", "false");
|
|
192
266
|
}), r.forEach((t) => {
|
|
193
|
-
|
|
194
|
-
let n =
|
|
195
|
-
if (
|
|
267
|
+
u(t);
|
|
268
|
+
let n = p(t);
|
|
269
|
+
if (d(n, t), !e) {
|
|
196
270
|
t.removeAttribute("hidden"), t.setAttribute("aria-hidden", "false"), n?.setAttribute("aria-expanded", "false");
|
|
197
271
|
return;
|
|
198
272
|
}
|
|
@@ -206,7 +280,7 @@ var c = {
|
|
|
206
280
|
let n = e.target;
|
|
207
281
|
if (!(n instanceof Element)) return;
|
|
208
282
|
let r = n.closest(t.toggleSelector);
|
|
209
|
-
r instanceof HTMLElement &&
|
|
283
|
+
r instanceof HTMLElement && g(r);
|
|
210
284
|
}, E = (e) => {
|
|
211
285
|
if (!(e instanceof KeyboardEvent)) return;
|
|
212
286
|
let n = e.target;
|
|
@@ -215,13 +289,13 @@ var c = {
|
|
|
215
289
|
let t = a().filter((e) => !e.hasAttribute("hidden"));
|
|
216
290
|
if (t.length === 0) return;
|
|
217
291
|
e.preventDefault(), t.forEach((e) => {
|
|
218
|
-
|
|
292
|
+
h(p(e) ?? l);
|
|
219
293
|
});
|
|
220
294
|
return;
|
|
221
295
|
}
|
|
222
296
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
223
297
|
let r = n.closest(t.toggleSelector);
|
|
224
|
-
!(r instanceof HTMLElement) ||
|
|
298
|
+
!(r instanceof HTMLElement) || S(r) || (e.preventDefault(), g(r));
|
|
225
299
|
}, D = !1, O = () => {
|
|
226
300
|
D || (D = !0, requestAnimationFrame(() => {
|
|
227
301
|
D = !1, C();
|
|
@@ -236,21 +310,21 @@ var c = {
|
|
|
236
310
|
destroy: () => {
|
|
237
311
|
window.removeEventListener("resize", w), r.removeEventListener("click", T), r.removeEventListener("keydown", E), k?.disconnect();
|
|
238
312
|
},
|
|
239
|
-
openSidebar:
|
|
240
|
-
closeSidebar:
|
|
241
|
-
toggleSidebar:
|
|
313
|
+
openSidebar: m,
|
|
314
|
+
closeSidebar: h,
|
|
315
|
+
toggleSidebar: g,
|
|
242
316
|
sync: C,
|
|
243
317
|
isMobile: s
|
|
244
318
|
};
|
|
245
|
-
},
|
|
246
|
-
|
|
319
|
+
}, w = (e = {}) => C(e), T = null, E = () => typeof window > "u" || typeof document > "u" ? null : T ? (T.sync(), T) : (T = C(), T), D = () => {
|
|
320
|
+
T?.destroy(), T = null;
|
|
247
321
|
};
|
|
248
322
|
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => {
|
|
249
|
-
|
|
250
|
-
}) :
|
|
323
|
+
E();
|
|
324
|
+
}) : E());
|
|
251
325
|
//#endregion
|
|
252
326
|
//#region src/tokens/index.ts
|
|
253
|
-
var
|
|
327
|
+
var O = {
|
|
254
328
|
colors: {
|
|
255
329
|
families: [
|
|
256
330
|
"black",
|
|
@@ -402,4 +476,4 @@ var y = {
|
|
|
402
476
|
themes: {}
|
|
403
477
|
};
|
|
404
478
|
//#endregion
|
|
405
|
-
export {
|
|
479
|
+
export { g as Accordion, C as createNavigation, w as initNavigation, E as startNavigationRuntime, D as stopNavigationRuntime, O as tokens };
|
package/dist/themes/aquaflux.css
CHANGED
|
@@ -48,6 +48,18 @@
|
|
|
48
48
|
radial-gradient(circle at top left, rgba(140.25, 191.25, 242.25, 0.38), transparent 30%),
|
|
49
49
|
radial-gradient(circle at bottom right, rgba(178.5, 153, 255, 0.28), transparent 32%),
|
|
50
50
|
linear-gradient(135deg, hsl(210, 80%, 20%) 0%, hsl(210, 80%, 35%) 54%, hsl(255, 100%, 65%) 100%);
|
|
51
|
+
--aqua-stage-background:
|
|
52
|
+
radial-gradient(circle at 18% 20%, rgba(163.2, 204, 244.8, 0.22), transparent 22%),
|
|
53
|
+
radial-gradient(circle at 78% 22%, rgba(197.625, 178.5, 255, 0.2), transparent 24%),
|
|
54
|
+
linear-gradient(145deg, hsl(210, 80%, 20%) 0%, hsl(210, 80%, 25%) 52%, hsl(255, 100%, 65%) 100%);
|
|
55
|
+
--aqua-stage-outline: rgba(255, 255, 255, 0.14);
|
|
56
|
+
--aqua-stage-shadow: rgba(10.2, 51, 91.8, 0.34);
|
|
57
|
+
--aqua-chip-background: rgba(255, 255, 255, 0.96);
|
|
58
|
+
--aqua-buybox-background:
|
|
59
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(232.05, 242.25, 252.45, 0.82) 100%);
|
|
60
|
+
--aqua-buybox-shadow: 0 32px 70px -42px rgba(10.2, 51, 91.8, 0.24);
|
|
61
|
+
--aqua-spec-background:
|
|
62
|
+
linear-gradient(180deg, rgba(232.05, 242.25, 252.45, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
|
|
51
63
|
background-color: var(--aqua-page);
|
|
52
64
|
background-image: var(--aqua-page-background);
|
|
53
65
|
color: var(--aqua-text);
|
|
@@ -227,6 +239,65 @@
|
|
|
227
239
|
border-color: transparent;
|
|
228
240
|
}
|
|
229
241
|
|
|
242
|
+
[theme=aquaflux][aqua-stage],
|
|
243
|
+
[theme=aquaflux] [aqua-stage] {
|
|
244
|
+
background: var(--aqua-stage-background);
|
|
245
|
+
color: hsl(0, 0%, 100%);
|
|
246
|
+
border: 1px solid var(--aqua-stage-outline);
|
|
247
|
+
box-shadow: 0 44px 100px -54px var(--aqua-stage-shadow);
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
position: relative;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[theme=aquaflux][aqua-stage]::before,
|
|
253
|
+
[theme=aquaflux] [aqua-stage]::before {
|
|
254
|
+
content: "";
|
|
255
|
+
position: absolute;
|
|
256
|
+
inset: 1.25rem;
|
|
257
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
258
|
+
border-radius: 1.25rem;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
[theme=aquaflux][aqua-stage] :where(h1, h2, h3, h4, h5, h6, strong, b),
|
|
263
|
+
[theme=aquaflux] [aqua-stage] :where(h1, h2, h3, h4, h5, h6, strong, b) {
|
|
264
|
+
color: hsl(0, 0%, 100%);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[theme=aquaflux][aqua-stage] :where(p, span, li, small, a),
|
|
268
|
+
[theme=aquaflux] [aqua-stage] :where(p, span, li, small, a) {
|
|
269
|
+
color: rgba(255, 255, 255, 0.86);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
[theme=aquaflux][aqua-chip],
|
|
273
|
+
[theme=aquaflux] [aqua-chip] {
|
|
274
|
+
background: var(--aqua-chip-background);
|
|
275
|
+
color: var(--aqua-heading);
|
|
276
|
+
border: 1px solid rgba(140.25, 191.25, 242.25, 0.34);
|
|
277
|
+
box-shadow: 0 18px 40px -30px rgba(10.2, 51, 91.8, 0.18);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[theme=aquaflux][aqua-buybox],
|
|
281
|
+
[theme=aquaflux] [aqua-buybox] {
|
|
282
|
+
background: var(--aqua-buybox-background);
|
|
283
|
+
color: var(--aqua-text);
|
|
284
|
+
border: 1px solid rgba(140.25, 191.25, 242.25, 0.3);
|
|
285
|
+
box-shadow: var(--aqua-buybox-shadow);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
[theme=aquaflux][aqua-buybox] :where(h1, h2, h3, h4, h5, h6, strong, b),
|
|
289
|
+
[theme=aquaflux] [aqua-buybox] :where(h1, h2, h3, h4, h5, h6, strong, b) {
|
|
290
|
+
color: var(--aqua-heading);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
[theme=aquaflux][aqua-spec],
|
|
294
|
+
[theme=aquaflux] [aqua-spec] {
|
|
295
|
+
background: var(--aqua-spec-background);
|
|
296
|
+
color: var(--aqua-text);
|
|
297
|
+
border: 1px solid rgba(140.25, 191.25, 242.25, 0.26);
|
|
298
|
+
box-shadow: 0 20px 46px -34px rgba(10.2, 51, 91.8, 0.15);
|
|
299
|
+
}
|
|
300
|
+
|
|
230
301
|
/* Nested surfaces inside the hero should retain their own readable contrast. */
|
|
231
302
|
[theme=aquaflux][aqua-hero] :where([aqua-card], [aqua-panel]),
|
|
232
303
|
[theme=aquaflux] [aqua-hero] :where([aqua-card], [aqua-panel]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citrusworx/juiceui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"types": "./dist/themes/index.d.ts",
|
|
14
14
|
"default": "./dist/index.css"
|
|
15
15
|
},
|
|
16
|
+
"./themes/*.css": {
|
|
17
|
+
"types": "./dist/themes/index.d.ts",
|
|
18
|
+
"default": "./dist/themes/*.css"
|
|
19
|
+
},
|
|
16
20
|
"./themes/aquaflux.css": {
|
|
17
21
|
"types": "./dist/themes/index.d.ts",
|
|
18
22
|
"default": "./dist/themes/aquaflux.css"
|
|
@@ -36,6 +40,10 @@
|
|
|
36
40
|
"./styles/themes/citrusmint": {
|
|
37
41
|
"types": "./dist/themes/index.d.ts",
|
|
38
42
|
"default": "./dist/themes/citrusmint.css"
|
|
43
|
+
},
|
|
44
|
+
"./styles/themes/*": {
|
|
45
|
+
"types": "./dist/themes/index.d.ts",
|
|
46
|
+
"default": "./dist/themes/*.css"
|
|
39
47
|
}
|
|
40
48
|
},
|
|
41
49
|
"files": [
|
|
@@ -50,6 +58,7 @@
|
|
|
50
58
|
],
|
|
51
59
|
"sideEffects": [
|
|
52
60
|
"./dist/index.css",
|
|
61
|
+
"./dist/themes/*.css",
|
|
53
62
|
"./dist/themes/aquaflux.css",
|
|
54
63
|
"./dist/themes/kiwipress.css",
|
|
55
64
|
"./dist/themes/citrusmint.css"
|
|
@@ -89,6 +98,7 @@
|
|
|
89
98
|
"vitest": "^4.1.2"
|
|
90
99
|
},
|
|
91
100
|
"scripts": {
|
|
101
|
+
"generate:themes": "ts-node --esm src/tools/theme-generator/cli.ts",
|
|
92
102
|
"dev": "gulp dev & vite dev --watch",
|
|
93
103
|
"build": "gulp build --gulpfile gulp.ts && vite build && tsc -p tsconfig.types.json",
|
|
94
104
|
"prepack": "yarn build",
|