@designa8/vibedesign-linear-internal-v1-b737 0.12.2 → 0.12.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.12.2**.
3
+ Complete design system generated by Atoms Design, version **0.12.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
@@ -9238,6 +9238,7 @@ var Switch = React73.forwardRef(
9238
9238
  onChange?.(e);
9239
9239
  };
9240
9240
  const labelled = Boolean(label);
9241
+ const hasDescription = Boolean(description);
9241
9242
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
9242
9243
  "label",
9243
9244
  {
@@ -9249,13 +9250,33 @@ var Switch = React73.forwardRef(
9249
9250
  className
9250
9251
  ].filter(Boolean).join(" "),
9251
9252
  children: [
9252
- labelled ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex min-w-0 items-start gap-md", children: [
9253
- leading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
9254
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
9255
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-md text-ink", children: label }),
9256
- description ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
9257
- ] })
9258
- ] }) : null,
9253
+ labelled ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
9254
+ "span",
9255
+ {
9256
+ className: [
9257
+ "flex min-w-0 gap-md",
9258
+ /* With a description the leading visual aligns to the first line;
9259
+ with a single-line label it centers with that line. */
9260
+ hasDescription ? "items-start" : "items-center"
9261
+ ].join(" "),
9262
+ children: [
9263
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9264
+ "span",
9265
+ {
9266
+ className: [
9267
+ "inline-flex shrink-0 text-ink",
9268
+ hasDescription ? "mt-xxs" : ""
9269
+ ].filter(Boolean).join(" "),
9270
+ children: leading
9271
+ }
9272
+ ) : null,
9273
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
9274
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-md text-ink", children: label }),
9275
+ hasDescription ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
9276
+ ] })
9277
+ ]
9278
+ }
9279
+ ) : null,
9259
9280
  /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "relative inline-flex shrink-0 items-center", children: [
9260
9281
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9261
9282
  "input",
package/dist/index.js CHANGED
@@ -9093,6 +9093,7 @@ var Switch = React73.forwardRef(
9093
9093
  onChange?.(e);
9094
9094
  };
9095
9095
  const labelled = Boolean(label);
9096
+ const hasDescription = Boolean(description);
9096
9097
  return /* @__PURE__ */ jsxs67(
9097
9098
  "label",
9098
9099
  {
@@ -9104,13 +9105,33 @@ var Switch = React73.forwardRef(
9104
9105
  className
9105
9106
  ].filter(Boolean).join(" "),
9106
9107
  children: [
9107
- labelled ? /* @__PURE__ */ jsxs67("span", { className: "flex min-w-0 items-start gap-md", children: [
9108
- leading ? /* @__PURE__ */ jsx73("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
9109
- /* @__PURE__ */ jsxs67("span", { className: "flex min-w-0 flex-col", children: [
9110
- /* @__PURE__ */ jsx73("span", { className: "text-body-md text-ink", children: label }),
9111
- description ? /* @__PURE__ */ jsx73("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
9112
- ] })
9113
- ] }) : null,
9108
+ labelled ? /* @__PURE__ */ jsxs67(
9109
+ "span",
9110
+ {
9111
+ className: [
9112
+ "flex min-w-0 gap-md",
9113
+ /* With a description the leading visual aligns to the first line;
9114
+ with a single-line label it centers with that line. */
9115
+ hasDescription ? "items-start" : "items-center"
9116
+ ].join(" "),
9117
+ children: [
9118
+ leading ? /* @__PURE__ */ jsx73(
9119
+ "span",
9120
+ {
9121
+ className: [
9122
+ "inline-flex shrink-0 text-ink",
9123
+ hasDescription ? "mt-xxs" : ""
9124
+ ].filter(Boolean).join(" "),
9125
+ children: leading
9126
+ }
9127
+ ) : null,
9128
+ /* @__PURE__ */ jsxs67("span", { className: "flex min-w-0 flex-col", children: [
9129
+ /* @__PURE__ */ jsx73("span", { className: "text-body-md text-ink", children: label }),
9130
+ hasDescription ? /* @__PURE__ */ jsx73("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
9131
+ ] })
9132
+ ]
9133
+ }
9134
+ ) : null,
9114
9135
  /* @__PURE__ */ jsxs67("span", { className: "relative inline-flex shrink-0 items-center", children: [
9115
9136
  /* @__PURE__ */ jsx73(
9116
9137
  "input",
package/dist/styles.css CHANGED
@@ -18,6 +18,7 @@
18
18
  --container-3xl: 48rem;
19
19
  --container-4xl: 56rem;
20
20
  --container-5xl: 64rem;
21
+ --tracking-wide: 0.025em;
21
22
  --radius-xs: 4px;
22
23
  --radius-sm: 6px;
23
24
  --radius-md: 8px;
@@ -1838,6 +1839,10 @@
1838
1839
  --tw-tracking: var(--tracking-overline);
1839
1840
  letter-spacing: var(--tracking-overline);
1840
1841
  }
1842
+ .tracking-wide {
1843
+ --tw-tracking: var(--tracking-wide);
1844
+ letter-spacing: var(--tracking-wide);
1845
+ }
1841
1846
  .break-words {
1842
1847
  overflow-wrap: break-word;
1843
1848
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-linear-internal-v1-b737",
3
- "version": "0.12.2",
3
+ "version": "0.12.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",
@@ -70,6 +70,7 @@ export const Switch = React.forwardRef<HTMLInputElement, SwitchProps>(
70
70
  };
71
71
 
72
72
  const labelled = Boolean(label);
73
+ const hasDescription = Boolean(description);
73
74
 
74
75
  return (
75
76
  <label
@@ -86,13 +87,29 @@ export const Switch = React.forwardRef<HTMLInputElement, SwitchProps>(
86
87
  .join(" ")}
87
88
  >
88
89
  {labelled ? (
89
- <span className="flex min-w-0 items-start gap-md">
90
+ <span
91
+ className={[
92
+ "flex min-w-0 gap-md",
93
+ /* With a description the leading visual aligns to the first line;
94
+ with a single-line label it centers with that line. */
95
+ hasDescription ? "items-start" : "items-center",
96
+ ].join(" ")}
97
+ >
90
98
  {leading ? (
91
- <span className="mt-xxs inline-flex shrink-0 text-ink">{leading}</span>
99
+ <span
100
+ className={[
101
+ "inline-flex shrink-0 text-ink",
102
+ hasDescription ? "mt-xxs" : "",
103
+ ]
104
+ .filter(Boolean)
105
+ .join(" ")}
106
+ >
107
+ {leading}
108
+ </span>
92
109
  ) : null}
93
110
  <span className="flex min-w-0 flex-col">
94
111
  <span className="text-body-md text-ink">{label}</span>
95
- {description ? (
112
+ {hasDescription ? (
96
113
  <span id={descId} className="text-body-sm text-muted">
97
114
  {description}
98
115
  </span>
@@ -8,16 +8,73 @@ export default function SwitchPreview() {
8
8
  const [on, setOn] = React.useState(true);
9
9
  const [small, setSmall] = React.useState(true);
10
10
 
11
+ const [tileA, setTileA] = React.useState(true);
12
+ const [tileB, setTileB] = React.useState(false);
13
+ const [tileC, setTileC] = React.useState(true);
14
+
11
15
  return (
12
16
  <div className="w-full max-w-3xl mx-auto p-lg space-y-lg">
13
- <div className="max-w-md rounded-lg border border-hairline bg-surface px-base py-md">
14
- <Switch
15
- label="Channel notifications"
16
- description="Get updates in a team channel"
17
- leading={<Icon name="hash" size={18} />}
18
- checked={channel}
19
- onCheckedChange={setChannel}
20
- />
17
+ <div className="space-y-sm">
18
+ <p className="text-caption uppercase tracking-wide text-muted">
19
+ Leading visual, no description
20
+ </p>
21
+ <div className="divide-y divide-hairline-soft overflow-hidden rounded-lg border border-hairline bg-surface">
22
+ <div className="px-base py-md">
23
+ <Switch
24
+ label="Appearance"
25
+ leading={
26
+ <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-surface-soft text-ink">
27
+ <Icon name="hash" size={16} />
28
+ </span>
29
+ }
30
+ checked={tileA}
31
+ onCheckedChange={setTileA}
32
+ />
33
+ </div>
34
+ <div className="px-base py-md">
35
+ <Switch
36
+ label="Notifications"
37
+ leading={
38
+ <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-surface-soft text-ink">
39
+ <Icon name="hash" size={16} />
40
+ </span>
41
+ }
42
+ checked={tileB}
43
+ onCheckedChange={setTileB}
44
+ />
45
+ </div>
46
+ <div className="px-base py-md">
47
+ <Switch
48
+ label="Large leading visual with a longer single-line label"
49
+ leading={
50
+ <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-surface-soft text-ink">
51
+ <Icon name="hash" size={16} />
52
+ </span>
53
+ }
54
+ checked={tileC}
55
+ onCheckedChange={setTileC}
56
+ />
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <div className="space-y-sm">
62
+ <p className="text-caption uppercase tracking-wide text-muted">
63
+ With description (top aligned)
64
+ </p>
65
+ <div className="max-w-md rounded-lg border border-hairline bg-surface px-base py-md">
66
+ <Switch
67
+ label="Channel notifications"
68
+ description="Get updates in a team channel"
69
+ leading={
70
+ <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-surface-soft text-ink">
71
+ <Icon name="hash" size={16} />
72
+ </span>
73
+ }
74
+ checked={channel}
75
+ onCheckedChange={setChannel}
76
+ />
77
+ </div>
21
78
  </div>
22
79
 
23
80
  <div className="flex flex-wrap items-end gap-xl">