@veracity/vui 0.0.15 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/alert/alert.js +10 -10
  2. package/alert/alert.types.d.ts +3 -3
  3. package/alert/alertText.d.ts +2 -2
  4. package/alert/alertText.js +2 -2
  5. package/alert/alertTitle.d.ts +2 -2
  6. package/alert/alertTitle.js +2 -2
  7. package/alert/theme.d.ts +2 -0
  8. package/alert/theme.js +5 -3
  9. package/avatar/avatar.js +2 -2
  10. package/box/box.js +1 -1
  11. package/button/button.d.ts +7 -1
  12. package/button/button.js +56 -23
  13. package/button/button.types.d.ts +8 -6
  14. package/button/buttonIcon.d.ts +3 -0
  15. package/button/buttonIcon.js +30 -0
  16. package/button/buttonText.d.ts +3 -0
  17. package/button/buttonText.js +30 -0
  18. package/button/buttons.d.ts +4 -3
  19. package/button/buttons.js +4 -3
  20. package/button/consts.js +3 -2
  21. package/button/context.d.ts +2 -2
  22. package/button/context.js +4 -4
  23. package/button/index.d.ts +2 -2
  24. package/button/index.js +2 -2
  25. package/button/theme.d.ts +79 -41
  26. package/button/theme.js +85 -46
  27. package/{button → buttonGroup}/buttonGroup.d.ts +3 -1
  28. package/{button → buttonGroup}/buttonGroup.js +4 -2
  29. package/buttonGroup/context.d.ts +4 -0
  30. package/buttonGroup/context.js +23 -0
  31. package/buttonGroup/helpers.d.ts +3 -0
  32. package/buttonGroup/helpers.js +10 -0
  33. package/buttonGroup/index.d.ts +4 -0
  34. package/buttonGroup/index.js +21 -0
  35. package/card/card.d.ts +3 -0
  36. package/{tile/tile.js → card/card.js} +8 -7
  37. package/{tile/tile.types.d.ts → card/card.types.d.ts} +1 -1
  38. package/card/index.d.ts +3 -0
  39. package/{tile → card}/index.js +4 -4
  40. package/card/theme.d.ts +6 -0
  41. package/card/theme.js +10 -0
  42. package/checkbox/checkbox.js +2 -2
  43. package/checkbox/checkbox.types.d.ts +1 -1
  44. package/checkbox/checkboxGroup.types.d.ts +1 -1
  45. package/core/globalStyle.d.ts +4 -1
  46. package/core/globalStyle.js +7 -3
  47. package/core/index.d.ts +2 -0
  48. package/core/index.js +5 -1
  49. package/core/styled.d.ts +4 -0
  50. package/core/styled.js +80 -0
  51. package/core/types/component.d.ts +12 -12
  52. package/core/types/index.d.ts +1 -0
  53. package/core/types/index.js +1 -0
  54. package/core/types/styled.d.ts +11 -0
  55. package/core/utils.d.ts +2 -2
  56. package/core/utils.js +6 -6
  57. package/core/v.d.ts +182 -0
  58. package/core/v.js +6 -0
  59. package/core/vuiProvider.d.ts +13 -2
  60. package/core/vuiProvider.js +1 -1
  61. package/divider/divider.types.d.ts +0 -1
  62. package/heading/heading.types.d.ts +2 -1
  63. package/icon/helpers.d.ts +2 -3
  64. package/icon/helpers.js +6 -8
  65. package/icon/icon.js +3 -2
  66. package/icon/icon.types.d.ts +4 -2
  67. package/icons/library.js +1 -1
  68. package/icons/types.d.ts +1 -1
  69. package/image/image.d.ts +3 -0
  70. package/image/image.js +38 -0
  71. package/image/image.types.d.ts +4 -0
  72. package/image/index.d.ts +3 -0
  73. package/{label → image}/index.js +4 -4
  74. package/image/theme.d.ts +6 -0
  75. package/image/theme.js +10 -0
  76. package/index.d.ts +5 -2
  77. package/index.js +5 -2
  78. package/input/context.d.ts +4 -0
  79. package/input/context.js +23 -0
  80. package/input/index.d.ts +2 -0
  81. package/input/index.js +2 -0
  82. package/input/input.d.ts +7 -2
  83. package/input/input.js +32 -22
  84. package/input/input.types.d.ts +7 -3
  85. package/input/inputIcon.d.ts +3 -0
  86. package/input/inputIcon.js +30 -0
  87. package/input/inputInput.d.ts +5 -0
  88. package/input/inputInput.js +36 -0
  89. package/input/theme.d.ts +40 -15
  90. package/input/theme.js +40 -16
  91. package/list/index.d.ts +3 -1
  92. package/list/index.js +3 -1
  93. package/list/list.d.ts +2 -0
  94. package/list/list.js +3 -1
  95. package/list/list.types.d.ts +19 -1
  96. package/list/listHeading.d.ts +2 -2
  97. package/list/listHeading.js +2 -2
  98. package/list/listIcon.js +1 -1
  99. package/list/listItem.d.ts +1 -1
  100. package/list/listItem.js +8 -5
  101. package/list/listText.d.ts +3 -0
  102. package/list/listText.js +30 -0
  103. package/list/theme.d.ts +20 -6
  104. package/list/theme.js +26 -12
  105. package/package.json +1 -1
  106. package/panel/index.d.ts +3 -0
  107. package/panel/index.js +20 -0
  108. package/panel/panel.d.ts +3 -0
  109. package/panel/panel.js +39 -0
  110. package/panel/panel.types.d.ts +4 -0
  111. package/{tile → panel}/theme.d.ts +1 -8
  112. package/{tile → panel}/theme.js +4 -11
  113. package/radio/radio.js +2 -2
  114. package/radio/radio.types.d.ts +1 -1
  115. package/radio/radioGroup.types.d.ts +1 -1
  116. package/switch/index.d.ts +0 -1
  117. package/switch/index.js +0 -1
  118. package/switch/switch.js +6 -6
  119. package/switch/switch.types.d.ts +19 -4
  120. package/switch/switchButton.d.ts +2 -2
  121. package/switch/switchButton.js +15 -16
  122. package/switch/theme.d.ts +41 -46
  123. package/switch/theme.js +50 -72
  124. package/system/borders.d.ts +3 -1
  125. package/system/custom.d.ts +24 -7
  126. package/system/custom.js +33 -13
  127. package/system/system.d.ts +2 -2
  128. package/system/system.js +1 -1
  129. package/t/t.types.d.ts +2 -1
  130. package/tag/context.d.ts +4 -0
  131. package/tag/context.js +23 -0
  132. package/tag/index.d.ts +6 -0
  133. package/tag/index.js +23 -0
  134. package/tag/tag.d.ts +11 -0
  135. package/tag/tag.js +99 -0
  136. package/{label/label.types.d.ts → tag/tag.types.d.ts} +6 -7
  137. package/tag/tag.types.js +2 -0
  138. package/tag/tagIcon.d.ts +3 -0
  139. package/tag/tagIcon.js +30 -0
  140. package/tag/tagText.d.ts +3 -0
  141. package/tag/tagText.js +30 -0
  142. package/tag/theme.d.ts +65 -0
  143. package/tag/theme.js +78 -0
  144. package/theme/components.d.ts +265 -181
  145. package/theme/components.js +36 -32
  146. package/theme/defaultTheme.d.ts +265 -181
  147. package/utils/assertion.d.ts +14 -0
  148. package/utils/assertion.js +34 -0
  149. package/utils/index.d.ts +1 -0
  150. package/utils/index.js +1 -0
  151. package/utils/object.d.ts +4 -6
  152. package/utils/object.js +18 -26
  153. package/utils/types.d.ts +2 -0
  154. package/label/index.d.ts +0 -3
  155. package/label/label.d.ts +0 -5
  156. package/label/label.js +0 -71
  157. package/label/theme.d.ts +0 -61
  158. package/label/theme.js +0 -107
  159. package/list/listItem.types.d.ts +0 -16
  160. package/switch/switchButton.types.d.ts +0 -19
  161. package/tile/index.d.ts +0 -3
  162. package/tile/tile.d.ts +0 -3
  163. /package/{button → buttonGroup}/buttonGroup.types.d.ts +0 -0
  164. /package/{button → buttonGroup}/buttonGroup.types.js +0 -0
  165. /package/{label/label.types.js → card/card.types.js} +0 -0
  166. /package/{list/listItem.types.js → core/types/styled.js} +0 -0
  167. /package/{switch/switchButton.types.js → image/image.types.js} +0 -0
  168. /package/{tile/tile.types.js → panel/panel.types.js} +0 -0
