@splunk/react-ui 4.27.0 → 4.28.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 (55) hide show
  1. package/Box.js +45 -44
  2. package/Button.js +1 -2
  3. package/ButtonSimple.js +145 -147
  4. package/CHANGELOG.md +36 -2
  5. package/CollapsiblePanel.js +60 -73
  6. package/JSONTree.js +1311 -629
  7. package/Markdown.js +521 -222
  8. package/Modal.js +11 -4
  9. package/Multiselect.js +844 -804
  10. package/Paginator.js +593 -271
  11. package/TabBar.js +487 -312
  12. package/Table.js +5 -3
  13. package/TextArea.js +368 -344
  14. package/Tree.js +607 -519
  15. package/package.json +2 -2
  16. package/types/src/Box/Box.d.ts +3 -2
  17. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -4
  18. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +4 -4
  19. package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
  20. package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
  21. package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
  22. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
  23. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  24. package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
  25. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  26. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  27. package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
  28. package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
  29. package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
  30. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
  31. package/types/src/Modal/Modal.d.ts +4 -5
  32. package/types/src/Multiselect/Normal.d.ts +1 -0
  33. package/types/src/Paginator/Button.d.ts +8 -3
  34. package/types/src/Paginator/Compact.d.ts +50 -0
  35. package/types/src/Paginator/PageControl.d.ts +37 -0
  36. package/types/src/Paginator/PageSelect.d.ts +32 -0
  37. package/types/src/Paginator/Paginator.d.ts +9 -4
  38. package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
  39. package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
  40. package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
  41. package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
  42. package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
  43. package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
  44. package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
  45. package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
  46. package/types/src/TabBar/Tab.d.ts +12 -2
  47. package/types/src/TabBar/TabBar.d.ts +4 -3
  48. package/types/src/TabBar/TabBarContext.d.ts +6 -1
  49. package/types/src/TextArea/TextArea.d.ts +3 -2
  50. package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
  51. package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
  52. package/types/src/Tree/TreeContext.d.ts +2 -1
  53. package/types/src/Tree/TreeItem.d.ts +18 -5
  54. package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
  55. package/types/src/JSONTree/TreeNode.d.ts +0 -44
package/ButtonSimple.js CHANGED
@@ -70,12 +70,12 @@
70
70
  const i = require("prop-types");
71
71
  var t = r.n(i);
72
72
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
73
- const s = require("@splunk/ui-utils/i18n");
73
+ const l = require("@splunk/ui-utils/i18n");
74
74
  // CONCATENATED MODULE: external "@splunk/themes"
75
- const l = require("@splunk/themes");
75
+ const n = require("@splunk/themes");
76
76
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
77
- const n = require("@splunk/react-ui/ScreenReaderContent");
78
- var c = r.n(n);
77
+ const s = require("@splunk/react-ui/ScreenReaderContent");
78
+ var c = r.n(s);
79
79
  // CONCATENATED MODULE: external "styled-components"
80
80
  const d = require("styled-components");
81
81
  var b = r.n(d);
@@ -83,7 +83,7 @@
83
83
  const v = require("@splunk/react-ui/Clickable");
84
84
  var u = r.n(v);
85
85
  // CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
