@arbidocs/react 0.5.123 → 0.5.125

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.
@@ -355,6 +355,8 @@ var TooltipContent = React__namespace.forwardRef(
355
355
  }
356
356
  );
357
357
  TooltipContent.displayName = "TooltipContent";
358
+ var PILL_TOUCH_HIT = "pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:h-11 pointer-coarse:after:w-[max(100%,2.75rem)] pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:content-['']";
359
+ var MAIN_AREA_TOUCH_HIT = "relative pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:top-1/2 pointer-coarse:after:h-11 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:content-['']";
358
360
  var EntityPill = React.forwardRef(function EntityPill2({
359
361
  icon,
360
362
  label,
@@ -373,6 +375,7 @@ var EntityPill = React.forwardRef(function EntityPill2({
373
375
  moreContent,
374
376
  href,
375
377
  disabled = false,
378
+ pressed,
376
379
  tooltipContent,
377
380
  "data-testid": testId
378
381
  }, ref) {
@@ -388,7 +391,7 @@ var EntityPill = React.forwardRef(function EntityPill2({
388
391
  "transition-colors",
389
392
  className
390
393
  );
391
- const interactiveClasses = "relative cursor-pointer hover:bg-muted pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']";
394
+ const interactiveClasses = chunkS6A6FSG7_cjs.cn("relative cursor-pointer hover:bg-muted", PILL_TOUCH_HIT);
392
395
  const disabledClasses = "cursor-default opacity-60";
393
396
  const highlightClasses = "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground";
394
397
  const mainContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -434,7 +437,7 @@ var EntityPill = React.forwardRef(function EntityPill2({
434
437
  const mainAreaClass = chunkS6A6FSG7_cjs.cn("inline-flex items-center gap-1", fullWidth && "min-w-0 flex-1");
435
438
  const mainAreaTouchClass = chunkS6A6FSG7_cjs.cn(
436
439
  mainAreaClass,
437
- (onClick || href) && !disabled && "relative pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']"
440
+ (onClick || href) && !disabled && MAIN_AREA_TOUCH_HIT
438
441
  );
439
442
  if (onMoreClick || moreContent) {
440
443
  let mainArea;
@@ -447,7 +450,8 @@ var EntityPill = React.forwardRef(function EntityPill2({
447
450
  {
448
451
  type: "button",
449
452
  onClick: href ? onClick : disabled ? void 0 : onClick,
450
- disabled: disabled || void 0
453
+ disabled: disabled || void 0,
454
+ "aria-pressed": href ? void 0 : pressed
451
455
  }
452
456
  );
453
457
  } else if (href) {
@@ -469,8 +473,10 @@ var EntityPill = React.forwardRef(function EntityPill2({
469
473
  type: "button",
470
474
  onClick: disabled ? void 0 : onClick,
471
475
  disabled,
476
+ "aria-pressed": pressed,
472
477
  className: chunkS6A6FSG7_cjs.cn(
473
- "relative inline-flex items-center gap-1 pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']",
478
+ "inline-flex items-center gap-1",
479
+ MAIN_AREA_TOUCH_HIT,
474
480
  disabled && "opacity-60"
475
481
  ),
476
482
  children: mainContent
@@ -545,6 +551,7 @@ var EntityPill = React.forwardRef(function EntityPill2({
545
551
  ref,
546
552
  onClick: onClick && !disabled ? onClick : void 0,
547
553
  disabled: disabled || void 0,
554
+ "aria-pressed": pressed,
548
555
  "data-testid": testId,
549
556
  style
550
557
  }
@@ -574,6 +581,7 @@ var EntityPill = React.forwardRef(function EntityPill2({
574
581
  type: "button",
575
582
  onClick: disabled ? void 0 : onClick,
576
583
  disabled,
584
+ "aria-pressed": pressed,
577
585
  className: chunkS6A6FSG7_cjs.cn(
578
586
  baseClasses,
579
587
  disabled ? disabledClasses : interactiveClasses,
@@ -2382,6 +2390,7 @@ function SharingEntity({
2382
2390
  labelClassName: chunkS6A6FSG7_cjs.cn(variant === "icon" && "sr-only", !shared && "text-muted-foreground"),
2383
2391
  className: chunkS6A6FSG7_cjs.cn(shared && "text-primary", className),
2384
2392
  onClick: handleClick,
2393
+ pressed: onToggle ? shared : void 0,
2385
2394
  tooltipContent: !shared && hint ? hint : void 0,
2386
2395
  "data-testid": testId
2387
2396
  }
@@ -5322,5 +5331,5 @@ exports.toggleVariants = toggleVariants;
5322
5331
  exports.useAudioRecorder = useAudioRecorder;
5323
5332
  exports.useDictateContext = useDictateContext;
5324
5333
  exports.usesOriginalBytesForViewer = usesOriginalBytesForViewer;
5325
- //# sourceMappingURL=chunk-AB2A6F6T.cjs.map
5326
- //# sourceMappingURL=chunk-AB2A6F6T.cjs.map
5334
+ //# sourceMappingURL=chunk-4NGWDVHD.cjs.map
5335
+ //# sourceMappingURL=chunk-4NGWDVHD.cjs.map