@cytario/design 1.17.0 → 1.17.1

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
@@ -2473,46 +2473,11 @@ function FileCard({
2473
2473
  [onPress]
2474
2474
  );
2475
2475
  const cardContent = /* @__PURE__ */ jsxs23(Fragment9, { children: [
2476
- /* @__PURE__ */ jsxs23(
2476
+ /* @__PURE__ */ jsx36(
2477
2477
  "div",
2478
2478
  {
2479
- className: `shrink-0 relative overflow-hidden bg-[var(--color-neutral-900)] ${thumbnailClass}`,
2480
- children: [
2481
- children ? /* @__PURE__ */ jsx36("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx36(IconComponent, { size: iconSize, className: iconColor }) }),
2482
- onInfo && /* @__PURE__ */ jsx36(
2483
- "div",
2484
- {
2485
- className: [
2486
- "absolute opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",
2487
- "transition-opacity duration-150",
2488
- compact ? "bottom-1.5 right-1.5" : "bottom-2 right-2"
2489
- ].join(" "),
2490
- children: /* @__PURE__ */ jsx36(
2491
- "span",
2492
- {
2493
- onClick: handleInfoClick,
2494
- onKeyDown: (e) => {
2495
- if (e.key === "Enter" || e.key === " ") {
2496
- handleInfoClick(e);
2497
- }
2498
- },
2499
- role: "presentation",
2500
- children: /* @__PURE__ */ jsx36(
2501
- IconButton,
2502
- {
2503
- icon: Info2,
2504
- "aria-label": `Show info for ${name}`,
2505
- variant: "ghost",
2506
- size: "sm",
2507
- className: "bg-[var(--color-neutral-900)]/75 text-[var(--color-text-inverse)] hover:bg-[var(--color-neutral-900)]/90 rounded-[var(--border-radius-sm)]",
2508
- onPress: onInfo
2509
- }
2510
- )
2511
- }
2512
- )
2513
- }
2514
- )
2515
- ]
2479
+ className: `shrink-0 overflow-hidden bg-[var(--color-neutral-900)] ${thumbnailClass}`,
2480
+ children: children ? /* @__PURE__ */ jsx36("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx36(IconComponent, { size: iconSize, className: iconColor }) })
2516
2481
  }
2517
2482
  ),
2518
2483
  /* @__PURE__ */ jsx36(
@@ -2526,7 +2491,30 @@ function FileCard({
2526
2491
  children: compact ? /* @__PURE__ */ jsx36("span", { className: "text-xs font-medium text-[var(--color-text-primary)] truncate", children: name }) : /* @__PURE__ */ jsxs23(Fragment9, { children: [
2527
2492
  /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1.5", children: [
2528
2493
  /* @__PURE__ */ jsx36(FileIcon, { type, extension, size: 16 }),
2529
- /* @__PURE__ */ jsx36("span", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: name })
2494
+ /* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 text-sm font-medium text-[var(--color-text-primary)] truncate", children: name }),
2495
+ onInfo && /* @__PURE__ */ jsx36(
2496
+ "span",
2497
+ {
2498
+ onClick: handleInfoClick,
2499
+ onKeyDown: (e) => {
2500
+ if (e.key === "Enter" || e.key === " ") {
2501
+ handleInfoClick(e);
2502
+ }
2503
+ },
2504
+ role: "presentation",
2505
+ children: /* @__PURE__ */ jsx36(
2506
+ IconButton,
2507
+ {
2508
+ icon: Info2,
2509
+ "aria-label": `Show info for ${name}`,
2510
+ variant: "ghost",
2511
+ size: "sm",
2512
+ className: "shrink-0 -mt-0.5 -mr-1",
2513
+ onPress: onInfo
2514
+ }
2515
+ )
2516
+ }
2517
+ )
2530
2518
  ] }),
2531
2519
  size && /* @__PURE__ */ jsx36("span", { className: "text-xs text-[var(--color-text-secondary)] tabular-nums pl-[22px]", children: size })
2532
2520
  ] })