@fluentui/react-button 0.0.0-nightly-20240727-0949.1 → 0.0.0-nightly-20240727-2000.1

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/index.d.ts +3 -4
  3. package/lib/components/Button/Button.js +1 -5
  4. package/lib/components/Button/Button.js.map +1 -1
  5. package/lib/components/Button/Button.types.js.map +1 -1
  6. package/lib/components/CompoundButton/CompoundButton.js +1 -5
  7. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  8. package/lib/components/MenuButton/MenuButton.js +1 -5
  9. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  10. package/lib/components/SplitButton/SplitButton.js +1 -5
  11. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  12. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  13. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  14. package/lib/components/ToggleButton/ToggleButton.js +1 -5
  15. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  16. package/lib-commonjs/components/Button/Button.js +0 -2
  17. package/lib-commonjs/components/Button/Button.js.map +1 -1
  18. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  19. package/lib-commonjs/components/CompoundButton/CompoundButton.js +0 -2
  20. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  21. package/lib-commonjs/components/MenuButton/MenuButton.js +0 -2
  22. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  23. package/lib-commonjs/components/SplitButton/SplitButton.js +0 -2
  24. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  25. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  26. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  27. package/lib-commonjs/components/ToggleButton/ToggleButton.js +0 -2
  28. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  29. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,26 +1,26 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Sat, 27 Jul 2024 09:59:18 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 27 Jul 2024 20:10:49 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20240727-0949.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20240727-0949.1)
7
+ ## [0.0.0-nightly-20240727-2000.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20240727-2000.1)
8
8
 
