@fluentui/react-shared-contexts 9.13.2 → 9.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/dist/index.d.ts +27 -10
- package/lib/AnnounceContext/AnnounceContext.js +3 -3
- package/lib/AnnounceContext/AnnounceContext.js.map +1 -1
- package/lib/CustomStyleHooksContext/CustomStyleHooksContext.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/AnnounceContext/AnnounceContext.js.map +1 -1
- package/lib-commonjs/index.js +8 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
# Change Log - @fluentui/react-shared-contexts
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 18 Jan 2024 14:19:08 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.14.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.14.0)
|
8
|
+
|
9
|
+
Thu, 18 Jan 2024 14:19:08 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.13.2..@fluentui/react-shared-contexts_v9.14.0)
|
11
|
+
|
12
|
+
### Minor changes
|
13
|
+
|
14
|
+
- feat: export AnnounceProvider & useAnnounce() ([PR #30328](https://github.com/microsoft/fluentui/pull/30328) by olfedias@microsoft.com)
|
15
|
+
|
7
16
|
## [9.13.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.13.2)
|
8
17
|
|
9
|
-
Mon, 18 Dec 2023 14:
|
18
|
+
Mon, 18 Dec 2023 14:40:46 GMT
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.13.1..@fluentui/react-shared-contexts_v9.13.2)
|
11
20
|
|
12
21
|
### Patches
|
package/dist/index.d.ts
CHANGED
@@ -1,24 +1,33 @@
|
|
1
1
|
import * as React_2 from 'react';
|
2
2
|
import type { Theme } from '@fluentui/react-theme';
|
3
3
|
|
4
|
-
|
5
|
-
* @internal
|
6
|
-
*/
|
7
|
-
export declare type AnnounceContextValue_unstable = {
|
4
|
+
declare type AnnounceContextValue = {
|
8
5
|
announce: (message: string, options?: AnnounceOptions) => void;
|
9
6
|
};
|
7
|
+
export { AnnounceContextValue }
|
8
|
+
export { AnnounceContextValue as AnnounceContextValue_unstable }
|
10
9
|
|
11
|
-
|
10
|
+
/**
|
11
|
+
* Defines options for a message to be announced.
|
12
|
+
*/
|
13
|
+
export declare type AnnounceOptions = {
|
12
14
|
alert?: boolean;
|
15
|
+
/**
|
16
|
+
* A unique identifier for the message. If a message with the same id is already announced, it will be replaced.
|
17
|
+
*/
|
13
18
|
batchId?: string;
|
19
|
+
/**
|
20
|
+
* Indicates that the message announcement can be interrupted by another message and will be announced only
|
21
|
+
* user is idle.
|
22
|
+
*/
|
14
23
|
polite?: boolean;
|
24
|
+
/** Defines the priority of the message. Higher priority messages will be announced first. */
|
15
25
|
priority?: number;
|
16
26
|
};
|
17
27
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
export declare const AnnounceProvider_unstable: React_2.Provider<AnnounceContextValue_unstable | undefined>;
|
28
|
+
declare const AnnounceProvider: React_2.Provider<AnnounceContextValue | undefined>;
|
29
|
+
export { AnnounceProvider }
|
30
|
+
export { AnnounceProvider as AnnounceProvider_unstable }
|
22
31
|
|
23
32
|
/**
|
24
33
|
* @internal
|
@@ -149,6 +158,7 @@ export declare const CustomStyleHooksContext_unstable: React_2.Context<Partial<{
|
|
149
158
|
useMessageBarActionsStyles_unstable: CustomStyleHook;
|
150
159
|
useMessageBarGroupStyles_unstable: CustomStyleHook;
|
151
160
|
useToasterStyles_unstable: CustomStyleHook;
|
161
|
+
/** @deprecated TeachingPopover wrapper has no styles (non-UI hooks only). */
|
152
162
|
useTeachingPopoverStyles_unstable: CustomStyleHook;
|
153
163
|
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
|
154
164
|
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
|
@@ -275,6 +285,7 @@ export declare type CustomStyleHooksContextValue_unstable = Partial<{
|
|
275
285
|
useMessageBarActionsStyles_unstable: CustomStyleHook;
|
276
286
|
useMessageBarGroupStyles_unstable: CustomStyleHook;
|
277
287
|
useToasterStyles_unstable: CustomStyleHook;
|
288
|
+
/** @deprecated TeachingPopover wrapper has no styles (non-UI hooks only). */
|
278
289
|
useTeachingPopoverStyles_unstable: CustomStyleHook;
|
279
290
|
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
|
280
291
|
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
|
@@ -404,6 +415,7 @@ export declare const CustomStyleHooksProvider_unstable: React_2.Provider<Partial
|
|
404
415
|
useMessageBarActionsStyles_unstable: CustomStyleHook;
|
405
416
|
useMessageBarGroupStyles_unstable: CustomStyleHook;
|
406
417
|
useToasterStyles_unstable: CustomStyleHook;
|
418
|
+
/** @deprecated TeachingPopover wrapper has no styles (non-UI hooks only). */
|
407
419
|
useTeachingPopoverStyles_unstable: CustomStyleHook;
|
408
420
|
useTeachingPopoverActionsStyles_unstable: CustomStyleHook;
|
409
421
|
useTeachingPopoverBodyStyles_unstable: CustomStyleHook;
|
@@ -481,7 +493,12 @@ export declare type TooltipVisibilityContextValue_unstable = {
|
|
481
493
|
*/
|
482
494
|
export declare const TooltipVisibilityProvider_unstable: React_2.Provider<TooltipVisibilityContextValue_unstable>;
|
483
495
|
|
484
|
-
|
496
|
+
/**
|
497
|
+
* Returns a function that can be used to announce messages to screen readers.
|
498
|
+
*/
|
499
|
+
declare function useAnnounce(): AnnounceContextValue;
|
500
|
+
export { useAnnounce }
|
501
|
+
export { useAnnounce as useAnnounce_unstable }
|
485
502
|
|
486
503
|
export declare function useBackgroundAppearance(): BackgroundAppearanceContextValue;
|
487
504
|
|
@@ -2,10 +2,10 @@ import * as React from 'react';
|
|
2
2
|
/**
|
3
3
|
* @internal
|
4
4
|
*/ const AnnounceContext = React.createContext(undefined);
|
5
|
+
export const AnnounceProvider = AnnounceContext.Provider;
|
5
6
|
/**
|
6
|
-
*
|
7
|
-
*/ export
|
8
|
-
export function useAnnounce() {
|
7
|
+
* Returns a function that can be used to announce messages to screen readers.
|
8
|
+
*/ export function useAnnounce() {
|
9
9
|
var _React_useContext;
|
10
10
|
return (_React_useContext = React.useContext(AnnounceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : {
|
11
11
|
announce: ()=>undefined
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["AnnounceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type AnnounceOptions = {\n alert?: boolean;\n batchId?: string;\n polite?: boolean;\n priority?: number;\n};\n\
|
1
|
+
{"version":3,"sources":["AnnounceContext.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Defines options for a message to be announced.\n */\nexport type AnnounceOptions = {\n alert?: boolean;\n\n /**\n * A unique identifier for the message. If a message with the same id is already announced, it will be replaced.\n */\n batchId?: string;\n\n /**\n * Indicates that the message announcement can be interrupted by another message and will be announced only\n * user is idle.\n */\n polite?: boolean;\n\n /** Defines the priority of the message. Higher priority messages will be announced first. */\n priority?: number;\n};\n\nexport type AnnounceContextValue = {\n announce: (message: string, options?: AnnounceOptions) => void;\n};\n\n/**\n * @internal\n */\nconst AnnounceContext = React.createContext<AnnounceContextValue | undefined>(undefined);\n\nexport const AnnounceProvider = AnnounceContext.Provider;\n\n/**\n * Returns a function that can be used to announce messages to screen readers.\n */\nexport function useAnnounce(): AnnounceContextValue {\n return React.useContext(AnnounceContext) ?? { announce: () => undefined };\n}\n"],"names":["React","AnnounceContext","createContext","undefined","AnnounceProvider","Provider","useAnnounce","useContext","announce"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AA2B/B;;CAEC,GACD,MAAMC,kBAAkBD,MAAME,aAAa,CAAmCC;AAE9E,OAAO,MAAMC,mBAAmBH,gBAAgBI,QAAQ,CAAC;AAEzD;;CAEC,GACD,OAAO,SAASC;QACPN;IAAP,OAAOA,CAAAA,oBAAAA,MAAMO,UAAU,CAACN,8BAAjBD,+BAAAA,oBAAqC;QAAEQ,UAAU,IAAML;IAAU;AAC1E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CustomStyleHooksContext.ts"],"sourcesContent":["/* eslint-disable */\n\nimport * as React from 'react';\n\ntype CustomStyleHook = (state: unknown) => void;\n\n// The list of hooks is built from the exports from react-components/src/index\nexport type CustomStyleHooksContextValue = Partial<{\n useAccordionHeaderStyles_unstable: CustomStyleHook;\n useAccordionItemStyles_unstable: CustomStyleHook;\n useAccordionPanelStyles_unstable: CustomStyleHook;\n useAccordionStyles_unstable: CustomStyleHook;\n useAvatarStyles_unstable: CustomStyleHook;\n useAvatarGroupStyles_unstable: CustomStyleHook;\n useAvatarGroupItemStyles_unstable: CustomStyleHook;\n useAvatarGroupPopoverStyles_unstable: CustomStyleHook;\n useBadgeStyles_unstable: CustomStyleHook;\n useCounterBadgeStyles_unstable: CustomStyleHook;\n useCardHeaderStyles_unstable: CustomStyleHook;\n useCardStyles_unstable: CustomStyleHook;\n useCardFooterStyles_unstable: CustomStyleHook;\n useCardPreviewStyles_unstable: CustomStyleHook;\n usePresenceBadgeStyles_unstable: CustomStyleHook;\n useButtonStyles_unstable: CustomStyleHook;\n useCompoundButtonStyles_unstable: CustomStyleHook;\n useMenuButtonStyles_unstable: CustomStyleHook;\n useSplitButtonStyles_unstable: CustomStyleHook;\n useToggleButtonStyles_unstable: CustomStyleHook;\n useCheckboxStyles_unstable: CustomStyleHook;\n useComboboxStyles_unstable: CustomStyleHook;\n useDropdownStyles_unstable: CustomStyleHook;\n useListboxStyles_unstable: CustomStyleHook;\n useListStyles_unstable: CustomStyleHook;\n useListItemStyles_unstable: CustomStyleHook;\n useListItemButtonStyles_unstable: CustomStyleHook;\n useOptionStyles_unstable: CustomStyleHook;\n useOptionGroupStyles_unstable: CustomStyleHook;\n useDividerStyles_unstable: CustomStyleHook;\n useInputStyles_unstable: CustomStyleHook;\n useImageStyles_unstable: CustomStyleHook;\n useLabelStyles_unstable: CustomStyleHook;\n useLinkStyles_unstable: CustomStyleHook;\n useMenuDividerStyles_unstable: CustomStyleHook;\n useMenuGroupHeaderStyles_unstable: CustomStyleHook;\n useMenuGroupStyles_unstable: CustomStyleHook;\n useMenuItemCheckboxStyles_unstable: CustomStyleHook;\n useMenuItemRadioStyles_unstable: CustomStyleHook;\n useMenuItemStyles_unstable: CustomStyleHook;\n useMenuListStyles_unstable: CustomStyleHook;\n useMenuPopoverStyles_unstable: CustomStyleHook;\n useMenuSplitGroupStyles_unstable: CustomStyleHook;\n usePersonaStyles_unstable: CustomStyleHook;\n usePopoverSurfaceStyles_unstable: CustomStyleHook;\n useRadioGroupStyles_unstable: CustomStyleHook;\n useRadioStyles_unstable: CustomStyleHook;\n useSelectStyles_unstable: CustomStyleHook;\n useSliderStyles_unstable: CustomStyleHook;\n useSpinButtonStyles_unstable: CustomStyleHook;\n useSpinnerStyles_unstable: CustomStyleHook;\n useSwitchStyles_unstable: CustomStyleHook;\n useTabStyles_unstable: CustomStyleHook;\n useTabListStyles_unstable: CustomStyleHook;\n useTextStyles_unstable: CustomStyleHook;\n useTextareaStyles_unstable: CustomStyleHook;\n useTooltipStyles_unstable: CustomStyleHook;\n useDialogTitleStyles_unstable: CustomStyleHook;\n useDialogBodyStyles_unstable: CustomStyleHook;\n useDialogActionsStyles_unstable: CustomStyleHook;\n useDialogSurfaceStyles_unstable: CustomStyleHook;\n useDialogContentStyles_unstable: CustomStyleHook;\n useProgressBarStyles_unstable: CustomStyleHook;\n useToolbarButtonStyles_unstable: CustomStyleHook;\n useToolbarRadioButtonStyles_unstable: CustomStyleHook;\n useToolbarGroupStyles_unstable: CustomStyleHook;\n useToolbarToggleButtonStyles_unstable: CustomStyleHook;\n useToolbarDividerStyles_unstable: CustomStyleHook;\n useToolbarStyles_unstable: CustomStyleHook;\n useTableCellStyles_unstable: CustomStyleHook;\n useTableRowStyles_unstable: CustomStyleHook;\n useTableBodyStyles_unstable: CustomStyleHook;\n useTableStyles_unstable: CustomStyleHook;\n useTableHeaderStyles_unstable: CustomStyleHook;\n useTableHeaderCellStyles_unstable: CustomStyleHook;\n useTableResizeHandleStyles_unstable: CustomStyleHook;\n useTableSelectionCellStyles_unstable: CustomStyleHook;\n useTableCellActionsStyles_unstable: CustomStyleHook;\n useTableCellLayoutStyles_unstable: CustomStyleHook;\n useDataGridCellStyles_unstable: CustomStyleHook;\n useDataGridRowStyles_unstable: CustomStyleHook;\n useDataGridBodyStyles_unstable: CustomStyleHook;\n useDataGridStyles_unstable: CustomStyleHook;\n useDataGridHeaderStyles_unstable: CustomStyleHook;\n useDataGridHeaderCellStyles_unstable: CustomStyleHook;\n useDataGridSelectionCellStyles_unstable: CustomStyleHook;\n useDrawerStyles_unstable: CustomStyleHook;\n /** @deprecated Use useInlineDrawerStyles_unstable instead. */\n useDrawerInlineStyles_unstable: CustomStyleHook;\n /** @deprecated Use useOverlayDrawerStyles_unstable instead. */\n useDrawerOverlayStyles_unstable: CustomStyleHook;\n useInlineDrawerStyles_unstable: CustomStyleHook;\n useOverlayDrawerStyles_unstable: CustomStyleHook;\n useDrawerHeaderStyles_unstable: CustomStyleHook;\n useDrawerHeaderNavigationStyles_unstable: CustomStyleHook;\n useDrawerHeaderTitleStyles_unstable: CustomStyleHook;\n useDrawerBodyStyles_unstable: CustomStyleHook;\n useDrawerFooterStyles_unstable: CustomStyleHook;\n useInteractionTagStyles_unstable: CustomStyleHook;\n useInteractionTagPrimaryStyles_unstable: CustomStyleHook;\n useInteractionTagSecondaryStyles_unstable: CustomStyleHook;\n useTagStyles_unstable: CustomStyleHook;\n useTagGroupStyles_unstable: CustomStyleHook;\n useBreadcrumbStyles_unstable: CustomStyleHook;\n useBreadcrumbButtonStyles_unstable: CustomStyleHook;\n useBreadcrumbItemStyles_unstable: CustomStyleHook;\n useBreadcrumbDividerStyles_unstable: CustomStyleHook;\n useMessageBarStyles_unstable: CustomStyleHook;\n useMessageBarBodyStyles_unstable: CustomStyleHook;\n useMessageBarTitleStyles_unstable: CustomStyleHook;\n useMessageBarActionsStyles_unstable: CustomStyleHook;\n useMessageBarGroupStyles_unstable: CustomStyleHook;\n useToasterStyles_unstable: CustomStyleHook;\n useTeachingPopoverStyles_unstable: CustomStyleHook;\n useTeachingPopoverActionsStyles_unstable: CustomStyleHook;\n useTeachingPopoverBodyStyles_unstable: CustomStyleHook;\n useTeachingPopoverButtonStyles_unstable: CustomStyleHook;\n useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;\n useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;\n useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;\n useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;\n useTeachingPopoverTitleStyles_unstable: CustomStyleHook;\n useTimePickerCompatStyles_unstable: CustomStyleHook;\n}>;\n\n/**\n * @internal\n */\nexport const CustomStyleHooksContext = React.createContext<CustomStyleHooksContextValue | undefined>(undefined);\n\nconst noop = () => {};\n\n/**\n * @internal\n */\nexport const CustomStyleHooksProvider = CustomStyleHooksContext.Provider;\n\n/**\n * Gets a custom style hook\n * @param hook - One of the hook properties in CustomStyleHooksContextValue\n * @returns The corresponding hook when defined, otherwise a no-op function.\n */\nexport const useCustomStyleHook = (hook: keyof CustomStyleHooksContextValue): CustomStyleHook => {\n return React.useContext(CustomStyleHooksContext)?.[hook] ?? noop;\n};\n"],"names":["React","CustomStyleHooksContext","createContext","undefined","noop","CustomStyleHooksProvider","Provider","useCustomStyleHook","hook","useContext"],"mappings":"AAAA,kBAAkB,GAElB,YAAYA,WAAW,QAAQ;
|
1
|
+
{"version":3,"sources":["CustomStyleHooksContext.ts"],"sourcesContent":["/* eslint-disable */\n\nimport * as React from 'react';\n\ntype CustomStyleHook = (state: unknown) => void;\n\n// The list of hooks is built from the exports from react-components/src/index\nexport type CustomStyleHooksContextValue = Partial<{\n useAccordionHeaderStyles_unstable: CustomStyleHook;\n useAccordionItemStyles_unstable: CustomStyleHook;\n useAccordionPanelStyles_unstable: CustomStyleHook;\n useAccordionStyles_unstable: CustomStyleHook;\n useAvatarStyles_unstable: CustomStyleHook;\n useAvatarGroupStyles_unstable: CustomStyleHook;\n useAvatarGroupItemStyles_unstable: CustomStyleHook;\n useAvatarGroupPopoverStyles_unstable: CustomStyleHook;\n useBadgeStyles_unstable: CustomStyleHook;\n useCounterBadgeStyles_unstable: CustomStyleHook;\n useCardHeaderStyles_unstable: CustomStyleHook;\n useCardStyles_unstable: CustomStyleHook;\n useCardFooterStyles_unstable: CustomStyleHook;\n useCardPreviewStyles_unstable: CustomStyleHook;\n usePresenceBadgeStyles_unstable: CustomStyleHook;\n useButtonStyles_unstable: CustomStyleHook;\n useCompoundButtonStyles_unstable: CustomStyleHook;\n useMenuButtonStyles_unstable: CustomStyleHook;\n useSplitButtonStyles_unstable: CustomStyleHook;\n useToggleButtonStyles_unstable: CustomStyleHook;\n useCheckboxStyles_unstable: CustomStyleHook;\n useComboboxStyles_unstable: CustomStyleHook;\n useDropdownStyles_unstable: CustomStyleHook;\n useListboxStyles_unstable: CustomStyleHook;\n useListStyles_unstable: CustomStyleHook;\n useListItemStyles_unstable: CustomStyleHook;\n useListItemButtonStyles_unstable: CustomStyleHook;\n useOptionStyles_unstable: CustomStyleHook;\n useOptionGroupStyles_unstable: CustomStyleHook;\n useDividerStyles_unstable: CustomStyleHook;\n useInputStyles_unstable: CustomStyleHook;\n useImageStyles_unstable: CustomStyleHook;\n useLabelStyles_unstable: CustomStyleHook;\n useLinkStyles_unstable: CustomStyleHook;\n useMenuDividerStyles_unstable: CustomStyleHook;\n useMenuGroupHeaderStyles_unstable: CustomStyleHook;\n useMenuGroupStyles_unstable: CustomStyleHook;\n useMenuItemCheckboxStyles_unstable: CustomStyleHook;\n useMenuItemRadioStyles_unstable: CustomStyleHook;\n useMenuItemStyles_unstable: CustomStyleHook;\n useMenuListStyles_unstable: CustomStyleHook;\n useMenuPopoverStyles_unstable: CustomStyleHook;\n useMenuSplitGroupStyles_unstable: CustomStyleHook;\n usePersonaStyles_unstable: CustomStyleHook;\n usePopoverSurfaceStyles_unstable: CustomStyleHook;\n useRadioGroupStyles_unstable: CustomStyleHook;\n useRadioStyles_unstable: CustomStyleHook;\n useSelectStyles_unstable: CustomStyleHook;\n useSliderStyles_unstable: CustomStyleHook;\n useSpinButtonStyles_unstable: CustomStyleHook;\n useSpinnerStyles_unstable: CustomStyleHook;\n useSwitchStyles_unstable: CustomStyleHook;\n useTabStyles_unstable: CustomStyleHook;\n useTabListStyles_unstable: CustomStyleHook;\n useTextStyles_unstable: CustomStyleHook;\n useTextareaStyles_unstable: CustomStyleHook;\n useTooltipStyles_unstable: CustomStyleHook;\n useDialogTitleStyles_unstable: CustomStyleHook;\n useDialogBodyStyles_unstable: CustomStyleHook;\n useDialogActionsStyles_unstable: CustomStyleHook;\n useDialogSurfaceStyles_unstable: CustomStyleHook;\n useDialogContentStyles_unstable: CustomStyleHook;\n useProgressBarStyles_unstable: CustomStyleHook;\n useToolbarButtonStyles_unstable: CustomStyleHook;\n useToolbarRadioButtonStyles_unstable: CustomStyleHook;\n useToolbarGroupStyles_unstable: CustomStyleHook;\n useToolbarToggleButtonStyles_unstable: CustomStyleHook;\n useToolbarDividerStyles_unstable: CustomStyleHook;\n useToolbarStyles_unstable: CustomStyleHook;\n useTableCellStyles_unstable: CustomStyleHook;\n useTableRowStyles_unstable: CustomStyleHook;\n useTableBodyStyles_unstable: CustomStyleHook;\n useTableStyles_unstable: CustomStyleHook;\n useTableHeaderStyles_unstable: CustomStyleHook;\n useTableHeaderCellStyles_unstable: CustomStyleHook;\n useTableResizeHandleStyles_unstable: CustomStyleHook;\n useTableSelectionCellStyles_unstable: CustomStyleHook;\n useTableCellActionsStyles_unstable: CustomStyleHook;\n useTableCellLayoutStyles_unstable: CustomStyleHook;\n useDataGridCellStyles_unstable: CustomStyleHook;\n useDataGridRowStyles_unstable: CustomStyleHook;\n useDataGridBodyStyles_unstable: CustomStyleHook;\n useDataGridStyles_unstable: CustomStyleHook;\n useDataGridHeaderStyles_unstable: CustomStyleHook;\n useDataGridHeaderCellStyles_unstable: CustomStyleHook;\n useDataGridSelectionCellStyles_unstable: CustomStyleHook;\n useDrawerStyles_unstable: CustomStyleHook;\n /** @deprecated Use useInlineDrawerStyles_unstable instead. */\n useDrawerInlineStyles_unstable: CustomStyleHook;\n /** @deprecated Use useOverlayDrawerStyles_unstable instead. */\n useDrawerOverlayStyles_unstable: CustomStyleHook;\n useInlineDrawerStyles_unstable: CustomStyleHook;\n useOverlayDrawerStyles_unstable: CustomStyleHook;\n useDrawerHeaderStyles_unstable: CustomStyleHook;\n useDrawerHeaderNavigationStyles_unstable: CustomStyleHook;\n useDrawerHeaderTitleStyles_unstable: CustomStyleHook;\n useDrawerBodyStyles_unstable: CustomStyleHook;\n useDrawerFooterStyles_unstable: CustomStyleHook;\n useInteractionTagStyles_unstable: CustomStyleHook;\n useInteractionTagPrimaryStyles_unstable: CustomStyleHook;\n useInteractionTagSecondaryStyles_unstable: CustomStyleHook;\n useTagStyles_unstable: CustomStyleHook;\n useTagGroupStyles_unstable: CustomStyleHook;\n useBreadcrumbStyles_unstable: CustomStyleHook;\n useBreadcrumbButtonStyles_unstable: CustomStyleHook;\n useBreadcrumbItemStyles_unstable: CustomStyleHook;\n useBreadcrumbDividerStyles_unstable: CustomStyleHook;\n useMessageBarStyles_unstable: CustomStyleHook;\n useMessageBarBodyStyles_unstable: CustomStyleHook;\n useMessageBarTitleStyles_unstable: CustomStyleHook;\n useMessageBarActionsStyles_unstable: CustomStyleHook;\n useMessageBarGroupStyles_unstable: CustomStyleHook;\n useToasterStyles_unstable: CustomStyleHook;\n /** @deprecated TeachingPopover wrapper has no styles (non-UI hooks only). */\n useTeachingPopoverStyles_unstable: CustomStyleHook;\n useTeachingPopoverActionsStyles_unstable: CustomStyleHook;\n useTeachingPopoverBodyStyles_unstable: CustomStyleHook;\n useTeachingPopoverButtonStyles_unstable: CustomStyleHook;\n useTeachingPopoverCarouselStyles_unstable: CustomStyleHook;\n useTeachingPopoverHeaderStyles_unstable: CustomStyleHook;\n useTeachingPopoverPageCountStyles_unstable: CustomStyleHook;\n useTeachingPopoverSurfaceStyles_unstable: CustomStyleHook;\n useTeachingPopoverTitleStyles_unstable: CustomStyleHook;\n useTimePickerCompatStyles_unstable: CustomStyleHook;\n}>;\n\n/**\n * @internal\n */\nexport const CustomStyleHooksContext = React.createContext<CustomStyleHooksContextValue | undefined>(undefined);\n\nconst noop = () => {};\n\n/**\n * @internal\n */\nexport const CustomStyleHooksProvider = CustomStyleHooksContext.Provider;\n\n/**\n * Gets a custom style hook\n * @param hook - One of the hook properties in CustomStyleHooksContextValue\n * @returns The corresponding hook when defined, otherwise a no-op function.\n */\nexport const useCustomStyleHook = (hook: keyof CustomStyleHooksContextValue): CustomStyleHook => {\n return React.useContext(CustomStyleHooksContext)?.[hook] ?? noop;\n};\n"],"names":["React","CustomStyleHooksContext","createContext","undefined","noop","CustomStyleHooksProvider","Provider","useCustomStyleHook","hook","useContext"],"mappings":"AAAA,kBAAkB,GAElB,YAAYA,WAAW,QAAQ;AAoI/B;;CAEC,GACD,OAAO,MAAMC,0BAA0BD,MAAME,aAAa,CAA2CC,WAAW;AAEhH,MAAMC,OAAO,KAAO;AAEpB;;CAEC,GACD,OAAO,MAAMC,2BAA2BJ,wBAAwBK,QAAQ,CAAC;AAEzE;;;;CAIC,GACD,OAAO,MAAMC,qBAAqB,CAACC;QAC1BR;QAAAA;IAAP,OAAOA,CAAAA,0BAAAA,oBAAAA,MAAMS,UAAU,CAACR,sCAAjBD,wCAAAA,iBAA2C,CAACQ,KAAK,cAAjDR,oCAAAA,yBAAqDI;AAC9D,EAAE"}
|
package/lib/index.js
CHANGED
@@ -6,4 +6,4 @@ export { OverridesProvider as OverridesProvider_unstable, useOverrides as useOve
|
|
6
6
|
export { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';
|
7
7
|
export { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';
|
8
8
|
export { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';
|
9
|
-
export { AnnounceProvider as AnnounceProvider_unstable, useAnnounce as useAnnounce_unstable } from './AnnounceContext';
|
9
|
+
export { AnnounceProvider, /** @deprecated Use AnnounceProvider instead. */ AnnounceProvider as AnnounceProvider_unstable, useAnnounce, /** @deprecated Use useAnnounce instead. */ useAnnounce as useAnnounce_unstable } from './AnnounceContext';
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n\nexport {\n OverridesProvider as OverridesProvider_unstable,\n useOverrides as useOverrides_unstable,\n} from './OverridesContext';\nexport type { OverridesContextValue as OverridesContextValue_unstable } from './OverridesContext';\n\nexport {\n CustomStyleHooksContext as CustomStyleHooksContext_unstable,\n CustomStyleHooksProvider as CustomStyleHooksProvider_unstable,\n useCustomStyleHook as useCustomStyleHook_unstable,\n} from './CustomStyleHooksContext';\nexport type { CustomStyleHooksContextValue as CustomStyleHooksContextValue_unstable } from './CustomStyleHooksContext';\n\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport type { BackgroundAppearanceContextValue } from './BackgroundAppearanceContext';\n\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\n\nexport { AnnounceProvider as AnnounceProvider_unstable
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n\nexport {\n OverridesProvider as OverridesProvider_unstable,\n useOverrides as useOverrides_unstable,\n} from './OverridesContext';\nexport type { OverridesContextValue as OverridesContextValue_unstable } from './OverridesContext';\n\nexport {\n CustomStyleHooksContext as CustomStyleHooksContext_unstable,\n CustomStyleHooksProvider as CustomStyleHooksProvider_unstable,\n useCustomStyleHook as useCustomStyleHook_unstable,\n} from './CustomStyleHooksContext';\nexport type { CustomStyleHooksContextValue as CustomStyleHooksContextValue_unstable } from './CustomStyleHooksContext';\n\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport type { BackgroundAppearanceContextValue } from './BackgroundAppearanceContext';\n\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\n\nexport {\n AnnounceProvider,\n /** @deprecated Use AnnounceProvider instead. */\n AnnounceProvider as AnnounceProvider_unstable,\n useAnnounce,\n /** @deprecated Use useAnnounce instead. */\n useAnnounce as useAnnounce_unstable,\n} from './AnnounceContext';\nexport type {\n AnnounceContextValue,\n /** @deprecated Use AnnounceContextValue instead. */\n AnnounceContextValue as AnnounceContextValue_unstable,\n AnnounceOptions,\n} from './AnnounceContext';\n"],"names":["ThemeContext","ThemeContext_unstable","ThemeProvider","ThemeProvider_unstable","ThemeClassNameProvider","ThemeClassNameProvider_unstable","useThemeClassName","useThemeClassName_unstable","TooltipVisibilityProvider","TooltipVisibilityProvider_unstable","useTooltipVisibility","useTooltipVisibility_unstable","Provider","Provider_unstable","useFluent","useFluent_unstable","OverridesProvider","OverridesProvider_unstable","useOverrides","useOverrides_unstable","CustomStyleHooksContext","CustomStyleHooksContext_unstable","CustomStyleHooksProvider","CustomStyleHooksProvider_unstable","useCustomStyleHook","useCustomStyleHook_unstable","BackgroundAppearanceProvider","useBackgroundAppearance","PortalMountNodeProvider","usePortalMountNode","AnnounceProvider","AnnounceProvider_unstable","useAnnounce","useAnnounce_unstable"],"mappings":"AAAA,SAASA,gBAAgBC,qBAAqB,EAAEC,iBAAiBC,sBAAsB,QAAQ,iBAAiB;AAGhH,SACEC,0BAA0BC,+BAA+B,EACzDC,qBAAqBC,0BAA0B,QAC1C,0BAA0B;AAGjC,SACEC,6BAA6BC,kCAAkC,EAC/DC,wBAAwBC,6BAA6B,QAChD,6BAA6B;AAGpC,SAASC,YAAYC,iBAAiB,EAAEC,aAAaC,kBAAkB,QAAQ,oBAAoB;AAGnG,SACEC,qBAAqBC,0BAA0B,EAC/CC,gBAAgBC,qBAAqB,QAChC,qBAAqB;AAG5B,SACEC,2BAA2BC,gCAAgC,EAC3DC,4BAA4BC,iCAAiC,EAC7DC,sBAAsBC,2BAA2B,QAC5C,4BAA4B;AAGnC,SAASC,4BAA4B,EAAEC,uBAAuB,QAAQ,gCAAgC;AAGtG,SAASC,uBAAuB,EAAEC,kBAAkB,QAAQ,2BAA2B;AAEvF,SACEC,gBAAgB,EAChB,8CAA8C,GAC9CA,oBAAoBC,yBAAyB,EAC7CC,WAAW,EACX,yCAAyC,GACzCA,eAAeC,oBAAoB,QAC9B,oBAAoB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["AnnounceContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ const AnnounceContext = React.createContext(undefined);\n/**\n *
|
1
|
+
{"version":3,"sources":["AnnounceContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ const AnnounceContext = React.createContext(undefined);\nexport const AnnounceProvider = AnnounceContext.Provider;\n/**\n * Returns a function that can be used to announce messages to screen readers.\n */ export function useAnnounce() {\n var _React_useContext;\n return (_React_useContext = React.useContext(AnnounceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : {\n announce: ()=>undefined\n };\n}\n"],"names":["AnnounceProvider","useAnnounce","AnnounceContext","React","createContext","undefined","Provider","_React_useContext","useContext","announce"],"mappings":";;;;;;;;;;;IAIaA,gBAAgB;eAAhBA;;IAGOC,WAAW;eAAXA;;;;iEAPG;AACvB;;CAEC,GAAG,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AACzC,MAAML,mBAAmBE,gBAAgBI,QAAQ;AAG7C,SAASL;IAChB,IAAIM;IACJ,OAAO,AAACA,CAAAA,oBAAoBJ,OAAMK,UAAU,CAACN,gBAAe,MAAO,QAAQK,sBAAsB,KAAK,IAAIA,oBAAoB;QAC1HE,UAAU,IAAIJ;IAClB;AACJ"}
|
package/lib-commonjs/index.js
CHANGED
@@ -60,11 +60,17 @@ _export(exports, {
|
|
60
60
|
usePortalMountNode: function() {
|
61
61
|
return _PortalMountNodeContext.usePortalMountNode;
|
62
62
|
},
|
63
|
-
|
63
|
+
AnnounceProvider: function() {
|
64
64
|
return _AnnounceContext.AnnounceProvider;
|
65
65
|
},
|
66
|
-
|
66
|
+
AnnounceProvider_unstable: function() {
|
67
|
+
return /** @deprecated Use AnnounceProvider instead. */ _AnnounceContext.AnnounceProvider;
|
68
|
+
},
|
69
|
+
useAnnounce: function() {
|
67
70
|
return _AnnounceContext.useAnnounce;
|
71
|
+
},
|
72
|
+
useAnnounce_unstable: function() {
|
73
|
+
return /** @deprecated Use useAnnounce instead. */ _AnnounceContext.useAnnounce;
|
68
74
|
}
|
69
75
|
});
|
70
76
|
const _ThemeContext = require("./ThemeContext");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport { ThemeClassNameProvider as ThemeClassNameProvider_unstable, useThemeClassName as useThemeClassName_unstable } from './ThemeClassNameContext';\nexport { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useTooltipVisibility as useTooltipVisibility_unstable } from './TooltipVisibilityContext';\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport { OverridesProvider as OverridesProvider_unstable, useOverrides as useOverrides_unstable } from './OverridesContext';\nexport { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\nexport { AnnounceProvider as AnnounceProvider_unstable, useAnnounce as useAnnounce_unstable } from './AnnounceContext';\n"],"names":["ThemeContext_unstable","ThemeContext","ThemeProvider_unstable","ThemeProvider","ThemeClassNameProvider_unstable","ThemeClassNameProvider","useThemeClassName_unstable","useThemeClassName","TooltipVisibilityProvider_unstable","TooltipVisibilityProvider","useTooltipVisibility_unstable","useTooltipVisibility","Provider_unstable","Provider","useFluent_unstable","useFluent","OverridesProvider_unstable","OverridesProvider","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","CustomStyleHooksProvider_unstable","CustomStyleHooksProvider","useCustomStyleHook_unstable","useCustomStyleHook","BackgroundAppearanceProvider","useBackgroundAppearance","PortalMountNodeProvider","usePortalMountNode","
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport { ThemeClassNameProvider as ThemeClassNameProvider_unstable, useThemeClassName as useThemeClassName_unstable } from './ThemeClassNameContext';\nexport { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useTooltipVisibility as useTooltipVisibility_unstable } from './TooltipVisibilityContext';\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport { OverridesProvider as OverridesProvider_unstable, useOverrides as useOverrides_unstable } from './OverridesContext';\nexport { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\nexport { AnnounceProvider, /** @deprecated Use AnnounceProvider instead. */ AnnounceProvider as AnnounceProvider_unstable, useAnnounce, /** @deprecated Use useAnnounce instead. */ useAnnounce as useAnnounce_unstable } from './AnnounceContext';\n"],"names":["ThemeContext_unstable","ThemeContext","ThemeProvider_unstable","ThemeProvider","ThemeClassNameProvider_unstable","ThemeClassNameProvider","useThemeClassName_unstable","useThemeClassName","TooltipVisibilityProvider_unstable","TooltipVisibilityProvider","useTooltipVisibility_unstable","useTooltipVisibility","Provider_unstable","Provider","useFluent_unstable","useFluent","OverridesProvider_unstable","OverridesProvider","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","CustomStyleHooksProvider_unstable","CustomStyleHooksProvider","useCustomStyleHook_unstable","useCustomStyleHook","BackgroundAppearanceProvider","useBackgroundAppearance","PortalMountNodeProvider","usePortalMountNode","AnnounceProvider","AnnounceProvider_unstable","useAnnounce","useAnnounce_unstable"],"mappings":";;;;;;;;;;;IAAyBA,qBAAqB;eAArCC,0BAAY;;IAA4CC,sBAAsB;eAAvCC,2BAAa;;IAC1BC,+BAA+B;eAAzDC,6CAAsB;;IAA0DC,0BAA0B;eAA/CC,wCAAiB;;IAC/CC,kCAAkC;eAA/DC,mDAAyB;;IAAgEC,6BAA6B;eAArDC,8CAAoB;;IACzEC,iBAAiB;eAA7BC,yBAAQ;;IAAoCC,kBAAkB;eAA/BC,0BAAS;;IACnBC,0BAA0B;eAA/CC,mCAAiB;;IAAgDC,qBAAqB;eAArCC,8BAAY;;IAClCC,gCAAgC;eAA3DC,gDAAuB;;IAAkEC,iCAAiC;eAA7DC,iDAAwB;;IAA6DC,2BAA2B;eAAjDC,2CAAkB;;IAC9IC,4BAA4B;eAA5BA,yDAA4B;;IAAEC,uBAAuB;eAAvBA,oDAAuB;;IACrDC,uBAAuB;eAAvBA,+CAAuB;;IAAEC,kBAAkB;eAAlBA,0CAAkB;;IAC3CC,gBAAgB;eAAhBA,iCAAgB;;IAAuEC,yBAAyB;eAA9F,8CAA8C,GAAGD,iCAAgB;;IAA+BE,WAAW;eAAXA,4BAAW;;IAA6DC,oBAAoB;eAA/E,yCAAyC,GAAGD,4BAAW;;;8BARhG;uCAC4B;0CACY;iCACxD;kCACwB;yCACuF;6CACxH;wCACV;iCACmK"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-shared-contexts",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.14.0",
|
4
4
|
"description": "Fluent UI React Contexts shared by multiple components.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -20,7 +20,9 @@
|
|
20
20
|
"test": "jest --passWithNoTests",
|
21
21
|
"type-check": "tsc -b tsconfig.json",
|
22
22
|
"generate-api": "just-scripts generate-api",
|
23
|
-
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
|
23
|
+
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\"",
|
24
|
+
"storybook": "start-storybook",
|
25
|
+
"start": "yarn storybook"
|
24
26
|
},
|
25
27
|
"devDependencies": {
|
26
28
|
"@fluentui/eslint-plugin": "*",
|