@elastic/eui 93.1.0 → 93.1.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/tree_view/tree_view.js +4 -2
- package/es/components/tree_view/{_tree_view_item.js → tree_view_item.js} +29 -1
- package/{optimize/es/components/tree_view/_tree_view_item.styles.js → es/components/tree_view/tree_view_item.styles.js} +10 -1
- package/eui.d.ts +36 -6
- package/i18ntokens.json +2 -2
- package/lib/components/tree_view/tree_view.js +4 -2
- package/lib/components/tree_view/{_tree_view_item.js → tree_view_item.js} +29 -1
- package/lib/components/tree_view/tree_view_item.styles.js +52 -0
- package/optimize/es/components/tree_view/tree_view.js +4 -2
- package/optimize/es/components/tree_view/{_tree_view_item.js → tree_view_item.js} +1 -1
- package/{es/components/tree_view/_tree_view_item.styles.js → optimize/es/components/tree_view/tree_view_item.styles.js} +10 -1
- package/optimize/lib/components/tree_view/tree_view.js +4 -2
- package/optimize/lib/components/tree_view/{_tree_view_item.js → tree_view_item.js} +1 -1
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +52 -0
- package/package.json +1 -1
- package/test-env/components/tree_view/tree_view.js +4 -2
- package/test-env/components/tree_view/{_tree_view_item.js → tree_view_item.js} +29 -1
- package/test-env/components/tree_view/tree_view_item.styles.js +52 -0
- package/lib/components/tree_view/_tree_view_item.styles.js +0 -45
- package/optimize/lib/components/tree_view/_tree_view_item.styles.js +0 -45
- package/test-env/components/tree_view/_tree_view_item.styles.js +0 -45
|
@@ -36,7 +36,7 @@ import classNames from 'classnames';
|
|
|
36
36
|
import { withEuiTheme, keys, htmlIdGenerator } from '../../services';
|
|
37
37
|
import { EuiI18n } from '../i18n';
|
|
38
38
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
39
|
-
import { EuiTreeViewItem } from './
|
|
39
|
+
import { EuiTreeViewItem } from './tree_view_item';
|
|
40
40
|
import { euiTreeViewStyles } from './tree_view.styles';
|
|
41
41
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
42
42
|
var EuiTreeViewContext = /*#__PURE__*/createContext('');
|
|
@@ -325,4 +325,6 @@ EuiTreeViewClass.propTypes = {
|
|
|
325
325
|
"aria-label": PropTypes.string,
|
|
326
326
|
"aria-labelledby": PropTypes.string
|
|
327
327
|
};
|
|
328
|
-
export var EuiTreeView = withEuiTheme(EuiTreeViewClass)
|
|
328
|
+
export var EuiTreeView = Object.assign(withEuiTheme(EuiTreeViewClass), {
|
|
329
|
+
Item: EuiTreeViewItem
|
|
330
|
+
});
|
|
@@ -15,7 +15,7 @@ import PropTypes from "prop-types";
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { useEuiTheme } from '../../services';
|
|
17
17
|
import { EuiIcon } from '../icon';
|
|
18
|
-
import { euiTreeViewItemStyles } from './
|
|
18
|
+
import { euiTreeViewItemStyles } from './tree_view_item.styles';
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
export var EuiTreeViewItem = /*#__PURE__*/memo(function (_ref) {
|
|
21
21
|
var id = _ref.id,
|
|
@@ -70,14 +70,42 @@ EuiTreeViewItem.propTypes = {
|
|
|
70
70
|
"aria-label": PropTypes.string,
|
|
71
71
|
"data-test-subj": PropTypes.string,
|
|
72
72
|
css: PropTypes.any,
|
|
73
|
+
/**
|
|
74
|
+
* Required for `aria-controls` accessibility
|
|
75
|
+
*/
|
|
73
76
|
id: PropTypes.string.isRequired,
|
|
77
|
+
/**
|
|
78
|
+
* The main button content
|
|
79
|
+
*/
|
|
74
80
|
label: PropTypes.node.isRequired,
|
|
81
|
+
/**
|
|
82
|
+
* Used to render nested `EuiTreeView`s
|
|
83
|
+
*/
|
|
84
|
+
children: PropTypes.node,
|
|
85
|
+
/**
|
|
86
|
+
* Optional icon to render. Pass, e.g., `<EuiIcon />` or `<EuiToken />`
|
|
87
|
+
*/
|
|
75
88
|
icon: PropTypes.node,
|
|
89
|
+
/**
|
|
90
|
+
* Renders an arrow if `children` exists. Otherwise renders a blank icon
|
|
91
|
+
*/
|
|
76
92
|
hasArrow: PropTypes.bool,
|
|
93
|
+
/**
|
|
94
|
+
* Adds a targetable modifier class
|
|
95
|
+
*/
|
|
77
96
|
isActive: PropTypes.bool,
|
|
97
|
+
/**
|
|
98
|
+
* Sets the `aria-expanded` attribute
|
|
99
|
+
*/
|
|
78
100
|
isExpanded: PropTypes.bool,
|
|
101
|
+
/**
|
|
102
|
+
* Determines default or compressed display
|
|
103
|
+
*/
|
|
79
104
|
display: PropTypes.oneOf(["default", "compressed"]),
|
|
80
105
|
buttonRef: PropTypes.any,
|
|
106
|
+
/**
|
|
107
|
+
* Optional extra props to pass to the wrapping `<li>`
|
|
108
|
+
*/
|
|
81
109
|
wrapperProps: PropTypes.any
|
|
82
110
|
};
|
|
83
111
|
EuiTreeViewItem.displayName = 'EuiTreeViewItem';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -9,13 +10,21 @@
|
|
|
9
10
|
import { css } from '@emotion/react';
|
|
10
11
|
import { transparentize } from '../../services';
|
|
11
12
|
import { euiFocusRing, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "22lgun-euiTreeView__node",
|
|
15
|
+
styles: "list-style:none;label:euiTreeView__node;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "22lgun-euiTreeView__node",
|
|
18
|
+
styles: "list-style:none;label:euiTreeView__node;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
12
21
|
export var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
13
22
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
23
|
var defaultSize = euiTheme.size.xl;
|
|
15
24
|
var compressedSize = euiTheme.size.l;
|
|
16
25
|
return {
|
|
17
26
|
li: {
|
|
18
|
-
euiTreeView__node:
|
|
27
|
+
euiTreeView__node: _ref,
|
|
19
28
|
default: /*#__PURE__*/css(logicalCSS('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
20
29
|
compressed: /*#__PURE__*/css(logicalCSS('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
21
30
|
expanded: /*#__PURE__*/css(logicalCSS('max-height', '100vh'), ";;label:expanded;")
|
package/eui.d.ts
CHANGED
|
@@ -19629,7 +19629,7 @@ declare module '@elastic/eui/src/components/provider' {
|
|
|
19629
19629
|
export { EuiComponentDefaultsProvider, EuiComponentDefaultsContext, } from '@elastic/eui/src/components/provider/component_defaults';
|
|
19630
19630
|
|
|
19631
19631
|
}
|
|
19632
|
-
declare module '@elastic/eui/src/components/tree_view/
|
|
19632
|
+
declare module '@elastic/eui/src/components/tree_view/tree_view_item.styles' {
|
|
19633
19633
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
19634
19634
|
export const euiTreeViewItemStyles: (euiThemeContext: UseEuiTheme) => {
|
|
19635
19635
|
li: {
|
|
@@ -19651,22 +19651,50 @@ declare module '@elastic/eui/src/components/tree_view/_tree_view_item.styles' {
|
|
|
19651
19651
|
};
|
|
19652
19652
|
|
|
19653
19653
|
}
|
|
19654
|
-
declare module '@elastic/eui/src/components/tree_view/
|
|
19655
|
-
import { FunctionComponent,
|
|
19654
|
+
declare module '@elastic/eui/src/components/tree_view/tree_view_item' {
|
|
19655
|
+
import { FunctionComponent, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
19656
19656
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
19657
|
-
import { EuiTreeViewProps } from '@elastic/eui/src/components/tree_view/tree_view';
|
|
19657
|
+
import { EuiTreeViewProps } from '@elastic/eui/src/components/tree_view/tree_view';
|
|
19658
|
+
export type EuiTreeViewItemProps = Omit<HTMLAttributes<HTMLButtonElement>, 'id' | 'children'> & CommonProps & {
|
|
19659
|
+
/**
|
|
19660
|
+
* Required for `aria-controls` accessibility
|
|
19661
|
+
*/
|
|
19658
19662
|
id: string;
|
|
19663
|
+
/**
|
|
19664
|
+
* The main button content
|
|
19665
|
+
*/
|
|
19659
19666
|
label: ReactNode;
|
|
19667
|
+
/**
|
|
19668
|
+
* Used to render nested `EuiTreeView`s
|
|
19669
|
+
*/
|
|
19670
|
+
children?: ReactNode;
|
|
19671
|
+
/**
|
|
19672
|
+
* Optional icon to render. Pass, e.g., `<EuiIcon />` or `<EuiToken />`
|
|
19673
|
+
*/
|
|
19660
19674
|
icon?: ReactNode;
|
|
19675
|
+
/**
|
|
19676
|
+
* Renders an arrow if `children` exists. Otherwise renders a blank icon
|
|
19677
|
+
*/
|
|
19661
19678
|
hasArrow?: boolean;
|
|
19679
|
+
/**
|
|
19680
|
+
* Adds a targetable modifier class
|
|
19681
|
+
*/
|
|
19662
19682
|
isActive?: boolean;
|
|
19683
|
+
/**
|
|
19684
|
+
* Sets the `aria-expanded` attribute
|
|
19685
|
+
*/
|
|
19663
19686
|
isExpanded?: boolean;
|
|
19687
|
+
/**
|
|
19688
|
+
* Determines default or compressed display
|
|
19689
|
+
*/
|
|
19664
19690
|
display?: EuiTreeViewProps['display'];
|
|
19665
19691
|
buttonRef?: Ref<HTMLButtonElement>;
|
|
19692
|
+
/**
|
|
19693
|
+
* Optional extra props to pass to the wrapping `<li>`
|
|
19694
|
+
*/
|
|
19666
19695
|
wrapperProps?: HTMLAttributes<HTMLLIElement>;
|
|
19667
19696
|
};
|
|
19668
19697
|
export const EuiTreeViewItem: FunctionComponent<EuiTreeViewItemProps>;
|
|
19669
|
-
export {};
|
|
19670
19698
|
|
|
19671
19699
|
}
|
|
19672
19700
|
declare module '@elastic/eui/src/components/tree_view/tree_view.styles' {
|
|
@@ -19765,7 +19793,9 @@ declare module '@elastic/eui/src/components/tree_view/tree_view' {
|
|
|
19765
19793
|
onChildrenKeydown: (event: React.KeyboardEvent, index: number) => void;
|
|
19766
19794
|
render(): React.JSX.Element;
|
|
19767
19795
|
}
|
|
19768
|
-
export const EuiTreeView: React.ForwardRefExoticComponent<Omit<EuiTreeViewProps, "theme"> & React.RefAttributes<Omit<EuiTreeViewProps, "theme"
|
|
19796
|
+
export const EuiTreeView: React.ForwardRefExoticComponent<Omit<EuiTreeViewProps, "theme"> & React.RefAttributes<Omit<EuiTreeViewProps, "theme">>> & {
|
|
19797
|
+
Item: React.FunctionComponent<import ("@elastic/eui/src/components/tree_view/tree_view_item").EuiTreeViewItemProps>;
|
|
19798
|
+
};
|
|
19769
19799
|
export {};
|
|
19770
19800
|
|
|
19771
19801
|
}
|
package/i18ntokens.json
CHANGED
|
@@ -6901,12 +6901,12 @@
|
|
|
6901
6901
|
"start": {
|
|
6902
6902
|
"line": 291,
|
|
6903
6903
|
"column": 10,
|
|
6904
|
-
"index":
|
|
6904
|
+
"index": 8053
|
|
6905
6905
|
},
|
|
6906
6906
|
"end": {
|
|
6907
6907
|
"line": 294,
|
|
6908
6908
|
"column": 11,
|
|
6909
|
-
"index":
|
|
6909
|
+
"index": 8207
|
|
6910
6910
|
}
|
|
6911
6911
|
},
|
|
6912
6912
|
"filepath": "src/components/tree_view/tree_view.tsx"
|
|
@@ -10,7 +10,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _services = require("../../services");
|
|
11
11
|
var _i18n = require("../i18n");
|
|
12
12
|
var _accessibility = require("../accessibility");
|
|
13
|
-
var _tree_view_item = require("./
|
|
13
|
+
var _tree_view_item = require("./tree_view_item");
|
|
14
14
|
var _tree_view = require("./tree_view.styles");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _excluded = ["children", "className", "items", "display", "expandByDefault", "showExpansionArrows", "theme"];
|
|
@@ -333,5 +333,7 @@ EuiTreeViewClass.propTypes = {
|
|
|
333
333
|
"aria-label": _propTypes.default.string,
|
|
334
334
|
"aria-labelledby": _propTypes.default.string
|
|
335
335
|
};
|
|
336
|
-
var EuiTreeView = (0, _services.withEuiTheme)(EuiTreeViewClass)
|
|
336
|
+
var EuiTreeView = Object.assign((0, _services.withEuiTheme)(EuiTreeViewClass), {
|
|
337
|
+
Item: _tree_view_item.EuiTreeViewItem
|
|
338
|
+
});
|
|
337
339
|
exports.EuiTreeView = EuiTreeView;
|
|
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _services = require("../../services");
|
|
12
12
|
var _icon = require("../icon");
|
|
13
|
-
var _tree_view_item = require("./
|
|
13
|
+
var _tree_view_item = require("./tree_view_item.styles");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _excluded = ["id", "label", "className", "children", "display", "icon", "hasArrow", "isActive", "isExpanded", "buttonRef", "wrapperProps"];
|
|
16
16
|
/*
|
|
@@ -80,14 +80,42 @@ EuiTreeViewItem.propTypes = {
|
|
|
80
80
|
"aria-label": _propTypes.default.string,
|
|
81
81
|
"data-test-subj": _propTypes.default.string,
|
|
82
82
|
css: _propTypes.default.any,
|
|
83
|
+
/**
|
|
84
|
+
* Required for `aria-controls` accessibility
|
|
85
|
+
*/
|
|
83
86
|
id: _propTypes.default.string.isRequired,
|
|
87
|
+
/**
|
|
88
|
+
* The main button content
|
|
89
|
+
*/
|
|
84
90
|
label: _propTypes.default.node.isRequired,
|
|
91
|
+
/**
|
|
92
|
+
* Used to render nested `EuiTreeView`s
|
|
93
|
+
*/
|
|
94
|
+
children: _propTypes.default.node,
|
|
95
|
+
/**
|
|
96
|
+
* Optional icon to render. Pass, e.g., `<EuiIcon />` or `<EuiToken />`
|
|
97
|
+
*/
|
|
85
98
|
icon: _propTypes.default.node,
|
|
99
|
+
/**
|
|
100
|
+
* Renders an arrow if `children` exists. Otherwise renders a blank icon
|
|
101
|
+
*/
|
|
86
102
|
hasArrow: _propTypes.default.bool,
|
|
103
|
+
/**
|
|
104
|
+
* Adds a targetable modifier class
|
|
105
|
+
*/
|
|
87
106
|
isActive: _propTypes.default.bool,
|
|
107
|
+
/**
|
|
108
|
+
* Sets the `aria-expanded` attribute
|
|
109
|
+
*/
|
|
88
110
|
isExpanded: _propTypes.default.bool,
|
|
111
|
+
/**
|
|
112
|
+
* Determines default or compressed display
|
|
113
|
+
*/
|
|
89
114
|
display: _propTypes.default.oneOf(["default", "compressed"]),
|
|
90
115
|
buttonRef: _propTypes.default.any,
|
|
116
|
+
/**
|
|
117
|
+
* Optional extra props to pass to the wrapping `<li>`
|
|
118
|
+
*/
|
|
91
119
|
wrapperProps: _propTypes.default.any
|
|
92
120
|
};
|
|
93
121
|
EuiTreeViewItem.displayName = 'EuiTreeViewItem';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "22lgun-euiTreeView__node",
|
|
19
|
+
styles: "list-style:none;label:euiTreeView__node;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "22lgun-euiTreeView__node",
|
|
22
|
+
styles: "list-style:none;label:euiTreeView__node;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
26
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
+
var defaultSize = euiTheme.size.xl;
|
|
28
|
+
var compressedSize = euiTheme.size.l;
|
|
29
|
+
return {
|
|
30
|
+
li: {
|
|
31
|
+
euiTreeView__node: _ref,
|
|
32
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
33
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
34
|
+
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
35
|
+
},
|
|
36
|
+
button: {
|
|
37
|
+
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
38
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
39
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
43
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
44
|
+
return x / 2;
|
|
45
|
+
})), ";;label:default;"),
|
|
46
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
47
|
+
return x / 2;
|
|
48
|
+
})), ";;label:compressed;")
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|
|
@@ -24,7 +24,7 @@ import classNames from 'classnames';
|
|
|
24
24
|
import { withEuiTheme, keys, htmlIdGenerator } from '../../services';
|
|
25
25
|
import { EuiI18n } from '../i18n';
|
|
26
26
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
27
|
-
import { EuiTreeViewItem } from './
|
|
27
|
+
import { EuiTreeViewItem } from './tree_view_item';
|
|
28
28
|
import { euiTreeViewStyles } from './tree_view.styles';
|
|
29
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
30
30
|
var EuiTreeViewContext = /*#__PURE__*/createContext('');
|
|
@@ -257,4 +257,6 @@ export var EuiTreeViewClass = /*#__PURE__*/function (_Component) {
|
|
|
257
257
|
return EuiTreeViewClass;
|
|
258
258
|
}(Component);
|
|
259
259
|
_defineProperty(EuiTreeViewClass, "contextType", EuiTreeViewContext);
|
|
260
|
-
export var EuiTreeView = withEuiTheme(EuiTreeViewClass)
|
|
260
|
+
export var EuiTreeView = Object.assign(withEuiTheme(EuiTreeViewClass), {
|
|
261
|
+
Item: EuiTreeViewItem
|
|
262
|
+
});
|
|
@@ -13,7 +13,7 @@ import React, { memo } from 'react';
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { useEuiTheme } from '../../services';
|
|
15
15
|
import { EuiIcon } from '../icon';
|
|
16
|
-
import { euiTreeViewItemStyles } from './
|
|
16
|
+
import { euiTreeViewItemStyles } from './tree_view_item.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var EuiTreeViewItem = /*#__PURE__*/memo(function (_ref) {
|
|
19
19
|
var id = _ref.id,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -9,13 +10,21 @@
|
|
|
9
10
|
import { css } from '@emotion/react';
|
|
10
11
|
import { transparentize } from '../../services';
|
|
11
12
|
import { euiFocusRing, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "22lgun-euiTreeView__node",
|
|
15
|
+
styles: "list-style:none;label:euiTreeView__node;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "22lgun-euiTreeView__node",
|
|
18
|
+
styles: "list-style:none;label:euiTreeView__node;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
12
21
|
export var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
13
22
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
23
|
var defaultSize = euiTheme.size.xl;
|
|
15
24
|
var compressedSize = euiTheme.size.l;
|
|
16
25
|
return {
|
|
17
26
|
li: {
|
|
18
|
-
euiTreeView__node:
|
|
27
|
+
euiTreeView__node: _ref,
|
|
19
28
|
default: /*#__PURE__*/css(logicalCSS('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
20
29
|
compressed: /*#__PURE__*/css(logicalCSS('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
21
30
|
expanded: /*#__PURE__*/css(logicalCSS('max-height', '100vh'), ";;label:expanded;")
|
|
@@ -21,7 +21,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
21
21
|
var _services = require("../../services");
|
|
22
22
|
var _i18n = require("../i18n");
|
|
23
23
|
var _accessibility = require("../accessibility");
|
|
24
|
-
var _tree_view_item = require("./
|
|
24
|
+
var _tree_view_item = require("./tree_view_item");
|
|
25
25
|
var _tree_view = require("./tree_view.styles");
|
|
26
26
|
var _react2 = require("@emotion/react");
|
|
27
27
|
var _excluded = ["children", "className", "items", "display", "expandByDefault", "showExpansionArrows", "theme"];
|
|
@@ -266,5 +266,7 @@ var EuiTreeViewClass = /*#__PURE__*/function (_Component) {
|
|
|
266
266
|
}(_react.Component);
|
|
267
267
|
exports.EuiTreeViewClass = EuiTreeViewClass;
|
|
268
268
|
(0, _defineProperty2.default)(EuiTreeViewClass, "contextType", EuiTreeViewContext);
|
|
269
|
-
var EuiTreeView = (0, _services.withEuiTheme)(EuiTreeViewClass)
|
|
269
|
+
var EuiTreeView = Object.assign((0, _services.withEuiTheme)(EuiTreeViewClass), {
|
|
270
|
+
Item: _tree_view_item.EuiTreeViewItem
|
|
271
|
+
});
|
|
270
272
|
exports.EuiTreeView = EuiTreeView;
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _services = require("../../services");
|
|
14
14
|
var _icon = require("../icon");
|
|
15
|
-
var _tree_view_item = require("./
|
|
15
|
+
var _tree_view_item = require("./tree_view_item.styles");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _excluded = ["id", "label", "className", "children", "display", "icon", "hasArrow", "isActive", "isExpanded", "buttonRef", "wrapperProps"];
|
|
18
18
|
/*
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "22lgun-euiTreeView__node",
|
|
19
|
+
styles: "list-style:none;label:euiTreeView__node;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "22lgun-euiTreeView__node",
|
|
22
|
+
styles: "list-style:none;label:euiTreeView__node;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
26
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
+
var defaultSize = euiTheme.size.xl;
|
|
28
|
+
var compressedSize = euiTheme.size.l;
|
|
29
|
+
return {
|
|
30
|
+
li: {
|
|
31
|
+
euiTreeView__node: _ref,
|
|
32
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
33
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
34
|
+
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
35
|
+
},
|
|
36
|
+
button: {
|
|
37
|
+
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
38
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
39
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
43
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
44
|
+
return x / 2;
|
|
45
|
+
})), ";;label:default;"),
|
|
46
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
47
|
+
return x / 2;
|
|
48
|
+
})), ";;label:compressed;")
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
22
22
|
var _services = require("../../services");
|
|
23
23
|
var _i18n = require("../i18n");
|
|
24
24
|
var _accessibility = require("../accessibility");
|
|
25
|
-
var _tree_view_item = require("./
|
|
25
|
+
var _tree_view_item = require("./tree_view_item");
|
|
26
26
|
var _tree_view = require("./tree_view.styles");
|
|
27
27
|
var _react2 = require("@emotion/react");
|
|
28
28
|
var _excluded = ["children", "className", "items", "display", "expandByDefault", "showExpansionArrows", "theme"];
|
|
@@ -323,5 +323,7 @@ EuiTreeViewClass.propTypes = {
|
|
|
323
323
|
"aria-label": _propTypes.default.string,
|
|
324
324
|
"aria-labelledby": _propTypes.default.string
|
|
325
325
|
};
|
|
326
|
-
var EuiTreeView = (0, _services.withEuiTheme)(EuiTreeViewClass)
|
|
326
|
+
var EuiTreeView = Object.assign((0, _services.withEuiTheme)(EuiTreeViewClass), {
|
|
327
|
+
Item: _tree_view_item.EuiTreeViewItem
|
|
328
|
+
});
|
|
327
329
|
exports.EuiTreeView = EuiTreeView;
|
|
@@ -13,7 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _services = require("../../services");
|
|
15
15
|
var _icon = require("../icon");
|
|
16
|
-
var _tree_view_item = require("./
|
|
16
|
+
var _tree_view_item = require("./tree_view_item.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["id", "label", "className", "children", "display", "icon", "hasArrow", "isActive", "isExpanded", "buttonRef", "wrapperProps"];
|
|
19
19
|
/*
|
|
@@ -79,14 +79,42 @@ EuiTreeViewItem.propTypes = {
|
|
|
79
79
|
"aria-label": _propTypes.default.string,
|
|
80
80
|
"data-test-subj": _propTypes.default.string,
|
|
81
81
|
css: _propTypes.default.any,
|
|
82
|
+
/**
|
|
83
|
+
* Required for `aria-controls` accessibility
|
|
84
|
+
*/
|
|
82
85
|
id: _propTypes.default.string.isRequired,
|
|
86
|
+
/**
|
|
87
|
+
* The main button content
|
|
88
|
+
*/
|
|
83
89
|
label: _propTypes.default.node.isRequired,
|
|
90
|
+
/**
|
|
91
|
+
* Used to render nested `EuiTreeView`s
|
|
92
|
+
*/
|
|
93
|
+
children: _propTypes.default.node,
|
|
94
|
+
/**
|
|
95
|
+
* Optional icon to render. Pass, e.g., `<EuiIcon />` or `<EuiToken />`
|
|
96
|
+
*/
|
|
84
97
|
icon: _propTypes.default.node,
|
|
98
|
+
/**
|
|
99
|
+
* Renders an arrow if `children` exists. Otherwise renders a blank icon
|
|
100
|
+
*/
|
|
85
101
|
hasArrow: _propTypes.default.bool,
|
|
102
|
+
/**
|
|
103
|
+
* Adds a targetable modifier class
|
|
104
|
+
*/
|
|
86
105
|
isActive: _propTypes.default.bool,
|
|
106
|
+
/**
|
|
107
|
+
* Sets the `aria-expanded` attribute
|
|
108
|
+
*/
|
|
87
109
|
isExpanded: _propTypes.default.bool,
|
|
110
|
+
/**
|
|
111
|
+
* Determines default or compressed display
|
|
112
|
+
*/
|
|
88
113
|
display: _propTypes.default.oneOf(["default", "compressed"]),
|
|
89
114
|
buttonRef: _propTypes.default.any,
|
|
115
|
+
/**
|
|
116
|
+
* Optional extra props to pass to the wrapping `<li>`
|
|
117
|
+
*/
|
|
90
118
|
wrapperProps: _propTypes.default.any
|
|
91
119
|
};
|
|
92
120
|
EuiTreeViewItem.displayName = 'EuiTreeViewItem';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "22lgun-euiTreeView__node",
|
|
19
|
+
styles: "list-style:none;label:euiTreeView__node;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "22lgun-euiTreeView__node",
|
|
22
|
+
styles: "list-style:none;label:euiTreeView__node;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
26
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
+
var defaultSize = euiTheme.size.xl;
|
|
28
|
+
var compressedSize = euiTheme.size.l;
|
|
29
|
+
return {
|
|
30
|
+
li: {
|
|
31
|
+
euiTreeView__node: _ref,
|
|
32
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
33
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
34
|
+
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
35
|
+
},
|
|
36
|
+
button: {
|
|
37
|
+
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
38
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
39
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
43
|
+
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
44
|
+
return x / 2;
|
|
45
|
+
})), ";;label:default;"),
|
|
46
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
47
|
+
return x / 2;
|
|
48
|
+
})), ";;label:compressed;")
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
|
-
var _global_styling = require("../../global_styling");
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
19
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
-
var defaultSize = euiTheme.size.xl;
|
|
21
|
-
var compressedSize = euiTheme.size.l;
|
|
22
|
-
return {
|
|
23
|
-
li: {
|
|
24
|
-
euiTreeView__node: /*#__PURE__*/(0, _react.css)(";label:euiTreeView__node;"),
|
|
25
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
26
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
27
|
-
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
28
|
-
},
|
|
29
|
-
button: {
|
|
30
|
-
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
31
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
32
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
36
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
37
|
-
return x / 2;
|
|
38
|
-
})), ";;label:default;"),
|
|
39
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
40
|
-
return x / 2;
|
|
41
|
-
})), ";;label:compressed;")
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
|
-
var _global_styling = require("../../global_styling");
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
19
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
-
var defaultSize = euiTheme.size.xl;
|
|
21
|
-
var compressedSize = euiTheme.size.l;
|
|
22
|
-
return {
|
|
23
|
-
li: {
|
|
24
|
-
euiTreeView__node: /*#__PURE__*/(0, _react.css)(";label:euiTreeView__node;"),
|
|
25
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
26
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
27
|
-
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
28
|
-
},
|
|
29
|
-
button: {
|
|
30
|
-
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
31
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
32
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
36
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
37
|
-
return x / 2;
|
|
38
|
-
})), ";;label:default;"),
|
|
39
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
40
|
-
return x / 2;
|
|
41
|
-
})), ";;label:compressed;")
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.euiTreeViewItemStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
|
-
var _global_styling = require("../../global_styling");
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var euiTreeViewItemStyles = function euiTreeViewItemStyles(euiThemeContext) {
|
|
19
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
-
var defaultSize = euiTheme.size.xl;
|
|
21
|
-
var compressedSize = euiTheme.size.l;
|
|
22
|
-
return {
|
|
23
|
-
li: {
|
|
24
|
-
euiTreeView__node: /*#__PURE__*/(0, _react.css)(";label:euiTreeView__node;"),
|
|
25
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', defaultSize), " line-height:", defaultSize, ";;label:default;"),
|
|
26
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', compressedSize), " line-height:", compressedSize, ";;label:compressed;"),
|
|
27
|
-
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
28
|
-
},
|
|
29
|
-
button: {
|
|
30
|
-
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
31
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
32
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
euiTreeView__iconWrapper: /*#__PURE__*/(0, _react.css)("flex-shrink:0;line-height:0;&>*{", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}&>.euiToken{", (0, _global_styling.logicalCSS)('max-height', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), " svg{", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiTreeView__iconWrapper;"),
|
|
36
|
-
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(defaultSize, function (x) {
|
|
37
|
-
return x / 2;
|
|
38
|
-
})), ";;label:default;"),
|
|
39
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', (0, _global_styling.mathWithUnits)(compressedSize, function (x) {
|
|
40
|
-
return x / 2;
|
|
41
|
-
})), ";;label:compressed;")
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.euiTreeViewItemStyles = euiTreeViewItemStyles;
|