Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support focus rect in shadow dom #2

Open
wants to merge 199 commits into
base: shadow-dom
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
b81f48e
update mergeStyles to support contructible stylesheets
spmonahan May 18, 2023
42e74d8
constructible sheets
spmonahan May 19, 2023
63f0233
working example, still rough edges
spmonahan May 30, 2023
811035a
refactor mergestyles shadow dom/constructable style sheets implementa…
spmonahan Aug 8, 2023
fdb0227
support styling in both ligth and shadow dom
spmonahan Aug 10, 2023
d2dc96a
add exports to @fluentui/react
spmonahan Aug 10, 2023
fbb87f6
fix tests
spmonahan Aug 10, 2023
4fde944
fix build
spmonahan Aug 10, 2023
bcc181c
update api snapshot
spmonahan Aug 10, 2023
254c523
refactor shadow dom configuration passing
spmonahan Aug 10, 2023
ed70d2a
add shadow dom exports
spmonahan Aug 11, 2023
dc0af67
plumb shadow dom config through
spmonahan Aug 11, 2023
6bcf9fb
update api snapshot
spmonahan Aug 11, 2023
b641f71
publish more stuff from CI
spmonahan Aug 11, 2023
4e7b379
support focus rect in shadow dom
brwai Aug 14, 2023
e92d770
Address comments and add change file
brwai Aug 14, 2023
870fe42
mergeStyles: initial shadow DOM and constructable stylesheets impleme…
spmonahan Aug 30, 2023
ac13794
feat(react-shared-contexts): add AnnounceContext (#28654)
emmayjiang Jul 31, 2023
073766e
Accordion: export AccordionHeaderProvider (#28542)
george-cz Aug 1, 2023
e296bcf
fix(react-tags-preview): fix InteractionTag hover styles (#28686)
YuanboXue-Amber Aug 1, 2023
2711104
fix(react-positioning): autoSize causing position update to reach max…
YuanboXue-Amber Aug 1, 2023
0832e9a
applying package updates
Aug 1, 2023
2658329
feat(FluentProvider): emit errors on duplicate IDs (#28670)
layershifter Aug 1, 2023
e1329b8
Fixing re-render issue for all charts when empty (#28321)
srmukher Aug 1, 2023
533a048
release (#28696)
YuanboXue-Amber Aug 1, 2023
0efb894
fix(react-menu): revert menuitem focus ring back to border (#28698)
YuanboXue-Amber Aug 1, 2023
41eedaf
Added component tests for Stacked bar chart (#28150)
srmukher Aug 1, 2023
a7b33a1
applying package updates
Aug 1, 2023
94a7dba
applying package updates
Aug 2, 2023
1ef555e
feat(feature-requests): Priority dropdown to feature request template…
tudorpopams Aug 2, 2023
c32557a
feat: Improved focus management for toast stack (#28660)
ling1726 Aug 2, 2023
a9a2805
Added icon to the BreadcrumbItem (#28682)
ValentinaKozlova Aug 2, 2023
6ee092a
bugfix: renames content slot to main (#28695)
bsunderhus Aug 2, 2023
9c0ddd9
chore: adds bundle size metrics (#28692)
bsunderhus Aug 2, 2023
835e844
feat: converts actions to be a toolbar (#28719)
bsunderhus Aug 3, 2023
c264193
bugfix: disable menu opening if contextmenu event is prevented (#28718)
bsunderhus Aug 3, 2023
13061f4
fix(EventListener): do not use `defaultProps` (#28725)
layershifter Aug 3, 2023
11724a4
Made BreadcrumbButton consistent with Item and Link (#28672)
ValentinaKozlova Aug 3, 2023
158ff27
feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlp…
miroslavstastny Aug 3, 2023
2e39d4c
feat(tokens): Add status color tokens (#28006)
miroslavstastny Aug 3, 2023
874fb5d
bugfix: ensures controlled state works properly + (#28665)
bsunderhus Aug 3, 2023
d462ba5
fix(TimePicker): Selection now works in locales that don't use "am"/"…
behowell Aug 3, 2023
5296fbb
feature(react-utilities): implements new slot methods (`slot` and `as…
bsunderhus Aug 4, 2023
53158b1
applying package updates
Aug 4, 2023
45db98c
applying package updates
Aug 4, 2023
65cfeb6
feat: implements nested tree selection (#28668)
bsunderhus Aug 4, 2023
f593c1e
Docs(react-tree): Improve docs and stories (#28741)
petdud Aug 7, 2023
0a224c7
chore: re-export slot and assertSlots methods (#28755)
bsunderhus Aug 7, 2023
526ce7b
chore(teams-prg): migrate to new slot API (#28751)
bsunderhus Aug 7, 2023
d3fa1d7
chore(cxe-prg): migrate to new slot API (#28752)
bsunderhus Aug 7, 2023
88d64f1
bugfix: headless tree should respect itemType (#28759)
bsunderhus Aug 7, 2023
7f52d13
Docs(react-tree): Update stories and remove third-party API calls (#…
petdud Aug 7, 2023
2b75b40
chore: create react-tree-preview package (#28760)
bsunderhus Aug 7, 2023
a217460
chore(cxe-coastal): migrate to new slot API (#28754)
bsunderhus Aug 7, 2023
5a362c8
chore(cxe-red): migrate to new slot API (#28753)
bsunderhus Aug 7, 2023
43eb164
Fixed bug with inaccurate calc (#28728)
ValentinaKozlova Aug 7, 2023
59ca966
fix(Button): Fix falsy children causing off-center button icons (#28495)
anenger Aug 7, 2023
aca888e
[3 of N] Changes for lazy load for hover card and legends (#27857)
ankityadav4 Aug 8, 2023
11a3445
chore(react-tree): creates VR tests (#28734)
bsunderhus Aug 8, 2023
9484e15
fix: use esModuleInterop in generators (#28738)
layershifter Aug 8, 2023
6f21c90
bugfix: Breaking Change, onHeaderClick erroneously removed (#28764)
bsunderhus Aug 8, 2023
b2f7f2e
fix(Toolbar): remove `items` from `defaultProps` (#28723)
layershifter Aug 8, 2023
2fe1650
feat: Export useEventCallback and mergeCallbacks (#28428)
ling1726 Aug 8, 2023
88d43a3
fix: made disabled BreadcrumbLink not focusable (#28720)
ValentinaKozlova Aug 8, 2023
d1fcd87
chore: Update Griffel to latest version (#28684)
layershifter Aug 8, 2023
a3c2b7e
updated styles to icon fill on hover (#28616)
kkakroo Aug 8, 2023
2dee1d5
feat(tokens): add durationGentle token (#28770)
miroslavstastny Aug 8, 2023
0848f45
applying package updates
Aug 9, 2023
66c04df
chore(react-migration-v0-v9): migrate to new slot API (#28775)
bsunderhus Aug 9, 2023
bce21d6
applying package updates
Aug 9, 2023
abedbd0
Fix: flickering of items with large dividers in Overflow component (#…
ValentinaKozlova Aug 9, 2023
9e63b12
Adding React Charting Library VR Tests (#28634)
yush-singla Aug 9, 2023
b1c3466
chore(react-virtualizer): migrate to new slot API (#28774)
bsunderhus Aug 9, 2023
5de49a9
Add mountnode datepicker compat (#28747)
GeoffCoxMSFT Aug 9, 2023
1ec1e85
chore(react-tabs): migrate to new slot API (#28773)
bsunderhus Aug 10, 2023
4be8c7d
[Chore]: publish `@fluentui/react-tree-preview` on public docsite + b…
bsunderhus Aug 10, 2023
1e8420d
Default pointer-events to 'none' for focus rectangles (#28439)
ThomasMichon Aug 10, 2023
0acd39f
Axis titles for Cartesian Charts (#28580)
srmukher Aug 11, 2023
5d18bb1
applying package updates
Aug 11, 2023
b873bc7
chore: tests for slot.resolveShorthand behavior (#28819)
bsunderhus Aug 11, 2023
7b77196
Removing react testing library from peer dependency (#28808)
srmukher Aug 11, 2023
5f122e7
applying package updates
Aug 11, 2023
b616a94
docs: fix typo in theme migration (v9 -> v8) (#27243)
robertpenner Aug 11, 2023
2140fb2
Defer tabs rectangle computation only for defined previousSelectedVal…
nasirvi Aug 11, 2023
5d9cc06
applying package updates
Aug 14, 2023
a80a2b2
Adding component tests for Multi Stacked Bar Chart (#28165)
srmukher Aug 14, 2023
177b9d1
feat(react-components): re-export `resolvePositioningShorthand` (#28843)
YuanboXue-Amber Aug 14, 2023
6c5c9ec
chore(public-docsite-v9): updates slot documentation (#28822)
bsunderhus Aug 14, 2023
130fdfb
applying package updates
Aug 14, 2023
2986861
applying package updates
Aug 15, 2023
09266bc
BREAKING(react-tags-preview): use JSX children instead of slots for I…
YuanboXue-Amber Aug 15, 2023
440db78
chore: update esbuild to v0.14.51 (#28809)
bsunderhus Aug 15, 2023
17a880c
chore: changes tsconfig target to ES2019 (#28848)
bsunderhus Aug 15, 2023
1b11b54
feat: supports new automatic JSX runtime (#28810)
bsunderhus Aug 15, 2023
33ff196
Removed iconPosition from the Breadcrumb (#28846)
ValentinaKozlova Aug 15, 2023
1f739ea
Scaffold Nav preview package (#28853)
mltejera Aug 15, 2023
86865c4
Added more CY and VR tests to the Breadcrumb (#28790)
ValentinaKozlova Aug 15, 2023
f22c14e
docs: Remove InfoButton stories in favor of having only InfoLabel sto…
sopranopillow Aug 15, 2023
ea3f216
feat: Add VivaEngageIcon to @fluentui/react-icons-mdl2 package (#28804)
tomi-msft Aug 15, 2023
6836c0d
feat(public-docsite): Add topbanner component and use it in the publi…
sopranopillow Aug 15, 2023
f99ec70
applying package updates
Aug 16, 2023
f89b313
fix(react-tags-preview): style update - tag hover style should only b…
YuanboXue-Amber Aug 16, 2023
94e003d
applying package updates
Aug 16, 2023
40325c8
chore(react-jsx-runtime): release stable version (#28880)
bsunderhus Aug 16, 2023
1822907
Virtualizer: Merge scrollref prop with container ref (#28829)
Mitch-At-Work Aug 16, 2023
43b1416
feat(react-tree): stable release (#28845)
bsunderhus Aug 16, 2023
23a29f6
fix(public-docsite): Remove image clipping and move top banner under …
sopranopillow Aug 16, 2023
c1a17da
applying package updates
Aug 16, 2023
0762779
chore(react-tree): removes preview warning from the docs (#28886)
bsunderhus Aug 16, 2023
cc68608
Update DatePickerDescription.md with note about compat components (#2…
jurokapsiar Aug 17, 2023
48d7c7c
doc(react-tree): adds a11y edge cases to the docs (#28897)
bsunderhus Aug 17, 2023
4157992
bugfix: headless flat tree itemType manual definition (#28898)
bsunderhus Aug 17, 2023
d34f0e4
fix(react-tree): stablilize `handleActionsRef` created by TreeItem (#…
YuanboXue-Amber Aug 17, 2023
bfc50c7
applying package updates
Aug 17, 2023
df5725e
chore(react-tags-preview): add docs (#28899)
YuanboXue-Amber Aug 17, 2023
f627248
fix(react-infobutton): Cursor should be pointer when hovering the but…
sopranopillow Aug 17, 2023
3b8ddb6
fix: make listeners for scroll passive (#28839)
layershifter Aug 17, 2023
58167a8
doc: add drag & drop example (#28821)
petdud Aug 17, 2023
8f80a08
Lint: fix fluent v9 warnings (#28889)
spmonahan Aug 17, 2023
ef6c2e5
chore: fix lint warnings for @fluentui/react (#28888)
spmonahan Aug 17, 2023
4f5ee93
fix(DatePicker): readOnlyTextField styles should win over default Tex…
sopranopillow Aug 17, 2023
da42940
fix(DatePicker, react-datepicker-compat): Make year picker react to g…
sopranopillow Aug 17, 2023
7287927
docs: Updating version of CDN used and replacing usage of via.placeho…
khmakoto Aug 17, 2023
e9a6dd7
chore(react-search-preview): migrate to new slots API (#28862)
bsunderhus Aug 18, 2023
9567a1a
applying package updates
Aug 18, 2023
2837f22
Breadcrumb design team fixes (#28883)
ValentinaKozlova Aug 18, 2023
e892975
fix(react-drawer): rename values of position prop from left/right to …
marcosmoura Aug 18, 2023
5a88326
fix(react-menu): grow MenuItem when it has long content (#28675)
YuanboXue-Amber Aug 21, 2023
734a2a9
fix(react-tags-preview): use `:active` for pressed style instead of `…
YuanboXue-Amber Aug 21, 2023
1ae9924
applying package updates
Aug 21, 2023
2b9a3d1
chore: pin @swc/helper in codesandbox as it does not support dependen…
YuanboXue-Amber Aug 21, 2023
997f882
chore(react-tags-preview): update Tag stories with better a11y (#28909)
YuanboXue-Amber Aug 21, 2023
2830184
docs: update input migration with more multiline information (#28923)
spmonahan Aug 21, 2023
6d525f6
chore(react-nav-preview): migrates to use new slot API (#28917)
bsunderhus Aug 22, 2023
7ca332a
chore: bumps version of esbuild-loader to v3.2.0 (#28878)
bsunderhus Aug 22, 2023
5138a87
chore: updates generator to use new slot API (#28916)
bsunderhus Aug 22, 2023
69a7b37
feat(react-motion): create react-motion-preview package scaffolding (…
marcosmoura Aug 22, 2023
5dc0c9c
Additional VR tests Charting Library (#28777)
yush-singla Aug 22, 2023
a9753e3
Accordion : updated styles for accordion header cursor (#28850)
kkakroo Aug 22, 2023
3356308
fix: Autofill queries the inputElement ownerDocument instead of docum…
smhigley Aug 22, 2023
ce715ff
applying package updates
Aug 23, 2023
d19bbaa
chore: rename imports from react-tree to react-components (#28946)
bsunderhus Aug 23, 2023
873b4c6
bugfix: ensure interop between assertSlots and old API (#28957)
bsunderhus Aug 23, 2023
a0e646d
applying package updates
Aug 23, 2023
971fe67
docs(react-accordion): Added subcomponents to index story (#28956)
kkakroo Aug 23, 2023
8ce0cbe
fix(react-utilities): `useOnClickOutside` should consider text select…
YuanboXue-Amber Aug 23, 2023
56604ff
feat(react-utilities): create useAnimationFrame hook (#28948)
marcosmoura Aug 23, 2023
1f72df5
chore: decrease bundle size & adds fixtures (#28962)
bsunderhus Aug 23, 2023
1e3c2ec
feat(react-table, react-components): export DataGridContextProvider (…
sopranopillow Aug 23, 2023
9bd5936
fix(react-popover): Only apply modal attributes if the PopoverSurface…
sopranopillow Aug 23, 2023
4396653
chore: update CODEOWNERS to some components to tag the current owner …
marcosmoura Aug 23, 2023
7c28e69
8.0 Azure Theme: Details list row focus contrast a11y bug fix (#28966)
Jacqueline-ms Aug 23, 2023
a04e04b
RFC: Component CSS Transitions/Animations on mount/unmount (#27328)
marcosmoura Aug 23, 2023
0e36421
feat: Add documentKeyboardEvent to OnVisibleChangeData when Tooltip i…
behowell Aug 23, 2023
e114b30
applying package updates
Aug 24, 2023
c79bc90
docs(react-card): improve storybook and examples to better align with…
marcosmoura Aug 24, 2023
ca52422
patch(react-table): expose DataGrid related contexts (#28973)
FengQiMS Aug 24, 2023
f840ef8
applying package updates
Aug 24, 2023
f300052
Pie chart focus spacing (#28504)
yush-singla Aug 24, 2023
c1daea5
Focus indicator bug in bar charts (#28414)
yush-singla Aug 24, 2023
b3be1f7
Table/DataGrid: fix visuals for overflow (#28940)
george-cz Aug 24, 2023
c71fca2
docs: update drawer spec to be inline with changes to component (#28934)
marcosmoura Aug 24, 2023
fe47ff8
Vertical stacked bar chart - Component tests (#28594)
v-baambati Aug 24, 2023
573b90d
Revert "Keytips: Align keytipData with visible instance for dupes" (#…
makopch-ms Aug 24, 2023
a424937
fix(Dialog): Add displayName for dialog footer and content (#28939)
ymyqwe Aug 24, 2023
f45ab9c
feat(react-infobutton): Add inline prop to InfoButton and make it inl…
sopranopillow Aug 24, 2023
6b5a94b
feat(Stack): Add deprecated flag to render null when receiving a fals…
sopranopillow Aug 24, 2023
ae9f562
applying package updates
Aug 25, 2023
50c4f1b
fix(react-tags-preview): tag with secondary text has no top border un…
YuanboXue-Amber Aug 25, 2023
affdec3
fix(react-card): CardHeader grid layout ignoring line-height of conte…
marcosmoura Aug 25, 2023
0a574b4
chore: Migrate bot config to yml (#28981)
sopranopillow Aug 25, 2023
cad9c92
In PeoplePicker, we can now use arrow keys to move cursor around #286…
azizChebbi Aug 25, 2023
8c3218f
28576 small button is using 3px border radius (#28589)
AbdulRehmanMehar Aug 25, 2023
99e0a84
applying package updates
Aug 28, 2023
ac25f00
Line Chart and Area Chart - Component tests (#28235)
v-baambati Aug 28, 2023
6f38bd0
chore: updates .devcontainer to follow new format (#28990)
bsunderhus Aug 28, 2023
06077de
feat: add closeOnIframeFocus prop to Popover (#28881)
layershifter Aug 28, 2023
421a194
feat(react-motion): add useMotion hook (#28699)
marcosmoura Aug 28, 2023
17252bb
fix(react-tags-preview): use regular icon for dismiss (#28958)
YuanboXue-Amber Aug 28, 2023
67dd172
chore: Make triage bot add needs triage label to new issues (#28994)
sopranopillow Aug 28, 2023
1a78c2f
fix (#29002)
YuanboXue-Amber Aug 28, 2023
ca36596
feat(react-icons-mdl2-branded): Add VivaEngageIcon (#28979)
tomi-msft Aug 28, 2023
94b3d7a
Add IconDirectionProvider to FluentProvider (#28803)
tomi-msft Aug 28, 2023
a3272dc
applying package updates
Aug 29, 2023
9818329
feat: adds mountNode to DialogSurface and Toaster (#29003)
bsunderhus Aug 29, 2023
73e46fe
fix(react-utilities): click scrollbar should invoke callback in `useO…
YuanboXue-Amber Aug 29, 2023
28c620f
feat: release react-motion as preview (#29005)
marcosmoura Aug 29, 2023
e96b29a
applying package updates
Aug 29, 2023
7b85547
feat: Update Spinner appearance token (#29008)
tomi-msft Aug 29, 2023
44205fd
Horizontal bar chart - Component tests (#29013)
v-baambati Aug 30, 2023
d872a1a
fix(react-tags-preview): add memorizeCurrent on TagGroup (#29023)
YuanboXue-Amber Aug 30, 2023
b7b152b
bugfix: fixes DialogActions position on breakpoint (#29021)
bsunderhus Aug 30, 2023
4f3291e
feat(docsite): add Application Insights telemetry (#28709)
tudorpopams Aug 30, 2023
d0a7824
chore: updates devcontainer to use v16-bookworm image (#28997)
bsunderhus Aug 30, 2023
456c9ea
fix(ssr-tests-v9): use correct path for ssr-tests-v9 stories (#29025)
marcosmoura Aug 30, 2023
a275099
fix(react-utilities): avoid calling requestAnimationFrame when in SSR…
marcosmoura Aug 30, 2023
b446606
feat(react-drawer): add motion to Drawer (#28999)
marcosmoura Aug 30, 2023
d220118
mergeStyles: initial shadow DOM and constructable stylesheets impleme…
spmonahan Aug 30, 2023
50a92fa
Merge branch 'shadow-dom' into brwai/support-focus-rect
brwai Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"buildCommand": "build:codesandbox",
"packages": ["packages/react", "packages/react-components/react-components"],
"packages": [
"packages/react",
"packages/react-components/react-components",
"packages/merge-styles",
"packages/utilities"
],
"sandboxes": ["x5u3t", "spnyu"],
"node": "16"
}
2 changes: 1 addition & 1 deletion packages/jest-serializer-merge-styles/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "es5",
"outDir": "lib",
"module": "commonjs",
"lib": ["es2017"],
"lib": ["es2017", "dom"],
"jsx": "react",
"declaration": true,
"sourceMap": true,
Expand Down
59 changes: 47 additions & 12 deletions packages/merge-styles/etc/merge-styles.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,43 @@ export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial<U>[] : T[P] extends object ? DeepPartial<T[P]> : T[P];
};

// @public (undocumented)
export class EventMap<K, V> {
constructor();
// (undocumented)
forEach(callback: (value: V, key: K, map: Map<K, V>) => void): void;
// (undocumented)
get(key: K): V | undefined;
// (undocumented)
has(key: K): boolean;
// (undocumented)
off(type: string, callback: EventHandler): void;
// Warning: (ae-forgotten-export) The symbol "EventHandler" needs to be exported by the entry point index.d.ts
//
// (undocumented)
on(type: string, callback: EventHandler): void;
// (undocumented)
raise(type: string, data: {
key: K;
sheet: V;
}): void;
// (undocumented)
set(key: K, value: V): void;
}

// @public
export function fontFace(font: IFontFace): void;

// Warning: (ae-forgotten-export) The symbol "IStylesheetKey" needs to be exported by the entry point index.d.ts
//
// @public
export type IConcatenatedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
[P in keyof Omit_2<TStyleSet, 'subComponentStyles'>]: IStyle;
} & {
subComponentStyles?: {
[P in keyof TStyleSet['subComponentStyles']]: IStyleFunction<any, any>;
};
};
} & IStylesheetKey;

// @public
export interface ICSPSettings {
Expand Down Expand Up @@ -75,6 +101,9 @@ export const InjectionMode: {
none: 0;
insertNode: 1;
appendChild: 2;
unstable_constructibleStylesheet: 3;
insertNodeAndConstructableStylesheet: 4;
appedChildAndConstructableStylesheet: 5;
};

// @public (undocumented)
Expand All @@ -87,7 +116,7 @@ export type IProcessedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
subComponentStyles: {
[P in keyof TStyleSet['subComponentStyles']]: __MapToFunctionType<TStyleSet['subComponentStyles'] extends infer J ? (P extends keyof J ? J[P] : never) : never>;
};
};
} & IStylesheetKey;

// @public
export interface IRawFontStyle {
Expand Down Expand Up @@ -425,7 +454,7 @@ export interface IStyleBaseArray extends Array<IStyle> {
}

// @public
export type IStyleFunction<TStylesProps, TStyleSet extends IStyleSet<TStyleSet>> = (props: TStylesProps) => DeepPartial<TStyleSet>;
export type IStyleFunction<TStylesProps, TStyleSet extends IStyleSet<TStyleSet>> = (props: TStylesProps, __stylesheetKey__?: string) => DeepPartial<TStyleSet>;

// @public
export type IStyleFunctionOrObject<TStylesProps, TStyleSet extends IStyleSet<TStyleSet>> = IStyleFunction<TStylesProps, TStyleSet> | DeepPartial<TStyleSet>;
Expand All @@ -439,7 +468,7 @@ export type IStyleSet<TStyleSet extends IStyleSet<TStyleSet> = {
subComponentStyles?: {
[P in keyof TStyleSet['subComponentStyles']]: IStyleFunctionOrObject<any, any>;
};
};
} & IStylesheetKey;

// @public
export interface IStyleSheetConfig {
Expand All @@ -459,33 +488,34 @@ export interface IStyleSheetConfig {
export function keyframes(timeline: IKeyframes): string;

// Warning: (ae-forgotten-export) The symbol "IStyleOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ShadowConfig" needs to be exported by the entry point index.d.ts
//
// @public
export function mergeCss(args: (IStyle | IStyleBaseArray | false | null | undefined) | (IStyle | IStyleBaseArray | false | null | undefined)[], options?: IStyleOptions): string;
export function mergeCss(args: (IStyle | IStyleBaseArray | false | null | undefined) | (IStyle | IStyleBaseArray | false | null | undefined)[], options?: IStyleOptions, shadowConfig?: ShadowConfig): string;

// @public
export function mergeCssSets<TStyleSet>(styleSets: [TStyleSet | false | null | undefined], options?: IStyleOptions): IProcessedStyleSet<TStyleSet>;
export function mergeCssSets<TStyleSet>(styleSets: [TStyleSet | false | null | undefined], options?: IStyleOptions, shadowConfig?: ShadowConfig): IProcessedStyleSet<TStyleSet>;

// @public
export function mergeCssSets<TStyleSet1, TStyleSet2>(styleSets: [TStyleSet1 | false | null | undefined, TStyleSet2 | false | null | undefined], options?: IStyleOptions): IProcessedStyleSet<TStyleSet1 & TStyleSet2>;
export function mergeCssSets<TStyleSet1, TStyleSet2>(styleSets: [TStyleSet1 | false | null | undefined, TStyleSet2 | false | null | undefined], options?: IStyleOptions, shadowConfig?: ShadowConfig): IProcessedStyleSet<TStyleSet1 & TStyleSet2>;

// @public
export function mergeCssSets<TStyleSet1, TStyleSet2, TStyleSet3>(styleSets: [
TStyleSet1 | false | null | undefined,
TStyleSet2 | false | null | undefined,
TStyleSet3 | false | null | undefined
], options?: IStyleOptions): IProcessedStyleSet<TStyleSet1 & TStyleSet2 & TStyleSet3>;
], options?: IStyleOptions, shadowConfig?: ShadowConfig): IProcessedStyleSet<TStyleSet1 & TStyleSet2 & TStyleSet3>;

// @public
export function mergeCssSets<TStyleSet1, TStyleSet2, TStyleSet3, TStyleSet4>(styleSets: [
TStyleSet1 | false | null | undefined,
TStyleSet2 | false | null | undefined,
TStyleSet3 | false | null | undefined,
TStyleSet4 | false | null | undefined
], options?: IStyleOptions): IProcessedStyleSet<ObjectOnly<TStyleSet1> & ObjectOnly<TStyleSet2> & ObjectOnly<TStyleSet3> & ObjectOnly<TStyleSet4>>;
], options?: IStyleOptions, shadowConfig?: ShadowConfig): IProcessedStyleSet<ObjectOnly<TStyleSet1> & ObjectOnly<TStyleSet2> & ObjectOnly<TStyleSet3> & ObjectOnly<TStyleSet4>>;

// @public
export function mergeCssSets<TStyleSet>(styleSet: [TStyleSet | false | null | undefined], options?: IStyleOptions): IProcessedStyleSet<TStyleSet>;
export function mergeCssSets<TStyleSet>(styleSet: [TStyleSet | false | null | undefined], options?: IStyleOptions, shadowConfig?: ShadowConfig): IProcessedStyleSet<TStyleSet>;

// @public
export function mergeStyles(...args: (IStyle | IStyleBaseArray | false | null | undefined)[]): string;
Expand All @@ -505,6 +535,9 @@ export function mergeStyleSets<TStyleSet1, TStyleSet2, TStyleSet3, TStyleSet4>(s
// @public
export function mergeStyleSets(...styleSets: Array<IStyleSet | undefined | false | null>): IProcessedStyleSet<any>;

// @public (undocumented)
export function mergeStyleSets(shadowConfig: ShadowConfig, ...styleSets: Array<IStyleSet | undefined | false | null>): IProcessedStyleSet<any>;

// @public (undocumented)
export type ObjectOnly<TArg> = TArg extends {} ? TArg : {};

Expand All @@ -519,15 +552,17 @@ export function setRTL(isRTL: boolean): void;

// @public
export class Stylesheet {
constructor(config?: IStyleSheetConfig, serializedStylesheet?: ISerializedStylesheet);
constructor(config?: IStyleSheetConfig, serializedStylesheet?: ISerializedStylesheet, stylesheetKey?: string);
argsFromClassName(className: string): IStyle[] | undefined;
cacheClassName(className: string, key: string, args: IStyle[], rules: string[]): void;
classNameFromKey(key: string): string | undefined;
// (undocumented)
getAdoptableStyleSheet(): CSSStyleSheet | undefined;
getClassName(displayName?: string): string;
getClassNameCache(): {
[key: string]: string;
};
static getInstance(): Stylesheet;
static getInstance({ stylesheetKey, inShadow }?: ShadowConfig): Stylesheet;
getRules(includePreservedRules?: boolean): string;
insertedRulesFromClassName(className: string): string[] | undefined;
insertRule(rule: string, preserve?: boolean): void;
Expand Down
1 change: 1 addition & 0 deletions packages/merge-styles/src/IStyleFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DeepPartial } from './DeepPartial';
*/
export type IStyleFunction<TStylesProps, TStyleSet extends IStyleSet<TStyleSet>> = (
props: TStylesProps,
__stylesheetKey__?: string,
) => DeepPartial<TStyleSet>;

/**
Expand Down
1 change: 1 addition & 0 deletions packages/merge-styles/src/IStyleOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export interface IStyleOptions {
rtl?: boolean;
specificityMultiplier?: number;
stylesheetKey?: string;
}
11 changes: 9 additions & 2 deletions packages/merge-styles/src/IStyleSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type IStyleSet<TStyleSet extends IStyleSet<TStyleSet> = { [key: string]:
[P in keyof Omit<TStyleSet, 'subComponentStyles'>]: IStyle;
} & {
subComponentStyles?: { [P in keyof TStyleSet['subComponentStyles']]: IStyleFunctionOrObject<any, any> };
};
} & IStylesheetKey;

/**
* A concatenated style set differs from `IStyleSet` in that subComponentStyles will always be a style function.
Expand All @@ -43,7 +43,7 @@ export type IConcatenatedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
[P in keyof Omit<TStyleSet, 'subComponentStyles'>]: IStyle;
} & {
subComponentStyles?: { [P in keyof TStyleSet['subComponentStyles']]: IStyleFunction<any, any> };
};
} & IStylesheetKey;

/**
* A processed style set is one which the set of styles associated with each area has been converted
Expand All @@ -58,4 +58,11 @@ export type IProcessedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
TStyleSet['subComponentStyles'] extends infer J ? (P extends keyof J ? J[P] : never) : never
>;
};
} & IStylesheetKey;

/**
* NOTE: This API is unstable and subject to breaking change or removal at any time.
*/
export type IStylesheetKey = {
__stylesheetKey__?: string;
};
Loading