@atom-learning/components 2.65.0 → 2.66.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 (53) hide show
  1. package/CHANGELOG.md +4 -3
  2. package/dist/components/action-icon/ActionIcon.d.ts +3 -4
  3. package/dist/components/action-icon/ActionIcon.js +1 -1
  4. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  5. package/dist/components/badge/Badge.context.d.ts +13 -0
  6. package/dist/components/badge/Badge.context.js +2 -0
  7. package/dist/components/badge/Badge.context.js.map +1 -0
  8. package/dist/components/badge/Badge.d.ts +15 -3
  9. package/dist/components/badge/Badge.js +1 -1
  10. package/dist/components/badge/Badge.js.map +1 -1
  11. package/dist/components/badge/BadgeIcon.d.ts +649 -0
  12. package/dist/components/badge/BadgeIcon.js +2 -0
  13. package/dist/components/badge/BadgeIcon.js.map +1 -0
  14. package/dist/components/badge/BadgeText.d.ts +652 -0
  15. package/dist/components/badge/BadgeText.js +2 -0
  16. package/dist/components/badge/BadgeText.js.map +1 -0
  17. package/dist/components/badge/stitches.badge.colorscheme.config.d.ts +1 -0
  18. package/dist/components/badge/stitches.badge.colorscheme.config.js +2 -0
  19. package/dist/components/badge/stitches.badge.colorscheme.config.js.map +1 -0
  20. package/dist/components/banner/banner-regular/BannerRegularActions.js +1 -1
  21. package/dist/components/button/Button.d.ts +1 -0
  22. package/dist/components/button/Button.js +1 -1
  23. package/dist/components/button/Button.js.map +1 -1
  24. package/dist/components/create-password-field/CreatePasswordField.js +1 -1
  25. package/dist/components/data-table/DataTableGlobalFilter.js +1 -1
  26. package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -1
  27. package/dist/components/form/Form.js +1 -1
  28. package/dist/components/link/Link.js +1 -1
  29. package/dist/components/link/Link.js.map +1 -1
  30. package/dist/components/pagination/PaginationNextButton.d.ts +2 -4
  31. package/dist/components/pagination/PaginationPreviousButton.d.ts +2 -4
  32. package/dist/components/section-message/SectionMessage.d.ts +2 -4
  33. package/dist/components/sortable/Handle.d.ts +2 -4
  34. package/dist/components/stepper/Stepper.js +1 -1
  35. package/dist/docgen.json +1 -1
  36. package/dist/index.cjs.js +1 -1
  37. package/dist/index.cjs.js.map +1 -1
  38. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.d.ts +8 -0
  39. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js +2 -0
  40. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js.map +1 -0
  41. package/dist/utilities/optional-tooltip-wrapper/index.d.ts +2 -0
  42. package/dist/utilities/optional-visually-hidden-wrapper/OptionalVisuallyHiddenWrapper.d.ts +4 -0
  43. package/dist/utilities/optional-visually-hidden-wrapper/OptionalVisuallyHiddenWrapper.js +2 -0
  44. package/dist/utilities/optional-visually-hidden-wrapper/OptionalVisuallyHiddenWrapper.js.map +1 -0
  45. package/dist/utilities/optional-visually-hidden-wrapper/index.d.ts +1 -0
  46. package/dist/utilities/uri/index.d.ts +1 -0
  47. package/dist/utilities/uri/index.js +2 -0
  48. package/dist/utilities/uri/index.js.map +1 -0
  49. package/package.json +1 -1
  50. package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.d.ts +0 -4
  51. package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js +0 -2
  52. package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js.map +0 -1
  53. package/dist/utilities/optionally-visually-hidden-container/index.d.ts +0 -1
