@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.
Files changed (173) hide show
  1. package/Accordion.js +13 -13
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +98 -244
  7. package/ButtonGroup.js +4 -4
  8. package/ButtonSimple.js +6 -6
  9. package/CHANGELOG.md +43 -2
  10. package/Calendar.js +73 -274
  11. package/Card.js +75 -227
  12. package/CardLayout.js +2 -2
  13. package/Chip.js +40 -211
  14. package/Clickable.js +10 -10
  15. package/CloseButton.js +34 -202
  16. package/Code.js +27 -20
  17. package/CollapsiblePanel.js +74 -228
  18. package/Color.js +62 -319
  19. package/ColumnLayout.js +6 -6
  20. package/ComboBox.js +32 -32
  21. package/Concertina.js +38 -38
  22. package/ControlGroup.js +20 -20
  23. package/Date.js +22 -22
  24. package/DefinitionList.js +2 -2
  25. package/Divider.js +2 -2
  26. package/Dropdown.js +29 -29
  27. package/DualListbox.d.ts +2 -0
  28. package/DualListbox.js +1780 -0
  29. package/EventListener.js +4 -4
  30. package/File.js +85 -250
  31. package/FormRows.js +60 -215
  32. package/Heading.js +39 -27
  33. package/Image.js +73 -227
  34. package/JSONTree.js +18 -18
  35. package/Layer.js +30 -30
  36. package/Link.js +60 -28
  37. package/List.js +9 -9
  38. package/MIGRATION.md +28 -0
  39. package/Markdown.js +21 -21
  40. package/Menu.js +180 -371
  41. package/Message.js +137 -407
  42. package/MessageBar.js +168 -398
  43. package/Modal.js +31 -31
  44. package/ModalLayer.js +6 -6
  45. package/Monogram.js +4 -4
  46. package/Multiselect.js +2297 -2525
  47. package/Number.js +32 -32
  48. package/Paginator.js +92 -321
  49. package/Paragraph.js +2 -2
  50. package/Popover.js +123 -123
  51. package/Progress.js +15 -15
  52. package/RadioBar.js +23 -19
  53. package/RadioList.js +13 -12
  54. package/Resize.js +18 -18
  55. package/ResultsMenu.js +21 -21
  56. package/ScreenReaderContent.js +2 -2
  57. package/Scroll.js +33 -33
  58. package/ScrollContainerContext.js +13 -13
  59. package/Search.js +34 -32
  60. package/Select.js +220 -367
  61. package/SidePanel.js +12 -12
  62. package/Slider.js +28 -28
  63. package/SlidingPanels.js +29 -29
  64. package/SplitButton.js +59 -62
  65. package/StaticContent.js +4 -4
  66. package/StepBar.js +35 -238
  67. package/Switch.js +23 -23
  68. package/TabBar.js +30 -44
  69. package/TabLayout.js +30 -28
  70. package/Table.js +292 -586
  71. package/Text.js +109 -322
  72. package/TextArea.js +160 -366
  73. package/Tooltip.js +23 -23
  74. package/TransitionOpen.js +21 -21
  75. package/Typography.js +32 -28
  76. package/WaitSpinner.js +2 -2
  77. package/docker-compose.yml +19 -7
  78. package/package.json +10 -11
  79. package/stubs-splunkui.d.ts +4 -1
  80. package/types/src/Button/icons/CaretSmallDown.d.ts +2 -0
  81. package/types/src/Button/icons/External.d.ts +2 -0
  82. package/types/src/Code/Code.d.ts +6 -1
  83. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +0 -1
  84. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +11 -0
  85. package/types/src/Date/Icon.d.ts +1 -1
  86. package/types/src/Dropdown/docs/examples/Submenu.d.ts +2 -0
  87. package/types/src/DualListbox/DualListbox.d.ts +87 -0
  88. package/types/src/DualListbox/DualListboxContext.d.ts +27 -0
  89. package/types/src/DualListbox/Label.d.ts +37 -0
  90. package/types/src/DualListbox/Listbox.d.ts +54 -0
  91. package/types/src/DualListbox/ListboxContext.d.ts +32 -0
  92. package/types/src/DualListbox/Option.d.ts +35 -0
  93. package/types/src/DualListbox/ScreenReaderWrapper.d.ts +4 -0
  94. package/types/src/DualListbox/ToolbarButton.d.ts +38 -0
  95. package/types/src/DualListbox/ToolbarContext.d.ts +21 -0
  96. package/types/src/DualListbox/docs/examples/Basic.d.ts +2 -0
  97. package/types/src/DualListbox/docs/examples/Controlled.d.ts +2 -0
  98. package/types/src/DualListbox/docs/examples/Fill.d.ts +2 -0
  99. package/types/src/DualListbox/index.d.ts +2 -0
  100. package/types/src/DualListbox/listboxUtils.d.ts +4 -0
  101. package/types/src/File/Icon.d.ts +1 -1
  102. package/types/src/File/IconCloud.d.ts +1 -1
  103. package/types/src/File/PaperClip.d.ts +1 -1
  104. package/types/src/File/Retry.d.ts +1 -1
  105. package/types/src/File/Trash.d.ts +1 -1
  106. package/types/src/File/docs/examples/Progress.d.ts +1 -15
  107. package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +2 -0
  108. package/types/src/Heading/Heading.d.ts +12 -4
  109. package/types/src/Heading/docs/examples/Variant.d.ts +2 -0
  110. package/types/src/Image/Image.d.ts +1 -1
  111. package/types/src/Image/icons/Cross.d.ts +2 -0
  112. package/types/src/Link/icons/External.d.ts +2 -0
  113. package/types/src/Menu/Divider.d.ts +1 -0
  114. package/types/src/Menu/Heading.d.ts +1 -0
  115. package/types/src/Menu/Item.d.ts +5 -2
  116. package/types/src/Menu/Menu.d.ts +3 -1
  117. package/types/src/Menu/icons/External.d.ts +2 -0
  118. package/types/src/Number/IncrementIcon.d.ts +1 -1
  119. package/types/src/RadioBar/RadioBar.d.ts +1 -1
  120. package/types/src/Search/Option.d.ts +9 -0
  121. package/types/src/Select/OptionBase.d.ts +9 -0
  122. package/types/src/Select/icons/CaretSmallDown.d.ts +2 -0
  123. package/types/src/Select/icons/Search.d.ts +2 -0
  124. package/types/src/SplitButton/SplitButton.d.ts +8 -3
  125. package/types/src/SplitButton/docs/examples/Block.d.ts +1 -0
  126. package/types/src/TabLayout/TabLayout.d.ts +0 -1
  127. package/types/src/Table/HeadInner.d.ts +2 -2
  128. package/types/src/Table/icons/ExpansionRow.d.ts +6 -0
  129. package/types/src/Table/icons/HeadExpandRows.d.ts +1 -0
  130. package/types/src/Text/IconOutlinedHide.d.ts +1 -1
  131. package/types/src/Text/IconOutlinedView.d.ts +1 -1
  132. package/types/src/Tooltip/InfoIcon.d.ts +1 -1
  133. package/types/src/Typography/Typography.d.ts +4 -7
  134. package/types/src/useRovingFocus/index.d.ts +2 -0
  135. package/types/src/useRovingFocus/useRovingFocus.d.ts +27 -0
  136. package/useForceUpdate.js +2 -2
  137. package/useKeyPress.js +2 -2
  138. package/usePrevious.js +2 -2
  139. package/useRovingFocus.d.ts +2 -0
  140. package/useRovingFocus.js +237 -0
  141. package/Dockerfile.enterprise.storybook +0 -7
  142. package/Dockerfile.prisma.storybook +0 -7
  143. package/Dockerfile.visual +0 -10
  144. package/types/src/File/docs/examples/CustomChildren.d.ts +0 -12
  145. package/types/src/File/docs/examples/prisma/Progress.d.ts +0 -1
  146. package/types/src/Select/matchUtils.d.ts +0 -12
  147. package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +0 -1
  148. package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +0 -1
  149. package/types/src/Table/HeadExpandRowsIcon.d.ts +0 -1
  150. package/types/src/icons/Alert.d.ts +0 -2
  151. package/types/src/icons/AlertFilled.d.ts +0 -2
  152. package/types/src/icons/CaretDown.d.ts +0 -2
  153. package/types/src/icons/CaretRight.d.ts +0 -2
  154. package/types/src/icons/Check.d.ts +0 -2
  155. package/types/src/icons/ChevronDown.d.ts +0 -2
  156. package/types/src/icons/ChevronLeft.d.ts +0 -2
  157. package/types/src/icons/ChevronRight.d.ts +0 -2
  158. package/types/src/icons/CrossMark.d.ts +0 -2
  159. package/types/src/icons/External.d.ts +0 -2
  160. package/types/src/icons/InfoFilled.d.ts +0 -2
  161. package/types/src/icons/More.d.ts +0 -2
  162. package/types/src/icons/MoreVertical.d.ts +0 -2
  163. package/types/src/icons/Plus.d.ts +0 -2
  164. package/types/src/icons/SVG.d.ts +0 -4
  165. package/types/src/icons/Search.d.ts +0 -2
  166. package/types/src/icons/Sort.d.ts +0 -2
  167. package/types/src/icons/SortedDown.d.ts +0 -2
  168. package/types/src/icons/SortedUp.d.ts +0 -2
  169. package/types/src/icons/Success.d.ts +0 -2
  170. package/types/src/icons/SuccessFilled.d.ts +0 -2
  171. package/types/src/icons/ThemedIcon.d.ts +0 -29
  172. package/types/src/icons/WarningFilled.d.ts +0 -2
  173. package/types/src/icons/types.d.ts +0 -11