86
- var p = (0, d.css)([ "", " cursor:pointer;position:relative;border-radius:", ";&:focus,&:hover{z-index:3;}" ], l.mixins.reset("block"), l.variables.borderRadius);
86
+ var p = (0, d.css)([ "", " cursor:pointer;position:relative;border-radius:", ";&:focus,&:hover{z-index:3;}" ], n.mixins.reset("block"), n.variables.borderRadius);
87
87
  /* Setting border-radius to 0.1px creates a rounded shadow, */ var f = (0, d.css)([ "", " ", "" ], (function(r) {
88
88
  var e = r.$append;
89
89
  return e && (0, d.css)([ "border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;" ]);
@@ -91,58 +91,54 @@
91
91
  var e = r.$prepend;
92
92
  return e && (0, d.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
93
93
  }));
94
- var g = (0, d.css)([ "", " ", " ", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", ";&:active{background-color:", ";}}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}&:not([disabled]){&:focus{", "}}" ], p, (0,
95
- l.pickVariant)("$variant", {
96
- prismaSecondary: (0, d.css)([ "font-weight:", ";" ], l.variables.fontWeightSemiBold),
97
- prismaDefault: (0, d.css)([ "border:1px solid ", ";font-weight:", ";" ], l.variables.interactiveColorBorder, l.variables.fontWeightSemiBold),
98
- prismaToggle: (0, d.css)([ "border:1px solid ", ";font-weight:normal;" ], l.variables.interactiveColorBorder)
99
- }), f, l.variables.contentColorActive, l.variables.interactiveColorOverlayHover, l.variables.interactiveColorBorderHover, (0,
100
- l.pickVariant)("$variant", {
101
- prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
102
- prismaDefault: (0, d.css)([ "box-shadow:", ";" ], l.variables.hoverShadow)
94
+ var g = (0, d.css)([ "", " ", " ", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", ";&:active{background-color:", ";}}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}&:not([disabled]){&:focus{box-shadow:", ";}}" ], p, (0,
95
+ n.pickVariant)("$variant", {
96
+ prismaSecondary: (0, d.css)([ "font-weight:", ";" ], n.variables.fontWeightSemiBold),
97
+ prismaDefault: (0, d.css)([ "border:1px solid ", ";font-weight:", ";" ], n.variables.interactiveColorBorder, n.variables.fontWeightSemiBold),
98
+ prismaToggle: (0, d.css)([ "border:1px solid ", ";font-weight:normal;" ], n.variables.interactiveColorBorder)
99
+ }), f, n.variables.contentColorActive, n.variables.interactiveColorOverlayHover, n.variables.interactiveColorBorderHover, (0,
100
+ n.pickVariant)("$variant", {
101
+ prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], n.variables.hoverShadow),
102
+ prismaDefault: (0, d.css)([ "box-shadow:", ";" ], n.variables.hoverShadow)
103
103
  }), (function(r) {
104
104
  var e = r.$selected;
105
- return e && (0, d.css)([ "background-color:", ";border-color:", ";&:hover{background-color:", ";}" ], l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorBorderDisabled, l.mixins.overlayColors(l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorOverlayHover));
105
+ return e && (0, d.css)([ "background-color:", ";border-color:", ";&:hover{background-color:", ";}" ], n.variables.interactiveColorOverlaySelected, n.variables.interactiveColorBorderDisabled, n.mixins.overlayColors(n.variables.interactiveColorOverlaySelected, n.variables.interactiveColorOverlayHover));
106
106
  }), (function(r) {
107
107
  var e = r.$error;
108
- return e && (0, d.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
109
- }), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorOverlayHover, l.variables.interactiveColorOverlayActive, l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, (function(r) {
108
+ return e && (0, d.css)([ "border-color:", ";&:hover{border-color:", ";}" ], n.variables.accentColorNegative, n.variables.accentColorNegative);
109
+ }), n.variables.interactiveColorOverlayActive, n.variables.interactiveColorOverlayHover, n.variables.interactiveColorOverlayActive, n.variables.interactiveColorBorderDisabled, n.variables.contentColorDisabled, (function(r) {
110
110
  var e = r.$selected;
111
- return e && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
112
- }), (0, l.pickVariant)("$variant", {
113
- prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
114
- prismaDefault: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
115
- prismaToggle: (0, d.css)([ "border-color:", ";" ], l.variables.interactiveColorPrimary)
111
+ return e && (0, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackgroundDisabled, n.variables.interactiveColorOverlaySelected));
112
+ }), n.variables.focusShadow);
113
+ var y = (0, d.css)([ "&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], n.variables.interactiveColorBorderDisabled, n.variables.contentColorDisabled, n.variables.interactiveColorBackgroundDisabled, (function(r) {
114
+ return r && (0, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackgroundDisabled, n.variables.interactiveColorOverlaySelected));
116
115
  }));
