@fluentui/react-overflow 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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 +27 -9
- package/lib/components/Overflow/Overflow.js.map +1 -1
- package/lib/components/Overflow/Overflow.module.css +13 -0
- package/lib/components/Overflow/Overflow.types.js.map +1 -1
- package/lib/components/Overflow/index.js.map +1 -1
- package/lib/components/Overflow/renderOverflow.js +1 -1
- package/lib/components/Overflow/renderOverflow.js.map +1 -1
- package/lib/components/Overflow/useOverflow.js.map +1 -1
- package/lib/components/Overflow/useOverflowStyles.styles.css.js +9 -0
- package/lib/components/Overflow/useOverflowStyles.styles.css.js.map +1 -0
- package/lib/components/Overflow/useOverflowStyles.styles.raw.css.js +9 -0
- package/lib/components/Overflow/useOverflowStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Overflow/useOverflowStyles.styles.raw.js.map +1 -1
- package/lib/components/OverflowDivider/OverflowDivider.js.map +1 -1
- package/lib/components/OverflowDivider/OverflowDivider.types.js.map +1 -1
- package/lib/components/OverflowItem/OverflowItem.js.map +1 -1
- package/lib/components/OverflowItem/OverflowItem.types.js.map +1 -1
- package/lib/components/OverflowItem/index.js.map +1 -1
- package/lib/components/OverflowReorderObserver/OverflowReorderObserver.js.map +1 -1
- package/lib/components/OverflowReorderObserver/index.js.map +1 -1
- package/lib/overflowContext.js.map +1 -1
- package/lib/useOverflowContainer.js +4 -4
- package/lib/useOverflowContainer.js.map +1 -1
- package/lib/useOverflowItem.js.map +1 -1
- package/lib-commonjs/components/Overflow/Overflow.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/Overflow.module.css +13 -0
- package/lib-commonjs/components/Overflow/Overflow.types.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/index.cjs +5 -5
- package/lib-commonjs/components/Overflow/index.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/renderOverflow.cjs +1 -1
- package/lib-commonjs/components/Overflow/renderOverflow.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/useOverflow.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/Overflow/useOverflowStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/OverflowDivider/OverflowDivider.cjs.map +1 -1
- package/lib-commonjs/components/OverflowDivider/OverflowDivider.types.cjs.map +1 -1
- package/lib-commonjs/components/OverflowItem/OverflowItem.cjs.map +1 -1
- package/lib-commonjs/components/OverflowItem/OverflowItem.types.cjs.map +1 -1
- package/lib-commonjs/components/OverflowItem/index.cjs.map +1 -1
- package/lib-commonjs/components/OverflowReorderObserver/OverflowReorderObserver.cjs.map +1 -1
- package/lib-commonjs/components/OverflowReorderObserver/index.cjs.map +1 -1
- package/lib-commonjs/constants.cjs +5 -5
- package/lib-commonjs/constants.cjs.map +1 -1
- package/lib-commonjs/index.cjs +23 -23
- package/lib-commonjs/index.cjs.map +1 -1
- package/lib-commonjs/overflowContext.cjs +4 -4
- package/lib-commonjs/overflowContext.cjs.map +1 -1
- package/lib-commonjs/useOverflowContainer.cjs +7 -7
- package/lib-commonjs/useOverflowContainer.cjs.map +1 -1
- package/lib-commonjs/useOverflowItem.cjs.map +1 -1
- package/package.json +12 -12
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Overflow/useOverflowStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { getTriggerChild } from '@fluentui/react-utilities';\nimport { DATA_OVERFLOWING, DATA_OVERFLOW_MENU } from '../../constants';\nimport type { OverflowComponentState } from './Overflow.types';\n\nexport const useOverflowStyles = makeStyles({\n overflowMenu: {\n [`& [${DATA_OVERFLOW_MENU}]`]: {\n flexShrink: 0,\n },\n },\n\n overflowingItems: {\n [`& [${DATA_OVERFLOWING}]`]: {\n display: 'none',\n },\n },\n});\n\nexport const useOverflowStyles_unstable = (state: OverflowComponentState): OverflowComponentState => {\n const styles = useOverflowStyles();\n const child = getTriggerChild<HTMLElement>(state.children);\n\n // eslint-disable-next-line react-hooks/immutability\n state.className = mergeClasses('fui-Overflow', styles.overflowMenu, styles.overflowingItems, child?.props.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","getTriggerChild","DATA_OVERFLOWING","DATA_OVERFLOW_MENU","useOverflowStyles","overflowMenu","flexShrink","overflowingItems","display","useOverflowStyles_unstable","state","styles","child","children","className","props"],"mappings":"AAAA;;;;;;;;;;;;QAOaK;;;QAcAK;;;;uBAnB4B,iBAAiB;gCAC1B,4BAA4B;2BACP,qBAAkB;AAGhE,8BAA0BV,iBAAAA,EAAW;IAC1CM,cAAc;QACZ,CAAC,CAAC,GAAG,EAAEF,6BAAAA,CAAmB,CAAC,CAAC,CAAC,EAAE;YAC7BG,YAAY;QACd;IACF;IAEAC,kBAAkB;QAChB,CAAC,CAAC,GAAG,EAAEL,2BAAAA,CAAiB,CAAC,CAAC,CAAC,EAAE;YAC3BM,SAAS;QACX;IACF;AACF,GAAG;AAEI,mCAAmC,CAACE;IACzC,MAAMC,SAASP;IACf,MAAMQ,YAAQX,+BAAAA,EAA6BS,MAAMG,QAAQ;IAEzD,oDAAoD;IACpDH,MAAMI,SAAS,OAAGd,mBAAAA,EAAa,gBAAgBW,OAAON,YAAY,EAAEM,OAAOJ,gBAAgB,EAAEK,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOG,KAAK,CAACD,SAAS;IAEnH,OAAOJ;AACT,EAAE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get useOverflowStyles () {
|
|
13
|
+
return useOverflowStyles;
|
|
14
|
+
},
|
|
15
|
+
get useOverflowStyles_unstable () {
|
|
16
|
+
return useOverflowStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _clsx = require("clsx");
|
|
21
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
22
|
+
const _Overflowmodulecss = /*#__PURE__*/ _interop_require_default._(require("./Overflow.module.css"));
|
|
23
|
+
const useOverflowStyles = ()=>_Overflowmodulecss.default;
|
|
24
|
+
const useOverflowStyles_unstable = (state)=>{
|
|
25
|
+
const child = (0, _reactutilities.getTriggerChild)(state.children);
|
|
26
|
+
state.className = (0, _clsx.clsx)('fui-Overflow', _Overflowmodulecss.default.overflowMenu, _Overflowmodulecss.default.overflowingItems, child === null || child === void 0 ? void 0 : child.props.className);
|
|
27
|
+
return state;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Overflow/useOverflowStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport { getTriggerChild } from '@fluentui/react-utilities';\nimport styles from './Overflow.module.css';\nimport type { OverflowComponentState } from './Overflow.types';\n\nexport const useOverflowStyles = (): typeof styles => styles;\n\nexport const useOverflowStyles_unstable = (state: OverflowComponentState): OverflowComponentState => {\n const child = getTriggerChild<HTMLElement>(state.children);\n\n state.className = clsx('fui-Overflow', styles.overflowMenu, styles.overflowingItems, child?.props.className);\n\n return state;\n};\n"],"names":["clsx","getTriggerChild","styles","useOverflowStyles","useOverflowStyles_unstable","state","child","children","className","overflowMenu","overflowingItems","props"],"mappings":";;;;;;;;;;;QAKaG;;;;;;;;sBALQ,OAAO;gCACI,4BAA4B;4EACzC,wBAAwB;AAGpC,0BAA0B,IAAqBD,0BAAAA,CAAO;AAEtD,MAAME,6BAA6B,CAACC;IACzC,MAAMC,YAAQL,+BAAAA,EAA6BI,MAAME,QAAQ;IAEzDF,MAAMG,SAAS,OAAGR,UAAAA,EAAK,gBAAgBE,0BAAAA,CAAOO,YAAY,EAAEP,0BAAAA,CAAOQ,gBAAgB,EAAEJ,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOK,KAAK,CAACH,SAAS;IAE3G,OAAOH;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowDivider/OverflowDivider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { applyTriggerPropsToChildren, useMergedRefs } from '@fluentui/react-utilities';\nimport { useOverflowDivider } from '../../useOverflowDivider';\nimport type { OverflowDividerProps } from './OverflowDivider.types';\n\n/**\n * Attaches overflow item behavior to its child registered with the OverflowContext.\n * It does not render an element of its own.\n */\nexport const OverflowDivider = React.forwardRef((props: OverflowDividerProps, ref) => {\n const { groupId, children } = props;\n\n const containerRef = useOverflowDivider(groupId);\n return applyTriggerPropsToChildren(children, {\n ref: useMergedRefs(containerRef, ref),\n });\n});\n"],"names":["React","applyTriggerPropsToChildren","useMergedRefs","useOverflowDivider","OverflowDivider","forwardRef","props","ref","groupId","children","containerRef"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCAC4B,4BAA4B;oCACpD,8BAA2B;AAOvD,MAAMI,kBAAAA,WAAAA,GAAkBJ,OAAMK,UAAU,CAAC,CAACC,OAA6BC;IAC5E,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGH;IAE9B,MAAMI,mBAAeP,sCAAAA,EAAmBK;IACxC,WAAOP,2CAAAA,EAA4BQ,UAAU;QAC3CF,SAAKL,6BAAAA,EAAcQ,cAAcH;IACnC;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowDivider/OverflowDivider.types.ts"],"sourcesContent":["import type * as React from 'react';\n\n/**\n * OverflowDividerProps\n */\nexport type OverflowDividerProps = {\n /**\n * Assigns the item to a group, group visibility can be watched.\n */\n groupId: string;\n /**\n * The single child that has overflow item behavior attached.\n */\n children: React.ReactElement;\n};\n"],"names":[],"mappings":"AAEA;;CAEC,GACD,WASE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowItem/OverflowItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getReactElementRef,\n type FluentTriggerComponent,\n getTriggerChild,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useOverflowItem } from '../../useOverflowItem';\nimport type { OverflowItemProps } from './OverflowItem.types';\n\n/**\n * Attaches overflow item behavior to its child registered with the OverflowContext.\n * It does not render an element of its own.\n *\n * Behaves similarly to other `*Trigger` components in Fluent UI React.\n */\nexport const OverflowItem = React.forwardRef((props: OverflowItemProps, ref) => {\n const { id, groupId, priority, pinned, children } = props;\n\n const containerRef = useOverflowItem(id, priority, groupId, pinned);\n const child = getTriggerChild(children);\n\n return applyTriggerPropsToChildren(children, {\n ref: useMergedRefs(containerRef, ref, getReactElementRef(child)),\n });\n});\n\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(OverflowItem as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["React","applyTriggerPropsToChildren","getReactElementRef","getTriggerChild","useMergedRefs","useOverflowItem","OverflowItem","forwardRef","props","ref","id","groupId","priority","pinned","children","containerRef","child","isFluentTriggerComponent"],"mappings":"AAAA;;;;;+BAmBaM;;;;;;;iEAjBU,QAAQ;gCAOxB,4BAA4B;iCACH,2BAAwB;AASjD,qBAAMA,WAAAA,GAAeN,OAAMO,UAAU,CAAC,CAACC,OAA0BC;IACtE,MAAM,EAAEC,EAAE,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAEpD,MAAMO,mBAAeV,gCAAAA,EAAgBK,IAAIE,UAAUD,SAASE;IAC5D,MAAMG,YAAQb,+BAAAA,EAAgBW;IAE9B,WAAOb,2CAAAA,EAA4Ba,UAAU;QAC3CL,SAAKL,6BAAAA,EAAcW,cAAcN,SAAKP,kCAAAA,EAAmBc;IAC3D;AACF,GAAG;AAEH,6FAA6F;AAC5FV,aAAwCW,wBAAwB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowItem/OverflowItem.types.ts"],"sourcesContent":["import type * as React from 'react';\n\n/**\n * OverflowItemProps\n */\nexport type OverflowItemProps = {\n /**\n * The unique identifier for the item used by the overflow manager.\n */\n id: string;\n /**\n * Assigns the item to a group, group visibility can be watched.\n */\n groupId?: string;\n /**\n * The single child that has overflow item behavior attached.\n */\n children: React.ReactElement;\n} & (\n | {\n /**\n * If true, the item will never overflow and will always be visible.\n * Mutually exclusive with `priority`.\n */\n pinned?: boolean;\n priority?: never;\n }\n | {\n pinned?: never;\n /**\n * A higher priority means the item overflows later.\n * Mutually exclusive with `pinned`.\n */\n priority?: number;\n }\n);\n"],"names":[],"mappings":"AAEA;;CAEC,GACD,WA8BE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowItem/index.ts"],"sourcesContent":["export type { OverflowItemProps } from './OverflowItem.types';\nexport { OverflowItem } from './OverflowItem';\n"],"names":["OverflowItem"],"mappings":";;;;;;;eACSA,0BAAY;;;8BAAQ,oBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowReorderObserver/OverflowReorderObserver.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useOverflowContext } from '../../overflowContext';\n\n/**\n * Renderless opt-in component that observes the `<Overflow>` container for\n * direct-child DOM mutations and triggers an overflow recompute. Drop it\n * inside `<Overflow>` when items can be reordered, added, or removed via\n * React state without a container resize — Fluent's overflow manager only\n * listens to `ResizeObserver` otherwise, so reorders leave visibility flags\n * stale.\n *\n * @example\n * ```tsx\n * <Overflow>\n * <div>\n * <OverflowReorderObserver />\n * {items.map(id => <OverflowItem key={id} id={id} priority={1}>{id}</OverflowItem>)}\n * </div>\n * </Overflow>\n * ```\n */\nexport const OverflowReorderObserver: React.FC = () => {\n const containerRef = useOverflowContext(v => v.containerRef);\n const updateOverflow = useOverflowContext(v => v.updateOverflow);\n const { targetDocument } = useFluent();\n const targetWindow = targetDocument?.defaultView;\n\n React.useEffect(() => {\n const el = containerRef?.current;\n if (!el || !targetWindow?.MutationObserver) {\n return;\n }\n\n const mutationObserver = new targetWindow.MutationObserver(() => updateOverflow());\n mutationObserver.observe(el, { childList: true });\n\n return () => mutationObserver.disconnect();\n }, [containerRef, updateOverflow, targetWindow]);\n\n return null;\n};\n"],"names":["React","useFluent_unstable","useFluent","useOverflowContext","OverflowReorderObserver","containerRef","v","updateOverflow","targetDocument","targetWindow","defaultView","useEffect","el","current","MutationObserver","mutationObserver","observe","childList","disconnect"],"mappings":"AAAA;;;;;+BAwBaI;;;;;;;iEAtBU,QAAQ;qCACiB,kCAAkC;iCAC/C,2BAAwB;AAoBpD,gCAA0C;IAC/C,MAAMC,mBAAeF,mCAAAA,EAAmBG,CAAAA,IAAKA,EAAED,YAAY;IAC3D,MAAME,qBAAiBJ,mCAAAA,EAAmBG,CAAAA,IAAKA,EAAEC,cAAc;IAC/D,MAAM,EAAEC,cAAc,EAAE,OAAGN,uCAAAA;IAC3B,MAAMO,eAAeD,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBE,WAAW;IAEhDV,OAAMW,SAAS,CAAC;QACd,MAAMC,KAAKP,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAcQ,OAAO;QAChC,IAAI,CAACD,MAAM,EAACH,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAcK,gBAAAA,AAAgB,GAAE;YAC1C;QACF;QAEA,MAAMC,mBAAmB,IAAIN,aAAaK,gBAAgB,CAAC,IAAMP;QACjEQ,iBAAiBC,OAAO,CAACJ,IAAI;YAAEK,WAAW;QAAK;QAE/C,OAAO,IAAMF,iBAAiBG,UAAU;IAC1C,GAAG;QAACb;QAAcE;QAAgBE;KAAa;IAE/C,OAAO;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/OverflowReorderObserver/index.ts"],"sourcesContent":["export { OverflowReorderObserver } from './OverflowReorderObserver';\n"],"names":["OverflowReorderObserver"],"mappings":";;;;;;;eAASA,gDAAuB;;;yCAAQ,+BAA4B"}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
DATA_OVERFLOWING
|
|
12
|
+
get DATA_OVERFLOWING () {
|
|
13
13
|
return DATA_OVERFLOWING;
|
|
14
14
|
},
|
|
15
|
-
DATA_OVERFLOW_DIVIDER
|
|
15
|
+
get DATA_OVERFLOW_DIVIDER () {
|
|
16
16
|
return DATA_OVERFLOW_DIVIDER;
|
|
17
17
|
},
|
|
18
|
-
DATA_OVERFLOW_ITEM
|
|
18
|
+
get DATA_OVERFLOW_ITEM () {
|
|
19
19
|
return DATA_OVERFLOW_ITEM;
|
|
20
20
|
},
|
|
21
|
-
DATA_OVERFLOW_MENU
|
|
21
|
+
get DATA_OVERFLOW_MENU () {
|
|
22
22
|
return DATA_OVERFLOW_MENU;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const DATA_OVERFLOWING = 'data-overflowing';\nexport const DATA_OVERFLOW_ITEM = 'data-overflow-item';\nexport const DATA_OVERFLOW_MENU = 'data-overflow-menu';\nexport const DATA_OVERFLOW_DIVIDER = 'data-overflow-divider';\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","DATA_OVERFLOW_DIVIDER"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const DATA_OVERFLOWING = 'data-overflowing';\nexport const DATA_OVERFLOW_ITEM = 'data-overflow-item';\nexport const DATA_OVERFLOW_MENU = 'data-overflow-menu';\nexport const DATA_OVERFLOW_DIVIDER = 'data-overflow-divider';\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","DATA_OVERFLOW_DIVIDER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,mBAAmB,mBAAmB;AAC5C,MAAMC,qBAAqB,qBAAqB;AAChD,MAAMC,qBAAqB,qBAAqB;AAChD,MAAMC,wBAAwB,wBAAwB"}
|
package/lib-commonjs/index.cjs
CHANGED
|
@@ -5,74 +5,74 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
DATA_OVERFLOWING
|
|
12
|
+
get DATA_OVERFLOWING () {
|
|
13
13
|
return _constants.DATA_OVERFLOWING;
|
|
14
14
|
},
|
|
15
|
-
DATA_OVERFLOW_DIVIDER
|
|
15
|
+
get DATA_OVERFLOW_DIVIDER () {
|
|
16
16
|
return _constants.DATA_OVERFLOW_DIVIDER;
|
|
17
17
|
},
|
|
18
|
-
DATA_OVERFLOW_ITEM
|
|
18
|
+
get DATA_OVERFLOW_ITEM () {
|
|
19
19
|
return _constants.DATA_OVERFLOW_ITEM;
|
|
20
20
|
},
|
|
21
|
-
DATA_OVERFLOW_MENU
|
|
21
|
+
get DATA_OVERFLOW_MENU () {
|
|
22
22
|
return _constants.DATA_OVERFLOW_MENU;
|
|
23
23
|
},
|
|
24
|
-
Overflow
|
|
24
|
+
get Overflow () {
|
|
25
25
|
return _index.Overflow;
|
|
26
26
|
},
|
|
27
|
-
OverflowDivider
|
|
27
|
+
get OverflowDivider () {
|
|
28
28
|
return _OverflowDivider.OverflowDivider;
|
|
29
29
|
},
|
|
30
|
-
OverflowItem
|
|
30
|
+
get OverflowItem () {
|
|
31
31
|
return _OverflowItem.OverflowItem;
|
|
32
32
|
},
|
|
33
|
-
OverflowProvider
|
|
33
|
+
get OverflowProvider () {
|
|
34
34
|
return _overflowContext.OverflowProvider;
|
|
35
35
|
},
|
|
36
|
-
OverflowReorderObserver
|
|
36
|
+
get OverflowReorderObserver () {
|
|
37
37
|
return _index1.OverflowReorderObserver;
|
|
38
38
|
},
|
|
39
|
-
renderOverflow_unstable
|
|
39
|
+
get renderOverflow_unstable () {
|
|
40
40
|
return _index.renderOverflow_unstable;
|
|
41
41
|
},
|
|
42
|
-
useIsOverflowGroupVisible
|
|
42
|
+
get useIsOverflowGroupVisible () {
|
|
43
43
|
return _useIsOverflowGroupVisible.useIsOverflowGroupVisible;
|
|
44
44
|
},
|
|
45
|
-
useIsOverflowItemVisible
|
|
45
|
+
get useIsOverflowItemVisible () {
|
|
46
46
|
return _useIsOverflowItemVisible.useIsOverflowItemVisible;
|
|
47
47
|
},
|
|
48
|
-
useOverflowContainer
|
|
48
|
+
get useOverflowContainer () {
|
|
49
49
|
return _useOverflowContainer.useOverflowContainer;
|
|
50
50
|
},
|
|
51
|
-
useOverflowContext
|
|
51
|
+
get useOverflowContext () {
|
|
52
52
|
return _overflowContext.useOverflowContext;
|
|
53
53
|
},
|
|
54
|
-
useOverflowContextValues_unstable
|
|
54
|
+
get useOverflowContextValues_unstable () {
|
|
55
55
|
return _useOverflowContextValues.useOverflowContextValues_unstable;
|
|
56
56
|
},
|
|
57
|
-
useOverflowCount
|
|
57
|
+
get useOverflowCount () {
|
|
58
58
|
return _useOverflowCount.useOverflowCount;
|
|
59
59
|
},
|
|
60
|
-
useOverflowDivider
|
|
60
|
+
get useOverflowDivider () {
|
|
61
61
|
return _useOverflowDivider.useOverflowDivider;
|
|
62
62
|
},
|
|
63
|
-
useOverflowItem
|
|
63
|
+
get useOverflowItem () {
|
|
64
64
|
return _useOverflowItem.useOverflowItem;
|
|
65
65
|
},
|
|
66
|
-
useOverflowMenu
|
|
66
|
+
get useOverflowMenu () {
|
|
67
67
|
return _useOverflowMenu.useOverflowMenu;
|
|
68
68
|
},
|
|
69
|
-
useOverflowStyles_unstable
|
|
69
|
+
get useOverflowStyles_unstable () {
|
|
70
70
|
return _index.useOverflowStyles_unstable;
|
|
71
71
|
},
|
|
72
|
-
useOverflowVisibility
|
|
72
|
+
get useOverflowVisibility () {
|
|
73
73
|
return _useOverflowVisibility.useOverflowVisibility;
|
|
74
74
|
},
|
|
75
|
-
useOverflow_unstable
|
|
75
|
+
get useOverflow_unstable () {
|
|
76
76
|
return _index.useOverflow_unstable;
|
|
77
77
|
}
|
|
78
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Overflow,\n useOverflow_unstable,\n renderOverflow_unstable,\n useOverflowStyles_unstable,\n} from './components/Overflow';\nexport type {\n OverflowProps,\n OnOverflowChangeData,\n OverflowState,\n OverflowComponentState,\n OverflowContextValues,\n} from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU, DATA_OVERFLOW_DIVIDER } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowContextValues_unstable } from './useOverflowContextValues';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\nexport { useOverflowDivider } from './useOverflowDivider';\nexport { useOverflowVisibility } from './useOverflowVisibility';\n\nexport { useOverflowContext, OverflowProvider } from './overflowContext';\nexport type { OverflowContextValue } from './overflowContext';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport type { OverflowDividerProps } from './components/OverflowDivider/OverflowDivider.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\nexport { OverflowDivider } from './components/OverflowDivider/OverflowDivider';\nexport { OverflowReorderObserver } from './components/OverflowReorderObserver';\n\nexport type { OnUpdateItemVisibility, OnUpdateOverflow, OverflowEventPayload } from '@fluentui/priority-overflow';\n"],"names":["Overflow","useOverflow_unstable","renderOverflow_unstable","useOverflowStyles_unstable","DATA_OVERFLOWING","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","DATA_OVERFLOW_DIVIDER","useIsOverflowGroupVisible","useIsOverflowItemVisible","useOverflowContainer","useOverflowContextValues_unstable","useOverflowCount","useOverflowItem","useOverflowMenu","useOverflowDivider","useOverflowVisibility","useOverflowContext","OverflowProvider","OverflowItem","OverflowDivider","OverflowReorderObserver"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Overflow,\n useOverflow_unstable,\n renderOverflow_unstable,\n useOverflowStyles_unstable,\n} from './components/Overflow';\nexport type {\n OverflowProps,\n OnOverflowChangeData,\n OverflowState,\n OverflowComponentState,\n OverflowContextValues,\n} from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU, DATA_OVERFLOW_DIVIDER } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowContextValues_unstable } from './useOverflowContextValues';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\nexport { useOverflowDivider } from './useOverflowDivider';\nexport { useOverflowVisibility } from './useOverflowVisibility';\n\nexport { useOverflowContext, OverflowProvider } from './overflowContext';\nexport type { OverflowContextValue } from './overflowContext';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport type { OverflowDividerProps } from './components/OverflowDivider/OverflowDivider.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\nexport { OverflowDivider } from './components/OverflowDivider/OverflowDivider';\nexport { OverflowReorderObserver } from './components/OverflowReorderObserver';\n\nexport type { OnUpdateItemVisibility, OnUpdateOverflow, OverflowEventPayload } from '@fluentui/priority-overflow';\n"],"names":["Overflow","useOverflow_unstable","renderOverflow_unstable","useOverflowStyles_unstable","DATA_OVERFLOWING","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","DATA_OVERFLOW_DIVIDER","useIsOverflowGroupVisible","useIsOverflowItemVisible","useOverflowContainer","useOverflowContextValues_unstable","useOverflowCount","useOverflowItem","useOverflowMenu","useOverflowDivider","useOverflowVisibility","useOverflowContext","OverflowProvider","OverflowItem","OverflowDivider","OverflowReorderObserver"],"mappings":";;;;;;;;;;;QAaSI;0CAAgB;;;eAA0CG,gCAAqB;;QAA7DF;4CAAkB;;;eAAEC,6BAAkB;;;eAZ/DN,eAAQ;;;eA8BDoB,gCAAe;;QADfD;yCAAY;;;eALQD,iCAAgB;;;eAOpCG,+BAAuB;;;eA7B9BnB,8BAAuB;;;eAYhBM,oDAAyB;;;eACzBC,kDAAwB;;;eACxBC,0CAAoB;;;eAQpBO,mCAAkB;;;eAPlBN,2DAAiC;;;eACjCC,kCAAgB;;;eAGhBG,sCAAkB;;;eAFlBF,gCAAe;;;eACfC,gCAAe;;;eAjBtBX,iCAA0B;;QAmBnBa;2DAAqB;;;eArB5Bf,2BAAoB;;;uBAGf,iCAAwB;2BAQiE,iBAAc;2CAEpE,iCAA8B;0CAC/B,gCAA6B;sCACjC,4BAAyB;0CACZ,gCAA6B;kCAC9C,wBAAqB;iCACtB,uBAAoB;iCACpB,uBAAoB;oCACjB,0BAAuB;uCACpB,6BAA0B;iCAEX,uBAAoB;8BAK5C,4CAAyC;iCACtC,kDAA+C;wBACvC,gDAAuC"}
|
|
@@ -6,17 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
OverflowContext
|
|
13
|
+
get OverflowContext () {
|
|
14
14
|
return OverflowContext;
|
|
15
15
|
},
|
|
16
|
-
OverflowProvider
|
|
16
|
+
get OverflowProvider () {
|
|
17
17
|
return OverflowProvider;
|
|
18
18
|
},
|
|
19
|
-
useOverflowContext
|
|
19
|
+
get useOverflowContext () {
|
|
20
20
|
return useOverflowContext;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/overflowContext.ts"],"sourcesContent":["'use client';\n\nimport type {\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowGroupState,\n OverflowSnapshot,\n} from '@fluentui/priority-overflow';\nimport { EMPTY_SNAPSHOT } from '@fluentui/priority-overflow';\nimport * as React from 'react';\n\n/**\n * @public\n */\nexport interface OverflowContextValue {\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n itemVisibility: Record<string, boolean>;\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n groupVisibility: Record<string, OverflowGroupState>;\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n registerDivider: (divider: OverflowDividerEntry) => () => void;\n updateOverflow: (padding?: number) => void;\n forceUpdateOverflow: () => void;\n containerRef?: React.RefObject<HTMLElement | null>;\n getSnapshot: () => OverflowSnapshot;\n subscribe: (listener: () => void) => () => void;\n}\n\nexport const OverflowContext = React.createContext<OverflowContextValue | undefined>(\n undefined,\n) as React.Context<OverflowContextValue>;\n\n/**\n * Provides an {@link OverflowContextValue} to descendant overflow hooks and components.\n * Used by headless consumers that build their own overflow root.\n * @public\n */\nexport const OverflowProvider = OverflowContext.Provider;\n\nconst noop = () => {\n /* noop */\n};\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n hasOverflow: false,\n itemVisibility: {},\n groupVisibility: {},\n registerItem: () => noop,\n updateOverflow: noop,\n forceUpdateOverflow: noop,\n registerOverflowMenu: () => noop,\n registerDivider: () => noop,\n getSnapshot: () => EMPTY_SNAPSHOT,\n subscribe: () => noop,\n};\n\n/**\n * @internal\n */\nexport function useOverflowContext(): OverflowContextValue;\n/**\n * @internal\n */\nexport function useOverflowContext<SelectedValue>(\n selector: (context: OverflowContextValue) => SelectedValue,\n): SelectedValue;\nexport function useOverflowContext<SelectedValue>(\n selector?: (context: OverflowContextValue) => SelectedValue,\n): SelectedValue | OverflowContextValue {\n const context = React.useContext(OverflowContext) ?? overflowContextDefaultValue;\n return selector ? selector(context) : context;\n}\n"],"names":["EMPTY_SNAPSHOT","React","OverflowContext","createContext","undefined","OverflowProvider","Provider","noop","overflowContextDefaultValue","hasOverflow","itemVisibility","groupVisibility","registerItem","updateOverflow","forceUpdateOverflow","registerOverflowMenu","registerDivider","getSnapshot","subscribe","useOverflowContext","selector","context","useContext"],"mappings":"AAAA;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/overflowContext.ts"],"sourcesContent":["'use client';\n\nimport type {\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowGroupState,\n OverflowSnapshot,\n} from '@fluentui/priority-overflow';\nimport { EMPTY_SNAPSHOT } from '@fluentui/priority-overflow';\nimport * as React from 'react';\n\n/**\n * @public\n */\nexport interface OverflowContextValue {\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n itemVisibility: Record<string, boolean>;\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n groupVisibility: Record<string, OverflowGroupState>;\n /**\n * @deprecated This value is not guaranteed to be up to date and should not be used directly. Use getSnapshot or the provided hooks instead\n */\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n registerDivider: (divider: OverflowDividerEntry) => () => void;\n updateOverflow: (padding?: number) => void;\n forceUpdateOverflow: () => void;\n containerRef?: React.RefObject<HTMLElement | null>;\n getSnapshot: () => OverflowSnapshot;\n subscribe: (listener: () => void) => () => void;\n}\n\nexport const OverflowContext = React.createContext<OverflowContextValue | undefined>(\n undefined,\n) as React.Context<OverflowContextValue>;\n\n/**\n * Provides an {@link OverflowContextValue} to descendant overflow hooks and components.\n * Used by headless consumers that build their own overflow root.\n * @public\n */\nexport const OverflowProvider = OverflowContext.Provider;\n\nconst noop = () => {\n /* noop */\n};\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n hasOverflow: false,\n itemVisibility: {},\n groupVisibility: {},\n registerItem: () => noop,\n updateOverflow: noop,\n forceUpdateOverflow: noop,\n registerOverflowMenu: () => noop,\n registerDivider: () => noop,\n getSnapshot: () => EMPTY_SNAPSHOT,\n subscribe: () => noop,\n};\n\n/**\n * @internal\n */\nexport function useOverflowContext(): OverflowContextValue;\n/**\n * @internal\n */\nexport function useOverflowContext<SelectedValue>(\n selector: (context: OverflowContextValue) => SelectedValue,\n): SelectedValue;\nexport function useOverflowContext<SelectedValue>(\n selector?: (context: OverflowContextValue) => SelectedValue,\n): SelectedValue | OverflowContextValue {\n const context = React.useContext(OverflowContext) ?? overflowContextDefaultValue;\n return selector ? selector(context) : context;\n}\n"],"names":["EMPTY_SNAPSHOT","React","OverflowContext","createContext","undefined","OverflowProvider","Provider","noop","overflowContextDefaultValue","hasOverflow","itemVisibility","groupVisibility","registerItem","updateOverflow","forceUpdateOverflow","registerOverflowMenu","registerDivider","getSnapshot","subscribe","useOverflowContext","selector","context","useContext"],"mappings":"AAAA;;;;;;;;;;;;QAqCaE;;;;;;QAsCGiB;;;;;kCAnEe,8BAA8B;iEACtC,QAAQ;AA4BxB,sCAAwBlB,OAAME,aAAa,CAChDC,WACuC;AAOlC,MAAMC,mBAAmBH,gBAAgBI,QAAQ,CAAC;AAEzD,MAAMC,OAAO;AACX,QAAQ,GACV;AAEA,MAAMC,8BAAoD;IACxDC,aAAa;IACbC,gBAAgB,CAAC;IACjBC,iBAAiB,CAAC;IAClBC,cAAc,IAAML;IACpBM,gBAAgBN;IAChBO,qBAAqBP;IACrBQ,sBAAsB,IAAMR;IAC5BS,iBAAiB,IAAMT;IACvBU,aAAa,IAAMjB,gCAAAA;IACnBkB,WAAW,IAAMX;AACnB;AAYO,4BACLa,QAA2D;QAE3CnB;IAAhB,MAAMoB,UAAAA,CAAUpB,oBAAAA,OAAMqB,UAAU,CAACpB,gBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAqCO;IACrD,OAAOY,WAAWA,SAASC,WAAWA;AACxC"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
updateVisibilityAttribute
|
|
13
|
+
get updateVisibilityAttribute () {
|
|
14
14
|
return updateVisibilityAttribute;
|
|
15
15
|
},
|
|
16
|
-
useOverflowContainer
|
|
16
|
+
get useOverflowContainer () {
|
|
17
17
|
return useOverflowContainer;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -103,14 +103,14 @@ const useOverflowContainer = (update, options)=>{
|
|
|
103
103
|
(_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.update();
|
|
104
104
|
}, []);
|
|
105
105
|
const getSnapshot = _react.useCallback(()=>{
|
|
106
|
+
var _ref;
|
|
106
107
|
var _managerRef_current;
|
|
107
|
-
|
|
108
|
-
return (_managerRef_current_getSnapshot = (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.getSnapshot()) !== null && _managerRef_current_getSnapshot !== void 0 ? _managerRef_current_getSnapshot : _priorityoverflow.EMPTY_SNAPSHOT;
|
|
108
|
+
return (_ref = (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.getSnapshot()) !== null && _ref !== void 0 ? _ref : _priorityoverflow.EMPTY_SNAPSHOT;
|
|
109
109
|
}, []);
|
|
110
110
|
const subscribe = _react.useCallback((listener)=>{
|
|
111
|
+
var _ref;
|
|
111
112
|
var _managerRef_current;
|
|
112
|
-
|
|
113
|
-
return (_managerRef_current_subscribe = (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.subscribe(listener)) !== null && _managerRef_current_subscribe !== void 0 ? _managerRef_current_subscribe : noop;
|
|
113
|
+
return (_ref = (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.subscribe(listener)) !== null && _ref !== void 0 ? _ref : noop;
|
|
114
114
|
}, []);
|
|
115
115
|
const forceUpdateOverflow = _react.useCallback(()=>{
|
|
116
116
|
var _managerRef_current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useOverflowContainer.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createOverflowManager, EMPTY_SNAPSHOT } from '@fluentui/priority-overflow';\n\n/**\n * @internal\n */\nimport type {\n OnUpdateItemVisibility,\n OnUpdateOverflow,\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowManager,\n OverflowOptions,\n} from '@fluentui/priority-overflow';\nimport { canUseDOM, useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport type { UseOverflowContainerReturn } from './types';\nimport { DATA_OVERFLOWING, DATA_OVERFLOW_DIVIDER, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\n\n/**\n * @internal\n * @param update - Callback when overflow state changes\n * @param options - Options to configure the overflow container\n * @returns - ref to attach to an intrinsic HTML element and imperative functions\n */\nexport const useOverflowContainer = <TElement extends HTMLElement>(\n update: OnUpdateOverflow,\n options: Omit<OverflowOptions, 'onUpdateOverflow'>,\n): UseOverflowContainerReturn<TElement> => {\n const {\n overflowAxis = 'horizontal',\n overflowDirection = 'end',\n padding = 10,\n minimumVisible = 0,\n onUpdateItemVisibility = noop,\n hasHiddenItems = false,\n } = options;\n\n const onUpdateItemVisibilityCallback = useEventCallback(onUpdateItemVisibility);\n\n const observeOptions: Required<OverflowOptions> = React.useMemo(\n () => ({\n overflowAxis,\n overflowDirection,\n padding,\n minimumVisible,\n onUpdateItemVisibility: onUpdateItemVisibilityCallback,\n onUpdateOverflow: update,\n hasHiddenItems,\n }),\n [minimumVisible, onUpdateItemVisibilityCallback, overflowAxis, overflowDirection, padding, update, hasHiddenItems],\n );\n\n const containerRef = React.useRef<TElement>(null);\n\n const managerRef = React.useRef<OverflowManager | null>(null);\n\n if (managerRef.current === null) {\n managerRef.current = canUseDOM() ? createOverflowManager(observeOptions) : null;\n }\n\n useIsomorphicLayoutEffect(() => {\n if (managerRef.current && containerRef.current) {\n // forceUpdate resolves overflow synchronously for a correct first paint; the manager guards it\n // on the container being measured.\n managerRef.current.observe(containerRef.current, { forceUpdate: true });\n return () => managerRef.current?.disconnect();\n }\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n managerRef.current?.setOptions(observeOptions);\n }, [observeOptions]);\n\n const registerItem = React.useCallback((item: OverflowItemEntry) => {\n managerRef.current?.addItem(item);\n item.element.setAttribute(DATA_OVERFLOW_ITEM, '');\n\n return () => {\n item.element.removeAttribute(DATA_OVERFLOWING);\n item.element.removeAttribute(DATA_OVERFLOW_ITEM);\n managerRef.current?.removeItem(item.id);\n };\n }, []);\n\n const registerDivider = React.useCallback((divider: OverflowDividerEntry) => {\n const el = divider.element;\n managerRef.current?.addDivider(divider);\n el.setAttribute(DATA_OVERFLOW_DIVIDER, '');\n\n return () => {\n managerRef.current?.removeDivider(divider.groupId);\n el.removeAttribute(DATA_OVERFLOW_DIVIDER);\n };\n }, []);\n\n const registerOverflowMenu = React.useCallback((el: HTMLElement) => {\n el.setAttribute(DATA_OVERFLOW_MENU, '');\n managerRef.current?.addOverflowMenu(el);\n\n return () => {\n managerRef.current?.removeOverflowMenu();\n el.removeAttribute(DATA_OVERFLOW_MENU);\n };\n }, []);\n\n const updateOverflow = React.useCallback(() => {\n managerRef.current?.update();\n }, []);\n\n const getSnapshot = React.useCallback<OverflowManager['getSnapshot']>(\n () => managerRef.current?.getSnapshot() ?? EMPTY_SNAPSHOT,\n [],\n );\n\n const subscribe = React.useCallback<OverflowManager['subscribe']>(\n listener => managerRef.current?.subscribe(listener) ?? noop,\n [],\n );\n\n const forceUpdateOverflow = React.useCallback(() => {\n managerRef.current?.forceUpdate();\n }, []);\n\n return {\n registerItem,\n registerDivider,\n registerOverflowMenu,\n updateOverflow,\n forceUpdateOverflow,\n containerRef,\n getSnapshot,\n subscribe,\n };\n};\n\nconst noop = () => {\n /* noop */\n};\n\nexport const updateVisibilityAttribute: OnUpdateItemVisibility = ({ item, visible }) => {\n if (visible) {\n item.element.removeAttribute(DATA_OVERFLOWING);\n } else {\n item.element.setAttribute(DATA_OVERFLOWING, '');\n }\n};\n"],"names":["React","createOverflowManager","EMPTY_SNAPSHOT","canUseDOM","useEventCallback","useIsomorphicLayoutEffect","DATA_OVERFLOWING","DATA_OVERFLOW_DIVIDER","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","useOverflowContainer","update","options","overflowAxis","overflowDirection","padding","minimumVisible","onUpdateItemVisibility","noop","hasHiddenItems","onUpdateItemVisibilityCallback","observeOptions","useMemo","onUpdateOverflow","containerRef","useRef","managerRef","current","observe","forceUpdate","disconnect","setOptions","registerItem","useCallback","item","addItem","element","setAttribute","removeAttribute","removeItem","id","registerDivider","divider","el","addDivider","removeDivider","groupId","registerOverflowMenu","addOverflowMenu","removeOverflowMenu","updateOverflow","getSnapshot","subscribe","listener","forceUpdateOverflow","updateVisibilityAttribute","visible"],"mappings":"AAAA
|
|
1
|
+
{"version":3,"sources":["../src/useOverflowContainer.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createOverflowManager, EMPTY_SNAPSHOT } from '@fluentui/priority-overflow';\n\n/**\n * @internal\n */\nimport type {\n OnUpdateItemVisibility,\n OnUpdateOverflow,\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowManager,\n OverflowOptions,\n} from '@fluentui/priority-overflow';\nimport { canUseDOM, useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport type { UseOverflowContainerReturn } from './types';\nimport { DATA_OVERFLOWING, DATA_OVERFLOW_DIVIDER, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\n\n/**\n * @internal\n * @param update - Callback when overflow state changes\n * @param options - Options to configure the overflow container\n * @returns - ref to attach to an intrinsic HTML element and imperative functions\n */\nexport const useOverflowContainer = <TElement extends HTMLElement>(\n update: OnUpdateOverflow,\n options: Omit<OverflowOptions, 'onUpdateOverflow'>,\n): UseOverflowContainerReturn<TElement> => {\n const {\n overflowAxis = 'horizontal',\n overflowDirection = 'end',\n padding = 10,\n minimumVisible = 0,\n onUpdateItemVisibility = noop,\n hasHiddenItems = false,\n } = options;\n\n const onUpdateItemVisibilityCallback = useEventCallback(onUpdateItemVisibility);\n\n const observeOptions: Required<OverflowOptions> = React.useMemo(\n () => ({\n overflowAxis,\n overflowDirection,\n padding,\n minimumVisible,\n onUpdateItemVisibility: onUpdateItemVisibilityCallback,\n onUpdateOverflow: update,\n hasHiddenItems,\n }),\n [minimumVisible, onUpdateItemVisibilityCallback, overflowAxis, overflowDirection, padding, update, hasHiddenItems],\n );\n\n const containerRef = React.useRef<TElement>(null);\n\n const managerRef = React.useRef<OverflowManager | null>(null);\n\n if (managerRef.current === null) {\n managerRef.current = canUseDOM() ? createOverflowManager(observeOptions) : null;\n }\n\n useIsomorphicLayoutEffect(() => {\n if (managerRef.current && containerRef.current) {\n // forceUpdate resolves overflow synchronously for a correct first paint; the manager guards it\n // on the container being measured.\n managerRef.current.observe(containerRef.current, { forceUpdate: true });\n return () => managerRef.current?.disconnect();\n }\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n managerRef.current?.setOptions(observeOptions);\n }, [observeOptions]);\n\n const registerItem = React.useCallback((item: OverflowItemEntry) => {\n managerRef.current?.addItem(item);\n item.element.setAttribute(DATA_OVERFLOW_ITEM, '');\n\n return () => {\n item.element.removeAttribute(DATA_OVERFLOWING);\n item.element.removeAttribute(DATA_OVERFLOW_ITEM);\n managerRef.current?.removeItem(item.id);\n };\n }, []);\n\n const registerDivider = React.useCallback((divider: OverflowDividerEntry) => {\n const el = divider.element;\n managerRef.current?.addDivider(divider);\n el.setAttribute(DATA_OVERFLOW_DIVIDER, '');\n\n return () => {\n managerRef.current?.removeDivider(divider.groupId);\n el.removeAttribute(DATA_OVERFLOW_DIVIDER);\n };\n }, []);\n\n const registerOverflowMenu = React.useCallback((el: HTMLElement) => {\n el.setAttribute(DATA_OVERFLOW_MENU, '');\n managerRef.current?.addOverflowMenu(el);\n\n return () => {\n managerRef.current?.removeOverflowMenu();\n el.removeAttribute(DATA_OVERFLOW_MENU);\n };\n }, []);\n\n const updateOverflow = React.useCallback(() => {\n managerRef.current?.update();\n }, []);\n\n const getSnapshot = React.useCallback<OverflowManager['getSnapshot']>(\n () => managerRef.current?.getSnapshot() ?? EMPTY_SNAPSHOT,\n [],\n );\n\n const subscribe = React.useCallback<OverflowManager['subscribe']>(\n listener => managerRef.current?.subscribe(listener) ?? noop,\n [],\n );\n\n const forceUpdateOverflow = React.useCallback(() => {\n managerRef.current?.forceUpdate();\n }, []);\n\n return {\n registerItem,\n registerDivider,\n registerOverflowMenu,\n updateOverflow,\n forceUpdateOverflow,\n containerRef,\n getSnapshot,\n subscribe,\n };\n};\n\nconst noop = () => {\n /* noop */\n};\n\nexport const updateVisibilityAttribute: OnUpdateItemVisibility = ({ item, visible }) => {\n if (visible) {\n item.element.removeAttribute(DATA_OVERFLOWING);\n } else {\n item.element.setAttribute(DATA_OVERFLOWING, '');\n }\n};\n"],"names":["React","createOverflowManager","EMPTY_SNAPSHOT","canUseDOM","useEventCallback","useIsomorphicLayoutEffect","DATA_OVERFLOWING","DATA_OVERFLOW_DIVIDER","DATA_OVERFLOW_ITEM","DATA_OVERFLOW_MENU","useOverflowContainer","update","options","overflowAxis","overflowDirection","padding","minimumVisible","onUpdateItemVisibility","noop","hasHiddenItems","onUpdateItemVisibilityCallback","observeOptions","useMemo","onUpdateOverflow","containerRef","useRef","managerRef","current","observe","forceUpdate","disconnect","setOptions","registerItem","useCallback","item","addItem","element","setAttribute","removeAttribute","removeItem","id","registerDivider","divider","el","addDivider","removeDivider","groupId","registerOverflowMenu","addOverflowMenu","removeOverflowMenu","updateOverflow","getSnapshot","subscribe","listener","forceUpdateOverflow","updateVisibilityAttribute","visible"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useOverflowItem.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useOverflowContext } from './overflowContext';\n\n/**\n * Registers an overflow item\n *\n * @internal\n * @param id - unique identifier for the item used by the overflow manager\n * @param priority - higher priority means the item overflows later\n * @param groupId - assigns the item to a group, group visibility can be watched\n * @param pinned - if true, the item will never overflow and will always be visible\n * @returns ref to assign to an intrinsic HTML element\n */\nexport function useOverflowItem<TElement extends HTMLElement>(\n id: string,\n priority?: number,\n groupId?: string,\n pinned?: boolean,\n): React.RefObject<TElement | null> {\n const ref = React.useRef<TElement | null>(null);\n const registerItem = useOverflowContext(v => v.registerItem);\n\n useIsomorphicLayoutEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof pinned !== 'undefined' && typeof priority !== 'undefined' && pinned) {\n // eslint-disable-next-line no-console\n console.error(\n `useOverflowItem: Overflow item with id \"${id}\" has pinned=true and priority<0. ` +\n `Pinned items are always visible and should not have defined priority.`,\n );\n }\n }\n\n if (ref.current) {\n return registerItem({\n element: ref.current,\n id,\n priority: priority ?? 0,\n groupId,\n pinned,\n });\n }\n }, [id, priority, registerItem, groupId, pinned]);\n\n return ref;\n}\n"],"names":["React","useIsomorphicLayoutEffect","useOverflowContext","useOverflowItem","id","priority","groupId","pinned","ref","useRef","registerItem","v","process","env","NODE_ENV","console","error","current","element"],"mappings":"AAAA;;;;;+BAgBgBG;;;;;;;iEAdO,QAAQ;gCACW,4BAA4B;iCACnC,uBAAoB;AAYhD,yBACLC,EAAU,EACVC,QAAiB,EACjBC,OAAgB,EAChBC,MAAgB;IAEhB,MAAMC,MAAMR,OAAMS,MAAM,CAAkB;IAC1C,MAAMC,mBAAeR,mCAAAA,EAAmBS,CAAAA,IAAKA,EAAED,YAAY;QAE3DT,yCAAAA,EAA0B;QACxB,IAAIW,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,IAAI,OAAOP,WAAW,eAAe,OAAOF,aAAa,eAAeE,QAAQ;gBAC9E,sCAAsC;gBACtCQ,QAAQC,KAAK,CACX,CAAC,wCAAwC,EAAEZ,GAAG,kCAAkC,CAAC,GAC/E,CAAC,qEAAqE,CAAC;YAE7E;QACF;QAEA,IAAII,IAAIS,OAAO,EAAE;YACf,OAAOP,aAAa;gBAClBQ,SAASV,IAAIS,OAAO;gBACpBb;gBACAC,
|
|
1
|
+
{"version":3,"sources":["../src/useOverflowItem.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useOverflowContext } from './overflowContext';\n\n/**\n * Registers an overflow item\n *\n * @internal\n * @param id - unique identifier for the item used by the overflow manager\n * @param priority - higher priority means the item overflows later\n * @param groupId - assigns the item to a group, group visibility can be watched\n * @param pinned - if true, the item will never overflow and will always be visible\n * @returns ref to assign to an intrinsic HTML element\n */\nexport function useOverflowItem<TElement extends HTMLElement>(\n id: string,\n priority?: number,\n groupId?: string,\n pinned?: boolean,\n): React.RefObject<TElement | null> {\n const ref = React.useRef<TElement | null>(null);\n const registerItem = useOverflowContext(v => v.registerItem);\n\n useIsomorphicLayoutEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof pinned !== 'undefined' && typeof priority !== 'undefined' && pinned) {\n // eslint-disable-next-line no-console\n console.error(\n `useOverflowItem: Overflow item with id \"${id}\" has pinned=true and priority<0. ` +\n `Pinned items are always visible and should not have defined priority.`,\n );\n }\n }\n\n if (ref.current) {\n return registerItem({\n element: ref.current,\n id,\n priority: priority ?? 0,\n groupId,\n pinned,\n });\n }\n }, [id, priority, registerItem, groupId, pinned]);\n\n return ref;\n}\n"],"names":["React","useIsomorphicLayoutEffect","useOverflowContext","useOverflowItem","id","priority","groupId","pinned","ref","useRef","registerItem","v","process","env","NODE_ENV","console","error","current","element"],"mappings":"AAAA;;;;;+BAgBgBG;;;;;;;iEAdO,QAAQ;gCACW,4BAA4B;iCACnC,uBAAoB;AAYhD,yBACLC,EAAU,EACVC,QAAiB,EACjBC,OAAgB,EAChBC,MAAgB;IAEhB,MAAMC,MAAMR,OAAMS,MAAM,CAAkB;IAC1C,MAAMC,mBAAeR,mCAAAA,EAAmBS,CAAAA,IAAKA,EAAED,YAAY;QAE3DT,yCAAAA,EAA0B;QACxB,IAAIW,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,IAAI,OAAOP,WAAW,eAAe,OAAOF,aAAa,eAAeE,QAAQ;gBAC9E,sCAAsC;gBACtCQ,QAAQC,KAAK,CACX,CAAC,wCAAwC,EAAEZ,GAAG,kCAAkC,CAAC,GAC/E,CAAC,qEAAqE,CAAC;YAE7E;QACF;QAEA,IAAII,IAAIS,OAAO,EAAE;YACf,OAAOP,aAAa;gBAClBQ,SAASV,IAAIS,OAAO;gBACpBb;gBACAC,QAAQ,EAAEA,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,WAAY;gBACtBC;gBACAC;YACF;QACF;IACF,GAAG;QAACH;QAAIC;QAAUK;QAAcJ;QAASC;KAAO;IAEhD,OAAOC;AACT"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-overflow",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
4
4
|
"description": "React bindings for @fluentui/priority-overflow",
|
|
5
5
|
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
|
-
"sideEffects":
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"**/*.css"
|
|
10
|
+
],
|
|
9
11
|
"repository": {
|
|
10
12
|
"type": "git",
|
|
11
13
|
"url": "https://github.com/microsoft/fluentui"
|
|
12
14
|
},
|
|
13
15
|
"license": "MIT",
|
|
14
16
|
"dependencies": {
|
|
15
|
-
"@fluentui/priority-overflow": "9.
|
|
16
|
-
"@fluentui/react-shared-contexts": "9.
|
|
17
|
-
"@fluentui/react-theme": "9.
|
|
18
|
-
"@fluentui/react-utilities": "9.
|
|
17
|
+
"@fluentui/priority-overflow": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
18
|
+
"@fluentui/react-shared-contexts": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
19
|
+
"@fluentui/react-theme": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
20
|
+
"@fluentui/react-utilities": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
19
21
|
"@griffel/react": "^1.5.32",
|
|
20
|
-
"@swc/helpers": "^0.5.1"
|
|
22
|
+
"@swc/helpers": "^0.5.1",
|
|
23
|
+
"clsx": "^2.1.1"
|
|
21
24
|
},
|
|
22
25
|
"peerDependencies": {
|
|
23
26
|
"@types/react": ">=16.14.0 <20.0.0",
|
|
@@ -40,7 +43,6 @@
|
|
|
40
43
|
"default": "./lib-commonjs/index.cjs"
|
|
41
44
|
}
|
|
42
45
|
},
|
|
43
|
-
"./metadata.json": "./dist/metadata/index.json",
|
|
44
46
|
"./package.json": "./package.json"
|
|
45
47
|
},
|
|
46
48
|
"files": [
|
|
@@ -48,9 +50,7 @@
|
|
|
48
50
|
"dist/*.d.ts",
|
|
49
51
|
"dist/*.d.cts",
|
|
50
52
|
"lib",
|
|
51
|
-
"lib-commonjs"
|
|
52
|
-
"dist/metadata"
|
|
53
|
+
"lib-commonjs"
|
|
53
54
|
],
|
|
54
|
-
"type": "module"
|
|
55
|
-
"fluentuiCatalog": "./metadata.json"
|
|
55
|
+
"type": "module"
|
|
56
56
|
}
|