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

Bump dependencies to stable and add RTL styles #37

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#^2.3.0",
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.6.0",
"vaadin-material-styles": "vaadin/vaadin-material-styles#^1.3.2",
"vaadin-date-picker": "vaadin/vaadin-date-picker#^4.1.0-alpha1",
"vaadin-time-picker": "vaadin/vaadin-time-picker#^2.1.0-alpha2",
"vaadin-custom-field": "vaadin/vaadin-custom-field#^1.1.0-alpha1"
"vaadin-date-picker": "vaadin/vaadin-date-picker#^4.1.0",
"vaadin-time-picker": "vaadin/vaadin-time-picker#^2.1.0",
"vaadin-custom-field": "vaadin/vaadin-custom-field#^1.1.0"
},
"devDependencies": {
"iron-component-page": "^3.0.0",
"webcomponentsjs": "^1.0.0",
"web-component-tester": "^6.1.5",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.1.0-alpha1",
"vaadin-text-field": "vaadin/vaadin-text-field#^2.6.0-alpha4",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.1.0",
"vaadin-text-field": "vaadin/vaadin-text-field#^2.6.0",
"sugar": "2.0.4"
}
}
2 changes: 1 addition & 1 deletion src/vaadin-date-time-picker-date-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
memoizedTemplate = super.template.cloneNode(true);

memoizedTemplate.innerHTML = memoizedTemplate.innerHTML.replace(
'vaadin-text-field',
'vaadin-date-picker-text-field',
'vaadin-date-time-picker-date-text-field'
);
}
Expand Down
26 changes: 26 additions & 0 deletions src/vaadin-date-time-picker-date-text-field.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@

<link rel="import" href="../../vaadin-text-field/src/vaadin-text-field.html">

<dom-module id="vaadin-date-time-picker-date-text-field-styless" theme-for="vaadin-date-time-picker-date-text-field">
<template>
<style>
:host([dir="rtl"]) [part="input-field"] {
Comment on lines 7 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to import <link rel="import" href="../../vaadin-date-picker/src/vaadin-date-picker-text-field.html"> and then something like:

class DateTimePickerDateTextFieldElement extends customElements.get('vaadin-date-picker-text-field')

Then we wouldn't need to duplicate the RTL styles here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also noticed there's a typo in -styless"

direction: ltr;
}

:host([dir="rtl"]) [part="value"]::placeholder {
direction: rtl;
text-align: left;
}

:host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
direction: rtl;
text-align: left;
}

:host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
:host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
direction: rtl;
text-align: left;
}
</style>
</template>
</dom-module>

<script>
(function() {
/**
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions theme/lumo/vaadin-date-time-picker-styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

:not(*):placeholder-shown, /* to prevent broken styles on IE */
:host([dir="rtl"]) [part="value"]:placeholder-shown,
:host([dir="rtl"]) [part="input-field"] ::slotted(input:placeholder-shown) {
--_lumo-text-field-overflow-mask-image: none;
}

:host([dir="rtl"]) [part="value"],
:host([dir="rtl"]) [part="input-field"] ::slotted(input) {
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
}
Comment on lines +19 to +29
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess these can also be removed from here if this element is made to extend vaadin-date-picker-text-field?

</style>
</template>
</dom-module>
Expand Down