@@ -176,7 +176,9 @@ declare const defaultTheme: {
176
176
  };
177
177
  button: {
178
178
  bg: string;
179
+ borderColor: string;
179
180
  hoverBg: string;
181
+ hoverBorderColor: string;
180
182
  };
181
183
  icon: {};
182
184
  message: {};
@@ -265,66 +267,109 @@ declare const defaultTheme: {
265
267
  size: string;
266
268
  variant: string;
267
269
  };
270
+ parts: string[];
268
271
  sizes: {
269
272
  xs: {
270
- fontSize: string;
271
- h: number;
272
- iconSize: string;
273
- minW: number;
274
- spaceX: number;
273
+ container: {
274
+ fontSize: string;
275
+ h: number;
276
+ minW: number;
277
+ spaceX: number;
278
+ };
279
+ icon: {
280
+ size: string;
281
+ };
282
+ text: {};
275
283
  };
276
284
  sm: {
277
- fontSize: string;
278
- h: number;
279
- iconSize: string;
280
- minW: number;
281
- spaceX: number;
285
+ container: {
286
+ fontSize: string;
287
+ h: number;
288
+ minW: number;
289
+ spaceX: number;
290
+ };
291
+ icon: {
292
+ size: string;
293
+ };
294
+ text: {};
282
295
  };
283
296
  md: {
284
- fontSize: string;
285
- h: number;
286
- iconSize: string;
287
- minW: number;
288
- spaceX: number;
297
+ container: {
298
+ fontSize: string;
299
+ h: number;
300
+ minW: number;
301
+ spaceX: number;
302
+ };
303
+ icon: {
304
+ size: string;
305
+ };
306
+ text: {};
289
307
  };
290
308
  lg: {
291
- fontSize: string;
292
- h: number;
293
- iconSize: string;
294
- minW: number;
295
- spaceX: number;
309
+ container: {
310
+ fontSize: string;
311
+ h: number;
312
+ minW: number;
313
+ spaceX: number;
314
+ };
315
+ icon: {
316
+ size: string;
317
+ };
318
+ text: {};
296
319
  };
297
320
  };
