@elastic/eui 96.0.0 → 96.1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "96.0.0",
4
+ "version": "96.1.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -5,7 +5,4 @@
5
5
  @import 'helpers';
6
6
  @import 'states';
7
7
 
8
- @import 'button';
9
- @import 'form';
10
- @import 'panel';
11
- @import 'tool_tip';
8
+ @import 'tool_tip'; // Needed by Elastic Charts
@@ -16,10 +16,3 @@
16
16
  background-color: $euiTooltipBorderColor;
17
17
  }
18
18
  }
19
-
20
- @mixin euiToolTipTitle {
21
- font-weight: $euiFontWeightBold;
22
- border-bottom: solid $euiBorderWidthThin $euiTooltipBorderColor;
23
- padding-bottom: $euiSizeXS;
24
- margin-bottom: $euiSizeXS;
25
- }
@@ -7,7 +7,4 @@
7
7
  @import '../../../../global_styling/mixins/helpers';
8
8
  @import 'states';
9
9
 
10
- @import '../../../../global_styling/mixins/button';
11
- @import '../../../../global_styling/mixins/form';
12
- @import '../../../../global_styling/mixins/panel';
13
- @import '../../../../global_styling/mixins/tool_tip';
10
+ @import '../../../../global_styling/mixins/tool_tip'; // Needed by Elastic Charts
@@ -1,149 +0,0 @@
1
- // Provides a solid reset and base for handling sizing layout
2
- // Does not include any visual styles
3
- @mixin euiButtonBase {
4
- display: inline-block;
5
- appearance: none;
6
- cursor: pointer;
7
- height: $euiButtonHeight;
8
- line-height: $euiButtonHeight; // prevents descenders from getting cut off
9
- text-align: center;
10
- white-space: nowrap;
11
- max-width: 100%;
12
- vertical-align: middle;
13
- }
14
-
15
- // Adds the focus (and hover) animation for translating up 1px
16
- @mixin euiButtonFocus {
17
- @include euiCanAnimate {
18
- transition: transform $euiAnimSpeedNormal ease-in-out, background-color $euiAnimSpeedNormal ease-in-out;
19
-
20
- &:hover:not(:disabled) {
21
- transform: translateY(-1px);
22
- }
23
-
24
- &:focus {
25
- animation: euiButtonActive $euiAnimSpeedNormal $euiAnimSlightBounce;
26
- }
27
-
28
- &:active:not(:disabled) {
29
- transform: translateY(1px);
30
- }
31
- }
32
- }
33
-
34
- // All of the button base styles including the base, focus, font, and initial styles
35
- // Does not include individual alterations like color or sizes
36
- @mixin euiButton {
37
- @include euiButtonBase;
38
- @include euiFont;
39
- @include euiFontSize;
40
- @include euiButtonFocus;
41
-
42
- font-weight: $euiButtonFontWeight;
43
- text-decoration: none;
44
- outline-offset: -1px;
45
-
46
- &:hover:not(:disabled),
47
- &:focus {
48
- text-decoration: underline;
49
- }
50
- }
51
-
52
- // Correctly lays out the contents of a button when using the proper dom elements of:
53
- // <button>
54
- // <span className="__content">
55
- // {icon/spinner}
56
- // {child}
57
- // </span>
58
- // </button>
59
- // 1. Apply margin to all but last item in the flex.
60
- // 2. Margin gets flipped because of the row-reverse.
61
- @mixin euiButtonContent($isReverse: false) {
62
- height: 100%;
63
- width: 100%;
64
- vertical-align: middle;
65
-
66
- .euiButtonContent__icon,
67
- .euiButtonContent__spinner {
68
- flex-shrink: 0; // Ensures the icons/spinner don't scale down below their intended size
69
- }
70
-
71
- @if ($isReverse) {
72
- flex-direction: row-reverse;
73
-
74
- > * + * {
75
- margin-inline-start: 0; // 1, 2
76
- margin-inline-end: $euiSizeS; // 1, 2
77
- }
78
- } @else {
79
- display: flex;
80
- justify-content: center;
81
- align-items: center;
82
-
83
- > * + * {
84
- margin-inline-start: $euiSizeS; // 1
85
- }
86
- }
87
- }
88
-
89
- @mixin euiButtonContentDisabled {
90
- pointer-events: auto;
91
- cursor: not-allowed;
92
-
93
- &:hover,
94
- &:focus,
95
- &:focus-within {
96
- text-decoration: none;
97
- }
98
-
99
- .euiButtonContent__spinner {
100
- border-color: euiLoadingSpinnerBorderColors(currentColor);
101
- }
102
- }
103
-
104
- /*
105
- * Creates the Amsterdam style of button with a transparent background
106
- */
107
- @mixin euiButtonDefaultStyle($color: 'primary', $includeStates: true, $transparency: $euiButtonDefaultTransparency) {
108
- $backgroundColor: $color;
109
-
110
- @if (map-has-key($euiButtonTypes, $color)) {
111
- $backgroundColor: map-get($euiButtonTypes, $color);
112
- }
113
-
114
- $percentConversion: $transparency * 100%;
115
- // This variable simulates the possibly darkest background the button could be on
116
- // Simulates the 20% opaque color on top of the page background color
117
- $backgroundColorSimulated: mix($euiPageBackgroundColor, $backgroundColor, $percentConversion);
118
- // Then we can calculate the darkest text color needed
119
- color: makeHighContrastColor($backgroundColor, $backgroundColorSimulated);
120
- // But still use transparency
121
- background-color: transparentize($backgroundColor, $transparency);
122
-
123
- @if ($includeStates) {
124
- &:not([class*='isDisabled']) {
125
- &:hover,
126
- &:focus {
127
- // Duplicated from inert state simply to override default theme
128
- background-color: transparentize($backgroundColor, $transparency);
129
- }
130
- }
131
- }
132
- }
133
-
134
- /*
135
- * Creates the Amsterdam style of fill button
136
- */
137
- @mixin euiButtonFillStyle($color: 'primary') {
138
- $backgroundColor: $color;
139
-
140
- @if (map-has-key($euiButtonTypes, $color)) {
141
- $backgroundColor: map-get($euiButtonTypes, $color);
142
- }
143
-
144
- background-color: $backgroundColor;
145
- color: chooseLightOrDarkText($backgroundColor);
146
- }
147
-
148
- // Keyframe animation declarations can be found in
149
- // utility/animations.scss
@@ -1,28 +0,0 @@
1
- // 1. Must supply both values to background-size or some browsers apply the single value to both directions
2
-
3
- @mixin euiFormControlDefaultShadow($borderOnly: false) {
4
- background-color: $euiFormBackgroundColor;
5
- background-repeat: no-repeat;
6
- background-size: 0% 100%; // 1
7
-
8
- @if ($borderOnly) {
9
- box-shadow: inset 0 0 0 1px $euiFormBorderColor;
10
- } @else {
11
- box-shadow:
12
- #{$euiFormControlBoxShadow},
13
- inset 0 0 0 1px $euiFormBorderColor;
14
- }
15
-
16
- transition:
17
- box-shadow $euiAnimSpeedFast ease-in,
18
- background-image $euiAnimSpeedFast ease-in,
19
- background-size $euiAnimSpeedFast ease-in,
20
- background-color $euiAnimSpeedFast ease-in;
21
-
22
- // Fixes bug in Firefox where adding a transition to the background-color
23
- // caused a flash of differently styled dropdown.
24
- @supports (-moz-appearance: none) {
25
- // List *must* be in the same order as the above.
26
- transition-property: box-shadow, background-image, background-size;
27
- }
28
- }
@@ -1,55 +0,0 @@
1
- @mixin euiPanel($selector) {
2
- @if variable-exists(selector) == false {
3
- @error 'A $selector must be provided to @mixin euiPanel().';
4
- } @else {
5
- #{$selector} {
6
- flex-grow: 1;
7
-
8
- &#{$selector}--flexGrowZero {
9
- flex-grow: 0;
10
- }
11
-
12
- &#{$selector}--hasShadow {
13
- @include euiBottomShadowMedium;
14
- }
15
-
16
- &#{$selector}--hasBorder {
17
- border: $euiBorderThin;
18
- box-shadow: none;
19
- }
20
-
21
- &#{$selector}--isClickable {
22
- // transition the shadow
23
- transition: all $euiAnimSpeedFast $euiAnimSlightResistance;
24
-
25
- &:enabled { // This is a good selector for buttons since it doesn't exist on divs
26
- // in case of button wrapper which inherently is inline-block and no width
27
- display: block;
28
- width: 100%;
29
- text-align: left;
30
- }
31
-
32
- &:hover,
33
- &:focus {
34
- @include euiBottomShadow;
35
- transform: translateY(-2px);
36
- cursor: pointer;
37
- }
38
- }
39
-
40
- // Border Radii
41
- @each $modifier, $amount in $euiPanelBorderRadiusModifiers {
42
- &#{$selector}--#{$modifier} {
43
- border-radius: $amount;
44
- }
45
- }
46
-
47
- // Background colors
48
- @each $modifier, $amount in $euiPanelBackgroundColorModifiers {
49
- &#{$selector}--#{$modifier} {
50
- background-color: $amount;
51
- }
52
- }
53
- }
54
- }
55
- }