@fluentui/react-spinner 9.0.14 → 9.0.16

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 (30) hide show
  1. package/CHANGELOG.json +69 -1
  2. package/CHANGELOG.md +24 -2
  3. package/lib/components/Spinner/DefaultSvg.js.map +1 -1
  4. package/lib/components/Spinner/Spinner.js +0 -1
  5. package/lib/components/Spinner/Spinner.js.map +1 -1
  6. package/lib/components/Spinner/renderSpinner.js +8 -5
  7. package/lib/components/Spinner/renderSpinner.js.map +1 -1
  8. package/lib/components/Spinner/useSpinner.js +0 -3
  9. package/lib/components/Spinner/useSpinner.js.map +1 -1
  10. package/lib/components/Spinner/useSpinnerStyles.js +149 -161
  11. package/lib/components/Spinner/useSpinnerStyles.js.map +1 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib-commonjs/Spinner.js +0 -2
  14. package/lib-commonjs/Spinner.js.map +1 -1
  15. package/lib-commonjs/components/Spinner/DefaultSvg.js +0 -3
  16. package/lib-commonjs/components/Spinner/DefaultSvg.js.map +1 -1
  17. package/lib-commonjs/components/Spinner/Spinner.js +0 -6
  18. package/lib-commonjs/components/Spinner/Spinner.js.map +1 -1
  19. package/lib-commonjs/components/Spinner/Spinner.types.js.map +1 -1
  20. package/lib-commonjs/components/Spinner/index.js +0 -6
  21. package/lib-commonjs/components/Spinner/index.js.map +1 -1
  22. package/lib-commonjs/components/Spinner/renderSpinner.js +8 -9
  23. package/lib-commonjs/components/Spinner/renderSpinner.js.map +1 -1
  24. package/lib-commonjs/components/Spinner/useSpinner.js +0 -9
  25. package/lib-commonjs/components/Spinner/useSpinner.js.map +1 -1
  26. package/lib-commonjs/components/Spinner/useSpinnerStyles.js +137 -153
  27. package/lib-commonjs/components/Spinner/useSpinnerStyles.js.map +1 -1
  28. package/lib-commonjs/index.js +0 -2
  29. package/lib-commonjs/index.js.map +1 -1
  30. package/package.json +6 -6
package/CHANGELOG.json CHANGED
@@ -2,7 +2,75 @@
2
2
  "name": "@fluentui/react-spinner",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 21 Dec 2022 10:17:16 GMT",
5
+ "date": "Mon, 09 Jan 2023 14:31:49 GMT",
6
+ "tag": "@fluentui/react-spinner_v9.0.16",
7
+ "version": "9.0.16",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-spinner",
13
+ "comment": "Bump @fluentui/react-label to v9.0.16",
14
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-spinner",
19
+ "comment": "Bump @fluentui/react-utilities to v9.4.0",
20
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Wed, 04 Jan 2023 01:40:30 GMT",
27
+ "tag": "@fluentui/react-spinner_v9.0.15",
28
+ "version": "9.0.15",
29
+ "comments": {
30
+ "none": [
31
+ {
32
+ "author": "martinhochel@microsoft.com",
33
+ "package": "@fluentui/react-spinner",
34
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
35
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
36
+ },
37
+ {
38
+ "author": "martinhochel@microsoft.com",
39
+ "package": "@fluentui/react-spinner",
40
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
41
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
42
+ }
43
+ ],
44
+ "patch": [
45
+ {
46
+ "author": "olfedias@microsoft.com",
47
+ "package": "@fluentui/react-spinner",
48
+ "commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
49
+ "comment": "chore: Update Griffel to latest version"
50
+ },
51
+ {
52
+ "author": "beachball",
53
+ "package": "@fluentui/react-spinner",
54
+ "comment": "Bump @fluentui/react-label to v9.0.15",
55
+ "commit": "3e322d15529451be153e97298873253e21af4082"
56
+ },
57
+ {
58
+ "author": "beachball",
59
+ "package": "@fluentui/react-spinner",
60
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
61
+ "commit": "3e322d15529451be153e97298873253e21af4082"
62
+ },
63
+ {
64
+ "author": "beachball",
65
+ "package": "@fluentui/react-spinner",
66
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
67
+ "commit": "3e322d15529451be153e97298873253e21af4082"
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ {
73
+ "date": "Wed, 21 Dec 2022 10:20:33 GMT",
6
74
  "tag": "@fluentui/react-spinner_v9.0.14",
7
75
  "version": "9.0.14",
8
76
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # Change Log - @fluentui/react-spinner
2
2
 
3
- This log was last generated on Wed, 21 Dec 2022 10:17:16 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 09 Jan 2023 14:31:49 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.0.16)
8
+
9
+ Mon, 09 Jan 2023 14:31:49 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.0.15..@fluentui/react-spinner_v9.0.16)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-label to v9.0.16 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
16
+
17
+ ## [9.0.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.0.15)
18
+
19
+ Wed, 04 Jan 2023 01:40:30 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.0.14..@fluentui/react-spinner_v9.0.15)
21
+
22
+ ### Patches
23
+
24
+ - chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
25
+ - Bump @fluentui/react-label to v9.0.15 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
26
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
27
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
28
+
7
29
  ## [9.0.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.0.14)
8
30
 
9
- Wed, 21 Dec 2022 10:17:16 GMT
31
+ Wed, 21 Dec 2022 10:20:33 GMT
10
32
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.0.13..@fluentui/react-spinner_v9.0.14)
11
33
 
