@splunk/react-ui 4.11.0 → 4.12.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 +2 -2
- package/Anchor.js +2 -2
- package/Animation.js +4 -4
- package/Box.js +2 -2
- package/Button.js +23 -23
- package/ButtonGroup.js +2 -2
- package/CHANGELOG.md +28 -0
- package/Calendar.js +20 -20
- package/Card.js +17 -17
- package/CardLayout.js +2 -2
- package/Chip.js +17 -17
- package/Clickable.js +7 -7
- package/CloseButton.js +15 -15
- package/Code.js +4 -4
- package/CollapsiblePanel.js +4 -4
- package/Color.js +17 -17
- package/ColumnLayout.js +7 -7
- package/ComboBox.js +12 -11
- package/Concertina.js +11 -11
- package/ControlGroup.js +4 -4
- package/Date.js +8 -8
- package/DefinitionList.js +2 -2
- package/Dropdown.js +4 -4
- package/EventListener.js +4 -4
- package/File.js +25 -25
- package/FormRows.js +10 -10
- package/Heading.js +2 -2
- package/Image.js +19 -19
- package/Layer.js +8 -8
- package/Link.js +9 -9
- package/List.js +2 -2
- package/Markdown.js +17 -17
- package/Menu.js +33 -33
- package/Message.js +31 -31
- package/MessageBar.js +32 -32
- package/Modal.js +8 -8
- package/ModalLayer.js +4 -4
- package/Monogram.js +2 -2
- package/Multiselect.js +93 -89
- package/Number.js +4 -4
- package/Paginator.js +20 -20
- package/Paragraph.js +2 -2
- package/Popover.js +6 -6
- package/Progress.js +8 -8
- package/RadioBar.js +4 -4
- package/RadioList.js +2 -2
- package/Resize.js +2 -2
- package/ResultsMenu.js +60 -39
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +4 -4
- package/ScrollContainerContext.js +2 -2
- package/Search.js +17 -16
- package/Select.js +86 -84
- package/SidePanel.js +4 -4
- package/Slider.js +8 -8
- package/SlidingPanels.js +2 -2
- package/StaticContent.js +2 -2
- package/StepBar.js +8 -8
- package/Switch.js +6 -6
- package/TabBar.js +6 -6
- package/TabLayout.js +4 -4
- package/Table.js +114 -82
- package/Text.js +109 -236
- package/TextArea.js +1444 -0
- package/Tooltip.js +4 -4
- package/TransitionOpen.js +8 -7
- package/Typography.js +225 -0
- package/WaitSpinner.js +4 -4
- package/cypress.json +1 -0
- package/package.json +12 -2
- package/test-runner-jest.config.js +38 -0
- package/types/src/ComboBox/ComboBox.d.ts +13 -4
- package/types/src/Multiselect/Compact.d.ts +11 -4
- package/types/src/Multiselect/Multiselect.d.ts +14 -5
- package/types/src/Multiselect/Normal.d.ts +11 -4
- package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
- package/types/src/Search/Search.d.ts +4 -0
- package/types/src/Select/Select.d.ts +13 -4
- package/types/src/Select/SelectBase.d.ts +12 -4
- package/types/src/SidePanel/SidePanel.d.ts +2 -1
- package/types/src/Table/HeadCell.d.ts +7 -3
- package/types/src/Table/Table.d.ts +2 -3
- package/types/src/Table/TableContext.d.ts +5 -0
- package/types/src/Text/Text.d.ts +21 -12
- package/types/src/TextArea/TextArea.d.ts +190 -0
- package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
- package/types/src/TextArea/index.d.ts +2 -0
- package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
- package/types/src/TransitionOpen/index.d.ts +1 -0
- package/types/src/Typography/Typography.d.ts +78 -0
- package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
- package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
- package/types/src/Typography/index.d.ts +2 -0
- package/types/src/Typography/test/Typography.unit.d.ts +1 -0
- package/usePrevious.js +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export default function syncHeightWithShadow({ height,
|
|
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;
|
|
@@ -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 @@
|
|
|
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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 180);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
90
|
+
/***/ 180:
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|