@fluentui/react-teaching-popover 9.6.19 → 9.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +27 -2
  2. package/dist/index.d.ts +20 -15
  3. package/lib/TeachingPopover.js +1 -1
  4. package/lib/TeachingPopover.js.map +1 -1
  5. package/lib/components/TeachingPopover/TeachingPopover.js +3 -2
  6. package/lib/components/TeachingPopover/TeachingPopover.js.map +1 -1
  7. package/lib/components/TeachingPopover/TeachingPopover.types.js +1 -3
  8. package/lib/components/TeachingPopover/TeachingPopover.types.js.map +1 -1
  9. package/lib/components/TeachingPopover/index.js +1 -0
  10. package/lib/components/TeachingPopover/index.js.map +1 -1
  11. package/lib/components/TeachingPopover/useTeachingPopoverContextValues.js +3 -0
  12. package/lib/components/TeachingPopover/useTeachingPopoverContextValues.js.map +1 -0
  13. package/lib/components/TeachingPopoverBody/TeachingPopoverBody.types.js.map +1 -1
  14. package/lib/components/TeachingPopoverBody/renderTeachingPopoverBody.js.map +1 -1
  15. package/lib/components/TeachingPopoverBody/useTeachingPopoverBody.js +0 -1
  16. package/lib/components/TeachingPopoverBody/useTeachingPopoverBody.js.map +1 -1
  17. package/lib/components/TeachingPopoverCarousel/Carousel/Carousel.js.map +1 -1
  18. package/lib/components/TeachingPopoverCarousel/Carousel/Carousel.types.js +1 -1
  19. package/lib/components/TeachingPopoverCarousel/Carousel/Carousel.types.js.map +1 -1
  20. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselContext.js +0 -1
  21. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselContext.js.map +1 -1
  22. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types.js.map +1 -1
  23. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem.js.map +1 -1
  24. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.js +0 -1
  25. package/lib/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.js.map +1 -1
  26. package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.js +0 -1
  27. package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.js.map +1 -1
  28. package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.js +9 -2
  29. package/lib/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.js.map +1 -1
  30. package/lib/components/TeachingPopoverCarouselCard/TeachingPopoverCarouselCard.types.js.map +1 -1
  31. package/lib/components/TeachingPopoverCarouselCard/renderTeachingPopoverCarouselCard.js.map +1 -1
  32. package/lib/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.js +0 -1
  33. package/lib/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.js.map +1 -1
  34. package/lib/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.js +3 -1
  35. package/lib/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.js.map +1 -1
  36. package/lib/components/TeachingPopoverCarouselFooter/renderTeachingPopoverCarouselFooter.js.map +1 -1
  37. package/lib/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.js +0 -1
  38. package/lib/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.js.map +1 -1
  39. package/lib/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.js +3 -1
  40. package/lib/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.js.map +1 -1
  41. package/lib/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.js +1 -1
  42. package/lib/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.js.map +1 -1
  43. package/lib/components/TeachingPopoverCarouselNav/renderTeachingPopoverCarouselNav.js.map +1 -1
  44. package/lib/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.js +0 -1
  45. package/lib/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.js.map +1 -1
  46. package/lib/components/TeachingPopoverCarouselNavButton/TeachingPopoverCarouselNavButton.types.js.map +1 -1
  47. package/lib/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButton.js +0 -1
  48. package/lib/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButton.js.map +1 -1
  49. package/lib/components/TeachingPopoverCarouselPageCount/TeachingPopoverCarouselPageCount.types.js +3 -1
  50. package/lib/components/TeachingPopoverCarouselPageCount/TeachingPopoverCarouselPageCount.types.js.map +1 -1
  51. package/lib/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCount.js +0 -1
  52. package/lib/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCount.js.map +1 -1
  53. package/lib/components/TeachingPopoverFooter/TeachingPopoverFooter.types.js.map +1 -1
  54. package/lib/components/TeachingPopoverFooter/renderTeachingPopoverFooter.js.map +1 -1
  55. package/lib/components/TeachingPopoverFooter/useTeachingPopoverFooter.js +0 -1
  56. package/lib/components/TeachingPopoverFooter/useTeachingPopoverFooter.js.map +1 -1
  57. package/lib/components/TeachingPopoverHeader/TeachingPopoverHeader.types.js.map +1 -1
  58. package/lib/components/TeachingPopoverHeader/renderTeachingPopoverHeader.js.map +1 -1
  59. package/lib/components/TeachingPopoverSurface/TeachingPopoverSurface.js.map +1 -1
  60. package/lib/components/TeachingPopoverSurface/TeachingPopoverSurface.types.js.map +1 -1
  61. package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurface.js +0 -1
  62. package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurface.js.map +1 -1
  63. package/lib/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js.map +1 -1
  64. package/lib/components/TeachingPopoverTitle/TeachingPopoverTitle.types.js.map +1 -1
  65. package/lib/components/TeachingPopoverTitle/renderTeachingPopoverTitle.js.map +1 -1
  66. package/lib/components/TeachingPopoverTrigger/TeachingPopoverTrigger.js +0 -1
  67. package/lib/components/TeachingPopoverTrigger/TeachingPopoverTrigger.js.map +1 -1
  68. package/lib/components/TeachingPopoverTrigger/TeachingPopoverTrigger.types.js.map +1 -1
  69. package/lib/components/TeachingPopoverTrigger/renderTeachingPopoverTrigger.js.map +1 -1
  70. package/lib/components/TeachingPopoverTrigger/useTeachingPopoverTrigger.js.map +1 -1
  71. package/lib/index.js +1 -1
  72. package/lib/index.js.map +1 -1
  73. package/lib-commonjs/TeachingPopover.js +3 -0
  74. package/lib-commonjs/TeachingPopover.js.map +1 -1
  75. package/lib-commonjs/components/TeachingPopover/TeachingPopover.js +3 -3
  76. package/lib-commonjs/components/TeachingPopover/TeachingPopover.js.map +1 -1
  77. package/lib-commonjs/components/TeachingPopover/TeachingPopover.types.js +1 -3
  78. package/lib-commonjs/components/TeachingPopover/TeachingPopover.types.js.map +1 -1
  79. package/lib-commonjs/components/TeachingPopover/index.js +4 -0
  80. package/lib-commonjs/components/TeachingPopover/index.js.map +1 -1
  81. package/lib-commonjs/components/TeachingPopover/useTeachingPopoverContextValues.js +13 -0
  82. package/lib-commonjs/components/TeachingPopover/useTeachingPopoverContextValues.js.map +1 -0
  83. package/lib-commonjs/components/TeachingPopoverBody/TeachingPopoverBody.types.js.map +1 -1
  84. package/lib-commonjs/components/TeachingPopoverBody/renderTeachingPopoverBody.js.map +1 -1
  85. package/lib-commonjs/components/TeachingPopoverBody/useTeachingPopoverBody.js +0 -2
  86. package/lib-commonjs/components/TeachingPopoverBody/useTeachingPopoverBody.js.map +1 -1
  87. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/Carousel.js.map +1 -1
  88. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/Carousel.types.js +0 -2
  89. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/Carousel.types.js.map +1 -1
  90. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselContext.js +0 -2
  91. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselContext.js.map +1 -1
  92. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types.js.map +1 -1
  93. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem.js.map +1 -1
  94. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.js +0 -2
  95. package/lib-commonjs/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.js.map +1 -1
  96. package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.js +0 -2
  97. package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.js.map +1 -1
  98. package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.js +10 -2
  99. package/lib-commonjs/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.js.map +1 -1
  100. package/lib-commonjs/components/TeachingPopoverCarouselCard/TeachingPopoverCarouselCard.types.js.map +1 -1
  101. package/lib-commonjs/components/TeachingPopoverCarouselCard/renderTeachingPopoverCarouselCard.js.map +1 -1
  102. package/lib-commonjs/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.js +0 -2
  103. package/lib-commonjs/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.js.map +1 -1
  104. package/lib-commonjs/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.js +3 -3
  105. package/lib-commonjs/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.js.map +1 -1
  106. package/lib-commonjs/components/TeachingPopoverCarouselFooter/renderTeachingPopoverCarouselFooter.js.map +1 -1
  107. package/lib-commonjs/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.js +0 -2
  108. package/lib-commonjs/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.js.map +1 -1
  109. package/lib-commonjs/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.js +3 -3
  110. package/lib-commonjs/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.js.map +1 -1
  111. package/lib-commonjs/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.js +0 -2
  112. package/lib-commonjs/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.js.map +1 -1
  113. package/lib-commonjs/components/TeachingPopoverCarouselNav/renderTeachingPopoverCarouselNav.js.map +1 -1
  114. package/lib-commonjs/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.js +0 -2
  115. package/lib-commonjs/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.js.map +1 -1
  116. package/lib-commonjs/components/TeachingPopoverCarouselNavButton/TeachingPopoverCarouselNavButton.types.js.map +1 -1
  117. package/lib-commonjs/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButton.js +0 -2
  118. package/lib-commonjs/components/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButton.js.map +1 -1
  119. package/lib-commonjs/components/TeachingPopoverCarouselPageCount/TeachingPopoverCarouselPageCount.types.js +3 -3
  120. package/lib-commonjs/components/TeachingPopoverCarouselPageCount/TeachingPopoverCarouselPageCount.types.js.map +1 -1
  121. package/lib-commonjs/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCount.js +0 -2
  122. package/lib-commonjs/components/TeachingPopoverCarouselPageCount/useTeachingPopoverCarouselPageCount.js.map +1 -1
  123. package/lib-commonjs/components/TeachingPopoverFooter/TeachingPopoverFooter.types.js.map +1 -1
  124. package/lib-commonjs/components/TeachingPopoverFooter/renderTeachingPopoverFooter.js.map +1 -1
  125. package/lib-commonjs/components/TeachingPopoverFooter/useTeachingPopoverFooter.js +0 -2
  126. package/lib-commonjs/components/TeachingPopoverFooter/useTeachingPopoverFooter.js.map +1 -1
  127. package/lib-commonjs/components/TeachingPopoverHeader/TeachingPopoverHeader.types.js.map +1 -1
  128. package/lib-commonjs/components/TeachingPopoverHeader/renderTeachingPopoverHeader.js.map +1 -1
  129. package/lib-commonjs/components/TeachingPopoverSurface/TeachingPopoverSurface.js.map +1 -1
  130. package/lib-commonjs/components/TeachingPopoverSurface/TeachingPopoverSurface.types.js.map +1 -1
  131. package/lib-commonjs/components/TeachingPopoverSurface/useTeachingPopoverSurface.js +0 -2
  132. package/lib-commonjs/components/TeachingPopoverSurface/useTeachingPopoverSurface.js.map +1 -1
  133. package/lib-commonjs/components/TeachingPopoverSurface/useTeachingPopoverSurfaceStyles.styles.raw.js.map +1 -1
  134. package/lib-commonjs/components/TeachingPopoverTitle/TeachingPopoverTitle.types.js.map +1 -1
  135. package/lib-commonjs/components/TeachingPopoverTitle/renderTeachingPopoverTitle.js.map +1 -1
  136. package/lib-commonjs/components/TeachingPopoverTrigger/TeachingPopoverTrigger.js +0 -2
  137. package/lib-commonjs/components/TeachingPopoverTrigger/TeachingPopoverTrigger.js.map +1 -1
  138. package/lib-commonjs/components/TeachingPopoverTrigger/TeachingPopoverTrigger.types.js.map +1 -1
  139. package/lib-commonjs/components/TeachingPopoverTrigger/renderTeachingPopoverTrigger.js.map +1 -1
  140. package/lib-commonjs/components/TeachingPopoverTrigger/useTeachingPopoverTrigger.js.map +1 -1
  141. package/lib-commonjs/index.js +3 -0
  142. package/lib-commonjs/index.js.map +1 -1
  143. package/package.json +11 -8
