carbon-react 110.0.1 → 110.0.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/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +1 -1
- package/esm/components/definition-list/__internal__/dl.context.d.ts +6 -0
- package/esm/components/definition-list/dd.component.d.ts +8 -0
- package/esm/components/definition-list/dd.component.js +310 -5
- package/esm/components/definition-list/definition-list.style.d.ts +22 -0
- package/esm/components/definition-list/definition-list.style.js +3 -4
- package/esm/components/definition-list/dl.component.d.ts +9 -0
- package/esm/components/definition-list/dl.component.js +323 -27
- package/esm/components/definition-list/dt.component.d.ts +8 -0
- package/esm/components/definition-list/dt.component.js +310 -5
- package/esm/components/definition-list/index.d.ts +6 -3
- package/esm/components/definition-list/index.js +2 -2
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +30 -2
- package/esm/components/profile/index.d.ts +2 -1
- package/esm/components/profile/profile.component.d.ts +18 -0
- package/esm/components/profile/profile.component.js +8 -21
- package/esm/components/profile/profile.config.d.ts +55 -0
- package/esm/components/profile/profile.style.d.ts +16 -0
- package/esm/components/profile/profile.style.js +5 -14
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +1 -1
- package/lib/components/definition-list/__internal__/dl.context.d.ts +6 -0
- package/lib/components/definition-list/dd.component.d.ts +8 -0
- package/lib/components/definition-list/dd.component.js +311 -7
- package/lib/components/definition-list/definition-list.style.d.ts +22 -0
- package/lib/components/definition-list/definition-list.style.js +3 -4
- package/lib/components/definition-list/dl.component.d.ts +9 -0
- package/lib/components/definition-list/dl.component.js +326 -28
- package/lib/components/definition-list/dt.component.d.ts +8 -0
- package/lib/components/definition-list/dt.component.js +311 -7
- package/lib/components/definition-list/index.d.ts +6 -3
- package/lib/components/definition-list/index.js +8 -8
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +30 -2
- package/lib/components/profile/index.d.ts +2 -1
- package/lib/components/profile/profile.component.d.ts +18 -0
- package/lib/components/profile/profile.component.js +9 -24
- package/lib/components/profile/profile.config.d.ts +55 -0
- package/lib/components/profile/profile.style.d.ts +16 -0
- package/lib/components/profile/profile.style.js +5 -14
- package/package.json +1 -1
- package/esm/components/definition-list/dd.d.ts +0 -11
- package/esm/components/definition-list/dl.d.ts +0 -19
- package/esm/components/definition-list/dt.d.ts +0 -10
- package/esm/components/profile/profile.d.ts +0 -18
- package/lib/components/definition-list/dd.d.ts +0 -11
- package/lib/components/definition-list/dl.d.ts +0 -19
- package/lib/components/definition-list/dt.d.ts +0 -10
- package/lib/components/profile/profile.d.ts +0 -18
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useContext } from "react";
|
|
4
|
-
import propTypes from "@styled-system/prop-types";
|
|
5
4
|
import PropTypes from "prop-types";
|
|
6
5
|
import { StyledDt } from "./definition-list.style";
|
|
7
6
|
import DlContext from "./__internal__/dl.context";
|
|
@@ -24,9 +23,315 @@ const Dt = ({
|
|
|
24
23
|
}, rest), children);
|
|
25
24
|
};
|
|
26
25
|
|
|
27
|
-
Dt.propTypes = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
Dt.propTypes = {
|
|
27
|
+
"children": PropTypes.node,
|
|
28
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
29
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
30
|
+
"description": PropTypes.string,
|
|
31
|
+
"toString": PropTypes.func.isRequired,
|
|
32
|
+
"valueOf": PropTypes.func.isRequired
|
|
33
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
34
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
35
|
+
"description": PropTypes.string,
|
|
36
|
+
"toString": PropTypes.func.isRequired,
|
|
37
|
+
"valueOf": PropTypes.func.isRequired
|
|
38
|
+
}), PropTypes.string]),
|
|
39
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
40
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
41
|
+
"description": PropTypes.string,
|
|
42
|
+
"toString": PropTypes.func.isRequired,
|
|
43
|
+
"valueOf": PropTypes.func.isRequired
|
|
44
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
45
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
46
|
+
"description": PropTypes.string,
|
|
47
|
+
"toString": PropTypes.func.isRequired,
|
|
48
|
+
"valueOf": PropTypes.func.isRequired
|
|
49
|
+
}), PropTypes.string]),
|
|
50
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
51
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
52
|
+
"description": PropTypes.string,
|
|
53
|
+
"toString": PropTypes.func.isRequired,
|
|
54
|
+
"valueOf": PropTypes.func.isRequired
|
|
55
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
56
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
57
|
+
"description": PropTypes.string,
|
|
58
|
+
"toString": PropTypes.func.isRequired,
|
|
59
|
+
"valueOf": PropTypes.func.isRequired
|
|
60
|
+
}), PropTypes.string]),
|
|
61
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
62
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
63
|
+
"description": PropTypes.string,
|
|
64
|
+
"toString": PropTypes.func.isRequired,
|
|
65
|
+
"valueOf": PropTypes.func.isRequired
|
|
66
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
67
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
68
|
+
"description": PropTypes.string,
|
|
69
|
+
"toString": PropTypes.func.isRequired,
|
|
70
|
+
"valueOf": PropTypes.func.isRequired
|
|
71
|
+
}), PropTypes.string]),
|
|
72
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
73
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
74
|
+
"description": PropTypes.string,
|
|
75
|
+
"toString": PropTypes.func.isRequired,
|
|
76
|
+
"valueOf": PropTypes.func.isRequired
|
|
77
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
78
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
79
|
+
"description": PropTypes.string,
|
|
80
|
+
"toString": PropTypes.func.isRequired,
|
|
81
|
+
"valueOf": PropTypes.func.isRequired
|
|
82
|
+
}), PropTypes.string]),
|
|
83
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
84
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
85
|
+
"description": PropTypes.string,
|
|
86
|
+
"toString": PropTypes.func.isRequired,
|
|
87
|
+
"valueOf": PropTypes.func.isRequired
|
|
88
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
89
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
90
|
+
"description": PropTypes.string,
|
|
91
|
+
"toString": PropTypes.func.isRequired,
|
|
92
|
+
"valueOf": PropTypes.func.isRequired
|
|
93
|
+
}), PropTypes.string]),
|
|
94
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
95
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
96
|
+
"description": PropTypes.string,
|
|
97
|
+
"toString": PropTypes.func.isRequired,
|
|
98
|
+
"valueOf": PropTypes.func.isRequired
|
|
99
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
100
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
101
|
+
"description": PropTypes.string,
|
|
102
|
+
"toString": PropTypes.func.isRequired,
|
|
103
|
+
"valueOf": PropTypes.func.isRequired
|
|
104
|
+
}), PropTypes.string]),
|
|
105
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
106
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
107
|
+
"description": PropTypes.string,
|
|
108
|
+
"toString": PropTypes.func.isRequired,
|
|
109
|
+
"valueOf": PropTypes.func.isRequired
|
|
110
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
111
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
112
|
+
"description": PropTypes.string,
|
|
113
|
+
"toString": PropTypes.func.isRequired,
|
|
114
|
+
"valueOf": PropTypes.func.isRequired
|
|
115
|
+
}), PropTypes.string]),
|
|
116
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
117
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
118
|
+
"description": PropTypes.string,
|
|
119
|
+
"toString": PropTypes.func.isRequired,
|
|
120
|
+
"valueOf": PropTypes.func.isRequired
|
|
121
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
122
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
123
|
+
"description": PropTypes.string,
|
|
124
|
+
"toString": PropTypes.func.isRequired,
|
|
125
|
+
"valueOf": PropTypes.func.isRequired
|
|
126
|
+
}), PropTypes.string]),
|
|
127
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
128
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
129
|
+
"description": PropTypes.string,
|
|
130
|
+
"toString": PropTypes.func.isRequired,
|
|
131
|
+
"valueOf": PropTypes.func.isRequired
|
|
132
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
133
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
134
|
+
"description": PropTypes.string,
|
|
135
|
+
"toString": PropTypes.func.isRequired,
|
|
136
|
+
"valueOf": PropTypes.func.isRequired
|
|
137
|
+
}), PropTypes.string]),
|
|
138
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
139
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
140
|
+
"description": PropTypes.string,
|
|
141
|
+
"toString": PropTypes.func.isRequired,
|
|
142
|
+
"valueOf": PropTypes.func.isRequired
|
|
143
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
144
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
145
|
+
"description": PropTypes.string,
|
|
146
|
+
"toString": PropTypes.func.isRequired,
|
|
147
|
+
"valueOf": PropTypes.func.isRequired
|
|
148
|
+
}), PropTypes.string]),
|
|
149
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
150
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
151
|
+
"description": PropTypes.string,
|
|
152
|
+
"toString": PropTypes.func.isRequired,
|
|
153
|
+
"valueOf": PropTypes.func.isRequired
|
|
154
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
155
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
156
|
+
"description": PropTypes.string,
|
|
157
|
+
"toString": PropTypes.func.isRequired,
|
|
158
|
+
"valueOf": PropTypes.func.isRequired
|
|
159
|
+
}), PropTypes.string]),
|
|
160
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
161
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
162
|
+
"description": PropTypes.string,
|
|
163
|
+
"toString": PropTypes.func.isRequired,
|
|
164
|
+
"valueOf": PropTypes.func.isRequired
|
|
165
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
166
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
167
|
+
"description": PropTypes.string,
|
|
168
|
+
"toString": PropTypes.func.isRequired,
|
|
169
|
+
"valueOf": PropTypes.func.isRequired
|
|
170
|
+
}), PropTypes.string]),
|
|
171
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
172
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
173
|
+
"description": PropTypes.string,
|
|
174
|
+
"toString": PropTypes.func.isRequired,
|
|
175
|
+
"valueOf": PropTypes.func.isRequired
|
|
176
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
177
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
178
|
+
"description": PropTypes.string,
|
|
179
|
+
"toString": PropTypes.func.isRequired,
|
|
180
|
+
"valueOf": PropTypes.func.isRequired
|
|
181
|
+
}), PropTypes.string]),
|
|
182
|
+
"p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
183
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
184
|
+
"description": PropTypes.string,
|
|
185
|
+
"toString": PropTypes.func.isRequired,
|
|
186
|
+
"valueOf": PropTypes.func.isRequired
|
|
187
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
188
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
189
|
+
"description": PropTypes.string,
|
|
190
|
+
"toString": PropTypes.func.isRequired,
|
|
191
|
+
"valueOf": PropTypes.func.isRequired
|
|
192
|
+
}), PropTypes.string]),
|
|
193
|
+
"padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
194
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
195
|
+
"description": PropTypes.string,
|
|
196
|
+
"toString": PropTypes.func.isRequired,
|
|
197
|
+
"valueOf": PropTypes.func.isRequired
|
|
198
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
199
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
200
|
+
"description": PropTypes.string,
|
|
201
|
+
"toString": PropTypes.func.isRequired,
|
|
202
|
+
"valueOf": PropTypes.func.isRequired
|
|
203
|
+
}), PropTypes.string]),
|
|
204
|
+
"paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
205
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
206
|
+
"description": PropTypes.string,
|
|
207
|
+
"toString": PropTypes.func.isRequired,
|
|
208
|
+
"valueOf": PropTypes.func.isRequired
|
|
209
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
210
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
211
|
+
"description": PropTypes.string,
|
|
212
|
+
"toString": PropTypes.func.isRequired,
|
|
213
|
+
"valueOf": PropTypes.func.isRequired
|
|
214
|
+
}), PropTypes.string]),
|
|
215
|
+
"paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
216
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
217
|
+
"description": PropTypes.string,
|
|
218
|
+
"toString": PropTypes.func.isRequired,
|
|
219
|
+
"valueOf": PropTypes.func.isRequired
|
|
220
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
221
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
222
|
+
"description": PropTypes.string,
|
|
223
|
+
"toString": PropTypes.func.isRequired,
|
|
224
|
+
"valueOf": PropTypes.func.isRequired
|
|
225
|
+
}), PropTypes.string]),
|
|
226
|
+
"paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
227
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
228
|
+
"description": PropTypes.string,
|
|
229
|
+
"toString": PropTypes.func.isRequired,
|
|
230
|
+
"valueOf": PropTypes.func.isRequired
|
|
231
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
232
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
233
|
+
"description": PropTypes.string,
|
|
234
|
+
"toString": PropTypes.func.isRequired,
|
|
235
|
+
"valueOf": PropTypes.func.isRequired
|
|
236
|
+
}), PropTypes.string]),
|
|
237
|
+
"paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
238
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
239
|
+
"description": PropTypes.string,
|
|
240
|
+
"toString": PropTypes.func.isRequired,
|
|
241
|
+
"valueOf": PropTypes.func.isRequired
|
|
242
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
243
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
244
|
+
"description": PropTypes.string,
|
|
245
|
+
"toString": PropTypes.func.isRequired,
|
|
246
|
+
"valueOf": PropTypes.func.isRequired
|
|
247
|
+
}), PropTypes.string]),
|
|
248
|
+
"paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
249
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
250
|
+
"description": PropTypes.string,
|
|
251
|
+
"toString": PropTypes.func.isRequired,
|
|
252
|
+
"valueOf": PropTypes.func.isRequired
|
|
253
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
254
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
255
|
+
"description": PropTypes.string,
|
|
256
|
+
"toString": PropTypes.func.isRequired,
|
|
257
|
+
"valueOf": PropTypes.func.isRequired
|
|
258
|
+
}), PropTypes.string]),
|
|
259
|
+
"paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
260
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
261
|
+
"description": PropTypes.string,
|
|
262
|
+
"toString": PropTypes.func.isRequired,
|
|
263
|
+
"valueOf": PropTypes.func.isRequired
|
|
264
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
265
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
266
|
+
"description": PropTypes.string,
|
|
267
|
+
"toString": PropTypes.func.isRequired,
|
|
268
|
+
"valueOf": PropTypes.func.isRequired
|
|
269
|
+
}), PropTypes.string]),
|
|
270
|
+
"pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
271
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
272
|
+
"description": PropTypes.string,
|
|
273
|
+
"toString": PropTypes.func.isRequired,
|
|
274
|
+
"valueOf": PropTypes.func.isRequired
|
|
275
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
276
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
277
|
+
"description": PropTypes.string,
|
|
278
|
+
"toString": PropTypes.func.isRequired,
|
|
279
|
+
"valueOf": PropTypes.func.isRequired
|
|
280
|
+
}), PropTypes.string]),
|
|
281
|
+
"pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
282
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
283
|
+
"description": PropTypes.string,
|
|
284
|
+
"toString": PropTypes.func.isRequired,
|
|
285
|
+
"valueOf": PropTypes.func.isRequired
|
|
286
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
287
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
288
|
+
"description": PropTypes.string,
|
|
289
|
+
"toString": PropTypes.func.isRequired,
|
|
290
|
+
"valueOf": PropTypes.func.isRequired
|
|
291
|
+
}), PropTypes.string]),
|
|
292
|
+
"pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
293
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
294
|
+
"description": PropTypes.string,
|
|
295
|
+
"toString": PropTypes.func.isRequired,
|
|
296
|
+
"valueOf": PropTypes.func.isRequired
|
|
297
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
298
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
299
|
+
"description": PropTypes.string,
|
|
300
|
+
"toString": PropTypes.func.isRequired,
|
|
301
|
+
"valueOf": PropTypes.func.isRequired
|
|
302
|
+
}), PropTypes.string]),
|
|
303
|
+
"pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
304
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
305
|
+
"description": PropTypes.string,
|
|
306
|
+
"toString": PropTypes.func.isRequired,
|
|
307
|
+
"valueOf": PropTypes.func.isRequired
|
|
308
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
309
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
310
|
+
"description": PropTypes.string,
|
|
311
|
+
"toString": PropTypes.func.isRequired,
|
|
312
|
+
"valueOf": PropTypes.func.isRequired
|
|
313
|
+
}), PropTypes.string]),
|
|
314
|
+
"px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
315
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
316
|
+
"description": PropTypes.string,
|
|
317
|
+
"toString": PropTypes.func.isRequired,
|
|
318
|
+
"valueOf": PropTypes.func.isRequired
|
|
319
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
320
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
321
|
+
"description": PropTypes.string,
|
|
322
|
+
"toString": PropTypes.func.isRequired,
|
|
323
|
+
"valueOf": PropTypes.func.isRequired
|
|
324
|
+
}), PropTypes.string]),
|
|
325
|
+
"py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
326
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
327
|
+
"description": PropTypes.string,
|
|
328
|
+
"toString": PropTypes.func.isRequired,
|
|
329
|
+
"valueOf": PropTypes.func.isRequired
|
|
330
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
331
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
332
|
+
"description": PropTypes.string,
|
|
333
|
+
"toString": PropTypes.func.isRequired,
|
|
334
|
+
"valueOf": PropTypes.func.isRequired
|
|
335
|
+
}), PropTypes.string])
|
|
31
336
|
};
|
|
32
337
|
export default Dt;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { default as
|
|
3
|
-
export {
|
|
1
|
+
export type { DlProps } from "./dl.component";
|
|
2
|
+
export { default as Dl } from "./dl.component";
|
|
3
|
+
export type { DtProps } from "./dt.component";
|
|
4
|
+
export { default as Dt } from "./dt.component";
|
|
5
|
+
export type { DdProps } from "./dd.component";
|
|
6
|
+
export { default as Dd } from "./dd.component";
|
|
@@ -126,8 +126,36 @@ const StyledFlatTableRow = styled.tr`
|
|
|
126
126
|
cursor: pointer;
|
|
127
127
|
|
|
128
128
|
:focus {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
position: relative;
|
|
130
|
+
|
|
131
|
+
:after {
|
|
132
|
+
content: "";
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
position: absolute;
|
|
135
|
+
left: 0px;
|
|
136
|
+
right: 0px;
|
|
137
|
+
top: -1px;
|
|
138
|
+
bottom: 0px;
|
|
139
|
+
border: 2px solid var(--colorsSemanticFocus500);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:first-child {
|
|
143
|
+
:after {
|
|
144
|
+
top: 0px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/* Styling for safari. Position relative does not work on tr elements on Safari */
|
|
148
|
+
@media not all and (min-resolution: 0.001dpcm) {
|
|
149
|
+
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
|
|
150
|
+
outline: 2px solid var(--colorsSemanticFocus500);
|
|
151
|
+
outline-offset: -1px;
|
|
152
|
+
position: static;
|
|
153
|
+
:after {
|
|
154
|
+
content: none;
|
|
155
|
+
border: none;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
131
159
|
|
|
132
160
|
${StyledFlatTableRowHeader} {
|
|
133
161
|
${stickyColumnFocusStyling(rowHeaderIndex, theme)}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./profile";
|
|
1
|
+
export { default } from "./profile.component";
|
|
2
|
+
export type { ProfileProps } from "./profile.component";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProfileSize } from "./profile.config";
|
|
3
|
+
export interface ProfileProps {
|
|
4
|
+
/** [Legacy] A custom class name for the component */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Custom source URL */
|
|
7
|
+
src?: string;
|
|
8
|
+
/** Define the name to display. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Define the email to use (will check Gravatar for image). */
|
|
11
|
+
email: string;
|
|
12
|
+
/** Define initials to display if there is no Gravatar image. */
|
|
13
|
+
initials?: string;
|
|
14
|
+
/** Allow to setup size for the component */
|
|
15
|
+
size?: ProfileSize;
|
|
16
|
+
}
|
|
17
|
+
export declare const Profile: ({ src, className, initials, name, size, email, ...props }: ProfileProps) => JSX.Element;
|
|
18
|
+
export default Profile;
|
|
@@ -2,11 +2,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
6
5
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
7
6
|
import { ProfileStyle, ProfileNameStyle, ProfileDetailsStyle, ProfileAvatarStyle, ProfileEmailStyle } from "./profile.style";
|
|
8
7
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
9
|
-
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
10
8
|
|
|
11
9
|
function acronymize(str) {
|
|
12
10
|
if (!str) return "";
|
|
@@ -67,24 +65,13 @@ const Profile = ({
|
|
|
67
65
|
}, tagComponent("profile", props), filterStyledSystemMarginProps(props)), avatar(), text());
|
|
68
66
|
};
|
|
69
67
|
|
|
70
|
-
Profile.propTypes = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
src: PropTypes.string
|
|
77
|
-
|
|
78
|
-
/** Define the name to display. */
|
|
79
|
-
name: PropTypes.string.isRequired,
|
|
80
|
-
|
|
81
|
-
/** Define the email to use (will check Gravatar for image). */
|
|
82
|
-
email: PropTypes.string.isRequired,
|
|
83
|
-
|
|
84
|
-
/** Define initials to display if there is no Gravatar image. */
|
|
85
|
-
initials: PropTypes.string,
|
|
86
|
-
|
|
87
|
-
/** Allow to setup size for the component */
|
|
88
|
-
size: PropTypes.oneOf(["XS", "S", "M", "ML", "L", "XL", "XXL"])
|
|
68
|
+
Profile.propTypes = {
|
|
69
|
+
"className": PropTypes.string,
|
|
70
|
+
"email": PropTypes.string.isRequired,
|
|
71
|
+
"initials": PropTypes.string,
|
|
72
|
+
"name": PropTypes.string.isRequired,
|
|
73
|
+
"size": PropTypes.oneOf(["L", "M", "ML", "S", "XL", "XS", "XXL"]),
|
|
74
|
+
"src": PropTypes.string
|
|
89
75
|
};
|
|
76
|
+
export { Profile };
|
|
90
77
|
export default Profile;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const PROFILE_SIZES: readonly ["XS", "S", "M", "ML", "L", "XL", "XXL"];
|
|
2
|
+
declare type AllProfileSizes = typeof PROFILE_SIZES;
|
|
3
|
+
export declare type ProfileSize = AllProfileSizes[number];
|
|
4
|
+
declare const _default: {
|
|
5
|
+
XS: {
|
|
6
|
+
nameSize: string;
|
|
7
|
+
emailSize: string;
|
|
8
|
+
lineHeight: string;
|
|
9
|
+
marginLeft: string;
|
|
10
|
+
marginTop: string;
|
|
11
|
+
};
|
|
12
|
+
S: {
|
|
13
|
+
nameSize: string;
|
|
14
|
+
emailSize: string;
|
|
15
|
+
lineHeight: string;
|
|
16
|
+
marginLeft: string;
|
|
17
|
+
marginTop: string;
|
|
18
|
+
};
|
|
19
|
+
M: {
|
|
20
|
+
nameSize: string;
|
|
21
|
+
emailSize: string;
|
|
22
|
+
lineHeight: string;
|
|
23
|
+
marginLeft: string;
|
|
24
|
+
marginTop: string;
|
|
25
|
+
};
|
|
26
|
+
ML: {
|
|
27
|
+
nameSize: string;
|
|
28
|
+
emailSize: string;
|
|
29
|
+
lineHeight: string;
|
|
30
|
+
marginLeft: string;
|
|
31
|
+
marginTop: string;
|
|
32
|
+
};
|
|
33
|
+
L: {
|
|
34
|
+
nameSize: string;
|
|
35
|
+
emailSize: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
marginLeft: string;
|
|
38
|
+
marginTop: string;
|
|
39
|
+
};
|
|
40
|
+
XL: {
|
|
41
|
+
nameSize: string;
|
|
42
|
+
emailSize: string;
|
|
43
|
+
lineHeight: string;
|
|
44
|
+
marginLeft: string;
|
|
45
|
+
marginTop: string;
|
|
46
|
+
};
|
|
47
|
+
XXL: {
|
|
48
|
+
nameSize: string;
|
|
49
|
+
emailSize: string;
|
|
50
|
+
lineHeight: string;
|
|
51
|
+
marginLeft: string;
|
|
52
|
+
marginTop: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Portrait from "../portrait";
|
|
2
|
+
import { ProfileSize } from "./profile.config";
|
|
3
|
+
interface ProfileSizeProps {
|
|
4
|
+
size?: ProfileSize;
|
|
5
|
+
}
|
|
6
|
+
interface ProfileHasSrcProps {
|
|
7
|
+
hasSrc: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface ProfileDetailsStyleProps extends ProfileSizeProps, ProfileHasSrcProps {
|
|
10
|
+
}
|
|
11
|
+
declare const ProfileNameStyle: import("styled-components").StyledComponent<"span", any, ProfileSizeProps, never>;
|
|
12
|
+
declare const ProfileEmailStyle: import("styled-components").StyledComponent<"span", any, ProfileSizeProps, never>;
|
|
13
|
+
declare const ProfileStyle: import("styled-components").StyledComponent<"div", any, ProfileHasSrcProps, never>;
|
|
14
|
+
declare const ProfileDetailsStyle: import("styled-components").StyledComponent<"div", any, ProfileDetailsStyleProps, never>;
|
|
15
|
+
declare const ProfileAvatarStyle: import("styled-components").StyledComponent<typeof Portrait, any, {}, never>;
|
|
16
|
+
export { ProfileStyle, ProfileNameStyle, ProfileDetailsStyle, ProfileAvatarStyle, ProfileEmailStyle, };
|
|
@@ -7,12 +7,12 @@ const ProfileNameStyle = styled.span`
|
|
|
7
7
|
font-weight: bold;
|
|
8
8
|
display: block;
|
|
9
9
|
font-size: ${({
|
|
10
|
-
size
|
|
10
|
+
size = "M"
|
|
11
11
|
}) => profileConfigSizes[size].nameSize};
|
|
12
12
|
`;
|
|
13
13
|
const ProfileEmailStyle = styled.span`
|
|
14
14
|
font-size: ${({
|
|
15
|
-
size
|
|
15
|
+
size = "M"
|
|
16
16
|
}) => profileConfigSizes[size].emailSize};
|
|
17
17
|
`;
|
|
18
18
|
const ProfileStyle = styled.div`
|
|
@@ -29,13 +29,13 @@ const ProfileDetailsStyle = styled.div`
|
|
|
29
29
|
display: inline-block;
|
|
30
30
|
margin-top: ${({
|
|
31
31
|
hasSrc,
|
|
32
|
-
size
|
|
32
|
+
size = "M"
|
|
33
33
|
}) => hasSrc ? profileConfigSizes[size].marginTop : ""};
|
|
34
34
|
line-height: ${({
|
|
35
|
-
size
|
|
35
|
+
size = "M"
|
|
36
36
|
}) => profileConfigSizes[size].lineHeight};
|
|
37
37
|
margin-left: ${({
|
|
38
|
-
size
|
|
38
|
+
size = "M"
|
|
39
39
|
}) => profileConfigSizes[size].marginLeft};
|
|
40
40
|
`;
|
|
41
41
|
const ProfileAvatarStyle = styled(Portrait)`
|
|
@@ -44,13 +44,4 @@ const ProfileAvatarStyle = styled(Portrait)`
|
|
|
44
44
|
ProfileStyle.defaultProps = {
|
|
45
45
|
theme: baseTheme
|
|
46
46
|
};
|
|
47
|
-
ProfileNameStyle.defaultProps = {
|
|
48
|
-
size: "M"
|
|
49
|
-
};
|
|
50
|
-
ProfileEmailStyle.defaultProps = {
|
|
51
|
-
size: "M"
|
|
52
|
-
};
|
|
53
|
-
ProfileDetailsStyle.defaultProps = {
|
|
54
|
-
size: "M"
|
|
55
|
-
};
|
|
56
47
|
export { ProfileStyle, ProfileNameStyle, ProfileDetailsStyle, ProfileAvatarStyle, ProfileEmailStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ReactWrapper, ShallowWrapper } from "enzyme";
|
|
2
|
-
declare const elementsTagTest: (wrapper: ReactWrapper, elements: string[]) => void;
|
|
2
|
+
declare const elementsTagTest: (wrapper: ReactWrapper | ShallowWrapper, elements: string[]) => void;
|
|
3
3
|
declare const rootTagTest: (rootNode: ReactWrapper | ShallowWrapper, comp: string, elem?: string | undefined, role?: string | undefined) => void;
|
|
4
4
|
export { elementsTagTest, rootTagTest };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceProps } from "styled-system";
|
|
3
|
+
export interface DdProps extends SpaceProps {
|
|
4
|
+
/** Prop for what will render in the `<Dd></Dd>` tags */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const Dd: ({ children, ...rest }: DdProps) => JSX.Element;
|
|
8
|
+
export default Dd;
|