@snowztech/ui 0.1.0 → 0.3.0

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/index.cjs CHANGED
@@ -24,20 +24,22 @@ function _interopNamespace(e) {
24
24
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
25
25
 
26
26
  // src/mark.tsx
27
- var SnowMark = ({ size = 48, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs(
27
+ var sizeStyle = (size) => typeof size === "number" ? { ["--sn-mark-size"]: `${size}px` } : void 0;
28
+ var sizeClass = (size) => typeof size === "string" ? `sn-mark--${size}` : void 0;
29
+ var cx = (...parts) => parts.filter(Boolean).join(" ");
30
+ var SnowMark = ({ size = 48, color, className, style }) => /* @__PURE__ */ jsxRuntime.jsxs(
28
31
  "svg",
29
32
  {
30
- width: size,
31
- height: size,
32
33
  viewBox: "0 0 32 32",
33
- fill: color,
34
- style: { display: "inline-block", verticalAlign: "middle", ...style },
34
+ fill: "currentColor",
35
+ className: cx("sn-mark", sizeClass(size), className),
36
+ style: { ...sizeStyle(size), color, ...style },
35
37
  "aria-hidden": "true",
36
38
  children: [
37
39
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "6", width: "14", height: "2.4" }),
38
40
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "22.4,6 23,8.4 9.6,26 9,23.6" }),
39
41
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "23.6", width: "14", height: "2.4" }),
40
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: color, children: [
42
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
41
43
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,1 18,4 16,7 14,4" }),
42
44
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,25 18,28 16,31 14,28" }),
43
45
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "27,8 28.7,11 25.5,11.5 26,8.7" }),
@@ -50,61 +52,68 @@ var SnowMark = ({ size = 48, color = "currentColor", style }) => /* @__PURE__ */
50
52
  );
51
53
  var SnowWordmark = ({
52
54
  size = 18,
53
- color = "currentColor",
55
+ color,
54
56
  showDot = true,
55
- accent = "var(--sn-accent)"
57
+ accent,
58
+ className,
59
+ style
56
60
  }) => /* @__PURE__ */ jsxRuntime.jsxs(
57
61
  "span",
58
62
  {
63
+ className: cx("sn-wordmark", className),
59
64
  style: {
60
- fontFamily: "var(--sn-font-mono)",
61
- fontSize: size,
62
- fontWeight: 700,
63
- letterSpacing: "-0.01em",
65
+ ["--sn-wordmark-size"]: `${size}px`,
64
66
  color,
65
- lineHeight: 1
67
+ ...style
66
68
  },
67
69
  children: [
68
70
  "snowztech",
69
- showDot && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: accent }, children: "." })
71
+ showDot && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sn-wordmark__dot", style: accent ? { color: accent } : void 0, children: "." })
70
72
  ]
71
73
  }
72
74
  );
73
75
  var SnowMonogram = ({
74
76
  size = 64,
75
- bg = "#0a0a0a",
76
- fg = "#ffffff",
77
- radius = 8
78
- }) => /* @__PURE__ */ jsxRuntime.jsx(Monogram, { size, bg, fg, radius, mark: SnowMark });
77
+ bg,
78
+ fg,
79
+ radius,
80
+ className,
81
+ style
82
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Monogram, { size, bg, fg, radius, mark: SnowMark, className, style });
79
83
  var Monogram = ({
80
84
  size = 64,
81
- bg = "#0a0a0a",
82
- fg = "#ffffff",
83
- radius = 8,
85
+ bg,
86
+ fg,
87
+ radius,
84
88
  mark: Mark,
85
- glyphScale = 0.6
89
+ glyphScale = 0.6,
90
+ className,
91
+ style
86
92
  }) => /* @__PURE__ */ jsxRuntime.jsx(
87
93
  "div",
88
94
  {
95
+ className: cx("sn-monogram", className),
89
96
  style: {
90
- width: size,
91
- height: size,
92
- background: bg,
93
- borderRadius: radius,
94
- display: "inline-flex",
95
- alignItems: "center",
96
- justifyContent: "center",
97
- flexShrink: 0
97
+ ["--sn-monogram-size"]: `${size}px`,
98
+ ...bg ? { ["--sn-monogram-bg"]: bg } : null,
99
+ ...fg ? { ["--sn-monogram-fg"]: fg } : null,
100
+ ...radius != null ? { ["--sn-monogram-radius"]: `${radius}px` } : null,
101
+ ...style
98
102
  },
99
- children: /* @__PURE__ */ jsxRuntime.jsx(Mark, { size: Math.round(size * glyphScale), color: fg })
103
+ children: /* @__PURE__ */ jsxRuntime.jsx(Mark, { size: Math.round(size * glyphScale), color: fg ?? "currentColor" })
100
104
  }
101
105
  );
