@designa8/vibedesign-linear-internal-v1-b737 0.11.2 → 0.11.3

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-linear-internal-v1-b737
2
2
 
3
- Complete design system generated by Atoms Design, version **0.11.2**.
3
+ Complete design system generated by Atoms Design, version **0.11.3**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -600,7 +600,7 @@ var React6 = __toESM(require("react"));
600
600
  var import_jsx_runtime6 = require("react/jsx-runtime");
601
601
  var cn4 = (...parts) => parts.filter(Boolean).join(" ");
602
602
  var base = "relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap border font-weight-body-md cursor-pointer transition duration-150 ease-out active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50 disabled:active:scale-100";
603
- var rowBase = "relative flex w-full min-w-0 select-none items-center justify-start whitespace-nowrap border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
603
+ var rowBase = "relative flex w-full min-w-0 select-none items-center border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
604
604
  var isRow = (v) => v === "field" || v === "item" || v === "media";
605
605
  var variants = {
606
606
  primary: "border-primary bg-primary text-on-primary shadow-sm enabled:hover:bg-primary-hover enabled:hover:border-primary-hover enabled:active:bg-primary-active",
@@ -617,6 +617,11 @@ var sizes = {
617
617
  md: "h-8 gap-sm rounded-md px-md text-body-md",
618
618
  lg: "h-9 gap-sm rounded-md px-base text-body-md"
619
619
  };
620
+ var wrapSizes = {
621
+ sm: "gap-xs rounded-sm px-sm py-xs text-body-sm",
622
+ md: "gap-sm rounded-md px-md py-xs text-body-md",
623
+ lg: "gap-sm rounded-md px-base py-sm text-body-md"
624
+ };
620
625
  var iconOnlySizes = {
621
626
  sm: "h-7 w-7 rounded-sm px-0",
622
627
  md: "h-8 w-8 rounded-md px-0",
@@ -633,6 +638,7 @@ var Button = React6.forwardRef(
633
638
  trailingIcon,
634
639
  fullWidth = false,
635
640
  iconOnly = false,
641
+ wrap = false,
636
642
  disabled,
637
643
  type = "button",
638
644
  className,
@@ -641,6 +647,8 @@ var Button = React6.forwardRef(
641
647
  ...rest
642
648
  }, ref) => {
643
649
  const media = variant === "media";
650
+ const row = isRow(variant);
651
+ const wrappedRow = row && wrap && !iconOnly;
644
652
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
645
653
  "button",
646
654
  {
@@ -651,9 +659,12 @@ var Button = React6.forwardRef(
651
659
  "aria-disabled": loading || void 0,
652
660
  onClick: loading ? (e) => e.preventDefault() : onClick,
653
661
  className: cn4(
654
- isRow(variant) ? rowBase : base,
662
+ row ? cn4(
663
+ rowBase,
664
+ wrappedRow ? "items-start whitespace-normal" : "items-center whitespace-nowrap"
665
+ ) : base,
655
666
  variants[variant],
656
- media ? "rounded-lg" : iconOnly ? iconOnlySizes[size] : sizes[size],
667
+ media ? "rounded-lg" : iconOnly ? iconOnlySizes[size] : wrappedRow ? wrapSizes[size] : sizes[size],
657
668
  fullWidth && "w-full",
658
669
  loading && "pointer-events-none",
659
670
  className
@@ -667,9 +678,35 @@ var Button = React6.forwardRef(
667
678
  size: iconSize[size],
668
679
  className: "shrink-0 animate-spin text-muted"
669
680
  }
670
- ) : leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "inline-flex shrink-0 items-center", "aria-hidden": "true", children: leadingIcon }),
671
- iconOnly ? !loading && children : media ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: isRow(variant) ? "min-w-0 flex-1 truncate" : void 0, children: loading && loadingText ? loadingText : children }),
672
- !loading && trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "inline-flex shrink-0 items-center", "aria-hidden": "true", children: trailingIcon })
681
+ ) : leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
682
+ "span",
683
+ {
684
+ className: cn4(
685
+ "inline-flex shrink-0 items-center",
686
+ wrappedRow && "self-start"
687
+ ),
688
+ "aria-hidden": "true",
689
+ children: leadingIcon
690
+ }
691
+ ),
692
+ iconOnly ? !loading && children : media ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
693
+ "span",
694
+ {
695
+ className: row ? cn4("min-w-0 flex-1", !wrappedRow && "truncate") : void 0,
696
+ children: loading && loadingText ? loadingText : children
697
+ }
698
+ ),
699
+ !loading && trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
700
+ "span",
701
+ {
702
+ className: cn4(
703
+ "inline-flex shrink-0 items-center",
704
+ wrappedRow && "self-start"
705
+ ),
706
+ "aria-hidden": "true",
707
+ children: trailingIcon
708
+ }
709
+ )
673
710
  ]
