@almadar/ui 6.51.2 → 6.52.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.
Files changed (121) hide show
  1. package/dist/{Canvas3DHost-CLC_jXh_.d.ts → Canvas3DHost-CWO0tswb.d.ts} +1 -1
  2. package/dist/{FileTree-RKQqRhIM.d.ts → FileTree-DUi7e7Z8.d.ts} +5 -5
  3. package/dist/{GameAudioProvider-BgWLggIy.d.ts → GameAudioProvider-_hPzjqp-.d.ts} +1 -1
  4. package/dist/{NavStackContext-B-XLULCO.d.ts → NavStackContext-04NLdXsY.d.ts} +8 -0
  5. package/dist/Typography-7FRZOS2H.js +5 -0
  6. package/dist/{UISlotContext-DNM8iXna.d.ts → UISlotContext-CS487Uoc.d.ts} +1 -1
  7. package/dist/{UISlotRenderer-7UYHFW4S.js → UISlotRenderer-CR7SCAMR.js} +8 -8
  8. package/dist/avl/index.cjs +3401 -1590
  9. package/dist/avl/index.d.ts +4 -4
  10. package/dist/avl/index.js +26 -23
  11. package/dist/{chunk-6CFYRP4S.js → chunk-2QB2PXOO.js} +1 -3
  12. package/dist/{chunk-R4V7IZQP.js → chunk-5GCI6C7J.js} +2 -2
  13. package/dist/{chunk-BUEIZY54.js → chunk-BHZG4PDZ.js} +420 -422
  14. package/dist/{chunk-MWPX2O4M.js → chunk-CLSLVFSP.js} +3 -16
  15. package/dist/{chunk-GIPZSCND.js → chunk-EERAGPBW.js} +3078 -1832
  16. package/dist/{chunk-OLZ3EEML.js → chunk-G4GMXYMY.js} +109 -15
  17. package/dist/{chunk-HQDKHLFG.js → chunk-IN3BVW2Z.js} +15 -1
  18. package/dist/{chunk-FGHRVJCI.js → chunk-MSBMVG3B.js} +12 -2
  19. package/dist/{chunk-YKHNK5JH.js → chunk-NCNP2RKZ.js} +11 -4
  20. package/dist/{chunk-T7IH5ABO.js → chunk-QWDKMVLX.js} +69 -17
  21. package/dist/{chunk-NTO555KF.js → chunk-TWHYH25Q.js} +136 -15
  22. package/dist/{chunk-GHXWGQTX.js → chunk-V5AGW2JN.js} +1 -1
  23. package/dist/{chunk-L55SAFKL.js → chunk-WB2A6V3I.js} +31 -1
  24. package/dist/{chunk-JXUYEO7U.js → chunk-XUSSAWKL.js} +7 -1
  25. package/dist/{cn-CO-0rolG.d.ts → cn-ClXGlIOY.d.ts} +2 -2
  26. package/dist/components/index.cjs +4933 -3165
  27. package/dist/components/index.d.ts +499 -416
  28. package/dist/components/index.js +11 -11
  29. package/dist/context/index.cjs +12 -4
  30. package/dist/context/index.d.ts +3 -3
  31. package/dist/context/index.js +2 -2
  32. package/dist/hooks/index.cjs +73 -6
  33. package/dist/hooks/index.d.ts +32 -7
  34. package/dist/hooks/index.js +6 -6
  35. package/dist/lib/drawable/three/index.cjs +33 -2
  36. package/dist/lib/drawable/three/index.d.ts +5 -5
  37. package/dist/lib/drawable/three/index.js +7 -7
  38. package/dist/lib/index.cjs +69 -2
  39. package/dist/lib/index.d.ts +29 -6
  40. package/dist/lib/index.js +5 -5
  41. package/dist/locales/index.cjs +93 -3
  42. package/dist/locales/index.js +63 -3
  43. package/dist/{paintDispatch-CMgOyVjS.d.ts → paintDispatch-DHo3WhaU.d.ts} +4 -4
  44. package/dist/providers/index.cjs +3392 -1607
  45. package/dist/providers/index.d.ts +6 -6
  46. package/dist/providers/index.js +55 -16
  47. package/dist/runtime/index.cjs +3417 -1611
  48. package/dist/runtime/index.d.ts +2 -2
  49. package/dist/runtime/index.js +10 -10
  50. package/dist/ssr/index.cjs +306 -141
  51. package/dist/ssr/index.d.cts +32 -44
  52. package/dist/ssr/index.d.ts +32 -44
  53. package/dist/ssr/index.js +249 -84
  54. package/dist/{themeTokens-CN9WCXQc.d.ts → themeTokens-Ccu7EmGY.d.ts} +4 -2
  55. package/dist/{useUISlots-CwUWM1ra.d.ts → useUISlots-1dk2TR4j.d.ts} +1 -9
  56. package/dist/{verificationRegistry-DBHfOR9y.d.ts → verificationRegistry-BYD3cVhS.d.ts} +1 -1
  57. package/locales/ar.json +31 -1
  58. package/locales/en.json +31 -1
  59. package/locales/sl.json +31 -1
  60. package/package.json +12 -9
  61. package/tailwind-preset.cjs +24 -1
  62. package/themes/_base.css +86 -0
  63. package/themes/_contract.md +1 -0
  64. package/themes/almadar-website.css +2 -0
  65. package/themes/almadar.css +2 -0
  66. package/themes/aqua.css +5 -3
  67. package/themes/arabesque.css +9 -7
  68. package/themes/art-deco.css +5 -3
  69. package/themes/art-nouveau.css +4 -0
  70. package/themes/atelier.css +10 -8
  71. package/themes/bauhaus.css +2 -0
  72. package/themes/bloomberg-dense.css +13 -11
  73. package/themes/blueprint.css +2 -0
  74. package/themes/clay.css +2 -0
  75. package/themes/comic.css +12 -10
  76. package/themes/constructivist.css +2 -0
  77. package/themes/corporate.css +4 -2
  78. package/themes/cyberpunk.css +2 -0
  79. package/themes/frutiger-aero.css +2 -0
  80. package/themes/game-adventure.css +1 -0
  81. package/themes/game-rpg.css +1 -0
  82. package/themes/game-sci-fi.css +1 -0
  83. package/themes/game-ui-pack.css +1 -0
  84. package/themes/gazette.css +10 -8
  85. package/themes/glass.css +17 -15
  86. package/themes/gothic.css +2 -0
  87. package/themes/ink-wash.css +2 -0
  88. package/themes/kawaii.css +2 -0
  89. package/themes/kiosk.css +17 -15
  90. package/themes/linear-clean.css +12 -10
  91. package/themes/luxury.css +2 -0
  92. package/themes/mac-classic.css +2 -0
  93. package/themes/material.css +2 -0
  94. package/themes/memphis.css +2 -0
  95. package/themes/mid-century.css +2 -0
  96. package/themes/minimalist.css +2 -0
  97. package/themes/mudcloth.css +2 -0
  98. package/themes/neon.css +2 -0
  99. package/themes/neumorphic.css +2 -0
  100. package/themes/newsprint.css +2 -0
  101. package/themes/notion-editorial.css +12 -10
  102. package/themes/pixel.css +2 -0
  103. package/themes/prism.css +20 -18
  104. package/themes/retro.css +2 -0
  105. package/themes/risograph.css +2 -0
  106. package/themes/scandi.css +2 -0
  107. package/themes/sketch.css +2 -0
  108. package/themes/solarpunk.css +2 -0
  109. package/themes/steampunk.css +2 -0
  110. package/themes/swiss.css +2 -0
  111. package/themes/terminal.css +8 -6
  112. package/themes/trait-wars.css +2 -0
  113. package/themes/ukiyo-e.css +2 -0
  114. package/themes/vaporwave.css +2 -0
  115. package/themes/victorian.css +2 -0
  116. package/themes/wabi-sabi.css +2 -0
  117. package/themes/win95.css +2 -0
  118. package/themes/wireframe.css +2 -0
  119. package/themes/zine.css +2 -0
  120. package/dist/Typography-2Z3JKWHN.js +0 -5
  121. package/dist/{avl-3d-context-MAt_NuU9.d.ts → avl-3d-context-DLteNEwu.d.ts} +3 -3
