@alexgorbatchev/shadcn 0.0.123 → 0.0.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.
- package/dist/{chunk-8x9hkznc.js → chunk-8ja1nk62.js} +1 -1
- package/dist/chunk-bvzjbk43.js +48 -0
- package/dist/{chunk-wjs8ks1h.js → chunk-dhtk1cfw.js} +2 -1
- package/dist/{chunk-5eswhdbp.js → chunk-kx91d0g6.js} +223 -146
- package/dist/components/DescriptionList.d.ts +16 -6
- package/dist/components/Heading.d.ts +1 -1
- package/dist/components/PageHeader.d.ts +7 -2
- package/dist/components/PageIntro.d.ts +7 -2
- package/dist/components/Quote.d.ts +16 -0
- package/dist/components/SkipLink.d.ts +14 -0
- package/dist/components/StatusDot.d.ts +18 -0
- package/dist/components/assistant-ui/native/ThreadListSidebar.js +2 -2
- package/dist/components/assistant-ui/native/index.js +2 -2
- package/dist/components/json-render/index.js +3 -2
- package/dist/components/tree/index.js +6 -20
- package/dist/index.d.ts +6 -0
- package/dist/index.js +14 -2
- package/dist/prototype.js +1 -1
- package/dist/typeset.css +4 -1
- package/llms/components/data-display/DescriptionList.md +16 -0
- package/llms/components/data-display/Heading.md +18 -2
- package/llms/components/data-display/Quote.md +90 -0
- package/llms/components/data-display/StatusDot.md +80 -0
- package/llms/components/layout/PageHeader.md +8 -0
- package/llms/components/layout/PageIntro.md +8 -0
- package/llms/components/navigation/SkipLink.md +63 -0
- package/llms/components/overlays/Sheet.md +38 -0
- package/llms.txt +4 -1
- package/package.json +1 -1
|
@@ -161,6 +161,44 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
161
161
|
}
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
### LongTitle
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
{
|
|
168
|
+
args: { side: "right", width: 640 },
|
|
169
|
+
render: (args) => (<Sheet>
|
|
170
|
+
<SheetTrigger render={<Button variant="outline"/>}>Open commit</SheetTrigger>
|
|
171
|
+
<SheetContent {...args}>
|
|
172
|
+
<SheetHeader>
|
|
173
|
+
<SheetTitle>
|
|
174
|
+
1 commit to main: feat(sheet): a side sheet takes a width and never grows past the viewport
|
|
175
|
+
</SheetTitle>
|
|
176
|
+
<SheetDescription>Pushed to the main branch.</SheetDescription>
|
|
177
|
+
</SheetHeader>
|
|
178
|
+
</SheetContent>
|
|
179
|
+
</Sheet>)
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### LongTitleCompact
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
{
|
|
187
|
+
args: { ...LongTitle.args, density: "compact" },
|
|
188
|
+
render: (args) => (<Sheet>
|
|
189
|
+
<SheetTrigger render={<Button variant="outline"/>}>Open commit</SheetTrigger>
|
|
190
|
+
<SheetContent {...args}>
|
|
191
|
+
<SheetHeader>
|
|
192
|
+
<SheetTitle>
|
|
193
|
+
1 commit to main: feat(sheet): a side sheet takes a width and never grows past the viewport
|
|
194
|
+
</SheetTitle>
|
|
195
|
+
<SheetDescription>Pushed to the main branch.</SheetDescription>
|
|
196
|
+
</SheetHeader>
|
|
197
|
+
</SheetContent>
|
|
198
|
+
</Sheet>)
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
164
202
|
### Wide
|
|
165
203
|
|
|
166
204
|
```tsx
|
package/llms.txt
CHANGED
|
@@ -343,7 +343,7 @@ Generated from the public package exports and Storybook sources.
|
|
|
343
343
|
- [DataViewer](./llms/components/data-display/DataViewer.md)
|
|
344
344
|
- [DescriptionList](./llms/components/data-display/DescriptionList.md)
|
|
345
345
|
- [FramedImage](./llms/components/data-display/FramedImage.md): Import from `@alexgorbatchev/shadcn/image-viewer`. FramedImage shows a screenshot or other supplied image as evidence: a 1px edge in the `media-edge` token, which keeps at least 3:1 against the page in both themes, so a white image in the light theme and a black one in the dark theme still show where they end. `size="intrinsic"` (the default) keeps the image's own size within its column and at most 70% of the viewport height, scaled and never cropped; `size="fill"` fills its container's width, as in a row of thumbnails. It takes every `<img>` attribute.
|
|
346
|
-
- [Heading](./llms/components/data-display/Heading.md): Heading renders `h1`–`h6` from the required `level` so the document outline stays correct, while `size` (sm, base, lg, xl) sets the visual size independently. Sizes default by level: 1 xl, 2 lg, 3 base, 4–6 sm. `truncate` keeps one line.
|
|
346
|
+
- [Heading](./llms/components/data-display/Heading.md): Heading renders `h1`–`h6` from the required `level` so the document outline stays correct, while `size` (sm, base, lg, xl, and the display sizes 2xl and 3xl for a page's own title) sets the visual size independently. Sizes default by level: 1 xl, 2 lg, 3 base, 4–6 sm. `truncate` keeps one line.
|
|
347
347
|
- [ImageComparison](./llms/components/data-display/ImageComparison.md): Import from `@alexgorbatchev/shadcn/image-viewer`. ImageComparison fills its container and compares `before` and `after` images (`{ src, alt, crossOrigin? }`) labelled by `beforeLabel` and `afterLabel` (default "Before" and "After"). `toggle` (the default) shows the after image and the "Hold to show before" button shows the before image while a pointer, Space, or Enter is held. `swipe` stacks both images; the divider is a slider (0–100, arrows ±1, Page Up/Page Down ±10, Home/End) whose handle drags with pointer capture. `side-by-side` shows labelled panes left and right (`horizontal`) or top and bottom (`vertical`) that scroll in sync when zoomed. Every mode starts fitted and offers original size (zoom `1`); the focused stage also takes the ImageViewer stage keys, Mod+wheel and pinch, and its name ends with the zoom percent. A differently sized before image is drawn inside the after image box, and the toolbar reports the mismatch. "Highlight differences" compares pixels on first use, caches the result per image pair, outlines changed regions, and summarizes them; it is disabled with a reason when pixels cannot be read. `mode`, `orientation`, `zoom`, and `showDifferences` are controllable with matching `default*` and `on*Change` props; `showToolbar={false}` hides the controls, which sit beside wide comparisons and below narrow ones.
|
|
348
348
|
- [ImageRegionMarker](./llms/components/data-display/ImageRegionMarker.md): Import from `@alexgorbatchev/shadcn/image-viewer`. Outlines a region over an image: a 2px outline 1px outside the region over a 4px halo in the page background, so the outline keeps 3:1 against any screenshot in both themes; forced colours draw it in Highlight. Variants: `comment` (a saved comment's region), `draft` (dashed, a region being drawn) and `difference` (changed pixels, used by ImageComparison's Highlight differences). Position it with `region` (left, top, width, height in pixels or any CSS length) over a positioned image box. `ImageRegionMarkerBadge` pins an interactive control, such as a comment count, beside the marker with the same outline and halo; place it with `position`, and pass `interactive={false}` while another gesture owns the pointer. The theme's `target-emphasis` utility is the matching two-tone mark for a jump target on the page.
|
|
349
349
|
- [ImageViewer](./llms/components/data-display/ImageViewer.md): Import from `@alexgorbatchev/shadcn/image-viewer`. ImageViewer fills the container it is given, such as a `DialogContent size="fullscreen"` body, and shows one framed image in a native scroll viewport. `fit` scales the image down proportionally to fit both dimensions, centered and without scrollbars, and never upscales it; `fit-width` fills the width and scrolls vertically; a number is a scale from the fitted one up to 4 (400%), so `1` shows natural size. Without `zoom` or `defaultZoom` it opens at `fit`, or at `fit-width` for an image much taller than the stage, and never narrower than `openingWidth`. Zooming keeps the viewed center. The stage, named "<alt>, <percent>", owns its gestures: a drag pans, two fingers pinch-zoom and Mod+wheel zooms around the pointer, so a touch never reaches overlay content unless it handles the pointer itself, such as `ImageRegionSelect`; while focused it takes + or = (zoom in), − (zoom out), 0 (fit), 1 (100%) and arrows (pan while larger than the stage), and `onStageKeyDown` runs first to add or replace keys. `showZoomControl` shows the zoom bar (Fit, Fit width, −, percent, +) in a toolbar row, and `toolbar` adds further controls to that row, which wraps onto further rows when its controls do not fit. `overlay` renders content sized and positioned exactly over the rendered image at every zoom, `imageRef` and `overlayRef` expose the rendered image box, and `getNormalizedImagePoint(event, box)` maps pointer coordinates to 0–1 image coordinates. `ImageRegionSelect` is a region tool for the overlay: a drag draws a region, a click places a half-size region centred on it and a second click makes the two clicks opposite corners; it reports each region through `onRegionChange` and draws the placed `region` with its text form (`formatImageRegion`, "Region 60% × 50% at 25%, 25%") as its accessible name. For keyboard placement, `placeImageRegion()` gives the half-size region in the middle and `applyImageRegionKey(region, key, shiftKey)` moves it by 5% with arrows or resizes it with Shift+arrows from `onStageKeyDown`; `ImageRegionFields` shows Left, Top, Width and Height as percent fields that take typed values.
|
|
@@ -354,9 +354,11 @@ Generated from the public package exports and Storybook sources.
|
|
|
354
354
|
- [JsonViewer](./llms/components/data-display/JsonViewer.md)
|
|
355
355
|
- [Kbd](./llms/components/data-display/Kbd.md)
|
|
356
356
|
- [Meter](./llms/components/data-display/Meter.md)
|
|
357
|
+
- [Quote](./llms/components/data-display/Quote.md): Quote marks text quoted from elsewhere, such as the passage a comment targets or the message a reply answers, with a start rule that follows the reading direction. `size` is `default` for panels and composers and `compact` for message footers, bubbles and rows; `clamp` stops a long quote after two lines.
|
|
357
358
|
- [ReviewList](./llms/components/data-display/ReviewList.md)
|
|
358
359
|
- [Sparkline](./llms/components/data-display/Sparkline.md)
|
|
359
360
|
- [StatCard](./llms/components/data-display/StatCard.md)
|
|
361
|
+
- [StatusDot](./llms/components/data-display/StatusDot.md): StatusDot marks something new or waiting with a small SVG dot in `currentColor`, so forced colors keep it. `tone` is `primary` for new or waiting and `muted` for quieter states; `count` adds a number; `placement="corner"` pins it to the top end corner of a positioned parent such as an icon button. It is hidden from assistive technology, so say what it means in nearby text or the control's name.
|
|
360
362
|
- [StatusTracker](./llms/components/data-display/StatusTracker.md)
|
|
361
363
|
- [Table](./llms/components/data-display/Table.md)
|
|
362
364
|
- [TableResponsive](./llms/components/data-display/TableResponsive.md)
|
|
@@ -467,6 +469,7 @@ Generated from the public package exports and Storybook sources.
|
|
|
467
469
|
- [Outline](./llms/components/navigation/Outline.md)
|
|
468
470
|
- [Pagination](./llms/components/navigation/Pagination.md)
|
|
469
471
|
- [Sidebar](./llms/components/navigation/Sidebar.md)
|
|
472
|
+
- [SkipLink](./llms/components/navigation/SkipLink.md): SkipLink is the first Tab stop: a link to the main content that stays hidden until it has keyboard focus, then shows as an outline button pinned to the top start corner. It jumps to `targetId`; an `onClick` that calls `preventDefault` lets the app move focus itself.
|
|
470
473
|
- [Tabs](./llms/components/navigation/Tabs.md)
|
|
471
474
|
- [Tree](./llms/components/navigation/Tree.md)
|
|
472
475
|
- [WorkspaceSwitcher](./llms/components/navigation/WorkspaceSwitcher.md)
|