@dust-tt/sparkle 0.2.274 → 0.2.276

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.
Files changed (157) hide show
  1. package/dist/cjs/index.js +8245 -8259
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/esm/components/AssistantPreview.d.ts.map +1 -1
  4. package/dist/esm/components/AssistantPreview.js +1 -1
  5. package/dist/esm/components/AssistantPreview.js.map +1 -1
  6. package/dist/esm/components/Banner.js +1 -1
  7. package/dist/esm/components/Banner.js.map +1 -1
  8. package/dist/esm/components/BarHeader.js +5 -5
  9. package/dist/esm/components/BarHeader.js.map +1 -1
  10. package/dist/esm/components/Button.d.ts +20 -24
  11. package/dist/esm/components/Button.d.ts.map +1 -1
  12. package/dist/esm/components/Button.js +76 -117
  13. package/dist/esm/components/Button.js.map +1 -1
  14. package/dist/esm/components/Citation.js +1 -1
  15. package/dist/esm/components/Citation.js.map +1 -1
  16. package/dist/esm/components/ConversationMessageActions.d.ts.map +1 -1
  17. package/dist/esm/components/ConversationMessageActions.js +2 -2
  18. package/dist/esm/components/ConversationMessageActions.js.map +1 -1
  19. package/dist/esm/components/DataTable.js +2 -2
  20. package/dist/esm/components/DataTable.js.map +1 -1
  21. package/dist/esm/components/Dialog.d.ts +2 -2
  22. package/dist/esm/components/Dialog.d.ts.map +1 -1
  23. package/dist/esm/components/Dialog.js +2 -2
  24. package/dist/esm/components/Dialog.js.map +1 -1
  25. package/dist/esm/components/FilterChips.d.ts.map +1 -1
  26. package/dist/esm/components/FilterChips.js +1 -1
  27. package/dist/esm/components/FilterChips.js.map +1 -1
  28. package/dist/esm/components/IconButton.d.ts +4 -3
  29. package/dist/esm/components/IconButton.d.ts.map +1 -1
  30. package/dist/esm/components/IconButton.js +41 -65
  31. package/dist/esm/components/IconButton.js.map +1 -1
  32. package/dist/esm/components/Input.d.ts.map +1 -1
  33. package/dist/esm/components/Input.js +20 -7
  34. package/dist/esm/components/Input.js.map +1 -1
  35. package/dist/esm/components/Label.js +1 -1
  36. package/dist/esm/components/Label.js.map +1 -1
  37. package/dist/esm/components/Markdown.d.ts.map +1 -1
  38. package/dist/esm/components/Markdown.js +2 -2
  39. package/dist/esm/components/Markdown.js.map +1 -1
  40. package/dist/esm/components/NavigationList.d.ts +18 -0
  41. package/dist/esm/components/NavigationList.d.ts.map +1 -0
  42. package/dist/esm/components/NavigationList.js +70 -0
  43. package/dist/esm/components/NavigationList.js.map +1 -0
  44. package/dist/esm/components/NewDropdown.js +2 -2
  45. package/dist/esm/components/NewDropdown.js.map +1 -1
  46. package/dist/esm/components/Notification.js +1 -1
  47. package/dist/esm/components/Notification.js.map +1 -1
  48. package/dist/esm/components/Pagination.d.ts.map +1 -1
  49. package/dist/esm/components/Pagination.js +2 -2
  50. package/dist/esm/components/Pagination.js.map +1 -1
  51. package/dist/esm/components/Popover.js +1 -1
  52. package/dist/esm/components/Popup.js +1 -1
  53. package/dist/esm/components/Popup.js.map +1 -1
  54. package/dist/esm/components/RadioGroup.d.ts.map +1 -1
  55. package/dist/esm/components/RadioGroup.js +4 -4
  56. package/dist/esm/components/RadioGroup.js.map +1 -1
  57. package/dist/esm/components/Searchbar.js +1 -1
  58. package/dist/esm/components/Searchbar.js.map +1 -1
  59. package/dist/esm/components/Spinner.d.ts +6 -2
  60. package/dist/esm/components/Spinner.d.ts.map +1 -1
  61. package/dist/esm/components/Spinner.js +34 -47
  62. package/dist/esm/components/Spinner.js.map +1 -1
  63. package/dist/esm/components/Tree.d.ts +2 -1
  64. package/dist/esm/components/Tree.d.ts.map +1 -1
  65. package/dist/esm/components/Tree.js +9 -9
  66. package/dist/esm/components/Tree.js.map +1 -1
  67. package/dist/esm/components/ZoomableImageCitationWrapper.js +1 -1
  68. package/dist/esm/components/index.d.ts +2 -1
  69. package/dist/esm/components/index.d.ts.map +1 -1
  70. package/dist/esm/components/index.js +2 -1
  71. package/dist/esm/components/index.js.map +1 -1
  72. package/dist/esm/stories/Banner.stories.js +1 -1
  73. package/dist/esm/stories/Banner.stories.js.map +1 -1
  74. package/dist/esm/stories/Button.stories.d.ts +3 -16
  75. package/dist/esm/stories/Button.stories.d.ts.map +1 -1
  76. package/dist/esm/stories/Button.stories.js +54 -166
  77. package/dist/esm/stories/Button.stories.js.map +1 -1
  78. package/dist/esm/stories/CardButton.stories.js +1 -1
  79. package/dist/esm/stories/CardButton.stories.js.map +1 -1
  80. package/dist/esm/stories/ContextItem.stories.d.ts.map +1 -1
  81. package/dist/esm/stories/ContextItem.stories.js +5 -5
  82. package/dist/esm/stories/ContextItem.stories.js.map +1 -1
  83. package/dist/esm/stories/Dialog.stories.js +1 -1
  84. package/dist/esm/stories/Dialog.stories.js.map +1 -1
  85. package/dist/esm/stories/DropdownMenu.stories.d.ts.map +1 -1
  86. package/dist/esm/stories/DropdownMenu.stories.js +7 -7
  87. package/dist/esm/stories/DropdownMenu.stories.js.map +1 -1
  88. package/dist/esm/stories/IconButton.stories.js +4 -4
  89. package/dist/esm/stories/IconButton.stories.js.map +1 -1
  90. package/dist/esm/stories/Input.stories.js +1 -1
  91. package/dist/esm/stories/Input.stories.js.map +1 -1
  92. package/dist/esm/stories/Markdown.stories.d.ts +1 -2
  93. package/dist/esm/stories/Markdown.stories.d.ts.map +1 -1
  94. package/dist/esm/stories/Modal.stories.d.ts.map +1 -1
  95. package/dist/esm/stories/Modal.stories.js +1 -2
  96. package/dist/esm/stories/Modal.stories.js.map +1 -1
  97. package/dist/esm/stories/NavigationList.stories.d.ts +7 -0
  98. package/dist/esm/stories/NavigationList.stories.d.ts.map +1 -0
  99. package/dist/esm/stories/NavigationList.stories.js +140 -0
  100. package/dist/esm/stories/NavigationList.stories.js.map +1 -0
  101. package/dist/esm/stories/NewDropdown.stories.js +2 -2
  102. package/dist/esm/stories/NewDropdown.stories.js.map +1 -1
  103. package/dist/esm/stories/Page.stories.d.ts.map +1 -1
  104. package/dist/esm/stories/Page.stories.js +6 -6
  105. package/dist/esm/stories/Page.stories.js.map +1 -1
  106. package/dist/esm/stories/Popover.stories.js +1 -1
  107. package/dist/esm/stories/Popover.stories.js.map +1 -1
  108. package/dist/esm/stories/Searchbar.stories.js +3 -3
  109. package/dist/esm/stories/Searchbar.stories.js.map +1 -1
  110. package/dist/esm/stories/SliderToggle.stories.js +2 -2
  111. package/dist/esm/stories/SliderToggle.stories.js.map +1 -1
  112. package/dist/esm/stories/Tree.stories.d.ts.map +1 -1
  113. package/dist/esm/stories/Tree.stories.js +6 -6
  114. package/dist/esm/stories/Tree.stories.js.map +1 -1
  115. package/dist/sparkle.css +186 -281
  116. package/package.json +1 -1
  117. package/src/components/AssistantPreview.tsx +1 -5
  118. package/src/components/Banner.tsx +1 -1
  119. package/src/components/BarHeader.tsx +8 -11
  120. package/src/components/Button.tsx +169 -237
  121. package/src/components/Citation.tsx +1 -1
  122. package/src/components/ConversationMessageActions.tsx +3 -7
  123. package/src/components/DataTable.tsx +2 -2
  124. package/src/components/Dialog.tsx +5 -5
  125. package/src/components/FilterChips.tsx +1 -2
  126. package/src/components/IconButton.tsx +56 -87
  127. package/src/components/Input.tsx +44 -31
  128. package/src/components/Label.tsx +1 -1
  129. package/src/components/Markdown.tsx +2 -3
  130. package/src/components/NavigationList.tsx +137 -0
  131. package/src/components/NewDropdown.tsx +2 -2
  132. package/src/components/Notification.tsx +1 -1
  133. package/src/components/Pagination.tsx +2 -8
  134. package/src/components/Popover.tsx +1 -1
  135. package/src/components/Popup.tsx +1 -1
  136. package/src/components/RadioGroup.tsx +20 -22
  137. package/src/components/Searchbar.tsx +1 -1
  138. package/src/components/Spinner.tsx +45 -68
  139. package/src/components/Tree.tsx +11 -9
  140. package/src/components/ZoomableImageCitationWrapper.tsx +1 -1
  141. package/src/components/index.ts +6 -1
  142. package/src/stories/Banner.stories.tsx +1 -1
  143. package/src/stories/Button.stories.tsx +62 -607
  144. package/src/stories/CardButton.stories.tsx +1 -1
  145. package/src/stories/ContextItem.stories.tsx +6 -11
  146. package/src/stories/Dialog.stories.tsx +1 -1
  147. package/src/stories/DropdownMenu.stories.tsx +8 -27
  148. package/src/stories/IconButton.stories.tsx +4 -4
  149. package/src/stories/Input.stories.tsx +14 -14
  150. package/src/stories/Modal.stories.tsx +1 -2
  151. package/src/stories/NavigationList.stories.tsx +173 -0
  152. package/src/stories/NewDropdown.stories.tsx +2 -16
  153. package/src/stories/Page.stories.tsx +6 -9
  154. package/src/stories/Popover.stories.tsx +1 -1
  155. package/src/stories/Searchbar.stories.tsx +3 -3
  156. package/src/stories/SliderToggle.stories.tsx +2 -2
  157. package/src/stories/Tree.stories.tsx +6 -10
