@sproutsocial/seeds-react-theme 3.6.2 → 4.1.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 +199 -0
- package/commonjs/builders/buildCSS.js +202 -0
- package/commonjs/builders/buildTailwindV4.js +238 -0
- package/commonjs/builders/index.js +65 -0
- package/commonjs/builders/utils.js +225 -0
- package/commonjs/dark/theme.js +48 -3
- package/commonjs/light/theme.js +56 -3
- package/dist/tailwind-preset.css +118 -0
- package/dist/theme-all.css +961 -0
- package/dist/theme-dark.css +480 -0
- package/dist/theme.css +480 -0
- package/dist/themes/dark/_themed.scss +7 -0
- package/dist/themes/dark/theme.scss +94 -6
- package/dist/themes/extendedThemes/sproutTheme/dark/_themed.scss +7 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +47 -3
- package/dist/themes/extendedThemes/sproutTheme/light/_themed.scss +7 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +47 -3
- package/dist/themes/light/_themed.scss +7 -0
- package/dist/themes/light/theme.scss +94 -6
- package/dist/themes/types/_themed.scss +7 -0
- package/dist/types/builders/buildCSS.d.ts +8 -0
- package/dist/types/builders/buildCSS.d.ts.map +1 -0
- package/dist/types/builders/buildTailwindV4.d.ts +18 -0
- package/dist/types/builders/buildTailwindV4.d.ts.map +1 -0
- package/dist/types/builders/index.d.ts +10 -0
- package/dist/types/builders/index.d.ts.map +1 -0
- package/dist/types/builders/utils.d.ts +53 -0
- package/dist/types/builders/utils.d.ts.map +1 -0
- package/dist/types/dark/theme.d.ts +88 -0
- package/dist/types/dark/theme.d.ts.map +1 -1
- package/dist/types/light/theme.d.ts +88 -0
- package/dist/types/light/theme.d.ts.map +1 -1
- package/dist/types/types/theme.colors.d.ts +1 -0
- package/dist/types/types/theme.colors.d.ts.map +1 -1
- package/lib/builders/buildCSS.js +200 -0
- package/lib/builders/buildTailwindV4.js +233 -0
- package/lib/builders/index.js +37 -0
- package/lib/builders/utils.js +209 -0
- package/lib/dark/theme.js +48 -3
- package/lib/light/theme.js +56 -3
- package/package.json +24 -2
- package/tailwind-preset.js +199 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
10
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
11
|
+
/**
|
|
12
|
+
* Build a Tailwind CSS v4 @theme preset from Seeds design tokens.
|
|
13
|
+
*
|
|
14
|
+
* In Tailwind v4, theme customization is done in CSS via @theme blocks
|
|
15
|
+
* instead of a JavaScript tailwind.config.js. This builder generates
|
|
16
|
+
* dist/tailwind-preset.css which consuming apps import as:
|
|
17
|
+
*
|
|
18
|
+
* @import "tailwindcss";
|
|
19
|
+
* @import "@sproutsocial/seeds-react-theme/css/tailwind-preset";
|
|
20
|
+
*
|
|
21
|
+
* The @theme block registers custom CSS properties that Tailwind v4 picks
|
|
22
|
+
* up and exposes as utility classes (e.g. --spacing-300 → p-300, gap-300).
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import fs from "fs";
|
|
26
|
+
import path from "path";
|
|
27
|
+
var COLORS = require("@sproutsocial/seeds-color");
|
|
28
|
+
var SPACE = require("@sproutsocial/seeds-space");
|
|
29
|
+
var BORDER = require("@sproutsocial/seeds-border");
|
|
30
|
+
var TYPOGRAPHY = require("@sproutsocial/seeds-typography");
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Build the Tailwind v4 CSS preset file
|
|
34
|
+
*/
|
|
35
|
+
export function buildTailwindV4Preset() {
|
|
36
|
+
return _buildTailwindV4Preset.apply(this, arguments);
|
|
37
|
+
}
|
|
38
|
+
function _buildTailwindV4Preset() {
|
|
39
|
+
_buildTailwindV4Preset = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
40
|
+
var distDir, lines, spacingMap, _i, _Object$entries, _Object$entries$_i, key, value, radiusMap, _i2, _Object$entries2, _Object$entries2$_i, _key, _value, typographyScales, _i3, _typographyScales, scale, _key2, val, buttonColors, _i4, _Object$entries3, _Object$entries3$_i, _key3, _value2, semanticColors, _i5, _Object$entries4, _Object$entries4$_i, _key4, _value3, darkButtonColors, _i6, _Object$entries5, _Object$entries5$_i, _key5, _value4, css, outPath;
|
|
41
|
+
return _regenerator().w(function (_context) {
|
|
42
|
+
while (1) switch (_context.n) {
|
|
43
|
+
case 0:
|
|
44
|
+
console.log("\n=== Building Tailwind v4 CSS Preset ===\n");
|
|
45
|
+
distDir = path.join(__dirname, "../../dist");
|
|
46
|
+
if (!fs.existsSync(distDir)) {
|
|
47
|
+
fs.mkdirSync(distDir, {
|
|
48
|
+
recursive: true
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
lines = ["/**", " * Seeds Design System — Tailwind CSS v4 Preset", " *", " * Import this file in your CSS entry point:", ' * @import "tailwindcss";', ' * @import "@sproutsocial/seeds-react-theme/css/tailwind-preset";', " *", " * All values are sourced from Seeds token packages — no hardcoded values.", " * Dark mode is handled via the .dark class on <html>.", " */", "", "@theme {"]; // -------------------------------------------------------------------------
|
|
52
|
+
// Spacing — from @sproutsocial/seeds-space
|
|
53
|
+
// Tailwind v4: --spacing-{key} → p-{key}, m-{key}, gap-{key}, w-{key}, etc.
|
|
54
|
+
// -------------------------------------------------------------------------
|
|
55
|
+
lines.push(" /* Spacing — from @sproutsocial/seeds-space */");
|
|
56
|
+
spacingMap = {
|
|
57
|
+
0: SPACE.SPACE_SIZE_0,
|
|
58
|
+
100: SPACE.SPACE_SIZE_100,
|
|
59
|
+
200: SPACE.SPACE_SIZE_200,
|
|
60
|
+
300: SPACE.SPACE_SIZE_300,
|
|
61
|
+
350: SPACE.SPACE_SIZE_350,
|
|
62
|
+
400: SPACE.SPACE_SIZE_400,
|
|
63
|
+
450: SPACE.SPACE_SIZE_450,
|
|
64
|
+
500: SPACE.SPACE_SIZE_500,
|
|
65
|
+
600: SPACE.SPACE_SIZE_600
|
|
66
|
+
};
|
|
67
|
+
for (_i = 0, _Object$entries = Object.entries(spacingMap); _i < _Object$entries.length; _i++) {
|
|
68
|
+
_Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), key = _Object$entries$_i[0], value = _Object$entries$_i[1];
|
|
69
|
+
lines.push(" --spacing-".concat(key, ": ").concat(value, ";"));
|
|
70
|
+
}
|
|
71
|
+
console.log(" - Mapped ".concat(Object.keys(spacingMap).length, " spacing tokens"));
|
|
72
|
+
lines.push("");
|
|
73
|
+
|
|
74
|
+
// -------------------------------------------------------------------------
|
|
75
|
+
// Border radius — from @sproutsocial/seeds-border
|
|
76
|
+
// Tailwind v4: --radius-{key} → rounded-{key}
|
|
77
|
+
// -------------------------------------------------------------------------
|
|
78
|
+
lines.push(" /* Border radius — from @sproutsocial/seeds-border */");
|
|
79
|
+
radiusMap = {
|
|
80
|
+
400: BORDER.BORDER_RADIUS_400,
|
|
81
|
+
500: BORDER.BORDER_RADIUS_500,
|
|
82
|
+
600: BORDER.BORDER_RADIUS_600,
|
|
83
|
+
800: BORDER.BORDER_RADIUS_800,
|
|
84
|
+
900: BORDER.BORDER_RADIUS_900,
|
|
85
|
+
1000: BORDER.BORDER_RADIUS_1000,
|
|
86
|
+
pill: "999999px",
|
|
87
|
+
inner: "4px",
|
|
88
|
+
outer: "8px"
|
|
89
|
+
};
|
|
90
|
+
for (_i2 = 0, _Object$entries2 = Object.entries(radiusMap); _i2 < _Object$entries2.length; _i2++) {
|
|
91
|
+
_Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), _key = _Object$entries2$_i[0], _value = _Object$entries2$_i[1];
|
|
92
|
+
lines.push(" --radius-".concat(_key, ": ").concat(_value, ";"));
|
|
93
|
+
}
|
|
94
|
+
console.log(" - Mapped ".concat(Object.keys(radiusMap).length, " border radius tokens"));
|
|
95
|
+
lines.push("");
|
|
96
|
+
|
|
97
|
+
// -------------------------------------------------------------------------
|
|
98
|
+
// Font size — from @sproutsocial/seeds-typography
|
|
99
|
+
// Tailwind v4: --text-{key}--font-size + --text-{key}--line-height → text-{key}
|
|
100
|
+
// -------------------------------------------------------------------------
|
|
101
|
+
lines.push(" /* Font size — from @sproutsocial/seeds-typography */");
|
|
102
|
+
typographyScales = [100, 200, 300, 400, 500, 600, 700];
|
|
103
|
+
for (_i3 = 0, _typographyScales = typographyScales; _i3 < _typographyScales.length; _i3++) {
|
|
104
|
+
scale = _typographyScales[_i3];
|
|
105
|
+
_key2 = "TYPOGRAPHY_SIZE_".concat(scale);
|
|
106
|
+
val = TYPOGRAPHY[_key2];
|
|
107
|
+
if (val && val.fontSize && val.lineHeight) {
|
|
108
|
+
// Tailwind v4 uses --text-*--font-size and --text-*--line-height for
|
|
109
|
+
// the two-value tuple equivalent
|
|
110
|
+
lines.push(" --text-".concat(scale, "--font-size: ").concat(val.fontSize, ";"));
|
|
111
|
+
lines.push(" --text-".concat(scale, "--line-height: ").concat(val.lineHeight, ";"));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
console.log(" - Mapped ".concat(typographyScales.length, " typography scales"));
|
|
115
|
+
lines.push("");
|
|
116
|
+
|
|
117
|
+
// -------------------------------------------------------------------------
|
|
118
|
+
// Button colors — from @sproutsocial/seeds-color (static values)
|
|
119
|
+
// Light mode defaults; dark mode via @variant dark overrides below.
|
|
120
|
+
// -------------------------------------------------------------------------
|
|
121
|
+
lines.push(" /* Button colors — from @sproutsocial/seeds-color (light mode) */");
|
|
122
|
+
buttonColors = {
|
|
123
|
+
// Primary
|
|
124
|
+
"color-button-primary-bg-base": COLORS.COLOR_BLUE_700,
|
|
125
|
+
"color-button-primary-bg-hover": COLORS.COLOR_BLUE_800,
|
|
126
|
+
"color-button-primary-bg-active": COLORS.COLOR_BLUE_900,
|
|
127
|
+
"color-button-primary-text-base": COLORS.COLOR_NEUTRAL_0,
|
|
128
|
+
"color-button-primary-text-hover": COLORS.COLOR_NEUTRAL_0,
|
|
129
|
+
"color-button-primary-border-base": "transparent",
|
|
130
|
+
// Secondary
|
|
131
|
+
"color-button-secondary-bg-base": "transparent",
|
|
132
|
+
"color-button-secondary-bg-hover": COLORS.COLOR_NEUTRAL_800,
|
|
133
|
+
"color-button-secondary-bg-active": COLORS.COLOR_NEUTRAL_900,
|
|
134
|
+
"color-button-secondary-text-base": COLORS.COLOR_NEUTRAL_800,
|
|
135
|
+
"color-button-secondary-text-hover": COLORS.COLOR_NEUTRAL_0,
|
|
136
|
+
"color-button-secondary-border-base": COLORS.COLOR_NEUTRAL_800,
|
|
137
|
+
// Destructive
|
|
138
|
+
"color-button-destructive-bg-base": COLORS.COLOR_RED_800,
|
|
139
|
+
"color-button-destructive-bg-hover": COLORS.COLOR_RED_900,
|
|
140
|
+
"color-button-destructive-bg-active": COLORS.COLOR_RED_1000,
|
|
141
|
+
"color-button-destructive-text-base": COLORS.COLOR_NEUTRAL_0,
|
|
142
|
+
"color-button-destructive-text-hover": COLORS.COLOR_NEUTRAL_0,
|
|
143
|
+
"color-button-destructive-border-base": "transparent",
|
|
144
|
+
// Placeholder
|
|
145
|
+
"color-button-placeholder-bg-base": "transparent",
|
|
146
|
+
"color-button-placeholder-bg-hover": COLORS.COLOR_NEUTRAL_0,
|
|
147
|
+
"color-button-placeholder-bg-active": COLORS.COLOR_NEUTRAL_0,
|
|
148
|
+
"color-button-placeholder-text-base": COLORS.COLOR_BLUE_700,
|
|
149
|
+
"color-button-placeholder-text-hover": COLORS.COLOR_BLUE_800,
|
|
150
|
+
"color-button-placeholder-border-base": COLORS.COLOR_NEUTRAL_500
|
|
151
|
+
};
|
|
152
|
+
for (_i4 = 0, _Object$entries3 = Object.entries(buttonColors); _i4 < _Object$entries3.length; _i4++) {
|
|
153
|
+
_Object$entries3$_i = _slicedToArray(_Object$entries3[_i4], 2), _key3 = _Object$entries3$_i[0], _value2 = _Object$entries3$_i[1];
|
|
154
|
+
lines.push(" --".concat(_key3, ": ").concat(_value2, ";"));
|
|
155
|
+
}
|
|
156
|
+
console.log(" - Mapped ".concat(Object.keys(buttonColors).length, " button color tokens"));
|
|
157
|
+
lines.push("");
|
|
158
|
+
|
|
159
|
+
// CSS variable passthrough tokens (app, container, text, form)
|
|
160
|
+
// These reference the custom properties defined in theme.css / theme-all.css.
|
|
161
|
+
lines.push(" /* Semantic tokens — reference CSS vars from theme-all.css */");
|
|
162
|
+
semanticColors = {
|
|
163
|
+
"color-app-bg-base": "var(--color-app-bg-base)",
|
|
164
|
+
"color-container-bg-base": "var(--color-container-bg-base)",
|
|
165
|
+
"color-container-bg-success": "var(--color-container-bg-success)",
|
|
166
|
+
"color-container-bg-warning": "var(--color-container-bg-warning)",
|
|
167
|
+
"color-container-bg-error": "var(--color-container-bg-error)",
|
|
168
|
+
"color-container-bg-info": "var(--color-container-bg-info)",
|
|
169
|
+
"color-container-bg-opportunity": "var(--color-container-bg-opportunity)",
|
|
170
|
+
"color-container-border-base": "var(--color-container-border-base)",
|
|
171
|
+
"color-container-border-success": "var(--color-container-border-success)",
|
|
172
|
+
"color-container-border-warning": "var(--color-container-border-warning)",
|
|
173
|
+
"color-container-border-error": "var(--color-container-border-error)",
|
|
174
|
+
"color-container-border-info": "var(--color-container-border-info)",
|
|
175
|
+
"color-container-border-opportunity": "var(--color-container-border-opportunity)",
|
|
176
|
+
"color-text-body": "var(--color-text-body)",
|
|
177
|
+
"color-text-headline": "var(--color-text-headline)",
|
|
178
|
+
"color-text-subtext": "var(--color-text-subtext)",
|
|
179
|
+
"color-form-bg-base": "var(--color-form-bg-base)",
|
|
180
|
+
"color-form-border-base": "var(--color-form-border-base)",
|
|
181
|
+
"color-form-border-selected": "var(--color-form-border-selected)",
|
|
182
|
+
"color-form-placeholder-base": "var(--color-form-placeholder-base)"
|
|
183
|
+
};
|
|
184
|
+
for (_i5 = 0, _Object$entries4 = Object.entries(semanticColors); _i5 < _Object$entries4.length; _i5++) {
|
|
185
|
+
_Object$entries4$_i = _slicedToArray(_Object$entries4[_i5], 2), _key4 = _Object$entries4$_i[0], _value3 = _Object$entries4$_i[1];
|
|
186
|
+
lines.push(" --".concat(_key4, ": ").concat(_value3, ";"));
|
|
187
|
+
}
|
|
188
|
+
console.log(" - Mapped ".concat(Object.keys(semanticColors).length, " semantic color tokens"));
|
|
189
|
+
|
|
190
|
+
// Dark mode variants for button colors — exposed as separate -dark tokens.
|
|
191
|
+
// Usage in JSX: `dark:bg-button-primary-bg-base-dark`
|
|
192
|
+
// (Same approach as the v3 preset — the `dark:` variant is built into Tailwind v4.)
|
|
193
|
+
lines.push(" /* Button colors — dark mode variants (use with dark: prefix) */");
|
|
194
|
+
darkButtonColors = {
|
|
195
|
+
"color-button-primary-bg-base-dark": COLORS.COLOR_BLUE_400,
|
|
196
|
+
"color-button-primary-bg-hover-dark": COLORS.COLOR_BLUE_300,
|
|
197
|
+
"color-button-primary-bg-active-dark": COLORS.COLOR_BLUE_200,
|
|
198
|
+
"color-button-primary-text-base-dark": COLORS.COLOR_NEUTRAL_900,
|
|
199
|
+
"color-button-primary-text-hover-dark": COLORS.COLOR_NEUTRAL_1000,
|
|
200
|
+
"color-button-secondary-bg-hover-dark": COLORS.COLOR_NEUTRAL_100,
|
|
201
|
+
"color-button-secondary-bg-active-dark": COLORS.COLOR_NEUTRAL_0,
|
|
202
|
+
"color-button-secondary-text-base-dark": COLORS.COLOR_NEUTRAL_0,
|
|
203
|
+
"color-button-secondary-text-hover-dark": COLORS.COLOR_NEUTRAL_800,
|
|
204
|
+
"color-button-secondary-border-base-dark": COLORS.COLOR_NEUTRAL_0,
|
|
205
|
+
"color-button-destructive-bg-base-dark": COLORS.COLOR_RED_400,
|
|
206
|
+
"color-button-destructive-bg-hover-dark": COLORS.COLOR_RED_300,
|
|
207
|
+
"color-button-destructive-bg-active-dark": COLORS.COLOR_RED_200,
|
|
208
|
+
"color-button-destructive-text-base-dark": COLORS.COLOR_NEUTRAL_900,
|
|
209
|
+
"color-button-destructive-text-hover-dark": COLORS.COLOR_NEUTRAL_1000,
|
|
210
|
+
"color-button-placeholder-bg-hover-dark": COLORS.COLOR_NEUTRAL_1100,
|
|
211
|
+
"color-button-placeholder-bg-active-dark": COLORS.COLOR_NEUTRAL_1100,
|
|
212
|
+
"color-button-placeholder-text-base-dark": COLORS.COLOR_BLUE_400,
|
|
213
|
+
"color-button-placeholder-text-hover-dark": COLORS.COLOR_BLUE_300
|
|
214
|
+
};
|
|
215
|
+
for (_i6 = 0, _Object$entries5 = Object.entries(darkButtonColors); _i6 < _Object$entries5.length; _i6++) {
|
|
216
|
+
_Object$entries5$_i = _slicedToArray(_Object$entries5[_i6], 2), _key5 = _Object$entries5$_i[0], _value4 = _Object$entries5$_i[1];
|
|
217
|
+
lines.push(" --".concat(_key5, ": ").concat(_value4, ";"));
|
|
218
|
+
}
|
|
219
|
+
console.log(" - Mapped ".concat(Object.keys(darkButtonColors).length, " dark mode button color tokens"));
|
|
220
|
+
lines.push("}");
|
|
221
|
+
lines.push("");
|
|
222
|
+
css = lines.join("\n");
|
|
223
|
+
outPath = path.join(distDir, "tailwind-preset.css");
|
|
224
|
+
fs.writeFileSync(outPath, css, "utf-8");
|
|
225
|
+
console.log(" ✓ Written Tailwind v4 preset to dist/tailwind-preset.css");
|
|
226
|
+
console.log("\n✅ Tailwind v4 preset built successfully!\n");
|
|
227
|
+
case 1:
|
|
228
|
+
return _context.a(2);
|
|
229
|
+
}
|
|
230
|
+
}, _callee);
|
|
231
|
+
}));
|
|
232
|
+
return _buildTailwindV4Preset.apply(this, arguments);
|
|
233
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
+
/**
|
|
6
|
+
* Build scripts for transforming Seeds theme to multiple output formats
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { buildCSSVariables } from "./buildCSS";
|
|
10
|
+
export * from "./utils";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Run all build transformations
|
|
14
|
+
*/
|
|
15
|
+
export function buildAll() {
|
|
16
|
+
return _buildAll.apply(this, arguments);
|
|
17
|
+
}
|
|
18
|
+
function _buildAll() {
|
|
19
|
+
_buildAll = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
20
|
+
var _yield$import, buildCSSVariables;
|
|
21
|
+
return _regenerator().w(function (_context) {
|
|
22
|
+
while (1) switch (_context.n) {
|
|
23
|
+
case 0:
|
|
24
|
+
_context.n = 1;
|
|
25
|
+
return import("./buildCSS");
|
|
26
|
+
case 1:
|
|
27
|
+
_yield$import = _context.v;
|
|
28
|
+
buildCSSVariables = _yield$import.buildCSSVariables;
|
|
29
|
+
_context.n = 2;
|
|
30
|
+
return buildCSSVariables();
|
|
31
|
+
case 2:
|
|
32
|
+
return _context.a(2);
|
|
33
|
+
}
|
|
34
|
+
}, _callee);
|
|
35
|
+
}));
|
|
36
|
+
return _buildAll.apply(this, arguments);
|
|
37
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
4
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
/**
|
|
13
|
+
* Utility functions for transforming theme objects into different formats
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Abbreviation mapping for common theme terms
|
|
18
|
+
*/
|
|
19
|
+
var ABBREVIATIONS = {
|
|
20
|
+
background: "bg",
|
|
21
|
+
foreground: "fg"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Apply abbreviation rules to a key
|
|
26
|
+
*/
|
|
27
|
+
function abbreviate(key) {
|
|
28
|
+
return ABBREVIATIONS[key] || key;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Flatten a nested object into a single-level object with kebab-case keys
|
|
33
|
+
* Example: { button: { primary: { background: { base: '#fff' } } } }
|
|
34
|
+
* Becomes: { 'button-primary-bg-base': '#fff' }
|
|
35
|
+
*/
|
|
36
|
+
export function flattenObject(obj) {
|
|
37
|
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
38
|
+
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "-";
|
|
39
|
+
var result = {};
|
|
40
|
+
function recurse(current) {
|
|
41
|
+
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
42
|
+
if (typeof current === "string" || typeof current === "number") {
|
|
43
|
+
// Leaf node - create the final key
|
|
44
|
+
var key = path.map(abbreviate).join(separator);
|
|
45
|
+
result[key] = String(current);
|
|
46
|
+
} else if (_typeof(current) === "object" && current !== null) {
|
|
47
|
+
// Recurse into nested objects
|
|
48
|
+
for (var _i = 0, _Object$entries = Object.entries(current); _i < _Object$entries.length; _i++) {
|
|
49
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
50
|
+
_key = _Object$entries$_i[0],
|
|
51
|
+
value = _Object$entries$_i[1];
|
|
52
|
+
recurse(value, [].concat(_toConsumableArray(path), [_key]));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
recurse(obj, prefix ? [prefix] : []);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Flatten colors with a 'color-' prefix for CSS variables
|
|
62
|
+
*/
|
|
63
|
+
export function flattenColors(colors) {
|
|
64
|
+
return flattenObject(colors, "color");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Flatten spacing with a 'space-' prefix
|
|
69
|
+
*/
|
|
70
|
+
export function flattenSpacing(space) {
|
|
71
|
+
var flattened = {};
|
|
72
|
+
|
|
73
|
+
// Space is already flat: { 0: '0px', 100: '2px', ... }
|
|
74
|
+
// But it may have nested properties like 'space' and '-space'
|
|
75
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(space); _i2 < _Object$entries2.length; _i2++) {
|
|
76
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
77
|
+
key = _Object$entries2$_i[0],
|
|
78
|
+
value = _Object$entries2$_i[1];
|
|
79
|
+
if (typeof value === "string") {
|
|
80
|
+
flattened["space-".concat(key)] = value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return flattened;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Flatten typography values for Tailwind
|
|
88
|
+
*/
|
|
89
|
+
export function flattenTypography(typography) {
|
|
90
|
+
var result = {};
|
|
91
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(typography); _i3 < _Object$entries3.length; _i3++) {
|
|
92
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
93
|
+
key = _Object$entries3$_i[0],
|
|
94
|
+
value = _Object$entries3$_i[1];
|
|
95
|
+
if (_typeof(value) === "object" && value !== null && "fontSize" in value && "lineHeight" in value) {
|
|
96
|
+
result[key] = [value.fontSize, {
|
|
97
|
+
lineHeight: value.lineHeight
|
|
98
|
+
}];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Flatten radii (border radius)
|
|
106
|
+
*/
|
|
107
|
+
export function flattenRadii(radii) {
|
|
108
|
+
var flattened = {};
|
|
109
|
+
for (var _i4 = 0, _Object$entries4 = Object.entries(radii); _i4 < _Object$entries4.length; _i4++) {
|
|
110
|
+
var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
|
|
111
|
+
key = _Object$entries4$_i[0],
|
|
112
|
+
value = _Object$entries4$_i[1];
|
|
113
|
+
if (typeof value === "string") {
|
|
114
|
+
flattened[key] = value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return flattened;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Flatten shadows
|
|
122
|
+
*/
|
|
123
|
+
export function flattenShadows(shadows) {
|
|
124
|
+
var flattened = {};
|
|
125
|
+
for (var _i5 = 0, _Object$entries5 = Object.entries(shadows); _i5 < _Object$entries5.length; _i5++) {
|
|
126
|
+
var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i5], 2),
|
|
127
|
+
key = _Object$entries5$_i[0],
|
|
128
|
+
value = _Object$entries5$_i[1];
|
|
129
|
+
if (typeof value === "string") {
|
|
130
|
+
flattened[key] = value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return flattened;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Flatten font weights
|
|
138
|
+
*/
|
|
139
|
+
export function flattenFontWeights(fontWeights) {
|
|
140
|
+
var flattened = {};
|
|
141
|
+
for (var _i6 = 0, _Object$entries6 = Object.entries(fontWeights); _i6 < _Object$entries6.length; _i6++) {
|
|
142
|
+
var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i6], 2),
|
|
143
|
+
key = _Object$entries6$_i[0],
|
|
144
|
+
value = _Object$entries6$_i[1];
|
|
145
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
146
|
+
flattened[key] = value;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return flattened;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Flatten easing (transition timing functions)
|
|
154
|
+
*/
|
|
155
|
+
export function flattenEasing(easing) {
|
|
156
|
+
var flattened = {};
|
|
157
|
+
for (var _i7 = 0, _Object$entries7 = Object.entries(easing); _i7 < _Object$entries7.length; _i7++) {
|
|
158
|
+
var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i7], 2),
|
|
159
|
+
key = _Object$entries7$_i[0],
|
|
160
|
+
value = _Object$entries7$_i[1];
|
|
161
|
+
if (typeof value === "string") {
|
|
162
|
+
flattened[key] = value;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return flattened;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Flatten duration (transition durations)
|
|
170
|
+
*/
|
|
171
|
+
export function flattenDuration(duration) {
|
|
172
|
+
var flattened = {};
|
|
173
|
+
for (var _i8 = 0, _Object$entries8 = Object.entries(duration); _i8 < _Object$entries8.length; _i8++) {
|
|
174
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i8], 2),
|
|
175
|
+
key = _Object$entries8$_i[0],
|
|
176
|
+
value = _Object$entries8$_i[1];
|
|
177
|
+
if (typeof value === "string") {
|
|
178
|
+
flattened[key] = value;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return flattened;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Check if a value is a valid CSS color
|
|
186
|
+
* Filters out complex values like color-mix() which may not work everywhere
|
|
187
|
+
*/
|
|
188
|
+
export function isSimpleColor(value) {
|
|
189
|
+
return !value.includes("color-mix") && !value.includes("gradient");
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Filter out colors that use advanced CSS features
|
|
194
|
+
*/
|
|
195
|
+
export function filterComplexColors(colors) {
|
|
196
|
+
var filtered = {};
|
|
197
|
+
for (var _i9 = 0, _Object$entries9 = Object.entries(colors); _i9 < _Object$entries9.length; _i9++) {
|
|
198
|
+
var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i9], 2),
|
|
199
|
+
key = _Object$entries9$_i[0],
|
|
200
|
+
value = _Object$entries9$_i[1];
|
|
201
|
+
if (isSimpleColor(value)) {
|
|
202
|
+
filtered[key] = value;
|
|
203
|
+
} else {
|
|
204
|
+
// Keep it but add a comment in generated files
|
|
205
|
+
filtered[key] = value;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return filtered;
|
|
209
|
+
}
|
package/lib/dark/theme.js
CHANGED
|
@@ -54,7 +54,8 @@ export var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
|
|
|
54
54
|
selected: COLORS.COLOR_NEUTRAL_0,
|
|
55
55
|
positive_sentiment: COLORS.COLOR_BLUE_500,
|
|
56
56
|
negative_sentiment: COLORS.COLOR_RED_500,
|
|
57
|
-
neutral_sentiment: COLORS.COLOR_NEUTRAL_300
|
|
57
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
|
|
58
|
+
ai_generated: "var(--color-container-bg-ai-generated, ".concat(COLORS.COLOR_NEUTRAL_100, ")")
|
|
58
59
|
},
|
|
59
60
|
border: {
|
|
60
61
|
base: COLORS.COLOR_NEUTRAL_1100,
|
|
@@ -78,9 +79,15 @@ export var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
|
|
|
78
79
|
aqua: aqua.highlight,
|
|
79
80
|
teal: teal.highlight
|
|
80
81
|
},
|
|
81
|
-
selected: COLORS.COLOR_NEUTRAL_0
|
|
82
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
83
|
+
ai_generated: COLORS.COLOR_PURPLE_700
|
|
82
84
|
}
|
|
83
85
|
},
|
|
86
|
+
// AI brand gradient — identical to light mode (the brand gradient does not flip).
|
|
87
|
+
gradient: {
|
|
88
|
+
ai: "radial-gradient(circle at bottom left, #205bc3 0%, #9747ff 61%, #f282f5 100%)",
|
|
89
|
+
"ai-subtle": "radial-gradient(circle at bottom left, color-mix(in srgb, #205bc3, transparent 80%) 0%, color-mix(in srgb, #9747ff, transparent 80%) 61%, color-mix(in srgb, #f282f5, transparent 80%) 100%)"
|
|
90
|
+
},
|
|
84
91
|
button: {
|
|
85
92
|
primary: {
|
|
86
93
|
background: {
|
|
@@ -173,6 +180,43 @@ export var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
|
|
|
173
180
|
base: COLORS.COLOR_NEUTRAL_300,
|
|
174
181
|
hover: COLORS.COLOR_NEUTRAL_200
|
|
175
182
|
}
|
|
183
|
+
},
|
|
184
|
+
"ai-primary": {
|
|
185
|
+
background: {
|
|
186
|
+
base: "var(--color-gradient-ai)"
|
|
187
|
+
},
|
|
188
|
+
border: {
|
|
189
|
+
base: "transparent"
|
|
190
|
+
},
|
|
191
|
+
text: {
|
|
192
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
193
|
+
hover: COLORS.COLOR_NEUTRAL_0
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"ai-secondary": {
|
|
197
|
+
background: {
|
|
198
|
+
base: "var(--color-gradient-ai-subtle)"
|
|
199
|
+
},
|
|
200
|
+
border: {
|
|
201
|
+
base: "transparent"
|
|
202
|
+
},
|
|
203
|
+
text: {
|
|
204
|
+
base: COLORS.COLOR_NEUTRAL_800,
|
|
205
|
+
hover: COLORS.COLOR_NEUTRAL_800
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"ai-outline": {
|
|
209
|
+
background: {
|
|
210
|
+
base: "transparent"
|
|
211
|
+
},
|
|
212
|
+
border: {
|
|
213
|
+
base: "var(--color-gradient-ai)"
|
|
214
|
+
},
|
|
215
|
+
text: {
|
|
216
|
+
// Dark-mode override: light text for legibility on the dark surface.
|
|
217
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
218
|
+
hover: COLORS.COLOR_NEUTRAL_100
|
|
219
|
+
}
|
|
176
220
|
}
|
|
177
221
|
},
|
|
178
222
|
link: {
|
|
@@ -201,7 +245,8 @@ export var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
|
|
|
201
245
|
pink: pink.foreground,
|
|
202
246
|
aqua: aqua.foreground,
|
|
203
247
|
teal: teal.foreground
|
|
204
|
-
}
|
|
248
|
+
},
|
|
249
|
+
ai_generated: COLORS.COLOR_NEUTRAL_900
|
|
205
250
|
},
|
|
206
251
|
icon: {
|
|
207
252
|
base: COLORS.COLOR_NEUTRAL_100,
|
package/lib/light/theme.js
CHANGED
|
@@ -61,7 +61,8 @@ export var colors = _objectSpread(_objectSpread({
|
|
|
61
61
|
selected: COLORS.COLOR_NEUTRAL_800,
|
|
62
62
|
positive_sentiment: COLORS.COLOR_BLUE_500,
|
|
63
63
|
negative_sentiment: COLORS.COLOR_RED_500,
|
|
64
|
-
neutral_sentiment: COLORS.COLOR_NEUTRAL_300
|
|
64
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
|
|
65
|
+
ai_generated: "var(--color-container-bg-ai-generated, ".concat(COLORS.COLOR_NEUTRAL_100, ")")
|
|
65
66
|
},
|
|
66
67
|
border: {
|
|
67
68
|
base: COLORS.COLOR_NEUTRAL_200,
|
|
@@ -85,9 +86,19 @@ export var colors = _objectSpread(_objectSpread({
|
|
|
85
86
|
aqua: aqua.highlight,
|
|
86
87
|
teal: teal.highlight
|
|
87
88
|
},
|
|
88
|
-
selected: COLORS.COLOR_NEUTRAL_800
|
|
89
|
+
selected: COLORS.COLOR_NEUTRAL_800,
|
|
90
|
+
ai_generated: COLORS.COLOR_PURPLE_700
|
|
89
91
|
}
|
|
90
92
|
},
|
|
93
|
+
// AI brand gradient (AI/Gradient: Start #205bc3 -> Mid #9747ff -> Stop #f282f5).
|
|
94
|
+
// Raw hex matches the `ai_generated` precedent; #9747ff has no exact seeds-color token.
|
|
95
|
+
gradient: {
|
|
96
|
+
// 100% — AI primary fill & outline border
|
|
97
|
+
ai: "radial-gradient(circle at bottom left, #205bc3 0%, #9747ff 61%, #f282f5 100%)",
|
|
98
|
+
// 20% tint — AI secondary (composited over a white base in CSS).
|
|
99
|
+
// Kebab key so it flattens to --color-gradient-ai-subtle.
|
|
100
|
+
"ai-subtle": "radial-gradient(circle at bottom left, color-mix(in srgb, #205bc3, transparent 80%) 0%, color-mix(in srgb, #9747ff, transparent 80%) 61%, color-mix(in srgb, #f282f5, transparent 80%) 100%)"
|
|
101
|
+
},
|
|
91
102
|
button: {
|
|
92
103
|
primary: {
|
|
93
104
|
background: {
|
|
@@ -180,6 +191,46 @@ export var colors = _objectSpread(_objectSpread({
|
|
|
180
191
|
base: COLORS.COLOR_NEUTRAL_700,
|
|
181
192
|
hover: COLORS.COLOR_NEUTRAL_900
|
|
182
193
|
}
|
|
194
|
+
},
|
|
195
|
+
// AI brand appearances — consume the shared `gradient.ai*` tokens.
|
|
196
|
+
// Rendered only via the Tailwind/button.css path (see seeds-react-button).
|
|
197
|
+
"ai-primary": {
|
|
198
|
+
background: {
|
|
199
|
+
base: "var(--color-gradient-ai)"
|
|
200
|
+
},
|
|
201
|
+
border: {
|
|
202
|
+
base: "transparent"
|
|
203
|
+
},
|
|
204
|
+
text: {
|
|
205
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
206
|
+
hover: COLORS.COLOR_NEUTRAL_0
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"ai-secondary": {
|
|
210
|
+
background: {
|
|
211
|
+
// White base is applied in button.css; this is the 20% gradient tint on top.
|
|
212
|
+
base: "var(--color-gradient-ai-subtle)"
|
|
213
|
+
},
|
|
214
|
+
border: {
|
|
215
|
+
base: "transparent"
|
|
216
|
+
},
|
|
217
|
+
text: {
|
|
218
|
+
base: COLORS.COLOR_NEUTRAL_800,
|
|
219
|
+
hover: COLORS.COLOR_NEUTRAL_800
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"ai-outline": {
|
|
223
|
+
background: {
|
|
224
|
+
base: "transparent"
|
|
225
|
+
},
|
|
226
|
+
border: {
|
|
227
|
+
// Drawn as a rounded gradient border via a ::before pseudo-element in button.css.
|
|
228
|
+
base: "var(--color-gradient-ai)"
|
|
229
|
+
},
|
|
230
|
+
text: {
|
|
231
|
+
base: COLORS.COLOR_NEUTRAL_800,
|
|
232
|
+
hover: COLORS.COLOR_NEUTRAL_800
|
|
233
|
+
}
|
|
183
234
|
}
|
|
184
235
|
},
|
|
185
236
|
link: {
|
|
@@ -208,7 +259,8 @@ export var colors = _objectSpread(_objectSpread({
|
|
|
208
259
|
pink: pink.foreground,
|
|
209
260
|
aqua: aqua.foreground,
|
|
210
261
|
teal: teal.foreground
|
|
211
|
-
}
|
|
262
|
+
},
|
|
263
|
+
ai_generated: COLORS.COLOR_NEUTRAL_900
|
|
212
264
|
},
|
|
213
265
|
icon: {
|
|
214
266
|
base: COLORS.COLOR_NEUTRAL_800,
|
|
@@ -315,6 +367,7 @@ export var colors = _objectSpread(_objectSpread({
|
|
|
315
367
|
instagram: NETWORKCOLORS.NETWORK_COLOR_INSTAGRAM,
|
|
316
368
|
feedly: NETWORKCOLORS.NETWORK_COLOR_FEEDLY,
|
|
317
369
|
analytics: NETWORKCOLORS.NETWORK_COLOR_ANALYTICS,
|
|
370
|
+
google_analytics_property: NETWORKCOLORS.NETWORK_COLOR_ANALYTICS,
|
|
318
371
|
youtube: NETWORKCOLORS.NETWORK_COLOR_YOUTUBE,
|
|
319
372
|
messenger: NETWORKCOLORS.NETWORK_COLOR_MESSENGER,
|
|
320
373
|
snapchat: NETWORKCOLORS.NETWORK_COLOR_SNAPCHAT,
|