@shipfox/react-ui 0.25.0 → 0.26.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.
Files changed (53) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/index.js +1 -0
  3. package/dist/components/slider/index.d.ts +2 -0
  4. package/dist/components/slider/index.js +3 -0
  5. package/dist/components/slider/slider.d.ts +10 -0
  6. package/dist/components/slider/slider.js +38 -0
  7. package/dist/styles.css +1 -1
  8. package/package.json +4 -4
  9. package/dist/colors.stories.js +0 -61
  10. package/dist/components/alert/alert.stories.js +0 -227
  11. package/dist/components/avatar/avatar.stories.js +0 -267
  12. package/dist/components/badge/badge.stories.js +0 -802
  13. package/dist/components/button/button-link.stories.js +0 -127
  14. package/dist/components/button/button.stories.js +0 -187
  15. package/dist/components/button/icon-button.stories.js +0 -344
  16. package/dist/components/button-group/button-group.stories.js +0 -644
  17. package/dist/components/card/card.stories.js +0 -216
  18. package/dist/components/checkbox/checkbox.stories.js +0 -566
  19. package/dist/components/code-block/code-block.stories.js +0 -341
  20. package/dist/components/combobox/combobox.stories.js +0 -191
  21. package/dist/components/command/command.stories.js +0 -228
  22. package/dist/components/confetti/confetti.stories.js +0 -41
  23. package/dist/components/count-up/count-up.stories.js +0 -568
  24. package/dist/components/dashboard/components/charts/bar-chart.stories.js +0 -287
  25. package/dist/components/dashboard/components/charts/line-chart.stories.js +0 -257
  26. package/dist/components/dashboard/dashboard.stories.js +0 -23
  27. package/dist/components/date-picker/date-picker.stories.js +0 -349
  28. package/dist/components/dropdown-input/dropdown-input.stories.js +0 -240
  29. package/dist/components/dropdown-menu/dropdown-menu.stories.js +0 -462
  30. package/dist/components/dynamic-item/dynamic-item.stories.js +0 -385
  31. package/dist/components/empty-state/empty-state.stories.js +0 -74
  32. package/dist/components/form/form.stories.js +0 -587
  33. package/dist/components/icon/icon.stories.js +0 -38
  34. package/dist/components/inline-tips/inline-tips.stories.js +0 -219
  35. package/dist/components/input/input.stories.js +0 -265
  36. package/dist/components/interval-selector/interval-selector.stories.js +0 -232
  37. package/dist/components/item/item.stories.js +0 -239
  38. package/dist/components/kbd/kbd.stories.js +0 -119
  39. package/dist/components/label/label.stories.js +0 -105
  40. package/dist/components/modal/modal.stories.js +0 -566
  41. package/dist/components/search/search.stories.js +0 -630
  42. package/dist/components/select/select.stories.js +0 -393
  43. package/dist/components/sheet/sheet.stories.js +0 -368
  44. package/dist/components/skeleton/skeleton.stories.js +0 -345
  45. package/dist/components/table/table.stories.js +0 -302
  46. package/dist/components/tabs/tabs.stories.js +0 -179
  47. package/dist/components/textarea/textarea.stories.js +0 -339
  48. package/dist/components/toast/toast.stories.js +0 -326
  49. package/dist/components/tooltip/tooltip.stories.js +0 -560
  50. package/dist/components/typography/code.stories.js +0 -54
  51. package/dist/components/typography/header.stories.js +0 -34
  52. package/dist/components/typography/text.stories.js +0 -105
  53. package/dist/onboarding/sign-in.stories.js +0 -101
