Skip to content

Commit

Permalink
Set initial value for textfields and textareas.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasbm committed Nov 2, 2019
1 parent d3646df commit 0557940
Show file tree
Hide file tree
Showing 29 changed files with 236 additions and 232 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ You are more than welcome to contribute to this repository! Below are some instr

1. Clone this repository by running `git clone https://github.com/andreasbm/weightless.git`.
2. Run `npm i` to install all dependencies.
3. Spin up the development server with `npm run s`. The browser should automatically be opened at the correct url.
5. Run tests with `npm run test`.
3. Spin up the development server with `npm run s`. The browser should automatically be opened at the correct url. If not, you can open your browser and go to `http://localhost:1350`.
4. Run tests with `npm run test`.
5. Lint the files with `npm run lint`.
6. Compile the documentation by running `npm run docs`.

The elements are written in [Typescript](https://www.typescriptlang.org/) and the stylesheets are written in [SASS](https://sass-lang.com/). All of the web components uses [lit-element](https://lit-element.polymer-project.org/).
Expand Down
5 changes: 3 additions & 2 deletions blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ You are more than welcome to contribute to this repository! Below are some instr

1. Clone this repository by running `git clone https://github.com/andreasbm/weightless.git`.
2. Run `npm i` to install all dependencies.
3. Spin up the development server with `npm run s`. The browser should automatically be opened at the correct url.
5. Run tests with `npm run test`.
3. Spin up the development server with `npm run s`. The browser should automatically be opened at the correct url. If not, you can open your browser and go to `http://localhost:1350`.
4. Run tests with `npm run test`.
5. Lint the files with `npm run lint`.
6. Compile the documentation by running `npm run docs`.

The elements are written in [Typescript](https://www.typescriptlang.org/) and the stylesheets are written in [SASS](https://sass-lang.com/). All of the web components uses [lit-element](https://lit-element.polymer-project.org/).
Expand Down
20 changes: 10 additions & 10 deletions src/lib/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Allow users to take actions, and make choices, with a single tap.

| Property | Attribute | Type | Default | Description |
|------------|------------|------------------------|----------|--------------------------------------------------|
| `disabled` | `disabled` | `boolean` | false | Disables the element. |
| `fab` | `fab` | `boolean` | false | Makes the button round and squared. |
| `flat` | `flat` | `boolean` | false | Makes the button flat. |
| `inverted` | `inverted` | `boolean` | false | Inverts the colors of the button. |
| `name` | `name` | `string` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | false | Deactivates the ripple. |
| `outlined` | `outlined` | `boolean` | false | Makes the button outlined. |
| `readonly` | `readonly` | `boolean` | false | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | false | Makes the element required in a form context. |
| `disabled` | `disabled` | `boolean` | | Disables the element. |
| `fab` | `fab` | `boolean` | | Makes the button round and squared. |
| `flat` | `flat` | `boolean` | | Makes the button flat. |
| `inverted` | `inverted` | `boolean` | | Inverts the colors of the button. |
| `name` | `name` | `string \| undefined` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | | Deactivates the ripple. |
| `outlined` | `outlined` | `boolean` | | Makes the button outlined. |
| `readonly` | `readonly` | `boolean` | | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "button" | Role of the button. |
| `type` | `type` | `"button" \| "submit"` | "submit" | Type of the button. |
| `value` | `value` | `string` | "" | Value of the form element. |
| `value` | `value` | `string` | | Value of the form element. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#css-custom-properties)
Expand Down
6 changes: 3 additions & 3 deletions src/lib/card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Group related content and action.

## ➤ Properties

| Property | Attribute | Type | Default | Description |
|-------------|-------------|-----------|---------|---------------------------|
| `hoverable` | `hoverable` | `boolean` | false | Makes the card hoverable. |
| Property | Attribute | Type | Description |
|-------------|-------------|-----------|---------------------------|
| `hoverable` | `hoverable` | `boolean` | Makes the card hoverable. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#css-custom-properties)
Expand Down
22 changes: 11 additions & 11 deletions src/lib/checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Turn an option on or off.

## ➤ Properties

| Property | Attribute | Type | Default | Description |
|-----------------|-----------------|------------|------------|--------------------------------------------------|
| `ariaChecked` | `aria-checked` | `string` | | Aria checked attribute. |
| `checked` | `checked` | `boolean` | false | Checks the switch. |
| `disabled` | `disabled` | `boolean` | false | Disables the element. |
| `indeterminate` | `indeterminate` | `boolean` | false | Indeterminate checkbox state. |
| `name` | `name` | `string` | | Name of the native form element. |
| `readonly` | `readonly` | `boolean` | false | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | false | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "checkbox" | Role of the switch. |
| `value` | `value` | `string` | "" | Value of the form element. |
| Property | Attribute | Type | Default | Description |
|-----------------|-----------------|-----------------------|------------|--------------------------------------------------|
| `ariaChecked` | `aria-checked` | `string` | | Aria checked attribute. |
| `checked` | `checked` | `boolean` | | Checks the switch. |
| `disabled` | `disabled` | `boolean` | | Disables the element. |
| `indeterminate` | `indeterminate` | `boolean` | | Indeterminate checkbox state. |
| `name` | `name` | `string \| undefined` | | Name of the native form element. |
| `readonly` | `readonly` | `boolean` | | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "checkbox" | Role of the switch. |
| `value` | `value` | `string` | | Value of the form element. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#events)
Expand Down
26 changes: 13 additions & 13 deletions src/lib/dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Highly interruptive messages.

## ➤ Properties

| Property | Attribute | Type | Default | Description |
|--------------------|--------------------|---------------|----------|--------------------------------------------------|
| `backdrop` | `backdrop` | `boolean` | false | Whether the backdrop is visible or not. |
| `blockScrolling` | `blockScrolling` | `boolean` | false | Whether the overlay blocks the scrolling on the scroll container. |
| `disableFocusTrap` | `disableFocusTrap` | `boolean` | false | Whether the focus trap be disabled. |
| `duration` | `duration` | `number` | 200 | The duration of the animations. |
| `fixed` | `fixed` | `boolean` | false | Whether the overlay is fixed or not. |
| `open` | `open` | `boolean` | false | Whether the overlay is open or not. |
| `persistent` | `persistent` | `boolean` | false | Whether the overlay is persistent or not. When the overlay is persistent, ESCAPE and backdrop clicks won't close it. |
| `role` | `role` | `AriaRole` | "dialog" | Role of the dialog. |
| `scrollContainer` | `scrollContainer` | `EventTarget` | | The container the overlay lives in. |
| `scrollable` | `scrollable` | `boolean` | false | Makes the dialog scrollable. |
| `size` | `size` | `DialogSize` | | Size of the dialog. |
| Property | Attribute | Type | Default | Description |
|--------------------|--------------------|---------------------------|----------|--------------------------------------------------|
| `backdrop` | `backdrop` | `boolean` | | Whether the backdrop is visible or not. |
| `blockScrolling` | `blockScrolling` | `boolean` | | Whether the overlay blocks the scrolling on the scroll container. |
| `disableFocusTrap` | `disableFocusTrap` | `boolean` | | Whether the focus trap be disabled. |
| `duration` | `duration` | `number` | 200 | The duration of the animations. |
| `fixed` | `fixed` | `boolean` | | Whether the overlay is fixed or not. |
| `open` | `open` | `boolean` | | Whether the overlay is open or not. |
| `persistent` | `persistent` | `boolean` | | Whether the overlay is persistent or not. When the overlay is persistent, ESCAPE and backdrop clicks won't close it. |
| `role` | `role` | `AriaRole` | "dialog" | Role of the dialog. |
| `scrollContainer` | `scrollContainer` | `EventTarget` | | The container the overlay lives in. |
| `scrollable` | `scrollable` | `boolean` | | Makes the dialog scrollable. |
| `size` | `size` | `DialogSize \| undefined` | | Size of the dialog. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#events)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Thin line that groups content in lists and layouts.
| Property | Attribute | Type | Default | Description |
|------------|------------|------------|-------------|-----------------------------|
| `role` | `role` | `AriaRole` | "separator" | Role of the backdrop. |
| `vertical` | `vertical` | `boolean` | false | Makes the divider vertical. |
| `vertical` | `vertical` | `boolean` | | Makes the divider vertical. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#css-custom-properties)
Expand Down
26 changes: 13 additions & 13 deletions src/lib/expansion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Provide an expandable details-summary view.

## ➤ Properties

| Property | Attribute | Type | Default | Description |
|---------------|---------------|------------|---------------|--------------------------------------------------|
| `ariaChecked` | `ariaChecked` | `string` | | Aria expanded attribute. |
| `checked` | `checked` | `boolean` | false | Opens the expansion. |
| `disabled` | `disabled` | `boolean` | false | Disables the element. |
| `duration` | `duration` | `number` | 250 | The duration of the animations. |
| `icon` | `icon` | `string` | "expand_more" | Icon name. |
| `name` | `name` | `string` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | false | Deactivates the ripple. |
| `readonly` | `readonly` | `boolean` | false | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | false | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "radio" | Role of the radio behavior. |
| `value` | `value` | `string` | "" | Value of the form element. |
| Property | Attribute | Type | Default | Description |
|---------------|----------------|-----------------------|---------------|--------------------------------------------------|
| `ariaChecked` | `aria-checked` | `string` | | Aria expanded attribute. |
| `checked` | `checked` | `boolean` | | Opens the expansion. |
| `disabled` | `disabled` | `boolean` | | Disables the element. |
| `duration` | `duration` | `number` | 250 | The duration of the animations. |
| `icon` | `icon` | `string \| undefined` | "expand_more" | Icon name. |
| `name` | `name` | `string \| undefined` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | | Deactivates the ripple. |
| `readonly` | `readonly` | `boolean` | | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "radio" | Role of the radio behavior. |
| `value` | `value` | `string` | | Value of the form element. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#events)
Expand Down
10 changes: 5 additions & 5 deletions src/lib/label/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Make form elements more accessible.

## ➤ Properties

| Property | Attribute | Type | Default | Description |
|------------|------------|-----------|---------|--------------------------------------------------|
| `for` | `for` | `string` | | Query of the form element click events are re-fired upon. |
| `nowrap` | `nowrap` | `boolean` | false | Caps the label element with ellipsis if overflowing. |
| `required` | `required` | `boolean` | false | Styles the label as required. |
| Property | Attribute | Type | Description |
|------------|------------|-----------------------|--------------------------------------------------|
| `for` | `for` | `string \| undefined` | Query of the form element click events are re-fired upon. |
| `nowrap` | `nowrap` | `boolean` | Caps the label element with ellipsis if overflowing. |
| `required` | `required` | `boolean` | Styles the label as required. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#css-custom-properties)
Expand Down
14 changes: 7 additions & 7 deletions src/lib/list-item/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Display an item in a list.

| Property | Attribute | Type | Default | Description |
|-------------|-------------|------------------------|------------|--------------------------------------------------|
| `clickable` | `clickable` | `boolean` | false | Makes the element clickable. |
| `disabled` | `disabled` | `boolean` | false | Disables the element. |
| `name` | `name` | `string` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | false | Deactivates the ripple. |
| `readonly` | `readonly` | `boolean` | false | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | false | Makes the element required in a form context. |
| `clickable` | `clickable` | `boolean` | | Makes the element clickable. |
| `disabled` | `disabled` | `boolean` | | Disables the element. |
| `name` | `name` | `string \| undefined` | | Name of the native form element. |
| `noRipple` | `noRipple` | `boolean` | | Deactivates the ripple. |
| `readonly` | `readonly` | `boolean` | | Makes the element readonly (disabled but tabbable) |
| `required` | `required` | `boolean` | | Makes the element required in a form context. |
| `role` | `role` | `AriaRole` | "listitem" | Role of the list item. |
| `type` | `type` | `"button" \| "submit"` | "submit" | Type of the button. |
| `value` | `value` | `string` | "" | Value of the form element. |
| `value` | `value` | `string` | | Value of the form element. |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#css-custom-properties)
Expand Down
Loading

0 comments on commit 0557940

Please sign in to comment.