@splunk/react-ui 4.20.0 → 4.21.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 +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -354
- package/Menu.js +489 -760
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +943 -1448
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Code.js
CHANGED
|
@@ -1,108 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
/******/ (
|
|
3
|
-
/******/ // The module cache
|
|
4
|
-
/******/ var installedModules = {};
|
|
5
|
-
/******/
|
|
6
|
-
/******/ // The require function
|
|
7
|
-
/******/ function __webpack_require__(moduleId) {
|
|
8
|
-
/******/
|
|
9
|
-
/******/ // Check if module is in cache
|
|
10
|
-
/******/ if(installedModules[moduleId]) {
|
|
11
|
-
/******/ return installedModules[moduleId].exports;
|
|
12
|
-
/******/ }
|
|
13
|
-
/******/ // Create a new module (and put it into the cache)
|
|
14
|
-
/******/ var module = installedModules[moduleId] = {
|
|
15
|
-
/******/ i: moduleId,
|
|
16
|
-
/******/ l: false,
|
|
17
|
-
/******/ exports: {}
|
|
18
|
-
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/ // Execute the module function
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 219);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ({
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ var __webpack_modules__ = ({
|
|
99
3
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 118:
|
|
105
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4
|
+
/***/ 74:
|
|
5
|
+
/***/ ((module) => {
|
|
106
6
|
|
|
107
7
|
|
|
108
8
|
(function() {
|
|
@@ -2313,126 +2213,172 @@ Prism.languages['splunk-spl'] = {
|
|
|
2313
2213
|
})();
|
|
2314
2214
|
|
|
2315
2215
|
|
|
2316
|
-
/***/ })
|
|
2317
|
-
|
|
2318
|
-
/***/ 128:
|
|
2319
|
-
/***/ (function(module, exports) {
|
|
2320
|
-
|
|
2321
|
-
module.exports = require("lodash/flatten");
|
|
2322
|
-
|
|
2323
|
-
/***/ }),
|
|
2324
|
-
|
|
2325
|
-
/***/ 2:
|
|
2326
|
-
/***/ (function(module, exports) {
|
|
2327
|
-
|
|
2328
|
-
module.exports = require("react");
|
|
2329
|
-
|
|
2330
|
-
/***/ }),
|
|
2331
|
-
|
|
2332
|
-
/***/ 219:
|
|
2333
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2216
|
+
/***/ })
|
|
2334
2217
|
|
|
2218
|
+
/******/ });
|
|
2219
|
+
/************************************************************************/
|
|
2220
|
+
/******/ // The module cache
|
|
2221
|
+
/******/ var __webpack_module_cache__ = {};
|
|
2222
|
+
/******/
|
|
2223
|
+
/******/ // The require function
|
|
2224
|
+
/******/ function __webpack_require__(moduleId) {
|
|
2225
|
+
/******/ // Check if module is in cache
|
|
2226
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2227
|
+
/******/ if (cachedModule !== undefined) {
|
|
2228
|
+
/******/ return cachedModule.exports;
|
|
2229
|
+
/******/ }
|
|
2230
|
+
/******/ // Create a new module (and put it into the cache)
|
|
2231
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2232
|
+
/******/ // no module.id needed
|
|
2233
|
+
/******/ // no module.loaded needed
|
|
2234
|
+
/******/ exports: {}
|
|
2235
|
+
/******/ };
|
|
2236
|
+
/******/
|
|
2237
|
+
/******/ // Execute the module function
|
|
2238
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2239
|
+
/******/
|
|
2240
|
+
/******/ // Return the exports of the module
|
|
2241
|
+
/******/ return module.exports;
|
|
2242
|
+
/******/ }
|
|
2243
|
+
/******/
|
|
2244
|
+
/************************************************************************/
|
|
2245
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
2246
|
+
/******/ (() => {
|
|
2247
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2248
|
+
/******/ __webpack_require__.n = (module) => {
|
|
2249
|
+
/******/ var getter = module && module.__esModule ?
|
|
2250
|
+
/******/ () => (module['default']) :
|
|
2251
|
+
/******/ () => (module);
|
|
2252
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2253
|
+
/******/ return getter;
|
|
2254
|
+
/******/ };
|
|
2255
|
+
/******/ })();
|
|
2256
|
+
/******/
|
|
2257
|
+
/******/ /* webpack/runtime/define property getters */
|
|
2258
|
+
/******/ (() => {
|
|
2259
|
+
/******/ // define getter functions for harmony exports
|
|
2260
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2261
|
+
/******/ for(var key in definition) {
|
|
2262
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2263
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2264
|
+
/******/ }
|
|
2265
|
+
/******/ }
|
|
2266
|
+
/******/ };
|
|
2267
|
+
/******/ })();
|
|
2268
|
+
/******/
|
|
2269
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2270
|
+
/******/ (() => {
|
|
2271
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2272
|
+
/******/ })();
|
|
2273
|
+
/******/
|
|
2274
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
2275
|
+
/******/ (() => {
|
|
2276
|
+
/******/ // define __esModule on exports
|
|
2277
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
2278
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2279
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2280
|
+
/******/ }
|
|
2281
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2282
|
+
/******/ };
|
|
2283
|
+
/******/ })();
|
|
2284
|
+
/******/
|
|
2285
|
+
/************************************************************************/
|
|
2286
|
+
var __webpack_exports__ = {};
|
|
2287
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
2288
|
+
(() => {
|
|
2335
2289
|
"use strict";
|
|
2336
2290
|
// ESM COMPAT FLAG
|
|
2337
2291
|
__webpack_require__.r(__webpack_exports__);
|
|
2338
2292
|
|
|
2339
2293
|
// EXPORTS
|
|
2340
|
-
__webpack_require__.d(__webpack_exports__,
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
var external_react_ = __webpack_require__(2);
|
|
2344
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
2345
|
-
|
|
2346
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
2347
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
2348
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
2349
|
-
|
|
2350
|
-
// EXTERNAL MODULE: external "lodash/castArray"
|
|
2351
|
-
var castArray_ = __webpack_require__(67);
|
|
2352
|
-
var castArray_default = /*#__PURE__*/__webpack_require__.n(castArray_);
|
|
2353
|
-
|
|
2354
|
-
// EXTERNAL MODULE: external "lodash/flatten"
|
|
2355
|
-
var flatten_ = __webpack_require__(128);
|
|
2356
|
-
var flatten_default = /*#__PURE__*/__webpack_require__.n(flatten_);
|
|
2357
|
-
|
|
2358
|
-
// EXTERNAL MODULE: external "lodash/indexOf"
|
|
2359
|
-
var indexOf_ = __webpack_require__(84);
|
|
2360
|
-
var indexOf_default = /*#__PURE__*/__webpack_require__.n(indexOf_);
|
|
2361
|
-
|
|
2362
|
-
// EXTERNAL MODULE: external "lodash/repeat"
|
|
2363
|
-
var repeat_ = __webpack_require__(82);
|
|
2364
|
-
var repeat_default = /*#__PURE__*/__webpack_require__.n(repeat_);
|
|
2365
|
-
|
|
2366
|
-
// EXTERNAL MODULE: external "lodash/times"
|
|
2367
|
-
var times_ = __webpack_require__(81);
|
|
2368
|
-
var times_default = /*#__PURE__*/__webpack_require__.n(times_);
|
|
2294
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
2295
|
+
"default": () => (/* reexport */ Code_Code)
|
|
2296
|
+
});
|
|
2369
2297
|
|
|
2298
|
+
;// CONCATENATED MODULE: external "react"
|
|
2299
|
+
const external_react_namespaceObject = require("react");
|
|
2300
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
2301
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
2302
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
2303
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
2304
|
+
;// CONCATENATED MODULE: external "lodash/castArray"
|
|
2305
|
+
const castArray_namespaceObject = require("lodash/castArray");
|
|
2306
|
+
var castArray_default = /*#__PURE__*/__webpack_require__.n(castArray_namespaceObject);
|
|
2307
|
+
;// CONCATENATED MODULE: external "lodash/flatten"
|
|
2308
|
+
const flatten_namespaceObject = require("lodash/flatten");
|
|
2309
|
+
var flatten_default = /*#__PURE__*/__webpack_require__.n(flatten_namespaceObject);
|
|
2310
|
+
;// CONCATENATED MODULE: external "lodash/indexOf"
|
|
2311
|
+
const indexOf_namespaceObject = require("lodash/indexOf");
|
|
2312
|
+
var indexOf_default = /*#__PURE__*/__webpack_require__.n(indexOf_namespaceObject);
|
|
2313
|
+
;// CONCATENATED MODULE: external "lodash/repeat"
|
|
2314
|
+
const repeat_namespaceObject = require("lodash/repeat");
|
|
2315
|
+
var repeat_default = /*#__PURE__*/__webpack_require__.n(repeat_namespaceObject);
|
|
2316
|
+
;// CONCATENATED MODULE: external "lodash/times"
|
|
2317
|
+
const times_namespaceObject = require("lodash/times");
|
|
2318
|
+
var times_default = /*#__PURE__*/__webpack_require__.n(times_namespaceObject);
|
|
2370
2319
|
// EXTERNAL MODULE: ./src/Code/prism/prism.empty
|
|
2371
|
-
var prism_empty = __webpack_require__(
|
|
2320
|
+
var prism_empty = __webpack_require__(74);
|
|
2372
2321
|
var prism_empty_default = /*#__PURE__*/__webpack_require__.n(prism_empty);
|
|
2322
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
2323
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
2324
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
2325
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
2326
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
2327
|
+
;// CONCATENATED MODULE: ./src/Code/CodeStyles.ts
|
|
2373
2328
|
|
|
2374
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
2375
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
2376
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
2377
|
-
|
|
2378
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
2379
|
-
var themes_ = __webpack_require__(0);
|
|
2380
|
-
|
|
2381
|
-
// CONCATENATED MODULE: ./src/Code/CodeStyles.ts
|
|
2382
2329
|
|
|
2383
|
-
|
|
2384
|
-
var Styled = external_styled_components_default.a.pre.withConfig({
|
|
2330
|
+
var Styled = external_styled_components_default().pre.withConfig({
|
|
2385
2331
|
displayName: "CodeStyles__Styled",
|
|
2386
2332
|
componentId: "sc-1eq4k68-0"
|
|
2387
|
-
})(["", ";", " line-height:", ";text-align:left;tab-size:4;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;hyphens:none;overflow-x:auto;margin-bottom:1.3em;&:focus-visible{outline:solid ", ";}"],
|
|
2333
|
+
})(["", ";", " line-height:", ";text-align:left;tab-size:4;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;hyphens:none;overflow-x:auto;margin-bottom:1.3em;&:focus-visible{outline:solid ", ";}"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
|
|
2388
2334
|
enterprise: {
|
|
2389
|
-
dark:
|
|
2335
|
+
dark: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.gray92)
|
|
2390
2336
|
}
|
|
2391
|
-
}),
|
|
2337
|
+
}), (0,themes_namespaceObject.pick)({
|
|
2392
2338
|
enterprise: '17px',
|
|
2393
|
-
prisma:
|
|
2394
|
-
}),
|
|
2395
|
-
var StyledCode = external_styled_components_default.
|
|
2339
|
+
prisma: themes_namespaceObject.variables.lineHeight
|
|
2340
|
+
}), themes_namespaceObject.variables.focusColor);
|
|
2341
|
+
var StyledCode = external_styled_components_default().code.withConfig({
|
|
2396
2342
|
displayName: "CodeStyles__StyledCode",
|
|
2397
2343
|
componentId: "sc-1eq4k68-1"
|
|
2398
|
-
})(["font-family:", ";"],
|
|
2399
|
-
var StyledIndent = external_styled_components_default.
|
|
2344
|
+
})(["font-family:", ";"], themes_namespaceObject.variables.monoFontFamily);
|
|
2345
|
+
var StyledIndent = external_styled_components_default().span.withConfig({
|
|
2400
2346
|
displayName: "CodeStyles__StyledIndent",
|
|
2401
2347
|
componentId: "sc-1eq4k68-2"
|
|
2402
2348
|
})(["&:not(:last-child){background-image:linear-gradient( to left,rgba(0,0,0,0.15) 1px,transparent 1px,transparent );}"]);
|
|
2403
|
-
var gray =
|
|
2404
|
-
prisma:
|
|
2349
|
+
var gray = (0,themes_namespaceObject.pick)({
|
|
2350
|
+
prisma: themes_namespaceObject.variables.syntaxGray,
|
|
2405
2351
|
enterprise: {
|
|
2406
|
-
dark:
|
|
2407
|
-
light:
|
|
2352
|
+
dark: themes_namespaceObject.variables.gray60,
|
|
2353
|
+
light: themes_namespaceObject.variables.syntaxGray
|
|
2408
2354
|
}
|
|
2409
2355
|
});
|
|
2410
|
-
var purple =
|
|
2411
|
-
prisma:
|
|
2356
|
+
var purple = (0,themes_namespaceObject.pick)({
|
|
2357
|
+
prisma: themes_namespaceObject.variables.syntaxPurple,
|
|
2412
2358
|
enterprise: {
|
|
2413
|
-
dark:
|
|
2414
|
-
light:
|
|
2359
|
+
dark: themes_namespaceObject.variables.syntaxPurpleLight,
|
|
2360
|
+
light: themes_namespaceObject.variables.syntaxPurple
|
|
2415
2361
|
}
|
|
2416
2362
|
});
|
|
2417
|
-
var green =
|
|
2418
|
-
prisma:
|
|
2363
|
+
var green = (0,themes_namespaceObject.pick)({
|
|
2364
|
+
prisma: themes_namespaceObject.variables.syntaxGreen,
|
|
2419
2365
|
enterprise: {
|
|
2420
|
-
dark:
|
|
2421
|
-
light:
|
|
2366
|
+
dark: themes_namespaceObject.variables.syntaxGreenLight,
|
|
2367
|
+
light: themes_namespaceObject.variables.syntaxGreen
|
|
2422
2368
|
}
|
|
2423
2369
|
});
|
|
2424
|
-
var blue =
|
|
2425
|
-
prisma:
|
|
2370
|
+
var blue = (0,themes_namespaceObject.pick)({
|
|
2371
|
+
prisma: themes_namespaceObject.variables.syntaxBlue,
|
|
2426
2372
|
enterprise: {
|
|
2427
|
-
dark:
|
|
2428
|
-
light:
|
|
2373
|
+
dark: themes_namespaceObject.variables.syntaxBlueLight,
|
|
2374
|
+
light: themes_namespaceObject.variables.syntaxBlue
|
|
2429
2375
|
}
|
|
2430
2376
|
});
|
|
2431
|
-
var red =
|
|
2432
|
-
prisma:
|
|
2377
|
+
var red = (0,themes_namespaceObject.pick)({
|
|
2378
|
+
prisma: themes_namespaceObject.variables.syntaxRed,
|
|
2433
2379
|
enterprise: {
|
|
2434
|
-
dark:
|
|
2435
|
-
light:
|
|
2380
|
+
dark: themes_namespaceObject.variables.syntaxRedLight,
|
|
2381
|
+
light: themes_namespaceObject.variables.syntaxRed
|
|
2436
2382
|
}
|
|
2437
2383
|
});
|
|
2438
2384
|
var TokenColors = {
|
|
@@ -2455,18 +2401,18 @@ var TokenColors = {
|
|
|
2455
2401
|
"char": green,
|
|
2456
2402
|
builtin: green,
|
|
2457
2403
|
inserted: green,
|
|
2458
|
-
operator:
|
|
2459
|
-
entity:
|
|
2460
|
-
url:
|
|
2404
|
+
operator: themes_namespaceObject.variables.syntaxBrown,
|
|
2405
|
+
entity: themes_namespaceObject.variables.syntaxBrown,
|
|
2406
|
+
url: themes_namespaceObject.variables.syntaxBrown,
|
|
2461
2407
|
atrule: blue,
|
|
2462
2408
|
'attr-value': blue,
|
|
2463
2409
|
keyword: blue,
|
|
2464
2410
|
"function": red,
|
|
2465
|
-
regex:
|
|
2466
|
-
important:
|
|
2467
|
-
variable:
|
|
2411
|
+
regex: themes_namespaceObject.variables.syntaxOrange,
|
|
2412
|
+
important: themes_namespaceObject.variables.syntaxOrange,
|
|
2413
|
+
variable: themes_namespaceObject.variables.syntaxOrange
|
|
2468
2414
|
};
|
|
2469
|
-
var StyledToken = external_styled_components_default.
|
|
2415
|
+
var StyledToken = external_styled_components_default().span.withConfig({
|
|
2470
2416
|
displayName: "CodeStyles__StyledToken",
|
|
2471
2417
|
componentId: "sc-1eq4k68-3"
|
|
2472
2418
|
})(["color:", ";cursor:", ";opacity:", ";font-style:", ";font-weight:", ";"], function (_ref) {
|
|
@@ -2486,7 +2432,7 @@ var StyledToken = external_styled_components_default.a.span.withConfig({
|
|
|
2486
2432
|
return partType === 'important' || partType === 'bold' ? 'bold' : null;
|
|
2487
2433
|
});
|
|
2488
2434
|
|
|
2489
|
-
|
|
2435
|
+
;// CONCATENATED MODULE: ./src/Code/Code.tsx
|
|
2490
2436
|
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); }
|
|
2491
2437
|
|
|
2492
2438
|
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; }
|
|
@@ -2509,16 +2455,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
2509
2455
|
var supportedLanguages = ['bash', 'clike', 'css', 'html', 'json', 'javascript', 'js', 'jsx', 'typescript', 'ts', 'tsx', 'markup', 'mathml', 'splunk-spl', 'svg', 'xml', 'yaml', 'yml'];
|
|
2510
2456
|
|
|
2511
2457
|
function tokenize(text, language) {
|
|
2512
|
-
return prism_empty_default.
|
|
2458
|
+
return prism_empty_default().tokenize(text, (prism_empty_default()).languages[language]);
|
|
2513
2459
|
}
|
|
2514
2460
|
|
|
2515
2461
|
var propTypes = {
|
|
2516
|
-
elementRef: external_prop_types_default.
|
|
2517
|
-
indentChars: external_prop_types_default.
|
|
2518
|
-
language: external_prop_types_default.
|
|
2519
|
-
languageFallback: external_prop_types_default.
|
|
2520
|
-
showIndentGuide: external_prop_types_default.
|
|
2521
|
-
value: external_prop_types_default.
|
|
2462
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
2463
|
+
indentChars: (external_prop_types_default()).number,
|
|
2464
|
+
language: external_prop_types_default().oneOf(supportedLanguages),
|
|
2465
|
+
languageFallback: external_prop_types_default().oneOf(supportedLanguages),
|
|
2466
|
+
showIndentGuide: (external_prop_types_default()).bool,
|
|
2467
|
+
value: (external_prop_types_default()).string
|
|
2522
2468
|
};
|
|
2523
2469
|
|
|
2524
2470
|
function Code(_ref) {
|
|
@@ -2541,7 +2487,7 @@ function Code(_ref) {
|
|
|
2541
2487
|
var level = Math.floor(spaces / indentChars);
|
|
2542
2488
|
var rest = spaces % indentChars;
|
|
2543
2489
|
var spans = times_default()(level, function (idx) {
|
|
2544
|
-
return /*#__PURE__*/external_react_default.
|
|
2490
|
+
return /*#__PURE__*/external_react_default().createElement(StyledIndent, {
|
|
2545
2491
|
key: idx.toString()
|
|
2546
2492
|
}, indentBlock);
|
|
2547
2493
|
});
|
|
@@ -2581,7 +2527,7 @@ function Code(_ref) {
|
|
|
2581
2527
|
if (!indentMatch) {
|
|
2582
2528
|
res.push(line);
|
|
2583
2529
|
} else {
|
|
2584
|
-
res.push( /*#__PURE__*/external_react_default.
|
|
2530
|
+
res.push( /*#__PURE__*/external_react_default().createElement("span", {
|
|
2585
2531
|
key: "".concat(idx.toString(), ":").concat(lineNo.toString())
|
|
2586
2532
|
}, makeIndentGuide(indentMatch[1].length)), indentMatch[2]);
|
|
2587
2533
|
}
|
|
@@ -2591,7 +2537,7 @@ function Code(_ref) {
|
|
|
2591
2537
|
}
|
|
2592
2538
|
|
|
2593
2539
|
var content = typeof part.content === 'string' ? part.content : render(part.content);
|
|
2594
|
-
return /*#__PURE__*/external_react_default.
|
|
2540
|
+
return /*#__PURE__*/external_react_default().createElement(StyledToken, {
|
|
2595
2541
|
"data-part-type": part.type,
|
|
2596
2542
|
partType: part.type,
|
|
2597
2543
|
key: idx.toString()
|
|
@@ -2600,55 +2546,21 @@ function Code(_ref) {
|
|
|
2600
2546
|
};
|
|
2601
2547
|
|
|
2602
2548
|
var codeContent = render(tokens);
|
|
2603
|
-
return /*#__PURE__*/external_react_default.
|
|
2549
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, _extends({
|
|
2604
2550
|
"data-test": "code",
|
|
2605
2551
|
ref: elementRef,
|
|
2606
2552
|
tabIndex: 0
|
|
2607
|
-
}, otherProps), /*#__PURE__*/external_react_default.
|
|
2553
|
+
}, otherProps), /*#__PURE__*/external_react_default().createElement(StyledCode, {
|
|
2608
2554
|
className: "language-".concat(languageUsed)
|
|
2609
2555
|
}, codeContent));
|
|
2610
2556
|
}
|
|
2611
2557
|
|
|
2612
2558
|
Code.propTypes = propTypes;
|
|
2613
|
-
/* harmony default export */
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
/***/ }),
|
|
2618
|
-
|
|
2619
|
-
/***/ 3:
|
|
2620
|
-
/***/ (function(module, exports) {
|
|
2621
|
-
|
|
2622
|
-
module.exports = require("styled-components");
|
|
2623
|
-
|
|
2624
|
-
/***/ }),
|
|
2625
|
-
|
|
2626
|
-
/***/ 67:
|
|
2627
|
-
/***/ (function(module, exports) {
|
|
2628
|
-
|
|
2629
|
-
module.exports = require("lodash/castArray");
|
|
2630
|
-
|
|
2631
|
-
/***/ }),
|
|
2559
|
+
/* harmony default export */ const Code_Code = (Code);
|
|
2560
|
+
;// CONCATENATED MODULE: ./src/Code/index.ts
|
|
2632
2561
|
|
|
2633
|
-
|
|
2634
|
-
/***/ (function(module, exports) {
|
|
2635
|
-
|
|
2636
|
-
module.exports = require("lodash/times");
|
|
2637
|
-
|
|
2638
|
-
/***/ }),
|
|
2639
|
-
|
|
2640
|
-
/***/ 82:
|
|
2641
|
-
/***/ (function(module, exports) {
|
|
2642
|
-
|
|
2643
|
-
module.exports = require("lodash/repeat");
|
|
2644
|
-
|
|
2645
|
-
/***/ }),
|
|
2646
|
-
|
|
2647
|
-
/***/ 84:
|
|
2648
|
-
/***/ (function(module, exports) {
|
|
2649
|
-
|
|
2650
|
-
module.exports = require("lodash/indexOf");
|
|
2651
|
-
|
|
2652
|
-
/***/ })
|
|
2562
|
+
})();
|
|
2653
2563
|
|
|
2654
|
-
|
|
2564
|
+
module.exports = __webpack_exports__;
|
|
2565
|
+
/******/ })()
|
|
2566
|
+
;
|