117
- var y = (0, d.css)([ "&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, l.variables.interactiveColorBackgroundDisabled, (function(r) {
118
- return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
119
- }));
120
- var h = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:active{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorInverted, (0,
121
- l.pickVariant)("$selected", {
122
- false: (0, l.pickVariant)("$variant", {
123
- prismaPrimary: l.variables.interactiveColorPrimary,
124
- prismaDestructive: l.variables.accentColorNegative
116
+ var h = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:active{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, n.variables.fontWeightSemiBold, n.variables.borderRadius, f, n.variables.contentColorInverted, (0,
117
+ n.pickVariant)("$selected", {
118
+ false: (0, n.pickVariant)("$variant", {
119
+ prismaPrimary: n.variables.interactiveColorPrimary,
120
+ prismaDestructive: n.variables.accentColorNegative
125
121
  }),
126
- true: (0, l.pickVariant)("$variant", {
127
- prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlaySelected),
128
- prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlaySelected)
122
+ true: (0, n.pickVariant)("$variant", {
123
+ prismaPrimary: n.mixins.overlayColors(n.variables.interactiveColorPrimary, n.variables.interactiveColorOverlaySelected),
124
+ prismaDestructive: n.mixins.overlayColors(n.variables.accentColorNegative, n.variables.interactiveColorOverlaySelected)
129
125
  })
130
- }), (0, l.pickVariant)("$variant", {
131
- prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
132
- prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover)
133
- }), l.variables.hoverShadow, (0, l.pickVariant)("$variant", {
134
- prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayActive),
135
- prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayActive)
136
- }), l.variables.focusShadow, y);
137
- var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{background-color:", ";}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorActive, l.variables.interactiveColorBackground, (function(r) {
138
- return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected));
139
- }), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.hoverShadow, l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.focusShadow, y);
126
+ }), (0, n.pickVariant)("$variant", {
127
+ prismaPrimary: n.mixins.overlayColors(n.variables.interactiveColorPrimary, n.variables.interactiveColorOverlayHover),
128
+ prismaDestructive: n.mixins.overlayColors(n.variables.accentColorNegative, n.variables.interactiveColorOverlayHover)
129
+ }), n.variables.hoverShadow, (0, n.pickVariant)("$variant", {
130
+ prismaPrimary: n.mixins.overlayColors(n.variables.interactiveColorPrimary, n.variables.interactiveColorOverlayActive),
131
+ prismaDestructive: n.mixins.overlayColors(n.variables.accentColorNegative, n.variables.interactiveColorOverlayActive)
132
+ }), n.variables.focusShadow, y);
133
+ var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{background-color:", ";}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, n.variables.fontWeightSemiBold, n.variables.borderRadius, f, n.variables.contentColorActive, n.variables.interactiveColorBackground, (function(r) {
134
+ return r && (0, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlaySelected));
135
+ }), n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayHover), n.variables.hoverShadow, n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayActive), n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayHover), n.variables.focusShadow, y);
140
136
  // CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
141
137
  var m = "#1A8929";
142
138
  // SUI-2439 to meet WCAG AA compliance
143
139
  var C = "#235823";
144
140
  // SUI-2439 to meet WCAG AA compliance