package/dist/ssr/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as React15 from 'react';
2
- import React15__default, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useSyncExternalStore, useLayoutEffect, useId } from 'react';
1
+ import * as React16 from 'react';
2
+ import React16__default, { createContext, useCallback, useState, useRef, useEffect, useContext, useMemo, useSyncExternalStore, useLayoutEffect, useId } from 'react';
3
3
  import { createLogger } from '@almadar/logger';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import * as LucideIcons2 from 'lucide-react';
@@ -2862,7 +2862,7 @@ var positionStyles = {
2862
2862
  fixed: "fixed",
2863
2863
  sticky: "sticky"
2864
2864
  };
2865
- var Box = React15__default.forwardRef(
2865
+ var Box = React16__default.forwardRef(
2866
2866
  ({
2867
2867
  padding,
2868
2868
  paddingX,
@@ -2931,7 +2931,7 @@ var Box = React15__default.forwardRef(
2931
2931
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
2932
2932
  const isClickable = action || onClick;
2933
2933
  const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
2934
- return React15__default.createElement(
2934
+ return React16__default.createElement(
2935
2935
  Component,
2936
2936
  {
2937
2937
  ref,
@@ -2970,10 +2970,11 @@ var Box = React15__default.forwardRef(
2970
2970
  Box.displayName = "Box";
2971
2971
 
2972
2972
  // lib/domPassthrough.ts
2973
+ var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set(["role", "id", "lang", "dir", "tabIndex"]);
2973
2974
  function domPassthrough(props) {
2974
2975
  const out = {};
2975
2976
  for (const [key, value] of Object.entries(props)) {
2976
- if (key.startsWith("aria-") || key.startsWith("data-") || key === "role" || key === "id") {
2977
+ if (key.startsWith("aria-") || key.startsWith("data-") || GLOBAL_ATTRIBUTES.has(key)) {
2977
2978
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === void 0) {
2978
2979
  out[key] = value;
2979
2980
  }
@@ -3035,7 +3036,7 @@ var Stack = ({
3035
3036
  };
3036
3037
  const isHorizontal = direction === "horizontal";
3037
3038
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3038
- return React15__default.createElement(
3039
+ return React16__default.createElement(
3039
3040
  Component,
3040
3041
  {
3041
3042
  ...domPassthrough(rest),
@@ -4214,7 +4215,37 @@ var en_default = {
4214
4215
  "flowCanvas.presetSize": "{{label}} ({{width}}px)",
4215
4216
  "avl.breadcrumb.transitionNumber": "Transition #{{n}}",
4216
4217
  "orbInspector.pattern": "Pattern",
4217
- "orbInspector.slotLabel": "slot: {{slot}}"
4218
+ "orbInspector.slotLabel": "slot: {{slot}}",
4219
+ "detailPanel.section.activity": "Activity",
4220
+ "detailPanel.section.lineItems": "Line items",
4221
+ "detailPanel.tab.overview": "Overview",
4222
+ "detailPanel.thread.empty": "No messages yet",
4223
+ "detailPanel.openImage": "Open image",
4224
+ "detailPanel.showImage": "Show image {{index}}",
4225
+ "aria.clearSelection": "Clear selection",
4226
+ "aria.searchOptions": "Search options",
4227
+ "aria.zoomIn": "Zoom in",
4228
+ "aria.zoomOut": "Zoom out",
4229
+ "aria.previousPage": "Previous page",
4230
+ "aria.nextPage": "Next page",
4231
+ "aria.downloadDocument": "Download document",
4232
+ "aria.printDocument": "Print document",
4233
+ "aria.wrapLines": "Wrap lines",
4234
+ "aria.copyCode": "Copy code",
4235
+ "aria.clearInput": "Clear input",
4236
+ "aria.skipToContent": "Skip to content",
4237
+ "aria.mainNavigation": "Main navigation",
4238
+ "aria.carouselSlides": "Slides",
4239
+ "aria.minimap": "Minimap",
4240
+ "aria.canvasScene": "Game scene",
4241
+ "aria.learningCanvas": "Interactive diagram",
4242
+ "aria.scene3d": "3D scene",
4243
+ "aria.graphCanvas": "Graph",
4244
+ "aria.positionedCanvas": "Floor plan",
4245
+ "aria.walkTraitDone": "completed",
4246
+ "aria.walkTraitPending": "pending",
4247
+ "aria.walkGraph": "State graph for {{trait}}: {{from}} to {{to}}",
4248
+ "aria.loading": "Loading"
4218
4249
  };
4219
4250
 
4220
4251
  // lib/format.ts
@@ -4292,7 +4323,6 @@ var I18nContext = createContext({
4292
4323
  }
4293
4324
  });
4294
4325
  I18nContext.displayName = "I18nContext";
4295
- I18nContext.Provider;
4296
4326
  function useTranslate() {
4297
4327
  return useContext(I18nContext);
4298
4328
  }
@@ -4404,7 +4434,7 @@ var Typography = ({
4404
4434
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4405
4435
  body = formatValue(body, format, fmt);
4406
4436
  }
4407
- return React15__default.createElement(
4437
+ return React16__default.createElement(
4408
4438
  Component,
4409
4439
  {
4410
4440
  ...domPassthrough(rest),
@@ -4436,6 +4466,50 @@ var Typography = ({
4436
4466
  );
4437
4467
  };
4438
4468
  Typography.displayName = "Typography";
4469
+ var counts = /* @__PURE__ */ new Map();
4470
+ var keyListeners = /* @__PURE__ */ new Map();
4471
+ var seq = 0;
4472
+ function newPendingKey() {
4473
+ seq += 1;
4474
+ return `pending-${seq}`;
4475
+ }
4476
+ function isPending(key) {
4477
+ return (counts.get(key) ?? 0) > 0;
4478
+ }
4479
+ function subscribePending(key, cb) {
4480
+ let set = keyListeners.get(key);
4481
+ if (!set) {
4482
+ set = /* @__PURE__ */ new Set();
4483
+ keyListeners.set(key, set);
4484
+ }
4485
+ set.add(cb);
4486
+ return () => {
4487
+ set?.delete(cb);
4488
+ if (set && set.size === 0) keyListeners.delete(key);
4489
+ };
4490
+ }
4491
+ var PendingScopeContext = createContext(null);
4492
+ function usePendingAction() {
4493
+ const scope = useContext(PendingScopeContext);
4494
+ const [key, setKey] = useState(null);
4495
+ const pending = useSyncExternalStore(
4496
+ useCallback((cb) => key ? subscribePending(key, cb) : () => {
4497
+ }, [key]),
4498
+ () => key ? isPending(key) : false,
4499
+ () => false
4500
+ );
4501
+ useEffect(() => {
4502
+ if (key && !pending) setKey(null);
4503
+ }, [key, pending]);
4504
+ const activate = useCallback((emit) => {
4505
+ const k = newPendingKey();
4506
+ emit(k);
4507
+ if (!isPending(k)) return;
4508
+ scope?.track(k);
4509
+ setKey(k);
4510
+ }, [scope]);
4511
+ return { pending, activate };
4512
+ }
4439
4513
  var DEFAULT_FAMILY = "lucide";
4440
4514
  var VALID_FAMILIES = [DEFAULT_FAMILY];
4441
4515
  function themeIconFamily() {
@@ -4566,7 +4640,7 @@ function resolveLucide(name) {
4566
4640
  }
4567
4641
  function makeLucideAdapter(name) {
4568
4642
  const LucideComp = resolveLucide(name);
4569
- const Adapter = React15__default.forwardRef((props, ref) => /* @__PURE__ */ jsx(
4643
+ const Adapter = React16__default.forwardRef((props, ref) => /* @__PURE__ */ jsx(
4570
4644
  LucideComp,
4571
4645
  {
4572
4646
  ref,
@@ -4647,15 +4721,16 @@ var Icon = ({
4647
4721
  animation = "none",
4648
4722
  className,
4649
4723
  strokeWidth,
4650
- style
4724
+ style,
4725
+ ...rest
4651
4726
  }) => {
4652
4727
  const directIcon = typeof icon === "string" ? void 0 : icon;
4653
4728
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
4654
4729
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
4655
4730
  const family = useIconFamily();
4656
- const svgRef = React15__default.useRef(null);
4731
+ const svgRef = React16__default.useRef(null);
4657
4732
  const themeStroke = useThemeIconStrokeApplies(svgRef);
4658
- const RenderedComponent = React15__default.useMemo(() => {
4733
+ const RenderedComponent = React16__default.useMemo(() => {
4659
4734
  if (directIcon) return null;
4660
4735
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
4661
4736
  }, [directIcon, effectiveName, family]);
@@ -4678,7 +4753,8 @@ var Icon = ({
4678
4753
  ref: svgRef,
4679
4754
  className: composedClassName,
4680
4755
  strokeWidth: effectiveStrokeWidth,
4681
- style: inlineStyle
4756
+ style: inlineStyle,
4757
+ ...domPassthrough(rest)
4682
4758
  }
4683
4759
  );
4684
4760
  }
@@ -4689,7 +4765,8 @@ var Icon = ({
4689
4765
  ref: svgRef,
4690
4766
  className: composedClassName,
4691
4767
  strokeWidth: effectiveStrokeWidth,
4692
- style: inlineStyle
4768
+ style: inlineStyle,
4769
+ ...domPassthrough(rest)
4693
4770
  }
4694
4771
  );
4695
4772
  }
@@ -4700,7 +4777,8 @@ var Icon = ({
4700
4777
  ref: svgRef,
4701
4778
  className: composedClassName,
4702
4779
  strokeWidth: effectiveStrokeWidth,
4703
- style: inlineStyle
4780
+ style: inlineStyle,
4781
+ ...domPassthrough(rest)
4704
4782
  }
4705
4783
  );
4706
4784
  };
@@ -4791,15 +4869,16 @@ function AtlasImage({
4791
4869
  alt,
4792
4870
  className,
4793
4871
  style,
4794
- "aria-hidden": ariaHidden
4872
+ "aria-hidden": ariaHidden,
4873
+ ...rest
4795
4874
  }) {
4796
- const [, bump] = React15.useReducer((x) => x + 1, 0);
4797
- const canvasRef = React15.useRef(null);
4875
+ const [, bump] = React16.useReducer((x) => x + 1, 0);
4876
+ const canvasRef = React16.useRef(null);
4798
4877
  const sliced = isAtlasAsset(asset);
4799
4878
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
4800
4879
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
4801
4880
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
4802
- React15.useEffect(() => {
4881
+ React16.useEffect(() => {
4803
4882
  const canvas = canvasRef.current;
4804
4883
  if (!canvas || !img || !rect) return;
4805
4884
  canvas.width = rect.sw;
@@ -4832,6 +4911,7 @@ function AtlasImage({
4832
4911
  role: ariaHidden ? void 0 : "img",
4833
4912
  "aria-hidden": ariaHidden,
4834
4913
  "aria-label": ariaHidden ? void 0 : alt ?? asset.name ?? asset.category ?? "",
4914
+ ...domPassthrough(rest),
4835
4915
  className: cn("flex-shrink-0", className),
4836
4916
  style: boxStyle
4837
4917
  }
@@ -4843,6 +4923,7 @@ function AtlasImage({
4843
4923
  src: asset.url,
4844
4924
  alt: alt ?? asset.name ?? asset.category ?? "",
4845
4925
  "aria-hidden": ariaHidden,
4926
+ ...domPassthrough(rest),
4846
4927
  ...typeof w === "number" ? { width: w } : {},
4847
4928
  ...typeof h === "number" ? { height: h } : {},
4848
4929
  className: cn("flex-shrink-0", className),
@@ -4859,7 +4940,8 @@ var INERT_API = {
4859
4940
  beginNavigate: () => void 0,
4860
4941
  back: () => void 0,
4861
4942
  goTo: () => void 0,
4862
- setCurrentLabel: () => void 0
4943
+ setCurrentLabel: () => void 0,
4944
+ registerNavItems: () => void 0
4863
4945
  };
4864
4946
  var NavStackContext = createContext(INERT_API);
4865
4947
  function isInertNavStack(api) {
@@ -4875,7 +4957,9 @@ function isAbsoluteHref(href) {
4875
4957
  }
4876
4958
  function followHref(href, navStack) {
4877
4959
  if (href.startsWith("#")) {
4878
- document.getElementById(decodeURIComponent(href.slice(1)))?.scrollIntoView({ behavior: "smooth" });
4960
+ const target = document.getElementById(decodeURIComponent(href.slice(1)));
4961
+ target?.scrollIntoView({ behavior: "smooth" });
4962
+ target?.focus({ preventScroll: true });
4879
4963
  } else if (isAbsoluteHref(href) || isInertNavStack(navStack)) {
4880
4964
  window.location.assign(href);
4881
4965
  } else {
@@ -4959,7 +5043,7 @@ function resolveIconProp(value, sizeClass) {
4959
5043
  const IconComp = value;
4960
5044
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
4961
5045
  }
4962
- if (React15__default.isValidElement(value)) {
5046
+ if (React16__default.isValidElement(value)) {
4963
5047
  return value;
4964
5048
  }
4965
5049
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -4968,7 +5052,7 @@ function resolveIconProp(value, sizeClass) {
4968
5052
  }
4969
5053
  return value;
4970
5054
  }
4971
- var Button = React15__default.forwardRef(
5055
+ var Button = React16__default.forwardRef(
4972
5056
  ({
4973
5057
  className,
4974
5058
  variant = "primary",
@@ -4986,22 +5070,42 @@ var Button = React15__default.forwardRef(
4986
5070
  href,
4987
5071
  children,
4988
5072
  onClick,
5073
+ onFocus,
5074
+ onBlur,
4989
5075
  "data-testid": dataTestId,
4990
5076
  ...props
4991
5077
  }, ref) => {
4992
5078
  const eventBus = useEventBus();
4993
5079
  const navStack = useNavStack();
5080
+ const { pending, activate } = usePendingAction();
5081
+ const busy = isLoading || pending;
5082
+ const [focused, setFocused] = React16__default.useState(false);
5083
+ const inert = Boolean(disabled) || busy;
5084
+ const emitAction = () => {
5085
+ if (!action) return;
5086
+ activate((pendingKey) => eventBus.emit(`UI:${action}`, actionPayload ?? {}, { pendingKey }));
5087
+ };
4994
5088
  const leftIconValue = leftIcon || iconProp;
4995
5089
  const rightIconValue = rightIcon || iconRightProp;
4996
5090
  const px = size === "sm" ? 16 : size === "lg" ? 20 : 16;
4997
5091
  const resolvedLeftIcon = iconAsset?.url ? /* @__PURE__ */ jsx(AtlasImage, { asset: iconAsset, size: px, alt: iconAsset.name ?? iconAsset.category ?? "", className: "flex-shrink-0" }) : resolveIconProp(leftIconValue, iconSizeStyles[size]);
4998
5092
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
4999
5093
  const handleClick = (e) => {
5000
- if (action) {
5001
- eventBus.emit(`UI:${action}`, actionPayload ?? {});
5094
+ if (inert) {
5095
+ e.preventDefault();
5096
+ return;
5002
5097
  }
5098
+ emitAction();
5003
5099
  onClick?.(e);
5004
5100
  };
5101
+ const handleFocus = (e) => {
5102
+ setFocused(true);
5103
+ onFocus?.(e);
5104
+ };
5105
+ const handleBlur = (e) => {
5106
+ setFocused(false);
5107
+ onBlur?.(e);
5108
+ };
5005
5109
  const classes = cn(
5006
5110
  "relative inline-flex items-center justify-center gap-2",
5007
5111
  "font-medium",
@@ -5013,23 +5117,26 @@ var Button = React15__default.forwardRef(
5013
5117
  "disabled:opacity-50 disabled:cursor-not-allowed",
5014
5118
  variantStyles2[variant],
5015
5119
  variant === "link" ? "h-auto px-0 text-sm" : sizeStyles[size],
5120
+ busy && "cursor-progress",
5121
+ disabled && focused && "opacity-50 cursor-not-allowed",
5016
5122
  className
5017
5123
  );
5018
5124
  const testId = dataTestId ?? (action ? `action-${action}` : void 0);
5019
5125
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
5020
- isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
5021
- (Array.isArray(children) ? children.length > 0 : Boolean(children)) ? children : label ? /* @__PURE__ */ jsx("span", { ...{ [INLINE_TEXT_ATTR]: "label" }, children: label }) : label,
5022
- resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
5126
+ busy && /* @__PURE__ */ jsx("span", { className: "almadar-busy-indicator absolute inset-0 flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) }),
5127
+ /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center justify-center gap-2", busy && "almadar-busy-content"), children: [
5128
+ resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
5129
+ (Array.isArray(children) ? children.length > 0 : Boolean(children)) ? children : label ? /* @__PURE__ */ jsx("span", { ...{ [INLINE_TEXT_ATTR]: "label" }, children: label }) : label,
5130
+ resolvedRightIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
5131
+ ] })
5023
5132
  ] });
5024
5133
  if (href !== void 0 && href !== "") {
5025
5134
  const handleLinkClick = (e) => {
5026
- if (disabled || isLoading) {
5135
+ if (disabled || busy) {
5027
5136
  e.preventDefault();
5028
5137
  return;
5029
5138
  }
5030
- if (action) {
5031
- eventBus.emit(`UI:${action}`, actionPayload ?? {});
5032
- }
5139
+ emitAction();
5033
5140
  if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
5034
5141
  if (!href.startsWith("#") && isInertNavStack(navStack)) return;
5035
5142
  e.preventDefault();
@@ -5044,7 +5151,8 @@ var Button = React15__default.forwardRef(
5044
5151
  title: props.title,
5045
5152
  style: props.style,
5046
5153
  "aria-label": props["aria-label"],
5047
- "aria-disabled": disabled || isLoading || void 0,
5154
+ "aria-disabled": disabled || busy || void 0,
5155
+ "aria-busy": busy || void 0,
5048
5156
  className: classes,
5049
5157
  onClick: handleLinkClick,
5050
5158
  "data-testid": testId,
@@ -5057,9 +5165,13 @@ var Button = React15__default.forwardRef(
5057
5165
  {
5058
5166
  ref,
5059
5167
  type: "button",
5060
- disabled: disabled || isLoading,
5168
+ disabled: Boolean(disabled) && !focused,
5169
+ "aria-disabled": inert || void 0,
5170
+ "aria-busy": busy || void 0,
5061
5171
  className: classes,
5062
5172
  onClick: handleClick,
5173
+ onFocus: handleFocus,
5174
+ onBlur: handleBlur,
5063
5175
  ...props,
5064
5176
  "data-testid": testId,
5065
5177
  children: content
@@ -5105,8 +5217,8 @@ var sizeStyles2 = {
5105
5217
  md: "px-2.5 py-1 text-sm",
5106
5218
  lg: "px-3 py-1.5 text-base"
5107
5219
  };
5108
- var Badge = React15__default.forwardRef(
5109
- ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
5220
+ var Badge = React16__default.forwardRef(
5221
+ ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, onClick, ...props }, ref) => {
5110
5222
  const { t } = useTranslate();
5111
5223
  const iconSizes = {
5112
5224
  sm: "h-icon-default w-icon-default",
@@ -5117,6 +5229,12 @@ var Badge = React15__default.forwardRef(
5117
5229
  const resolvedIcon = iconAsset?.url ? /* @__PURE__ */ jsx(AtlasImage, { asset: iconAsset, size: iconPx, alt: iconAsset.name ?? iconAsset.category ?? "", className: "flex-shrink-0" }) : typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes[size] }) : icon ? /* @__PURE__ */ jsx(Icon, { icon, className: iconSizes[size] }) : null;
5118
5230
  const hasText = Boolean(children) || amount != null || label !== void 0 && label !== null && label !== "";
5119
5231
  if (!hasText && !resolvedIcon && !onRemove) return null;
5232
+ const text = typeof children === "string" || typeof children === "number" ? String(children) : amount != null ? `${label ? `${label} ` : ""}${amount}` : label !== void 0 && label !== null ? String(label) : "";
5233
+ const removeName = removeLabel ?? `${t("common.remove")}${text ? `: ${text}` : ""}`;
5234
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
5235
+ resolvedIcon,
5236
+ children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label ? /* @__PURE__ */ jsx("span", { ...{ [INLINE_TEXT_ATTR]: "label" }, children: label }) : label)
5237
+ ] });
5120
5238
  return /* @__PURE__ */ jsxs(
5121
5239
  "span",
5122
5240
  {
@@ -5130,13 +5248,20 @@ var Badge = React15__default.forwardRef(
5130
5248
  ),
5131
5249
  ...props,
5132
5250
  children: [
5133
- resolvedIcon,
5134
- children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label ? /* @__PURE__ */ jsx("span", { ...{ [INLINE_TEXT_ATTR]: "label" }, children: label }) : label),
5251
+ onClick ? /* @__PURE__ */ jsx(
5252
+ "button",
5253
+ {
5254
+ type: "button",
5255
+ onClick,
5256
+ className: "inline-flex items-center gap-1 rounded-pill focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
5257
+ children: body
5258
+ }
5259
+ ) : body,
5135
5260
  onRemove ? /* @__PURE__ */ jsx(
5136
5261
  "button",
5137
5262
  {
5138
5263
  type: "button",
5139
- "aria-label": removeLabel ?? t("common.remove"),
5264
+ "aria-label": removeName,
5140
5265
  onClick: (e) => {
5141
5266
  e.stopPropagation();
5142
5267
  onRemove();
@@ -5162,13 +5287,16 @@ var sizeStyles3 = {
5162
5287
  md: "h-6 w-6",
5163
5288
  lg: "h-8 w-8"
5164
5289
  };
5165
- var Spinner = React15__default.forwardRef(
5290
+ var Spinner = React16__default.forwardRef(
5166
5291
  ({ className, size = "md", overlay, ...props }, ref) => {
5292
+ const { t } = useTranslate();
5167
5293
  if (overlay) {
5168
5294
  return /* @__PURE__ */ jsx(
5169
5295
  "div",
5170
5296
  {
5171
5297
  ref,
5298
+ role: "status",
5299
+ "aria-label": t("aria.loading"),
5172
5300
  ...{ [LOADING_STATE_MARKER]: "" },
5173
5301
  className: cn(
5174
5302
  "absolute inset-0 z-10 flex items-center justify-center",
@@ -5184,6 +5312,8 @@ var Spinner = React15__default.forwardRef(
5184
5312
  "div",
5185
5313
  {
5186
5314
  ref,
5315
+ role: "status",
5316
+ "aria-label": t("aria.loading"),
5187
5317
  ...{ [LOADING_STATE_MARKER]: "" },
5188
5318
  className: cn("text-foreground", className),
5189
5319
  ...props,
@@ -5246,7 +5376,7 @@ var lookStyles = {
5246
5376
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
5247
5377
  "tile-image-first": "p-0 overflow-hidden"
5248
5378
  };
5249
- var Card = React15__default.forwardRef(
5379
+ var Card = React16__default.forwardRef(
5250
5380
  ({
5251
5381
  className,
5252
5382
  variant = "bordered",
@@ -5296,9 +5426,9 @@ var Card = React15__default.forwardRef(
5296
5426
  }
5297
5427
  );
5298
5428
  Card.displayName = "Card";
5299
- var CardHeader = React15__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
5429
+ var CardHeader = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
5300
5430
  CardHeader.displayName = "CardHeader";
5301
- var CardTitle = React15__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5431
+ var CardTitle = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5302
5432
  "h3",
5303
5433
  {
5304
5434
  ref,
@@ -5311,11 +5441,11 @@ var CardTitle = React15__default.forwardRef(({ className, ...props }, ref) => /*
5311
5441
  }
5312
5442
  ));
5313
5443
  CardTitle.displayName = "CardTitle";
5314
- var CardContent = React15__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
5444
+ var CardContent = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
5315
5445
  CardContent.displayName = "CardContent";
5316
5446
  var CardBody = CardContent;
5317
5447
  CardBody.displayName = "CardBody";
5318
- var CardFooter = React15__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5448
+ var CardFooter = React16__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5319
5449
  "div",
5320
5450
  {
5321
5451
  ref,
@@ -5333,7 +5463,8 @@ var Divider = ({
5333
5463
  orientation = "horizontal",
5334
5464
  label,
5335
5465
  variant = "solid",
5336
- className
5466
+ className,
5467
+ ...rest
5337
5468
  }) => {
5338
5469
  if (orientation === "vertical") {
5339
5470
  return /* @__PURE__ */ jsx(
@@ -5344,6 +5475,7 @@ var Divider = ({
5344
5475
  variantStyles5[variant],
5345
5476
  className
5346
5477
  ),
5478
+ ...domPassthrough(rest),
5347
5479
  role: "separator",
5348
5480
  "aria-orientation": "vertical"
5349
5481
  }
@@ -5354,8 +5486,9 @@ var Divider = ({
5354
5486
  "div",
5355
5487
  {
5356
5488
  className: cn("flex items-center gap-3 my-4", className),
5489
+ ...domPassthrough(rest),
5357
5490
  role: "separator",
5358
- "aria-label": label,
5491
+ "aria-label": rest["aria-label"] ?? label,
5359
5492
  children: [
5360
5493
  /* @__PURE__ */ jsx(
5361
5494
  "div",
@@ -5388,6 +5521,7 @@ var Divider = ({
5388
5521
  variantStyles5[variant],
5389
5522
  className
5390
5523
  ),
5524
+ ...domPassthrough(rest),
5391
5525
  role: "separator",
5392
5526
  "aria-orientation": "horizontal"
5393
5527
  }
@@ -5404,10 +5538,12 @@ var Center = ({
5404
5538
  className,
5405
5539
  style,
5406
5540
  children,
5407
- as: Component = "div"
5541
+ as: Component = "div",
5542
+ ...rest
5408
5543
  }) => {
5409
5544
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
5410
- return React15__default.createElement(Component, {
5545
+ return React16__default.createElement(Component, {
5546
+ ...domPassthrough(rest),
5411
5547
  className: cn(
5412
5548
  inline ? "inline-flex" : "flex",
5413
5549
  horizontal && "justify-center",
@@ -5439,16 +5575,18 @@ var verticalSizes = {
5439
5575
  var Spacer = ({
5440
5576
  size = "auto",
5441
5577
  axis = "horizontal",
5442
- className
5578
+ className,
5579
+ ...rest
5443
5580
  }) => {
5444
5581
  if (size === "auto") {
5445
- return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), "aria-hidden": "true" });
5582
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...domPassthrough(rest), "aria-hidden": "true" });
5446
5583
  }
5447
5584
  const sizeClass = axis === "horizontal" ? horizontalSizes[size] : verticalSizes[size];
5448
5585
  return /* @__PURE__ */ jsx(
5449
5586
  "div",
5450
5587
  {
5451
5588
  className: cn("flex-shrink-0", sizeClass, className),
5589
+ ...domPassthrough(rest),
5452
5590
  "aria-hidden": "true"
5453
5591
  }
5454
5592
  );
@@ -5506,12 +5644,13 @@ var Avatar = ({
5506
5644
  className,
5507
5645
  onClick,
5508
5646
  action,
5509
- actionPayload
5647
+ actionPayload,
5648
+ ...rest
5510
5649
  }) => {
5511
5650
  const eventBus = useEventBus();
5512
5651
  const { t } = useTranslate();
5513
- const [imgFailed, setImgFailed] = React15__default.useState(false);
5514
- React15__default.useEffect(() => {
5652
+ const [imgFailed, setImgFailed] = React16__default.useState(false);
5653
+ React16__default.useEffect(() => {
5515
5654
  setImgFailed(false);
5516
5655
  }, [src]);
5517
5656
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -5527,7 +5666,7 @@ var Avatar = ({
5527
5666
  onClick?.();
5528
5667
  };
5529
5668
  const press = pressableProps(isClickable ? handleClick : void 0);
5530
- return /* @__PURE__ */ jsxs("div", { className: "relative inline-block", children: [
5669
+ return /* @__PURE__ */ jsxs("div", { className: "relative inline-block", ...domPassthrough(rest), children: [
5531
5670
  /* @__PURE__ */ jsx(
5532
5671
  "div",
5533
5672
  {
@@ -5636,7 +5775,8 @@ var Image2 = ({
5636
5775
  rounded = "md",
5637
5776
  bordered = false,
5638
5777
  loading = "lazy",
5639
- className
5778
+ className,
5779
+ ...rest
5640
5780
  }) => {
5641
5781
  if (!src) return null;
5642
5782
  return /* @__PURE__ */ jsx(
@@ -5644,7 +5784,8 @@ var Image2 = ({
5644
5784
  {
5645
5785
  src,
5646
5786
  alt,
5647
- role: alt === "" ? "presentation" : void 0,
5787
+ ...domPassthrough(rest),
5788
+ role: alt === "" ? "presentation" : rest.role,
5648
5789
  loading,
5649
5790
  decoding: "async",
5650
5791
  className: cn(
@@ -5674,7 +5815,7 @@ var alignToStack = {
5674
5815
  left: "start",
5675
5816
  right: "end"
5676
5817
  };
5677
- var SectionHeader = ({ title, subtitle, align = "center", level = 2, className }) => {
5818
+ var SectionHeader = ({ title, subtitle, align = "center", level = 2, className, ...rest }) => {
5678
5819
  const variant = levelToVariant[level];
5679
5820
  return /* @__PURE__ */ jsxs(
5680
5821
  VStack,
@@ -5682,6 +5823,7 @@ var SectionHeader = ({ title, subtitle, align = "center", level = 2, className }
5682
5823
  gap: "sm",
5683
5824
  align: alignToStack[align],
5684
5825
  className: cn(alignClasses[align], className),
5826
+ ...domPassthrough(rest),
5685
5827
  children: [
5686
5828
  /* @__PURE__ */ jsx(Typography, { variant, weight: "bold", children: title }),
5687
5829
  subtitle ? /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: subtitle }) : null
@@ -5708,7 +5850,8 @@ var FeatureCard = ({
5708
5850
  linkLabel,
5709
5851
  variant = "bordered",
5710
5852
  size = "md",
5711
- className
5853
+ className,
5854
+ ...rest
5712
5855
  }) => {
5713
5856
  const { t } = useTranslate();
5714
5857
  const renderIcon = () => {
@@ -5731,6 +5874,7 @@ var FeatureCard = ({
5731
5874
  return /* @__PURE__ */ jsx(
5732
5875
  Card,
5733
5876
  {
5877
+ ...domPassthrough(rest),
5734
5878
  variant,
5735
5879
  padding: size,
5736
5880
  className: cn(
@@ -5765,6 +5909,14 @@ var gapStyles2 = {
5765
5909
  lg: "gap-6",
5766
5910
  xl: "gap-8"
5767
5911
  };
5912
+ var gapLengths = {
5913
+ none: "0px",
5914
+ xs: "0.25rem",
5915
+ sm: "0.5rem",
5916
+ md: "1rem",
5917
+ lg: "1.5rem",
5918
+ xl: "2rem"
5919
+ };
5768
5920
  var colStyles = {
5769
5921
  1: "grid-cols-1",
5770
5922
  2: "grid-cols-1 sm:grid-cols-2 @max-sm:!grid-cols-1",
@@ -5779,22 +5931,22 @@ var SimpleGrid = ({
5779
5931
  cols,
5780
5932
  gap = "md",
5781
5933
  className,
5782
- children
5934
+ children,
5935
+ ...rest
5783
5936
  }) => {
5937
+ const passthrough = domPassthrough(rest);
5784
5938
  if (cols) {
5785
- return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
5939
+ return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), ...passthrough, children });
5786
5940
  }
5787
5941
  const minWidth = typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth;
5788
- const templateColumns = maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
5942
+ const templateColumns = maxCols ? `repeat(auto-fit, minmax(max(min(${minWidth}, 100%), calc((100% - ${maxCols - 1} * ${gapLengths[gap]}) / ${maxCols})), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
5789
5943
  return /* @__PURE__ */ jsx(
5790
5944
  Box,
5791
5945
  {
5946
+ ...domPassthrough(rest),
5792
5947
  className: cn("grid", gapStyles2[gap], className),
5793
- style: {
5794
- gridTemplateColumns: templateColumns,
5795
- // Limit max columns if specified
5796
- ...maxCols && { maxWidth: `calc(${maxCols} * (${minWidth} + var(--gap, 1rem)))` }
5797
- },
5948
+ style: { gridTemplateColumns: templateColumns },
5949
+ ...passthrough,
5798
5950
  children
5799
5951
  }
5800
5952
  );
@@ -5804,11 +5956,13 @@ var FeatureGrid = ({
5804
5956
  items,
5805
5957
  columns = 3,
5806
5958
  gap = "md",
5807
- className
5959
+ className,
5960
+ ...rest
5808
5961
  }) => {
5809
5962
  return /* @__PURE__ */ jsx(
5810
5963
  SimpleGrid,
5811
5964
  {
5965
+ ...domPassthrough(rest),
5812
5966
  cols: columns,
5813
5967
  gap,
5814
5968
  className: cn(className),
@@ -5848,12 +6002,14 @@ var Container = ({
5848
6002
  center = true,
5849
6003
  className,
5850
6004
  children,
5851
- as: Component = "div"
6005
+ as: Component = "div",
6006
+ ...rest
5852
6007
  }) => {
5853
6008
  const resolvedSize = maxWidth ?? size ?? "lg";
5854
- return React15__default.createElement(
6009
+ return React16__default.createElement(
5855
6010
  Component,
5856
6011
  {
6012
+ ...domPassthrough(rest),
5857
6013
  className: cn(
5858
6014
  "w-full",
5859
6015
  sizeStyles4[resolvedSize],
@@ -5881,7 +6037,8 @@ var Sparkline = ({
5881
6037
  height = 32,
5882
6038
  strokeWidth = 2,
5883
6039
  fill = false,
5884
- className
6040
+ className,
6041
+ ...rest
5885
6042
  }) => {
5886
6043
  if (data.length < 2) return null;
5887
6044
  const pad = 2;
@@ -5902,7 +6059,8 @@ var Sparkline = ({
5902
6059
  height,
5903
6060
  viewBox: `0 0 ${width} ${height}`,
5904
6061
  className: cn("flex-shrink-0", className),
5905
- "aria-hidden": "true",
6062
+ ...domPassthrough(rest),
6063
+ "aria-hidden": rest["aria-hidden"] ?? true,
5906
6064
  children: [
5907
6065
  areaPath && /* @__PURE__ */ jsx("path", { d: areaPath, fill: resolvedColor, opacity: 0.15 }),
5908
6066
  /* @__PURE__ */ jsx(
@@ -5963,7 +6121,8 @@ var StatDisplay = ({
5963
6121
  look = "elevated",
5964
6122
  className,
5965
6123
  isLoading = false,
5966
- error = null
6124
+ error = null,
6125
+ ...rest
5967
6126
  }) => {
5968
6127
  const eventBus = useEventBus();
5969
6128
  const fmt = useFormatContext();
@@ -5985,10 +6144,10 @@ var StatDisplay = ({
5985
6144
  const trendSuffix = trendFormat === "percent" ? "%" : "";
5986
6145
  const trendLabel = showTrend ? `${trendUp ? "\u2191" : "\u2193"} ${trendMagnitude}${trendSuffix}` : "";
5987
6146
  if (error) {
5988
- return /* @__PURE__ */ jsx(Card, { className: cn(padSizes[size], className), children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "error", children: error.message }) });
6147
+ return /* @__PURE__ */ jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "error", children: error.message }) });
5989
6148
  }
5990
6149
  if (isLoading) {
5991
- return /* @__PURE__ */ jsx(Card, { className: cn(padSizes[size], className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "animate-pulse", children: [
6150
+ return /* @__PURE__ */ jsx(Card, { ...domPassthrough(rest), className: cn(padSizes[size], className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "animate-pulse", children: [
5992
6151
  /* @__PURE__ */ jsx(Box, { className: "h-3 bg-muted rounded w-16" }),
5993
6152
  /* @__PURE__ */ jsx(Box, { className: "h-6 bg-muted rounded w-12" })
5994
6153
  ] }) });
@@ -5997,6 +6156,7 @@ var StatDisplay = ({
5997
6156
  return /* @__PURE__ */ jsxs(
5998
6157
  HStack,
5999
6158
  {
6159
+ ...domPassthrough(rest),
6000
6160
  gap: "sm",
6001
6161
  className: cn("items-center", clickEvent && "cursor-pointer hover:opacity-80", className),
6002
6162
  ...pressableProps(clickEvent ? handleClick : void 0),
@@ -6013,6 +6173,7 @@ var StatDisplay = ({
6013
6173
  return /* @__PURE__ */ jsx(
6014
6174
  Card,
6015
6175
  {
6176
+ ...domPassthrough(rest),
6016
6177
  className: cn(padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
6017
6178
  ...pressableProps(clickEvent ? handleClick : void 0),
6018
6179
  children: /* @__PURE__ */ jsxs(HStack, { align: "start", justify: "between", children: [
@@ -6056,12 +6217,14 @@ var colorTokenVars = {
6056
6217
  };
6057
6218
  var GradientDivider = ({
6058
6219
  color,
6059
- className
6220
+ className,
6221
+ ...rest
6060
6222
  }) => {
6061
6223
  const centerColor = color ? color in colorTokenVars ? colorTokenVars[color] : color : "var(--color-primary)";
6062
6224
  return /* @__PURE__ */ jsx(
6063
6225
  Box,
6064
6226
  {
6227
+ ...domPassthrough(rest),
6065
6228
  className: cn("w-full h-px", className),
6066
6229
  style: {
6067
6230
  background: `linear-gradient(to right, transparent, ${centerColor}, transparent)`
@@ -6112,7 +6275,8 @@ var AnimatedCounter = ({
6112
6275
  prefix,
6113
6276
  suffix,
6114
6277
  format,
6115
- className
6278
+ className,
6279
+ ...rest
6116
6280
  }) => {
6117
6281
  const fmt = useFormatContext();
6118
6282
  const ref = useRef(null);
@@ -6164,7 +6328,7 @@ var AnimatedCounter = ({
6164
6328
  };
6165
6329
  }, [visible, target, duration]);
6166
6330
  const text = parsed.num === null ? parsed.suffix : `${prefix ?? ""}${parsed.prefix}${formatNumber(display, format, parsed.decimals, fmt)}${parsed.suffix}${suffix ?? ""}`;
6167
- return /* @__PURE__ */ jsxs(Box, { ref, className: cn("flex flex-col items-center gap-1", className), children: [
6331
+ return /* @__PURE__ */ jsxs(Box, { ...domPassthrough(rest), ref, className: cn("flex flex-col items-center gap-1", className), children: [
6168
6332
  /* @__PURE__ */ jsx(Typography, { variant: "h2", className: "text-primary tabular-nums", children: text }),
6169
6333
  label ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: label }) : null
6170
6334
  ] });
@@ -6190,7 +6354,7 @@ var animatedStyles = {
6190
6354
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6191
6355
  "none": {}
6192
6356
  };
6193
- var AnimatedReveal = React15__default.forwardRef(
6357
+ var AnimatedReveal = React16__default.forwardRef(
6194
6358
  ({
6195
6359
  trigger = "scroll",
6196
6360
  animation = "fade-up",
@@ -6343,7 +6507,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
6343
6507
  el.style.opacity = animate ? "1" : "0";
6344
6508
  });
6345
6509
  }
6346
- var AnimatedGraphic = React15__default.forwardRef(
6510
+ var AnimatedGraphic = React16__default.forwardRef(
6347
6511
  ({
6348
6512
  src,
6349
6513
  svgContent,
@@ -6366,7 +6530,7 @@ var AnimatedGraphic = React15__default.forwardRef(
6366
6530
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6367
6531
  const resolvedSvg = svgContent ?? fetchedSvg;
6368
6532
  const prevAnimateRef = useRef(animate);
6369
- const setRef = React15__default.useCallback(
6533
+ const setRef = React16__default.useCallback(
6370
6534
  (node) => {
6371
6535
  containerRef.current = node;
6372
6536
  if (typeof ref === "function") ref(node);
@@ -6917,10 +7081,11 @@ var PatternTile = ({
6917
7081
  size = 60,
6918
7082
  color = "var(--color-primary)",
6919
7083
  strokeWidth = 0.5,
6920
- className
7084
+ className,
7085
+ ...rest
6921
7086
  }) => {
6922
7087
  const Variant = VARIANT_MAP[variant];
6923
- return /* @__PURE__ */ jsx("g", { className, children: /* @__PURE__ */ jsx(Variant, { size, color, strokeWidth }) });
7088
+ return /* @__PURE__ */ jsx("g", { className, ...domPassthrough(rest), children: /* @__PURE__ */ jsx(Variant, { size, color, strokeWidth }) });
6924
7089
  };
6925
7090
  PatternTile.displayName = "PatternTile";
6926
7091
  function getTileDimensions(variant, size) {