674
711
  }
675
712
  );
@@ -1225,6 +1262,7 @@ var AgentQuestionCard = React11.forwardRef(
1225
1262
  variant: "item",
1226
1263
  size: "md",
1227
1264
  fullWidth: true,
1265
+ wrap: true,
1228
1266
  role: "radio",
1229
1267
  "aria-checked": isSelected,
1230
1268
  "aria-label": option.label,
@@ -1278,6 +1316,7 @@ var AgentQuestionCard = React11.forwardRef(
1278
1316
  variant: "item",
1279
1317
  size: "md",
1280
1318
  fullWidth: true,
1319
+ wrap: true,
1281
1320
  role: "radio",
1282
1321
  "aria-checked": false,
1283
1322
  "aria-label": freeTextLabel ?? void 0,
package/dist/index.js CHANGED
@@ -456,7 +456,7 @@ import * as React6 from "react";
456
456
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
457
457
  var cn4 = (...parts) => parts.filter(Boolean).join(" ");
458
458
  var base = "relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap border font-weight-body-md cursor-pointer transition duration-150 ease-out active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50 disabled:active:scale-100";
459
- var rowBase = "relative flex w-full min-w-0 select-none items-center justify-start whitespace-nowrap border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
459
+ var rowBase = "relative flex w-full min-w-0 select-none items-center border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
460
460
  var isRow = (v) => v === "field" || v === "item" || v === "media";
461
461
  var variants = {
462
462
  primary: "border-primary bg-primary text-on-primary shadow-sm enabled:hover:bg-primary-hover enabled:hover:border-primary-hover enabled:active:bg-primary-active",
@@ -473,6 +473,11 @@ var sizes = {
473
473
  md: "h-8 gap-sm rounded-md px-md text-body-md",
474
474
  lg: "h-9 gap-sm rounded-md px-base text-body-md"
475
475
  };
476
+ var wrapSizes = {
477
+ sm: "gap-xs rounded-sm px-sm py-xs text-body-sm",
478
+ md: "gap-sm rounded-md px-md py-xs text-body-md",
479
+ lg: "gap-sm rounded-md px-base py-sm text-body-md"
480
+ };
476
481
  var iconOnlySizes = {
477
482
  sm: "h-7 w-7 rounded-sm px-0",
478
483
  md: "h-8 w-8 rounded-md px-0",
@@ -489,6 +494,7 @@ var Button = React6.forwardRef(
489
494
  trailingIcon,
490
495
  fullWidth = false,
491
496
  iconOnly = false,
497
+ wrap = false,
492
498
  disabled,
493
499
  type = "button",
494
500
  className,
@@ -497,6 +503,8 @@ var Button = React6.forwardRef(
497
503
  ...rest
498
504
  }, ref) => {
499
505
  const media = variant === "media";
506
+ const row = isRow(variant);
507
+ const wrappedRow = row && wrap && !iconOnly;
500
508
  return /* @__PURE__ */ jsxs4(
501
509
  "button",
502
510
  {
@@ -507,9 +515,12 @@ var Button = React6.forwardRef(
507
515
  "aria-disabled": loading || void 0,
508
516
  onClick: loading ? (e) => e.preventDefault() : onClick,
509
517
  className: cn4(
510
- isRow(variant) ? rowBase : base,
518
+ row ? cn4(
519
+ rowBase,
520
+ wrappedRow ? "items-start whitespace-normal" : "items-center whitespace-nowrap"
521
+ ) : base,
511
522
  variants[variant],
512
- media ? "rounded-lg" : iconOnly ? iconOnlySizes[size] : sizes[size],
523
+ media ? "rounded-lg" : iconOnly ? iconOnlySizes[size] : wrappedRow ? wrapSizes[size] : sizes[size],
513
524
  fullWidth && "w-full",
514
525
  loading && "pointer-events-none",
515
526
  className
@@ -523,9 +534,35 @@ var Button = React6.forwardRef(
523
534
  size: iconSize[size],
524
535
  className: "shrink-0 animate-spin text-muted"
525
536
  }
526
- ) : leadingIcon && /* @__PURE__ */ jsx6("span", { className: "inline-flex shrink-0 items-center", "aria-hidden": "true", children: leadingIcon }),
527
- iconOnly ? !loading && children : media ? children : /* @__PURE__ */ jsx6("span", { className: isRow(variant) ? "min-w-0 flex-1 truncate" : void 0, children: loading && loadingText ? loadingText : children }),
528
- !loading && trailingIcon && /* @__PURE__ */ jsx6("span", { className: "inline-flex shrink-0 items-center", "aria-hidden": "true", children: trailingIcon })
537
+ ) : leadingIcon && /* @__PURE__ */ jsx6(
538
+ "span",
539
+ {
540
+ className: cn4(
541
+ "inline-flex shrink-0 items-center",
542
+ wrappedRow && "self-start"
543
+ ),
544
+ "aria-hidden": "true",
545
+ children: leadingIcon
546
+ }
547
+ ),
548
+ iconOnly ? !loading && children : media ? children : /* @__PURE__ */ jsx6(
549
+ "span",
550
+ {
551
+ className: row ? cn4("min-w-0 flex-1", !wrappedRow && "truncate") : void 0,
552
+ children: loading && loadingText ? loadingText : children
553
+ }
554
+ ),
555
+ !loading && trailingIcon && /* @__PURE__ */ jsx6(
556
+ "span",
557
+ {
558
+ className: cn4(
559
+ "inline-flex shrink-0 items-center",
560
+ wrappedRow && "self-start"
561
+ ),
562
+ "aria-hidden": "true",
563
+ children: trailingIcon
564
+ }
565
+ )
529
566
  ]
530
567
  }
531
568
  );
@@ -1081,6 +1118,7 @@ var AgentQuestionCard = React11.forwardRef(
1081
1118
  variant: "item",
1082
1119
  size: "md",
1083
1120
  fullWidth: true,
1121
+ wrap: true,
1084
1122
  role: "radio",
1085
1123
  "aria-checked": isSelected,
1086
1124
  "aria-label": option.label,
@@ -1134,6 +1172,7 @@ var AgentQuestionCard = React11.forwardRef(
1134
1172
  variant: "item",
1135
1173
  size: "md",
1136
1174
  fullWidth: true,
1175
+ wrap: true,
1137
1176
  role: "radio",
1138
1177
  "aria-checked": false,
1139
1178
  "aria-label": freeTextLabel ?? void 0,
package/dist/styles.css CHANGED
@@ -1811,6 +1811,9 @@
1811
1811
  .break-words {
1812
1812
  overflow-wrap: break-word;
1813
1813
  }
1814
+ .whitespace-normal {
1815
+ white-space: normal;
1816
+ }
1814
1817
  .whitespace-nowrap {
1815
1818
  white-space: nowrap;
1816
1819
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-linear-internal-v1-b737",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Complete design system \"My Project linear-internal-v1\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -83,6 +83,8 @@ const PANEL =
83
83
  * The card that replaces the chat prompt while an agent waits on a choice.
84
84
  * Options are a radiogroup (arrow keys move and select), the trailing row turns
85
85
  * into an inline text field, and closing folds the card into a slim restore bar.
86
+ * Option labels wrap onto multiple lines — agent options are often full
87
+ * sentences — with the letter badge pinned to the first line.
86
88
  */
87
89
  export const AgentQuestionCard = React.forwardRef<
88
90
  HTMLDivElement,
@@ -289,6 +291,7 @@ export const AgentQuestionCard = React.forwardRef<
289
291
  variant="item"
290
292
  size="md"
291
293
  fullWidth
294
+ wrap
292
295
  role="radio"
293
296
  aria-checked={isSelected}
294
297
  aria-label={option.label}
@@ -355,6 +358,7 @@ export const AgentQuestionCard = React.forwardRef<
355
358
  variant="item"
356
359
  size="md"
357
360
  fullWidth
361
+ wrap
358
362
  role="radio"
359
363
  aria-checked={false}
360
364
  aria-label={freeTextLabel ?? undefined}
@@ -3,7 +3,11 @@ import { AgentQuestionCard } from "./AgentQuestionCard";
3
3
  import type { AgentQuestionAnswer, AgentQuestionOption } from "./AgentQuestionCard";
4
4
 
5
5
  const OPTIONS: AgentQuestionOption[] = [
6
- { id: "keep", label: "Keep the current layout and tighten spacing" },
6
+ {
7
+ id: "keep",
8
+ label:
9
+ "Keep the current layout and tighten spacing — I'll adjust the gutters and paddings only, no structural change",
10
+ },
7
11
  { id: "rebuild", label: "Rebuild the canvas grid from scratch" },
8
12
  { id: "defer", label: "Leave it as is for now" },
9
13
  ];
@@ -30,7 +34,7 @@ export default function Preview() {
30
34
 
31
35
  return (
32
36
  <div className="w-full max-w-3xl mx-auto p-lg space-y-lg">
33
- <Section title="Live card — pick an option, choose Other…, or close it">
37
+ <Section title="Live card — long sentences wrap, pick an option or close it">
34
38
  <AgentQuestionCard
35
39
  questionId="q-layout"
36
40
  questionNumber={1}
@@ -63,7 +67,11 @@ export default function Preview() {
63
67
  questionNumber={2}
64
68
  question="Which token should the selected row use?"
65
69
  options={[
66
- { id: "primary-soft", label: "primary-soft tint with a trailing check" },
70
+ {
71
+ id: "primary-soft",
72
+ label:
73
+ "primary-soft tint with a trailing check so the chosen row stays readable across the whole card",
74
+ },
67
75
  { id: "surface-soft", label: "surface-soft tint with no marker" },
68
76
  ]}
69
77
  selectedOptionId={errorSelected}
@@ -84,7 +92,11 @@ export default function Preview() {
84
92
  questionNumber={3}
85
93
  question="Should I apply the change to every breakpoint?"
86
94
  options={[
87
- { id: "all", label: "Yes, every breakpoint" },
95
+ {
96
+ id: "all",
97
+ label:
98
+ "Yes, every breakpoint — mobile, tablet and desktop all get the new spacing",
99
+ },
88
100
  { id: "desktop", label: "Desktop only for now" },
89
101
  ]}
90
102
  defaultSelectedOptionId="all"
@@ -38,6 +38,12 @@ export interface ButtonProps extends React.ComponentPropsWithoutRef<"button"> {
38
38
  fullWidth?: boolean;
39
39
  /** Square, icon-only shape (no horizontal padding). Pass the glyph as children and set aria-label. */
40
40
  iconOnly?: boolean;
41
+ /**
42
+ * Row variants only: lets the label wrap onto multiple lines instead of
43
+ * truncating, with the row growing to fit and leading / trailing icons
44
+ * aligned to the first line.
45
+ */
46
+ wrap?: boolean;
41
47
  }
42
48
 
43
49
  const cn = (...parts: Array<string | false | null | undefined>) =>
@@ -48,7 +54,7 @@ const base =
48
54
 
49
55
  /** Full-width rows: no press scale, left-aligned, background-only press. */
50
56
  const rowBase =
51
- "relative flex w-full min-w-0 select-none items-center justify-start whitespace-nowrap border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
57
+ "relative flex w-full min-w-0 select-none items-center border text-left font-weight-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
52
58
 
53
59
  const isRow = (v: ButtonVariant) => v === "field" || v === "item" || v === "media";
54
60
 
@@ -77,6 +83,13 @@ const sizes: Record<ButtonSize, string> = {
77
83
  lg: "h-9 gap-sm rounded-md px-base text-body-md",
78
84
  };
79
85
 
86
+ /** Same rhythm as `sizes`, but auto height so a wrapped label can grow. */
87
+ const wrapSizes: Record<ButtonSize, string> = {
88
+ sm: "gap-xs rounded-sm px-sm py-xs text-body-sm",
89
+ md: "gap-sm rounded-md px-md py-xs text-body-md",
90
+ lg: "gap-sm rounded-md px-base py-sm text-body-md",
91
+ };
92
+
80
93
  const iconOnlySizes: Record<ButtonSize, string> = {
81
94
  sm: "h-7 w-7 rounded-sm px-0",
82
95
  md: "h-8 w-8 rounded-md px-0",
@@ -96,6 +109,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
96
109
  trailingIcon,
97
110
  fullWidth = false,
98
111
  iconOnly = false,
112
+ wrap = false,
99
113
  disabled,
100
114
  type = "button",
101
115
  className,
@@ -106,6 +120,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
106
120
  ref,
107
121
  ) => {
108
122
  const media = variant === "media";
123
+ const row = isRow(variant);
124
+ const wrappedRow = row && wrap && !iconOnly;
109
125
  return (
110
126
  <button
111
127
  ref={ref}
@@ -115,13 +131,22 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
115
131
  aria-disabled={loading || undefined}
116
132
  onClick={loading ? (e) => e.preventDefault() : onClick}
117
133
  className={cn(
118
- isRow(variant) ? rowBase : base,
134
+ row
135
+ ? cn(
136
+ rowBase,
137
+ wrappedRow
138
+ ? "items-start whitespace-normal"
139
+ : "items-center whitespace-nowrap",
140
+ )
141
+ : base,
119
142
  variants[variant],
120
143
  media
121
144
  ? "rounded-lg"
122
145
  : iconOnly
123
146
  ? iconOnlySizes[size]
124
- : sizes[size],
147
+ : wrappedRow
148
+ ? wrapSizes[size]
149
+ : sizes[size],
125
150
  fullWidth && "w-full",
126
151
  loading && "pointer-events-none",
127
152
  className,
@@ -136,7 +161,13 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
136
161
  />
137
162
  ) : (
138
163
  leadingIcon && (
139
- <span className="inline-flex shrink-0 items-center" aria-hidden="true">
164
+ <span
165
+ className={cn(
166
+ "inline-flex shrink-0 items-center",
167
+ wrappedRow && "self-start",
168
+ )}
169
+ aria-hidden="true"
170
+ >
140
171
  {leadingIcon}
141
172
  </span>
142
173
  )
@@ -146,12 +177,24 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
146
177
  ) : media ? (
147
178
  children
148
179
  ) : (
149
- <span className={isRow(variant) ? "min-w-0 flex-1 truncate" : undefined}>
180
+ <span
181
+ className={
182
+ row
183
+ ? cn("min-w-0 flex-1", !wrappedRow && "truncate")
184
+ : undefined
185
+ }
186
+ >
150
187
  {loading && loadingText ? loadingText : children}
151
188
  </span>
152
189
  )}
153
190
  {!loading && trailingIcon && (
154
- <span className="inline-flex shrink-0 items-center" aria-hidden="true">
191
+ <span
192
+ className={cn(
193
+ "inline-flex shrink-0 items-center",
194
+ wrappedRow && "self-start",
195
+ )}
196
+ aria-hidden="true"
197
+ >
155
198
  {trailingIcon}
156
199
  </span>
157
200
  )}