102
- var wrap = (style) => ({
103
- display: "inline-block",
104
- verticalAlign: "middle",
105
- ...style
106
+ var sizeStyle2 = (size) => typeof size === "number" ? { ["--sn-mark-size"]: `${size}px` } : void 0;
107
+ var sizeClass2 = (size) => typeof size === "string" ? `sn-mark--${size}` : void 0;
108
+ var cx2 = (...parts) => parts.filter(Boolean).join(" ");
109
+ var baseProps = ({ size, color, className, style }, extra = {}) => ({
110
+ viewBox: "0 0 32 32",
111
+ className: cx2("sn-mark", sizeClass2(size), className),
112
+ style: { ...sizeStyle2(size ?? 64), ...color ? { color } : null, ...style },
113
+ "aria-hidden": true,
114
+ ...extra
106
115
  });
107
- var MarkSigil = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: color, style: wrap(style), "aria-hidden": "true", children: [
116
+ var MarkSigil = (p) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p, { fill: "currentColor" }), children: [
108
117
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.5", y: "3", width: "3", height: "11" }),
109
118
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.5", y: "18", width: "3", height: "11" }),
110
119
  /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "rotate(60 16 16)", children: [
@@ -116,34 +125,34 @@ var MarkSigil = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ *
116
125
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.5", y: "18.5", width: "3", height: "10.5" })
117
126
  ] })
118
127
  ] });
119
- var MarkCrystal = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: "none", stroke: color, strokeWidth: "2.4", strokeLinejoin: "miter", strokeLinecap: "square", style: wrap(style), "aria-hidden": "true", children: [
128
+ var MarkCrystal = (p) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p, { fill: "none", stroke: "currentColor", strokeWidth: 2.4, strokeLinejoin: "miter", strokeLinecap: "square" }), children: [
120
129
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,3 27,9.5 27,22.5 16,29 5,22.5 5,9.5" }),
121
130
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,9 22,16 16,23 10,16" }),
122
131
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "3", x2: "16", y2: "9" }),
123
132
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "23", x2: "16", y2: "29" })
124
133
  ] });
125
- var MarkZFlake = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: color, style: wrap(style), "aria-hidden": "true", children: [
134
+ var MarkZFlake = (p) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p, { fill: "currentColor" }), children: [
126
135
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "6,5 26,5 26,9 12,9 26,23 26,27 6,27 6,23 20,23 6,9" }),
127
136
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "14", width: "3", height: "4" }),
128
137
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "25", y: "14", width: "3", height: "4" })
129
138
  ] });
130
- var MarkAsterisk = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: color, style: wrap(style), "aria-hidden": "true", children: [
131
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "2.2", fill: "none", stroke: color, strokeWidth: "2" }),
139
+ var MarkAsterisk = (p) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p, { fill: "currentColor" }), children: [
140
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "2.2", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
132
141
  [0, 60, 120].map((deg, i) => /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `rotate(${deg} 16 16)`, children: [
133
142
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.6", y: "2", width: "2.8", height: "9", rx: "0.5" }),
134
143
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.6", y: "21", width: "2.8", height: "9", rx: "0.5" })
135
144
  ] }, i))
136
145
  ] });
137
- var MarkSlash = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: "none", stroke: color, strokeWidth: "3.2", strokeLinecap: "square", strokeLinejoin: "miter", style: wrap(style), "aria-hidden": "true", children: [
146
+ var MarkSlash = (p) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p, { fill: "none", stroke: "currentColor", strokeWidth: 3.2, strokeLinecap: "square", strokeLinejoin: "miter" }), children: [
138
147
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "4", x2: "16", y2: "28" }),
139
148
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "10", x2: "26", y2: "22" }),
140
149
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "26", y1: "10", x2: "6", y2: "22" }),
141
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "20", y2: "5", stroke: color, strokeWidth: "4" })
150
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "20", y2: "5", stroke: "currentColor", strokeWidth: "4" })
142
151
  ] });