package/CHANGELOG.md CHANGED
@@ -1,12 +1,37 @@
1
1
  # Change Log - @fluentui/react-teaching-popover
2
2
 
3
- This log was last generated on Thu, 26 Mar 2026 08:10:44 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Apr 2026 11:59:35 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.6.21)
8
+
9
+ Thu, 23 Apr 2026 11:59:35 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.6.20..@fluentui/react-teaching-popover_v9.6.21)
11
+
12
+ ### Patches
13
+
14
+ - perf: memoize context values in use*ContextValues hooks ([PR #36008](https://github.com/microsoft/fluentui/pull/36008) by olfedias@microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
16
+ - Bump @fluentui/react-utilities to v9.26.3 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
17
+ - Bump @fluentui/react-popover to v9.14.2 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
18
+ - Bump @fluentui/react-button to v9.9.1 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.26.14 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
20
+ - Bump @fluentui/react-aria to v9.17.11 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
21
+ - Bump @fluentui/react-context-selector to v9.2.16 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
22
+
23
+ ## [9.6.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.6.20)
24
+
25
+ Mon, 30 Mar 2026 14:37:41 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.6.19..@fluentui/react-teaching-popover_v9.6.20)
27
+
28
+ ### Patches
29
+
30
+ - Bump @fluentui/react-popover to v9.14.1 ([PR #35907](https://github.com/microsoft/fluentui/pull/35907) by beachball)
31
+
7
32
  ## [9.6.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-teaching-popover_v9.6.19)
8
33
 
9
- Thu, 26 Mar 2026 08:10:44 GMT
34
+ Thu, 26 Mar 2026 08:12:54 GMT
10
35
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-teaching-popover_v9.6.18..@fluentui/react-teaching-popover_v9.6.19)
11
36
 
12
37
  ### Patches
package/dist/index.d.ts CHANGED
@@ -1,23 +1,24 @@
1
- import { ARIAButtonSlotProps } from '@fluentui/react-aria';
2
- import { Button } from '@fluentui/react-button';
3
- import { ButtonProps } from '@fluentui/react-button';
4
- import { ButtonState } from '@fluentui/react-button';
5
- import { ComponentProps } from '@fluentui/react-utilities';
6
- import { ComponentState } from '@fluentui/react-utilities';
7
- import { EventData } from '@fluentui/react-utilities';
8
- import { EventHandler } from '@fluentui/react-utilities';
1
+ import type { ARIAButtonSlotProps } from '@fluentui/react-aria';
2
+ import type { Button } from '@fluentui/react-button';
3
+ import type { ButtonProps } from '@fluentui/react-button';
4
+ import type { ButtonState } from '@fluentui/react-button';
5
+ import type { ComponentProps } from '@fluentui/react-utilities';
6
+ import type { ComponentState } from '@fluentui/react-utilities';
7
+ import type { EventData } from '@fluentui/react-utilities';
8
+ import type { EventHandler } from '@fluentui/react-utilities';
9
9
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
10
10
  import { JSXElement } from '@fluentui/react-utilities';
11
11
  import { PopoverContextValue } from '@fluentui/react-popover';
12
+ import { PopoverContextValues } from '@fluentui/react-popover';
12
13
  import type { PopoverProps } from '@fluentui/react-popover';
13
14
  import { PopoverState } from '@fluentui/react-popover';
14
- import { PopoverSurfaceSlots } from '@fluentui/react-popover';
15
- import { PopoverSurfaceState } from '@fluentui/react-popover';
16
- import { PopoverTriggerChildProps } from '@fluentui/react-popover';
17
- import { PopoverTriggerProps } from '@fluentui/react-popover';
18
- import { PopoverTriggerState } from '@fluentui/react-popover';
15
+ import type { PopoverSurfaceSlots } from '@fluentui/react-popover';
16
+ import type { PopoverSurfaceState } from '@fluentui/react-popover';
17
+ import type { PopoverTriggerChildProps } from '@fluentui/react-popover';
18
+ import type { PopoverTriggerProps } from '@fluentui/react-popover';
19
+ import type { PopoverTriggerState } from '@fluentui/react-popover';
19
20
  import * as React_2 from 'react';
20
- import { Slot } from '@fluentui/react-utilities';
21
+ import type { Slot } from '@fluentui/react-utilities';
21
22
  import type { SlotClassNames } from '@fluentui/react-utilities';
22
23
 
23
24
  declare type CarouselContextValue = {
@@ -63,7 +64,7 @@ declare type NavButtonRenderFunction = (value: string) => React_2.ReactNode;
63
64
  /**
64
65
  * Render the final JSX of TeachingPopover
65
66
  */
66
- export declare const renderTeachingPopover_unstable: (state: PopoverState) => JSXElement;
67
+ export declare const renderTeachingPopover_unstable: (state: PopoverState, contextValues?: PopoverContextValues) => JSXElement;
67
68
 
68
69
  /**
69
70
  * Render the final JSX of TeachingPopoverBody
@@ -394,6 +395,8 @@ export declare type TeachingPopoverCarouselSlots = {
394
395
  */
395
396
  export declare type TeachingPopoverCarouselState = ComponentState<Required<TeachingPopoverCarouselSlots>> & Partial<Pick<PopoverContextValue, 'appearance'>> & CarouselContextValue;
396
397
 
398
+ declare type TeachingPopoverContextValues = PopoverContextValues;
399
+
397
400
  /**
398
401
  * Define a styled TeachingPopoverFooter, using the `useTeachingPopoverFooter_unstable` and `useTeachingPopoverFooterStyles_unstable`
399
402
  * hooks.
@@ -666,6 +669,8 @@ export declare const useTeachingPopoverCarouselPageCountStyles_unstable: (state:
666
669
  /** Applies style classnames to slots */
667
670
  export declare const useTeachingPopoverCarouselStyles_unstable: (state: TeachingPopoverCarouselState) => TeachingPopoverCarouselState;
668
671
 
672
+ export declare const useTeachingPopoverContextValues_unstable: (state: TeachingPopoverState) => TeachingPopoverContextValues;
673
+
669
674
  /**
670
675
  * Returns the props and state required to render the component
671
676
  * @param props - TeachingPopoverFooter properties
@@ -1 +1 @@
1
- export { TeachingPopover, renderTeachingPopover_unstable, useTeachingPopover_unstable } from './components/TeachingPopover/index';
1
+ export { TeachingPopover, renderTeachingPopover_unstable, useTeachingPopover_unstable, useTeachingPopoverContextValues_unstable } from './components/TeachingPopover/index';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TeachingPopover.ts"],"sourcesContent":["export type { TeachingPopoverProps, TeachingPopoverState } from './components/TeachingPopover/index';\nexport {\n TeachingPopover,\n renderTeachingPopover_unstable,\n useTeachingPopover_unstable,\n} from './components/TeachingPopover/index';\n"],"names":["TeachingPopover","renderTeachingPopover_unstable","useTeachingPopover_unstable"],"mappings":"AACA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,2BAA2B,QACtB,qCAAqC"}
1
+ {"version":3,"sources":["../src/TeachingPopover.ts"],"sourcesContent":["export type { TeachingPopoverProps, TeachingPopoverState } from './components/TeachingPopover/index';\nexport {\n TeachingPopover,\n renderTeachingPopover_unstable,\n useTeachingPopover_unstable,\n useTeachingPopoverContextValues_unstable,\n} from './components/TeachingPopover/index';\n"],"names":["TeachingPopover","renderTeachingPopover_unstable","useTeachingPopover_unstable","useTeachingPopoverContextValues_unstable"],"mappings":"AACA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,wCAAwC,QACnC,qCAAqC"}
@@ -1,11 +1,12 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { useTeachingPopover_unstable } from './useTeachingPopover';
4
3
  import { renderTeachingPopover_unstable } from './renderTeachingPopover';
4
+ import { useTeachingPopoverContextValues_unstable } from './useTeachingPopoverContextValues';
5
5
  /**
6
6
  * An extension class of Popover which defaults to withArrow and FocusTrap enabled.
7
7
  */ export const TeachingPopover = (props)=>{
8
8
  const state = useTeachingPopover_unstable(props);
9
- return renderTeachingPopover_unstable(state);
9
+ const contextValues = useTeachingPopoverContextValues_unstable(state);
10
+ return renderTeachingPopover_unstable(state, contextValues);
10
11
  };
11
12
  TeachingPopover.displayName = 'TeachingPopover';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopover/TeachingPopover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTeachingPopover_unstable } from './useTeachingPopover';\nimport { renderTeachingPopover_unstable } from './renderTeachingPopover';\nimport type { TeachingPopoverProps } from './TeachingPopover.types';\n\n/**\n * An extension class of Popover which defaults to withArrow and FocusTrap enabled.\n */\nexport const TeachingPopover: React.FC<TeachingPopoverProps> = props => {\n const state = useTeachingPopover_unstable(props);\n\n return renderTeachingPopover_unstable(state);\n};\n\nTeachingPopover.displayName = 'TeachingPopover';\n"],"names":["React","useTeachingPopover_unstable","renderTeachingPopover_unstable","TeachingPopover","props","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AAGzE;;CAEC,GACD,OAAO,MAAMC,kBAAkDC,CAAAA;IAC7D,MAAMC,QAAQJ,4BAA4BG;IAE1C,OAAOF,+BAA+BG;AACxC,EAAE;AAEFF,gBAAgBG,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TeachingPopover/TeachingPopover.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useTeachingPopover_unstable } from './useTeachingPopover';\nimport { renderTeachingPopover_unstable } from './renderTeachingPopover';\nimport type { TeachingPopoverProps } from './TeachingPopover.types';\nimport { useTeachingPopoverContextValues_unstable } from './useTeachingPopoverContextValues';\n\n/**\n * An extension class of Popover which defaults to withArrow and FocusTrap enabled.\n */\nexport const TeachingPopover: React.FC<TeachingPopoverProps> = props => {\n const state = useTeachingPopover_unstable(props);\n const contextValues = useTeachingPopoverContextValues_unstable(state);\n\n return renderTeachingPopover_unstable(state, contextValues);\n};\n\nTeachingPopover.displayName = 'TeachingPopover';\n"],"names":["useTeachingPopover_unstable","renderTeachingPopover_unstable","useTeachingPopoverContextValues_unstable","TeachingPopover","props","state","contextValues","displayName"],"mappings":"AAAA;AAGA,SAASA,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AAEzE,SAASC,wCAAwC,QAAQ,oCAAoC;AAE7F;;CAEC,GACD,OAAO,MAAMC,kBAAkDC,CAAAA;IAC7D,MAAMC,QAAQL,4BAA4BI;IAC1C,MAAME,gBAAgBJ,yCAAyCG;IAE/D,OAAOJ,+BAA+BI,OAAOC;AAC/C,EAAE;AAEFH,gBAAgBI,WAAW,GAAG"}
@@ -1,3 +1 @@
1
- /**
2
- * TeachingPopover State
3
- */ export { };
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopover/TeachingPopover.types.ts"],"sourcesContent":["import type { PopoverState, PopoverProps } from '@fluentui/react-popover';\n\n/**\n * TeachingPopover Props\n */\nexport type TeachingPopoverProps = PopoverProps;\n\n/**\n * TeachingPopover State\n */\nexport type TeachingPopoverState = PopoverState;\n"],"names":[],"mappings":"AAOA;;CAEC,GACD,WAAgD"}
1
+ {"version":3,"sources":["../src/components/TeachingPopover/TeachingPopover.types.ts"],"sourcesContent":["import type { PopoverState, PopoverProps, PopoverContextValues } from '@fluentui/react-popover';\n\n/**\n * TeachingPopover Props\n */\nexport type TeachingPopoverProps = PopoverProps;\n\n/**\n * TeachingPopover State\n */\nexport type TeachingPopoverState = PopoverState;\n\nexport type TeachingPopoverContextValues = PopoverContextValues;\n"],"names":[],"mappings":"AAYA,WAAgE"}
@@ -1,3 +1,4 @@
1
1
  export { TeachingPopover } from './TeachingPopover';
2
2
  export { renderTeachingPopover_unstable } from './renderTeachingPopover';
3
3
  export { useTeachingPopover_unstable } from './useTeachingPopover';
4
+ export { useTeachingPopoverContextValues_unstable } from './useTeachingPopoverContextValues';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopover/index.ts"],"sourcesContent":["export { TeachingPopover } from './TeachingPopover';\nexport type { TeachingPopoverProps, TeachingPopoverState } from './TeachingPopover.types';\nexport { renderTeachingPopover_unstable } from './renderTeachingPopover';\nexport { useTeachingPopover_unstable } from './useTeachingPopover';\n"],"names":["TeachingPopover","renderTeachingPopover_unstable","useTeachingPopover_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB"}
1
+ {"version":3,"sources":["../src/components/TeachingPopover/index.ts"],"sourcesContent":["export { TeachingPopover } from './TeachingPopover';\nexport type { TeachingPopoverProps, TeachingPopoverState } from './TeachingPopover.types';\nexport { renderTeachingPopover_unstable } from './renderTeachingPopover';\nexport { useTeachingPopover_unstable } from './useTeachingPopover';\nexport { useTeachingPopoverContextValues_unstable } from './useTeachingPopoverContextValues';\n"],"names":["TeachingPopover","renderTeachingPopover_unstable","useTeachingPopover_unstable","useTeachingPopoverContextValues_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wCAAwC,QAAQ,oCAAoC"}
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+ import { usePopoverContextValues_unstable } from '@fluentui/react-popover';
3
+ export const useTeachingPopoverContextValues_unstable = usePopoverContextValues_unstable;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TeachingPopover/useTeachingPopoverContextValues.ts"],"sourcesContent":["'use client';\n\nimport { usePopoverContextValues_unstable } from '@fluentui/react-popover';\nimport type { TeachingPopoverContextValues, TeachingPopoverState } from './TeachingPopover.types';\n\nexport const useTeachingPopoverContextValues_unstable: (state: TeachingPopoverState) => TeachingPopoverContextValues =\n usePopoverContextValues_unstable;\n"],"names":["usePopoverContextValues_unstable","useTeachingPopoverContextValues_unstable"],"mappings":"AAAA;AAEA,SAASA,gCAAgC,QAAQ,0BAA0B;AAG3E,OAAO,MAAMC,2CACXD,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverBody/TeachingPopoverBody.types.ts"],"sourcesContent":["import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TeachingPopoverBodySlots = {\n /**\n * The element wrapping the buttons.\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * Optional Media Content.\n */\n media?: Slot<'span'>;\n};\n\nexport type TeachingPopoverBodyProps = ComponentProps<TeachingPopoverBodySlots> & {\n mediaLength?: 'short' | 'medium' | 'tall';\n};\n\nexport type TeachingPopoverBodyState = ComponentState<TeachingPopoverBodySlots> &\n Required<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;\n"],"names":[],"mappings":"AAiBA,WAC0D"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverBody/TeachingPopoverBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TeachingPopoverBodySlots = {\n /**\n * The element wrapping the buttons.\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * Optional Media Content.\n */\n media?: Slot<'span'>;\n};\n\nexport type TeachingPopoverBodyProps = ComponentProps<TeachingPopoverBodySlots> & {\n mediaLength?: 'short' | 'medium' | 'tall';\n};\n\nexport type TeachingPopoverBodyState = ComponentState<TeachingPopoverBodySlots> &\n Required<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;\n"],"names":[],"mappings":"AAiBA,WAC0D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverBody/renderTeachingPopoverBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverBodyState } from './TeachingPopoverBody.types';\nimport { TeachingPopoverBodySlots } from './TeachingPopoverBody.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverBody\n */\nexport const renderTeachingPopoverBody_unstable = (state: TeachingPopoverBodyState): JSXElement => {\n assertSlots<TeachingPopoverBodySlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTeachingPopoverBody_unstable","state","root","media","children"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjDF,YAAsCE;IAEtC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;YAC3BF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverBody/renderTeachingPopoverBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverBodyState } from './TeachingPopoverBody.types';\nimport type { TeachingPopoverBodySlots } from './TeachingPopoverBody.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverBody\n */\nexport const renderTeachingPopoverBody_unstable = (state: TeachingPopoverBodyState): JSXElement => {\n assertSlots<TeachingPopoverBodySlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n {state.root.children}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTeachingPopoverBody_unstable","state","root","media","children"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjDF,YAAsCE;IAEtC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;YAC3BF,MAAMC,IAAI,CAACE,QAAQ;;;AAG1B,EAAE"}
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Returns the props and state required to render the component
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverBody/useTeachingPopoverBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TeachingPopoverBodyProps, TeachingPopoverBodyState } from './TeachingPopoverBody.types';\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverBody properties\n * @param ref - reference to root HTMLElement of TeachingPopoverBody\n */\nexport const useTeachingPopoverBody_unstable = (\n props: TeachingPopoverBodyProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverBodyState => {\n const { mediaLength } = props;\n\n return {\n components: {\n root: 'div',\n media: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n media: slot.optional(props.media, { elementType: 'span' }),\n mediaLength: mediaLength ?? 'short',\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTeachingPopoverBody_unstable","props","ref","mediaLength","components","root","media","always","elementType","optional"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E;;;;CAIC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,WAAW,EAAE,GAAGF;IAExB,OAAO;QACLG,YAAY;YACVC,MAAM;YACNC,OAAO;QACT;QACAD,MAAMN,KAAKQ,MAAM,CACfT,yBAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBF,OAAOP,KAAKU,QAAQ,CAACR,MAAMK,KAAK,EAAE;YAAEE,aAAa;QAAO;QACxDL,aAAaA,wBAAAA,yBAAAA,cAAe;IAC9B;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverBody/useTeachingPopoverBody.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TeachingPopoverBodyProps, TeachingPopoverBodyState } from './TeachingPopoverBody.types';\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverBody properties\n * @param ref - reference to root HTMLElement of TeachingPopoverBody\n */\nexport const useTeachingPopoverBody_unstable = (\n props: TeachingPopoverBodyProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverBodyState => {\n const { mediaLength } = props;\n\n return {\n components: {\n root: 'div',\n media: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n media: slot.optional(props.media, { elementType: 'span' }),\n mediaLength: mediaLength ?? 'short',\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useTeachingPopoverBody_unstable","props","ref","mediaLength","components","root","media","always","elementType","optional"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E;;;;CAIC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,WAAW,EAAE,GAAGF;IAExB,OAAO;QACLG,YAAY;YACVC,MAAM;YACNC,OAAO;QACT;QACAD,MAAMN,KAAKQ,MAAM,CACfT,yBAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBF,OAAOP,KAAKU,QAAQ,CAACR,MAAMK,KAAK,EAAE;YAAEE,aAAa;QAAO;QACxDL,aAAaA,wBAAAA,yBAAAA,cAAe;IAC9B;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/Carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement, useMergedRefs, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useAnnounce, useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport { CAROUSEL_ITEM } from './constants';\nimport { useCarouselWalker_unstable } from './useCarouselWalker';\nimport { createCarouselStore } from './createCarouselStore';\nimport type { CarouselStore, UseCarouselOptions } from './Carousel.types';\nimport { CarouselContextValue } from './CarouselContext';\n\n// TODO: Migrate this into an external @fluentui/carousel component\n// For now, we won't export this publicly, is only for internal TeachingPopover use until stabilized.\nexport function useCarousel_unstable(options: UseCarouselOptions): {\n carouselRef: React.RefObject<HTMLDivElement | null>;\n carousel: {\n store: CarouselStore;\n value: string | null;\n selectPageByDirection: (\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>,\n direction: 'next' | 'prev',\n ) => void;\n selectPageByValue: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, newValue: string) => void;\n };\n} {\n 'use no memo';\n\n const { announcement, onValueChange, onFinish } = options;\n\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n const { ref: carouselRef, walker: carouselWalker } = useCarouselWalker_unstable();\n const [store] = React.useState(() => createCarouselStore());\n\n const [value, setValue] = useControllableState({\n defaultState: options.defaultValue,\n state: options.value,\n initialState: null,\n });\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const { announce } = useAnnounce();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (value === null) {\n // eslint-disable-next-line no-console\n console.error(\n 'useCarousel: Carousel needs to have a `defaultValue` or `value` prop set. If you want to control the value, use the `value` prop.',\n );\n }\n }, [value]);\n }\n\n React.useEffect(() => {\n const allItems = rootRef.current?.querySelectorAll(`[${CAROUSEL_ITEM}]`)!;\n\n for (let i = 0; i < allItems.length; i++) {\n store.addValue(allItems.item(i).getAttribute(CAROUSEL_ITEM)!);\n }\n\n return () => {\n store.clear();\n };\n }, [store]);\n\n React.useEffect(() => {\n if (!win) {\n return;\n }\n\n const config: MutationObserverInit = {\n attributes: true,\n attributeFilter: [CAROUSEL_ITEM],\n childList: true,\n subtree: true,\n };\n\n // Callback function to execute when mutations are observed\n const callback: MutationCallback = mutationList => {\n for (const mutation of mutationList) {\n for (const addedNode of Array.from(mutation.addedNodes)) {\n if (isHTMLElement(addedNode) && addedNode.hasAttribute(CAROUSEL_ITEM)) {\n const newValue = addedNode.getAttribute(CAROUSEL_ITEM)!;\n const newNode = carouselWalker.find(newValue);\n if (!newNode?.value) {\n return;\n }\n\n const previousNode = carouselWalker.prevPage(newNode?.value);\n store.insertValue(newValue, previousNode?.value ?? null);\n }\n }\n\n for (const removedNode of Array.from(mutation.removedNodes)) {\n if (isHTMLElement(removedNode) && removedNode?.hasAttribute(CAROUSEL_ITEM)) {\n const removedValue = removedNode.getAttribute(CAROUSEL_ITEM)!;\n\n store.removeValue(removedValue);\n }\n }\n }\n };\n\n // Create an observer instance linked to the callback function\n const observer = new win.MutationObserver(callback);\n\n // Start observing the target node for configured mutations\n observer.observe(rootRef.current!, config);\n\n // Later, you can stop observing\n return () => {\n observer.disconnect();\n };\n }, [carouselWalker, store, win]);\n\n const updateSlide = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, newValue: string) => {\n setValue(newValue);\n onValueChange?.(event, { event, type: 'click', value: newValue });\n\n const announceText = announcement?.(newValue);\n if (announceText) {\n announce(announceText, { polite: true });\n }\n },\n );\n\n const selectPageByDirection: CarouselContextValue['selectPageByDirection'] = useEventCallback((event, direction) => {\n const active = carouselWalker.active();\n\n if (!active?.value) {\n return;\n }\n\n const newPage =\n direction === 'prev' ? carouselWalker.prevPage(active.value) : carouselWalker.nextPage(active.value);\n\n if (newPage) {\n updateSlide(event, newPage?.value);\n } else {\n onFinish?.(event, { event, type: 'click', value: active?.value });\n }\n });\n\n return {\n carouselRef: useMergedRefs(rootRef, carouselRef),\n carousel: {\n store,\n value,\n selectPageByDirection,\n selectPageByValue: updateSlide,\n },\n };\n}\n"],"names":["React","isHTMLElement","useMergedRefs","useControllableState","useEventCallback","useAnnounce","useFluent_unstable","useFluent","CAROUSEL_ITEM","useCarouselWalker_unstable","createCarouselStore","useCarousel_unstable","options","announcement","onValueChange","onFinish","targetDocument","win","defaultView","ref","carouselRef","walker","carouselWalker","store","useState","value","setValue","defaultState","defaultValue","state","initialState","rootRef","useRef","announce","process","env","NODE_ENV","useEffect","console","error","allItems","current","querySelectorAll","i","length","addValue","item","getAttribute","clear","config","attributes","attributeFilter","childList","subtree","callback","mutationList","mutation","addedNode","Array","from","addedNodes","hasAttribute","newValue","newNode","find","previousNode","prevPage","insertValue","removedNode","removedNodes","removedValue","removeValue","observer","MutationObserver","observe","disconnect","updateSlide","event","type","announceText","polite","selectPageByDirection","direction","active","newPage","nextPage","carousel","selectPageByValue"],"mappings":"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"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/Carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement, useMergedRefs, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useAnnounce, useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nimport { CAROUSEL_ITEM } from './constants';\nimport { useCarouselWalker_unstable } from './useCarouselWalker';\nimport { createCarouselStore } from './createCarouselStore';\nimport type { CarouselStore, UseCarouselOptions } from './Carousel.types';\nimport type { CarouselContextValue } from './CarouselContext';\n\n// TODO: Migrate this into an external @fluentui/carousel component\n// For now, we won't export this publicly, is only for internal TeachingPopover use until stabilized.\nexport function useCarousel_unstable(options: UseCarouselOptions): {\n carouselRef: React.RefObject<HTMLDivElement | null>;\n carousel: {\n store: CarouselStore;\n value: string | null;\n selectPageByDirection: (\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>,\n direction: 'next' | 'prev',\n ) => void;\n selectPageByValue: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, newValue: string) => void;\n };\n} {\n 'use no memo';\n\n const { announcement, onValueChange, onFinish } = options;\n\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n const { ref: carouselRef, walker: carouselWalker } = useCarouselWalker_unstable();\n const [store] = React.useState(() => createCarouselStore());\n\n const [value, setValue] = useControllableState({\n defaultState: options.defaultValue,\n state: options.value,\n initialState: null,\n });\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const { announce } = useAnnounce();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (value === null) {\n // eslint-disable-next-line no-console\n console.error(\n 'useCarousel: Carousel needs to have a `defaultValue` or `value` prop set. If you want to control the value, use the `value` prop.',\n );\n }\n }, [value]);\n }\n\n React.useEffect(() => {\n const allItems = rootRef.current?.querySelectorAll(`[${CAROUSEL_ITEM}]`)!;\n\n for (let i = 0; i < allItems.length; i++) {\n store.addValue(allItems.item(i).getAttribute(CAROUSEL_ITEM)!);\n }\n\n return () => {\n store.clear();\n };\n }, [store]);\n\n React.useEffect(() => {\n if (!win) {\n return;\n }\n\n const config: MutationObserverInit = {\n attributes: true,\n attributeFilter: [CAROUSEL_ITEM],\n childList: true,\n subtree: true,\n };\n\n // Callback function to execute when mutations are observed\n const callback: MutationCallback = mutationList => {\n for (const mutation of mutationList) {\n for (const addedNode of Array.from(mutation.addedNodes)) {\n if (isHTMLElement(addedNode) && addedNode.hasAttribute(CAROUSEL_ITEM)) {\n const newValue = addedNode.getAttribute(CAROUSEL_ITEM)!;\n const newNode = carouselWalker.find(newValue);\n if (!newNode?.value) {\n return;\n }\n\n const previousNode = carouselWalker.prevPage(newNode?.value);\n store.insertValue(newValue, previousNode?.value ?? null);\n }\n }\n\n for (const removedNode of Array.from(mutation.removedNodes)) {\n if (isHTMLElement(removedNode) && removedNode?.hasAttribute(CAROUSEL_ITEM)) {\n const removedValue = removedNode.getAttribute(CAROUSEL_ITEM)!;\n\n store.removeValue(removedValue);\n }\n }\n }\n };\n\n // Create an observer instance linked to the callback function\n const observer = new win.MutationObserver(callback);\n\n // Start observing the target node for configured mutations\n observer.observe(rootRef.current!, config);\n\n // Later, you can stop observing\n return () => {\n observer.disconnect();\n };\n }, [carouselWalker, store, win]);\n\n const updateSlide = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, newValue: string) => {\n setValue(newValue);\n onValueChange?.(event, { event, type: 'click', value: newValue });\n\n const announceText = announcement?.(newValue);\n if (announceText) {\n announce(announceText, { polite: true });\n }\n },\n );\n\n const selectPageByDirection: CarouselContextValue['selectPageByDirection'] = useEventCallback((event, direction) => {\n const active = carouselWalker.active();\n\n if (!active?.value) {\n return;\n }\n\n const newPage =\n direction === 'prev' ? carouselWalker.prevPage(active.value) : carouselWalker.nextPage(active.value);\n\n if (newPage) {\n updateSlide(event, newPage?.value);\n } else {\n onFinish?.(event, { event, type: 'click', value: active?.value });\n }\n });\n\n return {\n carouselRef: useMergedRefs(rootRef, carouselRef),\n carousel: {\n store,\n value,\n selectPageByDirection,\n selectPageByValue: updateSlide,\n },\n };\n}\n"],"names":["React","isHTMLElement","useMergedRefs","useControllableState","useEventCallback","useAnnounce","useFluent_unstable","useFluent","CAROUSEL_ITEM","useCarouselWalker_unstable","createCarouselStore","useCarousel_unstable","options","announcement","onValueChange","onFinish","targetDocument","win","defaultView","ref","carouselRef","walker","carouselWalker","store","useState","value","setValue","defaultState","defaultValue","state","initialState","rootRef","useRef","announce","process","env","NODE_ENV","useEffect","console","error","allItems","current","querySelectorAll","i","length","addValue","item","getAttribute","clear","config","attributes","attributeFilter","childList","subtree","callback","mutationList","mutation","addedNode","Array","from","addedNodes","hasAttribute","newValue","newNode","find","previousNode","prevPage","insertValue","removedNode","removedNodes","removedValue","removeValue","observer","MutationObserver","observe","disconnect","updateSlide","event","type","announceText","polite","selectPageByDirection","direction","active","newPage","nextPage","carousel","selectPageByValue"],"mappings":"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"}
@@ -1 +1 @@
1
- import * as React from 'react';
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/Carousel.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { EventData, EventHandler } from '@fluentui/react-utilities';\n\nexport type CarouselStore = {\n clear: () => void;\n addValue: (value: string) => void;\n insertValue: (value: string, prev: string | null) => void;\n removeValue: (value: string) => void;\n subscribe: (listener: () => void) => () => void;\n getSnapshot: () => string[];\n};\n\nexport type CarouselItem = {\n el: HTMLElement;\n value: string | null;\n};\n\nexport type UseCarouselOptions = {\n /**\n * Localizes the string used to announce carousel page changes to screen reader users\n * Defaults to: undefined\n */\n announcement?: (newValue: string) => string;\n\n /**\n * The initial page to display in uncontrolled mode.\n */\n defaultValue?: string;\n\n /**\n * The value of the currently active page.\n */\n value?: string;\n\n /**\n * Callback to notify a page change.\n */\n onValueChange?: EventHandler<CarouselValueChangeData>;\n\n /**\n * Callback to notify when the final button step of a carousel has been activated.\n */\n onFinish?: EventHandler<CarouselValueChangeData>;\n};\n\nexport type CarouselValueChangeData = EventData<'click', React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>> & {\n /**\n * The value to be set after event has occurred.\n */\n value?: string;\n};\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/Carousel.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { EventData, EventHandler } from '@fluentui/react-utilities';\n\nexport type CarouselStore = {\n clear: () => void;\n addValue: (value: string) => void;\n insertValue: (value: string, prev: string | null) => void;\n removeValue: (value: string) => void;\n subscribe: (listener: () => void) => () => void;\n getSnapshot: () => string[];\n};\n\nexport type CarouselItem = {\n el: HTMLElement;\n value: string | null;\n};\n\nexport type UseCarouselOptions = {\n /**\n * Localizes the string used to announce carousel page changes to screen reader users\n * Defaults to: undefined\n */\n announcement?: (newValue: string) => string;\n\n /**\n * The initial page to display in uncontrolled mode.\n */\n defaultValue?: string;\n\n /**\n * The value of the currently active page.\n */\n value?: string;\n\n /**\n * Callback to notify a page change.\n */\n onValueChange?: EventHandler<CarouselValueChangeData>;\n\n /**\n * Callback to notify when the final button step of a carousel has been activated.\n */\n onFinish?: EventHandler<CarouselValueChangeData>;\n};\n\nexport type CarouselValueChangeData = EventData<'click', React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>> & {\n /**\n * The value to be set after event has occurred.\n */\n value?: string;\n};\n"],"names":[],"mappings":"AA6CA,WAKE"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
3
- import * as React from 'react';
4
3
  import { createCarouselStore } from './createCarouselStore';
5
4
  export const carouselContextDefaultValue = {
6
5
  store: createCarouselStore(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselContext.ts"],"sourcesContent":["'use client';\n\nimport { type Context, ContextSelector, createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport * as React from 'react';\n\nimport type { CarouselStore } from './Carousel.types';\nimport { createCarouselStore } from './createCarouselStore';\n\nexport type CarouselContextValue = {\n store: CarouselStore;\n value: string | null;\n selectPageByDirection: (\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>,\n direction: 'next' | 'prev',\n ) => void;\n selectPageByValue: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, value: string) => void;\n};\n\nexport const carouselContextDefaultValue: CarouselContextValue = {\n store: createCarouselStore(),\n value: null,\n selectPageByDirection: () => {\n /** noop */\n },\n selectPageByValue: () => {\n /** noop */\n },\n};\n\nconst CarouselContext: Context<CarouselContextValue> = createContext<CarouselContextValue | undefined>(\n undefined,\n) as Context<CarouselContextValue>;\n\nexport const CarouselProvider = CarouselContext.Provider;\n\nexport const useCarouselContext_unstable = <T>(selector: ContextSelector<CarouselContextValue, T>): T =>\n useContextSelector(CarouselContext, (ctx = carouselContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","React","createCarouselStore","carouselContextDefaultValue","store","value","selectPageByDirection","selectPageByValue","CarouselContext","undefined","CarouselProvider","Provider","useCarouselContext_unstable","selector","ctx"],"mappings":"AAAA;AAEA,SAAwCA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AACpH,YAAYC,WAAW,QAAQ;AAG/B,SAASC,mBAAmB,QAAQ,wBAAwB;AAY5D,OAAO,MAAMC,8BAAoD;IAC/DC,OAAOF;IACPG,OAAO;IACPC,uBAAuB;IACrB,SAAS,GACX;IACAC,mBAAmB;IACjB,SAAS,GACX;AACF,EAAE;AAEF,MAAMC,kBAAiDT,cACrDU;AAGF,OAAO,MAAMC,mBAAmBF,gBAAgBG,QAAQ,CAAC;AAEzD,OAAO,MAAMC,8BAA8B,CAAIC,WAC7Cb,mBAAmBQ,iBAAiB,CAACM,MAAMX,2BAA2B,GAAKU,SAASC,MAAM"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselContext.ts"],"sourcesContent":["'use client';\n\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { type Context, createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type * as React from 'react';\n\nimport type { CarouselStore } from './Carousel.types';\nimport { createCarouselStore } from './createCarouselStore';\n\nexport type CarouselContextValue = {\n store: CarouselStore;\n value: string | null;\n selectPageByDirection: (\n event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>,\n direction: 'next' | 'prev',\n ) => void;\n selectPageByValue: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, value: string) => void;\n};\n\nexport const carouselContextDefaultValue: CarouselContextValue = {\n store: createCarouselStore(),\n value: null,\n selectPageByDirection: () => {\n /** noop */\n },\n selectPageByValue: () => {\n /** noop */\n },\n};\n\nconst CarouselContext: Context<CarouselContextValue> = createContext<CarouselContextValue | undefined>(\n undefined,\n) as Context<CarouselContextValue>;\n\nexport const CarouselProvider = CarouselContext.Provider;\n\nexport const useCarouselContext_unstable = <T>(selector: ContextSelector<CarouselContextValue, T>): T =>\n useContextSelector(CarouselContext, (ctx = carouselContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","createCarouselStore","carouselContextDefaultValue","store","value","selectPageByDirection","selectPageByValue","CarouselContext","undefined","CarouselProvider","Provider","useCarouselContext_unstable","selector","ctx"],"mappings":"AAAA;AAGA,SAAuBA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAInG,SAASC,mBAAmB,QAAQ,wBAAwB;AAY5D,OAAO,MAAMC,8BAAoD;IAC/DC,OAAOF;IACPG,OAAO;IACPC,uBAAuB;IACrB,SAAS,GACX;IACAC,mBAAmB;IACjB,SAAS,GACX;AACF,EAAE;AAEF,MAAMC,kBAAiDR,cACrDS;AAGF,OAAO,MAAMC,mBAAmBF,gBAAgBG,QAAQ,CAAC;AAEzD,OAAO,MAAMC,8BAA8B,CAAIC,WAC7CZ,mBAAmBO,iBAAiB,CAACM,MAAMX,2BAA2B,GAAKU,SAASC,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types.ts"],"sourcesContent":["import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CarouselItemSlots = {\n /**\n * The element wrapping carousel pages and navigation.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type CarouselItemProps = ComponentProps<CarouselItemSlots> & {\n /**\n * The value used to identify a page,\n * it should be unique and is necessary for pagination\n */\n value: string;\n};\n\n/**\n * TeachingPopoverCarousel State and Context Hooks\n */\nexport type CarouselItemState = ComponentState<Required<CarouselItemSlots>> & {\n visible: boolean;\n} & Pick<CarouselItemProps, 'value'>;\n"],"names":[],"mappings":"AAiBA;;CAEC,GACD,WAEqC"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CarouselItemSlots = {\n /**\n * The element wrapping carousel pages and navigation.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type CarouselItemProps = ComponentProps<CarouselItemSlots> & {\n /**\n * The value used to identify a page,\n * it should be unique and is necessary for pagination\n */\n value: string;\n};\n\n/**\n * TeachingPopoverCarousel State and Context Hooks\n */\nexport type CarouselItemState = ComponentState<Required<CarouselItemSlots>> & {\n visible: boolean;\n} & Pick<CarouselItemProps, 'value'>;\n"],"names":[],"mappings":"AAiBA;;CAEC,GACD,WAEqC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nimport { CarouselItemProps } from './CarouselItem.types';\nimport { useCarouselItem_unstable } from './useCarouselItem';\nimport { renderCarouselItem_unstable } from './renderCarouselItem';\n\n/**\n * Define a CarouselItem, using the `useCarouselItem_unstable` and 'renderCarouselItem_unstable' hooks.\n * It has no styling opinions.\n */\nexport const CarouselItem: ForwardRefComponent<CarouselItemProps> = React.forwardRef((props, ref) => {\n const state = useCarouselItem_unstable(props, ref);\n\n return renderCarouselItem_unstable(state);\n});\n\nCarouselItem.displayName = 'CarouselItem';\n"],"names":["React","useCarouselItem_unstable","renderCarouselItem_unstable","CarouselItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AAEnE;;;CAGC,GACD,OAAO,MAAMC,6BAAuDH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQN,yBAAyBI,OAAOC;IAE9C,OAAOJ,4BAA4BK;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nimport type { CarouselItemProps } from './CarouselItem.types';\nimport { useCarouselItem_unstable } from './useCarouselItem';\nimport { renderCarouselItem_unstable } from './renderCarouselItem';\n\n/**\n * Define a CarouselItem, using the `useCarouselItem_unstable` and 'renderCarouselItem_unstable' hooks.\n * It has no styling opinions.\n */\nexport const CarouselItem: ForwardRefComponent<CarouselItemProps> = React.forwardRef((props, ref) => {\n const state = useCarouselItem_unstable(props, ref);\n\n return renderCarouselItem_unstable(state);\n});\n\nCarouselItem.displayName = 'CarouselItem';\n"],"names":["React","useCarouselItem_unstable","renderCarouselItem_unstable","CarouselItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AAEnE;;;CAGC,GACD,OAAO,MAAMC,6BAAuDH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQN,yBAAyBI,OAAOC;IAE9C,OAAOJ,4BAA4BK;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
4
3
  import { useCarouselContext_unstable } from '../CarouselContext';
5
4
  import { CAROUSEL_ACTIVE_ITEM, CAROUSEL_ITEM } from '../constants';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { CarouselItemProps, CarouselItemState } from './CarouselItem.types';\nimport { useCarouselContext_unstable } from '../CarouselContext';\nimport { CAROUSEL_ACTIVE_ITEM, CAROUSEL_ITEM } from '../constants';\n\nexport const useCarouselItem_unstable = (\n props: CarouselItemProps,\n ref: React.Ref<HTMLDivElement>,\n): CarouselItemState => {\n const { value } = props;\n\n const visible = useCarouselContext_unstable(c => c.value === value);\n const state: CarouselItemState = {\n value,\n visible,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n [CAROUSEL_ITEM]: value,\n [CAROUSEL_ACTIVE_ITEM]: visible,\n hidden: !visible,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n\n if (!visible) {\n state.root.children = null;\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useCarouselContext_unstable","CAROUSEL_ACTIVE_ITEM","CAROUSEL_ITEM","useCarouselItem_unstable","props","ref","value","visible","c","state","components","root","always","hidden","elementType","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,2BAA2B,QAAQ,qBAAqB;AACjE,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,eAAe;AAEnE,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAElB,MAAMG,UAAUP,4BAA4BQ,CAAAA,IAAKA,EAAEF,KAAK,KAAKA;IAC7D,MAAMG,QAA2B;QAC/BH;QACAC;QACAG,YAAY;YACVC,MAAM;QACR;QACAA,MAAMZ,KAAKa,MAAM,CACfd,yBAAyB,OAAO;YAC9BO;YACA,CAACH,cAAc,EAAEI;YACjB,CAACL,qBAAqB,EAAEM;YACxBM,QAAQ,CAACN;YACT,GAAGH,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;IAEzB;IAEA,IAAI,CAACP,SAAS;QACZE,MAAME,IAAI,CAACI,QAAQ,GAAG;IACxB;IAEA,OAAON;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/Carousel/CarouselItem/useCarouselItem.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { CarouselItemProps, CarouselItemState } from './CarouselItem.types';\nimport { useCarouselContext_unstable } from '../CarouselContext';\nimport { CAROUSEL_ACTIVE_ITEM, CAROUSEL_ITEM } from '../constants';\n\nexport const useCarouselItem_unstable = (\n props: CarouselItemProps,\n ref: React.Ref<HTMLDivElement>,\n): CarouselItemState => {\n const { value } = props;\n\n const visible = useCarouselContext_unstable(c => c.value === value);\n const state: CarouselItemState = {\n value,\n visible,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n [CAROUSEL_ITEM]: value,\n [CAROUSEL_ACTIVE_ITEM]: visible,\n hidden: !visible,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n\n if (!visible) {\n state.root.children = null;\n }\n\n return state;\n};\n"],"names":["getIntrinsicElementProps","slot","useCarouselContext_unstable","CAROUSEL_ACTIVE_ITEM","CAROUSEL_ITEM","useCarouselItem_unstable","props","ref","value","visible","c","state","components","root","always","hidden","elementType","children"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,2BAA2B,QAAQ,qBAAqB;AACjE,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,eAAe;AAEnE,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAElB,MAAMG,UAAUP,4BAA4BQ,CAAAA,IAAKA,EAAEF,KAAK,KAAKA;IAC7D,MAAMG,QAA2B;QAC/BH;QACAC;QACAG,YAAY;YACVC,MAAM;QACR;QACAA,MAAMZ,KAAKa,MAAM,CACfd,yBAAyB,OAAO;YAC9BO;YACA,CAACH,cAAc,EAAEI;YACjB,CAACL,qBAAqB,EAAEM;YACxBM,QAAQ,CAACN;YACT,GAAGH,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;IAEzB;IAEA,IAAI,CAACP,SAAS;QACZE,MAAME,IAAI,CAACI,QAAQ,GAAG;IACxB;IAEA,OAAON;AACT,EAAE"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { getIntrinsicElementProps, slot, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
4
3
  import { usePopoverContext_unstable } from '@fluentui/react-popover';
5
4
  import { useCarousel_unstable } from './Carousel/Carousel';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TeachingPopoverCarouselProps, TeachingPopoverCarouselState } from './TeachingPopoverCarousel.types';\nimport { usePopoverContext_unstable } from '@fluentui/react-popover';\nimport { useCarousel_unstable } from './Carousel/Carousel';\n\nexport const useTeachingPopoverCarousel_unstable = (\n props: TeachingPopoverCarouselProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselState => {\n const toggleOpen = usePopoverContext_unstable(c => c.toggleOpen);\n const handleFinish: TeachingPopoverCarouselProps['onFinish'] = useEventCallback((event, data) => {\n props.onFinish?.(event, data);\n toggleOpen(event as React.MouseEvent<HTMLElement>);\n });\n\n const { carousel, carouselRef } = useCarousel_unstable({\n announcement: props.announcement,\n defaultValue: props.defaultValue,\n value: props.value,\n onValueChange: props.onValueChange,\n onFinish: handleFinish,\n });\n\n const appearance = usePopoverContext_unstable(context => context.appearance);\n return {\n appearance,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, carouselRef),\n ...props,\n }),\n { elementType: 'div' },\n ),\n ...carousel,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useEventCallback","useMergedRefs","usePopoverContext_unstable","useCarousel_unstable","useTeachingPopoverCarousel_unstable","props","ref","toggleOpen","c","handleFinish","event","data","onFinish","carousel","carouselRef","announcement","defaultValue","value","onValueChange","appearance","context","components","root","always","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,4BAA4B;AAE5G,SAASC,0BAA0B,QAAQ,0BAA0B;AACrE,SAASC,oBAAoB,QAAQ,sBAAsB;AAE3D,OAAO,MAAMC,sCAAsC,CACjDC,OACAC;IAEA,MAAMC,aAAaL,2BAA2BM,CAAAA,IAAKA,EAAED,UAAU;IAC/D,MAAME,eAAyDT,iBAAiB,CAACU,OAAOC;YACtFN;SAAAA,kBAAAA,MAAMO,QAAQ,cAAdP,sCAAAA,qBAAAA,OAAiBK,OAAOC;QACxBJ,WAAWG;IACb;IAEA,MAAM,EAAEG,QAAQ,EAAEC,WAAW,EAAE,GAAGX,qBAAqB;QACrDY,cAAcV,MAAMU,YAAY;QAChCC,cAAcX,MAAMW,YAAY;QAChCC,OAAOZ,MAAMY,KAAK;QAClBC,eAAeb,MAAMa,aAAa;QAClCN,UAAUH;IACZ;IAEA,MAAMU,aAAajB,2BAA2BkB,CAAAA,UAAWA,QAAQD,UAAU;IAC3E,OAAO;QACLA;QACAE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMvB,KAAKwB,MAAM,CACfzB,yBAAyB,OAAO;YAC9BQ,KAAKL,cAAcK,KAAKQ;YACxB,GAAGT,KAAK;QACV,IACA;YAAEmB,aAAa;QAAM;QAEvB,GAAGX,QAAQ;IACb;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/useTeachingPopoverCarousel.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TeachingPopoverCarouselProps, TeachingPopoverCarouselState } from './TeachingPopoverCarousel.types';\nimport { usePopoverContext_unstable } from '@fluentui/react-popover';\nimport { useCarousel_unstable } from './Carousel/Carousel';\n\nexport const useTeachingPopoverCarousel_unstable = (\n props: TeachingPopoverCarouselProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselState => {\n const toggleOpen = usePopoverContext_unstable(c => c.toggleOpen);\n const handleFinish: TeachingPopoverCarouselProps['onFinish'] = useEventCallback((event, data) => {\n props.onFinish?.(event, data);\n toggleOpen(event as React.MouseEvent<HTMLElement>);\n });\n\n const { carousel, carouselRef } = useCarousel_unstable({\n announcement: props.announcement,\n defaultValue: props.defaultValue,\n value: props.value,\n onValueChange: props.onValueChange,\n onFinish: handleFinish,\n });\n\n const appearance = usePopoverContext_unstable(context => context.appearance);\n return {\n appearance,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, carouselRef),\n ...props,\n }),\n { elementType: 'div' },\n ),\n ...carousel,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useEventCallback","useMergedRefs","usePopoverContext_unstable","useCarousel_unstable","useTeachingPopoverCarousel_unstable","props","ref","toggleOpen","c","handleFinish","event","data","onFinish","carousel","carouselRef","announcement","defaultValue","value","onValueChange","appearance","context","components","root","always","elementType"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,4BAA4B;AAE5G,SAASC,0BAA0B,QAAQ,0BAA0B;AACrE,SAASC,oBAAoB,QAAQ,sBAAsB;AAE3D,OAAO,MAAMC,sCAAsC,CACjDC,OACAC;IAEA,MAAMC,aAAaL,2BAA2BM,CAAAA,IAAKA,EAAED,UAAU;IAC/D,MAAME,eAAyDT,iBAAiB,CAACU,OAAOC;YACtFN;SAAAA,kBAAAA,MAAMO,QAAQ,cAAdP,sCAAAA,qBAAAA,OAAiBK,OAAOC;QACxBJ,WAAWG;IACb;IAEA,MAAM,EAAEG,QAAQ,EAAEC,WAAW,EAAE,GAAGX,qBAAqB;QACrDY,cAAcV,MAAMU,YAAY;QAChCC,cAAcX,MAAMW,YAAY;QAChCC,OAAOZ,MAAMY,KAAK;QAClBC,eAAeb,MAAMa,aAAa;QAClCN,UAAUH;IACZ;IAEA,MAAMU,aAAajB,2BAA2BkB,CAAAA,UAAWA,QAAQD,UAAU;IAC3E,OAAO;QACLA;QACAE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMvB,KAAKwB,MAAM,CACfzB,yBAAyB,OAAO;YAC9BQ,KAAKL,cAAcK,KAAKQ;YACxB,GAAGT,KAAK;QACV,IACA;YAAEmB,aAAa;QAAM;QAEvB,GAAGX,QAAQ;IACb;AACF,EAAE"}
@@ -1,11 +1,18 @@
1
+ 'use client';
2
+ import * as React from 'react';
1
3
  export function useTeachingPopoverCarouselContextValues_unstable(state) {
2
4
  const { store, value, selectPageByValue, selectPageByDirection } = state;
3
- const carousel = {
5
+ const carousel = React.useMemo(()=>({
6
+ store,
7
+ value,
8
+ selectPageByDirection,
9
+ selectPageByValue
10
+ }), [
4
11
  store,
5
12
  value,
6
13
  selectPageByDirection,
7
14
  selectPageByValue
8
- };
15
+ ]);
9
16
  return {
10
17
  carousel
11
18
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.ts"],"sourcesContent":["import type {\n TeachingPopoverCarouselContextValues,\n TeachingPopoverCarouselState,\n} from './TeachingPopoverCarousel.types';\n\nexport function useTeachingPopoverCarouselContextValues_unstable(\n state: TeachingPopoverCarouselState,\n): TeachingPopoverCarouselContextValues {\n const { store, value, selectPageByValue, selectPageByDirection } = state;\n\n const carousel = {\n store,\n value,\n selectPageByDirection,\n selectPageByValue,\n };\n\n return { carousel };\n}\n"],"names":["useTeachingPopoverCarouselContextValues_unstable","state","store","value","selectPageByValue","selectPageByDirection","carousel"],"mappings":"AAKA,OAAO,SAASA,iDACdC,KAAmC;IAEnC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,iBAAiB,EAAEC,qBAAqB,EAAE,GAAGJ;IAEnE,MAAMK,WAAW;QACfJ;QACAC;QACAE;QACAD;IACF;IAEA,OAAO;QAAEE;IAAS;AACpB"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarousel/useTeachingPopoverCarouselContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type {\n TeachingPopoverCarouselContextValues,\n TeachingPopoverCarouselState,\n} from './TeachingPopoverCarousel.types';\n\nexport function useTeachingPopoverCarouselContextValues_unstable(\n state: TeachingPopoverCarouselState,\n): TeachingPopoverCarouselContextValues {\n const { store, value, selectPageByValue, selectPageByDirection } = state;\n\n const carousel = React.useMemo(\n () => ({\n store,\n value,\n selectPageByDirection,\n selectPageByValue,\n }),\n [store, value, selectPageByDirection, selectPageByValue],\n );\n\n return { carousel };\n}\n"],"names":["React","useTeachingPopoverCarouselContextValues_unstable","state","store","value","selectPageByValue","selectPageByDirection","carousel","useMemo"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAM/B,OAAO,SAASC,iDACdC,KAAmC;IAEnC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,iBAAiB,EAAEC,qBAAqB,EAAE,GAAGJ;IAEnE,MAAMK,WAAWP,MAAMQ,OAAO,CAC5B,IAAO,CAAA;YACLL;YACAC;YACAE;YACAD;QACF,CAAA,GACA;QAACF;QAAOC;QAAOE;QAAuBD;KAAkB;IAG1D,OAAO;QAAEE;IAAS;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/TeachingPopoverCarouselCard.types.ts"],"sourcesContent":["import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { CarouselItemProps } from '../TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types';\n\nexport type TeachingPopoverCarouselCardSlots = {\n /**\n * The element wrapping the buttons.\n */\n root: NonNullable<Slot<CarouselItemProps>>;\n};\n\nexport type TeachingPopoverCarouselCardProps = ComponentProps<TeachingPopoverCarouselCardSlots> & {\n /* Required: Passed into CarouselItem to identify pages. */\n value: string;\n};\n\nexport type TeachingPopoverCarouselCardState = ComponentState<TeachingPopoverCarouselCardSlots> &\n Required<Pick<TeachingPopoverCarouselCardProps, 'value'>>;\n"],"names":[],"mappings":"AAeA,WAC4D"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/TeachingPopoverCarouselCard.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { CarouselItemProps } from '../TeachingPopoverCarousel/Carousel/CarouselItem/CarouselItem.types';\n\nexport type TeachingPopoverCarouselCardSlots = {\n /**\n * The element wrapping the buttons.\n */\n root: NonNullable<Slot<CarouselItemProps>>;\n};\n\nexport type TeachingPopoverCarouselCardProps = ComponentProps<TeachingPopoverCarouselCardSlots> & {\n /* Required: Passed into CarouselItem to identify pages. */\n value: string;\n};\n\nexport type TeachingPopoverCarouselCardState = ComponentState<TeachingPopoverCarouselCardSlots> &\n Required<Pick<TeachingPopoverCarouselCardProps, 'value'>>;\n"],"names":[],"mappings":"AAeA,WAC4D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/renderTeachingPopoverCarouselCard.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselCardState } from './TeachingPopoverCarouselCard.types';\nimport { TeachingPopoverCarouselCardSlots } from './TeachingPopoverCarouselCard.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselCard\n */\nexport const renderTeachingPopoverCarouselCard_unstable = (state: TeachingPopoverCarouselCardState): JSXElement => {\n assertSlots<TeachingPopoverCarouselCardSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTeachingPopoverCarouselCard_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6CAA6C,CAACC;IACzDF,YAA8CE;IAE9C,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/renderTeachingPopoverCarouselCard.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselCardState } from './TeachingPopoverCarouselCard.types';\nimport type { TeachingPopoverCarouselCardSlots } from './TeachingPopoverCarouselCard.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselCard\n */\nexport const renderTeachingPopoverCarouselCard_unstable = (state: TeachingPopoverCarouselCardState): JSXElement => {\n assertSlots<TeachingPopoverCarouselCardSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTeachingPopoverCarouselCard_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6CAA6C,CAACC;IACzDF,YAA8CE;IAE9C,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,4 @@
1
1
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
2
- import * as React from 'react';
3
2
  import { CarouselItem } from '../TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem';
4
3
  /**
5
4
  * Returns the props and state required to render the component
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselCardProps,\n TeachingPopoverCarouselCardState,\n} from './TeachingPopoverCarouselCard.types';\nimport { CarouselItem } from '../TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem';\n\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverCarouselCard properties\n * @param ref - reference to root HTMLElement of TeachingPopoverCarouselCard\n */\nexport const useTeachingPopoverCarouselCard_unstable = (\n props: TeachingPopoverCarouselCardProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselCardState => {\n const { value } = props;\n\n return {\n value,\n components: {\n root: CarouselItem,\n },\n root: slot.always(\n {\n ...getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n value,\n },\n { elementType: CarouselItem },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","React","CarouselItem","useTeachingPopoverCarouselCard_unstable","props","ref","value","components","root","always","elementType"],"mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,YAAYC,WAAW,QAAQ;AAM/B,SAASC,YAAY,QAAQ,+DAA+D;AAE5F;;;;CAIC,GACD,OAAO,MAAMC,0CAA0C,CACrDC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAElB,OAAO;QACLE;QACAC,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMR,KAAKS,MAAM,CACf;YACE,GAAGV,yBAAyB,OAAO;gBACjCM;gBACA,GAAGD,KAAK;YACV,EAAE;YACFE;QACF,GACA;YAAEI,aAAaR;QAAa;IAEhC;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselCard/useTeachingPopoverCarouselCard.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselCardProps,\n TeachingPopoverCarouselCardState,\n} from './TeachingPopoverCarouselCard.types';\nimport { CarouselItem } from '../TeachingPopoverCarousel/Carousel/CarouselItem/Carouseltem';\n\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverCarouselCard properties\n * @param ref - reference to root HTMLElement of TeachingPopoverCarouselCard\n */\nexport const useTeachingPopoverCarouselCard_unstable = (\n props: TeachingPopoverCarouselCardProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselCardState => {\n const { value } = props;\n\n return {\n value,\n components: {\n root: CarouselItem,\n },\n root: slot.always(\n {\n ...getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n value,\n },\n { elementType: CarouselItem },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","CarouselItem","useTeachingPopoverCarouselCard_unstable","props","ref","value","components","root","always","elementType"],"mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAO3E,SAASC,YAAY,QAAQ,+DAA+D;AAE5F;;;;CAIC,GACD,OAAO,MAAMC,0CAA0C,CACrDC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAElB,OAAO;QACLE;QACAC,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMP,KAAKQ,MAAM,CACf;YACE,GAAGT,yBAAyB,OAAO;gBACjCK;gBACA,GAAGD,KAAK;YACV,EAAE;YACFE;QACF,GACA;YAAEI,aAAaR;QAAa;IAEhC;AACF,EAAE"}
@@ -1 +1,3 @@
1
- import * as React from 'react';
1
+ /**
2
+ * TeachingPopoverCarouselFooter State and Context Hooks
3
+ */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TeachingPopoverCarouselFooterButtonProps } from '../TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types';\n\nexport type TeachingPopoverCarouselFooterSlots = {\n /**\n * The element wrapping carousel pages and navigation.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The previous button slot.\n */\n previous?: Slot<TeachingPopoverCarouselFooterButtonProps>;\n\n /**\n * The next button slot.\n */\n next: NonNullable<Slot<TeachingPopoverCarouselFooterButtonProps>>;\n};\n\nexport type TeachingPopoverCarouselFooterLayout = 'offset' | 'centered';\n\n// For localization or customization, users may want to modify this for their own purposes\nexport type TeachingPopoverPageCountChildRenderFunction = (currentPage: number, totalPages: number) => React.ReactNode;\n\n/**\n * TeachingPopoverCarouselFooter Props\n */\nexport type TeachingPopoverCarouselFooterProps = ComponentProps<TeachingPopoverCarouselFooterSlots> & {\n /**\n * Controls whether buttons will be centered (balanced) or right aligned\n * Defaults to 'centered'.\n */\n layout?: TeachingPopoverCarouselFooterLayout;\n\n /**\n * The text to be displayed on the initial step of carousel\n */\n initialStepText: string;\n\n /**\n * The text to be displayed on the final step of carousel\n */\n finalStepText: string;\n};\n\n/**\n * TeachingPopoverCarouselFooter State and Context Hooks\n */\nexport type TeachingPopoverCarouselFooterState = ComponentState<Required<TeachingPopoverCarouselFooterSlots>> &\n Pick<TeachingPopoverCarouselFooterProps, 'layout'>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/TeachingPopoverCarouselFooter.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TeachingPopoverCarouselFooterButtonProps } from '../TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types';\n\nexport type TeachingPopoverCarouselFooterSlots = {\n /**\n * The element wrapping carousel pages and navigation.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The previous button slot.\n */\n previous?: Slot<TeachingPopoverCarouselFooterButtonProps>;\n\n /**\n * The next button slot.\n */\n next: NonNullable<Slot<TeachingPopoverCarouselFooterButtonProps>>;\n};\n\nexport type TeachingPopoverCarouselFooterLayout = 'offset' | 'centered';\n\n// For localization or customization, users may want to modify this for their own purposes\nexport type TeachingPopoverPageCountChildRenderFunction = (currentPage: number, totalPages: number) => React.ReactNode;\n\n/**\n * TeachingPopoverCarouselFooter Props\n */\nexport type TeachingPopoverCarouselFooterProps = ComponentProps<TeachingPopoverCarouselFooterSlots> & {\n /**\n * Controls whether buttons will be centered (balanced) or right aligned\n * Defaults to 'centered'.\n */\n layout?: TeachingPopoverCarouselFooterLayout;\n\n /**\n * The text to be displayed on the initial step of carousel\n */\n initialStepText: string;\n\n /**\n * The text to be displayed on the final step of carousel\n */\n finalStepText: string;\n};\n\n/**\n * TeachingPopoverCarouselFooter State and Context Hooks\n */\nexport type TeachingPopoverCarouselFooterState = ComponentState<Required<TeachingPopoverCarouselFooterSlots>> &\n Pick<TeachingPopoverCarouselFooterProps, 'layout'>;\n"],"names":[],"mappings":"AA+CA;;CAEC,GACD,WACqD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/renderTeachingPopoverCarouselFooter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselFooterState } from './TeachingPopoverCarouselFooter.types';\nimport { TeachingPopoverCarouselFooterSlots } from './TeachingPopoverCarouselFooter.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselFooter\n */\nexport const renderTeachingPopoverCarouselFooter_unstable = (state: TeachingPopoverCarouselFooterState): JSXElement => {\n assertSlots<TeachingPopoverCarouselFooterSlots>(state);\n\n const { layout } = state;\n\n return (\n <state.root>\n {layout === 'centered' && state.previous && <state.previous />}\n {state.root.children}\n {layout === 'offset' && state.previous && <state.previous />}\n <state.next />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTeachingPopoverCarouselFooter_unstable","state","layout","root","previous","children","next"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,+CAA+C,CAACC;IAC3DF,YAAgDE;IAEhD,MAAM,EAAEC,MAAM,EAAE,GAAGD;IAEnB,qBACE,MAACA,MAAME,IAAI;;YACRD,WAAW,cAAcD,MAAMG,QAAQ,kBAAI,KAACH,MAAMG,QAAQ;YAC1DH,MAAME,IAAI,CAACE,QAAQ;YACnBH,WAAW,YAAYD,MAAMG,QAAQ,kBAAI,KAACH,MAAMG,QAAQ;0BACzD,KAACH,MAAMK,IAAI;;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/renderTeachingPopoverCarouselFooter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselFooterState } from './TeachingPopoverCarouselFooter.types';\nimport type { TeachingPopoverCarouselFooterSlots } from './TeachingPopoverCarouselFooter.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselFooter\n */\nexport const renderTeachingPopoverCarouselFooter_unstable = (state: TeachingPopoverCarouselFooterState): JSXElement => {\n assertSlots<TeachingPopoverCarouselFooterSlots>(state);\n\n const { layout } = state;\n\n return (\n <state.root>\n {layout === 'centered' && state.previous && <state.previous />}\n {state.root.children}\n {layout === 'offset' && state.previous && <state.previous />}\n <state.next />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTeachingPopoverCarouselFooter_unstable","state","layout","root","previous","children","next"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAGjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,+CAA+C,CAACC;IAC3DF,YAAgDE;IAEhD,MAAM,EAAEC,MAAM,EAAE,GAAGD;IAEnB,qBACE,MAACA,MAAME,IAAI;;YACRD,WAAW,cAAcD,MAAMG,QAAQ,kBAAI,KAACH,MAAMG,QAAQ;YAC1DH,MAAME,IAAI,CAACE,QAAQ;YACnBH,WAAW,YAAYD,MAAMG,QAAQ,kBAAI,KAACH,MAAMG,QAAQ;0BACzD,KAACH,MAAMK,IAAI;;;AAGjB,EAAE"}
@@ -1,5 +1,4 @@
1
1
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
2
- import * as React from 'react';
3
2
  import { TeachingPopoverCarouselFooterButton } from '../TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton';
4
3
  export const useTeachingPopoverCarouselFooter_unstable = (props, ref)=>{
5
4
  const { layout = 'centered', initialStepText, finalStepText } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselFooterProps,\n TeachingPopoverCarouselFooterState,\n} from './TeachingPopoverCarouselFooter.types';\nimport { TeachingPopoverCarouselFooterButton } from '../TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton';\n\nexport const useTeachingPopoverCarouselFooter_unstable = (\n props: TeachingPopoverCarouselFooterProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselFooterState => {\n const { layout = 'centered', initialStepText, finalStepText } = props;\n\n const previous = slot.optional(props.previous, {\n defaultProps: {\n navType: 'prev',\n altText: initialStepText,\n },\n renderByDefault: true,\n elementType: TeachingPopoverCarouselFooterButton,\n });\n\n const next = slot.always(props.next, {\n defaultProps: {\n navType: 'next',\n altText: finalStepText,\n },\n elementType: TeachingPopoverCarouselFooterButton,\n });\n\n return {\n layout,\n components: {\n root: 'div',\n next: TeachingPopoverCarouselFooterButton,\n previous: TeachingPopoverCarouselFooterButton,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n previous,\n next,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","React","TeachingPopoverCarouselFooterButton","useTeachingPopoverCarouselFooter_unstable","props","ref","layout","initialStepText","finalStepText","previous","optional","defaultProps","navType","altText","renderByDefault","elementType","next","always","components","root"],"mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,YAAYC,WAAW,QAAQ;AAM/B,SAASC,mCAAmC,QAAQ,6EAA6E;AAEjI,OAAO,MAAMC,4CAA4C,CACvDC,OACAC;IAEA,MAAM,EAAEC,SAAS,UAAU,EAAEC,eAAe,EAAEC,aAAa,EAAE,GAAGJ;IAEhE,MAAMK,WAAWT,KAAKU,QAAQ,CAACN,MAAMK,QAAQ,EAAE;QAC7CE,cAAc;YACZC,SAAS;YACTC,SAASN;QACX;QACAO,iBAAiB;QACjBC,aAAab;IACf;IAEA,MAAMc,OAAOhB,KAAKiB,MAAM,CAACb,MAAMY,IAAI,EAAE;QACnCL,cAAc;YACZC,SAAS;YACTC,SAASL;QACX;QACAO,aAAab;IACf;IAEA,OAAO;QACLI;QACAY,YAAY;YACVC,MAAM;YACNH,MAAMd;YACNO,UAAUP;QACZ;QACAiB,MAAMnB,KAAKiB,MAAM,CACflB,yBAAyB,OAAO;YAC9BM;YACA,GAAGD,KAAK;QACV,IACA;YAAEW,aAAa;QAAM;QAEvBN;QACAO;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooter/useTeachingPopoverCarouselFooter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselFooterProps,\n TeachingPopoverCarouselFooterState,\n} from './TeachingPopoverCarouselFooter.types';\nimport { TeachingPopoverCarouselFooterButton } from '../TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton';\n\nexport const useTeachingPopoverCarouselFooter_unstable = (\n props: TeachingPopoverCarouselFooterProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselFooterState => {\n const { layout = 'centered', initialStepText, finalStepText } = props;\n\n const previous = slot.optional(props.previous, {\n defaultProps: {\n navType: 'prev',\n altText: initialStepText,\n },\n renderByDefault: true,\n elementType: TeachingPopoverCarouselFooterButton,\n });\n\n const next = slot.always(props.next, {\n defaultProps: {\n navType: 'next',\n altText: finalStepText,\n },\n elementType: TeachingPopoverCarouselFooterButton,\n });\n\n return {\n layout,\n components: {\n root: 'div',\n next: TeachingPopoverCarouselFooterButton,\n previous: TeachingPopoverCarouselFooterButton,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n previous,\n next,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","TeachingPopoverCarouselFooterButton","useTeachingPopoverCarouselFooter_unstable","props","ref","layout","initialStepText","finalStepText","previous","optional","defaultProps","navType","altText","renderByDefault","elementType","next","always","components","root"],"mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAO3E,SAASC,mCAAmC,QAAQ,6EAA6E;AAEjI,OAAO,MAAMC,4CAA4C,CACvDC,OACAC;IAEA,MAAM,EAAEC,SAAS,UAAU,EAAEC,eAAe,EAAEC,aAAa,EAAE,GAAGJ;IAEhE,MAAMK,WAAWR,KAAKS,QAAQ,CAACN,MAAMK,QAAQ,EAAE;QAC7CE,cAAc;YACZC,SAAS;YACTC,SAASN;QACX;QACAO,iBAAiB;QACjBC,aAAab;IACf;IAEA,MAAMc,OAAOf,KAAKgB,MAAM,CAACb,MAAMY,IAAI,EAAE;QACnCL,cAAc;YACZC,SAAS;YACTC,SAASL;QACX;QACAO,aAAab;IACf;IAEA,OAAO;QACLI;QACAY,YAAY;YACVC,MAAM;YACNH,MAAMd;YACNO,UAAUP;QACZ;QACAiB,MAAMlB,KAAKgB,MAAM,CACfjB,yBAAyB,OAAO;YAC9BK;YACA,GAAGD,KAAK;QACV,IACA;YAAEW,aAAa;QAAM;QAEvBN;QACAO;IACF;AACF,EAAE"}
@@ -1 +1,3 @@
1
- import * as React from 'react';
1
+ /**
2
+ * State used in rendering TeachingPopoverCarouselFooterButton
3
+ */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { PopoverContextValue } from '@fluentui/react-popover';\nimport { ButtonProps, ButtonState } from '@fluentui/react-button';\nimport { ARIAButtonSlotProps } from '@fluentui/react-aria';\n\nexport type TeachingPopoverCarouselFooterButtonSlots = {\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n};\n\n/**\n * TeachingPopoverCarouselFooterButton Props\n */\nexport type TeachingPopoverCarouselFooterButtonProps = ComponentProps<TeachingPopoverCarouselFooterButtonSlots> &\n ButtonProps & {\n /**\n * Defines whether the button should be next or previous type - used for both styling and functionality.\n */\n navType: 'next' | 'prev';\n\n /**\n * The ReactNode provided to the button when it is on it's first (navType 'prev') or last (navType 'next') step\n */\n altText: React.ReactNode;\n };\n\n/**\n * State used in rendering TeachingPopoverCarouselFooterButton\n */\nexport type TeachingPopoverCarouselFooterButtonState = ButtonState &\n ComponentState<TeachingPopoverCarouselFooterButtonSlots> &\n Pick<TeachingPopoverCarouselFooterButtonProps, 'navType' | 'altText'> & {\n /* Rename popover appearance to prevent conflict with button appearance */\n popoverAppearance: PopoverContextValue['appearance'];\n };\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselFooterButton/TeachingPopoverCarouselFooterButton.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverContextValue } from '@fluentui/react-popover';\nimport type { ButtonProps, ButtonState } from '@fluentui/react-button';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\n\nexport type TeachingPopoverCarouselFooterButtonSlots = {\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n};\n\n/**\n * TeachingPopoverCarouselFooterButton Props\n */\nexport type TeachingPopoverCarouselFooterButtonProps = ComponentProps<TeachingPopoverCarouselFooterButtonSlots> &\n ButtonProps & {\n /**\n * Defines whether the button should be next or previous type - used for both styling and functionality.\n */\n navType: 'next' | 'prev';\n\n /**\n * The ReactNode provided to the button when it is on it's first (navType 'prev') or last (navType 'next') step\n */\n altText: React.ReactNode;\n };\n\n/**\n * State used in rendering TeachingPopoverCarouselFooterButton\n */\nexport type TeachingPopoverCarouselFooterButtonState = ButtonState &\n ComponentState<TeachingPopoverCarouselFooterButtonSlots> &\n Pick<TeachingPopoverCarouselFooterButtonProps, 'navType' | 'altText'> & {\n /* Rename popover appearance to prevent conflict with button appearance */\n popoverAppearance: PopoverContextValue['appearance'];\n };\n"],"names":[],"mappings":"AA0BA;;CAEC,GACD,WAKI"}
@@ -1 +1 @@
1
- import * as React from 'react';
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TeachingPopoverCarouselNavSlots = {\n /**\n * The element wrapping the carousel pagination. By default this is a div,\n * it may contain icons or text depending on TeachingPopoverCarouselNavStyle\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type NavButtonRenderFunction = (value: string) => React.ReactNode;\n\nexport type TeachingPopoverCarouselNavState = ComponentState<TeachingPopoverCarouselNavSlots> & {\n values: string[];\n\n renderNavButton: NavButtonRenderFunction;\n};\n\nexport type TeachingPopoverCarouselNavProps = Omit<\n ComponentProps<Partial<TeachingPopoverCarouselNavSlots>>,\n 'children'\n> & {\n children: NavButtonRenderFunction;\n};\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/TeachingPopoverCarouselNav.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TeachingPopoverCarouselNavSlots = {\n /**\n * The element wrapping the carousel pagination. By default this is a div,\n * it may contain icons or text depending on TeachingPopoverCarouselNavStyle\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type NavButtonRenderFunction = (value: string) => React.ReactNode;\n\nexport type TeachingPopoverCarouselNavState = ComponentState<TeachingPopoverCarouselNavSlots> & {\n values: string[];\n\n renderNavButton: NavButtonRenderFunction;\n};\n\nexport type TeachingPopoverCarouselNavProps = Omit<\n ComponentProps<Partial<TeachingPopoverCarouselNavSlots>>,\n 'children'\n> & {\n children: NavButtonRenderFunction;\n};\n"],"names":[],"mappings":"AAmBA,WAKE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/renderTeachingPopoverCarouselNav.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselNavState } from './TeachingPopoverCarouselNav.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TeachingPopoverCarouselNavSlots } from './TeachingPopoverCarouselNav.types';\nimport { ValueIdContextProvider } from './valueIdContext';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselNav\n */\nexport const renderTeachingPopoverCarouselNav_unstable = (state: TeachingPopoverCarouselNavState): JSXElement => {\n assertSlots<TeachingPopoverCarouselNavSlots>(state);\n\n const { values, renderNavButton } = state;\n\n return (\n <state.root>\n {values.map(value => (\n <ValueIdContextProvider value={value} key={value}>\n {renderNavButton(value)}\n </ValueIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","ValueIdContextProvider","renderTeachingPopoverCarouselNav_unstable","state","values","renderNavButton","root","map","value"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,sBAAsB,QAAQ,mBAAmB;AAE1D;;CAEC,GACD,OAAO,MAAMC,4CAA4C,CAACC;IACxDH,YAA6CG;IAE7C,MAAM,EAAEC,MAAM,EAAEC,eAAe,EAAE,GAAGF;IAEpC,qBACE,KAACA,MAAMG,IAAI;kBACRF,OAAOG,GAAG,CAACC,CAAAA,sBACV,KAACP;gBAAuBO,OAAOA;0BAC5BH,gBAAgBG;eADwBA;;AAMnD,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/renderTeachingPopoverCarouselNav.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverCarouselNavState } from './TeachingPopoverCarouselNav.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TeachingPopoverCarouselNavSlots } from './TeachingPopoverCarouselNav.types';\nimport { ValueIdContextProvider } from './valueIdContext';\n\n/**\n * Render the final JSX of TeachingPopoverCarouselNav\n */\nexport const renderTeachingPopoverCarouselNav_unstable = (state: TeachingPopoverCarouselNavState): JSXElement => {\n assertSlots<TeachingPopoverCarouselNavSlots>(state);\n\n const { values, renderNavButton } = state;\n\n return (\n <state.root>\n {values.map(value => (\n <ValueIdContextProvider value={value} key={value}>\n {renderNavButton(value)}\n </ValueIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","ValueIdContextProvider","renderTeachingPopoverCarouselNav_unstable","state","values","renderNavButton","root","map","value"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,sBAAsB,QAAQ,mBAAmB;AAE1D;;CAEC,GACD,OAAO,MAAMC,4CAA4C,CAACC;IACxDH,YAA6CG;IAE7C,MAAM,EAAEC,MAAM,EAAEC,eAAe,EAAE,GAAGF;IAEpC,qBACE,KAACA,MAAMG,IAAI;kBACRF,OAAOG,GAAG,CAACC,CAAAA,sBACV,KAACP;gBAAuBO,OAAOA;0BAC5BH,gBAAgBG;eADwBA;;AAMnD,EAAE"}
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
  import { useArrowNavigationGroup } from '@fluentui/react-tabster';
3
3
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
4
- import * as React from 'react';
5
4
  import { useCarouselValues_unstable } from '../TeachingPopoverCarousel/Carousel/useCarouselValues';
6
5
  /**
7
6
  * Returns the props and state required to render the component
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.tsx"],"sourcesContent":["'use client';\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselNavProps,\n TeachingPopoverCarouselNavState,\n} from './TeachingPopoverCarouselNav.types';\nimport { useCarouselValues_unstable } from '../TeachingPopoverCarousel/Carousel/useCarouselValues';\n\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverCarouselNav properties\n * @param ref - reference to root HTMLElement of TeachingPopoverCarouselNav\n */\nexport const useTeachingPopoverCarouselNav_unstable = (\n props: TeachingPopoverCarouselNavProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselNavState => {\n const focusableGroupAttr = useArrowNavigationGroup({\n circular: false,\n axis: 'horizontal',\n memorizeCurrent: false,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault: true,\n });\n const values = useCarouselValues_unstable(snapshot => snapshot);\n\n return {\n values,\n renderNavButton: props.children,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'tablist',\n tabIndex: 0,\n ...props,\n ...focusableGroupAttr,\n children: null,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useArrowNavigationGroup","getIntrinsicElementProps","slot","React","useCarouselValues_unstable","useTeachingPopoverCarouselNav_unstable","props","ref","focusableGroupAttr","circular","axis","memorizeCurrent","unstable_hasDefault","values","snapshot","renderNavButton","children","components","root","always","role","tabIndex","elementType"],"mappings":"AAAA;AAEA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,YAAYC,WAAW,QAAQ;AAM/B,SAASC,0BAA0B,QAAQ,wDAAwD;AAEnG;;;;CAIC,GACD,OAAO,MAAMC,yCAAyC,CACpDC,OACAC;IAEA,MAAMC,qBAAqBR,wBAAwB;QACjDS,UAAU;QACVC,MAAM;QACNC,iBAAiB;QACjB,gEAAgE;QAChEC,qBAAqB;IACvB;IACA,MAAMC,SAAST,2BAA2BU,CAAAA,WAAYA;IAEtD,OAAO;QACLD;QACAE,iBAAiBT,MAAMU,QAAQ;QAC/BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMhB,KAAKiB,MAAM,CACflB,yBAAyB,OAAO;YAC9BM;YACAa,MAAM;YACNC,UAAU;YACV,GAAGf,KAAK;YACR,GAAGE,kBAAkB;YACrBQ,UAAU;QACZ,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TeachingPopoverCarouselNav/useTeachingPopoverCarouselNav.tsx"],"sourcesContent":["'use client';\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nimport type {\n TeachingPopoverCarouselNavProps,\n TeachingPopoverCarouselNavState,\n} from './TeachingPopoverCarouselNav.types';\nimport { useCarouselValues_unstable } from '../TeachingPopoverCarousel/Carousel/useCarouselValues';\n\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverCarouselNav properties\n * @param ref - reference to root HTMLElement of TeachingPopoverCarouselNav\n */\nexport const useTeachingPopoverCarouselNav_unstable = (\n props: TeachingPopoverCarouselNavProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverCarouselNavState => {\n const focusableGroupAttr = useArrowNavigationGroup({\n circular: false,\n axis: 'horizontal',\n memorizeCurrent: false,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault: true,\n });\n const values = useCarouselValues_unstable(snapshot => snapshot);\n\n return {\n values,\n renderNavButton: props.children,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'tablist',\n tabIndex: 0,\n ...props,\n ...focusableGroupAttr,\n children: null,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useArrowNavigationGroup","getIntrinsicElementProps","slot","useCarouselValues_unstable","useTeachingPopoverCarouselNav_unstable","props","ref","focusableGroupAttr","circular","axis","memorizeCurrent","unstable_hasDefault","values","snapshot","renderNavButton","children","components","root","always","role","tabIndex","elementType"],"mappings":"AAAA;AAEA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAO3E,SAASC,0BAA0B,QAAQ,wDAAwD;AAEnG;;;;CAIC,GACD,OAAO,MAAMC,yCAAyC,CACpDC,OACAC;IAEA,MAAMC,qBAAqBP,wBAAwB;QACjDQ,UAAU;QACVC,MAAM;QACNC,iBAAiB;QACjB,gEAAgE;QAChEC,qBAAqB;IACvB;IACA,MAAMC,SAAST,2BAA2BU,CAAAA,WAAYA;IAEtD,OAAO;QACLD;QACAE,iBAAiBT,MAAMU,QAAQ;QAC/BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMf,KAAKgB,MAAM,CACfjB,yBAAyB,OAAO;YAC9BK;YACAa,MAAM;YACNC,UAAU;YACV,GAAGf,KAAK;YACR,GAAGE,kBAAkB;YACrBQ,UAAU;QACZ,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}