145
- var x = (0, d.css)([ "", " border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}" ], l.mixins.reset("block"), l.variables.borderRadius);
141
+ var x = (0, d.css)([ "", " border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}" ], n.mixins.reset("block"), n.variables.borderRadius);
146
142
  var w = (0, d.css)([ "", " ", "" ], (function(r) {
147
143
  var e = r.$append;
148
144
  return e && (0, d.css)([ "border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
@@ -153,129 +149,129 @@
153
149
  var S = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
154
150
  var O = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
155
151
  var D = (0, d.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{", " ", "}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], x, (0,
156
- l.pick)({
157
- light: (0, d.css)([ "1px solid ", "" ], l.variables.gray60),
158
- dark: l.variables.border
159
- }), w, (0, l.pickVariant)("$variant", {
152
+ n.pick)({
153
+ light: (0, d.css)([ "1px solid ", "" ], n.variables.gray60),
154
+ dark: n.variables.border
155
+ }), w, (0, n.pickVariant)("$variant", {
160
156
  enterpriseDefault: "normal",
161
- enterpriseSecondary: l.variables.fontWeightSemiBold
162
- }), (0, l.pick)({
163
- light: l.variables.gray98,
164
- dark: l.variables.gray45
165
- }), (0, l.pick)({
166
- light: l.variables.gray45,
167
- dark: l.variables.white
168
- }), (0, l.pick)({
157
+ enterpriseSecondary: n.variables.fontWeightSemiBold
158
+ }), (0, n.pick)({
159
+ light: n.variables.gray98,
160
+ dark: n.variables.gray45
161
+ }), (0, n.pick)({
162
+ light: n.variables.gray45,
163
+ dark: n.variables.white
164
+ }), (0, n.pick)({
169
165
  light: (0, d.css)([ "box-shadow:", ";" ], S),
170
- dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray30)
166
+ dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], n.variables.gray30)
171
167
  }), (function(r) {
172
168
  var e = r.$selected;
173
169
  return e && (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], (0,
174
- l.pick)({
170
+ n.pick)({
175
171
  light: O,
176
- dark: (0, d.css)([ "inset 0 1px 0 ", "" ], l.variables.black)
177
- }), (0, l.pick)({
178
- light: l.variables.gray92,
179
- dark: l.variables.gray22
180
- }), (0, l.pick)({
181
- light: l.variables.gray60,
182
- dark: l.variables.gray20
172
+ dark: (0, d.css)([ "inset 0 1px 0 ", "" ], n.variables.black)
173
+ }), (0, n.pick)({
174
+ light: n.variables.gray92,
175
+ dark: n.variables.gray22
176
+ }), (0, n.pick)({
177
+ light: n.variables.gray60,
178
+ dark: n.variables.gray20
183
179
  }));
184
- }), (0, l.pick)({
180
+ }), (0, n.pick)({
185
181
  light: "#ebeeef",
186
- dark: l.variables.gray30
187
- }), (0, l.pick)({
182
+ dark: n.variables.gray30
183
+ }), (0, n.pick)({
188
184
  light: S,
189
- dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray25)
190
- }), (0, l.pick)({
191
- light: l.variables.gray92,
192
- dark: l.variables.gray22
193
- }), (0, l.pick)({
194
- light: l.variables.gray60,
195
- dark: l.variables.gray20
196
- }), (0, l.pick)({
197
- dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray22)
185
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], n.variables.gray25)
186
+ }), (0, n.pick)({
187
+ light: n.variables.gray92,
188
+ dark: n.variables.gray22
189
+ }), (0, n.pick)({
190
+ light: n.variables.gray60,
191
+ dark: n.variables.gray20
192
+ }), (0, n.pick)({
193
+ dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], n.variables.gray22)
198
194
  }), (function(r) {
199
195
  var e = r.$append;
200
- return e && (0, d.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, l.pick)({
196
+ return e && (0, d.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, n.pick)({
201
197
  light: S,
202
- dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
203
- }), l.variables.focusShadow, l.variables.borderColor);
198
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], n.variables.gray30)
199
+ }), n.variables.focusShadow, n.variables.borderColor);
204
200
  }), (function(r) {
205
201
  var e = r.$append, o = r.$selected;
206
- return e && o && (0, l.pick)({
207
- light: (0, d.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O, l.variables.focusShadow, l.variables.borderColor),
208
- dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
202
+ return e && o && (0, n.pick)({
203
+ light: (0, d.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O, n.variables.focusShadow, n.variables.borderColor),
204
+ dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], n.variables.black, n.variables.focusShadow, n.variables.borderColor)
209
205
  });
210
- }), (0, l.pick)({
206
+ }), (0, n.pick)({
211
207
  light: S,
212
- dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
213
- }), l.variables.focusShadow, l.variables.textDisabledColor, (0, l.pick)({
214
- light: l.variables.gray96,
215
- dark: l.variables.gray30
216
- }), (0, l.pick)({
217
- light: l.variables.borderLightColor,
218
- dark: l.variables.gray30
208
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], n.variables.gray30)
209
+ }), n.variables.focusShadow, n.variables.textDisabledColor, (0, n.pick)({
210
+ light: n.variables.gray96,
211
+ dark: n.variables.gray30
212
+ }), (0, n.pick)({
213
+ light: n.variables.borderLightColor,
214
+ dark: n.variables.gray30
219
215
  }), (function(r) {
220
216
  var e = r.$selected;
221
- return e && (0, l.pick)({
222
- light: (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], O, l.variables.gray92, l.variables.gray80),
223
- dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ], l.variables.black, l.variables.gray22, l.variables.gray20)
217
+ return e && (0, n.pick)({
218
+ light: (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], O, n.variables.gray92, n.variables.gray80),
219
+ dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ], n.variables.black, n.variables.gray22, n.variables.gray20)
224
220
  });
