@atom-learning/components 1.8.2 → 1.11.0-beta.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.
@@ -1,4 +1,4 @@
1
- import { Trigger } from '@radix-ui/react-dialog';
1
+ import { Description, Title, Trigger } from '@radix-ui/react-dialog';
2
2
  import * as React from 'react';
3
3
  import { DialogClose } from './DialogClose';
4
4
  import { DialogContent } from './DialogContent';
@@ -271,6 +271,8 @@ declare type DialogProps = React.ComponentProps<typeof StyledDialog>;
271
271
  export declare const Dialog: React.FC<DialogProps> & {
272
272
  Close: typeof DialogClose;
273
273
  Content: typeof DialogContent;
274
+ Description: typeof Description;
275
+ Title: typeof Title;
274
276
  Trigger: typeof Trigger;
275
277
  };
276
278
  export {};
@@ -1 +1 @@
1
- import{Root as r,Trigger as e}from"@radix-ui/react-dialog";import{createElement as i}from"react";import{styled as m}from"../../stitches.js";import{DialogClose as l}from"./DialogClose.js";import{DialogContent as g}from"./DialogContent.js";const a=m(r,{}),o=t=>i(a,{...t});o.Close=l,o.Content=g,o.Trigger=e,o.displayName="Dialog";export{o as Dialog};
1
+ import{Root as i,Description as e,Title as r,Trigger as l}from"@radix-ui/react-dialog";import{createElement as m}from"react";import{styled as g}from"../../stitches.js";import{DialogClose as n}from"./DialogClose.js";import{DialogContent as p}from"./DialogContent.js";const a=g(i,{}),o=t=>m(a,{...t});o.Close=n,o.Content=p,o.Description=e,o.Title=r,o.Trigger=l,o.displayName="Dialog";export{o as Dialog};
@@ -1 +1 @@
1
- import{Close as u}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as h}from"@radix-ui/react-dialog";import{createElement as o}from"react";import{keyframes as n,styled as i}from"../../stitches.js";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{fadeIn as v,fadeOut as I}from"../../utilities/style/keyframe-animations.js";const t="translate3d(-50%, -50%, 0)",s="translate3d(-50%, 50vh, 0)",r="modal_overlay",l=2147483646,O=n({"0%":{transform:s},"100%":{transform:t}}),y=n({"0%":{transform:t},"100%":{transform:s}}),C=i(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:l,"@allowMotion":{'&[data-state="open"]':{animation:`${v} 250ms ease-out`},'&[data-state="closed"]':{animation:`${I} 550ms ease-out`}}}),D=i(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:t,zIndex:l,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${O} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${y} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),z=({size:d="sm",children:m,closeDialogText:c="Close dialog",showCloseButton:f=!0,...p})=>o(g,null,o(C,{id:r},o(D,{size:d,"aria-label":"Dialog",onPointerDownOutside:e=>{const a=e.target;(a==null?void 0:a.id)!==r&&e.preventDefault()},...p},f&&o(w,{as:h,css:{position:"absolute",right:"$4",top:"$4"},label:c,size:"lg",theme:"neutral"},o($,{is:u})),m)));export{z as DialogContent};
1
+ import{Close as u}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as h,Close as g}from"@radix-ui/react-dialog";import{createElement as o}from"react";import{keyframes as n,styled as i}from"../../stitches.js";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Icon as v}from"../icon/Icon.js";import{fadeIn as $,fadeOut as I}from"../../utilities/style/keyframe-animations.js";const t="translate3d(-50%, -50%, 0)",s="translate3d(-50%, 50vh, 0)",r="modal_overlay",l=2147483646,O=n({"0%":{transform:s},"100%":{transform:t}}),y=n({"0%":{transform:t},"100%":{transform:s}}),C=i(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:l,"@allowMotion":{'&[data-state="open"]':{animation:`${$} 250ms ease-out`},'&[data-state="closed"]':{animation:`${I} 550ms ease-out`}}}),D=i(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:t,zIndex:l,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${O} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${y} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),z=({size:d="sm",children:m,closeDialogText:c="Close dialog",showCloseButton:f=!0,...p})=>o(h,null,o(C,{id:r},o(D,{size:d,"aria-label":"Dialog",onPointerDownOutside:e=>{const a=e.target;(a==null?void 0:a.id)!==r&&e.preventDefault()},...p},f&&o(w,{as:g,css:{position:"absolute",right:"$4",top:"$4"},label:c,size:"lg",theme:"neutral"},o(v,{is:u})),m)));export{z as DialogContent};
@@ -0,0 +1,542 @@
1
+ import * as React from 'react';
2
+ import { EmptyStateBody } from './EmptyStateBody';
3
+ import { EmptyStateImage } from './EmptyStateImage';
4
+ import { EmptyStateTitle } from './EmptyStateTitle';
5
+ declare const EmptyStateContainer: import("@stitches/react/types/styled-component").StyledComponent<import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
6
+ sm: string;
7
+ md: string;
8
+ lg: string;
9
+ xl: string;
10
+ reducedMotion: string;
11
+ allowMotion: string;
12
+ hover: string;
13
+ }, import("@stitches/react/types/css-util").CSS<{
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ xl: string;
18
+ reducedMotion: string;
19
+ allowMotion: string;
20
+ hover: string;
21
+ }, {
22
+ colors: {
23
+ textForeground: any;
24
+ textSubtle: any;
25
+ textPlaceholder: any;
26
+ background: any;
27
+ backgroundAccent: any;
28
+ tonal50: any;
29
+ tonal100: any;
30
+ tonal200: any;
31
+ tonal300: any;
32
+ tonal400: any;
33
+ tonal500: any;
34
+ tonal600: any;
35
+ alpha100: any;
36
+ alpha150: any;
37
+ alpha200: any;
38
+ alpha250: any;
39
+ alpha600: any;
40
+ primaryLight: any;
41
+ primary: any;
42
+ primaryMid: any;
43
+ primaryDark: any;
44
+ secondary: any;
45
+ brandRed: any;
46
+ brandRedAccent: any;
47
+ brandGreen: any;
48
+ brandGreenAccent: any;
49
+ brandPurple: any;
50
+ brandPurpleAccent: any;
51
+ brandYellow: any;
52
+ brandYellowAccent: any;
53
+ successLight: any;
54
+ success: any;
55
+ successMid: any;
56
+ successDark: any;
57
+ dangerLight: any;
58
+ danger: any;
59
+ dangerMid: any;
60
+ dangerDark: any;
61
+ warningLight: any;
62
+ warning: any;
63
+ warningMid: any;
64
+ warningDark: any;
65
+ subjectEnglish: any;
66
+ subjectMaths: any;
67
+ subjectScience: any;
68
+ subjectVerbalReasoning: any;
69
+ subjectNonVerbalReasoning: any;
70
+ subjectCreativeWriting: any;
71
+ subjectExamSkills: any;
72
+ };
73
+ space: {
74
+ "0": any;
75
+ "1": any;
76
+ "2": any;
77
+ "3": any;
78
+ "4": any;
79
+ "5": any;
80
+ "6": any;
81
+ "7": any;
82
+ "8": any;
83
+ "9": any;
84
+ };
85
+ fontSizes: {
86
+ xs: any;
87
+ sm: any;
88
+ md: any;
89
+ lg: any;
90
+ xl: any;
91
+ "2xl": any;
92
+ "3xl": any;
93
+ "4xl": any;
94
+ };
95
+ fonts: {
96
+ sans: any;
97
+ mono: any;
98
+ display: any;
99
+ body: any;
100
+ };
101
+ sizes: {
102
+ "0": any;
103
+ "1": any;
104
+ "2": any;
105
+ "3": any;
106
+ "4": any;
107
+ "5": any;
108
+ "6": any;
109
+ "7": any;
110
+ "8": any;
111
+ };
112
+ radii: {
113
+ "0": any;
114
+ "1": any;
115
+ "2": any;
116
+ "3": any;
117
+ round: any;
118
+ };
119
+ shadows: {
120
+ "0": any;
121
+ "1": any;
122
+ "2": any;
123
+ "3": any;
124
+ };
125
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
126
+ bg: (value: {
127
+ readonly [$$PropertyValue]: "background";
128
+ }) => {
129
+ background: {
130
+ readonly [$$PropertyValue]: "background";
131
+ };
132
+ };
133
+ inset: (value: string | number | {
134
+ readonly [$$ScaleValue]: "space";
135
+ }) => {
136
+ top: string | number | {
137
+ readonly [$$ScaleValue]: "space";
138
+ };
139
+ right: string | number | {
140
+ readonly [$$ScaleValue]: "space";
141
+ };
142
+ bottom: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ };
145
+ left: string | number | {
146
+ readonly [$$ScaleValue]: "space";
147
+ };
148
+ };
149
+ size: (value: string | number | {
150
+ readonly [$$ScaleValue]: "size";
151
+ }) => {
152
+ height: string | number | {
153
+ readonly [$$ScaleValue]: "size";
154
+ };
155
+ width: string | number | {
156
+ readonly [$$ScaleValue]: "size";
157
+ };
158
+ };
159
+ p: (value: string | number | {
160
+ readonly [$$ScaleValue]: "space";
161
+ }) => {
162
+ padding: string | number | {
163
+ readonly [$$ScaleValue]: "space";
164
+ };
165
+ };
166
+ pt: (value: string | number | {
167
+ readonly [$$ScaleValue]: "space";
168
+ }) => {
169
+ paddingTop: string | number | {
170
+ readonly [$$ScaleValue]: "space";
171
+ };
172
+ };
173
+ pr: (value: string | number | {
174
+ readonly [$$ScaleValue]: "space";
175
+ }) => {
176
+ paddingRight: string | number | {
177
+ readonly [$$ScaleValue]: "space";
178
+ };
179
+ };
180
+ pb: (value: string | number | {
181
+ readonly [$$ScaleValue]: "space";
182
+ }) => {
183
+ paddingBottom: string | number | {
184
+ readonly [$$ScaleValue]: "space";
185
+ };
186
+ };
187
+ pl: (value: string | number | {
188
+ readonly [$$ScaleValue]: "space";
189
+ }) => {
190
+ paddingLeft: string | number | {
191
+ readonly [$$ScaleValue]: "space";
192
+ };
193
+ };
194
+ px: (value: string | number | {
195
+ readonly [$$ScaleValue]: "space";
196
+ }) => {
197
+ paddingLeft: string | number | {
198
+ readonly [$$ScaleValue]: "space";
199
+ };
200
+ paddingRight: string | number | {
201
+ readonly [$$ScaleValue]: "space";
202
+ };
203
+ };
204
+ py: (value: string | number | {
205
+ readonly [$$ScaleValue]: "space";
206
+ }) => {
207
+ paddingTop: string | number | {
208
+ readonly [$$ScaleValue]: "space";
209
+ };
210
+ paddingBottom: string | number | {
211
+ readonly [$$ScaleValue]: "space";
212
+ };
213
+ };
214
+ m: (value: string | number | {
215
+ readonly [$$ScaleValue]: "space";
216
+ }) => {
217
+ margin: string | number | {
218
+ readonly [$$ScaleValue]: "space";
219
+ };
220
+ };
221
+ mt: (value: string | number | {
222
+ readonly [$$ScaleValue]: "space";
223
+ }) => {
224
+ marginTop: string | number | {
225
+ readonly [$$ScaleValue]: "space";
226
+ };
227
+ };
228
+ mr: (value: string | number | {
229
+ readonly [$$ScaleValue]: "space";
230
+ }) => {
231
+ marginRight: string | number | {
232
+ readonly [$$ScaleValue]: "space";
233
+ };
234
+ };
235
+ mb: (value: string | number | {
236
+ readonly [$$ScaleValue]: "space";
237
+ }) => {
238
+ marginBottom: string | number | {
239
+ readonly [$$ScaleValue]: "space";
240
+ };
241
+ };
242
+ ml: (value: string | number | {
243
+ readonly [$$ScaleValue]: "space";
244
+ }) => {
245
+ marginLeft: string | number | {
246
+ readonly [$$ScaleValue]: "space";
247
+ };
248
+ };
249
+ mx: (value: string | number | {
250
+ readonly [$$ScaleValue]: "space";
251
+ }) => {
252
+ marginLeft: string | number | {
253
+ readonly [$$ScaleValue]: "space";
254
+ };
255
+ marginRight: string | number | {
256
+ readonly [$$ScaleValue]: "space";
257
+ };
258
+ };
259
+ my: (value: string | number | {
260
+ readonly [$$ScaleValue]: "space";
261
+ }) => {
262
+ marginTop: string | number | {
263
+ readonly [$$ScaleValue]: "space";
264
+ };
265
+ marginBottom: string | number | {
266
+ readonly [$$ScaleValue]: "space";
267
+ };
268
+ };
269
+ }>>, {
270
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
271
+ }, {
272
+ sm: string;
273
+ md: string;
274
+ lg: string;
275
+ xl: string;
276
+ reducedMotion: string;
277
+ allowMotion: string;
278
+ hover: string;
279
+ }, import("@stitches/react/types/css-util").CSS<{
280
+ sm: string;
281
+ md: string;
282
+ lg: string;
283
+ xl: string;
284
+ reducedMotion: string;
285
+ allowMotion: string;
286
+ hover: string;
287
+ }, {
288
+ colors: {
289
+ textForeground: any;
290
+ textSubtle: any;
291
+ textPlaceholder: any;
292
+ background: any;
293
+ backgroundAccent: any;
294
+ tonal50: any;
295
+ tonal100: any;
296
+ tonal200: any;
297
+ tonal300: any;
298
+ tonal400: any;
299
+ tonal500: any;
300
+ tonal600: any;
301
+ alpha100: any;
302
+ alpha150: any;
303
+ alpha200: any;
304
+ alpha250: any;
305
+ alpha600: any;
306
+ primaryLight: any;
307
+ primary: any;
308
+ primaryMid: any;
309
+ primaryDark: any;
310
+ secondary: any;
311
+ brandRed: any;
312
+ brandRedAccent: any;
313
+ brandGreen: any;
314
+ brandGreenAccent: any;
315
+ brandPurple: any;
316
+ brandPurpleAccent: any;
317
+ brandYellow: any;
318
+ brandYellowAccent: any;
319
+ successLight: any;
320
+ success: any;
321
+ successMid: any;
322
+ successDark: any;
323
+ dangerLight: any;
324
+ danger: any;
325
+ dangerMid: any;
326
+ dangerDark: any;
327
+ warningLight: any;
328
+ warning: any;
329
+ warningMid: any;
330
+ warningDark: any;
331
+ subjectEnglish: any;
332
+ subjectMaths: any;
333
+ subjectScience: any;
334
+ subjectVerbalReasoning: any;
335
+ subjectNonVerbalReasoning: any;
336
+ subjectCreativeWriting: any;
337
+ subjectExamSkills: any;
338
+ };
339
+ space: {
340
+ "0": any;
341
+ "1": any;
342
+ "2": any;
343
+ "3": any;
344
+ "4": any;
345
+ "5": any;
346
+ "6": any;
347
+ "7": any;
348
+ "8": any;
349
+ "9": any;
350
+ };
351
+ fontSizes: {
352
+ xs: any;
353
+ sm: any;
354
+ md: any;
355
+ lg: any;
356
+ xl: any;
357
+ "2xl": any;
358
+ "3xl": any;
359
+ "4xl": any;
360
+ };
361
+ fonts: {
362
+ sans: any;
363
+ mono: any;
364
+ display: any;
365
+ body: any;
366
+ };
367
+ sizes: {
368
+ "0": any;
369
+ "1": any;
370
+ "2": any;
371
+ "3": any;
372
+ "4": any;
373
+ "5": any;
374
+ "6": any;
375
+ "7": any;
376
+ "8": any;
377
+ };
378
+ radii: {
379
+ "0": any;
380
+ "1": any;
381
+ "2": any;
382
+ "3": any;
383
+ round: any;
384
+ };
385
+ shadows: {
386
+ "0": any;
387
+ "1": any;
388
+ "2": any;
389
+ "3": any;
390
+ };
391
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
392
+ bg: (value: {
393
+ readonly [$$PropertyValue]: "background";
394
+ }) => {
395
+ background: {
396
+ readonly [$$PropertyValue]: "background";
397
+ };
398
+ };
399
+ inset: (value: string | number | {
400
+ readonly [$$ScaleValue]: "space";
401
+ }) => {
402
+ top: string | number | {
403
+ readonly [$$ScaleValue]: "space";
404
+ };
405
+ right: string | number | {
406
+ readonly [$$ScaleValue]: "space";
407
+ };
408
+ bottom: string | number | {
409
+ readonly [$$ScaleValue]: "space";
410
+ };
411
+ left: string | number | {
412
+ readonly [$$ScaleValue]: "space";
413
+ };
414
+ };
415
+ size: (value: string | number | {
416
+ readonly [$$ScaleValue]: "size";
417
+ }) => {
418
+ height: string | number | {
419
+ readonly [$$ScaleValue]: "size";
420
+ };
421
+ width: string | number | {
422
+ readonly [$$ScaleValue]: "size";
423
+ };
424
+ };
425
+ p: (value: string | number | {
426
+ readonly [$$ScaleValue]: "space";
427
+ }) => {
428
+ padding: string | number | {
429
+ readonly [$$ScaleValue]: "space";
430
+ };
431
+ };
432
+ pt: (value: string | number | {
433
+ readonly [$$ScaleValue]: "space";
434
+ }) => {
435
+ paddingTop: string | number | {
436
+ readonly [$$ScaleValue]: "space";
437
+ };
438
+ };
439
+ pr: (value: string | number | {
440
+ readonly [$$ScaleValue]: "space";
441
+ }) => {
442
+ paddingRight: string | number | {
443
+ readonly [$$ScaleValue]: "space";
444
+ };
445
+ };
446
+ pb: (value: string | number | {
447
+ readonly [$$ScaleValue]: "space";
448
+ }) => {
449
+ paddingBottom: string | number | {
450
+ readonly [$$ScaleValue]: "space";
451
+ };
452
+ };
453
+ pl: (value: string | number | {
454
+ readonly [$$ScaleValue]: "space";
455
+ }) => {
456
+ paddingLeft: string | number | {
457
+ readonly [$$ScaleValue]: "space";
458
+ };
459
+ };
460
+ px: (value: string | number | {
461
+ readonly [$$ScaleValue]: "space";
462
+ }) => {
463
+ paddingLeft: string | number | {
464
+ readonly [$$ScaleValue]: "space";
465
+ };
466
+ paddingRight: string | number | {
467
+ readonly [$$ScaleValue]: "space";
468
+ };
469
+ };
470
+ py: (value: string | number | {
471
+ readonly [$$ScaleValue]: "space";
472
+ }) => {
473
+ paddingTop: string | number | {
474
+ readonly [$$ScaleValue]: "space";
475
+ };
476
+ paddingBottom: string | number | {
477
+ readonly [$$ScaleValue]: "space";
478
+ };
479
+ };
480
+ m: (value: string | number | {
481
+ readonly [$$ScaleValue]: "space";
482
+ }) => {
483
+ margin: string | number | {
484
+ readonly [$$ScaleValue]: "space";
485
+ };
486
+ };
487
+ mt: (value: string | number | {
488
+ readonly [$$ScaleValue]: "space";
489
+ }) => {
490
+ marginTop: string | number | {
491
+ readonly [$$ScaleValue]: "space";
492
+ };
493
+ };
494
+ mr: (value: string | number | {
495
+ readonly [$$ScaleValue]: "space";
496
+ }) => {
497
+ marginRight: string | number | {
498
+ readonly [$$ScaleValue]: "space";
499
+ };
500
+ };
501
+ mb: (value: string | number | {
502
+ readonly [$$ScaleValue]: "space";
503
+ }) => {
504
+ marginBottom: string | number | {
505
+ readonly [$$ScaleValue]: "space";
506
+ };
507
+ };
508
+ ml: (value: string | number | {
509
+ readonly [$$ScaleValue]: "space";
510
+ }) => {
511
+ marginLeft: string | number | {
512
+ readonly [$$ScaleValue]: "space";
513
+ };
514
+ };
515
+ mx: (value: string | number | {
516
+ readonly [$$ScaleValue]: "space";
517
+ }) => {
518
+ marginLeft: string | number | {
519
+ readonly [$$ScaleValue]: "space";
520
+ };
521
+ marginRight: string | number | {
522
+ readonly [$$ScaleValue]: "space";
523
+ };
524
+ };
525
+ my: (value: string | number | {
526
+ readonly [$$ScaleValue]: "space";
527
+ }) => {
528
+ marginTop: string | number | {
529
+ readonly [$$ScaleValue]: "space";
530
+ };
531
+ marginBottom: string | number | {
532
+ readonly [$$ScaleValue]: "space";
533
+ };
534
+ };
535
+ }>>;
536
+ declare type EmptyStateProps = React.ComponentProps<typeof EmptyStateContainer>;
537
+ export declare const EmptyState: React.FC<EmptyStateProps> & {
538
+ Image: typeof EmptyStateImage;
539
+ Title: typeof EmptyStateTitle;
540
+ Body: typeof EmptyStateBody;
541
+ };
542
+ export {};
@@ -0,0 +1 @@
1
+ import{createElement as i,Children as y,isValidElement as l,cloneElement as s}from"react";import{Flex as f}from"../flex/Flex.js";import{styled as E}from"../../stitches.js";import{EmptyStateBody as r}from"./EmptyStateBody.js";import{EmptyStateImage as p}from"./EmptyStateImage.js";import{EmptyStateTitle as o}from"./EmptyStateTitle.js";const x=E(f,{flexDirection:"column",alignItems:"center",textAlign:"center","& > *:last-child":{mb:0},variants:{size:{xs:{p:"$2"},sm:{p:"$3"},md:{p:"$4"},lg:{p:"$5"},xl:{p:"$6"}}}}),e=({size:m="sm",children:n,...a})=>i(x,{size:m,...a},y.map(n,t=>l(t)&&(t.type===p||t.type===o||t.type===r)?s(t,{...t.props,size:m}):t));e.displayName="EmptyState",e.Image=p,e.Title=o,e.Body=r;export{e as EmptyState};