Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Timelion] Remove kui usage #80287

Merged
merged 12 commits into from
Oct 16, 2020
61 changes: 61 additions & 0 deletions src/plugins/timelion/public/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,68 @@
margin: $euiSizeM;
}

.timApp__title {
display: flex;
align-items: center;
padding: $euiSizeM $euiSizeS;
font-size: $euiSize;
font-weight: $euiFontWeightBold;
border-bottom: 1px solid $euiColorLightShade;
flex-grow: 1;
background-color: $euiColorEmptyShade;
}

.timApp__stats {
font-weight: $euiFontWeightRegular;
color: $euiColorMediumShade;
}

.timApp__form {
display: flex;
align-items: flex-start;
margin-top: $euiSize;
}

.timApp__expression {
display: flex;
flex: 1;
margin-right: $euiSizeS;
}

.timApp__button {
margin-top: $euiSizeS;
padding: $euiSizeXS $euiSizeM;
font-size: $euiSize;
border: none;
border-radius: $euiSizeXS;
color: $euiColorEmptyShade;
background-color: $euiColorPrimary;
}

.timApp__button--secondary {
margin-top: $euiSizeS;
padding: $euiSizeXS $euiSizeM;
font-size: $euiSize;
border: 1px solid $euiColorPrimary;
border-radius: $euiSizeXS;
color: $euiColorPrimary;
width: 100%;
}

.timApp_sectionTitle {
margin-bottom: $euiSizeM;
font-size: 18px;
color: $euiColorDarkestShade;
}

.timApp__helpText {
margin-bottom: $euiSize;
font-size: 14px;
color: $euiColorDarkShade;
}

.timApp_label {
font-size: $euiSize;
line-height: 1.5;
font-weight: $euiFontWeightBold;
}
51 changes: 51 additions & 0 deletions src/plugins/timelion/public/directives/_form.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$warningColor: '#BD271E';
stratoula marked this conversation as resolved.
Show resolved Hide resolved

