@splunk/react-ui 4.16.3 → 4.17.0
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 +13 -13
- package/Anchor.js +2 -2
- package/Animation.js +4 -4
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +98 -244
- package/ButtonGroup.js +4 -4
- package/ButtonSimple.js +6 -6
- package/CHANGELOG.md +43 -2
- package/Calendar.js +73 -274
- package/Card.js +75 -227
- package/CardLayout.js +2 -2
- package/Chip.js +40 -211
- package/Clickable.js +10 -10
- package/CloseButton.js +34 -202
- package/Code.js +27 -20
- package/CollapsiblePanel.js +74 -228
- package/Color.js +62 -319
- package/ColumnLayout.js +6 -6
- package/ComboBox.js +32 -32
- package/Concertina.js +38 -38
- package/ControlGroup.js +20 -20
- package/Date.js +22 -22
- package/DefinitionList.js +2 -2
- package/Divider.js +2 -2
- package/Dropdown.js +29 -29
- package/DualListbox.d.ts +2 -0
- package/DualListbox.js +1780 -0
- package/EventListener.js +4 -4
- package/File.js +85 -250
- package/FormRows.js +60 -215
- package/Heading.js +39 -27
- package/Image.js +73 -227
- package/JSONTree.js +18 -18
- package/Layer.js +30 -30
- package/Link.js +60 -28
- package/List.js +9 -9
- package/MIGRATION.md +28 -0
- package/Markdown.js +21 -21
- package/Menu.js +180 -371
- package/Message.js +137 -407
- package/MessageBar.js +168 -398
- package/Modal.js +31 -31
- package/ModalLayer.js +6 -6
- package/Monogram.js +4 -4
- package/Multiselect.js +2297 -2525
- package/Number.js +32 -32
- package/Paginator.js +92 -321
- package/Paragraph.js +2 -2
- package/Popover.js +123 -123
- package/Progress.js +15 -15
- package/RadioBar.js +23 -19
- package/RadioList.js +13 -12
- package/Resize.js +18 -18
- package/ResultsMenu.js +21 -21
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +33 -33
- package/ScrollContainerContext.js +13 -13
- package/Search.js +34 -32
- package/Select.js +220 -367
- package/SidePanel.js +12 -12
- package/Slider.js +28 -28
- package/SlidingPanels.js +29 -29
- package/SplitButton.js +59 -62
- package/StaticContent.js +4 -4
- package/StepBar.js +35 -238
- package/Switch.js +23 -23
- package/TabBar.js +30 -44
- package/TabLayout.js +30 -28
- package/Table.js +292 -586
- package/Text.js +109 -322
- package/TextArea.js +160 -366
- package/Tooltip.js +23 -23
- package/TransitionOpen.js +21 -21
- package/Typography.js +32 -28
- package/WaitSpinner.js +2 -2
- package/docker-compose.yml +19 -7
- package/package.json +10 -11
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Button/icons/CaretSmallDown.d.ts +2 -0
- package/types/src/Button/icons/External.d.ts +2 -0
- package/types/src/Code/Code.d.ts +6 -1
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +0 -1
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +11 -0
- package/types/src/Date/Icon.d.ts +1 -1
- package/types/src/Dropdown/docs/examples/Submenu.d.ts +2 -0
- package/types/src/DualListbox/DualListbox.d.ts +87 -0
- package/types/src/DualListbox/DualListboxContext.d.ts +27 -0
- package/types/src/DualListbox/Label.d.ts +37 -0
- package/types/src/DualListbox/Listbox.d.ts +54 -0
- package/types/src/DualListbox/ListboxContext.d.ts +32 -0
- package/types/src/DualListbox/Option.d.ts +35 -0
- package/types/src/DualListbox/ScreenReaderWrapper.d.ts +4 -0
- package/types/src/DualListbox/ToolbarButton.d.ts +38 -0
- package/types/src/DualListbox/ToolbarContext.d.ts +21 -0
- package/types/src/DualListbox/docs/examples/Basic.d.ts +2 -0
- package/types/src/DualListbox/docs/examples/Controlled.d.ts +2 -0
- package/types/src/DualListbox/docs/examples/Fill.d.ts +2 -0
- package/types/src/DualListbox/index.d.ts +2 -0
- package/types/src/DualListbox/listboxUtils.d.ts +4 -0
- package/types/src/File/Icon.d.ts +1 -1
- package/types/src/File/IconCloud.d.ts +1 -1
- package/types/src/File/PaperClip.d.ts +1 -1
- package/types/src/File/Retry.d.ts +1 -1
- package/types/src/File/Trash.d.ts +1 -1
- package/types/src/File/docs/examples/Progress.d.ts +1 -15
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +2 -0
- package/types/src/Heading/Heading.d.ts +12 -4
- package/types/src/Heading/docs/examples/Variant.d.ts +2 -0
- package/types/src/Image/Image.d.ts +1 -1
- package/types/src/Image/icons/Cross.d.ts +2 -0
- package/types/src/Link/icons/External.d.ts +2 -0
- package/types/src/Menu/Divider.d.ts +1 -0
- package/types/src/Menu/Heading.d.ts +1 -0
- package/types/src/Menu/Item.d.ts +5 -2
- package/types/src/Menu/Menu.d.ts +3 -1
- package/types/src/Menu/icons/External.d.ts +2 -0
- package/types/src/Number/IncrementIcon.d.ts +1 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/Search/Option.d.ts +9 -0
- package/types/src/Select/OptionBase.d.ts +9 -0
- package/types/src/Select/icons/CaretSmallDown.d.ts +2 -0
- package/types/src/Select/icons/Search.d.ts +2 -0
- package/types/src/SplitButton/SplitButton.d.ts +8 -3
- package/types/src/SplitButton/docs/examples/Block.d.ts +1 -0
- package/types/src/TabLayout/TabLayout.d.ts +0 -1
- package/types/src/Table/HeadInner.d.ts +2 -2
- package/types/src/Table/icons/ExpansionRow.d.ts +6 -0
- package/types/src/Table/icons/HeadExpandRows.d.ts +1 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -1
- package/types/src/Text/IconOutlinedView.d.ts +1 -1
- package/types/src/Tooltip/InfoIcon.d.ts +1 -1
- package/types/src/Typography/Typography.d.ts +4 -7
- package/types/src/useRovingFocus/index.d.ts +2 -0
- package/types/src/useRovingFocus/useRovingFocus.d.ts +27 -0
- package/useForceUpdate.js +2 -2
- package/useKeyPress.js +2 -2
- package/usePrevious.js +2 -2
- package/useRovingFocus.d.ts +2 -0
- package/useRovingFocus.js +237 -0
- package/Dockerfile.enterprise.storybook +0 -7
- package/Dockerfile.prisma.storybook +0 -7
- package/Dockerfile.visual +0 -10
- package/types/src/File/docs/examples/CustomChildren.d.ts +0 -12
- package/types/src/File/docs/examples/prisma/Progress.d.ts +0 -1
- package/types/src/Select/matchUtils.d.ts +0 -12
- package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +0 -1
- package/types/src/Table/HeadExpandRowsIcon.d.ts +0 -1
- package/types/src/icons/Alert.d.ts +0 -2
- package/types/src/icons/AlertFilled.d.ts +0 -2
- package/types/src/icons/CaretDown.d.ts +0 -2
- package/types/src/icons/CaretRight.d.ts +0 -2
- package/types/src/icons/Check.d.ts +0 -2
- package/types/src/icons/ChevronDown.d.ts +0 -2
- package/types/src/icons/ChevronLeft.d.ts +0 -2
- package/types/src/icons/ChevronRight.d.ts +0 -2
- package/types/src/icons/CrossMark.d.ts +0 -2
- package/types/src/icons/External.d.ts +0 -2
- package/types/src/icons/InfoFilled.d.ts +0 -2
- package/types/src/icons/More.d.ts +0 -2
- package/types/src/icons/MoreVertical.d.ts +0 -2
- package/types/src/icons/Plus.d.ts +0 -2
- package/types/src/icons/SVG.d.ts +0 -4
- package/types/src/icons/Search.d.ts +0 -2
- package/types/src/icons/Sort.d.ts +0 -2
- package/types/src/icons/SortedDown.d.ts +0 -2
- package/types/src/icons/SortedUp.d.ts +0 -2
- package/types/src/icons/Success.d.ts +0 -2
- package/types/src/icons/SuccessFilled.d.ts +0 -2
- package/types/src/icons/ThemedIcon.d.ts +0 -29
- package/types/src/icons/WarningFilled.d.ts +0 -2
- package/types/src/icons/types.d.ts +0 -11
package/FormRows.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 = 179);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,28 +101,42 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 106:
|
|
105
105
|
/***/ (function(module, exports) {
|
|
106
106
|
|
|
107
107
|
module.exports = require("react-sortable-hoc");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
111
|
-
/***/
|
|
111
|
+
/***/ 132:
|
|
112
112
|
/***/ (function(module, exports) {
|
|
113
113
|
|
|
114
114
|
module.exports = require("@splunk/react-icons/Plus");
|
|
115
115
|
|
|
116
116
|
/***/ }),
|
|
117
117
|
|
|
118
|
-
/***/
|
|
118
|
+
/***/ 133:
|
|
119
|
+
/***/ (function(module, exports) {
|
|
120
|
+
|
|
121
|
+
module.exports = require("@splunk/react-icons/enterprise/Plus");
|
|
122
|
+
|
|
123
|
+
/***/ }),
|
|
124
|
+
|
|
125
|
+
/***/ 14:
|
|
119
126
|
/***/ (function(module, exports) {
|
|
120
127
|
|
|
121
128
|
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
122
129
|
|
|
123
130
|
/***/ }),
|
|
124
131
|
|
|
125
|
-
/***/
|
|
132
|
+
/***/ 17:
|
|
133
|
+
/***/ (function(module, exports) {
|
|
134
|
+
|
|
135
|
+
module.exports = require("@splunk/react-ui/Button");
|
|
136
|
+
|
|
137
|
+
/***/ }),
|
|
138
|
+
|
|
139
|
+
/***/ 179:
|
|
126
140
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
127
141
|
|
|
128
142
|
"use strict";
|
|
@@ -145,68 +159,62 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
145
159
|
var i18n_ = __webpack_require__(4);
|
|
146
160
|
|
|
147
161
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
148
|
-
var keyboard_ = __webpack_require__(
|
|
149
|
-
|
|
150
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/Plus"
|
|
151
|
-
var Plus_ = __webpack_require__(130);
|
|
152
|
-
var Plus_default = /*#__PURE__*/__webpack_require__.n(Plus_);
|
|
162
|
+
var keyboard_ = __webpack_require__(7);
|
|
153
163
|
|
|
154
|
-
//
|
|
155
|
-
var ThemedIcon = __webpack_require__(7);
|
|
164
|
+
// CONCATENATED MODULE: ./src/FormRows/FormRowsContext.tsx
|
|
156
165
|
|
|
157
|
-
|
|
158
|
-
|
|
166
|
+
var FormRowsContext = /*#__PURE__*/Object(external_react_["createContext"])({
|
|
167
|
+
disabledDeleteButton: false,
|
|
168
|
+
sortable: true
|
|
169
|
+
});
|
|
170
|
+
FormRowsContext.displayName = 'FormRows';
|
|
171
|
+
/* harmony default export */ var FormRows_FormRowsContext = (FormRowsContext);
|
|
172
|
+
// EXTERNAL MODULE: external "@splunk/themes"
|
|
173
|
+
var themes_ = __webpack_require__(0);
|
|
159
174
|
|
|
160
|
-
//
|
|
161
|
-
|
|
175
|
+
// EXTERNAL MODULE: external "@splunk/react-icons/Plus"
|
|
176
|
+
var Plus_ = __webpack_require__(132);
|
|
177
|
+
var Plus_default = /*#__PURE__*/__webpack_require__.n(Plus_);
|
|
162
178
|
|
|
179
|
+
// EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Plus"
|
|
180
|
+
var enterprise_Plus_ = __webpack_require__(133);
|
|
181
|
+
var enterprise_Plus_default = /*#__PURE__*/__webpack_require__.n(enterprise_Plus_);
|
|
163
182
|
|
|
183
|
+
// CONCATENATED MODULE: ./src/FormRows/icons/FormRowsPlusIcon.tsx
|
|
164
184
|
|
|
165
185
|
|
|
166
186
|
|
|
167
187
|
|
|
168
|
-
function Prisma24(_ref) {
|
|
169
|
-
var otherProps = _extends({}, _ref);
|
|
170
188
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
fill: "currentColor"
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
189
|
+
var FormRowsPlusIcon_FormRowsPlusIcon = function FormRowsPlusIcon() {
|
|
190
|
+
var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
|
|
191
|
+
isEnterprise = _useSplunkTheme.isEnterprise,
|
|
192
|
+
isCompact = _useSplunkTheme.isCompact;
|
|
178
193
|
|
|
179
|
-
|
|
180
|
-
|
|
194
|
+
var prismaSize = isCompact ? '20px' : '24px';
|
|
195
|
+
return isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(enterprise_Plus_default.a, {
|
|
196
|
+
screenReaderText: null,
|
|
197
|
+
hideDefaultTooltip: true
|
|
198
|
+
}) : /*#__PURE__*/external_react_default.a.createElement(Plus_default.a, {
|
|
199
|
+
width: prismaSize,
|
|
200
|
+
height: prismaSize
|
|
201
|
+
});
|
|
202
|
+
};
|
|
181
203
|
|
|
182
|
-
|
|
183
|
-
viewBox: "0 0 16 16"
|
|
184
|
-
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
185
|
-
d: "M7 9V14H9V9H14V7H9V2H7V7H2V9H7Z",
|
|
186
|
-
fill: "currentColor"
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function Plus(props) {
|
|
191
|
-
return /*#__PURE__*/external_react_default.a.createElement(ThemedIcon["a" /* default */], _extends({
|
|
192
|
-
Enterprise: Plus_default.a,
|
|
193
|
-
Prisma16: Prisma16,
|
|
194
|
-
Prisma24: Prisma24
|
|
195
|
-
}, props));
|
|
196
|
-
}
|
|
204
|
+
/* harmony default export */ var icons_FormRowsPlusIcon = (FormRowsPlusIcon_FormRowsPlusIcon);
|
|
197
205
|
// EXTERNAL MODULE: external "react-sortable-hoc"
|
|
198
|
-
var external_react_sortable_hoc_ = __webpack_require__(
|
|
206
|
+
var external_react_sortable_hoc_ = __webpack_require__(106);
|
|
199
207
|
|
|
200
208
|
// EXTERNAL MODULE: external "lodash/omit"
|
|
201
209
|
var omit_ = __webpack_require__(5);
|
|
202
210
|
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
203
211
|
|
|
204
212
|
// EXTERNAL MODULE: external "@splunk/react-ui/CloseButton"
|
|
205
|
-
var CloseButton_ = __webpack_require__(
|
|
213
|
+
var CloseButton_ = __webpack_require__(90);
|
|
206
214
|
var CloseButton_default = /*#__PURE__*/__webpack_require__.n(CloseButton_);
|
|
207
215
|
|
|
208
216
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
209
|
-
var ScreenReaderContent_ = __webpack_require__(
|
|
217
|
+
var ScreenReaderContent_ = __webpack_require__(14);
|
|
210
218
|
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
211
219
|
|
|
212
220
|
// EXTERNAL MODULE: external "styled-components"
|
|
@@ -214,16 +222,13 @@ var external_styled_components_ = __webpack_require__(3);
|
|
|
214
222
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
215
223
|
|
|
216
224
|
// EXTERNAL MODULE: external "@splunk/react-ui/Box"
|
|
217
|
-
var Box_ = __webpack_require__(
|
|
225
|
+
var Box_ = __webpack_require__(6);
|
|
218
226
|
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
219
227
|
|
|
220
228
|
// EXTERNAL MODULE: external "@splunk/react-ui/Button"
|
|
221
|
-
var Button_ = __webpack_require__(
|
|
229
|
+
var Button_ = __webpack_require__(17);
|
|
222
230
|
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
|
|
223
231
|
|
|
224
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
225
|
-
var themes_ = __webpack_require__(0);
|
|
226
|
-
|
|
227
232
|
// CONCATENATED MODULE: ./src/FormRows/FormRowsStyles.ts
|
|
228
233
|
|
|
229
234
|
|
|
@@ -306,18 +311,10 @@ var StyledDrag = external_styled_components_default.a.div.withConfig({
|
|
|
306
311
|
prisma: Object(external_styled_components_["css"])(["height:20px;"])
|
|
307
312
|
}));
|
|
308
313
|
|
|
309
|
-
// CONCATENATED MODULE: ./src/FormRows/FormRowsContext.tsx
|
|
310
|
-
|
|
311
|
-
var FormRowsContext = /*#__PURE__*/Object(external_react_["createContext"])({
|
|
312
|
-
disabledDeleteButton: false,
|
|
313
|
-
sortable: true
|
|
314
|
-
});
|
|
315
|
-
FormRowsContext.displayName = 'FormRows';
|
|
316
|
-
/* harmony default export */ var FormRows_FormRowsContext = (FormRowsContext);
|
|
317
314
|
// CONCATENATED MODULE: ./src/FormRows/Row.tsx
|
|
318
315
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
319
316
|
|
|
320
|
-
function
|
|
317
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
321
318
|
|
|
322
319
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
323
320
|
|
|
@@ -422,7 +419,7 @@ var Row_Row = /*#__PURE__*/function (_Component) {
|
|
|
422
419
|
}, /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, Object(i18n_["_"])('Press arrow up or arrow down to re-order items')));
|
|
423
420
|
});
|
|
424
421
|
return /*#__PURE__*/external_react_default.a.createElement(Styled // eslint-disable-line jsx-a11y/no-static-element-interactions
|
|
425
|
-
,
|
|
422
|
+
, _extends({
|
|
426
423
|
$sortable: sortableContext,
|
|
427
424
|
"data-test": "row",
|
|
428
425
|
ref: elementRef,
|
|
@@ -497,8 +494,6 @@ function FormRows_defineProperty(obj, key, value) { if (key in obj) { Object.def
|
|
|
497
494
|
|
|
498
495
|
|
|
499
496
|
|
|
500
|
-
/** @public */
|
|
501
|
-
|
|
502
497
|
var FormRows_propTypes = {
|
|
503
498
|
addLabel: external_prop_types_default.a.string,
|
|
504
499
|
children: external_prop_types_default.a.node,
|
|
@@ -615,7 +610,7 @@ var FormRows_FormRows = /*#__PURE__*/function (_Component) {
|
|
|
615
610
|
disabled: disabled,
|
|
616
611
|
appearance: "pill",
|
|
617
612
|
"data-test": "add-row",
|
|
618
|
-
icon: /*#__PURE__*/external_react_default.a.createElement(
|
|
613
|
+
icon: /*#__PURE__*/external_react_default.a.createElement(icons_FormRowsPlusIcon, null),
|
|
619
614
|
label: addLabel,
|
|
620
615
|
onClick: onRequestAdd,
|
|
621
616
|
$sortable: sortable
|
|
@@ -725,13 +720,6 @@ FormRows_defineProperty(FormRows_FormRows, "Row", FormRows_Row);
|
|
|
725
720
|
|
|
726
721
|
|
|
727
722
|
|
|
728
|
-
/***/ }),
|
|
729
|
-
|
|
730
|
-
/***/ 19:
|
|
731
|
-
/***/ (function(module, exports) {
|
|
732
|
-
|
|
733
|
-
module.exports = require("@splunk/react-ui/Button");
|
|
734
|
-
|
|
735
723
|
/***/ }),
|
|
736
724
|
|
|
737
725
|
/***/ 2:
|
|
@@ -763,163 +751,20 @@ module.exports = require("lodash/omit");
|
|
|
763
751
|
/***/ }),
|
|
764
752
|
|
|
765
753
|
/***/ 6:
|
|
766
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
767
|
-
|
|
768
|
-
"use strict";
|
|
769
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SVG; });
|
|
770
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
771
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
772
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
773
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
774
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
var Styled = styled_components__WEBPACK_IMPORTED_MODULE_1___default.a.svg.withConfig({
|
|
779
|
-
displayName: "SVG__Styled",
|
|
780
|
-
componentId: "sc-1bz0ryh-0"
|
|
781
|
-
})(["flex:0 0 auto;"]);
|
|
782
|
-
function SVG(props) {
|
|
783
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Styled, _extends({
|
|
784
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
785
|
-
}, props));
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
/***/ }),
|
|
789
|
-
|
|
790
|
-
/***/ 7:
|
|
791
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
792
|
-
|
|
793
|
-
"use strict";
|
|
794
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Icon; });
|
|
795
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
796
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
797
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
798
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
799
|
-
/* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
|
800
|
-
/* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_themes__WEBPACK_IMPORTED_MODULE_2__);
|
|
801
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
802
|
-
|
|
803
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
804
|
-
|
|
805
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
806
|
-
|
|
807
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
808
|
-
|
|
809
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
810
|
-
|
|
811
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
var inlineStyles = {
|
|
817
|
-
display: 'inline-block',
|
|
818
|
-
flex: '0 0 auto',
|
|
819
|
-
overflow: 'visible',
|
|
820
|
-
verticalAlign: 'middle'
|
|
821
|
-
};
|
|
822
|
-
var blockStyles = {
|
|
823
|
-
display: 'block',
|
|
824
|
-
flex: '0 0 auto',
|
|
825
|
-
margin: '0 auto',
|
|
826
|
-
overflow: 'visible'
|
|
827
|
-
};
|
|
828
|
-
var propTypes = {
|
|
829
|
-
Enterprise: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
|
|
830
|
-
enterpriseSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
|
|
831
|
-
enterpriseWidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
|
|
832
|
-
enterpriseHeight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
|
|
833
|
-
Prisma24: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,
|
|
834
|
-
Prisma20: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
|
|
835
|
-
Prisma16: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
|
|
836
|
-
prismaSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['medium', 'small']),
|
|
837
|
-
inline: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
|
|
838
|
-
screenReaderText: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
|
|
839
|
-
};
|
|
840
|
-
var defaultProps = {
|
|
841
|
-
inline: true,
|
|
842
|
-
prismaSize: 'medium'
|
|
843
|
-
};
|
|
844
|
-
function Icon(_ref) {
|
|
845
|
-
var Enterprise = _ref.Enterprise,
|
|
846
|
-
Prisma24 = _ref.Prisma24,
|
|
847
|
-
Prisma20 = _ref.Prisma20,
|
|
848
|
-
Prisma16 = _ref.Prisma16,
|
|
849
|
-
prismaSize = _ref.prismaSize,
|
|
850
|
-
inline = _ref.inline,
|
|
851
|
-
enterpriseSize = _ref.enterpriseSize,
|
|
852
|
-
enterpriseWidth = _ref.enterpriseWidth,
|
|
853
|
-
enterpriseHeight = _ref.enterpriseHeight,
|
|
854
|
-
screenReaderText = _ref.screenReaderText,
|
|
855
|
-
otherProps = _objectWithoutProperties(_ref, ["Enterprise", "Prisma24", "Prisma20", "Prisma16", "prismaSize", "inline", "enterpriseSize", "enterpriseWidth", "enterpriseHeight", "screenReaderText"]);
|
|
856
|
-
|
|
857
|
-
var _useSplunkTheme = Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_2__["useSplunkTheme"])(),
|
|
858
|
-
family = _useSplunkTheme.family,
|
|
859
|
-
density = _useSplunkTheme.density; // Enterprise - all variants
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
if (family === 'enterprise') {
|
|
863
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Enterprise, _extends({
|
|
864
|
-
size: enterpriseSize,
|
|
865
|
-
width: enterpriseWidth,
|
|
866
|
-
height: enterpriseHeight,
|
|
867
|
-
screenReaderText: screenReaderText || null,
|
|
868
|
-
hideDefaultTooltip: true,
|
|
869
|
-
inline: inline
|
|
870
|
-
}, otherProps));
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
var prismaProps = _objectSpread({
|
|
874
|
-
'aria-label': screenReaderText,
|
|
875
|
-
style: inline ? inlineStyles : blockStyles
|
|
876
|
-
}, otherProps); // Prisma - small+compact, small+comfortable
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
if (prismaSize === 'small') {
|
|
880
|
-
var SVG = Prisma16 || Prisma24;
|
|
881
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SVG, _extends({
|
|
882
|
-
width: "16",
|
|
883
|
-
height: "16"
|
|
884
|
-
}, prismaProps));
|
|
885
|
-
} // Prisma - medium+compact
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
if (density === 'compact') {
|
|
889
|
-
var _SVG = Prisma20 || Prisma24;
|
|
890
|
-
|
|
891
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG, _extends({
|
|
892
|
-
width: "20",
|
|
893
|
-
height: "20"
|
|
894
|
-
}, prismaProps));
|
|
895
|
-
} // Prisma - medium+comfortable
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Prisma24, _extends({
|
|
899
|
-
width: "24",
|
|
900
|
-
height: "24"
|
|
901
|
-
}, prismaProps));
|
|
902
|
-
}
|
|
903
|
-
Icon.propTypes = propTypes;
|
|
904
|
-
Icon.defaultProps = defaultProps;
|
|
905
|
-
|
|
906
|
-
/***/ }),
|
|
907
|
-
|
|
908
|
-
/***/ 8:
|
|
909
754
|
/***/ (function(module, exports) {
|
|
910
755
|
|
|
911
756
|
module.exports = require("@splunk/react-ui/Box");
|
|
912
757
|
|
|
913
758
|
/***/ }),
|
|
914
759
|
|
|
915
|
-
/***/
|
|
760
|
+
/***/ 7:
|
|
916
761
|
/***/ (function(module, exports) {
|
|
917
762
|
|
|
918
763
|
module.exports = require("@splunk/ui-utils/keyboard");
|
|
919
764
|
|
|
920
765
|
/***/ }),
|
|
921
766
|
|
|
922
|
-
/***/
|
|
767
|
+
/***/ 90:
|
|
923
768
|
/***/ (function(module, exports) {
|
|
924
769
|
|
|
925
770
|
module.exports = require("@splunk/react-ui/CloseButton");
|
package/Heading.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 = 219);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,6 +101,13 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
+
/***/ 134:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("@splunk/react-ui/Typography");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
104
111
|
/***/ 2:
|
|
105
112
|
/***/ (function(module, exports) {
|
|
106
113
|
|
|
@@ -108,7 +115,7 @@ module.exports = require("react");
|
|
|
108
115
|
|
|
109
116
|
/***/ }),
|
|
110
117
|
|
|
111
|
-
/***/
|
|
118
|
+
/***/ 219:
|
|
112
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
120
|
|
|
114
121
|
"use strict";
|
|
@@ -133,35 +140,31 @@ var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(exte
|
|
|
133
140
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
134
141
|
var themes_ = __webpack_require__(0);
|
|
135
142
|
|
|
143
|
+
// EXTERNAL MODULE: external "@splunk/react-ui/Typography"
|
|
144
|
+
var Typography_ = __webpack_require__(134);
|
|
145
|
+
var Typography_default = /*#__PURE__*/__webpack_require__.n(Typography_);
|
|
146
|
+
|
|
136
147
|
// CONCATENATED MODULE: ./src/Heading/HeadingStyles.ts
|
|
137
148
|
|
|
138
149
|
|
|
139
|
-
|
|
140
|
-
|
|
150
|
+
|
|
151
|
+
var StyledTypography = external_styled_components_default()(Typography_default.a).withConfig({
|
|
152
|
+
displayName: "HeadingStyles__StyledTypography",
|
|
141
153
|
componentId: "sc-15s3yx3-0"
|
|
142
|
-
})(["", "
|
|
143
|
-
|
|
144
|
-
return themes_["mixins"].typography('title1');
|
|
145
|
-
},
|
|
146
|
-
h2: function h2() {
|
|
147
|
-
return themes_["mixins"].typography('title2');
|
|
148
|
-
},
|
|
149
|
-
h3: function h3() {
|
|
150
|
-
return themes_["mixins"].typography('title3');
|
|
151
|
-
},
|
|
152
|
-
h4: {
|
|
154
|
+
})(["", " margin:1.414em 0 0.4em;text-rendering:optimizelegibility;", " ", ""], Object(themes_["pickVariant"])('variant', {
|
|
155
|
+
title4: {
|
|
153
156
|
enterprise: {
|
|
154
157
|
compact: function compact(_ref) {
|
|
155
158
|
var $isSection = _ref.$isSection;
|
|
156
159
|
return $isSection ? themes_["mixins"].typography('title4', {
|
|
157
|
-
weight:
|
|
160
|
+
weight: 'semiBold'
|
|
158
161
|
}) : themes_["mixins"].typography('title4');
|
|
159
162
|
},
|
|
160
163
|
comfortable: function comfortable(_ref2) {
|
|
161
164
|
var $isSection = _ref2.$isSection;
|
|
162
165
|
return $isSection ? themes_["mixins"].typography('title4', {
|
|
163
166
|
size: 14,
|
|
164
|
-
weight:
|
|
167
|
+
weight: 'semiBold'
|
|
165
168
|
}) : themes_["mixins"].typography('title4', {
|
|
166
169
|
size: 14
|
|
167
170
|
});
|
|
@@ -174,9 +177,6 @@ var StyledH1 = external_styled_components_default.a.h1.withConfig({
|
|
|
174
177
|
size: 14
|
|
175
178
|
}) : themes_["mixins"].typography('title4');
|
|
176
179
|
}
|
|
177
|
-
},
|
|
178
|
-
h5: function h5() {
|
|
179
|
-
return themes_["mixins"].typography('title5');
|
|
180
180
|
}
|
|
181
181
|
}), Object(themes_["pickVariant"])('$isSection', {
|
|
182
182
|
"true": {
|
|
@@ -203,7 +203,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
203
203
|
var propTypes = {
|
|
204
204
|
children: external_prop_types_default.a.node,
|
|
205
205
|
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
206
|
-
level: external_prop_types_default.a.oneOf([1, 2, 3, 4, 's', 'ss'])
|
|
206
|
+
level: external_prop_types_default.a.oneOf([1, 2, 3, 4, 's', 'ss', 5, 6])
|
|
207
207
|
};
|
|
208
208
|
// h1-h6 use the same intrinsic element type
|
|
209
209
|
var levelToElement = {
|
|
@@ -212,26 +212,38 @@ var levelToElement = {
|
|
|
212
212
|
'3': 'h3',
|
|
213
213
|
'4': 'h4',
|
|
214
214
|
s: 'h4',
|
|
215
|
-
ss: 'h5'
|
|
215
|
+
ss: 'h5',
|
|
216
|
+
'5': 'h5',
|
|
217
|
+
'6': 'h6'
|
|
218
|
+
};
|
|
219
|
+
var elementToVariant = {
|
|
220
|
+
h1: 'title1',
|
|
221
|
+
h2: 'title2',
|
|
222
|
+
h3: 'title3',
|
|
223
|
+
h4: 'title4',
|
|
224
|
+
h5: 'title5',
|
|
225
|
+
h6: 'title6'
|
|
216
226
|
};
|
|
217
227
|
|
|
218
228
|
function Heading(_ref) {
|
|
219
229
|
var _ref$level = _ref.level,
|
|
220
230
|
level = _ref$level === void 0 ? 2 : _ref$level,
|
|
221
231
|
children = _ref.children,
|
|
222
|
-
|
|
223
|
-
otherProps = _objectWithoutProperties(_ref, ["level", "children", "
|
|
232
|
+
variant = _ref.variant,
|
|
233
|
+
otherProps = _objectWithoutProperties(_ref, ["level", "children", "variant"]);
|
|
224
234
|
|
|
225
235
|
// @docs-props-type HeadingPropsBase
|
|
226
236
|
var isSection = function isSection(l) {
|
|
227
237
|
return l.toString().charAt(0) === 's';
|
|
228
238
|
};
|
|
229
239
|
|
|
230
|
-
|
|
231
|
-
|
|
240
|
+
var element = levelToElement[level];
|
|
241
|
+
var finalVariant = variant || elementToVariant[element];
|
|
242
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledTypography, _extends({
|
|
243
|
+
forwardedAs: element,
|
|
232
244
|
$isSection: isSection(level),
|
|
233
245
|
"data-test": "heading",
|
|
234
|
-
|
|
246
|
+
variant: finalVariant
|
|
235
247
|
}, otherProps), children);
|
|
236
248
|
}
|
|
237
249
|
|