12
34
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-spinner/src/components/Spinner/DefaultSvg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,OAAO,MAAM,UAAU,GAAG,mBACxB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;EAAK,SAAS,EAAC;AAAf,CAAA,eACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;EAAQ,SAAS,EAAC;AAAlB,CAAA,CADF,eAEE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;EAAQ,SAAS,EAAC;AAAlB,CAAA,CAFF,CADK","sourcesContent":["import * as React from 'react';\n\nexport const DefaultSvg = () => (\n <svg className=\"fui-Spinner__Progressbar\">\n <circle className=\"fui-Spinner__Track\" />\n <circle className=\"fui-Spinner__Tail\" />\n </svg>\n);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAO,MAAMC,UAAU,GAAG,mBACxBD;EAAKE,SAAS,EAAC;AAA0B,gBACvCF;EAAQE,SAAS,EAAC;AAAoB,EAAG,eACzCF;EAAQE,SAAS,EAAC;AAAmB,EAAG,CAE3C","names":["React","DefaultSvg","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-spinner/src/components/Spinner/DefaultSvg.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const DefaultSvg = () => (\n <svg className=\"fui-Spinner__Progressbar\">\n <circle className=\"fui-Spinner__Track\" />\n <circle className=\"fui-Spinner__Tail\" />\n </svg>\n);\n"]}
@@ -5,7 +5,6 @@ import { useSpinnerStyles_unstable } from './useSpinnerStyles';
5
5
  /**
6
6
  * Converged Spinner component for the fluentui repo
7
7
  */
8
-
9
8
  export const Spinner = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useSpinner_unstable(props, ref);
11
10
  useSpinnerStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-spinner/src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AAIA;;AAEG;;AACH,OAAO,MAAM,OAAO,gBAAsC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxF,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,EAAQ,GAAR,CAAjC;EAEA,yBAAyB,CAAC,KAAD,CAAzB;EACA,OAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CALyD,CAAnD;AAOP,OAAO,CAAC,WAAR,GAAsB,SAAtB","sourcesContent":["import * as React from 'react';\nimport { useSpinner_unstable } from './useSpinner';\nimport { renderSpinner_unstable } from './renderSpinner';\nimport { useSpinnerStyles_unstable } from './useSpinnerStyles';\nimport type { SpinnerProps } from './Spinner.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Converged Spinner component for the fluentui repo\n */\nexport const Spinner: ForwardRefComponent<SpinnerProps> = React.forwardRef((props, ref) => {\n const state = useSpinner_unstable(props, ref);\n\n useSpinnerStyles_unstable(state);\n return renderSpinner_unstable(state);\n});\n\nSpinner.displayName = 'Spinner';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,yBAAyB,QAAQ,oBAAoB;AAI9D;;;AAGA,OAAO,MAAMC,OAAO,gBAAsCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxF,MAAMC,KAAK,GAAGP,mBAAmB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE7CJ,yBAAyB,CAACK,KAAK,CAAC;EAChC,OAAON,sBAAsB,CAACM,KAAK,CAAC;AACtC,CAAC,CAAC;AAEFJ,OAAO,CAACK,WAAW,GAAG,SAAS","names":["React","useSpinner_unstable","renderSpinner_unstable","useSpinnerStyles_unstable","Spinner","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-spinner/src/components/Spinner/Spinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSpinner_unstable } from './useSpinner';\nimport { renderSpinner_unstable } from './renderSpinner';\nimport { useSpinnerStyles_unstable } from './useSpinnerStyles';\nimport type { SpinnerProps } from './Spinner.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Converged Spinner component for the fluentui repo\n */\nexport const Spinner: ForwardRefComponent<SpinnerProps> = React.forwardRef((props, ref) => {\n const state = useSpinner_unstable(props, ref);\n\n useSpinnerStyles_unstable(state);\n return renderSpinner_unstable(state);\n});\n\nSpinner.displayName = 'Spinner';\n"]}
