@trops/dash-react 1.0.52 → 1.0.54

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/dist/index.js CHANGED
@@ -30,28 +30,28 @@ var ThemeContext = /*#__PURE__*/createContext({
30
30
  rawThemes: null
31
31
  });
32
32
 
33
- function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
33
+ function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
34
34
  function _typeof$K(o) { "@babel/helpers - typeof"; return _typeof$K = "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$K(o); }
35
35
  function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
36
  function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty$F(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
37
37
  function _defineProperty$F(e, r, t) { return (r = _toPropertyKey$J(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
38
38
  function _toPropertyKey$J(t) { var i = _toPrimitive$J(t, "string"); return "symbol" == _typeof$K(i) ? i : i + ""; }
39
39
  function _toPrimitive$J(t, r) { if ("object" != _typeof$K(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$K(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
40
- function _slicedToArray$f(r, e) { return _arrayWithHoles$f(r) || _iterableToArrayLimit$f(r, e) || _unsupportedIterableToArray$j(r, e) || _nonIterableRest$f(); }
41
- function _nonIterableRest$f() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
42
- function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(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$j(r, a) : void 0; } }
43
- function _arrayLikeToArray$j(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; }
44
- function _iterableToArrayLimit$f(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; } }
45
- function _arrayWithHoles$f(r) { if (Array.isArray(r)) return r; }
40
+ function _slicedToArray$g(r, e) { return _arrayWithHoles$g(r) || _iterableToArrayLimit$g(r, e) || _unsupportedIterableToArray$k(r, e) || _nonIterableRest$g(); }
41
+ function _nonIterableRest$g() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
42
+ function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(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$k(r, a) : void 0; } }
43
+ function _arrayLikeToArray$k(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; }
44
+ function _iterableToArrayLimit$g(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; } }
45
+ function _arrayWithHoles$g(r) { if (Array.isArray(r)) return r; }
46
46
  var ThemePreviewProvider = function ThemePreviewProvider(_ref) {
47
47
  var children = _ref.children;
48
48
  var parentCtx = useContext(ThemeContext);
49
49
  var _useState = useState(null),
50
- _useState2 = _slicedToArray$f(_useState, 2),
50
+ _useState2 = _slicedToArray$g(_useState, 2),
51
51
  previewTheme = _useState2[0],
52
52
  setPreviewThemeState = _useState2[1];
53
53
  var _useState3 = useState(true),
54
- _useState4 = _slicedToArray$f(_useState3, 2),
54
+ _useState4 = _slicedToArray$g(_useState3, 2),
55
55
  showPreview = _useState4[0],
56
56
  setShowPreview = _useState4[1];
57
57
  var isPreview = previewTheme !== null && showPreview;
@@ -93,7 +93,7 @@ var ThemePreviewProvider = function ThemePreviewProvider(_ref) {
93
93
  var newSet = new Set();
94
94
  if (cssVars && _typeof$K(cssVars) === "object") {
95
95
  for (var _i = 0, _Object$entries = Object.entries(cssVars); _i < _Object$entries.length; _i++) {
96
- var _Object$entries$_i = _slicedToArray$f(_Object$entries[_i], 2),
96
+ var _Object$entries$_i = _slicedToArray$g(_Object$entries[_i], 2),
97
97
  varName = _Object$entries$_i[0],
98
98
  value = _Object$entries$_i[1];
99
99
  root.style.setProperty(varName, value);
@@ -101,7 +101,7 @@ var ThemePreviewProvider = function ThemePreviewProvider(_ref) {
101
101
  }
102
102
  }
103
103
  // Remove any vars from a prior theme that aren't in the new set.
104
- var _iterator = _createForOfIteratorHelper$2(writtenVarsRef.current),
104
+ var _iterator = _createForOfIteratorHelper$3(writtenVarsRef.current),
105
105
  _step;
106
106
  try {
107
107
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -125,7 +125,7 @@ var ThemePreviewProvider = function ThemePreviewProvider(_ref) {
125
125
  return function () {
126
126
  var root = typeof document !== "undefined" ? document.documentElement : null;
127
127
  if (!root) return;
128
- var _iterator2 = _createForOfIteratorHelper$2(writtenVarsRef.current),
128
+ var _iterator2 = _createForOfIteratorHelper$3(writtenVarsRef.current),
129
129
  _step2;
130
130
  try {
131
131
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -573,12 +573,12 @@ var styleClassNames = {
573
573
 
574
574
  var _themeObjects$BUTTON, _themeObjects$BUTTON_, _themeObjects$BUTTON_2, _themeObjects$BUTTON_3, _themeObjects$BUTTON_4, _themeObjects$BUTTON_5, _themeObjects$MENU_IT, _themeObjects$TABS_TR, _colorMap;
575
575
  function _typeof$J(o) { "@babel/helpers - typeof"; return _typeof$J = "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$J(o); }
576
- function _toConsumableArray$5(r) { return _arrayWithoutHoles$5(r) || _iterableToArray$5(r) || _unsupportedIterableToArray$i(r) || _nonIterableSpread$5(); }
576
+ function _toConsumableArray$5(r) { return _arrayWithoutHoles$5(r) || _iterableToArray$5(r) || _unsupportedIterableToArray$j(r) || _nonIterableSpread$5(); }
577
577
  function _nonIterableSpread$5() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
578
- function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(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$i(r, a) : void 0; } }
578
+ function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(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$j(r, a) : void 0; } }
579
579
  function _iterableToArray$5(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
580
- function _arrayWithoutHoles$5(r) { if (Array.isArray(r)) return _arrayLikeToArray$i(r); }
581
- function _arrayLikeToArray$i(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; }
580
+ function _arrayWithoutHoles$5(r) { if (Array.isArray(r)) return _arrayLikeToArray$j(r); }
581
+ function _arrayLikeToArray$j(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; }
582
582
  function ownKeys$D(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
583
583
  function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), !0).forEach(function (r) { _defineProperty$E(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
584
584
  function _defineProperty$E(e, r, t) { return (r = _toPropertyKey$I(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -984,12 +984,13 @@ var getDefaultStylesForItem = function getDefaultStylesForItem(itemName) {
984
984
  return itemName in colorMap ? _objectSpread$D({}, colorMap[itemName]) : {};
985
985
  };
986
986
 
987
- function _slicedToArray$e(r, e) { return _arrayWithHoles$e(r) || _iterableToArrayLimit$e(r, e) || _unsupportedIterableToArray$h(r, e) || _nonIterableRest$e(); }
988
- function _nonIterableRest$e() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
989
- function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(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$h(r, a) : void 0; } }
990
- function _arrayLikeToArray$h(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; }
991
- function _iterableToArrayLimit$e(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; } }
992
- function _arrayWithHoles$e(r) { if (Array.isArray(r)) return r; }
987
+ function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
988
+ function _slicedToArray$f(r, e) { return _arrayWithHoles$f(r) || _iterableToArrayLimit$f(r, e) || _unsupportedIterableToArray$i(r, e) || _nonIterableRest$f(); }
989
+ function _nonIterableRest$f() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
990
+ function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(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$i(r, a) : void 0; } }
991
+ function _arrayLikeToArray$i(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; }
992
+ function _iterableToArrayLimit$f(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; } }
993
+ function _arrayWithHoles$f(r) { if (Array.isArray(r)) return r; }
993
994
  /**
994
995
  * colorMath — pure-function helpers for working with hex colors.
995
996
  *
@@ -1188,7 +1189,7 @@ function deriveShades(hex) {
1188
1189
  };
1189
1190
  var out = {};
1190
1191
  for (var _i = 0, _Object$entries = Object.entries(targets); _i < _Object$entries.length; _i++) {
1191
- var _Object$entries$_i = _slicedToArray$e(_Object$entries[_i], 2),
1192
+ var _Object$entries$_i = _slicedToArray$f(_Object$entries[_i], 2),
1192
1193
  shade = _Object$entries$_i[0],
1193
1194
  targetL = _Object$entries$_i[1];
1194
1195
  var rgbOut = hslToRgb({
@@ -1230,6 +1231,472 @@ function contrastRatio(hexA, hexB) {
1230
1231
  return (lighter + 0.05) / (darker + 0.05);
1231
1232
  }
1232
1233
 
1234
+ /**
1235
+ * Color families for the categorized picker grid. Each chromatic
1236
+ * family declares a hue range (inclusive, may wrap through 0/360);
1237
+ * Neutrals has `hueRange: null` and is handled specially.
1238
+ *
1239
+ * Used by `getCuratedColorGrid(familyName)` to derive a curated set
1240
+ * of ~36 swatches per family — varied lightness + saturation across
1241
+ * the family's hue range. Discoverable for users who don't think in
1242
+ * hex but want more colors than Tailwind's 22 named families.
1243
+ *
1244
+ * The grid is generated, not hand-curated, so it stays consistent
1245
+ * if we tune the lightness/saturation curve later.
1246
+ */
1247
+ var COLOR_FAMILIES = [{
1248
+ name: "Reds & Pinks",
1249
+ hueRange: [340, 20]
1250
+ },
1251
+ // wraps through 0
1252
+ {
1253
+ name: "Oranges & Yellows",
1254
+ hueRange: [20, 65]
1255
+ }, {
1256
+ name: "Greens",
1257
+ hueRange: [80, 170]
1258
+ }, {
1259
+ name: "Blues & Cyans",
1260
+ hueRange: [180, 250]
1261
+ }, {
1262
+ name: "Purples & Magentas",
1263
+ hueRange: [260, 320]
1264
+ }, {
1265
+ name: "Neutrals",
1266
+ hueRange: null
1267
+ }];
1268
+ function getColorFamilies() {
1269
+ return COLOR_FAMILIES.map(function (f) {
1270
+ return f.name;
1271
+ });
1272
+ }
1273
+
1274
+ /**
1275
+ * Return a curated array of hex colors for the given family name.
1276
+ * Chromatic families produce 6 hues × 6 lightnesses (36 swatches),
1277
+ * with saturation lowered at the extremes for legibility.
1278
+ * Neutrals produce 3 tints (pure, warm, cool) × 6 lightnesses
1279
+ * (18 swatches).
1280
+ *
1281
+ * Returns [] if the family name isn't recognized.
1282
+ */
1283
+ function getCuratedColorGrid(familyName) {
1284
+ var family = COLOR_FAMILIES.find(function (f) {
1285
+ return f.name === familyName;
1286
+ });
1287
+ if (!family) return [];
1288
+ if (family.hueRange === null) {
1289
+ // Neutrals: vary the tint × lightness. Pure / warm / cool
1290
+ // mirror the bands designers tend to reach for.
1291
+ var tints = [{
1292
+ h: 0,
1293
+ s: 0
1294
+ },
1295
+ // pure gray
1296
+ {
1297
+ h: 30,
1298
+ s: 0.08
1299
+ },
1300
+ // warm
1301
+ {
1302
+ h: 215,
1303
+ s: 0.08
1304
+ } // cool
1305
+ ];
1306
+ var _lightnesses = [0.1, 0.25, 0.4, 0.55, 0.7, 0.88];
1307
+ var _out = [];
1308
+ for (var _i2 = 0, _lightnesses2 = _lightnesses; _i2 < _lightnesses2.length; _i2++) {
1309
+ var l = _lightnesses2[_i2];
1310
+ var _iterator = _createForOfIteratorHelper$2(tints),
1311
+ _step;
1312
+ try {
1313
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1314
+ var tint = _step.value;
1315
+ _out.push(rgbToHex(hslToRgb({
1316
+ h: tint.h,
1317
+ s: tint.s,
1318
+ l: l
1319
+ })));
1320
+ }
1321
+ } catch (err) {
1322
+ _iterator.e(err);
1323
+ } finally {
1324
+ _iterator.f();
1325
+ }
1326
+ }
1327
+ return _out;
1328
+ }
1329
+ var _family$hueRange = _slicedToArray$f(family.hueRange, 2),
1330
+ hMin = _family$hueRange[0],
1331
+ hMax = _family$hueRange[1];
1332
+ var hues = [];
1333
+ if (hMin > hMax) {
1334
+ // Wraps through 0/360.
1335
+ var span = 360 - hMin + hMax;
1336
+ for (var i = 0; i < 6; i++) {
1337
+ hues.push((hMin + i * span / 5) % 360);
1338
+ }
1339
+ } else {
1340
+ var _span = hMax - hMin;
1341
+ for (var _i3 = 0; _i3 < 6; _i3++) {
1342
+ hues.push(hMin + _i3 * _span / 5);
1343
+ }
1344
+ }
1345
+ var lightnesses = [0.2, 0.35, 0.5, 0.65, 0.8, 0.9];
1346
+ var out = [];
1347
+ for (var _i4 = 0, _lightnesses3 = lightnesses; _i4 < _lightnesses3.length; _i4++) {
1348
+ var _l = _lightnesses3[_i4];
1349
+ var _iterator2 = _createForOfIteratorHelper$2(hues),
1350
+ _step2;
1351
+ try {
1352
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1353
+ var h = _step2.value;
1354
+ // Saturation curve: full at mid-lightness, lower at extremes.
1355
+ var s = _l < 0.3 || _l > 0.85 ? 0.5 : 0.85;
1356
+ out.push(rgbToHex(hslToRgb({
1357
+ h: h,
1358
+ s: s,
1359
+ l: _l
1360
+ })));
1361
+ }
1362
+ } catch (err) {
1363
+ _iterator2.e(err);
1364
+ } finally {
1365
+ _iterator2.f();
1366
+ }
1367
+ }
1368
+ return out;
1369
+ }
1370
+
1371
+ function _slicedToArray$e(r, e) { return _arrayWithHoles$e(r) || _iterableToArrayLimit$e(r, e) || _unsupportedIterableToArray$h(r, e) || _nonIterableRest$e(); }
1372
+ function _nonIterableRest$e() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1373
+ function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(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$h(r, a) : void 0; } }
1374
+ function _arrayLikeToArray$h(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; }
1375
+ function _iterableToArrayLimit$e(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; } }
1376
+ function _arrayWithHoles$e(r) { if (Array.isArray(r)) return r; }
1377
+ /**
1378
+ * tailwindPalette — frozen snapshot of Tailwind v3's color palette.
1379
+ *
1380
+ * Extracted from `tailwindcss/lib/public/colors.js` at the time this
1381
+ * file was written. Used by the theme system to resolve named-color
1382
+ * tokens (`bg-blue-700`) back to their hex CSS values so inline-style
1383
+ * consumers can pull the same color as className consumers — see the
1384
+ * `cssValue` accessor on themes (PRD: arbitrary-color-themes.md US-007).
1385
+ *
1386
+ * Includes the 22 color families the theme picker exposes × 11 shades
1387
+ * (50..950). If Tailwind ever ships a different family or shade we'll
1388
+ * either inline it here or accept that custom-color themes are the
1389
+ * only path to those values.
1390
+ */
1391
+ var TAILWIND_PALETTE = {
1392
+ gray: {
1393
+ 50: "#f9fafb",
1394
+ 100: "#f3f4f6",
1395
+ 200: "#e5e7eb",
1396
+ 300: "#d1d5db",
1397
+ 400: "#9ca3af",
1398
+ 500: "#6b7280",
1399
+ 600: "#4b5563",
1400
+ 700: "#374151",
1401
+ 800: "#1f2937",
1402
+ 900: "#111827",
1403
+ 950: "#030712"
1404
+ },
1405
+ slate: {
1406
+ 50: "#f8fafc",
1407
+ 100: "#f1f5f9",
1408
+ 200: "#e2e8f0",
1409
+ 300: "#cbd5e1",
1410
+ 400: "#94a3b8",
1411
+ 500: "#64748b",
1412
+ 600: "#475569",
1413
+ 700: "#334155",
1414
+ 800: "#1e293b",
1415
+ 900: "#0f172a",
1416
+ 950: "#020617"
1417
+ },
1418
+ zinc: {
1419
+ 50: "#fafafa",
1420
+ 100: "#f4f4f5",
1421
+ 200: "#e4e4e7",
1422
+ 300: "#d4d4d8",
1423
+ 400: "#a1a1aa",
1424
+ 500: "#71717a",
1425
+ 600: "#52525b",
1426
+ 700: "#3f3f46",
1427
+ 800: "#27272a",
1428
+ 900: "#18181b",
1429
+ 950: "#09090b"
1430
+ },
1431
+ neutral: {
1432
+ 50: "#fafafa",
1433
+ 100: "#f5f5f5",
1434
+ 200: "#e5e5e5",
1435
+ 300: "#d4d4d4",
1436
+ 400: "#a3a3a3",
1437
+ 500: "#737373",
1438
+ 600: "#525252",
1439
+ 700: "#404040",
1440
+ 800: "#262626",
1441
+ 900: "#171717",
1442
+ 950: "#0a0a0a"
1443
+ },
1444
+ stone: {
1445
+ 50: "#fafaf9",
1446
+ 100: "#f5f5f4",
1447
+ 200: "#e7e5e4",
1448
+ 300: "#d6d3d1",
1449
+ 400: "#a8a29e",
1450
+ 500: "#78716c",
1451
+ 600: "#57534e",
1452
+ 700: "#44403c",
1453
+ 800: "#292524",
1454
+ 900: "#1c1917",
1455
+ 950: "#0c0a09"
1456
+ },
1457
+ red: {
1458
+ 50: "#fef2f2",
1459
+ 100: "#fee2e2",
1460
+ 200: "#fecaca",
1461
+ 300: "#fca5a5",
1462
+ 400: "#f87171",
1463
+ 500: "#ef4444",
1464
+ 600: "#dc2626",
1465
+ 700: "#b91c1c",
1466
+ 800: "#991b1b",
1467
+ 900: "#7f1d1d",
1468
+ 950: "#450a0a"
1469
+ },
1470
+ orange: {
1471
+ 50: "#fff7ed",
1472
+ 100: "#ffedd5",
1473
+ 200: "#fed7aa",
1474
+ 300: "#fdba74",
1475
+ 400: "#fb923c",
1476
+ 500: "#f97316",
1477
+ 600: "#ea580c",
1478
+ 700: "#c2410c",
1479
+ 800: "#9a3412",
1480
+ 900: "#7c2d12",
1481
+ 950: "#431407"
1482
+ },
1483
+ amber: {
1484
+ 50: "#fffbeb",
1485
+ 100: "#fef3c7",
1486
+ 200: "#fde68a",
1487
+ 300: "#fcd34d",
1488
+ 400: "#fbbf24",
1489
+ 500: "#f59e0b",
1490
+ 600: "#d97706",
1491
+ 700: "#b45309",
1492
+ 800: "#92400e",
1493
+ 900: "#78350f",
1494
+ 950: "#451a03"
1495
+ },
1496
+ yellow: {
1497
+ 50: "#fefce8",
1498
+ 100: "#fef9c3",
1499
+ 200: "#fef08a",
1500
+ 300: "#fde047",
1501
+ 400: "#facc15",
1502
+ 500: "#eab308",
1503
+ 600: "#ca8a04",
1504
+ 700: "#a16207",
1505
+ 800: "#854d0e",
1506
+ 900: "#713f12",
1507
+ 950: "#422006"
1508
+ },
1509
+ lime: {
1510
+ 50: "#f7fee7",
1511
+ 100: "#ecfccb",
1512
+ 200: "#d9f99d",
1513
+ 300: "#bef264",
1514
+ 400: "#a3e635",
1515
+ 500: "#84cc16",
1516
+ 600: "#65a30d",
1517
+ 700: "#4d7c0f",
1518
+ 800: "#3f6212",
1519
+ 900: "#365314",
1520
+ 950: "#1a2e05"
1521
+ },
1522
+ green: {
1523
+ 50: "#f0fdf4",
1524
+ 100: "#dcfce7",
1525
+ 200: "#bbf7d0",
1526
+ 300: "#86efac",
1527
+ 400: "#4ade80",
1528
+ 500: "#22c55e",
1529
+ 600: "#16a34a",
1530
+ 700: "#15803d",
1531
+ 800: "#166534",
1532
+ 900: "#14532d",
1533
+ 950: "#052e16"
1534
+ },
1535
+ emerald: {
1536
+ 50: "#ecfdf5",
1537
+ 100: "#d1fae5",
1538
+ 200: "#a7f3d0",
1539
+ 300: "#6ee7b7",
1540
+ 400: "#34d399",
1541
+ 500: "#10b981",
1542
+ 600: "#059669",
1543
+ 700: "#047857",
1544
+ 800: "#065f46",
1545
+ 900: "#064e3b",
1546
+ 950: "#022c22"
1547
+ },
1548
+ teal: {
1549
+ 50: "#f0fdfa",
1550
+ 100: "#ccfbf1",
1551
+ 200: "#99f6e4",
1552
+ 300: "#5eead4",
1553
+ 400: "#2dd4bf",
1554
+ 500: "#14b8a6",
1555
+ 600: "#0d9488",
1556
+ 700: "#0f766e",
1557
+ 800: "#115e59",
1558
+ 900: "#134e4a",
1559
+ 950: "#042f2e"
1560
+ },
1561
+ cyan: {
1562
+ 50: "#ecfeff",
1563
+ 100: "#cffafe",
1564
+ 200: "#a5f3fc",
1565
+ 300: "#67e8f9",
1566
+ 400: "#22d3ee",
1567
+ 500: "#06b6d4",
1568
+ 600: "#0891b2",
1569
+ 700: "#0e7490",
1570
+ 800: "#155e75",
1571
+ 900: "#164e63",
1572
+ 950: "#083344"
1573
+ },
1574
+ sky: {
1575
+ 50: "#f0f9ff",
1576
+ 100: "#e0f2fe",
1577
+ 200: "#bae6fd",
1578
+ 300: "#7dd3fc",
1579
+ 400: "#38bdf8",
1580
+ 500: "#0ea5e9",
1581
+ 600: "#0284c7",
1582
+ 700: "#0369a1",
1583
+ 800: "#075985",
1584
+ 900: "#0c4a6e",
1585
+ 950: "#082f49"
1586
+ },
1587
+ blue: {
1588
+ 50: "#eff6ff",
1589
+ 100: "#dbeafe",
1590
+ 200: "#bfdbfe",
1591
+ 300: "#93c5fd",
1592
+ 400: "#60a5fa",
1593
+ 500: "#3b82f6",
1594
+ 600: "#2563eb",
1595
+ 700: "#1d4ed8",
1596
+ 800: "#1e40af",
1597
+ 900: "#1e3a8a",
1598
+ 950: "#172554"
1599
+ },
1600
+ indigo: {
1601
+ 50: "#eef2ff",
1602
+ 100: "#e0e7ff",
1603
+ 200: "#c7d2fe",
1604
+ 300: "#a5b4fc",
1605
+ 400: "#818cf8",
1606
+ 500: "#6366f1",
1607
+ 600: "#4f46e5",
1608
+ 700: "#4338ca",
1609
+ 800: "#3730a3",
1610
+ 900: "#312e81",
1611
+ 950: "#1e1b4b"
1612
+ },
1613
+ violet: {
1614
+ 50: "#f5f3ff",
1615
+ 100: "#ede9fe",
1616
+ 200: "#ddd6fe",
1617
+ 300: "#c4b5fd",
1618
+ 400: "#a78bfa",
1619
+ 500: "#8b5cf6",
1620
+ 600: "#7c3aed",
1621
+ 700: "#6d28d9",
1622
+ 800: "#5b21b6",
1623
+ 900: "#4c1d95",
1624
+ 950: "#2e1065"
1625
+ },
1626
+ purple: {
1627
+ 50: "#faf5ff",
1628
+ 100: "#f3e8ff",
1629
+ 200: "#e9d5ff",
1630
+ 300: "#d8b4fe",
1631
+ 400: "#c084fc",
1632
+ 500: "#a855f7",
1633
+ 600: "#9333ea",
1634
+ 700: "#7e22ce",
1635
+ 800: "#6b21a8",
1636
+ 900: "#581c87",
1637
+ 950: "#3b0764"
1638
+ },
1639
+ fuchsia: {
1640
+ 50: "#fdf4ff",
1641
+ 100: "#fae8ff",
1642
+ 200: "#f5d0fe",
1643
+ 300: "#f0abfc",
1644
+ 400: "#e879f9",
1645
+ 500: "#d946ef",
1646
+ 600: "#c026d3",
1647
+ 700: "#a21caf",
1648
+ 800: "#86198f",
1649
+ 900: "#701a75",
1650
+ 950: "#4a044e"
1651
+ },
1652
+ pink: {
1653
+ 50: "#fdf2f8",
1654
+ 100: "#fce7f3",
1655
+ 200: "#fbcfe8",
1656
+ 300: "#f9a8d4",
1657
+ 400: "#f472b6",
1658
+ 500: "#ec4899",
1659
+ 600: "#db2777",
1660
+ 700: "#be185d",
1661
+ 800: "#9d174d",
1662
+ 900: "#831843",
1663
+ 950: "#500724"
1664
+ },
1665
+ rose: {
1666
+ 50: "#fff1f2",
1667
+ 100: "#ffe4e6",
1668
+ 200: "#fecdd3",
1669
+ 300: "#fda4af",
1670
+ 400: "#fb7185",
1671
+ 500: "#f43f5e",
1672
+ 600: "#e11d48",
1673
+ 700: "#be123c",
1674
+ 800: "#9f1239",
1675
+ 900: "#881337",
1676
+ 950: "#4c0519"
1677
+ }
1678
+ };
1679
+ var TOKEN_REGEX = /^(?:hover:)?(?:bg|text|border|from|via|to)-([a-z]+)-(\d+)$/;
1680
+
1681
+ /**
1682
+ * Given a Tailwind class string like `bg-blue-700` or
1683
+ * `hover:text-rose-200` extract `{ name, shade }` (`name=blue`,
1684
+ * `shade=700`) and return the matching hex from TAILWIND_PALETTE.
1685
+ *
1686
+ * Returns null if the class is not a Tailwind named-color utility
1687
+ * (e.g. arbitrary-value classes like `bg-[var(--primary-700)]` are
1688
+ * NOT handled here — they're resolved via the CSS variable instead).
1689
+ */
1690
+ function hexForTailwindClass(className) {
1691
+ if (typeof className !== "string") return null;
1692
+ var m = className.match(TOKEN_REGEX);
1693
+ if (!m) return null;
1694
+ var _m = _slicedToArray$e(m, 3),
1695
+ name = _m[1],
1696
+ shade = _m[2];
1697
+ return TAILWIND_PALETTE[name] && TAILWIND_PALETTE[name][shade] || null;
1698
+ }
1699
+
1233
1700
  function _typeof$I(o) { "@babel/helpers - typeof"; return _typeof$I = "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$I(o); }
1234
1701
  /**
1235
1702
  * deepCopy
@@ -10691,5 +11158,5 @@ if (process.env.NODE_ENV !== "development") {
10691
11158
  console.log = function () {};
10692
11159
  }
10693
11160
 
10694
- export { Accordion, Accordion2, Accordion3, Alert, Alert2, Alert3, AlertBanner, AlgoliaRefinementList, AlgoliaSearchBox, Breadcrumbs, Breadcrumbs2, Breadcrumbs3, Button, Button2, Button3, ButtonIcon, ButtonIcon2, ButtonIcon3, Caption, Caption2, Caption3, Card, Card2, Card3, Checkbox, Code, Code2, Code3, CodeEditorInline, CodeEditorVS, CodeRenderer, CommandPalette, ConfirmationModal, Container, DashPanel, DashPanel2, DashPanel3, DataList, Divider, Divider2, Divider3, DragComponent, Drawer, DropComponent, DropdownPanel, DropdownPanel2, DropdownPanel3, EmptyState, ErrorMessage, FormField, FormLabel, Heading, Heading2, Heading3, Icon, Icon2, Icon3, InputText, LayoutContainer, MainSection, Menu, Menu2, Menu3, MenuItem, MenuItem2, MenuItem3, MockAlgolia, MockLayout, MockWrapper, Modal, Navbar, PalettePreviewPane, Panel, Panel2, Panel3, Paragraph, Paragraph2, Paragraph3, ProgressBar, ProgressBar2, ProgressBar3, RadioGroup, RichText, SLACK_QUICK_REACTION_SHORTCODES, SearchInput, SelectInput, SelectMenu, SelectableCard, SettingsModal, Sidebar, Skeleton, Slider, StatCard, StatusBadge, Stepper, SubHeading, SubHeading2, SubHeading3, Switch, TabbedNavbar, Table, Table2, Table3, Tabs, Tabs2, Tabs3, Tag, Tag2, Tag3, TextArea, ThemeContext, ThemeFromUrlPane, ThemePreviewBanner, ThemePreviewContext, ThemePreviewProvider, Toast, Toast2, Toast3, Toggle, Toggle2, Toggle3, Tooltip, WS_STATES, WebSocketStatus, WidgetChrome, WidgetContext, capitalizeFirstLetter, colorNames, colorTypes, contrastRatio, deepCopy, deriveShades, getCSSStyleForClassname, getClassForObjectType, getDefaultStylesForItem, getRandomInt, getStyleName, getStylesForItem, getUUID$1 as getUUID, hexToRgb, hslToRgb, isHexColor, isObject, mock, mockText, normalizeHex, objectTypes, rgbToHex, rgbToHsl, shades, slackEmojiForName, styleClassNames, tailwindHeightFractions, themeObjects, themeVariants, useLazyEnrichment, useSidebar, useThemePreview, withRouter };
11161
+ export { Accordion, Accordion2, Accordion3, Alert, Alert2, Alert3, AlertBanner, AlgoliaRefinementList, AlgoliaSearchBox, Breadcrumbs, Breadcrumbs2, Breadcrumbs3, Button, Button2, Button3, ButtonIcon, ButtonIcon2, ButtonIcon3, Caption, Caption2, Caption3, Card, Card2, Card3, Checkbox, Code, Code2, Code3, CodeEditorInline, CodeEditorVS, CodeRenderer, CommandPalette, ConfirmationModal, Container, DashPanel, DashPanel2, DashPanel3, DataList, Divider, Divider2, Divider3, DragComponent, Drawer, DropComponent, DropdownPanel, DropdownPanel2, DropdownPanel3, EmptyState, ErrorMessage, FormField, FormLabel, Heading, Heading2, Heading3, Icon, Icon2, Icon3, InputText, LayoutContainer, MainSection, Menu, Menu2, Menu3, MenuItem, MenuItem2, MenuItem3, MockAlgolia, MockLayout, MockWrapper, Modal, Navbar, PalettePreviewPane, Panel, Panel2, Panel3, Paragraph, Paragraph2, Paragraph3, ProgressBar, ProgressBar2, ProgressBar3, RadioGroup, RichText, SLACK_QUICK_REACTION_SHORTCODES, SearchInput, SelectInput, SelectMenu, SelectableCard, SettingsModal, Sidebar, Skeleton, Slider, StatCard, StatusBadge, Stepper, SubHeading, SubHeading2, SubHeading3, Switch, TAILWIND_PALETTE, TabbedNavbar, Table, Table2, Table3, Tabs, Tabs2, Tabs3, Tag, Tag2, Tag3, TextArea, ThemeContext, ThemeFromUrlPane, ThemePreviewBanner, ThemePreviewContext, ThemePreviewProvider, Toast, Toast2, Toast3, Toggle, Toggle2, Toggle3, Tooltip, WS_STATES, WebSocketStatus, WidgetChrome, WidgetContext, capitalizeFirstLetter, colorNames, colorTypes, contrastRatio, deepCopy, deriveShades, getCSSStyleForClassname, getClassForObjectType, getColorFamilies, getCuratedColorGrid, getDefaultStylesForItem, getRandomInt, getStyleName, getStylesForItem, getUUID$1 as getUUID, hexForTailwindClass, hexToRgb, hslToRgb, isHexColor, isObject, mock, mockText, normalizeHex, objectTypes, rgbToHex, rgbToHsl, shades, slackEmojiForName, styleClassNames, tailwindHeightFractions, themeObjects, themeVariants, useLazyEnrichment, useSidebar, useThemePreview, withRouter };
10695
11162
  //# sourceMappingURL=index.js.map