@splunk/react-ui 4.28.2 → 4.30.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 +1 -0
- package/CHANGELOG.md +42 -1
- package/Card.js +17 -17
- package/Chip.js +162 -153
- package/Clickable.js +107 -87
- package/Code.js +10 -22
- package/CollapsiblePanel.js +8 -8
- package/ComboBox.js +43 -38
- package/Date.js +6 -6
- package/DualListbox.js +1 -1
- package/Link.js +70 -68
- package/MIGRATION.mdx +141 -1
- package/Markdown.js +10 -9
- package/Menu.js +5 -5
- package/Message.js +160 -149
- package/Multiselect.js +52 -48
- package/Number.js +19 -18
- package/Paginator.js +390 -485
- package/RadioBar.js +43 -39
- package/ResultsMenu.js +14 -11
- package/Search.js +227 -220
- package/Select.js +77 -72
- package/StepBar.js +1 -1
- package/Table.js +2082 -1594
- package/Text.js +1 -0
- package/TextArea.d.ts +1 -1
- package/WaitSpinner.js +17 -16
- package/cypress/support/component.ts +2 -2
- package/package.json +22 -21
- package/test-runner-jest.config.js +1 -0
- package/types/src/Accordion/Accordion.d.ts +3 -7
- package/types/src/Accordion/Panel.d.ts +2 -2
- package/types/src/Anchor/Anchor.d.ts +1 -1
- package/types/src/AnimationToggle/AnimationToggle.d.ts +3 -3
- package/types/src/Box/Box.d.ts +1 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/types/src/Breadcrumbs/Item.d.ts +1 -1
- package/types/src/Button/Button.d.ts +5 -5
- package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -10
- package/types/src/Calendar/Calendar.d.ts +3 -3
- package/types/src/Calendar/DateTable.d.ts +2 -2
- package/types/src/Calendar/Day.d.ts +3 -3
- package/types/src/Calendar/MonthHeader.d.ts +6 -6
- package/types/src/Card/Body.d.ts +1 -1
- package/types/src/Card/Card.d.ts +6 -6
- package/types/src/Card/Footer.d.ts +1 -1
- package/types/src/Card/Header.d.ts +1 -1
- package/types/src/CardLayout/CardLayout.d.ts +4 -4
- package/types/src/Chip/Chip.d.ts +5 -5
- package/types/src/Chip/docs/examples/RemovableWithNonStringChildren.d.ts +2 -0
- package/types/src/Clickable/Clickable.d.ts +12 -4
- package/types/src/Clickable/NavigationProvider.d.ts +26 -5
- package/types/src/CloseButton/CloseButton.d.ts +1 -1
- package/types/src/Code/Code.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +9 -5
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +8 -8
- package/types/src/Color/Swatch.d.ts +2 -2
- package/types/src/ColumnLayout/Column.d.ts +1 -1
- package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
- package/types/src/ColumnLayout/Row.d.ts +1 -1
- package/types/src/ComboBox/ComboBox.d.ts +7 -6
- package/types/src/ComboBox/Option.d.ts +3 -3
- package/types/src/Concertina/Concertina.d.ts +2 -2
- package/types/src/Concertina/Heading.d.ts +3 -3
- package/types/src/Concertina/Panel.d.ts +4 -4
- package/types/src/Concertina/types.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +5 -5
- package/types/src/Date/Date.d.ts +10 -10
- package/types/src/DefinitionList/DefinitionList.d.ts +2 -2
- package/types/src/DefinitionList/Description.d.ts +1 -1
- package/types/src/DefinitionList/Term.d.ts +1 -1
- package/types/src/Divider/Divider.d.ts +1 -1
- package/types/src/Dropdown/Dropdown.d.ts +10 -10
- package/types/src/DualListbox/DualListbox.d.ts +4 -4
- package/types/src/DualListbox/DualListboxContext.d.ts +7 -7
- package/types/src/DualListbox/Label.d.ts +2 -2
- package/types/src/DualListbox/Listbox.d.ts +4 -4
- package/types/src/DualListbox/ListboxContext.d.ts +3 -3
- package/types/src/DualListbox/Option.d.ts +2 -2
- package/types/src/DualListbox/ToolbarButton.d.ts +3 -3
- package/types/src/DualListbox/ToolbarContext.d.ts +3 -3
- package/types/src/EventListener/EventListener.d.ts +1 -1
- package/types/src/File/File.d.ts +8 -8
- package/types/src/File/Item.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +6 -6
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableList.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- package/types/src/Heading/Heading.d.ts +2 -2
- package/types/src/Image/Image.d.ts +2 -2
- package/types/src/JSONTree/JSONTree.d.ts +6 -6
- package/types/src/JSONTree/JSONTreeItem.d.ts +3 -3
- package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
- package/types/src/Layer/Layer.d.ts +3 -3
- package/types/src/Link/Link.d.ts +4 -4
- package/types/src/List/Item.d.ts +1 -1
- package/types/src/List/List.d.ts +3 -3
- package/types/src/Markdown/Markdown.d.ts +19 -13
- 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/MarkdownLink.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownList.d.ts +3 -3
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/Heading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +10 -10
- package/types/src/Menu/Menu.d.ts +9 -9
- package/types/src/Message/Link.d.ts +3 -3
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +2 -2
- package/types/src/MessageBar/docs/examples/Basic.d.ts +2 -0
- package/types/src/Modal/Body.d.ts +1 -1
- package/types/src/Modal/Footer.d.ts +1 -1
- package/types/src/Modal/Header.d.ts +1 -1
- package/types/src/Modal/Modal.d.ts +4 -4
- package/types/src/ModalLayer/ModalLayer.d.ts +3 -3
- package/types/src/Monogram/Monogram.d.ts +5 -5
- package/types/src/Multiselect/Compact.d.ts +2 -2
- package/types/src/Multiselect/Multiselect.d.ts +7 -7
- package/types/src/Multiselect/Normal.d.ts +2 -2
- package/types/src/Multiselect/Option.d.ts +3 -3
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -1
- package/types/src/Number/Number.d.ts +22 -22
- package/types/src/Paginator/Button.d.ts +15 -10
- package/types/src/Paginator/Compact.d.ts +4 -4
- package/types/src/Paginator/PageControl.d.ts +2 -2
- package/types/src/Paginator/PageSelect.d.ts +2 -2
- package/types/src/Paginator/Paginator.d.ts +2 -2
- package/types/src/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/Popover/Popover.d.ts +11 -11
- package/types/src/Popover/PopoverHitArea.d.ts +1 -1
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/RadioBar/Option.d.ts +8 -4
- package/types/src/RadioBar/RadioBar.d.ts +8 -8
- package/types/src/RadioList/Option.d.ts +1 -1
- package/types/src/RadioList/RadioList.d.ts +3 -3
- package/types/src/Resize/Resize.d.ts +4 -4
- package/types/src/Resize/docs/examples/Basic.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +7 -5
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -2
- package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +2 -2
- package/types/src/Scroll/Inner.d.ts +3 -3
- package/types/src/Scroll/Scroll.d.ts +2 -2
- package/types/src/Search/Option.d.ts +8 -8
- package/types/src/Search/Search.d.ts +4 -4
- package/types/src/Select/Option.d.ts +2 -2
- package/types/src/Select/OptionBase.d.ts +8 -8
- package/types/src/Select/Select.d.ts +5 -5
- package/types/src/Select/SelectAllOption.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +9 -8
- package/types/src/SidePanel/SidePanel.d.ts +3 -3
- package/types/src/Slider/Slider.d.ts +8 -8
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +2 -2
- package/types/src/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/StaticContent/StaticContent.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/Switch/Switch.d.ts +4 -8
- package/types/src/TabBar/Tab.d.ts +7 -8
- package/types/src/TabBar/TabBar.d.ts +5 -5
- package/types/src/TabLayout/Panel.d.ts +2 -2
- package/types/src/TabLayout/TabLayout.d.ts +3 -3
- package/types/src/Table/Body.d.ts +4 -8
- package/types/src/Table/Caption.d.ts +2 -2
- package/types/src/Table/Cell.d.ts +3 -3
- package/types/src/Table/DragHandle.d.ts +1 -1
- package/types/src/Table/Head.d.ts +6 -6
- package/types/src/Table/HeadCell.d.ts +9 -9
- package/types/src/Table/HeadDropdownCell.d.ts +11 -11
- package/types/src/Table/HeadInner.d.ts +5 -5
- package/types/src/Table/HeadTable.d.ts +2 -2
- package/types/src/Table/KeyboardSensor.d.ts +79 -0
- package/types/src/Table/Row.d.ts +12 -14
- package/types/src/Table/RowDragCell.d.ts +9 -40
- package/types/src/Table/Table.d.ts +12 -10
- package/types/src/Table/Toggle.d.ts +1 -1
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -1
- package/types/src/Text/Text.d.ts +13 -11
- package/types/src/TextArea/TextArea.d.ts +10 -10
- package/types/src/Tooltip/Tooltip.d.ts +9 -9
- package/types/src/TransitionOpen/TransitionOpen.d.ts +2 -2
- package/types/src/Tree/Tree.d.ts +3 -3
- package/types/src/Tree/TreeItem.d.ts +4 -4
- package/types/src/Typography/Typography.d.ts +5 -5
- package/types/src/WaitSpinner/WaitSpinner.d.ts +2 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -2
- package/types/src/useKeyPress/index.d.ts +2 -2
- package/types/src/utils/types.d.ts +4 -4
- package/types/src/Resize/docs/examples/Typical.d.ts +0 -2
package/Chip.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ G
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const a = require("react");
|
|
@@ -82,39 +82,44 @@
|
|
|
82
82
|
const d = require("@splunk/ui-utils/i18n");
|
|
83
83
|
// CONCATENATED MODULE: external "@splunk/ui-utils/color"
|
|
84
84
|
const f = require("@splunk/ui-utils/color");
|
|
85
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/format"
|
|
86
|
+
const v = require("@splunk/ui-utils/format");
|
|
85
87
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
-
const
|
|
88
|
+
const b = require("@splunk/themes");
|
|
89
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
90
|
+
const g = require("@splunk/react-ui/ScreenReaderContent");
|
|
91
|
+
var m = e.n(g);
|
|
87
92
|
// CONCATENATED MODULE: external "styled-components"
|
|
88
|
-
const
|
|
89
|
-
var
|
|
93
|
+
const h = require("styled-components");
|
|
94
|
+
var C = e.n(h);
|
|
90
95
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
91
|
-
const
|
|
92
|
-
var
|
|
96
|
+
const y = require("@splunk/react-ui/Clickable");
|
|
97
|
+
var x = e.n(y);
|
|
93
98
|
// CONCATENATED MODULE: ./src/Chip/ChipStyles.ts
|
|
94
|
-
var
|
|
99
|
+
var $ = C().div.withConfig({
|
|
95
100
|
displayName: "ChipStyles__StyledBasic",
|
|
96
101
|
componentId: "sc-1sd3tsh-0"
|
|
97
|
-
})([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", "
|
|
98
|
-
|
|
102
|
+
})([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", " ", " ", "" ], b.mixins.reset("inline-flex"), (0,
|
|
103
|
+
b.pickVariant)("$appearance", {
|
|
99
104
|
default: {
|
|
100
105
|
enterprise: {
|
|
101
|
-
dark:
|
|
102
|
-
light:
|
|
106
|
+
dark: b.variables.gray45,
|
|
107
|
+
light: b.variables.gray92
|
|
103
108
|
},
|
|
104
|
-
prisma:
|
|
109
|
+
prisma: b.variables.neutral100
|
|
105
110
|
},
|
|
106
111
|
info: {
|
|
107
|
-
enterprise:
|
|
112
|
+
enterprise: b.variables.infoColorL30
|
|
108
113
|
},
|
|
109
114
|
success: {
|
|
110
|
-
enterprise:
|
|
115
|
+
enterprise: b.variables.successColorL30
|
|
111
116
|
},
|
|
112
117
|
warning: {
|
|
113
|
-
enterprise:
|
|
118
|
+
enterprise: b.variables.warningColorL30
|
|
114
119
|
},
|
|
115
120
|
error: {
|
|
116
|
-
enterprise:
|
|
117
|
-
prisma:
|
|
121
|
+
enterprise: b.variables.errorColorL30,
|
|
122
|
+
prisma: b.variables.accentColorNegative
|
|
118
123
|
},
|
|
119
124
|
outline: {
|
|
120
125
|
prisma: "transparent"
|
|
@@ -123,198 +128,198 @@
|
|
|
123
128
|
var a = r.$backgroundColor;
|
|
124
129
|
return a;
|
|
125
130
|
}
|
|
126
|
-
}), (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
}), (0, b.pick)({
|
|
132
|
+
enterprise: (0, h.css)([ "color:", ";line-height:", ";margin:0 2px 2px 0;" ], b.variables.textGray, b.variables.lineHeight),
|
|
133
|
+
prisma: (0, h.css)([ "color:", ";line-height:16px;margin:1px;", "" ], (function(e) {
|
|
134
|
+
var r = e.$appearance;
|
|
135
|
+
return r === "error" ? b.variables.contentColorInverted : b.variables.contentColorDefault;
|
|
136
|
+
}), (function(e) {
|
|
132
137
|
var r = e.$appearance;
|
|
133
|
-
return r === "
|
|
138
|
+
return r === "outline" && (0, h.css)([ "border-color:", ";" ], b.variables.interactiveColorBorder);
|
|
134
139
|
}))
|
|
135
|
-
}), (0,
|
|
140
|
+
}), (0, b.pick)({
|
|
136
141
|
enterprise: {
|
|
137
|
-
comfortable: (0,
|
|
138
|
-
compact: (0,
|
|
142
|
+
comfortable: (0, h.css)([ "height:calc(", " - 6px);padding:4px 7px;" ], b.variables.inputHeight),
|
|
143
|
+
compact: (0, h.css)([ "height:calc(", " - 6px);padding:2px 4px;" ], b.variables.inputHeight)
|
|
139
144
|
},
|
|
140
145
|
prisma: {
|
|
141
|
-
comfortable: (0,
|
|
142
|
-
compact: (0,
|
|
146
|
+
comfortable: (0, h.css)([ "height:calc(", " - 8px);padding:7px 7px;font-size:", ";" ], b.variables.inputHeight, b.variables.fontSizeSmall),
|
|
147
|
+
compact: (0, h.css)([ "height:calc(", " - 8px);padding:3px 7px;font-size:", ";" ], b.variables.inputHeight, b.variables.fontSizeSmall)
|
|
143
148
|
}
|
|
144
149
|
}), (function(e) {
|
|
145
150
|
var r = e.$disabled;
|
|
146
|
-
return r && (0,
|
|
151
|
+
return r && (0, h.css)([ "background-color:", ";" ], (0, b.pickVariant)("$appearance", {
|
|
147
152
|
default: {
|
|
148
153
|
enterprise: {
|
|
149
154
|
dark: "rgba(0, 0, 0, 0.15)",
|
|
150
155
|
light: "rgba(0, 0, 0, 0.05)"
|
|
151
156
|
},
|
|
152
|
-
prisma:
|
|
157
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
153
158
|
},
|
|
154
159
|
info: {
|
|
155
|
-
enterprise:
|
|
160
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.infoColorL10, .3)
|
|
156
161
|
},
|
|
157
162
|
success: {
|
|
158
|
-
enterprise:
|
|
163
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.successColorL10, .3)
|
|
159
164
|
},
|
|
160
165
|
warning: {
|
|
161
|
-
enterprise:
|
|
166
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.warningColorL10, .3)
|
|
162
167
|
},
|
|
163
168
|
error: {
|
|
164
|
-
enterprise:
|
|
165
|
-
prisma:
|
|
169
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.errorColorL10, .3),
|
|
170
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
166
171
|
},
|
|
167
172
|
outline: {
|
|
168
|
-
prisma:
|
|
173
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
169
174
|
},
|
|
170
175
|
custom: {
|
|
171
176
|
enterprise: {
|
|
172
177
|
dark: "rgba(0, 0, 0, 0.15)",
|
|
173
178
|
light: "rgba(0, 0, 0, 0.05)"
|
|
174
179
|
},
|
|
175
|
-
prisma:
|
|
180
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
176
181
|
}
|
|
177
182
|
}));
|
|
178
183
|
}));
|
|
179
|
-
var
|
|
184
|
+
var k = C()($).withConfig({
|
|
180
185
|
displayName: "ChipStyles__Styled",
|
|
181
186
|
componentId: "sc-1sd3tsh-1"
|
|
182
187
|
})([ "align-items:center;" ]);
|
|
183
|
-
var
|
|
188
|
+
var S = C().div.withConfig({
|
|
184
189
|
displayName: "ChipStyles__StyledInner",
|
|
185
190
|
componentId: "sc-1sd3tsh-2"
|
|
186
|
-
})([ "", ";" ], (0,
|
|
187
|
-
enterprise: (0,
|
|
188
|
-
prisma: (0,
|
|
189
|
-
|
|
191
|
+
})([ "", ";" ], (0, b.pick)({
|
|
192
|
+
enterprise: (0, h.css)([ "display:flex;max-width:100%;" ]),
|
|
193
|
+
prisma: (0, h.css)([ "display:grid;max-width:100%;height:16px;column-gap:", ";", ";" ], (0,
|
|
194
|
+
b.pick)({
|
|
190
195
|
prisma: {
|
|
191
|
-
compact:
|
|
192
|
-
comfortable:
|
|
196
|
+
compact: b.variables.spacingXSmall,
|
|
197
|
+
comfortable: b.variables.spacingSmall
|
|
193
198
|
}
|
|
194
199
|
}), (function(e) {
|
|
195
200
|
var r = e.$icon, a = e.$removable;
|
|
196
|
-
var o = (0,
|
|
201
|
+
var o = (0, h.css)([ "grid-template-columns:1fr;" ]);
|
|
197
202
|
if (r && a) {
|
|
198
|
-
o = (0,
|
|
203
|
+
o = (0, h.css)([ "grid-template-columns:0fr 1fr 0fr;" ]);
|
|
199
204
|
} else if (r) {
|
|
200
|
-
o = (0,
|
|
205
|
+
o = (0, h.css)([ "grid-template-columns:0fr 1fr;" ]);
|
|
201
206
|
} else if (a) {
|
|
202
|
-
o = (0,
|
|
207
|
+
o = (0, h.css)([ "grid-template-columns:1fr 0fr;" ]);
|
|
203
208
|
}
|
|
204
209
|
return o;
|
|
205
210
|
}))
|
|
206
211
|
}));
|
|
207
|
-
var
|
|
212
|
+
var w = C().div.withConfig({
|
|
208
213
|
displayName: "ChipStyles__StyledIcon",
|
|
209
214
|
componentId: "sc-1sd3tsh-3"
|
|
210
|
-
})([ "", ";margin-right:", ";color:", ";" ], (0,
|
|
215
|
+
})([ "", ";margin-right:", ";color:", ";" ], (0, b.pick)({
|
|
211
216
|
prisma: {
|
|
212
|
-
compact: (0,
|
|
213
|
-
comfortable: (0,
|
|
217
|
+
compact: (0, h.css)([ "font-size:14px;display:inline-flex;svg{height:16px;vertical-align:baseline;}" ]),
|
|
218
|
+
comfortable: (0, h.css)([ "font-size:18px;display:inline-flex;align-self:center;svg{height:16px;vertical-align:baseline;}" ])
|
|
214
219
|
},
|
|
215
|
-
enterprise: (0,
|
|
216
|
-
}), (0,
|
|
220
|
+
enterprise: (0, h.css)([ "flex:0 0 auto;" ])
|
|
221
|
+
}), (0, b.pick)({
|
|
217
222
|
enterprise: "3px"
|
|
218
|
-
}), (0,
|
|
219
|
-
true:
|
|
223
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
224
|
+
true: b.variables.contentColorDisabled,
|
|
220
225
|
false: {
|
|
221
226
|
enterprise: function e(r) {
|
|
222
227
|
var a = r.$foregroundColor;
|
|
223
|
-
return a ||
|
|
228
|
+
return a || b.variables.contentColorDefault;
|
|
224
229
|
},
|
|
225
230
|
prisma: function e(r) {
|
|
226
231
|
var a = r.$foregroundColor, o = r.$appearance;
|
|
227
|
-
return a || (o === "error" ?
|
|
232
|
+
return a || (o === "error" ? b.variables.contentColorInverted : b.variables.contentColorDefault);
|
|
228
233
|
}
|
|
229
234
|
}
|
|
230
235
|
}));
|
|
231
|
-
var
|
|
236
|
+
var O = C().div.withConfig({
|
|
232
237
|
displayName: "ChipStyles__StyledLabel",
|
|
233
238
|
componentId: "sc-1sd3tsh-4"
|
|
234
|
-
})([ "", " ", ";color:", ";" ],
|
|
235
|
-
enterprise: (0,
|
|
236
|
-
}), (0,
|
|
237
|
-
true:
|
|
239
|
+
})([ "", " ", ";color:", ";" ], b.mixins.ellipsis(), (0, b.pick)({
|
|
240
|
+
enterprise: (0, h.css)([ "flex:0 1 auto;" ])
|
|
241
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
242
|
+
true: b.variables.contentColorDisabled,
|
|
238
243
|
false: {
|
|
239
244
|
enterprise: function e(r) {
|
|
240
245
|
var a = r.$appearance, o = r.$foregroundColor;
|
|
241
|
-
return o || (a === "default" || a === "outline" ?
|
|
246
|
+
return o || (a === "default" || a === "outline" ? b.variables.contentColorDefault : b.variables.gray30);
|
|
242
247
|
},
|
|
243
248
|
prisma: function e(r) {
|
|
244
249
|
var a = r.$appearance, o = r.$foregroundColor;
|
|
245
|
-
return o || (a === "error" ?
|
|
250
|
+
return o || (a === "error" ? b.variables.contentColorInverted : b.variables.contentColorActive);
|
|
246
251
|
}
|
|
247
252
|
}
|
|
248
253
|
}));
|
|
249
|
-
var
|
|
254
|
+
var R = C().span.withConfig({
|
|
250
255
|
displayName: "ChipStyles__StyledRemove",
|
|
251
256
|
componentId: "sc-1sd3tsh-5"
|
|
252
|
-
})([ "", ";" ], (0,
|
|
253
|
-
enterprise: (0,
|
|
254
|
-
|
|
257
|
+
})([ "", ";" ], (0, b.pick)({
|
|
258
|
+
enterprise: (0, h.css)([ "flex:0 0 auto;padding-left:", ";font-size:", ";color:", ";" ], b.variables.spacingQuarter, (0,
|
|
259
|
+
b.pick)({
|
|
255
260
|
compact: "9px",
|
|
256
261
|
comfortable: "10.5px"
|
|
257
|
-
}), (0,
|
|
258
|
-
true:
|
|
262
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
263
|
+
true: b.variables.contentColorDisabled,
|
|
259
264
|
false: {
|
|
260
265
|
enterprise: function e(r) {
|
|
261
266
|
var a = r.$foregroundColor, o = r.$appearance;
|
|
262
|
-
return a || (o === "default" || o === "outline" ?
|
|
267
|
+
return a || (o === "default" || o === "outline" ? b.variables.textGray : b.variables.gray30);
|
|
263
268
|
}
|
|
264
269
|
}
|
|
265
270
|
})),
|
|
266
|
-
prisma: (0,
|
|
267
|
-
|
|
271
|
+
prisma: (0, h.css)([ "font-size:", ";display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:12px;font-size:9px;color:", ";" ], (0,
|
|
272
|
+
b.pick)({
|
|
268
273
|
compact: "9px",
|
|
269
274
|
comfortable: "10.5px"
|
|
270
275
|
}), (function(e) {
|
|
271
276
|
var r = e.$disabled, a = e.$foregroundColor;
|
|
272
|
-
return r ?
|
|
277
|
+
return r ? b.variables.contentColorDisabled : a || "inherit";
|
|
273
278
|
}))
|
|
274
279
|
}));
|
|
275
|
-
var
|
|
280
|
+
var _ = C()($.withComponent(x())).withConfig({
|
|
276
281
|
displayName: "ChipStyles__StyledClickable",
|
|
277
282
|
componentId: "sc-1sd3tsh-6"
|
|
278
283
|
})([ "flex:0 1 auto;line-height:16px;cursor:pointer;&:focus{", ";}&:not([disabled]):hover{", ";}", ";" ], (0,
|
|
279
|
-
|
|
280
|
-
enterprise: (0,
|
|
281
|
-
prisma: (0,
|
|
284
|
+
b.pick)({
|
|
285
|
+
enterprise: (0, h.css)([ "box-shadow:", ";color:", ";" ], b.variables.focusShadow, b.variables.linkColor),
|
|
286
|
+
prisma: (0, h.css)([ "color:", ";", "{background-color:", ";box-shadow:0 0 0 3px ", ";}" ], b.variables.contentColorActive,
|
|
282
287
|
/* sc-sel */
|
|
283
|
-
|
|
284
|
-
}), (0,
|
|
285
|
-
enterprise: (0,
|
|
288
|
+
R, b.variables.interactiveColorOverlayHover, b.variables.focusColor)
|
|
289
|
+
}), (0, b.pick)({
|
|
290
|
+
enterprise: (0, h.css)([ "background-color:", ";", "{color:", ";}" ], (0, b.pickVariant)("$appearance", {
|
|
286
291
|
default: {
|
|
287
|
-
dark:
|
|
288
|
-
light:
|
|
292
|
+
dark: b.variables.gray30,
|
|
293
|
+
light: b.variables.gray96
|
|
289
294
|
},
|
|
290
|
-
info:
|
|
291
|
-
success:
|
|
292
|
-
warning:
|
|
293
|
-
error:
|
|
295
|
+
info: b.variables.infoColorL20,
|
|
296
|
+
success: b.variables.successColorL20,
|
|
297
|
+
warning: b.variables.warningColorL20,
|
|
298
|
+
error: b.variables.errorColorL20,
|
|
294
299
|
custom: {
|
|
295
|
-
dark:
|
|
296
|
-
light:
|
|
300
|
+
dark: b.variables.gray30,
|
|
301
|
+
light: b.variables.gray96
|
|
297
302
|
}
|
|
298
303
|
}),
|
|
299
304
|
/* sc-sel */
|
|
300
|
-
|
|
305
|
+
R, (function(e) {
|
|
301
306
|
var r = e.$foregroundColor;
|
|
302
|
-
return r ||
|
|
307
|
+
return r || b.variables.linkColor;
|
|
303
308
|
})),
|
|
304
|
-
prisma: (0,
|
|
309
|
+
prisma: (0, h.css)([ "color:", ";", "{background-color:", ";", ";}" ], b.variables.contentColorActive,
|
|
305
310
|
/* sc-sel */
|
|
306
|
-
|
|
311
|
+
R, b.variables.interactiveColorOverlayHover, (function(e) {
|
|
307
312
|
var r = e.$appearance;
|
|
308
|
-
return r === "error" && (0,
|
|
313
|
+
return r === "error" && (0, h.css)([ "color:", ";" ], b.variables.contentColorInverted);
|
|
309
314
|
}))
|
|
310
|
-
}), (0,
|
|
311
|
-
prisma: (0,
|
|
315
|
+
}), (0, b.pick)({
|
|
316
|
+
prisma: (0, h.css)([ "&:not([disabled]):active ", "{background-color:", ";}" ],
|
|
312
317
|
/* sc-sel */
|
|
313
|
-
|
|
318
|
+
R, b.variables.interactiveColorOverlayActive)
|
|
314
319
|
}));
|
|
315
320
|
// CONCATENATED MODULE: ./src/Chip/Chip.tsx
|
|
316
|
-
function
|
|
317
|
-
|
|
321
|
+
function j() {
|
|
322
|
+
j = Object.assign || function(e) {
|
|
318
323
|
for (var r = 1; r < arguments.length; r++) {
|
|
319
324
|
var a = arguments[r];
|
|
320
325
|
for (var o in a) {
|
|
@@ -325,30 +330,30 @@
|
|
|
325
330
|
}
|
|
326
331
|
return e;
|
|
327
332
|
};
|
|
328
|
-
return
|
|
333
|
+
return j.apply(this, arguments);
|
|
329
334
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
335
|
+
function q(e, r) {
|
|
336
|
+
return L(e) || D(e, r) || I(e, r) || E();
|
|
332
337
|
}
|
|
333
|
-
function
|
|
338
|
+
function E() {
|
|
334
339
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
335
340
|
}
|
|
336
|
-
function
|
|
341
|
+
function I(e, r) {
|
|
337
342
|
if (!e) return;
|
|
338
|
-
if (typeof e === "string") return
|
|
343
|
+
if (typeof e === "string") return A(e, r);
|
|
339
344
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
340
345
|
if (a === "Object" && e.constructor) a = e.constructor.name;
|
|
341
346
|
if (a === "Map" || a === "Set") return Array.from(e);
|
|
342
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
|
347
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return A(e, r);
|
|
343
348
|
}
|
|
344
|
-
function
|
|
349
|
+
function A(e, r) {
|
|
345
350
|
if (r == null || r > e.length) r = e.length;
|
|
346
351
|
for (var a = 0, o = new Array(r); a < r; a++) {
|
|
347
352
|
o[a] = e[a];
|
|
348
353
|
}
|
|
349
354
|
return o;
|
|
350
355
|
}
|
|
351
|
-
function
|
|
356
|
+
function D(e, r) {
|
|
352
357
|
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
353
358
|
var a = [];
|
|
354
359
|
var o = true;
|
|
@@ -371,12 +376,12 @@
|
|
|
371
376
|
}
|
|
372
377
|
return a;
|
|
373
378
|
}
|
|
374
|
-
function
|
|
379
|
+
function L(e) {
|
|
375
380
|
if (Array.isArray(e)) return e;
|
|
376
381
|
}
|
|
377
|
-
function
|
|
382
|
+
function z(e, r) {
|
|
378
383
|
if (e == null) return {};
|
|
379
|
-
var a =
|
|
384
|
+
var a = N(e, r);
|
|
380
385
|
var o, n;
|
|
381
386
|
if (Object.getOwnPropertySymbols) {
|
|
382
387
|
var t = Object.getOwnPropertySymbols(e);
|
|
@@ -389,7 +394,7 @@
|
|
|
389
394
|
}
|
|
390
395
|
return a;
|
|
391
396
|
}
|
|
392
|
-
function
|
|
397
|
+
function N(e, r) {
|
|
393
398
|
if (e == null) return {};
|
|
394
399
|
var a = {};
|
|
395
400
|
var o = Object.keys(e);
|
|
@@ -401,7 +406,7 @@
|
|
|
401
406
|
}
|
|
402
407
|
return a;
|
|
403
408
|
}
|
|
404
|
-
var
|
|
409
|
+
var P = {
|
|
405
410
|
appearance: l().oneOf([ "info", "success", "warning", "error", "outline" ]),
|
|
406
411
|
backgroundColor: l().string,
|
|
407
412
|
children: l().node.isRequired,
|
|
@@ -413,14 +418,14 @@
|
|
|
413
418
|
/** Includes this value in `onRequestRemove` callbacks. */
|
|
414
419
|
value: l().any
|
|
415
420
|
};
|
|
416
|
-
var
|
|
421
|
+
var T = {
|
|
417
422
|
disabled: false
|
|
418
423
|
};
|
|
419
|
-
function
|
|
424
|
+
function H(e) {
|
|
420
425
|
return !!e.onRequestRemove;
|
|
421
426
|
}
|
|
422
|
-
function
|
|
423
|
-
var r = e.appearance, a = e.backgroundColor, o = e.disabled, n = e.foregroundColor, t = e.icon, i =
|
|
427
|
+
function B(e) {
|
|
428
|
+
var r = e.appearance, a = e.backgroundColor, o = e.disabled, n = e.foregroundColor, t = e.icon, i = z(e, [ "appearance", "backgroundColor", "disabled", "foregroundColor", "icon" ]);
|
|
424
429
|
// Validate that the color being rendered into the CSS is restricted to only values that are of CSS type <color>.
|
|
425
430
|
var l = n && (0, f.isCSSColor)(n) ? n : undefined;
|
|
426
431
|
var s = a && (0, f.isCSSColor)(a) ? a : undefined;
|
|
@@ -434,83 +439,87 @@
|
|
|
434
439
|
};
|
|
435
440
|
return [ c, i ];
|
|
436
441
|
}
|
|
437
|
-
function
|
|
438
|
-
var r =
|
|
439
|
-
var s = i.$appearance, p = i.$foregroundColor, f = i.disabled,
|
|
440
|
-
var
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
function V(e) {
|
|
443
|
+
var r = B(e), n = q(r, 2), i = n[0], l = n[1];
|
|
444
|
+
var s = i.$appearance, p = i.$foregroundColor, f = i.disabled, g = i.icon, h = z(i, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
445
|
+
var C = l.children, y = l.elementRef, x = l.onRequestRemove, $ = l.value, k = z(l, [ "children", "elementRef", "onRequestRemove", "value" ]);
|
|
446
|
+
var E = (0, b.useSplunkTheme)(), I = E.isEnterprise;
|
|
447
|
+
var A = typeof C === "string";
|
|
448
|
+
var D = A ? (0, v.sprintf)((0, d._)("Remove %(children)s"), {
|
|
449
|
+
children: C
|
|
450
|
+
}) : (0, d._)("Remove");
|
|
451
|
+
var L = (0, a.useCallback)((function(e) {
|
|
452
|
+
x(e, {
|
|
453
|
+
value: $
|
|
445
454
|
});
|
|
446
|
-
}), [
|
|
455
|
+
}), [ x, $ ]);
|
|
447
456
|
|
|
448
|
-
return o().createElement(
|
|
457
|
+
return o().createElement(_, j({
|
|
449
458
|
$appearance: s,
|
|
450
459
|
$disabled: f,
|
|
451
460
|
$foregroundColor: p,
|
|
452
|
-
"data-test-value":
|
|
461
|
+
"data-test-value": $,
|
|
453
462
|
disabled: f,
|
|
454
|
-
elementRef:
|
|
455
|
-
onClick:
|
|
456
|
-
},
|
|
457
|
-
$icon: !!
|
|
463
|
+
elementRef: y,
|
|
464
|
+
onClick: L
|
|
465
|
+
}, h, t()(k, Object.keys(P))), o().createElement(S, {
|
|
466
|
+
$icon: !!g,
|
|
458
467
|
$removable: true
|
|
459
|
-
},
|
|
468
|
+
}, o().createElement(m(), null, D), g && o().createElement(w, {
|
|
460
469
|
$appearance: s,
|
|
461
470
|
$disabled: f,
|
|
462
471
|
$foregroundColor: p
|
|
463
|
-
},
|
|
472
|
+
}, g), o().createElement(O, {
|
|
464
473
|
"data-test": "label",
|
|
474
|
+
"aria-hidden": A ? true : undefined,
|
|
465
475
|
$appearance: s,
|
|
466
476
|
$disabled: f,
|
|
467
477
|
$foregroundColor: p
|
|
468
|
-
},
|
|
478
|
+
}, C), o().createElement(R, {
|
|
469
479
|
$appearance: s,
|
|
470
480
|
$disabled: f,
|
|
471
481
|
$foregroundColor: p
|
|
472
482
|
}, I ? o().createElement(u(), {
|
|
473
483
|
"data-test": "cross",
|
|
474
484
|
hideDefaultTooltip: true,
|
|
475
|
-
screenReaderText:
|
|
485
|
+
screenReaderText: null,
|
|
476
486
|
size: .85
|
|
477
487
|
}) : o().createElement(c(), {
|
|
478
|
-
"aria-label": (0, d._)("Remove"),
|
|
479
488
|
"data-test": "cross",
|
|
480
489
|
height: "20px",
|
|
481
490
|
width: "20px"
|
|
482
491
|
}))));
|
|
483
492
|
}
|
|
484
|
-
function
|
|
485
|
-
var r =
|
|
486
|
-
var l = n.$appearance, s = n.$foregroundColor, c = n.disabled, p = n.icon, u =
|
|
487
|
-
var d = i.children, f = i.elementRef, v =
|
|
493
|
+
function M(e) {
|
|
494
|
+
var r = B(e), a = q(r, 2), n = a[0], i = a[1];
|
|
495
|
+
var l = n.$appearance, s = n.$foregroundColor, c = n.disabled, p = n.icon, u = z(n, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
496
|
+
var d = i.children, f = i.elementRef, v = z(i, [ "children", "elementRef" ]);
|
|
488
497
|
|
|
489
|
-
return o().createElement(
|
|
498
|
+
return o().createElement(k, j({
|
|
490
499
|
$appearance: l,
|
|
491
500
|
$disabled: c,
|
|
492
501
|
ref: f
|
|
493
|
-
}, u, t()(v, Object.keys(
|
|
502
|
+
}, u, t()(v, Object.keys(P))), o().createElement(S, {
|
|
494
503
|
$icon: !!p,
|
|
495
504
|
$removable: false
|
|
496
|
-
}, p && o().createElement(
|
|
505
|
+
}, p && o().createElement(w, {
|
|
497
506
|
$appearance: l,
|
|
498
507
|
$disabled: c,
|
|
499
508
|
$foregroundColor: s
|
|
500
|
-
}, p), o().createElement(
|
|
509
|
+
}, p), o().createElement(O, {
|
|
501
510
|
"data-test": "label",
|
|
502
511
|
$appearance: l,
|
|
503
512
|
$disabled: c,
|
|
504
513
|
$foregroundColor: s
|
|
505
514
|
}, d)));
|
|
506
515
|
}
|
|
507
|
-
function
|
|
516
|
+
function W(e) {
|
|
508
517
|
// @docs-props-type ChipPropsBase
|
|
509
|
-
return
|
|
518
|
+
return H(e) ? o().createElement(V, e) : o().createElement(M, e);
|
|
510
519
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
/* harmony default export */ const
|
|
520
|
+
W.propTypes = P;
|
|
521
|
+
W.defaultProps = T;
|
|
522
|
+
/* harmony default export */ const G = W;
|
|
514
523
|
// CONCATENATED MODULE: ./src/Chip/index.ts
|
|
515
524
|
module.exports = r;
|
|
516
525
|
/******/})();
|