298
321
  variants: {
299
322
  outlined: (props: import("..").Dict<any>) => {
300
- hoverBg: string;
301
- activeBg: string;
302
- bg: string;
303
- color: string;
304
- borderColor: string;
305
- borderWidth: number;
323
+ container: {
324
+ borderColor: string;
325
+ hoverBorderColor: string;
326
+ hoverBg: string;
327
+ activeBg: string;
328
+ bg: string;
329
+ borderWidth: number;
330
+ color: string;
331
+ };
306
332
  };
307
333
  solid: (props: import("..").Dict<any>) => {
308
- borderColor: string;
309
- hoverBg: string;
310
- activeBg: string;
311
- bg: string;
312
- color: string;
334
+ container: {
335
+ hoverBg: string;
336
+ hoverBorderColor: string;
337
+ activeBg: string;
338
+ bg: string;
339
+ borderColor: string;
340
+ borderWidth: number;
341
+ color: string;
342
+ };
313
343
  };
314
344
  subtle: (props: import("..").Dict<any>) => {
315
- hoverBg: string;
316
- activeBg: string;
317
- bg: string;
318
- color: string;
345
+ container: {
346
+ hoverBg: string;
347
+ hoverBorderColor: string;
348
+ activeBg: string;
349
+ bg: string;
350
+ borderColor: string;
351
+ borderWidth: number;
352
+ color: string;
353
+ };
319
354
  };
320
355
  text: (props: import("..").Dict<any>) => {
321
- hoverBg: string;
322
- activeBg: string;
323
- bg: string;
324
- color: string;
356
+ container: {
357
+ hoverBg: string;
358
+ hoverBorderColor: string;
359
+ activeBg: string;
360
+ bg: string;
361
+ borderColor: string;
362
+ borderWidth: number;
363
+ color: string;
364
+ };
325
365
  };
326
366
  };
327
367
  };
