@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.
@@ -44,7 +44,7 @@ import {
44
44
  Alert2,
45
45
  AlertTitle2,
46
46
  AlertDescription2
47
- } from "./chunk-p53tysw2.js";
47
+ } from "./chunk-zxxvw5b9.js";
48
48
  import {
49
49
  Dialog2,
50
50
  DialogClose2,
@@ -8,7 +8,7 @@ import {
8
8
  Alert2,
9
9
  AlertTitle2,
10
10
  AlertDescription2
11
- } from "./chunk-p53tysw2.js";
11
+ } from "./chunk-zxxvw5b9.js";
12
12
  import {
13
13
  mono
14
14
  } from "./chunk-fgmcbtyt.js";
@@ -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("group/alert relative grid w-full gap-0.5 rounded-sm border p-panel text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
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("absolute top-2 end-2", className),
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-4ehtkgtj.js";
4
- import"../../../chunk-p53tysw2.js";
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-p53tysw2.js";
300
+ import"../../chunk-zxxvw5b9.js";
301
301
  import {
302
302
  GuardrailNotice2
303
- } from "../../chunk-4ehtkgtj.js";
303
+ } from "../../chunk-ddp4e9s0.js";
304
304
  import {
305
305
  ImageRoot2,
306
306
  ImagePreview2,
@@ -7,7 +7,7 @@ import {
7
7
  Alert2,
8
8
  AlertTitle2,
9
9
  AlertDescription2
10
- } from "../../chunk-p53tysw2.js";
10
+ } from "../../chunk-zxxvw5b9.js";
11
11
  import"../../chunk-e6hk39ev.js";
12
12
  import"../../chunk-x90xmrba.js";
13
13
  import"../../chunk-jpvw9xqy.js";
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-8jsnbs5p.js";
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-p53tysw2.js";
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
- /** Unchanged lines kept around each change; longer unchanged runs fold behind a button. Defaults to 3. */
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-8jsnbs5p.js";
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-p53tysw2.js";
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.193",
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: {
@@ -47,6 +47,14 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
47
47
  {}
48
48
  ```
49
49
 
50
+ ### EveryLine
51
+
52
+ ```tsx
53
+ {
54
+ args: { contextLines: Number.POSITIVE_INFINITY }
55
+ }
56
+ ```
57
+
50
58
  ### SideBySide
51
59
 
52
60
  ```tsx
@@ -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
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.193",
3
+ "version": "0.0.195",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {