@atom-learning/components 2.28.2 → 2.28.3-beta.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +0 -7
  2. package/dist/components/accordion/AccordionContent.js +1 -1
  3. package/dist/components/accordion/AccordionItem.js +1 -1
  4. package/dist/components/accordion/AccordionTrigger.d.ts +5 -4
  5. package/dist/components/accordion/AccordionTrigger.js +1 -1
  6. package/dist/components/tabs/Tabs.d.ts +7 -276
  7. package/dist/components/tabs/Tabs.js +1 -1
  8. package/dist/components/tabs/TabsContent.d.ts +267 -0
  9. package/dist/components/tabs/TabsContent.js +1 -0
  10. package/dist/components/tabs/{TabTrigger.d.ts → TabsTrigger.d.ts} +3 -6
  11. package/dist/components/tabs/TabsTrigger.js +1 -0
  12. package/dist/components/tabs/TabsTriggerList.d.ts +5 -9
  13. package/dist/components/tabs/TabsTriggerList.js +1 -1
  14. package/dist/components/top-bar/TopBar.js +1 -1
  15. package/dist/docgen.json +1 -1
  16. package/dist/docs/Accordion.mdx +56 -7
  17. package/dist/docs/README.mdx +79 -0
  18. package/dist/docs/Tabs.mdx +31 -57
  19. package/dist/experiments/color-scheme/ColorScheme.d.ts +201 -0
  20. package/dist/experiments/color-scheme/ColorScheme.js +1 -0
  21. package/dist/experiments/color-scheme/blue.json.js +1 -0
  22. package/dist/experiments/color-scheme/generateAlphaColors.d.ts +1 -0
  23. package/dist/experiments/color-scheme/generateAlphaColors.js +1 -0
  24. package/dist/experiments/color-scheme/index.d.ts +1 -0
  25. package/dist/experiments/color-scheme/slate.json.js +1 -0
  26. package/dist/experiments/color-scheme/stitches.colorscheme.config.d.ts +452 -0
  27. package/dist/experiments/color-scheme/stitches.colorscheme.config.js +1 -0
  28. package/dist/index.cjs.js +1 -1
  29. package/dist/utilities/hooks/useCallbackRef.js +1 -1
  30. package/dist/utilities/hooks/useScrollPosition.d.ts +6 -3
  31. package/dist/utilities/hooks/useScrollPosition.js +1 -1
  32. package/dist/utilities/hooks/useWindowScrollPosition.d.ts +6 -0
  33. package/dist/utilities/hooks/useWindowScrollPosition.js +1 -0
  34. package/dist/utilities/hooks/useWindowSize.d.ts +8 -0
  35. package/dist/utilities/hooks/useWindowSize.js +1 -0
  36. package/package.json +3 -2
  37. package/dist/components/tabs/TabTrigger.js +0 -1
  38. package/dist/components/tabs/utils.d.ts +0 -2
  39. package/dist/components/tabs/utils.js +0 -1
