From deda0d01ae55feeda0376ddc77ed35e9e9b85930 Mon Sep 17 00:00:00 2001 From: langermank Date: Tue, 2 Nov 2021 11:35:33 -0700 Subject: [PATCH 01/45] setup base focus styles --- docs/yarn.lock | 4 +-- src/base/base.scss | 25 ++++++++++++-- src/base/normalize.scss | 64 +++++++----------------------------- src/buttons/button.scss | 58 ++++++++++++++++---------------- src/buttons/misc.scss | 16 +++++---- src/support/mixins/misc.scss | 9 ++++- 6 files changed, 84 insertions(+), 92 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index badf885864..d0bf1b4e28 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -297,7 +297,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-validator-identifier@^7.15.7": +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.15.7": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== @@ -1168,7 +1168,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.10.5", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.16.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0": +"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.10.5", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.15.4", "@babel/types@^7.16.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== diff --git a/src/base/base.scss b/src/base/base.scss index 47f6fd73a0..796d0f0c0c 100644 --- a/src/base/base.scss +++ b/src/base/base.scss @@ -76,10 +76,31 @@ button { } details { - summary { cursor: pointer; } + summary { + cursor: pointer; + } &:not([open]) { // Set details content hidden by default for browsers that don't do this - > *:not(summary) { display: none !important; } + > *:not(summary) { + display: none !important; + } } } + +// global focus styles + +// fallback :focus state +:focus:is(a, button, input, textarea) { + @include focusOutline; +} + +// remove fallback :focus if :focus-visible is supported +:focus:is(a, button, input, textarea):not(:focus-visible) { + outline: solid 1px transparent; +} + +// default :focus-visibile state +:focus-visible:is(a, button, input, textarea) { + @include focusOutline; +} diff --git a/src/base/normalize.scss b/src/base/normalize.scss index 6a1e3c10e9..35001da669 100644 --- a/src/base/normalize.scss +++ b/src/base/normalize.scss @@ -39,7 +39,8 @@ header, main, /* 2 */ menu, nav, -section { /* 1 */ +section { + /* 1 */ display: block; } @@ -96,16 +97,6 @@ a { background-color: transparent; /* 1 */ } -/** - * Remove the outline on focused links when they are also active or hovered - * in all browsers (opinionated). - */ - -a:active, -a:hover { - outline-width: 0; -} - /* Text-level semantics ========================================================================== */ @@ -278,7 +269,8 @@ optgroup { */ button, -input { /* 1 */ +input { + /* 1 */ overflow: visible; } @@ -288,7 +280,8 @@ input { /* 1 */ */ button, -select { /* 1 */ +select { + /* 1 */ text-transform: none; } @@ -305,29 +298,6 @@ html [type="button"], /* 1 */ -webkit-appearance: button; /* 2 */ } -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - /** * Change the border, margin, and padding in all browsers (opinionated). */ @@ -367,8 +337,8 @@ textarea { * 2. Remove the padding in IE 10-. */ -[type="checkbox"], -[type="radio"] { +[type='checkbox'], +[type='radio'] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } @@ -377,27 +347,17 @@ textarea { * Correct the cursor style of increment and decrement buttons in Chrome. */ -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { height: auto; } -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - /** * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. */ -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { +[type='search']::-webkit-search-cancel-button, +[type='search']::-webkit-search-decoration { -webkit-appearance: none; } diff --git a/src/buttons/button.scss b/src/buttons/button.scss index 0f239acabf..bfc32fe39f 100644 --- a/src/buttons/button.scss +++ b/src/buttons/button.scss @@ -24,7 +24,7 @@ &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { cursor: default; } @@ -84,14 +84,14 @@ } &.selected, - &[aria-selected=true] { + &[aria-selected='true'] { background-color: var(--color-btn-selected-bg); box-shadow: var(--color-primer-shadow-inset); } &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-primer-fg-disabled); background-color: var(--color-btn-bg); border-color: var(--color-btn-border); @@ -102,12 +102,12 @@ } // Keep :focus after :disabled. Allows to see the focus ring even on disabled buttons - &:focus, - &.focus { - border-color: var(--color-btn-focus-border); - outline: none; - box-shadow: var(--color-btn-focus-shadow); - } + // &:focus, + // &.focus { + // border-color: var(--color-btn-focus-border); + // outline: none; + // box-shadow: var(--color-btn-focus-shadow); + // } } // Primary button @@ -127,14 +127,14 @@ &:active, &.selected, - &[aria-selected=true] { + &[aria-selected='true'] { background-color: var(--color-btn-primary-selected-bg); box-shadow: var(--color-btn-primary-selected-shadow); } &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-btn-primary-disabled-text); background-color: var(--color-btn-primary-disabled-bg); border-color: var(--color-btn-primary-disabled-border); @@ -144,12 +144,12 @@ } } - &:focus, - &.focus { - background-color: var(--color-btn-primary-focus-bg); - border-color: var(--color-btn-primary-focus-border); - box-shadow: var(--color-btn-primary-focus-shadow); - } + // &:focus, + // &.focus { + // background-color: var(--color-btn-primary-focus-bg); + // border-color: var(--color-btn-primary-focus-border); + // box-shadow: var(--color-btn-primary-focus-shadow); + // } .Counter { color: inherit; @@ -184,7 +184,7 @@ &:active, &.selected, - &[aria-selected=true] { + &[aria-selected='true'] { color: var(--color-btn-outline-selected-text); background-color: var(--color-btn-outline-selected-bg); border-color: var(--color-btn-outline-selected-border); @@ -193,7 +193,7 @@ &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-btn-outline-disabled-text); background-color: var(--color-btn-outline-disabled-bg); border-color: var(--color-btn-border); @@ -204,10 +204,10 @@ } } - &:focus { - border-color: var(--color-btn-outline-focus-border); - box-shadow: var(--color-btn-outline-focus-shadow); - } + // &:focus { + // border-color: var(--color-btn-outline-focus-border); + // box-shadow: var(--color-btn-outline-focus-shadow); + // } .Counter { color: inherit; @@ -242,7 +242,7 @@ &:active, &.selected, - &[aria-selected=true] { + &[aria-selected='true'] { color: var(--color-btn-danger-selected-text); background-color: var(--color-btn-danger-selected-bg); border-color: var(--color-btn-danger-selected-border); @@ -251,7 +251,7 @@ &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-btn-danger-disabled-text); background-color: var(--color-btn-danger-disabled-bg); border-color: var(--color-btn-border); @@ -266,10 +266,10 @@ } } - &:focus { - border-color: var(--color-btn-danger-focus-border); - box-shadow: var(--color-btn-danger-focus-shadow); - } + // &:focus { + // border-color: var(--color-btn-danger-focus-border); + // box-shadow: var(--color-btn-danger-focus-shadow); + // } .Counter { color: inherit; diff --git a/src/buttons/misc.scss b/src/buttons/misc.scss index 936441f45a..38aa20bd30 100644 --- a/src/buttons/misc.scss +++ b/src/buttons/misc.scss @@ -21,7 +21,7 @@ } &:disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { &, &:hover { color: var(--color-primer-fg-disabled); @@ -51,7 +51,7 @@ &:active, &:focus, &.selected, - &[aria-selected=true], + &[aria-selected='true'], &.zeroclipboard-is-active { color: var(--color-accent-fg); background: none; @@ -62,7 +62,7 @@ &:disabled, &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-primer-fg-disabled); background-color: transparent; } @@ -86,14 +86,18 @@ border: 0; box-shadow: none; - &:hover { color: var(--color-accent-fg); } + &:hover { + color: var(--color-accent-fg); + } &.disabled, - &[aria-disabled=true] { + &[aria-disabled='true'] { color: var(--color-primer-fg-disabled); cursor: default; - &:hover { color: var(--color-primer-fg-disabled); } + &:hover { + color: var(--color-primer-fg-disabled); + } } } diff --git a/src/support/mixins/misc.scss b/src/support/mixins/misc.scss index b75156bbf5..78afa9cc71 100644 --- a/src/support/mixins/misc.scss +++ b/src/support/mixins/misc.scss @@ -10,7 +10,7 @@ width: 8px; height: 16px; pointer-events: none; - content: " "; + content: ' '; clip-path: polygon(0 50%, 100% 0, 100% 100%); } @@ -24,3 +24,10 @@ background-color: $border; } } + +@mixin focusOutline { + position: relative; + z-index: 1; + outline: 2px solid var(--color-accent-fg); + outline-offset: 2px; +} From b1ab3ca20a8d570a8e9cca270bb906242f9d476b Mon Sep 17 00:00:00 2001 From: langermank Date: Tue, 2 Nov 2021 13:25:13 -0700 Subject: [PATCH 02/45] add feature stories --- .../components/Button/Button.stories.jsx | 109 ++++++++++++++++-- .../Button/ButtonFeatures.stories.jsx | 55 +++++++++ 2 files changed, 155 insertions(+), 9 deletions(-) create mode 100644 docs/src/stories/components/Button/ButtonFeatures.stories.jsx diff --git a/docs/src/stories/components/Button/Button.stories.jsx b/docs/src/stories/components/Button/Button.stories.jsx index 5b763f0254..798b597d51 100644 --- a/docs/src/stories/components/Button/Button.stories.jsx +++ b/docs/src/stories/components/Button/Button.stories.jsx @@ -7,31 +7,122 @@ export default { design: { type: 'figma', url: 'https://www.figma.com/file/GCvY3Qv8czRgZgvl1dG6lp/Primer-Web?node-id=4371%3A7128' - } + }, + layout: 'fullscreen' }, + + excludeStories: ['ButtonTemplate'], argTypes: { variant: { - options: [0, 1, 2, 3], // iterator - mapping: [null, 'btn-primary', 'btn-outline', 'btn-danger'], // values + options: [0, 1, 2, 3, 4, 5, 6, 7], // iterator + mapping: [ + null, + 'btn-primary', + 'btn-outline', + 'btn-danger', + 'btn-link', + 'btn-invisible', + 'close-button', + 'btn-with-count' + ], // values + control: { + type: 'select', + labels: ['default', 'primary', 'outline', 'danger', 'link', 'invisible', 'close', 'with-count'] + }, + table: { + category: 'CSS' + } + }, + size: { + options: [0, 1, 2], // iterator + mapping: [null, 'btn-sm', 'btn-large'], // values control: { type: 'select', - labels: ['default', 'primary', 'outline', 'danger'] + labels: ['default', 'small', 'large'] }, - defaultValue: '' + table: { + category: 'CSS' + } }, label: { defaultValue: 'Button', type: 'string', name: 'label', - description: 'string' + description: 'string', + table: { + category: 'HTML' + } + }, + disabled: { + defaultValue: false, + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + fullWidth: { + defaultValue: false, + control: {type: 'boolean'}, + table: { + category: 'CSS' + } + }, + leadingVisual: { + name: 'leadingVisual', + type: 'string', + description: 'Paste [Octicon](https://primer.style/octicons/) in control field', + table: { + category: 'HTML' + } + }, + trailingVisual: { + name: 'trailingVisual', + type: 'string', + description: 'Paste [Octicon](https://primer.style/octicons/) in control field', + table: { + category: 'HTML' + } + }, + trailingAction: { + defaultValue: false, + control: {type: 'boolean'}, + table: { + category: 'CSS' + } + }, + selected: { + defaultValue: false, + control: {type: 'boolean'}, + table: { + category: 'CSS' + } } } } -const Template = ({label, variant}) => ( +export const ButtonTemplate = ({ + label, + variant, + disabled, + size, + fullWidth, + leadingVisual, + trailingVisual, + trailingAction, + selected +}) => ( <> - + ) -export const Button = Template.bind({}) +export const Playground = ButtonTemplate.bind({}) diff --git a/docs/src/stories/components/Button/ButtonFeatures.stories.jsx b/docs/src/stories/components/Button/ButtonFeatures.stories.jsx new file mode 100644 index 0000000000..853ee49e81 --- /dev/null +++ b/docs/src/stories/components/Button/ButtonFeatures.stories.jsx @@ -0,0 +1,55 @@ +import React from 'react' +import clsx from 'clsx' +import {ButtonTemplate} from './Button.stories' + +export default { + title: 'Components/Button/Features' +} + +export const LeadingVisual = ButtonTemplate.bind({}) +LeadingVisual.storyName = 'Leading icon' +LeadingVisual.args = { + label: 'Open in Desktop', + leadingVisual: + '' +} + +export const TrailingVisual = ButtonTemplate.bind({}) +TrailingVisual.storyName = 'Trailing icon' +TrailingVisual.args = { + label: 'Open in Desktop', + trailingVisual: + '' +} + +export const Disabled = ButtonTemplate.bind({}) +Disabled.storyName = 'Disabled' +Disabled.args = { + label: 'Disabled', + disabled: true +} + +export const DisabledWithLeadingVisual = ButtonTemplate.bind({}) +DisabledWithLeadingVisual.storyName = 'Disabled with leading visual' +DisabledWithLeadingVisual.args = { + label: 'Disabled', + disabled: true, + leadingVisual: + '' +} + +export const Selected = ButtonTemplate.bind({}) +Selected.storyName = 'Selected' +Selected.args = { + label: 'Selected', + selected: true +} + +export const SelectedWithLeadingVisual = ButtonTemplate.bind({}) +SelectedWithLeadingVisual.storyName = 'Selected with leading visual' +SelectedWithLeadingVisual.args = { + label: 'Selected', + selected: true, + leadingVisual: + '' +} From cf582b5e0ef0746f64dfd6cfd3f5ab8c1b0cdfbe Mon Sep 17 00:00:00 2001 From: langermank Date: Tue, 9 Nov 2021 14:21:25 -0800 Subject: [PATCH 03/45] add stories for focusable things, delete outline:0 --- .../components/Button/Button.stories.jsx | 36 ++++- .../components/Forms/Input.stories.jsx | 141 ++++++++++++++++++ .../components/Forms/Select.stories.jsx | 83 +++++++++++ .../components/Forms/Textarea.stories.jsx | 117 +++++++++++++++ .../stories/components/Link/Link.stories.jsx | 61 ++++++++ src/actionlist/action-list-item.scss | 10 +- src/base/base.scss | 9 ++ src/buttons/button.scss | 8 - src/buttons/misc.scss | 20 +-- src/dropdown/dropdown.scss | 2 - src/forms/form-control.scss | 8 - src/navigation/menu.scss | 18 +-- src/navigation/sidenav.scss | 15 +- src/toasts/toasts.scss | 10 +- 14 files changed, 462 insertions(+), 76 deletions(-) create mode 100644 docs/src/stories/components/Forms/Input.stories.jsx create mode 100644 docs/src/stories/components/Forms/Select.stories.jsx create mode 100644 docs/src/stories/components/Forms/Textarea.stories.jsx create mode 100644 docs/src/stories/components/Link/Link.stories.jsx diff --git a/docs/src/stories/components/Button/Button.stories.jsx b/docs/src/stories/components/Button/Button.stories.jsx index 798b597d51..74cab4a2d0 100644 --- a/docs/src/stories/components/Button/Button.stories.jsx +++ b/docs/src/stories/components/Button/Button.stories.jsx @@ -8,7 +8,7 @@ export default { type: 'figma', url: 'https://www.figma.com/file/GCvY3Qv8czRgZgvl1dG6lp/Primer-Web?node-id=4371%3A7128' }, - layout: 'fullscreen' + layout: 'padded' }, excludeStories: ['ButtonTemplate'], @@ -22,12 +22,12 @@ export default { 'btn-danger', 'btn-link', 'btn-invisible', - 'close-button', - 'btn-with-count' + 'btn-with-count', + 'btn-octicon' ], // values control: { type: 'select', - labels: ['default', 'primary', 'outline', 'danger', 'link', 'invisible', 'close', 'with-count'] + labels: ['default', 'primary', 'outline', 'danger', 'link', 'invisible', 'close', 'with-count', 'icon-only'] }, table: { category: 'CSS' @@ -67,6 +67,12 @@ export default { category: 'CSS' } }, + closeBtn: { + control: {type: 'boolean'}, + table: { + category: 'CSS' + } + }, leadingVisual: { name: 'leadingVisual', type: 'string', @@ -109,20 +115,38 @@ export const ButtonTemplate = ({ leadingVisual, trailingVisual, trailingAction, - selected + selected, + closeBtn }) => ( <> ) export const Playground = ButtonTemplate.bind({}) +Playground.args = { + closeBtn: false +} diff --git a/docs/src/stories/components/Forms/Input.stories.jsx b/docs/src/stories/components/Forms/Input.stories.jsx new file mode 100644 index 0000000000..f7ef05453c --- /dev/null +++ b/docs/src/stories/components/Forms/Input.stories.jsx @@ -0,0 +1,141 @@ +import React from 'react' +import clsx from 'clsx' + +export default { + title: 'Components/Forms/Input', + parameters: { + layout: 'padded' + }, + decorators: [ + Story => ( +
+ + + ) + ], + excludeStories: ['InputTemplate'], + argTypes: { + size: { + options: [0, 1, 2], // iterator + mapping: [null, 'input-sm', 'input-lg'], // values + control: { + type: 'select', + labels: ['default', 'small', 'large'] + }, + table: { + category: 'CSS' + } + }, + block: { + description: 'full width', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + monospace: { + description: 'monospace text', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + contrast: { + description: 'change input background to light gray', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + disabled: { + description: 'disabled field', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + hideWebKit: { + description: 'hide WebKit autofill icon', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + placeholder: { + type: 'string', + name: 'placeholder', + description: 'string', + table: { + category: 'HTML' + } + }, + label: { + type: 'string', + name: 'label', + description: 'string', + table: { + category: 'HTML' + } + }, + type: { + name: 'type', + type: 'string', + description: 'type', + table: { + category: 'HTML' + } + }, + id: { + name: 'id', + type: 'string', + description: 'id', + table: { + category: 'HTML' + } + } + } +} + +export const InputTemplate = ({ + label, + type, + id, + size, + block, + placeholder, + contrast, + disabled, + hideWebKit, + monospace +}) => ( + <> + + + +) + +export const Playground = InputTemplate.bind({}) +Playground.args = { + type: 'email', + id: 'some-id', + placeholder: 'Email address', + label: 'Enter email address', + block: false, + hideWebKit: false, + monospace: false, + contrast: false, + disabled: false +} diff --git a/docs/src/stories/components/Forms/Select.stories.jsx b/docs/src/stories/components/Forms/Select.stories.jsx new file mode 100644 index 0000000000..72b2ce6be4 --- /dev/null +++ b/docs/src/stories/components/Forms/Select.stories.jsx @@ -0,0 +1,83 @@ +import React from 'react' +import clsx from 'clsx' + +export default { + title: 'Components/Forms/Select', + parameters: { + layout: 'padded' + }, + decorators: [ + Story => ( +
+ + + ) + ], + excludeStories: ['SelectTemplate'], + argTypes: { + size: { + options: [0, 1], // iterator + mapping: [null, 'select-sm'], // values + control: { + type: 'select', + labels: ['default', 'small'] + }, + table: { + category: 'CSS' + } + }, + disabled: { + description: 'disabled field', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + placeholder: { + type: 'string', + name: 'placeholder', + description: 'string', + table: { + category: 'HTML' + } + }, + label: { + type: 'string', + name: 'label', + description: 'string', + table: { + category: 'HTML' + } + }, + id: { + name: 'id', + type: 'string', + description: 'id', + table: { + category: 'HTML' + } + } + } +} + +export const SelectTemplate = ({label, id, size, placeholder, disabled}) => ( + <> + + + +) + +export const Playground = SelectTemplate.bind({}) +Playground.args = { + id: 'some-id', + placeholder: 'Select', + label: 'Select one' +} diff --git a/docs/src/stories/components/Forms/Textarea.stories.jsx b/docs/src/stories/components/Forms/Textarea.stories.jsx new file mode 100644 index 0000000000..f2769fe4b6 --- /dev/null +++ b/docs/src/stories/components/Forms/Textarea.stories.jsx @@ -0,0 +1,117 @@ +import React from 'react' +import clsx from 'clsx' + +export default { + title: 'Components/Forms/Textarea', + parameters: { + layout: 'padded' + }, + decorators: [ + Story => ( +
+ + + ) + ], + excludeStories: ['TextareaTemplate'], + argTypes: { + size: { + options: [0, 1, 2], // iterator + mapping: [null, 'input-sm', 'input-lg'], // values + control: { + type: 'select', + labels: ['default', 'small', 'large'] + }, + table: { + category: 'CSS' + } + }, + block: { + description: 'full width', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + contrast: { + description: 'change input background to light gray', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + disabled: { + description: 'disabled field', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + hideWebKit: { + description: 'hude WebKit autofill icon', + control: {type: 'boolean'}, + table: { + category: 'Interactive' + } + }, + placeholder: { + type: 'string', + name: 'placeholder', + description: 'string', + table: { + category: 'HTML' + } + }, + label: { + type: 'string', + name: 'label', + description: 'string', + table: { + category: 'HTML' + } + }, + type: { + name: 'type', + type: 'string', + description: 'type', + table: { + category: 'HTML' + } + }, + id: { + name: 'id', + type: 'string', + description: 'id', + table: { + category: 'HTML' + } + } + } +} + +export const TextareaTemplate = ({label, type, id, size, block, placeholder, contrast, disabled, hideWebKit}) => ( + <> + +