Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
731 commits
Select commit Hold shift + click to select a range
79f62e8
Publish
devongovett Dec 19, 2022
f102434
Merge branch 'main' into 1999
Dec 19, 2022
b6425fc
fix(#3800): MobileSearchAutocomplete: focused style persists on blur …
Dec 20, 2022
ac2d5bb
Merge branch 'main' into 1999
Dec 20, 2022
ee3cc80
combobox: changing example to be more inclusive (#3866)
cgood92 Dec 20, 2022
7bf553f
Enable strict mode in storybook on a per story basis (#3333)
LFDanLu Dec 20, 2022
86b9d3d
Revert "Enable strict mode in storybook on a per story basis (#3333)"…
LFDanLu Dec 21, 2022
9aa0c7e
TagGroup: Add useTagGroupState and fix focus issues (#3798)
reidbarber Jan 3, 2023
080488a
Remove need for onMove events (#3858)
snowystinger Jan 3, 2023
15e101b
Fix out of date yarn lock and lint ignore (#3887)
snowystinger Jan 5, 2023
bb9f65f
Enable strict mode toggle in storybook (#3870)
LFDanLu Jan 5, 2023
9283b27
Provide nodeRef to Transition to fix StrictMode warning (#3865)
LFDanLu Jan 5, 2023
73d8be4
Fix LiveAnnouncer styles cause page shift (#3807)
snowystinger Jan 6, 2023
a437af0
Update Next.js config and docs for 13.1 (#3897)
reidbarber Jan 10, 2023
dc035b2
Match column resize aria hook interface to other interfaces (#3889)
snowystinger Jan 11, 2023
9e2d10b
Fix FocusScope StrictMode issues (#3878)
LFDanLu Jan 11, 2023
0af91c0
Improve Col resize performance (#3890)
snowystinger Jan 12, 2023
e023016
Toast 🍞 (#3868)
devongovett Jan 12, 2023
e42010c
Revert "Remove PR commenting for now so builds pass (#3826)" (#3888)
LFDanLu Jan 12, 2023
68d9c9e
Support landmark navigation and toasts across iframes (#3892)
devongovett Jan 12, 2023
6048166
Enable publishing toast nightlies (#3911)
devongovett Jan 12, 2023
25c0732
Fix website build script
devongovett Jan 12, 2023
1faa59e
TagGroup: add `maxRows` prop to limit initially shown tags, and inclu…
reidbarber Jan 13, 2023
3d6d506
Column header with menu alignment (#3907)
snowystinger Jan 13, 2023
853beb2
Partial Storybook CSF 3 story conversions (#3824)
LFDanLu Jan 13, 2023
d524547
Make DialogTrigger use screen width to determine if mobile or not (#3…
LFDanLu Jan 17, 2023
d2e60c8
Don't allow grouped column resizing (#3920)
snowystinger Jan 17, 2023
b6786da
Fix FocusScope missing parent element (#3908)
snowystinger Jan 17, 2023
74b0e2f
ActionBar docs (#2777)
LFDanLu Jan 18, 2023
ff3e690
TagGroup: Custom action (#3893)
reidbarber Jan 18, 2023
93f49a4
fix(@react-stately/combobox): don't commit selection on close (#3912)
alirezamirian Jan 18, 2023
4c20bf9
Fix docs build warnings (#3641)
snowystinger Jan 18, 2023
29fbecf
release actionbar docs (#3927)
LFDanLu Jan 18, 2023
767a617
Add ActionBar examples to TableView and ListView docs (#3777)
reidbarber Jan 18, 2023
5d773ee
Revert Actionbar docs release (#3931)
LFDanLu Jan 18, 2023
1ddcde7
Fix publishing nightly (#3932)
devongovett Jan 19, 2023
440f309
TagGroup: Avatar support (#3937)
reidbarber Jan 19, 2023
44b90ef
Fix interact outside false positive (#3935)
snowystinger Jan 19, 2023
38a57d3
Update useLayoutEffect dependencies to ensure TabLine resizes (#3688)
tywayne Jan 19, 2023
fc04392
Fix Tabline resizing (#3948)
snowystinger Jan 23, 2023
c183944
TagGroup: fix to call onAction with no arguments (#3949)
reidbarber Jan 23, 2023
c67f155
Merge branch 'main' into 1999
Jan 23, 2023
4b702eb
Add LandmarkController API (#3939)
devongovett Jan 24, 2023
9ddb74b
Test transformer docs for API output (#3833)
snowystinger Jan 25, 2023
4a11400
add fallback value for input to keep controlled state onChange & not …
omacranger Jan 25, 2023
f32367a
TagGroup: Field support (#3938)
reidbarber Jan 26, 2023
903c044
Update color schemes link in docs (#3972)
LFDanLu Jan 30, 2023
75ca0e3
Make LandmarkManager a global singleton (#3966)
devongovett Jan 30, 2023
f7e68cc
Remove unnecessary `onColumnResize/Start/End` from useTableColumnResi…
LFDanLu Jan 30, 2023
aebe436
Updated translations for Tags and Toasts
rgeraghty Jan 30, 2023
8e57eae
Provide defaults for TableColumnLayout if options arent provided (#3962)
LFDanLu Jan 31, 2023
fb3e5e2
fix(#2949): TableView/ListView/DnD Windows High Contrast issues (#3827)
Jan 31, 2023
7f162ef
Add prose for quiet links and when they can be used (#3989)
jnurthen Jan 31, 2023
533c5fa
getTimeZoneOffset: fix offset bug for old dates (#3924) (#3960)
tomfa Jan 31, 2023
aa41650
Adding descriptions for the table resizing hooks (#3990)
LFDanLu Jan 31, 2023
62d779c
TableView CSF 3 update for FocusRing clipping (#3934)
snowystinger Feb 1, 2023
64855c1
TS strict for react-aria 'a' and react-spectrum 'b' (#3929)
snowystinger Feb 1, 2023
c9dcf67
Fully scroll collection elements into view when keyboard navigating (…
LFDanLu Feb 1, 2023
c53cfb2
Adding missing descriptions and removing extra stars (#3992)
LFDanLu Feb 1, 2023
70e4c44
SearchAutocomplete: add description for onSubmit (#3993)
reidbarber Feb 2, 2023
c5961ed
fix SearchAutocomplete to call onClear (#4000)
reidbarber Feb 2, 2023
97ff9f9
Fix useId hydration error in strict mode (#3980)
devongovett Feb 2, 2023
6fb5957
Formalize column sizing as constrained flex (#3879)
snowystinger Feb 3, 2023
020a0a5
fix(#4010): Update axe-core version for Storybook Accessibility panel…
Feb 6, 2023
27f8fa1
fix(#3884): useGrid: gracefully handle focus when a focused row is re…
Feb 6, 2023
e8cd956
TagGroup: always show error icon with error message (#4019)
reidbarber Feb 6, 2023
9e92106
Center the table in the viewport if resizer is still out of view (#4018)
LFDanLu Feb 7, 2023
043be42
fix(#4023): ActionMenu: Items in Dynamic storybook story all have the…
Feb 7, 2023
6829b86
Add docs for custom icons (#3942)
reidbarber Feb 7, 2023
7919759
Fix WHCM Checkbox from audit (#4030)
snowystinger Feb 8, 2023
b5336b4
Broaden allowed triggerRef elements for table column resizer (#4026)
LFDanLu Feb 9, 2023
8c61397
Prevent ComboBox item selection if menu is closing (#3999)
LFDanLu Feb 10, 2023
be0fae9
Adding type=range to resizer aria props (#4034)
LFDanLu Feb 10, 2023
6013307
move useTag ref from props to param (#4051)
reidbarber Feb 13, 2023
72ee92f
Adding descriptions to Tag related interfaces (#4053)
LFDanLu Feb 13, 2023
f5c005b
Add support for Node ESM (#4038)
devongovett Feb 14, 2023
f3de960
Revert "Prevent ComboBox item selection if menu is closing (#3999)" …
LFDanLu Feb 14, 2023
5389f12
Adds parseDuration functionality to @internationalized/date package (…
adobesamr Feb 14, 2023
f847cd0
Add aria-label to badge story and docs (#4044)
snowystinger Feb 14, 2023
5baa76f
Prevent menu flicker when closing ComboBox via blur (#4060)
LFDanLu Feb 15, 2023
b075dc5
Update column resizing stately function property names (#4055)
snowystinger Feb 15, 2023
93b3c95
Narrow combobox focus event handler types (#4039)
joshuajaco Feb 15, 2023
e9f0817
Add more debug info for PR comment workflow (#4063)
LFDanLu Feb 15, 2023
eb3e34f
Fix webpack 4 build (#4064)
snowystinger Feb 15, 2023
93afaaa
fix deps in @react-types/list (#4073)
reidbarber Feb 16, 2023
0f953ca
fix(#4067): Storybook Provider addon: Express input:checkbox requires…
Feb 16, 2023
8e3a906
Explain Proxy in TableView (#4072)
snowystinger Feb 16, 2023
5e5d3ce
Update lightningcss (#4070)
snowystinger Feb 16, 2023
6e30b87
fix(#4078): MobileComboBox: searchbox should not have aria-expanded p…
Feb 17, 2023
510a7dd
Get rid of dupe id in DatePicker/useDatePicker (#4085)
LFDanLu Feb 21, 2023
3f3e83f
Code changes from docs-ts branch (#4090)
devongovett Feb 21, 2023
6ccc006
Merge branch 'main' of github.com:adobe/react-spectrum into 1999
devongovett Feb 23, 2023
86aa89b
Fix TagGroup label alignment (#4102)
reidbarber Feb 23, 2023
48900ee
Some fixes
devongovett Feb 23, 2023
c707a7b
Explicitly define the exports from react-stately/tag (#4106)
LFDanLu Feb 23, 2023
a0efee8
Publish
devongovett Feb 23, 2023
e209b3d
Adds parseDuration documentation (#3844)
adobesamr Feb 23, 2023
430f296
Docs for maxRows and onAction in TagGroup (#3918)
reidbarber Feb 23, 2023
ee28a57
ActionBar docs updates (#4100)
devongovett Feb 23, 2023
7e899b7
Fix docs application of generics to nested interfaces (#4104)
snowystinger Feb 23, 2023
1edaeae
Avatar docs (#4115)
devongovett Feb 23, 2023
b171dac
Enable toast docs in production (#4116)
devongovett Feb 23, 2023
ef3b262
TagGroup: add docs for help text, contextual help, and avatars (#3964)
reidbarber Feb 23, 2023
d7cb26e
Feb 2023 release notes (#4113)
dannify Feb 24, 2023
0f7a954
Merge branch 'main' into 1999
Feb 25, 2023
b4626a2
Fix toast ESM build and SSR support (#4124)
devongovett Feb 28, 2023
0bb5df1
Add toast to next.js config
devongovett Feb 28, 2023
cb1fc23
Publish
devongovett Feb 28, 2023
00787b0
Prevent autoscrolling of focused collection elements when focus isn't…
LFDanLu Mar 2, 2023
e00dfc4
Publish
devongovett Mar 2, 2023
9eb8796
Type check docs examples (#3710)
devongovett Mar 2, 2023
31c81da
Update useTagGroup and useTag returned prop names (#4156)
reidbarber Mar 3, 2023
e12f817
React strictmode provider (#4148)
snowystinger Mar 3, 2023
05fb9aa
Fix React StrictMode Overlay tests (#4146)
snowystinger Mar 4, 2023
05be974
Allow custom close delay for tooltips (#4128)
bill-kerr Mar 6, 2023
4cbeeaf
Code changes for React Aria Components (#4150)
devongovett Mar 6, 2023
b64e64f
Revert tooltip close delay docs changes (#4166)
LFDanLu Mar 6, 2023
d6adfeb
fix(#4160): NumberField: screen reader fails to announce negative val…
Mar 8, 2023
92ae3fd
Add support for custom data attributes to ListBox Item (#4178)
reidbarber Mar 8, 2023
a9e1ef1
ListBox: avoid overriding Item id with custom id (#4179)
reidbarber Mar 8, 2023
fc5f846
RFC: React Aria Components (#4058)
devongovett Mar 8, 2023
12d98e3
fix(#4151): Radio: should use ButtonText and Highlight colors with fo…
Mar 9, 2023
1e473d3
fix(#4103): ProgressCircle: overBackground variant is using Canvas as…
Mar 9, 2023
11ca4ea
Fix additional character appended to Calendar cells in various locale…
snowystinger Mar 10, 2023
1b01e97
fix(#4188): RangeSlider Default storybook example is labeled twice (#…
Mar 10, 2023
4a75768
Fix useResizeObserver loop limit exceeded warning (#2891)
snowystinger Mar 14, 2023
6dd8f01
Implement React Aria Components (#4171)
devongovett Mar 15, 2023
dabf87d
Revert Fix useResizeObserver loop limit exceeded warning (#2891) (#4204)
snowystinger Mar 15, 2023
e044ef7
Stop using propagation when escape key is pressed, update useTooltipT…
audreyso Mar 15, 2023
e849aef
fix(#4208): Form includes label prop inherited from SpectrumLabelable…
Mar 17, 2023
8cd7d0b
Aria component Select disabled more obvious (#4215)
snowystinger Mar 17, 2023
be7ecfe
Updating column resize to support mode where resizer is always visibl…
LFDanLu Mar 17, 2023
67f618d
Aria component Progressbar contrast (#4216)
snowystinger Mar 17, 2023
17d75d8
Convert React Aria Components examples to TypeScript (#4212)
devongovett Mar 17, 2023
29d52d7
Fixes for Aria Components (#4221)
devongovett Mar 18, 2023
1e74a5a
Fix duplicate id in some icons (#4217)
snowystinger Mar 18, 2023
574a27d
Add drag and drop support for React Aria Components (#4207)
devongovett Mar 18, 2023
52ce139
Cleanup NumberField tests (#4227)
snowystinger Mar 20, 2023
a1ccf6f
Fix nightly build of React Aria Components (#4231)
devongovett Mar 20, 2023
bd5adc8
TS Strict update react-aria 'b' and 'L' (#3930)
snowystinger Mar 20, 2023
23a33ce
Update comment to properly reflect the units (#4235)
benjamin-chang Mar 21, 2023
c3a32cc
Enable TS strict mode for React Aria Components (#4225)
devongovett Mar 21, 2023
d9697ea
TagGroup: Prevent focus of remove button via useTag (#4237)
reidbarber Mar 21, 2023
68044ea
Prevent keyboard specific Table column resizing announcement on iOS V…
LFDanLu Mar 22, 2023
b11fc3d
TagGroup: don't remove tags on Space press (#4240)
reidbarber Mar 22, 2023
a8e9c8e
Genericize `useFocus()` for narrowed event handler types (#4095)
imhoffd Mar 22, 2023
435b650
Update code sample to match description (#4234)
benjamin-chang Mar 23, 2023
536f42d
Specify box sizing where we rely on it (#4180)
snowystinger Mar 23, 2023
58e9d08
put logo as item in SearchAutocomplete
reidbarber Mar 23, 2023
4c6ecda
remove code changes
reidbarber Mar 23, 2023
5071f85
Fix specificity for icons in labels (#4241)
LFDanLu Mar 23, 2023
a16e847
fix(#4157): useSpinButton: rapidly changing values causes live region…
Mar 23, 2023
fad1375
focus input on cmd/ctrl + K
reidbarber Mar 23, 2023
6131f76
Create chromatic stories for tags (#4243)
snowystinger Mar 23, 2023
bdfac24
remove rest of code changes
reidbarber Mar 23, 2023
3234149
Merge branch 'main' into 1999
reidbarber Mar 23, 2023
87a3c14
add Remix to SSR docs (#4226)
reidbarber Mar 23, 2023
8da7bf5
fix(#4197): TagGroup: focus ring does not use Highlight color with fo…
Mar 23, 2023
5862ec0
Localize tag count (#4257)
snowystinger Mar 23, 2023
3fbe874
fix(#4200): NumberField issue with flex layout and forms (#4201)
Mar 23, 2023
72505fe
React Aria Components fixes from testing (#4248)
devongovett Mar 23, 2023
7657820
Refine table column resize hook props and returned values (#4254)
LFDanLu Mar 23, 2023
3c0d990
Add custom cursor icons back (#3649)
snowystinger Mar 23, 2023
7c02ba2
Fix TagGroup maxRows layout issues (#4041)
reidbarber Mar 23, 2023
a8bc2b1
Fix overlay position clamping and arrow position (#4220)
LFDanLu Mar 23, 2023
dcf641b
SearchAutocomplete: Update to CSF3 and add Controls (#4250)
reidbarber Mar 23, 2023
7e502ee
SearchAutocomplete: fix empty state styles (#4252)
reidbarber Mar 23, 2023
2942ae4
Tableview: Drag and drop support (#4008)
reidbarber Mar 23, 2023
c285f01
support custom data attributes (#4251)
reidbarber Mar 23, 2023
42f479f
Merge branch 'main' into 1999
reidbarber Mar 23, 2023
e67d48d
Fix missed classname (#4260)
snowystinger Mar 24, 2023
5714d3d
update useTagGroup description (#4269)
reidbarber Mar 27, 2023
db4c617
Increase specificity of textfield icon and fix search autocomplete st…
LFDanLu Mar 27, 2023
e84cec4
Merge branch 'main' into 1999
reidbarber Mar 27, 2023
615bcfc
Add negative margin on VisuallyHidden on both sides (#4177)
filipw01 Mar 29, 2023
5b5eeb0
fix chromatic accordion (#4271)
snowystinger Mar 29, 2023
5495cc7
Updating stories for containerPadding (#4274)
LFDanLu Mar 29, 2023
26263e8
Updating MobileSearchAutocomplete so icon comes before the "x" button…
LFDanLu Mar 29, 2023
97d35ec
fix announcement of <mark>
reidbarber Mar 29, 2023
39fcc6c
useTagGroup: add description and update 'remove' translation string (…
reidbarber Mar 29, 2023
2ee69f1
RAC testing fixes (#4279)
devongovett Mar 29, 2023
89fe55b
React Aria Components API improvements (#4275)
devongovett Mar 29, 2023
b72d363
Merge branch 'main' into 1999
reidbarber Mar 29, 2023
080de69
Add React Aria Components + Tailwind CSS examples (#4282)
devongovett Mar 29, 2023
ed41ba9
Hidpi resize cursors (#4276)
snowystinger Mar 30, 2023
b94cb8d
Merge branch 'main' into 1999
Mar 30, 2023
610ba60
useTag: remove isFocused prop (#4291)
reidbarber Mar 30, 2023
a1efafd
Fixing two broken links in docs (#4286)
ktabors Mar 30, 2023
9c76b51
Fix SSR issues with React Aria Components (#4297)
devongovett Mar 30, 2023
f345629
Generate table row textValue from row header cells by default (#4290)
devongovett Mar 30, 2023
85fcd56
TagGroup: fix types and item render (#4295)
reidbarber Mar 30, 2023
46a729b
TableView DnD: fix types and dependencies (#4298)
reidbarber Mar 30, 2023
9b874cd
Automatically providing visually hidden styles to the resizer input (…
LFDanLu Mar 31, 2023
83677f9
Updating prop names for overlay position options (#4294)
LFDanLu Mar 31, 2023
6cccc9c
Tableview DnD: add headers (#4307)
reidbarber Mar 31, 2023
c463c88
Fix combobox visible focus styling when opening the menu via keyboard…
LFDanLu Mar 31, 2023
38399f6
SearchAutocomplete: fix types (#4305)
reidbarber Mar 31, 2023
d827dab
Merge branch 'main' into 1999
reidbarber Mar 31, 2023
17ea50d
Update Slider docs to match comment to table (#4301)
snowystinger Mar 31, 2023
f629719
Fix clearing date picker by setting value to null (#4312)
devongovett Mar 31, 2023
7fa0a88
Add overview page for React Aria Components (#4306)
devongovett Mar 31, 2023
8dd79fe
switch to use dynamic items
reidbarber Apr 3, 2023
112132d
Merge branch 'main' into 1999
reidbarber Apr 3, 2023
83ff0ae
add textValue for algolia item
reidbarber Apr 3, 2023
2ecd9c1
Merge branch '1999' of https://github.com/adobe/react-spectrum into 1999
reidbarber Apr 3, 2023
1d54fab
Fix combobox section filtering and Firefox gap issue (#4326)
devongovett Apr 4, 2023
7acdafc
show top-level result for a page
reidbarber Apr 4, 2023
6188505
Latest Translations (#4332)
rgeraghty Apr 4, 2023
bf57013
set overlay to position: fixed on open
reidbarber Apr 4, 2023
8a6fef1
fix:(#4144): SearchField: contextual help button being displayed inco…
dsmmcken Apr 4, 2023
2f06060
use css class instead
reidbarber Apr 4, 2023
7db0dd3
Add readme for React Aria Components npm package (#4331)
devongovett Apr 5, 2023
bc96908
Mobile overlay positioning fixes (#4330)
devongovett Apr 5, 2023
5f69ad1
Improve resize cursors on 1x screens (#4334)
devongovett Apr 5, 2023
f422c5c
Fix Safari rendering issues (#4333)
snowystinger Apr 5, 2023
5aa969f
Build RAC Tailwind example in Verdaccio (#4335)
devongovett Apr 5, 2023
1d6ed94
Add tailwind example link to RAC overview page (#4338)
devongovett Apr 5, 2023
f239d0b
Font improvements, loading fonts in Storybook, and adding more font C…
ktabors Apr 5, 2023
b6987e2
Publish
devongovett Apr 5, 2023
9d1ba9b
Add avatar to monopackage
devongovett Apr 5, 2023
ddfa101
Add docs for useTagGroup (#4154)
reidbarber Apr 5, 2023
fbafeac
Update version badge for TableView resizing (#4339)
LFDanLu Apr 5, 2023
9ad0ce6
Adding docs for close delay in useTooltipTrigger (#4167)
LFDanLu Apr 5, 2023
b06a446
Table column resizing aria docs (#3982)
LFDanLu Apr 5, 2023
0fbd9c7
Publish React Aria Components docs to production (#4340)
devongovett Apr 5, 2023
ce2a7c7
Publish RAC source
devongovett Apr 5, 2023
05bde39
Fix RAC prod docs build (#4341)
devongovett Apr 5, 2023
23c3a91
April release notes (#4316)
devongovett Apr 6, 2023
0a1d0cd
add help text support to SearchAutocomplete (#4327)
reidbarber Apr 6, 2023
9e8b5af
Merge branch 'main' into 1999
LFDanLu Apr 6, 2023
c054ccf
Merge branch 'main' into 1999
reidbarber Apr 6, 2023
13a5a25
clear value on algolia select
reidbarber Apr 6, 2023
18831be
Merge branch '1999' of https://github.com/adobe/react-spectrum into 1999
reidbarber Apr 6, 2023
9f4ddd3
Fix Tooltip link on react-aria-components docs (#4352)
frontsideair Apr 8, 2023
4f70208
Merge branch 'main' into 1999
reidbarber Apr 10, 2023
2784d3b
Fix React Aria Components tree shaking (#4357)
devongovett Apr 10, 2023
42c65e6
SearchAutocomplete: fix duplicate events (#4337)
reidbarber Apr 11, 2023
a8903d3
Stop dialog inside collection from closing due to typeahead (#4328)
snowystinger Apr 11, 2023
9981d1a
Merge branch 'main' into 1999
reidbarber Apr 11, 2023
facc396
fix suggestion order
reidbarber Apr 11, 2023
208cf5b
Merge branch '1999' of https://github.com/adobe/react-spectrum into 1999
reidbarber Apr 11, 2023
7f41c64
Menu escape should not clear selection (#4285)
snowystinger Apr 11, 2023
68e1438
Merge branch 'main' into 1999
LFDanLu Apr 11, 2023
9ef1739
remove groupby
reidbarber Apr 11, 2023
033bfbf
lint
reidbarber Apr 11, 2023
6ae6bb6
Revert "remove groupby"
reidbarber Apr 11, 2023
ac748ea
Revert "lint"
reidbarber Apr 11, 2023
950d45d
TagGroup: remove useTagGroupState (#4359)
reidbarber Apr 11, 2023
f1e19a2
Revert ToC changes
devongovett Apr 11, 2023
c025734
Merge branch 'main' into 1999
LFDanLu Apr 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 22 additions & 2 deletions .chromatic/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import themeDark from '@adobe/spectrum-css-temp/vars/spectrum-dark.css';
import themeDarkest from '@adobe/spectrum-css-temp/vars/spectrum-darkest.css';
import scaleMedium from '@adobe/spectrum-css-temp/vars/spectrum-medium.css';
import scaleLarge from '@adobe/spectrum-css-temp/vars/spectrum-large.css';
import express from '@adobe/spectrum-css-temp/vars/express.css';

const THEME = {
global: themeGlobal,
Expand All @@ -20,15 +21,15 @@ export const scales = {
};

export let defaultTheme = {
global: themeGlobal,
global: THEME.global,
light: THEME.light,
dark: THEME.darkest,
medium: scales.medium,
large: scales.large
};

export let altTheme = {
global: themeGlobal,
global: THEME.global,
light: THEME.lightest,
dark: THEME.dark,
medium: scales.medium,
Expand All @@ -42,6 +43,25 @@ export let themes = {
darkest: defaultTheme
};

export let expressThemes = {};
for (let key in themes) {
expressThemes[key] = {
...themes[key],
global: {
...themes[key].global,
express: express.express
},
medium: {
...themes[key].medium,
express: express.medium
},
large: {
...themes[key].large,
express: express.large
}
};
}

// Based on https://adobe.sharepoint.com/sites/global/SitePages/Languages%20Supported.aspx
export let locales = [
{label: 'Auto', value: ''},
Expand Down
3 changes: 3 additions & 0 deletions .chromatic/custom-addons/chromatic/disableAnimations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.disableAnimations * {
transition: none !important;
}
22 changes: 19 additions & 3 deletions .chromatic/custom-addons/chromatic/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {locales, scales, themes} from '../../constants';
import {expressThemes, locales, scales, themes} from '../../constants';
import {makeDecorator} from '@storybook/addons';
import {Provider, View} from '@adobe/react-spectrum';
import React, {useEffect} from 'react';
import './disableAnimations.css';

export const withChromaticProvider = makeDecorator({
name: 'withChromaticProvider',
Expand All @@ -14,6 +15,8 @@ export const withChromaticProvider = makeDecorator({
} else {
selectedLocales = options.locales ? locales.map(l => l.value).slice(1) : ['en-US', 'ar-AE'];
}
let colorSchemes = options.express ? [] : (options.colorSchemes || Object.keys(themes));
let scalesToRender = options.scales || Object.keys(scales);
let height;
let minHeight;
if(isNaN(options.height)) {
Expand All @@ -22,12 +25,17 @@ export const withChromaticProvider = makeDecorator({
height = options.height;
}

let expressTheme = colorSchemes.length === 1 ? expressThemes[colorSchemes[0]] : expressThemes.light;
let expressColorScheme = colorSchemes.length === 1 ? colorSchemes[0].replace(/est$/, '') : 'light';
let expressScale = scalesToRender.length === 1 ? scalesToRender[0] : 'medium';
let expressLocale = selectedLocales.length === 1 ? selectedLocales[0] : 'en-US';

// do not add a top level provider, each provider variant needs to be independent so that we don't have RTL/LTR styles that interfere with each other
return (
<DisableAnimations disableAnimations={options.disableAnimations}>
<div style={{display: 'flex', flexDirection: 'column', height, minHeight}}>
{(options.colorSchemes || Object.keys(themes)).map(colorScheme =>
(options.scales || Object.keys(scales)).map(scale =>
{colorSchemes.map(colorScheme =>
scalesToRender.map(scale =>
(colorScheme === 'light' ? selectedLocales : ['en-US']).map(locale =>
<Provider key={`${colorScheme}_${scale}_${locale}`} theme={themes[colorScheme]} colorScheme={colorScheme.replace(/est$/, '')} scale={scale} locale={locale} typekitId="pbi5ojv">
<View margin="size-100">
Expand All @@ -38,6 +46,14 @@ export const withChromaticProvider = makeDecorator({
)
)
)}
{options.express !== false &&
<Provider key="express" theme={expressTheme} colorScheme={expressColorScheme} scale={expressScale} locale={expressLocale} typekitId="pbi5ojv">
<View margin="size-100">
<h1 style={{margin: 0, padding: 0}}>express, {expressColorScheme}, {expressScale}, {expressLocale}</h1>
{getStory(context)}
</View>
</Provider>
}
</div>
</DisableAnimations>
)
Expand Down
33 changes: 6 additions & 27 deletions .chromatic/main.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@

const webpackconfig = require('./webpack-chromatic.config.js');

module.exports = {
stories: ['../packages/**/chromatic/**/*.chromatic.@(js|jsx|ts|tsx)'],
addons: [
core: {
builder: "storybook-builder-parcel",
},
stories: ['../packages/**/chromatic/**/*.chromatic.{js,jsx,ts,tsx}'],
addons: process.env.NODE_ENV === 'production' ? [] : [
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-a11y',
'@storybook/addon-knobs'
'@storybook/addon-a11y'
],
typescript: {
check: false,
reactDocgen: false
},
webpackFinal: async (config) => {
let custom = webpackconfig();

let resultConfig = {
...config,
plugins: config.plugins.concat(custom.plugins),
parallelism: 1,
module: {
...config.module,
rules: custom.module.rules
}
};

if (resultConfig.mode === 'production') {
// see https://github.com/storybooks/storybook/issues/1570
resultConfig.plugins = resultConfig.plugins.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
}

return resultConfig;
}
};
Loading