forked from dojo/widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup widget readme files (dojo#942)
* Cleanup accordion pane readme * button and calendar * Updated card to remove circular desc. Based on material * cleanup checkbox wording * cleanup checkbox group * cleaned up chip wording to align w/ material * cleaned up wording constrained-input * small text cleanup * removed example from global-event * standardized description, minor wording * removed label property descriptions; cleanup * menu cleanup * number-input cleanup * outlined button cleanup * popup cleanup * minor cleanup * minor edits * minor cleanup
- Loading branch information
Showing
34 changed files
with
66 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
# @dojo/widgets/button | ||
|
||
Dojo's `Button` widget creates a `<button>` element | ||
|
||
Dojo's `Button` widget creates a `<button>` element with support `pressed` and `disabled` states. | ||
|
||
## Features | ||
|
||
- Provides an API for valid `<button>` attributes | ||
- Can be used to create a toggle button (i.e. a button with an on/off state) | ||
- Provides an easy API to create a button controlling a popup | ||
|
||
### Accessibility Features | ||
|
||
- The basic button provides a strongly typed `type` property, as well as `disabled` | ||
- Setting `pressed` to create a toggle button handles `aria-pressed` | ||
- Creating a popup button with `popup` sets `aria-haspopup`, `aria-controls`, and `aria-expanded` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# @dojo/widgets/card | ||
|
||
Dojo's `Card` widget provides a simple wrapper for elements that should be designated and styled as a card component. | ||
Dojo's `Card` widget provides a simple container for content and actions with a similar theme. | ||
|
||
### Features | ||
|
||
- Create a wrapper with a consistent style | ||
- Easily add actions to the card | ||
- Wrap content with a consistent style | ||
- Include actions with the card |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# @dojo/widgets/checkbox-group widget | ||
# @dojo/widgets/checkbox-group | ||
|
||
Dojo's `CheckboxGroup` widget provides an opinionated way to use a group of check boxes in a form. | ||
|
||
## Features | ||
|
||
- Takes an options property to define the checkboxes to create | ||
- Offers a custom renderer allowing the user to create their own checkboxes | ||
- Provides a middleware for custom use | ||
- Provides a checkbox group middleware when using a custom renderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
# @dojo/widgets/checkbox widget | ||
# @dojo/widgets/checkbox | ||
|
||
Dojo's `Checkbox` widget provides either a wrapped, styleable checkbox widget or an on/off toggle. Both the normal and toggle `Checkbox` modes use the native `<input type="checkbox">` as a base. | ||
|
||
|
||
## Features | ||
|
||
- Creates either a normal checkbox or toggle switch | ||
- Creates either a normal checkbox or toggle switch based on the `mode` property | ||
- Correctly handles a11y attributes | ||
- Wraps the input in a visible or invisible but accessible `<label>` if the `label` property is added | ||
- Wraps the input in a `<label>` if the `label` property is added | ||
|
||
### Accessibility Features | ||
|
||
`Checkbox` ensures that the proper attributes (ARIA or otherwise) are set along with classes when properties such as `disabled`, `readOnly`, `invalid`, etc. are used. | ||
|
||
When using the toggle mode, only one of `onLabel` and `offLabel` will be read, based on the current state. E.g. if checked with a label of "Sample Checkbox", the full screen reader-accessible label would read "Sample Checkbox On". | ||
When using the toggle mode only one of `onLabel` or `offLabel` will be read based on the current state. E.g. if checked with a label of "Sample Checkbox", the full screen reader-accessible label would read "Sample Checkbox On". | ||
|
||
If the `label` property is not used, we recommend creating a separate `label` and pointing it at the input's `widgetId` property. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# @dojo/widgets/email-input | ||
|
||
Dojo's `EmailInput` widget provides a basic email input widget. | ||
Dojo's `EmailInput` widget provides a basic email input widget with validation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
# @dojo/widgets/global-event widget | ||
# @dojo/widgets/global-event | ||
|
||
Dojo's `GlobalEvent` enables events to be registered on `document` and `window` reactively. | ||
|
||
## Features | ||
|
||
- Can be used as a wrapping widget and will return children on render or used within a widgets returned DNode structure and returns `null` from `render`. | ||
- Reactively adds and removes global events listeners based on the `window` and `document` properties. | ||
|
||
## Example Usage | ||
|
||
```ts | ||
// Wrapping DNodes as children | ||
w(GlobalEvent, { | ||
window: { keydown: () => {} }, | ||
document: { focus: () => {} } | ||
}, [ | ||
// Add widget's DNodes | ||
]); | ||
|
||
// Used in the DNode tree | ||
v('div', { key: 'root' }, [ | ||
w(GlobalEvent, { window: { click: () => {} } }), | ||
w(Button, { /* button options */ }) | ||
]); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# @dojo/widgets/grid | ||
|
||
A reactive lightweight, customizable grid widget built with Dojo. | ||
Dojo's `Grid` is a reactive lightweight, customizable grid widget. | ||
|
||
## Features | ||
|
||
* On-demand virtual rendering with supports for large data-sets | ||
* Backed by [`@dojo/framework/stores`](https://github.com/dojo/framework/tree/master/src/stores) | ||
* Editable cells | ||
* Cells may be editable or read-only | ||
* Filtering and Sorting by column | ||
* Custom cell renderers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# @dojo/widgets/icon | ||
|
||
Dojo's `Icon` widget renders an icon. | ||
Dojo's `Icon` widget renders one of Dojo's predefined font icons. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
# @dojo/widgets/label | ||
|
||
Dojo's `Label` widget creates a `<label>` element that wraps its children and inserts a text node as either the first or last child. It is included by default in all form input widgets, including `ComboBox` and `TimePicker`. Input widgets control the text, visibility, and placement of the label through the following properties: | ||
- `label`: String used as label text | ||
- `labelAfter`: If true, the label node follows the input node in the generated vdom | ||
- `labelHidden`: This corresponds to the `hidden` class on the Label widget. | ||
Dojo's `Label` widget creates a `<label>` element that wraps its children. It is included by default in all form input widgets (including `ComboBox` and `TimePicker`). | ||
|
||
## Features | ||
|
||
- Provides an API to add an accessible label before (default) or after the form control | ||
- The label may be visually hidden while remaining accessible to screen readers | ||
- `properties.label` may take an options object or a string | ||
- All form controls in `@dojo/widgets` make use of the label and share the same `properties.label` API | ||
|
||
### Accessibility Features | ||
|
||
- The label is implicitly tied to its form control, so it should not be passed children with non-label text content | ||
- If `properties.label.hidden` is true, it uses styles that leave the text content accessible to screen readers | ||
- If the `hidden` property is true, it uses styles that leave the text content accessible to screen readers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# @dojo/widgets/input/number-input | ||
# @dojo/widgets/number-input | ||
|
||
Dojo's `NumberInput` widget provides a basic number input widget with an optional label. | ||
|
||
|
||
## Features | ||
|
||
- Correctly handles a11y attributes | ||
- Associates a visible or invisible but accessible `<label>` with the input if the `label` property is added | ||
- Associates an accessible `<label>` with the input when the `label` property is added | ||
- Allows leading / trailing icons / text to be added | ||
|
||
### Accessibility Features | ||
|
||
`NumberInput` ensures that the proper attributes (ARIA or otherwise) are set along with classes when properties such as `disabled`, `readOnly`, etc. are used. It also provides an API for custom ARIA implementations of `aria-describedby` and `aria-controls`. It also sets `aria-invalid` when validation fails. | ||
- Ensures that the proper attributes (ARIA or otherwise) are set along with classes when properties such as `disabled`, `readOnly`, etc. are used | ||
- Additional custom ARIA labels may be added with the `aria` property | ||
- Sets `aria-invalid` when validation fails | ||
|
||
If the `label` property is not used, we recommend creating a separate `label` and pointing it at the input's `widgetId` property. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# @dojo/widgets/outlined-button widget | ||
# @dojo/widgets/outlined-button | ||
|
||
Dojo's `OutlinedButton` widget creates a `<button>` element | ||
|
||
The `OutlinedButton` widget wraps the `Button` widget with an additional class for alternative styling. | ||
For details on the features, usage, and accessibility of the `OutlinedButton`, refer to the [Button README](../button/README.md) | ||
Dojo's `OutlinedButton` widget creates a Dojo `Button` widget with additional classes for alternative styling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# @dojo/widgets/popup | ||
|
||
The `popup` widget allows popup content to be shown relative to a trigger. | ||
The popup will can be positioned `above` or `below` the trigger. The popup will move the content appropriately if there is not room in the desired position. | ||
Dojo's `Popup` widget allows popup content to be shown relative to a trigger widget. | ||
The popup can be positioned `above` or `below` the trigger. The popup will move the content appropriately if there is not room in the desired position. | ||
|
||
A `body` tag is used to render the popup as well as an underlay to ensure that the page cannot be interacted with whilst the popup is visible. The popup is designed to be used with toggle buttons / selects / menus etc. | ||
A `body` tag is used to render the popup as well as an underlay to ensure that the page cannot be interacted with whilst the popup is visible. The popup is designed to be used with toggle buttons / selects / menus. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# @dojo/widgets/button widget | ||
# @dojo/widgets/button | ||
|
||
Dojo's `RaisedButton` widget creates a `<button>` element. | ||
|
||
The `RaisedButton` widget extends the `Button` widget, adding an additional class for styling. | ||
For features, usage, theming, and accessibility, please refer to the [Button README](../button/README.md) | ||
Dojo's `RaisedButton` widget creates a Dojo `Button` widget with additional classes for alternative styling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.