@alexgorbatchev/shadcn 0.0.151 → 0.0.152

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.
Files changed (31) hide show
  1. package/dist/{chunk-m32ptxf3.js → chunk-4m2x9jfb.js} +1 -1
  2. package/dist/{chunk-p0d89mze.js → chunk-5q0670jv.js} +1 -1
  3. package/dist/{chunk-bfv4qesg.js → chunk-9e1yb90r.js} +1 -1
  4. package/dist/{chunk-ngttdb6m.js → chunk-fbajrfv6.js} +1 -1
  5. package/dist/{chunk-cbyqgfv4.js → chunk-kevm8s2n.js} +1 -1
  6. package/dist/{chunk-3dttg1b6.js → chunk-ncskzkqr.js} +1 -1
  7. package/dist/{chunk-avp2phea.js → chunk-rf70907h.js} +20 -11
  8. package/dist/{chunk-7q8kp3t5.js → chunk-ywr2pqhc.js} +1 -1
  9. package/dist/components/Item.d.ts +3 -1
  10. package/dist/components/OptionCardGroup.d.ts +11 -4
  11. package/dist/components/assistant-ui/elements/EditMessage.js +3 -3
  12. package/dist/components/assistant-ui/elements/ElicitationForm.js +3 -3
  13. package/dist/components/assistant-ui/elements/FeedbackDialog.js +3 -3
  14. package/dist/components/assistant-ui/elements/ModelPicker.js +3 -3
  15. package/dist/components/assistant-ui/index.js +6 -6
  16. package/dist/components/assistant-ui/native/McpConfigDialog.js +2 -2
  17. package/dist/components/assistant-ui/native/index.js +2 -2
  18. package/dist/components/data-grid/index.js +1 -1
  19. package/dist/components/event-calendar/index.js +2 -2
  20. package/dist/components/image-viewer/index.js +2 -2
  21. package/dist/components/input-otp/index.js +2 -2
  22. package/dist/components/json-render/JsonForm.d.ts +3 -1
  23. package/dist/components/json-render/index.js +16 -9
  24. package/dist/index.js +3 -3
  25. package/dist/prototype.js +1 -1
  26. package/llms/components/data-display/Item.md +36 -0
  27. package/llms/components/data-display/JsonRenderForm.md +11 -1
  28. package/llms/components/forms/Label.md +14 -0
  29. package/llms/components/forms/OptionCardGroup.md +24 -0
  30. package/llms/components/layout/Accordion.md +29 -0
  31. package/package.json +1 -1
@@ -9,7 +9,7 @@ function Label2({ density, className, ...props }) {
9
9
  return /* @__PURE__ */ jsx("label", {
10
10
  "data-density": density,
11
11
  "data-slot": "label",
12
- className: cn2("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
12
+ className: cn2("flex min-w-0 items-center gap-2 text-sm leading-snug font-medium wrap-break-word select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
13
13
  ...props
14
14
  });
15
15
  }
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  Field2,
11
11
  FieldLabel2
12
- } from "./chunk-bfv4qesg.js";
12
+ } from "./chunk-9e1yb90r.js";
13
13
  import {
14
14
  Textarea2
15
15
  } from "./chunk-p51p95er.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-en44w1pn.js";
4
4
  import {
5
5
  Label2
6
- } from "./chunk-m32ptxf3.js";
6
+ } from "./chunk-4m2x9jfb.js";
7
7
  import {
8
8
  Separator2
9
9
  } from "./chunk-52aadmkc.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  Field2,
14
14
  FieldLabel2
15
- } from "./chunk-bfv4qesg.js";
15
+ } from "./chunk-9e1yb90r.js";
16
16
  import {
17
17
  Textarea2
18
18
  } from "./chunk-p51p95er.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-7vg045gd.js";
31
31
  import {
32
32
  Label2
33
- } from "./chunk-m32ptxf3.js";
33
+ } from "./chunk-4m2x9jfb.js";
34
34
  import {
35
35
  Separator2
36
36
  } from "./chunk-52aadmkc.js";