@@ -0,0 +1,6 @@
1
+ interface ExpansionRowIconProps {
2
+ className?: string;
3
+ expanded?: boolean;
4
+ }
5
+ declare const StyledExpansionRowIcon: import("styled-components").StyledComponent<({ className, expanded }: ExpansionRowIconProps) => JSX.Element, any, {}, never>;
6
+ export default StyledExpansionRowIcon;
@@ -0,0 +1 @@
1
+ export default function HeadExpandRows(): JSX.Element;
@@ -1,3 +1,3 @@
1
- import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVG';
1
+ import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVGEnterprise';
2
2
  declare function IconOutlinedHide(props: SVGPropsOptionalViewBox): JSX.Element;
3
3
  export default IconOutlinedHide;
@@ -1,3 +1,3 @@
1
- import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVG';
1
+ import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVGEnterprise';
2
2
  declare function IconOutlinedView(props: SVGPropsOptionalViewBox): JSX.Element;
3
3
  export default IconOutlinedView;
@@ -1,3 +1,3 @@
1
- import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVG';
1
+ import { SVGPropsOptionalViewBox } from '@splunk/react-icons/SVGEnterprise';
2
2
  declare function InfoCircle(props: SVGPropsOptionalViewBox): JSX.Element;
3
3
  export default InfoCircle;
