Commit Graph

52 Commits

Author SHA1 Message Date
Alexander Marks
b48c7597f2 Add period to CHANGELOG.
This is a contrived CL to force Copybara's CL sync point ahead.

PiperOrigin-RevId: 272317303
2019-10-02 16:53:23 -07:00
Elliott Marquez
ae4eb57f71
ready changelog for release (#502) 2019-09-26 18:34:02 -07:00
Elliott Marquez
ce807c35c5
Fix outlined textfield notch when initially rendered hidden (#488)
fixes #444 by providing the mwc-textfied.layout() method.

In this PR:

added layout function
notch performs layout when label is changed
fixed hidden bug where foundation was being recreated too often
caused bug where changing maxLength caused foundation to unset invalid
had to pull logic out of foundation and into registerValidationAttributeHandler
The issue: when the label is floating and the element is outlined, but the label has no width, e.g.
mwc-textfield[outlined][label="something"][value="something"][hidden]

the mdc dataflow will calculate the size of the notch as zero. When hidden is removed, the notch will not update in size. Here we give them the layout method.

It is not possible to know when the textfield is changed from display: none to visible without setting a resize observer on the label. I wanted to avoid that because of possible render trashing and the overall heaviness of resizeObserver and a polyfill. Instead, it is up to the user to call layout when they change the visibility of the element.
2019-09-26 18:20:07 -07:00
Elliott Marquez
31d1d1a406
fix disabled styles on textarea (#492)
* fix disabled on textarea

* include disabled background fix on fullwidth

* update changelog
2019-09-20 15:43:44 -07:00
Elliott Marquez
100be45fb4
fix extra spacing – older browsers (#493)
* fix extra spacing – older browsers

* fix css colors on 'required' asterisk

* update changelog
2019-09-20 15:40:26 -07:00
Elliott Marquez
29015e2db7
update textfield value on input instead of change (#490)
* update textfield value on input instead of change

* update changelog

* deleted testing code
2019-09-20 15:33:37 -07:00
Elliott Marquez
2d43e4626d
Textfield fix ie (#491)
* IE fixes for textfield

* run formatter

* update changelog
2019-09-20 13:51:01 -07:00
Elliott Marquez
2da5724c2b
mwc-dialog (#462)
* initial scaffolding for dialog

* add focus and blur functions to mwc-button

* flesh out dialog implementation

* do not display action footer if no actions slotted

* only layout on listeners if open

* run formatter

* scrollable actually is handled by adapter / found

* fix reversing of actions

* - slotchange + `hideActions`, buttons->actions

* fix slotted styles

* remove style tag mutation

* change style dependencies

* don't leak mdc in dialog actions and initial-focus atributes

* make action and focus attributes configurable

* add css custom properties to dialog

* forgot to change checkbox to dialog

* dialog was made in 2019

* button -> action and remove isVisible

* removed leaky events from dialog lifecycle

* clean up tsconfig

* add unit tests

* textfield -> dialog

* run formatter

* fix multiple dialogs

* fix scrolling

* try to make max-width better

* initial pass at making older tests pass

* escape key on document instead

* run formatter

* fix lint issues

* try more arcane keyboardevent for older browsers

* fix styling associated with multiple in sec action

* fix focus on textfield

* also fix blur on textfield

* mwc-dialog demo

* add dialog to the main demo page

* fix typo in demo

* fix style edge case max-width too small cause jump

* redo change to max-width jumping

* first half of readme

* include video tag in static urlify script

* finish readme

* regenerate package-lock

* fix readme typo

* change confirmation gif size

* cleanup extraneous readme code

* do not override mdcfoundation.open

* make stacked a css change rather than DOM

* make stacked a css change rather than DOM impl

* add color swatches to readme

* fix all test file copyright dates

* add in the styles for the list in the readme

* use formfield in confirmation example

* scrollable degification

* make styled example the same as spec page

* dedupe initial focused example readme

* small dialog readme fixes

* update initial focus readme example

* moved alert example to top and commented out Simple example

* update standard gif to be static

* move event listeners to open an close

* readme change suggestions

* HTMLSlotElement removed from public props

* make public props lit element props

* primary-action => primaryAction; d-i-f => dIF;

* implement suggestions

* run formatter

* resolve merge issues
2019-09-12 18:14:47 -07:00
Alexander Marks
01c58e7baf Import symbols from lit-element and lit-html directly. (#472)
Previously, mwc-base re-exported lit-element and lit-html. While that
approach does make it a little easier to manage dependencies, it's
better to include the dependency directly. Lerna can easily be used
install/upgrade a dependency across all or a subset of packages.

- Users are likely to copy this style. We would prefer that if they use
  lit, they directly depend on it, instead of depending on our base class
  even when they may not need it.

- It locks us into using lit in our implementation without a breaking
  change. No plans to change that, but it's just one less thing in our
  API surface.

- It works better for internal Google tooling because the lit dependency
  can be analyzed statically.
2019-09-12 17:12:49 -07:00
Elliott Marquez
85da4fa18a
Fix focus button textfield (#463)
* add focus and blur functions to mwc-button

* fix focus on textfield

* also fix blur on textfield

* run formatter

* update changelog

* lintfix

* update changelog to match older style

* make ripple a dep vs dev dep

* focus and blur buttons with or without ripple
2019-09-10 11:41:14 -07:00
Alexander Marks
296e38be9e
Bump wicg-inert version to ensure module field exists for bundling. (#464) 2019-09-10 11:39:30 -07:00
Elliott Marquez
6f841a09e8
Changes to Textfield, line-ripple, and floating-label to build (#458)
* make it build internally!

* specify foundations and expand interface

* add explainers and fix typo

* update changelog

* fix changelog typo

* make dev deps deps

* update changelog to only public

* clear up things from clog (internal not external)

* undo all changelog notes
2019-09-05 20:17:51 -07:00
Alexander Marks
92e1f75321
Prepare to release 0.8.0 (#453) 2019-09-03 16:41:30 -07:00
Alexander Marks
5b2ab08d0a
Rename 3 component "base" modules for consistency. (#440) 2019-08-29 18:00:08 -07:00
Alexander Marks
761dc62083
Import TypeScript helpers from tslib, instead of inlining. (#439)
Published JavaScript files no longer include inlined TypeScript helpers such as `__decorate`. Instead, helpers are now imported from the `tslib` module dependency. This reduces code size by allowing multiple components to share the same helpers, and eliminates "this has been rewritten to undefined" errors from Rollup.
2019-08-28 11:47:31 -07:00
Elliott Marquez
4818641d09 added PR to changelog 2019-08-27 19:43:48 -07:00
Elliott Marquez
bda16062c4 update changelog for release 2019-08-27 19:43:48 -07:00
Alexander Marks
d6b4da7274 Update CHANGELOG for 0.7.0 2019-08-27 14:19:20 -07:00
Alexander Marks
45e107fbc3
Organize CHANGELOG for upcoming release. (#425)
- Organized items into Added/Changed/Fixed sections.
- Added **BREAKING** labels.
- Removed items that are only relevant for internal development. I think we should only include things directly relevant to users.
- Mentioned the new READMEs.
- Re-phrased some items for clarity.
- Added PR numbers so users can get more info.
2019-08-26 21:02:01 -07:00
Daniel Freedman
e1ec538f1b
Fix top-app-bar title centering for multiple action icons (#424)
This should be the original behavior before removal
2019-08-26 18:02:53 -07:00
Daniel Freedman
30e4a35b0a
Remove short Top App Bar variant (#422)
* Remove short Top App Bar variant

Design guidance from Material is that the short top app bar is not an
officially supported component.

In the case that this is reconsidered, the removal can be reverted.

* remove demos as well

* remove short from other top app bar readmes
2019-08-26 17:00:41 -07:00
Alexander Marks
aa060417c0
Fix bug where mwc-snackbar labelText could not be set (#412)
This adds a lit directive implementation of @material/mdc-snackbar/util.ts#announce, which does some tricks to ensure that snackbar labels will be handled correctly by screen readers.

The existing MDC announce util function is difficult to use directly here, because Lit can crash when DOM that it is managing changes outside of its purvue. In this case, we would render our labelText as the text content of the label div, but the MDC announce function then clears that
text content, and resets it after a timeout. We do the same thing here, but in a way that fits into Lit's lifecycle.
2019-08-26 15:48:56 -07:00
Elliott Marquez
fa1db3ac5b update changelog 2019-08-23 17:23:16 -07:00
Elliott Marquez
216a098c75 more pdates to changelog! 2019-08-23 17:23:16 -07:00
Elliott Marquez
3fe99dc4bd make fixture await render if contents are attached 2019-08-23 17:23:16 -07:00
Daniel Freedman
985ed42f2e Re-implement centerTitle for MWC Top App Bar
- Updated CHANGELOG
- Added screenshots
- Fixed `<mwc-top-app-bar centerTitlie dense prominent>` styling
2019-08-23 15:11:45 -07:00
Elliott Marquez
1f205edf05 update changelog 2019-08-16 18:49:40 -07:00
Elliott Marquez
c5058a66fa update changelog 2019-08-16 18:49:40 -07:00
Alexander Marks
352079f11e
Bump inert polyfill to fix drawer IE bug (#378) 2019-08-16 16:10:22 -07:00
Alexander Marks
dbb4fcf334 Fix broken checked property in <mwc-radio>
Previously, we didn't trigger the SelectionController (the class that
synchronizes radio button groups separated by a shadow root) when the
checked property was set, so the previously checked radio in a group was
not unchecked when a new one was checked.

This was more complicated than just triggering it from the existing
property @observer, because that gives us batched async changes (via the
UpdatingElement updated callback), so we can't reconstruct the order of
checked sets correctly. Replaces the observer with a setter that can
handle this synchronously.
2019-08-15 13:46:24 -07:00
Daniel Freedman
c580ebe19a Split icon button toggling into its own component
- This makes the non-togging case more lightweight
- `<mwc-icon-button>` for non-toggling use cases remains the same
- For toggling, use `<mwc-icon-button-toggle>`
  - `icon` is now `onIcon`

Related to #348
2019-08-15 11:35:22 -07:00
Daniel Freedman
b6cf725d60 Remove as any usage with @customElement
Unnecessary as of lit-element v0.6.5

Fixes #114
2019-08-13 16:01:21 -07:00
Daniel Freedman
e75002b98b Remove CHANGELOGS from subpackages
Only need the master CHANGELOG in the repo

Add note to CHANGELOG

Add section about the changelog to CONTRIBUTING
2019-08-13 15:38:26 -07:00
Daniel Freedman
b38f3813d6 Break out build from bootstrap
Run format in CI
2019-08-12 16:12:50 -07:00
Daniel Freedman
45e11481c9 Add lit-analyzer to linting
- Set up linting in Travis as well
2019-08-12 15:56:11 -07:00
Daniel Freedman
452f17cc1d
Merge branch 'master' into icon-button-slots 2019-08-12 15:21:29 -07:00
Daniel Freedman
17f36a8168 Fix tests for SVG and Image support
- Add tests with SVG, fix test checks for refactoring
- Add svg and image examples in demo
2019-08-12 12:32:33 -07:00
Alexander Marks
89b3707d2c Allow <mwc-button> open method to be called before firstUpdated. 2019-08-09 09:48:13 -07:00
Alexander Marks
d1267504e7 Fix <mwc-snackbar> default action/dismiss button styles.
Adds rules which apply the correct default color and icon size to
<mwc-button> and <mwc-icon-button> in the "action" and "dismiss" slots.

Adds --mdc-snackbar-action-color to override the default color of the
action button text.
2019-08-08 20:03:30 -07:00
Alexander Marks
dad4d1456f Fix IE11 icon rendering in <mwc-icon>
IE11 requires font-feature-settings: 'liga' to be turned on to render
ligatures.

I also synchronized this styling generally to exactly match the
recommendations at
https://google.github.io/material-design-icons/#icon-images-for-the-web
2019-08-07 17:32:21 -07:00
Alexander Marks
a07a39112f Fix <mwc-tab-bar> layout issue in Firefox. 2019-08-06 16:55:14 -07:00
Alexander Marks
446695725d CHANGELOG entry for removed auto icon font loading 2019-07-29 11:34:07 -07:00
Daniel Freedman
8c40e065ff update changelog 2019-06-05 15:19:28 -07:00
Daniel Freedman
8081e10d42 update changelog for drawer dependencies 2019-06-04 17:37:46 -07:00
Daniel Freedman
952097e948 Clean up project
- Remove draft versions of components that were not written in
typescript
- Remove draft base classes from mwc-base
- Fix typing in adapter event listeners for typescript update
2019-06-03 15:28:32 -07:00
Daniel Freedman
a1cc4bf4c5 Update dependencies
- Fix typescript building with 3.4
- Upgrade lerna to 3.x
2019-04-04 15:36:55 -07:00
Daniel Freedman
dafca12c59 [ci skip] update CHANGELOG.md 2019-03-26 15:38:15 -07:00
Daniel Freedman
b305546467 Merge branch 'master' into icon-button 2018-10-16 16:05:01 -07:00
Daniel Freedman
935f4dc1a0 Implement icon-button in typescript
- icon-toggle is now icon-button, matching MDC
- If `offLabel` is not defined, button is always "on" and does not
toggle

Fixes #95
2018-10-10 16:45:41 -07:00
Daniel Freedman
8fd896724f update CHANGELOG 2018-10-10 12:19:39 -07:00