@@ -0,0 +1,452 @@
1
+ /// <reference types="react" />
2
+ export declare const colorSchemes: {};
3
+ export declare const styled: <Type extends import("@stitches/react/types/util").Function | keyof JSX.IntrinsicElements | import("react").ComponentType<any>, Composers extends (string | import("@stitches/react/types/util").Function | import("react").ComponentType<any> | {
4
+ [name: string]: unknown;
5
+ })[], CSS = import("@stitches/react/types/css-util").CSS<{
6
+ sm: string;
7
+ md: string;
8
+ lg: string;
9
+ xl: string;
10
+ reducedMotion: string;
11
+ allowMotion: string;
12
+ hover: string;
13
+ }, {
14
+ colors: {
15
+ slate1: any;
16
+ slate2: any;
17
+ slate3: any;
18
+ slate4: any;
19
+ slate5: any;
20
+ slate6: any;
21
+ slate7: any;
22
+ slate8: any;
23
+ slate9: any;
24
+ slate10: any;
25
+ blue1: any;
26
+ blue2: any;
27
+ blue3: any;
28
+ blue4: any;
29
+ blue5: any;
30
+ blue6: any;
31
+ blue7: any;
32
+ blue8: any;
33
+ blue9: any;
34
+ blue10: any;
35
+ background: any;
36
+ foreground: any;
37
+ foreground6plus: any;
38
+ };
39
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
40
+ bg: (value: {
41
+ readonly [$$PropertyValue]: "background";
42
+ }) => {
43
+ background: {
44
+ readonly [$$PropertyValue]: "background";
45
+ };
46
+ };
47
+ inset: (value: string | number | {
48
+ readonly [$$ScaleValue]: "space";
49
+ }) => {
50
+ top: string | number | {
51
+ readonly [$$ScaleValue]: "space";
52
+ };
53
+ right: string | number | {
54
+ readonly [$$ScaleValue]: "space";
55
+ };
56
+ bottom: string | number | {
57
+ readonly [$$ScaleValue]: "space";
58
+ };
59
+ left: string | number | {
60
+ readonly [$$ScaleValue]: "space";
61
+ };
62
+ };
63
+ size: (value: string | number | {
64
+ readonly [$$ScaleValue]: "size";
65
+ }) => {
66
+ height: string | number | {
67
+ readonly [$$ScaleValue]: "size";
68
+ };
69
+ width: string | number | {
70
+ readonly [$$ScaleValue]: "size";
71
+ };
72
+ };
73
+ p: (value: string | number | {
74
+ readonly [$$ScaleValue]: "space";
75
+ }) => {
76
+ padding: string | number | {
77
+ readonly [$$ScaleValue]: "space";
78
+ };
79
+ };
80
+ pt: (value: string | number | {
81
+ readonly [$$ScaleValue]: "space";
82
+ }) => {
83
+ paddingTop: string | number | {
84
+ readonly [$$ScaleValue]: "space";
85
+ };
86
+ };
87
+ pr: (value: string | number | {
88
+ readonly [$$ScaleValue]: "space";
89
+ }) => {
90
+ paddingRight: string | number | {
91
+ readonly [$$ScaleValue]: "space";
92
+ };
93
+ };
94
+ pb: (value: string | number | {
95
+ readonly [$$ScaleValue]: "space";
96
+ }) => {
97
+ paddingBottom: string | number | {
98
+ readonly [$$ScaleValue]: "space";
99
+ };
100
+ };
101
+ pl: (value: string | number | {
102
+ readonly [$$ScaleValue]: "space";
103
+ }) => {
104
+ paddingLeft: string | number | {
105
+ readonly [$$ScaleValue]: "space";
106
+ };
107
+ };
108
+ px: (value: string | number | {
109
+ readonly [$$ScaleValue]: "space";
110
+ }) => {
111
+ paddingLeft: string | number | {
112
+ readonly [$$ScaleValue]: "space";
113
+ };
114
+ paddingRight: string | number | {
115
+ readonly [$$ScaleValue]: "space";
116
+ };
117
+ };
118
+ py: (value: string | number | {
119
+ readonly [$$ScaleValue]: "space";
120
+ }) => {
121
+ paddingTop: string | number | {
122
+ readonly [$$ScaleValue]: "space";
123
+ };
124
+ paddingBottom: string | number | {
125
+ readonly [$$ScaleValue]: "space";
126
+ };
127
+ };
128
+ m: (value: string | number | {
129
+ readonly [$$ScaleValue]: "space";
130
+ }) => {
131
+ margin: string | number | {
132
+ readonly [$$ScaleValue]: "space";
133
+ };
134
+ };
135
+ mt: (value: string | number | {
136
+ readonly [$$ScaleValue]: "space";
137
+ }) => {
138
+ marginTop: string | number | {
139
+ readonly [$$ScaleValue]: "space";
140
+ };
141
+ };
142
+ mr: (value: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ }) => {
145
+ marginRight: string | number | {
146
+ readonly [$$ScaleValue]: "space";
147
+ };
148
+ };
149
+ mb: (value: string | number | {
150
+ readonly [$$ScaleValue]: "space";
151
+ }) => {
152
+ marginBottom: string | number | {
153
+ readonly [$$ScaleValue]: "space";
154
+ };
155
+ };
156
+ ml: (value: string | number | {
157
+ readonly [$$ScaleValue]: "space";
158
+ }) => {
159
+ marginLeft: string | number | {
160
+ readonly [$$ScaleValue]: "space";
161
+ };
162
+ };
163
+ mx: (value: string | number | {
164
+ readonly [$$ScaleValue]: "space";
165
+ }) => {
166
+ marginLeft: string | number | {
167
+ readonly [$$ScaleValue]: "space";
168
+ };
169
+ marginRight: string | number | {
170
+ readonly [$$ScaleValue]: "space";
171
+ };
172
+ };
173
+ my: (value: string | number | {
174
+ readonly [$$ScaleValue]: "space";
175
+ }) => {
176
+ marginTop: string | number | {
177
+ readonly [$$ScaleValue]: "space";
178
+ };
179
+ marginBottom: string | number | {
180
+ readonly [$$ScaleValue]: "space";
181
+ };
182
+ };
183
+ }>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("@stitches/react/types/util").Function | import("react").ComponentType<any> ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
184
+ variants?: {
185
+ [x: string]: {
186
+ [x: string]: CSS;
187
+ [x: number]: CSS;
188
+ };
189
+ } | undefined;
190
+ compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/react/types/util").WideObject) & {
191
+ css: CSS;
192
+ })[] | undefined;
193
+ defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/react/types/util").WideObject) | undefined;
194
+ } & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {
195
+ sm: string;
196
+ md: string;
197
+ lg: string;
198
+ xl: string;
199
+ reducedMotion: string;
200
+ allowMotion: string;
201
+ hover: string;
202
+ }, import("@stitches/react/types/css-util").CSS<{
203
+ sm: string;
204
+ md: string;
205
+ lg: string;
206
+ xl: string;
207
+ reducedMotion: string;
208
+ allowMotion: string;
209
+ hover: string;
210
+ }, {
211
+ colors: {
212
+ slate1: any;
213
+ slate2: any;
214
+ slate3: any;
215
+ slate4: any;
216
+ slate5: any;
217
+ slate6: any;
218
+ slate7: any;
219
+ slate8: any;
220
+ slate9: any;
221
+ slate10: any;
222
+ blue1: any;
223
+ blue2: any;
224
+ blue3: any;
225
+ blue4: any;
226
+ blue5: any;
227
+ blue6: any;
228
+ blue7: any;
229
+ blue8: any;
230
+ blue9: any;
231
+ blue10: any;
232
+ background: any;
233
+ foreground: any;
234
+ foreground6plus: any;
235
+ };
236
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
237
+ bg: (value: {
238
+ readonly [$$PropertyValue]: "background";
239
+ }) => {
240
+ background: {
241
+ readonly [$$PropertyValue]: "background";
242
+ };
243
+ };
244
+ inset: (value: string | number | {
245
+ readonly [$$ScaleValue]: "space";
246
+ }) => {
247
+ top: string | number | {
248
+ readonly [$$ScaleValue]: "space";
249
+ };
250
+ right: string | number | {
251
+ readonly [$$ScaleValue]: "space";
252
+ };
253
+ bottom: string | number | {
254
+ readonly [$$ScaleValue]: "space";
255
+ };
256
+ left: string | number | {
257
+ readonly [$$ScaleValue]: "space";
258
+ };
259
+ };
260
+ size: (value: string | number | {
261
+ readonly [$$ScaleValue]: "size";
262
+ }) => {
263
+ height: string | number | {
264
+ readonly [$$ScaleValue]: "size";
265
+ };
266
+ width: string | number | {
267
+ readonly [$$ScaleValue]: "size";
268
+ };
269
+ };
270
+ p: (value: string | number | {
271
+ readonly [$$ScaleValue]: "space";
272
+ }) => {
273
+ padding: string | number | {
274
+ readonly [$$ScaleValue]: "space";
275
+ };
276
+ };
277
+ pt: (value: string | number | {
278
+ readonly [$$ScaleValue]: "space";
279
+ }) => {
280
+ paddingTop: string | number | {
281
+ readonly [$$ScaleValue]: "space";
282
+ };
283
+ };
284
+ pr: (value: string | number | {
285
+ readonly [$$ScaleValue]: "space";
286
+ }) => {
287
+ paddingRight: string | number | {
288
+ readonly [$$ScaleValue]: "space";
289
+ };
290
+ };
291
+ pb: (value: string | number | {
292
+ readonly [$$ScaleValue]: "space";
293
+ }) => {
294
+ paddingBottom: string | number | {
295
+ readonly [$$ScaleValue]: "space";
296
+ };
297
+ };
298
+ pl: (value: string | number | {
299
+ readonly [$$ScaleValue]: "space";
300
+ }) => {
301
+ paddingLeft: string | number | {
302
+ readonly [$$ScaleValue]: "space";
303
+ };
304
+ };
305
+ px: (value: string | number | {
306
+ readonly [$$ScaleValue]: "space";
307
+ }) => {
308
+ paddingLeft: string | number | {
309
+ readonly [$$ScaleValue]: "space";
310
+ };
311
+ paddingRight: string | number | {
312
+ readonly [$$ScaleValue]: "space";
313
+ };
314
+ };
315
+ py: (value: string | number | {
316
+ readonly [$$ScaleValue]: "space";
317
+ }) => {
318
+ paddingTop: string | number | {
319
+ readonly [$$ScaleValue]: "space";
320
+ };
321
+ paddingBottom: string | number | {
322
+ readonly [$$ScaleValue]: "space";
323
+ };
324
+ };
325
+ m: (value: string | number | {
326
+ readonly [$$ScaleValue]: "space";
327
+ }) => {
328
+ margin: string | number | {
329
+ readonly [$$ScaleValue]: "space";
330
+ };
331
+ };
332
+ mt: (value: string | number | {
333
+ readonly [$$ScaleValue]: "space";
334
+ }) => {
335
+ marginTop: string | number | {
336
+ readonly [$$ScaleValue]: "space";
337
+ };
338
+ };
339
+ mr: (value: string | number | {
340
+ readonly [$$ScaleValue]: "space";
341
+ }) => {
342
+ marginRight: string | number | {
343
+ readonly [$$ScaleValue]: "space";
344
+ };
345
+ };
346
+ mb: (value: string | number | {
347
+ readonly [$$ScaleValue]: "space";
348
+ }) => {
349
+ marginBottom: string | number | {
350
+ readonly [$$ScaleValue]: "space";
351
+ };
352
+ };
353
+ ml: (value: string | number | {
354
+ readonly [$$ScaleValue]: "space";
355
+ }) => {
356
+ marginLeft: string | number | {
357
+ readonly [$$ScaleValue]: "space";
358
+ };
359
+ };
360
+ mx: (value: string | number | {
361
+ readonly [$$ScaleValue]: "space";
362
+ }) => {
363
+ marginLeft: string | number | {
364
+ readonly [$$ScaleValue]: "space";
365
+ };
366
+ marginRight: string | number | {
367
+ readonly [$$ScaleValue]: "space";
368
+ };
369
+ };
370
+ my: (value: string | number | {
371
+ readonly [$$ScaleValue]: "space";
372
+ }) => {
373
+ marginTop: string | number | {
374
+ readonly [$$ScaleValue]: "space";
375
+ };
376
+ marginBottom: string | number | {
377
+ readonly [$$ScaleValue]: "space";
378
+ };
379
+ };
380
+ }>>, createTheme: <Argument0 extends string | ({
381
+ colors?: {
382
+ slate1?: string | number | boolean | undefined;
383
+ slate2?: string | number | boolean | undefined;
384
+ slate3?: string | number | boolean | undefined;
385
+ slate4?: string | number | boolean | undefined;
386
+ slate5?: string | number | boolean | undefined;
387
+ slate6?: string | number | boolean | undefined;
388
+ slate7?: string | number | boolean | undefined;
389
+ slate8?: string | number | boolean | undefined;
390
+ slate9?: string | number | boolean | undefined;
391
+ slate10?: string | number | boolean | undefined;
392
+ blue1?: string | number | boolean | undefined;
393
+ blue2?: string | number | boolean | undefined;
394
+ blue3?: string | number | boolean | undefined;
395
+ blue4?: string | number | boolean | undefined;
396
+ blue5?: string | number | boolean | undefined;
397
+ blue6?: string | number | boolean | undefined;
398
+ blue7?: string | number | boolean | undefined;
399
+ blue8?: string | number | boolean | undefined;
400
+ blue9?: string | number | boolean | undefined;
401
+ blue10?: string | number | boolean | undefined;
402
+ background?: string | number | boolean | undefined;
403
+ foreground?: string | number | boolean | undefined;
404
+ foreground6plus?: string | number | boolean | undefined;
405
+ } | undefined;
406
+ } & {
407
+ [x: string]: {
408
+ [x: string]: string | number | boolean;
409
+ [x: number]: string | number | boolean;
410
+ };
411
+ }), Argument1 extends string | ({
412
+ colors?: {
413
+ slate1?: string | number | boolean | undefined;
414
+ slate2?: string | number | boolean | undefined;
415
+ slate3?: string | number | boolean | undefined;
416
+ slate4?: string | number | boolean | undefined;
417
+ slate5?: string | number | boolean | undefined;
418
+ slate6?: string | number | boolean | undefined;
419
+ slate7?: string | number | boolean | undefined;
420
+ slate8?: string | number | boolean | undefined;
421
+ slate9?: string | number | boolean | undefined;
422
+ slate10?: string | number | boolean | undefined;
423
+ blue1?: string | number | boolean | undefined;
424
+ blue2?: string | number | boolean | undefined;
425
+ blue3?: string | number | boolean | undefined;
426
+ blue4?: string | number | boolean | undefined;
427
+ blue5?: string | number | boolean | undefined;
428
+ blue6?: string | number | boolean | undefined;
429
+ blue7?: string | number | boolean | undefined;
430
+ blue8?: string | number | boolean | undefined;
431
+ blue9?: string | number | boolean | undefined;
432
+ blue10?: string | number | boolean | undefined;
433
+ background?: string | number | boolean | undefined;
434
+ foreground?: string | number | boolean | undefined;
435
+ foreground6plus?: string | number | boolean | undefined;
436
+ } | undefined;
437
+ } & {
438
+ [x: string]: {
439
+ [x: string]: string | number | boolean;
440
+ [x: number]: string | number | boolean;
441
+ };
442
+ })>(nameOrScalesArg0: Argument0, nameOrScalesArg1?: Argument1 | undefined) => string & {
443
+ className: string;
444
+ selector: string;
445
+ } & (Argument0 extends string ? import("@stitches/react/types/stitches").ThemeTokens<Argument1, ""> : import("@stitches/react/types/stitches").ThemeTokens<Argument0, "">);
446
+ export declare const bases: {
447
+ slate: string;
448
+ };
449
+ export declare const accents: {
450
+ slate: string;
451
+ blue: string;
452
+ };
@@ -0,0 +1 @@
1
+ import{createStitches as u}from"@stitches/react";import a from"./blue.json.js";import i from"./slate.json.js";import{generateAlphaColors as s}from"./generateAlphaColors.js";import{utils as m,media as d}from"../../stitches.js";const e={},l=(c,o)=>{const t={};for(let n=1;n<=10;n++)t[`${c}${n}`]=`$${o}${n}`,t[`${c}A${n}`]=`$${o}A${n}`;return t},{styled:f,createTheme:r}=u({theme:{colors:{background:"white",foreground:i.slate9,foreground6plus:"white",...a,...s("blue",a),...i,...s("slate",i)}},utils:m,media:d});e["interactive-loContrast1"]=r("interactive-loContrast1",{colors:{interactiveForeground:"$foreground",interactive1:"white",interactive2:"$accent1",interactive3:"$accent2"}}),e["interactive-loContrast2"]=r("interactive-loContrast2",{colors:{interactiveForeground:"$foreground",interactive1:"$accent1",interactive2:"$accent2",interactive3:"$accent3"}}),e["interactive-hiContrast1"]=r("interactive-hiContrast1",{colors:{interactiveForeground:"$foreground6plus",interactive1:"$accent7",interactive2:"$accent8",interactive3:"$accent9"}}),e["interactive-hiContrast2"]=r("interactive-hiContrast2",{colors:{interactiveForeground:"$foreground6plus",interactive1:"$accent8",interactive2:"$accent9",interactive3:"$accent10"}});const $={slate:"slate"},h=()=>{Object.entries($).forEach(([c,o])=>{const t=`base-${c}`;e[t]=r(t,{colors:l("base",o)})})},v={slate:"slate",blue:"blue"},g=()=>{Object.entries(v).forEach(([c,o])=>{const t=`accent-${c}`;e[t]=r(t,{colors:l("accent",o)})})};h(),g();export{v as accents,$ as bases,e as colorSchemes,r as createTheme,f as styled};