@alexgorbatchev/shadcn 0.0.44 → 0.0.45

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/README.md CHANGED
@@ -270,6 +270,8 @@ The npm package includes the same index at `llms.txt` in its root and its linked
270
270
 
271
271
  Use the composed parts exported from the package root, such as `DialogTrigger`, `DialogContent`, and `DialogTitle`. Storybook provides working compositions, variants, disabled states, and action callbacks. The local preview starts with `bun run storybook` and binds to `127.0.0.1:6006`.
272
272
 
273
+ Set `wrap` on `ItemTitle` to keep complete titles visible in narrow items, including long names without spaces. The default title presentation remains unchanged.
274
+
273
275
  `ToggleGroup` supports optional single selection by default and independent selections with `multiple`. Set `required` for a single selection that stays pressed when activated again by pointer, Space, or Enter. Required groups accept exactly one initial item through the controlled `value` or uncontrolled `defaultValue` tuple and cannot use `multiple`. Empty selection requests are canceled through Base UI before consumer callbacks or analytics run; accepted changes retain the native array value and event-details API. This selection rule does not add form submission or validation behavior.
274
276
 
275
277
  `ScrollArea` supplies a native scroll viewport and one vertical `ScrollBar` by default. Set `scrollbars={<ScrollBar orientation="horizontal" />}` for a wide horizontal layout, or supply a fragment containing vertical and horizontal parts for both axes. The tracks stay outside the viewport and reserve their shared corner. `keepMounted` belongs to `ScrollBar`; root and track className callbacks receive native overflow/scroll state. Focus the viewport for native keyboard scrolling.
@@ -1333,11 +1333,11 @@ function ItemContent2({ density, className, ...props }) {
1333
1333
  ...props
1334
1334
  });
1335
1335
  }
1336
- function ItemTitle2({ density, className, ...props }) {
1336
+ function ItemTitle2({ density, className, wrap = false, ...props }) {
1337
1337
  return /* @__PURE__ */ jsx14("div", {
1338
1338
  "data-density": density,
1339
1339
  "data-slot": "item-title",
1340
- className: cn2("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
1340
+ className: cn2(!wrap && "line-clamp-1", "flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", wrap && "min-w-0 max-w-full wrap-anywhere", className),
1341
1341
  ...props
1342
1342
  });
1343
1343
  }
@@ -19,8 +19,11 @@ type ItemMediaProps = ComponentProps<"div"> & VariantProps<typeof itemMediaVaria
19
19
  declare function ItemMedia({ density, className, variant, ...props }: ItemMediaProps): ReactElement;
20
20
  type ItemContentProps = ComponentProps<"div"> & IDensityProps;
21
21
  declare function ItemContent({ density, className, ...props }: ItemContentProps): ReactElement;
22
- type ItemTitleProps = ComponentProps<"div"> & IDensityProps;
23
- declare function ItemTitle({ density, className, ...props }: ItemTitleProps): ReactElement;
22
+ type ItemTitleProps = ComponentProps<"div"> & IDensityProps & {
23
+ /** Keep the complete title visible, including long unbroken names. */
24
+ wrap?: boolean;
25
+ };
26
+ declare function ItemTitle({ density, className, wrap, ...props }: ItemTitleProps): ReactElement;
24
27
  type ItemDescriptionProps = ComponentProps<"p"> & IDensityProps;
25
28
  declare function ItemDescription({ density, className, ...props }: ItemDescriptionProps): ReactElement;
26
29
  type ItemActionsProps = ComponentProps<"div"> & IDensityProps;
@@ -36,7 +36,7 @@ import {
36
36
  DrawerHeader2,
37
37
  DrawerTitle2,
38
38
  DrawerDescription2
39
- } from "../../chunk-3r0q02k6.js";
39
+ } from "../../chunk-pp0qdx0f.js";
40
40
  import {
41
41
  DropdownMenu2,
42
42
  DropdownMenuTrigger2,
package/dist/index.js CHANGED
@@ -178,7 +178,7 @@ import {
178
178
  StatusTracker2,
179
179
  DashboardLayout2,
180
180
  BillingUsage2
181
- } from "./chunk-3r0q02k6.js";
181
+ } from "./chunk-pp0qdx0f.js";
182
182
  import {
183
183
  Tabs2,
184
184
  tabsListVariants2,
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.44",
2054
+ version: "0.0.45",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -190,6 +190,45 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
190
190
  }
191
191
  ```
192
192
 
193
+ ### TitleMedia
194
+
195
+ ```tsx
196
+ {
197
+ render: (args) => (<Item {...args}>
198
+ <ItemContent>
199
+ <ItemTitle>
200
+ <ItemMedia>
201
+ <FileIcon data-testid="title-icon" aria-hidden="true"/>
202
+ </ItemMedia>
203
+ <span>Document title</span>
204
+ </ItemTitle>
205
+ </ItemContent>
206
+ </Item>)
207
+ }
208
+ ```
209
+
210
+ ### WrappedTitle
211
+
212
+ ```tsx
213
+ {
214
+ render: (args) => (<div data-testid="title-container" className="w-56">
215
+ <Item {...args} render={<dl />}>
216
+ <ItemContent>
217
+ <dt>
218
+ <ItemTitle wrap>
219
+ <ItemMedia>
220
+ <FileIcon aria-hidden="true"/>
221
+ </ItemMedia>
222
+ A long saved title with repeated details and a verylongunbrokenmarkertitlethatmustremainreadable
223
+ </ItemTitle>
224
+ </dt>
225
+ <dd>Saved item details</dd>
226
+ </ItemContent>
227
+ </Item>
228
+ </div>)
229
+ }
230
+ ```
231
+
193
232
  ### NativeSeparatorCallback
194
233
 
195
234
  ```tsx
package/llms/setup.md CHANGED
@@ -270,6 +270,8 @@ The npm package includes the same index at `llms.txt` in its root and its linked
270
270
 
271
271
  Use the composed parts exported from the package root, such as `DialogTrigger`, `DialogContent`, and `DialogTitle`. Storybook provides working compositions, variants, disabled states, and action callbacks. The local preview starts with `bun run storybook` and binds to `127.0.0.1:6006`.
272
272
 
273
+ Set `wrap` on `ItemTitle` to keep complete titles visible in narrow items, including long names without spaces. The default title presentation remains unchanged.
274
+
273
275
  `ToggleGroup` supports optional single selection by default and independent selections with `multiple`. Set `required` for a single selection that stays pressed when activated again by pointer, Space, or Enter. Required groups accept exactly one initial item through the controlled `value` or uncontrolled `defaultValue` tuple and cannot use `multiple`. Empty selection requests are canceled through Base UI before consumer callbacks or analytics run; accepted changes retain the native array value and event-details API. This selection rule does not add form submission or validation behavior.
274
276
 
275
277
  `ScrollArea` supplies a native scroll viewport and one vertical `ScrollBar` by default. Set `scrollbars={<ScrollBar orientation="horizontal" />}` for a wide horizontal layout, or supply a fragment containing vertical and horizontal parts for both axes. The tracks stay outside the viewport and reserve their shared corner. `keepMounted` belongs to `ScrollBar`; root and track className callbacks receive native overflow/scroll state. Focus the viewport for native keyboard scrolling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {