@elastic/eui 77.1.0 → 77.2.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/README.md +30 -29
- package/dist/eui_theme_dark.css +70 -158
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +70 -158
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.a11y.js +202 -0
- package/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
- package/es/components/date_picker/date_picker.js +23 -15
- package/es/components/date_picker/date_picker_range.js +36 -42
- package/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
- package/es/components/form/field_number/field_number.js +39 -8
- package/es/components/form/field_text/field_text.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout.js +67 -30
- package/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
- package/es/components/form/form_control_layout/form_control_layout_icons.js +12 -20
- package/es/components/form/range/dual_range.js +2 -4
- package/es/components/form/range/range.js +0 -2
- package/es/components/form/range/range_input.js +54 -13
- package/es/components/form/validatable_control/validatable_control.js +15 -5
- package/es/components/index.js +0 -1
- package/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
- package/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
- package/es/components/suggest/suggest.a11y.js +70 -0
- package/es/components/table/table.a11y.js +75 -0
- package/eui.d.ts +55 -173
- package/i18ntokens.json +26 -44
- package/lib/components/basic_table/basic_table.a11y.js +194 -0
- package/lib/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +2 -2
- package/lib/components/date_picker/date_picker.js +23 -15
- package/lib/components/date_picker/date_picker_range.js +35 -41
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
- package/lib/components/form/field_number/field_number.js +42 -8
- package/lib/components/form/field_text/field_text.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout.js +67 -35
- package/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +11 -19
- package/lib/components/form/range/dual_range.js +2 -4
- package/lib/components/form/range/range.js +0 -2
- package/lib/components/form/range/range_input.js +52 -11
- package/lib/components/form/validatable_control/validatable_control.js +14 -12
- package/lib/components/index.js +0 -11
- package/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
- package/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
- package/lib/components/suggest/suggest.a11y.js +73 -0
- package/lib/components/table/table.a11y.js +78 -0
- package/optimize/es/components/basic_table/basic_table.a11y.js +194 -0
- package/optimize/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
- package/optimize/es/components/date_picker/date_picker.js +17 -14
- package/optimize/es/components/date_picker/date_picker_range.js +20 -14
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
- package/optimize/es/components/form/field_number/field_number.js +34 -8
- package/optimize/es/components/form/field_text/field_text.js +1 -1
- package/optimize/es/components/form/form_control_layout/form_control_layout.js +67 -30
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +10 -20
- package/optimize/es/components/form/range/dual_range.js +2 -4
- package/optimize/es/components/form/range/range.js +0 -2
- package/optimize/es/components/form/range/range_input.js +49 -12
- package/optimize/es/components/form/validatable_control/validatable_control.js +10 -5
- package/optimize/es/components/index.js +0 -1
- package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
- package/optimize/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
- package/optimize/es/components/suggest/suggest.a11y.js +70 -0
- package/optimize/es/components/table/table.a11y.js +75 -0
- package/optimize/lib/components/basic_table/basic_table.a11y.js +188 -0
- package/{test-env/components/basic_table/table.a11y.js → optimize/lib/components/basic_table/in_memory_table.a11y.js} +2 -2
- package/optimize/lib/components/date_picker/date_picker.js +17 -14
- package/optimize/lib/components/date_picker/date_picker_range.js +19 -13
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
- package/optimize/lib/components/form/field_number/field_number.js +37 -8
- package/optimize/lib/components/form/field_text/field_text.js +1 -1
- package/optimize/lib/components/form/form_control_layout/form_control_layout.js +67 -35
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +9 -19
- package/optimize/lib/components/form/range/dual_range.js +2 -4
- package/optimize/lib/components/form/range/range.js +0 -2
- package/optimize/lib/components/form/range/range_input.js +47 -10
- package/optimize/lib/components/form/validatable_control/validatable_control.js +10 -4
- package/optimize/lib/components/index.js +0 -11
- package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
- package/optimize/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
- package/optimize/lib/components/suggest/suggest.a11y.js +73 -0
- package/optimize/lib/components/table/table.a11y.js +78 -0
- package/package.json +1 -1
- package/src/components/date_picker/_date_picker_range.scss +0 -60
- package/src/components/date_picker/super_date_picker/_super_date_picker.scss +23 -11
- package/src/components/date_picker/super_date_picker/_variables.scss +3 -0
- package/src/components/date_picker/super_date_picker/date_popover/_date_popover_button.scss +5 -7
- package/src/components/form/form_control_layout/_form_control_layout.scss +2 -2
- package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +12 -36
- package/src/components/form/form_control_layout/_form_control_layout_icons.scss +27 -6
- package/src/themes/amsterdam/overrides/_date_picker.scss +0 -14
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/basic_table/basic_table.a11y.js +188 -0
- package/{optimize/lib/components/basic_table/table.a11y.js → test-env/components/basic_table/in_memory_table.a11y.js} +2 -2
- package/test-env/components/date_picker/date_picker.js +23 -15
- package/test-env/components/date_picker/date_picker_range.js +35 -41
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +99 -84
- package/test-env/components/form/field_number/field_number.js +37 -8
- package/test-env/components/form/field_text/field_text.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout.js +68 -35
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +11 -19
- package/test-env/components/form/range/dual_range.js +2 -4
- package/test-env/components/form/range/range.js +0 -2
- package/test-env/components/form/range/range_input.js +47 -11
- package/test-env/components/form/validatable_control/validatable_control.js +9 -4
- package/test-env/components/index.js +0 -11
- package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
- package/test-env/components/search_bar/query/ast_to_es_query_string.js +3 -0
- package/test-env/components/suggest/suggest.a11y.js +73 -0
- package/test-env/components/table/table.a11y.js +78 -0
- package/es/components/inline_edit/index.js +0 -10
- package/es/components/inline_edit/inline_edit.styles.js +0 -15
- package/es/components/inline_edit/inline_edit_form.js +0 -190
- package/es/components/inline_edit/inline_edit_text.js +0 -97
- package/es/components/inline_edit/inline_edit_title.js +0 -105
- package/lib/components/inline_edit/index.js +0 -19
- package/lib/components/inline_edit/inline_edit.styles.js +0 -22
- package/lib/components/inline_edit/inline_edit_form.js +0 -193
- package/lib/components/inline_edit/inline_edit_text.js +0 -97
- package/lib/components/inline_edit/inline_edit_title.js +0 -106
- package/optimize/es/components/inline_edit/index.js +0 -10
- package/optimize/es/components/inline_edit/inline_edit.styles.js +0 -15
- package/optimize/es/components/inline_edit/inline_edit_form.js +0 -133
- package/optimize/es/components/inline_edit/inline_edit_text.js +0 -52
- package/optimize/es/components/inline_edit/inline_edit_title.js +0 -56
- package/optimize/lib/components/inline_edit/index.js +0 -19
- package/optimize/lib/components/inline_edit/inline_edit.styles.js +0 -22
- package/optimize/lib/components/inline_edit/inline_edit_form.js +0 -144
- package/optimize/lib/components/inline_edit/inline_edit_text.js +0 -52
- package/optimize/lib/components/inline_edit/inline_edit_title.js +0 -57
- package/src/themes/amsterdam/overrides/_date_popover_button.scss +0 -14
- package/test-env/components/inline_edit/index.js +0 -19
- package/test-env/components/inline_edit/inline_edit.styles.js +0 -22
- package/test-env/components/inline_edit/inline_edit_form.js +0 -196
- package/test-env/components/inline_edit/inline_edit_text.js +0 -96
- package/test-env/components/inline_edit/inline_edit_title.js +0 -105
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _form = require("../form");
|
|
6
|
+
var _suggest = require("./suggest");
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/// <reference types="cypress" />
|
|
17
|
+
/// <reference types="cypress-real-events" />
|
|
18
|
+
/// <reference types="../../../cypress/support" />
|
|
19
|
+
|
|
20
|
+
var Suggest = function Suggest() {
|
|
21
|
+
var suggestedItems = [{
|
|
22
|
+
type: {
|
|
23
|
+
iconType: 'accessibility',
|
|
24
|
+
color: 'tint1'
|
|
25
|
+
},
|
|
26
|
+
label: 'Accessibility',
|
|
27
|
+
description: 'A short description'
|
|
28
|
+
}, {
|
|
29
|
+
type: {
|
|
30
|
+
iconType: 'image',
|
|
31
|
+
color: 'tint2'
|
|
32
|
+
},
|
|
33
|
+
label: 'Images',
|
|
34
|
+
description: 'Another short description'
|
|
35
|
+
}, {
|
|
36
|
+
type: {
|
|
37
|
+
iconType: 'lock',
|
|
38
|
+
color: 'tint3'
|
|
39
|
+
},
|
|
40
|
+
label: 'Locks',
|
|
41
|
+
description: 'A third short description'
|
|
42
|
+
}];
|
|
43
|
+
return (0, _react2.jsx)(_form.EuiFormRow, {
|
|
44
|
+
label: "Suggest a topic",
|
|
45
|
+
id: "cy-label-suggest-1"
|
|
46
|
+
}, (0, _react2.jsx)(_suggest.EuiSuggest, {
|
|
47
|
+
"aria-labelledby": "cy-label-suggest-1-label",
|
|
48
|
+
suggestions: suggestedItems
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
describe('EuiSuggest', function () {
|
|
52
|
+
beforeEach(function () {
|
|
53
|
+
cy.realMount((0, _react2.jsx)(Suggest, null));
|
|
54
|
+
});
|
|
55
|
+
describe('Automated accessibility check', function () {
|
|
56
|
+
it('has zero violations when rendered', function () {
|
|
57
|
+
cy.checkAxe();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe('Keyboard accessibility', function () {
|
|
61
|
+
it('has zero violations after traversing list items', function () {
|
|
62
|
+
cy.realPress('Tab');
|
|
63
|
+
cy.get('#cy-label-suggest-1').should('have.focus');
|
|
64
|
+
cy.get('ul[role="listbox"]').should('exist');
|
|
65
|
+
cy.realPress('ArrowDown');
|
|
66
|
+
cy.realPress('ArrowUp');
|
|
67
|
+
cy.realPress('ArrowRight');
|
|
68
|
+
cy.realPress('ArrowLeft');
|
|
69
|
+
cy.get('li[role="option"]').first().should('have.attr', 'aria-selected', 'true');
|
|
70
|
+
cy.checkAxe();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _ = require(".");
|
|
6
|
+
var _react2 = require("@emotion/react");
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
18
|
+
|
|
19
|
+
var users = [{
|
|
20
|
+
id: '47936',
|
|
21
|
+
firstName: 'Robert',
|
|
22
|
+
lastName: 'Stein',
|
|
23
|
+
github: 'steiner_rob',
|
|
24
|
+
location: {
|
|
25
|
+
city: 'Los Angeles',
|
|
26
|
+
state: 'CA'
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
id: '54736',
|
|
30
|
+
firstName: 'Martina',
|
|
31
|
+
lastName: 'Conlon',
|
|
32
|
+
github: 'martina_zen',
|
|
33
|
+
location: {
|
|
34
|
+
city: 'Boston',
|
|
35
|
+
state: 'MA'
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
id: '40193',
|
|
39
|
+
firstName: 'Alyce',
|
|
40
|
+
lastName: 'Benning',
|
|
41
|
+
github: 'alyce_benning',
|
|
42
|
+
location: {
|
|
43
|
+
city: 'Atlanta',
|
|
44
|
+
state: 'GA'
|
|
45
|
+
}
|
|
46
|
+
}];
|
|
47
|
+
var userRows = users.map(function (user) {
|
|
48
|
+
var id = user.id,
|
|
49
|
+
firstName = user.firstName,
|
|
50
|
+
lastName = user.lastName,
|
|
51
|
+
github = user.github,
|
|
52
|
+
_user$location = user.location,
|
|
53
|
+
city = _user$location.city,
|
|
54
|
+
state = _user$location.state;
|
|
55
|
+
return (0, _react2.jsx)(_.EuiTableRow, {
|
|
56
|
+
key: id
|
|
57
|
+
}, (0, _react2.jsx)(_.EuiTableRowCell, null, "".concat(firstName, " ").concat(lastName)), (0, _react2.jsx)(_.EuiTableRowCell, null, github), (0, _react2.jsx)(_.EuiTableRowCell, null, "".concat(city, ", ").concat(state)));
|
|
58
|
+
});
|
|
59
|
+
var customColumns = ['Name', 'Github', 'Location'];
|
|
60
|
+
var columnHeaders = customColumns.map(function (column, i) {
|
|
61
|
+
return (0, _react2.jsx)(_.EuiTableHeaderCell, {
|
|
62
|
+
key: i
|
|
63
|
+
}, column);
|
|
64
|
+
});
|
|
65
|
+
var CustomTable = function CustomTable() {
|
|
66
|
+
return (0, _react2.jsx)(_.EuiTable, null, (0, _react2.jsx)(_.EuiTableHeader, null, columnHeaders), (0, _react2.jsx)(_.EuiTableBody, null, userRows));
|
|
67
|
+
};
|
|
68
|
+
describe('EuiTable', function () {
|
|
69
|
+
beforeEach(function () {
|
|
70
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
71
|
+
cy.realMount((0, _react2.jsx)(CustomTable, null));
|
|
72
|
+
});
|
|
73
|
+
describe('Automated accessibility check', function () {
|
|
74
|
+
it('has zero violations on render', function () {
|
|
75
|
+
cy.checkAxe();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
package/package.json
CHANGED
|
@@ -1,65 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 1. Account for inner box-shadow style border
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
.euiDatePickerRange {
|
|
6
|
-
@include euiFormControlSize(auto, $includeAlternates: true);
|
|
7
|
-
// Match just the regular drop shadow of inputs
|
|
8
|
-
@include euiFormControlDefaultShadow;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
padding: 1px; /* 1 */
|
|
12
|
-
|
|
13
|
-
// Allow any child to fill entire range container
|
|
14
|
-
> * {
|
|
15
|
-
flex-grow: 1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
2
|
.euiFieldText.euiDatePicker {
|
|
19
3
|
height: $euiFormControlLayoutGroupInputHeight;
|
|
20
|
-
// including all states
|
|
21
|
-
box-shadow: none !important; // stylelint-disable-line declaration-no-important
|
|
22
|
-
text-align: center;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.euiDatePickerRange__start {
|
|
26
|
-
border-top-right-radius: 0;
|
|
27
|
-
border-bottom-right-radius: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.euiDatePickerRange__end {
|
|
31
|
-
border-top-left-radius: 0;
|
|
32
|
-
border-bottom-left-radius: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.react-datepicker-popper .euiFieldText.euiDatePicker {
|
|
36
|
-
// set any subsequent children in popper back to left align
|
|
37
|
-
text-align: left;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Necessary for EuiSuperDatePicker
|
|
41
|
-
&--inGroup {
|
|
42
|
-
box-shadow: none;
|
|
43
|
-
padding: 0;
|
|
44
4
|
}
|
|
45
5
|
}
|
|
46
|
-
|
|
47
|
-
.euiDatePickerRange--isDisabled {
|
|
48
|
-
background: $euiFormBackgroundDisabledColor;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.euiDatePickerRange--readOnly {
|
|
52
|
-
background: $euiFormBackgroundReadOnlyColor;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.euiDatePickerRange__delimeter {
|
|
56
|
-
align-self: stretch;
|
|
57
|
-
height: auto;
|
|
58
|
-
flex-grow: 0;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.euiDatePickerRange--isInvalid:not(.euiDatePickerRange--isDisabled):not(.euiDatePickerRange--readOnly) .euiDatePickerRange__delimeter {
|
|
64
|
-
@include euiFormControlInvalidStyle;
|
|
65
|
-
}
|
|
@@ -38,22 +38,17 @@
|
|
|
38
38
|
max-width: 100% !important;
|
|
39
39
|
|
|
40
40
|
> .euiFormControlLayout__childrenWrapper {
|
|
41
|
-
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
42
43
|
overflow: hidden;
|
|
44
|
+
background-color: $euiFormBackgroundColor;
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
max-width: none;
|
|
46
|
-
width: auto;
|
|
46
|
+
&:last-child {
|
|
47
47
|
border-radius: 0 $euiFormControlBorderRadius $euiFormControlBorderRadius 0;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.euiDatePopoverButton--end,
|
|
53
|
-
.euiSuperDatePicker__prettyFormat {
|
|
54
|
-
border-top-right-radius: 0;
|
|
55
|
-
border-bottom-right-radius: 0;
|
|
56
|
-
}
|
|
50
|
+
& > .euiFormControlLayoutDelimited__input {
|
|
51
|
+
flex-grow: 1;
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
54
|
}
|
|
@@ -75,3 +70,20 @@
|
|
|
75
70
|
cursor: not-allowed;
|
|
76
71
|
}
|
|
77
72
|
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Make the arrow delimiter match the colors of `.euiDatePopoverButton-needsUpdating`
|
|
76
|
+
*/
|
|
77
|
+
.euiSuperDatePicker--needsUpdating.euiFormControlLayoutDelimited { // Extra specificity needed to override default delimited styles
|
|
78
|
+
.euiFormControlLayout__childrenWrapper {
|
|
79
|
+
background-color: $euiSuperDatePickerNeedsUpdatingBackgroundColor;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.euiFormControlLayoutDelimited__delimiter {
|
|
83
|
+
color: $euiSuperDatePickerNeedsUpdatingTextColor;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.euiSuperDatePicker .euiFormControlLayout__childrenWrapper {
|
|
88
|
+
transition: background $euiAnimSpeedFast ease-in; // Match @mixin euiSuperDatePickerText / .euiDatePopoverButton
|
|
89
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
$euiSuperDatePickerWidth: $euiSize * 30;
|
|
2
2
|
$euiSuperDatePickerButtonWidth: $euiButtonMinWidth + ($euiSizeXS * 1.5);
|
|
3
|
+
|
|
4
|
+
$euiSuperDatePickerNeedsUpdatingBackgroundColor: tintOrShade($euiColorSuccess, 90%, 70%);
|
|
5
|
+
$euiSuperDatePickerNeedsUpdatingTextColor: makeHighContrastColor($euiColorSuccess, $euiSuperDatePickerNeedsUpdatingBackgroundColor);
|
|
@@ -13,11 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&-needsUpdating {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
background-color: $backgroundColor;
|
|
20
|
-
color: $textColor;
|
|
16
|
+
background-color: $euiSuperDatePickerNeedsUpdatingBackgroundColor;
|
|
17
|
+
color: $euiSuperDatePickerNeedsUpdatingTextColor;
|
|
21
18
|
|
|
22
19
|
&:focus,
|
|
23
20
|
&.euiDatePopoverButton-isSelected {
|
|
@@ -38,15 +35,16 @@
|
|
|
38
35
|
|
|
39
36
|
&:disabled {
|
|
40
37
|
background-color: $euiFormBackgroundDisabledColor;
|
|
38
|
+
background-image: none;
|
|
41
39
|
color: $euiColorDarkShade;
|
|
42
40
|
cursor: default;
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
.euiDatePopoverButton--start {
|
|
47
|
-
text-align:
|
|
45
|
+
text-align: center;
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
.euiDatePopoverButton--end {
|
|
51
|
-
text-align:
|
|
49
|
+
text-align: center;
|
|
52
50
|
}
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
// TEXT
|
|
129
129
|
|
|
130
130
|
.euiFormLabel,
|
|
131
|
-
.euiText {
|
|
131
|
+
.euiText:not(.euiFormControlLayoutDelimited__delimiter) {
|
|
132
132
|
background-color: $euiFormInputGroupLabelBackground;
|
|
133
133
|
padding: $euiFormControlPadding;
|
|
134
134
|
line-height: $euiSize !important;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
|
|
172
172
|
// Padding
|
|
173
173
|
.euiFormLabel,
|
|
174
|
-
.euiText {
|
|
174
|
+
.euiText:not(.euiFormControlLayoutDelimited__delimiter) {
|
|
175
175
|
padding: $euiFormControlCompressedPadding;
|
|
176
176
|
|
|
177
177
|
// If the next sibling is not the input, pull it closer to the text to reduce space
|
|
@@ -5,37 +5,22 @@
|
|
|
5
5
|
align-items: stretch;
|
|
6
6
|
padding: 1px; /* 1 */
|
|
7
7
|
|
|
8
|
-
.euiFormControlLayoutDelimited__delimeter {
|
|
9
|
-
background-color: $euiFormBackgroundColor;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
> .euiFormControlLayout__childrenWrapper {
|
|
13
9
|
display: flex;
|
|
14
10
|
align-items: center;
|
|
15
11
|
width: 100%;
|
|
12
|
+
background-color: $euiFormBackgroundColor;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
// Target when the euiFormControlLayout is compressed without specifying the full class name in case it ever changes
|
|
19
16
|
&[class*='--compressed'] {
|
|
20
17
|
@include euiFormControlDefaultShadow($borderOnly: true);
|
|
21
18
|
border-radius: $euiBorderRadius / 2;
|
|
22
|
-
|
|
23
|
-
.euiFormControlLayoutDelimited__input {
|
|
24
|
-
height: 100%;
|
|
25
|
-
max-width: none;
|
|
26
|
-
padding-left: $euiFormControlCompressedPadding;
|
|
27
|
-
padding-right: $euiFormControlCompressedPadding;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.euiFormControlLayoutIcons {
|
|
31
|
-
padding-left: $euiFormControlCompressedPadding;
|
|
32
|
-
padding-right: $euiFormControlCompressedPadding;
|
|
33
|
-
}
|
|
34
19
|
}
|
|
35
20
|
|
|
36
21
|
// Target when the euiFormControlLayout is fullWidth without specifying the full class name in case it ever changes
|
|
37
22
|
&[class*='--fullWidth'] .euiFormControlLayout__childrenWrapper,
|
|
38
|
-
&[class*='--fullWidth']
|
|
23
|
+
&[class*='--fullWidth'] .euiFormControlLayout__childrenWrapper > *:not(.euiFormControlLayoutDelimited__delimiter):not(.euiFormControlLayoutIcons) {
|
|
39
24
|
width: 100%;
|
|
40
25
|
max-width: none;
|
|
41
26
|
}
|
|
@@ -44,7 +29,7 @@
|
|
|
44
29
|
&[class*='-isDisabled'] {
|
|
45
30
|
@include euiFormControlDisabledStyle;
|
|
46
31
|
|
|
47
|
-
.
|
|
32
|
+
.euiFormControlLayout__childrenWrapper {
|
|
48
33
|
background-color: $euiFormBackgroundDisabledColor;
|
|
49
34
|
}
|
|
50
35
|
}
|
|
@@ -53,22 +38,13 @@
|
|
|
53
38
|
&[class*='--readOnly'] {
|
|
54
39
|
@include euiFormControlReadOnlyStyle;
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
.euiFormControlLayoutDelimited__delimeter {
|
|
41
|
+
.euiFormControlLayout__childrenWrapper {
|
|
58
42
|
background-color: $euiFormBackgroundReadOnlyColor;
|
|
59
43
|
}
|
|
60
44
|
}
|
|
61
45
|
|
|
62
|
-
.
|
|
63
|
-
|
|
64
|
-
// overlay only one of controls making the layout unbalanced
|
|
65
|
-
position: static; // Overrider absolute
|
|
66
|
-
padding-left: $euiFormControlPadding;
|
|
67
|
-
padding-right: $euiFormControlPadding;
|
|
68
|
-
|
|
69
|
-
&:not(.euiFormControlLayoutIcons--right) {
|
|
70
|
-
order: -1;
|
|
71
|
-
}
|
|
46
|
+
&--isInvalid .euiFormControlLayout__childrenWrapper {
|
|
47
|
+
@include euiFormControlInvalidStyle;
|
|
72
48
|
}
|
|
73
49
|
}
|
|
74
50
|
|
|
@@ -82,10 +58,10 @@
|
|
|
82
58
|
min-width: 0; // Fixes FF
|
|
83
59
|
}
|
|
84
60
|
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
61
|
+
.euiFormControlLayoutDelimited__delimiter {
|
|
62
|
+
align-self: stretch;
|
|
63
|
+
flex-grow: 0;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
line-height: 1; // Override EuiText line-height
|
|
91
67
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
.euiFormControlLayoutIcons {
|
|
2
2
|
pointer-events: none;
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: $euiFormControlPadding;
|
|
7
3
|
display: flex;
|
|
8
4
|
align-items: center;
|
|
9
5
|
|
|
@@ -11,9 +7,34 @@
|
|
|
11
7
|
margin-left: $euiFormControlPadding / 2;
|
|
12
8
|
}
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
&--absolute {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
left: $euiFormControlPadding;
|
|
15
|
+
|
|
16
|
+
.euiFormControlLayout--compressed & {
|
|
17
|
+
left: $euiFormControlCompressedPadding;
|
|
18
|
+
}
|
|
16
19
|
}
|
|
20
|
+
|
|
21
|
+
&--static {
|
|
22
|
+
// Absolutely positioning the icons sometimes doesn't work -
|
|
23
|
+
// in the case of delimited inputs, they overlay only one of controls making the layout unbalanced
|
|
24
|
+
position: static;
|
|
25
|
+
height: 100%;
|
|
26
|
+
align-self: stretch;
|
|
27
|
+
flex-grow: 0;
|
|
28
|
+
padding-inline: $euiFormControlPadding;
|
|
29
|
+
|
|
30
|
+
.euiFormControlLayout--compressed & {
|
|
31
|
+
padding-inline: $euiFormControlCompressedPadding;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.euiFormControlLayoutIcons--left {
|
|
37
|
+
z-index: 1; // Ensure the icon is visible above sibling inputs
|
|
17
38
|
}
|
|
18
39
|
|
|
19
40
|
.euiFormControlLayoutIcons--right {
|
|
@@ -8,20 +8,6 @@
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.euiDatePickerRange {
|
|
12
|
-
border-radius: $euiFormControlBorderRadius;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
11
|
.euiDatePicker.euiDatePicker--shadow.euiDatePicker--inline .react-datepicker {
|
|
16
12
|
border: none;
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
.euiSuperDatePicker__prettyFormat {
|
|
20
|
-
border-top-right-radius: $euiFormControlBorderRadius;
|
|
21
|
-
border-bottom-right-radius: $euiFormControlBorderRadius;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.euiFormControlLayout--compressed.euiSuperDatePicker .euiSuperDatePicker__prettyFormat {
|
|
25
|
-
border-top-right-radius: $euiFormControlCompressedBorderRadius;
|
|
26
|
-
border-bottom-right-radius: $euiFormControlCompressedBorderRadius;
|
|
27
|
-
}
|