@@ -1,15 +1,7 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
1
+ import type { Meta } from "@storybook/react";
2
2
  import React from "react";
3
3
 
4
- import {
5
- Button,
6
- Cog6ToothIcon,
7
- Tooltip,
8
- TooltipContent,
9
- TooltipProvider,
10
- TooltipRoot,
11
- TooltipTrigger,
12
- } from "../index_with_tw_base";
4
+ import { Button, PlusIcon, RobotIcon, Separator } from "../index_with_tw_base";
13
5
 
14
6
  const meta = {
15
7
  title: "Primitives/Button",
@@ -17,621 +9,84 @@ const meta = {
17
9
  } satisfies Meta<typeof Button>;
18
10
 
19
11
  export default meta;
20
- type Story = StoryObj<typeof meta>;
21
12
 
22
- export const ButtonExamples = () => (
23
- <div className="s-flex s-flex-col s-gap-4">
24
- <div className="s-flex s-items-center s-gap-4">
25
- <Button
26
- variant="primary"
27
- size="lg"
28
- label="Settings"
29
- icon={Cog6ToothIcon}
30
- />
31
- <Button
32
- variant="primary"
33
- size="md"
34
- label="Settings"
35
- icon={Cog6ToothIcon}
36
- />
37
- <Button
38
- variant="primary"
39
- size="md"
40
- label="Settings"
41
- icon={Cog6ToothIcon}
42
- disabled={true}
43
- />
44
- <Button
45
- variant="primary"
46
- size="sm"
47
- label="Settings"
48
- icon={Cog6ToothIcon}
49
- />
50
- <Button
51
- variant="primary"
52
- size="sm"
53
- label="Settings"
54
- icon={Cog6ToothIcon}
55
- disabled
56
- />
57
- <Button
58
- variant="primary"
59
- size="xs"
60
- label="Settings"
61
- icon={Cog6ToothIcon}
62
- />
63
- <Button
64
- variant="primary"
65
- size="xs"
66
- label="Settings"
67
- icon={Cog6ToothIcon}
68
- disabled
69
- />
70
- </div>
71
- <div className="s-flex s-items-center s-gap-4">
72
- <Button
73
- variant="primaryWarning"
74
- size="lg"
75
- label="Settings"
76
- icon={Cog6ToothIcon}
77
- />
78
- <Button
79
- variant="primaryWarning"
80
- size="md"
81
- label="Settings"
82
- icon={Cog6ToothIcon}
83
- />
84
- <Button
85
- variant="primaryWarning"
86
- size="md"
87
- label="Settings"
88
- icon={Cog6ToothIcon}
89
- disabled={true}
90
- />
91
- <Button
92
- variant="primaryWarning"
93
- size="sm"
94
- label="Settings"
95
- icon={Cog6ToothIcon}
96
- />
97
- <Button
98
- variant="primaryWarning"
99
- size="sm"
100
- label="Settings"
101
- icon={Cog6ToothIcon}
102
- disabled
103
- />
104
- <Button
105
- variant="primaryWarning"
106
- size="xs"
107
- label="Settings"
108
- icon={Cog6ToothIcon}
109
- />
110
- <Button
111
- variant="primaryWarning"
112
- size="xs"
113
- label="Settings"
114
- icon={Cog6ToothIcon}
115
- disabled
116
- />
13
+ const IconButtonExamples = () => (
14
+ <>
15
+ <h3>Icon buttons</h3>
16
+ <div className="s-flex s-items-center s-gap-4 s-bg-emerald-200">
17
+ <Button size="xs" icon={PlusIcon} label="hello" isPulsing />
18
+ <Button size="xs" variant="outline" label="hello" icon={PlusIcon} />
19
+ <Button size="xs" variant="highlight" label="hello" icon={PlusIcon} />
20
+ <Button size="xs" variant="warning" label="hello" icon={PlusIcon} />
21
+ <Button size="xs" variant="ghost" label="hello" icon={PlusIcon} />
22
+ <Button size="xs" variant="white" label="hello" icon={PlusIcon} />
117
23
  </div>
118
24
  <div className="s-flex s-items-center s-gap-4">
119
- <Button
120
- variant="secondary"
121
- size="lg"
122
- label="Settings"
123
- icon={Cog6ToothIcon}
124
- />
125
- <Button
126
- variant="secondary"
127
- size="md"
128
- label="Settings"
129
- icon={Cog6ToothIcon}
130
- />
131
- <Button
132
- variant="secondary"
133
- size="md"
134
- label="Settings"
135
- icon={Cog6ToothIcon}
136
- disabled={true}
137
- />
138
- <Button
139
- variant="secondary"
140
- size="sm"
141
- label="Settings"
142
- icon={Cog6ToothIcon}
143
- />
144
- <Button
145
- variant="secondary"
146
- size="sm"
147
- label="Settings"
148
- icon={Cog6ToothIcon}
149
- disabled
150
- />
151
- <Button
152
- variant="secondary"
153
- size="xs"
154
- label="Settings"
155
- icon={Cog6ToothIcon}
156
- />
157
- <Button
158
- variant="secondary"
159
- size="xs"
160
- label="Settings"
161
- icon={Cog6ToothIcon}
162
- disabled
163
- />
25
+ <Button size="sm" icon={PlusIcon} isPulsing />
26
+ <Button size="sm" variant="outline" icon={PlusIcon} />
27
+ <Button size="sm" variant="highlight" icon={PlusIcon} />
28
+ <Button size="sm" variant="warning" icon={PlusIcon} />
29
+ <Button size="sm" variant="ghost" icon={PlusIcon} />
164
30
  </div>
165
31
  <div className="s-flex s-items-center s-gap-4">
166
- <Button
167
- variant="secondaryWarning"
168
- size="lg"
169
- label="Settings"
170
- icon={Cog6ToothIcon}
171
- />
172
- <Button
173
- variant="secondaryWarning"
174
- size="md"
175
- label="Settings"
176
- icon={Cog6ToothIcon}
177
- />
178
- <Button
179
- variant="secondaryWarning"
180
- size="md"
181
- label="Settings"
182
- icon={Cog6ToothIcon}
183
- disabled={true}
184
- />
185
- <Button
186
- variant="secondaryWarning"
187
- size="sm"
188
- label="Settings"
189
- icon={Cog6ToothIcon}
190
- />
191
- <Button
192
- variant="secondaryWarning"
193
- size="sm"
194
- label="Settings"
195
- icon={Cog6ToothIcon}
196
- disabled
197
- />
198
- <Button
199
- variant="secondaryWarning"
200
- size="xs"
201
- label="Settings"
202
- icon={Cog6ToothIcon}
203
- />
204
- <Button
205
- variant="secondaryWarning"
206
- size="xs"
207
- label="Settings"
208
- icon={Cog6ToothIcon}
209
- disabled
210
- />
32
+ <Button size="md" icon={PlusIcon} isPulsing />
33
+ <Button size="md" variant="outline" icon={PlusIcon} />
34
+ <Button size="md" variant="highlight" icon={PlusIcon} />
35
+ <Button size="md" variant="warning" icon={PlusIcon} />
36
+ <Button size="md" variant="ghost" icon={PlusIcon} />
211
37
  </div>
212
- <div className="s-flex s-items-center s-gap-4">
213
- <Button
214
- variant="tertiary"
215
- size="lg"
216
- label="Settings"
217
- icon={Cog6ToothIcon}
218
- />
219
- <Button
220
- variant="tertiary"
221
- size="md"
222
- label="Settings"
223
- icon={Cog6ToothIcon}
224
- />
225
- <Button
226
- variant="tertiary"
227
- size="md"
228
- label="Settings"
229
- icon={Cog6ToothIcon}
230
- disabled={true}
231
- />
232
- <Button
233
- variant="tertiary"
234
- size="sm"
235
- label="Settings"
236
- icon={Cog6ToothIcon}
237
- />
238
- <Button
239
- variant="tertiary"
240
- size="sm"
241
- label="Settings"
242
- icon={Cog6ToothIcon}
243
- disabled
244
- />
245
- <Button
246
- variant="tertiary"
247
- size="xs"
248
- label="Settings"
249
- icon={Cog6ToothIcon}
250
- />
251
- <Button
252
- variant="tertiary"
253
- size="xs"
254
- label="Settings"
255
- icon={Cog6ToothIcon}
256
- disabled
257
- />
258
- </div>
259
- </div>
260
- );
261
-
262
- export const ButtonBarExamples = () => (
263
- <Button.List>
264
- <Button
265
- type="menu"
266
- variant="secondary"
267
- size="xs"
268
- label="Settings"
269
- icon={Cog6ToothIcon}
270
- />
271
- <Button
272
- type="menu"
273
- variant="primary"
274
- size="xs"
275
- label="Settings"
276
- icon={Cog6ToothIcon}
277
- />
278
- <Button
279
- type="menu"
280
- variant="primary"
281
- size="xs"
282
- label="Settings"
283
- icon={Cog6ToothIcon}
284
- />
285
- </Button.List>
38
+ </>
286
39
  );
287
40
 
288
- export const ButtonMenuExamples = () => (
289
- <div className="s-flex s-flex-col s-gap-4">
290
- <div className="s-flex s-items-center s-gap-4">
291
- <Button
292
- type="menu"
293
- variant="primary"
294
- size="md"
295
- label="Settings"
296
- icon={Cog6ToothIcon}
297
- />
298
- <Button
299
- type="menu"
300
- variant="primary"
301
- size="sm"
302
- label="Settings"
303
- icon={Cog6ToothIcon}
304
- />
305
- <Button
306
- type="menu"
307
- variant="primary"
308
- size="xs"
309
- label="Settings"
310
- icon={Cog6ToothIcon}
311
- />
312
- </div>
313
- <div className="s-flex s-items-center s-gap-4">
314
- <Button
315
- type="menu"
316
- variant="primaryWarning"
317
- size="md"
318
- label="Settings"
319
- icon={Cog6ToothIcon}
320
- />
321
- <Button
322
- type="menu"
323
- variant="primaryWarning"
324
- size="sm"
325
- label="Settings"
326
- icon={Cog6ToothIcon}
327
- />
328
- <Button
329
- type="menu"
330
- variant="primaryWarning"
331
- size="xs"
332
- label="Settings"
333
- icon={Cog6ToothIcon}
334
- />
335
- </div>
41
+ const ButtonExamplesBySize = ({
42
+ size,
43
+ }: {
44
+ size: React.ComponentProps<typeof Button>["size"];
45
+ }) => (
46
+ <>
47
+ <Separator />
48
+ <h3>{size?.toUpperCase()}</h3>
336
49
  <div className="s-flex s-items-center s-gap-4">
337
- <Button
338
- type="menu"
339
- variant="secondary"
340
- size="md"
341
- label="Settings"
342
- icon={Cog6ToothIcon}
343
- />
344
- <Button
345
- type="menu"
346
- variant="secondary"
347
- size="sm"
348
- label="Settings"
349
- icon={Cog6ToothIcon}
350
- />
351
- <Button
352
- type="menu"
353
- variant="secondary"
354
- size="xs"
355
- label="Settings"
356
- icon={Cog6ToothIcon}
357
- />
50
+ <Button size={size} label="Button" />
51
+ <Button size={size} variant="outline" label="Button" />
52
+ <Button size={size} variant="highlight" label="Button" />
53
+ <Button size={size} variant="warning" label="Button" />
54
+ <Button size={size} variant="ghost" label="Button" />
358
55
  </div>
359
56
  <div className="s-flex s-items-center s-gap-4">
360
- <Button
361
- type="menu"
362
- variant="secondaryWarning"
363
- size="md"
364
- label="Settings"
365
- icon={Cog6ToothIcon}
366
- />
367
- <Button
368
- type="menu"
369
- variant="secondaryWarning"
370
- size="sm"
371
- label="Settings"
372
- icon={Cog6ToothIcon}
373
- />
374
- <Button
375
- type="menu"
376
- variant="secondaryWarning"
377
- size="xs"
378
- label="Settings"
379
- icon={Cog6ToothIcon}
380
- />
57
+ <Button size={size} label="Button" isLoading />
58
+ <Button size={size} variant="outline" label="Button" isLoading />
59
+ <Button size={size} variant="highlight" label="Button" isLoading />
60
+ <Button size={size} variant="warning" label="Button" isLoading />
61
+ <Button size={size} variant="ghost" label="Button" isLoading />
381
62
  </div>
382
63
  <div className="s-flex s-items-center s-gap-4">
383
- <Button
384
- type="menu"
385
- variant="tertiary"
386
- size="md"
387
- label="Settings"
388
- icon={Cog6ToothIcon}
389
- />
390
- <Button
391
- type="menu"
392
- variant="tertiary"
393
- size="sm"
394
- label="Settings"
395
- icon={Cog6ToothIcon}
396
- />
397
- <Button
398
- type="menu"
399
- variant="tertiary"
400
- size="xs"
401
- label="Settings"
402
- icon={Cog6ToothIcon}
403
- />
64
+ <Button size={size} icon={PlusIcon} label="Button" />
65
+ <Button size={size} variant="outline" icon={PlusIcon} label="Button" />
66
+ <Button size={size} variant="highlight" icon={PlusIcon} label="Button" />
67
+ <Button size={size} variant="warning" icon={PlusIcon} label="Button" />
68
+ <Button size={size} variant="ghost" icon={PlusIcon} label="Button" />
404
69
  </div>
405
- </div>
70
+ </>
406
71
  );
407
72
 
408
- export const ButtonSelectExamples = () => (
73
+ export const ButtonExamples = () => (
409
74
  <div className="s-flex s-flex-col s-gap-4">
410
- <div className="s-flex s-items-center s-gap-4">
411
- <Button
412
- type="select"
413
- variant="primary"
414
- size="md"
415
- label="Settings"
416
- icon={Cog6ToothIcon}
417
- />
418
- <Button
419
- type="select"
420
- variant="primary"
421
- size="sm"
422
- label="Settings"
423
- icon={Cog6ToothIcon}
424
- />
425
- <Button
426
- type="select"
427
- variant="primary"
428
- size="xs"
429
- label="Settings"
430
- icon={Cog6ToothIcon}
431
- />
432
- </div>
433
- <div className="s-flex s-items-center s-gap-4">
434
- <Button
435
- type="select"
436
- variant="primaryWarning"
437
- size="md"
438
- label="Settings"
439
- icon={Cog6ToothIcon}
440
- />
441
- <Button
442
- type="select"
443
- variant="primaryWarning"
444
- size="sm"
445
- label="Settings"
446
- icon={Cog6ToothIcon}
447
- />
448
- <Button
449
- type="select"
450
- variant="primaryWarning"
451
- size="xs"
452
- label="Settings"
453
- icon={Cog6ToothIcon}
454
- />
455
- </div>
456
- <div className="s-flex s-items-center s-gap-4">
457
- <Button
458
- type="select"
459
- variant="secondary"
460
- size="md"
461
- label="Settings"
462
- icon={Cog6ToothIcon}
463
- />
464
- <Button
465
- type="select"
466
- variant="secondary"
467
- size="sm"
468
- label="Settings"
469
- icon={Cog6ToothIcon}
470
- />
471
- <Button
472
- type="select"
473
- variant="secondary"
474
- size="xs"
475
- label="Settings"
476
- icon={Cog6ToothIcon}
477
- />
478
- </div>
479
- <div className="s-flex s-items-center s-gap-4">
480
- <Button
481
- type="select"
482
- variant="secondaryWarning"
483
- size="md"
484
- label="Settings"
485
- icon={Cog6ToothIcon}
486
- />
487
- <Button
488
- type="select"
489
- variant="secondaryWarning"
490
- size="sm"
491
- label="Settings"
492
- icon={Cog6ToothIcon}
493
- />
494
- <Button
495
- type="select"
496
- variant="secondaryWarning"
497
- size="xs"
498
- label="Settings"
499
- icon={Cog6ToothIcon}
500
- />
501
- </div>
502
- <div className="s-flex s-items-center s-gap-4">
503
- <Button
504
- type="select"
505
- variant="tertiary"
506
- size="md"
507
- label="Settings"
508
- icon={Cog6ToothIcon}
509
- />
510
- <Button
511
- type="select"
512
- variant="tertiary"
513
- size="sm"
514
- label="Settings"
515
- icon={Cog6ToothIcon}
516
- />
517
- <Button
518
- type="select"
519
- variant="tertiary"
520
- size="xs"
521
- label="Settings"
522
- icon={Cog6ToothIcon}
523
- />
524
- </div>
75
+ <IconButtonExamples />
76
+ <ButtonExamplesBySize size="xs" />
77
+ <ButtonExamplesBySize size="sm" />
78
+ <ButtonExamplesBySize size="md" />
525
79
  </div>
526
80
  );
527
81
 
528
- export const ButtonWithTooltipManualInstantiation = () => {
529
- return (
530
- <TooltipProvider>
531
- <TooltipRoot>
532
- <TooltipTrigger>
533
- <Button
534
- labelVisible={true}
535
- label="New conversation"
536
- icon={Cog6ToothIcon}
537
- hasMagnifying={false}
538
- />
539
- </TooltipTrigger>
540
- <TooltipContent>
541
- <p>Hello</p>
542
- </TooltipContent>
543
- </TooltipRoot>
544
- </TooltipProvider>
545
- );
546
- };
547
-
548
- export const ButtonWithTooltip = () => {
549
- return (
550
- <Tooltip
551
- trigger={
552
- <Button
553
- labelVisible={true}
554
- label="New conversation"
555
- icon={Cog6ToothIcon}
556
- hasMagnifying={false}
557
- />
558
- }
559
- label={"Hello"}
560
- />
561
- );
562
- };
563
-
564
- export const Primary: Story = {
565
- args: {
566
- variant: "primary",
567
- size: "xs",
568
- label: "Settings",
569
- icon: Cog6ToothIcon,
570
- disabled: false,
571
- },
572
- };
573
-
574
- export const PrimaryWarning: Story = {
575
- args: {
576
- variant: "primaryWarning",
577
- size: "xs",
578
- label: "Settings",
579
- icon: Cog6ToothIcon,
580
- disabled: false,
581
- },
582
- };
583
-
584
- export const Secondary: Story = {
585
- args: {
586
- variant: "secondary",
587
- size: "sm",
588
- label: "Settings",
589
- icon: Cog6ToothIcon,
590
- disabled: false,
591
- },
592
- };
593
-
594
- export const SecondaryWarning: Story = {
595
- args: {
596
- variant: "secondaryWarning",
597
- size: "sm",
598
- label: "Settings",
599
- icon: Cog6ToothIcon,
600
- disabled: false,
601
- },
602
- };
603
-
604
- export const Tertiary: Story = {
605
- args: {
606
- variant: "tertiary",
607
- size: "md",
608
- label: "Settings",
609
- icon: Cog6ToothIcon,
610
- disabled: false,
611
- },
612
- };
613
-
614
- export const IconOnlyPlusTooltip: Story = {
615
- args: {
616
- variant: "primary",
617
- size: "xs",
618
- label: "Settings",
619
- labelVisible: false,
620
- icon: Cog6ToothIcon,
621
- disabled: false,
622
- tooltipPosition: "bottom",
623
- },
624
- };
82
+ export const DropdownButtonExample = () => (
83
+ <div>
84
+ <Button icon={RobotIcon} variant="outline" isSelect />
85
+ </div>
86
+ );
625
87
 
626
- export const IconOnlyNoTooltip: Story = {
627
- args: {
628
- variant: "primary",
629
- size: "xs",
630
- label: "Settings",
631
- labelVisible: false,
632
- icon: Cog6ToothIcon,
633
- disabled: false,
634
- tooltipPosition: "bottom",
635
- disabledTooltip: true,
636
- },
637
- };
88
+ export const DisabledButtonExample = () => (
89
+ <div>
90
+ <Button icon={RobotIcon} variant="outline" isSelect disabled={true} />
91
+ </div>
92
+ );
@@ -92,7 +92,7 @@ export const ActionCard: React.FC = () => (
92
92
  <div className="s-w-full">{card.title}</div>
93
93
  <IconButton
94
94
  icon={XMarkIcon}
95
- variant="tertiary"
95
+ variant="ghost"
96
96
  size="sm"
97
97
  onClick={(e) => {
98
98
  alert(`You clicked on close button of ${card.title}`);