-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Emotion ] Convert
EuiColorStops
(#6489)
* Convert to Emotion and improve empty range * Added CL * Added CL * Removing amsterdam styles * Enhanced colors. Added `brighten` color service. * Converted example to TS * Fixed popover position * Fix missing range color - border-color seems to be unused, removing that instead * [PR feedback] remove need to pass `isDisabled` as an arg * Replace :not selectors with JS logic - they aren't working in any case because classes have been rmeoved * [PR feedback] More styles cleanup - remove need for passing `isDisabled` - remove unnecessary not/focus-visible and Safari workarounds - focus-visible is now supported enough that this isn't an issue - fix non-working focus styles - `hexToRgb` returns an array and needs to be correctly interpolated to a comma separated string - order styles by state and element * Improve popover/drag behavior of color thumbs - remove unnecessary box-shadow - it's not working and when fixed to work, it doesn't match production - remove unnecessary border - already inheriting that from EuiRangeThumb - don't show the popover while dragging - Show the focus ring when the popover is open (to match focus ring when being clicked/dragged) - honestly not totally sure why I'm bothering, this component feels so buggy and laggy 🙈 * changelog * [docs] fix ts-ignore Co-authored-by: Constance Chen <[email protected]>
- Loading branch information
1 parent
d4d5af1
commit 737ac3d
Showing
21 changed files
with
521 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { UseEuiTheme } from '../../services'; | ||
import { mathWithUnits } from '../../global_styling'; | ||
|
||
export const euiColorPickerVariables = (euiThemeContext: UseEuiTheme) => { | ||
const euiTheme = euiThemeContext.euiTheme; | ||
|
||
return { | ||
width: mathWithUnits( | ||
[euiTheme.size.l, euiTheme.size.s], | ||
(x, y) => x * 5 + y * 4 | ||
), | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.