9
- Sat, 27 Jul 2024 09:59:18 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.87..@fluentui/react-button_v0.0.0-nightly-20240727-0949.1)
9
+ Sat, 27 Jul 2024 20:10:49 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.87..@fluentui/react-button_v0.0.0-nightly-20240727-2000.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
16
- - Bump @fluentui/react-aria to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
19
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
20
- - Bump @fluentui/react-theme to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
21
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
22
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
23
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20240727-0949.1 ([commit](https://github.com/microsoft/fluentui/commit/4343e60c0174ac0a9f796c3a6b8afa6ab0f4d99d) by beachball)
15
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
16
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
22
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
23
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20240727-2000.1 ([commit](https://github.com/microsoft/fluentui/commit/026719079a57e48ed371a8d06f5f2c6a8f8fee9e) by beachball)
24
24
 
25
25
  ## [9.3.87](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.87)
26
26
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@
3
3
  import type { ARIAButtonSlotProps } from '@fluentui/react-aria';
4
4
  import type { ComponentProps } from '@fluentui/react-utilities';
5
5
  import type { ComponentState } from '@fluentui/react-utilities';
6
- import type { DistributivePick } from '@fluentui/react-utilities';
7
6
  import { ForwardRefComponent } from '@fluentui/react-utilities';
8
7
  import * as React_2 from 'react';
9
8
  import type { Slot } from '@fluentui/react-utilities';
@@ -92,7 +91,7 @@ export declare type ButtonSlots = {
92
91
  icon?: Slot<'span'>;
93
92
  };
94
93
 
95
- export declare type ButtonState = ComponentState<ButtonSlots> & Required<DistributivePick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {
94
+ export declare type ButtonState = ComponentState<ButtonSlots> & Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {
96
95
  /**
97
96
  * A button can contain only an icon.
98
97
  *
@@ -172,7 +171,7 @@ export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
172
171
 
173
172
  export declare const splitButtonClassNames: SlotClassNames<SplitButtonSlots>;
174
173
 
175
- export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & DistributivePick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'icon' | 'iconPosition' | 'shape' | 'size'> & DistributivePick<MenuButtonProps, 'menuIcon'>;
174
+ export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root' | 'as'> & Omit<MenuButtonProps, 'root' | 'as'>;
176
175
 
177
176
  export declare type SplitButtonSlots = {
178
177
  /**
@@ -254,7 +253,7 @@ export declare const useMenuButtonStyles_unstable: (state: MenuButtonState) => M
254
253
  * @param props - User provided props to the SplitButton component.
255
254
  * @param ref - User provided ref to be passed to the SplitButton component.
256
255
  */
257
- export declare const useSplitButton_unstable: (props: SplitButtonProps, ref: React_2.Ref<HTMLDivElement>) => SplitButtonState;
256
+ export declare const useSplitButton_unstable: (props: SplitButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => SplitButtonState;
258
257
 
259
258
  export declare const useSplitButtonStyles_unstable: (state: SplitButtonState) => SplitButtonState;
260
259
 
@@ -5,15 +5,11 @@ import { useButtonStyles_unstable } from './useButtonStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * Buttons give people a way to trigger an action.
8
- */ //TODO: migrate to fc to ensure v18 compatibility
9
- // eslint-disable-next-line deprecation/deprecation
10
- export const Button = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ */ export const Button = /*#__PURE__*/ React.forwardRef((props, ref)=>{
11
9
  const state = useButton_unstable(props, ref);
12
10
  useButtonStyles_unstable(state);
13
11
  useCustomStyleHook_unstable('useButtonStyles_unstable')(state);
14
12
  return renderButton_unstable(state);
15
- //FIXME: migrate to fc to remove this assertion
16
13
  // Casting is required due to lack of distributive union to support unions on @types/react
17
- // eslint-disable-next-line deprecation/deprecation
18
14
  });
19
15
  Button.displayName = 'Button';
@@ -1 +1 @@
1
- {"version":3,"sources":["Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles.styles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useButtonStyles_unstable')(state);\n\n return renderButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"names":["React","renderButton_unstable","useButton_unstable","useButtonStyles_unstable","useCustomStyleHook_unstable","Button","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,wBAAwB,QAAQ,2BAA2B;AAGpE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,iDAAiD;AACjD,mDAAmD;AACnD,OAAO,MAAMC,uBAA2CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQP,mBAAmBK,OAAOC;IAExCL,yBAAyBM;IAEzBL,4BAA4B,4BAA4BK;IAExD,OAAOR,sBAAsBQ;AAC7B,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD,GAAuC;AAEvCJ,OAAOK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles.styles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useButtonStyles_unstable')(state);\n\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"names":["React","renderButton_unstable","useButton_unstable","useButtonStyles_unstable","useCustomStyleHook_unstable","Button","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,wBAAwB,QAAQ,2BAA2B;AAGpE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,uBAA2CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQP,mBAAmBK,OAAOC;IAExCL,yBAAyBM;IAEzBL,4BAA4B,4BAA4BK;IAExD,OAAOR,sBAAsBQ;AAC7B,0FAA0F;AAC5F,GAAuC;AAEvCJ,OAAOK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Button.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, DistributivePick, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<\n DistributivePick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>\n > & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":"AAuEA,WAUI"}
1
+ {"version":3,"sources":["Button.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":"AAuEA,WAQI"}
@@ -5,15 +5,11 @@ import { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styl
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * CompoundButtons are buttons that can have secondary content that adds extra information to the user.
8
- */ //TODO: migrate to fc to ensure v18 compatibility
9
- // eslint-disable-next-line deprecation/deprecation
10
- export const CompoundButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ */ export const CompoundButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
11
9
  const state = useCompoundButton_unstable(props, ref);
12
10
  useCompoundButtonStyles_unstable(state);
13
11
  useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);
14
12
  return renderCompoundButton_unstable(state);
15
- //FIXME: migrate to fc to remove this assertion
16
13
  // Casting is required due to lack of distributive union to support unions on @types/react
17
- // eslint-disable-next-line deprecation/deprecation
18
14
  });
19
15
  CompoundButton.displayName = 'CompoundButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n\n return renderCompoundButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"names":["React","renderCompoundButton_unstable","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","CompoundButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,gCAAgC,QAAQ,mCAAmC;AAGpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,iDAAiD;AACjD,mDAAmD;AACnD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOR,8BAA8BQ;AACrC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD,GAA+C;AAE/CJ,eAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"names":["React","renderCompoundButton_unstable","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","CompoundButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,gCAAgC,QAAQ,mCAAmC;AAGpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOR,8BAA8BQ;AACrC,0FAA0F;AAC5F,GAA+C;AAE/CJ,eAAeK,WAAW,GAAG"}
@@ -6,15 +6,11 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close
8
8
  * menus.
9
- */ //TODO: migrate to fc to ensure v18 compatibility
10
- // eslint-disable-next-line deprecation/deprecation
11
- export const MenuButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ */ export const MenuButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
12
10
  const state = useMenuButton_unstable(props, ref);
13
11
  useMenuButtonStyles_unstable(state);
14
12
  useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);
15
13
  return renderMenuButton_unstable(state);
16
- //FIXME: migrate to fc to remove this assertion
17
14
  // Casting is required due to lack of distributive union to support unions on @types/react
18
- // eslint-disable-next-line deprecation/deprecation
19
15
  });
20
16
  MenuButton.displayName = 'MenuButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n\n return renderMenuButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"],"names":["React","renderMenuButton_unstable","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","MenuButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,iDAAiD;AACjD,mDAAmD;AACnD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CL,6BAA6BM;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOR,0BAA0BQ;AACjC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD,GAA2C;AAE3CJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n\n return renderMenuButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"],"names":["React","renderMenuButton_unstable","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","MenuButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CL,6BAA6BM;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOR,0BAA0BQ;AACjC,0FAA0F;AAC5F,GAA2C;AAE3CJ,WAAWK,WAAW,GAAG"}
@@ -6,15 +6,11 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary
8
8
  * action, while interacting with the second one opens a menu with secondary actions.
9
- */ //TODO: migrate to fc to ensure v18 compatibility
10
- // eslint-disable-next-line deprecation/deprecation
11
- export const SplitButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ */ export const SplitButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
12
10
  const state = useSplitButton_unstable(props, ref);
13
11
  useSplitButtonStyles_unstable(state);
14
12
  useCustomStyleHook_unstable('useSplitButtonStyles_unstable')(state);
15
13
  return renderSplitButton_unstable(state);
16
- //FIXME: migrate to fc to remove this assertion
17
14
  // Casting is required due to lack of distributive union to support unions on @types/react
18
- // eslint-disable-next-line deprecation/deprecation
19
15
  });
20
16
  SplitButton.displayName = 'SplitButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["SplitButton.tsx"],"sourcesContent":["import * 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 { 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 */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef((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 //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,iDAAiD;AACjD,mDAAmD;AACnD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,wBAAwBK,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOR,2BAA2BQ;AAClC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD,GAA4C;AAE5CJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["SplitButton.tsx"],"sourcesContent":["import * 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 { 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 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}) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"],"names":["React","renderSplitButton_unstable","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","SplitButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,wBAAwBK,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOR,2BAA2BQ;AAClC,0FAA0F;AAC5F,GAA4C;AAE5CJ,YAAYK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, DistributivePick, 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 DistributivePick<\n ButtonProps,\n 'appearance' | 'disabledFocusable' | 'disabled' | 'icon' | 'iconPosition' | 'shape' | 'size'\n > &\n DistributivePick<MenuButtonProps, 'menuIcon'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"],"names":[],"rangeMappings":"","mappings":"AA6BA,WAE4D"}
1
+ {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { 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":[],"rangeMappings":"","mappings":"AA0BA,WAE4D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } 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 {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\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 // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","Button","MenuButton","useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","menuButtonShorthand","optional","defaultProps","renderByDefault","elementType","primaryActionButtonShorthand","id","components","root","always"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;CAIC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASlB,MAAM;IAErB,MAAMmB,sBAAsBlB,KAAKmB,QAAQ,CAACP,YAAY;QACpDQ,cAAc;YACZd;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAapB;IACf;IACA,MAAMqB,+BAA+BvB,KAAKmB,QAAQ,CAACL,qBAAqB;QACtEM,cAAc;YACZd;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAarB;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEiB,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAS,YAAY;YAAEC,MAAM;YAAOd,YAAYV;YAAYY,qBAAqBb;QAAO;QAC/EyB,MAAM1B,KAAK2B,MAAM,CAAC7B,yBAAyB,OAAO;YAAEO;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEkB,aAAa;QAAM;QAC3FV,YAAYM;QACZJ,qBAAqBS;IACvB;AACF,EAAE"}
1
+ {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } 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 = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\n const {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\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 // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","Button","MenuButton","useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","menuButtonShorthand","optional","defaultProps","renderByDefault","elementType","primaryActionButtonShorthand","id","components","root","always"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;CAIC,GACD,OAAO,MAAMC,0BAA0B,CACrCC,OACAC;IAEA,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASlB,MAAM;IAErB,MAAMmB,sBAAsBlB,KAAKmB,QAAQ,CAACP,YAAY;QACpDQ,cAAc;YACZd;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAapB;IACf;IACA,MAAMqB,+BAA+BvB,KAAKmB,QAAQ,CAACL,qBAAqB;QACtEM,cAAc;YACZd;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAarB;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEiB,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAS,YAAY;YAAEC,MAAM;YAAOd,YAAYV;YAAYY,qBAAqBb;QAAO;QAC/EyB,MAAM1B,KAAK2B,MAAM,CAAC7B,yBAAyB,OAAO;YAAEO;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEkB,aAAa;QAAM;QAC3FV,YAAYM;QACZJ,qBAAqBS;IACvB;AACF,EAAE"}
@@ -5,15 +5,11 @@ import { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * ToggleButtons are buttons that toggle between two defined states when triggered.
8
- */ //TODO: migrate to fc to ensure v18 compatibility
9
- // eslint-disable-next-line deprecation/deprecation
10
- export const ToggleButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ */ export const ToggleButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
11
9
  const state = useToggleButton_unstable(props, ref);
12
10
  useToggleButtonStyles_unstable(state);
13
11
  useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);
14
12
  return renderToggleButton_unstable(state);
15
- //FIXME: migrate to fc to remove this assertion
16
13
  // Casting is required due to lack of distributive union to support unions on @types/react
17
- // eslint-disable-next-line deprecation/deprecation
18
14
  });
19
15
  ToggleButton.displayName = 'ToggleButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["React","renderToggleButton_unstable","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","ToggleButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,iDAAiD;AACjD,mDAAmD;AACnD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOR,4BAA4BQ;AACnC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD,GAA6C;AAE7CJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["React","renderToggleButton_unstable","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","ToggleButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOR,4BAA4BQ;AACnC,0FAA0F;AAC5F,GAA6C;AAE7CJ,aAAaK,WAAW,GAAG"}
@@ -19,8 +19,6 @@ const Button = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  (0, _useButtonStylesstyles.useButtonStyles_unstable)(state);
20
20
  (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useButtonStyles_unstable')(state);
21
21
  return (0, _renderButton.renderButton_unstable)(state);
22
- //FIXME: migrate to fc to remove this assertion
23
22
  // Casting is required due to lack of distributive union to support unions on @types/react
24
- // eslint-disable-next-line deprecation/deprecation
25
23
  });
26
24
  Button.displayName = 'Button';
@@ -1 +1 @@
1
- {"version":3,"sources":["Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles.styles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useButtonStyles_unstable')(state);\n\n return renderButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"names":["Button","React","forwardRef","props","ref","state","useButton_unstable","useButtonStyles_unstable","useCustomStyleHook_unstable","renderButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;8BACe;2BACH;uCACM;qCAGG;AAOrC,MAAMA,SAAAA,WAAAA,GAA2CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQC,IAAAA,6BAAAA,EAAmBH,OAAOC;IAExCG,IAAAA,+CAAAA,EAAyBF;IAEzBG,IAAAA,gDAAAA,EAA4B,4BAA4BH;IAExD,OAAOI,IAAAA,mCAAAA,EAAsBJ;AAC7B,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD;AAEAL,OAAOU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles.styles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useButtonStyles_unstable')(state);\n\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"names":["Button","React","forwardRef","props","ref","state","useButton_unstable","useButtonStyles_unstable","useCustomStyleHook_unstable","renderButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;2BACH;uCACM;qCAGG;AAKrC,MAAMA,SAAAA,WAAAA,GAA2CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQC,IAAAA,6BAAAA,EAAmBH,OAAOC;IAExCG,IAAAA,+CAAAA,EAAyBF;IAEzBG,IAAAA,gDAAAA,EAA4B,4BAA4BH;IAExD,OAAOI,IAAAA,mCAAAA,EAAsBJ;AAC7B,0FAA0F;AAC5F;AAEAL,OAAOU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Button.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, DistributivePick, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<\n DistributivePick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>\n > & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":""}
1
+ {"version":3,"sources":["Button.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":""}
@@ -19,8 +19,6 @@ const CompoundButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  (0, _useCompoundButtonStylesstyles.useCompoundButtonStyles_unstable)(state);
20
20
  (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useCompoundButtonStyles_unstable')(state);
21
21
  return (0, _renderCompoundButton.renderCompoundButton_unstable)(state);
22
- //FIXME: migrate to fc to remove this assertion
23
22
  // Casting is required due to lack of distributive union to support unions on @types/react
24
- // eslint-disable-next-line deprecation/deprecation
25
23
  });
26
24
  CompoundButton.displayName = 'CompoundButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n\n return renderCompoundButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"names":["CompoundButton","React","forwardRef","props","ref","state","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","renderCompoundButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;sCACuB;mCACH;+CACM;qCAGL;AAOrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IAEjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACrC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD;AAEAL,eAAeU,WAAW,GAAG"}
1
+ {"version":3,"sources":["CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"names":["CompoundButton","React","forwardRef","props","ref","state","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","renderCompoundButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;sCACuB;mCACH;+CACM;qCAGL;AAKrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IAEjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACrC,0FAA0F;AAC5F;AAEAL,eAAeU,WAAW,GAAG"}
@@ -19,8 +19,6 @@ const MenuButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  (0, _useMenuButtonStylesstyles.useMenuButtonStyles_unstable)(state);
20
20
  (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMenuButtonStyles_unstable')(state);
21
21
  return (0, _renderMenuButton.renderMenuButton_unstable)(state);
22
- //FIXME: migrate to fc to remove this assertion
23
22
  // Casting is required due to lack of distributive union to support unions on @types/react
24
- // eslint-disable-next-line deprecation/deprecation
25
23
  });
26
24
  MenuButton.displayName = 'MenuButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["MenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n\n return renderMenuButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"],"names":["MenuButton","React","forwardRef","props","ref","state","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","renderMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;kCACmB;+BACH;2CACM;qCAGD;AAQrC,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAE5CG,IAAAA,uDAAAA,EAA6BF;IAE7BG,IAAAA,gDAAAA,EAA4B,gCAAgCH;IAE5D,OAAOI,IAAAA,2CAAAA,EAA0BJ;AACjC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD;AAEAL,WAAWU,WAAW,GAAG"}
1
+ {"version":3,"sources":["MenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n\n return renderMenuButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"],"names":["MenuButton","React","forwardRef","props","ref","state","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","renderMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;+BACH;2CACM;qCAGD;AAMrC,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAE5CG,IAAAA,uDAAAA,EAA6BF;IAE7BG,IAAAA,gDAAAA,EAA4B,gCAAgCH;IAE5D,OAAOI,IAAAA,2CAAAA,EAA0BJ;AACjC,0FAA0F;AAC5F;AAEAL,WAAWU,WAAW,GAAG"}
@@ -19,8 +19,6 @@ const SplitButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  (0, _useSplitButtonStylesstyles.useSplitButtonStyles_unstable)(state);
20
20
  (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useSplitButtonStyles_unstable')(state);
21
21
  return (0, _renderSplitButton.renderSplitButton_unstable)(state);
22
- //FIXME: migrate to fc to remove this assertion
23
22
  // Casting is required due to lack of distributive union to support unions on @types/react
24
- // eslint-disable-next-line deprecation/deprecation
25
23
  });
26
24
  SplitButton.displayName = 'SplitButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["SplitButton.tsx"],"sourcesContent":["import * 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 { 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 */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef((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 //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"],"names":["SplitButton","React","forwardRef","props","ref","state","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","renderSplitButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;mCACoB;gCACH;4CACM;qCAGF;AAQrC,MAAMA,cAAAA,WAAAA,GAAqDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AAClC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD;AAEAL,YAAYU,WAAW,GAAG"}
1
+ {"version":3,"sources":["SplitButton.tsx"],"sourcesContent":["import * 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 { 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 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}) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"],"names":["SplitButton","React","forwardRef","props","ref","state","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","renderSplitButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;mCACoB;gCACH;4CACM;qCAGF;AAMrC,MAAMA,cAAAA,WAAAA,GAAqDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AAClC,0FAA0F;AAC5F;AAEAL,YAAYU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, DistributivePick, 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 DistributivePick<\n ButtonProps,\n 'appearance' | 'disabledFocusable' | 'disabled' | 'icon' | 'iconPosition' | 'shape' | 'size'\n > &\n DistributivePick<MenuButtonProps, 'menuIcon'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"],"names":[],"rangeMappings":"","mappings":""}
1
+ {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { 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":[],"rangeMappings":"","mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } 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 {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\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 // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","slot","optional","defaultProps","renderByDefault","elementType","MenuButton","primaryActionButtonShorthand","id","Button","components","root","always","getIntrinsicElementProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCAC+B;wBAC/B;4BACI;AAQpB,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASC,IAAAA,qBAAAA,EAAM;IAErB,MAAMC,sBAAsBC,oBAAAA,CAAKC,QAAQ,CAACT,YAAY;QACpDU,cAAc;YACZhB;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAO,iBAAiB;QACjBC,aAAaC,sBAAAA;IACf;IACA,MAAMC,+BAA+BN,oBAAAA,CAAKC,QAAQ,CAACP,qBAAqB;QACtEQ,cAAc;YACZhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAgB,IAAIV,SAAS;YACbF;YACAC;QACF;QACAO,iBAAiB;QACjBC,aAAaI,cAAAA;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACET,uBACAO,gCACA,CAACP,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGO,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChCrB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAa,YAAY;YAAEC,MAAM;YAAOlB,YAAYa,sBAAAA;YAAYX,qBAAqBc,cAAAA;QAAO;QAC/EE,MAAMV,oBAAAA,CAAKW,MAAM,CAACC,IAAAA,wCAAAA,EAAyB,OAAO;YAAE3B;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEoB,aAAa;QAAM;QAC3FZ,YAAYO;QACZL,qBAAqBY;IACvB;AACF"}
1
+ {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } 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 = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\n const {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\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 // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","slot","optional","defaultProps","renderByDefault","elementType","MenuButton","primaryActionButtonShorthand","id","Button","components","root","always","getIntrinsicElementProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCAC+B;wBAC/B;4BACI;AAQpB,MAAMA,0BAA0B,CACrCC,OACAC;IAEA,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASC,IAAAA,qBAAAA,EAAM;IAErB,MAAMC,sBAAsBC,oBAAAA,CAAKC,QAAQ,CAACT,YAAY;QACpDU,cAAc;YACZhB;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAO,iBAAiB;QACjBC,aAAaC,sBAAAA;IACf;IACA,MAAMC,+BAA+BN,oBAAAA,CAAKC,QAAQ,CAACP,qBAAqB;QACtEQ,cAAc;YACZhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAgB,IAAIV,SAAS;YACbF;YACAC;QACF;QACAO,iBAAiB;QACjBC,aAAaI,cAAAA;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACET,uBACAO,gCACA,CAACP,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGO,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChCrB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAa,YAAY;YAAEC,MAAM;YAAOlB,YAAYa,sBAAAA;YAAYX,qBAAqBc,cAAAA;QAAO;QAC/EE,MAAMV,oBAAAA,CAAKW,MAAM,CAACC,IAAAA,wCAAAA,EAAyB,OAAO;YAAE3B;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEoB,aAAa;QAAM;QAC3FZ,YAAYO;QACZL,qBAAqBY;IACvB;AACF"}
@@ -19,8 +19,6 @@ const ToggleButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  (0, _useToggleButtonStylesstyles.useToggleButtonStyles_unstable)(state);
20
20
  (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useToggleButtonStyles_unstable')(state);
21
21
  return (0, _renderToggleButton.renderToggleButton_unstable)(state);
22
- //FIXME: migrate to fc to remove this assertion
23
22
  // Casting is required due to lack of distributive union to support unions on @types/react
24
- // eslint-disable-next-line deprecation/deprecation
25
23
  });
26
24
  ToggleButton.displayName = 'ToggleButton';
@@ -1 +1 @@
1
- {"version":3,"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\n//TODO: migrate to fc to ensure v18 compatibility\n// eslint-disable-next-line deprecation/deprecation\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n //FIXME: migrate to fc to remove this assertion\n // Casting is required due to lack of distributive union to support unions on @types/react\n // eslint-disable-next-line deprecation/deprecation\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["ToggleButton","React","forwardRef","props","ref","state","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","renderToggleButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;oCACqB;iCACH;6CACM;qCAGH;AAOrC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACnC,+CAA+C;AAC/C,0FAA0F;AAC1F,mDAAmD;AACrD;AAEAL,aAAaU,WAAW,GAAG"}
1
+ {"version":3,"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["ToggleButton","React","forwardRef","props","ref","state","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","renderToggleButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;oCACqB;iCACH;6CACM;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACnC,0FAA0F;AAC5F;AAEAL,aAAaU,WAAW,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "0.0.0-nightly-20240727-0949.1",
3
+ "version": "0.0.0-nightly-20240727-2000.1",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,20 +27,20 @@
27
27
  "devDependencies": {
28
28
  "@fluentui/a11y-testing": "*",
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20240727-0949.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20240727-0949.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20240727-2000.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20240727-2000.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/keyboard-keys": "0.0.0-nightly-20240727-0949.1",
37
- "@fluentui/react-aria": "0.0.0-nightly-20240727-0949.1",
36
+ "@fluentui/keyboard-keys": "0.0.0-nightly-20240727-2000.1",
37
+ "@fluentui/react-aria": "0.0.0-nightly-20240727-2000.1",
38
38
  "@fluentui/react-icons": "^2.0.245",
39
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20240727-0949.1",
40
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20240727-0949.1",
41
- "@fluentui/react-tabster": "0.0.0-nightly-20240727-0949.1",
42
- "@fluentui/react-theme": "0.0.0-nightly-20240727-0949.1",
43
- "@fluentui/react-utilities": "0.0.0-nightly-20240727-0949.1",
39
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20240727-2000.1",
40
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20240727-2000.1",
41
+ "@fluentui/react-tabster": "0.0.0-nightly-20240727-2000.1",
42
+ "@fluentui/react-theme": "0.0.0-nightly-20240727-2000.1",
43
+ "@fluentui/react-utilities": "0.0.0-nightly-20240727-2000.1",
44
44
  "@griffel/react": "^1.5.22",
45
45
  "@swc/helpers": "^0.5.1"
46
46
  },