@alexgorbatchev/shadcn 0.0.194 → 0.0.196
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-ddp4e9s0.js → chunk-231fr3v5.js} +1 -1
- package/dist/{chunk-7ymh5yqk.js → chunk-k4pq56ff.js} +1 -1
- package/dist/{chunk-zxxvw5b9.js → chunk-n3br443n.js} +18 -8
- package/dist/components/Alert.d.ts +2 -1
- package/dist/components/assistant-ui/elements/GuardrailNotice.js +2 -2
- package/dist/components/assistant-ui/index.js +2 -2
- package/dist/components/input-otp/index.js +1 -1
- package/dist/components/json-render/index.js +2 -2
- package/dist/components/text-diff/TextDiff.d.ts +4 -1
- package/dist/components/text-diff/groupDiffLines.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/prototype.js +1 -1
- package/llms/components/data-display/TextDiff.md +8 -0
- package/llms/components/feedback/Alert.md +26 -1
- package/package.json +1 -1
|
@@ -13,23 +13,33 @@ var alertVariants = cva([
|
|
|
13
13
|
].join(" "), {
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
|
-
default: "
|
|
17
|
-
success: "
|
|
18
|
-
warning: "
|
|
19
|
-
info: "
|
|
20
|
-
destructive: "
|
|
16
|
+
default: "text-card-foreground [--alert-tone:var(--color-foreground)]",
|
|
17
|
+
success: "text-success [--alert-tone:var(--color-success)] *:data-[slot=alert-description]:text-current",
|
|
18
|
+
warning: "text-warning [--alert-tone:var(--color-warning)] *:data-[slot=alert-description]:text-current",
|
|
19
|
+
info: "text-primary [--alert-tone:var(--color-primary)] *:data-[slot=alert-description]:text-current",
|
|
20
|
+
destructive: "text-destructive [--alert-tone:var(--color-destructive)] *:data-[slot=alert-description]:text-current"
|
|
21
|
+
},
|
|
22
|
+
appearance: {
|
|
23
|
+
tint: "border-(--alert-tone)/40 bg-(--alert-tone)/8",
|
|
24
|
+
outline: "border-(--alert-tone) bg-transparent"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
27
|
+
compoundVariants: [
|
|
28
|
+
{ variant: "default", appearance: "tint", className: "border-border bg-(--alert-tone)/4" },
|
|
29
|
+
{ variant: "default", appearance: "outline", className: "border-border" }
|
|
30
|
+
],
|
|
23
31
|
defaultVariants: {
|
|
24
|
-
variant: "default"
|
|
32
|
+
variant: "default",
|
|
33
|
+
appearance: "tint"
|
|
25
34
|
}
|
|
26
35
|
});
|
|
27
|
-
function Alert2({ density, className, variant, ...props }) {
|
|
36
|
+
function Alert2({ density, className, variant, appearance, ...props }) {
|
|
28
37
|
return /* @__PURE__ */ jsx("div", {
|
|
29
38
|
"data-density": density,
|
|
30
39
|
"data-slot": "alert",
|
|
40
|
+
"data-appearance": appearance ?? "tint",
|
|
31
41
|
role: "alert",
|
|
32
|
-
className: cn2(alertVariants({ variant }), className),
|
|
42
|
+
className: cn2(alertVariants({ variant, appearance }), className),
|
|
33
43
|
...props
|
|
34
44
|
});
|
|
35
45
|
}
|
|
@@ -3,9 +3,10 @@ import type { ComponentProps, ReactElement } from "react";
|
|
|
3
3
|
import { type VariantProps } from "class-variance-authority";
|
|
4
4
|
declare const alertVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
6
|
+
appearance?: "outline" | "tint" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
8
|
type AlertProps = ComponentProps<"div"> & VariantProps<typeof alertVariants> & IDensityProps;
|
|
8
|
-
declare function Alert({ density, className, variant, ...props }: AlertProps): ReactElement;
|
|
9
|
+
declare function Alert({ density, className, variant, appearance, ...props }: AlertProps): ReactElement;
|
|
9
10
|
type AlertTitleProps = ComponentProps<"div"> & IDensityProps;
|
|
10
11
|
declare function AlertTitle({ density, className, ...props }: AlertTitleProps): ReactElement;
|
|
11
12
|
type AlertDescriptionProps = ComponentProps<"div"> & IDensityProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GuardrailNotice2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-231fr3v5.js";
|
|
4
|
+
import"../../../chunk-n3br443n.js";
|
|
5
5
|
import"../../../chunk-n63meq6q.js";
|
|
6
6
|
import"../../../chunk-x90xmrba.js";
|
|
7
7
|
import"../../../chunk-jpvw9xqy.js";
|
|
@@ -297,10 +297,10 @@ import {
|
|
|
297
297
|
import {
|
|
298
298
|
GitHubIcon2
|
|
299
299
|
} from "../../chunk-4bjqbky7.js";
|
|
300
|
-
import"../../chunk-
|
|
300
|
+
import"../../chunk-n3br443n.js";
|
|
301
301
|
import {
|
|
302
302
|
GuardrailNotice2
|
|
303
|
-
} from "../../chunk-
|
|
303
|
+
} from "../../chunk-231fr3v5.js";
|
|
304
304
|
import {
|
|
305
305
|
ImageRoot2,
|
|
306
306
|
ImagePreview2,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
PaginationPrevious2,
|
|
27
27
|
PaginationNext2,
|
|
28
28
|
PaginationEllipsis2
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-k4pq56ff.js";
|
|
30
30
|
import {
|
|
31
31
|
MenuPopup,
|
|
32
32
|
MenuItem2,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
Alert2,
|
|
40
40
|
AlertTitle2,
|
|
41
41
|
AlertDescription2
|
|
42
|
-
} from "../../chunk-
|
|
42
|
+
} from "../../chunk-n3br443n.js";
|
|
43
43
|
import {
|
|
44
44
|
Dialog2,
|
|
45
45
|
DialogContent2,
|
|
@@ -13,7 +13,10 @@ export interface ITextDiffProps extends Omit<ComponentProps<"div">, "children">
|
|
|
13
13
|
viewMode?: TextDiffViewMode | undefined;
|
|
14
14
|
/** The narrowest own width, in pixels, that shows the versions side by side in `auto` mode; defaults to 560. */
|
|
15
15
|
splitMinWidth?: number | undefined;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Unchanged lines kept around each change; longer unchanged runs fold behind a button. Defaults to 3. `Infinity` keeps
|
|
18
|
+
* every line, so nothing folds and no button shows.
|
|
19
|
+
*/
|
|
17
20
|
contextLines?: number | undefined;
|
|
18
21
|
showLineNumbers?: boolean | undefined;
|
|
19
22
|
}
|
|
@@ -3,6 +3,6 @@ import type { TextDiffSegment } from "./types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Splits diff lines into shown lines and runs of unchanged lines that fold away: an unchanged line stays shown when it
|
|
5
5
|
* is within `contextLines` of a change, and a hidden run of one line stays shown because folding it saves nothing. With
|
|
6
|
-
* no change at all, every line stays shown.
|
|
6
|
+
* no change at all, or with `contextLines` of `Infinity`, every line stays shown.
|
|
7
7
|
*/
|
|
8
8
|
export declare function groupDiffLines(lines: readonly IParsedDiffLine[], contextLines: number): TextDiffSegment[];
|
package/dist/index.js
CHANGED
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
DashboardLayout2,
|
|
189
189
|
BillingUsage2,
|
|
190
190
|
SelectionAction2
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-k4pq56ff.js";
|
|
192
192
|
import {
|
|
193
193
|
statusDotVariants2,
|
|
194
194
|
StatusDot2
|
|
@@ -324,7 +324,7 @@ import {
|
|
|
324
324
|
AlertTitle2,
|
|
325
325
|
AlertDescription2,
|
|
326
326
|
AlertAction2
|
|
327
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-n3br443n.js";
|
|
328
328
|
import {
|
|
329
329
|
FieldSet2,
|
|
330
330
|
FieldLegend2,
|
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.196",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -26,7 +26,10 @@ Alert
|
|
|
26
26
|
## Story controls
|
|
27
27
|
|
|
28
28
|
```tsx
|
|
29
|
-
{
|
|
29
|
+
{
|
|
30
|
+
variant: { control: "select", options: ["default", "destructive", "success", "warning", "info"] },
|
|
31
|
+
appearance: { control: "select", options: ["tint", "outline"] },
|
|
32
|
+
}
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
## Default render
|
|
@@ -132,6 +135,28 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
132
135
|
}
|
|
133
136
|
```
|
|
134
137
|
|
|
138
|
+
### Outline
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
{
|
|
142
|
+
args: { appearance: "outline", variant: "success" }
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### TintAndOutlineScale
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
{
|
|
150
|
+
render: () => (<div className="flex w-80 flex-col gap-2">
|
|
151
|
+
{appearances.map((appearance) => variants.map((variant) => (<Alert key={`${appearance}-${variant}`} variant={variant} appearance={appearance} data-variant={variant}>
|
|
152
|
+
<CircleAlertIcon />
|
|
153
|
+
<AlertTitle>Changes saved</AlertTitle>
|
|
154
|
+
<AlertDescription>Your project is up to date.</AlertDescription>
|
|
155
|
+
</Alert>)))}
|
|
156
|
+
</div>)
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
135
160
|
### IconCentredOnText
|
|
136
161
|
|
|
137
162
|
```tsx
|