.form-control {
@include euiFontSizeS;
display: block;
Expand Down Expand Up @@ -34,3 +36,52 @@ select.form-control {
.fullWidth {
width: 100%;
}

.dropdownWarning {
margin-bottom: $euiSize;
padding: $euiSizeXS $euiSizeS;
color: $euiColorDarkestShade;
border-left: solid 2px $warningColor;
stratoula marked this conversation as resolved.
Show resolved Hide resolved
font-size: $euiSizeM;
}

.form-checkbox {
display: flex;
align-items: center;
line-height: 1.5;
position: relative;
}

.form-checkbox__input {
appearance: none;
background-color: $euiColorLightestShade;
border: 1px solid $euiColorLightShade;
border-radius: $euiSizeXS;
width: $euiSize;
height: $euiSize;
font-size: $euiSizeM;
transition: background-color .1s linear;
}

.form-checkbox__input:checked {
border-color: $euiColorPrimary;
background-color: $euiColorPrimary;
}

.form-checkbox__icon {
position: absolute;
top: 0;
left: 2px;
}

.form-textarea {
padding: $euiSizeXS $euiSizeM;
font-size: $euiSize;
line-height: 1.5;
color: $euiColorDarkestShade;
background-color: $euiColorLightestShade;
border: 1px solid $euiColorLightShade;
border-radius: $euiSizeXS;
transition: border-color .1s linear;
margin-bottom: $euiSize;
}
37 changes: 37 additions & 0 deletions src/plugins/timelion/public/directives/_saved_object_finder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,50 @@

saved-object-finder {

.search-bar {
display: flex;
align-items: center;
}

.search-bar__section {
position: relative;
margin-right: $euiSize;
flex: 1;
}

.search-bar__icon {
position: absolute;
top: $euiSizeS;
left: $euiSizeS;
font-size: $euiSize;
color: $euiColorDarkShade;
}

.search-bar__input {
padding: $euiSizeS $euiSizeM;
color: $euiColorDarkestShade;
background-color: $euiColorEmptyShade;
border: 1px solid $euiColorLightShade;
border-radius: $euiSizeXS;
transition: border-color .1s linear;
padding-left: $euiSizeXL;
width: 100%;
font-size: $euiSize;
}

.search-bar__pagecount {
font-size: $euiSize;
color: $euiColorDarkShade;
}

.list-sort-button {
border-top-left-radius: 0;
border-top-right-radius: 0;
border: none;
padding: $euiSizeS $euiSize;
font-weight: $euiFontWeightRegular;
background-color: $euiColorLightestShade;
margin-top: $euiSize;
}

.li-striped {
Expand Down
24 changes: 10 additions & 14 deletions src/plugins/timelion/public/directives/saved_object_finder.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<form
role="form"
class="kuiVerticalRhythm"
>
<div class="kuiBar">
<div class="kuiBarSection">
<div class="kuiSearchInput fullWidth">
<div class="kuiSearchInput__icon kuiIcon fa-search"></div>
<div class="search-bar">
<div class="search-bar__section">
<icon class="search-bar__icon" type="'search'"></icon>
<input
class="kuiSearchInput__input"
class="search-bar__input"
input-focus
disable-input-focus="disableAutoFocus"
ng-model="filter"
Expand All @@ -18,18 +16,17 @@
autocomplete="off"
data-test-subj="savedObjectFinderSearchInput"
>
</div>
</div>

<div class="kuiBarSection">
<p class="kuiText kuiSubduedText"
<div>
<p class="search-bar__pagecount"
i18n-id="timelion.savedObjectFinder.pageItemsFromHitCountDescription"
i18n-default-message="{pageFirstItem}-{pageLastItem} of {hitCount}"
i18n-values="{pageFirstItem, pageLastItem, hitCount: finder.hitCount}"
></p>
<div class="kuiButtonGroup">
<div>
<button
class="kuiButton kuiButton--primary"
class="timApp__button"
ng-if="onAddNew"
ng-click="onAddNew()"
data-test-subj="addNewSavedObjectLink"
Expand All @@ -40,7 +37,7 @@
></button>

<button
class="kuiButton kuiButton--secondary"
class="timApp__button--secondary"
ng-if="!useLocalManagement"
ng-click="finder.manageObjects(finder.properties.name)"
i18n-id="timelion.savedObjectFinder.manageItemsButtonLabel"
Expand All @@ -56,7 +53,6 @@
<paginate
list="finder.hits"
per-page="20"
class="kuiVerticalRhythm"
>
<button
class="paginate-heading list-group-item list-sort-button"
Expand Down Expand Up @@ -99,7 +95,7 @@
ng-blur="finder.hitBlur($event)"
ng-click="finder.preventClick($event)">
<span aria-hidden="true" class="finder-type fa" ng-if="hit.icon" ng-class="hit.icon"></span>
<div class="kuiIcon fa-flask ng-scope" ng-if="hit.type.shouldMarkAsExperimentalInUI()"></div>
<icon type="'beaker'" ng-if="hit.type.shouldMarkAsExperimentalInUI()"></icon>
kertal marked this conversation as resolved.
Show resolved Hide resolved
<span>{{hit.title}}</span>
<p ng-if="hit.description" ng-bind="hit.description"></p>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<div ng-hide="!savedObject.id || savedObject.isSaving">
<div
ng-hide="!savedObject.isTitleChanged() || savedObject.copyOnSave"
class="kuiLocalDropdownWarning kuiVerticalRhythmSmall"
class="dropdownWarning"
i18n-id="timelion.savedObjects.howToSaveAsNewDescription"
i18n-default-message="In previous versions of Kibana, changing the name of a {savedObjectName} would make a copy with the new name. Use the 'Save as a new {savedObjectName}' checkbox to do this now."
i18n-values="{ savedObjectName: savedObject.getDisplayName() }"
i18n-description="'Save as a new {savedObjectName}' refers to timelion.savedObjects.saveAsNewLabel and should be the same text."
></div>

<label class="kuiCheckBoxLabel kuiVerticalRhythmSmall">
<label class="form-checkbox">
<input
class="kuiCheckBox"
class="form-checkbox__input"
type="checkbox"
data-test-subj="saveAsNewCheckbox"
ng-model="savedObject.copyOnSave"
ng-checked="savedObject.copyOnSave"
>
<icon type="'check'" class="form-checkbox__icon" color="'white'" size="'s'"></icon>

<span
class="kuiCheckBoxLabel__text"
style="margin-left: 8px;"
i18n-id="timelion.savedObjects.saveAsNewLabel"
i18n-default-message="Save as a new {savedObjectName}"
i18n-values="{ savedObjectName: savedObject.getDisplayName() }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
data-expression-input
role="textbox"
rows="{{ rows }}"
class="timExpressionInput kuiTextArea fullWidth"
class="timExpressionInput form-textarea fullWidth"
placeholder="{{ ::'timelion.expressionInputPlaceholder' | i18n: { defaultMessage: 'Try a query with {esQuery}', values: { esQuery: '.es(*)' } } }}"
ng-model="sheet"
ng-focus="onFocusInput()"
Expand Down
Loading