@elastic/eui 90.0.0 → 90.0.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.
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +67 -81
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -102
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +11 -90
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/es/components/combo_box/combo_box.js +1 -1
- package/es/components/selectable/selectable.js +16 -1
- package/es/components/selectable/selectable_list/selectable_list.js +227 -78
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/es/components/text_truncate/text_truncate.js +33 -10
- package/eui.d.ts +381 -68
- package/i18ntokens.json +38 -38
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -104
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -89
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/lib/components/combo_box/combo_box.js +1 -1
- package/lib/components/selectable/selectable.js +16 -1
- package/lib/components/selectable/selectable_list/selectable_list.js +227 -78
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/lib/components/text_truncate/text_truncate.js +32 -9
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -23
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -10
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +199 -76
- package/optimize/es/components/text_truncate/text_truncate.js +26 -9
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -26
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +9 -9
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +199 -76
- package/optimize/lib/components/text_truncate/text_truncate.js +25 -8
- package/package.json +1 -1
- package/test-env/components/auto_sizer/auto_sizer.js +10 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -105
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -89
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/test-env/components/combo_box/combo_box.js +1 -1
- package/test-env/components/selectable/selectable.js +16 -1
- package/test-env/components/selectable/selectable_list/selectable_list.js +227 -78
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/test-env/components/text_truncate/text_truncate.js +32 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["isSubItem", "title", "titleElement", "icon", "iconProps", "items", "isCollapsible", "accordionProps", "children"],
|
|
1
|
+
var _excluded = ["isSubItem", "title", "titleElement", "icon", "iconProps", "href", "linkProps", "items", "isCollapsible", "accordionProps", "children"],
|
|
2
2
|
_excluded2 = ["renderItem", "className"],
|
|
3
3
|
_excluded3 = ["items", "isSubItem", "isGroup", "className"],
|
|
4
4
|
_excluded4 = ["className"];
|
|
@@ -31,12 +31,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
31
31
|
* determine whether to render an accordion or a link
|
|
32
32
|
*/
|
|
33
33
|
var EuiCollapsibleNavItemDisplay = function EuiCollapsibleNavItemDisplay(_ref) {
|
|
34
|
-
var _props$linkProps;
|
|
35
34
|
var isSubItem = _ref.isSubItem,
|
|
36
35
|
title = _ref.title,
|
|
37
36
|
titleElement = _ref.titleElement,
|
|
38
37
|
icon = _ref.icon,
|
|
39
38
|
iconProps = _ref.iconProps,
|
|
39
|
+
href = _ref.href,
|
|
40
|
+
linkProps = _ref.linkProps,
|
|
40
41
|
items = _ref.items,
|
|
41
42
|
_ref$isCollapsible = _ref.isCollapsible,
|
|
42
43
|
isCollapsible = _ref$isCollapsible === void 0 ? true : _ref$isCollapsible,
|
|
@@ -49,7 +50,7 @@ var EuiCollapsibleNavItemDisplay = function EuiCollapsibleNavItemDisplay(_ref) {
|
|
|
49
50
|
icon: icon,
|
|
50
51
|
iconProps: iconProps
|
|
51
52
|
});
|
|
52
|
-
if (items
|
|
53
|
+
if (items) {
|
|
53
54
|
if (isCollapsible) {
|
|
54
55
|
return ___EmotionJSX(EuiCollapsibleNavAccordion, _extends({
|
|
55
56
|
buttonContent: headerContent,
|
|
@@ -67,11 +68,14 @@ var EuiCollapsibleNavItemDisplay = function EuiCollapsibleNavItemDisplay(_ref) {
|
|
|
67
68
|
}));
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
return ___EmotionJSX(EuiCollapsibleNavLink, _extends({
|
|
71
|
+
return ___EmotionJSX(EuiCollapsibleNavLink, _extends({
|
|
72
|
+
href: href,
|
|
73
|
+
linkProps: linkProps
|
|
74
|
+
}, props, {
|
|
71
75
|
// EuiLink ExclusiveUnion type shenanigans
|
|
72
76
|
isSubItem: isSubItem,
|
|
73
77
|
isNotAccordion: true,
|
|
74
|
-
isInteractive: !!(
|
|
78
|
+
isInteractive: !!(href || props.onClick || linkProps !== null && linkProps !== void 0 && linkProps.onClick)
|
|
75
79
|
}), headerContent);
|
|
76
80
|
};
|
|
77
81
|
|
|
@@ -79,6 +83,15 @@ var EuiCollapsibleNavItemDisplay = function EuiCollapsibleNavItemDisplay(_ref) {
|
|
|
79
83
|
* Internal subcomponent for title display
|
|
80
84
|
*/
|
|
81
85
|
EuiCollapsibleNavItemDisplay.propTypes = {
|
|
86
|
+
className: PropTypes.string,
|
|
87
|
+
"aria-label": PropTypes.string,
|
|
88
|
+
"data-test-subj": PropTypes.string,
|
|
89
|
+
css: PropTypes.any,
|
|
90
|
+
/**
|
|
91
|
+
* Highlights whether an item is currently selected, e.g.
|
|
92
|
+
* if the user is on the same page as the nav link
|
|
93
|
+
*/
|
|
94
|
+
isSelected: PropTypes.bool,
|
|
82
95
|
/**
|
|
83
96
|
* Required text to render as the nav item title
|
|
84
97
|
*/
|
|
@@ -97,47 +110,42 @@ EuiCollapsibleNavItemDisplay.propTypes = {
|
|
|
97
110
|
* Optional props to pass to the title icon
|
|
98
111
|
*/
|
|
99
112
|
iconProps: PropTypes.any,
|
|
100
|
-
className: PropTypes.string,
|
|
101
|
-
"aria-label": PropTypes.string,
|
|
102
|
-
"data-test-subj": PropTypes.string,
|
|
103
|
-
css: PropTypes.any,
|
|
104
113
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
* The nav item link.
|
|
115
|
+
*
|
|
116
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
117
|
+
* will render as an non-interactive `<span>`.
|
|
118
|
+
*
|
|
119
|
+
* Should not be used together with `items`, as the title will
|
|
120
|
+
* trigger the accordion collapse/expand action instead of a link.
|
|
121
|
+
*/
|
|
109
122
|
href: PropTypes.string,
|
|
110
123
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
124
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
125
|
+
*/
|
|
126
|
+
linkProps: PropTypes.any,
|
|
127
|
+
/**
|
|
128
|
+
* Will render either an accordion or group of nested child item links.
|
|
129
|
+
*
|
|
130
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
131
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
132
|
+
*/
|
|
116
133
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
117
134
|
renderItem: PropTypes.func
|
|
118
135
|
}).isRequired),
|
|
119
136
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
137
|
+
* If set to false, will (visually) render an always-open accordion that cannot
|
|
138
|
+
* be toggled closed. Ignored if `items` is not passed.
|
|
139
|
+
*
|
|
140
|
+
* @default true
|
|
141
|
+
*/
|
|
125
142
|
isCollapsible: PropTypes.bool,
|
|
126
143
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
144
|
+
* If `items` is specified, and `isCollapsible` is not set to false, you may
|
|
145
|
+
* use this prop to pass any prop that `EuiAccordion` accepts, including props
|
|
146
|
+
* that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
|
|
147
|
+
*/
|
|
131
148
|
accordionProps: PropTypes.any,
|
|
132
|
-
/**
|
|
133
|
-
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
134
|
-
*/
|
|
135
|
-
linkProps: PropTypes.any,
|
|
136
|
-
/**
|
|
137
|
-
* Highlights whether an item is currently selected, e.g.
|
|
138
|
-
* if the user is on the same page as the nav link
|
|
139
|
-
*/
|
|
140
|
-
isSelected: PropTypes.bool,
|
|
141
149
|
/**
|
|
142
150
|
* Determines whether the item should render as a top-level nav item
|
|
143
151
|
* or a nested nav subitem. Set internally by EUI
|
|
@@ -184,6 +192,15 @@ export var EuiCollapsibleNavSubItem = function EuiCollapsibleNavSubItem(_ref3) {
|
|
|
184
192
|
* Used by both `EuiCollapsibleNavGroup` and `EuiCollapsibleNavAccordion`
|
|
185
193
|
*/
|
|
186
194
|
EuiCollapsibleNavSubItem.propTypes = {
|
|
195
|
+
className: PropTypes.string,
|
|
196
|
+
"aria-label": PropTypes.string,
|
|
197
|
+
"data-test-subj": PropTypes.string,
|
|
198
|
+
css: PropTypes.any,
|
|
199
|
+
/**
|
|
200
|
+
* Highlights whether an item is currently selected, e.g.
|
|
201
|
+
* if the user is on the same page as the nav link
|
|
202
|
+
*/
|
|
203
|
+
isSelected: PropTypes.bool,
|
|
187
204
|
/**
|
|
188
205
|
* Required text to render as the nav item title
|
|
189
206
|
*/
|
|
@@ -202,45 +219,40 @@ EuiCollapsibleNavSubItem.propTypes = {
|
|
|
202
219
|
* Optional props to pass to the title icon
|
|
203
220
|
*/
|
|
204
221
|
iconProps: PropTypes.any,
|
|
205
|
-
className: PropTypes.string,
|
|
206
|
-
"aria-label": PropTypes.string,
|
|
207
|
-
"data-test-subj": PropTypes.string,
|
|
208
|
-
css: PropTypes.any,
|
|
209
222
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
223
|
+
* The nav item link.
|
|
224
|
+
*
|
|
225
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
226
|
+
* will render as an non-interactive `<span>`.
|
|
227
|
+
*
|
|
228
|
+
* Should not be used together with `items`, as the title will
|
|
229
|
+
* trigger the accordion collapse/expand action instead of a link.
|
|
230
|
+
*/
|
|
214
231
|
href: PropTypes.string,
|
|
215
232
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
233
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
234
|
+
*/
|
|
235
|
+
linkProps: PropTypes.any,
|
|
236
|
+
/**
|
|
237
|
+
* Will render either an accordion or group of nested child item links.
|
|
238
|
+
*
|
|
239
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
240
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
241
|
+
*/
|
|
221
242
|
items: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
222
243
|
/**
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
244
|
+
* If set to false, will (visually) render an always-open accordion that cannot
|
|
245
|
+
* be toggled closed. Ignored if `items` is not passed.
|
|
246
|
+
*
|
|
247
|
+
* @default true
|
|
248
|
+
*/
|
|
228
249
|
isCollapsible: PropTypes.bool,
|
|
229
250
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
251
|
+
* If `items` is specified, and `isCollapsible` is not set to false, you may
|
|
252
|
+
* use this prop to pass any prop that `EuiAccordion` accepts, including props
|
|
253
|
+
* that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
|
|
254
|
+
*/
|
|
234
255
|
accordionProps: PropTypes.any,
|
|
235
|
-
/**
|
|
236
|
-
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
237
|
-
*/
|
|
238
|
-
linkProps: PropTypes.any,
|
|
239
|
-
/**
|
|
240
|
-
* Highlights whether an item is currently selected, e.g.
|
|
241
|
-
* if the user is on the same page as the nav link
|
|
242
|
-
*/
|
|
243
|
-
isSelected: PropTypes.bool,
|
|
244
256
|
renderItem: PropTypes.func
|
|
245
257
|
};
|
|
246
258
|
export var EuiCollapsibleNavSubItems = function EuiCollapsibleNavSubItems(_ref4) {
|
|
@@ -288,6 +300,15 @@ EuiCollapsibleNavSubItems.propTypes = {
|
|
|
288
300
|
*/
|
|
289
301
|
isSubItem: PropTypes.bool,
|
|
290
302
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
303
|
+
className: PropTypes.string,
|
|
304
|
+
"aria-label": PropTypes.string,
|
|
305
|
+
"data-test-subj": PropTypes.string,
|
|
306
|
+
css: PropTypes.any,
|
|
307
|
+
/**
|
|
308
|
+
* Highlights whether an item is currently selected, e.g.
|
|
309
|
+
* if the user is on the same page as the nav link
|
|
310
|
+
*/
|
|
311
|
+
isSelected: PropTypes.bool,
|
|
291
312
|
/**
|
|
292
313
|
* Required text to render as the nav item title
|
|
293
314
|
*/
|
|
@@ -306,45 +327,40 @@ EuiCollapsibleNavSubItems.propTypes = {
|
|
|
306
327
|
* Optional props to pass to the title icon
|
|
307
328
|
*/
|
|
308
329
|
iconProps: PropTypes.any,
|
|
309
|
-
className: PropTypes.string,
|
|
310
|
-
"aria-label": PropTypes.string,
|
|
311
|
-
"data-test-subj": PropTypes.string,
|
|
312
|
-
css: PropTypes.any,
|
|
313
330
|
/**
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
331
|
+
* The nav item link.
|
|
332
|
+
*
|
|
333
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
334
|
+
* will render as an non-interactive `<span>`.
|
|
335
|
+
*
|
|
336
|
+
* Should not be used together with `items`, as the title will
|
|
337
|
+
* trigger the accordion collapse/expand action instead of a link.
|
|
338
|
+
*/
|
|
318
339
|
href: PropTypes.string,
|
|
319
340
|
/**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
341
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
342
|
+
*/
|
|
343
|
+
linkProps: PropTypes.any,
|
|
344
|
+
/**
|
|
345
|
+
* Will render either an accordion or group of nested child item links.
|
|
346
|
+
*
|
|
347
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
348
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
349
|
+
*/
|
|
325
350
|
items: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
326
351
|
/**
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
352
|
+
* If set to false, will (visually) render an always-open accordion that cannot
|
|
353
|
+
* be toggled closed. Ignored if `items` is not passed.
|
|
354
|
+
*
|
|
355
|
+
* @default true
|
|
356
|
+
*/
|
|
332
357
|
isCollapsible: PropTypes.bool,
|
|
333
358
|
/**
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
359
|
+
* If `items` is specified, and `isCollapsible` is not set to false, you may
|
|
360
|
+
* use this prop to pass any prop that `EuiAccordion` accepts, including props
|
|
361
|
+
* that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
|
|
362
|
+
*/
|
|
338
363
|
accordionProps: PropTypes.any,
|
|
339
|
-
/**
|
|
340
|
-
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
341
|
-
*/
|
|
342
|
-
linkProps: PropTypes.any,
|
|
343
|
-
/**
|
|
344
|
-
* Highlights whether an item is currently selected, e.g.
|
|
345
|
-
* if the user is on the same page as the nav link
|
|
346
|
-
*/
|
|
347
|
-
isSelected: PropTypes.bool,
|
|
348
364
|
renderItem: PropTypes.func
|
|
349
365
|
}).isRequired).isRequired,
|
|
350
366
|
isGroup: PropTypes.bool
|
|
@@ -365,6 +381,15 @@ export var EuiCollapsibleNavItem = function EuiCollapsibleNavItem(_ref5) {
|
|
|
365
381
|
}));
|
|
366
382
|
};
|
|
367
383
|
EuiCollapsibleNavItem.propTypes = {
|
|
384
|
+
className: PropTypes.string,
|
|
385
|
+
"aria-label": PropTypes.string,
|
|
386
|
+
"data-test-subj": PropTypes.string,
|
|
387
|
+
css: PropTypes.any,
|
|
388
|
+
/**
|
|
389
|
+
* Highlights whether an item is currently selected, e.g.
|
|
390
|
+
* if the user is on the same page as the nav link
|
|
391
|
+
*/
|
|
392
|
+
isSelected: PropTypes.bool,
|
|
368
393
|
/**
|
|
369
394
|
* Required text to render as the nav item title
|
|
370
395
|
*/
|
|
@@ -383,45 +408,40 @@ EuiCollapsibleNavItem.propTypes = {
|
|
|
383
408
|
* Optional props to pass to the title icon
|
|
384
409
|
*/
|
|
385
410
|
iconProps: PropTypes.any,
|
|
386
|
-
className: PropTypes.string,
|
|
387
|
-
"aria-label": PropTypes.string,
|
|
388
|
-
"data-test-subj": PropTypes.string,
|
|
389
|
-
css: PropTypes.any,
|
|
390
411
|
/**
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
412
|
+
* The nav item link.
|
|
413
|
+
*
|
|
414
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
415
|
+
* will render as an non-interactive `<span>`.
|
|
416
|
+
*
|
|
417
|
+
* Should not be used together with `items`, as the title will
|
|
418
|
+
* trigger the accordion collapse/expand action instead of a link.
|
|
419
|
+
*/
|
|
395
420
|
href: PropTypes.string,
|
|
396
421
|
/**
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
422
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
423
|
+
*/
|
|
424
|
+
linkProps: PropTypes.any,
|
|
425
|
+
/**
|
|
426
|
+
* Will render either an accordion or group of nested child item links.
|
|
427
|
+
*
|
|
428
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
429
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
430
|
+
*/
|
|
402
431
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
403
432
|
renderItem: PropTypes.func
|
|
404
433
|
}).isRequired),
|
|
405
434
|
/**
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
435
|
+
* If set to false, will (visually) render an always-open accordion that cannot
|
|
436
|
+
* be toggled closed. Ignored if `items` is not passed.
|
|
437
|
+
*
|
|
438
|
+
* @default true
|
|
439
|
+
*/
|
|
411
440
|
isCollapsible: PropTypes.bool,
|
|
412
441
|
/**
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
accordionProps: PropTypes.any
|
|
418
|
-
/**
|
|
419
|
-
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
420
|
-
*/
|
|
421
|
-
linkProps: PropTypes.any,
|
|
422
|
-
/**
|
|
423
|
-
* Highlights whether an item is currently selected, e.g.
|
|
424
|
-
* if the user is on the same page as the nav link
|
|
425
|
-
*/
|
|
426
|
-
isSelected: PropTypes.bool
|
|
442
|
+
* If `items` is specified, and `isCollapsible` is not set to false, you may
|
|
443
|
+
* use this prop to pass any prop that `EuiAccordion` accepts, including props
|
|
444
|
+
* that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
|
|
445
|
+
*/
|
|
446
|
+
accordionProps: PropTypes.any
|
|
427
447
|
};
|
|
@@ -67,16 +67,6 @@ EuiCollapsibleNavLink.propTypes = {
|
|
|
67
67
|
"aria-label": PropTypes.string,
|
|
68
68
|
"data-test-subj": PropTypes.string,
|
|
69
69
|
css: PropTypes.any,
|
|
70
|
-
/**
|
|
71
|
-
* The nav item link.
|
|
72
|
-
* If not included, and no `onClick` is specified, the nav item
|
|
73
|
-
* will render as an non-interactive `<span>`.
|
|
74
|
-
*/
|
|
75
|
-
href: PropTypes.string,
|
|
76
|
-
/**
|
|
77
|
-
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
78
|
-
*/
|
|
79
|
-
linkProps: PropTypes.any,
|
|
80
70
|
/**
|
|
81
71
|
* Highlights whether an item is currently selected, e.g.
|
|
82
72
|
* if the user is on the same page as the nav link
|
|
@@ -730,7 +730,7 @@ EuiComboBox.propTypes = {
|
|
|
730
730
|
/**
|
|
731
731
|
* By default, EuiComboBox will truncate option labels at the end of
|
|
732
732
|
* the string. You can use pass in a custom truncation configuration that
|
|
733
|
-
* accepts any
|
|
733
|
+
* accepts any [EuiTextTruncate](/#/utilities/text-truncation) prop,
|
|
734
734
|
* except for `text` and `children`.
|
|
735
735
|
*
|
|
736
736
|
* Note: when searching, custom truncation props are ignored. The highlighted search
|
|
@@ -625,7 +625,22 @@ EuiSelectable.propTypes = {
|
|
|
625
625
|
* Option data to pass through to the `renderOptions` element.
|
|
626
626
|
* Bypass `EuiSelectableItem` and avoid DOM attribute warnings.
|
|
627
627
|
*/
|
|
628
|
-
data: PropTypes.shape({})
|
|
628
|
+
data: PropTypes.shape({}),
|
|
629
|
+
/**
|
|
630
|
+
* How to handle long text within the item.
|
|
631
|
+
* Wrapping only works if `isVirtualization` is false.
|
|
632
|
+
* @default 'truncate'
|
|
633
|
+
*/
|
|
634
|
+
textWrap: PropTypes.oneOf(["truncate", "wrap"]),
|
|
635
|
+
/**
|
|
636
|
+
* If textWrap is set to `truncate`, you can pass a custom truncation configuration
|
|
637
|
+
* that accepts any [EuiTextTruncate](/#/utilities/text-truncation) prop except for
|
|
638
|
+
* `text` and `children`.
|
|
639
|
+
*
|
|
640
|
+
* Note: when searching, custom truncation props are ignored. The highlighted search
|
|
641
|
+
* text will always take precedence.
|
|
642
|
+
*/
|
|
643
|
+
truncationProps: PropTypes.any
|
|
629
644
|
}).isRequired).isRequired,
|
|
630
645
|
/**
|
|
631
646
|
* Passes back the altered `options` array with selected options having `checked: 'on'`.
|