143
- var MarkGlyph = ({ size = 64, color = "currentColor", style }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 32 32", fill: color, style: wrap(style), "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 5 H25 V11 H13 V14 H25 V27 H7 V21 H19 V18 H7 Z" }) });
144
- var MarkHex = ({ size = 64, color = "currentColor", style }) => {
152
+ var MarkGlyph = (p) => /* @__PURE__ */ jsxRuntime.jsx("svg", { ...baseProps(p, { fill: "currentColor" }), children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 5 H25 V11 H13 V14 H25 V27 H7 V21 H19 V18 H7 Z" }) });
153
+ var MarkHex = (p) => {
145
154
  const id = React__namespace.useId();
146
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", style: wrap(style), "aria-hidden": "true", children: [
155
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...baseProps(p), children: [
147
156
  /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("mask", { id, children: [
148
157
  /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "32", height: "32", fill: "white" }),
149
158
  /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "black", children: [
@@ -152,21 +161,21 @@ var MarkHex = ({ size = 64, color = "currentColor", style }) => {
152
161
  /* @__PURE__ */ jsxRuntime.jsx("g", { transform: "rotate(-60 16 16)", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14.5", y: "6", width: "3", height: "20" }) })
153
162
  ] })
154
163
  ] }) }),
155
- /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,3 27,9.5 27,22.5 16,29 5,22.5 5,9.5", fill: color, mask: `url(#${id})` })
164
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "16,3 27,9.5 27,22.5 16,29 5,22.5 5,9.5", fill: "currentColor", mask: `url(#${id})` })
156
165
  ] });
157
166
  };
158
- var MarkDotgrid = ({ size = 64, color = "currentColor", style }) => {
159
- const dots = [/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "2", fill: color }, "c")];
167
+ var MarkDotgrid = (p) => {
168
+ const dots = [/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "2", fill: "currentColor" }, "c")];
160
169
  for (let a = 0; a < 6; a++) {
161
170
  const ang = a * 60 * Math.PI / 180;
162
171
  for (let r = 1; r <= 3; r++) {
163
172
  const x = 16 + Math.cos(ang) * r * 4;
164
173
  const y = 16 + Math.sin(ang) * r * 4;
165
174
  const rad = r === 3 ? 1.6 : r === 2 ? 1.8 : 2;
166
- dots.push(/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x, cy: y, r: rad, fill: color }, `${a}-${r}`));
175
+ dots.push(/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x, cy: y, r: rad, fill: "currentColor" }, `${a}-${r}`));
167
176
  }
168
177
  }
169
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 32 32", style: wrap(style), "aria-hidden": "true", children: dots });
178
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { ...baseProps(p), children: dots });
170
179
  };
171
180
  var markVariants = [
172
181
  { id: "crystal", name: "Crystal", sub: "hex frame + diamond cut, canonical", Mark: MarkCrystal, exportName: "MarkCrystal" },
@@ -178,10 +187,12 @@ var markVariants = [
178
187
  { id: "dotgrid", name: "Dot-Grid", sub: "pointillist, friendly", Mark: MarkDotgrid, exportName: "MarkDotgrid" },
179
188
  { id: "glyph", name: "Glyph S", sub: "monogram, folded ribbon", Mark: MarkGlyph, exportName: "MarkGlyph" }
180
189
  ];
190
+ var cx3 = (...parts) => parts.filter(Boolean).join(" ");
181
191
  var Icon = ({
182
192
  size = 16,
183
193
  stroke = 1.5,
184
194
  color = "currentColor",
195
+ className,
185
196
  style,
186
197
  children
187
198
  }) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -195,7 +206,8 @@ var Icon = ({
195
206
  strokeWidth: stroke,
196
207
  strokeLinecap: "round",
197
208
  strokeLinejoin: "round",
198
- style: { display: "inline-block", verticalAlign: "middle", ...style },
209
+ className: cx3("sn-icon", className),
210
+ style,
199
211
  "aria-hidden": "true",
200
212
  children
201
213
  }
@@ -349,6 +361,7 @@ var DiscordIcon = (p) => /* @__PURE__ */ jsxRuntime.jsxs(Icon, { ...p, children:
349
361
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "11.5", r: "1.5", fill: "currentColor", stroke: "none" }),
350
362
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "15", cy: "11.5", r: "1.5", fill: "currentColor", stroke: "none" })
351
363
  ] });
