@cronocode/react-box 3.1.7 → 3.1.8

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.
@@ -120,6 +120,9 @@ export declare const cssStyles: {
120
120
  } | {
121
121
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
122
122
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
123
+ } | {
124
+ values: `${number}%`;
125
+ valueFormat?: undefined;
123
126
  })[];
124
127
  /** The right CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
125
128
  right: ({
@@ -131,6 +134,9 @@ export declare const cssStyles: {
131
134
  } | {
132
135
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
133
136
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
137
+ } | {
138
+ values: `${number}%`;
139
+ valueFormat?: undefined;
134
140
  })[];
135
141
  /** The bottom CSS property participates in setting the vertical position of a positioned element. This inset property has no effect on non-positioned elements. */
136
142
  bottom: ({
@@ -142,6 +148,9 @@ export declare const cssStyles: {
142
148
  } | {
143
149
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
144
150
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
151
+ } | {
152
+ values: `${number}%`;
153
+ valueFormat?: undefined;
145
154
  })[];
146
155
  /** The left CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
147
156
  left: ({
@@ -153,12 +162,18 @@ export declare const cssStyles: {
153
162
  } | {
154
163
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
155
164
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
165
+ } | {
166
+ values: `${number}%`;
167
+ valueFormat?: undefined;
156
168
  })[];
157
169
  /** The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the same multi-value syntax of the margin shorthand. */
158
- inset: {
170
+ inset: ({
159
171
  values: number;
160
172
  valueFormat: typeof BoxStylesFormatters.Value.rem;
161
- }[];
173
+ } | {
174
+ values: `${number}%`;
175
+ valueFormat?: undefined;
176
+ })[];
162
177
  /** The `box-sizing` CSS property sets how the total width and height of an element is calculated. */
163
178
  boxSizing: {
164
179
  values: readonly ["border-box", "content-box"];
@@ -259,22 +274,33 @@ export declare const cssStyles: {
259
274
  values: readonly [100, 200, 300, 400, 500, 600, 700, 800, 900];
260
275
  }[];
261
276
  /** The gap CSS shorthand property sets the gaps (also called gutters) between rows and columns. This property applies to multi-column, flex, and grid containers. */
262
- gap: {
277
+ gap: ({
263
278
  values: number;
264
279
  valueFormat: typeof BoxStylesFormatters.Value.rem;
265
- }[];
280
+ } | {
281
+ values: `${number}%`;
282
+ valueFormat?: undefined;
283
+ })[];
266
284
  /** The row-gap CSS property sets the size of the gap (gutter) between an element's rows. */
267
- rowGap: {
285
+ rowGap: ({
268
286
  styleName: string;
269
287
  values: number;
270
288
  valueFormat: typeof BoxStylesFormatters.Value.rem;
271
- }[];
289
+ } | {
290
+ styleName: string;
291
+ values: `${number}%`;
292
+ valueFormat?: undefined;
293
+ })[];
272
294
  /** The column-gap CSS property sets the size of the gap (gutter) between an element's columns. */
273
- columnGap: {
295
+ columnGap: ({
274
296
  styleName: string;
275
297
  values: number;
276
298
  valueFormat: typeof BoxStylesFormatters.Value.rem;
277
- }[];
299
+ } | {
300
+ styleName: string;
301
+ values: `${number}%`;
302
+ valueFormat?: undefined;
303
+ })[];
278
304
  /** The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending order value and then by their source code order. Items not given an explicit order value are assigned the default value of 0. */
279
305
  order: {
280
306
  styleName: string;
@@ -296,6 +322,9 @@ export declare const cssStyles: {
296
322
  } | {
297
323
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
298
324
  valueFormat?: undefined;
325
+ } | {
326
+ values: `${number}%`;
327
+ valueFormat?: undefined;
299
328
  })[];
300
329
  /** The min-height CSS property sets the minimum height of an element. It prevents the used value of the height property from becoming smaller than the value specified for min-height. */
301
330
  minHeight: ({
@@ -318,6 +347,10 @@ export declare const cssStyles: {
318
347
  styleName: string;
319
348
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
320
349
  valueFormat?: undefined;
350
+ } | {
351
+ styleName: string;
352
+ values: `${number}%`;
353
+ valueFormat?: undefined;
321
354
  })[];
322
355
  /** The max-height CSS property sets the maximum height of an element. It prevents the used value of the height property from becoming larger than the value specified for max-height. */
323
356
  maxHeight: ({
@@ -340,6 +373,10 @@ export declare const cssStyles: {
340
373
  styleName: string;
341
374
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
342
375
  valueFormat?: undefined;
376
+ } | {
377
+ styleName: string;
378
+ values: `${number}%`;
379
+ valueFormat?: undefined;
343
380
  })[];
344
381
  /** The width CSS property sets an element's width. By default, it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area. */
345
382
  width: ({
@@ -357,6 +394,9 @@ export declare const cssStyles: {
357
394
  } | {
358
395
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
359
396
  valueFormat?: undefined;
397
+ } | {
398
+ values: `${number}%`;
399
+ valueFormat?: undefined;
360
400
  })[];
361
401
  /** The min-width CSS property sets the minimum width of an element. It prevents the used value of the width property from becoming smaller than the value specified for min-width. */
362
402
  minWidth: ({
@@ -379,6 +419,10 @@ export declare const cssStyles: {
379
419
  styleName: string;
380
420
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
381
421
  valueFormat?: undefined;
422
+ } | {
423
+ styleName: string;
424
+ values: `${number}%`;
425
+ valueFormat?: undefined;
382
426
  })[];
383
427
  /** The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by max-width. */
384
428
  maxWidth: ({
@@ -401,6 +445,10 @@ export declare const cssStyles: {
401
445
  styleName: string;
402
446
  values: readonly ["auto", "fit-content", "max-content", "min-content"];
403
447
  valueFormat?: undefined;
448
+ } | {
449
+ styleName: string;
450
+ values: `${number}%`;
451
+ valueFormat?: undefined;
404
452
  })[];
405
453
  /** The letter-spacing CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together. */
406
454
  letterSpacing: {
@@ -433,9 +481,13 @@ export declare const cssStyles: {
433
481
  styleName: string;
434
482
  valueFormat?: undefined;
435
483
  } | {
484
+ styleName: string;
436
485
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
437
486
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
438
- styleName?: undefined;
487
+ } | {
488
+ values: `${number}%`;
489
+ styleName: string;
490
+ valueFormat?: undefined;
439
491
  })[];
440
492
  /** The margin-inline CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. */
441
493
  mx: ({
@@ -447,9 +499,13 @@ export declare const cssStyles: {
447
499
  styleName: string;
448
500
  valueFormat?: undefined;
449
501
  } | {
502
+ styleName: string;
450
503
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
451
504
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
452
- styleName?: undefined;
505
+ } | {
506
+ values: `${number}%`;
507
+ styleName: string;
508
+ valueFormat?: undefined;
453
509
  })[];
454
510
  /** The margin-block CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. */
455
511
  my: ({
@@ -461,9 +517,13 @@ export declare const cssStyles: {
461
517
  styleName: string;
462
518
  valueFormat?: undefined;
463
519
  } | {
520
+ styleName: string;
464
521
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
465
522
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
466
- styleName?: undefined;
523
+ } | {
524
+ values: `${number}%`;
525
+ styleName: string;
526
+ valueFormat?: undefined;
467
527
  })[];
468
528
  /** The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
469
529
  mt: ({
@@ -477,7 +537,11 @@ export declare const cssStyles: {
477
537
  } | {
478
538
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
479
539
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
480
- styleName?: undefined;
540
+ styleName: string;
541
+ } | {
542
+ values: `${number}%`;
543
+ styleName: string;
544
+ valueFormat?: undefined;
481
545
  })[];
482
546
  /** The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
483
547
  mr: ({
@@ -491,7 +555,11 @@ export declare const cssStyles: {
491
555
  } | {
492
556
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
493
557
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
494
- styleName?: undefined;
558
+ styleName: string;
559
+ } | {
560
+ values: `${number}%`;
561
+ styleName: string;
562
+ valueFormat?: undefined;
495
563
  })[];
496
564
  /** The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
497
565
  mb: ({
@@ -505,7 +573,11 @@ export declare const cssStyles: {
505
573
  } | {
506
574
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
507
575
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
508
- styleName?: undefined;
576
+ styleName: string;
577
+ } | {
578
+ values: `${number}%`;
579
+ styleName: string;
580
+ valueFormat?: undefined;
509
581
  })[];
510
582
  /** The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. */
511
583
  ml: ({
@@ -519,7 +591,11 @@ export declare const cssStyles: {
519
591
  } | {
520
592
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
521
593
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
522
- styleName?: undefined;
594
+ styleName: string;
595
+ } | {
596
+ values: `${number}%`;
597
+ styleName: string;
598
+ valueFormat?: undefined;
523
599
  })[];
524
600
  /** The padding CSS shorthand property sets the padding area on all four sides of an element at once. */
525
601
  p: ({
@@ -529,7 +605,11 @@ export declare const cssStyles: {
529
605
  } | {
530
606
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
531
607
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
532
- styleName?: undefined;
608
+ styleName: string;
609
+ } | {
610
+ values: `${number}%`;
611
+ styleName: string;
612
+ valueFormat?: undefined;
533
613
  })[];
534
614
  /** The padding-inline CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
535
615
  px: ({
@@ -539,7 +619,11 @@ export declare const cssStyles: {
539
619
  } | {
540
620
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
541
621
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
542
- styleName?: undefined;
622
+ styleName: string;
623
+ } | {
624
+ values: `${number}%`;
625
+ styleName: string;
626
+ valueFormat?: undefined;
543
627
  })[];
544
628
  /** The padding-block CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
545
629
  py: ({
@@ -549,7 +633,11 @@ export declare const cssStyles: {
549
633
  } | {
550
634
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
551
635
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
552
- styleName?: undefined;
636
+ styleName: string;
637
+ } | {
638
+ values: `${number}%`;
639
+ styleName: string;
640
+ valueFormat?: undefined;
553
641
  })[];
554
642
  /** The padding-top CSS property sets the height of the padding area on the top of an element. */
555
643
  pt: ({
@@ -559,7 +647,11 @@ export declare const cssStyles: {
559
647
  } | {
560
648
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
561
649
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
562
- styleName?: undefined;
650
+ styleName: string;
651
+ } | {
652
+ values: `${number}%`;
653
+ styleName: string;
654
+ valueFormat?: undefined;
563
655
  })[];
564
656
  /** The padding-right CSS property sets the width of the padding area on the right of an element. */
565
657
  pr: ({
@@ -569,7 +661,11 @@ export declare const cssStyles: {
569
661
  } | {
570
662
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
571
663
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
572
- styleName?: undefined;
664
+ styleName: string;
665
+ } | {
666
+ values: `${number}%`;
667
+ styleName: string;
668
+ valueFormat?: undefined;
573
669
  })[];
574
670
  /** The padding-bottom CSS property sets the height of the padding area on the bottom of an element. */
575
671
  pb: ({
@@ -579,7 +675,11 @@ export declare const cssStyles: {
579
675
  } | {
580
676
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
581
677
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
582
- styleName?: undefined;
678
+ styleName: string;
679
+ } | {
680
+ values: `${number}%`;
681
+ styleName: string;
682
+ valueFormat?: undefined;
583
683
  })[];
584
684
  /** The padding-left CSS property sets the width of the padding area to the left of an element. */
585
685
  pl: ({
@@ -589,7 +689,11 @@ export declare const cssStyles: {
589
689
  } | {
590
690
  values: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
591
691
  valueFormat: typeof BoxStylesFormatters.Value.fraction;
592
- styleName?: undefined;
692
+ styleName: string;
693
+ } | {
694
+ values: `${number}%`;
695
+ styleName: string;
696
+ valueFormat?: undefined;
593
697
  })[];
594
698
  /** The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container. */
595
699
  objectFit: {
@@ -829,6 +933,10 @@ export declare const cssStyles: {
829
933
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
830
934
  valueFormat: (value: string) => string;
831
935
  styleName: string;
936
+ } | {
937
+ values: `${number}%`;
938
+ valueFormat: (value: string) => string;
939
+ styleName: string;
832
940
  })[];
833
941
  /** The translateY() CSS function repositions an element vertically on the 2D plane. */
834
942
  translateY: ({
@@ -843,6 +951,10 @@ export declare const cssStyles: {
843
951
  values: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
844
952
  valueFormat: (value: string) => string;
845
953
  styleName: string;
954
+ } | {
955
+ values: `${number}%`;
956
+ valueFormat: (value: string) => string;
957
+ styleName: string;
846
958
  })[];
847
959
  /** The content CSS property replaces content with a generated value. It can be used to define what is rendered inside an element or pseudo-element. */
848
960
  content: {
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  interface ThemeProps {
3
3
  children: React.ReactNode;
4
- theme: string;
4
+ theme?: string;
5
5
  use?: 'global' | 'local';
6
6
  }
7
7
  declare function Theme(props: ThemeProps): import("react/jsx-runtime").JSX.Element;
@@ -274,6 +274,8 @@ declare namespace Variables {
274
274
  const shadowValues: Variables.ShadowType[];
275
275
  const percentages: readonly ["1/1", "1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
276
276
  const negativePercentages: readonly ["-1/1", "-1/2", "-1/3", "-2/3", "-1/4", "-2/4", "-3/4", "-1/5", "-2/5", "-3/5", "-4/5", "-1/6", "-2/6", "-3/6", "-4/6", "-5/6", "-1/12", "-2/12", "-3/12", "-4/12", "-5/12", "-6/12", "-7/12", "-8/12", "-9/12", "-10/12", "-11/12"];
277
+ type PercentString = `${number}%`;
278
+ const percentString: PercentString;
277
279
  function getVariableValue(name: string): string;
278
280
  function generateVariables(): string;
279
281
  function getPendingVariables(): {