@splunk/react-ui 4.11.0 → 4.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/Accordion.js +2 -2
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/Box.js +2 -2
  5. package/Button.js +23 -23
  6. package/ButtonGroup.js +2 -2
  7. package/CHANGELOG.md +35 -0
  8. package/Calendar.js +20 -20
  9. package/Card.js +17 -17
  10. package/CardLayout.js +2 -2
  11. package/Chip.js +17 -17
  12. package/Clickable.js +7 -7
  13. package/CloseButton.js +15 -15
  14. package/Code.js +4 -4
  15. package/CollapsiblePanel.js +4 -4
  16. package/Color.js +17 -17
  17. package/ColumnLayout.js +7 -7
  18. package/ComboBox.js +12 -11
  19. package/Concertina.js +11 -11
  20. package/ControlGroup.js +4 -4
  21. package/Date.js +8 -8
  22. package/DefinitionList.js +2 -2
  23. package/Dropdown.js +4 -4
  24. package/EventListener.js +4 -4
  25. package/File.js +25 -25
  26. package/FormRows.js +10 -10
  27. package/Heading.js +3 -3
  28. package/Image.js +19 -19
  29. package/Layer.js +8 -8
  30. package/Link.js +9 -9
  31. package/List.js +2 -2
  32. package/Markdown.js +22 -22
  33. package/Menu.js +34 -34
  34. package/Message.js +35 -35
  35. package/MessageBar.js +32 -32
  36. package/Modal.js +8 -8
  37. package/ModalLayer.js +6 -6
  38. package/Monogram.js +2 -2
  39. package/Multiselect.js +96 -92
  40. package/Number.js +4 -4
  41. package/Paginator.js +20 -20
  42. package/Paragraph.js +2 -2
  43. package/Popover.js +8 -8
  44. package/Progress.js +8 -8
  45. package/RadioBar.js +4 -4
  46. package/RadioList.js +2 -2
  47. package/Resize.js +2 -2
  48. package/ResultsMenu.js +60 -39
  49. package/ScreenReaderContent.js +2 -2
  50. package/Scroll.js +6 -6
  51. package/ScrollContainerContext.js +2 -2
  52. package/Search.js +17 -16
  53. package/Select.js +89 -87
  54. package/SidePanel.js +4 -4
  55. package/Slider.js +8 -8
  56. package/SlidingPanels.js +4 -4
  57. package/StaticContent.js +2 -2
  58. package/StepBar.js +8 -8
  59. package/Switch.js +6 -6
  60. package/TabBar.js +6 -6
  61. package/TabLayout.js +4 -4
  62. package/Table.js +115 -83
  63. package/Text.js +132 -263
  64. package/TextArea.js +1447 -0
  65. package/Tooltip.js +4 -4
  66. package/TransitionOpen.js +10 -9
  67. package/Typography.js +225 -0
  68. package/WaitSpinner.js +4 -4
  69. package/cypress.json +1 -0
  70. package/package.json +14 -3
  71. package/test-runner-jest.config.js +38 -0
  72. package/types/src/ComboBox/ComboBox.d.ts +13 -4
  73. package/types/src/Multiselect/Compact.d.ts +11 -4
  74. package/types/src/Multiselect/Multiselect.d.ts +14 -5
  75. package/types/src/Multiselect/Normal.d.ts +11 -4
  76. package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
  77. package/types/src/Search/Search.d.ts +4 -0
  78. package/types/src/Select/Select.d.ts +13 -4
  79. package/types/src/Select/SelectBase.d.ts +12 -4
  80. package/types/src/SidePanel/SidePanel.d.ts +2 -1
  81. package/types/src/Table/HeadCell.d.ts +7 -3
  82. package/types/src/Table/Table.d.ts +2 -3
  83. package/types/src/Table/TableContext.d.ts +5 -0
  84. package/types/src/Text/Text.d.ts +21 -12
  85. package/types/src/TextArea/TextArea.d.ts +190 -0
  86. package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
  87. package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
  88. package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
  89. package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
  90. package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
  91. package/types/src/TextArea/index.d.ts +2 -0
  92. package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
  93. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
  94. package/types/src/TransitionOpen/index.d.ts +1 -0
  95. package/types/src/Typography/Typography.d.ts +78 -0
  96. package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
  97. package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
  98. package/types/src/Typography/index.d.ts +2 -0
  99. package/types/src/Typography/test/Typography.unit.d.ts +1 -0
  100. package/usePrevious.js +2 -2
  101. package/types/src/Text/docs/examples/prisma/Multiline.d.ts +0 -10
  102. package/types/src/Text/docs/examples/prisma/Search.d.ts +0 -10
