@eifi1/ui-kit 0.15.0 → 0.15.2

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.
@@ -1133,10 +1133,10 @@ const TAB_VERTICAL_CLASSES = "flex w-full items-center rounded-md px-3 py-2 text
1133
1133
  const TAB_VERTICAL_ACTIVE_CLASSES = "bg-[var(--bg-active)] text-[var(--text-primary)]";
1134
1134
  const TAB_VERTICAL_INACTIVE_CLASSES = "text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]";
1135
1135
  const TABLIST_WRAP_CLASSES = "flex flex-wrap gap-1.5 md:flex-nowrap md:gap-1 md:overflow-x-auto md:overflow-y-hidden md:border-b md:border-[var(--border)]";
1136
- const TAB_CLASSES = "whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px focus:outline-none focus:ring-2 focus:ring-[var(--border-strong)]";
1136
+ const TAB_CLASSES = "max-w-full whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px focus:outline-none focus:ring-2 focus:ring-[var(--border-strong)]";
1137
1137
  const TAB_ACTIVE_CLASSES = "border-[var(--text-primary)] text-[var(--text-primary)]";
1138
1138
  const TAB_INACTIVE_CLASSES = "border-transparent text-[var(--text-muted)] hover:text-[var(--text-secondary)] hover:border-[var(--border-strong)]";
1139
- const TAB_WRAP_CLASSES = "whitespace-nowrap rounded-md px-2.5 py-2 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--border-strong)] md:rounded-none md:border-b-2 md:-mb-px md:bg-transparent md:px-3 md:py-2 md:text-sm";
1139
+ const TAB_WRAP_CLASSES = "max-w-full whitespace-nowrap rounded-md px-2.5 py-2 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--border-strong)] md:rounded-none md:border-b-2 md:-mb-px md:bg-transparent md:px-3 md:py-2 md:text-sm";
1140
1140
  const TAB_WRAP_ACTIVE_CLASSES = "bg-[var(--brand)] text-[var(--brand-contrast)] md:border-[var(--text-primary)] md:text-[var(--text-primary)]";
1141
1141
  const TAB_WRAP_INACTIVE_CLASSES = "bg-[var(--bg-surface)] text-[var(--text-primary)] md:border-transparent md:text-[var(--text-muted)] md:hover:border-[var(--border-strong)] md:hover:text-[var(--text-secondary)]";
1142
1142
  const TAB_REMOVABLE_CLASSES = "pe-8 md:pe-8";
@@ -1268,29 +1268,33 @@ function Tabs({
1268
1268
  className: cn(
1269
1269
  // In a side nav the row is the full width, so the label takes it and a
1270
1270
  // badge lands at the row's end, where a column of counts lines up.
1271
- vertical ? "flex min-w-0 flex-1 items-center gap-1.5" : "inline-flex items-center gap-1.5",
1271
+ vertical ? "flex min-w-0 flex-1 items-center gap-1.5" : "inline-flex max-w-full min-w-0 items-center gap-1.5",
1272
1272
  tab.empty && TAB_EMPTY_CLASSES
1273
1273
  ),
1274
1274
  children: [
1275
1275
  tab.icon != null && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-flex shrink-0 items-center gap-0.5", children: tab.icon }),
1276
- tab.detail != null ? /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-start text-start", children: [
1277
- /* @__PURE__ */ jsx("span", { children: tab.label }),
1278
- " ",
1279
- /* @__PURE__ */ jsx(
1280
- "span",
1281
- {
1282
- className: cn(
1283
- "text-[11px] font-normal leading-tight text-[var(--text-muted)]",
1284
- // On a wrapped strip's filled chip (below `md`) the muted grey
1285
- // was dark text on the brand fill — "loop 2" all but vanished
1286
- // under the one label that most needed reading. It takes the
1287
- // chip's own ink instead, as the label and the × already do.
1288
- wrap && isActive && !vertical && "text-[var(--brand-contrast)] md:text-[var(--text-muted)]"
1289
- ),
1290
- children: tab.detail
1291
- }
1292
- )
1293
- ] }) : tab.label,
1276
+ tab.detail != null ? (
1277
+ // `min-w-0` + `truncate` on each line: capped by the tab's `max-w-full`, a
1278
+ // long detail ends in an ellipsis. The whole text stays the tab's name.
1279
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col items-start text-start", children: [
1280
+ /* @__PURE__ */ jsx("span", { className: "max-w-full truncate", children: tab.label }),
1281
+ " ",
1282
+ /* @__PURE__ */ jsx(
1283
+ "span",
1284
+ {
1285
+ className: cn(
1286
+ "max-w-full truncate text-[11px] font-normal leading-tight text-[var(--text-muted)]",
1287
+ // On a wrapped strip's filled chip (below `md`) the muted grey
1288
+ // was dark text on the brand fill — "loop 2" all but vanished
1289
+ // under the one label that most needed reading. It takes the
1290
+ // chip's own ink instead, as the label and the × already do.
1291
+ wrap && isActive && !vertical && "text-[var(--brand-contrast)] md:text-[var(--text-muted)]"
1292
+ ),
1293
+ children: tab.detail
1294
+ }
1295
+ )
1296
+ ] })
1297
+ ) : tab.label,
1294
1298
  tab.badge != null ? vertical ? /* @__PURE__ */ jsx("span", { className: "ms-auto flex shrink-0 items-center", children: tab.badge }) : tab.badge : null
1295
1299
  ]
1296
1300
  }
@@ -1321,7 +1325,7 @@ function Tabs({
1321
1325
  // The × cannot go INSIDE the tab: a button in a button is invalid HTML, and
1322
1326
  // a tab's children are presentational, so a reader would flatten it into the
1323
1327
  // tab's name. It sits beside the tab, over the gutter the tab reserves.
1324
- /* @__PURE__ */ jsxs("div", { className: cn("relative flex", !vertical && "shrink-0"), children: [
1328
+ /* @__PURE__ */ jsxs("div", { className: cn("relative flex max-w-full", !vertical && "shrink-0"), children: [
1325
1329
  element,
1326
1330
  isActive && /* @__PURE__ */ jsx(
1327
1331
  IconButton,