-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Font improvements, loading fonts in Storybook, and adding more font C…
…hromatic stories (#4238)
- Loading branch information
Showing
11 changed files
with
489 additions
and
91 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1,24 @@ | ||
<link rel="stylesheet" href="https://use.typekit.net/uma8ayv.css" /> | ||
<!-- | ||
Copyright 2023 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
--> | ||
|
||
<!-- This file loads adobe clean, adobe clean serif, myriad-arabic, myriad-hebrew, adobe-clean-han-japanese, adobe-clean-han-korean, adobe-clean-han-simplified-c, and adobe-clean-han-traditional. | ||
Access to these fonts was provided to a team account. --> | ||
<script> | ||
(function(d) { | ||
var config = { | ||
kitId: 'uei1lip', | ||
scriptTimeout: 3000, | ||
async: true | ||
}, | ||
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s) | ||
})(document); | ||
</script> |
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
71 changes: 71 additions & 0 deletions
71
...s/@react-spectrum/illustratedmessage/chromatic/IllustratedMessage.Languages.chromatic.tsx
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright 2020 Adobe. All rights reserved. | ||
* This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. You may obtain a copy | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
* OF ANY KIND, either express or implied. See the License for the specific language | ||
* governing permissions and limitations under the License. | ||
*/ | ||
import {ComponentMeta, ComponentStoryObj} from '@storybook/react'; | ||
import {Content} from '@react-spectrum/view'; | ||
import {Flex} from '@react-spectrum/layout'; | ||
import {Heading} from '@react-spectrum/text'; | ||
import {IllustratedMessage} from '..'; | ||
import NotFound from '@spectrum-icons/illustrations/src/NotFound'; | ||
import React from 'react'; | ||
|
||
type IllustratedMessageStory = ComponentStoryObj<typeof IllustratedMessage>; | ||
|
||
export default { | ||
title: 'Languages/IllustratedMessage', | ||
component: IllustratedMessage, | ||
parameters: { | ||
chromaticProvider: { | ||
colorSchemes: ['light'], | ||
express: false, | ||
locales: ['ar-AE', 'zh-CN', 'zh-TW', 'ja-JP', 'ko-KR'], | ||
scales: ['large', 'medium'] | ||
} | ||
} | ||
} as ComponentMeta<typeof IllustratedMessage>; | ||
|
||
export const _NotFound: IllustratedMessageStory = { | ||
render: () => ( | ||
<Flex gap="size-200" direction="row" wrap> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>Error 404</Heading> | ||
<Content>Page not found</Content> | ||
</IllustratedMessage> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>404 خطأ</Heading> | ||
<Content>الصفحة غير موجودة</Content> | ||
</IllustratedMessage> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>错误 404</Heading> | ||
<Content>找不到网页</Content> | ||
</IllustratedMessage> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>錯誤 404</Heading> | ||
<Content>找不到網頁</Content> | ||
</IllustratedMessage> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>エラー 404</Heading> | ||
<Content>ページが見つかりません</Content> | ||
</IllustratedMessage> | ||
<IllustratedMessage width="size-2000"> | ||
<NotFound /> | ||
<Heading>오류 404</Heading> | ||
<Content>페이지를 찾을 수 없음</Content> | ||
</IllustratedMessage> | ||
</Flex> | ||
), | ||
name: 'Not found: no italic in CCJK' | ||
}; |
68 changes: 68 additions & 0 deletions
68
packages/@react-spectrum/picker/chromatic/Picker.Languages.chromatic.tsx
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2023 Adobe. All rights reserved. | ||
* This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. You may obtain a copy | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
* OF ANY KIND, either express or implied. See the License for the specific language | ||
* governing permissions and limitations under the License. | ||
*/ | ||
import {ComponentMeta, Story} from '@storybook/react'; | ||
import {Item, Picker, Section} from '..'; | ||
import React from 'react'; | ||
import {SpectrumPickerProps} from '@react-types/select'; | ||
|
||
export default { | ||
title: 'Languages/Picker', | ||
component: Picker, | ||
parameters: { | ||
chromaticProvider: {colorSchemes: ['light'], express: false, locales: ['en-US'], scales: ['large', 'medium']} | ||
} | ||
} as ComponentMeta<typeof Picker>; | ||
|
||
const Template = <T extends object>(): Story<SpectrumPickerProps<T>> => (args) => ( | ||
<Picker {...args}> | ||
<Section title="Animals"> | ||
<Item key="Aardvark">Aardvark</Item> | ||
<Item key="Kangaroo">Kangaroo</Item> | ||
<Item key="Snake">Snake</Item> | ||
</Section> | ||
<Section title="People"> | ||
<Item key="Danni">Danni</Item> | ||
<Item key="Devon">Devon</Item> | ||
<Item key="Ross">Ross</Item> | ||
</Section> | ||
</Picker> | ||
); | ||
|
||
export const ArabicPlaceholder = Template().bind({}); | ||
ArabicPlaceholder.args = {label: 'Pick your favorite', placeholder: 'دولفين'}; | ||
ArabicPlaceholder.parameters = { | ||
chromaticProvider: {locales: ['ar-AE']} | ||
}; | ||
|
||
export const ChineseSimplifiedPlaceholder = Template().bind({}); | ||
ChineseSimplifiedPlaceholder.args = {label: 'Pick your favorite', placeholder: '海豚'}; | ||
ChineseSimplifiedPlaceholder.parameters = { | ||
chromaticProvider: {locales: ['zh-CN']} | ||
}; | ||
|
||
export const ChineseTraditionalPlaceholder = Template().bind({}); | ||
ChineseTraditionalPlaceholder.args = {label: 'Pick your favorite', placeholder: '海豚'}; | ||
ChineseTraditionalPlaceholder.parameters = { | ||
chromaticProvider: {locales: ['zh-TW']} | ||
}; | ||
|
||
export const JapanesePlaceholder = Template().bind({}); | ||
JapanesePlaceholder.args = {label: 'Pick your favorite', placeholder: 'イルカ'}; | ||
JapanesePlaceholder.parameters = { | ||
chromaticProvider: {locales: ['ja-JP']} | ||
}; | ||
|
||
export const KoreanPlaceholder = Template().bind({}); | ||
KoreanPlaceholder.args = {label: 'Pick your favorite', placeholder: '돌고래'}; | ||
KoreanPlaceholder.parameters = { | ||
chromaticProvider: {locales: ['ko-KR']} | ||
}; |
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.
f239d0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verdaccio builds:
CRA Test App
NextJS Test App
RAC Tailwind Example
CRA Test App Size
NextJS App Size
Publish stats
Size diff since last release
Docs