364
+ var cx4 = (...parts) => parts.filter(Boolean).join(" ");
352
365
  var initialsFrom = (name) => {
353
366
  if (!name) return "";
354
367
  const parts = name.trim().split(/\s+/).slice(0, 2);
@@ -364,108 +377,97 @@ var Avatar = ({
364
377
  style,
365
378
  className
366
379
  }) => {
367
- const radius = shape === "circle" ? "50%" : "var(--sn-r-xs)";
368
380
  const initials = initialsFrom(name);
369
381
  return /* @__PURE__ */ jsxRuntime.jsx(
370
382
  "span",
371
383
  {
372
- className,
373
- style: {
374
- display: "inline-flex",
375
- alignItems: "center",
376
- justifyContent: "center",
377
- width: size,
378
- height: size,
379
- borderRadius: radius,
380
- background: "var(--sn-bg-elev-1)",
381
- color: "var(--sn-fg-muted)",
382
- fontFamily: "var(--sn-font-mono)",
383
- fontSize: Math.max(10, Math.round(size * 0.38)),
384
- fontWeight: 500,
385
- overflow: "hidden",
386
- flexShrink: 0,
387
- boxShadow: ring ? "0 0 0 1px var(--sn-border-strong)" : void 0,
388
- ...style
389
- },
384
+ className: cx4(
385
+ "sn-avatar",
386
+ shape === "square" && "sn-avatar--square",
387
+ ring && "sn-avatar--ring",
388
+ className
389
+ ),
390
+ style: { ["--sn-avatar-size"]: `${size}px`, ...style },
390
391
  children: src ? (
391
392
  // eslint-disable-next-line @next/next/no-img-element
392
- /* @__PURE__ */ jsxRuntime.jsx(
393
- "img",
394
- {
395
- src,
396
- alt: alt ?? name ?? "",
397
- width: size,
398
- height: size,
399
- style: { width: "100%", height: "100%", objectFit: "cover" }
400
- }
401
- )
393
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: alt ?? name ?? "", width: size, height: size })
402
394
  ) : /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: initials || "\u2022" })
403
395
  }
404
396
  );
405
397
  };
406
- var AvatarStack = ({ children, overlap = 8 }) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex" }, children: React__namespace.Children.map(children, (child, i) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: i === 0 ? 0 : -overlap }, children: child })) });
407
- var Pulse = ({
408
- size = 8,
409
- color = "var(--sn-success)",
410
- label,
411
- style,
412
- className
413
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
398
+ var AvatarStack = ({ children, overlap = 8, className, style }) => /* @__PURE__ */ jsxRuntime.jsx(
399
+ "span",
400
+ {
401
+ className: cx4("sn-avatar-stack", className),
402
+ style: { ["--sn-avatar-overlap"]: `-${overlap}px`, ...style },
403
+ children
404
+ }
405
+ );
406
+ var cx5 = (...parts) => parts.filter(Boolean).join(" ");
407
+ var Pulse = ({ size = 8, color, label, style, className }) => /* @__PURE__ */ jsxRuntime.jsxs(
414
408
  "span",
415
409
  {
416
- className,
410
+ className: cx5("sn-pulse", className),
417
411
  style: {
418
- display: "inline-flex",
419
- alignItems: "center",
420
- gap: 8,
421
- color: "var(--sn-fg-muted)",
422
- fontSize: "var(--sn-text-sm)",
412
+ ["--sn-pulse-size"]: `${size}px`,
413
+ ...color ? { ["--sn-pulse-color"]: color } : null,
423
414
  ...style
424
415
  },
425
416
  children: [
426
- /* @__PURE__ */ jsxRuntime.jsxs(
427
- "span",
428
- {
429
- "aria-hidden": "true",
430
- style: {
431
- position: "relative",
432
- display: "inline-flex",
433
- width: size,
434
- height: size
435
- },
436
- children: [
437
- /* @__PURE__ */ jsxRuntime.jsx(
438
- "span",
439
- {
440
- style: {
441
- position: "absolute",
442
- inset: 0,
443
- borderRadius: "50%",
444
- background: color,
445
- opacity: 0.6,
446
- animation: "sn-pulse 2s ease-in-out infinite"
447
- }
448
- }
449
- ),
450
- /* @__PURE__ */ jsxRuntime.jsx(
451
- "span",
452
- {
453
- style: {
454
- position: "relative",
455
- width: "100%",
456
- height: "100%",
457
- borderRadius: "50%",
458
- background: color
459
- }
460
- }
461
- )
462
- ]
463
- }
464
- ),
417
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "sn-pulse__dot" }),
465
418
  label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
466
419
  ]
467
420
  }
468
421
  );