@@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
3
3
  import { TypographyVariant, TypographyParams } from '@splunk/themes/mixins';
4
4
  import { ComponentProps } from '../utils/types';
5
5
  declare type TypographyElementTypes = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'blockquote' | 'dd' | 'dl' | 'dt' | 'figcaption' | 'figure' | 'li' | 'ol' | 'ul' | 'pre' | 'abbr' | 'cite' | 'code' | 'data' | 'dfn' | 'em' | 'u' | 'time' | 'sup' | 'sub' | 'strong' | 'small' | 'samp' | 's' | 'var' | 'ruby' | 'rt' | 'rp';
6
- interface TypographyPropsBase extends TypographyParams {
6
+ declare type DeprecatedTypographyWeightValues = 300 | 400 | 500 | 600 | 700 | 800 | 900;
7
+ interface TypographyPropsBase extends Omit<TypographyParams, 'weight'> {
7
8
  /**
8
9
  * Text and inline icons
9
10
  * */
@@ -46,20 +47,17 @@ interface TypographyPropsBase extends TypographyParams {
46
47
  * Number or equivalent string can be used.
47
48
  * See: [font-weight | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
48
49
  */
49
- weight?: 300 | 400 | 500 | 600 | 700 | 800 | 900 | 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
50
+ weight?: DeprecatedTypographyWeightValues | 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
50
51
  /**
51
52
  * Apply a reset to the element's margin and padding. This defaults to true if using a `variant`.
52
53
  */
53
54
  withReset?: boolean;
54
55
  }
55
56
  declare type TypographyProps = ComponentProps<TypographyPropsBase, TypographyElementTypes>;
56
- declare type AllTypographyParams = {
57
- [P in keyof TypographyParams]-?: boolean;
58
- };
59
57
  /**
60
58
  * Typography renders text content with styling based on the Splunk Design System.
61
59
  */
62
- export declare function Typography({ children, as, elementRef, ...otherProps }: TypographyProps): JSX.Element;
60
+ export declare function Typography({ children, as, elementRef, variant, family, size, lineHeight, color, weight, withReset, ...otherProps }: TypographyProps): JSX.Element;
63
61
  export declare namespace Typography {
64
62
  var propTypes: {
65
63
  children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
@@ -75,4 +73,3 @@ export declare namespace Typography {
75
73
  };
76
74
  }
77
75
  export default Typography;
78
- export { AllTypographyParams };
@@ -0,0 +1,2 @@
1
+ export { default } from './useRovingFocus';
2
+ export * from './useRovingFocus';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This is a private hook not intended for use outside @splunk/react-ui
3
+ *
4
+ * Handles "roving focus" for a group of elements inside a containing element.
5
+ * Elements inside the element that "rovingFocusProps" are set on will act a single tab stop
6
+ * with arrow keys moving focus between them.
7
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets#managing_focus_inside_groups
8
+ *
9
+ * ```
10
+ * import React from 'react';
11
+ * import useRovingFocus from '@splunk/react-ui/useRovingFocus';
12
+ *
13
+ * const rovingFocusProps = useRovingFocus();
14
+ *
15
+ * <div {...rovingFocusProps}>
16
+ * <button type="button">first</button>
17
+ * <button type="button">second</button>
18
+ * </div>
19
+ * ```
20
+ */
21
+ declare function useRovingFocus(): {
22
+ ref: (element: HTMLDivElement | null) => void;
23
+ onBlur: (e: React.FocusEvent) => void;
24
+ onFocus: (e: React.FocusEvent) => void;
25
+ onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
26
+ };
27
+ export default useRovingFocus;
package/useForceUpdate.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 = 236);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 241);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("react");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 236:
97
+ /***/ 241:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
package/useKeyPress.js CHANGED
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 163);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 167);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 163:
90
+ /***/ 167:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
package/usePrevious.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 = 237);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 242);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("react");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 237:
97
+ /***/ 242:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
@@ -0,0 +1,2 @@
1
+ export { default } from './types/src/useRovingFocus';
2
+ export * from './types/src/useRovingFocus';
@@ -0,0 +1,237 @@
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 = 243);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 2:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("react");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 243:
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ // ESM COMPAT FLAG
102
+ __webpack_require__.r(__webpack_exports__);
103
+
104
+ // EXPORTS
105
+ __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ useRovingFocus_useRovingFocus; });
106
+
107
+ // EXTERNAL MODULE: external "react"
108
+ var external_react_ = __webpack_require__(2);
109
+
110
+ // EXTERNAL MODULE: external "@splunk/ui-utils/focus"
111
+ var focus_ = __webpack_require__(29);
112
+
113
+ // EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
114
+ var keyboard_ = __webpack_require__(7);
115
+
116
+ // CONCATENATED MODULE: ./src/useRovingFocus/useRovingFocus.tsx
117
+
118
+
119
+
120
+
121
+ function focusElement(element) {
122
+ if (element instanceof HTMLElement && element.focus) {
123
+ element.focus();
124
+ }
125
+ }
126
+ /**
127
+ * This is a private hook not intended for use outside @splunk/react-ui
128
+ *
129
+ * Handles "roving focus" for a group of elements inside a containing element.
130
+ * Elements inside the element that "rovingFocusProps" are set on will act a single tab stop
131
+ * with arrow keys moving focus between them.
132
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets#managing_focus_inside_groups
133
+ *
134
+ * ```
135
+ * import React from 'react';
136
+ * import useRovingFocus from '@splunk/react-ui/useRovingFocus';
137
+ *
138
+ * const rovingFocusProps = useRovingFocus();
139
+ *
140
+ * <div {...rovingFocusProps}>
141
+ * <button type="button">first</button>
142
+ * <button type="button">second</button>
143
+ * </div>
144
+ * ```
145
+ */
146
+
147
+
148
+ function useRovingFocus() {
149
+ var activeItemIndex = Object(external_react_["useRef"])(0);
150
+ var actionItemsRef = Object(external_react_["useRef"])([]);
151
+
152
+ var updateActiveItem = function updateActiveItem(newActiveindex) {
153
+ activeItemIndex.current = newActiveindex;
154
+ actionItemsRef.current.forEach(function (el, index) {
155
+ return index === activeItemIndex.current ? el.removeAttribute('tabindex') : el.setAttribute('tabindex', '-1');
156
+ });
157
+ };
158
+
159
+ var handleItemsMount = function handleItemsMount(element) {
160
+ actionItemsRef.current = element != null ? Object(focus_["getSortedTabbableElements"])(element, {
161
+ ignoreTabIndex: true
162
+ }) : [];
163
+ updateActiveItem(activeItemIndex.current);
164
+ };
165
+
166
+ var handleBlur = function handleBlur(e) {
167
+ var focusOnActionItem = e.relatedTarget instanceof Element && actionItemsRef.current.includes(e.relatedTarget);
168
+
169
+ if (!focusOnActionItem) {
170
+ updateActiveItem(0);
171
+ }
172
+ };
173
+
174
+ var handleFocus = function handleFocus(e) {
175
+ var focusIndex = e.target instanceof Element ? actionItemsRef.current.indexOf(e.target) : -1;
176
+
177
+ if (focusIndex >= 0) {
178
+ updateActiveItem(focusIndex);
179
+ }
180
+ };
181
+
182
+ var handleKeyDown = function handleKeyDown(e) {
183
+ if (e.nativeEvent.target instanceof HTMLElement) {
184
+ var index = actionItemsRef.current.indexOf(e.nativeEvent.target);
185
+
186
+ if (index >= 0) {
187
+ var key = Object(keyboard_["keycode"])(e.nativeEvent);
188
+ var newIndex = -1;
189
+
190
+ if (key === 'left') {
191
+ newIndex = index - 1;
192
+ } else if (key === 'right') {
193
+ newIndex = index + 1;
194
+ } else if (key === 'home') {
195
+ newIndex = 0;
196
+ } else if (key === 'end') {
197
+ newIndex = actionItemsRef.current.length - 1;
198
+ }
199
+
200
+ if (newIndex >= 0) {
201
+ e.preventDefault();
202
+ focusElement(actionItemsRef.current[newIndex]);
203
+ }
204
+ }
205
+ }
206
+ };
207
+
208
+ return {
209
+ ref: handleItemsMount,
210
+ onBlur: handleBlur,
211
+ onFocus: handleFocus,
212
+ onKeyDown: handleKeyDown
213
+ };
214
+ }
215
+
216
+ /* harmony default export */ var useRovingFocus_useRovingFocus = (useRovingFocus);
217
+ // CONCATENATED MODULE: ./src/useRovingFocus/index.ts
218
+
219
+
220
+
221
+ /***/ }),
222
+
223
+ /***/ 29:
224
+ /***/ (function(module, exports) {
225
+
226
+ module.exports = require("@splunk/ui-utils/focus");
227
+
228
+ /***/ }),
229
+
230
+ /***/ 7:
231
+ /***/ (function(module, exports) {
232
+
233
+ module.exports = require("@splunk/ui-utils/keyboard");
234
+
235
+ /***/ })
236
+
237
+ /******/ });
@@ -1,7 +0,0 @@
1
- FROM node:14.20 as builder
2
-
3
- WORKDIR /react-ui
4
-
5
- COPY storybook-static-visual-enterprise storybook-static-visual-enterprise
6
-
7
- EXPOSE 6008
@@ -1,7 +0,0 @@
1
- FROM node:14.20 as builder
2
-
3
- WORKDIR /react-ui
4
-
5
- COPY storybook-static-visual storybook-static-visual
6
-
7
- EXPOSE 6007
package/Dockerfile.visual DELETED
@@ -1,10 +0,0 @@
1
- FROM mcr.microsoft.com/playwright:v1.26.0-focal
2
-
3
- WORKDIR /react-ui
4
-
5
- COPY .storybook-visual/config/visual.package.json ./package.json
6
-
7
- RUN yarn install
8
-
9
- COPY . .
10
-
@@ -1,12 +0,0 @@
1
- import { Component } from 'react';
2
- import { FileRequestAddHandler } from '@splunk/react-ui/File';
3
- declare class CustomChildren extends Component<{}, {
4
- filename?: string;
5
- }> {
6
- private fileReader;
7
- constructor(props: {});
8
- handleAddFiles: FileRequestAddHandler;
9
- handleRemoveFile: () => void;
10
- render(): JSX.Element;
11
- }
12
- export default CustomChildren;
@@ -1 +0,0 @@
1
- export default function Progress(): JSX.Element;
@@ -1,12 +0,0 @@
1
- export interface MatchCharacter {
2
- index: number;
3
- value: string;
4
- }
5
- export interface MatchOption {
6
- itemKey: string;
7
- label: string;
8
- value: string | number | boolean;
9
- }
10
- declare const charFromMatchOption: (option: MatchOption | null, charIndex: number) => string;
11
- declare const fuzzyMatch: (options: MatchOption[], matchChar: MatchCharacter) => MatchOption[];
12
- export { charFromMatchOption, fuzzyMatch };
@@ -1 +0,0 @@
1
- export default function Basic(): JSX.Element;
@@ -1 +0,0 @@
1
- export default function Disabled(): JSX.Element;
@@ -1 +0,0 @@
1
- export default function HeadExpandRowsIcon(): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function AlertFilled(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function AlertFilled(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function CaretDown(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function CaretRight(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function Check(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function ChevronDown(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function ChevronLeft(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function ChevronRight(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function CrossMark(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function External(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function InfoFilled(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function More(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function MoreVertical(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function Plus(props: IconProps): JSX.Element;
@@ -1,4 +0,0 @@
1
- import { ComponentProps } from '../utils/types';
2
- declare type SVGProps = ComponentProps<{}, 'svg'>;
3
- export default function SVG(props: SVGProps): JSX.Element;
4
- export {};
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function Search(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function CaretDown(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function SortedDown(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function SortedUp(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function SuccessFilled(props: IconProps): JSX.Element;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function SuccessFilled(props: IconProps): JSX.Element;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { IconProps } from './types';
4
- interface ThemedIconProps extends IconProps {
5
- Enterprise: React.FunctionComponent<any>;
6
- Prisma24: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
7
- Prisma20?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
8
- Prisma16?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
- }
10
- declare function Icon({ Enterprise, Prisma24, Prisma20, Prisma16, prismaSize, inline, enterpriseSize, enterpriseWidth, enterpriseHeight, screenReaderText, ...otherProps }: ThemedIconProps): JSX.Element;
11
- declare namespace Icon {
12
- var propTypes: {
13
- Enterprise: PropTypes.Requireable<(...args: any[]) => any>;
14
- enterpriseSize: PropTypes.Requireable<React.ReactText>;
15
- enterpriseWidth: PropTypes.Requireable<React.ReactText>;
16
- enterpriseHeight: PropTypes.Requireable<React.ReactText>;
17
- Prisma24: PropTypes.Validator<(...args: any[]) => any>;
18
- Prisma20: PropTypes.Requireable<(...args: any[]) => any>;
19
- Prisma16: PropTypes.Requireable<(...args: any[]) => any>;
20
- prismaSize: PropTypes.Requireable<string>;
21
- inline: PropTypes.Requireable<boolean>;
22
- screenReaderText: PropTypes.Requireable<string>;
23
- };
24
- var defaultProps: {
25
- inline: boolean;
26
- prismaSize: string;
27
- };
28
- }
29
- export default Icon;
@@ -1,2 +0,0 @@
1
- import { IconProps } from './types';
2
- export default function WarningFilled(props: IconProps): JSX.Element;
@@ -1,11 +0,0 @@
1
- import { ComponentProps } from '../utils/types';
2
- interface IconPropsBase {
3
- enterpriseSize?: number | string;
4
- enterpriseWidth?: number | string;
5
- enterpriseHeight?: number | string;
6
- prismaSize?: 'medium' | 'small';
7
- inline?: boolean;
8
- screenReaderText?: string;
9
- }
10
- export declare type IconProps = ComponentProps<IconPropsBase, 'svg'>;
11
- export {};