@trops/dash-core 0.1.683 → 0.1.684

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
@@ -19771,6 +19771,18 @@ var WidgetCardStatusBar = function WidgetCardStatusBar(_ref) {
19771
19771
  _useState4 = _slicedToArray(_useState3, 2),
19772
19772
  now = _useState4[0],
19773
19773
  setNow = _useState4[1];
19774
+ // Theme tokens + light/dark status colors so the strip follows the
19775
+ // active theme (hardcoded grays rendered dark-only).
19776
+ var _useContext = React.useContext(DashReact.ThemeContext),
19777
+ currentTheme = _useContext.currentTheme;
19778
+ var statusTokens = DashReact.useStatusTokens();
19779
+ var t = function t(key) {
19780
+ return (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme[key]) || "";
19781
+ };
19782
+ // The strip renders as a sibling below the widget's Panel, so it takes
19783
+ // the Panel's corner radius and sits slightly apart from it rather
19784
+ // than butting a square edge against the rounded card.
19785
+ var panelRadius = DashReact.getStylesForItem(DashReact.themeObjects.PANEL, currentTheme, {}).borderRadius || "rounded-lg";
19774
19786
 
19775
19787
  // Check if widget declares scheduledTasks in its config
19776
19788
  var widgetConfig = item !== null && item !== void 0 && item.component ? ComponentManager.config(item.component, item) : null;
@@ -19837,27 +19849,28 @@ var WidgetCardStatusBar = function WidgetCardStatusBar(_ref) {
19837
19849
  summaryText = "".concat(tasks.length, " timers \xB7 next in ").concat(formatCountdown(soonestMs));
19838
19850
  }
19839
19851
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
19840
- className: "border-t border-gray-700/50 bg-gray-900/30 select-none ".concat(className),
19852
+ className: "mt-1 border ".concat(panelRadius, " overflow-hidden ").concat(t("border-primary-dark"), " ").concat(t("bg-primary-dark"), " select-none ").concat(className),
19841
19853
  children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
19842
19854
  type: "button",
19843
19855
  onClick: function onClick() {
19844
19856
  return setExpanded(!expanded);
19845
19857
  },
19846
- className: "flex items-center w-full px-3 py-1 text-xs gap-2 cursor-pointer transition-colors hover:bg-gray-800/40 ".concat(allPaused ? "text-gray-500" : "text-blue-400"),
19858
+ className: "flex items-center w-full px-3 py-1 text-xs gap-2 cursor-pointer transition-colors ".concat(t("hover-bg-primary-dark"), " ").concat(allPaused ? "".concat(t("text-primary-medium"), " opacity-60") : t("text-secondary-medium")),
19847
19859
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
19848
19860
  icon: "clock",
19849
- className: "text-[10px] shrink-0"
19861
+ className: "text-xs shrink-0"
19850
19862
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
19851
19863
  className: "truncate flex-1 text-left",
19852
19864
  children: summaryText
19853
19865
  }), /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
19854
19866
  icon: expanded ? "chevron-up" : "chevron-down",
19855
- className: "text-[10px] text-gray-500 shrink-0"
19867
+ className: "text-xs opacity-60 shrink-0"
19856
19868
  })]
19857
19869
  }), expanded && /*#__PURE__*/jsxRuntime.jsxs("div", {
19858
19870
  className: "px-3 pb-2 pt-1 space-y-2",
19859
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
19860
- className: "text-[10px] font-semibold text-gray-400 uppercase tracking-wider",
19871
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Caption2, {
19872
+ block: true,
19873
+ className: "font-semibold uppercase tracking-wider",
19861
19874
  children: "Scheduled Tasks"
19862
19875
  }), tasks.map(function (task) {
19863
19876
  var remaining = task.enabled && task.nextFireAt ? task.nextFireAt - now : null;
@@ -19869,39 +19882,40 @@ var WidgetCardStatusBar = function WidgetCardStatusBar(_ref) {
19869
19882
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
19870
19883
  className: "flex items-center gap-1.5",
19871
19884
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
19872
- className: "inline-block w-1.5 h-1.5 rounded-full ".concat(task.enabled ? "bg-green-500" : "bg-gray-600")
19885
+ className: "inline-block w-1.5 h-1.5 rounded-full ".concat(task.enabled ? statusTokens.success.solidBg : t("bg-primary-medium"))
19873
19886
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
19874
- className: task.enabled ? "text-gray-200" : "text-gray-500",
19887
+ className: "".concat(t("text-primary-medium"), " ").concat(task.enabled ? "" : "opacity-60"),
19875
19888
  children: task.displayName || task.taskKey
19876
- }), !task.enabled && /*#__PURE__*/jsxRuntime.jsx("span", {
19877
- className: "text-gray-600 text-[10px]",
19889
+ }), !task.enabled && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption2, {
19890
+ className: "opacity-70",
19878
19891
  children: "(paused)"
19879
19892
  })]
19880
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
19881
- className: "text-gray-500 text-[10px]",
19893
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption2, {
19882
19894
  children: formatScheduleDescription(task)
19883
19895
  })]
19884
- }), task.enabled && /*#__PURE__*/jsxRuntime.jsxs("div", {
19885
- className: "text-[10px] text-gray-500 pl-4 flex items-center gap-1.5",
19896
+ }), task.enabled && /*#__PURE__*/jsxRuntime.jsxs(DashReact.Caption2, {
19897
+ block: true,
19898
+ className: "pl-4 flex items-center gap-1.5",
19886
19899
  children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
19887
19900
  children: ["Next in ", formatCountdown(remaining)]
19888
19901
  }), lastFiredText && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
19889
19902
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
19890
- className: "text-gray-700",
19903
+ className: "opacity-50",
19891
19904
  children: "\xB7"
19892
19905
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
19893
19906
  children: ["Last: ", lastFiredText]
19894
19907
  })]
19895
19908
  }), task.fireCount > 0 && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
19896
19909
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
19897
- className: "text-gray-700",
19910
+ className: "opacity-50",
19898
19911
  children: "\xB7"
19899
19912
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
19900
19913
  children: ["#", task.fireCount]
19901
19914
  })]
19902
19915
  })]
19903
- }), !task.enabled && /*#__PURE__*/jsxRuntime.jsx("div", {
19904
- className: "text-[10px] text-gray-600 pl-4",
19916
+ }), !task.enabled && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption2, {
19917
+ block: true,
19918
+ className: "pl-4 opacity-70",
19905
19919
  children: formatScheduleDescription(task)
19906
19920
  })]
19907
19921
  }, task.taskId);