In Google, every directory containing TypeScript files must be a
directory with a BUILD file (a package), and packages cannot contain
dashes. We could handle this case with a transformation, but it seems
simpler to just keep a flatter layout upstream.
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.
* 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
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.
* 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
* 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
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.
- 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.
* 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
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.