@envive-ai/react-toolkit 0.2.0 → 0.2.2
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/package.json +10 -13
- package/src/components/Accordion/Accordion.tsx +3 -3
- package/src/components/AnimatedChevron/AnimatedChevron.tsx +1 -2
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/ButtonBase/ButtonBase.tsx +2 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/ProductCard/ProductCard.tsx +10 -9
- package/src/components/RadioButton/RadioButton.tsx +2 -2
- package/src/components/SearchFilter/SearchFilterHeader.tsx +3 -3
- package/src/components/SearchFilter/SearchFilterItem.tsx +2 -2
- package/src/components/SearchInput/searchInputVariants.ts +2 -2
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +3 -3
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -2
- package/src/components/TextInput/TextInput.tsx +4 -3
- package/src/components/ToggleButton/ToggleButton.tsx +5 -5
- package/src/components/Typography/Typography.spec.tsx +22 -0
- package/src/components/Typography/Typography.tsx +73 -0
- package/src/components/Typography/index.ts +2 -0
- package/src/components/{Text/textVariantClasses.ts → Typography/typographyVariantClasses.ts} +36 -38
- package/src/components/Typography/util.ts +19 -0
- package/dist/Accordion/index.cjs +0 -6
- package/dist/Accordion/index.d.cts +0 -13
- package/dist/Accordion/index.d.ts +0 -13
- package/dist/Accordion/index.js +0 -6
- package/dist/Accordion-D9gO9_y3.cjs +0 -88
- package/dist/Accordion-ZEdp99Ph.js +0 -77
- package/dist/AnimatedChevron/index.cjs +0 -3
- package/dist/AnimatedChevron/index.d.cts +0 -11
- package/dist/AnimatedChevron/index.d.ts +0 -11
- package/dist/AnimatedChevron/index.js +0 -3
- package/dist/AnimatedChevron-CwuXgR2r.js +0 -29
- package/dist/AnimatedChevron-e_UzWBl0.cjs +0 -37
- package/dist/AppliedFiltersScrollbar/index.cjs +0 -48
- package/dist/AppliedFiltersScrollbar/index.d.cts +0 -22
- package/dist/AppliedFiltersScrollbar/index.d.ts +0 -22
- package/dist/AppliedFiltersScrollbar/index.js +0 -44
- package/dist/ButtonBase/index.cjs +0 -7
- package/dist/ButtonBase/index.d.cts +0 -42
- package/dist/ButtonBase/index.d.ts +0 -42
- package/dist/ButtonBase/index.js +0 -6
- package/dist/ButtonBase-BJ0qXMWD.js +0 -60
- package/dist/ButtonBase-BktteD9c.js +0 -1
- package/dist/ButtonBase-Cb6Iec6f.cjs +0 -0
- package/dist/ButtonBase-VIv-tn7H.cjs +0 -75
- package/dist/DynamicFiltersScrollbar/index.cjs +0 -36
- package/dist/DynamicFiltersScrollbar/index.d.cts +0 -28
- package/dist/DynamicFiltersScrollbar/index.d.ts +0 -28
- package/dist/DynamicFiltersScrollbar/index.js +0 -32
- package/dist/DynamicFiltersScrollbar-HCYZjI14.cjs +0 -81
- package/dist/DynamicFiltersScrollbar-O0ai3cIG.js +0 -66
- package/dist/FilterScrollbar/index.cjs +0 -6
- package/dist/FilterScrollbar/index.d.cts +0 -47
- package/dist/FilterScrollbar/index.d.ts +0 -47
- package/dist/FilterScrollbar/index.js +0 -5
- package/dist/Headline/index.cjs +0 -4
- package/dist/Headline/index.d.cts +0 -21
- package/dist/Headline/index.d.ts +0 -21
- package/dist/Headline/index.js +0 -4
- package/dist/Headline-CKJmd2w4.cjs +0 -72
- package/dist/Headline-DtjTB4xS.js +0 -64
- package/dist/ImageWithFallback/index.cjs +0 -3
- package/dist/ImageWithFallback/index.d.cts +0 -26
- package/dist/ImageWithFallback/index.d.ts +0 -26
- package/dist/ImageWithFallback/index.js +0 -3
- package/dist/ImageWithFallback-CbYsD1_a.js +0 -42
- package/dist/ImageWithFallback-Km9h16Vz.cjs +0 -51
- package/dist/ModalSheet/index.cjs +0 -4
- package/dist/ModalSheet/index.d.cts +0 -38
- package/dist/ModalSheet/index.d.ts +0 -38
- package/dist/ModalSheet/index.js +0 -4
- package/dist/ModalSheet-DwnbbFh7.cjs +0 -313
- package/dist/ModalSheet-sMg44OLz.js +0 -302
- package/dist/ProductCard/index.cjs +0 -17
- package/dist/ProductCard/index.d.cts +0 -2
- package/dist/ProductCard/index.d.ts +0 -2
- package/dist/ProductCard/index.js +0 -8
- package/dist/ProductCard-BDz80MCQ.cjs +0 -319
- package/dist/ProductCard-CqhNJShq.js +0 -255
- package/dist/ProductGrid/index.cjs +0 -10
- package/dist/ProductGrid/index.d.cts +0 -33
- package/dist/ProductGrid/index.d.ts +0 -33
- package/dist/ProductGrid/index.js +0 -9
- package/dist/ProductGrid-8n4XgcMr.js +0 -60
- package/dist/ProductGrid-RRcdkY5J.cjs +0 -74
- package/dist/RadioButton/index.cjs +0 -6
- package/dist/RadioButton/index.d.cts +0 -32
- package/dist/RadioButton/index.d.ts +0 -32
- package/dist/RadioButton/index.js +0 -6
- package/dist/RadioButton-BWnaUI8o.cjs +0 -84
- package/dist/RadioButton-CG8_M0hY.js +0 -75
- package/dist/RadioButtonGroup/index.cjs +0 -8
- package/dist/RadioButtonGroup/index.d.cts +0 -36
- package/dist/RadioButtonGroup/index.d.ts +0 -36
- package/dist/RadioButtonGroup/index.js +0 -7
- package/dist/RadioButtonGroup-B7EuiEP1.js +0 -38
- package/dist/RadioButtonGroup-ReQqakpS.cjs +0 -52
- package/dist/SearchAutocomplete/index.cjs +0 -3
- package/dist/SearchAutocomplete/index.d.cts +0 -13
- package/dist/SearchAutocomplete/index.d.ts +0 -13
- package/dist/SearchAutocomplete/index.js +0 -3
- package/dist/SearchAutocomplete-BMNYZiJL.js +0 -51
- package/dist/SearchAutocomplete-BmHdijOv.cjs +0 -62
- package/dist/SearchFilter/index.cjs +0 -19
- package/dist/SearchFilter/index.d.cts +0 -91
- package/dist/SearchFilter/index.d.ts +0 -91
- package/dist/SearchFilter/index.js +0 -14
- package/dist/SearchFilter-C8mgj84o.js +0 -268
- package/dist/SearchFilter-FrdHPM5O.cjs +0 -307
- package/dist/SearchInput/index.cjs +0 -7
- package/dist/SearchInput/index.d.cts +0 -34
- package/dist/SearchInput/index.d.ts +0 -34
- package/dist/SearchInput/index.js +0 -6
- package/dist/SearchInput--x9NTMTb.cjs +0 -106
- package/dist/SearchInput-IBq83nqF.js +0 -89
- package/dist/SearchInputForm/index.cjs +0 -39
- package/dist/SearchInputForm/index.d.cts +0 -34
- package/dist/SearchInputForm/index.d.ts +0 -34
- package/dist/SearchInputForm/index.js +0 -37
- package/dist/SearchResultsContent/index.cjs +0 -47
- package/dist/SearchResultsContent/index.d.cts +0 -48
- package/dist/SearchResultsContent/index.d.ts +0 -48
- package/dist/SearchResultsContent/index.js +0 -44
- package/dist/SearchResultsFilterSidebar/index.cjs +0 -62
- package/dist/SearchResultsFilterSidebar/index.d.cts +0 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
- package/dist/SearchResultsFilterSidebar/index.js +0 -57
- package/dist/SearchResultsStates/index.cjs +0 -17
- package/dist/SearchResultsStates/index.d.cts +0 -69
- package/dist/SearchResultsStates/index.d.ts +0 -69
- package/dist/SearchResultsStates/index.js +0 -15
- package/dist/SearchResultsStates-D7dM35qq.js +0 -110
- package/dist/SearchResultsStates-nlaPbkj3.cjs +0 -132
- package/dist/SparkleAnimation/index.cjs +0 -4
- package/dist/SparkleAnimation/index.d.cts +0 -23
- package/dist/SparkleAnimation/index.d.ts +0 -23
- package/dist/SparkleAnimation/index.js +0 -3
- package/dist/SparkleAnimation-D1aZE-7A.cjs +0 -101
- package/dist/SparkleAnimation-DtWkXmkN.js +0 -84
- package/dist/Spinner/index.cjs +0 -3
- package/dist/Spinner/index.d.cts +0 -11
- package/dist/Spinner/index.d.ts +0 -11
- package/dist/Spinner/index.js +0 -3
- package/dist/Spinner-bg6jb_ks.js +0 -38
- package/dist/Spinner-rcWX566W.cjs +0 -46
- package/dist/SuggestionButton/index.cjs +0 -188
- package/dist/SuggestionButton/index.d.cts +0 -35
- package/dist/SuggestionButton/index.d.ts +0 -35
- package/dist/SuggestionButton/index.js +0 -180
- package/dist/Text/index.cjs +0 -10
- package/dist/Text/index.d.cts +0 -42
- package/dist/Text/index.d.ts +0 -42
- package/dist/Text/index.js +0 -5
- package/dist/Text-BLzNhX4H.js +0 -42
- package/dist/Text-BMsncrpY.js +0 -10
- package/dist/Text-C8t_iEj6.cjs +0 -16
- package/dist/Text-DllCE9_D.cjs +0 -50
- package/dist/TextInput/index.cjs +0 -4
- package/dist/TextInput/index.d.cts +0 -12
- package/dist/TextInput/index.d.ts +0 -12
- package/dist/TextInput/index.js +0 -4
- package/dist/TextInput-BeHPlVHT.js +0 -31
- package/dist/TextInput-CGs4BY1q.cjs +0 -40
- package/dist/ToggleButton/index.cjs +0 -6
- package/dist/ToggleButton/index.d.cts +0 -30
- package/dist/ToggleButton/index.d.ts +0 -30
- package/dist/ToggleButton/index.js +0 -6
- package/dist/ToggleButton-CRiPqTCb.js +0 -60
- package/dist/ToggleButton-DfJZ8POQ.cjs +0 -68
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/colorsConfig-Ck2jeqWe.js +0 -26
- package/dist/colorsConfig-CqCKftuM.cjs +0 -38
- package/dist/index-B9WeFNlO.d.cts +0 -325
- package/dist/index-CLGe_Pam.d.cts +0 -46
- package/dist/index-CeECGrFM.d.ts +0 -325
- package/dist/index-PSzeHU2s.d.ts +0 -46
- package/dist/searchFilterSidebarVariants-B05f5SD5.js +0 -34
- package/dist/searchFilterSidebarVariants-NQhqq-NT.cjs +0 -39
- package/dist/textVariantClasses-B0gNjzl4.d.cts +0 -174
- package/dist/textVariantClasses-Bl8SAGwZ.d.ts +0 -174
- package/dist/textVariantClasses-CBre7vXv.cjs +0 -123
- package/dist/textVariantClasses-CRrTb43V.js +0 -99
- package/dist/types-BhGjnuWx.d.cts +0 -4
- package/dist/types-CTOdb0G0.d.ts +0 -4
- package/src/components/Headline/Headline.tsx +0 -81
- package/src/components/Headline/index.ts +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -3
- package/src/components/Text/types.ts +0 -23
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
//#region src/components/Text/textVariantClasses.d.ts
|
|
2
|
-
declare const HeadlineVariantMap: {
|
|
3
|
-
t1: {
|
|
4
|
-
'spiffy-headline': boolean;
|
|
5
|
-
'spiffy-headline-1': boolean;
|
|
6
|
-
'spiffy-tw-text-[32px]': boolean;
|
|
7
|
-
'spiffy-tw-font-medium': boolean;
|
|
8
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
9
|
-
};
|
|
10
|
-
t2: {
|
|
11
|
-
'spiffy-headline': boolean;
|
|
12
|
-
'spiffy-headline-1': boolean;
|
|
13
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
14
|
-
'spiffy-tw-font-medium': boolean;
|
|
15
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
16
|
-
};
|
|
17
|
-
t3: {
|
|
18
|
-
'spiffy-headline': boolean;
|
|
19
|
-
'spiffy-headline-1': boolean;
|
|
20
|
-
'spiffy-tw-text-[24px]': boolean;
|
|
21
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
22
|
-
};
|
|
23
|
-
h1: {
|
|
24
|
-
'spiffy-headline': boolean;
|
|
25
|
-
'spiffy-headline-1': boolean;
|
|
26
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
27
|
-
'spiffy-tw-font-normal': boolean;
|
|
28
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
29
|
-
};
|
|
30
|
-
h2: {
|
|
31
|
-
'spiffy-headline': boolean;
|
|
32
|
-
'spiffy-headline-2': boolean;
|
|
33
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
34
|
-
'spiffy-tw-font-normal': boolean;
|
|
35
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
36
|
-
};
|
|
37
|
-
h3: {
|
|
38
|
-
'spiffy-headline': boolean;
|
|
39
|
-
'spiffy-headline-3': boolean;
|
|
40
|
-
'spiffy-tw-text-[15px]': boolean;
|
|
41
|
-
'spiffy-tw-font-medium': boolean;
|
|
42
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
43
|
-
};
|
|
44
|
-
h4: {
|
|
45
|
-
'spiffy-headline': boolean;
|
|
46
|
-
'spiffy-headline-4': boolean;
|
|
47
|
-
'spiffy-tw-text-[14px]': boolean;
|
|
48
|
-
'spiffy-tw-font-medium': boolean;
|
|
49
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
declare const TextVariantMap: {
|
|
53
|
-
body1: {
|
|
54
|
-
'spiffy-body-text': boolean;
|
|
55
|
-
'spiffy-body-1': boolean;
|
|
56
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
57
|
-
'spiffy-tw-font-normal': boolean;
|
|
58
|
-
'spiffy-tw-line-height-[120%]': boolean;
|
|
59
|
-
};
|
|
60
|
-
body2: {
|
|
61
|
-
'spiffy-body-text': boolean;
|
|
62
|
-
'spiffy-body-2': boolean;
|
|
63
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
64
|
-
'spiffy-tw-font-normal': boolean;
|
|
65
|
-
'spiffy-tw-line-height-[148%]': boolean;
|
|
66
|
-
};
|
|
67
|
-
body3: {
|
|
68
|
-
'spiffy-body-text': boolean;
|
|
69
|
-
'spiffy-body-3': boolean;
|
|
70
|
-
'spiffy-tw-text-sm': boolean;
|
|
71
|
-
'spiffy-tw-font-normal': boolean;
|
|
72
|
-
'spiffy-tw-leading-[140%]': boolean;
|
|
73
|
-
};
|
|
74
|
-
body4: {
|
|
75
|
-
'spiffy-body-text': boolean;
|
|
76
|
-
'spiffy-body-4': boolean;
|
|
77
|
-
'spiffy-tw-text-xs': boolean;
|
|
78
|
-
'spiffy-tw-font-medium': boolean;
|
|
79
|
-
'spiffy-tw-leading-[130%]': boolean;
|
|
80
|
-
};
|
|
81
|
-
body5: {
|
|
82
|
-
'spiffy-body-text': boolean;
|
|
83
|
-
'spiffy-body-5': boolean;
|
|
84
|
-
'spiffy-tw-text-[10px]': boolean;
|
|
85
|
-
'spiffy-tw-font-normal': boolean;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
declare const TextStyleVariantMap: {
|
|
89
|
-
t1: {
|
|
90
|
-
'spiffy-headline': boolean;
|
|
91
|
-
'spiffy-headline-1': boolean;
|
|
92
|
-
'spiffy-tw-text-[32px]': boolean;
|
|
93
|
-
'spiffy-tw-font-medium': boolean;
|
|
94
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
95
|
-
};
|
|
96
|
-
t2: {
|
|
97
|
-
'spiffy-headline': boolean;
|
|
98
|
-
'spiffy-headline-1': boolean;
|
|
99
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
100
|
-
'spiffy-tw-font-medium': boolean;
|
|
101
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
102
|
-
};
|
|
103
|
-
t3: {
|
|
104
|
-
'spiffy-headline': boolean;
|
|
105
|
-
'spiffy-headline-1': boolean;
|
|
106
|
-
'spiffy-tw-text-[24px]': boolean;
|
|
107
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
108
|
-
};
|
|
109
|
-
h1: {
|
|
110
|
-
'spiffy-headline': boolean;
|
|
111
|
-
'spiffy-headline-1': boolean;
|
|
112
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
113
|
-
'spiffy-tw-font-normal': boolean;
|
|
114
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
115
|
-
};
|
|
116
|
-
h2: {
|
|
117
|
-
'spiffy-headline': boolean;
|
|
118
|
-
'spiffy-headline-2': boolean;
|
|
119
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
120
|
-
'spiffy-tw-font-normal': boolean;
|
|
121
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
122
|
-
};
|
|
123
|
-
h3: {
|
|
124
|
-
'spiffy-headline': boolean;
|
|
125
|
-
'spiffy-headline-3': boolean;
|
|
126
|
-
'spiffy-tw-text-[15px]': boolean;
|
|
127
|
-
'spiffy-tw-font-medium': boolean;
|
|
128
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
129
|
-
};
|
|
130
|
-
h4: {
|
|
131
|
-
'spiffy-headline': boolean;
|
|
132
|
-
'spiffy-headline-4': boolean;
|
|
133
|
-
'spiffy-tw-text-[14px]': boolean;
|
|
134
|
-
'spiffy-tw-font-medium': boolean;
|
|
135
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
136
|
-
};
|
|
137
|
-
body1: {
|
|
138
|
-
'spiffy-body-text': boolean;
|
|
139
|
-
'spiffy-body-1': boolean;
|
|
140
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
141
|
-
'spiffy-tw-font-normal': boolean;
|
|
142
|
-
'spiffy-tw-line-height-[120%]': boolean;
|
|
143
|
-
};
|
|
144
|
-
body2: {
|
|
145
|
-
'spiffy-body-text': boolean;
|
|
146
|
-
'spiffy-body-2': boolean;
|
|
147
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
148
|
-
'spiffy-tw-font-normal': boolean;
|
|
149
|
-
'spiffy-tw-line-height-[148%]': boolean;
|
|
150
|
-
};
|
|
151
|
-
body3: {
|
|
152
|
-
'spiffy-body-text': boolean;
|
|
153
|
-
'spiffy-body-3': boolean;
|
|
154
|
-
'spiffy-tw-text-sm': boolean;
|
|
155
|
-
'spiffy-tw-font-normal': boolean;
|
|
156
|
-
'spiffy-tw-leading-[140%]': boolean;
|
|
157
|
-
};
|
|
158
|
-
body4: {
|
|
159
|
-
'spiffy-body-text': boolean;
|
|
160
|
-
'spiffy-body-4': boolean;
|
|
161
|
-
'spiffy-tw-text-xs': boolean;
|
|
162
|
-
'spiffy-tw-font-medium': boolean;
|
|
163
|
-
'spiffy-tw-leading-[130%]': boolean;
|
|
164
|
-
};
|
|
165
|
-
body5: {
|
|
166
|
-
'spiffy-body-text': boolean;
|
|
167
|
-
'spiffy-body-5': boolean;
|
|
168
|
-
'spiffy-tw-text-[10px]': boolean;
|
|
169
|
-
'spiffy-tw-font-normal': boolean;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
declare const getVariantPlaceholderClassNames: (classes: Record<string, boolean>) => Record<string, boolean>;
|
|
173
|
-
//#endregion
|
|
174
|
-
export { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/components/Text/textVariantClasses.ts
|
|
3
|
-
const HeadlineVariantMap = {
|
|
4
|
-
t1: {
|
|
5
|
-
"spiffy-headline": true,
|
|
6
|
-
"spiffy-headline-1": true,
|
|
7
|
-
"spiffy-tw-text-[32px]": true,
|
|
8
|
-
"spiffy-tw-font-medium": true,
|
|
9
|
-
"spiffy-tw-leading-[124%]": true
|
|
10
|
-
},
|
|
11
|
-
t2: {
|
|
12
|
-
"spiffy-headline": true,
|
|
13
|
-
"spiffy-headline-1": true,
|
|
14
|
-
"spiffy-tw-text-[16px]": true,
|
|
15
|
-
"spiffy-tw-font-medium": true,
|
|
16
|
-
"spiffy-tw-leading-[124%]": true
|
|
17
|
-
},
|
|
18
|
-
t3: {
|
|
19
|
-
"spiffy-headline": true,
|
|
20
|
-
"spiffy-headline-1": true,
|
|
21
|
-
"spiffy-tw-text-[24px]": true,
|
|
22
|
-
"spiffy-tw-leading-[120%]": true
|
|
23
|
-
},
|
|
24
|
-
h1: {
|
|
25
|
-
"spiffy-headline": true,
|
|
26
|
-
"spiffy-headline-1": true,
|
|
27
|
-
"spiffy-tw-text-[20px]": true,
|
|
28
|
-
"spiffy-tw-font-normal": true,
|
|
29
|
-
"spiffy-tw-leading-[120%]": true
|
|
30
|
-
},
|
|
31
|
-
h2: {
|
|
32
|
-
"spiffy-headline": true,
|
|
33
|
-
"spiffy-headline-2": true,
|
|
34
|
-
"spiffy-tw-text-[16px]": true,
|
|
35
|
-
"spiffy-tw-font-normal": true,
|
|
36
|
-
"spiffy-tw-leading-[124%]": true
|
|
37
|
-
},
|
|
38
|
-
h3: {
|
|
39
|
-
"spiffy-headline": true,
|
|
40
|
-
"spiffy-headline-3": true,
|
|
41
|
-
"spiffy-tw-text-[15px]": true,
|
|
42
|
-
"spiffy-tw-font-medium": true,
|
|
43
|
-
"spiffy-tw-leading-[124%]": true
|
|
44
|
-
},
|
|
45
|
-
h4: {
|
|
46
|
-
"spiffy-headline": true,
|
|
47
|
-
"spiffy-headline-4": true,
|
|
48
|
-
"spiffy-tw-text-[14px]": true,
|
|
49
|
-
"spiffy-tw-font-medium": true,
|
|
50
|
-
"spiffy-tw-leading-[124%]": true
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const TextVariantMap = {
|
|
54
|
-
body1: {
|
|
55
|
-
"spiffy-body-text": true,
|
|
56
|
-
"spiffy-body-1": true,
|
|
57
|
-
"spiffy-tw-text-[20px]": true,
|
|
58
|
-
"spiffy-tw-font-normal": true,
|
|
59
|
-
"spiffy-tw-line-height-[120%]": true
|
|
60
|
-
},
|
|
61
|
-
body2: {
|
|
62
|
-
"spiffy-body-text": true,
|
|
63
|
-
"spiffy-body-2": true,
|
|
64
|
-
"spiffy-tw-text-[16px]": true,
|
|
65
|
-
"spiffy-tw-font-normal": true,
|
|
66
|
-
"spiffy-tw-line-height-[148%]": true
|
|
67
|
-
},
|
|
68
|
-
body3: {
|
|
69
|
-
"spiffy-body-text": true,
|
|
70
|
-
"spiffy-body-3": true,
|
|
71
|
-
"spiffy-tw-text-sm": true,
|
|
72
|
-
"spiffy-tw-font-normal": true,
|
|
73
|
-
"spiffy-tw-leading-[140%]": true
|
|
74
|
-
},
|
|
75
|
-
body4: {
|
|
76
|
-
"spiffy-body-text": true,
|
|
77
|
-
"spiffy-body-4": true,
|
|
78
|
-
"spiffy-tw-text-xs": true,
|
|
79
|
-
"spiffy-tw-font-medium": true,
|
|
80
|
-
"spiffy-tw-leading-[130%]": true
|
|
81
|
-
},
|
|
82
|
-
body5: {
|
|
83
|
-
"spiffy-body-text": true,
|
|
84
|
-
"spiffy-body-5": true,
|
|
85
|
-
"spiffy-tw-text-[10px]": true,
|
|
86
|
-
"spiffy-tw-font-normal": true
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const TextStyleVariantMap = {
|
|
90
|
-
...TextVariantMap,
|
|
91
|
-
...HeadlineVariantMap
|
|
92
|
-
};
|
|
93
|
-
const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
|
|
94
|
-
if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
|
|
95
|
-
else acc[`${key}-placeholder`] = classes[key];
|
|
96
|
-
return acc;
|
|
97
|
-
}, {});
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
Object.defineProperty(exports, 'HeadlineVariantMap', {
|
|
101
|
-
enumerable: true,
|
|
102
|
-
get: function () {
|
|
103
|
-
return HeadlineVariantMap;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(exports, 'TextStyleVariantMap', {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
get: function () {
|
|
109
|
-
return TextStyleVariantMap;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(exports, 'TextVariantMap', {
|
|
113
|
-
enumerable: true,
|
|
114
|
-
get: function () {
|
|
115
|
-
return TextVariantMap;
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(exports, 'getVariantPlaceholderClassNames', {
|
|
119
|
-
enumerable: true,
|
|
120
|
-
get: function () {
|
|
121
|
-
return getVariantPlaceholderClassNames;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
//#region src/components/Text/textVariantClasses.ts
|
|
2
|
-
const HeadlineVariantMap = {
|
|
3
|
-
t1: {
|
|
4
|
-
"spiffy-headline": true,
|
|
5
|
-
"spiffy-headline-1": true,
|
|
6
|
-
"spiffy-tw-text-[32px]": true,
|
|
7
|
-
"spiffy-tw-font-medium": true,
|
|
8
|
-
"spiffy-tw-leading-[124%]": true
|
|
9
|
-
},
|
|
10
|
-
t2: {
|
|
11
|
-
"spiffy-headline": true,
|
|
12
|
-
"spiffy-headline-1": true,
|
|
13
|
-
"spiffy-tw-text-[16px]": true,
|
|
14
|
-
"spiffy-tw-font-medium": true,
|
|
15
|
-
"spiffy-tw-leading-[124%]": true
|
|
16
|
-
},
|
|
17
|
-
t3: {
|
|
18
|
-
"spiffy-headline": true,
|
|
19
|
-
"spiffy-headline-1": true,
|
|
20
|
-
"spiffy-tw-text-[24px]": true,
|
|
21
|
-
"spiffy-tw-leading-[120%]": true
|
|
22
|
-
},
|
|
23
|
-
h1: {
|
|
24
|
-
"spiffy-headline": true,
|
|
25
|
-
"spiffy-headline-1": true,
|
|
26
|
-
"spiffy-tw-text-[20px]": true,
|
|
27
|
-
"spiffy-tw-font-normal": true,
|
|
28
|
-
"spiffy-tw-leading-[120%]": true
|
|
29
|
-
},
|
|
30
|
-
h2: {
|
|
31
|
-
"spiffy-headline": true,
|
|
32
|
-
"spiffy-headline-2": true,
|
|
33
|
-
"spiffy-tw-text-[16px]": true,
|
|
34
|
-
"spiffy-tw-font-normal": true,
|
|
35
|
-
"spiffy-tw-leading-[124%]": true
|
|
36
|
-
},
|
|
37
|
-
h3: {
|
|
38
|
-
"spiffy-headline": true,
|
|
39
|
-
"spiffy-headline-3": true,
|
|
40
|
-
"spiffy-tw-text-[15px]": true,
|
|
41
|
-
"spiffy-tw-font-medium": true,
|
|
42
|
-
"spiffy-tw-leading-[124%]": true
|
|
43
|
-
},
|
|
44
|
-
h4: {
|
|
45
|
-
"spiffy-headline": true,
|
|
46
|
-
"spiffy-headline-4": true,
|
|
47
|
-
"spiffy-tw-text-[14px]": true,
|
|
48
|
-
"spiffy-tw-font-medium": true,
|
|
49
|
-
"spiffy-tw-leading-[124%]": true
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const TextVariantMap = {
|
|
53
|
-
body1: {
|
|
54
|
-
"spiffy-body-text": true,
|
|
55
|
-
"spiffy-body-1": true,
|
|
56
|
-
"spiffy-tw-text-[20px]": true,
|
|
57
|
-
"spiffy-tw-font-normal": true,
|
|
58
|
-
"spiffy-tw-line-height-[120%]": true
|
|
59
|
-
},
|
|
60
|
-
body2: {
|
|
61
|
-
"spiffy-body-text": true,
|
|
62
|
-
"spiffy-body-2": true,
|
|
63
|
-
"spiffy-tw-text-[16px]": true,
|
|
64
|
-
"spiffy-tw-font-normal": true,
|
|
65
|
-
"spiffy-tw-line-height-[148%]": true
|
|
66
|
-
},
|
|
67
|
-
body3: {
|
|
68
|
-
"spiffy-body-text": true,
|
|
69
|
-
"spiffy-body-3": true,
|
|
70
|
-
"spiffy-tw-text-sm": true,
|
|
71
|
-
"spiffy-tw-font-normal": true,
|
|
72
|
-
"spiffy-tw-leading-[140%]": true
|
|
73
|
-
},
|
|
74
|
-
body4: {
|
|
75
|
-
"spiffy-body-text": true,
|
|
76
|
-
"spiffy-body-4": true,
|
|
77
|
-
"spiffy-tw-text-xs": true,
|
|
78
|
-
"spiffy-tw-font-medium": true,
|
|
79
|
-
"spiffy-tw-leading-[130%]": true
|
|
80
|
-
},
|
|
81
|
-
body5: {
|
|
82
|
-
"spiffy-body-text": true,
|
|
83
|
-
"spiffy-body-5": true,
|
|
84
|
-
"spiffy-tw-text-[10px]": true,
|
|
85
|
-
"spiffy-tw-font-normal": true
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const TextStyleVariantMap = {
|
|
89
|
-
...TextVariantMap,
|
|
90
|
-
...HeadlineVariantMap
|
|
91
|
-
};
|
|
92
|
-
const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
|
|
93
|
-
if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
|
|
94
|
-
else acc[`${key}-placeholder`] = classes[key];
|
|
95
|
-
return acc;
|
|
96
|
-
}, {});
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
export { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames };
|
package/dist/types-CTOdb0G0.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import { HeadlineVariantMap } from '../Text/textVariantClasses';
|
|
3
|
-
|
|
4
|
-
export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
5
|
-
|
|
6
|
-
export type HeadlineProps = {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
variant?: HeadlineVariant;
|
|
11
|
-
testId?: string;
|
|
12
|
-
id?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Headline = ({ children, className, style, testId, variant = 'h1' }: HeadlineProps) => {
|
|
16
|
-
const variantClassNames = variant ? HeadlineVariantMap[variant] : {};
|
|
17
|
-
const textClassNames = classNames(className, variantClassNames, {
|
|
18
|
-
'spiffy-tw-font-[Poppins,sans-serif]': true,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const T1 = () => (
|
|
22
|
-
<h1 data-testid={testId} className={textClassNames} style={style}>
|
|
23
|
-
{children}
|
|
24
|
-
</h1>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const T2 = () => (
|
|
28
|
-
<h2 data-testid={testId} className={textClassNames} style={style}>
|
|
29
|
-
{children}
|
|
30
|
-
</h2>
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const T3 = () => (
|
|
34
|
-
<h3 data-testid={testId} className={textClassNames} style={style}>
|
|
35
|
-
{children}
|
|
36
|
-
</h3>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const H1 = () => (
|
|
40
|
-
<h1 data-testid={testId} className={textClassNames} style={style}>
|
|
41
|
-
{children}
|
|
42
|
-
</h1>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
const H2 = () => (
|
|
46
|
-
<h2 data-testid={testId} className={textClassNames} style={style}>
|
|
47
|
-
{children}
|
|
48
|
-
</h2>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const H3 = () => (
|
|
52
|
-
<h3 data-testid={testId} className={textClassNames} style={style}>
|
|
53
|
-
{children}
|
|
54
|
-
</h3>
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const H4 = () => (
|
|
58
|
-
<h4 data-testid={testId} className={textClassNames} style={style}>
|
|
59
|
-
{children}
|
|
60
|
-
</h4>
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
switch (variant) {
|
|
64
|
-
case 't1':
|
|
65
|
-
return T1();
|
|
66
|
-
case 't2':
|
|
67
|
-
return T2();
|
|
68
|
-
case 't3':
|
|
69
|
-
return T3();
|
|
70
|
-
case 'h1':
|
|
71
|
-
return H1();
|
|
72
|
-
case 'h2':
|
|
73
|
-
return H2();
|
|
74
|
-
case 'h3':
|
|
75
|
-
return H3();
|
|
76
|
-
case 'h4':
|
|
77
|
-
return H4();
|
|
78
|
-
default:
|
|
79
|
-
throw new Error(`Invalid variant: ${variant}`);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Headline';
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import { type TextType, type TextVariant } from './types';
|
|
3
|
-
import { TextVariantMap } from './textVariantClasses';
|
|
4
|
-
|
|
5
|
-
type TextProps = {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
noOfLines?: number;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
variant?: TextVariant;
|
|
11
|
-
type?: TextType;
|
|
12
|
-
testId?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Text = ({
|
|
16
|
-
children,
|
|
17
|
-
className,
|
|
18
|
-
style,
|
|
19
|
-
noOfLines,
|
|
20
|
-
testId,
|
|
21
|
-
type = 'span',
|
|
22
|
-
variant = 'body3',
|
|
23
|
-
}: TextProps) => {
|
|
24
|
-
const variantClassNames = variant ? TextVariantMap[variant] : {};
|
|
25
|
-
const textClassNames = classNames(className, variantClassNames, {
|
|
26
|
-
'spiffy-tw-font-["Inter Variable,sans-serif"]': true,
|
|
27
|
-
'spiffy-tw-line-clamp-1': noOfLines === 1,
|
|
28
|
-
'spiffy-tw-line-clamp-2': noOfLines === 2,
|
|
29
|
-
'spiffy-tw-line-clamp-3': noOfLines === 3,
|
|
30
|
-
'spiffy-tw-line-clamp-4': noOfLines === 4,
|
|
31
|
-
'spiffy-tw-line-clamp-5': noOfLines === 5,
|
|
32
|
-
'spiffy-tw-line-clamp-6': noOfLines === 6,
|
|
33
|
-
'spiffy-tw-line-clamp-7': noOfLines === 7,
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
switch (type) {
|
|
37
|
-
case 'p':
|
|
38
|
-
return (
|
|
39
|
-
<p data-testid={testId} className={textClassNames} style={style}>
|
|
40
|
-
{children}
|
|
41
|
-
</p>
|
|
42
|
-
);
|
|
43
|
-
case 'span':
|
|
44
|
-
return (
|
|
45
|
-
<span data-testid={testId} className={textClassNames} style={style}>
|
|
46
|
-
{children}
|
|
47
|
-
</span>
|
|
48
|
-
);
|
|
49
|
-
case 'sub':
|
|
50
|
-
return (
|
|
51
|
-
<sub data-testid={testId} className={textClassNames} style={style}>
|
|
52
|
-
{children}
|
|
53
|
-
</sub>
|
|
54
|
-
);
|
|
55
|
-
default:
|
|
56
|
-
throw new Error(`Invalid text type: ${type}`);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export enum ExpandableTextOverrides {
|
|
2
|
-
EXPANDABLE_TEXT_CONTAINER = 'spiffy-expandable-text-container',
|
|
3
|
-
EXPANDABLE_TEXT = 'spiffy-expandable-text',
|
|
4
|
-
EXPANDABLE_BUTTON = 'spiffy-expandable-button',
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// This is an incomplete list of text variants
|
|
8
|
-
// TODO: add the rest of the variants as needed
|
|
9
|
-
export type TextVariant = 'body1' | 'body2' | 'body3' | 'body4' | 'body5';
|
|
10
|
-
export type TextType = 'p' | 'span' | 'sub';
|
|
11
|
-
|
|
12
|
-
export type HeadlineProps = {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
className?: string;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
variant?: HeadlineVariant;
|
|
17
|
-
testId?: string;
|
|
18
|
-
id?: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// This is an incomplete list of text variants
|
|
22
|
-
// TODO: add the rest of the variants as needed
|
|
23
|
-
export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|