@@ -3,7 +3,6 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Spinner
5
5
  */
6
-
7
6
  export const renderSpinner_unstable = state => {
8
7
  const {
9
8
  slots,
@@ -12,10 +11,14 @@ export const renderSpinner_unstable = state => {
12
11
  const {
13
12
  labelPosition
14
13
  } = state;
15
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
16
- }, slots.label && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
17
- }), slots.spinner && /*#__PURE__*/React.createElement(slots.spinner, { ...slotProps.spinner
18
- }), slots.label && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
14
+ return /*#__PURE__*/React.createElement(slots.root, {
15
+ ...slotProps.root
16
+ }, slots.label && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/React.createElement(slots.label, {
17
+ ...slotProps.label
18
+ }), slots.spinner && /*#__PURE__*/React.createElement(slots.spinner, {
19
+ ...slotProps.spinner
20
+ }), slots.label && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/React.createElement(slots.label, {
21
+ ...slotProps.label
19
22
  }));
20
23
  };
21
24
  //# sourceMappingURL=renderSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAe,KAAf,CAArC;EACA,MAAM;IAAE;EAAF,IAAoB,KAA1B;EACA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,KAAN,KAAgB,aAAa,KAAK,OAAlB,IAA6B,aAAa,KAAK,QAA/D,kBAA4E,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAD/E,EAEG,KAAK,CAAC,OAAN,iBAAiB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAFpB,EAGG,KAAK,CAAC,KAAN,KAAgB,aAAa,KAAK,OAAlB,IAA6B,aAAa,KAAK,OAA/D,kBAA2E,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAH9E,CADF;AAOD,CAVM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SpinnerState, SpinnerSlots } from './Spinner.types';\n\n/**\n * Render the final JSX of Spinner\n */\nexport const renderSpinner_unstable = (state: SpinnerState) => {\n const { slots, slotProps } = getSlots<SpinnerSlots>(state);\n const { labelPosition } = state;\n return (\n <slots.root {...slotProps.root}>\n {slots.label && (labelPosition === 'above' || labelPosition === 'before') && <slots.label {...slotProps.label} />}\n {slots.spinner && <slots.spinner {...slotProps.spinner} />}\n {slots.label && (labelPosition === 'below' || labelPosition === 'after') && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,sBAAsB,GAAIC,KAAmB,IAAI;EAC5D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAeE,KAAK,CAAC;EAC1D,MAAM;IAAEG;EAAa,CAAE,GAAGH,KAAK;EAC/B,oBACEH,oBAACI,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BH,KAAK,CAACI,KAAK,KAAKF,aAAa,KAAK,OAAO,IAAIA,aAAa,KAAK,QAAQ,CAAC,iBAAIN,oBAACI,KAAK,CAACI,KAAK;IAAA,GAAKH,SAAS,CAACG;EAAK,EAAI,EAChHJ,KAAK,CAACK,OAAO,iBAAIT,oBAACI,KAAK,CAACK,OAAO;IAAA,GAAKJ,SAAS,CAACI;EAAO,EAAI,EACzDL,KAAK,CAACI,KAAK,KAAKF,aAAa,KAAK,OAAO,IAAIA,aAAa,KAAK,OAAO,CAAC,iBAAIN,oBAACI,KAAK,CAACI,KAAK;IAAA,GAAKH,SAAS,CAACG;EAAK,EAAI,CACrG;AAEjB,CAAC","names":["React","getSlots","renderSpinner_unstable","state","slots","slotProps","labelPosition","root","label","spinner"],"sourceRoot":"../src/","sources":["packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SpinnerState, SpinnerSlots } from './Spinner.types';\n\n/**\n * Render the final JSX of Spinner\n */\nexport const renderSpinner_unstable = (state: SpinnerState) => {\n const { slots, slotProps } = getSlots<SpinnerSlots>(state);\n const { labelPosition } = state;\n return (\n <slots.root {...slotProps.root}>\n {slots.label && (labelPosition === 'above' || labelPosition === 'before') && <slots.label {...slotProps.label} />}\n {slots.spinner && <slots.spinner {...slotProps.spinner} />}\n {slots.label && (labelPosition === 'below' || labelPosition === 'after') && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"]}