@@ -0,0 +1,2 @@
1
+ declare const Basic: () => JSX.Element;
2
+ export default Basic;
@@ -0,0 +1,2 @@
1
+ declare const Disabled: () => JSX.Element;
2
+ export default Disabled;
@@ -0,0 +1,2 @@
1
+ declare const Error: () => JSX.Element;
2
+ export default Error;
@@ -0,0 +1,2 @@
1
+ declare const Inline: () => JSX.Element;
2
+ export default Inline;
@@ -0,0 +1,2 @@
1
+ declare function Uncontrolled(): JSX.Element;
2
+ export default Uncontrolled;
@@ -0,0 +1,2 @@
1
+ export { default } from './TextArea';
2
+ export * from './TextArea';
@@ -1,6 +1,5 @@
1
- export default function syncHeightWithShadow({ height, multiline, rowsMax, rowsMin, shadow, }: {
1
+ export default function syncHeightWithShadow({ height, rowsMax, rowsMin, shadow, }: {
2
2
  height?: number;
3
- multiline: boolean;
4
3
  rowsMax: number;
5
4
  rowsMin: number;
6
5
  shadow: HTMLInputElement | HTMLTextAreaElement | null;
@@ -53,3 +53,4 @@ declare class TransitionOpen extends Component<TransitionOpenProps, TransitionOp
53
53
  render(): JSX.Element;
54
54
  }
55
55
  export default TransitionOpen;
56
+ export { TransitionOpenPropsBase };
@@ -1 +1,2 @@
1
1
  export { default } from './TransitionOpen';
2
+ export * from './TransitionOpen';
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { TypographyVariant, TypographyParams } from '@splunk/themes/mixins';
4
+ import { ComponentProps } from '../utils/types';
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 {
7
+ /**
8
+ * Text and inline icons
9
+ * */
10
+ children: React.ReactNode;
11
+ /**
12
+ * A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
13
+ */
14
+ elementRef?: React.Ref<HTMLElement>;
15
+ /**
16
+ * Tag for the element to render children content into.
17
+ * Use the most semantically appropriate tag.
18
+ * Layout elements like `div` are not allowed; use the `typography` mixin from `@splunk/themes` instead.
19
+ */
20
+ as: TypographyElementTypes;
21
+ /**
22
+ * A variant from the Splunk Design System's Type: 'body', 'title1', 'title2', 'title3',
23
+ * 'title4', 'title5', 'title6', 'title7', 'largeBody', 'smallBody',
24
+ * 'footnote', 'monoBody', or 'monoSmallBody'.
25
+ */
26
+ variant?: TypographyVariant;
27
+ /**
28
+ * Set the font-family to sans-serif or monospace based on current theme.
29
+ */
30
+ family?: 'sansSerif' | 'monospace';
31
+ /**
32
+ * Set the size to a system-standard size.
33
+ */
34
+ size?: 56 | 36 | 32 | 24 | 20 | 18 | 16 | 14 | 12 | 10;
35
+ /**
36
+ * Set the line-height to a system-standard size.
37
+ */
38
+ lineHeight?: 64 | 40 | 32 | 28 | 24 | 22 | 20 | 16 | 13;
39
+ /**
40
+ * Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
41
+ */
42
+ color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted';
43
+ /**
44
+ * Set the font-weight to a system-standard value.
45
+ *
46
+ * Number or equivalent string can be used.
47
+ * See: [font-weight | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
48
+ */
49
+ weight?: 300 | 400 | 500 | 600 | 700 | 800 | 900 | 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
50
+ /**
51
+ * Apply a reset to the element's margin and padding. This defaults to true if using a `variant`.
52
+ */
53
+ withReset?: boolean;
54
+ }
55
+ declare type TypographyProps = ComponentProps<TypographyPropsBase, TypographyElementTypes>;
56
+ declare type AllTypographyParams = {
57
+ [P in keyof TypographyParams]-?: boolean;
58
+ };
59
+ /**
60
+ * Typography renders text content with styling based on the Splunk Design System.
61
+ */
62
+ export declare function Typography({ children, as, elementRef, ...otherProps }: TypographyProps): JSX.Element;
63
+ export declare namespace Typography {
64
+ var propTypes: {
65
+ children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
66
+ as: PropTypes.Validator<string>;
67
+ elementRef: PropTypes.Requireable<object>;
68
+ family: PropTypes.Requireable<string>;
69
+ variant: PropTypes.Requireable<"body" | "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "title7" | "largeBody" | "smallBody" | "footnote" | "monoBody" | "monoSmallBody">;
70
+ size: PropTypes.Requireable<number>;
71
+ lineHeight: PropTypes.Requireable<number>;
72
+ color: PropTypes.Requireable<string>;
73
+ weight: PropTypes.Requireable<React.ReactText>;
74
+ withReset: PropTypes.Requireable<boolean>;
75
+ };
76
+ }
77
+ export default Typography;
78
+ export { AllTypographyParams };
@@ -0,0 +1,2 @@
1
+ declare function Basic(): JSX.Element;
2
+ export default Basic;
@@ -0,0 +1,2 @@
1
+ declare function Variants(): JSX.Element;
2
+ export default Variants;
@@ -0,0 +1,2 @@
1
+ export { default } from './Typography';
2
+ export * from './Typography';
@@ -0,0 +1 @@
1
+ export {};
package/usePrevious.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 = 177);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 180);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 177:
90
+ /***/ 180:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -1,10 +0,0 @@
1
- import { Component } from 'react';
2
- import { TextChangeHandler } from '@splunk/react-ui/Text';
3
- declare class Example extends Component<{}, {
4
- value: string;
5
- }> {
6
- constructor(props: {});
7
- handleChange: TextChangeHandler;
8
- render(): JSX.Element;
9
- }
10
- export default Example;
@@ -1,10 +0,0 @@
1
- import { Component } from 'react';
2
- import { TextChangeHandler } from '@splunk/react-ui/Text';
3
- declare class Example extends Component<{}, {
4
- value: string;
5
- }> {
6
- constructor(props: {});
7
- handleChange: TextChangeHandler;
8
- render(): JSX.Element;
9
- }
10
- export default Example;