@@ -0,0 +1,652 @@
1
+ import * as React from 'react';
2
+ declare const StyledBadgeText: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof React.HTMLAttributes<HTMLParagraphElement>> & {
3
+ ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
4
+ }, "size" | "css" | "noCapsize"> & import("@stitches/react/types/styled-component").TransformProps<{
5
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
6
+ noCapsize?: boolean | "true" | undefined;
7
+ }, {
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ xl: string;
12
+ reducedMotion: string;
13
+ allowMotion: string;
14
+ hover: string;
15
+ }> & {
16
+ css?: import("@stitches/react/types/css-util").CSS<{
17
+ sm: string;
18
+ md: string;
19
+ lg: string;
20
+ xl: string;
21
+ reducedMotion: string;
22
+ allowMotion: string;
23
+ hover: string;
24
+ }, {
25
+ colors: {
26
+ textForeground: any;
27
+ textSubtle: any;
28
+ textPlaceholder: any;
29
+ background: any;
30
+ backgroundAccent: any;
31
+ grey100: any;
32
+ grey200: any;
33
+ grey300: any;
34
+ grey400: any;
35
+ grey500: any;
36
+ grey600: any;
37
+ grey700: any;
38
+ grey800: any;
39
+ grey900: any;
40
+ grey1000: any;
41
+ grey1100: any;
42
+ grey1200: any;
43
+ blue100: any;
44
+ blue200: any;
45
+ blue300: any;
46
+ blue400: any;
47
+ blue500: any;
48
+ blue600: any;
49
+ blue700: any;
50
+ blue800: any;
51
+ blue900: any;
52
+ blue1000: any;
53
+ blue1100: any;
54
+ blue1200: any;
55
+ purple100: any;
56
+ purple200: any;
57
+ purple300: any;
58
+ purple400: any;
59
+ purple500: any;
60
+ purple600: any;
61
+ purple700: any;
62
+ purple800: any;
63
+ purple900: any;
64
+ purple1000: any;
65
+ purple1100: any;
66
+ purple1200: any;
67
+ cyan100: any;
68
+ cyan200: any;
69
+ cyan300: any;
70
+ cyan400: any;
71
+ cyan500: any;
72
+ cyan600: any;
73
+ cyan700: any;
74
+ cyan800: any;
75
+ cyan900: any;
76
+ cyan1000: any;
77
+ cyan1100: any;
78
+ cyan1200: any;
79
+ green100: any;
80
+ green200: any;
81
+ green300: any;
82
+ green400: any;
83
+ green500: any;
84
+ green600: any;
85
+ green700: any;
86
+ green800: any;
87
+ green900: any;
88
+ green1000: any;
89
+ green1100: any;
90
+ green1200: any;
91
+ magenta100: any;
92
+ magenta200: any;
93
+ magenta300: any;
94
+ magenta400: any;
95
+ magenta500: any;
96
+ magenta600: any;
97
+ magenta700: any;
98
+ magenta800: any;
99
+ magenta900: any;
100
+ magenta1000: any;
101
+ magenta1100: any;
102
+ magenta1200: any;
103
+ red100: any;
104
+ red200: any;
105
+ red300: any;
106
+ red400: any;
107
+ red500: any;
108
+ red600: any;
109
+ red700: any;
110
+ red800: any;
111
+ red900: any;
112
+ red1000: any;
113
+ red1100: any;
114
+ red1200: any;
115
+ teal100: any;
116
+ teal200: any;
117
+ teal300: any;
118
+ teal400: any;
119
+ teal500: any;
120
+ teal600: any;
121
+ teal700: any;
122
+ teal800: any;
123
+ teal900: any;
124
+ teal1000: any;
125
+ teal1100: any;
126
+ teal1200: any;
127
+ orange100: any;
128
+ orange200: any;
129
+ orange300: any;
130
+ orange400: any;
131
+ orange500: any;
132
+ orange600: any;
133
+ orange700: any;
134
+ orange800: any;
135
+ orange900: any;
136
+ orange1000: any;
137
+ orange1100: any;
138
+ orange1200: any;
139
+ yellow100: any;
140
+ yellow200: any;
141
+ yellow300: any;
142
+ yellow400: any;
143
+ yellow500: any;
144
+ yellow600: any;
145
+ yellow700: any;
146
+ yellow800: any;
147
+ yellow900: any;
148
+ yellow1000: any;
149
+ yellow1100: any;
150
+ yellow1200: any;
151
+ lime100: any;
152
+ lime200: any;
153
+ lime300: any;
154
+ lime400: any;
155
+ lime500: any;
156
+ lime600: any;
157
+ lime700: any;
158
+ lime800: any;
159
+ lime900: any;
160
+ lime1000: any;
161
+ lime1100: any;
162
+ lime1200: any;
163
+ tonal50: any;
164
+ tonal100: any;
165
+ tonal200: any;
166
+ tonal300: any;
167
+ tonal400: any;
168
+ tonal500: any;
169
+ tonal600: any;
170
+ alpha100: any;
171
+ alpha150: any;
172
+ alpha200: any;
173
+ alpha250: any;
174
+ alpha600: any;
175
+ primaryLight: any;
176
+ primary: any;
177
+ primaryMid: any;
178
+ primaryDark: any;
179
+ secondary: any;
180
+ brandRed: any;
181
+ brandRedAccent: any;
182
+ brandGreen: any;
183
+ brandGreenAccent: any;
184
+ brandPurple: any;
185
+ brandPurpleAccent: any;
186
+ brandYellow: any;
187
+ brandYellowAccent: any;
188
+ successLight: any;
189
+ success: any;
190
+ successMid: any;
191
+ successDark: any;
192
+ dangerLight: any;
193
+ danger: any;
194
+ dangerMid: any;
195
+ dangerDark: any;
196
+ warningLight: any;
197
+ warning: any;
198
+ warningMid: any;
199
+ warningDark: any;
200
+ warningText: any;
201
+ subjectEnglish: any;
202
+ subjectMaths: any;
203
+ subjectScience: any;
204
+ subjectVerbalReasoning: any;
205
+ subjectNonVerbalReasoning: any;
206
+ subjectCreativeWriting: any;
207
+ subjectExamSkills: any;
208
+ glBlueLight: any;
209
+ glBluePrimary: any;
210
+ glBlueDark: any;
211
+ };
212
+ space: {
213
+ "0": any;
214
+ "1": any;
215
+ "2": any;
216
+ "3": any;
217
+ "4": any;
218
+ "5": any;
219
+ "6": any;
220
+ "7": any;
221
+ "8": any;
222
+ "9": any;
223
+ "24": any;
224
+ };
225
+ fontSizes: {
226
+ xs: any;
227
+ sm: any;
228
+ md: any;
229
+ lg: any;
230
+ xl: any;
231
+ "2xl": any;
232
+ "3xl": any;
233
+ "4xl": any;
234
+ };
235
+ fonts: {
236
+ sans: any;
237
+ mono: any;
238
+ display: any;
239
+ body: any;
240
+ };
241
+ sizes: {
242
+ "0": any;
243
+ "1": any;
244
+ "2": any;
245
+ "3": any;
246
+ "4": any;
247
+ "5": any;
248
+ "6": any;
249
+ "7": any;
250
+ "8": any;
251
+ };
252
+ radii: {
253
+ "0": any;
254
+ "1": any;
255
+ "2": any;
256
+ "3": any;
257
+ round: any;
258
+ };
259
+ shadows: {
260
+ "0": any;
261
+ "1": any;
262
+ "2": any;
263
+ "3": any;
264
+ };
265
+ ratios: {
266
+ "16-9": any;
267
+ "3-2": any;
268
+ "4-3": any;
269
+ "1-1": any;
270
+ "3-4": any;
271
+ };
272
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
273
+ bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
274
+ background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
275
+ };
276
+ size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
277
+ height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
278
+ width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
279
+ };
280
+ p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
281
+ padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
282
+ };
283
+ pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
284
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
285
+ };
286
+ pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
287
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
288
+ };
289
+ pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
290
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
291
+ };
292
+ pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
293
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
294
+ };
295
+ px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
296
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
297
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
298
+ };
299
+ py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
300
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
301
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
302
+ };
303
+ m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
304
+ margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
305
+ };
306
+ mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
307
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
308
+ };
309
+ mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
310
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
311
+ };
312
+ mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
313
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
314
+ };
315
+ ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
316
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
317
+ };
318
+ mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
319
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
320
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
321
+ };
322
+ my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
323
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
324
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
325
+ };
326
+ }> | undefined;
327
+ }, "as"> & {
328
+ as?: React.ElementType<any> | React.ComponentType<{}> | undefined;
329
+ }>, {
330
+ overflow?: "ellipsis" | "wrap" | undefined;
331
+ }, {
332
+ sm: string;
333
+ md: string;
334
+ lg: string;
335
+ xl: string;
336
+ reducedMotion: string;
337
+ allowMotion: string;
338
+ hover: string;
339
+ }, import("@stitches/react/types/css-util").CSS<{
340
+ sm: string;
341
+ md: string;
342
+ lg: string;
343
+ xl: string;
344
+ reducedMotion: string;
345
+ allowMotion: string;
346
+ hover: string;
347
+ }, {
348
+ colors: {
349
+ textForeground: any;
350
+ textSubtle: any;
351
+ textPlaceholder: any;
352
+ background: any;
353
+ backgroundAccent: any;
354
+ grey100: any;
355
+ grey200: any;
356
+ grey300: any;
357
+ grey400: any;
358
+ grey500: any;
359
+ grey600: any;
360
+ grey700: any;
361
+ grey800: any;
362
+ grey900: any;
363
+ grey1000: any;
364
+ grey1100: any;
365
+ grey1200: any;
366
+ blue100: any;
367
+ blue200: any;
368
+ blue300: any;
369
+ blue400: any;
370
+ blue500: any;
371
+ blue600: any;
372
+ blue700: any;
373
+ blue800: any;
374
+ blue900: any;
375
+ blue1000: any;
376
+ blue1100: any;
377
+ blue1200: any;
378
+ purple100: any;
379
+ purple200: any;
380
+ purple300: any;
381
+ purple400: any;
382
+ purple500: any;
383
+ purple600: any;
384
+ purple700: any;
385
+ purple800: any;
386
+ purple900: any;
387
+ purple1000: any;
388
+ purple1100: any;
389
+ purple1200: any;
390
+ cyan100: any;
391
+ cyan200: any;
392
+ cyan300: any;
393
+ cyan400: any;
394
+ cyan500: any;
395
+ cyan600: any;
396
+ cyan700: any;
397
+ cyan800: any;
398
+ cyan900: any;
399
+ cyan1000: any;
400
+ cyan1100: any;
401
+ cyan1200: any;
402
+ green100: any;
403
+ green200: any;
404
+ green300: any;
405
+ green400: any;
406
+ green500: any;
407
+ green600: any;
408
+ green700: any;
409
+ green800: any;
410
+ green900: any;
411
+ green1000: any;
412
+ green1100: any;
413
+ green1200: any;
414
+ magenta100: any;
415
+ magenta200: any;
416
+ magenta300: any;
417
+ magenta400: any;
418
+ magenta500: any;
419
+ magenta600: any;
420
+ magenta700: any;
421
+ magenta800: any;
422
+ magenta900: any;
423
+ magenta1000: any;
424
+ magenta1100: any;
425
+ magenta1200: any;
426
+ red100: any;
427
+ red200: any;
428
+ red300: any;
429
+ red400: any;
430
+ red500: any;
431
+ red600: any;
432
+ red700: any;
433
+ red800: any;
434
+ red900: any;
435
+ red1000: any;
436
+ red1100: any;
437
+ red1200: any;
438
+ teal100: any;
439
+ teal200: any;
440
+ teal300: any;
441
+ teal400: any;
442
+ teal500: any;
443
+ teal600: any;
444
+ teal700: any;
445
+ teal800: any;
446
+ teal900: any;
447
+ teal1000: any;
448
+ teal1100: any;
449
+ teal1200: any;
450
+ orange100: any;
451
+ orange200: any;
452
+ orange300: any;
453
+ orange400: any;
454
+ orange500: any;
455
+ orange600: any;
456
+ orange700: any;
457
+ orange800: any;
458
+ orange900: any;
459
+ orange1000: any;
460
+ orange1100: any;
461
+ orange1200: any;
462
+ yellow100: any;
463
+ yellow200: any;
464
+ yellow300: any;
465
+ yellow400: any;
466
+ yellow500: any;
467
+ yellow600: any;
468
+ yellow700: any;
469
+ yellow800: any;
470
+ yellow900: any;
471
+ yellow1000: any;
472
+ yellow1100: any;
473
+ yellow1200: any;
474
+ lime100: any;
475
+ lime200: any;
476
+ lime300: any;
477
+ lime400: any;
478
+ lime500: any;
479
+ lime600: any;
480
+ lime700: any;
481
+ lime800: any;
482
+ lime900: any;
483
+ lime1000: any;
484
+ lime1100: any;
485
+ lime1200: any;
486
+ tonal50: any;
487
+ tonal100: any;
488
+ tonal200: any;
489
+ tonal300: any;
490
+ tonal400: any;
491
+ tonal500: any;
492
+ tonal600: any;
493
+ alpha100: any;
494
+ alpha150: any;
495
+ alpha200: any;
496
+ alpha250: any;
497
+ alpha600: any;
498
+ primaryLight: any;
499
+ primary: any;
500
+ primaryMid: any;
501
+ primaryDark: any;
502
+ secondary: any;
503
+ brandRed: any;
504
+ brandRedAccent: any;
505
+ brandGreen: any;
506
+ brandGreenAccent: any;
507
+ brandPurple: any;
508
+ brandPurpleAccent: any;
509
+ brandYellow: any;
510
+ brandYellowAccent: any;
511
+ successLight: any;
512
+ success: any;
513
+ successMid: any;
514
+ successDark: any;
515
+ dangerLight: any;
516
+ danger: any;
517
+ dangerMid: any;
518
+ dangerDark: any;
519
+ warningLight: any;
520
+ warning: any;
521
+ warningMid: any;
522
+ warningDark: any;
523
+ warningText: any;
524
+ subjectEnglish: any;
525
+ subjectMaths: any;
526
+ subjectScience: any;
527
+ subjectVerbalReasoning: any;
528
+ subjectNonVerbalReasoning: any;
529
+ subjectCreativeWriting: any;
530
+ subjectExamSkills: any;
531
+ glBlueLight: any;
532
+ glBluePrimary: any;
533
+ glBlueDark: any;
534
+ };
535
+ space: {
536
+ "0": any;
537
+ "1": any;
538
+ "2": any;
539
+ "3": any;
540
+ "4": any;
541
+ "5": any;
542
+ "6": any;
543
+ "7": any;
544
+ "8": any;
545
+ "9": any;
546
+ "24": any;
547
+ };
548
+ fontSizes: {
549
+ xs: any;
550
+ sm: any;
551
+ md: any;
552
+ lg: any;
553
+ xl: any;
554
+ "2xl": any;
555
+ "3xl": any;
556
+ "4xl": any;
557
+ };
558
+ fonts: {
559
+ sans: any;
560
+ mono: any;
561
+ display: any;
562
+ body: any;
563
+ };
564
+ sizes: {
565
+ "0": any;
566
+ "1": any;
567
+ "2": any;
568
+ "3": any;
569
+ "4": any;
570
+ "5": any;
571
+ "6": any;
572
+ "7": any;
573
+ "8": any;
574
+ };
575
+ radii: {
576
+ "0": any;
577
+ "1": any;
578
+ "2": any;
579
+ "3": any;
580
+ round: any;
581
+ };
582
+ shadows: {
583
+ "0": any;
584
+ "1": any;
585
+ "2": any;
586
+ "3": any;
587
+ };
588
+ ratios: {
589
+ "16-9": any;
590
+ "3-2": any;
591
+ "4-3": any;
592
+ "1-1": any;
593
+ "3-4": any;
594
+ };
595
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
596
+ bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
597
+ background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
598
+ };
599
+ size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
600
+ height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
601
+ width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
602
+ };
603
+ p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
604
+ padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
605
+ };
606
+ pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
607
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
608
+ };
609
+ pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
610
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
611
+ };
612
+ pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
613
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
614
+ };
615
+ pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
616
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
617
+ };
618
+ px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
619
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
620
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
621
+ };
622
+ py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
623
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
624
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
625
+ };
626
+ m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
627
+ margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
628
+ };
629
+ mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
630
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
631
+ };
632
+ mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
633
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
634
+ };
635
+ mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
636
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
637
+ };
638
+ ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
639
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
640
+ };
641
+ mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
642
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
643
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
644
+ };
645
+ my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
646
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
647
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
648
+ };
649
+ }>>;
650
+ declare type TBadgeTextProps = React.ComponentProps<typeof StyledBadgeText>;
651
+ export declare const BadgeText: ({ children, ...rest }: TBadgeTextProps) => JSX.Element;
652
+ export {};
@@ -0,0 +1,2 @@
1
+ import*as t from"react";import{Text as p}from"../text/Text.js";import{styled as f}from"../../stitches.js";import{useCallbackRefState as c}from"../../utilities/hooks/useCallbackRef.js";import{useResizeObserver as d}from"../../utilities/hooks/useResizeObserver.js";import{overrideStitchesVariantValue as u}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{BadgeContext as s}from"./Badge.context.js";const w=({elRef:e})=>{const{setIsOverflowing:r}=t.useContext(s);return d({delay:0,elements:[e],onResize:()=>{!(e!=null&&e.scrollWidth)||!(e!=null&&e.clientWidth)||r==null||r(e.scrollWidth>e.clientWidth)}}),null},h=f(p,{py:"$0",variants:{overflow:{ellipsis:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis"},wrap:{whiteSpace:"wrap"}}}}),v={xs:"sm",sm:"md",md:"md"},x=({children:e,...r})=>{const{size:l,overflow:o}=t.useContext(s),i=t.useMemo(()=>u(l,a=>v[a]),[l]),[n,m]=c();return t.createElement(t.Fragment,null,o==="ellipsis"&&t.createElement(w,{elRef:n}),t.createElement(h,{noCapsize:!0,size:i,overflow:o,ref:m,...r},e))};export{x as BadgeText};
2
+ //# sourceMappingURL=BadgeText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgeText.js","sources":["../../../src/components/badge/BadgeText.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Text } from '~/components/text'\nimport { styled } from '~/stitches'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { useResizeObserver } from '~/utilities/hooks/useResizeObserver'\nimport { overrideStitchesVariantValue } from '~/utilities/override-stitches-variant-value/overrideStitchesVariantValue'\n\nimport { BadgeContext } from './Badge.context'\n\n/*\n * Instead of sticking a resize observer on every `BadgeText`\n * regardless of overflow type, split the resize logic into a component.\n * Basically call the hook conditionally, only for the version with\n * the `overflow === 'ellipsis'` which needs it.\n * This saves us from initialising a resize observer for any badge which doesn't need it.\n */\nconst ObserveBadgeTextOverflow: React.VFC<{ elRef: HTMLElement | null }> = ({\n elRef\n}) => {\n const { setIsOverflowing } = React.useContext(BadgeContext)\n\n useResizeObserver({\n delay: 0,\n elements: [elRef],\n onResize: () => {\n if (!elRef?.scrollWidth || !elRef?.clientWidth) return\n setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth)\n }\n })\n\n return null\n}\n\nconst StyledBadgeText = styled(Text, {\n py: '$0',\n variants: {\n overflow: {\n ellipsis: {\n whiteSpace: 'nowrap',\n overflowX: 'hidden',\n textOverflow: 'ellipsis'\n },\n wrap: {\n whiteSpace: 'wrap'\n }\n }\n }\n})\n\ntype TBadgeTextProps = React.ComponentProps<typeof StyledBadgeText>\n\nconst toTextSize = {\n xs: 'sm',\n sm: 'md',\n md: 'md'\n}\n\nexport const BadgeText = ({\n children,\n ...rest\n}: TBadgeTextProps): JSX.Element => {\n // We need the return type here. Otherwise typsecript breaks when this type is used in Badge. Do not remove unless you want to tackle that issue again.\n const { size: badgeSize, overflow } = React.useContext(BadgeContext)\n\n const size = React.useMemo(\n () => overrideStitchesVariantValue(badgeSize, (s) => toTextSize[s]),\n [badgeSize]\n )\n\n const [elRef, setElRef] = useCallbackRefState()\n\n return (\n <>\n {overflow === 'ellipsis' && <ObserveBadgeTextOverflow elRef={elRef} />}\n <StyledBadgeText\n noCapsize\n size={size}\n overflow={overflow}\n ref={setElRef}\n {...rest}\n >\n {children}\n </StyledBadgeText>\n </>\n )\n}\n"],"names":["ObserveBadgeTextOverflow","elRef","setIsOverflowing","React","BadgeContext","useResizeObserver","StyledBadgeText","styled","Text","toTextSize","BadgeText","children","rest","badgeSize","overflow","size","overrideStitchesVariantValue","s","setElRef","useCallbackRefState"],"mappings":"wbAiBA,MAAMA,EAAqE,CAAC,CAC1E,MAAAC,CACF,IAAM,CACJ,KAAM,CAAE,iBAAAC,CAAiB,EAAIC,EAAM,WAAWC,CAAY,EAE1D,OAAAC,EAAkB,CAChB,MAAO,EACP,SAAU,CAACJ,CAAK,EAChB,SAAU,IAAM,CACV,EAACA,GAAA,MAAAA,EAAO,cAAe,EAACA,GAAA,MAAAA,EAAO,cACnCC,GAAA,MAAAA,EAAmBD,EAAM,YAAcA,EAAM,YAC/C,CACF,CAAC,EAEM,IACT,EAEMK,EAAkBC,EAAOC,EAAM,CACnC,GAAI,KACJ,SAAU,CACR,SAAU,CACR,SAAU,CACR,WAAY,SACZ,UAAW,SACX,aAAc,UAChB,EACA,KAAM,CACJ,WAAY,MACd,CACF,CACF,CACF,CAAC,EAIKC,EAAa,CACjB,GAAI,KACJ,GAAI,KACJ,GAAI,IACN,EAEaC,EAAY,CAAC,CACxB,SAAAC,KACGC,CACL,IAAoC,CAElC,KAAM,CAAE,KAAMC,EAAW,SAAAC,CAAS,EAAIX,EAAM,WAAWC,CAAY,EAE7DW,EAAOZ,EAAM,QACjB,IAAMa,EAA6BH,EAAYI,GAAMR,EAAWQ,EAAE,EAClE,CAACJ,CAAS,CACZ,EAEM,CAACZ,EAAOiB,CAAQ,EAAIC,IAE1B,OACEhB,EAAA,cAAAA,EAAA,SAAA,KACGW,IAAa,YAAcX,EAAA,cAACH,EAAA,CAAyB,MAAOC,CAAO,CAAA,EACpEE,EAAA,cAACG,EAAA,CACC,UAAS,GACT,KAAMS,EACN,SAAUD,EACV,IAAKI,EACJ,GAAGN,CAEHD,EAAAA,CACH,CACF,CAEJ"}
@@ -0,0 +1 @@
1
+ export declare const colorSchemes: {};
@@ -0,0 +1,2 @@
1
+ import{createTheme as t}from"../../stitches.js";const e={};e["non-semantic"]=t("non-semantic",{colors:{textSubtle:"$accent10",backgroundSubtle:"$accent2",textBold:"$foreground7plus",backgroundBold:"$accent9"}}),e.info=t("info",{colors:{textSubtle:"$blue900",backgroundSubtle:"$blue100",textBold:"#FFF",backgroundBold:"$blue800"}}),e.neutral=t("neutral",{colors:{textSubtle:"$grey900",backgroundSubtle:"$grey100",textBold:"#FFF",backgroundBold:"$grey800"}}),e.success=t("success",{colors:{textSubtle:"$successMid",backgroundSubtle:"$successLight",textBold:"#FFF",backgroundBold:"$success"}}),e.danger=t("danger",{colors:{textSubtle:"$dangerMid",backgroundSubtle:"$dangerLight",textBold:"#FFF",backgroundBold:"$danger"}}),e.warning=t("warning",{colors:{textSubtle:"$warningText",backgroundSubtle:"$warningLight",textBold:"$grey1000",backgroundBold:"$warning"}});export{e as colorSchemes};
2
+ //# sourceMappingURL=stitches.badge.colorscheme.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stitches.badge.colorscheme.config.js","sources":["../../../src/components/badge/stitches.badge.colorscheme.config.ts"],"sourcesContent":["import { createTheme } from '~/stitches'\n\nexport const colorSchemes = {}\n\ncolorSchemes['non-semantic'] = createTheme('non-semantic', {\n colors: {\n textSubtle: '$accent10',\n backgroundSubtle: '$accent2',\n textBold: '$foreground7plus',\n backgroundBold: '$accent9'\n }\n})\n\ncolorSchemes['info'] = createTheme('info', {\n colors: {\n textSubtle: '$blue900',\n backgroundSubtle: '$blue100',\n textBold: '#FFF',\n backgroundBold: '$blue800'\n }\n})\n\ncolorSchemes['neutral'] = createTheme('neutral', {\n colors: {\n textSubtle: '$grey900',\n backgroundSubtle: '$grey100',\n textBold: '#FFF',\n backgroundBold: '$grey800'\n }\n})\n\ncolorSchemes['success'] = createTheme('success', {\n colors: {\n textSubtle: '$successMid',\n backgroundSubtle: '$successLight',\n textBold: '#FFF',\n backgroundBold: '$success'\n }\n})\n\ncolorSchemes['danger'] = createTheme('danger', {\n colors: {\n textSubtle: '$dangerMid',\n backgroundSubtle: '$dangerLight',\n textBold: '#FFF',\n backgroundBold: '$danger'\n }\n})\n\ncolorSchemes['warning'] = createTheme('warning', {\n colors: {\n textSubtle: '$warningText',\n backgroundSubtle: '$warningLight',\n textBold: '$grey1000',\n backgroundBold: '$warning'\n }\n})\n"],"names":["colorSchemes","createTheme"],"mappings":"gDAEa,MAAAA,EAAe,CAE5B,EAAAA,EAAa,gBAAkBC,EAAY,eAAgB,CACzD,OAAQ,CACN,WAAY,YACZ,iBAAkB,WAClB,SAAU,mBACV,eAAgB,UAClB,CACF,CAAC,EAEDD,EAAa,KAAUC,EAAY,OAAQ,CACzC,OAAQ,CACN,WAAY,WACZ,iBAAkB,WAClB,SAAU,OACV,eAAgB,UAClB,CACF,CAAC,EAEDD,EAAa,QAAaC,EAAY,UAAW,CAC/C,OAAQ,CACN,WAAY,WACZ,iBAAkB,WAClB,SAAU,OACV,eAAgB,UAClB,CACF,CAAC,EAEDD,EAAa,QAAaC,EAAY,UAAW,CAC/C,OAAQ,CACN,WAAY,cACZ,iBAAkB,gBAClB,SAAU,OACV,eAAgB,UAClB,CACF,CAAC,EAEDD,EAAa,OAAYC,EAAY,SAAU,CAC7C,OAAQ,CACN,WAAY,aACZ,iBAAkB,eAClB,SAAU,OACV,eAAgB,SAClB,CACF,CAAC,EAEDD,EAAa,QAAaC,EAAY,UAAW,CAC/C,OAAQ,CACN,WAAY,eACZ,iBAAkB,gBAClB,SAAU,YACV,eAAgB,UAClB,CACF,CAAC"}