@canopy-iiif/app 0.10.12 → 0.10.14
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/lib/build/dev.js +12 -1
- package/lib/build/styles.js +12 -0
- package/package.json +2 -1
- package/ui/dist/server.mjs +10 -10
- package/ui/dist/server.mjs.map +1 -1
- package/ui/styles/base/_common.scss +2 -2
- package/ui/styles/components/_buttons.scss +6 -6
- package/ui/styles/components/_card.scss +2 -2
- package/ui/styles/components/_interstitial-hero.scss +7 -7
- package/ui/styles/components/_sub-navigation.scss +2 -2
- package/ui/styles/components/header/_logo.scss +8 -8
- package/ui/styles/components/header/_navbar.scss +1 -1
- package/ui/styles/components/search/_filters.scss +6 -6
- package/ui/styles/components/search/_form.scss +11 -11
- package/ui/styles/components/search/_results.scss +2 -2
- package/ui/styles/index.css +112 -113
- package/ui/styles/index.scss +1 -1
- package/ui/tailwind-config.js +2 -0
- package/ui/theme.js +5 -19
package/ui/theme.js
CHANGED
|
@@ -130,14 +130,15 @@ function toTailwindScale(name, options = {}) {
|
|
|
130
130
|
const prefix = name;
|
|
131
131
|
const scale = {};
|
|
132
132
|
const darken900Amount = normalizeDarkenAmount(options.darken900Amount);
|
|
133
|
+
const steps = STEP_MAP;
|
|
133
134
|
for (const lvl of LEVELS) {
|
|
134
|
-
const radixStep =
|
|
135
|
+
const radixStep = steps[lvl];
|
|
135
136
|
const key = `${prefix}${radixStep}`;
|
|
136
137
|
const value = palette[key];
|
|
137
138
|
if (!value) return null;
|
|
138
139
|
scale[lvl] = value;
|
|
139
140
|
}
|
|
140
|
-
const darkestKey = `${prefix}${
|
|
141
|
+
const darkestKey = `${prefix}${steps["900"]}`;
|
|
141
142
|
if (scale["800"] && palette[darkestKey]) {
|
|
142
143
|
const amount = darken900Amount != null ? darken900Amount : 0.25;
|
|
143
144
|
scale["900"] =
|
|
@@ -154,9 +155,9 @@ function buildVariablesMap(brandScale, grayScale, options = {}) {
|
|
|
154
155
|
if (brandScale) {
|
|
155
156
|
for (const lvl of LEVELS) {
|
|
156
157
|
const value = brandScale[lvl];
|
|
157
|
-
if (value) vars[`--color-
|
|
158
|
+
if (value) vars[`--color-accent-${lvl}`] = value;
|
|
158
159
|
}
|
|
159
|
-
if (brandScale["700"]) vars["--color-
|
|
160
|
+
if (brandScale["700"]) vars["--color-accent-default"] = brandScale["700"];
|
|
160
161
|
}
|
|
161
162
|
if (grayScale) {
|
|
162
163
|
for (const lvl of LEVELS) {
|
|
@@ -271,21 +272,6 @@ function loadCanopyTheme(options = {}) {
|
|
|
271
272
|
},
|
|
272
273
|
});
|
|
273
274
|
|
|
274
|
-
if (
|
|
275
|
-
!DEBUG_ENABLED &&
|
|
276
|
-
(accentName !== DEFAULT_ACCENT || grayName !== DEFAULT_GRAY)
|
|
277
|
-
) {
|
|
278
|
-
try {
|
|
279
|
-
console.log("[canopy-theme]", "resolved", {
|
|
280
|
-
appearance,
|
|
281
|
-
accent: accentName,
|
|
282
|
-
accent500: accentScale && accentScale["500"],
|
|
283
|
-
gray: grayName,
|
|
284
|
-
gray500: grayScale && grayScale["500"],
|
|
285
|
-
});
|
|
286
|
-
} catch (_) {}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
275
|
return {
|
|
290
276
|
appearance,
|
|
291
277
|
accent: {name: accentName, scale: accentScale},
|