@dxc-technology/halstack-react 0.0.0-c5f6a2f → 0.0.0-c6243ef
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/dist/ThemeContext.js +130 -98
- package/dist/accordion/Accordion.js +80 -83
- package/dist/accordion-group/AccordionGroup.js +1 -3
- package/dist/alert/Alert.js +168 -83
- package/dist/alert/index.d.ts +51 -0
- package/dist/badge/Badge.js +3 -1
- package/dist/box/Box.js +1 -9
- package/dist/button/Button.js +30 -20
- package/dist/card/Card.js +15 -8
- package/dist/checkbox/Checkbox.js +88 -21
- package/dist/chip/Chip.js +63 -21
- package/dist/common/variables.js +1105 -418
- package/dist/date/Date.js +60 -40
- package/dist/dialog/Dialog.js +44 -29
- package/dist/dropdown/Dropdown.js +162 -74
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +280 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +25 -35
- package/dist/footer/dxc_logo.svg +15 -0
- package/dist/header/Header.js +14 -42
- package/dist/header/dxc_logo_black.svg +8 -0
- package/dist/heading/Heading.js +1 -5
- package/dist/input-text/InputText.js +132 -56
- package/dist/layout/ApplicationLayout.js +3 -3
- package/dist/link/Link.js +71 -46
- package/dist/main.d.ts +8 -0
- package/dist/main.js +56 -0
- package/dist/new-date/NewDate.js +400 -0
- package/dist/new-date/index.d.ts +95 -0
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -0
- package/dist/new-textarea/NewTextarea.js +369 -0
- package/dist/new-textarea/index.d.ts +117 -0
- package/dist/number/Number.js +136 -0
- package/dist/number/NumberContext.js +16 -0
- package/dist/number/index.d.ts +113 -0
- package/dist/paginator/Paginator.js +10 -4
- package/dist/password-input/PasswordInput.js +198 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +63 -27
- package/dist/radio/Radio.js +28 -9
- package/dist/resultsetTable/ResultsetTable.js +64 -38
- package/dist/select/Select.js +207 -148
- package/dist/sidenav/Sidenav.js +11 -15
- package/dist/slider/Slider.js +190 -63
- package/dist/spinner/Spinner.js +226 -59
- package/dist/switch/Switch.js +3 -3
- package/dist/table/Table.js +19 -5
- package/dist/tabs/Tabs.js +6 -10
- package/dist/tag/Tag.js +50 -36
- package/dist/text-input/TextInput.js +971 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/textarea/Textarea.js +59 -33
- package/dist/toggle-group/ToggleGroup.js +130 -44
- package/dist/upload/Upload.js +1 -5
- package/dist/upload/buttons-upload/ButtonsUpload.js +27 -11
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +54 -18
- package/dist/upload/file-upload/FileToUpload.js +37 -15
- package/dist/upload/files-upload/FilesToUpload.js +3 -3
- package/dist/upload/transaction/Transaction.js +39 -16
- package/dist/upload/transactions/Transactions.js +24 -8
- package/dist/wizard/Wizard.js +84 -56
- package/dist/wizard/invalid_icon.svg +4 -5
- package/dist/wizard/valid_icon.svg +4 -5
- package/package.json +4 -2
- package/test/Date.test.js +13 -13
- package/test/Dropdown.test.js +15 -0
- package/test/FileInput.test.js +201 -0
- package/test/Link.test.js +3 -2
- package/test/NewDate.test.js +232 -0
- package/test/NewTextarea.test.js +195 -0
- package/test/Number.test.js +257 -0
- package/test/Paginator.test.js +1 -1
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +1 -2
- package/test/Select.test.js +44 -24
- package/test/Spinner.test.js +5 -0
- package/test/TextInput.test.js +732 -0
- package/test/ToggleGroup.test.js +5 -1
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/toggle-group/readme.md +0 -82
package/dist/header/Header.js
CHANGED
|
@@ -33,6 +33,8 @@ var _variables = require("../common/variables.js");
|
|
|
33
33
|
|
|
34
34
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
35
35
|
|
|
36
|
+
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
37
|
+
|
|
36
38
|
function _templateObject12() {
|
|
37
39
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: ", ";\n opacity: ", " !important;\n visibility: ", ";\n opacity: ", ";\n display: ", ";\n transition: opacity 0.2s 0.2s ease-in-out;\n z-index: ", ";\n"]);
|
|
38
40
|
|
|
@@ -54,7 +56,7 @@ function _templateObject11() {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
function _templateObject10() {
|
|
57
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 100%;\n margin-top: 40px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n
|
|
59
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 100%;\n margin-top: 40px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"]);
|
|
58
60
|
|
|
59
61
|
_templateObject10 = function _templateObject10() {
|
|
60
62
|
return data;
|
|
@@ -104,7 +106,7 @@ function _templateObject6() {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
function _templateObject5() {
|
|
107
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: calc(100% - 186px);\n display: flex;\n align-items: center;\n flex-grow: 1;\n justify-content: flex-end;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n
|
|
109
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: calc(100% - 186px);\n display: flex;\n align-items: center;\n flex-grow: 1;\n justify-content: flex-end;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
|
|
108
110
|
|
|
109
111
|
_templateObject5 = function _templateObject5() {
|
|
110
112
|
return data;
|
|
@@ -134,7 +136,7 @@ function _templateObject3() {
|
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
function _templateObject2() {
|
|
137
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
139
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-bottom: ", ";\n\n &.MuiAppBar-colorPrimary {\n background-color: ", ";\n border-bottom: ", ";\n\n &.MuiPaper-elevation4 {\n box-shadow: none;\n }\n .ChildComponents {\n display: flex;\n align-items: center;\n }\n }\n & {\n min-height: ", ";\n }\n &.MuiAppBar-root {\n flex-direction: row;\n align-items: center;\n padding: ", ";\n justify-content: space-between;\n }\n"]);
|
|
138
140
|
|
|
139
141
|
_templateObject2 = function _templateObject2() {
|
|
140
142
|
return data;
|
|
@@ -144,7 +146,7 @@ function _templateObject2() {
|
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
function _templateObject() {
|
|
147
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n button {\n
|
|
149
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"]);
|
|
148
150
|
|
|
149
151
|
_templateObject = function _templateObject() {
|
|
150
152
|
return data;
|
|
@@ -157,13 +159,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
157
159
|
return _react["default"].createElement(HeaderDropdown, null, _react["default"].createElement(_Dropdown["default"], props));
|
|
158
160
|
};
|
|
159
161
|
|
|
160
|
-
var HeaderDropdown = _styledComponents["default"].div(_templateObject()
|
|
161
|
-
return props.theme.fontColorBase;
|
|
162
|
-
}, function (props) {
|
|
163
|
-
return props.theme.dropdownBackgroundColor;
|
|
164
|
-
}, function (props) {
|
|
165
|
-
return props.theme.dropdownHoverBackgroundColor;
|
|
166
|
-
});
|
|
162
|
+
var HeaderDropdown = _styledComponents["default"].div(_templateObject());
|
|
167
163
|
|
|
168
164
|
var DxcHeader = function DxcHeader(_ref) {
|
|
169
165
|
var _ref$underlined = _ref.underlined,
|
|
@@ -279,22 +275,18 @@ var DxcHeader = function DxcHeader(_ref) {
|
|
|
279
275
|
refSize: refSize
|
|
280
276
|
}))), !isResponsive && _react["default"].createElement(ChildContainer, {
|
|
281
277
|
padding: padding
|
|
282
|
-
},
|
|
278
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
279
|
+
color: colorsTheme.header.backgroundColor
|
|
280
|
+
}, content))));
|
|
283
281
|
};
|
|
284
282
|
|
|
285
283
|
DxcHeader.Dropdown = Dropdown;
|
|
286
284
|
var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2(), function (props) {
|
|
287
|
-
return props.theme.fontSizeBase;
|
|
288
|
-
}, function (props) {
|
|
289
285
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
290
286
|
}, function (props) {
|
|
291
287
|
return props.theme.backgroundColor;
|
|
292
|
-
}, function (props) {
|
|
293
|
-
return props.theme.fontColorBase;
|
|
294
288
|
}, function (props) {
|
|
295
289
|
return props.underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
|
|
296
|
-
}, function (props) {
|
|
297
|
-
return props.theme.fontFamily;
|
|
298
290
|
}, function (props) {
|
|
299
291
|
return props.theme.minHeight;
|
|
300
292
|
}, function (props) {
|
|
@@ -325,16 +317,6 @@ var ChildContainer = _styledComponents["default"].div(_templateObject5(), functi
|
|
|
325
317
|
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
326
318
|
}, function (props) {
|
|
327
319
|
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
328
|
-
}, function (props) {
|
|
329
|
-
return props.theme.customContentFontFamily || props.theme.fontFamilyBase;
|
|
330
|
-
}, function (props) {
|
|
331
|
-
return props.theme.customContentFontStyle;
|
|
332
|
-
}, function (props) {
|
|
333
|
-
return props.theme.customContentFontSize || props.theme.fontSizeBase;
|
|
334
|
-
}, function (props) {
|
|
335
|
-
return props.theme.customContentFontWeight;
|
|
336
|
-
}, function (props) {
|
|
337
|
-
return props.theme.customContentFontColor || props.theme.fontColorBase;
|
|
338
320
|
});
|
|
339
321
|
|
|
340
322
|
var HamburguerItem = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
@@ -342,11 +324,11 @@ var HamburguerItem = _styledComponents["default"].div(_templateObject6(), functi
|
|
|
342
324
|
}, function (props) {
|
|
343
325
|
return props.theme.hamburguerFocusColor;
|
|
344
326
|
}, function (props) {
|
|
345
|
-
return props.theme.
|
|
327
|
+
return props.theme.hamburguerIconColor;
|
|
346
328
|
});
|
|
347
329
|
|
|
348
330
|
var HamburguerTitle = _styledComponents["default"].span(_templateObject7(), function (props) {
|
|
349
|
-
return props.theme.hamburguerFontFamily
|
|
331
|
+
return props.theme.hamburguerFontFamily;
|
|
350
332
|
}, function (props) {
|
|
351
333
|
return props.theme.hamburguerFontStyle;
|
|
352
334
|
}, function (props) {
|
|
@@ -356,7 +338,7 @@ var HamburguerTitle = _styledComponents["default"].span(_templateObject7(), func
|
|
|
356
338
|
}, function (props) {
|
|
357
339
|
return props.theme.hamburguerFontWeight;
|
|
358
340
|
}, function (props) {
|
|
359
|
-
return props.theme.hamburguerFontColor
|
|
341
|
+
return props.theme.hamburguerFontColor;
|
|
360
342
|
});
|
|
361
343
|
|
|
362
344
|
var MainContainer = _styledComponents["default"].div(_templateObject8());
|
|
@@ -377,17 +359,7 @@ var ResponsiveMenu = _styledComponents["default"].div(_templateObject9(), functi
|
|
|
377
359
|
return props.hasVisibility ? "1" : "0.96";
|
|
378
360
|
}, _variables.spaces.xxsmall);
|
|
379
361
|
|
|
380
|
-
var MenuContent = _styledComponents["default"].div(_templateObject10()
|
|
381
|
-
return props.theme.menuCustomContentFontFamily || props.theme.fontFamilyBase;
|
|
382
|
-
}, function (props) {
|
|
383
|
-
return props.theme.menuCustomContentFontStyle;
|
|
384
|
-
}, function (props) {
|
|
385
|
-
return props.theme.menuCustomContentFontSize || props.theme.fontSizeBase;
|
|
386
|
-
}, function (props) {
|
|
387
|
-
return props.theme.menuCustomContentFontWeight;
|
|
388
|
-
}, function (props) {
|
|
389
|
-
return props.theme.menuCustomContentFontColor || props.theme.fontColorBase;
|
|
390
|
-
});
|
|
362
|
+
var MenuContent = _styledComponents["default"].div(_templateObject10());
|
|
391
363
|
|
|
392
364
|
var CloseContainer = _styledComponents["default"].img(_templateObject11(), function (props) {
|
|
393
365
|
return props.theme.hamburguerFocusColor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="73" height="40" viewBox="0 0 73 40">
|
|
2
|
+
<g id="g10" transform="translate(0)">
|
|
3
|
+
<g id="g12">
|
|
4
|
+
<path id="path14" d="M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322" transform="translate(-21.028 65.555)" fill="#100f0d"/>
|
|
5
|
+
<path id="path16" d="M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978" transform="translate(-21.049 88.739)" fill="#100f0d"/>
|
|
6
|
+
</g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
package/dist/heading/Heading.js
CHANGED
|
@@ -76,7 +76,7 @@ function _templateObject2() {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
function _templateObject() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n
|
|
79
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
80
80
|
|
|
81
81
|
_templateObject = function _templateObject() {
|
|
82
82
|
return data;
|
|
@@ -121,10 +121,6 @@ var HeadingContainer = _styledComponents["default"].div(_templateObject(), funct
|
|
|
121
121
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
122
122
|
}, function (props) {
|
|
123
123
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
124
|
-
}, function (props) {
|
|
125
|
-
return props.theme.fontFamilyBase;
|
|
126
|
-
}, function (props) {
|
|
127
|
-
return props.theme.fontColorBase;
|
|
128
124
|
});
|
|
129
125
|
|
|
130
126
|
var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (props) {
|
|
@@ -43,8 +43,10 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
|
43
43
|
|
|
44
44
|
var _error = _interopRequireDefault(require("./error.svg"));
|
|
45
45
|
|
|
46
|
+
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
|
|
47
|
+
|
|
46
48
|
function _templateObject10() {
|
|
47
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
49
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n\n .MuiTextField-root {\n width: 100%;\n font-family: ", ";\n\n .MuiFormHelperText-root {\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", " !important;\n margin-top: 6px;\n }\n\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n\n transform: ", ";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\n\n & + div,\n & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n }\n }\n\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n font-family: ", ";\n\n &::before {\n border-bottom: ", ";\n }\n\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n\n &::after {\n border-bottom: ", ";\n }\n\n &.Mui-error {\n &::before {\n border-width: ", ";\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: calc(", " + 1px);\n border-color: ", ";\n }\n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n cursor: not-allowed;\n\n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n\n .MuiInputAdornment-root {\n height: 20px;\n\n &.MuiInputAdornment-positionEnd {\n & > p {\n font-family: ", ";\n margin-right: 8px;\n margin-bottom: 1px;\n }\n }\n &.Mui-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before {\n border-bottom-color: ", ";\n }\n }\n\n & > p {\n &.Mui-error {\n color: ", " !important;\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n }\n"]);
|
|
48
50
|
|
|
49
51
|
_templateObject10 = function _templateObject10() {
|
|
50
52
|
return data;
|
|
@@ -54,7 +56,7 @@ function _templateObject10() {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
function _templateObject9() {
|
|
57
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n"]);
|
|
59
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n"]);
|
|
58
60
|
|
|
59
61
|
_templateObject9 = function _templateObject9() {
|
|
60
62
|
return data;
|
|
@@ -64,7 +66,7 @@ function _templateObject9() {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
function _templateObject8() {
|
|
67
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
69
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
68
70
|
|
|
69
71
|
_templateObject8 = function _templateObject8() {
|
|
70
72
|
return data;
|
|
@@ -84,7 +86,7 @@ function _templateObject7() {
|
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
function _templateObject6() {
|
|
87
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n font-family: ", ";\n
|
|
89
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n max-height: 20px;\n max-width: 20px;\n opacity: ", ";\n z-index: 1;\n ", ";\n"]);
|
|
88
90
|
|
|
89
91
|
_templateObject6 = function _templateObject6() {
|
|
90
92
|
return data;
|
|
@@ -94,7 +96,7 @@ function _templateObject6() {
|
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
function _templateObject5() {
|
|
97
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n width: 20px;\n max-height: 20px;\n max-width: 20px;\n z-index: 1;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
99
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n width: 20px;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n z-index: 1;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
98
100
|
|
|
99
101
|
_templateObject5 = function _templateObject5() {
|
|
100
102
|
return data;
|
|
@@ -104,7 +106,7 @@ function _templateObject5() {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
function _templateObject4() {
|
|
107
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n
|
|
109
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n max-height: 20px;\n max-width: 20px;\n z-index: 1;\n opacity: ", ";\n ", ";\n"]);
|
|
108
110
|
|
|
109
111
|
_templateObject4 = function _templateObject4() {
|
|
110
112
|
return data;
|
|
@@ -114,7 +116,7 @@ function _templateObject4() {
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
function _templateObject3() {
|
|
117
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n .MuiPaper-root {\n max-height: 250px;\n overflow: auto;\n ::-webkit-scrollbar {\n width: 3px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n
|
|
119
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n .MuiPaper-root {\n max-height: 250px;\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n overflow: auto;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n\n li {\n padding-bottom: ", ";\n padding-top: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n }\n"]);
|
|
118
120
|
|
|
119
121
|
_templateObject3 = function _templateObject3() {
|
|
120
122
|
return data;
|
|
@@ -236,6 +238,7 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
236
238
|
changeIsError = _useState12[1];
|
|
237
239
|
|
|
238
240
|
var colorsTheme = (0, _useTheme["default"])();
|
|
241
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
239
242
|
|
|
240
243
|
var changeValue = function changeValue(newValue) {
|
|
241
244
|
if (value === null || value === undefined) {
|
|
@@ -317,7 +320,7 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
317
320
|
var handleSuffixKeyPress = function handleSuffixKeyPress(event) {
|
|
318
321
|
event.preventDefault();
|
|
319
322
|
|
|
320
|
-
if (!disabled && event.code === "Enter" || event.code === "Space") {
|
|
323
|
+
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
|
|
321
324
|
onClickSuffix(event);
|
|
322
325
|
}
|
|
323
326
|
};
|
|
@@ -325,11 +328,33 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
325
328
|
var handlePrefixKeyPress = function handlePrefixKeyPress(event) {
|
|
326
329
|
event.preventDefault();
|
|
327
330
|
|
|
328
|
-
if (!disabled && event.code === "Enter" || event.code === "Space") {
|
|
331
|
+
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
|
|
329
332
|
onClickPrefix(event);
|
|
330
333
|
}
|
|
331
334
|
};
|
|
332
335
|
|
|
336
|
+
var ThemedSuggestions = function ThemedSuggestions() {
|
|
337
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
338
|
+
return _react["default"].createElement(SuggestionsContainer, {
|
|
339
|
+
margin: margin,
|
|
340
|
+
size: size,
|
|
341
|
+
backgroundType: backgroundType
|
|
342
|
+
}, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && filteredOptions.length === 0 && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
|
|
343
|
+
return _react["default"].createElement(_MenuItem["default"], {
|
|
344
|
+
key: suggestion,
|
|
345
|
+
disableRipple: true,
|
|
346
|
+
onMouseDown: function onMouseDown(event) {
|
|
347
|
+
return event.preventDefault();
|
|
348
|
+
},
|
|
349
|
+
onClick: function onClick() {
|
|
350
|
+
return handlerSuggestionClicked(suggestion);
|
|
351
|
+
}
|
|
352
|
+
}, suggestion);
|
|
353
|
+
}), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIcon, {
|
|
354
|
+
src: _error["default"]
|
|
355
|
+
}))));
|
|
356
|
+
};
|
|
357
|
+
|
|
333
358
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
334
359
|
theme: colorsTheme.inputText
|
|
335
360
|
}, _react["default"].createElement(TextContainer, {
|
|
@@ -339,12 +364,14 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
339
364
|
required: required,
|
|
340
365
|
assistiveText: assistiveText,
|
|
341
366
|
margin: margin,
|
|
342
|
-
size: size
|
|
367
|
+
size: size,
|
|
368
|
+
backgroundType: backgroundType
|
|
343
369
|
}, prefixIcon ? _react["default"].createElement(PrefixIconContainer, {
|
|
344
370
|
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
345
371
|
disabled: disabled,
|
|
346
372
|
onClick: !disabled ? onClickPrefix : null,
|
|
347
373
|
interactuable: typeof onClickPrefix === "function" && !disabled,
|
|
374
|
+
backgroundType: backgroundType,
|
|
348
375
|
onKeyPress: handlePrefixKeyPress
|
|
349
376
|
}, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : _react["default"].createElement(prefixIcon)) : prefixIconSrc && _react["default"].createElement(PrefixIcon, {
|
|
350
377
|
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
@@ -358,6 +385,7 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
358
385
|
disabled: disabled,
|
|
359
386
|
onClick: !disabled ? onClickPrefix : null,
|
|
360
387
|
interactuable: typeof onClickPrefix === "function" && !disabled,
|
|
388
|
+
backgroundType: backgroundType,
|
|
361
389
|
onKeyPress: handlePrefixKeyPress
|
|
362
390
|
}, prefix), _react["default"].createElement(_TextField["default"], {
|
|
363
391
|
error: invalid,
|
|
@@ -383,6 +411,7 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
383
411
|
disabled: disabled,
|
|
384
412
|
onClick: onClickSuffix,
|
|
385
413
|
interactuable: typeof onClickSuffix === "function" && !disabled,
|
|
414
|
+
backgroundType: backgroundType,
|
|
386
415
|
onKeyPress: handleSuffixKeyPress
|
|
387
416
|
}, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : _react["default"].createElement(suffixIcon)) : suffixIconSrc && _react["default"].createElement(SuffixIcon, {
|
|
388
417
|
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
@@ -396,6 +425,7 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
396
425
|
onClick: onClickSuffix,
|
|
397
426
|
disabled: disabled,
|
|
398
427
|
interactuable: typeof onClickSuffix === "function" && !disabled,
|
|
428
|
+
backgroundType: backgroundType,
|
|
399
429
|
onKeyPress: handleSuffixKeyPress
|
|
400
430
|
}, suffix))
|
|
401
431
|
},
|
|
@@ -414,22 +444,9 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
414
444
|
marginTop: "0px"
|
|
415
445
|
}
|
|
416
446
|
}
|
|
417
|
-
}, _react["default"].createElement(
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}, _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && filteredOptions.length === 0 && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
|
|
421
|
-
return _react["default"].createElement(_MenuItem["default"], {
|
|
422
|
-
key: suggestion,
|
|
423
|
-
onMouseDown: function onMouseDown(event) {
|
|
424
|
-
return event.preventDefault();
|
|
425
|
-
},
|
|
426
|
-
onClick: function onClick() {
|
|
427
|
-
return handlerSuggestionClicked(suggestion);
|
|
428
|
-
}
|
|
429
|
-
}, suggestion);
|
|
430
|
-
}), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIcon, {
|
|
431
|
-
src: _error["default"]
|
|
432
|
-
})))))));
|
|
447
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
448
|
+
color: colorsTheme.inputText.optionBackgroundColor
|
|
449
|
+
}, _react["default"].createElement(ThemedSuggestions, null))));
|
|
433
450
|
};
|
|
434
451
|
|
|
435
452
|
var sizes = {
|
|
@@ -465,14 +482,38 @@ var DxcSuggestions = (0, _styledComponents["default"])(_Popper["default"])(_temp
|
|
|
465
482
|
|
|
466
483
|
var SuggestionsContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
467
484
|
return calculateWidth(props.margin, props.size);
|
|
485
|
+
}, function (props) {
|
|
486
|
+
return props.theme.optionBackgroundColor;
|
|
487
|
+
}, function (props) {
|
|
488
|
+
return props.theme.fontFamily;
|
|
489
|
+
}, function (props) {
|
|
490
|
+
return props.theme.optionFontSize;
|
|
491
|
+
}, function (props) {
|
|
492
|
+
return props.theme.optionFontStyle;
|
|
493
|
+
}, function (props) {
|
|
494
|
+
return props.theme.optionFontWeight;
|
|
495
|
+
}, function (props) {
|
|
496
|
+
return props.backgroundType === "dark" ? props.theme.optionFontColorOnDark : props.theme.optionFontColor;
|
|
497
|
+
}, function (props) {
|
|
498
|
+
return props.theme.optionBorderColor;
|
|
499
|
+
}, function (props) {
|
|
500
|
+
return props.theme.optionBorderThickness;
|
|
501
|
+
}, function (props) {
|
|
502
|
+
return props.theme.optionBorderStyle;
|
|
468
503
|
}, function (props) {
|
|
469
504
|
return props.theme.scrollBarTrackColor;
|
|
470
505
|
}, function (props) {
|
|
471
506
|
return props.theme.scrollBarThumbColor;
|
|
507
|
+
}, function (props) {
|
|
508
|
+
return props.theme.optionPaddingBottom;
|
|
509
|
+
}, function (props) {
|
|
510
|
+
return props.theme.optionPaddingTop;
|
|
472
511
|
}, function (props) {
|
|
473
512
|
return props.theme.hoverOptionColor;
|
|
474
513
|
}, function (props) {
|
|
475
|
-
return props.theme.
|
|
514
|
+
return props.backgroundType === "dark" ? props.theme.hoverOptionBackgroundColorOnDark : props.theme.hoverOptionBackgroundColor;
|
|
515
|
+
}, function (props) {
|
|
516
|
+
return props.backgroundType === "dark" ? props.theme.selectedOptionBackgroundColorOnDark : props.theme.selectedOptionBackgroundColor;
|
|
476
517
|
});
|
|
477
518
|
|
|
478
519
|
var PrefixIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
|
|
@@ -482,15 +523,23 @@ var PrefixIcon = _styledComponents["default"].img(_templateObject4(), function (
|
|
|
482
523
|
});
|
|
483
524
|
|
|
484
525
|
var PrefixIconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
526
|
+
return props.backgroundType === "dark" ? props.theme.prefixIconColorOnDark : props.theme.prefixIconColor;
|
|
527
|
+
}, function (props) {
|
|
485
528
|
return props.disabled && 0.5 || 1;
|
|
486
529
|
}, function (props) {
|
|
487
530
|
return getCursor(props.interactuable, props.disabled);
|
|
488
531
|
});
|
|
489
532
|
|
|
490
533
|
var PrefixLabel = _styledComponents["default"].span(_templateObject6(), function (props) {
|
|
534
|
+
return props.theme.prefixLabelFontWeight;
|
|
535
|
+
}, function (props) {
|
|
491
536
|
return props.theme.fontFamily;
|
|
492
537
|
}, function (props) {
|
|
493
|
-
return props.theme.
|
|
538
|
+
return props.theme.prefixLabelFontSize;
|
|
539
|
+
}, function (props) {
|
|
540
|
+
return props.theme.prefixLabelFontStyle;
|
|
541
|
+
}, function (props) {
|
|
542
|
+
return props.backgroundType === "dark" ? props.theme.prefixLabelFontColorOnDark : props.theme.prefixLabelFontColor;
|
|
494
543
|
}, function (props) {
|
|
495
544
|
return props.disabled && 0.5 || 1;
|
|
496
545
|
}, function (props) {
|
|
@@ -504,6 +553,8 @@ var SuffixIcon = _styledComponents["default"].img(_templateObject7(), function (
|
|
|
504
553
|
});
|
|
505
554
|
|
|
506
555
|
var SuffixIconContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
|
|
556
|
+
return props.backgroundType === "dark" ? props.theme.suffixIconColorOnDark : props.theme.suffixIconColor;
|
|
557
|
+
}, function (props) {
|
|
507
558
|
return props.disabled && 0.5 || 1;
|
|
508
559
|
}, function (props) {
|
|
509
560
|
return getCursor(props.interactuable, props.disabled);
|
|
@@ -511,11 +562,19 @@ var SuffixIconContainer = _styledComponents["default"].div(_templateObject8(), f
|
|
|
511
562
|
|
|
512
563
|
var SuffixLabel = _styledComponents["default"].span(_templateObject9(), function (props) {
|
|
513
564
|
return getCursor(props.interactuable, props.disabled);
|
|
565
|
+
}, function (props) {
|
|
566
|
+
return props.theme.suffixLabelFontWeight;
|
|
567
|
+
}, function (props) {
|
|
568
|
+
return props.theme.fontFamily;
|
|
569
|
+
}, function (props) {
|
|
570
|
+
return props.theme.suffixLabelFontSize;
|
|
571
|
+
}, function (props) {
|
|
572
|
+
return props.theme.suffixLabelFontStyle;
|
|
573
|
+
}, function (props) {
|
|
574
|
+
return props.backgroundType === "dark" ? props.theme.suffixLabelFontColorOnDark : props.theme.suffixLabelFontColor;
|
|
514
575
|
});
|
|
515
576
|
|
|
516
577
|
var TextContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
517
|
-
return props.theme.fontSizeBase;
|
|
518
|
-
}, function (props) {
|
|
519
578
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
520
579
|
}, function (props) {
|
|
521
580
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
@@ -529,18 +588,30 @@ var TextContainer = _styledComponents["default"].div(_templateObject10(), functi
|
|
|
529
588
|
return calculateWidth(props.margin, props.size);
|
|
530
589
|
}, function (props) {
|
|
531
590
|
return props.theme.fontFamily;
|
|
591
|
+
}, function (props) {
|
|
592
|
+
return props.theme.assistiveTextFontWeight;
|
|
532
593
|
}, function (props) {
|
|
533
594
|
return props.theme.fontFamily;
|
|
534
595
|
}, function (props) {
|
|
535
|
-
return props.theme.
|
|
596
|
+
return props.theme.assistiveTextFontSize;
|
|
597
|
+
}, function (props) {
|
|
598
|
+
return props.theme.assistiveTextFontStyle;
|
|
536
599
|
}, function (props) {
|
|
537
|
-
return props.theme.
|
|
600
|
+
return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
|
|
538
601
|
}, function (props) {
|
|
539
|
-
return props.theme.
|
|
602
|
+
return props.theme.labelFontSize;
|
|
603
|
+
}, function (props) {
|
|
604
|
+
return props.theme.labelFontStyle;
|
|
605
|
+
}, function (props) {
|
|
606
|
+
return props.theme.labelFontWeight;
|
|
607
|
+
}, function (props) {
|
|
608
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
540
609
|
}, function (props) {
|
|
541
610
|
return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
|
|
542
611
|
}, function (props) {
|
|
543
|
-
return props.theme.
|
|
612
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
613
|
+
}, function (props) {
|
|
614
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
544
615
|
}, function (props) {
|
|
545
616
|
return props.prefixIconSrc || props.prefixIcon || (props.prefix || props.suffix) && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
|
|
546
617
|
}, function (props) {
|
|
@@ -548,58 +619,63 @@ var TextContainer = _styledComponents["default"].div(_templateObject10(), functi
|
|
|
548
619
|
}, function (props) {
|
|
549
620
|
return props.prefixIcon && "translate(8px, 1.5px) scale(0.75);" || props.prefixIconSrc && "translate(8px, 1.5px) scale(0.75);" || props.prefix && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
|
|
550
621
|
}, function (props) {
|
|
551
|
-
return props.theme.
|
|
622
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
552
623
|
}, function (props) {
|
|
553
624
|
return props.theme.fontFamily;
|
|
554
625
|
}, function (props) {
|
|
555
|
-
return props.theme.
|
|
626
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
556
627
|
}, function (props) {
|
|
557
|
-
return props.theme.
|
|
628
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
558
629
|
}, function (props) {
|
|
559
|
-
return props.theme.
|
|
630
|
+
return props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor;
|
|
560
631
|
}, function (props) {
|
|
561
|
-
return props.theme.
|
|
632
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
562
633
|
}, function (props) {
|
|
563
634
|
return props.theme.fontFamily;
|
|
564
635
|
}, function (props) {
|
|
565
|
-
return "
|
|
636
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
566
637
|
}, function (props) {
|
|
567
|
-
return "
|
|
638
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
568
639
|
}, function (props) {
|
|
569
|
-
return "
|
|
640
|
+
return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
|
|
570
641
|
}, function (props) {
|
|
571
|
-
return props.theme.
|
|
642
|
+
return props.theme.underlineThickness;
|
|
572
643
|
}, function (props) {
|
|
573
|
-
return props.theme.
|
|
644
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
574
645
|
}, function (props) {
|
|
575
|
-
return props.theme.
|
|
646
|
+
return props.theme.underlineThickness;
|
|
576
647
|
}, function (props) {
|
|
577
|
-
return "
|
|
648
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
578
649
|
}, function (props) {
|
|
579
|
-
return
|
|
650
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
580
651
|
}, function (props) {
|
|
581
|
-
return props.theme.
|
|
652
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
|
|
582
653
|
}, function (props) {
|
|
583
|
-
return props.theme.
|
|
654
|
+
return props.theme.valueFontSize;
|
|
584
655
|
}, function (props) {
|
|
585
|
-
return props.theme.
|
|
656
|
+
return props.theme.valueFontStyle;
|
|
586
657
|
}, function (props) {
|
|
587
|
-
return props.theme.
|
|
658
|
+
return props.theme.valueFontWeight;
|
|
588
659
|
}, function (props) {
|
|
589
|
-
return props.theme.
|
|
660
|
+
return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
661
|
+
}, function (props) {
|
|
662
|
+
return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
|
|
663
|
+
}, function (props) {
|
|
664
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
665
|
+
}, function (props) {
|
|
666
|
+
return props.theme.fontFamily;
|
|
590
667
|
}, function (props) {
|
|
591
|
-
return props.theme.
|
|
668
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
592
669
|
}, function (props) {
|
|
593
|
-
return props.theme.
|
|
670
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
594
671
|
}, function (props) {
|
|
595
|
-
return props.theme.
|
|
672
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
596
673
|
});
|
|
597
674
|
|
|
598
675
|
DxcInputText.propTypes = {
|
|
599
676
|
label: _propTypes["default"].string,
|
|
600
677
|
name: _propTypes["default"].string,
|
|
601
678
|
value: _propTypes["default"].string,
|
|
602
|
-
theme: _propTypes["default"].oneOf(["light", "dark", ""]),
|
|
603
679
|
assistiveText: _propTypes["default"].string,
|
|
604
680
|
disabled: _propTypes["default"].bool,
|
|
605
681
|
prefix: _propTypes["default"].string,
|
|
@@ -34,7 +34,7 @@ var _facebook = _interopRequireDefault(require("./facebook.svg"));
|
|
|
34
34
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
35
35
|
|
|
36
36
|
function _templateObject10() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: sticky;\n top: 45vh;\n width: 42px;\n min-height: 42px;\n background-color: ", ";\n border-radius: 50%;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n z-index:
|
|
37
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: sticky;\n top: 45vh;\n width: 42px;\n min-height: 42px;\n background-color: ", ";\n border-radius: 50%;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n z-index: 1250;\n cursor: pointer;\n & > svg {\n fill: ", ";\n }\n"]);
|
|
38
38
|
|
|
39
39
|
_templateObject10 = function _templateObject10() {
|
|
40
40
|
return data;
|
|
@@ -114,7 +114,7 @@ function _templateObject3() {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
function _templateObject2() {
|
|
117
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index:
|
|
117
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 1250;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n"]);
|
|
118
118
|
|
|
119
119
|
_templateObject2 = function _templateObject2() {
|
|
120
120
|
return data;
|
|
@@ -124,7 +124,7 @@ function _templateObject2() {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
function _templateObject() {
|
|
127
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right:0;\n"]);
|
|
127
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n"]);
|
|
128
128
|
|
|
129
129
|
_templateObject = function _templateObject() {
|
|
130
130
|
return data;
|