@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,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
buildAll: true,
|
|
8
|
+
buildCSSVariables: true
|
|
9
|
+
};
|
|
10
|
+
exports.buildAll = buildAll;
|
|
11
|
+
Object.defineProperty(exports, "buildCSSVariables", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return _buildCSS.buildCSSVariables;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var _buildCSS = require("./buildCSS");
|
|
18
|
+
var _utils = require("./utils");
|
|
19
|
+
Object.keys(_utils).forEach(function (key) {
|
|
20
|
+
if (key === "default" || key === "__esModule") return;
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
22
|
+
if (key in exports && exports[key] === _utils[key]) return;
|
|
23
|
+
Object.defineProperty(exports, key, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function get() {
|
|
26
|
+
return _utils[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
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); }
|
|
31
|
+
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 }; })(); }
|
|
32
|
+
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); }
|
|
33
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
34
|
+
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); }
|
|
35
|
+
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); }); }; } /**
|
|
36
|
+
* Build scripts for transforming Seeds theme to multiple output formats
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Run all build transformations
|
|
40
|
+
*/
|
|
41
|
+
function buildAll() {
|
|
42
|
+
return _buildAll.apply(this, arguments);
|
|
43
|
+
}
|
|
44
|
+
function _buildAll() {
|
|
45
|
+
_buildAll = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
46
|
+
var _yield$import, buildCSSVariables;
|
|
47
|
+
return _regenerator().w(function (_context) {
|
|
48
|
+
while (1) switch (_context.n) {
|
|
49
|
+
case 0:
|
|
50
|
+
_context.n = 1;
|
|
51
|
+
return Promise.resolve().then(function () {
|
|
52
|
+
return _interopRequireWildcard(require("./buildCSS"));
|
|
53
|
+
});
|
|
54
|
+
case 1:
|
|
55
|
+
_yield$import = _context.v;
|
|
56
|
+
buildCSSVariables = _yield$import.buildCSSVariables;
|
|
57
|
+
_context.n = 2;
|
|
58
|
+
return buildCSSVariables();
|
|
59
|
+
case 2:
|
|
60
|
+
return _context.a(2);
|
|
61
|
+
}
|
|
62
|
+
}, _callee);
|
|
63
|
+
}));
|
|
64
|
+
return _buildAll.apply(this, arguments);
|
|
65
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.filterComplexColors = filterComplexColors;
|
|
7
|
+
exports.flattenColors = flattenColors;
|
|
8
|
+
exports.flattenDuration = flattenDuration;
|
|
9
|
+
exports.flattenEasing = flattenEasing;
|
|
10
|
+
exports.flattenFontWeights = flattenFontWeights;
|
|
11
|
+
exports.flattenObject = flattenObject;
|
|
12
|
+
exports.flattenRadii = flattenRadii;
|
|
13
|
+
exports.flattenShadows = flattenShadows;
|
|
14
|
+
exports.flattenSpacing = flattenSpacing;
|
|
15
|
+
exports.flattenTypography = flattenTypography;
|
|
16
|
+
exports.isSimpleColor = isSimpleColor;
|
|
17
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
18
|
+
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."); }
|
|
19
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
20
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
21
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
22
|
+
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."); }
|
|
23
|
+
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; } }
|
|
24
|
+
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; }
|
|
25
|
+
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; } }
|
|
26
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
27
|
+
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); }
|
|
28
|
+
/**
|
|
29
|
+
* Utility functions for transforming theme objects into different formats
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Abbreviation mapping for common theme terms
|
|
34
|
+
*/
|
|
35
|
+
var ABBREVIATIONS = {
|
|
36
|
+
background: "bg",
|
|
37
|
+
foreground: "fg"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Apply abbreviation rules to a key
|
|
42
|
+
*/
|
|
43
|
+
function abbreviate(key) {
|
|
44
|
+
return ABBREVIATIONS[key] || key;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Flatten a nested object into a single-level object with kebab-case keys
|
|
49
|
+
* Example: { button: { primary: { background: { base: '#fff' } } } }
|
|
50
|
+
* Becomes: { 'button-primary-bg-base': '#fff' }
|
|
51
|
+
*/
|
|
52
|
+
function flattenObject(obj) {
|
|
53
|
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
54
|
+
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "-";
|
|
55
|
+
var result = {};
|
|
56
|
+
function recurse(current) {
|
|
57
|
+
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
58
|
+
if (typeof current === "string" || typeof current === "number") {
|
|
59
|
+
// Leaf node - create the final key
|
|
60
|
+
var key = path.map(abbreviate).join(separator);
|
|
61
|
+
result[key] = String(current);
|
|
62
|
+
} else if (_typeof(current) === "object" && current !== null) {
|
|
63
|
+
// Recurse into nested objects
|
|
64
|
+
for (var _i = 0, _Object$entries = Object.entries(current); _i < _Object$entries.length; _i++) {
|
|
65
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
66
|
+
_key = _Object$entries$_i[0],
|
|
67
|
+
value = _Object$entries$_i[1];
|
|
68
|
+
recurse(value, [].concat(_toConsumableArray(path), [_key]));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
recurse(obj, prefix ? [prefix] : []);
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Flatten colors with a 'color-' prefix for CSS variables
|
|
78
|
+
*/
|
|
79
|
+
function flattenColors(colors) {
|
|
80
|
+
return flattenObject(colors, "color");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Flatten spacing with a 'space-' prefix
|
|
85
|
+
*/
|
|
86
|
+
function flattenSpacing(space) {
|
|
87
|
+
var flattened = {};
|
|
88
|
+
|
|
89
|
+
// Space is already flat: { 0: '0px', 100: '2px', ... }
|
|
90
|
+
// But it may have nested properties like 'space' and '-space'
|
|
91
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(space); _i2 < _Object$entries2.length; _i2++) {
|
|
92
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
|
93
|
+
key = _Object$entries2$_i[0],
|
|
94
|
+
value = _Object$entries2$_i[1];
|
|
95
|
+
if (typeof value === "string") {
|
|
96
|
+
flattened["space-".concat(key)] = value;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return flattened;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Flatten typography values for Tailwind
|
|
104
|
+
*/
|
|
105
|
+
function flattenTypography(typography) {
|
|
106
|
+
var result = {};
|
|
107
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(typography); _i3 < _Object$entries3.length; _i3++) {
|
|
108
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
|
109
|
+
key = _Object$entries3$_i[0],
|
|
110
|
+
value = _Object$entries3$_i[1];
|
|
111
|
+
if (_typeof(value) === "object" && value !== null && "fontSize" in value && "lineHeight" in value) {
|
|
112
|
+
result[key] = [value.fontSize, {
|
|
113
|
+
lineHeight: value.lineHeight
|
|
114
|
+
}];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Flatten radii (border radius)
|
|
122
|
+
*/
|
|
123
|
+
function flattenRadii(radii) {
|
|
124
|
+
var flattened = {};
|
|
125
|
+
for (var _i4 = 0, _Object$entries4 = Object.entries(radii); _i4 < _Object$entries4.length; _i4++) {
|
|
126
|
+
var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
|
|
127
|
+
key = _Object$entries4$_i[0],
|
|
128
|
+
value = _Object$entries4$_i[1];
|
|
129
|
+
if (typeof value === "string") {
|
|
130
|
+
flattened[key] = value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return flattened;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Flatten shadows
|
|
138
|
+
*/
|
|
139
|
+
function flattenShadows(shadows) {
|
|
140
|
+
var flattened = {};
|
|
141
|
+
for (var _i5 = 0, _Object$entries5 = Object.entries(shadows); _i5 < _Object$entries5.length; _i5++) {
|
|
142
|
+
var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i5], 2),
|
|
143
|
+
key = _Object$entries5$_i[0],
|
|
144
|
+
value = _Object$entries5$_i[1];
|
|
145
|
+
if (typeof value === "string") {
|
|
146
|
+
flattened[key] = value;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return flattened;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Flatten font weights
|
|
154
|
+
*/
|
|
155
|
+
function flattenFontWeights(fontWeights) {
|
|
156
|
+
var flattened = {};
|
|
157
|
+
for (var _i6 = 0, _Object$entries6 = Object.entries(fontWeights); _i6 < _Object$entries6.length; _i6++) {
|
|
158
|
+
var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i6], 2),
|
|
159
|
+
key = _Object$entries6$_i[0],
|
|
160
|
+
value = _Object$entries6$_i[1];
|
|
161
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
162
|
+
flattened[key] = value;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return flattened;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Flatten easing (transition timing functions)
|
|
170
|
+
*/
|
|
171
|
+
function flattenEasing(easing) {
|
|
172
|
+
var flattened = {};
|
|
173
|
+
for (var _i7 = 0, _Object$entries7 = Object.entries(easing); _i7 < _Object$entries7.length; _i7++) {
|
|
174
|
+
var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i7], 2),
|
|
175
|
+
key = _Object$entries7$_i[0],
|
|
176
|
+
value = _Object$entries7$_i[1];
|
|
177
|
+
if (typeof value === "string") {
|
|
178
|
+
flattened[key] = value;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return flattened;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Flatten duration (transition durations)
|
|
186
|
+
*/
|
|
187
|
+
function flattenDuration(duration) {
|
|
188
|
+
var flattened = {};
|
|
189
|
+
for (var _i8 = 0, _Object$entries8 = Object.entries(duration); _i8 < _Object$entries8.length; _i8++) {
|
|
190
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i8], 2),
|
|
191
|
+
key = _Object$entries8$_i[0],
|
|
192
|
+
value = _Object$entries8$_i[1];
|
|
193
|
+
if (typeof value === "string") {
|
|
194
|
+
flattened[key] = value;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return flattened;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Check if a value is a valid CSS color
|
|
202
|
+
* Filters out complex values like color-mix() which may not work everywhere
|
|
203
|
+
*/
|
|
204
|
+
function isSimpleColor(value) {
|
|
205
|
+
return !value.includes("color-mix") && !value.includes("gradient");
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Filter out colors that use advanced CSS features
|
|
210
|
+
*/
|
|
211
|
+
function filterComplexColors(colors) {
|
|
212
|
+
var filtered = {};
|
|
213
|
+
for (var _i9 = 0, _Object$entries9 = Object.entries(colors); _i9 < _Object$entries9.length; _i9++) {
|
|
214
|
+
var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i9], 2),
|
|
215
|
+
key = _Object$entries9$_i[0],
|
|
216
|
+
value = _Object$entries9$_i[1];
|
|
217
|
+
if (isSimpleColor(value)) {
|
|
218
|
+
filtered[key] = value;
|
|
219
|
+
} else {
|
|
220
|
+
// Keep it but add a comment in generated files
|
|
221
|
+
filtered[key] = value;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return filtered;
|
|
225
|
+
}
|
package/commonjs/dark/theme.js
CHANGED
|
@@ -59,7 +59,8 @@ var colors = exports.colors = _objectSpread(_objectSpread({}, _theme.default.col
|
|
|
59
59
|
selected: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
60
60
|
positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
|
|
61
61
|
negative_sentiment: _seedsColor.default.COLOR_RED_500,
|
|
62
|
-
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
|
|
62
|
+
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
63
|
+
ai_generated: "var(--color-container-bg-ai-generated, ".concat(_seedsColor.default.COLOR_NEUTRAL_100, ")")
|
|
63
64
|
},
|
|
64
65
|
border: {
|
|
65
66
|
base: _seedsColor.default.COLOR_NEUTRAL_1100,
|
|
@@ -83,9 +84,15 @@ var colors = exports.colors = _objectSpread(_objectSpread({}, _theme.default.col
|
|
|
83
84
|
aqua: _decorativePalettes.aqua.highlight,
|
|
84
85
|
teal: _decorativePalettes.teal.highlight
|
|
85
86
|
},
|
|
86
|
-
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
87
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
88
|
+
ai_generated: _seedsColor.default.COLOR_PURPLE_700
|
|
87
89
|
}
|
|
88
90
|
},
|
|
91
|
+
// AI brand gradient — identical to light mode (the brand gradient does not flip).
|
|
92
|
+
gradient: {
|
|
93
|
+
ai: "radial-gradient(circle at bottom left, #205bc3 0%, #9747ff 61%, #f282f5 100%)",
|
|
94
|
+
"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%)"
|
|
95
|
+
},
|
|
89
96
|
button: {
|
|
90
97
|
primary: {
|
|
91
98
|
background: {
|
|
@@ -178,6 +185,43 @@ var colors = exports.colors = _objectSpread(_objectSpread({}, _theme.default.col
|
|
|
178
185
|
base: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
179
186
|
hover: _seedsColor.default.COLOR_NEUTRAL_200
|
|
180
187
|
}
|
|
188
|
+
},
|
|
189
|
+
"ai-primary": {
|
|
190
|
+
background: {
|
|
191
|
+
base: "var(--color-gradient-ai)"
|
|
192
|
+
},
|
|
193
|
+
border: {
|
|
194
|
+
base: "transparent"
|
|
195
|
+
},
|
|
196
|
+
text: {
|
|
197
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
198
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"ai-secondary": {
|
|
202
|
+
background: {
|
|
203
|
+
base: "var(--color-gradient-ai-subtle)"
|
|
204
|
+
},
|
|
205
|
+
border: {
|
|
206
|
+
base: "transparent"
|
|
207
|
+
},
|
|
208
|
+
text: {
|
|
209
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
210
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"ai-outline": {
|
|
214
|
+
background: {
|
|
215
|
+
base: "transparent"
|
|
216
|
+
},
|
|
217
|
+
border: {
|
|
218
|
+
base: "var(--color-gradient-ai)"
|
|
219
|
+
},
|
|
220
|
+
text: {
|
|
221
|
+
// Dark-mode override: light text for legibility on the dark surface.
|
|
222
|
+
base: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
223
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_100
|
|
224
|
+
}
|
|
181
225
|
}
|
|
182
226
|
},
|
|
183
227
|
link: {
|
|
@@ -206,7 +250,8 @@ var colors = exports.colors = _objectSpread(_objectSpread({}, _theme.default.col
|
|
|
206
250
|
pink: _decorativePalettes.pink.foreground,
|
|
207
251
|
aqua: _decorativePalettes.aqua.foreground,
|
|
208
252
|
teal: _decorativePalettes.teal.foreground
|
|
209
|
-
}
|
|
253
|
+
},
|
|
254
|
+
ai_generated: _seedsColor.default.COLOR_NEUTRAL_900
|
|
210
255
|
},
|
|
211
256
|
icon: {
|
|
212
257
|
base: _seedsColor.default.COLOR_NEUTRAL_100,
|
package/commonjs/light/theme.js
CHANGED
|
@@ -66,7 +66,8 @@ var colors = exports.colors = _objectSpread(_objectSpread({
|
|
|
66
66
|
selected: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
67
67
|
positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
|
|
68
68
|
negative_sentiment: _seedsColor.default.COLOR_RED_500,
|
|
69
|
-
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
|
|
69
|
+
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
70
|
+
ai_generated: "var(--color-container-bg-ai-generated, ".concat(_seedsColor.default.COLOR_NEUTRAL_100, ")")
|
|
70
71
|
},
|
|
71
72
|
border: {
|
|
72
73
|
base: _seedsColor.default.COLOR_NEUTRAL_200,
|
|
@@ -90,9 +91,19 @@ var colors = exports.colors = _objectSpread(_objectSpread({
|
|
|
90
91
|
aqua: _decorativePalettes.aqua.highlight,
|
|
91
92
|
teal: _decorativePalettes.teal.highlight
|
|
92
93
|
},
|
|
93
|
-
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
94
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
95
|
+
ai_generated: _seedsColor.default.COLOR_PURPLE_700
|
|
94
96
|
}
|
|
95
97
|
},
|
|
98
|
+
// AI brand gradient (AI/Gradient: Start #205bc3 -> Mid #9747ff -> Stop #f282f5).
|
|
99
|
+
// Raw hex matches the `ai_generated` precedent; #9747ff has no exact seeds-color token.
|
|
100
|
+
gradient: {
|
|
101
|
+
// 100% — AI primary fill & outline border
|
|
102
|
+
ai: "radial-gradient(circle at bottom left, #205bc3 0%, #9747ff 61%, #f282f5 100%)",
|
|
103
|
+
// 20% tint — AI secondary (composited over a white base in CSS).
|
|
104
|
+
// Kebab key so it flattens to --color-gradient-ai-subtle.
|
|
105
|
+
"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%)"
|
|
106
|
+
},
|
|
96
107
|
button: {
|
|
97
108
|
primary: {
|
|
98
109
|
background: {
|
|
@@ -185,6 +196,46 @@ var colors = exports.colors = _objectSpread(_objectSpread({
|
|
|
185
196
|
base: _seedsColor.default.COLOR_NEUTRAL_700,
|
|
186
197
|
hover: _seedsColor.default.COLOR_NEUTRAL_900
|
|
187
198
|
}
|
|
199
|
+
},
|
|
200
|
+
// AI brand appearances — consume the shared `gradient.ai*` tokens.
|
|
201
|
+
// Rendered only via the Tailwind/button.css path (see seeds-react-button).
|
|
202
|
+
"ai-primary": {
|
|
203
|
+
background: {
|
|
204
|
+
base: "var(--color-gradient-ai)"
|
|
205
|
+
},
|
|
206
|
+
border: {
|
|
207
|
+
base: "transparent"
|
|
208
|
+
},
|
|
209
|
+
text: {
|
|
210
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
211
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"ai-secondary": {
|
|
215
|
+
background: {
|
|
216
|
+
// White base is applied in button.css; this is the 20% gradient tint on top.
|
|
217
|
+
base: "var(--color-gradient-ai-subtle)"
|
|
218
|
+
},
|
|
219
|
+
border: {
|
|
220
|
+
base: "transparent"
|
|
221
|
+
},
|
|
222
|
+
text: {
|
|
223
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
224
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"ai-outline": {
|
|
228
|
+
background: {
|
|
229
|
+
base: "transparent"
|
|
230
|
+
},
|
|
231
|
+
border: {
|
|
232
|
+
// Drawn as a rounded gradient border via a ::before pseudo-element in button.css.
|
|
233
|
+
base: "var(--color-gradient-ai)"
|
|
234
|
+
},
|
|
235
|
+
text: {
|
|
236
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
237
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800
|
|
238
|
+
}
|
|
188
239
|
}
|
|
189
240
|
},
|
|
190
241
|
link: {
|
|
@@ -213,7 +264,8 @@ var colors = exports.colors = _objectSpread(_objectSpread({
|
|
|
213
264
|
pink: _decorativePalettes.pink.foreground,
|
|
214
265
|
aqua: _decorativePalettes.aqua.foreground,
|
|
215
266
|
teal: _decorativePalettes.teal.foreground
|
|
216
|
-
}
|
|
267
|
+
},
|
|
268
|
+
ai_generated: _seedsColor.default.COLOR_NEUTRAL_900
|
|
217
269
|
},
|
|
218
270
|
icon: {
|
|
219
271
|
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
@@ -320,6 +372,7 @@ var colors = exports.colors = _objectSpread(_objectSpread({
|
|
|
320
372
|
instagram: _seedsNetworkcolor.default.NETWORK_COLOR_INSTAGRAM,
|
|
321
373
|
feedly: _seedsNetworkcolor.default.NETWORK_COLOR_FEEDLY,
|
|
322
374
|
analytics: _seedsNetworkcolor.default.NETWORK_COLOR_ANALYTICS,
|
|
375
|
+
google_analytics_property: _seedsNetworkcolor.default.NETWORK_COLOR_ANALYTICS,
|
|
323
376
|
youtube: _seedsNetworkcolor.default.NETWORK_COLOR_YOUTUBE,
|
|
324
377
|
messenger: _seedsNetworkcolor.default.NETWORK_COLOR_MESSENGER,
|
|
325
378
|
snapchat: _seedsNetworkcolor.default.NETWORK_COLOR_SNAPCHAT,
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seeds Design System — Tailwind CSS v4 Preset
|
|
3
|
+
*
|
|
4
|
+
* Import this file in your CSS entry point:
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@sproutsocial/seeds-react-theme/css/tailwind-preset";
|
|
7
|
+
*
|
|
8
|
+
* All values are sourced from Seeds token packages — no hardcoded values.
|
|
9
|
+
* Dark mode is handled via the .dark class on <html>.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@theme {
|
|
13
|
+
/* Spacing — from @sproutsocial/seeds-space */
|
|
14
|
+
--spacing-0: 0px;
|
|
15
|
+
--spacing-100: 2px;
|
|
16
|
+
--spacing-200: 4px;
|
|
17
|
+
--spacing-300: 8px;
|
|
18
|
+
--spacing-350: 12px;
|
|
19
|
+
--spacing-400: 16px;
|
|
20
|
+
--spacing-450: 24px;
|
|
21
|
+
--spacing-500: 32px;
|
|
22
|
+
--spacing-600: 40px;
|
|
23
|
+
|
|
24
|
+
/* Border radius — from @sproutsocial/seeds-border */
|
|
25
|
+
--radius-400: 4px;
|
|
26
|
+
--radius-500: 6px;
|
|
27
|
+
--radius-600: 8px;
|
|
28
|
+
--radius-800: 12px;
|
|
29
|
+
--radius-900: 24px;
|
|
30
|
+
--radius-1000: 999999px;
|
|
31
|
+
--radius-pill: 999999px;
|
|
32
|
+
--radius-inner: 4px;
|
|
33
|
+
--radius-outer: 8px;
|
|
34
|
+
|
|
35
|
+
/* Font size — from @sproutsocial/seeds-typography */
|
|
36
|
+
--text-100--font-size: 11px;
|
|
37
|
+
--text-100--line-height: 18.666666666666668px;
|
|
38
|
+
--text-200--font-size: 13px;
|
|
39
|
+
--text-200--line-height: 21.333333333333332px;
|
|
40
|
+
--text-300--font-size: 16px;
|
|
41
|
+
--text-300--line-height: 24px;
|
|
42
|
+
--text-400--font-size: 18px;
|
|
43
|
+
--text-400--line-height: 26.666666666666668px;
|
|
44
|
+
--text-500--font-size: 21px;
|
|
45
|
+
--text-500--line-height: 29.333333333333332px;
|
|
46
|
+
--text-600--font-size: 24px;
|
|
47
|
+
--text-600--line-height: 32px;
|
|
48
|
+
--text-700--font-size: 32px;
|
|
49
|
+
--text-700--line-height: 40px;
|
|
50
|
+
|
|
51
|
+
/* Button colors — from @sproutsocial/seeds-color (light mode) */
|
|
52
|
+
--color-button-primary-bg-base: #205bc3;
|
|
53
|
+
--color-button-primary-bg-hover: #1150aa;
|
|
54
|
+
--color-button-primary-bg-active: #0c3f89;
|
|
55
|
+
--color-button-primary-text-base: #FFFFFF;
|
|
56
|
+
--color-button-primary-text-hover: #FFFFFF;
|
|
57
|
+
--color-button-primary-border-base: transparent;
|
|
58
|
+
--color-button-secondary-bg-base: transparent;
|
|
59
|
+
--color-button-secondary-bg-hover: #364141;
|
|
60
|
+
--color-button-secondary-bg-active: #273333;
|
|
61
|
+
--color-button-secondary-text-base: #364141;
|
|
62
|
+
--color-button-secondary-text-hover: #FFFFFF;
|
|
63
|
+
--color-button-secondary-border-base: #364141;
|
|
64
|
+
--color-button-destructive-bg-base: #c63434;
|
|
65
|
+
--color-button-destructive-bg-hover: #992222;
|
|
66
|
+
--color-button-destructive-bg-active: #6d1313;
|
|
67
|
+
--color-button-destructive-text-base: #FFFFFF;
|
|
68
|
+
--color-button-destructive-text-hover: #FFFFFF;
|
|
69
|
+
--color-button-destructive-border-base: transparent;
|
|
70
|
+
--color-button-placeholder-bg-base: transparent;
|
|
71
|
+
--color-button-placeholder-bg-hover: #FFFFFF;
|
|
72
|
+
--color-button-placeholder-bg-active: #FFFFFF;
|
|
73
|
+
--color-button-placeholder-text-base: #205bc3;
|
|
74
|
+
--color-button-placeholder-text-hover: #1150aa;
|
|
75
|
+
--color-button-placeholder-border-base: #929a9b;
|
|
76
|
+
|
|
77
|
+
/* Semantic tokens — reference CSS vars from theme-all.css */
|
|
78
|
+
--color-app-bg-base: var(--color-app-bg-base);
|
|
79
|
+
--color-container-bg-base: var(--color-container-bg-base);
|
|
80
|
+
--color-container-bg-success: var(--color-container-bg-success);
|
|
81
|
+
--color-container-bg-warning: var(--color-container-bg-warning);
|
|
82
|
+
--color-container-bg-error: var(--color-container-bg-error);
|
|
83
|
+
--color-container-bg-info: var(--color-container-bg-info);
|
|
84
|
+
--color-container-bg-opportunity: var(--color-container-bg-opportunity);
|
|
85
|
+
--color-container-border-base: var(--color-container-border-base);
|
|
86
|
+
--color-container-border-success: var(--color-container-border-success);
|
|
87
|
+
--color-container-border-warning: var(--color-container-border-warning);
|
|
88
|
+
--color-container-border-error: var(--color-container-border-error);
|
|
89
|
+
--color-container-border-info: var(--color-container-border-info);
|
|
90
|
+
--color-container-border-opportunity: var(--color-container-border-opportunity);
|
|
91
|
+
--color-text-body: var(--color-text-body);
|
|
92
|
+
--color-text-headline: var(--color-text-headline);
|
|
93
|
+
--color-text-subtext: var(--color-text-subtext);
|
|
94
|
+
--color-form-bg-base: var(--color-form-bg-base);
|
|
95
|
+
--color-form-border-base: var(--color-form-border-base);
|
|
96
|
+
--color-form-border-selected: var(--color-form-border-selected);
|
|
97
|
+
--color-form-placeholder-base: var(--color-form-placeholder-base);
|
|
98
|
+
/* Button colors — dark mode variants (use with dark: prefix) */
|
|
99
|
+
--color-button-primary-bg-base-dark: #679eff;
|
|
100
|
+
--color-button-primary-bg-hover-dark: #a1c2f8;
|
|
101
|
+
--color-button-primary-bg-active-dark: #c7dbf9;
|
|
102
|
+
--color-button-primary-text-base-dark: #273333;
|
|
103
|
+
--color-button-primary-text-hover-dark: #162020;
|
|
104
|
+
--color-button-secondary-bg-hover-dark: #f3f4f4;
|
|
105
|
+
--color-button-secondary-bg-active-dark: #FFFFFF;
|
|
106
|
+
--color-button-secondary-text-base-dark: #FFFFFF;
|
|
107
|
+
--color-button-secondary-text-hover-dark: #364141;
|
|
108
|
+
--color-button-secondary-border-base-dark: #FFFFFF;
|
|
109
|
+
--color-button-destructive-bg-base-dark: #ff7f6e;
|
|
110
|
+
--color-button-destructive-bg-hover-dark: #ff9c8f;
|
|
111
|
+
--color-button-destructive-bg-active-dark: #ffb8b1;
|
|
112
|
+
--color-button-destructive-text-base-dark: #273333;
|
|
113
|
+
--color-button-destructive-text-hover-dark: #162020;
|
|
114
|
+
--color-button-placeholder-bg-hover-dark: #040404;
|
|
115
|
+
--color-button-placeholder-bg-active-dark: #040404;
|
|
116
|
+
--color-button-placeholder-text-base-dark: #679eff;
|
|
117
|
+
--color-button-placeholder-text-hover-dark: #a1c2f8;
|
|
118
|
+
}
|