@splunk/react-ui 4.3.0 → 4.5.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.
Files changed (138) hide show
  1. package/Accordion.js +37 -21
  2. package/Anchor.js +2 -2
  3. package/Animation.js +2 -2
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +36 -12
  7. package/ButtonGroup.js +27 -6
  8. package/ButtonSimple.js +6 -6
  9. package/CHANGELOG.md +57 -0
  10. package/Calendar.js +14 -14
  11. package/Card.js +51 -25
  12. package/CardLayout.js +31 -10
  13. package/Chip.js +77 -53
  14. package/Clickable.js +6 -6
  15. package/CloseButton.js +6 -6
  16. package/Code.js +1279 -1120
  17. package/CollapsiblePanel.js +6 -6
  18. package/Color.js +180 -209
  19. package/ColumnLayout.js +4 -4
  20. package/ComboBox.js +22 -17
  21. package/Concertina.js +56 -51
  22. package/ControlGroup.js +121 -32
  23. package/Date.js +62 -25
  24. package/DefinitionList.js +2 -2
  25. package/Dropdown.js +12 -12
  26. package/EventListener.js +168 -0
  27. package/FetchOptions.js +8 -8
  28. package/File.js +122 -96
  29. package/FormRows.js +66 -58
  30. package/Heading.js +2 -2
  31. package/Image.js +14 -14
  32. package/JSONTree.js +5 -5
  33. package/Layer.js +32 -20
  34. package/Link.js +8 -8
  35. package/List.js +2 -2
  36. package/Markdown.js +250 -88
  37. package/Menu.js +70 -64
  38. package/Message.js +18 -18
  39. package/Modal.js +70 -16
  40. package/ModalLayer.js +4 -4
  41. package/Monogram.js +12 -11
  42. package/Multiselect.js +124 -80
  43. package/Number.js +44 -34
  44. package/Paginator.js +10 -10
  45. package/Paragraph.js +2 -2
  46. package/Popover.js +54 -40
  47. package/Progress.js +8 -8
  48. package/RadioBar.js +45 -38
  49. package/RadioList.js +2 -2
  50. package/Resize.js +19 -15
  51. package/ResultsMenu.js +6 -6
  52. package/ScreenReaderContent.js +2 -2
  53. package/Scroll.js +25 -23
  54. package/ScrollContainerContext.js +5 -5
  55. package/Search.d.ts +2 -0
  56. package/Search.js +797 -0
  57. package/Select.js +85 -45
  58. package/SidePanel.js +6 -6
  59. package/Slider.js +34 -30
  60. package/SlidingPanels.js +6 -6
  61. package/StaticContent.js +2 -2
  62. package/StepBar.js +56 -52
  63. package/Switch.js +8 -8
  64. package/TabBar.js +126 -85
  65. package/TabLayout.js +4 -5
  66. package/Table.js +266 -155
  67. package/Text.js +486 -401
  68. package/Tooltip.js +11 -11
  69. package/TransitionOpen.js +11 -11
  70. package/WaitSpinner.js +3 -4
  71. package/package.json +5 -6
  72. package/types/src/Accordion/AccordionContext.d.ts +10 -0
  73. package/types/src/Accordion/Panel.d.ts +0 -9
  74. package/types/src/Button/Button.d.ts +4 -2
  75. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +7 -0
  76. package/types/src/ButtonSimple/ButtonSimple.d.ts +5 -5
  77. package/types/src/Card/Card.d.ts +2 -0
  78. package/types/src/CardLayout/CardLayoutContext.d.ts +8 -0
  79. package/types/src/Color/Color.d.ts +2 -2
  80. package/types/src/Color/Swatch.d.ts +4 -15
  81. package/types/src/ComboBox/ComboBox.d.ts +4 -3
  82. package/types/src/Concertina/ConcertinaContext.d.ts +8 -0
  83. package/types/src/Concertina/Panel.d.ts +2 -4
  84. package/types/src/ControlGroup/ControlGroup.d.ts +11 -1
  85. package/types/src/ControlGroup/ControlGroupContext.d.ts +15 -0
  86. package/types/src/Date/Date.d.ts +6 -4
  87. package/types/src/EventListener/EventListener.d.ts +18 -0
  88. package/types/src/EventListener/index.d.ts +2 -0
  89. package/types/src/File/File.d.ts +6 -4
  90. package/types/src/File/FileContext.d.ts +9 -0
  91. package/types/src/File/Item.d.ts +5 -10
  92. package/types/src/FormRows/FormRows.d.ts +2 -2
  93. package/types/src/FormRows/FormRowsContext.d.ts +10 -0
  94. package/types/src/FormRows/Row.d.ts +5 -16
  95. package/types/src/Markdown/Markdown.d.ts +2 -0
  96. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +14 -0
  97. package/types/src/Markdown/renderers/MarkdownCode.d.ts +15 -0
  98. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +16 -0
  99. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +15 -0
  100. package/types/src/Markdown/renderers/MarkdownImage.d.ts +18 -0
  101. package/types/src/Markdown/renderers/MarkdownItem.d.ts +14 -0
  102. package/types/src/Markdown/renderers/MarkdownLink.d.ts +18 -0
  103. package/types/src/Markdown/renderers/MarkdownList.d.ts +26 -0
  104. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +14 -0
  105. package/types/src/Markdown/renderers/index.d.ts +10 -0
  106. package/types/src/Modal/Modal.d.ts +15 -3
  107. package/types/src/Monogram/Monogram.d.ts +5 -1
  108. package/types/src/Multiselect/Compact.d.ts +12 -4
  109. package/types/src/Multiselect/Multiselect.d.ts +14 -4
  110. package/types/src/Multiselect/Normal.d.ts +7 -2
  111. package/types/src/Number/Number.d.ts +11 -7
  112. package/types/src/Popover/Popover.d.ts +2 -2
  113. package/types/src/RadioBar/Option.d.ts +1 -15
  114. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  115. package/types/src/RadioBar/RadioBarContext.d.ts +9 -0
  116. package/types/src/Scroll/Inner.d.ts +2 -2
  117. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +4 -4
  118. package/types/src/Search/Option.d.ts +60 -0
  119. package/types/src/Search/Search.d.ts +97 -0
  120. package/types/src/Search/index.d.ts +2 -0
  121. package/types/src/Select/Select.d.ts +6 -2
  122. package/types/src/Select/SelectBase.d.ts +12 -5
  123. package/types/src/Slider/Slider.d.ts +2 -2
  124. package/types/src/StepBar/Step.d.ts +1 -13
  125. package/types/src/StepBar/StepBarContext.d.ts +8 -0
  126. package/types/src/TabBar/Tab.d.ts +5 -13
  127. package/types/src/TabBar/TabBarContext.d.ts +14 -0
  128. package/types/src/Table/Body.d.ts +1 -1
  129. package/types/src/Table/Head.d.ts +3 -1
  130. package/types/src/Table/HeadCell.d.ts +1 -1
  131. package/types/src/Table/HeadInner.d.ts +3 -3
  132. package/types/src/Table/Row.d.ts +10 -3
  133. package/types/src/Table/Table.d.ts +10 -5
  134. package/types/src/Text/Text.d.ts +33 -12
  135. package/types/src/icons/Sort.d.ts +3 -0
  136. package/types/src/usePrevious/index.d.ts +2 -0
  137. package/types/src/usePrevious/usePrevious.d.ts +12 -0
  138. package/usePrevious.js +137 -0
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from './types';
3
+ export default function CaretDown(props: IconProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from './usePrevious';
2
+ export * from './usePrevious';
@@ -0,0 +1,12 @@
1
+ import { MutableRefObject } from 'react';
2
+ /**
3
+ * This is a private component not intended for use outside @splunk/react-ui
4
+ *
5
+ * Keeps the previous version of a value. Useful for emulating the "prevState"
6
+ * argument to componentDidUpdate() in functional components.
7
+ * See https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
8
+ *
9
+ * @param value - The value to store
10
+ */
11
+ declare function usePrevious<T>(value: T): MutableRefObject<T | undefined>['current'];
12
+ export default usePrevious;
package/usePrevious.js ADDED
@@ -0,0 +1,137 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
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 = 176);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 176:
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ // ESM COMPAT FLAG
95
+ __webpack_require__.r(__webpack_exports__);
96
+
97
+ // EXPORTS
98
+ __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ usePrevious_usePrevious; });
99
+
100
+ // EXTERNAL MODULE: external "react"
101
+ var external_react_ = __webpack_require__(2);
102
+
103
+ // CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
104
+
105
+ /**
106
+ * This is a private component not intended for use outside @splunk/react-ui
107
+ *
108
+ * Keeps the previous version of a value. Useful for emulating the "prevState"
109
+ * argument to componentDidUpdate() in functional components.
110
+ * See https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
111
+ *
112
+ * @param value - The value to store
113
+ */
114
+
115
+ function usePrevious(value) {
116
+ var ref = Object(external_react_["useRef"])();
117
+ Object(external_react_["useEffect"])(function () {
118
+ ref.current = value;
119
+ }, [value]);
120
+ return ref.current;
121
+ }
122
+
123
+ /* harmony default export */ var usePrevious_usePrevious = (usePrevious);
124
+ // CONCATENATED MODULE: ./src/usePrevious/index.ts
125
+
126
+
127
+
128
+ /***/ }),
129
+
130
+ /***/ 2:
131
+ /***/ (function(module, exports) {
132
+
133
+ module.exports = require("react");
134
+
135
+ /***/ })
136
+
137
+ /******/ });