@designa8/vibedesign-snapchat-deepseek-image-v1-2-176b 0.0.2 → 0.0.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 +1 -1
- package/dist/index.cjs +34 -1
- package/dist/index.js +34 -1
- package/dist/styles.css +5 -0
- package/package.json +1 -1
- package/src/atoms/Button/Button.tsx +54 -2
- package/src/atoms/Button/preview.tsx +87 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-snapchat-deepseek-image-v1-2-176b
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.0.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.0.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
|
@@ -292,6 +292,11 @@ var SIZES = {
|
|
|
292
292
|
md: "h-10 px-lg gap-sm text-label-md",
|
|
293
293
|
lg: "h-12 px-xl gap-sm text-body-lg"
|
|
294
294
|
};
|
|
295
|
+
var LABEL_GAPS = {
|
|
296
|
+
sm: "gap-xs",
|
|
297
|
+
md: "gap-sm",
|
|
298
|
+
lg: "gap-sm"
|
|
299
|
+
};
|
|
295
300
|
var ICON_SIZES = {
|
|
296
301
|
sm: "h-9 w-9 p-0",
|
|
297
302
|
md: "h-11 w-11 p-0",
|
|
@@ -333,6 +338,19 @@ var VARIANTS = {
|
|
|
333
338
|
forcedHover: "bg-surface-soft",
|
|
334
339
|
forcedPressed: "bg-surface-strong",
|
|
335
340
|
disabled: "disabled:text-muted-soft"
|
|
341
|
+
},
|
|
342
|
+
/**
|
|
343
|
+
* Destructive action. The red fill carries white text; hover and press
|
|
344
|
+
* darken the whole surface with a single opacity step rather than a second
|
|
345
|
+
* red token. Disabled reuses the filled-control palette, like `primary`.
|
|
346
|
+
*/
|
|
347
|
+
danger: {
|
|
348
|
+
base: "bg-semantic-error text-on-semantic-error",
|
|
349
|
+
hover: "hover:opacity-90",
|
|
350
|
+
pressed: "active:opacity-90",
|
|
351
|
+
forcedHover: "opacity-90",
|
|
352
|
+
forcedPressed: "opacity-90",
|
|
353
|
+
disabled: "disabled:bg-primary-disabled disabled:text-on-primary-disabled disabled:shadow-none"
|
|
336
354
|
}
|
|
337
355
|
};
|
|
338
356
|
var FORCED_FOCUS = "ring-2 ring-focus-blue ring-offset-2 ring-offset-canvas";
|
|
@@ -341,6 +359,8 @@ var Button = React2.forwardRef(
|
|
|
341
359
|
variant = "primary",
|
|
342
360
|
size = "md",
|
|
343
361
|
iconOnly = false,
|
|
362
|
+
iconLeft,
|
|
363
|
+
iconRight,
|
|
344
364
|
loading = false,
|
|
345
365
|
disabled = false,
|
|
346
366
|
fullWidth = false,
|
|
@@ -384,7 +404,20 @@ var Button = React2.forwardRef(
|
|
|
384
404
|
),
|
|
385
405
|
...rest,
|
|
386
406
|
children: [
|
|
387
|
-
bare || iconOnly ? children : /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
407
|
+
bare || iconOnly ? children : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
408
|
+
"span",
|
|
409
|
+
{
|
|
410
|
+
className: cx2(
|
|
411
|
+
"inline-flex items-center",
|
|
412
|
+
LABEL_GAPS[size]
|
|
413
|
+
),
|
|
414
|
+
children: [
|
|
415
|
+
iconLeft != null && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "inline-flex shrink-0 items-center", children: iconLeft }),
|
|
416
|
+
children,
|
|
417
|
+
iconRight != null && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "inline-flex shrink-0 items-center", children: iconRight })
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
),
|
|
388
421
|
loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
389
422
|
Icon,
|
|
390
423
|
{
|
package/dist/index.js
CHANGED
|
@@ -173,6 +173,11 @@ var SIZES = {
|
|
|
173
173
|
md: "h-10 px-lg gap-sm text-label-md",
|
|
174
174
|
lg: "h-12 px-xl gap-sm text-body-lg"
|
|
175
175
|
};
|
|
176
|
+
var LABEL_GAPS = {
|
|
177
|
+
sm: "gap-xs",
|
|
178
|
+
md: "gap-sm",
|
|
179
|
+
lg: "gap-sm"
|
|
180
|
+
};
|
|
176
181
|
var ICON_SIZES = {
|
|
177
182
|
sm: "h-9 w-9 p-0",
|
|
178
183
|
md: "h-11 w-11 p-0",
|
|
@@ -214,6 +219,19 @@ var VARIANTS = {
|
|
|
214
219
|
forcedHover: "bg-surface-soft",
|
|
215
220
|
forcedPressed: "bg-surface-strong",
|
|
216
221
|
disabled: "disabled:text-muted-soft"
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Destructive action. The red fill carries white text; hover and press
|
|
225
|
+
* darken the whole surface with a single opacity step rather than a second
|
|
226
|
+
* red token. Disabled reuses the filled-control palette, like `primary`.
|
|
227
|
+
*/
|
|
228
|
+
danger: {
|
|
229
|
+
base: "bg-semantic-error text-on-semantic-error",
|
|
230
|
+
hover: "hover:opacity-90",
|
|
231
|
+
pressed: "active:opacity-90",
|
|
232
|
+
forcedHover: "opacity-90",
|
|
233
|
+
forcedPressed: "opacity-90",
|
|
234
|
+
disabled: "disabled:bg-primary-disabled disabled:text-on-primary-disabled disabled:shadow-none"
|
|
217
235
|
}
|
|
218
236
|
};
|
|
219
237
|
var FORCED_FOCUS = "ring-2 ring-focus-blue ring-offset-2 ring-offset-canvas";
|
|
@@ -222,6 +240,8 @@ var Button = React2.forwardRef(
|
|
|
222
240
|
variant = "primary",
|
|
223
241
|
size = "md",
|
|
224
242
|
iconOnly = false,
|
|
243
|
+
iconLeft,
|
|
244
|
+
iconRight,
|
|
225
245
|
loading = false,
|
|
226
246
|
disabled = false,
|
|
227
247
|
fullWidth = false,
|
|
@@ -265,7 +285,20 @@ var Button = React2.forwardRef(
|
|
|
265
285
|
),
|
|
266
286
|
...rest,
|
|
267
287
|
children: [
|
|
268
|
-
bare || iconOnly ? children : /* @__PURE__ */
|
|
288
|
+
bare || iconOnly ? children : /* @__PURE__ */ jsxs(
|
|
289
|
+
"span",
|
|
290
|
+
{
|
|
291
|
+
className: cx2(
|
|
292
|
+
"inline-flex items-center",
|
|
293
|
+
LABEL_GAPS[size]
|
|
294
|
+
),
|
|
295
|
+
children: [
|
|
296
|
+
iconLeft != null && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0 items-center", children: iconLeft }),
|
|
297
|
+
children,
|
|
298
|
+
iconRight != null && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0 items-center", children: iconRight })
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
),
|
|
269
302
|
loading && /* @__PURE__ */ jsx2(
|
|
270
303
|
Icon,
|
|
271
304
|
{
|
package/dist/styles.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designa8/vibedesign-snapchat-deepseek-image-v1-2-176b",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Complete design system \"My Project snapchat-deepseek-image-v1\" generated by Atoms Design.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Icon } from "../Icon";
|
|
3
3
|
|
|
4
|
-
export type ButtonVariant =
|
|
4
|
+
export type ButtonVariant =
|
|
5
|
+
| "primary"
|
|
6
|
+
| "secondary"
|
|
7
|
+
| "ghost"
|
|
8
|
+
| "soft"
|
|
9
|
+
| "danger";
|
|
5
10
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
6
11
|
|
|
7
12
|
/**
|
|
@@ -26,6 +31,10 @@ export interface ButtonProps
|
|
|
26
31
|
size?: ButtonSize;
|
|
27
32
|
/** Square, label-less control for a single glyph. Always pair with `aria-label`. */
|
|
28
33
|
iconOnly?: boolean;
|
|
34
|
+
/** Glyph rendered before the label, on the same horizontal line. */
|
|
35
|
+
iconLeft?: React.ReactNode;
|
|
36
|
+
/** Glyph rendered after the label, on the same horizontal line. */
|
|
37
|
+
iconRight?: React.ReactNode;
|
|
29
38
|
/** Renders a trailing spinner and blocks activation while true. */
|
|
30
39
|
loading?: boolean;
|
|
31
40
|
/** Native disabled attribute plus non-interactive styling. */
|
|
@@ -61,6 +70,16 @@ const SIZES: Record<ButtonSize, string> = {
|
|
|
61
70
|
lg: "h-12 px-xl gap-sm text-body-lg",
|
|
62
71
|
};
|
|
63
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Gap between the icon slots and the label, stepped down on `sm` so a compact
|
|
75
|
+
* button stays optically tight. Kept in step with the button-level gap.
|
|
76
|
+
*/
|
|
77
|
+
const LABEL_GAPS: Record<ButtonSize, string> = {
|
|
78
|
+
sm: "gap-xs",
|
|
79
|
+
md: "gap-sm",
|
|
80
|
+
lg: "gap-sm",
|
|
81
|
+
};
|
|
82
|
+
|
|
64
83
|
/**
|
|
65
84
|
* Square geometry for a glyph-only control. Heights stay at or below 48px so
|
|
66
85
|
* the 24px radius clamps to half the height and the surface is a true circle.
|
|
@@ -119,6 +138,20 @@ const VARIANTS: Record<ButtonVariant, VariantRecipe> = {
|
|
|
119
138
|
forcedPressed: "bg-surface-strong",
|
|
120
139
|
disabled: "disabled:text-muted-soft",
|
|
121
140
|
},
|
|
141
|
+
/**
|
|
142
|
+
* Destructive action. The red fill carries white text; hover and press
|
|
143
|
+
* darken the whole surface with a single opacity step rather than a second
|
|
144
|
+
* red token. Disabled reuses the filled-control palette, like `primary`.
|
|
145
|
+
*/
|
|
146
|
+
danger: {
|
|
147
|
+
base: "bg-semantic-error text-on-semantic-error",
|
|
148
|
+
hover: "hover:opacity-90",
|
|
149
|
+
pressed: "active:opacity-90",
|
|
150
|
+
forcedHover: "opacity-90",
|
|
151
|
+
forcedPressed: "opacity-90",
|
|
152
|
+
disabled:
|
|
153
|
+
"disabled:bg-primary-disabled disabled:text-on-primary-disabled disabled:shadow-none",
|
|
154
|
+
},
|
|
122
155
|
};
|
|
123
156
|
|
|
124
157
|
const FORCED_FOCUS = "ring-2 ring-focus-blue ring-offset-2 ring-offset-canvas";
|
|
@@ -129,6 +162,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
129
162
|
variant = "primary",
|
|
130
163
|
size = "md",
|
|
131
164
|
iconOnly = false,
|
|
165
|
+
iconLeft,
|
|
166
|
+
iconRight,
|
|
132
167
|
loading = false,
|
|
133
168
|
disabled = false,
|
|
134
169
|
fullWidth = false,
|
|
@@ -177,7 +212,24 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
177
212
|
{bare || iconOnly ? (
|
|
178
213
|
children
|
|
179
214
|
) : (
|
|
180
|
-
<span
|
|
215
|
+
<span
|
|
216
|
+
className={cx(
|
|
217
|
+
"inline-flex items-center",
|
|
218
|
+
LABEL_GAPS[size],
|
|
219
|
+
)}
|
|
220
|
+
>
|
|
221
|
+
{iconLeft != null && (
|
|
222
|
+
<span className="inline-flex shrink-0 items-center">
|
|
223
|
+
{iconLeft}
|
|
224
|
+
</span>
|
|
225
|
+
)}
|
|
226
|
+
{children}
|
|
227
|
+
{iconRight != null && (
|
|
228
|
+
<span className="inline-flex shrink-0 items-center">
|
|
229
|
+
{iconRight}
|
|
230
|
+
</span>
|
|
231
|
+
)}
|
|
232
|
+
</span>
|
|
181
233
|
)}
|
|
182
234
|
{loading && (
|
|
183
235
|
<Icon
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Button } from "./Button";
|
|
3
3
|
import type { ButtonVisualState } from "./Button";
|
|
4
|
+
import { Icon } from "../Icon";
|
|
4
5
|
|
|
5
6
|
const STATES: Array<{ label: string; state: ButtonVisualState }> = [
|
|
6
7
|
{ label: "Default", state: "default" },
|
|
@@ -46,10 +47,6 @@ export default function ButtonPreview() {
|
|
|
46
47
|
</StateCell>
|
|
47
48
|
))}
|
|
48
49
|
|
|
49
|
-
<StateCell label="Loading">
|
|
50
|
-
<Button loading>Review Promotion</Button>
|
|
51
|
-
</StateCell>
|
|
52
|
-
|
|
53
50
|
<StateCell label="Disabled">
|
|
54
51
|
<Button disabled>Review Promotion</Button>
|
|
55
52
|
</StateCell>
|
|
@@ -60,6 +57,9 @@ export default function ButtonPreview() {
|
|
|
60
57
|
<h3 className="text-heading-sm text-ink">Interactive</h3>
|
|
61
58
|
<div className="flex flex-wrap items-center gap-md">
|
|
62
59
|
<Button
|
|
60
|
+
iconLeft={
|
|
61
|
+
<Icon name="plus" size={18} strokeWidth={2.5} tone="inherit" />
|
|
62
|
+
}
|
|
63
63
|
loading={loading}
|
|
64
64
|
onClick={() => {
|
|
65
65
|
setClicks((value) => value + 1);
|
|
@@ -79,6 +79,33 @@ export default function ButtonPreview() {
|
|
|
79
79
|
</div>
|
|
80
80
|
</section>
|
|
81
81
|
|
|
82
|
+
<section className="space-y-md">
|
|
83
|
+
<h3 className="text-heading-sm text-ink">Danger</h3>
|
|
84
|
+
<div className="flex flex-wrap items-center gap-md">
|
|
85
|
+
<Button variant="danger">Delete workspace</Button>
|
|
86
|
+
<Button
|
|
87
|
+
variant="danger"
|
|
88
|
+
iconLeft={
|
|
89
|
+
<Icon name="trash" size={18} strokeWidth={2} tone="inherit" />
|
|
90
|
+
}
|
|
91
|
+
>
|
|
92
|
+
Delete workspace
|
|
93
|
+
</Button>
|
|
94
|
+
<Button variant="danger" size="sm">
|
|
95
|
+
Small
|
|
96
|
+
</Button>
|
|
97
|
+
<Button variant="danger" size="lg">
|
|
98
|
+
Large
|
|
99
|
+
</Button>
|
|
100
|
+
<Button variant="danger" loading>
|
|
101
|
+
Deleting
|
|
102
|
+
</Button>
|
|
103
|
+
<Button variant="danger" disabled>
|
|
104
|
+
Disabled
|
|
105
|
+
</Button>
|
|
106
|
+
</div>
|
|
107
|
+
</section>
|
|
108
|
+
|
|
82
109
|
<section className="space-y-md">
|
|
83
110
|
<h3 className="text-heading-sm text-ink">Sizes and variants</h3>
|
|
84
111
|
<div className="flex flex-wrap items-center gap-md">
|
|
@@ -90,6 +117,62 @@ export default function ButtonPreview() {
|
|
|
90
117
|
</div>
|
|
91
118
|
<Button fullWidth>Full width promotion</Button>
|
|
92
119
|
</section>
|
|
120
|
+
|
|
121
|
+
<section className="space-y-md">
|
|
122
|
+
<h3 className="text-heading-sm text-ink">Icon slots</h3>
|
|
123
|
+
<div className="flex flex-wrap items-center gap-md">
|
|
124
|
+
<Button
|
|
125
|
+
size="sm"
|
|
126
|
+
iconLeft={
|
|
127
|
+
<Icon name="plus" size={14} strokeWidth={2.5} tone="inherit" />
|
|
128
|
+
}
|
|
129
|
+
>
|
|
130
|
+
Add item
|
|
131
|
+
</Button>
|
|
132
|
+
<Button
|
|
133
|
+
iconLeft={
|
|
134
|
+
<Icon name="plus" size={18} strokeWidth={2.5} tone="inherit" />
|
|
135
|
+
}
|
|
136
|
+
>
|
|
137
|
+
Add item
|
|
138
|
+
</Button>
|
|
139
|
+
<Button
|
|
140
|
+
size="lg"
|
|
141
|
+
iconLeft={
|
|
142
|
+
<Icon name="plus" size={20} strokeWidth={2.5} tone="inherit" />
|
|
143
|
+
}
|
|
144
|
+
>
|
|
145
|
+
Add item
|
|
146
|
+
</Button>
|
|
147
|
+
<Button
|
|
148
|
+
variant="secondary"
|
|
149
|
+
iconRight={
|
|
150
|
+
<Icon name="arrow-right" size={18} strokeWidth={2} tone="inherit" />
|
|
151
|
+
}
|
|
152
|
+
>
|
|
153
|
+
Continue
|
|
154
|
+
</Button>
|
|
155
|
+
<Button
|
|
156
|
+
variant="secondary"
|
|
157
|
+
iconLeft={
|
|
158
|
+
<Icon name="plus" size={18} strokeWidth={2.5} tone="inherit" />
|
|
159
|
+
}
|
|
160
|
+
iconRight={
|
|
161
|
+
<Icon name="arrow-right" size={18} strokeWidth={2} tone="inherit" />
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
Both sides
|
|
165
|
+
</Button>
|
|
166
|
+
<Button
|
|
167
|
+
variant="ghost"
|
|
168
|
+
iconLeft={
|
|
169
|
+
<Icon name="plus" size={18} strokeWidth={2.5} tone="inherit" />
|
|
170
|
+
}
|
|
171
|
+
>
|
|
172
|
+
Add item
|
|
173
|
+
</Button>
|
|
174
|
+
</div>
|
|
175
|
+
</section>
|
|
93
176
|
</div>
|
|
94
177
|
);
|
|
95
178
|
}
|