@fluentui/react-spinner 9.3.43 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # Change Log - @fluentui/react-spinner
2
2
 
3
- This log was last generated on Wed, 28 Feb 2024 02:28:41 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 07 Mar 2024 19:26:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.4.0)
8
+
9
+ Thu, 07 Mar 2024 19:26:59 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.3.43..@fluentui/react-spinner_v9.4.0)
11
+
12
+ ### Minor changes
13
+
14
+ - chore: Rewrite Spinner animation using only rotation transforms. ([PR #30567](https://github.com/microsoft/fluentui/pull/30567) by behowell@microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.0.32 ([PR #30687](https://github.com/microsoft/fluentui/pull/30687) by beachball)
16
+ - Bump @fluentui/react-label to v9.1.64 ([PR #30687](https://github.com/microsoft/fluentui/pull/30687) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.15.0 ([PR #30687](https://github.com/microsoft/fluentui/pull/30687) by beachball)
18
+ - Bump @fluentui/react-theme to v9.1.17 ([PR #30687](https://github.com/microsoft/fluentui/pull/30687) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.18.3 ([PR #30687](https://github.com/microsoft/fluentui/pull/30687) by beachball)
20
+
7
21
  ## [9.3.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinner_v9.3.43)
8
22
 
9
- Wed, 28 Feb 2024 02:28:41 GMT
23
+ Wed, 28 Feb 2024 02:34:19 GMT
10
24
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinner_v9.3.42..@fluentui/react-spinner_v9.3.43)
11
25
 
12
26
  ### Patches
package/dist/index.d.ts CHANGED
@@ -61,14 +61,15 @@ export declare type SpinnerSlots = {
61
61
  */
62
62
  root: NonNullable<Slot<'div'>>;
63
63
  /**
64
- * The slot for the animated svg.
65
- * The spinner slot receives the `className` and `style` that handles the spinning animation.
66
- * An svg is also rendered as a child of this slot
64
+ * The animated spinning ring.
67
65
  */
68
66
  spinner?: Slot<'span'>;
69
67
  /**
70
- * The label of the Slider.
71
- * The label slot receives the styling related to the text associated with the Spinner.
68
+ * The part of the spinner that rotates.
69
+ */
70
+ spinnerTail?: NonNullable<Slot<'span'>>;
71
+ /**
72
+ * An optional label for the Spinner.
72
73
  */
73
74
  label?: Slot<typeof Label>;
74
75
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["Spinner.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { Label } from '@fluentui/react-label';\n\nexport type SpinnerSlots = {\n /**\n * The root of the Spinner.\n * The root slot receives the `className` and `style` specified directly on the `<Spinner>`.\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The slot for the animated svg.\n * The spinner slot receives the `className` and `style` that handles the spinning animation.\n * An svg is also rendered as a child of this slot\n */\n spinner?: Slot<'span'>;\n /**\n * The label of the Slider.\n * The label slot receives the styling related to the text associated with the Spinner.\n */\n label?: Slot<typeof Label>;\n};\n\n/**\n * Spinner Props\n */\nexport type SpinnerProps = Omit<ComponentProps<SpinnerSlots>, 'size'> & {\n /**\n * The appearance of the Spinner.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n\n /**\n * Time in milliseconds after component mount before spinner is visible.\n * @default 0\n */\n delay?: number;\n\n /**\n * Where the label is positioned relative to the Spinner\n * @default 'after'\n */\n labelPosition?: 'above' | 'below' | 'before' | 'after';\n\n /**\n * The size of the spinner.\n * @default 'medium'\n */\n size?: 'extra-tiny' | 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large' | 'huge';\n};\n\n/**\n * State used in rendering Spinner\n */\nexport type SpinnerState = ComponentState<SpinnerSlots> &\n Required<Pick<SpinnerProps, 'appearance' | 'delay' | 'labelPosition' | 'size'>> & {\n /**\n * Should the spinner be rendered in the DOM\n */\n shouldRenderSpinner: boolean;\n };\n"],"names":[],"mappings":"AAAA,WA4DI"}
1
+ {"version":3,"sources":["Spinner.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { Label } from '@fluentui/react-label';\n\nexport type SpinnerSlots = {\n /**\n * The root of the Spinner.\n * The root slot receives the `className` and `style` specified directly on the `<Spinner>`.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The animated spinning ring.\n */\n spinner?: Slot<'span'>;\n\n /**\n * The part of the spinner that rotates.\n */\n spinnerTail?: NonNullable<Slot<'span'>>;\n\n /**\n * An optional label for the Spinner.\n */\n label?: Slot<typeof Label>;\n};\n\n/**\n * Spinner Props\n */\nexport type SpinnerProps = Omit<ComponentProps<SpinnerSlots>, 'size'> & {\n /**\n * The appearance of the Spinner.\n * @default 'primary'\n */\n appearance?: 'primary' | 'inverted';\n\n /**\n * Time in milliseconds after component mount before spinner is visible.\n * @default 0\n */\n delay?: number;\n\n /**\n * Where the label is positioned relative to the Spinner\n * @default 'after'\n */\n labelPosition?: 'above' | 'below' | 'before' | 'after';\n\n /**\n * The size of the spinner.\n * @default 'medium'\n */\n size?: 'extra-tiny' | 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large' | 'huge';\n};\n\n/**\n * State used in rendering Spinner\n */\nexport type SpinnerState = ComponentState<SpinnerSlots> &\n Required<Pick<SpinnerProps, 'appearance' | 'delay' | 'labelPosition' | 'size'>> & {\n /**\n * Should the spinner be rendered in the DOM\n */\n shouldRenderSpinner: boolean;\n };\n"],"names":[],"mappings":"AAAA,WAgEI"}
@@ -8,7 +8,9 @@ import { assertSlots } from '@fluentui/react-utilities';
8
8
  return /*#__PURE__*/ _jsxs(state.root, {
9
9
  children: [
10
10
  state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/ _jsx(state.label, {}),
11
- state.spinner && shouldRenderSpinner && /*#__PURE__*/ _jsx(state.spinner, {}),
11
+ state.spinner && shouldRenderSpinner && /*#__PURE__*/ _jsx(state.spinner, {
12
+ children: state.spinnerTail && /*#__PURE__*/ _jsx(state.spinnerTail, {})
13
+ }),
12
14
  state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/ _jsx(state.label, {})
13
15
  ]
14
16
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSpinner.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } 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 assertSlots<SpinnerSlots>(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return (\n <state.root>\n {state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && (\n <state.label />\n )}\n\n {state.spinner && shouldRenderSpinner && <state.spinner />}\n {state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && (\n <state.label />\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinner_unstable","state","labelPosition","shouldRenderSpinner","root","label","spinner"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAC1B,MAAM,EAAEC,aAAa,EAAEC,mBAAmB,EAAE,GAAGF;IAC/C,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,mBAC5F,KAACD,MAAMI,KAAK;YAGbJ,MAAMK,OAAO,IAAIH,qCAAuB,KAACF,MAAMK,OAAO;YACtDL,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,mBAC3F,KAACD,MAAMI,KAAK;;;AAIpB,EAAE"}
1
+ {"version":3,"sources":["renderSpinner.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } 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 assertSlots<SpinnerSlots>(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return (\n <state.root>\n {state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && (\n <state.label />\n )}\n {state.spinner && shouldRenderSpinner && (\n <state.spinner>{state.spinnerTail && <state.spinnerTail />}</state.spinner>\n )}\n {state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && (\n <state.label />\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinner_unstable","state","labelPosition","shouldRenderSpinner","root","label","spinner","spinnerTail"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAC1B,MAAM,EAAEC,aAAa,EAAEC,mBAAmB,EAAE,GAAGF;IAC/C,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,mBAC5F,KAACD,MAAMI,KAAK;YAEbJ,MAAMK,OAAO,IAAIH,qCAChB,KAACF,MAAMK,OAAO;0BAAEL,MAAMM,WAAW,kBAAI,KAACN,MAAMM,WAAW;;YAExDN,MAAMI,KAAK,IAAIF,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,mBAC3F,KAACD,MAAMI,KAAK;;;AAIpB,EAAE"}
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';
3
3
  import { Label } from '@fluentui/react-label';
4
- import { DefaultSvg } from './DefaultSvg';
5
4
  import { useSpinnerContext } from '../../contexts/SpinnerContext';
6
5
  /**
7
6
  * Create the state required to render Spinner.
@@ -56,7 +55,6 @@ import { useSpinnerContext } from '../../contexts/SpinnerContext';
56
55
  const spinnerShortHand = slot.optional(props.spinner, {
57
56
  renderByDefault: true,
58
57
  defaultProps: {
59
- children: /*#__PURE__*/ React.createElement(DefaultSvg, null),
60
58
  tabIndex
61
59
  },
62
60
  elementType: 'span'
@@ -73,10 +71,14 @@ import { useSpinnerContext } from '../../contexts/SpinnerContext';
73
71
  components: {
74
72
  root: 'div',
75
73
  spinner: 'span',
74
+ spinnerTail: 'span',
76
75
  label: Label
77
76
  },
78
77
  root: nativeRoot,
79
78
  spinner: spinnerShortHand,
79
+ spinnerTail: slot.always(props.spinnerTail, {
80
+ elementType: 'span'
81
+ }),
80
82
  label: labelShorthand
81
83
  };
82
84
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["useSpinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport type { SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { DefaultSvg } from './DefaultSvg';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\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 { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', labelPosition = 'after', size = contextSize ?? 'medium', delay = 0 } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role,\n ...rest,\n },\n ['size'],\n ),\n {\n elementType: 'div',\n },\n );\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(() => {\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(() => {\n setIsShownAfterDelay(true);\n }, delay);\n return () => {\n clearDelayTimeout();\n };\n }, [setDelayTimeout, clearDelayTimeout, delay]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: { id: baseId },\n renderByDefault: false,\n elementType: Label,\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n defaultProps: { children: <DefaultSvg />, tabIndex },\n elementType: 'span',\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state: SpinnerState = {\n appearance,\n delay,\n labelPosition,\n size,\n shouldRenderSpinner: !delay || isShownAfterDelay,\n components: { root: 'div', spinner: 'span', label: Label },\n root: nativeRoot,\n spinner: spinnerShortHand,\n label: labelShorthand,\n };\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","useId","useTimeout","slot","Label","DefaultSvg","useSpinnerContext","useSpinner_unstable","props","ref","size","contextSize","appearance","labelPosition","delay","baseId","role","tabIndex","rest","nativeRoot","always","elementType","isShownAfterDelay","setIsShownAfterDelay","useState","setDelayTimeout","clearDelayTimeout","useEffect","labelShorthand","optional","label","defaultProps","id","renderByDefault","spinnerShortHand","spinner","children","state","shouldRenderSpinner","components","root"],"mapp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F,iBAAiB;QACjBF,cAAc;YAAEK,wBAAU,oBAAC/B;YAAeY;QAAS;QACnDI,aAAa;IACf;IACA,IAAIO,kBAAkBT,cAAc,CAACA,UAAU,CAAC,kBAAkB,EAAE;QAClEA,UAAU,CAAC,kBAAkB,GAAGS,eAAeI,EAAE;IACnD;IACA,MAAMK,QAAsB;QAC1BzB;QACAE;QACAD;QACAH;QACA4B,qBAAqB,CAACxB,SAASQ;QAC/BiB,YAAY;YAAEC,MAAM;YAAOL,SAAS;YAAQL,OAAO1B;QAAM;QACzDoC,MAAMrB;QACNgB,SAASD;QACTJ,OAAOF;IACT;IACA,OAAOS;AACT,EAAE"}
1
+ {"version":3,"sources":["useSpinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport type { SpinnerProps, SpinnerState } from './Spinner.types';\nimport { Label } from '@fluentui/react-label';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\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 { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', labelPosition = 'after', size = contextSize ?? 'medium', delay = 0 } = props;\n const baseId = useId('spinner');\n\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role,\n ...rest,\n },\n ['size'],\n ),\n {\n elementType: 'div',\n },\n );\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(() => {\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(() => {\n setIsShownAfterDelay(true);\n }, delay);\n return () => {\n clearDelayTimeout();\n };\n }, [setDelayTimeout, clearDelayTimeout, delay]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: { id: baseId },\n renderByDefault: false,\n elementType: Label,\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n defaultProps: { tabIndex },\n elementType: 'span',\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state: SpinnerState = {\n appearance,\n delay,\n labelPosition,\n size,\n shouldRenderSpinner: !delay || isShownAfterDelay,\n components: { root: 'div', spinner: 'span', spinnerTail: 'span', label: Label },\n root: nativeRoot,\n spinner: spinnerShortHand,\n spinnerTail: slot.always(props.spinnerTail, { elementType: 'span' }),\n label: labelShorthand,\n };\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","useId","useTimeout","slot","Label","useSpinnerContext","useSpinner_unstable","props","ref","size","contextSize","appearance","labelPosition","delay","baseId","role","tabIndex","rest","nativeRoot","always","elementType","isShownAfterDelay","setIsShownAfterDelay","useState","setDelayTimeout","clearDelayTimeout","useEffect","labelShorthand","optional","label","defaultProps","id","renderByDefault","spinnerShortHand","spinner","state","shouldRenderSpinner","components","root","spinnerTail"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,4BAA4B;AAE9F,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC;IACvD,QAAQ;IACR,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGL;IAC9B,MAAM,EAAEM,aAAa,SAAS,EAAEC,gBAAgB,OAAO,EA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ACZ,MAAMgC,WAAW,EAAE;YAAEnB,aAAa;QAAO;QAClES,OAAOF;IACT;IACA,OAAOQ;AACT,EAAE"}
@@ -1,192 +1,98 @@
1
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
1
+ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
2
2
  import { tokens, typographyStyles } from '@fluentui/react-theme';
3
+ import { __resetStyles, __styles, mergeClasses } from '@griffel/react';
3
4
  export const spinnerClassNames = {
4
5
  root: 'fui-Spinner',
5
6
  spinner: 'fui-Spinner__spinner',
7
+ spinnerTail: 'fui-Spinner__spinnerTail',
6
8
  label: 'fui-Spinner__label'
7
9
  };
8
- /*
9
- * TODO: Update with proper tokens when added
10
- * Radii for the Spinner circles
11
- */
12
- const rValues = {
13
- extraTiny: '7px',
14
- tiny: '9px',
15
- extraSmall: '11px',
16
- small: '13px',
17
- medium: '14.5px',
18
- large: '16.5px',
19
- extraLarge: '18.5px',
20
- huge: '20px'
21
- };
22
- /*
23
- * TODO: Update with proper tokens when added
24
- * Sizes for the Spinner
25
- */
26
- const spinnnerSizes = {
27
- extraTiny: '16px',
28
- tiny: '20px',
29
- extraSmall: '24px',
30
- small: '28px',
31
- medium: '32px',
32
- large: '36px',
33
- extraLarge: '40px',
34
- huge: '44px'
35
- };
36
- /*
37
- * TODO: Update with proper tokens when added
38
- * Animation for Spinner
39
- */
40
- const spinnerAnimation = {
41
- container: {
42
- animationDuration: '3s',
43
- animationIterationCount: 'infinite',
44
- animationTimingFunction: 'linear',
45
- backgroundColor: 'transparent'
46
- }
47
- };
48
10
  /**
49
- * Styles for the root slot
11
+ * CSS variables used internally by Spinner
50
12
  */
13
+ const vars = {
14
+ strokeWidth: '--fui-Spinner--strokeWidth'
15
+ };
16
+ const useRootBaseClassName = /*#__PURE__*/__resetStyles("r1k3z50n", null, [".r1k3z50n{display:flex;align-items:center;justify-content:center;line-height:0;gap:8px;}"]);
51
17
  const useRootStyles = /*#__PURE__*/__styles({
52
- root: {
53
- mc9l5x: "f22iagw",
54
- Bt984gj: "f122n59",
55
- Brf1p80: "f4d9j23",
56
- Bg96gwp: "fez10in",
57
- i8kkvl: "f4px1ci",
58
- Belr9w4: "fn67r4l"
59
- },
60
- horizontal: {
61
- Beiy3e4: "f1063pyq"
62
- },
63
18
  vertical: {
64
19
  Beiy3e4: "f1vx9l62"
65
20
  }
66
21
  }, {
67
- d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".fez10in{line-height:0;}", ".f4px1ci{column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1063pyq{flex-direction:row;}", ".f1vx9l62{flex-direction:column;}"]
22
+ d: [".f1vx9l62{flex-direction:column;}"]
68
23
  });
69
- const useLoaderStyles = /*#__PURE__*/__styles({
70
- spinnerSVG: {
71
- B3aqqti: "f1or16p5",
72
- Brovlpu: "f1grzc83",
73
- Bxa1mx5: "f19shzzi",
74
- Bwaue66: ["f5tbecn", "f15qb8s7"],
75
- fyp1ls: "fn4mtlg",
76
- ag6ruv: "f1y80fxs",
77
- osj692: "f1r2crtq",
78
- aq5vjd: "f1wsi8sr",
79
- tlu9e1: "f1bkm2qd",
80
- J3u96z: "f1urqz7h",
81
- d32isg: "f1da2vov",
82
- Bsvqbuc: "f11rfva0",
83
- b3s3i5: "f1exc66"
24
+ const useSpinnerBaseClassName = /*#__PURE__*/__resetStyles("rvgcg50", "r15nd2jo", {
25
+ r: [".rvgcg50{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:rb7n1on;}", "@keyframes rb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}", ".r15nd2jo{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:r1gx3jof;}", "@keyframes r1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"],
26
+ s: ["@media screen and (forced-colors: active){.rvgcg50{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}", "@media screen and (prefers-reduced-motion: reduce){.rvgcg50{animation-duration:1.8s;}}", "@media screen and (forced-colors: active){.r15nd2jo{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}", "@media screen and (prefers-reduced-motion: reduce){.r15nd2jo{animation-duration:1.8s;}}"]
27
+ });
28
+ // The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.
29
+ // The segments are rotated out from behind the mask to expand the visible arc from
30
+ // 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.
31
+ // The tail and spinner itself also have 360deg rotation animations for the spin.
32
+ const useSpinnerTailBaseClassName = /*#__PURE__*/__resetStyles("r1lregi5", "rxq293c", {
33
+ r: [".r1lregi5{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r15mim6k;}", ".r1lregi5::before,.r1lregi5::after{content:\"\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}", "@keyframes r15mim6k{0%{transform:rotate(-135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(225deg);}}", ".r1lregi5::before{animation-name:r18vhmn8;}", "@keyframes r18vhmn8{0%{transform:rotate(0deg);}50%{transform:rotate(105deg);}100%{transform:rotate(0deg);}}", ".r1lregi5::after{animation-name:rkgrvoi;}", "@keyframes rkgrvoi{0%{transform:rotate(0deg);}50%{transform:rotate(225deg);}100%{transform:rotate(0deg);}}", ".rxq293c{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r109gmi5;}", ".rxq293c::before,.rxq293c::after{content:\"\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}", "@keyframes r109gmi5{0%{transform:rotate(135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(-225deg);}}", ".rxq293c::before{animation-name:r17whflh;}", "@keyframes r17whflh{0%{transform:rotate(0deg);}50%{transform:rotate(-105deg);}100%{transform:rotate(0deg);}}", ".rxq293c::after{animation-name:re4odhl;}", "@keyframes re4odhl{0%{transform:rotate(0deg);}50%{transform:rotate(-225deg);}100%{transform:rotate(0deg);}}"],
34
+ s: ["@media screen and (prefers-reduced-motion: reduce){.r1lregi5{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.r1lregi5::before,.r1lregi5::after{content:none;}}", "@media screen and (prefers-reduced-motion: reduce){.rxq293c{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.rxq293c::before,.rxq293c::after{content:none;}}"]
35
+ });
36
+ const useSpinnerStyles = /*#__PURE__*/__styles({
37
+ inverted: {
38
+ De3pzq: "fr407j0",
39
+ sj55zd: "f1f7voed"
40
+ },
41
+ rtlTail: {
42
+ btxmck: "f179dep3",
43
+ gb5jj2: "fbz9ihp",
44
+ Br2kee7: "f1wkkxo7"
84
45
  },
85
46
  "extra-tiny": {
86
- Bah9ito: "f1x2gjcb",
87
- ut6tcf: "f1vjiaua",
88
- B7p06xz: "fv1u54w",
89
- B807ibg: "f1oebb0s"
47
+ Bqenvij: "fd461yt",
48
+ a9b677: "fjw5fx7",
49
+ qmp6fs: "f1v3ph3m"
90
50
  },
91
51
  tiny: {
92
- Bah9ito: "f1j4wmu2",
93
- ut6tcf: "f1vppzuq",
94
- B7p06xz: "fv1u54w",
95
- B807ibg: "fngtx1d"
52
+ Bqenvij: "fjamq6b",
53
+ a9b677: "f64fuq3",
54
+ qmp6fs: "f1v3ph3m"
96
55
  },
97
56
  "extra-small": {
98
- Bah9ito: "fmpqlna",
99
- ut6tcf: "f15z5jzu",
100
- B7p06xz: "fv1u54w",
101
- B807ibg: "fadawes"
57
+ Bqenvij: "frvgh55",
58
+ a9b677: "fq4mcun",
59
+ qmp6fs: "f1v3ph3m"
102
60
  },
103
61
  small: {
104
- Bah9ito: "fo52gbo",
105
- ut6tcf: "f1b41i3v",
106
- B7p06xz: "fv1u54w",
107
- B807ibg: "f1xqyyrl"
62
+ Bqenvij: "fxldao9",
63
+ a9b677: "f1w9dchk",
64
+ qmp6fs: "f1v3ph3m"
108
65
  },
109
66
  medium: {
110
- Bah9ito: "f1aiqagr",
111
- ut6tcf: "f1wtx80b",
112
- B7p06xz: "f1flujpd",
113
- B807ibg: "f1u06hy7"
67
+ Bqenvij: "f1d2rq10",
68
+ a9b677: "f1szoe96",
69
+ qmp6fs: "fb52u90"
114
70
  },
115
71
  large: {
116
- Bah9ito: "f1trdq7b",
117
- ut6tcf: "f9e0mc5",
118
- B7p06xz: "f1flujpd",
119
- B807ibg: "f13pmvhl"
72
+ Bqenvij: "f8ljn23",
73
+ a9b677: "fpdz1er",
74
+ qmp6fs: "fb52u90"
120
75
  },
121
76
  "extra-large": {
122
- Bah9ito: "f89rf2a",
123
- ut6tcf: "f1w2xg3q",
124
- B7p06xz: "f1flujpd",
125
- B807ibg: "fmn74v6"
77
+ Bqenvij: "fbhnoac",
78
+ a9b677: "feqmc2u",
79
+ qmp6fs: "fb52u90"
126
80
  },
127
81
  huge: {
128
- Bah9ito: "f1rx7k5y",
129
- ut6tcf: "f1vtyt49",
130
- B7p06xz: "f1owbg48",
131
- B807ibg: "f1fr1izd"
132
- }
133
- }, {
134
- f: [".f1or16p5:focus{outline-width:3px;}", ".f1grzc83:focus{outline-style:solid;}", ".f19shzzi:focus{outline-color:transparent;}"],
135
- k: ["@keyframes fb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}", "@keyframes f1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"],
136
- d: [".f5tbecn>svg{animation-name:fb7n1on;}", ".f15qb8s7>svg{animation-name:f1gx3jof;}", ".fn4mtlg>svg{animation-duration:3s;}", ".f1y80fxs>svg{animation-iteration-count:infinite;}", ".f1r2crtq>svg{animation-timing-function:linear;}", ".f1wsi8sr>svg{background-color:transparent;}", ".f1da2vov>svg>circle{cx:50%;}", ".f11rfva0>svg>circle{cy:50%;}", ".f1exc66>svg>circle{fill:none;}", ".f1x2gjcb>svg{height:16px;}", ".f1vjiaua>svg{width:16px;}", ".fv1u54w>svg>circle{stroke-width:var(--strokeWidthThick);}", ".f1oebb0s>svg>circle{r:7px;}", ".f1j4wmu2>svg{height:20px;}", ".f1vppzuq>svg{width:20px;}", ".fngtx1d>svg>circle{r:9px;}", ".fmpqlna>svg{height:24px;}", ".f15z5jzu>svg{width:24px;}", ".fadawes>svg>circle{r:11px;}", ".fo52gbo>svg{height:28px;}", ".f1b41i3v>svg{width:28px;}", ".f1xqyyrl>svg>circle{r:13px;}", ".f1aiqagr>svg{height:32px;}", ".f1wtx80b>svg{width:32px;}", ".f1flujpd>svg>circle{stroke-width:var(--strokeWidthThicker);}", ".f1u06hy7>svg>circle{r:14.5px;}", ".f1trdq7b>svg{height:36px;}", ".f9e0mc5>svg{width:36px;}", ".f13pmvhl>svg>circle{r:16.5px;}", ".f89rf2a>svg{height:40px;}", ".f1w2xg3q>svg{width:40px;}", ".fmn74v6>svg>circle{r:18.5px;}", ".f1rx7k5y>svg{height:44px;}", ".f1vtyt49>svg{width:44px;}", ".f1owbg48>svg>circle{stroke-width:var(--strokeWidthThickest);}", ".f1fr1izd>svg>circle{r:20px;}"],
137
- m: [["@media screen and (prefers-reduced-motion: reduce){.f1bkm2qd>svg{animation-duration:0.01ms;}}", {
138
- m: "screen and (prefers-reduced-motion: reduce)"
139
- }], ["@media screen and (prefers-reduced-motion: reduce){.f1urqz7h>svg{animation-iteration-count:1;}}", {
140
- m: "screen and (prefers-reduced-motion: reduce)"
141
- }]]
142
- });
143
- const useTrackStyles = /*#__PURE__*/__styles({
144
- inverted: {
145
- gwg7kz: "f1jvpmnu",
146
- Bvrehnu: "fq8a5sv",
147
- Bidp6o: "f1b4lwqj",
148
- cq3kgi: "f1najlst",
149
- Btwiser: "fjxod4",
150
- B8001xd: "fu3xdw0",
151
- Bdordwa: ["f1ttdh6v", "fmyjox0"],
152
- Bo2mdfu: "f1eseayc",
153
- E10nrc: "folzdkc",
154
- Bwl7w15: "fhlfkde",
155
- Bksq7rz: "f1esql28"
156
- },
157
- primary: {
158
- gwg7kz: "f11ditju",
159
- B8k2rxp: "f1m9nikz",
160
- Bvrehnu: "fq8a5sv",
161
- Bidp6o: "f1b4lwqj",
162
- cq3kgi: "f1najlst",
163
- Btwiser: "fjxod4",
164
- B8001xd: "fu3xdw0",
165
- Bdordwa: ["f1ttdh6v", "fmyjox0"],
166
- Bo2mdfu: "f1eseayc",
167
- E10nrc: "folzdkc",
168
- Bwl7w15: "fhlfkde",
169
- Bksq7rz: "f13qeqtg",
170
- y14cdu: "flglbw1"
82
+ Bqenvij: "f1ft4266",
83
+ a9b677: "fksc0bp",
84
+ qmp6fs: "fa3u9ii"
171
85
  }
172
86
  }, {
173
- d: [".f1jvpmnu>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}", ".fq8a5sv>svg>circle.fui-Spinner__Tail{animation-name:f1v1ql0f;}", ".f1b4lwqj>svg>circle.fui-Spinner__Tail{animation-duration:1.5s;}", ".f1najlst>svg>circle.fui-Spinner__Tail{animation-iteration-count:infinite;}", ".fjxod4>svg>circle.fui-Spinner__Tail{animation-timing-function:var(--curveEasyEase);}", ".fu3xdw0>svg>circle.fui-Spinner__Tail{stroke-linecap:round;}", ".f1ttdh6v>svg>circle.fui-Spinner__Tail{transform:rotate(-90deg);}", ".fmyjox0>svg>circle.fui-Spinner__Tail{transform:rotate(90deg);}", ".f1eseayc>svg>circle.fui-Spinner__Tail{transform-origin:50% 50%;}", ".f1esql28>svg>circle.fui-Spinner__Track{stroke:rgba(255, 255, 255, 0.2);}", ".f11ditju>svg>circle.fui-Spinner__Tail{stroke:var(--colorBrandStroke1);}", ".f13qeqtg>svg>circle.fui-Spinner__Track{stroke:var(--colorBrandStroke2Contrast);}"],
174
- k: ["@keyframes f1v1ql0f{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"],
175
- m: [["@media screen and (prefers-reduced-motion: reduce){.folzdkc>svg>circle.fui-Spinner__Tail{animation-duration:0.01ms;}}", {
87
+ d: [".fr407j0{background-color:var(--colorNeutralStrokeAlpha2);}", ".f1f7voed{color:var(--colorNeutralStrokeOnBrand2);}", ".f179dep3{-webkit-mask-image:conic-gradient(white 255deg, transparent 255deg);mask-image:conic-gradient(white 255deg, transparent 255deg);}", ".fbz9ihp::before,.fbz9ihp::after{background-image:conic-gradient(transparent 225deg, currentcolor 225deg);}", ".fd461yt{height:16px;}", ".fjw5fx7{width:16px;}", ".f1v3ph3m{--fui-Spinner--strokeWidth:var(--strokeWidthThick);}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}", ".fxldao9{height:28px;}", ".f1w9dchk{width:28px;}", ".f1d2rq10{height:32px;}", ".f1szoe96{width:32px;}", ".fb52u90{--fui-Spinner--strokeWidth:var(--strokeWidthThicker);}", ".f8ljn23{height:36px;}", ".fpdz1er{width:36px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}", ".f1ft4266{height:44px;}", ".fksc0bp{width:44px;}", ".fa3u9ii{--fui-Spinner--strokeWidth:var(--strokeWidthThickest);}"],
88
+ m: [["@media screen and (prefers-reduced-motion: reduce){.f1wkkxo7{background-image:conic-gradient(currentcolor 0deg, transparent 240deg);}}", {
176
89
  m: "screen and (prefers-reduced-motion: reduce)"
177
- }], ["@media screen and (prefers-reduced-motion: reduce){.fhlfkde>svg>circle.fui-Spinner__Tail{animation-iteration-count:1;}}", {
178
- m: "screen and (prefers-reduced-motion: reduce)"
179
- }], ["@media screen and (forced-colors: active){.f1m9nikz>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}}", {
180
- m: "screen and (forced-colors: active)"
181
- }], ["@media screen and (forced-colors: active){.flglbw1>svg>circle.fui-Spinner__Track{stroke:var(--colorNeutralBackgroundInverted);}}", {
182
- m: "screen and (forced-colors: active)"
183
90
  }]]
184
91
  });
185
92
  const useLabelStyles = /*#__PURE__*/__styles({
186
93
  inverted: {
187
- sj55zd: "f15aqcq"
94
+ sj55zd: "fonrgv7"
188
95
  },
189
- primary: {},
190
96
  "extra-tiny": {
191
97
  Bahqtrf: "fk6fouc",
192
98
  Be2twd7: "fkhj508",
@@ -236,7 +142,7 @@ const useLabelStyles = /*#__PURE__*/__styles({
236
142
  Bg96gwp: "f106mvju"
237
143
  }
238
144
  }, {
239
- d: [".f15aqcq{color:rgba(255, 255, 255, 1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}"]
145
+ d: [".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}"]
240
146
  });
241
147
  /**
242
148
  * Apply styling to the Spinner slots based on the state
@@ -245,18 +151,26 @@ export const useSpinnerStyles_unstable = state => {
245
151
  const {
246
152
  labelPosition,
247
153
  size,
248
- appearance = 'primary'
154
+ appearance
249
155
  } = state;
156
+ const {
157
+ dir
158
+ } = useFluent();
159
+ const rootBaseClassName = useRootBaseClassName();
250
160
  const rootStyles = useRootStyles();
251
- const spinnerStyles = useLoaderStyles();
161
+ const spinnerBaseClassName = useSpinnerBaseClassName();
162
+ const spinnerStyles = useSpinnerStyles();
163
+ const spinnerTailBaseClassName = useSpinnerTailBaseClassName();
252
164
  const labelStyles = useLabelStyles();
253
- const trackStyles = useTrackStyles();
254
- state.root.className = mergeClasses(spinnerClassNames.root, rootStyles.root, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, (labelPosition === 'before' || labelPosition === 'after') && rootStyles.horizontal, state.root.className);
165
+ state.root.className = mergeClasses(spinnerClassNames.root, rootBaseClassName, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, state.root.className);
255
166
  if (state.spinner) {
256
- state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerStyles.spinnerSVG, spinnerStyles[size], trackStyles[appearance], state.spinner.className);
167
+ state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerBaseClassName, spinnerStyles[size], appearance === 'inverted' && spinnerStyles.inverted, state.spinner.className);
168
+ }
169
+ if (state.spinnerTail) {
170
+ state.spinnerTail.className = mergeClasses(spinnerClassNames.spinnerTail, spinnerTailBaseClassName, dir === 'rtl' && spinnerStyles.rtlTail, state.spinnerTail.className);
257
171
  }
258
172
  if (state.label) {
259
- state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], labelStyles[appearance], state.label.className);
173
+ state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], appearance === 'inverted' && labelStyles.inverted, state.label.className);
260
174
  }
261
175
  return state;
262
176
  };
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","spinnerClassNames","root","spinner","label","rValues","extraTiny","tiny","extraSmall","small","medium","large","extraLarge","huge","spinnnerSizes","spinnerAnimation","container","animationDuration","animationIterationCount","animationTimingFunction","backgroundColor","useRootStyles","mc9l5x","Bt984gj","Brf1p80","Bg96gwp","i8kkvl","Belr9w4","horizontal","Beiy3e4","vertical","d","useLoaderStyles","spinnerSVG","B3aqqti","Brovlpu","Bxa1mx5","Bwaue66","fyp1ls","ag6ruv","osj692","aq5vjd","tlu9e1","J3u96z","d32isg","Bsvqbuc","b3s3i5","Bah9ito","ut6tcf","B7p06xz","B807ibg","f","k","m","useTrackStyles","inverted","gwg7kz","Bvrehnu","Bidp6o","cq3kgi","Btwiser","B8001xd","Bdordwa","Bo2mdfu","E10nrc","Bwl7w15","Bksq7rz","primary","B8k2rxp","y14cdu","useLabelStyles","sj55zd","Bahqtrf","Be2twd7","Bhrd7zp","useSpinnerStyles_unstable","state","labelPosition","size","appearance","rootStyles","spinnerStyles","labelStyles","trackStyles","className"],"sources":["useSpinnerStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const spinnerClassNames = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n label: 'fui-Spinner__label'\n};\n/*\n * TODO: Update with proper tokens when added\n * Radii for the Spinner circles\n */ const rValues = {\n extraTiny: '7px',\n tiny: '9px',\n extraSmall: '11px',\n small: '13px',\n medium: '14.5px',\n large: '16.5px',\n extraLarge: '18.5px',\n huge: '20px'\n};\n/*\n * TODO: Update with proper tokens when added\n * Sizes for the Spinner\n */ const spinnnerSizes = {\n extraTiny: '16px',\n tiny: '20px',\n extraSmall: '24px',\n small: '28px',\n medium: '32px',\n large: '36px',\n extraLarge: '40px',\n huge: '44px'\n};\n/*\n * TODO: Update with proper tokens when added\n * Animation for Spinner\n */ const spinnerAnimation = {\n container: {\n animationDuration: '3s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n backgroundColor: 'transparent'\n }\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: '0',\n ...shorthands.gap('8px')\n },\n horizontal: {\n flexDirection: 'row'\n },\n vertical: {\n flexDirection: 'column'\n }\n});\nconst useLoaderStyles = makeStyles({\n // global SVG class\n spinnerSVG: {\n ':focus': {\n ...shorthands.outline('3px', 'solid', 'transparent')\n },\n ['& > svg']: {\n animationName: {\n '0%': {\n transform: 'rotate(0deg)'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n ...spinnerAnimation.container,\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1'\n }\n },\n ['& > svg > circle']: {\n cx: '50%',\n cy: '50%',\n fill: 'none'\n }\n },\n 'extra-tiny': {\n ['& > svg']: {\n height: spinnnerSizes.extraTiny,\n width: spinnnerSizes.extraTiny\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThick,\n r: rValues.extraTiny\n }\n },\n tiny: {\n ['& > svg']: {\n height: spinnnerSizes.tiny,\n width: spinnnerSizes.tiny\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThick,\n r: rValues.tiny\n }\n },\n 'extra-small': {\n ['& > svg']: {\n height: spinnnerSizes.extraSmall,\n width: spinnnerSizes.extraSmall\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThick,\n r: rValues.extraSmall\n }\n },\n small: {\n ['& > svg']: {\n height: spinnnerSizes.small,\n width: spinnnerSizes.small\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThick,\n r: rValues.small\n }\n },\n medium: {\n ['& > svg']: {\n height: spinnnerSizes.medium,\n width: spinnnerSizes.medium\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThicker,\n r: rValues.medium\n }\n },\n large: {\n ['& > svg']: {\n height: spinnnerSizes.large,\n width: spinnnerSizes.large\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThicker,\n r: rValues.large\n }\n },\n 'extra-large': {\n ['& > svg']: {\n height: spinnnerSizes.extraLarge,\n width: spinnnerSizes.extraLarge\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThicker,\n r: rValues.extraLarge\n }\n },\n huge: {\n ['& > svg']: {\n height: spinnnerSizes.huge,\n width: spinnnerSizes.huge\n },\n ['& > svg > circle']: {\n strokeWidth: tokens.strokeWidthThickest,\n r: rValues.huge\n }\n }\n});\nconst useTrackStyles = makeStyles({\n inverted: {\n ['& > svg > circle.fui-Spinner__Tail']: {\n stroke: tokens.colorNeutralStrokeOnBrand2,\n animationName: {\n '0%': {\n strokeDasharray: '1,150',\n strokeDashoffset: '0'\n },\n '50%': {\n strokeDasharray: '90,150',\n strokeDashoffset: '-35'\n },\n '100%': {\n strokeDasharray: '90,150',\n strokeDashoffset: '-124'\n }\n },\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: tokens.curveEasyEase,\n strokeLinecap: 'round',\n transform: 'rotate(-90deg)',\n transformOrigin: '50% 50%',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1'\n }\n },\n ['& > svg > circle.fui-Spinner__Track']: {\n stroke: 'rgba(255, 255, 255, 0.2)'\n }\n },\n primary: {\n ['& > svg > circle.fui-Spinner__Tail']: {\n stroke: tokens.colorBrandStroke1,\n '@media screen and (forced-colors: active)': {\n stroke: tokens.colorNeutralStrokeOnBrand2\n },\n animationName: {\n '0%': {\n strokeDasharray: '1,150',\n strokeDashoffset: '0'\n },\n '50%': {\n strokeDasharray: '90,150',\n strokeDashoffset: '-35'\n },\n '100%': {\n strokeDasharray: '90,150',\n strokeDashoffset: '-124'\n }\n },\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: tokens.curveEasyEase,\n strokeLinecap: 'round',\n transform: 'rotate(-90deg)',\n transformOrigin: '50% 50%',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1'\n }\n },\n ['& > svg > circle.fui-Spinner__Track']: {\n stroke: tokens.colorBrandStroke2Contrast,\n '@media screen and (forced-colors: active)': {\n stroke: tokens.colorNeutralBackgroundInverted\n }\n }\n }\n});\nconst useLabelStyles = makeStyles({\n // style for label\n inverted: {\n color: 'rgba(255, 255, 255, 1)'\n },\n primary: {},\n 'extra-tiny': {\n ...typographyStyles.body1\n },\n tiny: {\n ...typographyStyles.body1\n },\n 'extra-small': {\n ...typographyStyles.body1\n },\n small: {\n ...typographyStyles.body1\n },\n medium: {\n ...typographyStyles.subtitle2\n },\n large: {\n ...typographyStyles.subtitle2\n },\n 'extra-large': {\n ...typographyStyles.subtitle2\n },\n huge: {\n ...typographyStyles.subtitle1\n }\n});\n/**\n * Apply styling to the Spinner slots based on the state\n */ export const useSpinnerStyles_unstable = (state)=>{\n const { labelPosition, size, appearance = 'primary' } = state;\n const rootStyles = useRootStyles();\n const spinnerStyles = useLoaderStyles();\n const labelStyles = useLabelStyles();\n const trackStyles = useTrackStyles();\n state.root.className = mergeClasses(spinnerClassNames.root, rootStyles.root, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, (labelPosition === 'before' || labelPosition === 'after') && rootStyles.horizontal, state.root.className);\n if (state.spinner) {\n state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerStyles.spinnerSVG, spinnerStyles[size], trackStyles[appearance], state.spinner.className);\n }\n if (state.label) {\n state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], labelStyles[appearance], state.label.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE,sBAAsB;EAC/BC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AACA;AAAI,MAAMC,OAAO,GAAG;EAChBC,SAAS,EAAE,KAAK;EAChBC,IAAI,EAAE,KAAK;EACXC,UAAU,EAAE,MAAM;EAClBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,QAAQ;EACfC,UAAU,EAAE,QAAQ;EACpBC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AACA;AAAI,MAAMC,aAAa,GAAG;EACtBR,SAAS,EAAE,MAAM;EACjBC,IAAI,EAAE,MAAM;EACZC,UAAU,EAAE,MAAM;EAClBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE,MAAM;EACbC,UAAU,EAAE,MAAM;EAClBC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AACA;AAAI,MAAME,gBAAgB,GAAG;EACzBC,SAAS,EAAE;IACPC,iBAAiB,EAAE,IAAI;IACvBC,uBAAuB,EAAE,UAAU;IACnCC,uBAAuB,EAAE,QAAQ;IACjCC,eAAe,EAAE;EACrB;AACJ,CAAC;AACD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D,MAAM;IAAEC,aAAa;IAAEC,IAAI;IAAEC,UAAU,GAAG;EAAU,CAAC,GAAGH,KAAK;EAC7D,MAAMI,UAAU,GAAG3D,aAAa,CAAC,CAAC;EAClC,MAAM4D,aAAa,GAAGjD,eAAe,CAAC,CAAC;EACvC,MAAMkD,WAAW,GAAGZ,cAAc,CAAC,CAAC;EACpC,MAAMa,WAAW,GAAG7B,cAAc,CAAC,CAAC;EACpCsB,KAAK,CAAC1E,IAAI,CAACkF,SAAS,GAAGvF,YAAY,CAACI,iBAAiB,CAACC,IAAI,EAAE8E,UAAU,CAAC9E,IAAI,EAAE,CAAC2E,aAAa,KAAK,OAAO,IAAIA,aAAa,KAAK,OAAO,KAAKG,UAAU,CAAClD,QAAQ,EAAE,CAAC+C,aAAa,KAAK,QAAQ,IAAIA,aAAa,KAAK,OAAO,KAAKG,UAAU,CAACpD,UAAU,EAAEgD,KAAK,CAAC1E,IAAI,CAACkF,SAAS,CAAC;EACvQ,IAAIR,KAAK,CAACzE,OAAO,EAAE;IACfyE,KAAK,CAACzE,OAAO,CAACiF,SAAS,GAAGvF,YAAY,CAACI,iBAAiB,CAACE,OAAO,EAAE8E,aAAa,CAAChD,UAAU,EAAEgD,aAAa,CAACH,IAAI,CAAC,EAAEK,WAAW,CAACJ,UAAU,CAAC,EAAEH,KAAK,CAACzE,OAAO,CAACiF,SAAS,CAAC;EACtK;EACA,IAAIR,KAAK,CAACxE,KAAK,EAAE;IACbwE,KAAK,CAACxE,KAAK,CAACgF,SAAS,GAAGvF,YAAY,CAACI,iBAAiB,CAACG,KAAK,EAAE8E,WAAW,CAACJ,IAAI,CAAC,EAAEI,WAAW,CAACH,UAAU,CAAC,EAAEH,KAAK,CAACxE,KAAK,CAACgF,SAAS,CAAC;EACpI;EACA,OAAOR,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["useFluent_unstable","useFluent","tokens","typographyStyles","__resetStyles","__styles","mergeClasses","spinnerClassNames","root","spinner","spinnerTail","label","vars","strokeWidth","useRootBaseClassName","useRootStyles","vertical","Beiy3e4","d","useSpinnerBaseClassName","r","s","useSpinnerTailBaseClassName","useSpinnerStyles","inverted","De3pzq","sj55zd","rtlTail","btxmck","gb5jj2","Br2kee7","Bqenvij","a9b677","qmp6fs","tiny","small","medium","large","huge","m","useLabelStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","useSpinnerStyles_unstable","state","labelPosition","size","appearance","dir","rootBaseClassName","rootStyles","spinnerBaseClassName","spinnerStyles","spinnerTailBaseClassName","labelStyles","className"],"sources":["useSpinnerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nexport const spinnerClassNames = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label'\n};\n/**\n * CSS variables used internally by Spinner\n */ const vars = {\n strokeWidth: '--fui-Spinner--strokeWidth'\n};\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: '0',\n gap: '8px'\n});\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column'\n }\n});\nconst useSpinnerBaseClassName = makeResetStyles({\n position: 'relative',\n flexShrink: 0,\n // Use a mask to create the ring shape of the spinner.\n maskImage: `radial-gradient(closest-side, ` + `transparent calc(100% - var(${vars.strokeWidth}) - 1px), ` + `white calc(100% - var(${vars.strokeWidth})) calc(100% - 1px), ` + `transparent 100%)`,\n backgroundColor: tokens.colorBrandStroke2Contrast,\n color: tokens.colorBrandStroke1,\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n },\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationName: {\n '0%': {\n transform: 'rotate(0deg)'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '1.8s'\n }\n});\n// The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.\n// The segments are rotated out from behind the mask to expand the visible arc from\n// 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.\n// The tail and spinner itself also have 360deg rotation animations for the spin.\nconst useSpinnerTailBaseClassName = makeResetStyles({\n position: 'absolute',\n width: '100%',\n height: '100%',\n maskImage: 'conic-gradient(transparent 105deg, white 105deg)',\n '&::before, &::after': {\n content: '\"\"',\n position: 'absolute',\n width: '100%',\n height: '100%',\n animation: 'inherit',\n backgroundImage: 'conic-gradient(currentcolor 135deg, transparent 135deg)'\n },\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: tokens.curveEasyEase,\n animationName: {\n '0%': {\n transform: 'rotate(-135deg)'\n },\n '50%': {\n transform: 'rotate(0deg)'\n },\n '100%': {\n transform: 'rotate(225deg)'\n }\n },\n '&::before': {\n animationName: {\n '0%': {\n transform: 'rotate(0deg)'\n },\n '50%': {\n transform: 'rotate(105deg)'\n },\n '100%': {\n transform: 'rotate(0deg)'\n }\n }\n },\n '&::after': {\n animationName: {\n '0%': {\n transform: 'rotate(0deg)'\n },\n '50%': {\n transform: 'rotate(225deg)'\n },\n '100%': {\n transform: 'rotate(0deg)'\n }\n }\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationIterationCount: '0',\n backgroundImage: 'conic-gradient(transparent 120deg, currentcolor 360deg)',\n '&::before, &::after': {\n content: 'none'\n }\n }\n});\nconst useSpinnerStyles = makeStyles({\n inverted: {\n backgroundColor: tokens.colorNeutralStrokeAlpha2,\n color: tokens.colorNeutralStrokeOnBrand2\n },\n rtlTail: {\n maskImage: 'conic-gradient(white 255deg, transparent 255deg)',\n '&::before, &::after': {\n backgroundImage: 'conic-gradient(transparent 225deg, currentcolor 225deg)'\n },\n '@media screen and (prefers-reduced-motion: reduce)': {\n backgroundImage: 'conic-gradient(currentcolor 0deg, transparent 240deg)'\n }\n },\n 'extra-tiny': {\n height: '16px',\n width: '16px',\n [vars.strokeWidth]: tokens.strokeWidthThick\n },\n tiny: {\n height: '20px',\n width: '20px',\n [vars.strokeWidth]: tokens.strokeWidthThick\n },\n 'extra-small': {\n height: '24px',\n width: '24px',\n [vars.strokeWidth]: tokens.strokeWidthThick\n },\n small: {\n height: '28px',\n width: '28px',\n [vars.strokeWidth]: tokens.strokeWidthThick\n },\n medium: {\n height: '32px',\n width: '32px',\n [vars.strokeWidth]: tokens.strokeWidthThicker\n },\n large: {\n height: '36px',\n width: '36px',\n [vars.strokeWidth]: tokens.strokeWidthThicker\n },\n 'extra-large': {\n height: '40px',\n width: '40px',\n [vars.strokeWidth]: tokens.strokeWidthThicker\n },\n huge: {\n height: '44px',\n width: '44px',\n [vars.strokeWidth]: tokens.strokeWidthThickest\n }\n});\nconst useLabelStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundStaticInverted\n },\n 'extra-tiny': {\n ...typographyStyles.body1\n },\n tiny: {\n ...typographyStyles.body1\n },\n 'extra-small': {\n ...typographyStyles.body1\n },\n small: {\n ...typographyStyles.body1\n },\n medium: {\n ...typographyStyles.subtitle2\n },\n large: {\n ...typographyStyles.subtitle2\n },\n 'extra-large': {\n ...typographyStyles.subtitle2\n },\n huge: {\n ...typographyStyles.subtitle1\n }\n});\n/**\n * Apply styling to the Spinner slots based on the state\n */ export const useSpinnerStyles_unstable = (state)=>{\n const { labelPosition, size, appearance } = state;\n const { dir } = useFluent();\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const spinnerBaseClassName = useSpinnerBaseClassName();\n const spinnerStyles = useSpinnerStyles();\n const spinnerTailBaseClassName = useSpinnerTailBaseClassName();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(spinnerClassNames.root, rootBaseClassName, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, state.root.className);\n if (state.spinner) {\n state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerBaseClassName, spinnerStyles[size], appearance === 'inverted' && spinnerStyles.inverted, state.spinner.className);\n }\n if (state.spinnerTail) {\n state.spinnerTail.className = mergeClasses(spinnerClassNames.spinnerTail, spinnerTailBaseClassName, dir === 'rtl' && spinnerStyles.rtlTail, state.spinnerTail.className);\n }\n if (state.label) {\n state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], appearance === 'inverted' && labelStyles.inverted, state.label.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,kBAAkB,IAAIC,SAAS,QAAQ,iCAAiC;AACjF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAAAC,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE,sBAAsB;EAC/BC,WAAW,EAAE,0BAA0B;EACvCC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AAAI,MAAMC,IAAI,GAAG;EACbC,WAAW,EAAE;AACjB,CAAC;AACD,MAAMC,oBAAoB,gBAAGV,aAAA,+GAM5B,CAAC;AACF,MAAMW,aAAa,gBAAGV,QAAA;EAAAW,QAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAIrB,CAAC;AACF,MAAMC,uBAAuB,gBAAGf,aAAA;EAAAgB,CAAA;EAAAC,CAAA;AAAA,CA0B/B,CAAC;AACF;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,gBAAGlB,aAAA;EAAAgB,CAAA;EAAAC,CAAA;AAAA,CA4DnC,CAAC;AACF,MAAME,gBAAgB,gBAAGlB,QAAA;EAAAmB,QAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAA;IAAAC,OA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CAACnC,KAAK,CAAC8C,SAAS,GAAGnD,YAAY,CAACC,iBAAiB,CAACI,KAAK,EAAE6C,WAAW,CAACR,IAAI,CAAC,EAAEC,UAAU,KAAK,UAAU,IAAIO,WAAW,CAAChC,QAAQ,EAAEsB,KAAK,CAACnC,KAAK,CAAC8C,SAAS,CAAC;EAC9J;EACA,OAAOX,KAAK;AAChB,CAAC"}
@@ -16,7 +16,9 @@ const renderSpinner_unstable = (state)=>{
16
16
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
17
17
  children: [
18
18
  state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.label, {}),
19
- state.spinner && shouldRenderSpinner && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.spinner, {}),
19
+ state.spinner && shouldRenderSpinner && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.spinner, {
20
+ children: state.spinnerTail && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.spinnerTail, {})
21
+ }),
20
22
  state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.label, {})
21
23
  ]
22
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSpinner.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Spinner\n */ export const renderSpinner_unstable = (state)=>{\n assertSlots(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/ _jsx(state.label, {}),\n state.spinner && shouldRenderSpinner && /*#__PURE__*/ _jsx(state.spinner, {}),\n state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/ _jsx(state.label, {})\n ]\n });\n};\n"],"names":["renderSpinner_unstable","state","assertSlots","labelPosition","shouldRenderSpinner","_jsxs","root","children","label","_jsx","spinner"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,yBAAyB,CAACC;IACvCC,IAAAA,2BAAW,EAACD;IACZ,MAAM,EAAEE,aAAa,EAAEC,mBAAmB,EAAE,GAAGH;IAC/C,OAAO,WAAW,GAAGI,IAAAA,gBAAK,EAACJ,MAAMK,IAAI,EAAE;QACnCC,UAAU;YACNN,MAAMO,KAAK,IAAIJ,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,KAAM,WAAW,GAAGM,IAAAA,eAAI,EAACR,MAAMO,KAAK,EAAE,CAAC;YACpIP,MAAMS,OAAO,IAAIN,uBAAuB,WAAW,GAAGK,IAAAA,eAAI,EAACR,MAAMS,OAAO,EAAE,CAAC;YAC3ET,MAAMO,KAAK,IAAIJ,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,KAAM,WAAW,GAAGM,IAAAA,eAAI,EAACR,MAAMO,KAAK,EAAE,CAAC;SACtI;IACL;AACJ"}
1
+ {"version":3,"sources":["renderSpinner.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Spinner\n */ export const renderSpinner_unstable = (state)=>{\n assertSlots(state);\n const { labelPosition, shouldRenderSpinner } = state;\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.label && shouldRenderSpinner && (labelPosition === 'above' || labelPosition === 'before') && /*#__PURE__*/ _jsx(state.label, {}),\n state.spinner && shouldRenderSpinner && /*#__PURE__*/ _jsx(state.spinner, {\n children: state.spinnerTail && /*#__PURE__*/ _jsx(state.spinnerTail, {})\n }),\n state.label && shouldRenderSpinner && (labelPosition === 'below' || labelPosition === 'after') && /*#__PURE__*/ _jsx(state.label, {})\n ]\n });\n};\n"],"names":["renderSpinner_unstable","state","assertSlots","labelPosition","shouldRenderSpinner","_jsxs","root","children","label","_jsx","spinner","spinnerTail"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,yBAAyB,CAACC;IACvCC,IAAAA,2BAAW,EAACD;IACZ,MAAM,EAAEE,aAAa,EAAEC,mBAAmB,EAAE,GAAGH;IAC/C,OAAO,WAAW,GAAGI,IAAAA,gBAAK,EAACJ,MAAMK,IAAI,EAAE;QACnCC,UAAU;YACNN,MAAMO,KAAK,IAAIJ,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,QAAO,KAAM,WAAW,GAAGM,IAAAA,eAAI,EAACR,MAAMO,KAAK,EAAE,CAAC;YACpIP,MAAMS,OAAO,IAAIN,uBAAuB,WAAW,GAAGK,IAAAA,eAAI,EAACR,MAAMS,OAAO,EAAE;gBACtEH,UAAUN,MAAMU,WAAW,IAAI,WAAW,GAAGF,IAAAA,eAAI,EAACR,MAAMU,WAAW,EAAE,CAAC;YAC1E;YACAV,MAAMO,KAAK,IAAIJ,uBAAwBD,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,KAAM,WAAW,GAAGM,IAAAA,eAAI,EAACR,MAAMO,KAAK,EAAE,CAAC;SACtI;IACL;AACJ"}
@@ -12,7 +12,6 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _reactutilities = require("@fluentui/react-utilities");
14
14
  const _reactlabel = require("@fluentui/react-label");
15
- const _DefaultSvg = require("./DefaultSvg");
16
15
  const _SpinnerContext = require("../../contexts/SpinnerContext");
17
16
  const useSpinner_unstable = (props, ref)=>{
18
17
  // Props
@@ -59,7 +58,6 @@ const useSpinner_unstable = (props, ref)=>{
59
58
  const spinnerShortHand = _reactutilities.slot.optional(props.spinner, {
60
59
  renderByDefault: true,
61
60
  defaultProps: {
62
- children: /*#__PURE__*/ _react.createElement(_DefaultSvg.DefaultSvg, null),
63
61
  tabIndex
64
62
  },
65
63
  elementType: 'span'
@@ -76,10 +74,14 @@ const useSpinner_unstable = (props, ref)=>{
76
74
  components: {
77
75
  root: 'div',
78
76
  spinner: 'span',
77
+ spinnerTail: 'span',
79
78
  label: _reactlabel.Label
80
79
  },
81
80
  root: nativeRoot,
82
81
  spinner: spinnerShortHand,
82
+ spinnerTail: _reactutilities.slot.always(props.spinnerTail, {
83
+ elementType: 'span'
84
+ }),
83
85
  label: labelShorthand
84
86
  };
85
87
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["useSpinner.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport { Label } from '@fluentui/react-label';\nimport { DefaultSvg } from './DefaultSvg';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\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 */ export const useSpinner_unstable = (props, ref)=>{\n // Props\n const { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', labelPosition = 'after', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium', delay = 0 } = props;\n const baseId = useId('spinner');\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role,\n ...rest\n }, [\n 'size'\n ]), {\n elementType: 'div'\n });\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(()=>{\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(()=>{\n setIsShownAfterDelay(true);\n }, delay);\n return ()=>{\n clearDelayTimeout();\n };\n }, [\n setDelayTimeout,\n clearDelayTimeout,\n delay\n ]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: {\n id: baseId\n },\n renderByDefault: false,\n elementType: Label\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(DefaultSvg, null),\n tabIndex\n },\n elementType: 'span'\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state = {\n appearance,\n delay,\n labelPosition,\n size,\n shouldRenderSpinner: !delay || isShownAfterDelay,\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"],"names":["useSpinner_unstable","props","ref","size","contextSize","useSpinnerContext","appearance","labelPosition","delay","baseId","useId","role","tabIndex","rest","nativeRoot","slot","always","getIntrinsicElementProps","elementType","isShownAfterDelay","setIsShownAfterDelay","React","useState","setDelayTimeout","clearDelayTimeout","useTimeout","useEffect","labelShorthand","optional","label","defaultProps","id","renderByDefault","Label","spinnerShortHand","spinner","children","createElement","DefaultSvg","state","shouldRenderSpinner","components","root"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;gCAC2C;4BAC5C;4BACK;gCACO;AASvB,MAAMA,sBAAsB,CAACC,OAAOC;IAC3C,QAAQ;IACR,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGC,IAAAA,iCAAiB;IAC/C,MAAM,EAAEC,aAAa,SAAS,EAAEC,gBAAgB,OAAO,EAAEJ,OAAOC,gBAAgB,QAAQA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,EAAEI,QAAQ,CAAC,EAAE,GAAGP;IACvJ,MAAMQ,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAM,EAAEC,OAAO,aAAa,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGZ;IACpD,MAAMa,aAAaC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;QAC3D,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5Ff,KAAKA;QACLS;QACA,GAAGE,IAAI;IACX,GAAG;QACC;KACH,GAAG;QACAK,aAAa;IACjB;IACA,MAAM,CAACC,mBAAmBC,qBAAqB,GAAGC,OAAMC,QAAQ,CAAC;IACjE,MAAM,CAACC,iBAAiBC,kBAAkB,GAAGC,IAAAA,0BAAU;IACvDJ,OAAMK,SAAS,CAAC;QACZ,IAAIlB,SAAS,GAAG;YACZ;QACJ;QACAe,gBAAgB;YACZH,qBAAqB;QACzB,GAAGZ;QACH,OAAO;YACHgB;QACJ;IACJ,GAAG;QACCD;QACAC;QACAhB;KACH;IACD,MAAMmB,iBAAiBZ,oBAAI,CAACa,QAAQ,CAAC3B,MAAM4B,KAAK,EAAE;QAC9CC,cAAc;YACVC,IAAItB;QACR;QACAuB,iBAAiB;QACjBd,aAAae,iBAAK;IACtB;IACA,MAAMC,mBAAmBnB,oBAAI,CAACa,QAAQ,CAAC3B,MAAMkC,OAAO,EAAE;QAClDH,iBAAiB;QACjBF,cAAc;YACVM,UAAU,WAAW,GAAGf,OAAMgB,aAAa,CAACC,sBAAU,EAAE;YACxD1B;QACJ;QACAM,aAAa;IACjB;IACA,IAAIS,kBAAkBb,cAAc,CAACA,UAAU,CAAC,kBAAkB,EAAE;QAChEA,UAAU,CAAC,kBAAkB,GAAGa,eAAeI,EAAE;IACrD;IACA,MAAMQ,QAAQ;QACVjC;QACAE;QACAD;QACAJ;QACAqC,qBAAqB,CAAChC,SAASW;QAC/BsB,YAAY;YACRC,MAAM;YACNP,SAAS;YACTN,OAAOI,iBAAK;QAChB;QACAS,MAAM5B;QACNqB,SAASD;QACTL,OAAOF;IACX;IACA,OAAOY;AACX"}
1
+ {"version":3,"sources":["useSpinner.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, useTimeout, slot } from '@fluentui/react-utilities';\nimport { Label } from '@fluentui/react-label';\nimport { useSpinnerContext } from '../../contexts/SpinnerContext';\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 */ export const useSpinner_unstable = (props, ref)=>{\n // Props\n const { size: contextSize } = useSpinnerContext();\n const { appearance = 'primary', labelPosition = 'after', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium', delay = 0 } = props;\n const baseId = useId('spinner');\n const { role = 'progressbar', tabIndex, ...rest } = props;\n const nativeRoot = slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role,\n ...rest\n }, [\n 'size'\n ]), {\n elementType: 'div'\n });\n const [isShownAfterDelay, setIsShownAfterDelay] = React.useState(false);\n const [setDelayTimeout, clearDelayTimeout] = useTimeout();\n React.useEffect(()=>{\n if (delay <= 0) {\n return;\n }\n setDelayTimeout(()=>{\n setIsShownAfterDelay(true);\n }, delay);\n return ()=>{\n clearDelayTimeout();\n };\n }, [\n setDelayTimeout,\n clearDelayTimeout,\n delay\n ]);\n const labelShorthand = slot.optional(props.label, {\n defaultProps: {\n id: baseId\n },\n renderByDefault: false,\n elementType: Label\n });\n const spinnerShortHand = slot.optional(props.spinner, {\n renderByDefault: true,\n defaultProps: {\n tabIndex\n },\n elementType: 'span'\n });\n if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {\n nativeRoot['aria-labelledby'] = labelShorthand.id;\n }\n const state = {\n appearance,\n delay,\n labelPosition,\n size,\n shouldRenderSpinner: !delay || isShownAfterDelay,\n components: {\n root: 'div',\n spinner: 'span',\n spinnerTail: 'span',\n label: Label\n },\n root: nativeRoot,\n spinner: spinnerShortHand,\n spinnerTail: slot.always(props.spinnerTail, {\n elementType: 'span'\n }),\n label: labelShorthand\n };\n return state;\n};\n"],"names":["useSpinner_unstable","props","ref","size","contextSize","useSpinnerContext","appearance","labelPosition","delay","baseId","useId","role","tabIndex","rest","nativeRoot","slot","always","getIntrinsicElementProps","elementType","isShownAfterDelay","setIsShownAfterDelay","React","useState","setDelayTimeout","clearDelayTimeout","useTimeout","useEffect","labelShorthand","optional","label","defaultProps","id","renderByDefault","Label","spinnerShortHand","spinner","state","shouldRenderSpinner","components","root","spinnerTail"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;gCAC2C;4BAC5C;gCACY;AASvB,MAAMA,sBAAsB,CAACC,OAAOC;IAC3C,QAAQ;IACR,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGC,IAAAA,iCAAiB;IAC/C,MAAM,EAAEC,aAAa,SAAS,EAAEC,gBAAgB,OAAO,EAAEJ,OAAOC,gBAAgB,QAAQA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,EAAEI,QAAQ,CAAC,EAAE,GAAGP;IACvJ,MAAMQ,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAM,EAAEC,OAAO,aAAa,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGZ;IACpD,MAAMa,aAAaC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;QAC3D,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5Ff,KAAKA;QACLS;QACA,GAAGE,IAAI;IACX,GAAG;QACC;KACH,GAAG;QACAK,aAAa;IACjB;IACA,MAAM,CAACC,mBAAmBC,qBAAqB,GAAGC,OAAMC,QAAQ,CAAC;IACjE,MAAM,CAACC,iBAAiBC,kBAAkB,GAAGC,IAAAA,0BAAU;IACvDJ,OAAMK,SAAS,CAAC;QACZ,IAAIlB,SAAS,GAAG;YACZ;QACJ;QACAe,gBAAgB;YACZH,qBAAqB;QACzB,GAAGZ;QACH,OAAO;YACHgB;QACJ;IACJ,GAAG;QACCD;QACAC;QACAhB;KACH;IACD,MAAMmB,iBAAiBZ,oBAAI,CAACa,QAAQ,CAAC3B,MAAM4B,KAAK,EAAE;QAC9CC,cAAc;YACVC,IAAItB;QACR;QACAuB,iBAAiB;QACjBd,aAAae,iBAAK;IACtB;IACA,MAAMC,mBAAmBnB,oBAAI,CAACa,QAAQ,CAAC3B,MAAMkC,OAAO,EAAE;QAClDH,iBAAiB;QACjBF,cAAc;YACVlB;QACJ;QACAM,aAAa;IACjB;IACA,IAAIS,kBAAkBb,cAAc,CAACA,UAAU,CAAC,kBAAkB,EAAE;QAChEA,UAAU,CAAC,kBAAkB,GAAGa,eAAeI,EAAE;IACrD;IACA,MAAMK,QAAQ;QACV9B;QACAE;QACAD;QACAJ;QACAkC,qBAAqB,CAAC7B,SAASW;QAC/BmB,YAAY;YACRC,MAAM;YACNJ,SAAS;YACTK,aAAa;YACbX,OAAOI,iBAAK;QAChB;QACAM,MAAMzB;QACNqB,SAASD;QACTM,aAAazB,oBAAI,CAACC,MAAM,CAACf,MAAMuC,WAAW,EAAE;YACxCtB,aAAa;QACjB;QACAW,OAAOF;IACX;IACA,OAAOS;AACX"}
@@ -16,293 +16,160 @@ _export(exports, {
16
16
  return useSpinnerStyles_unstable;
17
17
  }
18
18
  });
19
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
19
20
  const _react = require("@griffel/react");
20
21
  const spinnerClassNames = {
21
22
  root: 'fui-Spinner',
22
23
  spinner: 'fui-Spinner__spinner',
24
+ spinnerTail: 'fui-Spinner__spinnerTail',
23
25
  label: 'fui-Spinner__label'
24
26
  };
25
- /*
26
- * TODO: Update with proper tokens when added
27
- * Radii for the Spinner circles
28
- */ const rValues = {
29
- extraTiny: '7px',
30
- tiny: '9px',
31
- extraSmall: '11px',
32
- small: '13px',
33
- medium: '14.5px',
34
- large: '16.5px',
35
- extraLarge: '18.5px',
36
- huge: '20px'
37
- };
38
- /*
39
- * TODO: Update with proper tokens when added
40
- * Sizes for the Spinner
41
- */ const spinnnerSizes = {
42
- extraTiny: '16px',
43
- tiny: '20px',
44
- extraSmall: '24px',
45
- small: '28px',
46
- medium: '32px',
47
- large: '36px',
48
- extraLarge: '40px',
49
- huge: '44px'
50
- };
51
- /*
52
- * TODO: Update with proper tokens when added
53
- * Animation for Spinner
54
- */ const spinnerAnimation = {
55
- container: {
56
- animationDuration: '3s',
57
- animationIterationCount: 'infinite',
58
- animationTimingFunction: 'linear',
59
- backgroundColor: 'transparent'
60
- }
61
- };
62
27
  /**
63
- * Styles for the root slot
64
- */ const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
65
- root: {
66
- mc9l5x: "f22iagw",
67
- Bt984gj: "f122n59",
68
- Brf1p80: "f4d9j23",
69
- Bg96gwp: "fez10in",
70
- i8kkvl: "f4px1ci",
71
- Belr9w4: "fn67r4l"
72
- },
73
- horizontal: {
74
- Beiy3e4: "f1063pyq"
75
- },
28
+ * CSS variables used internally by Spinner
29
+ */ const vars = {
30
+ strokeWidth: '--fui-Spinner--strokeWidth'
31
+ };
32
+ const useRootBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r1k3z50n", null, [
33
+ ".r1k3z50n{display:flex;align-items:center;justify-content:center;line-height:0;gap:8px;}"
34
+ ]);
35
+ const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
76
36
  vertical: {
77
37
  Beiy3e4: "f1vx9l62"
78
38
  }
79
39
  }, {
80
40
  d: [
81
- ".f22iagw{display:flex;}",
82
- ".f122n59{align-items:center;}",
83
- ".f4d9j23{justify-content:center;}",
84
- ".fez10in{line-height:0;}",
85
- ".f4px1ci{column-gap:8px;}",
86
- ".fn67r4l{row-gap:8px;}",
87
- ".f1063pyq{flex-direction:row;}",
88
41
  ".f1vx9l62{flex-direction:column;}"
89
42
  ]
90
43
  });
91
- const useLoaderStyles = /*#__PURE__*/ (0, _react.__styles)({
92
- spinnerSVG: {
93
- B3aqqti: "f1or16p5",
94
- Brovlpu: "f1grzc83",
95
- Bxa1mx5: "f19shzzi",
96
- Bwaue66: [
97
- "f5tbecn",
98
- "f15qb8s7"
99
- ],
100
- fyp1ls: "fn4mtlg",
101
- ag6ruv: "f1y80fxs",
102
- osj692: "f1r2crtq",
103
- aq5vjd: "f1wsi8sr",
104
- tlu9e1: "f1bkm2qd",
105
- J3u96z: "f1urqz7h",
106
- d32isg: "f1da2vov",
107
- Bsvqbuc: "f11rfva0",
108
- b3s3i5: "f1exc66"
44
+ const useSpinnerBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rvgcg50", "r15nd2jo", {
45
+ r: [
46
+ ".rvgcg50{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:rb7n1on;}",
47
+ "@keyframes rb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}",
48
+ ".r15nd2jo{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:r1gx3jof;}",
49
+ "@keyframes r1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"
50
+ ],
51
+ s: [
52
+ "@media screen and (forced-colors: active){.rvgcg50{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}",
53
+ "@media screen and (prefers-reduced-motion: reduce){.rvgcg50{animation-duration:1.8s;}}",
54
+ "@media screen and (forced-colors: active){.r15nd2jo{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}",
55
+ "@media screen and (prefers-reduced-motion: reduce){.r15nd2jo{animation-duration:1.8s;}}"
56
+ ]
57
+ });
58
+ // The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.
59
+ // The segments are rotated out from behind the mask to expand the visible arc from
60
+ // 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.
61
+ // The tail and spinner itself also have 360deg rotation animations for the spin.
62
+ const useSpinnerTailBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r1lregi5", "rxq293c", {
63
+ r: [
64
+ ".r1lregi5{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r15mim6k;}",
65
+ ".r1lregi5::before,.r1lregi5::after{content:\"\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}",
66
+ "@keyframes r15mim6k{0%{transform:rotate(-135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(225deg);}}",
67
+ ".r1lregi5::before{animation-name:r18vhmn8;}",
68
+ "@keyframes r18vhmn8{0%{transform:rotate(0deg);}50%{transform:rotate(105deg);}100%{transform:rotate(0deg);}}",
69
+ ".r1lregi5::after{animation-name:rkgrvoi;}",
70
+ "@keyframes rkgrvoi{0%{transform:rotate(0deg);}50%{transform:rotate(225deg);}100%{transform:rotate(0deg);}}",
71
+ ".rxq293c{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r109gmi5;}",
72
+ ".rxq293c::before,.rxq293c::after{content:\"\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}",
73
+ "@keyframes r109gmi5{0%{transform:rotate(135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(-225deg);}}",
74
+ ".rxq293c::before{animation-name:r17whflh;}",
75
+ "@keyframes r17whflh{0%{transform:rotate(0deg);}50%{transform:rotate(-105deg);}100%{transform:rotate(0deg);}}",
76
+ ".rxq293c::after{animation-name:re4odhl;}",
77
+ "@keyframes re4odhl{0%{transform:rotate(0deg);}50%{transform:rotate(-225deg);}100%{transform:rotate(0deg);}}"
78
+ ],
79
+ s: [
80
+ "@media screen and (prefers-reduced-motion: reduce){.r1lregi5{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.r1lregi5::before,.r1lregi5::after{content:none;}}",
81
+ "@media screen and (prefers-reduced-motion: reduce){.rxq293c{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.rxq293c::before,.rxq293c::after{content:none;}}"
82
+ ]
83
+ });
84
+ const useSpinnerStyles = /*#__PURE__*/ (0, _react.__styles)({
85
+ inverted: {
86
+ De3pzq: "fr407j0",
87
+ sj55zd: "f1f7voed"
88
+ },
89
+ rtlTail: {
90
+ btxmck: "f179dep3",
91
+ gb5jj2: "fbz9ihp",
92
+ Br2kee7: "f1wkkxo7"
109
93
  },
110
94
  "extra-tiny": {
111
- Bah9ito: "f1x2gjcb",
112
- ut6tcf: "f1vjiaua",
113
- B7p06xz: "fv1u54w",
114
- B807ibg: "f1oebb0s"
95
+ Bqenvij: "fd461yt",
96
+ a9b677: "fjw5fx7",
97
+ qmp6fs: "f1v3ph3m"
115
98
  },
116
99
  tiny: {
117
- Bah9ito: "f1j4wmu2",
118
- ut6tcf: "f1vppzuq",
119
- B7p06xz: "fv1u54w",
120
- B807ibg: "fngtx1d"
100
+ Bqenvij: "fjamq6b",
101
+ a9b677: "f64fuq3",
102
+ qmp6fs: "f1v3ph3m"
121
103
  },
122
104
  "extra-small": {
123
- Bah9ito: "fmpqlna",
124
- ut6tcf: "f15z5jzu",
125
- B7p06xz: "fv1u54w",
126
- B807ibg: "fadawes"
105
+ Bqenvij: "frvgh55",
106
+ a9b677: "fq4mcun",
107
+ qmp6fs: "f1v3ph3m"
127
108
  },
128
109
  small: {
129
- Bah9ito: "fo52gbo",
130
- ut6tcf: "f1b41i3v",
131
- B7p06xz: "fv1u54w",
132
- B807ibg: "f1xqyyrl"
110
+ Bqenvij: "fxldao9",
111
+ a9b677: "f1w9dchk",
112
+ qmp6fs: "f1v3ph3m"
133
113
  },
134
114
  medium: {
135
- Bah9ito: "f1aiqagr",
136
- ut6tcf: "f1wtx80b",
137
- B7p06xz: "f1flujpd",
138
- B807ibg: "f1u06hy7"
115
+ Bqenvij: "f1d2rq10",
116
+ a9b677: "f1szoe96",
117
+ qmp6fs: "fb52u90"
139
118
  },
140
119
  large: {
141
- Bah9ito: "f1trdq7b",
142
- ut6tcf: "f9e0mc5",
143
- B7p06xz: "f1flujpd",
144
- B807ibg: "f13pmvhl"
120
+ Bqenvij: "f8ljn23",
121
+ a9b677: "fpdz1er",
122
+ qmp6fs: "fb52u90"
145
123
  },
146
124
  "extra-large": {
147
- Bah9ito: "f89rf2a",
148
- ut6tcf: "f1w2xg3q",
149
- B7p06xz: "f1flujpd",
150
- B807ibg: "fmn74v6"
125
+ Bqenvij: "fbhnoac",
126
+ a9b677: "feqmc2u",
127
+ qmp6fs: "fb52u90"
151
128
  },
152
129
  huge: {
153
- Bah9ito: "f1rx7k5y",
154
- ut6tcf: "f1vtyt49",
155
- B7p06xz: "f1owbg48",
156
- B807ibg: "f1fr1izd"
130
+ Bqenvij: "f1ft4266",
131
+ a9b677: "fksc0bp",
132
+ qmp6fs: "fa3u9ii"
157
133
  }
158
134
  }, {
159
- f: [
160
- ".f1or16p5:focus{outline-width:3px;}",
161
- ".f1grzc83:focus{outline-style:solid;}",
162
- ".f19shzzi:focus{outline-color:transparent;}"
163
- ],
164
- k: [
165
- "@keyframes fb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}",
166
- "@keyframes f1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"
167
- ],
168
135
  d: [
169
- ".f5tbecn>svg{animation-name:fb7n1on;}",
170
- ".f15qb8s7>svg{animation-name:f1gx3jof;}",
171
- ".fn4mtlg>svg{animation-duration:3s;}",
172
- ".f1y80fxs>svg{animation-iteration-count:infinite;}",
173
- ".f1r2crtq>svg{animation-timing-function:linear;}",
174
- ".f1wsi8sr>svg{background-color:transparent;}",
175
- ".f1da2vov>svg>circle{cx:50%;}",
176
- ".f11rfva0>svg>circle{cy:50%;}",
177
- ".f1exc66>svg>circle{fill:none;}",
178
- ".f1x2gjcb>svg{height:16px;}",
179
- ".f1vjiaua>svg{width:16px;}",
180
- ".fv1u54w>svg>circle{stroke-width:var(--strokeWidthThick);}",
181
- ".f1oebb0s>svg>circle{r:7px;}",
182
- ".f1j4wmu2>svg{height:20px;}",
183
- ".f1vppzuq>svg{width:20px;}",
184
- ".fngtx1d>svg>circle{r:9px;}",
185
- ".fmpqlna>svg{height:24px;}",
186
- ".f15z5jzu>svg{width:24px;}",
187
- ".fadawes>svg>circle{r:11px;}",
188
- ".fo52gbo>svg{height:28px;}",
189
- ".f1b41i3v>svg{width:28px;}",
190
- ".f1xqyyrl>svg>circle{r:13px;}",
191
- ".f1aiqagr>svg{height:32px;}",
192
- ".f1wtx80b>svg{width:32px;}",
193
- ".f1flujpd>svg>circle{stroke-width:var(--strokeWidthThicker);}",
194
- ".f1u06hy7>svg>circle{r:14.5px;}",
195
- ".f1trdq7b>svg{height:36px;}",
196
- ".f9e0mc5>svg{width:36px;}",
197
- ".f13pmvhl>svg>circle{r:16.5px;}",
198
- ".f89rf2a>svg{height:40px;}",
199
- ".f1w2xg3q>svg{width:40px;}",
200
- ".fmn74v6>svg>circle{r:18.5px;}",
201
- ".f1rx7k5y>svg{height:44px;}",
202
- ".f1vtyt49>svg{width:44px;}",
203
- ".f1owbg48>svg>circle{stroke-width:var(--strokeWidthThickest);}",
204
- ".f1fr1izd>svg>circle{r:20px;}"
136
+ ".fr407j0{background-color:var(--colorNeutralStrokeAlpha2);}",
137
+ ".f1f7voed{color:var(--colorNeutralStrokeOnBrand2);}",
138
+ ".f179dep3{-webkit-mask-image:conic-gradient(white 255deg, transparent 255deg);mask-image:conic-gradient(white 255deg, transparent 255deg);}",
139
+ ".fbz9ihp::before,.fbz9ihp::after{background-image:conic-gradient(transparent 225deg, currentcolor 225deg);}",
140
+ ".fd461yt{height:16px;}",
141
+ ".fjw5fx7{width:16px;}",
142
+ ".f1v3ph3m{--fui-Spinner--strokeWidth:var(--strokeWidthThick);}",
143
+ ".fjamq6b{height:20px;}",
144
+ ".f64fuq3{width:20px;}",
145
+ ".frvgh55{height:24px;}",
146
+ ".fq4mcun{width:24px;}",
147
+ ".fxldao9{height:28px;}",
148
+ ".f1w9dchk{width:28px;}",
149
+ ".f1d2rq10{height:32px;}",
150
+ ".f1szoe96{width:32px;}",
151
+ ".fb52u90{--fui-Spinner--strokeWidth:var(--strokeWidthThicker);}",
152
+ ".f8ljn23{height:36px;}",
153
+ ".fpdz1er{width:36px;}",
154
+ ".fbhnoac{height:40px;}",
155
+ ".feqmc2u{width:40px;}",
156
+ ".f1ft4266{height:44px;}",
157
+ ".fksc0bp{width:44px;}",
158
+ ".fa3u9ii{--fui-Spinner--strokeWidth:var(--strokeWidthThickest);}"
205
159
  ],
206
160
  m: [
207
161
  [
208
- "@media screen and (prefers-reduced-motion: reduce){.f1bkm2qd>svg{animation-duration:0.01ms;}}",
209
- {
210
- m: "screen and (prefers-reduced-motion: reduce)"
211
- }
212
- ],
213
- [
214
- "@media screen and (prefers-reduced-motion: reduce){.f1urqz7h>svg{animation-iteration-count:1;}}",
162
+ "@media screen and (prefers-reduced-motion: reduce){.f1wkkxo7{background-image:conic-gradient(currentcolor 0deg, transparent 240deg);}}",
215
163
  {
216
164
  m: "screen and (prefers-reduced-motion: reduce)"
217
165
  }
218
166
  ]
219
167
  ]
220
168
  });
221
- const useTrackStyles = /*#__PURE__*/ (0, _react.__styles)({
222
- inverted: {
223
- gwg7kz: "f1jvpmnu",
224
- Bvrehnu: "fq8a5sv",
225
- Bidp6o: "f1b4lwqj",
226
- cq3kgi: "f1najlst",
227
- Btwiser: "fjxod4",
228
- B8001xd: "fu3xdw0",
229
- Bdordwa: [
230
- "f1ttdh6v",
231
- "fmyjox0"
232
- ],
233
- Bo2mdfu: "f1eseayc",
234
- E10nrc: "folzdkc",
235
- Bwl7w15: "fhlfkde",
236
- Bksq7rz: "f1esql28"
237
- },
238
- primary: {
239
- gwg7kz: "f11ditju",
240
- B8k2rxp: "f1m9nikz",
241
- Bvrehnu: "fq8a5sv",
242
- Bidp6o: "f1b4lwqj",
243
- cq3kgi: "f1najlst",
244
- Btwiser: "fjxod4",
245
- B8001xd: "fu3xdw0",
246
- Bdordwa: [
247
- "f1ttdh6v",
248
- "fmyjox0"
249
- ],
250
- Bo2mdfu: "f1eseayc",
251
- E10nrc: "folzdkc",
252
- Bwl7w15: "fhlfkde",
253
- Bksq7rz: "f13qeqtg",
254
- y14cdu: "flglbw1"
255
- }
256
- }, {
257
- d: [
258
- ".f1jvpmnu>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}",
259
- ".fq8a5sv>svg>circle.fui-Spinner__Tail{animation-name:f1v1ql0f;}",
260
- ".f1b4lwqj>svg>circle.fui-Spinner__Tail{animation-duration:1.5s;}",
261
- ".f1najlst>svg>circle.fui-Spinner__Tail{animation-iteration-count:infinite;}",
262
- ".fjxod4>svg>circle.fui-Spinner__Tail{animation-timing-function:var(--curveEasyEase);}",
263
- ".fu3xdw0>svg>circle.fui-Spinner__Tail{stroke-linecap:round;}",
264
- ".f1ttdh6v>svg>circle.fui-Spinner__Tail{transform:rotate(-90deg);}",
265
- ".fmyjox0>svg>circle.fui-Spinner__Tail{transform:rotate(90deg);}",
266
- ".f1eseayc>svg>circle.fui-Spinner__Tail{transform-origin:50% 50%;}",
267
- ".f1esql28>svg>circle.fui-Spinner__Track{stroke:rgba(255, 255, 255, 0.2);}",
268
- ".f11ditju>svg>circle.fui-Spinner__Tail{stroke:var(--colorBrandStroke1);}",
269
- ".f13qeqtg>svg>circle.fui-Spinner__Track{stroke:var(--colorBrandStroke2Contrast);}"
270
- ],
271
- k: [
272
- "@keyframes f1v1ql0f{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"
273
- ],
274
- m: [
275
- [
276
- "@media screen and (prefers-reduced-motion: reduce){.folzdkc>svg>circle.fui-Spinner__Tail{animation-duration:0.01ms;}}",
277
- {
278
- m: "screen and (prefers-reduced-motion: reduce)"
279
- }
280
- ],
281
- [
282
- "@media screen and (prefers-reduced-motion: reduce){.fhlfkde>svg>circle.fui-Spinner__Tail{animation-iteration-count:1;}}",
283
- {
284
- m: "screen and (prefers-reduced-motion: reduce)"
285
- }
286
- ],
287
- [
288
- "@media screen and (forced-colors: active){.f1m9nikz>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}}",
289
- {
290
- m: "screen and (forced-colors: active)"
291
- }
292
- ],
293
- [
294
- "@media screen and (forced-colors: active){.flglbw1>svg>circle.fui-Spinner__Track{stroke:var(--colorNeutralBackgroundInverted);}}",
295
- {
296
- m: "screen and (forced-colors: active)"
297
- }
298
- ]
299
- ]
300
- });
301
169
  const useLabelStyles = /*#__PURE__*/ (0, _react.__styles)({
302
170
  inverted: {
303
- sj55zd: "f15aqcq"
171
+ sj55zd: "fonrgv7"
304
172
  },
305
- primary: {},
306
173
  "extra-tiny": {
307
174
  Bahqtrf: "fk6fouc",
308
175
  Be2twd7: "fkhj508",
@@ -353,7 +220,7 @@ const useLabelStyles = /*#__PURE__*/ (0, _react.__styles)({
353
220
  }
354
221
  }, {
355
222
  d: [
356
- ".f15aqcq{color:rgba(255, 255, 255, 1);}",
223
+ ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",
357
224
  ".fk6fouc{font-family:var(--fontFamilyBase);}",
358
225
  ".fkhj508{font-size:var(--fontSizeBase300);}",
359
226
  ".figsok6{font-weight:var(--fontWeightRegular);}",
@@ -366,17 +233,23 @@ const useLabelStyles = /*#__PURE__*/ (0, _react.__styles)({
366
233
  ]
367
234
  });
368
235
  const useSpinnerStyles_unstable = (state)=>{
369
- const { labelPosition, size, appearance = 'primary' } = state;
236
+ const { labelPosition, size, appearance } = state;
237
+ const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
238
+ const rootBaseClassName = useRootBaseClassName();
370
239
  const rootStyles = useRootStyles();
371
- const spinnerStyles = useLoaderStyles();
240
+ const spinnerBaseClassName = useSpinnerBaseClassName();
241
+ const spinnerStyles = useSpinnerStyles();
242
+ const spinnerTailBaseClassName = useSpinnerTailBaseClassName();
372
243
  const labelStyles = useLabelStyles();
373
- const trackStyles = useTrackStyles();
374
- state.root.className = (0, _react.mergeClasses)(spinnerClassNames.root, rootStyles.root, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, (labelPosition === 'before' || labelPosition === 'after') && rootStyles.horizontal, state.root.className);
244
+ state.root.className = (0, _react.mergeClasses)(spinnerClassNames.root, rootBaseClassName, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, state.root.className);
375
245
  if (state.spinner) {
376
- state.spinner.className = (0, _react.mergeClasses)(spinnerClassNames.spinner, spinnerStyles.spinnerSVG, spinnerStyles[size], trackStyles[appearance], state.spinner.className);
246
+ state.spinner.className = (0, _react.mergeClasses)(spinnerClassNames.spinner, spinnerBaseClassName, spinnerStyles[size], appearance === 'inverted' && spinnerStyles.inverted, state.spinner.className);
247
+ }
248
+ if (state.spinnerTail) {
249
+ state.spinnerTail.className = (0, _react.mergeClasses)(spinnerClassNames.spinnerTail, spinnerTailBaseClassName, dir === 'rtl' && spinnerStyles.rtlTail, state.spinnerTail.className);
377
250
  }
378
251
  if (state.label) {
379
- state.label.className = (0, _react.mergeClasses)(spinnerClassNames.label, labelStyles[size], labelStyles[appearance], state.label.className);
252
+ state.label.className = (0, _react.mergeClasses)(spinnerClassNames.label, labelStyles[size], appearance === 'inverted' && labelStyles.inverted, state.label.className);
380
253
  }
381
254
  return state;
382
255
  }; //# sourceMappingURL=useSpinnerStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useSpinnerStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const spinnerClassNames = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n label: 'fui-Spinner__label'\n};\n/*\n * TODO: Update with proper tokens when added\n * Radii for the Spinner circles\n */\nconst rValues = {\n extraTiny: '7px',\n tiny: '9px',\n extraSmall: '11px',\n small: '13px',\n medium: '14.5px',\n large: '16.5px',\n extraLarge: '18.5px',\n huge: '20px'\n};\n/*\n * TODO: Update with proper tokens when added\n * Sizes for the Spinner\n */\nconst spinnnerSizes = {\n extraTiny: '16px',\n tiny: '20px',\n extraSmall: '24px',\n small: '28px',\n medium: '32px',\n large: '36px',\n extraLarge: '40px',\n huge: '44px'\n};\n/*\n * TODO: Update with proper tokens when added\n * Animation for Spinner\n */\nconst spinnerAnimation = {\n container: {\n animationDuration: '3s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n backgroundColor: 'transparent'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n Brf1p80: \"f4d9j23\",\n Bg96gwp: \"fez10in\",\n i8kkvl: \"f4px1ci\",\n Belr9w4: \"fn67r4l\"\n },\n horizontal: {\n Beiy3e4: \"f1063pyq\"\n },\n vertical: {\n Beiy3e4: \"f1vx9l62\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f122n59{align-items:center;}\", \".f4d9j23{justify-content:center;}\", \".fez10in{line-height:0;}\", \".f4px1ci{column-gap:8px;}\", \".fn67r4l{row-gap:8px;}\", \".f1063pyq{flex-direction:row;}\", \".f1vx9l62{flex-direction:column;}\"]\n});\nconst useLoaderStyles = /*#__PURE__*/__styles({\n spinnerSVG: {\n B3aqqti: \"f1or16p5\",\n Brovlpu: \"f1grzc83\",\n Bxa1mx5: \"f19shzzi\",\n Bwaue66: [\"f5tbecn\", \"f15qb8s7\"],\n fyp1ls: \"fn4mtlg\",\n ag6ruv: \"f1y80fxs\",\n osj692: \"f1r2crtq\",\n aq5vjd: \"f1wsi8sr\",\n tlu9e1: \"f1bkm2qd\",\n J3u96z: \"f1urqz7h\",\n d32isg: \"f1da2vov\",\n Bsvqbuc: \"f11rfva0\",\n b3s3i5: \"f1exc66\"\n },\n \"extra-tiny\": {\n Bah9ito: \"f1x2gjcb\",\n ut6tcf: \"f1vjiaua\",\n B7p06xz: \"fv1u54w\",\n B807ibg: \"f1oebb0s\"\n },\n tiny: {\n Bah9ito: \"f1j4wmu2\",\n ut6tcf: \"f1vppzuq\",\n B7p06xz: \"fv1u54w\",\n B807ibg: \"fngtx1d\"\n },\n \"extra-small\": {\n Bah9ito: \"fmpqlna\",\n ut6tcf: \"f15z5jzu\",\n B7p06xz: \"fv1u54w\",\n B807ibg: \"fadawes\"\n },\n small: {\n Bah9ito: \"fo52gbo\",\n ut6tcf: \"f1b41i3v\",\n B7p06xz: \"fv1u54w\",\n B807ibg: \"f1xqyyrl\"\n },\n medium: {\n Bah9ito: \"f1aiqagr\",\n ut6tcf: \"f1wtx80b\",\n B7p06xz: \"f1flujpd\",\n B807ibg: \"f1u06hy7\"\n },\n large: {\n Bah9ito: \"f1trdq7b\",\n ut6tcf: \"f9e0mc5\",\n B7p06xz: \"f1flujpd\",\n B807ibg: \"f13pmvhl\"\n },\n \"extra-large\": {\n Bah9ito: \"f89rf2a\",\n ut6tcf: \"f1w2xg3q\",\n B7p06xz: \"f1flujpd\",\n B807ibg: \"fmn74v6\"\n },\n huge: {\n Bah9ito: \"f1rx7k5y\",\n ut6tcf: \"f1vtyt49\",\n B7p06xz: \"f1owbg48\",\n B807ibg: \"f1fr1izd\"\n }\n}, {\n f: [\".f1or16p5:focus{outline-width:3px;}\", \".f1grzc83:focus{outline-style:solid;}\", \".f19shzzi:focus{outline-color:transparent;}\"],\n k: [\"@keyframes fb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}\", \"@keyframes f1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}\"],\n d: [\".f5tbecn>svg{animation-name:fb7n1on;}\", \".f15qb8s7>svg{animation-name:f1gx3jof;}\", \".fn4mtlg>svg{animation-duration:3s;}\", \".f1y80fxs>svg{animation-iteration-count:infinite;}\", \".f1r2crtq>svg{animation-timing-function:linear;}\", \".f1wsi8sr>svg{background-color:transparent;}\", \".f1da2vov>svg>circle{cx:50%;}\", \".f11rfva0>svg>circle{cy:50%;}\", \".f1exc66>svg>circle{fill:none;}\", \".f1x2gjcb>svg{height:16px;}\", \".f1vjiaua>svg{width:16px;}\", \".fv1u54w>svg>circle{stroke-width:var(--strokeWidthThick);}\", \".f1oebb0s>svg>circle{r:7px;}\", \".f1j4wmu2>svg{height:20px;}\", \".f1vppzuq>svg{width:20px;}\", \".fngtx1d>svg>circle{r:9px;}\", \".fmpqlna>svg{height:24px;}\", \".f15z5jzu>svg{width:24px;}\", \".fadawes>svg>circle{r:11px;}\", \".fo52gbo>svg{height:28px;}\", \".f1b41i3v>svg{width:28px;}\", \".f1xqyyrl>svg>circle{r:13px;}\", \".f1aiqagr>svg{height:32px;}\", \".f1wtx80b>svg{width:32px;}\", \".f1flujpd>svg>circle{stroke-width:var(--strokeWidthThicker);}\", \".f1u06hy7>svg>circle{r:14.5px;}\", \".f1trdq7b>svg{height:36px;}\", \".f9e0mc5>svg{width:36px;}\", \".f13pmvhl>svg>circle{r:16.5px;}\", \".f89rf2a>svg{height:40px;}\", \".f1w2xg3q>svg{width:40px;}\", \".fmn74v6>svg>circle{r:18.5px;}\", \".f1rx7k5y>svg{height:44px;}\", \".f1vtyt49>svg{width:44px;}\", \".f1owbg48>svg>circle{stroke-width:var(--strokeWidthThickest);}\", \".f1fr1izd>svg>circle{r:20px;}\"],\n m: [[\"@media screen and (prefers-reduced-motion: reduce){.f1bkm2qd>svg{animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f1urqz7h>svg{animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]]\n});\nconst useTrackStyles = /*#__PURE__*/__styles({\n inverted: {\n gwg7kz: \"f1jvpmnu\",\n Bvrehnu: \"fq8a5sv\",\n Bidp6o: \"f1b4lwqj\",\n cq3kgi: \"f1najlst\",\n Btwiser: \"fjxod4\",\n B8001xd: \"fu3xdw0\",\n Bdordwa: [\"f1ttdh6v\", \"fmyjox0\"],\n Bo2mdfu: \"f1eseayc\",\n E10nrc: \"folzdkc\",\n Bwl7w15: \"fhlfkde\",\n Bksq7rz: \"f1esql28\"\n },\n primary: {\n gwg7kz: \"f11ditju\",\n B8k2rxp: \"f1m9nikz\",\n Bvrehnu: \"fq8a5sv\",\n Bidp6o: \"f1b4lwqj\",\n cq3kgi: \"f1najlst\",\n Btwiser: \"fjxod4\",\n B8001xd: \"fu3xdw0\",\n Bdordwa: [\"f1ttdh6v\", \"fmyjox0\"],\n Bo2mdfu: \"f1eseayc\",\n E10nrc: \"folzdkc\",\n Bwl7w15: \"fhlfkde\",\n Bksq7rz: \"f13qeqtg\",\n y14cdu: \"flglbw1\"\n }\n}, {\n d: [\".f1jvpmnu>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}\", \".fq8a5sv>svg>circle.fui-Spinner__Tail{animation-name:f1v1ql0f;}\", \".f1b4lwqj>svg>circle.fui-Spinner__Tail{animation-duration:1.5s;}\", \".f1najlst>svg>circle.fui-Spinner__Tail{animation-iteration-count:infinite;}\", \".fjxod4>svg>circle.fui-Spinner__Tail{animation-timing-function:var(--curveEasyEase);}\", \".fu3xdw0>svg>circle.fui-Spinner__Tail{stroke-linecap:round;}\", \".f1ttdh6v>svg>circle.fui-Spinner__Tail{transform:rotate(-90deg);}\", \".fmyjox0>svg>circle.fui-Spinner__Tail{transform:rotate(90deg);}\", \".f1eseayc>svg>circle.fui-Spinner__Tail{transform-origin:50% 50%;}\", \".f1esql28>svg>circle.fui-Spinner__Track{stroke:rgba(255, 255, 255, 0.2);}\", \".f11ditju>svg>circle.fui-Spinner__Tail{stroke:var(--colorBrandStroke1);}\", \".f13qeqtg>svg>circle.fui-Spinner__Track{stroke:var(--colorBrandStroke2Contrast);}\"],\n k: [\"@keyframes f1v1ql0f{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}\"],\n m: [[\"@media screen and (prefers-reduced-motion: reduce){.folzdkc>svg>circle.fui-Spinner__Tail{animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.fhlfkde>svg>circle.fui-Spinner__Tail{animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (forced-colors: active){.f1m9nikz>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (forced-colors: active){.flglbw1>svg>circle.fui-Spinner__Track{stroke:var(--colorNeutralBackgroundInverted);}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\nconst useLabelStyles = /*#__PURE__*/__styles({\n inverted: {\n sj55zd: \"f15aqcq\"\n },\n primary: {},\n \"extra-tiny\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n tiny: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n \"extra-small\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n small: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n medium: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n large: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n \"extra-large\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n huge: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"f1pp30po\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"f106mvju\"\n }\n}, {\n d: [\".f15aqcq{color:rgba(255, 255, 255, 1);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".f106mvju{line-height:var(--lineHeightBase500);}\"]\n});\n/**\n * Apply styling to the Spinner slots based on the state\n */\nexport const useSpinnerStyles_unstable = state => {\n const {\n labelPosition,\n size,\n appearance = 'primary'\n } = state;\n const rootStyles = useRootStyles();\n const spinnerStyles = useLoaderStyles();\n const labelStyles = useLabelStyles();\n const trackStyles = useTrackStyles();\n state.root.className = mergeClasses(spinnerClassNames.root, rootStyles.root, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, (labelPosition === 'before' || labelPosition === 'after') && rootStyles.horizontal, state.root.className);\n if (state.spinner) {\n state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerStyles.spinnerSVG, spinnerStyles[size], trackStyles[appearance], state.spinner.className);\n }\n if (state.label) {\n state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], labelStyles[appearance], state.label.className);\n }\n return state;\n};\n//# sourceMappingURL=useSpinnerStyles.styles.js.map"],"names":["spinnerClassNames","useSpinnerStyles_unstable","root","spinner","label","rValues","extraTiny","tiny","extraSmall","small","medium","large","extraLarge","huge","spinnnerSizes","spinnerAnimation","container","animationDuration","animationIterationCount","animationTimingFunction","backgroundColor","useRootStyles","__styles","mc9l5x","Bt984gj","Brf1p80","Bg96gwp","i8kkvl","Belr9w4","horizontal","Beiy3e4","vertical","d","useLoaderStyles","spinnerSVG","B3aqqti","Brovlpu","Bxa1mx5","Bwaue66","fyp1ls","ag6ruv","osj692","aq5vjd","tlu9e1","J3u96z","d32isg","Bsvqbuc","b3s3i5","Bah9ito","ut6tcf","B7p06xz","B807ibg","f","k","m","useTrackStyles","inverted","gwg7kz","Bvrehnu","Bidp6o","cq3kgi","Btwiser","B8001xd","Bdordwa","Bo2mdfu","E10nrc","Bwl7w15","Bksq7rz","primary","B8k2rxp","y14cdu","useLabelStyles","sj55zd","Bahqtrf","Be2twd7","Bhrd7zp","state","labelPosition","size","appearance","rootStyles","spinnerStyles","labelStyles","trackStyles","className","mergeClasses"],"mappings":";;;;;;;;;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EACJC,aAAa,EACbC,IAAI,EACJC,aAAa,SAAS,EACvB,GAAGH;IACJ,MAAMI,aAAa3D;IACnB,MAAM4D,gBAAgBhD;IACtB,MAAMiD,cAAcX;IACpB,MAAMY,cAAc5B;IACpBqB,MAAM1E,IAAI,CAACkF,SAAS,GAAGC,IAAAA,mBAAY,EAACrF,kBAAkBE,IAAI,EAAE8E,WAAW9E,IAAI,EAAE,AAAC2E,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,KAAMG,WAAWjD,QAAQ,EAAE,AAAC8C,CAAAA,kBAAkB,YAAYA,kBAAkB,OAAM,KAAMG,WAAWnD,UAAU,EAAE+C,MAAM1E,IAAI,CAACkF,SAAS;IACtQ,IAAIR,MAAMzE,OAAO,EAAE;QACjByE,MAAMzE,OAAO,CAACiF,SAAS,GAAGC,IAAAA,mBAAY,EAACrF,kBAAkBG,OAAO,EAAE8E,cAAc/C,UAAU,EAAE+C,aAAa,CAACH,KAAK,EAAEK,WAAW,CAACJ,WAAW,EAAEH,MAAMzE,OAAO,CAACiF,SAAS;IACnK;IACA,IAAIR,MAAMxE,KAAK,EAAE;QACfwE,MAAMxE,KAAK,CAACgF,SAAS,GAAGC,IAAAA,mBAAY,EAACrF,kBAAkBI,KAAK,EAAE8E,WAAW,CAACJ,KAAK,EAAEI,WAAW,CAACH,WAAW,EAAEH,MAAMxE,KAAK,CAACgF,SAAS;IACjI;IACA,OAAOR;AACT,GACA,mDAAmD"}
1
+ {"version":3,"sources":["useSpinnerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nexport const spinnerClassNames = {\n root: 'fui-Spinner',\n spinner: 'fui-Spinner__spinner',\n spinnerTail: 'fui-Spinner__spinnerTail',\n label: 'fui-Spinner__label'\n};\n/**\n * CSS variables used internally by Spinner\n */\nconst vars = {\n strokeWidth: '--fui-Spinner--strokeWidth'\n};\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r1k3z50n\", null, [\".r1k3z50n{display:flex;align-items:center;justify-content:center;line-height:0;gap:8px;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n vertical: {\n Beiy3e4: \"f1vx9l62\"\n }\n}, {\n d: [\".f1vx9l62{flex-direction:column;}\"]\n});\nconst useSpinnerBaseClassName = /*#__PURE__*/__resetStyles(\"rvgcg50\", \"r15nd2jo\", {\n r: [\".rvgcg50{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:rb7n1on;}\", \"@keyframes rb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}\", \".r15nd2jo{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:r1gx3jof;}\", \"@keyframes r1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}\"],\n s: [\"@media screen and (forced-colors: active){.rvgcg50{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}\", \"@media screen and (prefers-reduced-motion: reduce){.rvgcg50{animation-duration:1.8s;}}\", \"@media screen and (forced-colors: active){.r15nd2jo{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}\", \"@media screen and (prefers-reduced-motion: reduce){.r15nd2jo{animation-duration:1.8s;}}\"]\n});\n// The spinner tail is rendered using two 135deg arc segments, behind a 105deg arc mask.\n// The segments are rotated out from behind the mask to expand the visible arc from\n// 30deg (min) to 255deg (max), and then back behind the mask again to shrink the arc.\n// The tail and spinner itself also have 360deg rotation animations for the spin.\nconst useSpinnerTailBaseClassName = /*#__PURE__*/__resetStyles(\"r1lregi5\", \"rxq293c\", {\n r: [\".r1lregi5{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r15mim6k;}\", \".r1lregi5::before,.r1lregi5::after{content:\\\"\\\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}\", \"@keyframes r15mim6k{0%{transform:rotate(-135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(225deg);}}\", \".r1lregi5::before{animation-name:r18vhmn8;}\", \"@keyframes r18vhmn8{0%{transform:rotate(0deg);}50%{transform:rotate(105deg);}100%{transform:rotate(0deg);}}\", \".r1lregi5::after{animation-name:rkgrvoi;}\", \"@keyframes rkgrvoi{0%{transform:rotate(0deg);}50%{transform:rotate(225deg);}100%{transform:rotate(0deg);}}\", \".rxq293c{position:absolute;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r109gmi5;}\", \".rxq293c::before,.rxq293c::after{content:\\\"\\\";position:absolute;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}\", \"@keyframes r109gmi5{0%{transform:rotate(135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(-225deg);}}\", \".rxq293c::before{animation-name:r17whflh;}\", \"@keyframes r17whflh{0%{transform:rotate(0deg);}50%{transform:rotate(-105deg);}100%{transform:rotate(0deg);}}\", \".rxq293c::after{animation-name:re4odhl;}\", \"@keyframes re4odhl{0%{transform:rotate(0deg);}50%{transform:rotate(-225deg);}100%{transform:rotate(0deg);}}\"],\n s: [\"@media screen and (prefers-reduced-motion: reduce){.r1lregi5{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.r1lregi5::before,.r1lregi5::after{content:none;}}\", \"@media screen and (prefers-reduced-motion: reduce){.rxq293c{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.rxq293c::before,.rxq293c::after{content:none;}}\"]\n});\nconst useSpinnerStyles = /*#__PURE__*/__styles({\n inverted: {\n De3pzq: \"fr407j0\",\n sj55zd: \"f1f7voed\"\n },\n rtlTail: {\n btxmck: \"f179dep3\",\n gb5jj2: \"fbz9ihp\",\n Br2kee7: \"f1wkkxo7\"\n },\n \"extra-tiny\": {\n Bqenvij: \"fd461yt\",\n a9b677: \"fjw5fx7\",\n qmp6fs: \"f1v3ph3m\"\n },\n tiny: {\n Bqenvij: \"fjamq6b\",\n a9b677: \"f64fuq3\",\n qmp6fs: \"f1v3ph3m\"\n },\n \"extra-small\": {\n Bqenvij: \"frvgh55\",\n a9b677: \"fq4mcun\",\n qmp6fs: \"f1v3ph3m\"\n },\n small: {\n Bqenvij: \"fxldao9\",\n a9b677: \"f1w9dchk\",\n qmp6fs: \"f1v3ph3m\"\n },\n medium: {\n Bqenvij: \"f1d2rq10\",\n a9b677: \"f1szoe96\",\n qmp6fs: \"fb52u90\"\n },\n large: {\n Bqenvij: \"f8ljn23\",\n a9b677: \"fpdz1er\",\n qmp6fs: \"fb52u90\"\n },\n \"extra-large\": {\n Bqenvij: \"fbhnoac\",\n a9b677: \"feqmc2u\",\n qmp6fs: \"fb52u90\"\n },\n huge: {\n Bqenvij: \"f1ft4266\",\n a9b677: \"fksc0bp\",\n qmp6fs: \"fa3u9ii\"\n }\n}, {\n d: [\".fr407j0{background-color:var(--colorNeutralStrokeAlpha2);}\", \".f1f7voed{color:var(--colorNeutralStrokeOnBrand2);}\", \".f179dep3{-webkit-mask-image:conic-gradient(white 255deg, transparent 255deg);mask-image:conic-gradient(white 255deg, transparent 255deg);}\", \".fbz9ihp::before,.fbz9ihp::after{background-image:conic-gradient(transparent 225deg, currentcolor 225deg);}\", \".fd461yt{height:16px;}\", \".fjw5fx7{width:16px;}\", \".f1v3ph3m{--fui-Spinner--strokeWidth:var(--strokeWidthThick);}\", \".fjamq6b{height:20px;}\", \".f64fuq3{width:20px;}\", \".frvgh55{height:24px;}\", \".fq4mcun{width:24px;}\", \".fxldao9{height:28px;}\", \".f1w9dchk{width:28px;}\", \".f1d2rq10{height:32px;}\", \".f1szoe96{width:32px;}\", \".fb52u90{--fui-Spinner--strokeWidth:var(--strokeWidthThicker);}\", \".f8ljn23{height:36px;}\", \".fpdz1er{width:36px;}\", \".fbhnoac{height:40px;}\", \".feqmc2u{width:40px;}\", \".f1ft4266{height:44px;}\", \".fksc0bp{width:44px;}\", \".fa3u9ii{--fui-Spinner--strokeWidth:var(--strokeWidthThickest);}\"],\n m: [[\"@media screen and (prefers-reduced-motion: reduce){.f1wkkxo7{background-image:conic-gradient(currentcolor 0deg, transparent 240deg);}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]]\n});\nconst useLabelStyles = /*#__PURE__*/__styles({\n inverted: {\n sj55zd: \"fonrgv7\"\n },\n \"extra-tiny\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n tiny: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n \"extra-small\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n small: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n medium: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n large: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n \"extra-large\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n },\n huge: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"f1pp30po\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"f106mvju\"\n }\n}, {\n d: [\".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".f106mvju{line-height:var(--lineHeightBase500);}\"]\n});\n/**\n * Apply styling to the Spinner slots based on the state\n */\nexport const useSpinnerStyles_unstable = state => {\n const {\n labelPosition,\n size,\n appearance\n } = state;\n const {\n dir\n } = useFluent();\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const spinnerBaseClassName = useSpinnerBaseClassName();\n const spinnerStyles = useSpinnerStyles();\n const spinnerTailBaseClassName = useSpinnerTailBaseClassName();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(spinnerClassNames.root, rootBaseClassName, (labelPosition === 'above' || labelPosition === 'below') && rootStyles.vertical, state.root.className);\n if (state.spinner) {\n state.spinner.className = mergeClasses(spinnerClassNames.spinner, spinnerBaseClassName, spinnerStyles[size], appearance === 'inverted' && spinnerStyles.inverted, state.spinner.className);\n }\n if (state.spinnerTail) {\n state.spinnerTail.className = mergeClasses(spinnerClassNames.spinnerTail, spinnerTailBaseClassName, dir === 'rtl' && spinnerStyles.rtlTail, state.spinnerTail.className);\n }\n if (state.label) {\n state.label.className = mergeClasses(spinnerClassNames.label, labelStyles[size], appearance === 'inverted' && labelStyles.inverted, state.label.className);\n }\n return state;\n};\n//# sourceMappingURL=useSpinnerStyles.styles.js.map"],"names":["spinnerClassNames","useSpinnerStyles_unstable","root","spinner","spinnerTail","label","vars","strokeWidth","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","d","useSpinnerBaseClassName","r","s","useSpinnerTailBaseClassName","useSpinnerStyles","inverted","De3pzq","sj55zd","rtlTail","btxmck","gb5jj2","Br2kee7","Bqenvij","a9b677","qmp6fs","tiny","small","medium","large","huge","m","useLabelStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","state","labelPosition","size","appearance","dir","useFluent","rootBaseClassName","rootStyles","spinnerBaseClassName","spinnerStyles","spinnerTailBaseClassName","labelStyles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,iBAAiB;eAAjBA;;IAkJAC,yBAAyB;eAAzBA;;;qCArJmC;uBAEM;AAC/C,MAAMD,oBAAoB;IAC/BE,MAAM;IACNC,SAAS;IACTC,aAAa;IACbC,OAAO;AACT;AACA;;CAEC,GACD,MAAMC,OAAO;IACXC,aAAa;AACf;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;CAA2F;AACtK,MAAMC,gBAAgB,WAAW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AGC,IAAAA,mBAAY,EAACtD,kBAAkBE,IAAI,EAAE6C,mBAAmB,AAACL,CAAAA,kBAAkB,WAAWA,kBAAkB,OAAM,KAAMM,WAAWpC,QAAQ,EAAE6B,MAAMvC,IAAI,CAACmD,SAAS;IACpL,IAAIZ,MAAMtC,OAAO,EAAE;QACjBsC,MAAMtC,OAAO,CAACkD,SAAS,GAAGC,IAAAA,mBAAY,EAACtD,kBAAkBG,OAAO,EAAE8C,sBAAsBC,aAAa,CAACP,KAAK,EAAEC,eAAe,cAAcM,cAAc9B,QAAQ,EAAEqB,MAAMtC,OAAO,CAACkD,SAAS;IAC3L;IACA,IAAIZ,MAAMrC,WAAW,EAAE;QACrBqC,MAAMrC,WAAW,CAACiD,SAAS,GAAGC,IAAAA,mBAAY,EAACtD,kBAAkBI,WAAW,EAAE+C,0BAA0BN,QAAQ,SAASK,cAAc3B,OAAO,EAAEkB,MAAMrC,WAAW,CAACiD,SAAS;IACzK;IACA,IAAIZ,MAAMpC,KAAK,EAAE;QACfoC,MAAMpC,KAAK,CAACgD,SAAS,GAAGC,IAAAA,mBAAY,EAACtD,kBAAkBK,KAAK,EAAE+C,WAAW,CAACT,KAAK,EAAEC,eAAe,cAAcQ,YAAYhC,QAAQ,EAAEqB,MAAMpC,KAAK,CAACgD,SAAS;IAC3J;IACA,OAAOZ;AACT,GACA,mDAAmD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-spinner",
3
- "version": "9.3.43",
3
+ "version": "9.4.0",
4
4
  "description": "Spinner component for Fluent UI React",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,11 +33,11 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-jsx-runtime": "^9.0.31",
37
- "@fluentui/react-label": "^9.1.63",
38
- "@fluentui/react-shared-contexts": "^9.14.1",
39
- "@fluentui/react-theme": "^9.1.16",
40
- "@fluentui/react-utilities": "^9.18.2",
36
+ "@fluentui/react-jsx-runtime": "^9.0.32",
37
+ "@fluentui/react-label": "^9.1.64",
38
+ "@fluentui/react-shared-contexts": "^9.15.0",
39
+ "@fluentui/react-theme": "^9.1.17",
40
+ "@fluentui/react-utilities": "^9.18.3",
41
41
  "@griffel/react": "^1.5.14",
42
42
  "@swc/helpers": "^0.5.1"
43
43
  },
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- export const DefaultSvg = ()=>/*#__PURE__*/ React.createElement("svg", {
3
- className: "fui-Spinner__Progressbar"
4
- }, /*#__PURE__*/ React.createElement("circle", {
5
- className: "fui-Spinner__Track"
6
- }), /*#__PURE__*/ React.createElement("circle", {
7
- className: "fui-Spinner__Tail"
8
- }));
@@ -1 +0,0 @@
1
- {"version":3,"sources":["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"],"names":["React","DefaultSvg","svg","className","circle"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,OAAO,MAAMC,aAAa,kBACxB,oBAACC;QAAIC,WAAU;qBACb,oBAACC;QAAOD,WAAU;sBAClB,oBAACC;QAAOD,WAAU;QAEpB"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "DefaultSvg", {
6
- enumerable: true,
7
- get: function() {
8
- return DefaultSvg;
9
- }
10
- });
11
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const DefaultSvg = ()=>/*#__PURE__*/ _react.createElement("svg", {
14
- className: "fui-Spinner__Progressbar"
15
- }, /*#__PURE__*/ _react.createElement("circle", {
16
- className: "fui-Spinner__Track"
17
- }), /*#__PURE__*/ _react.createElement("circle", {
18
- className: "fui-Spinner__Tail"
19
- }));
@@ -1 +0,0 @@
1
- {"version":3,"sources":["DefaultSvg.js"],"sourcesContent":["import * as React from 'react';\nexport const DefaultSvg = ()=>/*#__PURE__*/ React.createElement(\"svg\", {\n className: \"fui-Spinner__Progressbar\"\n }, /*#__PURE__*/ React.createElement(\"circle\", {\n className: \"fui-Spinner__Track\"\n }), /*#__PURE__*/ React.createElement(\"circle\", {\n className: \"fui-Spinner__Tail\"\n }));\n"],"names":["DefaultSvg","React","createElement","className"],"mappings":";;;;+BACaA;;;eAAAA;;;;iEADU;AAChB,MAAMA,aAAa,IAAI,WAAW,GAAGC,OAAMC,aAAa,CAAC,OAAO;QAC/DC,WAAW;IACf,GAAG,WAAW,GAAGF,OAAMC,aAAa,CAAC,UAAU;QAC3CC,WAAW;IACf,IAAI,WAAW,GAAGF,OAAMC,aAAa,CAAC,UAAU;QAC5CC,WAAW;IACf"}