@designa8/vibedesign-v6 2.2.1 → 2.2.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 +93 -67
- package/dist/index.js +93 -67
- package/dist/styles.css +12 -6
- package/package.json +1 -1
- package/src/atoms/ChatHistorySidebar/ChatHistorySidebar.tsx +24 -19
- package/src/atoms/ChatHistorySidebar/preview.tsx +14 -6
- package/src/atoms/ChatScreen/ChatScreen.tsx +35 -23
- package/src/atoms/ChatScreen/preview.tsx +31 -26
- package/src/atoms/Chip/Chip.tsx +61 -44
- package/src/atoms/Chip/preview.tsx +61 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Chip } from "./Chip";
|
|
3
3
|
import { Icon } from "../Icon";
|
|
4
|
+
import { Button } from "../Button";
|
|
4
5
|
|
|
5
6
|
export default function ChipPreview() {
|
|
6
7
|
const [tags, setTags] = useState(["Design", "React", "TypeScript", "Figma"]);
|
|
7
8
|
const [photoTags, setPhotoTags] = useState(["Sunset"]);
|
|
9
|
+
const [uploadProgress, setUploadProgress] = useState(35);
|
|
8
10
|
|
|
9
11
|
const removeTag = (tag: string) => setTags((prev) => prev.filter((t) => t !== tag));
|
|
10
12
|
const removePhotoTag = (tag: string) => setPhotoTags((prev) => prev.filter((t) => t !== tag));
|
|
@@ -101,6 +103,65 @@ export default function ChipPreview() {
|
|
|
101
103
|
<p className="text-caption text-muted">Click a chip's thumbnail or label to open it fullscreen.</p>
|
|
102
104
|
</section>
|
|
103
105
|
|
|
106
|
+
{/* Upload Progress */}
|
|
107
|
+
<section className="space-y-sm">
|
|
108
|
+
<p className="text-caption text-muted uppercase tracking-wide">Upload Progress (adjust below to test)</p>
|
|
109
|
+
<div className="space-y-md">
|
|
110
|
+
<div className="w-full space-y-sm">
|
|
111
|
+
<label htmlFor="progress-display" className="text-body-sm text-muted">
|
|
112
|
+
Progress: {uploadProgress}%
|
|
113
|
+
</label>
|
|
114
|
+
<div id="progress-display" className="w-full bg-surface-soft rounded-md h-2 overflow-hidden border border-hairline">
|
|
115
|
+
<div
|
|
116
|
+
className="h-full bg-primary transition-all duration-200"
|
|
117
|
+
style={{ width: `${uploadProgress}%` }}
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div className="flex flex-wrap gap-sm items-center">
|
|
122
|
+
<Chip
|
|
123
|
+
label="Uploading..."
|
|
124
|
+
variant="default"
|
|
125
|
+
imageSrc={placeholderImgA}
|
|
126
|
+
imageAlt="Upload progress"
|
|
127
|
+
uploadProgress={uploadProgress}
|
|
128
|
+
/>
|
|
129
|
+
<Chip
|
|
130
|
+
label="With dismiss"
|
|
131
|
+
variant="primary"
|
|
132
|
+
imageSrc={placeholderImgB}
|
|
133
|
+
imageAlt="Upload progress"
|
|
134
|
+
uploadProgress={uploadProgress}
|
|
135
|
+
onDismiss={() => {}}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
<p className="text-caption text-muted">Use the controls below to simulate upload progress. At 100%, the progress bar hides.</p>
|
|
139
|
+
<div className="flex flex-wrap gap-sm">
|
|
140
|
+
<Button
|
|
141
|
+
variant="secondary"
|
|
142
|
+
size="sm"
|
|
143
|
+
onClick={() => setUploadProgress(Math.max(0, uploadProgress - 10))}
|
|
144
|
+
>
|
|
145
|
+
-10%
|
|
146
|
+
</Button>
|
|
147
|
+
<Button
|
|
148
|
+
variant="secondary"
|
|
149
|
+
size="sm"
|
|
150
|
+
onClick={() => setUploadProgress(Math.min(100, uploadProgress + 10))}
|
|
151
|
+
>
|
|
152
|
+
+10%
|
|
153
|
+
</Button>
|
|
154
|
+
<Button
|
|
155
|
+
variant="primary"
|
|
156
|
+
size="sm"
|
|
157
|
+
onClick={() => setUploadProgress(100)}
|
|
158
|
+
>
|
|
159
|
+
Complete
|
|
160
|
+
</Button>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
104
165
|
{/* Disabled */}
|
|
105
166
|
<section className="space-y-sm">
|
|
106
167
|
<p className="text-caption text-muted uppercase tracking-wide">Disabled State</p>
|