@splunk/react-ui 4.15.0 → 4.16.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 (69) hide show
  1. package/Animation.js +2 -2
  2. package/Button.js +32 -30
  3. package/ButtonSimple.js +54 -50
  4. package/CHANGELOG.md +27 -2
  5. package/Calendar.js +12 -12
  6. package/Card.js +10 -10
  7. package/Chip.js +10 -10
  8. package/CloseButton.js +8 -8
  9. package/CollapsiblePanel.js +8 -8
  10. package/Color.js +14 -14
  11. package/ColumnLayout.js +2 -2
  12. package/ComboBox.js +4 -4
  13. package/ControlGroup.js +26 -16
  14. package/Date.js +10 -5
  15. package/Dropdown.js +56 -15
  16. package/File.js +33 -24
  17. package/FormRows.js +6 -6
  18. package/Heading.js +10 -46
  19. package/Image.js +13 -13
  20. package/Link.js +2 -2
  21. package/MIGRATION.md +21 -0
  22. package/Menu.js +20 -20
  23. package/Message.js +24 -24
  24. package/MessageBar.js +24 -24
  25. package/Modal.js +7 -7
  26. package/Multiselect.js +197 -177
  27. package/Number.js +5 -5
  28. package/Paginator.js +19 -19
  29. package/Popover.js +7 -7
  30. package/Progress.js +2 -2
  31. package/Scroll.js +5 -5
  32. package/Search.js +4 -4
  33. package/Select.js +187 -167
  34. package/SplitButton.js +2 -2
  35. package/StepBar.js +10 -10
  36. package/Switch.js +4 -4
  37. package/TabBar.js +2 -2
  38. package/TabLayout.js +3 -0
  39. package/Table.js +95 -46
  40. package/Text.js +19 -19
  41. package/TextArea.js +15 -15
  42. package/Tooltip.js +5 -5
  43. package/Typography.js +1 -1
  44. package/WaitSpinner.js +2 -2
  45. package/package.json +6 -7
  46. package/types/src/Button/Button.d.ts +5 -2
  47. package/types/src/Button/docs/examples/Basic.d.ts +2 -2
  48. package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -11
  49. package/types/src/Date/Icon.d.ts +1 -1
  50. package/types/src/Dropdown/Dropdown.d.ts +12 -7
  51. package/types/src/File/Icon.d.ts +1 -1
  52. package/types/src/File/IconCloud.d.ts +1 -1
  53. package/types/src/File/PaperClip.d.ts +1 -1
  54. package/types/src/File/Retry.d.ts +1 -1
  55. package/types/src/File/Trash.d.ts +1 -1
  56. package/types/src/Multiselect/Compact.d.ts +4 -0
  57. package/types/src/Multiselect/Multiselect.d.ts +4 -1
  58. package/types/src/Number/IncrementIcon.d.ts +1 -1
  59. package/types/src/Select/Select.d.ts +4 -2
  60. package/types/src/Select/SelectBase.d.ts +13 -1
  61. package/types/src/TabLayout/Panel.d.ts +3 -0
  62. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  63. package/types/src/Table/Body.d.ts +2 -0
  64. package/types/src/Table/Row.d.ts +11 -3
  65. package/types/src/Table/Table.d.ts +5 -3
  66. package/types/src/Text/IconOutlinedHide.d.ts +1 -1
  67. package/types/src/Text/IconOutlinedView.d.ts +1 -1
  68. package/types/src/Tooltip/InfoIcon.d.ts +1 -1
  69. package/types/src/Typography/Typography.d.ts +1 -1
@@ -75,6 +75,14 @@ interface RowPropsBase {
75
75
  * An event handler for toggle of the row. resize of columns. The function is passed the event and the `data` prop for this row.
76
76
  */
77
77
  onRequestToggle?: RowRequestToggleHandler;
78
+ /**
79
+ * @private. Generally passed by Table rather than added directly. Indicates the column to use as the primary label for each row.
80
+ */
81
+ primaryColumnIndex?: number;
82
+ /**
83
+ * Indicates the row's label when selected or unselected.
84
+ */
85
+ rowScreenReaderText?: string;
78
86
  /**
79
87
  * When an `onRequestToggle` handler is defined, this prop determines the appearance
80
88
  * of the toggle.
@@ -85,12 +93,12 @@ interface RowPropsBase {
85
93
  /** @private. */
86
94
  stripe?: 'odd' | 'even' | 'none';
87
95
  }
