diff --git a/packages/@adobe/spectrum-css-temp/components/textfield/index.css b/packages/@adobe/spectrum-css-temp/components/textfield/index.css index dd6a4445b4a..2745a850472 100644 --- a/packages/@adobe/spectrum-css-temp/components/textfield/index.css +++ b/packages/@adobe/spectrum-css-temp/components/textfield/index.css @@ -76,7 +76,7 @@ governing permissions and limitations under the License. /* Change the input font styles in all browsers */ @extend %i18nFontFamily; font-size: var(--spectrum-textfield-text-size); - line-height: var(--spectrum-textfield-text-line-height); + line-height: var(--spectrum-textfield-height); text-overflow: ellipsis; transition: border-color var(--spectrum-global-animation-duration-100) ease-in-out, @@ -206,6 +206,10 @@ governing permissions and limitations under the License. flex: 1 1 auto; min-height: 0; + .spectrum-Textfield-input { + line-height: var(--spectrum-textfield-text-line-height); + } + &.spectrum-Textfield--quiet { /* quiet textfields grow based on text content, up to the height of the container. */ /* but we need to keep help text next to input */ diff --git a/packages/@react-spectrum/textfield/stories/TextArea.stories.tsx b/packages/@react-spectrum/textfield/stories/TextArea.stories.tsx index b85682bbc2c..5ae0332a53e 100644 --- a/packages/@react-spectrum/textfield/stories/TextArea.stories.tsx +++ b/packages/@react-spectrum/textfield/stories/TextArea.stories.tsx @@ -11,8 +11,8 @@ */ import {action} from '@storybook/addon-actions'; -import {Button} from '@react-spectrum/button'; -import {Content, ContextualHelp, Heading} from '@adobe/react-spectrum'; +import {ActionButton, Button} from '@react-spectrum/button'; +import {Content, ContextualHelp, Heading, useLocale} from '@adobe/react-spectrum'; import {Flex} from '@react-spectrum/layout'; import {Form} from '@react-spectrum/form'; import Info from '@spectrum-icons/workflow/Info'; @@ -298,3 +298,60 @@ function ValidationExample(props) { errorMessage={value === '' ? 'Empty input not allowed.' : 'Single digit numbers are 0-9. Lorem ipsum dolor.'} /> ); } + +// strings with diacritic marks +let localeStrings = { + 'ar-AE': 'عِرِفِتـــانٍ خانٍِ', + 'bg-BG': 'Азбучен ред', + 'cs-CZ': 'Abecední řádek', + 'da-DK': 'Afbryder', + 'de-DE': 'Abbruch', + 'el-GR': 'Αλφαβητική γραμμή', + 'en-US': '123 Main St.', + 'es-ES': 'Línea alfabética', + 'et-EE': 'Tähestikuline rida', + 'fi-FI': 'Aakkosellinen rivi', + 'fr-FR': 'Ligne alphabétique', + 'he-IL': 'שורת אלפבית', + 'hr-HR': 'Abecedni redak', + 'hu-HU': 'Ábécésor', + 'it-IT': 'Riga alfabetica', + 'ja-JP': 'アルファベット順', + 'ko-KR': '알파벳 순서', + 'lt-LT': 'Abėcėlinė eilutė', + 'lv-LV': 'Alfabētiskā rinda', + 'nb-NO': 'Alfabetisk rekkefølge', + 'nl-NL': 'Alfabetische volgorde', + 'pl-PL': 'Alfabetyczny wiersz', + 'pt-BR': 'Linha alfabética', + 'ro-RO': 'Rând alfabetic', + 'ru-RU': 'Алфавитный порядок', + 'sk-SK': 'Abecedný riadok', + 'sl-SI': 'Abecedni red', + 'sr-SP': 'Абецедни ред', + 'sv-SE': 'Alfabetisk ordning', + 'tr-TR': 'Alfabetik sıra', + 'uk-UA': 'Алфавітний порядок', + 'zh-CN': '字母顺序', + 'zh-TW': '字母順序' +}; +// https://lingojam.com/ZalgoText +let zalgoString = 'i̶͖̊́̃̒̄͆̚͝t̶̢̢̧̺̻̘̖̗͉̟̞̭̀̀͒͂͐̐̄̇́͒̅̆́\'̶̯̳̑͑͛͐͋̈́̆̇̓͝͝s̵͙͇͉̪̉̈́̐̌̌̃̓͝ ̴̙̘̙̏̍̌̀̕͝m̶̰̥͇̄͒̃̊́͋̎́͆̍̓͑̅͜ȩ̵̛̪̜̯͓͈̰̰̱̠͆̾́́̎̊͌̒́͗̚̕͠ͅ,̷̫̱͖̖͊̉̒̎͊͝ ̵̡̧̛̝̳̦͙͚̣̩̜͙̈́̾̃̋͒̃̇̔̀͜ͅi̵̯̰̰͉̺͎̖̐ͅ\'̷͚̊͐͑͗́͒͌́͛̚̕͝m̴̨̧̯̞͇̤͎̥̫̩͔͖̮̖̲̽͆͗̌̈̇͋̍̕͘͠ ̸͚̞̠̦̑̌̍͋̃t̷̘̝̘̣̮͓̠̮̤͍͕̓͛̉h̶̛͔̳̟̩̦͍̤̥̥̦̗͍͖̓͆̐̽̒̈́͝͠ē̷̛͓̫̜͕͈͙̮͕̝͙̆͂̇̿̋̇̓̂̋͒̂͂͝ ̸̨͈̠̟̤͇̟̗̼̲̯̭̓̈̑́̇̈̀͐͌͂͛͌̅͘͜͝ͅp̴̧̧̛̛̺̩̩̘̲̜̰̩͚̻̬̠̎̅́̏̂́̐̾̓̓͌͝r̷̜̱̒̊̒͛̔ơ̷̼̝̥̺͎͚͚͇̝̫̓̈́̽̈̍̈̌̂̀̚͝͝ḇ̵̠̼͔͙̦̝̠̳̤̍͗͐͝l̷̛̰̲̺̫̭̳̹̬̳̤̱͎̋͛ȩ̷͒m̵̳̟͉̪̞̎̐̓̏̒͗,̶̨͍̥̗̺̮̰̬͍̓͋̄̋͛́̄̕͝ ̷̧̡̧̫̯̘̣̠̮͕̪͈̣̹͌̈̃̃̈́̃̍̊͝͝ͅį̸̲̠̤̳͗̽̋͊̍͛͂̊̓̑̅͋̿t̶̛̲͈͇͇͊̋͐̐͌͒̊̿̕͘\'̸̧͍̠̲̤̠̝̩̟̿͌ś̷̳͇̅̇͛͛̈́̅̑̇̔̌͆͝ ̵̛̱̺̙̪͒̇̔͗͘ͅm̶̢̧̤̟͙͉̠̣̺̥̫͙̹͉̬̉̏͑̕͝e̴̪̥̪̠̜̻̪͎͎̱̱̯̜͒́̑̃̕'; +function DefaultLocaleStrings(props) { + let locale = useLocale(); + let [isZalgo, setValue] = React.useState(false); + return ( + <> +