@fluentui/react-aria 9.3.9 → 9.3.11

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.json CHANGED
@@ -2,7 +2,45 @@
2
2
  "name": "@fluentui/react-aria",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 13 Feb 2023 23:40:50 GMT",
5
+ "date": "Wed, 08 Mar 2023 17:38:53 GMT",
6
+ "tag": "@fluentui/react-aria_v9.3.11",
7
+ "version": "9.3.11",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-aria",
13
+ "commit": "677a67b551966986db34a6fac608cb89ee150471",
14
+ "comment": "style: apply prettier 2.3-2.8 formatting on whole codebase"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-aria",
21
+ "comment": "Bump @fluentui/react-utilities to v9.6.1",
22
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Wed, 15 Feb 2023 11:44:52 GMT",
29
+ "tag": "@fluentui/react-aria_v9.3.10",
30
+ "version": "9.3.10",
31
+ "comments": {
32
+ "patch": [
33
+ {
34
+ "author": "beachball",
35
+ "package": "@fluentui/react-aria",
36
+ "comment": "Bump @fluentui/react-utilities to v9.6.0",
37
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "date": "Mon, 13 Feb 2023 23:43:14 GMT",
6
44
  "tag": "@fluentui/react-aria_v9.3.9",
7
45
  "version": "9.3.9",
8
46
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui/react-aria
2
2
 
3
- This log was last generated on Mon, 13 Feb 2023 23:40:50 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 08 Mar 2023 17:38:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.3.11)
8
+
9
+ Wed, 08 Mar 2023 17:38:53 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.3.10..@fluentui/react-aria_v9.3.11)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
15
+
16
+ ## [9.3.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.3.10)
17
+
18
+ Wed, 15 Feb 2023 11:44:52 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.3.9..@fluentui/react-aria_v9.3.10)
20
+
21
+ ### Patches
22
+
23
+ - Bump @fluentui/react-utilities to v9.6.0 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
24
+
7
25
  ## [9.3.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-aria_v9.3.9)
8
26
 
9
- Mon, 13 Feb 2023 23:40:50 GMT
27
+ Mon, 13 Feb 2023 23:43:14 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-aria_v9.3.8..@fluentui/react-aria_v9.3.9)
11
29
 
