groundfloor-react-ui 1.0.18 → 1.0.21
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/components/Accordion/Accordion.js +83 -33
- package/components/Accordion/AccordionSB.js +50 -54
- package/components/Accordion/AccordionSBfooter.js +51 -55
- package/components/ArrowBar/ArrowBar.js +6 -23
- package/components/Avatar/Avatar.js +49 -45
- package/components/Avatar/AvatarSB.js +121 -92
- package/components/Avatar/AvatarSBfooter.js +113 -92
- package/components/Banner/Banner.js +40 -35
- package/components/Breadcrumb/Breadcrumb.js +178 -163
- package/components/Button/PrimaryButton.js +15 -8
- package/components/Button/SecondaryButton.js +11 -9
- package/components/Cards/Card.js +25 -30
- package/components/Cards/CardRef.js +41 -34
- package/components/Cards/DocumentCard.js +83 -89
- package/components/Divider/Divider.js +23 -30
- package/components/Drawer/Drawer.js +46 -55
- package/components/FilterChip/FilterChip.js +34 -32
- package/components/Form/HeaderComponent.js +57 -27
- package/components/GroupAvatars/GroupAvatars.js +12 -16
- package/components/GroupButtons/GroupButtonsPopup.js +3 -9
- package/components/Images/Image.js +16 -21
- package/components/Inputs/CheckBoxInput.js +71 -33
- package/components/Inputs/DateSelect.js +22 -17
- package/components/Inputs/DropdownSelect.js +86 -30
- package/components/Inputs/DropzoneInput.js +83 -68
- package/components/Inputs/NumericInput.js +66 -63
- package/components/Inputs/PasswordInput.js +36 -27
- package/components/Inputs/RadioInput.js +55 -29
- package/components/Inputs/Signature.js +88 -38
- package/components/Inputs/TextArea.js +24 -40
- package/components/Inputs/TextInput.js +43 -28
- package/components/Inputs/TimeInput.js +92 -107
- package/components/Inputs/ToggleSwitch.js +87 -59
- package/components/Modal/ModalComp.js +61 -37
- package/components/Pagination/Pagination.js +30 -54
- package/components/ProgressBar/ProgressBar.js +57 -40
- package/components/Rating/Rating.js +8 -14
- package/components/Sidebar/Navbar.js +196 -170
- package/components/Tables/Table.js +56 -34
- package/components/Tooltip/Tooltip.js +135 -141
- package/components/Typography/Typography.js +9 -10
- package/components/constants/defaultStyle.js +38 -41
- package/dist/index.es.js +675 -596
- package/dist/index.js +660 -581
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import defaultStyles from '../constants/defaultStyle';
|
|
5
|
-
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Primary UI component for user interaction
|
|
9
9
|
*/
|
|
10
10
|
const TooltipContainer = styled.div`
|
|
11
|
-
${({
|
|
12
|
-
if (
|
|
11
|
+
${({ inBuiltCss, type, customStylesTPContainer }) => {
|
|
12
|
+
if (inBuiltCss) {
|
|
13
13
|
let tempObj = {};
|
|
14
|
-
if (
|
|
15
|
-
for (const property in
|
|
16
|
-
tempObj[property] =
|
|
14
|
+
if (inBuiltCss['tooltip-container']) {
|
|
15
|
+
for (const property in inBuiltCss['common']) {
|
|
16
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
17
17
|
}
|
|
18
|
-
for (const property in
|
|
19
|
-
tempObj[property] =
|
|
20
|
-
delete
|
|
18
|
+
for (const property in inBuiltCss['tooltip-container']) {
|
|
19
|
+
tempObj[property] = inBuiltCss['tooltip-container'][property]
|
|
20
|
+
delete inBuiltCss.common[property]
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
return { ...tempObj, ...customStylesTPContainer };
|
|
@@ -25,16 +25,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
25
25
|
}}
|
|
26
26
|
|
|
27
27
|
&[data-popper-placement*='bottom'] .tooltip-arrow {
|
|
28
|
-
${({
|
|
29
|
-
if (
|
|
28
|
+
${({ inBuiltCss, type, customStylesTPAbottom }) => {
|
|
29
|
+
if (inBuiltCss) {
|
|
30
30
|
let tempObj = {};
|
|
31
|
-
if (
|
|
32
|
-
for (const property in
|
|
33
|
-
tempObj[property] =
|
|
31
|
+
if (inBuiltCss['tp-cont-bottom-arrow']) {
|
|
32
|
+
for (const property in inBuiltCss['common']) {
|
|
33
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
34
34
|
}
|
|
35
|
-
for (const property in
|
|
36
|
-
tempObj[property] =
|
|
37
|
-
delete
|
|
35
|
+
for (const property in inBuiltCss['tp-cont-bottom-arrow']) {
|
|
36
|
+
tempObj[property] = inBuiltCss['tp-cont-bottom-arrow'][property]
|
|
37
|
+
delete inBuiltCss.common[property]
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
return { ...tempObj, ...customStylesTPAbottom };
|
|
@@ -43,16 +43,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&[data-popper-placement*='bottom'] .tooltip-arrow::before {
|
|
46
|
-
${({
|
|
47
|
-
if (
|
|
46
|
+
${({ inBuiltCss, type, customStylesTPAbottomBefore }) => {
|
|
47
|
+
if (inBuiltCss) {
|
|
48
48
|
let tempObj = {};
|
|
49
|
-
if (
|
|
50
|
-
for (const property in
|
|
51
|
-
tempObj[property] =
|
|
49
|
+
if (inBuiltCss['tp-cont-bottom-arrow-before']) {
|
|
50
|
+
for (const property in inBuiltCss['common']) {
|
|
51
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
52
52
|
}
|
|
53
|
-
for (const property in
|
|
54
|
-
tempObj[property] =
|
|
55
|
-
delete
|
|
53
|
+
for (const property in inBuiltCss['tp-cont-bottom-arrow-before']) {
|
|
54
|
+
tempObj[property] = inBuiltCss['tp-cont-bottom-arrow-before'][property]
|
|
55
|
+
delete inBuiltCss.common[property]
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return { ...tempObj, ...customStylesTPAbottomBefore };
|
|
@@ -61,16 +61,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&[data-popper-placement*='bottom'] .tooltip-arrow::after {
|
|
64
|
-
${({
|
|
65
|
-
if (
|
|
64
|
+
${({ inBuiltCss, type, customStylesTPAbottomAfter }) => {
|
|
65
|
+
if (inBuiltCss) {
|
|
66
66
|
let tempObj = {};
|
|
67
|
-
if (
|
|
68
|
-
for (const property in
|
|
69
|
-
tempObj[property] =
|
|
67
|
+
if (inBuiltCss['tp-cont-bottom-arrow-before']) {
|
|
68
|
+
for (const property in inBuiltCss['common']) {
|
|
69
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
70
70
|
}
|
|
71
|
-
for (const property in
|
|
72
|
-
tempObj[property] =
|
|
73
|
-
delete
|
|
71
|
+
for (const property in inBuiltCss['tp-cont-bottom-arrow-after']) {
|
|
72
|
+
tempObj[property] = inBuiltCss['tp-cont-bottom-arrow-after'][property]
|
|
73
|
+
delete inBuiltCss.common[property]
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
return { ...tempObj, ...customStylesTPAbottomAfter };
|
|
@@ -78,16 +78,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
78
78
|
}}
|
|
79
79
|
}
|
|
80
80
|
&[data-popper-placement*='top'] .tooltip-arrow {
|
|
81
|
-
${({
|
|
82
|
-
if (
|
|
81
|
+
${({ inBuiltCss, type, customStylesTPAtop }) => {
|
|
82
|
+
if (inBuiltCss) {
|
|
83
83
|
let tempObj = {};
|
|
84
|
-
if (
|
|
85
|
-
for (const property in
|
|
86
|
-
tempObj[property] =
|
|
84
|
+
if (inBuiltCss['tp-cont-top-arrow']) {
|
|
85
|
+
for (const property in inBuiltCss['common']) {
|
|
86
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
87
87
|
}
|
|
88
|
-
for (const property in
|
|
89
|
-
tempObj[property] =
|
|
90
|
-
delete
|
|
88
|
+
for (const property in inBuiltCss['tp-cont-top-arrow']) {
|
|
89
|
+
tempObj[property] = inBuiltCss['tp-cont-top-arrow'][property]
|
|
90
|
+
delete inBuiltCss.common[property]
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
return { ...tempObj, ...customStylesTPAtop };
|
|
@@ -95,16 +95,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
95
95
|
}}
|
|
96
96
|
}
|
|
97
97
|
&[data-popper-placement*='top'] .tooltip-arrow::before {
|
|
98
|
-
${({
|
|
99
|
-
if (
|
|
98
|
+
${({ inBuiltCss, type, customStylesTPAtopBefore }) => {
|
|
99
|
+
if (inBuiltCss) {
|
|
100
100
|
let tempObj = {};
|
|
101
|
-
if (
|
|
102
|
-
for (const property in
|
|
103
|
-
tempObj[property] =
|
|
101
|
+
if (inBuiltCss['tp-cont-top-arrow-before']) {
|
|
102
|
+
for (const property in inBuiltCss['common']) {
|
|
103
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
104
104
|
}
|
|
105
|
-
for (const property in
|
|
106
|
-
tempObj[property] =
|
|
107
|
-
delete
|
|
105
|
+
for (const property in inBuiltCss['tp-cont-top-arrow-before']) {
|
|
106
|
+
tempObj[property] = inBuiltCss['tp-cont-top-arrow-before'][property]
|
|
107
|
+
delete inBuiltCss.common[property]
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
return { ...tempObj, ...customStylesTPAtopBefore };
|
|
@@ -112,16 +112,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
112
112
|
}}
|
|
113
113
|
}
|
|
114
114
|
&[data-popper-placement*='top'] .tooltip-arrow::after {
|
|
115
|
-
${({
|
|
116
|
-
if (
|
|
115
|
+
${({ inBuiltCss, type, customStylesTPAtopAfter }) => {
|
|
116
|
+
if (inBuiltCss) {
|
|
117
117
|
let tempObj = {};
|
|
118
|
-
if (
|
|
119
|
-
for (const property in
|
|
120
|
-
tempObj[property] =
|
|
118
|
+
if (inBuiltCss['tp-cont-top-arrow-before']) {
|
|
119
|
+
for (const property in inBuiltCss['common']) {
|
|
120
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
121
121
|
}
|
|
122
|
-
for (const property in
|
|
123
|
-
tempObj[property] =
|
|
124
|
-
delete
|
|
122
|
+
for (const property in inBuiltCss['tp-cont-top-arrow-after']) {
|
|
123
|
+
tempObj[property] = inBuiltCss['tp-cont-top-arrow-after'][property]
|
|
124
|
+
delete inBuiltCss.common[property]
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
return { ...tempObj, ...customStylesTPAtopAfter };
|
|
@@ -129,16 +129,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
129
129
|
}}
|
|
130
130
|
}
|
|
131
131
|
&[data-popper-placement*='right'] .tooltip-arrow {
|
|
132
|
-
${({
|
|
133
|
-
if (
|
|
132
|
+
${({ inBuiltCss, type, customStylesTPAright }) => {
|
|
133
|
+
if (inBuiltCss) {
|
|
134
134
|
let tempObj = {};
|
|
135
|
-
if (
|
|
136
|
-
for (const property in
|
|
137
|
-
tempObj[property] =
|
|
135
|
+
if (inBuiltCss['tp-cont-right-arrow']) {
|
|
136
|
+
for (const property in inBuiltCss['common']) {
|
|
137
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
138
138
|
}
|
|
139
|
-
for (const property in
|
|
140
|
-
tempObj[property] =
|
|
141
|
-
delete
|
|
139
|
+
for (const property in inBuiltCss['tp-cont-right-arrow']) {
|
|
140
|
+
tempObj[property] = inBuiltCss['tp-cont-right-arrow'][property]
|
|
141
|
+
delete inBuiltCss.common[property]
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
return { ...tempObj, ...customStylesTPAright };
|
|
@@ -146,16 +146,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
146
146
|
}}
|
|
147
147
|
}
|
|
148
148
|
&[data-popper-placement*='right'] .tooltip-arrow::before {
|
|
149
|
-
${({
|
|
150
|
-
if (
|
|
149
|
+
${({ inBuiltCss, type, customStylesTPArightBefore }) => {
|
|
150
|
+
if (inBuiltCss) {
|
|
151
151
|
let tempObj = {};
|
|
152
|
-
if (
|
|
153
|
-
for (const property in
|
|
154
|
-
tempObj[property] =
|
|
152
|
+
if (inBuiltCss['tp-cont-right-arrow-before']) {
|
|
153
|
+
for (const property in inBuiltCss['common']) {
|
|
154
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
155
155
|
}
|
|
156
|
-
for (const property in
|
|
157
|
-
tempObj[property] =
|
|
158
|
-
delete
|
|
156
|
+
for (const property in inBuiltCss['tp-cont-right-arrow-before']) {
|
|
157
|
+
tempObj[property] = inBuiltCss['tp-cont-right-arrow-before'][property]
|
|
158
|
+
delete inBuiltCss.common[property]
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
return { ...tempObj, ...customStylesTPArightBefore };
|
|
@@ -163,16 +163,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
163
163
|
}}
|
|
164
164
|
}
|
|
165
165
|
&[data-popper-placement*='right'] .tooltip-arrow::after {
|
|
166
|
-
${({
|
|
167
|
-
if (
|
|
166
|
+
${({ inBuiltCss, type, customStylesTPArightAfter }) => {
|
|
167
|
+
if (inBuiltCss) {
|
|
168
168
|
let tempObj = {};
|
|
169
|
-
if (
|
|
170
|
-
for (const property in
|
|
171
|
-
tempObj[property] =
|
|
169
|
+
if (inBuiltCss['tp-cont-right-arrow-before']) {
|
|
170
|
+
for (const property in inBuiltCss['common']) {
|
|
171
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
172
172
|
}
|
|
173
|
-
for (const property in
|
|
174
|
-
tempObj[property] =
|
|
175
|
-
delete
|
|
173
|
+
for (const property in inBuiltCss['tp-cont-right-arrow-after']) {
|
|
174
|
+
tempObj[property] = inBuiltCss['tp-cont-right-arrow-after'][property]
|
|
175
|
+
delete inBuiltCss.common[property]
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
return { ...tempObj, ...customStylesTPArightAfter };
|
|
@@ -180,16 +180,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
180
180
|
}}
|
|
181
181
|
}
|
|
182
182
|
&[data-popper-placement*='left'] .tooltip-arrow {
|
|
183
|
-
${({
|
|
184
|
-
if (
|
|
183
|
+
${({ inBuiltCss, type, customStylesTPAleft }) => {
|
|
184
|
+
if (inBuiltCss) {
|
|
185
185
|
let tempObj = {};
|
|
186
|
-
if (
|
|
187
|
-
for (const property in
|
|
188
|
-
tempObj[property] =
|
|
186
|
+
if (inBuiltCss['tp-cont-left-arrow']) {
|
|
187
|
+
for (const property in inBuiltCss['common']) {
|
|
188
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
189
189
|
}
|
|
190
|
-
for (const property in
|
|
191
|
-
tempObj[property] =
|
|
192
|
-
delete
|
|
190
|
+
for (const property in inBuiltCss['tp-cont-left-arrow']) {
|
|
191
|
+
tempObj[property] = inBuiltCss['tp-cont-left-arrow'][property]
|
|
192
|
+
delete inBuiltCss.common[property]
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
return { ...tempObj, ...customStylesTPAleft };
|
|
@@ -197,16 +197,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
197
197
|
}}
|
|
198
198
|
}
|
|
199
199
|
&[data-popper-placement*='left'] .tooltip-arrow::before {
|
|
200
|
-
${({
|
|
201
|
-
if (
|
|
200
|
+
${({ inBuiltCss, type, customStylesTPAleftBefore }) => {
|
|
201
|
+
if (inBuiltCss) {
|
|
202
202
|
let tempObj = {};
|
|
203
|
-
if (
|
|
204
|
-
for (const property in
|
|
205
|
-
tempObj[property] =
|
|
203
|
+
if (inBuiltCss['tp-cont-left-arrow-before']) {
|
|
204
|
+
for (const property in inBuiltCss['common']) {
|
|
205
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
206
206
|
}
|
|
207
|
-
for (const property in
|
|
208
|
-
tempObj[property] =
|
|
209
|
-
delete
|
|
207
|
+
for (const property in inBuiltCss['tp-cont-left-arrow-before']) {
|
|
208
|
+
tempObj[property] = inBuiltCss['tp-cont-left-arrow-before'][property]
|
|
209
|
+
delete inBuiltCss.common[property]
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
return { ...tempObj, ...customStylesTPAleftBefore };
|
|
@@ -214,16 +214,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
214
214
|
}}
|
|
215
215
|
}
|
|
216
216
|
&[data-popper-placement*='left'] .tooltip-arrow::after {
|
|
217
|
-
${({
|
|
218
|
-
if (
|
|
217
|
+
${({ inBuiltCss, type, customStylesTPAleftAfter }) => {
|
|
218
|
+
if (inBuiltCss) {
|
|
219
219
|
let tempObj = {};
|
|
220
|
-
if (
|
|
221
|
-
for (const property in
|
|
222
|
-
tempObj[property] =
|
|
220
|
+
if (inBuiltCss['tp-cont-left-arrow-before']) {
|
|
221
|
+
for (const property in inBuiltCss['common']) {
|
|
222
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
223
223
|
}
|
|
224
|
-
for (const property in
|
|
225
|
-
tempObj[property] =
|
|
226
|
-
delete
|
|
224
|
+
for (const property in inBuiltCss['tp-cont-left-arrow-after']) {
|
|
225
|
+
tempObj[property] = inBuiltCss['tp-cont-left-arrow-after'][property]
|
|
226
|
+
delete inBuiltCss.common[property]
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
return { ...tempObj, ...customStylesTPAleftAfter };
|
|
@@ -234,16 +234,16 @@ ${({ theme, type, customStylesTPContainer }) => {
|
|
|
234
234
|
|
|
235
235
|
const TooltipArrow = styled.div`
|
|
236
236
|
|
|
237
|
-
${({
|
|
238
|
-
if (
|
|
237
|
+
${({ inBuiltCss, type, customStylesTPArrow }) => {
|
|
238
|
+
if (inBuiltCss) {
|
|
239
239
|
let tempObj = {};
|
|
240
|
-
if (
|
|
241
|
-
for (const property in
|
|
242
|
-
tempObj[property] =
|
|
240
|
+
if (inBuiltCss['tooltip-arrow']) {
|
|
241
|
+
for (const property in inBuiltCss['common']) {
|
|
242
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
243
243
|
}
|
|
244
|
-
for (const property in
|
|
245
|
-
tempObj[property] =
|
|
246
|
-
delete
|
|
244
|
+
for (const property in inBuiltCss['tooltip-arrow']) {
|
|
245
|
+
tempObj[property] = inBuiltCss['tooltip-arrow'][property]
|
|
246
|
+
delete inBuiltCss.common[property]
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
return { ...tempObj, ...customStylesTPArrow };
|
|
@@ -252,16 +252,16 @@ ${({ theme, type, customStylesTPArrow }) => {
|
|
|
252
252
|
|
|
253
253
|
|
|
254
254
|
&::before{
|
|
255
|
-
${({
|
|
256
|
-
if (
|
|
255
|
+
${({ inBuiltCss, type, customStylesTPAbefore }) => {
|
|
256
|
+
if (inBuiltCss) {
|
|
257
257
|
let tempObj = {};
|
|
258
|
-
if (
|
|
259
|
-
for (const property in
|
|
260
|
-
tempObj[property] =
|
|
258
|
+
if (inBuiltCss['tooltip-arrow-before']) {
|
|
259
|
+
for (const property in inBuiltCss['common']) {
|
|
260
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
261
261
|
}
|
|
262
|
-
for (const property in
|
|
263
|
-
tempObj[property] =
|
|
264
|
-
delete
|
|
262
|
+
for (const property in inBuiltCss['tooltip-arrow-before']) {
|
|
263
|
+
tempObj[property] = inBuiltCss['tooltip-arrow-before'][property]
|
|
264
|
+
delete inBuiltCss.common[property]
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
return { ...tempObj, ...customStylesTPAbefore };
|
|
@@ -270,16 +270,16 @@ ${({ theme, type, customStylesTPArrow }) => {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
&::after{
|
|
273
|
-
${({
|
|
274
|
-
if (
|
|
273
|
+
${({ inBuiltCss, type, customStylesTPAafter }) => {
|
|
274
|
+
if (inBuiltCss) {
|
|
275
275
|
let tempObj = {};
|
|
276
|
-
if (
|
|
277
|
-
for (const property in
|
|
278
|
-
tempObj[property] =
|
|
276
|
+
if (inBuiltCss['tooltip-arrow-after']) {
|
|
277
|
+
for (const property in inBuiltCss['common']) {
|
|
278
|
+
tempObj[property] = inBuiltCss['common'][property]
|
|
279
279
|
}
|
|
280
|
-
for (const property in
|
|
281
|
-
tempObj[property] =
|
|
282
|
-
delete
|
|
280
|
+
for (const property in inBuiltCss['tooltip-arrow-after']) {
|
|
281
|
+
tempObj[property] = inBuiltCss['tooltip-arrow-after'][property]
|
|
282
|
+
delete inBuiltCss.common[property]
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
return { ...tempObj, ...customStylesTPAafter };
|
|
@@ -289,7 +289,7 @@ ${({ theme, type, customStylesTPArrow }) => {
|
|
|
289
289
|
`;
|
|
290
290
|
|
|
291
291
|
export const Tooltip = ({
|
|
292
|
-
|
|
292
|
+
inBuiltCss,
|
|
293
293
|
contentTrigger,
|
|
294
294
|
contentTooltip,
|
|
295
295
|
popperOptionsP,
|
|
@@ -345,7 +345,7 @@ export const Tooltip = ({
|
|
|
345
345
|
</div>
|
|
346
346
|
{visible && (
|
|
347
347
|
<TooltipContainer
|
|
348
|
-
|
|
348
|
+
inBuiltCss={defaultStyles}
|
|
349
349
|
ref={setTooltipRef}
|
|
350
350
|
{...getTooltipProps({ className: 'tooltip-container' })}
|
|
351
351
|
customStylesTPContainer={customStylesTPContainer}
|
|
@@ -363,7 +363,7 @@ export const Tooltip = ({
|
|
|
363
363
|
customStylesTPAleftAfter={customStylesTPAleftAfter}
|
|
364
364
|
>
|
|
365
365
|
<TooltipArrow
|
|
366
|
-
|
|
366
|
+
inBuiltCss={defaultStyles}
|
|
367
367
|
{...getArrowProps({ className: 'tooltip-arrow' })}
|
|
368
368
|
customStylesTPArrow={customStylesTPArrow}
|
|
369
369
|
customStylesTPAbefore={customStylesTPAbefore}
|
|
@@ -377,10 +377,7 @@ export const Tooltip = ({
|
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
Tooltip.propTypes = {
|
|
380
|
-
|
|
381
|
-
* Theme object
|
|
382
|
-
*/
|
|
383
|
-
theme: PropTypes.object,
|
|
380
|
+
|
|
384
381
|
/**
|
|
385
382
|
* The element where to attach the tooltip
|
|
386
383
|
*/
|
|
@@ -470,9 +467,6 @@ Tooltip.propTypes = {
|
|
|
470
467
|
};
|
|
471
468
|
|
|
472
469
|
Tooltip.defaultProps = {
|
|
473
|
-
theme: defaultStyles,
|
|
474
470
|
contentTrigger: <div>Trigger</div>,
|
|
475
471
|
contentTooltip: <div>I am the tooltip</div>,
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
export default Tooltip;
|
|
472
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import styled, { useTheme } from 'styled-components';
|
|
4
|
-
import FontStyles from '../global/FontStyle';
|
|
5
4
|
import defaultThemeColor from '../constants/defaultThemeColor';
|
|
5
|
+
import FontStyles from '../global/FontStyle';
|
|
6
6
|
|
|
7
7
|
const sizes = {
|
|
8
8
|
xs: {
|
|
@@ -25,20 +25,23 @@ const sizes = {
|
|
|
25
25
|
|
|
26
26
|
const Box = styled.div`
|
|
27
27
|
color: ${({ theme, text }) => text ? theme.variant[text] : theme.textColor};
|
|
28
|
-
background: ${({ theme, bg }) => bg ? theme.variant[bg] : theme.bgColor};
|
|
28
|
+
// background: ${({ theme, bg }) => bg ? theme.variant[bg] : theme.bgColor};
|
|
29
29
|
font-size: ${({ size }) => sizes[size].fontSize};
|
|
30
30
|
line-height: ${({ size }) => sizes[size].lineHeight};
|
|
31
31
|
`
|
|
32
32
|
|
|
33
33
|
export const Typography = ({ size, children, bg, text, ...props }) => {
|
|
34
|
+
const activeTheme = useTheme() || defaultThemeColor
|
|
35
|
+
|
|
34
36
|
return (
|
|
35
37
|
<Box
|
|
38
|
+
theme={activeTheme}
|
|
36
39
|
bg={bg}
|
|
37
40
|
text={text}
|
|
38
41
|
size={size}
|
|
39
42
|
{...props}
|
|
40
43
|
>
|
|
41
|
-
<FontStyles />
|
|
44
|
+
<FontStyles theme={activeTheme} />
|
|
42
45
|
{children}
|
|
43
46
|
</Box>
|
|
44
47
|
);
|
|
@@ -67,12 +70,8 @@ Typography.propTypes = {
|
|
|
67
70
|
theme: PropTypes.object,
|
|
68
71
|
};
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
theme: defaultThemeColor,
|
|
72
|
-
};
|
|
73
|
+
|
|
73
74
|
|
|
74
75
|
Typography.defaultProps = {
|
|
75
|
-
theme: defaultThemeColor,
|
|
76
76
|
size: 'md',
|
|
77
|
-
};
|
|
78
|
-
|
|
77
|
+
};
|
|
@@ -27,47 +27,31 @@ const defaultStyles = {
|
|
|
27
27
|
color: 'red',
|
|
28
28
|
'border-color': 'black',
|
|
29
29
|
},
|
|
30
|
-
/**
|
|
31
|
-
* Default Style of the card
|
|
32
|
-
*/
|
|
33
|
-
card: {
|
|
34
|
-
color: `${defaultThemeColor.textColor}`,
|
|
35
|
-
'padding-top': '25px',
|
|
36
|
-
'padding-bottom': '25px',
|
|
37
|
-
'padding-left': '32px',
|
|
38
|
-
'padding-right': '32px',
|
|
39
|
-
'background-color': `${defaultThemeColor.bgColor}`,
|
|
40
|
-
width: 'inherit',
|
|
41
|
-
height: 'inherit',
|
|
42
|
-
'border-color': `${defaultThemeColor.neutral['neutral-4']}`,
|
|
43
|
-
'border-radius': '5px',
|
|
44
|
-
'box-shadow': '0px 5px 37px rgba(56, 66, 100, 0.0880136)',
|
|
45
|
-
},
|
|
46
30
|
|
|
47
31
|
/**
|
|
48
32
|
* Default Style of the progressBar
|
|
49
33
|
*/
|
|
50
|
-
progressWrapper: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
34
|
+
// progressWrapper: {
|
|
35
|
+
// height: '10px',
|
|
36
|
+
// 'border-radius': '10px',
|
|
37
|
+
// 'margin-top': '13px',
|
|
38
|
+
// 'margin-left': '13px',
|
|
39
|
+
// 'margin-right': '13px',
|
|
40
|
+
// width: 'inherit',
|
|
41
|
+
// 'background-color': `${defaultThemeColor.primary['primary-1']}`,
|
|
42
|
+
// },
|
|
59
43
|
|
|
60
44
|
/**
|
|
61
45
|
* Default Style of the progressBar Container
|
|
62
46
|
*/
|
|
63
|
-
containerWrapper: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
47
|
+
// containerWrapper: {
|
|
48
|
+
// height: 'inherit',
|
|
49
|
+
// width: 'inherit',
|
|
50
|
+
// transition: 'width 1s ease-in-out',
|
|
51
|
+
// 'border-radius': 'inherit',
|
|
52
|
+
// 'text-align': 'right',
|
|
53
|
+
// 'background-color': `${defaultThemeColor.primary['primary-1']}`,
|
|
54
|
+
// },
|
|
71
55
|
/**
|
|
72
56
|
* Default Style of the progressBar Label
|
|
73
57
|
*/
|
|
@@ -98,8 +82,7 @@ const defaultStyles = {
|
|
|
98
82
|
position: 'relative',
|
|
99
83
|
},
|
|
100
84
|
avatarCircle: {
|
|
101
|
-
|
|
102
|
-
color: '#FFFFFF',
|
|
85
|
+
|
|
103
86
|
'border-radius': '50%',
|
|
104
87
|
display: 'flex',
|
|
105
88
|
'align-items': 'center',
|
|
@@ -125,7 +108,6 @@ const defaultStyles = {
|
|
|
125
108
|
'min-height': '38px',
|
|
126
109
|
},
|
|
127
110
|
avatarName: {
|
|
128
|
-
color: `${defaultThemeColor.variant['primary-1']}`,
|
|
129
111
|
},
|
|
130
112
|
avatarNameSM: {
|
|
131
113
|
'margin-left': '8px',
|
|
@@ -206,14 +188,23 @@ const defaultStyles = {
|
|
|
206
188
|
position: 'absolute',
|
|
207
189
|
},
|
|
208
190
|
imageAvatarSM: {
|
|
191
|
+
'border-radius': '50%',
|
|
192
|
+
'box-sizing': 'border-box',
|
|
193
|
+
position: 'absolute',
|
|
209
194
|
width: '30px',
|
|
210
195
|
height: '30px',
|
|
211
196
|
},
|
|
212
197
|
imageAvatarMD: {
|
|
198
|
+
'border-radius': '50%',
|
|
199
|
+
'box-sizing': 'border-box',
|
|
200
|
+
position: 'absolute',
|
|
213
201
|
width: '32px',
|
|
214
202
|
height: '32px',
|
|
215
203
|
},
|
|
216
204
|
imageAvatarLG: {
|
|
205
|
+
'border-radius': '50%',
|
|
206
|
+
'box-sizing': 'border-box',
|
|
207
|
+
position: 'absolute',
|
|
217
208
|
width: '38px',
|
|
218
209
|
height: '38px',
|
|
219
210
|
},
|
|
@@ -221,8 +212,15 @@ const defaultStyles = {
|
|
|
221
212
|
table: {
|
|
222
213
|
style: {
|
|
223
214
|
borderRadius: '4px',
|
|
224
|
-
paddingRight: '
|
|
215
|
+
paddingRight: '0px', // For the vertical scroll bar
|
|
225
216
|
// borderBottom: `1px solid red`,
|
|
217
|
+
backgroundColor: 'transparent',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
checkbox: {
|
|
221
|
+
style: {
|
|
222
|
+
maxHeight: '28px',
|
|
223
|
+
maxWidth: '28px',
|
|
226
224
|
},
|
|
227
225
|
},
|
|
228
226
|
|
|
@@ -242,7 +240,7 @@ const defaultStyles = {
|
|
|
242
240
|
},
|
|
243
241
|
headCells: {
|
|
244
242
|
style: {
|
|
245
|
-
color: `${defaultThemeColor.variant['primary-2']}`,
|
|
243
|
+
// color: `${defaultThemeColor.variant['primary-2']}`,
|
|
246
244
|
fontSize: '14px',
|
|
247
245
|
fontWeight: '600',
|
|
248
246
|
'&:first-of-type': {
|
|
@@ -401,7 +399,6 @@ const defaultStyles = {
|
|
|
401
399
|
* Default Style of the dropZone component
|
|
402
400
|
*/
|
|
403
401
|
'dropzone-parent': {
|
|
404
|
-
width: '100%',
|
|
405
402
|
height: '86px',
|
|
406
403
|
'padding-left': '8px',
|
|
407
404
|
'padding-right': '8px',
|
|
@@ -740,8 +737,8 @@ const defaultStyles = {
|
|
|
740
737
|
},
|
|
741
738
|
'modalComp-modal-close': {
|
|
742
739
|
position: 'absolute',
|
|
743
|
-
top: '
|
|
744
|
-
right: '
|
|
740
|
+
top: '15px',
|
|
741
|
+
right: '10px',
|
|
745
742
|
outline: 'none',
|
|
746
743
|
border: 'none',
|
|
747
744
|
background: 'transparent',
|