@splunk/react-ui 4.26.0 → 4.28.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 +195 -212
- package/Box.js +45 -44
- package/Button.js +1 -2
- package/ButtonSimple.js +145 -147
- package/CHANGELOG.md +52 -3
- package/CollapsiblePanel.js +555 -325
- package/Color.js +3 -1
- package/ControlGroup.js +1 -0
- package/JSONTree.js +1311 -629
- package/MIGRATION.mdx +30 -0
- package/Markdown.js +521 -222
- package/Modal.js +26 -10
- package/Multiselect.js +844 -804
- package/Paginator.js +593 -271
- package/TabBar.js +487 -312
- package/Table.js +903 -869
- package/Text.js +30 -40
- package/TextArea.js +372 -432
- package/Tree.js +607 -519
- package/package.json +4 -2
- package/types/src/Accordion/Accordion.d.ts +2 -2
- package/types/src/Accordion/AccordionContext.d.ts +2 -3
- package/types/src/Box/Box.d.ts +3 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
- package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
- package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
- package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
- package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
- package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
- package/types/src/Modal/Modal.d.ts +4 -5
- package/types/src/Multiselect/Normal.d.ts +1 -0
- package/types/src/Paginator/Button.d.ts +8 -3
- package/types/src/Paginator/Compact.d.ts +50 -0
- package/types/src/Paginator/PageControl.d.ts +37 -0
- package/types/src/Paginator/PageSelect.d.ts +32 -0
- package/types/src/Paginator/Paginator.d.ts +9 -4
- package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
- package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
- package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
- package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
- package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
- package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
- package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
- package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
- package/types/src/TabBar/Tab.d.ts +12 -2
- package/types/src/TabBar/TabBar.d.ts +4 -3
- package/types/src/TabBar/TabBarContext.d.ts +6 -1
- package/types/src/Table/Cell.d.ts +3 -1
- package/types/src/Table/Head.d.ts +2 -2
- package/types/src/Table/HeadCell.d.ts +2 -0
- package/types/src/Table/Row.d.ts +4 -2
- package/types/src/Table/Table.d.ts +1 -1
- package/types/src/Table/Toggle.d.ts +4 -4
- package/types/src/TextArea/TextArea.d.ts +3 -2
- package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
- package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
- package/types/src/Tree/TreeContext.d.ts +2 -1
- package/types/src/Tree/TreeItem.d.ts +18 -5
- package/types/src/fixtures/text.d.ts +1 -0
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
- package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
- 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
|
|
73
|
+
const l = require("@splunk/ui-utils/i18n");
|
|
74
74
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
75
|
-
const
|
|
75
|
+
const n = require("@splunk/themes");
|
|
76
76
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
77
|
-
const
|
|
78
|
-
var c = r.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;}" ],
|
|
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
|
-
|
|
96
|
-
prismaSecondary: (0, d.css)([ "font-weight:", ";" ],
|
|
97
|
-
prismaDefault: (0, d.css)([ "border:1px solid ", ";font-weight:", ";" ],
|
|
98
|
-
prismaToggle: (0, d.css)([ "border:1px solid ", ";font-weight:normal;" ],
|
|
99
|
-
}), f,
|
|
100
|
-
|
|
101
|
-
prismaSecondary: (0, d.css)([ "box-shadow:", ";" ],
|
|
102
|
-
prismaDefault: (0, d.css)([ "box-shadow:", ";" ],
|
|
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:", ";}" ],
|
|
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:", ";}" ],
|
|
109
|
-
}),
|
|
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:", ";" ],
|
|
112
|
-
}),
|
|
113
|
-
|
|
114
|
-
|
|
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
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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,
|
|
127
|
-
prismaPrimary:
|
|
128
|
-
prismaDestructive:
|
|
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,
|
|
131
|
-
prismaPrimary:
|
|
132
|
-
prismaDestructive:
|
|
133
|
-
}),
|
|
134
|
-
prismaPrimary:
|
|
135
|
-
prismaDestructive:
|
|
136
|
-
}),
|
|
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,
|
|
138
|
-
return r && (0, d.css)([ "background-color:", ";" ],
|
|
139
|
-
}),
|
|
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;}" ],
|
|
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
|
-
|
|
157
|
-
light: (0, d.css)([ "1px solid ", "" ],
|
|
158
|
-
dark:
|
|
159
|
-
}), w, (0,
|
|
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:
|
|
162
|
-
}), (0,
|
|
163
|
-
light:
|
|
164
|
-
dark:
|
|
165
|
-
}), (0,
|
|
166
|
-
light:
|
|
167
|
-
dark:
|
|
168
|
-
}), (0,
|
|
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 ", ";" ],
|
|
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
|
-
|
|
170
|
+
n.pick)({
|
|
175
171
|
light: O,
|
|
176
|
-
dark: (0, d.css)([ "inset 0 1px 0 ", "" ],
|
|
177
|
-
}), (0,
|
|
178
|
-
light:
|
|
179
|
-
dark:
|
|
180
|
-
}), (0,
|
|
181
|
-
light:
|
|
182
|
-
dark:
|
|
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,
|
|
180
|
+
}), (0, n.pick)({
|
|
185
181
|
light: "#ebeeef",
|
|
186
|
-
dark:
|
|
187
|
-
}), (0,
|
|
182
|
+
dark: n.variables.gray30
|
|
183
|
+
}), (0, n.pick)({
|
|
188
184
|
light: S,
|
|
189
|
-
dark: (0, d.css)([ "inset 0 -1px 0 ", "" ],
|
|
190
|
-
}), (0,
|
|
191
|
-
light:
|
|
192
|
-
dark:
|
|
193
|
-
}), (0,
|
|
194
|
-
light:
|
|
195
|
-
dark:
|
|
196
|
-
}), (0,
|
|
197
|
-
dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ],
|
|
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,
|
|
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 ", "" ],
|
|
203
|
-
}),
|
|
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,
|
|
207
|
-
light: (0, d.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O,
|
|
208
|
-
dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ],
|
|
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,
|
|
206
|
+
}), (0, n.pick)({
|
|
211
207
|
light: S,
|
|
212
|
-
dark: (0, d.css)([ "inset 0 -1px 0 ", "" ],
|
|
213
|
-
}),
|
|
214
|
-
light:
|
|
215
|
-
dark:
|
|
216
|
-
}), (0,
|
|
217
|
-
light:
|
|
218
|
-
dark:
|
|
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,
|
|
222
|
-
light: (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], O,
|
|
223
|
-
dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ],
|
|
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,
|
|
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
|
-
}),
|
|
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,
|
|
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,
|
|
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,
|
|
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 ", ";" ],
|
|
244
|
-
}),
|
|
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,
|
|
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
|
-
|
|
250
|
-
light:
|
|
251
|
-
dark:
|
|
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:", ";" ],
|
|
255
|
-
}), (0,
|
|
256
|
-
light:
|
|
257
|
-
dark:
|
|
258
|
-
}),
|
|
259
|
-
light:
|
|
260
|
-
dark:
|
|
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:", ";}" ],
|
|
264
|
-
}), (0,
|
|
265
|
-
light:
|
|
266
|
-
dark:
|
|
267
|
-
}), (0,
|
|
268
|
-
light:
|
|
269
|
-
dark:
|
|
270
|
-
}),
|
|
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:", ";" ],
|
|
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,
|
|
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
|
|
307
|
-
|
|
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
|
|
314
|
+
return A.apply(this, arguments);
|
|
319
315
|
}
|
|
320
|
-
function
|
|
316
|
+
function E(r, e) {
|
|
321
317
|
if (r == null) return {};
|
|
322
|
-
var o =
|
|
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
|
|
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
|
|
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
|
|
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)
|
|
363
|
-
if (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
|
-
|
|
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,
|
|
519
|
-
var
|
|
520
|
-
if (
|
|
521
|
-
|
|
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(_,
|
|
525
|
-
"aria-disabled":
|
|
526
|
-
"aria-invalid":
|
|
520
|
+
return a().createElement(_, A({
|
|
521
|
+
"aria-disabled": s === "dimmed" || undefined,
|
|
522
|
+
"aria-invalid": d,
|
|
527
523
|
"data-test": "button-simple",
|
|
528
|
-
disabled:
|
|
524
|
+
disabled: s === true,
|
|
529
525
|
ref: this.handleMount,
|
|
530
|
-
$variant: U(
|
|
526
|
+
$variant: U(f, u.family),
|
|
531
527
|
$append: i,
|
|
532
|
-
$prepend:
|
|
533
|
-
$selected:
|
|
534
|
-
$error:
|
|
535
|
-
},
|
|
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,
|
|
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,9 +1,58 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.28.0 - March 20, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `JSONTree` now supports tree view interactions improving keyboard accessibility (SUI-5749).
|
|
8
|
+
* Up and down arrow keys navigate to previous and next visible tree nodes.
|
|
9
|
+
* Right arrow key opens a closed node or moves focus to first child node.
|
|
10
|
+
* Left arrow key closes an open node or moves focus to parent node.
|
|
11
|
+
* Home and End keys nagivate to first and last nodes in the tree respectively.
|
|
12
|
+
* `Paginator` now has two additional appearances (SUI-5848).
|
|
13
|
+
* `Paginator.PageControl` provides a page dropdown and previous/next buttons.
|
|
14
|
+
* `Paginator.Compact` provides a customizable label and previous/next buttons.
|
|
15
|
+
|
|
16
|
+
Bug Fixes:
|
|
17
|
+
* `TabBar` keyboard navigation now works correctly when the `elementRef` prop is passed to `TabBar.Tab` (SUI-5409).
|
|
18
|
+
* `TextArea` renders the correct icon in Enterprise themes when the `canClear` prop is present (SUI-6104).
|
|
19
|
+
* `Markdown`'s renderers can now be styled with `styled-components` (SUI-6071).
|
|
20
|
+
* `Multiselect` now announces selections to screen readers (SUI-2013).
|
|
21
|
+
* `Table.HeadDropdownCell` does not shift horizontally when dropdown content is clicked (SUI-5457).
|
|
22
|
+
* `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).
|
|
23
|
+
* This change also affects `Select` component.
|
|
24
|
+
* `Select` error state is now visible when inputs are focused (SUI-5327).
|
|
25
|
+
|
|
26
|
+
Typescript:
|
|
27
|
+
* `Paginator's `elementRef` is now a `React.Ref<HTMLElement>` due to the underlying HTML element changing from a `div` to a `nav` (SUi-6134).
|
|
28
|
+
|
|
29
|
+
4.27.0 - March 5, 2024
|
|
30
|
+
----------
|
|
31
|
+
New Features:
|
|
32
|
+
* `CollapsiblePanel` now supports the functionalities of `Accordion` (SUI-5719):
|
|
33
|
+
* The new `SingleOpenPanelGroup` component can be used wrap multiple `CollapsiblePanel` to replicate the expand/collapse behavior of `Accordion`.
|
|
34
|
+
* `CollapsiblePanel` supports a new `inset` prop with similar functionality as the same prop in `Accordion`.
|
|
35
|
+
* A new `onChange` prop consolidates the callback behavior of the `onRequestClose` and `onRequestOpen` props.
|
|
36
|
+
* The separate `onRequestClose` and `onRequestOpen` props have been deprecated and will be removed in the next major version.
|
|
37
|
+
* `ControlGroup` now supports `data-test-required` test hook. (SUI-6067).
|
|
38
|
+
* `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).
|
|
39
|
+
|
|
40
|
+
Bug Fixes:
|
|
41
|
+
* `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).
|
|
42
|
+
* Error state is now visible when inputs are focused.
|
|
43
|
+
* This change also affects the following components: `Combobox`, `Date`, `TextArea`, `Number`, `Select`'s and `Mutltiselect`'s filters, and `Search`.
|
|
44
|
+
* `Table`'s column resize handle is now correctly announced by screen readers (SUI-5967).
|
|
45
|
+
* The element has been changed from a `button` to an `hr` to have the correct role of `separator`.
|
|
46
|
+
* `Table`'s selectable row checkboxes are now accessible with VoiceOver keys (SUI-5958).
|
|
47
|
+
* `Table`'s selectable row checkboxes will no longer receive focus when the row is `disabled` (SUI-5824).
|
|
48
|
+
* `CollapsiblePanel`'s toggle has consistent spacing and improved focus styling when `titleWithActions` is enabled(SUI-5433).
|
|
49
|
+
|
|
50
|
+
Typescript:
|
|
51
|
+
* The `event` type for `TableRequestResizeColumnHandler` in the `Table` has been changed from a `button` event type to an `hr` event type: `event: React.MouseEvent<HTMLHRElement> | React.KeyboardEvent<HTMLHRElement> | MouseEvent`.
|
|
52
|
+
|
|
4
53
|
4.26.0 - Feb 21, 2024
|
|
5
54
|
----------
|
|
6
|
-
New Features:
|
|
55
|
+
New Features:
|
|
7
56
|
* `Modal` automatically returns focus to the invoking element after close when a ref is provided to the new prop `returnFocus` (SUI-2834).
|
|
8
57
|
* `Breadcrumbs` and `Breadcrumbs.Item` now support `onClick` prop (SUI-5911).
|
|
9
58
|
|
|
@@ -13,14 +62,14 @@ Bug Fixes:
|
|
|
13
62
|
* `TextArea` renders at the correct size when `minRows={1}` (SUI-6010).
|
|
14
63
|
* `TextArea` has consistent height when rendering rows regardless if value is present.
|
|
15
64
|
* Fixed spurious deprecation warnings for `canClear` and `placeholder` props in `TextArea`.
|
|
16
|
-
* Fixed regression in `TextArea` where placeholder text could be cut off.
|
|
65
|
+
* Fixed regression in `TextArea` where placeholder text could be cut off.
|
|
17
66
|
|
|
18
67
|
API Changes:
|
|
19
68
|
* Corrected the type of `Modal`'s `initialFocus` prop to include `React.Component & { focus: () => void }` instead of `React.Component & { focus: () => {} }`.
|
|
20
69
|
|
|
21
70
|
4.25.0 - Feb 6, 2024
|
|
22
71
|
----------
|
|
23
|
-
New Features:
|
|
72
|
+
New Features:
|
|
24
73
|
* `Modal` supports `subtitle` and `icon` props in Enterprise themes (SUI-5924).
|
|
25
74
|
* `Button` now supports a new `"dimmed"` value for the `disabled` prop (SUI-5819).
|
|
26
75
|
|