Skip to content

Commit

Permalink
feat(ld-checkbox): ld-checkbox component
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Jun 10, 2021
1 parent ebe782f commit 1c46911
Show file tree
Hide file tree
Showing 47 changed files with 5,074 additions and 151 deletions.
3,042 changes: 3,042 additions & 0 deletions screenshot/builds/master.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/docs/components/docs-nav/docs-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
content: '';
position: absolute;
right: 0;
top: var(--ld-sp-2);
top: calc(-1 * var(--ld-sp-1));
background-image: url('/dist/build/assets/chevron.svg');
background-repeat: no-repeat;
background-position: center;
Expand Down
1 change: 0 additions & 1 deletion src/docs/components/docs-search/docs-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class DocsSearch {
id="docs-search-input"
ref={(el) => (this.searchInput = el as HTMLLdInputElement)}
type="search"
mode="light"
spellcheck={false}
></ld-input>
</form>
Expand Down
4 changes: 2 additions & 2 deletions src/liquid/components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ If you have a suggestion for a new component not listed here, create an [issue o
| [ld-input-message](./ld-input-message/) | done | done |
| [ld-label](./ld-label/) | done | done |
| [ld-sr-only](./ld-sr-only/) | not needed | done |
| [ld-checkbox](./ld-checkbox) | done | in progress |
| ld-radio | done | todo |
| [ld-checkbox](./ld-checkbox) | done | done |
| [ld-radio](./ld-radio) | done | in progress |
| ld-select | in progress | todo |
| ld-textarea | done | todo |
| ld-pattern | done | todo |
1 change: 0 additions & 1 deletion src/liquid/components/ld-button/ld-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class LdButton {
const ariaDisabled = this.button.getAttribute('aria-disabled')
if (ariaDisabled && ariaDisabled !== 'false') {
ev.preventDefault()
ev.stopImmediatePropagation()
}
}

Expand Down
23 changes: 21 additions & 2 deletions src/liquid/components/ld-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Button
permalink: components/ld-button/
---

# Button
# ld-button

Buttons allow a user to trigger events on the user interface. A button's text should express what the button does.
Icon-buttons without visual text should either contain a [screen-reader-only](/components/ld-sr-only/) text, have an `aria-label`, a `title` element within the svg icon or an `alt` text on an image icon within the button.
Expand Down Expand Up @@ -64,7 +64,7 @@ Although `aria-disabled="true"` is not necessary on a `button` element (or any o

{% endexample %}

> **Note:** When `aria-disabled` is applied on the button, either explicitly or implicitly, the component will try to prevent user interaction using an internal click event handler calling `preventDefault()` and `stopImmediatePropagation()` on the click event. With the CSS component version on the other hand, you will need to take care of preventing the default behaviour of the button yourself.
> **Note:** When `aria-disabled` is applied on the button, either explicitly or implicitly, the component will try to prevent user interaction using an internal click event handler, calling `preventDefault()` and `stopImmediatePropagation()` on the click event. With the CSS component version on the other hand, you will need to take care of preventing the default behaviour of the button yourself.
### Secondary

Expand Down Expand Up @@ -436,6 +436,25 @@ You can align the text inside the button using the `align-text` propperty.
| `target` | `target` | The `target` attributed can be used in conjunction with the `href` attribute. See [mdn docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target) for more information on the `target` attribute. | `"_blank" \| "_parent" \| "_self" \| "_top"` | `undefined` |


## Dependencies

### Used by

- docs-copy-to-cb
- docs-edit-on-github
- docs-page-nav
- docs-toggle-code

### Graph
```mermaid
graph TD;
docs-copy-to-cb --> ld-button
docs-edit-on-github --> ld-button
docs-page-nav --> ld-button
docs-toggle-code --> ld-button
style ld-button fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
Loading

0 comments on commit 1c46911

Please sign in to comment.