@alexgorbatchev/shadcn 0.0.96 → 0.0.97

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.
@@ -1285,11 +1285,12 @@ function Breadcrumb2({ density, className, ...props }) {
1285
1285
  ...props
1286
1286
  });
1287
1287
  }
1288
- function BreadcrumbList2({ density, className, ...props }) {
1288
+ function BreadcrumbList2({ density, overflow = "wrap", className, ...props }) {
1289
1289
  return /* @__PURE__ */ jsx15("ol", {
1290
1290
  "data-density": density,
1291
1291
  "data-slot": "breadcrumb-list",
1292
- className: cn2("flex flex-wrap items-center gap-control-gap text-sm wrap-break-word text-muted-foreground", className),
1292
+ "data-overflow": overflow,
1293
+ className: cn2("flex items-center gap-control-gap text-sm text-muted-foreground", overflow === "wrap" ? "flex-wrap wrap-break-word" : "min-w-0 flex-nowrap overflow-hidden whitespace-nowrap [&>li]:min-w-0 [&>li>*]:min-w-0 [&>li>*]:truncate [&>li[data-slot=breadcrumb-separator]]:shrink-0", className),
1293
1294
  ...props
1294
1295
  });
1295
1296
  }
@@ -4,8 +4,15 @@ import type { ComponentProps, ReactElement } from "react";
4
4
  import { useRender } from "@base-ui/react/use-render";
5
5
  type BreadcrumbProps = ComponentProps<"nav"> & IDensityProps;
6
6
  declare function Breadcrumb({ density, className, ...props }: BreadcrumbProps): ReactElement;
7
- type BreadcrumbListProps = ComponentProps<"ol"> & IDensityProps;
8
- declare function BreadcrumbList({ density, className, ...props }: BreadcrumbListProps): ReactElement;
7
+ type BreadcrumbListProps = ComponentProps<"ol"> & IDensityProps & {
8
+ /**
9
+ * `wrap` (the default) lets a long path break onto more lines. `truncate` keeps the path on one line: every item
10
+ * shrinks and ends in an ellipsis, longer items giving up more width, while separators keep their size. Give each
11
+ * truncated item its full text as a tooltip or accessible name.
12
+ */
13
+ overflow?: "wrap" | "truncate";
14
+ };
15
+ declare function BreadcrumbList({ density, overflow, className, ...props }: BreadcrumbListProps): ReactElement;
9
16
  type BreadcrumbItemProps = ComponentProps<"li"> & IDensityProps;
10
17
  declare function BreadcrumbItem({ density, className, ...props }: BreadcrumbItemProps): ReactElement;
11
18
  type BreadcrumbLinkProps = IAnalyticsProps & useRender.ComponentProps<"a"> & IDensityProps;
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-d2nyvsjc.js";
29
+ } from "../../chunk-m7rs4v5x.js";
30
30
  import {
31
31
  MenuPopup,
32
32
  MenuItem2,
package/dist/index.js CHANGED
@@ -165,7 +165,7 @@ import {
165
165
  StatusTracker2,
166
166
  DashboardLayout2,
167
167
  BillingUsage2
168
- } from "./chunk-d2nyvsjc.js";
168
+ } from "./chunk-m7rs4v5x.js";
169
169
  import {
170
170
  Combobox2,
171
171
  ComboboxValue2,
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.96",
2054
+ version: "0.0.97",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -157,3 +157,29 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
157
157
  args: { dir: "rtl" }
158
158
  }
159
159
  ```
160
+
161
+ ### Truncated
162
+
163
+ ```tsx
164
+ {
165
+ render: (args) => (<div className="w-80">
166
+ <Breadcrumb {...args}>
167
+ <BreadcrumbList overflow="truncate">
168
+ <BreadcrumbItem>
169
+ <BreadcrumbLink href="#project" title={LONG_PROJECT}>
170
+ {LONG_PROJECT}
171
+ </BreadcrumbLink>
172
+ </BreadcrumbItem>
173
+ <BreadcrumbSeparator />
174
+ <BreadcrumbItem>
175
+ <BreadcrumbLink href="#interviews">Interviews</BreadcrumbLink>
176
+ </BreadcrumbItem>
177
+ <BreadcrumbSeparator />
178
+ <BreadcrumbItem>
179
+ <BreadcrumbPage>Interview 35</BreadcrumbPage>
180
+ </BreadcrumbItem>
181
+ </BreadcrumbList>
182
+ </Breadcrumb>
183
+ </div>)
184
+ }
185
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {