@alexgorbatchev/shadcn 0.0.124 → 0.0.126
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-bvzjbk43.js +48 -0
- package/dist/{chunk-xdher2cd.js → chunk-wk3xn989.js} +566 -276
- package/dist/components/DescriptionList.d.ts +16 -6
- package/dist/components/Heading.d.ts +1 -1
- package/dist/components/OptionCardGroup.d.ts +29 -5
- 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/ReadMore.d.ts +13 -0
- package/dist/components/SkipLink.d.ts +14 -0
- package/dist/components/StatusDot.d.ts +18 -0
- package/dist/components/json-render/index.js +2 -1
- package/dist/components/tree/index.js +6 -20
- package/dist/index.d.ts +10 -2
- package/dist/index.js +19 -1
- 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/forms/OptionCardGroup.md +48 -1
- package/llms/components/layout/PageHeader.md +8 -0
- package/llms/components/layout/PageIntro.md +8 -0
- package/llms/components/layout/ReadMore.md +60 -0
- package/llms/components/navigation/SkipLink.md +63 -0
- package/llms.txt +5 -1
- package/package.json +1 -1
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import type { IDensityProps } from "../density/types.js";
|
|
2
2
|
import type { ComponentProps, ReactElement } from "react";
|
|
3
|
-
type
|
|
3
|
+
import type { StackDirection } from "../layout/types.js";
|
|
4
|
+
type DescriptionListProps = ComponentProps<"dl"> & IDensityProps & {
|
|
5
|
+
/**
|
|
6
|
+
* `vertical` (the default) stacks each term above its details. `horizontal` puts the term at the start and the
|
|
7
|
+
* details at the end of one row, for short pairs such as a shortcut and its keys; a row too narrow for both wraps.
|
|
8
|
+
*/
|
|
9
|
+
orientation?: StackDirection;
|
|
10
|
+
};
|
|
4
11
|
/**
|
|
5
|
-
* A
|
|
6
|
-
* order at every width
|
|
12
|
+
* A description list. Stacked by default: each item puts its term on one line and its details under it, full width,
|
|
13
|
+
* in reading order at every width, for question-and-answer summaries and other pairs whose terms can be long.
|
|
7
14
|
*/
|
|
8
|
-
declare function DescriptionList({ density, className, ...props }: DescriptionListProps): ReactElement;
|
|
15
|
+
declare function DescriptionList({ density, orientation, className, ...props }: DescriptionListProps): ReactElement;
|
|
9
16
|
type DescriptionListItemProps = ComponentProps<"div"> & IDensityProps;
|
|
10
17
|
/** One term and its details; HTML allows a `div` to group them inside a `dl`. */
|
|
11
18
|
declare function DescriptionListItem({ density, className, ...props }: DescriptionListItemProps): ReactElement;
|
|
12
|
-
type DescriptionTermProps = ComponentProps<"dt"> & IDensityProps
|
|
13
|
-
|
|
19
|
+
type DescriptionTermProps = ComponentProps<"dt"> & IDensityProps & {
|
|
20
|
+
/** `muted` (the default) suits a question above its answer; `default` suits a label that is the primary text. */
|
|
21
|
+
tone?: "muted" | "default";
|
|
22
|
+
};
|
|
23
|
+
declare function DescriptionTerm({ density, tone, className, ...props }: DescriptionTermProps): ReactElement;
|
|
14
24
|
type DescriptionDetailsProps = ComponentProps<"dd"> & IDensityProps;
|
|
15
25
|
/** The details keep their line breaks, so multi-line text reads as it was written. */
|
|
16
26
|
declare function DescriptionDetails({ density, className, ...props }: DescriptionDetailsProps): ReactElement;
|
|
@@ -2,7 +2,7 @@ import type { ReactElement } from "react";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import type { Density, IDensityProps } from "../density/types.js";
|
|
4
4
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
-
type HeadingSize = "sm" | "base" | "lg" | "xl";
|
|
5
|
+
type HeadingSize = "sm" | "base" | "lg" | "xl" | "2xl" | "3xl";
|
|
6
6
|
type HeadingState = {
|
|
7
7
|
slot: "heading";
|
|
8
8
|
level: HeadingLevel;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { IAnalyticsProps } from "../analytics/types.js";
|
|
2
2
|
import type { IDensityProps } from "../density/types.js";
|
|
3
3
|
import { type ReactElement, type ReactNode } from "react";
|
|
4
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
5
|
+
import { CheckboxGroup as CheckboxGroupPrimitive } from "@base-ui/react/checkbox-group";
|
|
4
6
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
5
7
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
6
8
|
type OptionCardGroupProps = IAnalyticsProps & RadioGroupPrimitive.Props & IDensityProps;
|
|
@@ -9,19 +11,41 @@ type OptionCardGroupProps = IAnalyticsProps & RadioGroupPrimitive.Props & IDensi
|
|
|
9
11
|
* selects the focused card, and `name`, `required` and `form` take part in native form submission and validation.
|
|
10
12
|
*/
|
|
11
13
|
declare function OptionCardGroup({ analytics, density, className, ...props }: OptionCardGroupProps): ReactElement;
|
|
12
|
-
type
|
|
14
|
+
type OptionCheckboxGroupProps = IAnalyticsProps & CheckboxGroupPrimitive.Props & IDensityProps;
|
|
15
|
+
/**
|
|
16
|
+
* A multiple-choice group of option cards, laid out like `OptionCardGroup`. Each card is a checkbox: Tab moves between
|
|
17
|
+
* cards and Space toggles the focused one. `value` lists the checked cards' values.
|
|
18
|
+
*/
|
|
19
|
+
declare function OptionCheckboxGroup({ analytics, density, className, ...props }: OptionCheckboxGroupProps): ReactElement;
|
|
20
|
+
interface IOptionCardContentProps {
|
|
13
21
|
/** The option's name, shown in bold and used as its accessible name. */
|
|
14
22
|
label: ReactNode;
|
|
15
23
|
/** A short explanation shown below the label, such as the option's trade-off. */
|
|
16
24
|
description?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Folds the description after this many lines, with a More button that shows the rest. The button sits inside the
|
|
27
|
+
* card's border but outside the card's control, so pressing it never changes the choice.
|
|
28
|
+
*/
|
|
29
|
+
descriptionLines?: number;
|
|
17
30
|
/** Marks the option the author recommends with a tag after its label and a tinted border. */
|
|
18
31
|
recommended?: boolean;
|
|
19
32
|
/** Text of the recommended tag. */
|
|
20
33
|
recommendedLabel?: ReactNode;
|
|
34
|
+
/** Why the author recommends this option, shown after its description under a "Why" label. */
|
|
35
|
+
reason?: ReactNode;
|
|
36
|
+
/** A picture of the option shown above its label, such as a screenshot of a design choice. */
|
|
37
|
+
image?: ReactNode;
|
|
21
38
|
/** Short identifier in the leading column; defaults to the card's letter in its group: a, b, c. */
|
|
22
39
|
marker?: ReactNode;
|
|
23
|
-
}
|
|
40
|
+
}
|
|
41
|
+
type OptionCardProps = Omit<RadioPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
|
|
24
42
|
/** One option of an `OptionCardGroup`: a bordered card with a leading letter, a bold label and a muted description. */
|
|
25
|
-
declare function OptionCard({ label, description, recommended, recommendedLabel, marker, density, className, ...props }: OptionCardProps): ReactElement;
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
declare function OptionCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker, density, className, ...props }: OptionCardProps): ReactElement;
|
|
44
|
+
type OptionCheckboxCardProps = Omit<CheckboxPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
|
|
45
|
+
/**
|
|
46
|
+
* One option of an `OptionCheckboxGroup`: the same card as `OptionCard`, with a checkbox in the leading column so the
|
|
47
|
+
* group reads as "choose any".
|
|
48
|
+
*/
|
|
49
|
+
declare function OptionCheckboxCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, density, className, ...props }: OptionCheckboxCardProps): ReactElement;
|
|
50
|
+
export { OptionCardGroup, OptionCard, OptionCheckboxGroup, OptionCheckboxCard };
|
|
51
|
+
export type { OptionCardGroupProps, OptionCardProps, OptionCheckboxGroupProps, OptionCheckboxCardProps };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
1
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
2
|
import type { IDensityProps } from "../density/types.js";
|
|
3
|
+
import type { HeadingSize } from "./Heading.js";
|
|
3
4
|
type PageHeaderProps = IDensityProps & {
|
|
4
5
|
title: string;
|
|
6
|
+
/** The title's visual size. Defaults to `xl`; a page's own title can take a display size such as `3xl`. */
|
|
7
|
+
titleSize?: HeadingSize;
|
|
8
|
+
/** Props for the title's `h1`, such as a `ref` and `tabIndex={-1}` so the app can move focus to it. */
|
|
9
|
+
headingProps?: Omit<ComponentProps<"h1">, "children">;
|
|
5
10
|
/** Context above the page title without introducing another heading. */
|
|
6
11
|
eyebrow?: ReactNode;
|
|
7
12
|
description?: ReactNode;
|
|
8
13
|
breadcrumbs?: ReactNode;
|
|
9
14
|
actions?: ReactNode;
|
|
10
15
|
};
|
|
11
|
-
declare function PageHeader({ title, eyebrow, description, breadcrumbs, actions, density }: PageHeaderProps): ReactElement;
|
|
16
|
+
declare function PageHeader({ title, titleSize, headingProps, eyebrow, description, breadcrumbs, actions, density, }: PageHeaderProps): ReactElement;
|
|
12
17
|
export { PageHeader };
|
|
13
18
|
export type { PageHeaderProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
1
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
2
|
import type { IDensityProps } from "../density/types.js";
|
|
3
|
+
import type { HeadingSize } from "./Heading.js";
|
|
3
4
|
type PageIntroHighlight = {
|
|
4
5
|
title: string;
|
|
5
6
|
description: ReactNode;
|
|
@@ -7,6 +8,10 @@ type PageIntroHighlight = {
|
|
|
7
8
|
};
|
|
8
9
|
type PageIntroProps = IDensityProps & {
|
|
9
10
|
title: string;
|
|
11
|
+
/** The title's visual size. Defaults to `2xl`; match the app's page titles with a display size such as `3xl`. */
|
|
12
|
+
titleSize?: HeadingSize;
|
|
13
|
+
/** Props for the title's `h1`, such as a `ref` and `tabIndex={-1}` so the app can move focus to it. */
|
|
14
|
+
headingProps?: Omit<ComponentProps<"h1">, "children">;
|
|
10
15
|
/** One inviting sentence on what this page is for. */
|
|
11
16
|
description: ReactNode;
|
|
12
17
|
/** Context above the page title without introducing another heading. */
|
|
@@ -17,6 +22,6 @@ type PageIntroProps = IDensityProps & {
|
|
|
17
22
|
/** Short items naming what people can do here, laid out in as many columns as the intro's width allows. */
|
|
18
23
|
highlights?: readonly PageIntroHighlight[];
|
|
19
24
|
};
|
|
20
|
-
declare function PageIntro({ title, description, eyebrow, icon, actions, highlights, density }: PageIntroProps): ReactElement;
|
|
25
|
+
declare function PageIntro({ title, titleSize, headingProps, description, eyebrow, icon, actions, highlights, density, }: PageIntroProps): ReactElement;
|
|
21
26
|
export { PageIntro };
|
|
22
27
|
export type { PageIntroHighlight, PageIntroProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { IDensityProps } from "../density/types.js";
|
|
4
|
+
declare const quoteVariants: (props?: ({
|
|
5
|
+
size?: "compact" | "default" | null | undefined;
|
|
6
|
+
clamp?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type QuoteProps = ComponentProps<"blockquote"> & VariantProps<typeof quoteVariants> & IDensityProps;
|
|
9
|
+
/**
|
|
10
|
+
* Text quoted from elsewhere, such as the passage a comment targets or the message a reply answers. A logical
|
|
11
|
+
* start rule marks it as a quote in both reading directions; `compact` fits message footers and bubbles, and `clamp`
|
|
12
|
+
* stops a long quote after two lines.
|
|
13
|
+
*/
|
|
14
|
+
declare function Quote({ size, clamp, density, className, ...props }: QuoteProps): ReactElement;
|
|
15
|
+
export { Quote, quoteVariants };
|
|
16
|
+
export type { QuoteProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactElement } from "react";
|
|
2
|
+
import type { IDensityProps } from "../density/types.js";
|
|
3
|
+
type ReadMoreProps = ComponentProps<"div"> & IDensityProps & {
|
|
4
|
+
/** The height the content folds to, as a CSS length such as `12rem`. Shorter content shows in full. */
|
|
5
|
+
maxHeight: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Long content folded to `maxHeight`, with a More button that shows the rest and Less that folds it again. Content
|
|
9
|
+
* that fits shows in full with no button. The fold fades out its last line so the cut reads as intended.
|
|
10
|
+
*/
|
|
11
|
+
declare function ReadMore({ maxHeight, density, className, style, children, ...props }: ReadMoreProps): ReactElement;
|
|
12
|
+
export { ReadMore };
|
|
13
|
+
export type { ReadMoreProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
|
+
import { ButtonLink } from "./ButtonLink.js";
|
|
3
|
+
type SkipLinkProps = Omit<ComponentProps<typeof ButtonLink>, "variant" | "size" | "href"> & {
|
|
4
|
+
/** The id of the element to skip to. Pass `onClick` as well when the app moves focus itself. */
|
|
5
|
+
targetId: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The first stop for keyboard users: a link to the main content, hidden until it receives keyboard focus, then shown
|
|
9
|
+
* as an outline button pinned to the top start corner. It jumps to `targetId`; an `onClick` that calls
|
|
10
|
+
* `preventDefault` lets the app move focus itself, such as to the page's heading.
|
|
11
|
+
*/
|
|
12
|
+
declare function SkipLink({ targetId, className, children, ...props }: SkipLinkProps): ReactElement;
|
|
13
|
+
export { SkipLink };
|
|
14
|
+
export type { SkipLinkProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const statusDotVariants: (props?: ({
|
|
4
|
+
tone?: "primary" | "muted" | null | undefined;
|
|
5
|
+
placement?: "inline" | "corner" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type StatusDotProps = Omit<ComponentProps<"span">, "children"> & VariantProps<typeof statusDotVariants> & {
|
|
8
|
+
/** A number beside the dot, such as the new items it rolls up; omitted for a single item. */
|
|
9
|
+
count?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A small status dot for "new" or "waiting", with an optional count. Drawn as an SVG fill in `currentColor`, so forced
|
|
13
|
+
* colors keep it visible. It is decorative and hidden from assistive technology: say what it means in nearby text or
|
|
14
|
+
* the control's accessible name.
|
|
15
|
+
*/
|
|
16
|
+
declare function StatusDot({ tone, placement, count, className, ...props }: StatusDotProps): ReactElement;
|
|
17
|
+
export { StatusDot, statusDotVariants };
|
|
18
|
+
export type { StatusDotProps };
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
PaginationPrevious2,
|
|
27
27
|
PaginationNext2,
|
|
28
28
|
PaginationEllipsis2
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-wk3xn989.js";
|
|
30
30
|
import {
|
|
31
31
|
MenuPopup,
|
|
32
32
|
MenuItem2,
|
|
@@ -157,6 +157,7 @@ import"../../chunk-dhtk1cfw.js";
|
|
|
157
157
|
import"../../chunk-tcefvfr8.js";
|
|
158
158
|
import"../../chunk-38barrma.js";
|
|
159
159
|
import"../../chunk-0ef27nx1.js";
|
|
160
|
+
import"../../chunk-bvzjbk43.js";
|
|
160
161
|
import {
|
|
161
162
|
Carousel2,
|
|
162
163
|
CarouselContent2,
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
cn2
|
|
6
6
|
} from "../../chunk-en44w1pn.js";
|
|
7
|
+
import {
|
|
8
|
+
StatusDot2
|
|
9
|
+
} from "../../chunk-bvzjbk43.js";
|
|
7
10
|
import"../../chunk-8ssktt4b.js";
|
|
8
11
|
import"../../chunk-e6hk39ev.js";
|
|
9
12
|
import"../../chunk-x90xmrba.js";
|
|
@@ -88,27 +91,10 @@ function TreeItemStatusIcon({ status, className }) {
|
|
|
88
91
|
});
|
|
89
92
|
}
|
|
90
93
|
function TreeItemDot({ count, className }) {
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
"aria-hidden": "true",
|
|
94
|
+
return /* @__PURE__ */ jsx(StatusDot2, {
|
|
93
95
|
"data-slot": "tree-item-dot",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */ jsx("svg", {
|
|
97
|
-
viewBox: "0 0 8 8",
|
|
98
|
-
className: "size-2 shrink-0",
|
|
99
|
-
focusable: "false",
|
|
100
|
-
children: /* @__PURE__ */ jsx("circle", {
|
|
101
|
-
cx: "4",
|
|
102
|
-
cy: "4",
|
|
103
|
-
r: "4",
|
|
104
|
-
fill: "currentColor"
|
|
105
|
-
})
|
|
106
|
-
}),
|
|
107
|
-
count !== undefined && /* @__PURE__ */ jsx("span", {
|
|
108
|
-
"data-slot": "tree-item-dot-count",
|
|
109
|
-
children: count
|
|
110
|
-
})
|
|
111
|
-
]
|
|
96
|
+
count,
|
|
97
|
+
className
|
|
112
98
|
});
|
|
113
99
|
}
|
|
114
100
|
function isRowControl(event) {
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export { Textarea } from "./components/Textarea.js";
|
|
|
19
19
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./components/Tooltip.js";
|
|
20
20
|
export { Label } from "./components/Label.js";
|
|
21
21
|
export { RadioGroup, RadioGroupItem } from "./components/RadioGroup.js";
|
|
22
|
-
export { OptionCardGroup, OptionCard } from "./components/OptionCardGroup.js";
|
|
23
|
-
export type { OptionCardGroupProps, OptionCardProps } from "./components/OptionCardGroup.js";
|
|
22
|
+
export { OptionCardGroup, OptionCard, OptionCheckboxGroup, OptionCheckboxCard } from "./components/OptionCardGroup.js";
|
|
23
|
+
export type { OptionCardGroupProps, OptionCardProps, OptionCheckboxGroupProps, OptionCheckboxCardProps, } from "./components/OptionCardGroup.js";
|
|
24
24
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, } from "./components/Card.js";
|
|
25
25
|
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, } from "./components/Combobox.js";
|
|
26
26
|
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants } from "./components/Tabs.js";
|
|
@@ -127,6 +127,14 @@ export { Text } from "./components/Text.js";
|
|
|
127
127
|
export type { TextProps, TextSize, TextTone, TextWeight } from "./components/Text.js";
|
|
128
128
|
export type { TextAlign } from "./typography/types.js";
|
|
129
129
|
export { Heading } from "./components/Heading.js";
|
|
130
|
+
export { Quote, quoteVariants } from "./components/Quote.js";
|
|
131
|
+
export { ReadMore } from "./components/ReadMore.js";
|
|
132
|
+
export type { ReadMoreProps } from "./components/ReadMore.js";
|
|
133
|
+
export type { QuoteProps } from "./components/Quote.js";
|
|
134
|
+
export { SkipLink } from "./components/SkipLink.js";
|
|
135
|
+
export type { SkipLinkProps } from "./components/SkipLink.js";
|
|
136
|
+
export { StatusDot, statusDotVariants } from "./components/StatusDot.js";
|
|
137
|
+
export type { StatusDotProps } from "./components/StatusDot.js";
|
|
130
138
|
export type { HeadingProps, HeadingLevel, HeadingSize } from "./components/Heading.js";
|
|
131
139
|
export { WeatherSummary } from "./components/WeatherSummary.js";
|
|
132
140
|
export type { IWeatherDay, TemperatureUnit, WeatherCondition, WeatherSummaryProps, } from "./components/WeatherSummary.js";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
AccordionTrigger2,
|
|
15
15
|
AccordionContent2,
|
|
16
16
|
OptionCardGroup2,
|
|
17
|
+
OptionCheckboxGroup2,
|
|
17
18
|
OptionCard2,
|
|
19
|
+
OptionCheckboxCard2,
|
|
18
20
|
EmptyState3,
|
|
19
21
|
PageMessage2,
|
|
20
22
|
ActionBar2,
|
|
@@ -164,6 +166,10 @@ import {
|
|
|
164
166
|
Container2,
|
|
165
167
|
Text2,
|
|
166
168
|
Heading2,
|
|
169
|
+
quoteVariants2,
|
|
170
|
+
Quote2,
|
|
171
|
+
ReadMore2,
|
|
172
|
+
SkipLink2,
|
|
167
173
|
WeatherSummary2,
|
|
168
174
|
WeatherForecast2,
|
|
169
175
|
PageHeader2,
|
|
@@ -181,7 +187,7 @@ import {
|
|
|
181
187
|
StatusTracker2,
|
|
182
188
|
DashboardLayout2,
|
|
183
189
|
BillingUsage2
|
|
184
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-wk3xn989.js";
|
|
185
191
|
import {
|
|
186
192
|
Combobox2,
|
|
187
193
|
ComboboxValue2,
|
|
@@ -232,6 +238,10 @@ import {
|
|
|
232
238
|
ToolbarGroup2,
|
|
233
239
|
ToolbarSeparator2
|
|
234
240
|
} from "./chunk-0ef27nx1.js";
|
|
241
|
+
import {
|
|
242
|
+
statusDotVariants2,
|
|
243
|
+
StatusDot2
|
|
244
|
+
} from "./chunk-bvzjbk43.js";
|
|
235
245
|
import {
|
|
236
246
|
Slider2
|
|
237
247
|
} from "./chunk-7cq1s2ey.js";
|
|
@@ -768,6 +778,8 @@ export {
|
|
|
768
778
|
NumberFieldScrubAreaCursor2 as NumberFieldScrubAreaCursor,
|
|
769
779
|
OptionCard2 as OptionCard,
|
|
770
780
|
OptionCardGroup2 as OptionCardGroup,
|
|
781
|
+
OptionCheckboxCard2 as OptionCheckboxCard,
|
|
782
|
+
OptionCheckboxGroup2 as OptionCheckboxGroup,
|
|
771
783
|
OptionSelect2 as OptionSelect,
|
|
772
784
|
Outline2 as Outline,
|
|
773
785
|
OutlineItem2 as OutlineItem,
|
|
@@ -795,8 +807,10 @@ export {
|
|
|
795
807
|
ProgressLabel2 as ProgressLabel,
|
|
796
808
|
ProgressTrack2 as ProgressTrack,
|
|
797
809
|
ProgressValue2 as ProgressValue,
|
|
810
|
+
Quote2 as Quote,
|
|
798
811
|
RadioGroup2 as RadioGroup,
|
|
799
812
|
RadioGroupItem2 as RadioGroupItem,
|
|
813
|
+
ReadMore2 as ReadMore,
|
|
800
814
|
ReviewList2 as ReviewList,
|
|
801
815
|
ScrollArea2 as ScrollArea,
|
|
802
816
|
ScrollBar2 as ScrollBar,
|
|
@@ -845,11 +859,13 @@ export {
|
|
|
845
859
|
SidebarSeparator2 as SidebarSeparator,
|
|
846
860
|
SidebarTrigger2 as SidebarTrigger,
|
|
847
861
|
Skeleton2 as Skeleton,
|
|
862
|
+
SkipLink2 as SkipLink,
|
|
848
863
|
Slider2 as Slider,
|
|
849
864
|
Spinner2 as Spinner,
|
|
850
865
|
Stack2 as Stack,
|
|
851
866
|
StarRating2 as StarRating,
|
|
852
867
|
StatCard2 as StatCard,
|
|
868
|
+
StatusDot2 as StatusDot,
|
|
853
869
|
StatusTracker2 as StatusTracker,
|
|
854
870
|
Stepper2 as Stepper,
|
|
855
871
|
StepperContent2 as StepperContent,
|
|
@@ -911,6 +927,8 @@ export {
|
|
|
911
927
|
formatDataLabel2 as formatDataLabel,
|
|
912
928
|
markerVariants2 as markerVariants,
|
|
913
929
|
navigationMenuTriggerStyle2 as navigationMenuTriggerStyle,
|
|
930
|
+
quoteVariants2 as quoteVariants,
|
|
931
|
+
statusDotVariants2 as statusDotVariants,
|
|
914
932
|
tabsListVariants2 as tabsListVariants,
|
|
915
933
|
toggleVariants2 as toggleVariants,
|
|
916
934
|
useComboboxAnchor2 as useComboboxAnchor,
|
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.
|
|
2054
|
+
version: "0.0.126",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact and comfortable densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
package/dist/typeset.css
CHANGED
|
@@ -198,8 +198,11 @@
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/* GFM task lists. */
|
|
201
|
-
&:where(
|
|
201
|
+
&:where(li.task-list-item) {
|
|
202
202
|
list-style-type: none;
|
|
203
|
+
}
|
|
204
|
+
/* A list of only task items needs no bullet column; a mixed list keeps it for its plain items. */
|
|
205
|
+
&:where(ul.contains-task-list:not(:has(> li:not(.task-list-item)))) {
|
|
203
206
|
padding-inline-start: 0.25em;
|
|
204
207
|
}
|
|
205
208
|
&:where(li.task-list-item > input[type="checkbox"]) {
|
|
@@ -54,3 +54,19 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
54
54
|
</div>)
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
|
+
|
|
58
|
+
### Horizontal
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
{
|
|
62
|
+
args: { "aria-label": "Shortcuts" },
|
|
63
|
+
render: (args) => (<div className="w-96">
|
|
64
|
+
<DescriptionList {...args} orientation="horizontal">
|
|
65
|
+
{shortcuts.map(({ action, keys }) => (<DescriptionListItem key={action}>
|
|
66
|
+
<DescriptionTerm tone="default">{action}</DescriptionTerm>
|
|
67
|
+
<DescriptionDetails>{keys}</DescriptionDetails>
|
|
68
|
+
</DescriptionListItem>))}
|
|
69
|
+
</DescriptionList>
|
|
70
|
+
</div>)
|
|
71
|
+
}
|
|
72
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Heading
|
|
2
2
|
|
|
3
|
-
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.
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
5
|
Story: @alexgorbatchev/shadcn/components/data-display/Heading
|
|
6
6
|
Source: src/components/stories/data-display/Heading.stories.tsx
|
|
@@ -24,7 +24,7 @@ Heading
|
|
|
24
24
|
```tsx
|
|
25
25
|
{
|
|
26
26
|
level: { control: "select", options: [1, 2, 3, 4, 5, 6] },
|
|
27
|
-
size: { control: "select", options: ["sm", "base", "lg", "xl"] },
|
|
27
|
+
size: { control: "select", options: ["sm", "base", "lg", "xl", "2xl", "3xl"] },
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -64,6 +64,22 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
64
64
|
}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### DisplaySizes
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
{
|
|
71
|
+
render: () => (<>
|
|
72
|
+
<Heading level={1} size="3xl">
|
|
73
|
+
Page title
|
|
74
|
+
</Heading>
|
|
75
|
+
<Heading level={1} size="2xl">
|
|
76
|
+
Smaller page title
|
|
77
|
+
</Heading>
|
|
78
|
+
<Heading level={1}>Default page</Heading>
|
|
79
|
+
</>)
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
67
83
|
### Truncated
|
|
68
84
|
|
|
69
85
|
```tsx
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Quote
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
Story: @alexgorbatchev/shadcn/components/data-display/Quote
|
|
6
|
+
Source: src/components/stories/data-display/Quote.stories.tsx
|
|
7
|
+
|
|
8
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/data-display/Quote.stories.tsx)
|
|
9
|
+
|
|
10
|
+
## Public imports
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { Quote } from "@alexgorbatchev/shadcn";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Default component
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
Quote
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Story controls
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
{
|
|
26
|
+
size: { control: "select", options: ["default", "compact"] },
|
|
27
|
+
clamp: { control: "boolean" },
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Default args
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
{ children: "Keep the sidebar compact and the toolbar visible." }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
40
|
+
|
|
41
|
+
### Default
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
{
|
|
45
|
+
args: { "aria-label": "Replying to" }
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Compact
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
{
|
|
53
|
+
render: () => (<>
|
|
54
|
+
<Quote aria-label="Default quote">Default size</Quote>
|
|
55
|
+
<Quote aria-label="Compact quote" size="compact">
|
|
56
|
+
Compact size
|
|
57
|
+
</Quote>
|
|
58
|
+
</>)
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Clamped
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
{
|
|
66
|
+
args: {
|
|
67
|
+
clamp: true,
|
|
68
|
+
"aria-label": "Clamped quote",
|
|
69
|
+
children: "A long passage quoted from the page that goes on well past two lines in a narrow column, so the quote stops after two lines instead of pushing the comment it belongs to far down the panel.",
|
|
70
|
+
},
|
|
71
|
+
decorators: [
|
|
72
|
+
(Story) => (<div className="w-56">
|
|
73
|
+
<Story />
|
|
74
|
+
</div>),
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### RightToLeft
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
{
|
|
83
|
+
args: { "aria-label": "RTL quote" },
|
|
84
|
+
decorators: [
|
|
85
|
+
(Story) => (<div dir="rtl">
|
|
86
|
+
<Story />
|
|
87
|
+
</div>),
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# StatusDot
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
Story: @alexgorbatchev/shadcn/components/data-display/StatusDot
|
|
6
|
+
Source: src/components/stories/data-display/StatusDot.stories.tsx
|
|
7
|
+
|
|
8
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/data-display/StatusDot.stories.tsx)
|
|
9
|
+
|
|
10
|
+
## Public imports
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { Button, StatusDot } from "@alexgorbatchev/shadcn";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Supporting imports
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { BellIcon } from "lucide-react";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Default component
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
StatusDot
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Story controls
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
{
|
|
32
|
+
tone: { control: "select", options: ["primary", "muted"] },
|
|
33
|
+
placement: { control: "select", options: ["inline", "corner"] },
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
40
|
+
|
|
41
|
+
### Inline
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
{
|
|
45
|
+
render: (args) => (<p className="flex items-center gap-2 text-sm">
|
|
46
|
+
<StatusDot {...args}/>
|
|
47
|
+
Needs your answers
|
|
48
|
+
</p>)
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Tones
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
{
|
|
56
|
+
render: () => (<div className="flex items-center gap-4 text-sm">
|
|
57
|
+
<StatusDot data-testid="primary"/>
|
|
58
|
+
<StatusDot data-testid="muted" tone="muted"/>
|
|
59
|
+
</div>)
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### WithCount
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
{
|
|
67
|
+
args: { count: 3 }
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Corner
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
{
|
|
75
|
+
render: () => (<Button variant="outline" size="icon" aria-label="Notifications, unread" className="relative">
|
|
76
|
+
<BellIcon aria-hidden="true"/>
|
|
77
|
+
<StatusDot placement="corner"/>
|
|
78
|
+
</Button>)
|
|
79
|
+
}
|
|
80
|
+
```
|