422
+ var cx6 = (...parts) => parts.filter(Boolean).join(" ");
423
+ var Input = React__namespace.forwardRef(function Input2({ size = "md", invalid, className, ...rest }, ref) {
424
+ return /* @__PURE__ */ jsxRuntime.jsx(
425
+ "input",
426
+ {
427
+ ref,
428
+ className: cx6(
429
+ "sn-input",
430
+ size === "sm" && "sn-input--sm",
431
+ size === "lg" && "sn-input--lg",
432
+ invalid && "sn-input--invalid",
433
+ className
434
+ ),
435
+ "aria-invalid": invalid || void 0,
436
+ ...rest
437
+ }
438
+ );
439
+ });
440
+ var cx7 = (...parts) => parts.filter(Boolean).join(" ");
441
+ var Textarea = React__namespace.forwardRef(function Textarea2({ invalid, className, ...rest }, ref) {
442
+ return /* @__PURE__ */ jsxRuntime.jsx(
443
+ "textarea",
444
+ {
445
+ ref,
446
+ className: cx7("sn-textarea", invalid && "sn-textarea--invalid", className),
447
+ "aria-invalid": invalid || void 0,
448
+ ...rest
449
+ }
450
+ );
451
+ });
452
+ var cx8 = (...parts) => parts.filter(Boolean).join(" ");
453
+ var Label = ({ required, children, className, ...rest }) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx8("sn-label", className), ...rest, children: [
454
+ children,
455
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sn-label__required", "aria-hidden": "true", children: "*" })
456
+ ] });
457
+ var Field = ({
458
+ label,
459
+ hint,
460
+ error,
461
+ required,
462
+ htmlFor,
463
+ children,
464
+ className,
465
+ style
466
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx8("sn-field", className), style, children: [
467
+ label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor, required, children: label }),
468
+ children,
469
+ error ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sn-error", role: "alert", children: error }) : hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sn-hint", children: hint }) : null
470
+ ] });
469
471
 
470
472
  exports.ActivityIcon = ActivityIcon;
471
473
  exports.ArrowRightIcon = ArrowRightIcon;
@@ -488,6 +490,7 @@ exports.DiscordIcon = DiscordIcon;
488
490
  exports.EditIcon = EditIcon;
489
491
  exports.ExternalLinkIcon = ExternalLinkIcon;
490
492
  exports.EyeIcon = EyeIcon;
493
+ exports.Field = Field;
491
494
  exports.FileIcon = FileIcon;
492
495
  exports.FilterIcon = FilterIcon;
493
496
  exports.FolderIcon = FolderIcon;
@@ -498,6 +501,8 @@ exports.HeartIcon = HeartIcon;
498
501
  exports.Icon = Icon;
499
502
  exports.InboxIcon = InboxIcon;
500
503
  exports.InfoIcon = InfoIcon;
504
+ exports.Input = Input;
505
+ exports.Label = Label;
501
506
  exports.LayersIcon = LayersIcon;
502
507
  exports.LockIcon = LockIcon;
503
508
  exports.MailIcon = MailIcon;
@@ -524,6 +529,7 @@ exports.SnowWordmark = SnowWordmark;
524
529
  exports.StarIcon = StarIcon;
525
530
  exports.SunIcon = SunIcon;
526
531
  exports.TerminalIcon = TerminalIcon;
532
+ exports.Textarea = Textarea;
527
533
  exports.TrashIcon = TrashIcon;
528
534
  exports.UserIcon = UserIcon;
529
535
  exports.WarningIcon = WarningIcon;