368
+ Card: {
369
+ defaultProps: {};
370
+ sizes: {};
371
+ variants: {};
372
+ };
328
373
  Checkbox: {
329
374
  defaultProps: {
330
375
  colorScheme: string;
@@ -437,94 +482,69 @@ declare const defaultTheme: {
437
482
  };
438
483
  variants: {};
439
484
  };
485
+ Image: {
486
+ defaultProps: {};
487
+ sizes: {};
488
+ variants: {};
489
+ };
440
490
  Input: {
441
491
  defaultProps: {
442
492
  colorScheme: string;
443
493
  size: string;
444
494
  variant: string;
445
495
  };
496
+ parts: string[];
446
497
  sizes: {
447
498
  xs: {
448
- fontSize: string;
449
- h: number;
450
- iconSize: string;
499
+ container: {
500
+ fontSize: string;
501
+ h: number;
502
+ };
503
+ icon: {
504
+ size: string;
505
+ };
506
+ input: {};
451
507
  };
452
508
  sm: {
453
- fontSize: string;
454
- h: number;
455
- iconSize: string;
509
+ container: {
510
+ fontSize: string;
511
+ h: number;
512
+ };
513
+ icon: {
514
+ size: string;
515
+ };
516
+ input: {};
456
517
  };
457
518
  md: {
458
- fontSize: string;
459
- h: number;
460
- iconSize: string;
519
+ container: {
520
+ fontSize: string;
521
+ h: number;
522
+ };
523
+ icon: {
524
+ size: string;
525
+ };
526
+ input: {};
461
527
  };
462
528
  lg: {
463
- fontSize: string;
464
- h: number;
465
- iconSize: string;
529
+ container: {
530
+ fontSize: string;
531
+ h: number;
532
+ };
533
+ icon: {
534
+ size: string;
535
+ };
536
+ input: {};
466
537
  };
467
538
  };
468
539
  variants: {
469
540
  default: (props: import("..").Dict<any>) => {
470
- borderColor: string;
471
- focusWithinRing: number;
472
- focusWithinRingColor: string;
473
- };
474
- };
475
- };
476
- Label: {
477
- defaultProps: {
478
- colorScheme: string;
479
- size: string;
480
- variant: string;
481
- };
482
- sizes: {
483
- sm: {
484
- fontSize: string;
485
- h: number;
486
- iconSize: string;
487
- spaceX: number;
488
- };
489
- md: {
490
- fontSize: string;
491
- h: number;
492
- iconSize: string;
493
- spaceX: number;
494
- };
495
- lg: {
496
- fontSize: string;
497
- h: number;
498
- iconSize: string;
499
- spaceX: number;
500
- };
501
- };
502
- variants: {
503
- outlined: (props: import("..").Dict<any>) => {
504
- hoverBg: string;
505
- activeBg: string;
506
- bg: string;
507
- color: string;
508
- borderColor: string;
509
- borderWidth: number;
510
- };
511
- solid: (props: import("..").Dict<any>) => {
512
- hoverBg: string;
513
- activeBg: string;
514
- bg: string;
515
- color: string;
516
- };
517
- subtle: (props: import("..").Dict<any>) => {
518
- hoverBg: string;
519
- activeBg: string;
520
- bg: string;
521
- color: string;
522
- };
523
- text: (props: import("..").Dict<any>) => {
524
- hoverBg: string;
525
- activeBg: string;
526
- bg: string;
527
- color: string;
541
+ container: {
542
+ borderColor: string;
543
+ focusWithinRing: number;
544
+ focusWithinRingColor: string;
545
+ };
546
+ icon: {};
547
+ input: {};
528
548
  };
529
549
  };
530
550
  };
@@ -568,6 +588,8 @@ declare const defaultTheme: {
568
588
  parts: string[];
569
589
  sizes: {
570
590
  sm: {
591
+ container: {};
592
+ heading: {};
571
593
  icon: {
572
594
  size: string;
573
595
  };
@@ -575,8 +597,11 @@ declare const defaultTheme: {
575
597
  fontSize: string;
576
598
  h: number;
577
599
  };
600
+ text: {};
578
601
  };
579
602
  md: {
603
+ container: {};
604
+ heading: {};
580
605
  icon: {
581
606
  size: string;
582
607
  };
@@ -584,31 +609,40 @@ declare const defaultTheme: {
584
609
  fontSize: string;
585
610
  h: number;
586
611
  };
612
+ text: {};
587
613
  };
588
614
  lg: {
589
- icon: {
590
- size: string;
591
- };
615
+ container: {};
616
+ heading: {};
592
617
  item: {
593
618
  fontSize: string;
594
619
  h: number;
595
620
  };
596
- };
597
- xl: {
598
621
  icon: {
599
- scale: number;
622
+ size: string;
600
623
  };
624
+ text: {};
625
+ };
626
+ xl: {
627
+ container: {};
628
+ heading: {};
601
629
  item: {
602
630
  fontSize: string;
603
631
  h: number;
604
632
  };
633
+ icon: {
634
+ scale: number;
635
+ };
636
+ text: {};
605
637
  };
606
638
  };
607
639
  variants: {
608
640
  default: (props: import("..").Dict<any>) => {
609
641
  container: {};
642
+ heading: {};
610
643
  icon: {};
611
644
  item: import("..").Dict<any>;
645
+ text: {};
612
646
  };
613
647
  ordered: {
614
648
  container: {
@@ -664,6 +698,21 @@ declare const defaultTheme: {
664
698
  };
665
699
  variants: {};
666
700
  };
701
+ Panel: {
702
+ defaultProps: {
703
+ variant: string;
704
+ };
705
+ sizes: {};
706
+ variants: {
707
+ elevated: {
708
+ shadow: string;
709
+ };
710
+ outlined: {
711
+ border: number;
712
+ borderColor: string;
713
+ };
714
+ };
715
+ };
667
716
  Radio: {
668
717
  defaultProps: {
669
718
  colorScheme: string;
@@ -813,75 +862,71 @@ declare const defaultTheme: {
813
862
  };
814
863
  parts: string[];
815
864
  sizes: {
816
- sm: (props: import("..").Dict<any>) => {
865
+ sm: () => {
866
+ container: {};
817
867
  button: {
818
868
  fontSize: string;
869
+ minW: number;
870
+ thumb: {
871
+ h: number;
872
+ w: number;
873
+ };
874
+ track: {
875
+ h: number;
876
+ };
819
877
  };
820
878
  label: {
821
879
  size: string;
822
880
  };
823
- thumb: {
824
- h: number;
825
- w: number;
826
- };
827
- track: {
828
- h: number;
829
- minW: number;
830
- };
831
881
  };
832
- md: (props: import("..").Dict<any>) => {
882
+ md: () => {
883
+ container: {};
833
884
  button: {
834
885
  fontSize: string;
886
+ minW: number;
887
+ thumb: {
888
+ h: number;
889
+ w: number;
890
+ };
891
+ track: {
892
+ h: number;
893
+ };
835
894
  };
836
895
  label: {
837
896
  size: string;
838
897
  };
839
- thumb: {
840
- h: number;
841
- w: number;
842
- };
843
- track: {
844
- h: number;
845
- minW: number;
846
- };
847
898
  };
848
- lg: (props: import("..").Dict<any>) => {
899
+ lg: () => {
900
+ container: {};
849
901
  button: {
850
902
  fontSize: string;
903
+ minW: number;
904
+ thumb: {
905
+ h: number;
906
+ w: number;
907
+ };
908
+ track: {
909
+ h: number;
910
+ };
851
911
  };
852
912
  label: {
853
913
  size: string;
854
914
  };
855
- thumb: {
856
- h: number;
857
- w: number;
858
- };
859
- track: {
860
- h: number;
861
- minW: number;
862
- };
863
915
  };
864
916
  };
865
917
  variants: {
866
918
  contained: (props: import("..").Dict<any>) => {
867
- thumb: {
868
- bg: string;
869
- };
870
- track: {
871
- bg: string;
872
- ring: number;
873
- };
874
- };
875
- thin: (props: import("..").Dict<any>) => {
876
- thumb: {
877
- bg: string;
878
- borderColor: string;
879
- borderWidth: number;
880
- ring: number;
881
- };
882
- track: {
883
- bg: string;
919
+ container: {};
920
+ button: {
921
+ thumb: {
922
+ bg: string;
923
+ };
924
+ track: {
925
+ bg: string;
926
+ ring: number;
927
+ };
884
928
  };
929
+ label: {};
885
930
  };
886
931
  };
887
932
  };
@@ -905,43 +950,82 @@ declare const defaultTheme: {
905
950
  };
906
951
  variants: {};
907
952
  };
908
- Textarea: {
953
+ Tag: {
909
954
  defaultProps: {
910
955
  colorScheme: string;
956
+ size: string;
911
957
  variant: string;
912
958
  };
913
959
  parts: string[];
914
- sizes: {};
960
+ sizes: {
961
+ sm: {
962
+ container: {
963
+ fontSize: string;
964
+ h: number;
965
+ spaceX: number;
966
+ };
967
+ icon: {
968
+ size: string;
969
+ };
970
+ text: {};
971
+ };
972
+ md: {
973
+ container: {
974
+ fontSize: string;
975
+ h: number;
976
+ spaceX: number;
977
+ };
978
+ icon: {
979
+ size: string;
980
+ };
981
+ text: {};
982
+ };
983
+ lg: {
984
+ container: {
985
+ fontSize: string;
986
+ h: number;
987
+ spaceX: number;
988
+ };
989
+ icon: {
990
+ size: string;
991
+ };
992
+ text: {};
993
+ };
994
+ };
915
995
  variants: {
916
- default: (props: import("..").Dict<any>) => {
917
- container: {};
918
- textarea: {
919
- borderColor: string;
920
- focusRing: number;
921
- focusRingColor: string;
996
+ solid: (props: import("..").Dict<any>) => {
997
+ container: {
998
+ hoverBg: string;
999
+ activeBg: string;
1000
+ bg: string;
1001
+ color: string;
1002
+ };
1003
+ };
1004
+ subtle: (props: import("..").Dict<any>) => {
1005
+ container: {
1006
+ hoverBg: string;
1007
+ activeBg: string;
1008
+ bg: string;
1009
+ color: string;
922
1010
  };
923
1011
  };
924
1012
  };
925
1013
  };
926
- Tile: {
1014
+ Textarea: {
927
1015
  defaultProps: {
1016
+ colorScheme: string;
928
1017
  variant: string;
929
1018
  };
1019
+ parts: string[];
930
1020
  sizes: {};
931
1021
  variants: {
932
- default: {
933
- bg: string;
934
- borderRadius: string;
935
- shadow: string;
936
- hoverShadow: string;
937
- p: number;
938
- };
939
- outlined: {
940
- bg: string;
941
- border: number;
942
- borderColor: string;
943
- borderRadius: string;
944
- p: number;
1022
+ default: (props: import("..").Dict<any>) => {
1023
+ container: {};
1024
+ textarea: {
1025
+ borderColor: string;
1026
+ focusRing: number;
1027
+ focusRingColor: string;
1028
+ };
945
1029
  };
946
1030
  };
947
1031
  };
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { Dict } from './types';
3
+ /** Is value an array. */
4
+ export declare function isArray<T>(value: any): value is Array<T>;
5
+ /** Is value a function. */
6
+ export declare function isFunction<T>(value: any): value is T;
7
+ /** Is value a number. */
8
+ export declare function isNumber(value: any): value is number;
9
+ /** Is value an object. */
10
+ export declare function isObject(value: any): value is Dict;
11
+ /** Is value a valid ReactText - string or number */
12
+ export declare function isReactText(value: any): value is React.ReactText;
13
+ /** Is value a string */
14
+ export declare function isString(value: any): value is string;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isString = exports.isReactText = exports.isObject = exports.isNumber = exports.isFunction = exports.isArray = void 0;
4
+ /** Is value an array. */
5
+ function isArray(value) {
6
+ return Array.isArray(value);
7
+ }
8
+ exports.isArray = isArray;
9
+ /** Is value a function. */
10
+ function isFunction(value) {
11
+ return typeof value === 'function';
12
+ }
13
+ exports.isFunction = isFunction;
14
+ /** Is value a number. */
15
+ function isNumber(value) {
16
+ return typeof value === 'number';
17
+ }
18
+ exports.isNumber = isNumber;
19
+ /** Is value an object. */
20
+ function isObject(value) {
21
+ var type = typeof value;
22
+ return value !== null && (type === 'object' || type === 'function') && !isArray(value);
23
+ }
24
+ exports.isObject = isObject;
25
+ /** Is value a valid ReactText - string or number */
26
+ function isReactText(value) {
27
+ return isNumber(value) || isString(value);
28
+ }
29
+ exports.isReactText = isReactText;
30
+ /** Is value a string */
31
+ function isString(value) {
32
+ return Object.prototype.toString.call(value) === '[object String]';
33
+ }
34
+ exports.isString = isString;
package/utils/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './assertion';
1
2
  export * from './function';
2
3
  export * from './object';
3
4
  export * from './styles';
package/utils/index.js CHANGED
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./assertion"), exports);
13
14
  __exportStar(require("./function"), exports);
14
15
  __exportStar(require("./object"), exports);
15
16
  __exportStar(require("./styles"), exports);