@@ -13,7 +13,7 @@ import {
13
13
  FieldGroup2,
14
14
  Field2,
15
15
  FieldLabel2
16
- } from "./chunk-bfv4qesg.js";
16
+ } from "./chunk-9e1yb90r.js";
17
17
  import {
18
18
  RadioGroup2,
19
19
  RadioGroupItem2
@@ -71,7 +71,7 @@ import {
71
71
  Field2,
72
72
  FieldLabel2,
73
73
  FieldDescription2
74
- } from "./chunk-bfv4qesg.js";
74
+ } from "./chunk-9e1yb90r.js";
75
75
  import {
76
76
  Textarea2
77
77
  } from "./chunk-p51p95er.js";
@@ -442,7 +442,7 @@ function AccordionItem2({ density, className, ...props }) {
442
442
  return /* @__PURE__ */ jsx5(AccordionPrimitive.Item, {
443
443
  "data-density": density,
444
444
  "data-slot": "accordion-item",
445
- className: (state) => cn2("not-last:border-b", typeof className === "function" ? className(state) : className),
445
+ className: (state) => cn2("min-w-0 not-last:border-b", typeof className === "function" ? className(state) : className),
446
446
  ...props
447
447
  });
448
448
  }
@@ -454,12 +454,12 @@ function AccordionTrigger2({
454
454
  ...props
455
455
  }) {
456
456
  return /* @__PURE__ */ jsx5(AccordionPrimitive.Header, {
457
- className: "flex",
457
+ className: "flex min-w-0",
458
458
  children: /* @__PURE__ */ jsxs3(AccordionPrimitive.Trigger, {
459
459
  "data-density": density,
460
460
  "data-slot": "accordion-trigger",
461
461
  "data-chevron-placement": chevronPlacement,
462
- className: (state) => cn2("group/accordion-trigger relative flex flex-1 items-start rounded-sm border border-transparent py-2.5 text-start text-sm font-medium transition-colors outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", chevronPlacement === "end" ? "justify-between **:data-[slot=accordion-trigger-icon]:ms-auto" : "justify-start gap-2 **:data-[slot=accordion-trigger-icon]:mt-0.5", typeof className === "function" ? className(state) : className),
462
+ className: (state) => cn2("group/accordion-trigger relative flex min-w-0 flex-1 items-start rounded-sm border border-transparent py-2.5 text-start text-sm font-medium wrap-break-word transition-colors outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", chevronPlacement === "end" ? "justify-between **:data-[slot=accordion-trigger-icon]:ms-auto" : "justify-start gap-2 **:data-[slot=accordion-trigger-icon]:mt-0.5", typeof className === "function" ? className(state) : className),
463
463
  ...props,
464
464
  children: [
465
465
  children,
@@ -482,7 +482,7 @@ function AccordionContent2({ density, className, children, ...props }) {
482
482
  className: (state) => cn2("h-(--accordion-panel-height) overflow-hidden text-sm transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0", typeof className === "function" ? className(state) : className),
483
483
  ...props,
484
484
  children: /* @__PURE__ */ jsx5("div", {
485
- className: "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
485
+ className: "min-w-0 pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&>p:not(:last-child)]:mb-4",
486
486
  children
487
487
  })
488
488
  });
@@ -533,7 +533,7 @@ function OptionCheckboxGroup2({
533
533
  onValueChange: trackedOnValueChange
534
534
  });
535
535
  }
536
- var CARD_CLASS = "group/option-card grid w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-checked:border-primary data-checked:ring-1 data-checked:ring-primary forced-colors:data-checked:border-[color:Highlight] aria-invalid:not-data-checked:border-destructive data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-card data-readonly:cursor-default data-folding:pb-10";
536
+ var CARD_CLASS = "group/option-card grid h-full w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-checked:border-primary data-checked:ring-1 data-checked:ring-primary forced-colors:data-checked:border-[color:Highlight] aria-invalid:not-data-checked:border-destructive data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-card data-readonly:cursor-default data-folding:pb-10";
537
537
  var CARD_CONTROL_SELECTOR = '[data-slot="option-card"], [data-slot="option-checkbox-card"]';
538
538
  function useFold(lines) {
539
539
  const ref = useRef(null);
@@ -679,6 +679,7 @@ function OptionCard2({
679
679
  reason,
680
680
  image,
681
681
  marker,
682
+ span = "auto",
682
683
  density,
683
684
  className,
684
685
  ...props
@@ -710,7 +711,8 @@ function OptionCard2({
710
711
  };
711
712
  return /* @__PURE__ */ jsxs4("div", {
712
713
  "data-slot": "option-card-item",
713
- className: "relative min-w-0",
714
+ "data-span": span === "full" ? "full" : undefined,
715
+ className: cn2("relative min-w-0", span === "full" && "col-span-full"),
714
716
  children: [
715
717
  /* @__PURE__ */ jsx6(RadioPrimitive.Root, {
716
718
  "data-density": density,
@@ -742,6 +744,7 @@ function OptionCheckboxCard2({
742
744
  recommendedLabel,
743
745
  reason,
744
746
  image,
747
+ span = "auto",
745
748
  density,
746
749
  className,
747
750
  ...props
@@ -758,7 +761,8 @@ function OptionCheckboxCard2({
758
761
  const content = { label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker };
759
762
  return /* @__PURE__ */ jsxs4("div", {
760
763
  "data-slot": "option-card-item",
761
- className: "relative min-w-0",
764
+ "data-span": span === "full" ? "full" : undefined,
765
+ className: cn2("relative min-w-0", span === "full" && "col-span-full"),
762
766
  children: [
763
767
  /* @__PURE__ */ jsx6(CheckboxPrimitive.Root, {
764
768
  "data-density": density,
@@ -1928,15 +1932,20 @@ function ItemContent2({ density, className, ...props }) {
1928
1932
  return /* @__PURE__ */ jsx21("div", {
1929
1933
  "data-density": density,
1930
1934
  "data-slot": "item-content",
1931
- className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
1935
+ className: cn2("flex min-w-0 flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
1932
1936
  ...props
1933
1937
  });
1934
1938
  }
1935
- function ItemTitle2({ density, className, wrap = false, ...props }) {
1939
+ function ItemTitle2({ density, className, wrap = false, truncate = false, ...props }) {
1936
1940
  return /* @__PURE__ */ jsx21("div", {
1937
1941
  "data-density": density,
1938
1942
  "data-slot": "item-title",
1939
- className: cn2(!wrap && "line-clamp-1", "flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", wrap && "min-w-0 max-w-full wrap-anywhere", className),
1943
+ "data-truncated": truncate || undefined,
1944
+ className: cn2(truncate ? "block min-w-0 max-w-full truncate text-start text-sm leading-snug font-medium underline-offset-4" : [
1945
+ !wrap && "line-clamp-1",
1946
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
1947
+ wrap && "min-w-0 max-w-full wrap-anywhere"
1948
+ ], className),
1940
1949
  ...props
1941
1950
  });
1942
1951
  }
@@ -12,7 +12,7 @@ import {
12
12
  FieldContent2,
13
13
  FieldLabel2,
14
14
  FieldDescription2
15
- } from "./chunk-bfv4qesg.js";
15
+ } from "./chunk-9e1yb90r.js";
16
16
  import {
17
17
  RadioGroup2,
18
18
  RadioGroupItem2
@@ -22,8 +22,10 @@ declare function ItemContent({ density, className, ...props }: ItemContentProps)
22
22
  type ItemTitleProps = ComponentProps<"div"> & IDensityProps & {
23
23
  /** Keep the complete title visible, including long unbroken names. */
24
24
  wrap?: boolean;
25
+ /** Clip to a single line with an ellipsis only when the title overflows its available width. */
26
+ truncate?: boolean;
25
27
  };
26
- declare function ItemTitle({ density, className, wrap, ...props }: ItemTitleProps): ReactElement;
28
+ declare function ItemTitle({ density, className, wrap, truncate, ...props }: ItemTitleProps): ReactElement;
27
29
  type ItemDescriptionProps = ComponentProps<"p"> & IDensityProps;
28
30
  declare function ItemDescription({ density, className, ...props }: ItemDescriptionProps): ReactElement;
29
31
  type ItemActionsProps = ComponentProps<"div"> & IDensityProps;
@@ -50,18 +50,25 @@ interface IOptionCardContentProps {
50
50
  */
51
51
  marker?: ReactNode;
52
52
  }
53
- type OptionCardProps = Omit<RadioPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
53
+ interface IOptionCardSpanProps {
54
+ /**
55
+ * How many columns the card occupies in a `layout="row"` group: `auto` (the default) takes one column; `full`
56
+ * spans the entire row, for a trailing text-only option such as "Something else" below image cards.
57
+ */
58
+ span?: "auto" | "full";
59
+ }
60
+ type OptionCardProps = Omit<RadioPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps & IOptionCardSpanProps;
54
61
  /**
55
62
  * One option of an `OptionCardGroup`: a bordered card with a leading radio mark and letter, a bold label and a muted
56
63
  * description. The radio mark shows the choice by shape as well as colour, and sets single choice apart from an
57
64
  * `OptionCheckboxCard`'s checkbox.
58
65
  */
59
- declare function OptionCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker, density, className, ...props }: OptionCardProps): ReactElement;
60
- type OptionCheckboxCardProps = Omit<CheckboxPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
66
+ declare function OptionCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker, span, density, className, ...props }: OptionCardProps): ReactElement;
67
+ type OptionCheckboxCardProps = Omit<CheckboxPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps & IOptionCardSpanProps;
61
68
  /**
62
69
  * One option of an `OptionCheckboxGroup`: the same card as `OptionCard`, with a checkbox in the leading column so the
63
70
  * group reads as "choose any".
64
71
  */
65
- declare function OptionCheckboxCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, density, className, ...props }: OptionCheckboxCardProps): ReactElement;
72
+ declare function OptionCheckboxCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, span, density, className, ...props }: OptionCheckboxCardProps): ReactElement;
66
73
  export { OptionCardGroup, OptionCard, OptionCheckboxGroup, OptionCheckboxCard };
67
74
  export type { OptionCardGroupProps, OptionCardProps, OptionCheckboxGroupProps, OptionCheckboxCardProps };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  EditMessage2
3
- } from "../../../chunk-p0d89mze.js";
3
+ } from "../../../chunk-5q0670jv.js";
4
4
  import"../../../chunk-vxvaaptq.js";
5
- import"../../../chunk-bfv4qesg.js";
5
+ import"../../../chunk-9e1yb90r.js";
6
6
  import"../../../chunk-jc3cbwyg.js";
7
- import"../../../chunk-m32ptxf3.js";
7
+ import"../../../chunk-4m2x9jfb.js";
8
8
  import"../../../chunk-p51p95er.js";
9
9
  import"../../../chunk-7jpsybag.js";
10
10
  import"../../../chunk-52aadmkc.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ElicitationForm2
3
- } from "../../../chunk-3dttg1b6.js";
3
+ } from "../../../chunk-ncskzkqr.js";
4
4
  import"../../../chunk-vxvaaptq.js";
5
5
  import"../../../chunk-kgqe8gpb.js";
6
6
  import"../../../chunk-m98d89xc.js";
7
- import"../../../chunk-bfv4qesg.js";
7
+ import"../../../chunk-9e1yb90r.js";
8
8
  import"../../../chunk-jc3cbwyg.js";
9
- import"../../../chunk-m32ptxf3.js";
9
+ import"../../../chunk-4m2x9jfb.js";
10
10
  import"../../../chunk-7vg045gd.js";
11
11
  import"../../../chunk-7jpsybag.js";
12
12
  import"../../../chunk-52aadmkc.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  FeedbackDialog2
3
- } from "../../../chunk-ngttdb6m.js";
3
+ } from "../../../chunk-fbajrfv6.js";
4
4
  import"../../../chunk-32ah7jyp.js";
5
- import"../../../chunk-bfv4qesg.js";
5
+ import"../../../chunk-9e1yb90r.js";
6
6
  import"../../../chunk-jc3cbwyg.js";
7
- import"../../../chunk-m32ptxf3.js";
7
+ import"../../../chunk-4m2x9jfb.js";
8
8
  import"../../../chunk-p51p95er.js";
9
9
  import"../../../chunk-7jpsybag.js";
10
10
  import"../../../chunk-52aadmkc.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ModelPicker2
3
- } from "../../../chunk-7q8kp3t5.js";
3
+ } from "../../../chunk-ywr2pqhc.js";
4
4
  import"../../../chunk-kgqe8gpb.js";
5
- import"../../../chunk-bfv4qesg.js";
5
+ import"../../../chunk-9e1yb90r.js";
6
6
  import"../../../chunk-jc3cbwyg.js";
7
7
  import"../../../chunk-dbe9ppwf.js";
8
- import"../../../chunk-m32ptxf3.js";
8
+ import"../../../chunk-4m2x9jfb.js";
9
9
  import"../../../chunk-52aadmkc.js";
10
10
  import"../../../chunk-5mydsjp3.js";
11
11
  import"../../../chunk-8ssktt4b.js";
@@ -224,17 +224,17 @@ import {
224
224
  import {
225
225
  DraftRestore2
226
226
  } from "../../chunk-fvxzrt3b.js";
227
- import"../../chunk-m32ptxf3.js";
227
+ import"../../chunk-4m2x9jfb.js";
228
228
  import"../../chunk-52aadmkc.js";
229
- import"../../chunk-bfv4qesg.js";
229
+ import"../../chunk-9e1yb90r.js";
230
230
  import {
231
231
  EditMessage2
232
- } from "../../chunk-p0d89mze.js";
232
+ } from "../../chunk-5q0670jv.js";
233
233
  import"../../chunk-kgqe8gpb.js";
234
234
  import"../../chunk-m98d89xc.js";
235
235
  import {
236
236
  ElicitationForm2
237
- } from "../../chunk-3dttg1b6.js";
237
+ } from "../../chunk-ncskzkqr.js";
238
238
  import"../../chunk-4e96tpw0.js";
239
239
  import {
240
240
  EmptyState2
@@ -262,7 +262,7 @@ import {
262
262
  import"../../chunk-32ah7jyp.js";
263
263
  import {
264
264
  FeedbackDialog2
265
- } from "../../chunk-ngttdb6m.js";
265
+ } from "../../chunk-fbajrfv6.js";
266
266
  import {
267
267
  FileRoot2,
268
268
  FileIconDisplay2,
@@ -373,7 +373,7 @@ import {
373
373
  } from "../../chunk-k872qrgx.js";
374
374
  import {
375
375
  ModelPicker2
376
- } from "../../chunk-7q8kp3t5.js";
376
+ } from "../../chunk-ywr2pqhc.js";
377
377
  import"../../chunk-kp3jgjng.js";
378
378
  import {
379
379
  ModelSelectorRoot2
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  McpConfigDialog2
3
- } from "../../../chunk-cbyqgfv4.js";
3
+ } from "../../../chunk-kevm8s2n.js";
4
4
  import"../../../chunk-m4geb1s5.js";
5
5
  import"../../../chunk-dbe9ppwf.js";
6
- import"../../../chunk-m32ptxf3.js";
6
+ import"../../../chunk-4m2x9jfb.js";
7
7
  import"../../../chunk-tcefvfr8.js";
8
8
  import"../../../chunk-h45mqwpq.js";
9
9
  import"../../../chunk-d22t4qx6.js";
@@ -134,11 +134,11 @@ import {
134
134
  DirectiveText2
135
135
  } from "../../../chunk-xdefvgvq.js";
136
136
  import"../../../chunk-h45mqwpq.js";
137
- import"../../../chunk-m32ptxf3.js";
137
+ import"../../../chunk-4m2x9jfb.js";
138
138
  import"../../../chunk-52aadmkc.js";
139
139
  import {
140
140
  McpConfigDialog2
141
- } from "../../../chunk-cbyqgfv4.js";
141
+ } from "../../../chunk-kevm8s2n.js";
142
142
  import"../../../chunk-ywaq50sv.js";
143
143
  import"../../../chunk-cdx1h86b.js";
144
144
  import {
@@ -26,7 +26,7 @@ import {
26
26
  } from "../../chunk-b5s5y5wq.js";
27
27
  import {
28
28
  Label2
29
- } from "../../chunk-m32ptxf3.js";
29
+ } from "../../chunk-4m2x9jfb.js";
30
30
  import {
31
31
  Popover2,
32
32
  PopoverTrigger2,
@@ -9,13 +9,13 @@ import"../../chunk-jpvw9xqy.js";
9
9
  import {
10
10
  Button2
11
11
  } from "../../chunk-2sx8m8b2.js";
12
- import"../../chunk-m32ptxf3.js";
12
+ import"../../chunk-4m2x9jfb.js";
13
13
  import"../../chunk-52aadmkc.js";
14
14
  import {
15
15
  FieldGroup2,
16
16
  Field2,
17
17
  FieldLabel2
18
- } from "../../chunk-bfv4qesg.js";
18
+ } from "../../chunk-9e1yb90r.js";
19
19
  import"../../chunk-7jpsybag.js";
20
20
  import {
21
21
  Input2
@@ -17,7 +17,7 @@ import {
17
17
  ToggleGroup2,
18
18
  ToggleGroupItem2
19
19
  } from "../../chunk-32ah7jyp.js";
20
- import"../../chunk-m32ptxf3.js";
20
+ import"../../chunk-4m2x9jfb.js";
21
21
  import {
22
22
  Separator2
23
23
  } from "../../chunk-52aadmkc.js";
@@ -26,7 +26,7 @@ import {
26
26
  FieldContent2,
27
27
  FieldLabel2,
28
28
  FieldDescription2
29
- } from "../../chunk-bfv4qesg.js";
29
+ } from "../../chunk-9e1yb90r.js";
30
30
  import {
31
31
  NumberField2,
32
32
  NumberFieldGroup2,
@@ -22,14 +22,14 @@ import {
22
22
  CardContent2,
23
23
  CardFooter2
24
24
  } from "../../chunk-jc3cbwyg.js";
25
- import"../../chunk-m32ptxf3.js";
25
+ import"../../chunk-4m2x9jfb.js";
26
26
  import"../../chunk-52aadmkc.js";
27
27
  import {
28
28
  FieldGroup2,
29
29
  Field2,
30
30
  FieldLabel2,
31
31
  FieldDescription2
32
- } from "../../chunk-bfv4qesg.js";
32
+ } from "../../chunk-9e1yb90r.js";
33
33
  import"../../chunk-7jpsybag.js";
34
34
  import {
35
35
  Input2
@@ -102,7 +102,9 @@ export interface IJsonFieldValueProps {
102
102
  field: IJsonField;
103
103
  /** The value as text; empty renders "No answer". */
104
104
  text: string;
105
+ /** Hides the visible label when a surrounding heading already names this value; the group keeps its accessible name. */
106
+ hideLabel?: boolean;
105
107
  }
106
108
  /** The field as read-only text: its label, then its value, grouped and named by the label. */
107
- export declare function JsonFieldValue({ field, text }: IJsonFieldValueProps): ReactElement;
109
+ export declare function JsonFieldValue({ field, text, hideLabel }: IJsonFieldValueProps): ReactElement;
108
110
  export {};
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-avp2phea.js";
29
+ } from "../../chunk-rf70907h.js";
30
30
  import {
31
31
  MenuPopup,
32
32
  MenuItem2,
@@ -62,14 +62,14 @@ import {
62
62
  } from "../../chunk-7vg045gd.js";
63
63
  import {
64
64
  Label2
65
- } from "../../chunk-m32ptxf3.js";
65
+ } from "../../chunk-4m2x9jfb.js";
66
66
  import {
67
67
  Separator2
68
68
  } from "../../chunk-52aadmkc.js";
69
69
  import {
70
70
  Field2,
71
71
  FieldLabel2
72
- } from "../../chunk-bfv4qesg.js";
72
+ } from "../../chunk-9e1yb90r.js";
73
73
  import {
74
74
  Slider2
75
75
  } from "../../chunk-7cq1s2ey.js";
@@ -355,7 +355,7 @@ function JsonFieldLabel({ field, id, htmlFor }) {
355
355
  return null;
356
356
  return /* @__PURE__ */ jsxs2("div", {
357
357
  "data-slot": "json-field-label",
358
- className: "flex flex-wrap items-center gap-2",
358
+ className: "flex min-w-0 flex-wrap items-center gap-2",
359
359
  children: [
360
360
  field.label && /* @__PURE__ */ jsx5(Label2, {
361
361
  id,
@@ -379,20 +379,27 @@ function JsonFieldMessage({ field }) {
379
379
  children: field.error
380
380
  });
381
381
  }
382
- function JsonFieldValue({ field, text }) {
382
+ function JsonFieldValue({ field, text, hideLabel = false }) {
383
383
  const labelId = useId();
384
384
  return /* @__PURE__ */ jsxs2("div", {
385
385
  role: "group",
386
- "aria-labelledby": field.label ? labelId : undefined,
386
+ "aria-labelledby": !hideLabel && field.label ? labelId : undefined,
387
+ "aria-label": hideLabel && field.label ? field.label : undefined,
387
388
  "data-slot": "json-field-value",
388
- className: "flex w-full flex-col gap-1",
389
+ className: "flex w-full min-w-0 flex-col gap-1",
389
390
  children: [
390
- /* @__PURE__ */ jsx5(JsonFieldLabel, {
391
+ hideLabel ? field.isDefault && /* @__PURE__ */ jsx5("div", {
392
+ "data-slot": "json-field-label",
393
+ className: "flex min-w-0 flex-wrap items-center gap-2",
394
+ children: /* @__PURE__ */ jsx5(JsonFieldTags, {
395
+ field
396
+ })
397
+ }) : /* @__PURE__ */ jsx5(JsonFieldLabel, {
391
398
  field,
392
399
  id: labelId
393
400
  }),
394
401
  /* @__PURE__ */ jsx5("p", {
395
- className: text ? "text-sm whitespace-pre-wrap" : "text-sm text-muted-foreground",
402
+ className: text ? "text-sm wrap-break-word whitespace-pre-wrap" : "text-sm text-muted-foreground",
396
403
  children: text || "No answer"
397
404
  })
398
405
  ]
package/dist/index.js CHANGED
@@ -188,7 +188,7 @@ import {
188
188
  DashboardLayout2,
189
189
  BillingUsage2,
190
190
  SelectionAction2
191
- } from "./chunk-avp2phea.js";
191
+ } from "./chunk-rf70907h.js";
192
192
  import {
193
193
  statusDotVariants2,
194
194
  StatusDot2
@@ -336,7 +336,7 @@ import {
336
336
  FieldDescription2,
337
337
  FieldSeparator2,
338
338
  FieldError2
339
- } from "./chunk-bfv4qesg.js";
339
+ } from "./chunk-9e1yb90r.js";
340
340
  import {
341
341
  Spinner2
342
342
  } from "./chunk-t3p4dn1p.js";
@@ -414,7 +414,7 @@ import {
414
414
  } from "./chunk-1j2hz3w9.js";
415
415
  import {
416
416
  Label2
417
- } from "./chunk-m32ptxf3.js";
417
+ } from "./chunk-4m2x9jfb.js";
418
418
  import"./chunk-tcefvfr8.js";
419
419
  import {
420
420
  Popover2,
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.151",
2054
+ version: "0.0.152",
2055
2055
  description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -229,6 +229,42 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
229
229
  }
230
230
  ```
231
231
 
232
+ ### TruncatedTitle
233
+
234
+ ```tsx
235
+ {
236
+ render: (args) => {
237
+ const longTitle = "Q1 · Should the homelab security audit accept the webhook endpoint as an approved ingress route?";
238
+ return (<div className="flex flex-col gap-4">
239
+ <div data-testid="narrow-item" className="w-80">
240
+ <Item {...args} size="xs" variant="outline">
241
+ <ItemContent>
242
+ <ItemTitle truncate title={longTitle}>
243
+ {longTitle}
244
+ </ItemTitle>
245
+ </ItemContent>
246
+ <ItemActions>
247
+ <ItemDescription>waiting 1 d</ItemDescription>
248
+ </ItemActions>
249
+ </Item>
250
+ </div>
251
+ <div data-testid="wide-item" className="w-[64rem]">
252
+ <Item {...args} size="xs" variant="outline">
253
+ <ItemContent>
254
+ <ItemTitle truncate title={longTitle}>
255
+ {longTitle}
256
+ </ItemTitle>
257
+ </ItemContent>
258
+ <ItemActions>
259
+ <ItemDescription>waiting 1 d</ItemDescription>
260
+ </ItemActions>
261
+ </Item>
262
+ </div>
263
+ </div>);
264
+ }
265
+ }
266
+ ```
267
+
232
268
  ### NativeSeparatorCallback
233
269
 
234
270
  ```tsx
@@ -9,7 +9,7 @@ Source: src/components/stories/data-display/JsonRenderForm.stories.tsx
9
9
 
10
10
  ```tsx
11
11
  import { Button } from "@alexgorbatchev/shadcn";
12
- import { components, componentDefinitions, JsonFormProvider, stripRequiredMark, useJsonReveal, type JsonFormMode } from "@alexgorbatchev/shadcn/json-render";
12
+ import { components, componentDefinitions, JsonFieldValue, JsonFormProvider, stripRequiredMark, useJsonField, useJsonReveal, type JsonFormMode } from "@alexgorbatchev/shadcn/json-render";
13
13
  ```
14
14
 
15
15
  ## Supporting imports
@@ -150,3 +150,13 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
150
150
  }
151
151
  }
152
152
  ```
153
+
154
+ ### FieldValueHideLabelAndNarrowWrap
155
+
156
+ ```tsx
157
+ {
158
+ render: () => (<JsonFormProvider mode="values" defaults={["/answers/defaulted"]}>
159
+ <FieldValueSamples />
160
+ </JsonFormProvider>)
161
+ }
162
+ ```
@@ -179,3 +179,17 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
179
179
  ]
180
180
  }
181
181
  ```
182
+
183
+ ### NarrowWrap
184
+
185
+ ```tsx
186
+ {
187
+ render: () => {
188
+ const id = useId();
189
+ return (<div className="flex w-48 flex-col gap-2" data-testid="narrow-label-box">
190
+ <Label htmlFor={id}>Choose a rollout plan for very-long-unbroken-service-identifier-in-narrow-layout</Label>
191
+ <Input id={id}/>
192
+ </div>);
193
+ }
194
+ }
195
+ ```
@@ -221,6 +221,30 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
221
221
  }
222
222
  ```
223
223
 
224
+ ### RowLayoutWithFullSpanOption
225
+
226
+ ```tsx
227
+ {
228
+ render: (args) => (<div className="flex flex-col gap-6">
229
+ <div className="w-[56rem]" data-testid="radio-row">
230
+ <OptionCardGroup aria-label="Hero direction" layout="row" {...args}>
231
+ <OptionCard value="quiet" label="Quiet" description="Short description." image={<img src={fixture_attachmentImage} alt="Quiet" className="block h-auto w-full"/>}/>
232
+ <OptionCard value="bold" label="Bold" description="A noticeably longer trade-off description that wraps onto multiple lines so sibling row cards must stretch to match its height." image={<img src={fixture_attachmentImage} alt="Bold" className="block h-auto w-full"/>}/>
233
+ <OptionCard value="playful" label="Playful" description="Medium copy." image={<img src={fixture_attachmentImage} alt="Playful" className="block h-auto w-full"/>}/>
234
+ <OptionCard value="other" label="Something else" span="full"/>
235
+ </OptionCardGroup>
236
+ </div>
237
+ <div className="w-[56rem]" data-testid="checkbox-row">
238
+ <OptionCheckboxGroup aria-label="Extra directions" layout="row">
239
+ <OptionCheckboxCard value="a" label="Alpha" description="Short."/>
240
+ <OptionCheckboxCard value="b" label="Beta" description="Multiple lines of description text that make this card taller than its sibling."/>
241
+ <OptionCheckboxCard value="other" label="Other direction" span="full"/>
242
+ </OptionCheckboxGroup>
243
+ </div>
244
+ </div>)
245
+ }
246
+ ```
247
+
224
248
  ### FoldedDescription
225
249
 
226
250
  ```tsx
@@ -260,3 +260,32 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
260
260
  </Accordion>)
261
261
  }
262
262
  ```
263
+
264
+ ### NarrowWrappingAndNestedProse
265
+
266
+ ```tsx
267
+ {
268
+ render: () => (<div className="w-60" data-testid="narrow-accordion">
269
+ <Accordion multiple defaultValue={["direct", "nested"]}>
270
+ <AccordionItem value="direct">
271
+ <AccordionTrigger>
272
+ deployment-rollout-strategy-for-production-edge-workers-2026 with extra trailing words
273
+ </AccordionTrigger>
274
+ <AccordionContent>
275
+ <p data-testid="direct-first">First direct paragraph.</p>
276
+ <p data-testid="direct-second">Second direct paragraph.</p>
277
+ </AccordionContent>
278
+ </AccordionItem>
279
+ <AccordionItem value="nested">
280
+ <AccordionTrigger>Nested typeset content</AccordionTrigger>
281
+ <AccordionContent>
282
+ <div className="typeset" data-testid="nested-prose">
283
+ <p data-testid="nested-first">First nested paragraph.</p>
284
+ <p data-testid="nested-second">Second nested paragraph.</p>
285
+ </div>
286
+ </AccordionContent>
287
+ </AccordionItem>
288
+ </Accordion>
289
+ </div>)
290
+ }
291
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.151",
3
+ "version": "0.0.152",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {