@alexgorbatchev/shadcn 0.0.73 → 0.0.74
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 +13 -11
- package/dist/{chunk-st134dvp.js → chunk-jdvyr7tw.js} +549 -470
- package/dist/components/OptionCardGroup.d.ts +27 -0
- package/dist/components/json-render/index.js +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/prototype.js +1 -1
- package/llms/components/forms/OptionCardGroup.md +194 -0
- package/llms/setup.md +13 -11
- package/llms.txt +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -264,17 +264,17 @@ The npm package includes the same index at `llms.txt` in its root and its linked
|
|
|
264
264
|
|
|
265
265
|
# Component Catalog
|
|
266
266
|
|
|
267
|
-
| Area | Components
|
|
268
|
-
| :----------------------- |
|
|
269
|
-
| Actions and status | Alert, Badge, Button, ButtonGroup, ButtonLink, Sonner, Toast, Toggle, ToggleGroup
|
|
270
|
-
| Forms and selections | AuthForm, Calendar, Checkbox, Combobox, Command, EmailCodeAuthForm, Field, Input, InputGroup, InputOTP, Label, OptionSelect, Questionnaire, RadioGroup, Select, Slider, Switch, Textarea
|
|
271
|
-
| Structure and navigation | Accordion, AspectRatio, Avatar, Breadcrumb, Card, Carousel, Chart, Collapsible, Empty, Item, Kbd, Menubar, NavigationMenu, Pagination, Resizable, ScrollArea, Separator, Sidebar, Table, Tabs
|
|
272
|
-
| Layout and typography | AppShell, Container, Grid, GridItem, Heading, PageHeader, PageIntro, Stack, Text
|
|
273
|
-
| Data display | ImageComparison, ImageViewer, WeatherForecast, WeatherSummary
|
|
274
|
-
| Overlays | AlertDialog, ContextMenu, Dialog, Drawer, DropdownMenu, HoverCard, Popover, Sheet, Tooltip
|
|
275
|
-
| Loading | Progress, Skeleton, Spinner
|
|
276
|
-
| Conversations | Attachment, Bubble, Marker, Message, MessageScroller
|
|
277
|
-
| App configuration | DensityProvider, DirectionProvider, ThemeProvider
|
|
267
|
+
| Area | Components |
|
|
268
|
+
| :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
269
|
+
| Actions and status | Alert, Badge, Button, ButtonGroup, ButtonLink, Sonner, Toast, Toggle, ToggleGroup |
|
|
270
|
+
| Forms and selections | AuthForm, Calendar, Checkbox, Combobox, Command, EmailCodeAuthForm, Field, Input, InputGroup, InputOTP, Label, OptionCardGroup, OptionSelect, Questionnaire, RadioGroup, Select, Slider, Switch, Textarea |
|
|
271
|
+
| Structure and navigation | Accordion, AspectRatio, Avatar, Breadcrumb, Card, Carousel, Chart, Collapsible, Empty, Item, Kbd, Menubar, NavigationMenu, Pagination, Resizable, ScrollArea, Separator, Sidebar, Table, Tabs |
|
|
272
|
+
| Layout and typography | AppShell, Container, Grid, GridItem, Heading, PageHeader, PageIntro, Stack, Text |
|
|
273
|
+
| Data display | ImageComparison, ImageViewer, WeatherForecast, WeatherSummary |
|
|
274
|
+
| Overlays | AlertDialog, ContextMenu, Dialog, Drawer, DropdownMenu, HoverCard, Popover, Sheet, Tooltip |
|
|
275
|
+
| Loading | Progress, Skeleton, Spinner |
|
|
276
|
+
| Conversations | Attachment, Bubble, Marker, Message, MessageScroller |
|
|
277
|
+
| App configuration | DensityProvider, DirectionProvider, ThemeProvider |
|
|
278
278
|
|
|
279
279
|
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 `just storybook` and binds to `127.0.0.1:6006`.
|
|
280
280
|
|
|
@@ -308,6 +308,8 @@ Compose grouped controls with InputGroupInput or InputGroupTextarea, then place
|
|
|
308
308
|
|
|
309
309
|
`RadioGroup` uses `value`/`onValueChange` for controlled selection and `defaultValue` for initial selection. Name the group and each option; use `FieldSet`/`FieldLegend` and `Field`/`FieldLabel` for visible labels. Arrow keys select options and skip disabled items; Space selects a focused option. Both the group and `RadioGroupItem` preserve native state-based className and style callbacks. Use `nativeButton` with `render={<button type="button" />}` for sibling labels on button-rendered items. `name`, `required`, and `form` connect selection to browser form submission and validation, including an external form. The required-form story restores controlled selection through `onReset`.
|
|
310
310
|
|
|
311
|
+
`OptionCardGroup` is a single-choice group for decisions. Each `OptionCard` is a bordered radio card with a leading letter (a, b, c by position, or `marker`), a bold `label`, an optional muted `description`, and an optional `recommended` flag that adds a success-colored tag after the label and tints the unselected card's border. The selected card takes the primary border, or the system highlight color in forced-colors mode, and keyboard focus draws an offset outline. Mark cards `aria-invalid` with `aria-errormessage` to show an error; unselected invalid cards take the destructive border instead of the recommended tint. It shares `RadioGroup`'s Base UI behavior: `value`/`onValueChange`/`defaultValue`, arrow keys that select and skip disabled cards, Space to select, `disabled` and `readOnly`, and `name`/`required`/`form` for native submission and validation. The label and tag name each card; the description describes it. Use `RadioGroup` for short plain lists.
|
|
312
|
+
|
|
311
313
|
`Select` supports single, multiple, and object values through its native generic props. Pass `items` to display labels instead of raw values; provide object comparison and serialization through `isItemEqualToValue` and `itemToStringValue`. Disabled options remain focusable while rejecting selection. Read-only selection permits browsing and blocks value changes. The composed parts preserve state-based className callbacks, and portaled content follows density and DirectionProvider context. Named multiple selects submit repeated form entries. Restore controlled values in your form's reset handler. Bun-built RTL menus currently place the selection checkmark on the wrong side; verify that layout in consuming apps. See the [Base UI Select reference](https://base-ui.com/react/components/select).
|
|
312
314
|
|
|
313
315
|
`Combobox` retains native filtering, single/multiple selection, cancellation, controlled values, object identity comparison, and keyboard focus. Give its input an accessible name; an input inside the popup uses a named trigger. `ComboboxInput.className` belongs to the native input and accepts its state callback; use `frameClassName` for the surrounding InputGroup. Built-in controls use “Open popup” and “Clear selection”; customize them with `triggerLabel` and `clearLabel`. Chips use density metrics, and their removal button is named “Remove item”. Keep `ComboboxEmpty` mounted so its polite live region can announce results. In grouped lists, pass `items={group.items}` to each `ComboboxGroup`. Popup density and direction follow their providers, including through portals; reduced motion disables popup animations. See the [Base UI Combobox reference](https://base-ui.com/react/components/combobox).
|