@@ -1,326 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button } from '../../components/button/button.js';
3
- import { Code } from '../../components/typography/index.js';
4
- import { Toaster, toast } from './toast.js';
5
- import { ToastCustom } from './toast-custom.js';
6
- const meta = {
7
- title: 'Components/Toast',
8
- component: Toaster,
9
- tags: [
10
- 'autodocs'
11
- ],
12
- parameters: {
13
- layout: 'centered'
14
- },
15
- decorators: [
16
- (Story)=>/*#__PURE__*/ _jsxs(_Fragment, {
17
- children: [
18
- /*#__PURE__*/ _jsx(Story, {}),
19
- /*#__PURE__*/ _jsxs("div", {
20
- className: "flex flex-wrap justify-center items-center gap-32",
21
- children: [
22
- /*#__PURE__*/ _jsxs("div", {
23
- className: "flex flex-col gap-8",
24
- children: [
25
- /*#__PURE__*/ _jsx(Code, {
26
- variant: "label",
27
- className: "text-foreground-neutral-subtle text-center",
28
- children: "REGULAR TOASTS"
29
- }),
30
- /*#__PURE__*/ _jsx(Button, {
31
- onClick: ()=>{
32
- toast('Event has been created');
33
- },
34
- children: "Default Toast"
35
- }),
36
- /*#__PURE__*/ _jsx(Button, {
37
- onClick: ()=>{
38
- toast.success('Success! Your changes have been saved.');
39
- },
40
- children: "Success Toast"
41
- }),
42
- /*#__PURE__*/ _jsx(Button, {
43
- onClick: ()=>{
44
- toast.error('Error! Something went wrong.');
45
- },
46
- children: "Error Toast"
47
- }),
48
- /*#__PURE__*/ _jsx(Button, {
49
- onClick: ()=>{
50
- toast.warning('Warning! Please review your input.');
51
- },
52
- children: "Warning Toast"
53
- }),
54
- /*#__PURE__*/ _jsx(Button, {
55
- onClick: ()=>{
56
- toast.info('Info: This is an informational message.');
57
- },
58
- children: "Info Toast"
59
- }),
60
- /*#__PURE__*/ _jsx(Button, {
61
- onClick: ()=>{
62
- toast('Event has been created', {
63
- description: 'Sunday, December 03, 2023 at 9:00 AM'
64
- });
65
- },
66
- children: "Toast with Description"
67
- }),
68
- /*#__PURE__*/ _jsx(Button, {
69
- onClick: ()=>{
70
- toast('Event has been created', {
71
- description: 'Sunday, December 03, 2023 at 9:00 AM',
72
- action: {
73
- label: 'Undo',
74
- onClick: ()=>{
75
- toast('Undo clicked');
76
- }
77
- }
78
- });
79
- },
80
- children: "Toast with Action"
81
- }),
82
- /*#__PURE__*/ _jsx(Button, {
83
- onClick: ()=>{
84
- const promise = new Promise((resolve)=>{
85
- setTimeout(()=>{
86
- resolve({
87
- name: 'Sonner'
88
- });
89
- }, 2000);
90
- });
91
- toast.promise(promise, {
92
- loading: 'Loading...',
93
- success: (data)=>{
94
- return `${data.name} toast has been added`;
95
- },
96
- error: 'Error'
97
- });
98
- },
99
- children: "Promise Toast"
100
- })
101
- ]
102
- }),
103
- /*#__PURE__*/ _jsxs("div", {
104
- className: "flex flex-col gap-8 text-center",
105
- children: [
106
- /*#__PURE__*/ _jsx(Code, {
107
- variant: "label",
108
- className: "text-foreground-neutral-subtle",
109
- children: "CUSTOM TOASTS"
110
- }),
111
- /*#__PURE__*/ _jsx(Button, {
112
- onClick: ()=>{
113
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
114
- variant: "success",
115
- title: "Insert your alert title here",
116
- description: "Insert the alert description here. It would look better as two lines of text.",
117
- actions: [
118
- {
119
- label: 'Upgrade',
120
- onClick: ()=>{
121
- toast('Upgrade clicked');
122
- toast.dismiss(t);
123
- }
124
- },
125
- {
126
- label: 'Learn more',
127
- onClick: ()=>{
128
- toast('Learn more clicked');
129
- toast.dismiss(t);
130
- }
131
- }
132
- ],
133
- onClose: ()=>toast.dismiss(t)
134
- }), {
135
- duration: Infinity
136
- });
137
- },
138
- children: "Custom Toast (Success - Full)"
139
- }),
140
- /*#__PURE__*/ _jsx(Button, {
141
- onClick: ()=>{
142
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
143
- variant: "info",
144
- title: "Insert your alert title here",
145
- description: "Insert the alert description here. It would look better as two lines of text.",
146
- actions: [
147
- {
148
- label: 'Upgrade',
149
- onClick: ()=>{
150
- toast('Upgrade clicked');
151
- toast.dismiss(t);
152
- }
153
- },
154
- {
155
- label: 'Learn more',
156
- onClick: ()=>{
157
- toast('Learn more clicked');
158
- toast.dismiss(t);
159
- }
160
- }
161
- ],
162
- onClose: ()=>toast.dismiss(t)
163
- }), {
164
- duration: Infinity
165
- });
166
- },
167
- children: "Custom Toast (Info - Full)"
168
- }),
169
- /*#__PURE__*/ _jsx(Button, {
170
- onClick: ()=>{
171
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
172
- variant: "warning",
173
- title: "Insert your alert title here",
174
- description: "Insert the alert description here. It would look better as two lines of text.",
175
- actions: [
176
- {
177
- label: 'Upgrade',
178
- onClick: ()=>{
179
- toast('Upgrade clicked');
180
- toast.dismiss(t);
181
- }
182
- },
183
- {
184
- label: 'Learn more',
185
- onClick: ()=>{
186
- toast('Learn more clicked');
187
- toast.dismiss(t);
188
- }
189
- }
190
- ],
191
- onClose: ()=>toast.dismiss(t)
192
- }), {
193
- duration: Infinity
194
- });
195
- },
196
- children: "Custom Toast (Warning - Full)"
197
- }),
198
- /*#__PURE__*/ _jsx(Button, {
199
- onClick: ()=>{
200
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
201
- variant: "error",
202
- title: "Insert your alert title here",
203
- description: "Insert the alert description here. It would look better as two lines of text.",
204
- actions: [
205
- {
206
- label: 'Upgrade',
207
- onClick: ()=>{
208
- toast('Upgrade clicked');
209
- toast.dismiss(t);
210
- }
211
- },
212
- {
213
- label: 'Learn more',
214
- onClick: ()=>{
215
- toast('Learn more clicked');
216
- toast.dismiss(t);
217
- }
218
- }
219
- ],
220
- onClose: ()=>toast.dismiss(t)
221
- }), {
222
- duration: Infinity
223
- });
224
- },
225
- children: "Custom Toast (Error - Full)"
226
- }),
227
- /*#__PURE__*/ _jsx(Button, {
228
- onClick: ()=>{
229
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
230
- variant: "success",
231
- content: "Insert your alert content here",
232
- actions: [
233
- {
234
- label: 'Learn more',
235
- onClick: ()=>{
236
- toast('Learn more clicked');
237
- toast.dismiss(t);
238
- }
239
- }
240
- ],
241
- onClose: ()=>toast.dismiss(t)
242
- }), {
243
- duration: Infinity
244
- });
245
- },
246
- children: "Custom Toast (Success - Simple)"
247
- }),
248
- /*#__PURE__*/ _jsx(Button, {
249
- onClick: ()=>{
250
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
251
- variant: "info",
252
- content: "Insert your alert content here",
253
- actions: [
254
- {
255
- label: 'Learn more',
256
- onClick: ()=>{
257
- toast('Learn more clicked');
258
- toast.dismiss(t);
259
- }
260
- }
261
- ],
262
- onClose: ()=>toast.dismiss(t)
263
- }), {
264
- duration: Infinity
265
- });
266
- },
267
- children: "Custom Toast (Info - Simple)"
268
- }),
269
- /*#__PURE__*/ _jsx(Button, {
270
- onClick: ()=>{
271
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
272
- variant: "warning",
273
- content: "Insert your alert content here",
274
- actions: [
275
- {
276
- label: 'Learn more',
277
- onClick: ()=>{
278
- toast('Learn more clicked');
279
- toast.dismiss(t);
280
- }
281
- }
282
- ],
283
- onClose: ()=>toast.dismiss(t)
284
- }), {
285
- duration: Infinity
286
- });
287
- },
288
- children: "Custom Toast (Warning - Simple)"
289
- }),
290
- /*#__PURE__*/ _jsx(Button, {
291
- onClick: ()=>{
292
- toast.custom((t)=>/*#__PURE__*/ _jsx(ToastCustom, {
293
- variant: "error",
294
- content: "Insert your alert content here",
295
- actions: [
296
- {
297
- label: 'Learn more',
298
- onClick: ()=>{
299
- toast('Learn more clicked');
300
- toast.dismiss(t);
301
- }
302
- }
303
- ],
304
- onClose: ()=>toast.dismiss(t)
305
- }), {
306
- duration: Infinity
307
- });
308
- },
309
- children: "Custom Toast (Error - Simple)"
310
- })
311
- ]
312
- })
313
- ]
314
- })
315
- ]
316
- })
317
- ]
318
- };
319
- export default meta;
320
- export const Default = {
321
- render: ()=>/*#__PURE__*/ _jsx(Toaster, {
322
- position: "top-center"
323
- })
324
- };
325
-
326
- //# sourceMappingURL=toast.stories.js.map