@splunk/react-ui 4.1.0 → 4.4.1
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/Accordion.js +4 -4
- package/Anchor.js +2 -2
- package/Animation.js +26 -35
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +22 -22
- package/ButtonGroup.js +2 -2
- package/ButtonSimple.js +12 -6
- package/CHANGELOG.md +69 -2
- package/Calendar.js +23 -23
- package/Card.js +15 -15
- package/CardLayout.js +2 -2
- package/Chip.js +13 -13
- package/Clickable.js +4 -4
- package/CloseButton.js +8 -8
- package/Code.js +1279 -1120
- package/CollapsiblePanel.js +11 -11
- package/Color.js +111 -172
- package/ColumnLayout.js +6 -6
- package/ComboBox.js +63 -30
- package/Concertina.js +2 -2
- package/ControlGroup.js +61 -20
- package/Date.js +66 -29
- package/DefinitionList.js +2 -2
- package/Dropdown.js +6 -6
- package/FetchOptions.js +8 -8
- package/File.js +87 -72
- package/FormRows.js +219 -331
- package/Heading.js +2 -2
- package/Image.js +15 -15
- package/JSONTree.js +63 -20
- package/Layer.js +8 -8
- package/Link.js +13 -13
- package/List.js +2 -2
- package/Markdown.js +19 -19
- package/Menu.js +315 -230
- package/Message.js +19 -19
- package/Modal.js +22 -11
- package/ModalLayer.js +25 -11
- package/Monogram.js +7 -7
- package/Multiselect.js +1931 -1057
- package/Number.js +40 -27
- package/Paginator.js +67 -49
- package/Paragraph.js +2 -2
- package/Popover.js +62 -35
- package/Progress.js +9 -21
- package/RadioBar.js +6 -6
- package/RadioList.js +2 -2
- package/ResultsMenu.js +18 -10
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +37 -19
- package/ScrollContainerContext.js +2 -2
- package/Select.js +1309 -562
- package/SidePanel.js +22 -17
- package/Slider.js +8 -8
- package/SlidingPanels.js +63 -47
- package/StaticContent.js +2 -2
- package/StepBar.js +8 -8
- package/Switch.js +20 -11
- package/TabBar.js +54 -40
- package/TabLayout.js +4 -4
- package/Table.js +148 -85
- package/Text.js +474 -356
- package/Tooltip.js +6 -6
- package/TransitionOpen.js +26 -24
- package/WaitSpinner.js +4 -4
- package/package.json +8 -7
- package/stubs-splunkui.d.ts +1 -0
- package/types/src/Accordion/Accordion.d.ts +2 -2
- package/types/src/Animation/Animation.d.ts +6 -5
- package/types/src/Button/Button.d.ts +2 -2
- package/types/src/ButtonSimple/ButtonSimple.d.ts +5 -5
- package/types/src/Calendar/DateTable.d.ts +1 -0
- package/types/src/Calendar/MonthHeader.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -2
- package/types/src/Color/Color.d.ts +5 -4
- package/types/src/Color/Swatch.d.ts +4 -15
- package/types/src/ComboBox/ComboBox.d.ts +2 -2
- package/types/src/ControlGroup/ControlGroup.d.ts +7 -2
- package/types/src/ControlGroup/ControlGroupContext.d.ts +15 -0
- package/types/src/Date/Date.d.ts +7 -5
- package/types/src/Date/Icon.d.ts +1 -0
- package/types/src/Dropdown/Dropdown.d.ts +1 -1
- package/types/src/File/File.d.ts +2 -2
- package/types/src/File/FileContext.d.ts +9 -0
- package/types/src/File/Icon.d.ts +1 -0
- package/types/src/File/IconCloud.d.ts +1 -0
- package/types/src/File/Item.d.ts +5 -10
- package/types/src/File/PaperClip.d.ts +1 -0
- package/types/src/File/Retry.d.ts +1 -0
- package/types/src/File/Trash.d.ts +1 -0
- package/types/src/FormRows/FormRows.d.ts +11 -69
- package/types/src/FormRows/FormRowsContext.d.ts +9 -0
- package/types/src/FormRows/Row.d.ts +7 -20
- package/types/src/JSONTree/JSONTree.d.ts +14 -2
- package/types/src/JSONTree/TreeNode.d.ts +4 -1
- package/types/src/Menu/Divider.d.ts +1 -0
- package/types/src/Menu/Heading.d.ts +3 -1
- package/types/src/Menu/Item.d.ts +22 -6
- package/types/src/Menu/Menu.d.ts +17 -18
- package/types/src/Menu/MenuContext.d.ts +6 -0
- package/types/src/Menu/index.d.ts +1 -0
- package/types/src/Multiselect/Compact.d.ts +7 -26
- package/types/src/Multiselect/Multiselect.d.ts +7 -2
- package/types/src/Multiselect/Normal.d.ts +8 -2
- package/types/src/Multiselect/Option.d.ts +4 -1
- package/types/src/Number/IncrementIcon.d.ts +1 -0
- package/types/src/Number/Number.d.ts +4 -4
- package/types/src/Paginator/PageSeparator.d.ts +3 -0
- package/types/src/Popover/Popover.d.ts +5 -5
- package/types/src/Popover/PopoverContext.d.ts +6 -0
- package/types/src/Popover/index.d.ts +1 -0
- package/types/src/RadioBar/RadioBar.d.ts +5 -5
- package/types/src/RadioList/RadioListContext.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +4 -0
- package/types/src/Scroll/Inner.d.ts +4 -3
- package/types/src/Scroll/Scroll.d.ts +1 -1
- package/types/src/Select/Option.d.ts +2 -5
- package/types/src/Select/OptionBase.d.ts +94 -0
- package/types/src/Select/Select.d.ts +12 -37
- package/types/src/Select/SelectBase.d.ts +221 -0
- package/types/src/SidePanel/SidePanel.d.ts +4 -0
- package/types/src/Slider/Slider.d.ts +4 -4
- package/types/src/SlidingPanels/SlidingPanels.d.ts +0 -1
- package/types/src/Switch/CheckIcon.d.ts +1 -0
- package/types/src/Switch/Switch.d.ts +3 -7
- package/types/src/TabBar/Tab.d.ts +4 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -2
- package/types/src/Table/DragHandle.d.ts +1 -0
- package/types/src/Table/Head.d.ts +2 -0
- package/types/src/Table/HeadCell.d.ts +2 -2
- package/types/src/Table/HeadDropdownCell.d.ts +1 -1
- package/types/src/Table/HeadExpandRowsIcon.d.ts +1 -0
- package/types/src/Table/HeadInner.d.ts +3 -3
- package/types/src/Table/Table.d.ts +7 -3
- package/types/src/Table/Toggle.d.ts +1 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -0
- package/types/src/Text/IconOutlinedView.d.ts +1 -0
- package/types/src/Text/Text.d.ts +28 -12
- package/types/src/Tooltip/InfoIcon.d.ts +1 -0
- package/types/src/Tooltip/Tooltip.d.ts +3 -3
- package/types/src/icons/Alert.d.ts +1 -0
- package/types/src/icons/AlertFilled.d.ts +1 -0
- package/types/src/icons/CaretDown.d.ts +1 -0
- package/types/src/icons/CaretRight.d.ts +1 -0
- package/types/src/icons/Check.d.ts +1 -0
- package/types/src/icons/ChevronDown.d.ts +1 -0
- package/types/src/icons/ChevronLeft.d.ts +1 -0
- package/types/src/icons/ChevronRight.d.ts +1 -0
- package/types/src/icons/CrossMark.d.ts +1 -0
- package/types/src/icons/External.d.ts +1 -0
- package/types/src/icons/InfoFilled.d.ts +1 -0
- package/types/src/icons/More.d.ts +1 -0
- package/types/src/icons/MoreVertical.d.ts +1 -0
- package/types/src/icons/Plus.d.ts +1 -0
- package/types/src/icons/SVG.d.ts +1 -0
- package/types/src/icons/Search.d.ts +1 -0
- package/types/src/icons/SortedDown.d.ts +1 -0
- package/types/src/icons/SortedUp.d.ts +1 -0
- package/types/src/icons/Success.d.ts +1 -0
- package/types/src/icons/SuccessFilled.d.ts +1 -0
- package/types/src/icons/WarningFilled.d.ts +1 -0
- package/types/src/utils/types.d.ts +1 -0
package/Text.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 116);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,21 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 100:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("@splunk/react-ui/ControlGroup");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 101:
|
|
112
|
+
/***/ (function(module, exports) {
|
|
113
|
+
|
|
114
|
+
module.exports = require("@splunk/react-icons/Search");
|
|
115
|
+
|
|
116
|
+
/***/ }),
|
|
117
|
+
|
|
118
|
+
/***/ 116:
|
|
105
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
120
|
|
|
107
121
|
"use strict";
|
|
@@ -127,7 +141,7 @@ var external_react_event_listener_default = /*#__PURE__*/__webpack_require__.n(e
|
|
|
127
141
|
var external_lodash_ = __webpack_require__(4);
|
|
128
142
|
|
|
129
143
|
// EXTERNAL MODULE: external "@splunk/ui-utils/style"
|
|
130
|
-
var style_ = __webpack_require__(
|
|
144
|
+
var style_ = __webpack_require__(40);
|
|
131
145
|
|
|
132
146
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
133
147
|
var ScreenReaderContent_ = __webpack_require__(14);
|
|
@@ -136,11 +150,14 @@ var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReade
|
|
|
136
150
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
137
151
|
var themes_ = __webpack_require__(0);
|
|
138
152
|
|
|
153
|
+
// EXTERNAL MODULE: external "@splunk/react-ui/ControlGroup"
|
|
154
|
+
var ControlGroup_ = __webpack_require__(100);
|
|
155
|
+
|
|
139
156
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
140
157
|
var i18n_ = __webpack_require__(5);
|
|
141
158
|
|
|
142
159
|
// EXTERNAL MODULE: external "@splunk/react-icons/Search"
|
|
143
|
-
var Search_ = __webpack_require__(
|
|
160
|
+
var Search_ = __webpack_require__(101);
|
|
144
161
|
var Search_default = /*#__PURE__*/__webpack_require__.n(Search_);
|
|
145
162
|
|
|
146
163
|
// EXTERNAL MODULE: ./src/icons/ThemedIcon.tsx
|
|
@@ -187,7 +204,7 @@ function Search(props) {
|
|
|
187
204
|
}, props));
|
|
188
205
|
}
|
|
189
206
|
// EXTERNAL MODULE: ./src/icons/CrossMark.tsx
|
|
190
|
-
var CrossMark = __webpack_require__(
|
|
207
|
+
var CrossMark = __webpack_require__(21);
|
|
191
208
|
|
|
192
209
|
// CONCATENATED MODULE: ./src/Text/syncHeightWithShadow.ts
|
|
193
210
|
// This file was adapted from [Call-Em-All's material-ui](https://github.com/mui-org/material-ui),
|
|
@@ -268,7 +285,7 @@ function syncHeightWithShadow(_ref) {
|
|
|
268
285
|
var updateReactRef = __webpack_require__(12);
|
|
269
286
|
|
|
270
287
|
// EXTERNAL MODULE: external "@splunk/react-icons/SVG"
|
|
271
|
-
var SVG_ = __webpack_require__(
|
|
288
|
+
var SVG_ = __webpack_require__(22);
|
|
272
289
|
var SVG_default = /*#__PURE__*/__webpack_require__.n(SVG_);
|
|
273
290
|
|
|
274
291
|
// CONCATENATED MODULE: ./src/Text/IconOutlinedHide.tsx
|
|
@@ -287,7 +304,7 @@ function IconOutlinedHide(props) {
|
|
|
287
304
|
if (family === 'enterprise') {
|
|
288
305
|
return /*#__PURE__*/external_react_default.a.createElement(SVG_default.a, IconOutlinedHide_extends({
|
|
289
306
|
viewBox: "0 0 24 24",
|
|
290
|
-
size: 1,
|
|
307
|
+
size: 1.2,
|
|
291
308
|
screenReaderText: Object(i18n_["_"])('Hide password')
|
|
292
309
|
}, props), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
293
310
|
fillRule: "evenodd",
|
|
@@ -343,7 +360,7 @@ function IconOutlinedView(props) {
|
|
|
343
360
|
if (family === 'enterprise') {
|
|
344
361
|
return /*#__PURE__*/external_react_default.a.createElement(SVG_default.a, IconOutlinedView_extends({
|
|
345
362
|
viewBox: "0 0 24 24",
|
|
346
|
-
size: 1,
|
|
363
|
+
size: 1.2,
|
|
347
364
|
screenReaderText: Object(i18n_["_"])('View password')
|
|
348
365
|
}, props), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
349
366
|
fillRule: "evenodd",
|
|
@@ -381,10 +398,6 @@ function IconOutlinedView(props) {
|
|
|
381
398
|
}
|
|
382
399
|
|
|
383
400
|
/* harmony default export */ var Text_IconOutlinedView = (IconOutlinedView);
|
|
384
|
-
// EXTERNAL MODULE: external "lodash/startCase"
|
|
385
|
-
var startCase_ = __webpack_require__(99);
|
|
386
|
-
var startCase_default = /*#__PURE__*/__webpack_require__.n(startCase_);
|
|
387
|
-
|
|
388
401
|
// EXTERNAL MODULE: external "styled-components"
|
|
389
402
|
var external_styled_components_ = __webpack_require__(3);
|
|
390
403
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
@@ -393,84 +406,30 @@ var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(exte
|
|
|
393
406
|
var Box_ = __webpack_require__(8);
|
|
394
407
|
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
395
408
|
|
|
396
|
-
//
|
|
409
|
+
// EXTERNAL MODULE: external "@splunk/react-ui/Button"
|
|
410
|
+
var Button_ = __webpack_require__(16);
|
|
411
|
+
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
|
|
397
412
|
|
|
413
|
+
// CONCATENATED MODULE: ./src/Text/TextStyles.ts
|
|
398
414
|
|
|
399
415
|
|
|
400
416
|
|
|
401
|
-
var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
402
|
-
displayName: "TextStyles__StyledBox",
|
|
403
|
-
componentId: "eg7n6t-0"
|
|
404
|
-
})(["flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:230px;flex-basis:230px;[data-inline] + &{margin-left:", ";}}"], Object(themes_["pick"])({
|
|
405
|
-
enterprise: themes_["variables"].spacingHalf,
|
|
406
|
-
prisma: themes_["variables"].spacingSmall
|
|
407
|
-
}));
|
|
408
|
-
|
|
409
|
-
var TextStyles_addPadding = function addPadding(property, type, base) {
|
|
410
|
-
return Object(external_styled_components_["css"])(["", ":", ";"],
|
|
411
|
-
/* sc-prop */
|
|
412
|
-
property, function (_ref) {
|
|
413
|
-
var $customStyle = _ref.$customStyle;
|
|
414
|
-
var custom = $customStyle && $customStyle["padding".concat(startCase_default()(type))] || '0px';
|
|
415
|
-
return custom ? Object(external_styled_components_["css"])(["calc(", " + ", ")"], base, custom) : base;
|
|
416
|
-
});
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
var leftIconPadding = Object(external_styled_components_["css"])(["", ""], function (props) {
|
|
420
|
-
var padding = Object(themes_["pick"])({
|
|
421
|
-
prisma: {
|
|
422
|
-
compact: '35px',
|
|
423
|
-
comfortable: '39px'
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
if (padding) {
|
|
428
|
-
var paddingResult = padding(props);
|
|
429
|
-
return TextStyles_addPadding('padding-left', 'left', paddingResult);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
return '';
|
|
433
|
-
});
|
|
434
|
-
var rightIconPadding = Object(external_styled_components_["css"])(["", ""], function (props) {
|
|
435
|
-
var padding = Object(themes_["pick"])({
|
|
436
|
-
enterprise: {
|
|
437
|
-
comfortable: '28px',
|
|
438
|
-
compact: '24px'
|
|
439
|
-
},
|
|
440
|
-
prisma: {
|
|
441
|
-
comfortable: '40px',
|
|
442
|
-
compact: '36px'
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
if (padding) {
|
|
447
|
-
var paddingResult = padding(props);
|
|
448
|
-
return TextStyles_addPadding('padding-right', 'right', paddingResult);
|
|
449
|
-
}
|
|
450
417
|
|
|
451
|
-
|
|
452
|
-
});
|
|
453
|
-
var disabledStyles = Object(external_styled_components_["css"])(["&,&[type]{color:", ";&::placeholder{color:", ";}", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);cursor:not-allowed;}"], Object(themes_["pick"])({
|
|
418
|
+
var disabledStyles = Object(external_styled_components_["css"])(["&,&[type]{cursor:not-allowed;color:", ";&::placeholder{color:", ";}}"], Object(themes_["pick"])({
|
|
454
419
|
enterprise: themes_["variables"].textDisabledColor,
|
|
455
420
|
prisma: themes_["variables"].contentColorDisabled
|
|
456
421
|
}), Object(themes_["pick"])({
|
|
457
422
|
enterprise: themes_["variables"].textDisabledColor,
|
|
458
423
|
prisma: themes_["variables"].contentColorDisabled
|
|
459
|
-
}), Object(themes_["pick"])({
|
|
460
|
-
enterprise: {
|
|
461
|
-
light: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray96, themes_["variables"].gray92),
|
|
462
|
-
dark: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray22, themes_["variables"].gray30)
|
|
463
|
-
},
|
|
464
|
-
prisma: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorBorderDisabled)
|
|
465
424
|
}));
|
|
466
|
-
var
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
})
|
|
470
|
-
enterprise:
|
|
425
|
+
var buttonStyles = Object(external_styled_components_["css"])(["border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}"], Object(themes_["pick"])({
|
|
426
|
+
enterprise: themes_["variables"].borderRadius,
|
|
427
|
+
prisma: '50%'
|
|
428
|
+
}), Object(themes_["pick"])({
|
|
429
|
+
enterprise: Object(external_styled_components_["css"])(["width:", ";height:", ";"], themes_["variables"].inputHeight, themes_["variables"].inputHeight),
|
|
471
430
|
prisma: {
|
|
472
|
-
comfortable:
|
|
473
|
-
compact:
|
|
431
|
+
comfortable: Object(external_styled_components_["css"])(["width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;"]),
|
|
432
|
+
compact: Object(external_styled_components_["css"])(["width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;"])
|
|
474
433
|
}
|
|
475
434
|
}), Object(themes_["pick"])({
|
|
476
435
|
enterprise: {
|
|
@@ -478,199 +437,266 @@ var StyledClear = external_styled_components_default.a.span.withConfig({
|
|
|
478
437
|
dark: themes_["variables"].white
|
|
479
438
|
},
|
|
480
439
|
prisma: themes_["variables"].contentColorDefault
|
|
481
|
-
})
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
prisma: '8px'
|
|
491
|
-
});
|
|
492
|
-
|
|
493
|
-
if (padding) {
|
|
494
|
-
var paddingResult = padding(props);
|
|
495
|
-
return TextStyles_addPadding('right', 'right', paddingResult);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
return '';
|
|
499
|
-
});
|
|
500
|
-
var StyledVisibilityToggle = external_styled_components_default.a.button.withConfig({
|
|
501
|
-
displayName: "TextStyles__StyledVisibilityToggle",
|
|
502
|
-
componentId: "eg7n6t-2"
|
|
503
|
-
})(["", ";position:absolute;padding:", ";top:", ";border-radius:", ";right:", ";color:", ";cursor:pointer;z-index:1;&:hover{color:", ";background-color:", ";", "}&:focus{box-shadow:", ";", "}"], themes_["mixins"].reset('inline'), Object(themes_["pick"])({
|
|
440
|
+
}));
|
|
441
|
+
var StyledClearButton = external_styled_components_default()(Button_default.a).withConfig({
|
|
442
|
+
displayName: "TextStyles__StyledClearButton",
|
|
443
|
+
componentId: "eg7n6t-0"
|
|
444
|
+
})(["display:none;visibility:hidden;", ""], buttonStyles);
|
|
445
|
+
var StyledSearchIconWrapper = external_styled_components_default.a.span.withConfig({
|
|
446
|
+
displayName: "TextStyles__StyledSearchIconWrapper",
|
|
447
|
+
componentId: "eg7n6t-1"
|
|
448
|
+
})(["", ";color:", ";pointer-events:none;padding:", ";&[disabled]{", ";}"], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
|
|
504
449
|
enterprise: {
|
|
505
|
-
|
|
506
|
-
|
|
450
|
+
light: themes_["variables"].gray60,
|
|
451
|
+
dark: themes_["variables"].white
|
|
507
452
|
},
|
|
508
|
-
prisma: {
|
|
509
|
-
comfortable: '2px',
|
|
510
|
-
compact: '1px'
|
|
511
|
-
}
|
|
512
|
-
}), Object(themes_["pick"])({
|
|
513
|
-
enterprise: '1px',
|
|
514
|
-
prisma: {
|
|
515
|
-
comfortable: '6px',
|
|
516
|
-
compact: '5px'
|
|
517
|
-
}
|
|
518
|
-
}), Object(themes_["pick"])({
|
|
519
|
-
enterprise: themes_["variables"].borderRadius,
|
|
520
|
-
prisma: '50%'
|
|
521
|
-
}), Object(themes_["pick"])({
|
|
522
|
-
enterprise: '1px',
|
|
523
|
-
prisma: '8px'
|
|
524
|
-
}), Object(themes_["pick"])({
|
|
525
|
-
enterprise: themes_["variables"].textGray,
|
|
526
453
|
prisma: themes_["variables"].contentColorMuted
|
|
527
454
|
}), Object(themes_["pick"])({
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}), Object(themes_["pick"])({
|
|
531
|
-
enterprise: themes_["variables"].backgroundColorHover,
|
|
532
|
-
prisma: themes_["variables"].interactiveColorOverlayHover
|
|
455
|
+
comfortable: '0 8px',
|
|
456
|
+
compact: '0 6px'
|
|
533
457
|
}), Object(themes_["pick"])({
|
|
534
|
-
prisma: Object(external_styled_components_["css"])(["
|
|
535
|
-
}), themes_["variables"].focusShadow, Object(themes_["pick"])({
|
|
536
|
-
prisma: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].interactiveColorOverlayHover)
|
|
458
|
+
prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
|
|
537
459
|
}));
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
460
|
+
var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
461
|
+
displayName: "TextStyles__StyledBox",
|
|
462
|
+
componentId: "eg7n6t-2"
|
|
463
|
+
})(["display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:230px;flex-basis:230px;[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}", ""], Object(themes_["pick"])({
|
|
464
|
+
enterprise: themes_["variables"].spacingHalf,
|
|
465
|
+
prisma: themes_["variables"].spacingSmall
|
|
466
|
+
}),
|
|
467
|
+
/* sc-sel */
|
|
468
|
+
StyledSearchIconWrapper, Object(themes_["pick"])({
|
|
469
|
+
enterprise: Object(external_styled_components_["css"])(["display:none;"])
|
|
470
|
+
}),
|
|
471
|
+
/* sc-sel */
|
|
472
|
+
StyledClearButton, function (_ref) {
|
|
473
|
+
var $isTimeInput = _ref.$isTimeInput;
|
|
474
|
+
return $isTimeInput && Object(external_styled_components_["css"])(["@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}"],
|
|
475
|
+
/* sc-sel */
|
|
476
|
+
StyledClearButton);
|
|
477
|
+
});
|
|
478
|
+
var StyledInputWrapper = external_styled_components_default.a.span.withConfig({
|
|
479
|
+
displayName: "TextStyles__StyledInputWrapper",
|
|
542
480
|
componentId: "eg7n6t-3"
|
|
543
|
-
})(["
|
|
481
|
+
})(["", ";flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);padding:", ";align-items:center;", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}", " ", " ", " ", " ", ""], themes_["mixins"].reset('inline-flex'), themes_["variables"].inputHeight, Object(themes_["pick"])({
|
|
544
482
|
enterprise: {
|
|
545
|
-
light: themes_["variables"].
|
|
546
|
-
dark: themes_["variables"].gray22
|
|
547
|
-
},
|
|
548
|
-
prisma: themes_["variables"].transparent
|
|
549
|
-
}), Object(themes_["pick"])({
|
|
550
|
-
enterprise: {
|
|
551
|
-
light: themes_["variables"].borderColor,
|
|
483
|
+
light: themes_["variables"].gray60,
|
|
552
484
|
dark: themes_["variables"].gray20
|
|
553
485
|
},
|
|
554
486
|
prisma: themes_["variables"].interactiveColorBorder
|
|
555
487
|
}), themes_["variables"].borderRadius, Object(themes_["pick"])({
|
|
556
|
-
enterprise: themes_["variables"].textColor,
|
|
557
|
-
prisma: themes_["variables"].contentColorActive
|
|
558
|
-
}), themes_["variables"].sansFontFamily, themes_["variables"].inputHeight, Object(themes_["pick"])({
|
|
559
488
|
enterprise: {
|
|
560
|
-
|
|
561
|
-
|
|
489
|
+
light: themes_["variables"].white,
|
|
490
|
+
dark: themes_["variables"].gray22
|
|
562
491
|
},
|
|
563
|
-
prisma:
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}), function (
|
|
568
|
-
var
|
|
569
|
-
|
|
570
|
-
prisma: '14px'
|
|
571
|
-
});
|
|
572
|
-
|
|
573
|
-
if (padding) {
|
|
574
|
-
var paddingResult = padding(props);
|
|
575
|
-
return Object(external_styled_components_["css"])(["", ";", ";"], TextStyles_addPadding('padding-right', 'right', paddingResult), TextStyles_addPadding('padding-left', 'left', paddingResult));
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
return '';
|
|
579
|
-
}, function (_ref2) {
|
|
580
|
-
var $rightIconPadding = _ref2.$rightIconPadding;
|
|
581
|
-
return $rightIconPadding && rightIconPadding;
|
|
492
|
+
prisma: themes_["variables"].transparent
|
|
493
|
+
}), Object(themes_["pick"])({
|
|
494
|
+
enterprise: '0px 10px',
|
|
495
|
+
prisma: '0px 14px'
|
|
496
|
+
}), function (_ref2) {
|
|
497
|
+
var $hasEndAdornment = _ref2.$hasEndAdornment;
|
|
498
|
+
return $hasEndAdornment && Object(external_styled_components_["css"])(["padding-right:0;"]);
|
|
582
499
|
}, function (_ref3) {
|
|
583
|
-
var $
|
|
584
|
-
return $
|
|
585
|
-
}, function (_ref4) {
|
|
586
|
-
var $prepend = _ref4.$prepend;
|
|
587
|
-
return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
|
|
500
|
+
var $hasStartAdornment = _ref3.$hasStartAdornment;
|
|
501
|
+
return $hasStartAdornment && Object(external_styled_components_["css"])(["padding-left:0;"]);
|
|
588
502
|
}, Object(themes_["pick"])({
|
|
589
503
|
enterprise: {
|
|
590
|
-
light: themes_["variables"].
|
|
504
|
+
light: themes_["variables"].gray60,
|
|
591
505
|
dark: themes_["variables"].gray20
|
|
592
506
|
},
|
|
593
507
|
prisma: themes_["variables"].interactiveColorBorderHover
|
|
594
508
|
}), Object(themes_["pick"])({
|
|
595
509
|
enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
|
|
596
510
|
prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
|
|
597
|
-
}),
|
|
598
|
-
|
|
511
|
+
}), function (_ref4) {
|
|
512
|
+
var $error = _ref4.$error;
|
|
513
|
+
return $error && Object(external_styled_components_["css"])(["&,&:hover{border-color:", ";}"], Object(themes_["pick"])({
|
|
599
514
|
enterprise: themes_["variables"].errorColor,
|
|
600
515
|
prisma: themes_["variables"].accentColorNegative
|
|
601
|
-
})
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
"false": {
|
|
606
|
-
prisma: Object(external_styled_components_["css"])(["&:not(:hover):not(:focus) + ", "{&:not(:hover):not(:focus){display:none;}}"],
|
|
607
|
-
/* sc-sel */
|
|
608
|
-
StyledClear)
|
|
609
|
-
}
|
|
610
|
-
}), themes_["variables"].contentColorMuted, function (_ref5) {
|
|
611
|
-
var disabled = _ref5.disabled;
|
|
612
|
-
return disabled && disabledStyles;
|
|
516
|
+
}));
|
|
517
|
+
}, function (_ref5) {
|
|
518
|
+
var $append = _ref5.$append;
|
|
519
|
+
return $append && Object(external_styled_components_["css"])(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
|
|
613
520
|
}, function (_ref6) {
|
|
614
|
-
var $
|
|
615
|
-
return $
|
|
521
|
+
var $prepend = _ref6.$prepend;
|
|
522
|
+
return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
|
|
523
|
+
}, function (_ref7) {
|
|
524
|
+
var disabled = _ref7.disabled;
|
|
525
|
+
return disabled && Object(external_styled_components_["css"])(["", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);"], Object(themes_["pick"])({
|
|
526
|
+
enterprise: {
|
|
527
|
+
light: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray96, themes_["variables"].gray92),
|
|
528
|
+
dark: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray22, themes_["variables"].gray30)
|
|
529
|
+
},
|
|
530
|
+
prisma: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorBorderDisabled)
|
|
531
|
+
}));
|
|
532
|
+
}, function (_ref8) {
|
|
533
|
+
var $multiline = _ref8.$multiline;
|
|
534
|
+
return $multiline && Object(themes_["pick"])({
|
|
535
|
+
enterprise: Object(external_styled_components_["css"])(["padding-right:0;"])
|
|
536
|
+
});
|
|
616
537
|
});
|
|
617
|
-
|
|
618
|
-
|
|
538
|
+
/* Some of these need greater specificity than input[type=text] */
|
|
539
|
+
|
|
540
|
+
var StyledInput = external_styled_components_default.a.input.withConfig({
|
|
541
|
+
displayName: "TextStyles__StyledInput",
|
|
619
542
|
componentId: "eg7n6t-4"
|
|
620
|
-
})(["
|
|
543
|
+
})(["", ";&,&[type]{outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;&[type='time']{&::-webkit-calendar-picker-indicator{display:none;}height:", ";@media screen and (min--moz-device-pixel-ratio:0){padding-right:", ";}}position:relative;&::placeholder{color:", ";opacity:1;}", " ", "}textarea&{resize:none;overflow:auto;padding-top:", ";padding-bottom:", ";padding-right:", ";}"], themes_["mixins"].reset('inline-flex'), Object(themes_["pick"])({
|
|
544
|
+
enterprise: themes_["variables"].textColor,
|
|
545
|
+
prisma: themes_["variables"].contentColorActive
|
|
546
|
+
}), themes_["variables"].sansFontFamily, Object(themes_["pick"])({
|
|
547
|
+
enterprise: '20px',
|
|
548
|
+
prisma: {
|
|
549
|
+
comfortable: '24px',
|
|
550
|
+
compact: '20px'
|
|
551
|
+
}
|
|
552
|
+
}), Object(themes_["pick"])({
|
|
553
|
+
enterprise: themes_["variables"].spacingHalf,
|
|
554
|
+
prisma: '14px'
|
|
555
|
+
}), themes_["variables"].contentColorMuted, function (_ref9) {
|
|
556
|
+
var $error = _ref9.$error;
|
|
557
|
+
return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], Object(themes_["pick"])({
|
|
558
|
+
enterprise: themes_["variables"].errorColor,
|
|
559
|
+
prisma: themes_["variables"].contentColorActive
|
|
560
|
+
}));
|
|
561
|
+
}, function (_ref10) {
|
|
562
|
+
var disabled = _ref10.disabled;
|
|
563
|
+
return disabled && disabledStyles;
|
|
564
|
+
}, Object(themes_["pick"])({
|
|
621
565
|
enterprise: {
|
|
622
|
-
|
|
623
|
-
|
|
566
|
+
comfortable: themes_["variables"].spacingQuarter,
|
|
567
|
+
compact: '3px'
|
|
624
568
|
},
|
|
625
|
-
prisma:
|
|
569
|
+
prisma: {
|
|
570
|
+
comfortable: themes_["variables"].spacingSmall,
|
|
571
|
+
compact: '5px'
|
|
572
|
+
}
|
|
626
573
|
}), Object(themes_["pick"])({
|
|
627
574
|
enterprise: {
|
|
628
|
-
comfortable:
|
|
629
|
-
compact:
|
|
575
|
+
comfortable: themes_["variables"].spacingQuarter,
|
|
576
|
+
compact: '3px'
|
|
630
577
|
},
|
|
631
578
|
prisma: {
|
|
632
|
-
comfortable:
|
|
633
|
-
compact:
|
|
579
|
+
comfortable: themes_["variables"].spacingSmall,
|
|
580
|
+
compact: '5px'
|
|
634
581
|
}
|
|
635
582
|
}), Object(themes_["pick"])({
|
|
636
|
-
|
|
583
|
+
enterprise: '10px',
|
|
584
|
+
prisma: '14px'
|
|
637
585
|
}));
|
|
586
|
+
var StyledVisibilityToggle = external_styled_components_default()(Button_default.a).withConfig({
|
|
587
|
+
displayName: "TextStyles__StyledVisibilityToggle",
|
|
588
|
+
componentId: "eg7n6t-5"
|
|
589
|
+
})(["", ""], buttonStyles);
|
|
638
590
|
var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
|
|
639
591
|
displayName: "TextStyles__StyledPlaceholder",
|
|
640
|
-
componentId: "eg7n6t-
|
|
641
|
-
})(["color:", ";position:absolute;
|
|
592
|
+
componentId: "eg7n6t-6"
|
|
593
|
+
})(["pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", ""], Object(themes_["pick"])({
|
|
642
594
|
enterprise: themes_["variables"].textGray,
|
|
643
595
|
prisma: themes_["variables"].contentColorMuted
|
|
644
|
-
}), Object(themes_["pick"])({
|
|
596
|
+
}), themes_["variables"].lineHeight, Object(themes_["pick"])({
|
|
597
|
+
enterprise: '10px',
|
|
598
|
+
prisma: '14px'
|
|
599
|
+
}), function (_ref11) {
|
|
600
|
+
var $hasStartAdornment = _ref11.$hasStartAdornment,
|
|
601
|
+
$startAdornmentWidth = _ref11.$startAdornmentWidth;
|
|
602
|
+
return $hasStartAdornment && ($startAdornmentWidth ? Object(external_styled_components_["css"])(["margin-left:", "px;"], $startAdornmentWidth) : Object(external_styled_components_["css"])(["margin-left:", ";"], Object(themes_["pick"])({
|
|
603
|
+
enterprise: {
|
|
604
|
+
comfortable: '30px',
|
|
605
|
+
compact: '26px'
|
|
606
|
+
},
|
|
607
|
+
prisma: {
|
|
608
|
+
comfortable: '38px',
|
|
609
|
+
compact: '30px'
|
|
610
|
+
}
|
|
611
|
+
})));
|
|
612
|
+
}, function (_ref12) {
|
|
613
|
+
var $hasEndAdornment = _ref12.$hasEndAdornment,
|
|
614
|
+
$endAdornmentWidth = _ref12.$endAdornmentWidth;
|
|
615
|
+
return $hasEndAdornment && ($endAdornmentWidth // calc(100% - padding - adorment width)
|
|
616
|
+
? Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", "px );"], Object(themes_["pick"])({
|
|
617
|
+
enterprise: '10px',
|
|
618
|
+
prisma: '14px'
|
|
619
|
+
}), $endAdornmentWidth) : Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", " );"], Object(themes_["pick"])({
|
|
620
|
+
enterprise: '10px',
|
|
621
|
+
prisma: '14px'
|
|
622
|
+
}), Object(themes_["pick"])({
|
|
623
|
+
enterprise: {
|
|
624
|
+
comfortable: '30px',
|
|
625
|
+
compact: '26px'
|
|
626
|
+
},
|
|
627
|
+
prisma: {
|
|
628
|
+
comfortable: '38px',
|
|
629
|
+
compact: '30px'
|
|
630
|
+
}
|
|
631
|
+
})));
|
|
632
|
+
}, function (_ref13) {
|
|
633
|
+
var $hasBothAdornment = _ref13.$hasBothAdornment,
|
|
634
|
+
$endAdornmentWidth = _ref13.$endAdornmentWidth,
|
|
635
|
+
$startAdornmentWidth = _ref13.$startAdornmentWidth;
|
|
636
|
+
return $hasBothAdornment && Object(external_styled_components_["css"])(["max-width:calc(100% - ", "px - ", "px);"], $startAdornmentWidth, $endAdornmentWidth);
|
|
637
|
+
});
|
|
638
|
+
var adornmentHolder = Object(external_styled_components_["css"])(["display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;"], Object(themes_["pick"])({
|
|
645
639
|
enterprise: {
|
|
646
|
-
comfortable:
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
640
|
+
comfortable: '30px',
|
|
641
|
+
compact: '26px'
|
|
642
|
+
},
|
|
643
|
+
prisma: {
|
|
644
|
+
comfortable: '38px',
|
|
645
|
+
compact: '30px'
|
|
646
|
+
}
|
|
647
|
+
}));
|
|
648
|
+
var StyledStartAdornmentHolder = external_styled_components_default.a.div.withConfig({
|
|
649
|
+
displayName: "TextStyles__StyledStartAdornmentHolder",
|
|
650
|
+
componentId: "eg7n6t-7"
|
|
651
|
+
})(["", " ", ";"], adornmentHolder, function (_ref14) {
|
|
652
|
+
var $width = _ref14.$width;
|
|
653
|
+
return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
|
|
654
|
+
enterprise: {
|
|
655
|
+
comfortable: '30px',
|
|
656
|
+
compact: '26px'
|
|
657
|
+
},
|
|
658
|
+
prisma: {
|
|
659
|
+
comfortable: '38px',
|
|
660
|
+
compact: '30px'
|
|
661
|
+
}
|
|
662
|
+
}));
|
|
663
|
+
});
|
|
664
|
+
var StyledEndAdornmentHolder = external_styled_components_default.a.div.withConfig({
|
|
665
|
+
displayName: "TextStyles__StyledEndAdornmentHolder",
|
|
666
|
+
componentId: "eg7n6t-8"
|
|
667
|
+
})(["", " ", ";"], adornmentHolder, function (_ref15) {
|
|
668
|
+
var $width = _ref15.$width;
|
|
669
|
+
return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
|
|
670
|
+
enterprise: {
|
|
671
|
+
comfortable: '30px',
|
|
672
|
+
compact: '26px'
|
|
673
|
+
},
|
|
674
|
+
prisma: {
|
|
675
|
+
comfortable: '38px',
|
|
676
|
+
compact: '30px'
|
|
677
|
+
}
|
|
678
|
+
}));
|
|
679
|
+
});
|
|
680
|
+
var StyledAdornment = external_styled_components_default.a.div.withConfig({
|
|
681
|
+
displayName: "TextStyles__StyledAdornment",
|
|
682
|
+
componentId: "eg7n6t-9"
|
|
683
|
+
})(["display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";", ";", ";", ""], Object(themes_["pick"])({
|
|
684
|
+
enterprise: {
|
|
685
|
+
comfortable: '30px',
|
|
686
|
+
compact: '26px'
|
|
663
687
|
},
|
|
664
688
|
prisma: {
|
|
665
|
-
comfortable:
|
|
666
|
-
|
|
667
|
-
return $renderSearchIcon ? '40px' : '14px';
|
|
668
|
-
}),
|
|
669
|
-
compact: Object(external_styled_components_["css"])(["top:6px;left:", ";"], function (_ref8) {
|
|
670
|
-
var $renderSearchIcon = _ref8.$renderSearchIcon;
|
|
671
|
-
return $renderSearchIcon ? '40px' : '14px';
|
|
672
|
-
})
|
|
689
|
+
comfortable: '38px',
|
|
690
|
+
compact: '30px'
|
|
673
691
|
}
|
|
692
|
+
}), function (_ref16) {
|
|
693
|
+
var $position = _ref16.$position;
|
|
694
|
+
return $position === 'start' ? Object(external_styled_components_["css"])(["top:1px;left:1px;"]) : Object(external_styled_components_["css"])(["top:1px;right:1px;"]);
|
|
695
|
+
}, function (_ref17) {
|
|
696
|
+
var disabled = _ref17.disabled;
|
|
697
|
+
return disabled && disabledStyles;
|
|
698
|
+
}, Object(themes_["pick"])({
|
|
699
|
+
enterprise: Object(external_styled_components_["css"])(["margin-left:-1px;margin-right:-1px;"])
|
|
674
700
|
}));
|
|
675
701
|
|
|
676
702
|
// CONCATENATED MODULE: ./src/Text/Text.tsx
|
|
@@ -735,6 +761,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
735
761
|
|
|
736
762
|
|
|
737
763
|
|
|
764
|
+
|
|
738
765
|
/** @public */
|
|
739
766
|
|
|
740
767
|
var propTypes = {
|
|
@@ -753,6 +780,7 @@ var propTypes = {
|
|
|
753
780
|
describedBy: external_prop_types_default.a.string,
|
|
754
781
|
disabled: external_prop_types_default.a.bool,
|
|
755
782
|
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
783
|
+
endAdornment: external_prop_types_default.a.node,
|
|
756
784
|
error: external_prop_types_default.a.bool,
|
|
757
785
|
inline: external_prop_types_default.a.bool,
|
|
758
786
|
|
|
@@ -760,9 +788,6 @@ var propTypes = {
|
|
|
760
788
|
inputClassName: external_prop_types_default.a.string,
|
|
761
789
|
inputId: external_prop_types_default.a.string,
|
|
762
790
|
inputRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
763
|
-
|
|
764
|
-
/** @private */
|
|
765
|
-
inputStyle: external_prop_types_default.a.object,
|
|
766
791
|
labelledBy: external_prop_types_default.a.string,
|
|
767
792
|
maxLength: external_prop_types_default.a.number,
|
|
768
793
|
multiline: external_prop_types_default.a.bool,
|
|
@@ -778,10 +803,11 @@ var propTypes = {
|
|
|
778
803
|
rowsMin: external_prop_types_default.a.number,
|
|
779
804
|
spellCheck: external_prop_types_default.a.bool,
|
|
780
805
|
tabIndex: external_prop_types_default.a.number,
|
|
806
|
+
startAdornment: external_prop_types_default.a.node,
|
|
781
807
|
|
|
782
808
|
/** @private */
|
|
783
809
|
splunkTheme: external_prop_types_default.a.object,
|
|
784
|
-
type: external_prop_types_default.a.
|
|
810
|
+
type: external_prop_types_default.a.string,
|
|
785
811
|
passwordVisibilityToggle: external_prop_types_default.a.bool,
|
|
786
812
|
useSyntheticPlaceholder: external_prop_types_default.a.bool,
|
|
787
813
|
value: external_prop_types_default.a.string
|
|
@@ -794,7 +820,6 @@ var defaultProps = {
|
|
|
794
820
|
disabled: false,
|
|
795
821
|
error: false,
|
|
796
822
|
inline: false,
|
|
797
|
-
inputStyle: {},
|
|
798
823
|
multiline: false,
|
|
799
824
|
placeholder: '',
|
|
800
825
|
prepend: false,
|
|
@@ -836,6 +861,30 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
836
861
|
|
|
837
862
|
_defineProperty(_assertThisInitialized(_this), "shadow", null);
|
|
838
863
|
|
|
864
|
+
_defineProperty(_assertThisInitialized(_this), "startAdornment", null);
|
|
865
|
+
|
|
866
|
+
_defineProperty(_assertThisInitialized(_this), "endAdornment", null);
|
|
867
|
+
|
|
868
|
+
_defineProperty(_assertThisInitialized(_this), "getAdornmentWidth", function () {
|
|
869
|
+
var startIconRect = _this.startAdornment ? _this.startAdornment.getBoundingClientRect() : undefined;
|
|
870
|
+
var startIconWidth = startIconRect && Math.round(startIconRect.width);
|
|
871
|
+
|
|
872
|
+
if (_this.state.startAdornmentWidth !== startIconWidth) {
|
|
873
|
+
_this.setState({
|
|
874
|
+
startAdornmentWidth: startIconWidth
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
var endIconRect = _this.endAdornment ? _this.endAdornment.getBoundingClientRect() : undefined;
|
|
879
|
+
var endIconWidth = endIconRect && Math.round(endIconRect.width);
|
|
880
|
+
|
|
881
|
+
if (_this.state.endAdornmentWidth !== endIconWidth) {
|
|
882
|
+
_this.setState({
|
|
883
|
+
endAdornmentWidth: endIconWidth
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
|
|
839
888
|
_defineProperty(_assertThisInitialized(_this), "handleResize", function () {
|
|
840
889
|
_this.syncHeightWithShadow();
|
|
841
890
|
});
|
|
@@ -878,20 +927,12 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
878
927
|
_defineProperty(_assertThisInitialized(_this), "handleInputFocus", function (e) {
|
|
879
928
|
var _this$props$onFocus, _this$props4;
|
|
880
929
|
|
|
881
|
-
_this.setState({
|
|
882
|
-
hasFocus: true
|
|
883
|
-
});
|
|
884
|
-
|
|
885
930
|
(_this$props$onFocus = (_this$props4 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props4, e);
|
|
886
931
|
});
|
|
887
932
|
|
|
888
933
|
_defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (e) {
|
|
889
934
|
var _this$props$onBlur, _this$props5;
|
|
890
935
|
|
|
891
|
-
_this.setState({
|
|
892
|
-
hasFocus: false
|
|
893
|
-
});
|
|
894
|
-
|
|
895
936
|
(_this$props$onBlur = (_this$props5 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props5, e);
|
|
896
937
|
});
|
|
897
938
|
|
|
@@ -925,10 +966,6 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
925
966
|
});
|
|
926
967
|
});
|
|
927
968
|
|
|
928
|
-
_defineProperty(_assertThisInitialized(_this), "handlePlaceholderMouseDown", function () {
|
|
929
|
-
_this.focus();
|
|
930
|
-
});
|
|
931
|
-
|
|
932
969
|
_defineProperty(_assertThisInitialized(_this), "syncHeightWithShadow", function () {
|
|
933
970
|
var newHeight = syncHeightWithShadow({
|
|
934
971
|
height: _this.state.height,
|
|
@@ -945,9 +982,112 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
945
982
|
}
|
|
946
983
|
});
|
|
947
984
|
|
|
985
|
+
_defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
|
|
986
|
+
var _controlGroupContext$;
|
|
987
|
+
|
|
988
|
+
var _this$props7 = _this.props,
|
|
989
|
+
appearance = _this$props7.appearance,
|
|
990
|
+
endAdornment = _this$props7.endAdornment,
|
|
991
|
+
passwordVisibilityToggle = _this$props7.passwordVisibilityToggle,
|
|
992
|
+
disabled = _this$props7.disabled,
|
|
993
|
+
canClear = _this$props7.canClear,
|
|
994
|
+
splunkTheme = _this$props7.splunkTheme;
|
|
995
|
+
var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
|
|
996
|
+
var adornmentProps = {
|
|
997
|
+
ref: function ref(el) {
|
|
998
|
+
_this.endAdornment = el;
|
|
999
|
+
},
|
|
1000
|
+
disabled: disabled,
|
|
1001
|
+
$position: 'end'
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
if (endAdornment) {
|
|
1005
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, endAdornment);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
if (passwordVisibilityToggle && !disabled) {
|
|
1009
|
+
var eyeIcon = _this.state.hideVisibility ? /*#__PURE__*/external_react_default.a.createElement(Text_IconOutlinedView, null) : /*#__PURE__*/external_react_default.a.createElement(Text_IconOutlinedHide, null);
|
|
1010
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledVisibilityToggle, {
|
|
1011
|
+
appearance: isPrisma ? 'secondary' : 'pill',
|
|
1012
|
+
"data-test": "password-toggle",
|
|
1013
|
+
inline: false,
|
|
1014
|
+
onClick: _this.handleVisibilityToggle,
|
|
1015
|
+
type: "button",
|
|
1016
|
+
icon: eyeIcon
|
|
1017
|
+
}));
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
var controlGroupContext = _this.context;
|
|
1021
|
+
var controlGroupLabel = (_controlGroupContext$ = controlGroupContext.labelAttrs) === null || _controlGroupContext$ === void 0 ? void 0 : _controlGroupContext$.text;
|
|
1022
|
+
var clearButtonText = controlGroupLabel ? Object(i18n_["_"])("Clear ".concat(controlGroupLabel, " text field")) : Object(i18n_["_"])('Clear text field');
|
|
1023
|
+
|
|
1024
|
+
if (!isPrisma && appearance === 'search') {
|
|
1025
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
|
|
1026
|
+
appearance: isPrisma ? 'secondary' : 'pill',
|
|
1027
|
+
"data-test": "clear",
|
|
1028
|
+
inline: false,
|
|
1029
|
+
icon: /*#__PURE__*/external_react_default.a.createElement(CrossMark["a" /* default */], {
|
|
1030
|
+
enterpriseSize: 1,
|
|
1031
|
+
screenReaderText: clearButtonText
|
|
1032
|
+
}),
|
|
1033
|
+
onClick: _this.handleClear
|
|
1034
|
+
}), /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
|
|
1035
|
+
$disabled: disabled
|
|
1036
|
+
}, /*#__PURE__*/external_react_default.a.createElement(Search, {
|
|
1037
|
+
enterpriseSize: "16px",
|
|
1038
|
+
inline: false
|
|
1039
|
+
})));
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
if (isPrisma && appearance === 'search' || canClear) {
|
|
1043
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
|
|
1044
|
+
"data-test": "clear",
|
|
1045
|
+
appearance: isPrisma ? 'secondary' : 'pill',
|
|
1046
|
+
onClick: _this.handleClear,
|
|
1047
|
+
icon: /*#__PURE__*/external_react_default.a.createElement(CrossMark["a" /* default */], {
|
|
1048
|
+
inline: false,
|
|
1049
|
+
enterpriseSize: 1,
|
|
1050
|
+
screenReaderText: clearButtonText
|
|
1051
|
+
})
|
|
1052
|
+
}));
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
return undefined;
|
|
1056
|
+
});
|
|
1057
|
+
|
|
1058
|
+
_defineProperty(_assertThisInitialized(_this), "renderStartAdornment", function () {
|
|
1059
|
+
var _this$props8 = _this.props,
|
|
1060
|
+
appearance = _this$props8.appearance,
|
|
1061
|
+
startAdornment = _this$props8.startAdornment,
|
|
1062
|
+
splunkTheme = _this$props8.splunkTheme,
|
|
1063
|
+
disabled = _this$props8.disabled;
|
|
1064
|
+
var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
|
|
1065
|
+
var adornmentProps = {
|
|
1066
|
+
ref: function ref(el) {
|
|
1067
|
+
_this.startAdornment = el;
|
|
1068
|
+
},
|
|
1069
|
+
disabled: disabled,
|
|
1070
|
+
$position: 'start'
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
if (startAdornment) {
|
|
1074
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, startAdornment);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
if (isPrisma && appearance === 'search') {
|
|
1078
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
|
|
1079
|
+
$disabled: disabled
|
|
1080
|
+
}, /*#__PURE__*/external_react_default.a.createElement(Search, {
|
|
1081
|
+
enterpriseSize: "16px",
|
|
1082
|
+
inline: false
|
|
1083
|
+
})));
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
return undefined;
|
|
1087
|
+
});
|
|
1088
|
+
|
|
948
1089
|
_this.controlledExternally = Object(external_lodash_["has"])(props, 'value');
|
|
949
1090
|
_this.state = {
|
|
950
|
-
hasFocus: false,
|
|
951
1091
|
value: props.defaultValue || '',
|
|
952
1092
|
hideVisibility: true
|
|
953
1093
|
};
|
|
@@ -965,6 +1105,8 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
965
1105
|
key: "componentDidMount",
|
|
966
1106
|
value: function componentDidMount() {
|
|
967
1107
|
Object(external_lodash_["defer"])(this.syncHeightWithShadow); // wait for styles to load
|
|
1108
|
+
|
|
1109
|
+
this.getAdornmentWidth();
|
|
968
1110
|
}
|
|
969
1111
|
}, {
|
|
970
1112
|
key: "componentDidUpdate",
|
|
@@ -978,6 +1120,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
978
1120
|
if (false) {}
|
|
979
1121
|
|
|
980
1122
|
Text.validateRows(this.props);
|
|
1123
|
+
this.getAdornmentWidth();
|
|
981
1124
|
}
|
|
982
1125
|
}, {
|
|
983
1126
|
key: "isControlled",
|
|
@@ -1014,43 +1157,36 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1014
1157
|
value: function render() {
|
|
1015
1158
|
var _this2 = this;
|
|
1016
1159
|
|
|
1017
|
-
var _this$
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
type = _this$props7.type,
|
|
1048
|
-
useSyntheticPlaceholder = _this$props7.useSyntheticPlaceholder,
|
|
1049
|
-
value = _this$props7.value,
|
|
1050
|
-
otherProps = _objectWithoutProperties(_this$props7, ["appearance", "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "canClear", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "inputStyle", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "spellCheck", "splunkTheme", "tabIndex", "title", "type", "useSyntheticPlaceholder", "value"]);
|
|
1051
|
-
|
|
1052
|
-
var family = splunkTheme.family;
|
|
1053
|
-
var isPrisma = family === 'prisma';
|
|
1160
|
+
var _this$props9 = this.props,
|
|
1161
|
+
append = _this$props9.append,
|
|
1162
|
+
autoCapitalize = _this$props9.autoCapitalize,
|
|
1163
|
+
autoComplete = _this$props9.autoComplete,
|
|
1164
|
+
autoCorrect = _this$props9.autoCorrect,
|
|
1165
|
+
autoFocus = _this$props9.autoFocus,
|
|
1166
|
+
children = _this$props9.children,
|
|
1167
|
+
className = _this$props9.className,
|
|
1168
|
+
classNamePrivate = _this$props9.classNamePrivate,
|
|
1169
|
+
disabled = _this$props9.disabled,
|
|
1170
|
+
describedBy = _this$props9.describedBy,
|
|
1171
|
+
elementRef = _this$props9.elementRef,
|
|
1172
|
+
error = _this$props9.error,
|
|
1173
|
+
inline = _this$props9.inline,
|
|
1174
|
+
inputClassName = _this$props9.inputClassName,
|
|
1175
|
+
inputId = _this$props9.inputId,
|
|
1176
|
+
labelledBy = _this$props9.labelledBy,
|
|
1177
|
+
multiline = _this$props9.multiline,
|
|
1178
|
+
maxLength = _this$props9.maxLength,
|
|
1179
|
+
name = _this$props9.name,
|
|
1180
|
+
passwordVisibilityToggle = _this$props9.passwordVisibilityToggle,
|
|
1181
|
+
placeholder = _this$props9.placeholder,
|
|
1182
|
+
prepend = _this$props9.prepend,
|
|
1183
|
+
spellCheck = _this$props9.spellCheck,
|
|
1184
|
+
tabIndex = _this$props9.tabIndex,
|
|
1185
|
+
title = _this$props9.title,
|
|
1186
|
+
type = _this$props9.type,
|
|
1187
|
+
useSyntheticPlaceholder = _this$props9.useSyntheticPlaceholder,
|
|
1188
|
+
value = _this$props9.value,
|
|
1189
|
+
otherProps = _objectWithoutProperties(_this$props9, ["append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "spellCheck", "tabIndex", "title", "type", "useSyntheticPlaceholder", "value"]);
|
|
1054
1190
|
|
|
1055
1191
|
var ariaProps = _objectSpread(_objectSpread({}, Object(external_lodash_["pickBy"])(otherProps, function (val, key) {
|
|
1056
1192
|
return key === 'role' || key.indexOf('aria-') === 0;
|
|
@@ -1063,22 +1199,17 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1063
1199
|
|
|
1064
1200
|
var boxProps = Object(external_lodash_["omit"])(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(Object(external_lodash_["keys"])(ariaProps))));
|
|
1065
1201
|
var displayValue = this.isControlled() ? value : this.state.value;
|
|
1066
|
-
var clearIconPadding = !disabled && (canClear || appearance === 'search');
|
|
1067
|
-
var reserveIconSpace = displayValue && clearIconPadding || passwordVisibilityToggle || undefined; // These props are used by both the input and its shadow.
|
|
1068
|
-
|
|
1069
1202
|
var displayProps = {
|
|
1070
1203
|
className: Object(style_["toClassName"])(className, inputClassName),
|
|
1071
1204
|
$append: append || undefined,
|
|
1072
1205
|
$error: error,
|
|
1073
|
-
$prepend: prepend || undefined
|
|
1074
|
-
value: displayValue
|
|
1206
|
+
$prepend: prepend || undefined
|
|
1075
1207
|
};
|
|
1076
1208
|
var passwordVisibility = this.state.hideVisibility ? 'password' : 'text';
|
|
1077
1209
|
var computedType = passwordVisibilityToggle ? passwordVisibility : type;
|
|
1078
1210
|
|
|
1079
|
-
var inputProps = _objectSpread(_objectSpread(
|
|
1211
|
+
var inputProps = _objectSpread(_objectSpread({}, ariaProps), {}, {
|
|
1080
1212
|
'data-test': 'textbox',
|
|
1081
|
-
$customStyle: inputStyle,
|
|
1082
1213
|
autoCapitalize: autoCapitalize,
|
|
1083
1214
|
autoComplete: autoComplete,
|
|
1084
1215
|
autoCorrect: autoCorrect,
|
|
@@ -1095,30 +1226,40 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1095
1226
|
ref: this.handleInputMount,
|
|
1096
1227
|
role: 'textbox',
|
|
1097
1228
|
spellCheck: spellCheck,
|
|
1098
|
-
style:
|
|
1229
|
+
style: {
|
|
1099
1230
|
height: this.state.height
|
|
1100
|
-
},
|
|
1231
|
+
},
|
|
1101
1232
|
title: title,
|
|
1102
1233
|
tabIndex: tabIndex,
|
|
1103
|
-
type: multiline ? null : computedType
|
|
1234
|
+
type: multiline ? null : computedType,
|
|
1235
|
+
value: displayValue,
|
|
1236
|
+
$error: error
|
|
1104
1237
|
});
|
|
1105
1238
|
|
|
1106
|
-
var haveSyntheticPlaceholder = useSyntheticPlaceholder && placeholder && !displayValue;
|
|
1107
|
-
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1110
|
-
var
|
|
1239
|
+
var haveSyntheticPlaceholder = useSyntheticPlaceholder && placeholder && !displayValue; // Do not render value in DOM when type is password, or passwordVisibiltyToggle is enabled
|
|
1240
|
+
|
|
1241
|
+
var dataTestValue = type === 'password' || passwordVisibilityToggle ? undefined : displayValue; // Firefox hack (SUI-2716). Remove when fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1427173
|
|
1242
|
+
|
|
1243
|
+
var isTimeInput = type === 'time';
|
|
1244
|
+
var hasEndAdornment = !!this.renderEndAdornment();
|
|
1245
|
+
var hasStartAdornment = !!this.renderStartAdornment();
|
|
1111
1246
|
return /*#__PURE__*/external_react_default.a.createElement(StyledBox, Text_extends({
|
|
1247
|
+
$isTimeInput: isTimeInput,
|
|
1112
1248
|
className: Object(style_["toClassName"])(className, classNamePrivate),
|
|
1113
1249
|
"data-test": "text",
|
|
1114
|
-
"data-test-value":
|
|
1250
|
+
"data-test-value": dataTestValue,
|
|
1115
1251
|
elementRef: elementRef,
|
|
1252
|
+
flex: true,
|
|
1116
1253
|
inline: inline
|
|
1117
|
-
}, boxProps),
|
|
1118
|
-
$
|
|
1119
|
-
$
|
|
1120
|
-
|
|
1121
|
-
|
|
1254
|
+
}, boxProps), this.renderStartAdornment(), /*#__PURE__*/external_react_default.a.createElement(StyledInputWrapper, Text_extends({
|
|
1255
|
+
$hasEndAdornment: hasEndAdornment,
|
|
1256
|
+
$hasStartAdornment: hasStartAdornment,
|
|
1257
|
+
$multiline: multiline,
|
|
1258
|
+
disabled: disabled
|
|
1259
|
+
}, displayProps), hasStartAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledStartAdornmentHolder, {
|
|
1260
|
+
$width: this.state.startAdornmentWidth
|
|
1261
|
+
}), !disabled && multiline && /*#__PURE__*/external_react_default.a.createElement(StyledInput, {
|
|
1262
|
+
as: "textarea",
|
|
1122
1263
|
"aria-hidden": "true",
|
|
1123
1264
|
onChange: external_lodash_["noop"],
|
|
1124
1265
|
style: {
|
|
@@ -1131,11 +1272,9 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1131
1272
|
tabIndex: -1,
|
|
1132
1273
|
ref: function ref(el) {
|
|
1133
1274
|
_this2.shadow = el;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
$rightIconPadding: reserveIconSpace,
|
|
1138
|
-
$search: appearance === 'search',
|
|
1275
|
+
},
|
|
1276
|
+
value: displayValue
|
|
1277
|
+
}), disabled ? /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
|
|
1139
1278
|
as: multiline ? 'textarea' : undefined,
|
|
1140
1279
|
className: Object(style_["toClassName"])(className, classNamePrivate),
|
|
1141
1280
|
"data-multiline": multiline || null,
|
|
@@ -1153,38 +1292,22 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1153
1292
|
_this2.shadow = el;
|
|
1154
1293
|
} : undefined
|
|
1155
1294
|
}, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
|
|
1156
|
-
$rightIconPadding: reserveIconSpace,
|
|
1157
|
-
$search: appearance === 'search',
|
|
1158
1295
|
as: multiline ? 'textarea' : undefined
|
|
1159
1296
|
}, inputProps)), !disabled && multiline && /*#__PURE__*/external_react_default.a.createElement(external_react_event_listener_default.a, {
|
|
1160
1297
|
target: "window",
|
|
1161
1298
|
onResize: this.handleResize
|
|
1162
1299
|
}), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, placeholder), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(StyledPlaceholder, {
|
|
1163
|
-
$
|
|
1164
|
-
$
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
"
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
$
|
|
1173
|
-
},
|
|
1174
|
-
inline: false,
|
|
1175
|
-
enterpriseSize: 1,
|
|
1176
|
-
screenReaderText: Object(i18n_["_"])('Clear')
|
|
1177
|
-
})), passwordVisibilityToggle && !disabled && /*#__PURE__*/external_react_default.a.createElement(StyledVisibilityToggle, {
|
|
1178
|
-
"data-test": "password-toggle",
|
|
1179
|
-
type: "button",
|
|
1180
|
-
onClick: this.handleVisibilityToggle
|
|
1181
|
-
}, eyeIcon), appearance === 'search' && placeholderPadding && /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
|
|
1182
|
-
$customStyle: inputStyle,
|
|
1183
|
-
$disabled: disabled
|
|
1184
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Search, {
|
|
1185
|
-
enterpriseSize: "16px",
|
|
1186
|
-
inline: false
|
|
1187
|
-
})), children);
|
|
1300
|
+
$endAdornmentWidth: this.state.endAdornmentWidth,
|
|
1301
|
+
$hasBothAdornment: hasStartAdornment && hasEndAdornment // used to calculate the max-width
|
|
1302
|
+
,
|
|
1303
|
+
$hasEndAdornment: hasEndAdornment,
|
|
1304
|
+
$hasStartAdornment: hasStartAdornment,
|
|
1305
|
+
$startAdornmentWidth: this.state.startAdornmentWidth,
|
|
1306
|
+
"aria-hidden": true,
|
|
1307
|
+
"data-role": "placeholder"
|
|
1308
|
+
}, placeholder), children, hasEndAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledEndAdornmentHolder, {
|
|
1309
|
+
$width: this.state.endAdornmentWidth
|
|
1310
|
+
})), this.renderEndAdornment());
|
|
1188
1311
|
}
|
|
1189
1312
|
}]);
|
|
1190
1313
|
|
|
@@ -1197,6 +1320,8 @@ _defineProperty(Text_Text, "defaultProps", defaultProps);
|
|
|
1197
1320
|
|
|
1198
1321
|
_defineProperty(Text_Text, "componentType", 'Text');
|
|
1199
1322
|
|
|
1323
|
+
_defineProperty(Text_Text, "contextType", ControlGroup_["ControlGroupContext"]);
|
|
1324
|
+
|
|
1200
1325
|
var TextWithThemeBase = Object(themes_["withSplunkTheme"])(Text_Text);
|
|
1201
1326
|
var TextWithTheme = TextWithThemeBase;
|
|
1202
1327
|
TextWithTheme.propTypes = Text_Text.propTypes;
|
|
@@ -1249,6 +1374,13 @@ module.exports = require("react-event-listener");
|
|
|
1249
1374
|
|
|
1250
1375
|
/***/ }),
|
|
1251
1376
|
|
|
1377
|
+
/***/ 16:
|
|
1378
|
+
/***/ (function(module, exports) {
|
|
1379
|
+
|
|
1380
|
+
module.exports = require("@splunk/react-ui/Button");
|
|
1381
|
+
|
|
1382
|
+
/***/ }),
|
|
1383
|
+
|
|
1252
1384
|
/***/ 2:
|
|
1253
1385
|
/***/ (function(module, exports) {
|
|
1254
1386
|
|
|
@@ -1256,14 +1388,14 @@ module.exports = require("react");
|
|
|
1256
1388
|
|
|
1257
1389
|
/***/ }),
|
|
1258
1390
|
|
|
1259
|
-
/***/
|
|
1391
|
+
/***/ 21:
|
|
1260
1392
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1261
1393
|
|
|
1262
1394
|
"use strict";
|
|
1263
1395
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CrossMark; });
|
|
1264
1396
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
1265
1397
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1266
|
-
/* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1398
|
+
/* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
|
|
1267
1399
|
/* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__);
|
|
1268
1400
|
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
1269
1401
|
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
@@ -1306,14 +1438,14 @@ function CrossMark(props) {
|
|
|
1306
1438
|
|
|
1307
1439
|
/***/ }),
|
|
1308
1440
|
|
|
1309
|
-
/***/
|
|
1441
|
+
/***/ 22:
|
|
1310
1442
|
/***/ (function(module, exports) {
|
|
1311
1443
|
|
|
1312
1444
|
module.exports = require("@splunk/react-icons/SVG");
|
|
1313
1445
|
|
|
1314
1446
|
/***/ }),
|
|
1315
1447
|
|
|
1316
|
-
/***/
|
|
1448
|
+
/***/ 25:
|
|
1317
1449
|
/***/ (function(module, exports) {
|
|
1318
1450
|
|
|
1319
1451
|
module.exports = require("@splunk/react-icons/Close");
|
|
@@ -1327,17 +1459,17 @@ module.exports = require("styled-components");
|
|
|
1327
1459
|
|
|
1328
1460
|
/***/ }),
|
|
1329
1461
|
|
|
1330
|
-
/***/
|
|
1462
|
+
/***/ 4:
|
|
1331
1463
|
/***/ (function(module, exports) {
|
|
1332
1464
|
|
|
1333
|
-
module.exports = require("
|
|
1465
|
+
module.exports = require("lodash");
|
|
1334
1466
|
|
|
1335
1467
|
/***/ }),
|
|
1336
1468
|
|
|
1337
|
-
/***/
|
|
1469
|
+
/***/ 40:
|
|
1338
1470
|
/***/ (function(module, exports) {
|
|
1339
1471
|
|
|
1340
|
-
module.exports = require("
|
|
1472
|
+
module.exports = require("@splunk/ui-utils/style");
|
|
1341
1473
|
|
|
1342
1474
|
/***/ }),
|
|
1343
1475
|
|
|
@@ -1496,20 +1628,6 @@ Icon.defaultProps = defaultProps;
|
|
|
1496
1628
|
|
|
1497
1629
|
module.exports = require("@splunk/react-ui/Box");
|
|
1498
1630
|
|
|
1499
|
-
/***/ }),
|
|
1500
|
-
|
|
1501
|
-
/***/ 98:
|
|
1502
|
-
/***/ (function(module, exports) {
|
|
1503
|
-
|
|
1504
|
-
module.exports = require("@splunk/react-icons/Search");
|
|
1505
|
-
|
|
1506
|
-
/***/ }),
|
|
1507
|
-
|
|
1508
|
-
/***/ 99:
|
|
1509
|
-
/***/ (function(module, exports) {
|
|
1510
|
-
|
|
1511
|
-
module.exports = require("lodash/startCase");
|
|
1512
|
-
|
|
1513
1631
|
/***/ })
|
|
1514
1632
|
|
|
1515
1633
|
/******/ });
|