mirror of
https://github.com/material-components/material-web.git
synced 2024-10-27 06:04:44 +03:00
parent
381281fd6c
commit
9b03ee6880
31
.github/ISSUE_TEMPLATE.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
** PLEASE READ THIS BEFORE FILING AN ISSUE **
|
||||||
|
|
||||||
|
**I'm submitting a:**
|
||||||
|
<!-- (check one with "x") -->
|
||||||
|
- [ ] bug report
|
||||||
|
- [ ] feature request
|
||||||
|
|
||||||
|
**What OS are you using?**
|
||||||
|
<!-- Please include OS name and version -->
|
||||||
|
|
||||||
|
**What browser(s) is this bug affecting:**
|
||||||
|
<!-- Please include the browser version. A user-agent string is also quite helpful. -->
|
||||||
|
|
||||||
|
**Current behavior:**
|
||||||
|
<!-- Describe how the bug manifests. -->
|
||||||
|
|
||||||
|
**Expected behavior:**
|
||||||
|
<!-- Describe what the behavior would be without the bug. -->
|
||||||
|
|
||||||
|
**Steps to reproduce:**
|
||||||
|
<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce and if possible a demo
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Related code:**
|
||||||
|
|
||||||
|
```js
|
||||||
|
// insert any relevant code here or add a include a codepen
|
||||||
|
```
|
||||||
|
|
||||||
|
**Other information:**
|
||||||
|
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
|
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: 'Focus Area: Components, Type: Bug'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Browser Version (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: 'Focus Area: Components, Type: Feature'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
22
.github/ISSUE_TEMPLATE/new-task-template.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/new-task-template.md
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
name: New Task Template
|
||||||
|
about: Use this template when you are creating a new task
|
||||||
|
title: ''
|
||||||
|
labels: 'Focus Area: Components, Type: Feature'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Description
|
||||||
|
<!--
|
||||||
|
Who wants the functionality
|
||||||
|
What it is they want
|
||||||
|
Why they want it
|
||||||
|
Functional description of task/subtask
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Acceptance criteria
|
||||||
|
<!--
|
||||||
|
What the card must do in order to accept it as complete.
|
||||||
|
Acceptance Criteria must be concrete or measurable.
|
||||||
|
-->
|
42
.github/workflows/auto-format.yml
vendored
Normal file
42
.github/workflows/auto-format.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: auto-format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10
|
||||||
|
|
||||||
|
- name: NPM install
|
||||||
|
# Don't run postinstall because we don't need to install sub-packages.
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
|
||||||
|
- name: Format
|
||||||
|
run: npm run format
|
||||||
|
|
||||||
|
- name: Check if format produces git diff
|
||||||
|
id: ifChange
|
||||||
|
run: git diff --exit-code || echo "::set-output name=changed::yes"
|
||||||
|
|
||||||
|
- name: Create PR
|
||||||
|
if: steps.ifChange.outputs.changed == 'yes'
|
||||||
|
uses: peter-evans/create-pull-request@v1.7.3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
commit-message: Auto-format
|
||||||
|
# TODO Find or make an account that is whitelisted to not trigger the CLA check.
|
||||||
|
author-email: format-bot@polymer-project.org
|
||||||
|
author-name: Polymer GitHub Actions Robot
|
||||||
|
title: Auto-format master branch
|
||||||
|
body: This PR was auto generated by the auto-format GitHub action.
|
||||||
|
reviewers: aomarks,azakus,e111077,asyncliz
|
||||||
|
branch: auto-format-action
|
||||||
|
branch-suffix: none
|
||||||
|
labels: "Ready for Google"
|
45
.github/workflows/bump-mdc-deps.yml
vendored
Normal file
45
.github/workflows/bump-mdc-deps.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: bump-mdc-deps
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run every 3 hours.
|
||||||
|
- cron: '0 */3 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bump:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10
|
||||||
|
|
||||||
|
- name: NPM install
|
||||||
|
# Don't run postinstall because we don't need to install sub-packages.
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
|
||||||
|
- name: Build scripts
|
||||||
|
run: npm run build:scripts
|
||||||
|
|
||||||
|
- name: Bump MDC deps
|
||||||
|
id: bump
|
||||||
|
# Note this script sets the "new-mdc-version" GitHub Action output.
|
||||||
|
run: npm run bump-all-mdc-web-deps
|
||||||
|
|
||||||
|
- name: Create PR
|
||||||
|
if: steps.bump.outputs.new-mdc-version != ''
|
||||||
|
# TODO Avoid this third-party action if possible. Can we install and use
|
||||||
|
# https://github.com/github/hub instead?
|
||||||
|
uses: peter-evans/create-pull-request@v1.5.2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TEDIUM_BOT_GITHUB_ACCESS_TOKEN }}
|
||||||
|
COMMIT_MESSAGE: Auto bump MDC Web deps to ${{ steps.bump.outputs.new-mdc-version }}
|
||||||
|
# TODO Find or make an account that is whitelisted to not trigger the# CLA check.
|
||||||
|
COMMIT_AUTHOR_EMAIL: format-bot@polymer-project.org
|
||||||
|
COMMIT_AUTHOR_NAME: Polymer GitHub Actions Robot
|
||||||
|
PULL_REQUEST_TITLE: Auto bump MDC Web deps to ${{ steps.bump.outputs.new-mdc-version }}
|
||||||
|
PULL_REQUEST_BODY: This PR was auto generated by the bump-mdc-deps GitHub action.
|
||||||
|
PULL_REQUEST_REVIEWERS: aomarks,azakus,e111077,asyncliz
|
||||||
|
PULL_REQUEST_BRANCH: auto-bump-mdc-deps-${{ steps.bump.outputs.new-mdc-version }}
|
||||||
|
BRANCH_SUFFIX: none
|
46
.github/workflows/release-canary.yml
vendored
Normal file
46
.github/workflows/release-canary.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: MWC Release (Canary)
|
||||||
|
|
||||||
|
# This workflow creates a pre-release and publishes packages to NPM with canary
|
||||||
|
# tag on every commit to master.
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'packages/**/*.ts'
|
||||||
|
- 'packages/**/*.scss'
|
||||||
|
- '**/package*.json'
|
||||||
|
- '**/.npmignore'
|
||||||
|
- '**/tsconfig.json'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-canary:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v1.0.0
|
||||||
|
- name: Checkout master branch
|
||||||
|
# GITHUB_REF:11 gets `refs/heads/master` => `master`.
|
||||||
|
# See https://github.com/actions/checkout/issues/6
|
||||||
|
run: |
|
||||||
|
git checkout "${GITHUB_REF:11}"
|
||||||
|
git pull
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
- name: Create canary release
|
||||||
|
run: |
|
||||||
|
npx lerna version preminor --no-git-tag-version --no-push --preid canary.$(git rev-parse --short HEAD) --yes --exact
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
git commit -am "chore: Publish"
|
||||||
|
- name: Publish to NPM registry with canary tag
|
||||||
|
run: npx lerna publish from-package --yes --dist-tag canary
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
54
.github/workflows/tests.yml
vendored
Normal file
54
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
name: tests
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
|
||||||
|
- name: NPM install
|
||||||
|
# ignore-scripts so that we skip postinstall, because postinstall runs
|
||||||
|
# bootstrap, and it's a little nicer to see that here as its own step
|
||||||
|
# when debugging.
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
|
||||||
|
- name: Lerna bootstrap
|
||||||
|
run: npm run bootstrap
|
||||||
|
|
||||||
|
- name: Check format
|
||||||
|
run: npm run format:check
|
||||||
|
|
||||||
|
- name: Build component Sass
|
||||||
|
run: npm run build:styling
|
||||||
|
|
||||||
|
- name: Compile component TypeScript
|
||||||
|
run: npm run build:typescript
|
||||||
|
|
||||||
|
# TODO(aomarks) Once b/144957560 is fixed, move lint and format into their
|
||||||
|
# own workflows or jobs so that they can run in parallel.
|
||||||
|
- name: Check lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Compile test TypeScript
|
||||||
|
run: npm run build:tests
|
||||||
|
|
||||||
|
- name: Unit tests
|
||||||
|
env:
|
||||||
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
run: |
|
||||||
|
# Don't run Sauce from a forked repo, since the code may not be trusted
|
||||||
|
# and therefore secrets like the Sauce password are not available.
|
||||||
|
# GITHUB_HEAD_REF is only defined when building a fork.
|
||||||
|
if [ ! "$GITHUB_HEAD_REF" ]; then
|
||||||
|
export USE_SAUCE=true
|
||||||
|
export SAUCE_BUILD_ID=mwc-tests-${GITHUB_EVENT_NAME}-${GITHUB_ACTION}-${GITHUB_SHA}
|
||||||
|
export SAUCE_TUNNEL_ID=${SAUCE_BUILD_ID}-tunnel
|
||||||
|
fi
|
||||||
|
npm test
|
@ -21,7 +21,7 @@ import {Checkbox} from '@material/mwc-checkbox';
|
|||||||
import {html, property, query} from 'lit-element';
|
import {html, property, query} from 'lit-element';
|
||||||
import {classMap} from 'lit-html/directives/class-map.js';
|
import {classMap} from 'lit-html/directives/class-map.js';
|
||||||
|
|
||||||
import {GraphicType, ListItemBase} from './mwc-list-item-base-master.js';
|
import {GraphicType, ListItemBase} from './mwc-list-item-base.js';
|
||||||
|
|
||||||
export class CheckListItemBase extends ListItemBase {
|
export class CheckListItemBase extends ListItemBase {
|
||||||
@query('slot') protected slotElement!: HTMLSlotElement|null;
|
@query('slot') protected slotElement!: HTMLSlotElement|null;
|
||||||
|
@ -24,7 +24,7 @@ import {ifDefined} from 'lit-html/directives/if-defined.js';
|
|||||||
import {MDCListAdapter} from './mwc-list-adapter.js';
|
import {MDCListAdapter} from './mwc-list-adapter.js';
|
||||||
import MDCListFoundation, {ActionDetail, isIndexSet, SelectedDetail} from './mwc-list-foundation.js';
|
import MDCListFoundation, {ActionDetail, isIndexSet, SelectedDetail} from './mwc-list-foundation.js';
|
||||||
import {MWCListIndex} from './mwc-list-foundation.js';
|
import {MWCListIndex} from './mwc-list-foundation.js';
|
||||||
import {ListItemBase, RequestSelectedDetail} from './mwc-list-item-base-master.js';
|
import {ListItemBase, RequestSelectedDetail} from './mwc-list-item-base.js';
|
||||||
|
|
||||||
export {createSetFromIndex, isEventMulti, isIndexSet, MWCListIndex} from './mwc-list-foundation.js';
|
export {createSetFromIndex, isEventMulti, isIndexSet, MWCListIndex} from './mwc-list-foundation.js';
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
/**
|
|
||||||
@license
|
|
||||||
Copyright 2020 Google Inc. All Rights Reserved.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import {customElement} from 'lit-element';
|
|
||||||
|
|
||||||
import {ListItemBase} from './mwc-list-item-base-master.js';
|
|
||||||
import {style} from './mwc-list-item-css.js';
|
|
||||||
|
|
||||||
export {GraphicType, RequestSelectedDetail} from './mwc-list-item-base-master.js';
|
|
||||||
declare global {
|
|
||||||
interface HTMLElementTagNameMap {
|
|
||||||
'mwc-list-item': ListItem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@customElement('mwc-list-item')
|
|
||||||
export class ListItem extends ListItemBase {
|
|
||||||
static styles = style;
|
|
||||||
}
|
|
@ -22,7 +22,7 @@ import {html, property, query} from 'lit-element';
|
|||||||
import {classMap} from 'lit-html/directives/class-map.js';
|
import {classMap} from 'lit-html/directives/class-map.js';
|
||||||
import {ifDefined} from 'lit-html/directives/if-defined.js';
|
import {ifDefined} from 'lit-html/directives/if-defined.js';
|
||||||
|
|
||||||
import {GraphicType, ListItemBase} from './mwc-list-item-base-master.js';
|
import {GraphicType, ListItemBase} from './mwc-list-item-base.js';
|
||||||
|
|
||||||
export class RadioListItemBase extends ListItemBase {
|
export class RadioListItemBase extends ListItemBase {
|
||||||
@query('slot') protected slotElement!: HTMLSlotElement|null;
|
@query('slot') protected slotElement!: HTMLSlotElement|null;
|
||||||
|
Loading…
Reference in New Issue
Block a user