225
221
  }));
226
222
  var $ = "inset 0 -2px 0 rgba(0, 0, 0, 0.1)";
227
223
  var P = "inset 0 2px 0 rgba(0, 0, 0, 0.1)";
228
- var B = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, m, l.variables.white, $, (function(r) {
224
+ var B = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, n.variables.fontWeightSemiBold, w, m, n.variables.white, $, (function(r) {
229
225
  var e = r.$selected;
230
226
  return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, C);
231
227
  }), (function(r) {
232
228
  var e = r.$prepend;
233
229
  return e && (0, d.css)([ "border-left:1px solid ", ";" ], m);
234
- }), l.variables.brandColorD50, l.variables.brandColorD30, l.variables.brandColorD30, $, l.variables.focusShadow, l.variables.brandColorL30, l.variables.brandColorL10, (function(r) {
230
+ }), n.variables.brandColorD50, n.variables.brandColorD30, n.variables.brandColorD30, $, n.variables.focusShadow, n.variables.brandColorL30, n.variables.brandColorL10, (function(r) {
235
231
  var e = r.$selected;
236
- return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.brandColorD20);
232
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, n.variables.brandColorD20);
237
233
  }));
238
- var j = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, l.variables.errorColorD10, l.variables.white, $, (function(r) {
234
+ var j = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, n.variables.fontWeightSemiBold, w, n.variables.errorColorD10, n.variables.white, $, (function(r) {
239
235
  var e = r.$selected;
240
- return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD30);
236
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, n.variables.errorColorD30);
241
237
  }), (function(r) {
242
238
  var e = r.$prepend;
243
- return e && (0, d.css)([ "border-left:1px solid ", ";" ], l.variables.errorColorD30);
244
- }), l.variables.errorColorD30, l.variables.errorColorD40, l.variables.errorColorD40, $, l.variables.focusShadow, l.variables.errorColorL10, l.variables.errorColorD10, (function(r) {
239
+ return e && (0, d.css)([ "border-left:1px solid ", ";" ], n.variables.errorColorD30);
240
+ }), n.variables.errorColorD30, n.variables.errorColorD40, n.variables.errorColorD40, $, n.variables.focusShadow, n.variables.errorColorL10, n.variables.errorColorD10, (function(r) {
245
241
  var e = r.$selected;
246
- return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD40);
242
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, n.variables.errorColorD40);
247
243
  }));
