Skip to content
Permalink
Browse files

fix(buttons): Create docblocks to show proper disabled states, update…

… A11Y documentation (#3202)
  • Loading branch information...
Ayesha Mazumdar
Ayesha Mazumdar committed Apr 12, 2018
1 parent cdf72cd commit 013b16df9c2d4e37bfeb8b1d82fb01fa93d85237
Showing with 516 additions and 95 deletions.
  1. +1 −1 ui/components/activity-timeline/base/example.jsx
  2. +2 −2 ui/components/branding/docs.mdx
  3. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_base_button.json
  4. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_brand_button.json
  5. +9 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_desctructive_button.json
  6. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_disabled_base_button.json
  7. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_neutral_button.json
  8. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_a_success_button.json
  9. +8 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_an_inverse_button.json
  10. +9 −0 ui/components/buttons/__tests__/__snapshots__/Button_renders_an_outline_brand_button.json
  11. +18 −0 ...nents/buttons/__tests__/__snapshots__/Stateful_Button_renders_a_not_selected_stateful_button.json
  12. +18 −0 ...ttons/__tests__/__snapshots__/Stateful_Button_renders_a_selected_and_focused_stateful_button.json
  13. +18 −0 ...omponents/buttons/__tests__/__snapshots__/Stateful_Button_renders_a_selected_stateful_button.json
  14. +49 −0 ui/components/buttons/__tests__/snapshot.spec.jsx
  15. +0 −26 ui/components/buttons/base/_index.scss
  16. +25 −4 ui/components/buttons/base/example.jsx
  17. +256 −0 ui/components/buttons/docs.mdx
  18. +0 −12 ui/components/buttons/stateful/_index.scss
  19. +49 −35 ui/components/buttons/stateful/example.jsx
  20. +2 −2 ui/components/color-picker/index.jsx
  21. +3 −2 ...s/page-headers/__tests__/__snapshots__/renders_a_page_header_renders_record_home_page_header.json
  22. +1 −1 ui/components/page-headers/record-home/example.jsx
  23. +1 −3 ui/components/setup-assistant/SetupAssistantStepDetail.jsx
  24. +1 −1 ui/components/setup-assistant/SetupAssistantStepSummary.jsx
  25. +1 −3 ui/components/welcome-mat/WelcomeMatContentTrailhead.jsx
  26. +5 −3 ui/components/welcome-mat/__tests__/enzyme.spec.js
@@ -228,7 +228,7 @@ export const DescriptionCard = props => (
</div>
)}
{props.footerButtons && (
<Button className="slds-button_neutral slds-m-top_small">
<Button isNeutral className="slds-m-top_small">
<SvgIcon
className="slds-button__icon slds-button__icon_left"
sprite="utility"
@@ -141,8 +141,8 @@ This page is for informational purposes only.
</Tokens>

## Button Brand
<Button className="slds-button_brand">Button Brand</Button>
<Button className="slds-button_brand" disabled>Button Brand</Button>
<Button isBrand>Button Brand</Button>
<Button isBrand" disabled>Button Brand</Button>

<Tokens>
<Token token="BRAND_ACCESSIBLE" />
@@ -0,0 +1,8 @@
{
"snapshot": {
"html": "<button class=\"slds-button\">Button</button>",
"style": [
"animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position: 0px 0px; background-repeat: repeat; background-size: auto; border-bottom-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-bottom-width: 1px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: rgba(0, 0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgba(0, 0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgba(0, 0, 0, 0); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-top-width: 1px; bottom: 0px; box-shadow: none; box-sizing: border-box; break-after: auto; break-before: auto; break-inside: auto; caption-side: top; clear: none; clip: auto; color: rgb(0, 112, 210); content: ; cursor: pointer; direction: ltr; display: inline-block; empty-cells: show; float: none; font-family: \"Salesforce Sans\", Arial, sans-serif; font-kerning: auto; font-size: 13px; font-stretch: 100%; font-style: normal; font-variant: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: normal; font-weight: 400; height: 32px; image-rendering: auto; isolation: auto; justify-items: normal; justify-self: auto; left: 0px; letter-spacing: normal; line-height: 30px; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; offset-distance: 0px; offset-path: none; offset-rotate: auto 0deg; opacity: 1; orphans: 2; outline-color: rgb(0, 112, 210); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-anchor: auto; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; pointer-events: auto; position: relative; resize: none; right: 0px; scroll-behavior: auto; speak: normal; table-layout: auto; tab-size: 8; text-align: center; text-align-last: auto; text-decoration: none solid rgb(0, 112, 210); text-decoration-line: none; text-decoration-style: solid; text-decoration-color: rgb(0, 112, 210); text-decoration-skip: objects; text-underline-position: auto; text-indent: 0px; text-rendering: auto; text-shadow: none; text-size-adjust: 100%; text-overflow: clip; text-transform: none; top: 0px; touch-action: auto; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; unicode-bidi: normal; vertical-align: baseline; visibility: visible; white-space: normal; widows: 2; width: 43.1094px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; z-index: auto; zoom: 1; -webkit-appearance: none; backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; column-count: auto; column-gap: normal; column-rule-color: rgb(0, 112, 210); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; align-content: normal; align-items: flex-start; align-self: auto; flex-basis: auto; flex-grow: 0; flex-shrink: 1; flex-direction: row; flex-wrap: nowrap; justify-content: normal; -webkit-font-smoothing: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; grid-row-end: auto; grid-row-start: auto; grid-column-gap: 0px; grid-row-gap: 0px; -webkit-highlight: none; hyphens: manual; -webkit-hyphenate-character: auto; -webkit-line-break: auto; -webkit-line-clamp: none; -webkit-locale: auto; -webkit-margin-before-collapse: collapse; -webkit-margin-after-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position: 0% 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; order: 0; perspective: none; perspective-origin: 21.5469px 16px; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; shape-outside: none; shape-image-threshold: 0; shape-margin: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-combine: none; -webkit-text-decorations-in-effect: none; -webkit-text-emphasis-color: rgb(0, 112, 210); -webkit-text-emphasis-position: over; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(0, 112, 210); -webkit-text-orientation: vertical-right; -webkit-text-security: none; -webkit-text-stroke-color: rgb(0, 112, 210); -webkit-text-stroke-width: 0px; transform: none; transform-origin: 21.5469px 16px; transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; user-select: none; -webkit-writing-mode: horizontal-tb; -webkit-app-region: no-drag; buffered-rendering: auto; clip-path: none; clip-rule: nonzero; mask: none; filter: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; lighting-color: rgb(255, 255, 255); stop-color: rgb(0, 0, 0); stop-opacity: 1; color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; marker-end: none; marker-mid: none; marker-start: none; mask-type: luminance; shape-rendering: auto; stroke: none; stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; alignment-baseline: auto; baseline-shift: 0px; dominant-baseline: auto; text-anchor: start; writing-mode: horizontal-tb; vector-effect: none; paint-order: fill stroke markers; d: none; cx: 0px; cy: 0px; x: 0px; y: 0px; r: 0px; rx: auto; ry: auto; caret-color: rgb(0, 112, 210); line-break: auto;"
]
}
}
@@ -0,0 +1,8 @@
{
"snapshot": {
"html": "<button class=\"slds-button slds-button_brand\">Button</button>",
"style": [
"animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgb(0, 112, 210); background-image: none; background-origin: padding-box; background-position: 0px 0px; background-repeat: repeat; background-size: auto; border-bottom-color: rgb(0, 112, 210); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-bottom-width: 1px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-left-color: rgb(0, 112, 210); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 112, 210); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 112, 210); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-top-width: 1px; bottom: 0px; box-shadow: none; box-sizing: border-box; break-after: auto; break-before: auto; break-inside: auto; caption-side: top; clear: none; clip: auto; color: rgb(255, 255, 255); content: ; cursor: pointer; direction: ltr; display: inline-block; empty-cells: show; float: none; font-family: \"Salesforce Sans\", Arial, sans-serif; font-kerning: auto; font-size: 13px; font-stretch: 100%; font-style: normal; font-variant: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: normal; font-weight: 400; height: 32px; image-rendering: auto; isolation: auto; justify-items: normal; justify-self: auto; left: 0px; letter-spacing: normal; line-height: 30px; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; offset-distance: 0px; offset-path: none; offset-rotate: auto 0deg; opacity: 1; orphans: 2; outline-color: rgb(255, 255, 255); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-anchor: auto; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 16px; padding-right: 16px; padding-top: 0px; pointer-events: auto; position: relative; resize: none; right: 0px; scroll-behavior: auto; speak: normal; table-layout: auto; tab-size: 8; text-align: center; text-align-last: auto; text-decoration: none solid rgb(255, 255, 255); text-decoration-line: none; text-decoration-style: solid; text-decoration-color: rgb(255, 255, 255); text-decoration-skip: objects; text-underline-position: auto; text-indent: 0px; text-rendering: auto; text-shadow: none; text-size-adjust: 100%; text-overflow: clip; text-transform: none; top: 0px; touch-action: auto; transition-delay: 0s; transition-duration: 0.15s; transition-property: border; transition-timing-function: linear; unicode-bidi: normal; vertical-align: middle; visibility: visible; white-space: normal; widows: 2; width: 75.1094px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; z-index: auto; zoom: 1; -webkit-appearance: none; backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; column-count: auto; column-gap: normal; column-rule-color: rgb(255, 255, 255); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; align-content: normal; align-items: flex-start; align-self: auto; flex-basis: auto; flex-grow: 0; flex-shrink: 1; flex-direction: row; flex-wrap: nowrap; justify-content: normal; -webkit-font-smoothing: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; grid-row-end: auto; grid-row-start: auto; grid-column-gap: 0px; grid-row-gap: 0px; -webkit-highlight: none; hyphens: manual; -webkit-hyphenate-character: auto; -webkit-line-break: auto; -webkit-line-clamp: none; -webkit-locale: auto; -webkit-margin-before-collapse: collapse; -webkit-margin-after-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position: 0% 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; order: 0; perspective: none; perspective-origin: 37.5469px 16px; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; shape-outside: none; shape-image-threshold: 0; shape-margin: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-combine: none; -webkit-text-decorations-in-effect: none; -webkit-text-emphasis-color: rgb(255, 255, 255); -webkit-text-emphasis-position: over; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 255, 255); -webkit-text-orientation: vertical-right; -webkit-text-security: none; -webkit-text-stroke-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; transform: none; transform-origin: 37.5469px 16px; transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; user-select: none; -webkit-writing-mode: horizontal-tb; -webkit-app-region: no-drag; buffered-rendering: auto; clip-path: none; clip-rule: nonzero; mask: none; filter: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; lighting-color: rgb(255, 255, 255); stop-color: rgb(0, 0, 0); stop-opacity: 1; color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; marker-end: none; marker-mid: none; marker-start: none; mask-type: luminance; shape-rendering: auto; stroke: none; stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; alignment-baseline: auto; baseline-shift: 0px; dominant-baseline: auto; text-anchor: start; writing-mode: horizontal-tb; vector-effect: none; paint-order: fill stroke markers; d: none; cx: 0px; cy: 0px; x: 0px; y: 0px; r: 0px; rx: auto; ry: auto; caret-color: rgb(255, 255, 255); line-break: auto;"
]
}
}
Oops, something went wrong.

0 comments on commit 013b16d

Please sign in to comment.
You can’t perform that action at this time.