@datatechsolutions/ui 2.7.121 → 2.7.122

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.
@@ -8000,7 +8000,16 @@ function CookieConsent({
8000
8000
  }
8001
8001
  ) });
8002
8002
  }
8003
- function getDockAccent(id) {
8003
+ function accentFromRgb(rgb) {
8004
+ return {
8005
+ icon: `text-[rgb(${rgb})]`,
8006
+ bg: `bg-[rgba(${rgb},0.12)] dark:bg-[rgba(${rgb},0.2)]`,
8007
+ dot: `bg-[rgb(${rgb})]`,
8008
+ rgb
8009
+ };
8010
+ }
8011
+ function getDockAccent(id, accentRgb) {
8012
+ if (accentRgb) return accentFromRgb(accentRgb);
8004
8013
  if (id === "stations") {
8005
8014
  return { icon: "text-blue-600 dark:text-blue-400", bg: "bg-blue-100 dark:bg-blue-900/35", dot: "bg-blue-500 dark:bg-blue-400", rgb: "59, 130, 246" };
8006
8015
  }
@@ -8148,7 +8157,7 @@ function Dock({
8148
8157
  children: [
8149
8158
  navigationActions.map((action, index) => {
8150
8159
  const hasMenu = !!action.menuItems?.length;
8151
- const accent = getDockAccent(action.id);
8160
+ const accent = getDockAccent(action.id, action.accentRgb);
8152
8161
  const FlyoutIcon = action.icon;
8153
8162
  const dockItem = /* @__PURE__ */ jsxRuntime.jsx(
8154
8163
  DockItem,
@@ -8220,7 +8229,7 @@ function Dock({
8220
8229
  contextualActions.map((action, actionIndex) => {
8221
8230
  const index = navigationActions.length + actionIndex;
8222
8231
  const hasMenu = !!action.menuItems?.length;
8223
- const accent = getDockAccent(action.id);
8232
+ const accent = getDockAccent(action.id, action.accentRgb);
8224
8233
  const FlyoutIcon = action.icon;
8225
8234
  const dockItem = /* @__PURE__ */ jsxRuntime.jsx(
8226
8235
  DockItem,
@@ -8306,7 +8315,7 @@ var DockItem = React11.memo(function DockItem2({
8306
8315
  compact = false
8307
8316
  }) {
8308
8317
  const Icon = action.icon;
8309
- const accent = getDockAccent(action.id);
8318
+ const accent = getDockAccent(action.id, action.accentRgb);
8310
8319
  const activeIndex = hoveredIndex ?? focusedIndex;
8311
8320
  const isSelected = !!action.active;
8312
8321
  const isInteractiveActive = activeIndex === index;
@@ -14091,7 +14100,8 @@ function buildDockActions(items, pathname, handlers, options = {}) {
14091
14100
  href: item.href,
14092
14101
  active: isActive(item.href),
14093
14102
  onClick: item.onClick ?? (() => handlers.navigate(item.href)),
14094
- menuItems
14103
+ menuItems,
14104
+ accentRgb: item.accentRgb
14095
14105
  });
14096
14106
  }
14097
14107
  const contextualActions = [...contextualItems];
@@ -15141,5 +15151,5 @@ exports.useGeoMapState = useGeoMapState;
15141
15151
  exports.useNotifications = useNotifications;
15142
15152
  exports.usePlatformShellStore = usePlatformShellStore;
15143
15153
  exports.usePullToRefresh = usePullToRefresh;
15144
- //# sourceMappingURL=chunk-DOOTVMMR.js.map
15145
- //# sourceMappingURL=chunk-DOOTVMMR.js.map
15154
+ //# sourceMappingURL=chunk-AE2BJPQH.js.map
15155
+ //# sourceMappingURL=chunk-AE2BJPQH.js.map