248
244
  var T = (0, d.css)([ "", ";color:", ";border:1px solid transparent;&:not([disabled],[aria-disabled='true']){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";}&:active,&[aria-expanded='true']{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}&[disabled],&[aria-disabled='true']{color:", ";cursor:not-allowed;", "}" ], x, (0,
249
- l.pick)({
250
- light: l.variables.gray45,
251
- dark: l.variables.white
245
+ n.pick)({
246
+ light: n.variables.gray45,
247
+ dark: n.variables.white
252
248
  }), (function(r) {
253
249
  var e = r.$selected;
254
- return e && (0, d.css)([ "border-color:", ";" ], l.variables.accentColor);
255
- }), (0, l.pick)({
256
- light: l.variables.linkColor,
257
- dark: l.variables.white
258
- }), l.variables.backgroundColorHover, (0, l.pick)({
259
- light: l.variables.gray60,
260
- dark: l.variables.borderColor
250
+ return e && (0, d.css)([ "border-color:", ";" ], n.variables.accentColor);
251
+ }), (0, n.pick)({
252
+ light: n.variables.linkColor,
253
+ dark: n.variables.white
254
+ }), n.variables.backgroundColorHover, (0, n.pick)({
255
+ light: n.variables.gray60,
256
+ dark: n.variables.borderColor
261
257
  }), (function(r) {
262
258
  var e = r.$error;
263
- return e && (0, d.css)([ "&,&:hover{color:", ";}" ], l.variables.errorColor);
264
- }), (0, l.pick)({
265
- light: l.variables.linkColor,
266
- dark: l.variables.white
267
- }), (0, l.pick)({
268
- light: l.variables.gray92,
269
- dark: l.variables.gray22
270
- }), l.variables.focusShadow, l.variables.textDisabledColor, (function(r) {
259
+ return e && (0, d.css)([ "&,&:hover{color:", ";}" ], n.variables.errorColor);
260
+ }), (0, n.pick)({
261
+ light: n.variables.linkColor,
262
+ dark: n.variables.white
263
+ }), (0, n.pick)({
264
+ light: n.variables.gray92,
265
+ dark: n.variables.gray22
266
+ }), n.variables.focusShadow, n.variables.textDisabledColor, (function(r) {
271
267
  var e = r.$selected;
272
- return e && (0, d.css)([ "border-color:", ";" ], l.variables.borderLightColor);
268
+ return e && (0, d.css)([ "border-color:", ";" ], n.variables.borderLightColor);
273
269
  }));
274
270
  // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
