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