@fluentui/react-button 9.74.3-experimental.esm.20260709-49ee7a20cf.0 → 9.74.7-experimental.cli-api.20261006-ccaa611d58.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 +33 -12
- package/dist/index.d.cts +54 -5
- package/dist/index.d.ts +54 -5
- package/dist/metadata/api/api-root.json +1 -0
- package/dist/metadata/index.json +1 -0
- package/lib/CompoundButton.js +1 -1
- package/lib/CompoundButton.js.map +1 -1
- package/lib/SplitButton.js +1 -1
- package/lib/SplitButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/index.js +1 -1
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.js +21 -7
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.types.js +3 -1
- package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib/components/SplitButton/index.js +1 -1
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.js +58 -18
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib-commonjs/CompoundButton.cjs +3 -0
- package/lib-commonjs/CompoundButton.cjs.map +1 -1
- package/lib-commonjs/SplitButton.cjs +3 -0
- package/lib-commonjs/SplitButton.cjs.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.cjs.map +1 -1
- package/lib-commonjs/components/CompoundButton/index.cjs +3 -0
- package/lib-commonjs/components/CompoundButton/index.cjs.map +1 -1
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.cjs.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.cjs +25 -8
- package/lib-commonjs/components/CompoundButton/useCompoundButton.cjs.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.cjs.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.cjs +3 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.cjs.map +1 -1
- package/lib-commonjs/components/SplitButton/index.cjs +3 -0
- package/lib-commonjs/components/SplitButton/index.cjs.map +1 -1
- package/lib-commonjs/components/SplitButton/renderSplitButton.cjs.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.cjs +60 -21
- package/lib-commonjs/components/SplitButton/useSplitButton.cjs.map +1 -1
- package/lib-commonjs/index.cjs +6 -0
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +19 -13
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
renderCompoundButton_unstable: function() {
|
|
19
19
|
return _index.renderCompoundButton_unstable;
|
|
20
20
|
},
|
|
21
|
+
useCompoundButtonBase_unstable: function() {
|
|
22
|
+
return _index.useCompoundButtonBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useCompoundButtonStyles_unstable: function() {
|
|
22
25
|
return _index.useCompoundButtonStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/CompoundButton.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/CompoundButton.ts"],"sourcesContent":["export type {\n CompoundButtonBaseProps,\n CompoundButtonBaseState,\n CompoundButtonProps,\n CompoundButtonSlots,\n CompoundButtonState,\n} from './components/CompoundButton/index';\nexport {\n CompoundButton,\n compoundButtonClassNames,\n renderCompoundButton_unstable,\n useCompoundButtonBase_unstable,\n useCompoundButtonStyles_unstable,\n useCompoundButton_unstable,\n} from './components/CompoundButton/index';\n"],"names":["CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonBase_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable"],"mappings":";;;;;;;;;;;;eAQEA,qBAAc;;;eACdC,+BAAwB;;;eACxBC,oCAA6B;;;eAC7BC,qCAA8B;;;eAC9BC,uCAAgC;;;eAChCC,iCAA0B;;;uBACrB,uCAAoC"}
|
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
splitButtonClassNames: function() {
|
|
19
19
|
return _index.splitButtonClassNames;
|
|
20
20
|
},
|
|
21
|
+
useSplitButtonBase_unstable: function() {
|
|
22
|
+
return _index.useSplitButtonBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useSplitButtonStyles_unstable: function() {
|
|
22
25
|
return _index.useSplitButtonStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SplitButton.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/SplitButton.ts"],"sourcesContent":["export type {\n SplitButtonBaseProps,\n SplitButtonBaseSlots,\n SplitButtonBaseState,\n SplitButtonProps,\n SplitButtonSlots,\n SplitButtonState,\n} from './components/SplitButton/index';\nexport {\n SplitButton,\n renderSplitButton_unstable,\n splitButtonClassNames,\n useSplitButtonStyles_unstable,\n useSplitButton_unstable,\n useSplitButtonBase_unstable,\n} from './components/SplitButton/index';\n"],"names":["SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","useSplitButtonBase_unstable"],"mappings":";;;;;;;;;;;;eASEA,kBAAW;;;eACXC,iCAA0B;;;eAC1BC,4BAAqB;;;eAGrBG,kCAA2B;;;eAF3BF,oCAA6B;;;eAC7BC,8BAAuB;;;uBAElB,oCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/CompoundButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type
|
|
1
|
+
{"version":3,"sources":["../src/components/CompoundButton/CompoundButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonBaseProps, ButtonBaseState, ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type CompoundButtonBaseProps = ComponentProps<Partial<CompoundButtonSlots>> &\n Pick<ButtonBaseProps, 'disabledFocusable' | 'disabled' | 'iconPosition'>;\n\nexport type CompoundButtonProps = CompoundButtonBaseProps & Pick<ButtonProps, 'appearance' | 'shape' | 'size'>;\n\nexport type CompoundButtonBaseState = ComponentState<CompoundButtonSlots> &\n Omit<ButtonBaseState, keyof ButtonSlots | 'components'>;\n\nexport type CompoundButtonState = CompoundButtonBaseState & Pick<ButtonState, 'appearance' | 'shape' | 'size'>;\n"],"names":[],"mappings":""}
|
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
renderCompoundButton_unstable: function() {
|
|
19
19
|
return _renderCompoundButton.renderCompoundButton_unstable;
|
|
20
20
|
},
|
|
21
|
+
useCompoundButtonBase_unstable: function() {
|
|
22
|
+
return _useCompoundButton.useCompoundButtonBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useCompoundButtonStyles_unstable: function() {
|
|
22
25
|
return _useCompoundButtonStylesstyles.useCompoundButtonStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/index.ts"],"sourcesContent":["export { CompoundButton } from './CompoundButton';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/CompoundButton/index.ts"],"sourcesContent":["export { CompoundButton } from './CompoundButton';\nexport type {\n CompoundButtonBaseProps,\n CompoundButtonBaseState,\n CompoundButtonProps,\n CompoundButtonSlots,\n CompoundButtonState,\n} from './CompoundButton.types';\nexport { renderCompoundButton_unstable } from './renderCompoundButton';\nexport { useCompoundButtonBase_unstable, useCompoundButton_unstable } from './useCompoundButton';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\n"],"names":["CompoundButton","renderCompoundButton_unstable","useCompoundButtonBase_unstable","useCompoundButton_unstable","compoundButtonClassNames","useCompoundButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,8BAAc;;;eAUdI,uDAAwB;;;eAFxBH,mDAA6B;;;eAC7BC,iDAA8B;;;eACJG,+DAAgC;;;eAD1BF,6CAA0B;;;gCATpC,sBAAmB;sCAQJ,4BAAyB;mCACI,yBAAsB;+CACtB,sCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/renderCompoundButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/CompoundButton/renderCompoundButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { CompoundButtonBaseState, CompoundButtonSlots } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = (state: CompoundButtonBaseState): JSXElement => {\n assertSlots<CompoundButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <state.root>\n {iconPosition !== 'after' && state.icon && <state.icon />}\n {!iconOnly && (\n <state.contentContainer>\n {state.root.children}\n {state.secondaryContent && <state.secondaryContent />}\n </state.contentContainer>\n )}\n\n {iconPosition === 'after' && state.icon && <state.icon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderCompoundButton_unstable","state","iconOnly","iconPosition","root","icon","contentContainer","children","secondaryContent"],"mappings":";;;;+BAWaC;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;AAQjD,sCAAsC,CAACC;QAC5CF,2BAAAA,EAAiCE;IACjC,MAAM,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGF;IAEnC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMG,IAAI,EAAA;;YACRD,iBAAiB,WAAWF,MAAMI,IAAI,IAAA,WAAA,OAAI,eAAA,EAACJ,MAAMI,IAAI,EAAA,CAAA;YACrD,CAACH,YAAAA,WAAAA,GACA,oBAAA,EAACD,MAAMK,gBAAgB,EAAA;;oBACpBL,MAAMG,IAAI,CAACG,QAAQ;oBACnBN,MAAMO,gBAAgB,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,gBAAgB,EAAA,CAAA;;;YAIrDL,iBAAiB,WAAWF,MAAMI,IAAI,IAAA,WAAA,OAAI,eAAA,EAACJ,MAAMI,IAAI,EAAA,CAAA;;;AAG5D,EAAE"}
|
|
@@ -3,21 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
useCompoundButtonBase_unstable: function() {
|
|
14
|
+
return useCompoundButtonBase_unstable;
|
|
15
|
+
},
|
|
16
|
+
useCompoundButton_unstable: function() {
|
|
9
17
|
return useCompoundButton_unstable;
|
|
10
18
|
}
|
|
11
19
|
});
|
|
12
20
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
21
|
+
const _ButtonContext = require("../../contexts/ButtonContext.cjs");
|
|
13
22
|
const _index = require("../Button/index.cjs");
|
|
14
|
-
const
|
|
23
|
+
const useCompoundButtonBase_unstable = (props, ref)=>{
|
|
15
24
|
var _state_icon, _state_secondaryContent;
|
|
16
25
|
const { contentContainer, secondaryContent, ...buttonProps } = props;
|
|
17
26
|
const state = {
|
|
18
|
-
|
|
19
|
-
...(0, _index.useButton_unstable)(buttonProps, ref),
|
|
20
|
-
// Slots definition
|
|
27
|
+
...(0, _index.useButtonBase_unstable)(buttonProps, ref),
|
|
21
28
|
components: {
|
|
22
29
|
root: 'button',
|
|
23
30
|
icon: 'span',
|
|
@@ -31,7 +38,17 @@ const useCompoundButton_unstable = (props, ref)=>{
|
|
|
31
38
|
elementType: 'span'
|
|
32
39
|
})
|
|
33
40
|
};
|
|
34
|
-
// Recalculate iconOnly to take into account secondaryContent.
|
|
35
41
|
state.iconOnly = Boolean(((_state_icon = state.icon) === null || _state_icon === void 0 ? void 0 : _state_icon.children) && !props.children && !((_state_secondaryContent = state.secondaryContent) === null || _state_secondaryContent === void 0 ? void 0 : _state_secondaryContent.children));
|
|
36
42
|
return state;
|
|
37
43
|
};
|
|
44
|
+
const useCompoundButton_unstable = (props, ref)=>{
|
|
45
|
+
const { size: contextSize } = (0, _ButtonContext.useButtonContext)();
|
|
46
|
+
const { appearance = 'secondary', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium', ...buttonProps } = props;
|
|
47
|
+
const state = useCompoundButtonBase_unstable(buttonProps, ref);
|
|
48
|
+
return {
|
|
49
|
+
appearance,
|
|
50
|
+
shape,
|
|
51
|
+
size,
|
|
52
|
+
...state
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport { useButtonBase_unstable } from '../Button/index';\nimport type {\n CompoundButtonBaseProps,\n CompoundButtonBaseState,\n CompoundButtonProps,\n CompoundButtonState,\n} from './CompoundButton.types';\n\n/**\n * Base hook for CompoundButton, which manages state related to slots structure and ARIA attributes.\n *\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButtonBase_unstable = (\n props: CompoundButtonBaseProps,\n ref?: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonBaseState => {\n const { contentContainer, secondaryContent, ...buttonProps } = props;\n const state: CompoundButtonBaseState = {\n ...useButtonBase_unstable(buttonProps, ref),\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: slot.always(contentContainer, { elementType: 'span' }),\n secondaryContent: slot.optional(secondaryContent, { elementType: 'span' }),\n };\n\n state.iconOnly = Boolean(state.icon?.children && !props.children && !state.secondaryContent?.children);\n return state;\n};\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n props: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', shape = 'rounded', size = contextSize ?? 'medium', ...buttonProps } = props;\n const state = useCompoundButtonBase_unstable(buttonProps, ref);\n\n return {\n appearance,\n shape,\n size,\n ...state,\n };\n};\n"],"names":["slot","useButtonContext","useButtonBase_unstable","useCompoundButtonBase_unstable","props","ref","state","contentContainer","secondaryContent","buttonProps","components","root","icon","always","elementType","optional","iconOnly","Boolean","children","useCompoundButton_unstable","size","contextSize","appearance","shape"],"mappings":"AAAA;;;;;;;;;;;;IAmBaG,8BAAAA;;;8BA0BAgB;;;;gCA1CQ,4BAA4B;+BAChB,kCAA+B;uBACzB,qBAAkB;AAclD,uCAAuC,CAC5Cf,OACAC;QAeyBC,aAA4CA;IAbrE,MAAM,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAE,GAAGC,aAAa,GAAGL;IAC/D,MAAME,QAAiC;QACrC,OAAGJ,6BAAAA,EAAuBO,aAAaJ,IAAI;QAC3CK,YAAY;YACVC,MAAM;YACNC,MAAM;YACNL,kBAAkB;YAClBC,kBAAkB;QACpB;QACAD,kBAAkBP,oBAAAA,CAAKa,MAAM,CAACN,kBAAkB;YAAEO,aAAa;QAAO;QACtEN,kBAAkBR,oBAAAA,CAAKe,QAAQ,CAACP,kBAAkB;YAAEM,aAAa;QAAO;IAC1E;IAEAR,MAAMU,QAAQ,GAAGC,QAAQX,CAAAA,CAAAA,cAAAA,MAAMM,IAAAA,AAAI,MAAA,QAAVN,gBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,YAAYY,QAAAA,AAAQ,KAAI,CAACd,MAAMc,QAAQ,IAAI,CAAA,CAAA,CAACZ,0BAAAA,MAAME,gBAAAA,AAAgB,MAAA,QAAtBF,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAwBY,QAAAA,AAAQ;IACrG,OAAOZ;AACT,EAAE;AAOK,MAAMa,6BAA6B,CACxCf,OACAC;IAEA,MAAM,EAAEe,MAAMC,WAAW,EAAE,OAAGpB,+BAAAA;IAC9B,MAAM,EAAEqB,aAAa,WAAW,EAAEC,QAAQ,SAAS,EAAEH,OAAOC,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,cAAe,QAAQ,EAAE,GAAGZ,aAAa,GAAGL;IACxG,MAAME,QAAQH,+BAA+BM,aAAaJ;IAE1D,OAAO;QACLiB;QACAC;QACAH;QACA,GAAGd,KAAK;IACV;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/SplitButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\nimport type { SplitButtonProps } from './SplitButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef((props, ref) => {\n
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/SplitButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\nimport type { SplitButtonProps } from './SplitButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef<HTMLDivElement, SplitButtonProps>(\n (props, ref) => {\n const state = useSplitButton_unstable(props, ref);\n\n useSplitButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSplitButtonStyles_unstable')(state);\n\n return renderSplitButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n },\n) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"],"names":["React","renderSplitButton_unstable","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","SplitButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;mCACY,yBAAsB;gCACzB,sBAAmB;4CACb,mCAAgC;qCAGlC,kCAAkC;AAMvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAChF,CAACC,OAAOC;IACN,MAAMC,YAAQP,uCAAAA,EAAwBK,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOR,6CAAAA,EAA2BQ;AAClC,0FAA0F;AAC5F,GACyC;AAE3CJ,YAAYK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/SplitButton.types.ts"],"sourcesContent":["import type { Button } from '../Button/Button';\nimport type { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root' | 'as'> &\n Omit<MenuButtonProps, 'root' | 'as'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/SplitButton.types.ts"],"sourcesContent":["import type { Button } from '../Button/Button';\nimport type { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonBaseProps, ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonBaseProps, MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root' | 'as'> &\n Omit<MenuButtonProps, 'root' | 'as'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n\nexport type SplitButtonBaseSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<MenuButtonBaseProps>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<ButtonBaseProps>;\n};\n\n/**\n * SplitButton props without the `appearance`/`size`/`shape` styling props, for headless usage.\n */\nexport type SplitButtonBaseProps = ComponentProps<SplitButtonBaseSlots> &\n Pick<ButtonBaseProps, 'disabled' | 'disabledFocusable' | 'icon' | 'iconPosition'> &\n Pick<MenuButtonBaseProps, 'menuIcon'>;\n\n/**\n * SplitButton state without the `appearance`/`size`/`shape` styling props, for headless usage.\n */\nexport type SplitButtonBaseState = ComponentState<SplitButtonBaseSlots> &\n Required<Pick<SplitButtonBaseProps, 'disabled' | 'disabledFocusable' | 'iconPosition'>>;\n"],"names":[],"mappings":"AAqDA;;CAEC,GACD,WAC0F"}
|
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
splitButtonClassNames: function() {
|
|
19
19
|
return _useSplitButtonStylesstyles.splitButtonClassNames;
|
|
20
20
|
},
|
|
21
|
+
useSplitButtonBase_unstable: function() {
|
|
22
|
+
return _useSplitButton.useSplitButtonBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useSplitButtonStyles_unstable: function() {
|
|
22
25
|
return _useSplitButtonStylesstyles.useSplitButtonStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/index.ts"],"sourcesContent":["export { SplitButton } from './SplitButton';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/index.ts"],"sourcesContent":["export { SplitButton } from './SplitButton';\nexport type {\n SplitButtonBaseProps,\n SplitButtonBaseSlots,\n SplitButtonBaseState,\n SplitButtonProps,\n SplitButtonSlots,\n SplitButtonState,\n} from './SplitButton.types';\nexport { renderSplitButton_unstable } from './renderSplitButton';\nexport { useSplitButton_unstable, useSplitButtonBase_unstable } from './useSplitButton';\nexport { splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\n"],"names":["SplitButton","renderSplitButton_unstable","useSplitButton_unstable","useSplitButtonBase_unstable","splitButtonClassNames","useSplitButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eASXC,6CAA0B;;;eAE1BG,iDAAqB;;;eADID,2CAA2B;;;eAC7BE,yDAA6B;;;eADpDH,uCAAuB;;;6BAVJ,mBAAgB;mCASD,yBAAsB;gCACI,sBAAmB;4CACnB,mCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/renderSplitButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/renderSplitButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ComponentState, JSXElement } from '@fluentui/react-utilities';\n\nimport type { SplitButtonBaseSlots } from './SplitButton.types';\n\n/**\n * Renders a SplitButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderSplitButton_unstable = (\n state: Pick<ComponentState<SplitButtonBaseSlots>, 'root' | 'menuButton' | 'primaryActionButton'>,\n): JSXElement => {\n assertSlots<SplitButtonBaseSlots>(state);\n\n return (\n <state.root>\n {state.primaryActionButton && <state.primaryActionButton />}\n {state.menuButton && <state.menuButton />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSplitButton_unstable","state","root","primaryActionButton","menuButton"],"mappings":";;;;+BAWaC;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;AAQjD,mCAAmC,CACxCC;QAEAF,2BAAAA,EAAkCE;IAElC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,mBAAmB,IAAA,WAAA,OAAI,eAAA,EAACF,MAAME,mBAAmB,EAAA,CAAA;YACvDF,MAAMG,UAAU,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,UAAU,EAAA,CAAA;;;AAG5C,EAAE"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
4
5
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
useSplitButtonBase_unstable: function() {
|
|
14
|
+
return useSplitButtonBase_unstable;
|
|
15
|
+
},
|
|
16
|
+
useSplitButton_unstable: function() {
|
|
8
17
|
return useSplitButton_unstable;
|
|
9
18
|
}
|
|
10
19
|
});
|
|
@@ -12,13 +21,13 @@ const _reactutilities = require("@fluentui/react-utilities");
|
|
|
12
21
|
const _Button = require("../Button/Button.cjs");
|
|
13
22
|
const _MenuButton = require("../MenuButton/MenuButton.cjs");
|
|
14
23
|
const useSplitButton_unstable = (props, ref)=>{
|
|
15
|
-
const { appearance = 'secondary',
|
|
16
|
-
const
|
|
17
|
-
const menuButtonShorthand = _reactutilities.slot.optional(menuButton, {
|
|
24
|
+
const { appearance = 'secondary', icon, menuIcon, shape = 'rounded', size = 'medium', ...rest } = props;
|
|
25
|
+
const baseState = useSplitButtonBase_unstable(rest, ref);
|
|
26
|
+
const menuButtonShorthand = _reactutilities.slot.optional(props.menuButton, {
|
|
18
27
|
defaultProps: {
|
|
28
|
+
...baseState.menuButton,
|
|
19
29
|
appearance,
|
|
20
|
-
|
|
21
|
-
disabledFocusable,
|
|
30
|
+
disabledFocusable: baseState.disabledFocusable,
|
|
22
31
|
menuIcon,
|
|
23
32
|
shape,
|
|
24
33
|
size
|
|
@@ -26,41 +35,71 @@ const useSplitButton_unstable = (props, ref)=>{
|
|
|
26
35
|
renderByDefault: true,
|
|
27
36
|
elementType: _MenuButton.MenuButton
|
|
28
37
|
});
|
|
29
|
-
const primaryActionButtonShorthand = _reactutilities.slot.optional(primaryActionButton, {
|
|
38
|
+
const primaryActionButtonShorthand = _reactutilities.slot.optional(props.primaryActionButton, {
|
|
30
39
|
defaultProps: {
|
|
40
|
+
...baseState.primaryActionButton,
|
|
31
41
|
appearance,
|
|
32
|
-
|
|
33
|
-
disabled,
|
|
34
|
-
disabledFocusable,
|
|
42
|
+
disabledFocusable: baseState.disabledFocusable,
|
|
35
43
|
icon,
|
|
36
|
-
iconPosition,
|
|
37
|
-
id: baseId + '__primaryActionButton',
|
|
44
|
+
iconPosition: baseState.iconPosition,
|
|
38
45
|
shape,
|
|
39
46
|
size
|
|
40
47
|
},
|
|
41
48
|
renderByDefault: true,
|
|
42
49
|
elementType: _Button.Button
|
|
43
50
|
});
|
|
51
|
+
return {
|
|
52
|
+
...baseState,
|
|
53
|
+
// Props passed at the top-level
|
|
54
|
+
appearance,
|
|
55
|
+
shape,
|
|
56
|
+
size,
|
|
57
|
+
// Slots definition
|
|
58
|
+
components: {
|
|
59
|
+
root: 'div',
|
|
60
|
+
menuButton: _MenuButton.MenuButton,
|
|
61
|
+
primaryActionButton: _Button.Button
|
|
62
|
+
},
|
|
63
|
+
menuButton: menuButtonShorthand,
|
|
64
|
+
primaryActionButton: primaryActionButtonShorthand
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const useSplitButtonBase_unstable = (props, ref)=>{
|
|
68
|
+
const { children, disabled = false, disabledFocusable = false, icon, iconPosition = 'before', menuButton, menuIcon, primaryActionButton, ...rest } = props;
|
|
69
|
+
const baseId = (0, _reactutilities.useId)('splitButton-');
|
|
70
|
+
const menuButtonShorthand = _reactutilities.slot.optional(menuButton, {
|
|
71
|
+
defaultProps: {
|
|
72
|
+
disabled
|
|
73
|
+
},
|
|
74
|
+
renderByDefault: true,
|
|
75
|
+
elementType: 'button'
|
|
76
|
+
});
|
|
77
|
+
const primaryActionButtonShorthand = _reactutilities.slot.optional(primaryActionButton, {
|
|
78
|
+
defaultProps: {
|
|
79
|
+
children,
|
|
80
|
+
disabled,
|
|
81
|
+
id: baseId + '__primaryActionButton'
|
|
82
|
+
},
|
|
83
|
+
renderByDefault: true,
|
|
84
|
+
elementType: 'button'
|
|
85
|
+
});
|
|
44
86
|
// Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the
|
|
45
87
|
// user.
|
|
46
88
|
if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
|
|
47
89
|
menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
|
|
48
90
|
}
|
|
49
91
|
return {
|
|
50
|
-
// Props passed at the top-level
|
|
51
|
-
appearance,
|
|
52
92
|
disabled,
|
|
53
93
|
disabledFocusable,
|
|
54
94
|
iconPosition,
|
|
55
|
-
|
|
56
|
-
size,
|
|
95
|
+
// Slots definition
|
|
57
96
|
components: {
|
|
58
97
|
root: 'div',
|
|
59
|
-
menuButton:
|
|
60
|
-
primaryActionButton:
|
|
98
|
+
menuButton: 'button',
|
|
99
|
+
primaryActionButton: 'button'
|
|
61
100
|
},
|
|
62
101
|
root: _reactutilities.slot.always({
|
|
63
|
-
ref
|
|
102
|
+
ref,
|
|
64
103
|
...rest
|
|
65
104
|
}, {
|
|
66
105
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/useSplitButton.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/useSplitButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type {\n SplitButtonBaseProps,\n SplitButtonBaseState,\n SplitButtonProps,\n SplitButtonState,\n} from './SplitButton.types';\n\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButton_unstable = (props: SplitButtonProps, ref: React.Ref<HTMLDivElement>): SplitButtonState => {\n const { appearance = 'secondary', icon, menuIcon, shape = 'rounded', size = 'medium', ...rest } = props;\n const baseState = useSplitButtonBase_unstable(rest, ref);\n\n const menuButtonShorthand = slot.optional(props.menuButton, {\n defaultProps: {\n ...baseState.menuButton,\n appearance,\n disabledFocusable: baseState.disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(props.primaryActionButton, {\n defaultProps: {\n ...baseState.primaryActionButton,\n appearance,\n disabledFocusable: baseState.disabledFocusable,\n icon,\n iconPosition: baseState.iconPosition,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: Button,\n });\n\n return {\n ...baseState,\n // Props passed at the top-level\n appearance,\n shape,\n size,\n // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n\n/**\n * Base hook for SplitButton component, which manages design-agnostic state related to slots\n * structure and ARIA attributes, without design-specific props such as `appearance`, `shape`, or\n * `size`.\n *\n * Concrete wrappers recreate child slots from these base prop defaults before rendering.\n *\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButtonBase_unstable = (\n props: SplitButtonBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): SplitButtonBaseState => {\n const {\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n ...rest\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n disabled,\n },\n renderByDefault: true,\n elementType: 'button',\n });\n\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n children,\n disabled,\n id: baseId + '__primaryActionButton',\n },\n renderByDefault: true,\n elementType: 'button',\n });\n\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n disabled,\n disabledFocusable,\n iconPosition,\n // Slots definition\n components: { root: 'div', menuButton: 'button', primaryActionButton: 'button' },\n root: slot.always({ ref, ...rest }, { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["useId","slot","Button","MenuButton","useSplitButton_unstable","props","ref","appearance","icon","menuIcon","shape","size","rest","baseState","useSplitButtonBase_unstable","menuButtonShorthand","optional","menuButton","defaultProps","disabledFocusable","renderByDefault","elementType","primaryActionButtonShorthand","primaryActionButton","iconPosition","components","root","children","disabled","baseId","id","always"],"mappings":"AAAA;;;;;;;;;;;;+BAuEac;eAAAA;;IArDAV,uBAAAA;;;;gCAfe,4BAA4B;wBACjC,sBAAmB;4BACf,8BAA2B;AAa/C,gCAAgC,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,aAAa,WAAW,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,SAAS,EAAEC,OAAO,QAAQ,EAAE,GAAGC,MAAM,GAAGP;IAClG,MAAMQ,YAAYC,4BAA4BF,MAAMN;IAEpD,MAAMS,sBAAsBd,oBAAAA,CAAKe,QAAQ,CAACX,MAAMY,UAAU,EAAE;QAC1DC,cAAc;YACZ,GAAGL,UAAUI,UAAU;YACvBV;YACAY,mBAAmBN,UAAUM,iBAAiB;YAC9CV;YACAC;YACAC;QACF;QACAS,iBAAiB;QACjBC,aAAalB,sBAAAA;IACf;IACA,MAAMmB,+BAA+BrB,oBAAAA,CAAKe,QAAQ,CAACX,MAAMkB,mBAAmB,EAAE;QAC5EL,cAAc;YACZ,GAAGL,UAAUU,mBAAmB;YAChChB;YACAY,mBAAmBN,UAAUM,iBAAiB;YAC9CX;YACAgB,cAAcX,UAAUW,YAAY;YACpCd;YACAC;QACF;QACAS,iBAAiB;QACjBC,aAAanB,cAAAA;IACf;IAEA,OAAO;QACL,GAAGW,SAAS;QACZ,gCAAgC;QAChCN;QACAG;QACAC;QACA,mBAAmB;QACnBc,YAAY;YAAEC,MAAM;YAAOT,YAAYd,sBAAAA;YAAYoB,qBAAqBrB,cAAAA;QAAO;QAC/Ee,YAAYF;QACZQ,qBAAqBD;IACvB;AACF,EAAE;AAYK,oCAAoC,CACzCjB,OACAC;IAEA,MAAM,EACJqB,QAAQ,EACRC,WAAW,KAAK,EAChBT,oBAAoB,KAAK,EACzBX,IAAI,EACJgB,eAAe,QAAQ,EACvBP,UAAU,EACVR,QAAQ,EACRc,mBAAmB,EACnB,GAAGX,MACJ,GAAGP;IACJ,MAAMwB,SAAS7B,yBAAAA,EAAM;IAErB,MAAMe,sBAAsBd,oBAAAA,CAAKe,QAAQ,CAACC,YAAY;QACpDC,cAAc;YACZU;QACF;QACAR,iBAAiB;QACjBC,aAAa;IACf;IAEA,MAAMC,+BAA+BrB,oBAAAA,CAAKe,QAAQ,CAACO,qBAAqB;QACtEL,cAAc;YACZS;YACAC;YACAE,IAAID,SAAS;QACf;QACAT,iBAAiB;QACjBC,aAAa;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEN,uBACAO,gCACA,CAACP,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGO,6BAA6BQ,EAAE;IAC1E;IAEA,OAAO;QACLF;QACAT;QACAK;QACA,mBAAmB;QACnBC,YAAY;YAAEC,MAAM;YAAOT,YAAY;YAAUM,qBAAqB;QAAS;QAC/EG,MAAMzB,oBAAAA,CAAK8B,MAAM,CAAC;YAAEzB;YAAK,GAAGM,IAAI;QAAC,GAAG;YAAES,aAAa;QAAM;QACzDJ,YAAYF;QACZQ,qBAAqBD;IACvB;AACF,EAAE"}
|
package/lib-commonjs/index.cjs
CHANGED
|
@@ -69,6 +69,9 @@ _export(exports, {
|
|
|
69
69
|
useButton_unstable: function() {
|
|
70
70
|
return _Button.useButton_unstable;
|
|
71
71
|
},
|
|
72
|
+
useCompoundButtonBase_unstable: function() {
|
|
73
|
+
return _CompoundButton.useCompoundButtonBase_unstable;
|
|
74
|
+
},
|
|
72
75
|
useCompoundButtonStyles_unstable: function() {
|
|
73
76
|
return _CompoundButton.useCompoundButtonStyles_unstable;
|
|
74
77
|
},
|
|
@@ -84,6 +87,9 @@ _export(exports, {
|
|
|
84
87
|
useMenuButton_unstable: function() {
|
|
85
88
|
return _MenuButton.useMenuButton_unstable;
|
|
86
89
|
},
|
|
90
|
+
useSplitButtonBase_unstable: function() {
|
|
91
|
+
return _SplitButton.useSplitButtonBase_unstable;
|
|
92
|
+
},
|
|
87
93
|
useSplitButtonStyles_unstable: function() {
|
|
88
94
|
return _SplitButton.useSplitButtonStyles_unstable;
|
|
89
95
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Button,\n buttonClassNames,\n renderButton_unstable,\n useButtonStyles_unstable,\n useButton_unstable,\n useButtonBase_unstable,\n} from './Button';\nexport type { ButtonProps, ButtonSlots, ButtonState, ButtonBaseProps, ButtonBaseState } from './Button';\nexport {\n CompoundButton,\n compoundButtonClassNames,\n renderCompoundButton_unstable,\n useCompoundButtonStyles_unstable,\n useCompoundButton_unstable,\n} from './CompoundButton';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Button,\n buttonClassNames,\n renderButton_unstable,\n useButtonStyles_unstable,\n useButton_unstable,\n useButtonBase_unstable,\n} from './Button';\nexport type { ButtonProps, ButtonSlots, ButtonState, ButtonBaseProps, ButtonBaseState } from './Button';\nexport {\n CompoundButton,\n compoundButtonClassNames,\n renderCompoundButton_unstable,\n useCompoundButtonBase_unstable,\n useCompoundButtonStyles_unstable,\n useCompoundButton_unstable,\n} from './CompoundButton';\nexport type {\n CompoundButtonBaseProps,\n CompoundButtonBaseState,\n CompoundButtonProps,\n CompoundButtonSlots,\n CompoundButtonState,\n} from './CompoundButton';\nexport {\n MenuButton,\n menuButtonClassNames,\n renderMenuButton_unstable,\n useMenuButtonStyles_unstable,\n useMenuButton_unstable,\n useMenuButtonBase_unstable,\n} from './MenuButton';\nexport type {\n MenuButtonProps,\n MenuButtonSlots,\n MenuButtonState,\n MenuButtonBaseProps,\n MenuButtonBaseState,\n} from './MenuButton';\nexport {\n SplitButton,\n renderSplitButton_unstable,\n splitButtonClassNames,\n useSplitButtonStyles_unstable,\n useSplitButton_unstable,\n useSplitButtonBase_unstable,\n} from './SplitButton';\nexport type {\n SplitButtonBaseProps,\n SplitButtonBaseSlots,\n SplitButtonBaseState,\n SplitButtonProps,\n SplitButtonSlots,\n SplitButtonState,\n} from './SplitButton';\nexport {\n ToggleButton,\n renderToggleButton_unstable,\n toggleButtonClassNames,\n useToggleButtonStyles_unstable,\n useToggleButton_unstable,\n useToggleButtonBase_unstable,\n} from './ToggleButton';\nexport type {\n ToggleButtonProps,\n ToggleButtonState,\n ToggleButtonBaseProps,\n ToggleButtonBaseState,\n} from './ToggleButton';\n\nexport { useToggleState } from './utils/index';\n\nexport { ButtonContextProvider, useButtonContext } from './contexts/index';\nexport type { ButtonContextValue } from './contexts/index';\n"],"names":["Button","buttonClassNames","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","useButtonBase_unstable","CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonBase_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","MenuButton","menuButtonClassNames","renderMenuButton_unstable","useMenuButtonStyles_unstable","useMenuButton_unstable","useMenuButtonBase_unstable","SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","useSplitButtonBase_unstable","ToggleButton","renderToggleButton_unstable","toggleButtonClassNames","useToggleButtonStyles_unstable","useToggleButton_unstable","useToggleButtonBase_unstable","useToggleState","ButtonContextProvider","useButtonContext"],"mappings":";;;;;;;;;;;IACEA,MAAM;;;IAuEC+B,qBAAqB;;;;eA9D5BzB,8BAAc;;;eAedM,sBAAU;;IAeVM,WAAW;;;;eAgBXM,0BAAY;;;eAtDZvB,wBAAgB;;;eAShBM,wCAAwB;;;eAexBM,gCAAoB;;;eAvBpBX,6BAAqB;;;eASrBM,6CAA6B;;;eAe7BM,qCAAyB;;IAczBK;sDAA0B;;;eAgB1BM,yCAA2B;;;eAf3BL,kCAAqB;;;eAgBrBM,oCAAsB;;;eApDtBrB,8BAAsB;;;eAkEQ2B,wBAAgB;;;eApE9C7B,gCAAwB;;;eACxBC,0BAAkB;;IAQlBK;6DAA8B;;;eAC9BC,gDAAgC;;;eAChCC,0CAA0B;;IAe1BM;qDAA0B;;;eAF1BF,wCAA4B;;;eAC5BC,kCAAsB;;;eAgBtBO,wCAA2B;;;eAF3BF,0CAA6B;;;eAC7BC,oCAAuB;;;eAiBvBO,0CAA4B;;;eAF5BF,4CAA8B;;;eAC9BC,sCAAwB;;kBAUH;eAAdE;;;wBA/DF,cAAW;gCASX,sBAAmB;4BAenB,kBAAe;6BAef,mBAAgB;8BAgBhB,oBAAiB;uBAQO,mBAAgB;wBAES,sBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-button",
|
|
3
|
-
"version": "9.74.
|
|
3
|
+
"version": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
4
4
|
"description": "Fluent UI React Button component.",
|
|
5
5
|
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,22 +12,25 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui/keyboard-keys": "9.74.
|
|
16
|
-
"@fluentui/react-aria": "9.74.
|
|
15
|
+
"@fluentui/keyboard-keys": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
16
|
+
"@fluentui/react-aria": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
17
17
|
"@fluentui/react-icons": "^2.0.245",
|
|
18
|
-
"@fluentui/react-jsx-runtime": "9.74.
|
|
19
|
-
"@fluentui/react-shared-contexts": "9.74.
|
|
20
|
-
"@fluentui/react-tabster": "9.74.
|
|
21
|
-
"@fluentui/react-theme": "9.74.
|
|
22
|
-
"@fluentui/react-utilities": "9.74.
|
|
18
|
+
"@fluentui/react-jsx-runtime": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
19
|
+
"@fluentui/react-shared-contexts": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
20
|
+
"@fluentui/react-tabster": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
21
|
+
"@fluentui/react-theme": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
22
|
+
"@fluentui/react-utilities": "9.74.7-experimental.cli-api.20261006-ccaa611d58.0",
|
|
23
23
|
"@griffel/react": "^1.5.32",
|
|
24
24
|
"@swc/helpers": "^0.5.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@types/react": ">=16.14.0 <20.0.0",
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"react": ">=16.14.0 <20.0.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependenciesMeta": {
|
|
31
|
+
"@types/react": {
|
|
32
|
+
"optional": true
|
|
33
|
+
}
|
|
31
34
|
},
|
|
32
35
|
"beachball": {},
|
|
33
36
|
"exports": {
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
"default": "./lib-commonjs/index.cjs"
|
|
42
45
|
}
|
|
43
46
|
},
|
|
47
|
+
"./metadata.json": "./dist/metadata/index.json",
|
|
44
48
|
"./package.json": "./package.json"
|
|
45
49
|
},
|
|
46
50
|
"files": [
|
|
@@ -48,7 +52,9 @@
|
|
|
48
52
|
"dist/*.d.ts",
|
|
49
53
|
"dist/*.d.cts",
|
|
50
54
|
"lib",
|
|
51
|
-
"lib-commonjs"
|
|
55
|
+
"lib-commonjs",
|
|
56
|
+
"dist/metadata"
|
|
52
57
|
],
|
|
53
|
-
"type": "module"
|
|
58
|
+
"type": "module",
|
|
59
|
+
"fluentuiCatalog": "./metadata.json"
|
|
54
60
|
}
|