275
271
  var _ = b()(u()).withConfig({
276
272
  displayName: "ButtonSimpleStyles__StyledClickable",
277
273
  componentId: "vlarwe-0"
278
- })([ "", "" ], (0, l.pickVariant)("$variant", {
274
+ })([ "", "" ], (0, n.pickVariant)("$variant", {
279
275
  enterpriseDefault: D,
280
276
  enterpriseSecondary: D,
281
277
  enterprisePrimary: B,
@@ -303,8 +299,8 @@
303
299
  }
304
300
  return R(r);
305
301
  }
306
- function V() {
307
- V = Object.assign || function(r) {
302
+ function A() {
303
+ A = Object.assign || function(r) {
308
304
  for (var e = 1; e < arguments.length; e++) {
309
305
  var o = arguments[e];
310
306
  for (var a in o) {
@@ -315,11 +311,11 @@
315
311
  }
316
312
  return r;
317
313
  };
318
- return V.apply(this, arguments);
314
+ return A.apply(this, arguments);
319
315
  }
320
- function A(r, e) {
316
+ function E(r, e) {
321
317
  if (r == null) return {};
322
- var o = E(r, e);
318
+ var o = H(r, e);
323
319
  var a, i;
324
320
  if (Object.getOwnPropertySymbols) {
325
321
  var t = Object.getOwnPropertySymbols(r);
@@ -332,7 +328,7 @@
332
328
  }
333
329
  return o;
334
330
  }
335
- function E(r, e) {
331
+ function H(r, e) {
336
332
  if (r == null) return {};
337
333
  var o = {};
338
334
  var a = Object.keys(r);
@@ -344,12 +340,12 @@
344
340
  }
345
341
  return o;
346
342
  }
347
- function H(r, e) {
343
+ function N(r, e) {
348
344
  if (!(r instanceof e)) {
349
345
  throw new TypeError("Cannot call a class as a function");
350
346
  }
351
347
  }
352
- function N(r, e) {
348
+ function V(r, e) {
353
349
  for (var o = 0; o < e.length; o++) {
354
350
  var a = e[o];
355
351
  a.enumerable = a.enumerable || false;
@@ -359,8 +355,8 @@
359
355
  }
360
356
  }
361
357
  function q(r, e, o) {
362
- if (e) N(r.prototype, e);
363
- if (o) N(r, o);
358
+ if (e) V(r.prototype, e);
359
+ if (o) V(r, o);
364
360
  return r;
365
361
  }
366
362
  function W(r, e) {
@@ -492,7 +488,7 @@
492
488
  var e = L(o);
493
489
  function o() {
494
490
  var r;
495
- H(this, o);
491
+ N(this, o);
496
492
  for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++) {
497
493
  i[t] = arguments[t];
498
494
  }
@@ -515,31 +511,33 @@
515
511
  }, {
516
512
  key: "render",
517
513
  value: function r() {
518
- var e = this.props, o = e.appearance, i = e.append, t = e.children, l = e.disabled, n = e.error, d = e.prepend, b = e.selected, v = e.splunkTheme, u = A(e, [ "appearance", "append", "children", "disabled", "error", "prepend", "selected", "splunkTheme" ]);
519
- var p = o;
520
- if (v.isEnterprise) {
521
- p = n ? "destructive" : o;
514
+ var e = this.props, o = e.appearance, i = e.append, t = e.children, n = e.onClick, s = e.disabled, d = e.error, b = e.prepend, v = e.selected, u = e.splunkTheme, p = E(e, [ "appearance", "append", "children", "onClick", "disabled", "error", "prepend", "selected", "splunkTheme" ]);
515
+ var f = o;
516
+ if (u.isEnterprise) {
517
+ f = d ? "destructive" : o;
522
518
  }
523
519
 
524
- return a().createElement(_, V({
525
- "aria-disabled": l === "dimmed" || undefined,
526
- "aria-invalid": n,
520
+ return a().createElement(_, A({
521
+ "aria-disabled": s === "dimmed" || undefined,
522
+ "aria-invalid": d,
527
523
  "data-test": "button-simple",
528
- disabled: l === true,
524
+ disabled: s === true,
529
525
  ref: this.handleMount,
530
- $variant: U(p, v.family),
526
+ $variant: U(f, u.family),
531
527
  $append: i,
532
- $prepend: d,
533
- $selected: b,
534
- $error: n
535
- }, u), t, b && a().createElement(c(), null, (0, s._)("Selected")));
528
+ $prepend: b,
529
+ $selected: v,
530
+ $error: d
531
+ }, p, {
532
+ onClick: n && !s ? n : undefined
533
+ }), t, v && a().createElement(c(), null, (0, l._)("Selected")));
536
534
  }
537
535
  } ]);
538
536
  return o;
539
537
  }(o.Component);
540
538
  J(X, "defaultProps", Q);
541
539
  J(X, "propTypes", K);
542
- var Y = (0, l.withSplunkTheme)(X);
540
+ var Y = (0, n.withSplunkTheme)(X);
543
541
  Y.propTypes = X.propTypes;
544
542
  /* harmony default export */ const Z = Y;
545
543
  // CONCATENATED MODULE: ./src/ButtonSimple/index.ts
package/CHANGELOG.md CHANGED
@@ -1,15 +1,49 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
- 4.27.0 - TBD
4
+ 4.28.1 - March 21, 2024
5
+ ----------
6
+ Bug Fixes:
7
+ * Fixed `CollapsiblePanel` not calling its `onRequestOpen` and `onRequestClose` callbacks (SUI-6146).
8
+ * Fixed documentation issues and discrepancies between the `onChange` callbacks of `CollapsiblePanel` and `SingleOpenPanelGroup` (SUI-6145).
9
+ * `CollapsiblePanel` and `SingleOpenPanelGroup` will both always provide the `panelId` to their `onChange` callback.
10
+ * `CollapsiblePanel` and `SingleOpenPanelGroup` will both provide an `action="open"|"closed"` value to the `onChange` callback.
11
+
12
+ 4.28.0 - March 20, 2024
13
+ ----------
14
+ New Features:
15
+ * `JSONTree` now supports tree view interactions improving keyboard accessibility (SUI-5749).
16
+ * Up and down arrow keys navigate to previous and next visible tree nodes.
17
+ * Right arrow key opens a closed node or moves focus to first child node.
18
+ * Left arrow key closes an open node or moves focus to parent node.
19
+ * Home and End keys nagivate to first and last nodes in the tree respectively.
20
+ * `Paginator` now has two additional appearances (SUI-5848).
21
+ * `Paginator.PageControl` provides a page dropdown and previous/next buttons.
22
+ * `Paginator.Compact` provides a customizable label and previous/next buttons.
23
+
24
+ Bug Fixes:
25
+ * `TabBar` keyboard navigation now works correctly when the `elementRef` prop is passed to `TabBar.Tab` (SUI-5409).
26
+ * `TextArea` renders the correct icon in Enterprise themes when the `canClear` prop is present (SUI-6104).
27
+ * `Markdown`'s renderers can now be styled with `styled-components` (SUI-6071).
28
+ * `Multiselect` now announces selections to screen readers (SUI-2013).
29
+ * `Table.HeadDropdownCell` does not shift horizontally when dropdown content is clicked (SUI-5457).
30
+ * `Button`'s focus style for `appearance=toggle` has been replaced with `@splunk/theme`'s `focusShadow` in Prisma themes to have a visible focus indicator (WCAG SC 2.4.7) (SUI-3081).
31
+ * This change also affects `Select` component.
32
+ * `Select` error state is now visible when inputs are focused (SUI-5327).
33
+
34
+ Typescript:
35
+ * `Paginator's `elementRef` is now a `React.Ref<HTMLElement>` due to the underlying HTML element changing from a `div` to a `nav` (SUi-6134).
36
+
37
+ 4.27.0 - March 5, 2024
5
38
  ----------
6
39
  New Features:
7
- * `CollapsiblePanel` now supports functionalities of `Accordion` (SUI-5719):
40
+ * `CollapsiblePanel` now supports the functionalities of `Accordion` (SUI-5719):
8
41
  * The new `SingleOpenPanelGroup` component can be used wrap multiple `CollapsiblePanel` to replicate the expand/collapse behavior of `Accordion`.
9
42
  * `CollapsiblePanel` supports a new `inset` prop with similar functionality as the same prop in `Accordion`.
10
43
  * A new `onChange` prop consolidates the callback behavior of the `onRequestClose` and `onRequestOpen` props.
11
44
  * The separate `onRequestClose` and `onRequestOpen` props have been deprecated and will be removed in the next major version.
12
45
  * `ControlGroup` now supports `data-test-required` test hook. (SUI-6067).
46
+ * `Modal`'s `returnFocus` prop can now accept either a ref or a callback function. Use a callback function for manually setting focus when a ref cannot be used (SUI-6094).
13
47
 
14
48
  Bug Fixes:
15
49
  * `Text`'s focus style has been replaced with `@splunk/theme`'s `focusShadow` in Prisma themes to have a visible focus indicator (WCAG SC 2.4.7) (SUI-5321).