88
- declare const defaultProps: Required<Pick<RowPropsBase, 'stripe'>>;
96
+ declare const defaultProps: Required<Pick<RowPropsBase, 'stripe' | 'primaryColumnIndex'>>;
89
97
  declare type RowProps = ClassComponentProps<RowPropsBase, typeof defaultProps, 'tr'>;
90
98
  declare class Row extends Component<RowProps, {}> {
91
99
  static splunkUiType: string;
92
- static propTypes: React.WeakValidationMap<ClassComponentProps<RowPropsBase, Required<Pick<RowPropsBase, "stripe">>, "tr", never>>;
93
- static defaultProps: Required<Pick<RowPropsBase, "stripe">>;
100
+ static propTypes: React.WeakValidationMap<ClassComponentProps<RowPropsBase, Required<Pick<RowPropsBase, "stripe" | "primaryColumnIndex">>, "tr", never>>;
101
+ static defaultProps: Required<Pick<RowPropsBase, "stripe" | "primaryColumnIndex">>;
94
102
  private elementRef;
95
103
  private handleClick;
96
104
  private handleKeyDown;
@@ -93,6 +93,8 @@ interface TablePropsBase {
93
93
  * * `none`: The default with no row expansion.
94
94
  */
95
95
  rowExpansion?: 'single' | 'multi' | 'controlled' | 'none';
96
+ /** Indicates the column to use as the primary label for each row. */
97
+ primaryColumnIndex?: number;
96
98
  /**
97
99
  * When an `onRequestToggleAllRows` handler is defined, this prop determines the appearance
98
100
  * of the toggle all rows button.
@@ -128,7 +130,7 @@ interface TablePropsBase {
128
130
  */
129
131
  resizableFillLayout?: boolean;
130
132
  }
131
- declare const defaultProps: Required<Pick<TablePropsBase, 'actions' | 'dockOffset' | 'headType' | 'rowExpansion' | 'rowSelection' | 'resizableFillLayout'>>;
133
+ declare const defaultProps: Required<Pick<TablePropsBase, 'actions' | 'dockOffset' | 'headType' | 'rowExpansion' | 'rowSelection' | 'resizableFillLayout' | 'primaryColumnIndex'>>;
132
134
  declare type TableProps = ClassComponentProps<TablePropsBase, typeof defaultProps, 'div'>;
133
135
  interface TableState {
134
136
  cellWidths?: number[];
@@ -148,9 +150,9 @@ declare class Table extends Component<TableProps, TableState> {
148
150
  private scrollSource?;
149
151
  private table;
150
152
  private tableContainer;
151
- static propTypes: React.WeakValidationMap<ClassComponentProps<TablePropsBase, Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "dockOffset" | "rowExpansion">>, "div", never>>;
153
+ static propTypes: React.WeakValidationMap<ClassComponentProps<TablePropsBase, Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "primaryColumnIndex" | "dockOffset" | "rowExpansion">>, "div", never>>;
152
154
  static contextType: React.Context<Window | Document | HTMLElement | null | undefined>;
153
- static defaultProps: Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "dockOffset" | "rowExpansion">>;
155
+ static defaultProps: Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "primaryColumnIndex" | "dockOffset" | "rowExpansion">>;
154
156
  static Caption: typeof Caption;
155
157
  static Head: typeof Head;
156
158
  static HeadCell: typeof HeadCell;
@@ -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;
@@ -39,7 +39,7 @@ interface TypographyPropsBase extends TypographyParams {
39
39
  /**
40
40
  * Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
41
41
  */
42
- color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted';
42
+ color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted' | 'inherit';
43
43
  /**
44
44
  * Set the font-weight to a system-standard value.
45
45
  *