@alexgorbatchev/shadcn 0.0.193 → 0.0.195
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-8jsnbs5p.js → chunk-7ymh5yqk.js} +1 -1
- package/dist/{chunk-4ehtkgtj.js → chunk-ddp4e9s0.js} +1 -1
- package/dist/{chunk-p53tysw2.js → chunk-zxxvw5b9.js} +8 -3
- 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 +56 -0
- package/package.json +1 -1
|
@@ -5,7 +5,12 @@ import {
|
|
|
5
5
|
// src/components/Alert.tsx
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var alertVariants = cva(
|
|
8
|
+
var alertVariants = cva([
|
|
9
|
+
"group/alert relative grid w-full grid-cols-[1fr] gap-x-2 gap-y-0.5 rounded-sm border p-panel text-start text-sm",
|
|
10
|
+
"has-[>svg]:grid-cols-[auto_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:has-data-[slot=alert-action]:grid-cols-[auto_1fr_auto]",
|
|
11
|
+
"*:[svg]:col-start-1 *:[svg]:row-start-1 *:[svg]:self-center has-data-[slot=alert-title]:has-data-[slot=alert-description]:*:[svg]:row-span-2",
|
|
12
|
+
"*:[svg]:text-current *:[svg:not([class*='size-'])]:size-4"
|
|
13
|
+
].join(" "), {
|
|
9
14
|
variants: {
|
|
10
15
|
variant: {
|
|
11
16
|
default: "bg-card text-card-foreground",
|
|
@@ -40,7 +45,7 @@ function AlertDescription2({ density, className, ...props }) {
|
|
|
40
45
|
return /* @__PURE__ */ jsx("div", {
|
|
41
46
|
"data-density": density,
|
|
42
47
|
"data-slot": "alert-description",
|
|
43
|
-
className: cn2("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
48
|
+
className: cn2("col-span-full text-sm text-balance text-muted-foreground group-has-[>svg]/alert:col-start-2 md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
44
49
|
...props
|
|
45
50
|
});
|
|
46
51
|
}
|
|
@@ -48,7 +53,7 @@ function AlertAction2({ density, className, ...props }) {
|
|
|
48
53
|
return /* @__PURE__ */ jsx("div", {
|
|
49
54
|
"data-density": density,
|
|
50
55
|
"data-slot": "alert-action",
|
|
51
|
-
className: cn2("
|
|
56
|
+
className: cn2("col-end-[-1] row-start-1 flex h-[1lh] items-center justify-self-end", className),
|
|
52
57
|
...props
|
|
53
58
|
});
|
|
54
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GuardrailNotice2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-ddp4e9s0.js";
|
|
4
|
+
import"../../../chunk-zxxvw5b9.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-zxxvw5b9.js";
|
|
301
301
|
import {
|
|
302
302
|
GuardrailNotice2
|
|
303
|
-
} from "../../chunk-
|
|
303
|
+
} from "../../chunk-ddp4e9s0.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-7ymh5yqk.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-zxxvw5b9.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-7ymh5yqk.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-zxxvw5b9.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.195",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -131,3 +131,59 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
131
131
|
args: { dir: "rtl" }
|
|
132
132
|
}
|
|
133
133
|
```
|
|
134
|
+
|
|
135
|
+
### IconCentredOnText
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
{
|
|
139
|
+
render: () => (<div className="flex w-80 flex-col gap-2">
|
|
140
|
+
{densities.map((density) => variants.map((variant) => (<div key={`${density}-${variant}`} className="flex flex-col gap-2">
|
|
141
|
+
<Alert variant={variant} density={density} data-case="title">
|
|
142
|
+
<CircleAlertIcon />
|
|
143
|
+
<AlertTitle>Changes saved</AlertTitle>
|
|
144
|
+
</Alert>
|
|
145
|
+
<Alert variant={variant} density={density} data-case="description">
|
|
146
|
+
<CircleAlertIcon />
|
|
147
|
+
<AlertTitle>Changes saved</AlertTitle>
|
|
148
|
+
<AlertDescription>Your project is up to date.</AlertDescription>
|
|
149
|
+
</Alert>
|
|
150
|
+
<Alert variant={variant} density={density} data-case="wrapping">
|
|
151
|
+
<CircleAlertIcon />
|
|
152
|
+
<AlertTitle>Changes saved</AlertTitle>
|
|
153
|
+
<AlertDescription>{wrappingDescription}</AlertDescription>
|
|
154
|
+
</Alert>
|
|
155
|
+
</div>)))}
|
|
156
|
+
</div>)
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### ActionOnTitleBaseline
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
{
|
|
164
|
+
render: () => (<div className="flex w-96 flex-col gap-2">
|
|
165
|
+
{densities.map((density) => [true, false].map((hasAction) => (<div key={`${density}-${String(hasAction)}`} className="flex flex-col gap-2">
|
|
166
|
+
<Alert density={density} data-case="title" data-action={hasAction}>
|
|
167
|
+
<AlertTitle>Message archived</AlertTitle>
|
|
168
|
+
{hasAction && (<AlertAction>
|
|
169
|
+
<Button size="xs">Undo</Button>
|
|
170
|
+
</AlertAction>)}
|
|
171
|
+
</Alert>
|
|
172
|
+
<Alert density={density} data-case="description" data-action={hasAction}>
|
|
173
|
+
<AlertTitle>Message archived</AlertTitle>
|
|
174
|
+
<AlertDescription>It moved to the archive.</AlertDescription>
|
|
175
|
+
{hasAction && (<AlertAction>
|
|
176
|
+
<Button size="xs">Undo</Button>
|
|
177
|
+
</AlertAction>)}
|
|
178
|
+
</Alert>
|
|
179
|
+
<Alert density={density} data-case="wrapping" data-action={hasAction}>
|
|
180
|
+
<AlertTitle>Message archived</AlertTitle>
|
|
181
|
+
<AlertDescription>{wrappingDescription}</AlertDescription>
|
|
182
|
+
{hasAction && (<AlertAction>
|
|
183
|
+
<Button size="xs">Undo</Button>
|
|
184
|
+
</AlertAction>)}
|
|
185
|
+
</Alert>
|
|
186
|
+
</div>)))}
|
|
187
|
+
</div>)
|
|
188
|
+
}
|
|
189
|
+
```
|