@spaced-out/ui-design-system 0.1.56 → 0.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/design-tokens/font/base-font.json +6 -0
- package/design-tokens/size/base-size.json +3 -0
- package/lib/components/Banner/Banner.js +6 -5
- package/lib/components/Banner/Banner.js.flow +2 -1
- package/lib/components/Icon/SemanticIcon.js +30 -0
- package/lib/components/Icon/SemanticIcon.js.flow +42 -0
- package/lib/components/Icon/SemanticIcon.module.css +47 -0
- package/lib/components/Icon/index.js +8 -1
- package/lib/components/Icon/index.js.flow +2 -0
- package/lib/components/InContextAlert/InContextAlert.js +13 -20
- package/lib/components/InContextAlert/InContextAlert.js.flow +2 -9
- package/lib/components/KPIBox/KPIBox.js +46 -0
- package/lib/components/KPIBox/KPIBox.js.flow +97 -0
- package/lib/components/KPIBox/KPIBox.module.css +47 -0
- package/lib/components/KPIBox/index.js +16 -0
- package/lib/components/KPIBox/index.js.flow +3 -0
- package/lib/components/Text/Text.js +191 -30
- package/lib/components/Text/Text.js.flow +272 -0
- package/lib/components/Text/index.js +42 -0
- package/lib/components/Text/index.js.flow +7 -0
- package/lib/components/Toggle/Toggle.js +5 -2
- package/lib/components/Toggle/Toggle.js.flow +8 -1
- package/lib/components/index.js +11 -0
- package/lib/components/index.js.flow +1 -0
- package/lib/styles/index.css +6 -0
- package/lib/styles/index.js +8 -2
- package/lib/styles/index.js.flow +6 -0
- package/lib/styles/typography.module.css +19 -1
- package/lib/styles/variables/_font.css +4 -0
- package/lib/styles/variables/_font.js +5 -1
- package/lib/styles/variables/_font.js.flow +4 -0
- package/lib/styles/variables/_size.css +2 -0
- package/lib/styles/variables/_size.js +3 -1
- package/lib/styles/variables/_size.js.flow +2 -0
- package/lib/types/common.js +15 -0
- package/lib/types/common.js.flow +10 -0
- package/lib/utils/array/are-arrays-equal.js +11 -0
- package/lib/utils/array/are-arrays-equal.js.flow +14 -0
- package/lib/utils/array/index.js +16 -0
- package/lib/utils/array/index.js.flow +3 -0
- package/lib/utils/index.js +11 -0
- package/lib/utils/index.js.flow +1 -0
- package/package.json +1 -1
|
@@ -123,6 +123,41 @@ export const JumboMedium: React$AbstractComponent<TextProps, HTMLSpanElement> =
|
|
|
123
123
|
),
|
|
124
124
|
);
|
|
125
125
|
|
|
126
|
+
export const JumboSmall: React$AbstractComponent<TextProps, HTMLSpanElement> =
|
|
127
|
+
React.forwardRef<TextProps, HTMLSpanElement>(
|
|
128
|
+
(
|
|
129
|
+
{
|
|
130
|
+
color = TEXT_COLORS.primary,
|
|
131
|
+
children,
|
|
132
|
+
className,
|
|
133
|
+
highlightedTextClassName,
|
|
134
|
+
highlightString,
|
|
135
|
+
caseSensitiveHighlighting,
|
|
136
|
+
highlightWithBackground,
|
|
137
|
+
...props
|
|
138
|
+
}: TextProps,
|
|
139
|
+
ref,
|
|
140
|
+
): React.Node => (
|
|
141
|
+
<span
|
|
142
|
+
{...props}
|
|
143
|
+
className={classify(css.jumboSmall, css[color], className)}
|
|
144
|
+
ref={ref}
|
|
145
|
+
>
|
|
146
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
147
|
+
<HighlightText
|
|
148
|
+
text={children}
|
|
149
|
+
highlight={highlightString}
|
|
150
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
151
|
+
highlightClassName={highlightedTextClassName}
|
|
152
|
+
highlightWithBackground={highlightWithBackground}
|
|
153
|
+
/>
|
|
154
|
+
) : (
|
|
155
|
+
children
|
|
156
|
+
)}
|
|
157
|
+
</span>
|
|
158
|
+
),
|
|
159
|
+
);
|
|
160
|
+
|
|
126
161
|
export const TitleMedium: React$AbstractComponent<
|
|
127
162
|
TextProps,
|
|
128
163
|
HTMLHeadingElement,
|
|
@@ -419,6 +454,132 @@ export const ButtonTextExtraSmall: React$AbstractComponent<
|
|
|
419
454
|
),
|
|
420
455
|
);
|
|
421
456
|
|
|
457
|
+
export const ButtonTextMediumUnderline: React$AbstractComponent<
|
|
458
|
+
TextProps,
|
|
459
|
+
HTMLSpanElement,
|
|
460
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
461
|
+
(
|
|
462
|
+
{
|
|
463
|
+
color = TEXT_COLORS.primary,
|
|
464
|
+
children,
|
|
465
|
+
className,
|
|
466
|
+
highlightedTextClassName,
|
|
467
|
+
highlightString,
|
|
468
|
+
caseSensitiveHighlighting,
|
|
469
|
+
highlightWithBackground,
|
|
470
|
+
...props
|
|
471
|
+
}: TextProps,
|
|
472
|
+
ref,
|
|
473
|
+
): React.Node => (
|
|
474
|
+
<span
|
|
475
|
+
{...props}
|
|
476
|
+
className={classify(
|
|
477
|
+
css.buttonTextMedium,
|
|
478
|
+
css.underline,
|
|
479
|
+
css[color],
|
|
480
|
+
className,
|
|
481
|
+
)}
|
|
482
|
+
ref={ref}
|
|
483
|
+
>
|
|
484
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
485
|
+
<HighlightText
|
|
486
|
+
text={children}
|
|
487
|
+
highlight={highlightString}
|
|
488
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
489
|
+
highlightClassName={highlightedTextClassName}
|
|
490
|
+
highlightWithBackground={highlightWithBackground}
|
|
491
|
+
/>
|
|
492
|
+
) : (
|
|
493
|
+
children
|
|
494
|
+
)}
|
|
495
|
+
</span>
|
|
496
|
+
),
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
export const ButtonTextSmallUnderline: React$AbstractComponent<
|
|
500
|
+
TextProps,
|
|
501
|
+
HTMLSpanElement,
|
|
502
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
503
|
+
(
|
|
504
|
+
{
|
|
505
|
+
color = TEXT_COLORS.primary,
|
|
506
|
+
children,
|
|
507
|
+
className,
|
|
508
|
+
highlightedTextClassName,
|
|
509
|
+
highlightString,
|
|
510
|
+
caseSensitiveHighlighting,
|
|
511
|
+
highlightWithBackground,
|
|
512
|
+
...props
|
|
513
|
+
}: TextProps,
|
|
514
|
+
ref,
|
|
515
|
+
): React.Node => (
|
|
516
|
+
<span
|
|
517
|
+
{...props}
|
|
518
|
+
className={classify(
|
|
519
|
+
css.buttonTextSmall,
|
|
520
|
+
css.underline,
|
|
521
|
+
css[color],
|
|
522
|
+
className,
|
|
523
|
+
)}
|
|
524
|
+
ref={ref}
|
|
525
|
+
>
|
|
526
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
527
|
+
<HighlightText
|
|
528
|
+
text={children}
|
|
529
|
+
highlight={highlightString}
|
|
530
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
531
|
+
highlightClassName={highlightedTextClassName}
|
|
532
|
+
highlightWithBackground={highlightWithBackground}
|
|
533
|
+
/>
|
|
534
|
+
) : (
|
|
535
|
+
children
|
|
536
|
+
)}
|
|
537
|
+
</span>
|
|
538
|
+
),
|
|
539
|
+
);
|
|
540
|
+
|
|
541
|
+
export const ButtonTextExtraSmallUnderline: React$AbstractComponent<
|
|
542
|
+
TextProps,
|
|
543
|
+
HTMLSpanElement,
|
|
544
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
545
|
+
(
|
|
546
|
+
{
|
|
547
|
+
color = TEXT_COLORS.primary,
|
|
548
|
+
children,
|
|
549
|
+
className,
|
|
550
|
+
highlightedTextClassName,
|
|
551
|
+
highlightString,
|
|
552
|
+
caseSensitiveHighlighting,
|
|
553
|
+
highlightWithBackground,
|
|
554
|
+
...props
|
|
555
|
+
}: TextProps,
|
|
556
|
+
ref,
|
|
557
|
+
): React.Node => (
|
|
558
|
+
<span
|
|
559
|
+
{...props}
|
|
560
|
+
className={classify(
|
|
561
|
+
css.buttonTextExtraSmall,
|
|
562
|
+
css.underline,
|
|
563
|
+
css[color],
|
|
564
|
+
className,
|
|
565
|
+
)}
|
|
566
|
+
ref={ref}
|
|
567
|
+
>
|
|
568
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
569
|
+
<HighlightText
|
|
570
|
+
text={children}
|
|
571
|
+
highlight={highlightString}
|
|
572
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
573
|
+
highlightClassName={highlightedTextClassName}
|
|
574
|
+
highlightWithBackground={highlightWithBackground}
|
|
575
|
+
/>
|
|
576
|
+
) : (
|
|
577
|
+
children
|
|
578
|
+
)}
|
|
579
|
+
</span>
|
|
580
|
+
),
|
|
581
|
+
);
|
|
582
|
+
|
|
422
583
|
export const FormInputMedium: React$AbstractComponent<
|
|
423
584
|
TextProps,
|
|
424
585
|
HTMLParagraphElement,
|
|
@@ -604,6 +765,117 @@ export const BodySmall: React$AbstractComponent<
|
|
|
604
765
|
),
|
|
605
766
|
);
|
|
606
767
|
|
|
768
|
+
export const BodyLargeBold: React$AbstractComponent<
|
|
769
|
+
TextProps,
|
|
770
|
+
HTMLParagraphElement,
|
|
771
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
772
|
+
(
|
|
773
|
+
{
|
|
774
|
+
color = TEXT_COLORS.primary,
|
|
775
|
+
children,
|
|
776
|
+
className,
|
|
777
|
+
highlightedTextClassName,
|
|
778
|
+
highlightString,
|
|
779
|
+
caseSensitiveHighlighting,
|
|
780
|
+
highlightWithBackground,
|
|
781
|
+
...props
|
|
782
|
+
}: TextProps,
|
|
783
|
+
ref,
|
|
784
|
+
): React.Node => (
|
|
785
|
+
<p
|
|
786
|
+
{...props}
|
|
787
|
+
className={classify(css.bodyLarge, css.bold, css[color], className)}
|
|
788
|
+
ref={ref}
|
|
789
|
+
>
|
|
790
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
791
|
+
<HighlightText
|
|
792
|
+
text={children}
|
|
793
|
+
highlight={highlightString}
|
|
794
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
795
|
+
highlightClassName={highlightedTextClassName}
|
|
796
|
+
highlightWithBackground={highlightWithBackground}
|
|
797
|
+
/>
|
|
798
|
+
) : (
|
|
799
|
+
children
|
|
800
|
+
)}
|
|
801
|
+
</p>
|
|
802
|
+
),
|
|
803
|
+
);
|
|
804
|
+
|
|
805
|
+
export const BodyMediumBold: React$AbstractComponent<
|
|
806
|
+
TextProps,
|
|
807
|
+
HTMLParagraphElement,
|
|
808
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
809
|
+
(
|
|
810
|
+
{
|
|
811
|
+
color = TEXT_COLORS.primary,
|
|
812
|
+
children,
|
|
813
|
+
className,
|
|
814
|
+
highlightedTextClassName,
|
|
815
|
+
highlightString,
|
|
816
|
+
caseSensitiveHighlighting,
|
|
817
|
+
highlightWithBackground,
|
|
818
|
+
...props
|
|
819
|
+
}: TextProps,
|
|
820
|
+
ref,
|
|
821
|
+
): React.Node => (
|
|
822
|
+
<p
|
|
823
|
+
{...props}
|
|
824
|
+
className={classify(css.bodyMedium, css.bold, css[color], className)}
|
|
825
|
+
ref={ref}
|
|
826
|
+
>
|
|
827
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
828
|
+
<HighlightText
|
|
829
|
+
text={children}
|
|
830
|
+
highlight={highlightString}
|
|
831
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
832
|
+
highlightClassName={highlightedTextClassName}
|
|
833
|
+
highlightWithBackground={highlightWithBackground}
|
|
834
|
+
/>
|
|
835
|
+
) : (
|
|
836
|
+
children
|
|
837
|
+
)}
|
|
838
|
+
</p>
|
|
839
|
+
),
|
|
840
|
+
);
|
|
841
|
+
|
|
842
|
+
export const BodySmallBold: React$AbstractComponent<
|
|
843
|
+
TextProps,
|
|
844
|
+
HTMLParagraphElement,
|
|
845
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
846
|
+
(
|
|
847
|
+
{
|
|
848
|
+
color = TEXT_COLORS.primary,
|
|
849
|
+
children,
|
|
850
|
+
className,
|
|
851
|
+
highlightedTextClassName,
|
|
852
|
+
highlightString,
|
|
853
|
+
caseSensitiveHighlighting,
|
|
854
|
+
highlightWithBackground,
|
|
855
|
+
...props
|
|
856
|
+
}: TextProps,
|
|
857
|
+
ref,
|
|
858
|
+
): React.Node => (
|
|
859
|
+
<p
|
|
860
|
+
{...props}
|
|
861
|
+
className={classify(css.bodySmall, css.bold, css[color], className)}
|
|
862
|
+
ref={ref}
|
|
863
|
+
>
|
|
864
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
865
|
+
<HighlightText
|
|
866
|
+
text={children}
|
|
867
|
+
highlight={highlightString}
|
|
868
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
869
|
+
highlightClassName={highlightedTextClassName}
|
|
870
|
+
highlightWithBackground={highlightWithBackground}
|
|
871
|
+
/>
|
|
872
|
+
) : (
|
|
873
|
+
children
|
|
874
|
+
)}
|
|
875
|
+
</p>
|
|
876
|
+
),
|
|
877
|
+
);
|
|
878
|
+
|
|
607
879
|
export const FormLabelMedium: React$AbstractComponent<
|
|
608
880
|
TextProps,
|
|
609
881
|
HTMLSpanElement,
|
|
@@ -9,36 +9,72 @@ Object.defineProperty(exports, "BodyLarge", {
|
|
|
9
9
|
return _Text.BodyLarge;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "BodyLargeBold", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Text.BodyLargeBold;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "BodyMedium", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
15
21
|
return _Text.BodyMedium;
|
|
16
22
|
}
|
|
17
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "BodyMediumBold", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _Text.BodyMediumBold;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "BodySmall", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
21
33
|
return _Text.BodySmall;
|
|
22
34
|
}
|
|
23
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "BodySmallBold", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _Text.BodySmallBold;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
24
42
|
Object.defineProperty(exports, "ButtonTextExtraSmall", {
|
|
25
43
|
enumerable: true,
|
|
26
44
|
get: function () {
|
|
27
45
|
return _Text.ButtonTextExtraSmall;
|
|
28
46
|
}
|
|
29
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "ButtonTextExtraSmallUnderline", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _Text.ButtonTextExtraSmallUnderline;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
30
54
|
Object.defineProperty(exports, "ButtonTextMedium", {
|
|
31
55
|
enumerable: true,
|
|
32
56
|
get: function () {
|
|
33
57
|
return _Text.ButtonTextMedium;
|
|
34
58
|
}
|
|
35
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "ButtonTextMediumUnderline", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _Text.ButtonTextMediumUnderline;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
36
66
|
Object.defineProperty(exports, "ButtonTextSmall", {
|
|
37
67
|
enumerable: true,
|
|
38
68
|
get: function () {
|
|
39
69
|
return _Text.ButtonTextSmall;
|
|
40
70
|
}
|
|
41
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "ButtonTextSmallUnderline", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _Text.ButtonTextSmallUnderline;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
42
78
|
Object.defineProperty(exports, "FormInputMedium", {
|
|
43
79
|
enumerable: true,
|
|
44
80
|
get: function () {
|
|
@@ -69,6 +105,12 @@ Object.defineProperty(exports, "JumboMedium", {
|
|
|
69
105
|
return _Text.JumboMedium;
|
|
70
106
|
}
|
|
71
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "JumboSmall", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _Text.JumboSmall;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
72
114
|
Object.defineProperty(exports, "SubTitleExtraSmall", {
|
|
73
115
|
enumerable: true,
|
|
74
116
|
get: function () {
|
|
@@ -4,16 +4,23 @@ export {TEXT_COLORS} from '../../types/typography';
|
|
|
4
4
|
export type {TextProps} from './Text';
|
|
5
5
|
export {
|
|
6
6
|
BodyLarge,
|
|
7
|
+
BodyLargeBold,
|
|
7
8
|
BodyMedium,
|
|
9
|
+
BodyMediumBold,
|
|
8
10
|
BodySmall,
|
|
11
|
+
BodySmallBold,
|
|
9
12
|
ButtonTextExtraSmall,
|
|
13
|
+
ButtonTextExtraSmallUnderline,
|
|
10
14
|
ButtonTextMedium,
|
|
15
|
+
ButtonTextMediumUnderline,
|
|
11
16
|
ButtonTextSmall,
|
|
17
|
+
ButtonTextSmallUnderline,
|
|
12
18
|
FormInputMedium,
|
|
13
19
|
FormInputSmall,
|
|
14
20
|
FormLabelMedium,
|
|
15
21
|
FormLabelSmall,
|
|
16
22
|
JumboMedium,
|
|
23
|
+
JumboSmall,
|
|
17
24
|
SubTitleExtraSmall,
|
|
18
25
|
SubTitleLarge,
|
|
19
26
|
SubTitleMedium,
|
|
@@ -22,6 +22,7 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
22
22
|
focused,
|
|
23
23
|
onChange,
|
|
24
24
|
ariaLabel,
|
|
25
|
+
labelPosition = 'right',
|
|
25
26
|
...props
|
|
26
27
|
} = _ref;
|
|
27
28
|
const toggleInput = /*#__PURE__*/React.createRef();
|
|
@@ -48,7 +49,9 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
48
49
|
[_ToggleModule.default.disabled]: disabled
|
|
49
50
|
}, classNames?.wrapper),
|
|
50
51
|
onClick: onWrapClickHandler
|
|
51
|
-
}, /*#__PURE__*/React.createElement("
|
|
52
|
+
}, labelPosition === 'left' && React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: (0, _classify.default)(_ToggleModule.default.toggleLabel, classNames?.label)
|
|
54
|
+
}, children), /*#__PURE__*/React.createElement("span", {
|
|
52
55
|
className: _ToggleModule.default.toggleWrap
|
|
53
56
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
54
57
|
type: "checkbox",
|
|
@@ -63,7 +66,7 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
63
66
|
className: (0, _classify.default)(_ToggleModule.default.toggle, {
|
|
64
67
|
[_ToggleModule.default.disabledButton]: disabled
|
|
65
68
|
})
|
|
66
|
-
})), React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
})), labelPosition === 'right' && React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
67
70
|
className: (0, _classify.default)(_ToggleModule.default.toggleLabel, classNames?.label)
|
|
68
71
|
}, children));
|
|
69
72
|
});
|
|
@@ -25,6 +25,7 @@ export type ToggleProps = {
|
|
|
25
25
|
focused?: boolean,
|
|
26
26
|
value?: string,
|
|
27
27
|
ariaLabel?: string,
|
|
28
|
+
labelPosition?: 'left' | 'right',
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
@@ -40,6 +41,7 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
40
41
|
focused,
|
|
41
42
|
onChange,
|
|
42
43
|
ariaLabel,
|
|
44
|
+
labelPosition = 'right',
|
|
43
45
|
...props
|
|
44
46
|
}: ToggleProps,
|
|
45
47
|
forwardRef,
|
|
@@ -77,6 +79,11 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
77
79
|
)}
|
|
78
80
|
onClick={onWrapClickHandler}
|
|
79
81
|
>
|
|
82
|
+
{labelPosition === 'left' && React.Children.count(children) > 0 && (
|
|
83
|
+
<div className={classify(css.toggleLabel, classNames?.label)}>
|
|
84
|
+
{children}
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
80
87
|
<span className={css.toggleWrap}>
|
|
81
88
|
<input
|
|
82
89
|
type="checkbox"
|
|
@@ -95,7 +102,7 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
95
102
|
})}
|
|
96
103
|
/>
|
|
97
104
|
</span>
|
|
98
|
-
{React.Children.count(children) > 0 && (
|
|
105
|
+
{labelPosition === 'right' && React.Children.count(children) > 0 && (
|
|
99
106
|
<div className={classify(css.toggleLabel, classNames?.label)}>
|
|
100
107
|
{children}
|
|
101
108
|
</div>
|
package/lib/components/index.js
CHANGED
|
@@ -289,6 +289,17 @@ Object.keys(_Input).forEach(function (key) {
|
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
|
+
var _KPIBox = require("./KPIBox");
|
|
293
|
+
Object.keys(_KPIBox).forEach(function (key) {
|
|
294
|
+
if (key === "default" || key === "__esModule") return;
|
|
295
|
+
if (key in exports && exports[key] === _KPIBox[key]) return;
|
|
296
|
+
Object.defineProperty(exports, key, {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function () {
|
|
299
|
+
return _KPIBox[key];
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
});
|
|
292
303
|
var _LinearLoader = require("./LinearLoader");
|
|
293
304
|
Object.keys(_LinearLoader).forEach(function (key) {
|
|
294
305
|
if (key === "default" || key === "__esModule") return;
|
package/lib/styles/index.css
CHANGED
|
@@ -200,6 +200,8 @@
|
|
|
200
200
|
|
|
201
201
|
@value fontSize18: 18px;
|
|
202
202
|
|
|
203
|
+
@value fontSize24: 24px;
|
|
204
|
+
|
|
203
205
|
@value fontSize26: 26px;
|
|
204
206
|
|
|
205
207
|
@value fontSize46: 46px;
|
|
@@ -222,6 +224,8 @@
|
|
|
222
224
|
|
|
223
225
|
@value fontLineHeight120: 120%;
|
|
224
226
|
|
|
227
|
+
@value fontLineHeight125: 125%;
|
|
228
|
+
|
|
225
229
|
@value fontLineHeight130: 130%;
|
|
226
230
|
|
|
227
231
|
@value fontLineHeight140: 140%;
|
|
@@ -386,6 +390,8 @@
|
|
|
386
390
|
|
|
387
391
|
@value size240: 240px;
|
|
388
392
|
|
|
393
|
+
@value size252: 252px;
|
|
394
|
+
|
|
389
395
|
@value size260: 260px;
|
|
390
396
|
|
|
391
397
|
@value size276: 276px;
|
package/lib/styles/index.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.fontLetterSpacingMinus2 = exports.fontLetterSpacingMinus1 = exports.fontLetterSpacing4 = exports.fontLetterSpacing2 = exports.fontLetterSpacing1 = exports.fontLetterSpacing0 = exports.fontFamilyCentra = exports.elevationTooltip = exports.elevationToast = exports.elevationNone = exports.elevationModal = exports.elevationMenu = exports.elevationCard = exports.elevationBackdrop = exports.colorWarningLightest = exports.colorWarningLight = exports.colorWarningDarkest = exports.colorWarningDark = exports.colorWarning = exports.colorTooltipFill = exports.colorTextWarning = exports.colorTextTertiary = exports.colorTextSuccess = exports.colorTextSecondary = exports.colorTextPrimary = exports.colorTextNeutral = exports.colorTextInverseSecondary = exports.colorTextInversePrimary = exports.colorTextInformation = exports.colorTextDisabled = exports.colorTextDanger = exports.colorTextClickable = exports.colorSuccessLightest = exports.colorSuccessLight = exports.colorSuccessDarkest = exports.colorSuccessDark = exports.colorSuccess = exports.colorSubMenuStar = exports.colorSubMenuBackgroundDefault = exports.colorSideMenuIconDefault = exports.colorSideMenuIconActive = exports.colorNeutralLightest = exports.colorNeutralLight = exports.colorNeutralDarkest = exports.colorNeutralDark = exports.colorNeutral = exports.colorInformationLightest = exports.colorInformationLight = exports.colorInformationDarkest = exports.colorInformationDark = exports.colorInformation = exports.colorGrayLightest = exports.colorFocusPrimary = exports.colorFocusDanger = exports.colorFillSecondary = exports.colorFillPrimary = exports.colorFillNone = exports.colorFillInversePrimary = exports.colorFillDisabled = exports.colorDangerLightest = exports.colorDangerLight = exports.colorDangerDarkest = exports.colorDangerDark = exports.colorDanger = exports.colorButtonFillTertiaryPressed = exports.colorButtonFillTertiaryHovered = exports.colorButtonFillTertiaryEnabled = exports.colorButtonFillSecondaryPressed = exports.colorButtonFillSecondaryHovered = exports.colorButtonFillSecondaryEnabled = exports.colorButtonFillPrimaryPressed = exports.colorButtonFillPrimaryHovered = exports.colorButtonFillPrimaryEnabled = exports.colorButtonFillGhostPressed = exports.colorButtonFillGhostHovered = exports.colorButtonFillGhostEnabled = exports.colorButtonFillDangerPressed = exports.colorButtonFillDangerHovered = exports.colorButtonFillDangerEnabled = exports.colorBorderTertiary = exports.colorBorderSecondary = exports.colorBorderPrimary = exports.colorBorderDanger = exports.colorBackgroundTertiary = exports.colorBackgroundSecondary = exports.colorBackgroundPrimary = exports.colorBackgroundBrand = exports.colorBackdropFill = exports.borderWidthTertiary = exports.borderWidthSecondary = exports.borderWidthPrimary = exports.borderWidthNone = exports.borderRadiusXSmall = exports.borderRadiusXLarge = exports.borderRadiusSmall = exports.borderRadiusRadioButton = exports.borderRadiusNone = exports.borderRadiusMedium = exports.borderRadiusLarge = exports.borderRadiusCircle = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = void 0;
|
|
7
|
+
exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size300 = exports.size30 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = exports.shadowBoxShadow4Y = exports.shadowBoxShadow4X = exports.shadowBoxShadow4Type = exports.shadowBoxShadow4Spread = exports.shadowBoxShadow4Color = exports.shadowBoxShadow4Blur = exports.shadowBoxShadow3Y = exports.shadowBoxShadow3X = exports.shadowBoxShadow3Type = exports.shadowBoxShadow3Spread = exports.shadowBoxShadow3Color = exports.shadowBoxShadow3Blur = exports.shadowBoxShadow2Y = exports.shadowBoxShadow2X = exports.shadowBoxShadow2Type = exports.shadowBoxShadow2Spread = exports.shadowBoxShadow2Color = exports.shadowBoxShadow2Blur = exports.shadowBoxShadow1Y = exports.shadowBoxShadow1X = exports.shadowBoxShadow1Type = exports.shadowBoxShadow1Spread = exports.shadowBoxShadow1Color = exports.shadowBoxShadow1Blur = exports.opacity95 = exports.opacity90 = exports.opacity85 = exports.opacity80 = exports.opacity70 = exports.opacity60 = exports.opacity50 = exports.opacity5 = exports.opacity40 = exports.opacity30 = exports.opacity20 = exports.opacity15 = exports.opacity100 = exports.opacity10 = exports.opacity0 = exports.motionEaseInEaseOut = exports.motionDurationSlowest = exports.motionDurationSlower = exports.motionDurationSlow = exports.motionDurationNormal = exports.motionDurationFast = exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize26 = exports.fontSize24 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight125 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = void 0;
|
|
8
|
+
exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = void 0;
|
|
9
9
|
|
|
10
10
|
const borderWidthNone = '0px';
|
|
11
11
|
exports.borderWidthNone = borderWidthNone;
|
|
@@ -209,6 +209,8 @@ const fontSize16 = '16px';
|
|
|
209
209
|
exports.fontSize16 = fontSize16;
|
|
210
210
|
const fontSize18 = '18px';
|
|
211
211
|
exports.fontSize18 = fontSize18;
|
|
212
|
+
const fontSize24 = '24px';
|
|
213
|
+
exports.fontSize24 = fontSize24;
|
|
212
214
|
const fontSize26 = '26px';
|
|
213
215
|
exports.fontSize26 = fontSize26;
|
|
214
216
|
const fontSize46 = '46px';
|
|
@@ -231,6 +233,8 @@ const fontLineHeight100 = '100%';
|
|
|
231
233
|
exports.fontLineHeight100 = fontLineHeight100;
|
|
232
234
|
const fontLineHeight120 = '120%';
|
|
233
235
|
exports.fontLineHeight120 = fontLineHeight120;
|
|
236
|
+
const fontLineHeight125 = '125%';
|
|
237
|
+
exports.fontLineHeight125 = fontLineHeight125;
|
|
234
238
|
const fontLineHeight130 = '130%';
|
|
235
239
|
exports.fontLineHeight130 = fontLineHeight130;
|
|
236
240
|
const fontLineHeight140 = '140%';
|
|
@@ -395,6 +399,8 @@ const size228 = '228px';
|
|
|
395
399
|
exports.size228 = size228;
|
|
396
400
|
const size240 = '240px';
|
|
397
401
|
exports.size240 = size240;
|
|
402
|
+
const size252 = '252px';
|
|
403
|
+
exports.size252 = size252;
|
|
398
404
|
const size260 = '260px';
|
|
399
405
|
exports.size260 = size260;
|
|
400
406
|
const size276 = '276px';
|
package/lib/styles/index.js.flow
CHANGED
|
@@ -202,6 +202,8 @@ export const fontSize16 = '16px';
|
|
|
202
202
|
|
|
203
203
|
export const fontSize18 = '18px';
|
|
204
204
|
|
|
205
|
+
export const fontSize24 = '24px';
|
|
206
|
+
|
|
205
207
|
export const fontSize26 = '26px';
|
|
206
208
|
|
|
207
209
|
export const fontSize46 = '46px';
|
|
@@ -224,6 +226,8 @@ export const fontLineHeight100 = '100%';
|
|
|
224
226
|
|
|
225
227
|
export const fontLineHeight120 = '120%';
|
|
226
228
|
|
|
229
|
+
export const fontLineHeight125 = '125%';
|
|
230
|
+
|
|
227
231
|
export const fontLineHeight130 = '130%';
|
|
228
232
|
|
|
229
233
|
export const fontLineHeight140 = '140%';
|
|
@@ -388,6 +392,8 @@ export const size228 = '228px';
|
|
|
388
392
|
|
|
389
393
|
export const size240 = '240px';
|
|
390
394
|
|
|
395
|
+
export const size252 = '252px';
|
|
396
|
+
|
|
391
397
|
export const size260 = '260px';
|
|
392
398
|
|
|
393
399
|
export const size276 = '276px';
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
@value (
|
|
19
19
|
fontFamilyCentra,
|
|
20
20
|
fontSize46,
|
|
21
|
+
fontSize24,
|
|
21
22
|
fontSize26,
|
|
22
23
|
fontSize18,
|
|
23
24
|
fontSize16,
|
|
@@ -28,6 +29,8 @@
|
|
|
28
29
|
fontWeightBook,
|
|
29
30
|
fontLineHeight100,
|
|
30
31
|
fontLineHeight120,
|
|
32
|
+
fontLineHeight125,
|
|
33
|
+
fontLineHeight130,
|
|
31
34
|
fontLineHeight140,
|
|
32
35
|
fontLineHeight150,
|
|
33
36
|
fontLineHeight170,
|
|
@@ -59,6 +62,10 @@
|
|
|
59
62
|
align-items: center;
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
.underline {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
.jumboMedium {
|
|
63
70
|
composes: baseType;
|
|
64
71
|
font-size: fontSize46;
|
|
@@ -66,6 +73,13 @@
|
|
|
66
73
|
letter-spacing: fontLetterSpacingMinus4;
|
|
67
74
|
}
|
|
68
75
|
|
|
76
|
+
.jumboSmall {
|
|
77
|
+
composes: baseType;
|
|
78
|
+
font-size: fontSize24;
|
|
79
|
+
line-height: fontLineHeight125;
|
|
80
|
+
letter-spacing: fontLetterSpacingMinus2;
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
.titleMedium {
|
|
70
84
|
composes: baseType;
|
|
71
85
|
font-size: fontSize26;
|
|
@@ -145,7 +159,7 @@
|
|
|
145
159
|
composes: baseType;
|
|
146
160
|
font-size: fontSize12;
|
|
147
161
|
font-weight: fontWeightBook;
|
|
148
|
-
line-height:
|
|
162
|
+
line-height: fontLineHeight130;
|
|
149
163
|
letter-spacing: fontLetterSpacing4;
|
|
150
164
|
}
|
|
151
165
|
|
|
@@ -161,6 +175,10 @@
|
|
|
161
175
|
line-height: fontLineHeight140;
|
|
162
176
|
}
|
|
163
177
|
|
|
178
|
+
.bold {
|
|
179
|
+
font-weight: fontWeightMedium;
|
|
180
|
+
}
|
|
181
|
+
|
|
164
182
|
.primary {
|
|
165
183
|
color: colorTextPrimary;
|
|
166
184
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
@value fontSize18: 18px;
|
|
16
16
|
|
|
17
|
+
@value fontSize24: 24px;
|
|
18
|
+
|
|
17
19
|
@value fontSize26: 26px;
|
|
18
20
|
|
|
19
21
|
@value fontSize46: 46px;
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
|
|
37
39
|
@value fontLineHeight120: 120%;
|
|
38
40
|
|
|
41
|
+
@value fontLineHeight125: 125%;
|
|
42
|
+
|
|
39
43
|
@value fontLineHeight130: 130%;
|
|
40
44
|
|
|
41
45
|
@value fontLineHeight140: 140%;
|