12
30
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SAASA,KAAK,EAAEC,KAAK,QAAQ,yBAAyB;AACtD,SAASC,gBAAgB,QAAQ,2BAA2B;AAI5D;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUC,kBAAkB,CAChCC,IAAW,EACXC,KAAa;EAEb,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB,GAAG,KAAK;IAAE,CAAC,eAAe,GAAGC,YAAY;IAAEC,OAAO;IAAEC,SAAS;IAAEC,OAAO;IAAE,GAAGC;EAAI,CAAE,GAClHP,KAAK,aA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GAAG;IAElB,IAAIP,UAAU,KAAKO,GAAG,KAAKrB,KAAK,IAAIqB,GAAG,KAAKpB,KAAK,CAAC,EAAE;MAClDe,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACE,eAAe,EAAE;MACpB;;IAGF,IAAIG,GAAG,KAAKpB,KAAK,EAAE;MACjBe,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACM,aAAa,CAACC,KAAK,EAAE;;EAE5B,CAAC,CAAC;EAEF;EACA,IAAInB,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAKqB,SAAS,EAAE;IAC3C,OAAO;MACL,GAAGb,IAAI;MACPN,QAAQ,EAAEA,QAAQ,IAAI,CAACC,iBAAiB;MACxC,eAAe,EAAEA,iBAAiB,GAAG,IAAI,GAAGM,sBAAsB;MAClE;MACA;MACAJ,OAAO,EAAEF,iBAAiB,GAAGkB,SAAS,GAAGV,WAAW;MACpDJ,OAAO,EAAEJ,iBAAiB,GAAGkB,SAAS,GAAGd,OAAO;MAChDD,SAAS,EAAEH,iBAAiB,GAAGkB,SAAS,GAAGf;KACN;;EAGzC;EACA;EAAA,KACK;IACH,MAAMgB,WAAW,GAAG;MAClBC,IAAI,EAAE,QAAQ;MACdC,QAAQ,EAAEtB,QAAQ,IAAI,CAACC,iBAAiB,GAAGkB,SAAS,GAAG,CAAC;MACxD,GAAGb,IAAI;MACP;MACA;MACA;MACAH,OAAO,EAAEM,WAAW;MACpBJ,OAAO,EAAEa,WAAW;MACpBd,SAAS,EAAES,aAAa;MACxB,eAAe,EAAEb,QAAQ,IAAIC,iBAAiB,IAAIM;KACb;IAEvC,IAAIT,IAAI,KAAK,GAAG,IAAIU,UAAU,EAAE;MAC7BY,WAAiD,CAACG,IAAI,GAAGJ,SAAS;;IAGrE,OAAOC,WAAW;;AAEtB","names":["Enter","Space","useEventCallback","useARIAButtonProps","type","props","disabled","disabledFocusable","ariaDisabled","onClick","onKeyDown","onKeyUp","rest","normalizedARIADisabled","isDisabled","handleClick","ev","preventDefault","stopPropagation","handleKeyDown","isDefaultPrevented","key","currentTarget","click","handleKeyUp","undefined","resultProps","role","tabIndex","href"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const { disabled, disabledFocusable = false, ['aria-disabled']: ariaDisabled, onClick, onKeyDown, onKeyUp, ...rest } =\n props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"]}
1
+ {"version":3,"names":["Enter","Space","useEventCallback","useARIAButtonProps","type","props","disabled","disabledFocusable","ariaDisabled","onClick","onKeyDown","onKeyUp","rest","normalizedARIADisabled","isDisabled","handleClick","ev","preventDefault","stopPropagation","handleKeyDown","isDefaultPrevented","key","currentTarget","click","handleKeyUp","undefined","resultProps","role","tabIndex","href"],"sources":["../src/packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const {\n disabled,\n disabledFocusable = false,\n ['aria-disabled']: ariaDisabled,\n onClick,\n onKeyDown,\n onKeyUp,\n ...rest\n } = props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,KAAK,QAAQ,yBAAyB;AACtD,SAASC,gBAAgB,QAAQ,2BAA2B;AAI5D;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUC,kBAAkBA,CAChCC,IAAW,EACXC,KAAa;EAEb,MAAM;IACJC,QAAQ;IACRC,iBAAiB,GAAG,KAAK;IACzB,CAAC,eAAe,GAAGC,YAAY;IAC/BC,OAAO;IACPC,SAAS;IACTC,OAAO;IACP,GAAGC;EAAI,CACR,GAAGP,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE;EAEf,MAAMQ,sBAAsB,GAAG,OAAOL,YAAY,KAAK,QAAQ,GAAGA,YAAY,KAAK,MAAM,GAAGA,YAAY;EAExG,MAAMM,UAAU,GAAGR,QAAQ,IAAIC,iBAAiB,IAAIM,sBAAsB;EAE1E,MAAME,WAAW,GAAGb,gBAAgB,CAAEc,EAAmD,IAAI;IAC3F,IAAIF,UAAU,EAAE;MACdE,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACE,eAAe,EAAE;KACrB,MAAM;MACLT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGO,EAAE,CAAC;;EAEjB,CAAC,CAAC;EAEF,MAAMG,aAAa,GAAGjB,gBAAgB,CAAEc,EAAsD,IAAI;IAChGN,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGM,EAAE,CAAC;IAEf,IAAIA,EAAE,CAACI,kBAAkB,EAAE,EAAE;MAC3B;;IAGF,MAAMC,GAAG,GAAGL,EAAE,CAACK,GAAG;IAElB,IAAIP,UAAU,KAAKO,G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SAAS,GAAGf;KACN;;EAGzC;EACA;EAAA,KACK;IACH,MAAMgB,WAAW,GAAG;MAClBC,IAAI,EAAE,QAAQ;MACdC,QAAQ,EAAEtB,QAAQ,IAAI,CAACC,iBAAiB,GAAGkB,SAAS,GAAG,CAAC;MACxD,GAAGb,IAAI;MACP;MACA;MACA;MACAH,OAAO,EAAEM,WAAW;MACpBJ,OAAO,EAAEa,WAAW;MACpBd,SAAS,EAAES,aAAa;MACxB,eAAe,EAAEb,QAAQ,IAAIC,iBAAiB,IAAIM;KACb;IAEvC,IAAIT,IAAI,KAAK,GAAG,IAAIU,UAAU,EAAE;MAC7BY,WAAiD,CAACG,IAAI,GAAGJ,SAAS;;IAGrE,OAAOC,WAAW;;AAEtB"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,kBAAkB,QAAQ,sBAAsB;AAIzD;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAkD,CAACC,IAAI,EAAEC,OAAO,KAAI;;EACrG,MAAMC,SAAS,GAAGL,gBAAgB,CAACG,IAAI,EAAEC,OAAO,CAAC;EACjD,MAAME,mBAAmB,GAAGL,kBAAkB,CAAkC,eAAS,aAATI,SAAS,uBAATA,SAAS,CAAEE,EAAE,mCAAI,QAAQ,EAAEF,SAAS,CAAC;EACrH,OAAOA,SAAS,IAAIC,mBAAmB;AACzC,CAAC","names":["resolveShorthand","useARIAButtonProps","useARIAButtonShorthand","slot","options","shorthand","shorthandARIAButton","as"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (slot, options) => {\n const shorthand = resolveShorthand(slot, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"]}
1
+ {"version":3,"names":["resolveShorthand","useARIAButtonProps","useARIAButtonShorthand","slot","options","shorthand","shorthandARIAButton","_a","as"],"sources":["../src/packages/react-components/react-aria/src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (slot, options) => {\n const shorthand = resolveShorthand(slot, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,kBAAkB,QAAQ,sBAAsB;AAIzD;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAkDA,CAACC,IAAI,EAAEC,OAAO,KAAI;;EACrG,MAAMC,SAAS,GAAGL,gBAAgB,CAACG,IAAI,EAAEC,OAAO,CAAC;EACjD,MAAME,mBAAmB,GAAGL,kBAAkB,CAAkC,CAAAM,EAAA,GAAAF,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEG,EAAE,cAAAD,EAAA,cAAAA,EAAA,GAAI,QAAQ,EAAEF,SAAS,CAAC;EACrH,OAAOA,SAAS,IAAIC,mBAAmB;AACzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useARIAButtonProps.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"names":[],"mappings":";;;;IAKA;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAgB,kBAAkB,CAChC,IAAW,EACX,KAAa;QAEb,IAAM,KACJ,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EADL,QAAQ,cAAA,EAAE,yBAAyB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EAAqB,YAAY,sBAAA,EAAE,OAAO,aAAA,EAAE,SAAS,eAAA,EAAE,OAAO,aAAA,EAAK,IAAI,sBAA5G,qFAA8G,CACvG,CAAC;QAEd,IAAM,sBAAsB,GAAG,OAAO,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;QAEzG,IAAM,UAAU,GAAG,QAAQ,IAAI,iBAAiB,IAAI,sBAAsB,CAAC;QAE3E,IAAM,WAAW,GAAG,kCAAgB,CAAC,UAAC,EAAmD;YACvF,IAAI,UAAU,EAAE;gBACd,EAAE,CAAC,cAAc,EAAE,CAAC;gBACpB,EAAE,CAAC,eAAe,EAAE,CAAC;aACtB;iBAAM;gBACL,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,EAAE,CAAC,CAAC;aACf;QACH,CAAC,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,kCAAgB,CAAC,UAAC,EAAsD;YAC5F,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,EAAE,CAAC,CAAC;YAEhB,IAAI,EAAE,CAAC,kBAAkB,EAAE,EAAE;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BAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB;gBAClE,6EAA6E;gBAC7E,yGAAyG;gBACzG,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EACpD,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAChD,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,GACf,CAAC;SACzC;QAED,gFAAgF;QAChF,4CAA4C;aACvC;YACH,IAAM,WAAW,GAAG,oCAClB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IACrD,IAAI;gBACP,iFAAiF;gBACjF,8DAA8D;gBAC9D,kCAAkC;gBAClC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,eAAe,EAAE,QAAQ,IAAI,iBAAiB,IAAI,sBAAsB,GACnC,CAAC;YAExC,IAAI,IAAI,KAAK,GAAG,IAAI,UAAU,EAAE;gBAC7B,WAAiD,CAAC,IAAI,GAAG,SAAS,CAAC;aACrE;YAED,OAAO,WAAW,CAAC;SACpB;IACH,CAAC;IAxGD,gDAwGC","sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const { disabled, disabledFocusable = false, ['aria-disabled']: ariaDisabled, onClick, onKeyDown, onKeyUp, ...rest } =\n props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"]}
1
+ {"version":3,"file":"useARIAButtonProps.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"names":[],"mappings":";;;;IAKA;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAgB,kBAAkB,CAChC,IAAW,EACX,KAAa;QAEb,IAAM,KAQF,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAPb,QAAQ,cAAA,EACR,yBAAyB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EACN,YAAY,sBAAA,EAC/B,OAAO,aAAA,EACP,SAAS,eAAA,EACT,OAAO,aAAA,EACJ,IAAI,sBAPH,qFAQL,CAAc,CAAC;QAEhB,IAAM,sBAAsB,GAAG,OAAO,YAAY,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iBAAiB,IAAI,sBAAsB,GACnC,CAAC;YAExC,IAAI,IAAI,KAAK,GAAG,IAAI,UAAU,EAAE;gBAC7B,WAAiD,CAAC,IAAI,GAAG,SAAS,CAAC;aACrE;YAED,OAAO,WAAW,CAAC;SACpB;IACH,CAAC;IA/GD,gDA+GC","sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const {\n disabled,\n disabledFocusable = false,\n ['aria-disabled']: ariaDisabled,\n onClick,\n onKeyDown,\n onKeyUp,\n ...rest\n } = props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/button/index.ts"],"sourcesContent":["export * from './useARIAButtonProps';\nexport * from './useARIAButtonShorthand';\nexport * from './types';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-aria/src/button/index.ts"],"sourcesContent":["export * from './useARIAButtonProps';\nexport * from './useARIAButtonShorthand';\nexport * from './types';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,0BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,aAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["../src/packages/react-components/react-aria/src/button/types.ts"],"sourcesContent":["import type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\ntype UnionToIntersection<U> = (U extends unknown ? (x: U) => U : never) extends (x: infer I) => U ? I : never;\n\nexport type ARIAButtonType = 'button' | 'a' | 'div';\n\nexport type ARIAButtonElement<AlternateAs extends 'a' | 'div' = 'a' | 'div'> =\n | HTMLButtonElement\n | (AlternateAs extends 'a' ? HTMLAnchorElement : never)\n | (AlternateAs extends 'div' ? HTMLDivElement : never);\n\n/**\n * @internal\n */\nexport type ARIAButtonElementIntersection<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = UnionToIntersection<\n ARIAButtonElement<AlternateAs>\n>;\n\n/**\n * Props expected by `useARIAButtonProps` hooks\n */\nexport type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = React.PropsWithRef<\n JSX.IntrinsicElements[Type]\n> & {\n disabled?: boolean;\n /**\n * When set, allows the button to be focusable even when it has been disabled.\n * This is used in scenarios where it is important to keep a consistent tab order\n * 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\nexport type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = ExtractSlotProps<\n Slot<'button', AlternateAs>\n> &\n Pick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;\n\n/**\n * Props that will be modified internally by `useARIAButtonProps` by each case.\n * This typing is to ensure a well specified return value for `useARIAbButtonProps`\n */\nexport type ARIAButtonAlteredProps<Type extends ARIAButtonType> =\n | (Type extends 'button'\n ? Pick<\n JSX.IntrinsicElements['button'],\n 'onClick' | 'onKeyDown' | 'onKeyUp' | 'disabled' | 'aria-disabled' | 'tabIndex'\n >\n : never)\n | (Type extends 'a'\n ? Pick<\n JSX.IntrinsicElements['a'],\n 'onClick' | 'onKeyDown' | 'onKeyUp' | 'aria-disabled' | 'tabIndex' | 'role' | 'href'\n >\n : never)\n | (Type extends 'div'\n ? Pick<JSX.IntrinsicElements['div'], 'onClick' | 'onKeyDown' | 'onKeyUp' | 'aria-disabled' | 'tabIndex' | 'role'>\n : never);\n\n/**\n * Merge of props provided by the user and props provided internally.\n */\nexport type ARIAButtonResultProps<Type extends ARIAButtonType, Props> = Props &\n UnionToIntersection<ARIAButtonAlteredProps<Type>>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgBA,kBAAkB,CAChCC,IAAW,EACXC,KAAa;EAEb,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB,GAAG,KAAK;IAAE,CAAC,eAAe,GAAGC,YAAY;IAAEC,OAAO;IAAEC,SAAS;IA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abled","onClick","onKeyDown","onKeyUp","rest","normalizedARIADisabled","isDisabled","handleClick","react_utilities_1","ev","preventDefault","stopPropagation","handleKeyDown","isDefaultPrevented","key","keyboard_keys_1","currentTarget","click","handleKeyUp","undefined","resultProps","role","tabIndex","href","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const { disabled, disabledFocusable = false, ['aria-disabled']: ariaDisabled, onClick, onKeyDown, onKeyUp, ...rest } =\n props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"]}
1
+ {"version":3,"names":["keyboard_keys_1","require","react_utilities_1","useARIAButtonProps","type","props","disabled","disabledFocusable","ariaDisabled","onClick","onKeyDown","onKeyUp","rest","normalizedARIADisabled","isDisabled","handleClick","useEventCallback","ev","preventDefault","stopPropagation","handleKeyDown","isDefaultPrevented","key","Enter","Space","currentTarget","click","handleKeyUp","undefined","resultProps","role","tabIndex","href","exports"],"sources":["../src/packages/react-components/react-aria/src/button/useARIAButtonProps.ts"],"sourcesContent":["import { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { ARIAButtonElementIntersection, ARIAButtonProps, ARIAButtonResultProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of non native button elements. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n *\n * @param type - the proper scenario to be interpreted by the hook.\n * 1. `button` - Minimal interference from the hook, as semantic button already supports most of the states\n * 2. `a` or `div` - Proper keyboard/mouse handling plus other support to ensure ARIA behavior\n * @param props - the props to be passed down the line to the desired element.\n * This hook will encapsulate proper properties, such as `onClick`, `onKeyDown`, `onKeyUp`, etc,.\n *\n * @example\n * ```tsx\n * const buttonProps = useARIAButtonProps('a', {\n * href: './some-route'\n * onClick: () => console.log('this should run both on click and Space and Enter')\n * })\n *\n * // ...\n *\n * return (\n * <a {...buttonProps}>This anchor will behave as a proper button</a>\n * )\n * ```\n */\nexport function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(\n type?: Type,\n props?: Props,\n): ARIAButtonResultProps<Type, Props> {\n const {\n disabled,\n disabledFocusable = false,\n ['aria-disabled']: ariaDisabled,\n onClick,\n onKeyDown,\n onKeyUp,\n ...rest\n } = props ?? {};\n\n const normalizedARIADisabled = typeof ariaDisabled === 'string' ? ariaDisabled === 'true' : ariaDisabled;\n\n const isDisabled = disabled || disabledFocusable || normalizedARIADisabled;\n\n const handleClick = useEventCallback((ev: React.MouseEvent<ARIAButtonElementIntersection>) => {\n if (isDisabled) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onClick?.(ev);\n }\n });\n\n const handleKeyDown = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyDown?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n return;\n }\n\n // If enter is pressed, activate the button\n else if (key === Enter) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n const handleKeyUp = useEventCallback((ev: React.KeyboardEvent<ARIAButtonElementIntersection>) => {\n onKeyUp?.(ev);\n\n if (ev.isDefaultPrevented()) {\n return;\n }\n\n const key = ev.key;\n\n if (isDisabled && (key === Enter || key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (key === Space) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\n });\n\n // If a <button> tag is to be rendered we just need to set disabled and aria-disabled correctly\n if (type === 'button' || type === undefined) {\n return {\n ...rest,\n disabled: disabled && !disabledFocusable,\n 'aria-disabled': disabledFocusable ? true : normalizedARIADisabled,\n // onclick should still use internal handler to ensure prevention if disabled\n // if disabledFocusable then there's no requirement for handlers as those events should not be propagated\n onClick: disabledFocusable ? undefined : handleClick,\n onKeyUp: disabledFocusable ? undefined : onKeyUp,\n onKeyDown: disabledFocusable ? undefined : onKeyDown,\n } as ARIAButtonResultProps<Type, Props>;\n }\n\n // If an <a> or <div> tag is to be rendered we have to remove disabled and type,\n // and set aria-disabled, role and tabIndex.\n else {\n const resultProps = {\n role: 'button',\n tabIndex: disabled && !disabledFocusable ? undefined : 0,\n ...rest,\n // If it's not a <button> than listeners are required even with disabledFocusable\n // Since you cannot assure the default behavior of the element\n // E.g: <a> will redirect on click\n onClick: handleClick,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n 'aria-disabled': disabled || disabledFocusable || normalizedARIADisabled,\n } as ARIAButtonResultProps<Type, Props>;\n\n if (type === 'a' && isDisabled) {\n (resultProps as ARIAButtonResultProps<'a', Props>).href = undefined;\n }\n\n return resultProps;\n }\n}\n"],"mappings":";;;;;;AAAA,MAAAA,eAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgBE,kBAAkBA,CAChCC,IAAW,EACXC,KAAa;EAEb,MAAM;IACJC,QAAQ;IACRC,iBAAiB,GAAG,KAAK;IACzB,CAAC,eAAe,GAAGC,YAAY;IAC/BC,OAAO;IACPC,SAAS;IACTC,OAAO;IACP,GAAGC;EAAI,CACR,GAAGP,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE;EAEf,MAAMQ,sBAAsB,GAAG,OAAOL,YAAY,KAAK,QAAQ,GAAGA,YAAY,KAAK,MAAM,GAAGA,YAAY;EAExG,MAAMM,UAAU,GAAGR,QAAQ,IAAIC,iBAAiB,IAAIM,sBAAsB;EAE1E,MAAME,WAAW,GAAGb,iBAAA,CAAAc,gBAAgB,CAAEC,EAAmD,IAAI;IAC3F,IAAIH,UAAU,EAAE;MACdG,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACE,eAAe,EAAE;KACrB,MAAM;MACLV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGQ,EAAE,CAAC;;EAEjB,CAAC,CAAC;EAEF,MAAMG,aAAa,GAAGlB,iBAAA,CAAAc,gBAAgB,CAAEC,EAAsD,IAAI;IAChGP,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGO,EAAE,CAAC;IAEf,IAAIA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C,iBAAiB;MACxC,eAAe,EAAEA,iBAAiB,GAAG,IAAI,GAAGM,sBAAsB;MAClE;MACA;MACAJ,OAAO,EAAEF,iBAAiB,GAAGqB,SAAS,GAAGb,WAAW;MACpDJ,OAAO,EAAEJ,iBAAiB,GAAGqB,SAAS,GAAGjB,OAAO;MAChDD,SAAS,EAAEH,iBAAiB,GAAGqB,SAAS,GAAGlB;KACN;;EAGzC;EACA;EAAA,KACK;IACH,MAAMmB,WAAW,GAAG;MAClBC,IAAI,EAAE,QAAQ;MACdC,QAAQ,EAAEzB,QAAQ,IAAI,CAACC,iBAAiB,GAAGqB,SAAS,GAAG,CAAC;MACxD,GAAGhB,IAAI;MACP;MACA;MACA;MACAH,OAAO,EAAEM,WAAW;MACpBJ,OAAO,EAAEgB,WAAW;MACpBjB,SAAS,EAAEU,aAAa;MACxB,eAAe,EAAEd,QAAQ,IAAIC,iBAAiB,IAAIM;KACb;IAEvC,IAAIT,IAAI,KAAK,GAAG,IAAIU,UAAU,EAAE;MAC7Be,WAAiD,CAACG,IAAI,GAAGJ,SAAS;;IAGrE,OAAOC,WAAW;;AAEtB;AA/GAI,OAAA,CAAA9B,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAIA;;;;;;;;;AASO,MAAMA,sBAAsB,GAAkD,CAACC,IAAI,EAAEC,OAAO,KAAI;;EACrG,MAAMC,SAAS,GAAGC,kCAAgB,CAACH,IAAI,EAAEC,OAAO,CAAC;EACjD,MAAMG,mBAAmB,GAAGC,uCAAkB,CAAkC,eAAS,aAATH,SAAS,uBAATA,SAAS,CAAEI,EAAE,mCAAI,QAAQ,EAAEJ,SAAS,CAAC;EACrH,OAAOA,SAAS,IAAIE,mBAAmB;AACzC,CAAC;AAJYG,8BAAsB","names":["useARIAButtonShorthand","slot","options","shorthand","react_utilities_1","shorthandARIAButton","useARIAButtonProps_1","as","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (slot, options) => {\n const shorthand = resolveShorthand(slot, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"]}
1
+ {"version":3,"names":["react_utilities_1","require","useARIAButtonProps_1","useARIAButtonShorthand","slot","options","shorthand","resolveShorthand","shorthandARIAButton","useARIAButtonProps","_a","as","exports"],"sources":["../src/packages/react-components/react-aria/src/button/useARIAButtonShorthand.ts"],"sourcesContent":["import { resolveShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from './useARIAButtonProps';\nimport type { ResolveShorthandFunction } from '@fluentui/react-utilities';\nimport type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';\n\n/**\n * @internal\n *\n * This function expects to receive a slot, if `as` property is not desired use `useARIAButtonProps` instead\n *\n * Button keyboard handling, role, disabled and tabIndex implementation that ensures ARIA spec\n * for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases\n * where no attribute addition is required.\n */\nexport const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (slot, options) => {\n const shorthand = resolveShorthand(slot, options);\n const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);\n return shorthand && shorthandARIAButton;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,iBAAA,gBAAAC,OAAA;AACA,MAAAC,oBAAA,gBAAAD,OAAA;AAIA;;;;;;;;;AASO,MAAME,sBAAsB,GAAkDA,CAACC,IAAI,EAAEC,OAAO,KAAI;;EACrG,MAAMC,SAAS,GAAGN,iBAAA,CAAAO,gBAAgB,CAACH,IAAI,EAAEC,OAAO,CAAC;EACjD,MAAMG,mBAAmB,GAAGN,oBAAA,CAAAO,kBAAkB,CAAkC,CAAAC,EAAA,GAAAJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEK,EAAE,cAAAD,EAAA,cAAAA,EAAA,GAAI,QAAQ,EAAEJ,SAAS,CAAC;EACrH,OAAOA,SAAS,IAAIE,mBAAmB;AACzC,CAAC;AAJYI,OAAA,CAAAT,sBAAsB,GAAAA,sBAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,qCAAsB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,iCAAkB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-aria/src/index.ts"],"sourcesContent":["export { useARIAButtonShorthand, useARIAButtonProps } from './button/index';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n"]}
1
+ {"version":3,"names":["index_1","require","Object","defineProperty","exports","enumerable","get","useARIAButtonShorthand","useARIAButtonProps"],"sources":["../src/packages/react-components/react-aria/src/index.ts"],"sourcesContent":["export { useARIAButtonShorthand, useARIAButtonProps } from './button/index';\nexport type {\n ARIAButtonSlotProps,\n ARIAButtonProps,\n ARIAButtonResultProps,\n ARIAButtonType,\n ARIAButtonElement,\n ARIAButtonElementIntersection,\n ARIAButtonAlteredProps,\n} from './button/index';\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAO,sBAAsB;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAQ,kBAAkB;EAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-aria",
3
- "version": "9.3.9",
3
+ "version": "9.3.11",
4
4
  "description": "React helper to ensure ARIA",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@fluentui/keyboard-keys": "^9.0.1",
34
- "@fluentui/react-utilities": "^9.5.3",
34
+ "@fluentui/react-utilities": "^9.6.1",
35
35
  "tslib": "^2.1.0"
36
36
  },
37
37
  "peerDependencies": {