@@ -11,7 +11,6 @@ import { DefaultSvg } from './DefaultSvg';
11
11
  * @param props - props from this instance of Spinner
12
12
  * @param ref - reference to root HTMLElement of Spinner
13
13
  */
14
-
15
14
  export const useSpinner_unstable = (props, ref) => {
16
15
  // Props
17
16
  const {
@@ -43,11 +42,9 @@ export const useSpinner_unstable = (props, ref) => {
43
42
  tabIndex
44
43
  }
45
44
  });
46
-
47
45
  if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {
48
46
  nativeRoot['aria-labelledby'] = labelShorthand.id;
49
47
  }
50
-
51
48
  const state = {
52
49
  appearance,
53
50
  labelPosition,
@@ -1 +1 @@
1
- {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D0B;IAE1B,aAF0B;IAG1B,IAH0B;IAI1B,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,OAAO,EAAE,MAFC;MAGV,KAAK,EAAE;IAHG,CAJc;IAS1B,IAAI,EAAE,UAToB;IAU1B,OAAO,EAAE,gBAViB;IAW1B,KAAK,EAAE;EAXmB,CAA5B;EAaA,OAAO,KAAP;AACD,CAzCM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { DefaultSvg } from './DefaultSvg';\n\n/**\n * Create the state required to render Spinner.\n *\n * The returned state can be modified with hooks such as useSpinnerStyles_unstable,\n * before being passed to renderSpinner_unstable.\n *\n * @param props - props from this instance of Spinner\n * @param ref - reference to root HTMLElement of Spinner\n */\nexport const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElement>): SpinnerState => {\n // Props\n const { appearance = 'primary', labelPosition = 'after', size = 'medium' } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = getNativeElementProps('div', { ref, role, ...rest }, ['size']);\n\n const labelShorthand = resolveShorthand(props.label, {\n defaultProps: {\n id: baseId,\n },\n required: false,\n });\n\n const spinnerShortHand = resolveShorthand(props.spinner, {\n required: true,\n defaultProps: {\n children: <DefaultSvg />,\n tabIndex,\n },\n });\n\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n\n const state: SpinnerState = {\n appearance,\n labelPosition,\n size,\n components: {\n root: 'div',\n spinner: 'span',\n label: Label,\n },\n root: nativeRoot,\n spinner: spinnerShortHand,\n label: labelShorthand,\n };\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gB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AAgB;IACzBJ,KAAK,EAAED;GACR;EACD,OAAOQ,KAAK;AACd,CAAC","names":["React","getNativeElementProps","resolveShorthand","useId","Label","DefaultSvg","useSpinner_unstable","props","ref","appearance","labelPosition","size","baseId","role","tabIndex","rest","nativeRoot","labelShorthand","label","defaultProps","id","required","spinnerShortHand","spinner","children","state","components","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-spinner/src/components/Spinner/useSpinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { DefaultSvg } from './DefaultSvg';\n\n/**\n * Create the state required to render Spinner.\n *\n * The returned state can be modified with hooks such as useSpinnerStyles_unstable,\n * before being passed to renderSpinner_unstable.\n *\n * @param props - props from this instance of Spinner\n * @param ref - reference to root HTMLElement of Spinner\n */\nexport const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElement>): SpinnerState => {\n // Props\n const { appearance = 'primary', labelPosition = 'after', size = 'medium' } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = getNativeElementProps('div', { ref, role, ...rest }, ['size']);\n\n const labelShorthand = resolveShorthand(props.label, {\n defaultProps: {\n id: baseId,\n },\n required: false,\n });\n\n const spinnerShortHand = resolveShorthand(props.spinner, {\n required: true,\n defaultProps: {\n children: <DefaultSvg />,\n tabIndex,\n },\n });\n\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n\n const state: SpinnerState = {\n appearance,\n labelPosition,\n size,\n components: {\n root: 'div',\n spinner: 'span',\n label: Label,\n },\n root: nativeRoot,\n spinner: spinnerShortHand,\n label: labelShorthand,\n };\n return state;\n};\n"]}