ics-ui-kit 0.1.0-alpha.1
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/components/badge/Badge.d.ts +126 -0
- package/dist/components/badge/Badge.stories.d.ts +10 -0
- package/dist/components/button/Button.d.ts +227 -0
- package/dist/components/button/Button.stories.d.ts +16 -0
- package/dist/components/icon/Icon.d.ts +45 -0
- package/dist/components/icon/Icon.stories.d.ts +36 -0
- package/dist/components/input/input/Input.d.ts +8 -0
- package/dist/components/input/input/Input.stories.d.ts +29 -0
- package/dist/components/input/input/context/InputContext.d.ts +14 -0
- package/dist/components/input/secret-input/SecretInput.d.ts +3 -0
- package/dist/components/input/secret-input/SecretInput.stories.d.ts +29 -0
- package/dist/components/input/secret-input/components/ShowValueToggler.d.ts +4 -0
- package/dist/components/input/text-input/TextInput.d.ts +3 -0
- package/dist/components/input/text-input/TextInput.stories.d.ts +29 -0
- package/dist/components/input/text-input/components/CopyButton.d.ts +4 -0
- package/dist/components/label/Label.d.ts +4 -0
- package/dist/components/label/Label.stories.d.ts +15 -0
- package/dist/components/scheduler/Scheduler.d.ts +73 -0
- package/dist/components/scheduler/Scheduler.stories.d.ts +14 -0
- package/dist/components/scheduler/components/day/Day.d.ts +65 -0
- package/dist/components/scheduler/components/day/Day.stories.d.ts +6 -0
- package/dist/components/scheduler/components/day-column/DayColumn.d.ts +6 -0
- package/dist/components/scheduler/components/day-column/DayColumn.stories.d.ts +23 -0
- package/dist/components/scheduler/components/day-columns/DayColumns.d.ts +5 -0
- package/dist/components/scheduler/components/day-columns/DayColumns.stories.d.ts +22 -0
- package/dist/components/scheduler/components/hour-rows/HourRows.d.ts +1 -0
- package/dist/components/scheduler/components/hour-rows/HourRows.stories.d.ts +12 -0
- package/dist/components/scheduler/components/scheduled-event/ScheduledEvent.d.ts +9 -0
- package/dist/components/scheduler/components/scheduled-event/ScheduledEvent.stories.d.ts +7 -0
- package/dist/components/scheduler/components/scheduled-event/ScheduledEventResizeHandler.d.ts +2 -0
- package/dist/components/scheduler/components/time-ruler/CurrentTimeMarker.d.ts +5 -0
- package/dist/components/scheduler/components/time-ruler/TimeRuler.d.ts +5 -0
- package/dist/components/scheduler/components/time-ruler/TimeRuler.stories.d.ts +7 -0
- package/dist/components/scheduler/components/week-days/WeekDays.d.ts +1 -0
- package/dist/components/scheduler/components/week-days/WeekDays.stories.d.ts +15 -0
- package/dist/components/scheduler/context/SchedulerContext.d.ts +32 -0
- package/dist/components/scheduler/index.d.ts +1 -0
- package/dist/components/scheduler/story-utils/SchedulerContextDecorator.d.ts +1 -0
- package/dist/components/scheduler/story-utils/SchedulerStoriesData.d.ts +2 -0
- package/dist/components/scheduler/types.d.ts +7 -0
- package/dist/components/scheduler/utils/SchedulerUtils.d.ts +34 -0
- package/dist/components/scheduler.d.ts +2 -0
- package/dist/components/scheduler.js +8025 -0
- package/dist/components/scheduler.js.map +1 -0
- package/dist/components/separator/separator.d.ts +44 -0
- package/dist/components/separator/separator.stories.d.ts +6 -0
- package/dist/components/toast/Toast.d.ts +406 -0
- package/dist/components/toast/Toast.stories.d.ts +450 -0
- package/dist/components/toast/components/large-toast/LargeToast.d.ts +2 -0
- package/dist/components/toast/components/medium-toast/MediumToast.d.ts +2 -0
- package/dist/components/toast/components/small-toast/SmallToast.d.ts +2 -0
- package/dist/components/toast/components/toast-action/ToastAction.d.ts +2 -0
- package/dist/components/toast/components/toast-action/ToastAction.stories.d.ts +42 -0
- package/dist/components/toast/components/toast-close-action/ToastCloseButton.d.ts +4 -0
- package/dist/components/toast/components/toast-close-action/ToastCloseButton.stories.d.ts +41 -0
- package/dist/components/toast/components/toast-container/ToastContainer.d.ts +4 -0
- package/dist/components/toast/components/toast-icon/ToastIcon.d.ts +5 -0
- package/dist/components/toast/components/toast-icon/ToastIcon.stories.d.ts +41 -0
- package/dist/components/toast/context/ToastContext.d.ts +9 -0
- package/dist/components/toast/hooks/useToast.d.ts +6 -0
- package/dist/components/toast/hooks/useToastContainer.d.ts +9 -0
- package/dist/components/toast/hooks/useToastContext.d.ts +12 -0
- package/dist/components/toast/utils/ToastUtils.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/index-DBNvHuQo.js +266 -0
- package/dist/index-DBNvHuQo.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +533 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils/date/date.d.ts +1 -0
- package/dist/lib/utils/date/getFirstDayOfWeek.d.ts +7 -0
- package/dist/lib/utils/date/getFirstDayOfWeek.test.d.ts +1 -0
- package/dist/lib/utils/date/roundDateTime.d.ts +10 -0
- package/dist/lib/utils/date/roundDateTime.test.d.ts +1 -0
- package/dist/lib/utils/storybook.d.ts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/styles.css +1598 -0
- package/dist/types/css.d.ts +4 -0
- package/package.json +96 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Toast } from './Toast';
|
|
3
|
+
import { ToastAction } from './components/toast-action/ToastAction';
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
6
|
+
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
7
|
+
declare const meta: {
|
|
8
|
+
component: FC<Required< VariantProps<TVReturnType<{
|
|
9
|
+
status: {
|
|
10
|
+
default: {
|
|
11
|
+
wrapper: string;
|
|
12
|
+
};
|
|
13
|
+
success: {
|
|
14
|
+
wrapper: string;
|
|
15
|
+
};
|
|
16
|
+
info: {
|
|
17
|
+
wrapper: string;
|
|
18
|
+
};
|
|
19
|
+
warning: {
|
|
20
|
+
wrapper: string;
|
|
21
|
+
};
|
|
22
|
+
error: {
|
|
23
|
+
wrapper: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
focus: {
|
|
27
|
+
low: {
|
|
28
|
+
wrapper: string;
|
|
29
|
+
};
|
|
30
|
+
medium: {
|
|
31
|
+
wrapper: string;
|
|
32
|
+
};
|
|
33
|
+
high: {
|
|
34
|
+
titleText: string;
|
|
35
|
+
descriptionText: string;
|
|
36
|
+
separator: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
size: {
|
|
40
|
+
sm: {
|
|
41
|
+
wrapper: string;
|
|
42
|
+
titleText: string;
|
|
43
|
+
contentWrapper: string;
|
|
44
|
+
};
|
|
45
|
+
md: {
|
|
46
|
+
wrapper: string;
|
|
47
|
+
contentWrapper: string;
|
|
48
|
+
};
|
|
49
|
+
lg: {
|
|
50
|
+
wrapper: string;
|
|
51
|
+
contentWrapper: string;
|
|
52
|
+
content: string;
|
|
53
|
+
actions: string;
|
|
54
|
+
close: string;
|
|
55
|
+
titleText: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
wrapper: string;
|
|
60
|
+
text: string;
|
|
61
|
+
titleText: string;
|
|
62
|
+
descriptionText: string;
|
|
63
|
+
contentWrapper: string;
|
|
64
|
+
content: string;
|
|
65
|
+
actions: string;
|
|
66
|
+
close: string;
|
|
67
|
+
separator: string;
|
|
68
|
+
}, undefined, TVConfig<{
|
|
69
|
+
status: {
|
|
70
|
+
default: {
|
|
71
|
+
wrapper: string;
|
|
72
|
+
};
|
|
73
|
+
success: {
|
|
74
|
+
wrapper: string;
|
|
75
|
+
};
|
|
76
|
+
info: {
|
|
77
|
+
wrapper: string;
|
|
78
|
+
};
|
|
79
|
+
warning: {
|
|
80
|
+
wrapper: string;
|
|
81
|
+
};
|
|
82
|
+
error: {
|
|
83
|
+
wrapper: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
focus: {
|
|
87
|
+
low: {
|
|
88
|
+
wrapper: string;
|
|
89
|
+
};
|
|
90
|
+
medium: {
|
|
91
|
+
wrapper: string;
|
|
92
|
+
};
|
|
93
|
+
high: {
|
|
94
|
+
titleText: string;
|
|
95
|
+
descriptionText: string;
|
|
96
|
+
separator: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
size: {
|
|
100
|
+
sm: {
|
|
101
|
+
wrapper: string;
|
|
102
|
+
titleText: string;
|
|
103
|
+
contentWrapper: string;
|
|
104
|
+
};
|
|
105
|
+
md: {
|
|
106
|
+
wrapper: string;
|
|
107
|
+
contentWrapper: string;
|
|
108
|
+
};
|
|
109
|
+
lg: {
|
|
110
|
+
wrapper: string;
|
|
111
|
+
contentWrapper: string;
|
|
112
|
+
content: string;
|
|
113
|
+
actions: string;
|
|
114
|
+
close: string;
|
|
115
|
+
titleText: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}, {
|
|
119
|
+
status: {
|
|
120
|
+
default: {
|
|
121
|
+
wrapper: string;
|
|
122
|
+
};
|
|
123
|
+
success: {
|
|
124
|
+
wrapper: string;
|
|
125
|
+
};
|
|
126
|
+
info: {
|
|
127
|
+
wrapper: string;
|
|
128
|
+
};
|
|
129
|
+
warning: {
|
|
130
|
+
wrapper: string;
|
|
131
|
+
};
|
|
132
|
+
error: {
|
|
133
|
+
wrapper: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
focus: {
|
|
137
|
+
low: {
|
|
138
|
+
wrapper: string;
|
|
139
|
+
};
|
|
140
|
+
medium: {
|
|
141
|
+
wrapper: string;
|
|
142
|
+
};
|
|
143
|
+
high: {
|
|
144
|
+
titleText: string;
|
|
145
|
+
descriptionText: string;
|
|
146
|
+
separator: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
size: {
|
|
150
|
+
sm: {
|
|
151
|
+
wrapper: string;
|
|
152
|
+
titleText: string;
|
|
153
|
+
contentWrapper: string;
|
|
154
|
+
};
|
|
155
|
+
md: {
|
|
156
|
+
wrapper: string;
|
|
157
|
+
contentWrapper: string;
|
|
158
|
+
};
|
|
159
|
+
lg: {
|
|
160
|
+
wrapper: string;
|
|
161
|
+
contentWrapper: string;
|
|
162
|
+
content: string;
|
|
163
|
+
actions: string;
|
|
164
|
+
close: string;
|
|
165
|
+
titleText: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}>, {
|
|
169
|
+
status: {
|
|
170
|
+
default: {
|
|
171
|
+
wrapper: string;
|
|
172
|
+
};
|
|
173
|
+
success: {
|
|
174
|
+
wrapper: string;
|
|
175
|
+
};
|
|
176
|
+
info: {
|
|
177
|
+
wrapper: string;
|
|
178
|
+
};
|
|
179
|
+
warning: {
|
|
180
|
+
wrapper: string;
|
|
181
|
+
};
|
|
182
|
+
error: {
|
|
183
|
+
wrapper: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
focus: {
|
|
187
|
+
low: {
|
|
188
|
+
wrapper: string;
|
|
189
|
+
};
|
|
190
|
+
medium: {
|
|
191
|
+
wrapper: string;
|
|
192
|
+
};
|
|
193
|
+
high: {
|
|
194
|
+
titleText: string;
|
|
195
|
+
descriptionText: string;
|
|
196
|
+
separator: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
size: {
|
|
200
|
+
sm: {
|
|
201
|
+
wrapper: string;
|
|
202
|
+
titleText: string;
|
|
203
|
+
contentWrapper: string;
|
|
204
|
+
};
|
|
205
|
+
md: {
|
|
206
|
+
wrapper: string;
|
|
207
|
+
contentWrapper: string;
|
|
208
|
+
};
|
|
209
|
+
lg: {
|
|
210
|
+
wrapper: string;
|
|
211
|
+
contentWrapper: string;
|
|
212
|
+
content: string;
|
|
213
|
+
actions: string;
|
|
214
|
+
close: string;
|
|
215
|
+
titleText: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}, {
|
|
219
|
+
wrapper: string;
|
|
220
|
+
text: string;
|
|
221
|
+
titleText: string;
|
|
222
|
+
descriptionText: string;
|
|
223
|
+
contentWrapper: string;
|
|
224
|
+
content: string;
|
|
225
|
+
actions: string;
|
|
226
|
+
close: string;
|
|
227
|
+
separator: string;
|
|
228
|
+
}, TVReturnType<{
|
|
229
|
+
status: {
|
|
230
|
+
default: {
|
|
231
|
+
wrapper: string;
|
|
232
|
+
};
|
|
233
|
+
success: {
|
|
234
|
+
wrapper: string;
|
|
235
|
+
};
|
|
236
|
+
info: {
|
|
237
|
+
wrapper: string;
|
|
238
|
+
};
|
|
239
|
+
warning: {
|
|
240
|
+
wrapper: string;
|
|
241
|
+
};
|
|
242
|
+
error: {
|
|
243
|
+
wrapper: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
focus: {
|
|
247
|
+
low: {
|
|
248
|
+
wrapper: string;
|
|
249
|
+
};
|
|
250
|
+
medium: {
|
|
251
|
+
wrapper: string;
|
|
252
|
+
};
|
|
253
|
+
high: {
|
|
254
|
+
titleText: string;
|
|
255
|
+
descriptionText: string;
|
|
256
|
+
separator: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
size: {
|
|
260
|
+
sm: {
|
|
261
|
+
wrapper: string;
|
|
262
|
+
titleText: string;
|
|
263
|
+
contentWrapper: string;
|
|
264
|
+
};
|
|
265
|
+
md: {
|
|
266
|
+
wrapper: string;
|
|
267
|
+
contentWrapper: string;
|
|
268
|
+
};
|
|
269
|
+
lg: {
|
|
270
|
+
wrapper: string;
|
|
271
|
+
contentWrapper: string;
|
|
272
|
+
content: string;
|
|
273
|
+
actions: string;
|
|
274
|
+
close: string;
|
|
275
|
+
titleText: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
}, {
|
|
279
|
+
wrapper: string;
|
|
280
|
+
text: string;
|
|
281
|
+
titleText: string;
|
|
282
|
+
descriptionText: string;
|
|
283
|
+
contentWrapper: string;
|
|
284
|
+
content: string;
|
|
285
|
+
actions: string;
|
|
286
|
+
close: string;
|
|
287
|
+
separator: string;
|
|
288
|
+
}, undefined, TVConfig<{
|
|
289
|
+
status: {
|
|
290
|
+
default: {
|
|
291
|
+
wrapper: string;
|
|
292
|
+
};
|
|
293
|
+
success: {
|
|
294
|
+
wrapper: string;
|
|
295
|
+
};
|
|
296
|
+
info: {
|
|
297
|
+
wrapper: string;
|
|
298
|
+
};
|
|
299
|
+
warning: {
|
|
300
|
+
wrapper: string;
|
|
301
|
+
};
|
|
302
|
+
error: {
|
|
303
|
+
wrapper: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
focus: {
|
|
307
|
+
low: {
|
|
308
|
+
wrapper: string;
|
|
309
|
+
};
|
|
310
|
+
medium: {
|
|
311
|
+
wrapper: string;
|
|
312
|
+
};
|
|
313
|
+
high: {
|
|
314
|
+
titleText: string;
|
|
315
|
+
descriptionText: string;
|
|
316
|
+
separator: string;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
size: {
|
|
320
|
+
sm: {
|
|
321
|
+
wrapper: string;
|
|
322
|
+
titleText: string;
|
|
323
|
+
contentWrapper: string;
|
|
324
|
+
};
|
|
325
|
+
md: {
|
|
326
|
+
wrapper: string;
|
|
327
|
+
contentWrapper: string;
|
|
328
|
+
};
|
|
329
|
+
lg: {
|
|
330
|
+
wrapper: string;
|
|
331
|
+
contentWrapper: string;
|
|
332
|
+
content: string;
|
|
333
|
+
actions: string;
|
|
334
|
+
close: string;
|
|
335
|
+
titleText: string;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
}, {
|
|
339
|
+
status: {
|
|
340
|
+
default: {
|
|
341
|
+
wrapper: string;
|
|
342
|
+
};
|
|
343
|
+
success: {
|
|
344
|
+
wrapper: string;
|
|
345
|
+
};
|
|
346
|
+
info: {
|
|
347
|
+
wrapper: string;
|
|
348
|
+
};
|
|
349
|
+
warning: {
|
|
350
|
+
wrapper: string;
|
|
351
|
+
};
|
|
352
|
+
error: {
|
|
353
|
+
wrapper: string;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
focus: {
|
|
357
|
+
low: {
|
|
358
|
+
wrapper: string;
|
|
359
|
+
};
|
|
360
|
+
medium: {
|
|
361
|
+
wrapper: string;
|
|
362
|
+
};
|
|
363
|
+
high: {
|
|
364
|
+
titleText: string;
|
|
365
|
+
descriptionText: string;
|
|
366
|
+
separator: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
size: {
|
|
370
|
+
sm: {
|
|
371
|
+
wrapper: string;
|
|
372
|
+
titleText: string;
|
|
373
|
+
contentWrapper: string;
|
|
374
|
+
};
|
|
375
|
+
md: {
|
|
376
|
+
wrapper: string;
|
|
377
|
+
contentWrapper: string;
|
|
378
|
+
};
|
|
379
|
+
lg: {
|
|
380
|
+
wrapper: string;
|
|
381
|
+
contentWrapper: string;
|
|
382
|
+
content: string;
|
|
383
|
+
actions: string;
|
|
384
|
+
close: string;
|
|
385
|
+
titleText: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
}>, unknown, unknown, undefined>>>> & {
|
|
389
|
+
title: string;
|
|
390
|
+
description?: string;
|
|
391
|
+
icon?: React.ReactNode | false;
|
|
392
|
+
primaryAction?: React.ReactElement<React.ComponentProps<typeof ToastAction>>;
|
|
393
|
+
secondaryAction?: React.ReactElement<React.ComponentProps<typeof ToastAction>>;
|
|
394
|
+
closeAction?: boolean;
|
|
395
|
+
onClose?: () => void;
|
|
396
|
+
} & {
|
|
397
|
+
id?: number;
|
|
398
|
+
}>;
|
|
399
|
+
parameters: {
|
|
400
|
+
layout: string;
|
|
401
|
+
};
|
|
402
|
+
argTypes: {
|
|
403
|
+
title: {
|
|
404
|
+
control: string;
|
|
405
|
+
};
|
|
406
|
+
description: {
|
|
407
|
+
control: string;
|
|
408
|
+
};
|
|
409
|
+
icon: {
|
|
410
|
+
options: string[];
|
|
411
|
+
control: string;
|
|
412
|
+
mapping: {
|
|
413
|
+
default: undefined;
|
|
414
|
+
custom: import("react/jsx-runtime").JSX.Element;
|
|
415
|
+
none: boolean;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
primaryAction: {
|
|
419
|
+
control: string;
|
|
420
|
+
mapping: {
|
|
421
|
+
true: import("react/jsx-runtime").JSX.Element;
|
|
422
|
+
false: undefined;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
secondaryAction: {
|
|
426
|
+
control: string;
|
|
427
|
+
mapping: {
|
|
428
|
+
true: import("react/jsx-runtime").JSX.Element;
|
|
429
|
+
false: undefined;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
closeAction: {
|
|
433
|
+
control: string;
|
|
434
|
+
};
|
|
435
|
+
status: {
|
|
436
|
+
control: string;
|
|
437
|
+
options: string[];
|
|
438
|
+
};
|
|
439
|
+
focus: {
|
|
440
|
+
control: string;
|
|
441
|
+
options: string[];
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
export default meta;
|
|
446
|
+
type Story = StoryObj<typeof Toast>;
|
|
447
|
+
export declare const Small: Story;
|
|
448
|
+
export declare const Medium: Story;
|
|
449
|
+
export declare const Large: Story;
|
|
450
|
+
export declare const Usage: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToastProps } from '../../Toast';
|
|
3
|
+
import { FC, ReactNode } from 'react';
|
|
4
|
+
type StoryProps = {
|
|
5
|
+
actionType: "primary" | "secondary";
|
|
6
|
+
status: ToastProps["status"];
|
|
7
|
+
focus: ToastProps["focus"];
|
|
8
|
+
size: ToastProps["size"];
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
declare const meta: {
|
|
12
|
+
component: FC<{
|
|
13
|
+
children?: ReactNode | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: string;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
actionType: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
status: {
|
|
24
|
+
control: string;
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
focus: {
|
|
28
|
+
control: string;
|
|
29
|
+
options: string[];
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
control: string;
|
|
33
|
+
options: string[];
|
|
34
|
+
};
|
|
35
|
+
title: {
|
|
36
|
+
control: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<StoryProps>;
|
|
42
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToastProps } from '../../Toast';
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
type StoryProps = {
|
|
5
|
+
status: ToastProps["status"];
|
|
6
|
+
focus: ToastProps["focus"];
|
|
7
|
+
size: ToastProps["size"];
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
declare const meta: {
|
|
12
|
+
component: FC<{
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: string;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
status: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
focus: {
|
|
24
|
+
control: string;
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
control: string;
|
|
29
|
+
options: string[];
|
|
30
|
+
};
|
|
31
|
+
title: {
|
|
32
|
+
control: string;
|
|
33
|
+
};
|
|
34
|
+
description: {
|
|
35
|
+
control: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default meta;
|
|
40
|
+
type Story = StoryObj<StoryProps>;
|
|
41
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToastProps } from '../../Toast';
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
import { ToastIconProps } from './ToastIcon';
|
|
5
|
+
type StoryProps = {
|
|
6
|
+
status: ToastProps["status"];
|
|
7
|
+
focus: ToastProps["focus"];
|
|
8
|
+
size: ToastProps["size"];
|
|
9
|
+
title: string;
|
|
10
|
+
customIcon: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const meta: {
|
|
13
|
+
component: FC<ToastIconProps>;
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: string;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
status: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: string[];
|
|
21
|
+
};
|
|
22
|
+
focus: {
|
|
23
|
+
control: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
control: string;
|
|
28
|
+
options: string[];
|
|
29
|
+
};
|
|
30
|
+
title: {
|
|
31
|
+
control: string;
|
|
32
|
+
};
|
|
33
|
+
customIcon: {
|
|
34
|
+
control: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<StoryProps>;
|
|
40
|
+
export declare const Default: Story;
|
|
41
|
+
export declare const WithCustomIcon: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToastProps } from '../Toast';
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
type ToastContainerContextType = {
|
|
4
|
+
addToast: (toast: Omit<ToastProps, "closeAction" | "onClose">) => number;
|
|
5
|
+
removeToast: (id: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ToastContainerContext: Context<ToastContainerContextType | null>;
|
|
8
|
+
export declare const useToastContainer: () => ToastContainerContextType;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToastProps } from '../Toast';
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
type ToastContextType = ToastProps & {
|
|
4
|
+
id?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const ToastContext: Context<ToastContextType | null>;
|
|
7
|
+
export declare const ToastProvider: React.FC<{
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
value: ToastContextType;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const useToastContext: () => ToastContextType;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|