@fluentui/react-swatch-picker 9.5.3 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/dist/index.d.cts +428 -0
  3. package/dist/index.d.ts +75 -5
  4. package/lib/ColorSwatch.js +1 -1
  5. package/lib/ColorSwatch.js.map +1 -1
  6. package/lib/EmptySwatch.js +1 -1
  7. package/lib/EmptySwatch.js.map +1 -1
  8. package/lib/ImageSwatch.js +1 -1
  9. package/lib/ImageSwatch.js.map +1 -1
  10. package/lib/SwatchPicker.js +1 -1
  11. package/lib/SwatchPicker.js.map +1 -1
  12. package/lib/SwatchPickerRow.js +1 -1
  13. package/lib/SwatchPickerRow.js.map +1 -1
  14. package/lib/components/ColorSwatch/ColorSwatch.constants.js +4 -0
  15. package/lib/components/ColorSwatch/ColorSwatch.constants.js.map +1 -0
  16. package/lib/components/ColorSwatch/ColorSwatch.js +5 -5
  17. package/lib/components/ColorSwatch/ColorSwatch.js.map +1 -1
  18. package/lib/components/ColorSwatch/ColorSwatch.types.js +1 -3
  19. package/lib/components/ColorSwatch/ColorSwatch.types.js.map +1 -1
  20. package/lib/components/ColorSwatch/index.js +5 -4
  21. package/lib/components/ColorSwatch/index.js.map +1 -1
  22. package/lib/components/ColorSwatch/renderColorSwatch.js +1 -1
  23. package/lib/components/ColorSwatch/renderColorSwatch.js.map +1 -1
  24. package/lib/components/ColorSwatch/useColorSwatch.js +37 -20
  25. package/lib/components/ColorSwatch/useColorSwatch.js.map +1 -1
  26. package/lib/components/ColorSwatch/useColorSwatchStyles.styles.js +7 -12
  27. package/lib/components/ColorSwatch/useColorSwatchStyles.styles.js.map +1 -1
  28. package/lib/components/ColorSwatch/useColorSwatchStyles.styles.raw.js +5 -9
  29. package/lib/components/ColorSwatch/useColorSwatchStyles.styles.raw.js.map +1 -1
  30. package/lib/components/EmptySwatch/EmptySwatch.js +5 -5
  31. package/lib/components/EmptySwatch/EmptySwatch.js.map +1 -1
  32. package/lib/components/EmptySwatch/EmptySwatch.types.js +1 -3
  33. package/lib/components/EmptySwatch/EmptySwatch.types.js.map +1 -1
  34. package/lib/components/EmptySwatch/index.js +4 -4
  35. package/lib/components/EmptySwatch/index.js.map +1 -1
  36. package/lib/components/EmptySwatch/renderEmptySwatch.js +1 -1
  37. package/lib/components/EmptySwatch/renderEmptySwatch.js.map +1 -1
  38. package/lib/components/EmptySwatch/useEmptySwatch.js +26 -13
  39. package/lib/components/EmptySwatch/useEmptySwatch.js.map +1 -1
  40. package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.js +3 -5
  41. package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.js.map +1 -1
  42. package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.raw.js +3 -4
  43. package/lib/components/EmptySwatch/useEmptySwatchStyles.styles.raw.js.map +1 -1
  44. package/lib/components/ImageSwatch/ImageSwatch.js +5 -5
  45. package/lib/components/ImageSwatch/ImageSwatch.js.map +1 -1
  46. package/lib/components/ImageSwatch/ImageSwatch.types.js +1 -3
  47. package/lib/components/ImageSwatch/ImageSwatch.types.js.map +1 -1
  48. package/lib/components/ImageSwatch/index.js +4 -4
  49. package/lib/components/ImageSwatch/index.js.map +1 -1
  50. package/lib/components/ImageSwatch/renderImageSwatch.js +1 -1
  51. package/lib/components/ImageSwatch/renderImageSwatch.js.map +1 -1
  52. package/lib/components/ImageSwatch/useImageSwatch.js +25 -11
  53. package/lib/components/ImageSwatch/useImageSwatch.js.map +1 -1
  54. package/lib/components/ImageSwatch/useImageSwatchStyles.styles.js +3 -5
  55. package/lib/components/ImageSwatch/useImageSwatchStyles.styles.js.map +1 -1
  56. package/lib/components/ImageSwatch/useImageSwatchStyles.styles.raw.js +3 -4
  57. package/lib/components/ImageSwatch/useImageSwatchStyles.styles.raw.js.map +1 -1
  58. package/lib/components/SwatchPicker/SwatchPicker.js +6 -6
  59. package/lib/components/SwatchPicker/SwatchPicker.js.map +1 -1
  60. package/lib/components/SwatchPicker/SwatchPicker.types.js +1 -3
  61. package/lib/components/SwatchPicker/SwatchPicker.types.js.map +1 -1
  62. package/lib/components/SwatchPicker/index.js +4 -4
  63. package/lib/components/SwatchPicker/index.js.map +1 -1
  64. package/lib/components/SwatchPicker/renderSwatchPicker.js +2 -2
  65. package/lib/components/SwatchPicker/renderSwatchPicker.js.map +1 -1
  66. package/lib/components/SwatchPicker/useSwatchPicker.js +32 -15
  67. package/lib/components/SwatchPicker/useSwatchPicker.js.map +1 -1
  68. package/lib/components/SwatchPicker/useSwatchPickerContextValues.js +1 -1
  69. package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.js +2 -4
  70. package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.js.map +1 -1
  71. package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.raw.js +2 -3
  72. package/lib/components/SwatchPicker/useSwatchPickerStyles.styles.raw.js.map +1 -1
  73. package/lib/components/SwatchPickerRow/SwatchPickerRow.js +5 -5
  74. package/lib/components/SwatchPickerRow/SwatchPickerRow.js.map +1 -1
  75. package/lib/components/SwatchPickerRow/SwatchPickerRow.types.js +1 -3
  76. package/lib/components/SwatchPickerRow/SwatchPickerRow.types.js.map +1 -1
  77. package/lib/components/SwatchPickerRow/index.js +4 -4
  78. package/lib/components/SwatchPickerRow/index.js.map +1 -1
  79. package/lib/components/SwatchPickerRow/renderSwatchPickerRow.js +1 -1
  80. package/lib/components/SwatchPickerRow/renderSwatchPickerRow.js.map +1 -1
  81. package/lib/components/SwatchPickerRow/useSwatchPickerRow.js +21 -8
  82. package/lib/components/SwatchPickerRow/useSwatchPickerRow.js.map +1 -1
  83. package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js +1 -3
  84. package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js.map +1 -1
  85. package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.raw.js +1 -2
  86. package/lib/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.raw.js.map +1 -1
  87. package/lib/contexts/index.js +2 -2
  88. package/lib/contexts/index.js.map +1 -1
  89. package/lib/contexts/swatchPicker.js +1 -1
  90. package/lib/index.js +7 -7
  91. package/lib/index.js.map +1 -1
  92. package/lib/utils/renderUtils.js +2 -2
  93. package/lib/utils/renderUtils.js.map +1 -1
  94. package/lib-commonjs/{ColorSwatch.js → ColorSwatch.cjs} +4 -1
  95. package/lib-commonjs/ColorSwatch.cjs.map +1 -0
  96. package/lib-commonjs/{EmptySwatch.js → EmptySwatch.cjs} +4 -1
  97. package/lib-commonjs/EmptySwatch.cjs.map +1 -0
  98. package/lib-commonjs/{ImageSwatch.js → ImageSwatch.cjs} +4 -1
  99. package/lib-commonjs/ImageSwatch.cjs.map +1 -0
  100. package/lib-commonjs/{SwatchPicker.js → SwatchPicker.cjs} +4 -1
  101. package/lib-commonjs/SwatchPicker.cjs.map +1 -0
  102. package/lib-commonjs/{SwatchPickerRow.js → SwatchPickerRow.cjs} +4 -1
  103. package/lib-commonjs/SwatchPickerRow.cjs.map +1 -0
  104. package/lib-commonjs/components/ColorSwatch/{ColorSwatch.js → ColorSwatch.cjs} +3 -3
  105. package/lib-commonjs/components/ColorSwatch/{ColorSwatch.js.map → ColorSwatch.cjs.map} +1 -1
  106. package/lib-commonjs/components/ColorSwatch/ColorSwatch.constants.cjs +14 -0
  107. package/lib-commonjs/components/ColorSwatch/ColorSwatch.constants.cjs.map +1 -0
  108. package/lib-commonjs/components/ColorSwatch/{ColorSwatch.types.js → ColorSwatch.types.cjs} +1 -3
  109. package/lib-commonjs/components/ColorSwatch/{ColorSwatch.types.js.map → ColorSwatch.types.cjs.map} +1 -1
  110. package/lib-commonjs/components/ColorSwatch/{index.js → index.cjs} +9 -5
  111. package/lib-commonjs/components/ColorSwatch/index.cjs.map +1 -0
  112. package/lib-commonjs/components/ColorSwatch/renderColorSwatch.cjs.map +1 -0
  113. package/lib-commonjs/components/ColorSwatch/{useColorSwatch.js → useColorSwatch.cjs} +36 -18
  114. package/lib-commonjs/components/ColorSwatch/useColorSwatch.cjs.map +1 -0
  115. package/lib-commonjs/components/ColorSwatch/{useColorSwatchStyles.styles.js → useColorSwatchStyles.styles.cjs} +10 -17
  116. package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.cjs.map +1 -0
  117. package/lib-commonjs/components/ColorSwatch/{useColorSwatchStyles.styles.raw.js → useColorSwatchStyles.styles.raw.cjs} +3 -10
  118. package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.raw.cjs.map +1 -0
  119. package/lib-commonjs/components/EmptySwatch/{EmptySwatch.js → EmptySwatch.cjs} +3 -3
  120. package/lib-commonjs/components/EmptySwatch/{EmptySwatch.js.map → EmptySwatch.cjs.map} +1 -1
  121. package/lib-commonjs/components/EmptySwatch/{EmptySwatch.types.js → EmptySwatch.types.cjs} +1 -3
  122. package/lib-commonjs/components/EmptySwatch/{EmptySwatch.types.js.map → EmptySwatch.types.cjs.map} +1 -1
  123. package/lib-commonjs/components/EmptySwatch/{index.js → index.cjs} +7 -4
  124. package/lib-commonjs/components/EmptySwatch/index.cjs.map +1 -0
  125. package/lib-commonjs/components/EmptySwatch/renderEmptySwatch.cjs.map +1 -0
  126. package/lib-commonjs/components/EmptySwatch/useEmptySwatch.cjs +52 -0
  127. package/lib-commonjs/components/EmptySwatch/useEmptySwatch.cjs.map +1 -0
  128. package/lib-commonjs/components/EmptySwatch/{useEmptySwatchStyles.styles.js → useEmptySwatchStyles.styles.cjs} +0 -1
  129. package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.cjs.map +1 -0
  130. package/lib-commonjs/components/EmptySwatch/{useEmptySwatchStyles.styles.raw.js → useEmptySwatchStyles.styles.raw.cjs} +0 -1
  131. package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.raw.cjs.map +1 -0
  132. package/lib-commonjs/components/ImageSwatch/{ImageSwatch.js → ImageSwatch.cjs} +3 -3
  133. package/lib-commonjs/components/ImageSwatch/{ImageSwatch.js.map → ImageSwatch.cjs.map} +1 -1
  134. package/lib-commonjs/components/ImageSwatch/{ImageSwatch.types.js → ImageSwatch.types.cjs} +1 -3
  135. package/lib-commonjs/components/ImageSwatch/{ImageSwatch.types.js.map → ImageSwatch.types.cjs.map} +1 -1
  136. package/lib-commonjs/components/ImageSwatch/{index.js → index.cjs} +7 -4
  137. package/lib-commonjs/components/ImageSwatch/index.cjs.map +1 -0
  138. package/lib-commonjs/components/ImageSwatch/renderImageSwatch.cjs.map +1 -0
  139. package/lib-commonjs/components/ImageSwatch/{useImageSwatch.js → useImageSwatch.cjs} +25 -10
  140. package/lib-commonjs/components/ImageSwatch/useImageSwatch.cjs.map +1 -0
  141. package/lib-commonjs/components/ImageSwatch/{useImageSwatchStyles.styles.js → useImageSwatchStyles.styles.cjs} +0 -1
  142. package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.cjs.map +1 -0
  143. package/lib-commonjs/components/ImageSwatch/{useImageSwatchStyles.styles.raw.js → useImageSwatchStyles.styles.raw.cjs} +0 -1
  144. package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.raw.cjs.map +1 -0
  145. package/lib-commonjs/components/SwatchPicker/{SwatchPicker.js → SwatchPicker.cjs} +4 -4
  146. package/lib-commonjs/components/SwatchPicker/{SwatchPicker.js.map → SwatchPicker.cjs.map} +1 -1
  147. package/lib-commonjs/components/SwatchPicker/{SwatchPicker.types.js → SwatchPicker.types.cjs} +1 -3
  148. package/lib-commonjs/components/SwatchPicker/{SwatchPicker.types.js.map → SwatchPicker.types.cjs.map} +1 -1
  149. package/lib-commonjs/components/SwatchPicker/{index.js → index.cjs} +7 -4
  150. package/lib-commonjs/components/SwatchPicker/index.cjs.map +1 -0
  151. package/lib-commonjs/components/SwatchPicker/{renderSwatchPicker.js → renderSwatchPicker.cjs} +1 -1
  152. package/lib-commonjs/components/SwatchPicker/renderSwatchPicker.cjs.map +1 -0
  153. package/lib-commonjs/components/SwatchPicker/{useSwatchPicker.js → useSwatchPicker.cjs} +30 -12
  154. package/lib-commonjs/components/SwatchPicker/useSwatchPicker.cjs.map +1 -0
  155. package/lib-commonjs/components/SwatchPicker/{useSwatchPickerStyles.styles.js → useSwatchPickerStyles.styles.cjs} +0 -1
  156. package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.cjs.map +1 -0
  157. package/lib-commonjs/components/SwatchPicker/{useSwatchPickerStyles.styles.raw.js → useSwatchPickerStyles.styles.raw.cjs} +0 -1
  158. package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.raw.cjs.map +1 -0
  159. package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.js → SwatchPickerRow.cjs} +3 -3
  160. package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.js.map → SwatchPickerRow.cjs.map} +1 -1
  161. package/lib-commonjs/components/SwatchPickerRow/SwatchPickerRow.types.cjs +4 -0
  162. package/lib-commonjs/components/SwatchPickerRow/{SwatchPickerRow.types.js.map → SwatchPickerRow.types.cjs.map} +1 -1
  163. package/lib-commonjs/components/SwatchPickerRow/{index.js → index.cjs} +7 -4
  164. package/lib-commonjs/components/SwatchPickerRow/index.cjs.map +1 -0
  165. package/lib-commonjs/components/SwatchPickerRow/renderSwatchPickerRow.cjs.map +1 -0
  166. package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRow.js → useSwatchPickerRow.cjs} +21 -7
  167. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRow.cjs.map +1 -0
  168. package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRowStyles.styles.js → useSwatchPickerRowStyles.styles.cjs} +0 -1
  169. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.cjs.map +1 -0
  170. package/lib-commonjs/components/SwatchPickerRow/{useSwatchPickerRowStyles.styles.raw.js → useSwatchPickerRowStyles.styles.raw.cjs} +0 -1
  171. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.raw.cjs.map +1 -0
  172. package/lib-commonjs/contexts/{index.js → index.cjs} +2 -2
  173. package/lib-commonjs/contexts/{index.js.map → index.cjs.map} +1 -1
  174. package/lib-commonjs/{index.js → index.cjs} +26 -11
  175. package/lib-commonjs/index.cjs.map +1 -0
  176. package/lib-commonjs/utils/{renderUtils.js → renderUtils.cjs} +4 -4
  177. package/lib-commonjs/utils/{renderUtils.js.map → renderUtils.cjs.map} +1 -1
  178. package/package.json +20 -14
  179. package/lib-commonjs/ColorSwatch.js.map +0 -1
  180. package/lib-commonjs/EmptySwatch.js.map +0 -1
  181. package/lib-commonjs/ImageSwatch.js.map +0 -1
  182. package/lib-commonjs/SwatchPicker.js.map +0 -1
  183. package/lib-commonjs/SwatchPickerRow.js.map +0 -1
  184. package/lib-commonjs/components/ColorSwatch/index.js.map +0 -1
  185. package/lib-commonjs/components/ColorSwatch/renderColorSwatch.js.map +0 -1
  186. package/lib-commonjs/components/ColorSwatch/useColorSwatch.js.map +0 -1
  187. package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.js.map +0 -1
  188. package/lib-commonjs/components/ColorSwatch/useColorSwatchStyles.styles.raw.js.map +0 -1
  189. package/lib-commonjs/components/EmptySwatch/index.js.map +0 -1
  190. package/lib-commonjs/components/EmptySwatch/renderEmptySwatch.js.map +0 -1
  191. package/lib-commonjs/components/EmptySwatch/useEmptySwatch.js +0 -38
  192. package/lib-commonjs/components/EmptySwatch/useEmptySwatch.js.map +0 -1
  193. package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.js.map +0 -1
  194. package/lib-commonjs/components/EmptySwatch/useEmptySwatchStyles.styles.raw.js.map +0 -1
  195. package/lib-commonjs/components/ImageSwatch/index.js.map +0 -1
  196. package/lib-commonjs/components/ImageSwatch/renderImageSwatch.js.map +0 -1
  197. package/lib-commonjs/components/ImageSwatch/useImageSwatch.js.map +0 -1
  198. package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.js.map +0 -1
  199. package/lib-commonjs/components/ImageSwatch/useImageSwatchStyles.styles.raw.js.map +0 -1
  200. package/lib-commonjs/components/SwatchPicker/index.js.map +0 -1
  201. package/lib-commonjs/components/SwatchPicker/renderSwatchPicker.js.map +0 -1
  202. package/lib-commonjs/components/SwatchPicker/useSwatchPicker.js.map +0 -1
  203. package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.js.map +0 -1
  204. package/lib-commonjs/components/SwatchPicker/useSwatchPickerStyles.styles.raw.js.map +0 -1
  205. package/lib-commonjs/components/SwatchPickerRow/SwatchPickerRow.types.js +0 -6
  206. package/lib-commonjs/components/SwatchPickerRow/index.js.map +0 -1
  207. package/lib-commonjs/components/SwatchPickerRow/renderSwatchPickerRow.js.map +0 -1
  208. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRow.js.map +0 -1
  209. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.js.map +0 -1
  210. package/lib-commonjs/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.raw.js.map +0 -1
  211. package/lib-commonjs/index.js.map +0 -1
  212. /package/lib-commonjs/components/ColorSwatch/{renderColorSwatch.js → renderColorSwatch.cjs} +0 -0
  213. /package/lib-commonjs/components/EmptySwatch/{renderEmptySwatch.js → renderEmptySwatch.cjs} +0 -0
  214. /package/lib-commonjs/components/ImageSwatch/{renderImageSwatch.js → renderImageSwatch.cjs} +0 -0
  215. /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerContextValues.js → useSwatchPickerContextValues.cjs} +0 -0
  216. /package/lib-commonjs/components/SwatchPicker/{useSwatchPickerContextValues.js.map → useSwatchPickerContextValues.cjs.map} +0 -0
  217. /package/lib-commonjs/components/SwatchPickerRow/{renderSwatchPickerRow.js → renderSwatchPickerRow.cjs} +0 -0
  218. /package/lib-commonjs/contexts/{swatchPicker.js → swatchPicker.cjs} +0 -0
  219. /package/lib-commonjs/contexts/{swatchPicker.js.map → swatchPicker.cjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ImageSwatch/ImageSwatch.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerProps } from '../SwatchPicker/SwatchPicker.types';\n\nexport type ImageSwatchSlots = {\n root: Slot<'button'>;\n};\n\n/**\n * ImageSwatch Props\n */\nexport type ImageSwatchProps = ComponentProps<ImageSwatchSlots> &\n Pick<SwatchPickerProps, 'size' | 'shape'> & {\n /**\n * Swatch color\n */\n src: string;\n\n /**\n * Swatch value\n */\n value: string;\n };\n\n/**\n * State used in rendering ImageSwatch\n */\nexport type ImageSwatchState = ComponentState<ImageSwatchSlots> &\n Pick<ImageSwatchProps, 'color' | 'size' | 'shape' | 'value'> & {\n selected: boolean;\n };\n"],"names":[],"mappings":"AAuBA;;CAEC,GACD,WAGI"}
1
+ {"version":3,"sources":["../src/components/ImageSwatch/ImageSwatch.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerProps } from '../SwatchPicker/SwatchPicker.types';\n\nexport type ImageSwatchSlots = {\n root: Slot<'button'>;\n};\n\n/**\n * ImageSwatch Props\n */\nexport type ImageSwatchProps = ComponentProps<ImageSwatchSlots> &\n Pick<SwatchPickerProps, 'size' | 'shape'> & {\n /**\n * Swatch color\n */\n src: string;\n\n /**\n * Swatch value\n */\n value: string;\n };\n\nexport type ImageSwatchBaseProps = Omit<ImageSwatchProps, 'size' | 'shape'>;\n\n/**\n * State used in rendering ImageSwatch\n */\nexport type ImageSwatchState = ComponentState<ImageSwatchSlots> &\n Pick<ImageSwatchProps, 'color' | 'size' | 'shape' | 'value'> & {\n selected: boolean;\n };\n\nexport type ImageSwatchBaseState = Omit<ImageSwatchState, 'size' | 'shape'>;\n"],"names":[],"mappings":""}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  renderImageSwatch_unstable: function() {
19
19
  return _renderImageSwatch.renderImageSwatch_unstable;
20
20
  },
21
+ useImageSwatchBase_unstable: function() {
22
+ return _useImageSwatch.useImageSwatchBase_unstable;
23
+ },
21
24
  useImageSwatchStyles_unstable: function() {
22
25
  return _useImageSwatchStylesstyles.useImageSwatchStyles_unstable;
23
26
  },
@@ -25,7 +28,7 @@ _export(exports, {
25
28
  return _useImageSwatch.useImageSwatch_unstable;
26
29
  }
27
30
  });
28
- const _ImageSwatch = require("./ImageSwatch");
29
- const _renderImageSwatch = require("./renderImageSwatch");
30
- const _useImageSwatch = require("./useImageSwatch");
31
- const _useImageSwatchStylesstyles = require("./useImageSwatchStyles.styles");
31
+ const _ImageSwatch = require("./ImageSwatch.cjs");
32
+ const _renderImageSwatch = require("./renderImageSwatch.cjs");
33
+ const _useImageSwatch = require("./useImageSwatch.cjs");
34
+ const _useImageSwatchStylesstyles = require("./useImageSwatchStyles.styles.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ImageSwatch/index.ts"],"sourcesContent":["export { ImageSwatch } from './ImageSwatch';\nexport type {\n ImageSwatchBaseProps,\n ImageSwatchBaseState,\n ImageSwatchProps,\n ImageSwatchSlots,\n ImageSwatchState,\n} from './ImageSwatch.types';\nexport { renderImageSwatch_unstable } from './renderImageSwatch';\nexport { useImageSwatch_unstable, useImageSwatchBase_unstable } from './useImageSwatch';\nexport { imageSwatchClassNames, useImageSwatchStyles_unstable } from './useImageSwatchStyles.styles';\n"],"names":["ImageSwatch","renderImageSwatch_unstable","useImageSwatch_unstable","useImageSwatchBase_unstable","imageSwatchClassNames","useImageSwatchStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAUXI,iDAAqB;;;eAFrBH,6CAA0B;;;eACDE,2CAA2B;;;eAC7BE,yDAA6B;;;eADpDH,uCAAuB;;;6BATJ,mBAAgB;mCAQD,yBAAsB;gCACI,sBAAmB;4CACnB,mCAAgC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ImageSwatch/renderImageSwatch.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ImageSwatchBaseState, ImageSwatchSlots } from './ImageSwatch.types';\n\n/**\n * Render the final JSX of ImageSwatch\n */\nexport const renderImageSwatch_unstable = (state: ImageSwatchBaseState): JSXElement => {\n assertSlots<ImageSwatchSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderImageSwatch_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCAErB,4BAA4B;AAOjD,MAAMC,6BAA6B,CAACC;QACzCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
@@ -3,18 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "useImageSwatch_unstable", {
7
- enumerable: true,
8
- get: function() {
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ useImageSwatchBase_unstable: function() {
14
+ return useImageSwatchBase_unstable;
15
+ },
16
+ useImageSwatch_unstable: function() {
9
17
  return useImageSwatch_unstable;
10
18
  }
11
19
  });
12
20
  const _reactutilities = require("@fluentui/react-utilities");
13
- const _swatchPicker = require("../../contexts/swatchPicker");
14
- const useImageSwatch_unstable = (props, ref)=>{
21
+ const _swatchPicker = require("../../contexts/swatchPicker.cjs");
22
+ const useImageSwatchBase_unstable = (props, ref)=>{
15
23
  const { src, value, onClick, style, ...rest } = props;
16
- const size = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.size);
17
- const shape = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.shape);
18
24
  const isGrid = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.isGrid);
19
25
  const requestSelectionChange = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.requestSelectionChange);
20
26
  const selected = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.selectedValue === value);
@@ -46,8 +52,17 @@ const useImageSwatch_unstable = (props, ref)=>{
46
52
  elementType: 'button'
47
53
  }),
48
54
  value,
49
- selected,
50
- size,
51
- shape
55
+ selected
56
+ };
57
+ };
58
+ const useImageSwatch_unstable = (props, ref)=>{
59
+ const sizeFromContext = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.size);
60
+ const shapeFromContext = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.shape);
61
+ const { size: _size, shape: _shape, ...rest } = props;
62
+ const baseState = useImageSwatchBase_unstable(rest, ref);
63
+ return {
64
+ ...baseState,
65
+ size: sizeFromContext,
66
+ shape: shapeFromContext
52
67
  };
53
68
  };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ImageSwatch/useImageSwatch.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot, useEventCallback, mergeCallbacks } from '@fluentui/react-utilities';\nimport type {\n ImageSwatchBaseProps,\n ImageSwatchBaseState,\n ImageSwatchProps,\n ImageSwatchState,\n} from './ImageSwatch.types';\nimport { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';\n\n/**\n * Create the base state required to render unstyled ImageSwatch.\n *\n * The returned state can be modified with hooks before being passed to renderImageSwatch_unstable.\n *\n * @param props - props from this instance of ImageSwatch\n * @param ref - reference to root HTMLDivElement of ImageSwatch\n */\nexport const useImageSwatchBase_unstable = (\n props: ImageSwatchBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): ImageSwatchBaseState => {\n const { src, value, onClick, style, ...rest } = props;\n const isGrid = useSwatchPickerContextValue_unstable(ctx => ctx.isGrid);\n\n const requestSelectionChange = useSwatchPickerContextValue_unstable(ctx => ctx.requestSelectionChange);\n const selected = useSwatchPickerContextValue_unstable(ctx => ctx.selectedValue === value);\n\n const role = isGrid ? 'gridcell' : 'radio';\n const ariaSelected = isGrid\n ? {\n 'aria-selected': selected,\n }\n : { 'aria-checked': selected };\n\n const onImageSwatchClick = useEventCallback(\n mergeCallbacks(onClick, (event: React.MouseEvent<HTMLButtonElement>) =>\n requestSelectionChange(event, {\n selectedValue: value,\n selectedSwatch: src,\n }),\n ),\n );\n\n return {\n components: {\n root: 'button',\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n role,\n ...ariaSelected,\n onClick: onImageSwatchClick,\n ...rest,\n style: {\n backgroundImage: `url(${src})`,\n ...style,\n },\n }),\n { elementType: 'button' },\n ),\n value,\n selected,\n };\n};\n\n/**\n * Create the state required to render ImageSwatch.\n *\n * The returned state can be modified with hooks such as useImageSwatchStyles_unstable,\n * before being passed to renderImageSwatch_unstable.\n *\n * @param props - props from this instance of ImageSwatch\n * @param ref - reference to root HTMLDivElement of ImageSwatch\n */\nexport const useImageSwatch_unstable = (\n props: ImageSwatchProps,\n ref: React.Ref<HTMLButtonElement>,\n): ImageSwatchState => {\n const sizeFromContext = useSwatchPickerContextValue_unstable(ctx => ctx.size);\n const shapeFromContext = useSwatchPickerContextValue_unstable(ctx => ctx.shape);\n\n const { size: _size, shape: _shape, ...rest } = props;\n\n const baseState = useImageSwatchBase_unstable(rest, ref);\n\n return {\n ...baseState,\n size: sizeFromContext,\n shape: shapeFromContext,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useEventCallback","mergeCallbacks","useSwatchPickerContextValue_unstable","useImageSwatchBase_unstable","props","ref","src","value","onClick","style","rest","isGrid","ctx","requestSelectionChange","selected","selectedValue","role","ariaSelected","onImageSwatchClick","event","selectedSwatch","components","root","always","backgroundImage","elementType","useImageSwatch_unstable","sizeFromContext","size","shapeFromContext","shape","_size","_shape","baseState"],"mappings":"AAAA;;;;;;;;;;;;IAoBaK,2BAAAA;;;IA0DAuB,uBAAAA;;;;gCA3EoE,4BAA4B;8BAOxD,iCAA8B;AAU5E,oCAAoC,CACzCtB,OACAC;IAEA,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGN;IAChD,MAAMO,aAAST,kDAAAA,EAAqCU,CAAAA,MAAOA,IAAID,MAAM;IAErE,MAAME,6BAAyBX,kDAAAA,EAAqCU,CAAAA,MAAOA,IAAIC,sBAAsB;IACrG,MAAMC,eAAWZ,kDAAAA,EAAqCU,CAAAA,MAAOA,IAAIG,aAAa,KAAKR;IAEnF,MAAMS,OAAOL,SAAS,aAAa;IACnC,MAAMM,eAAeN,SACjB;QACE,iBAAiBG;IACnB,IACA;QAAE,gBAAgBA;IAAS;IAE/B,MAAMI,yBAAqBlB,gCAAAA,MACzBC,8BAAAA,EAAeO,SAAS,CAACW,QACvBN,uBAAuBM,OAAO;YAC5BJ,eAAeR;YACfa,gBAAgBd;QAClB;IAIJ,OAAO;QACLe,YAAY;YACVC,MAAM;QACR;QACAA,MAAMvB,oBAAAA,CAAKwB,MAAM,KACfzB,wCAAAA,EAAyB,UAAU;YACjCO;YACAW;YACA,GAAGC,YAAY;YACfT,SAASU;YACT,GAAGR,IAAI;YACPD,OAAO;gBACLe,iBAAiB,CAAC,IAAI,EAAElB,IAAI,CAAC,CAAC;gBAC9B,GAAGG,KAAK;YACV;QACF,IACA;YAAEgB,aAAa;QAAS;QAE1BlB;QACAO;IACF;AACF,EAAE;AAWK,gCAAgC,CACrCV,OACAC;IAEA,MAAMsB,sBAAkBzB,kDAAAA,EAAqCU,CAAAA,MAAOA,IAAIgB,IAAI;IAC5E,MAAMC,uBAAmB3B,kDAAAA,EAAqCU,CAAAA,MAAOA,IAAIkB,KAAK;IAE9E,MAAM,EAAEF,MAAMG,KAAK,EAAED,OAAOE,MAAM,EAAE,GAAGtB,MAAM,GAAGN;IAEhD,MAAM6B,YAAY9B,4BAA4BO,MAAML;IAEpD,OAAO;QACL,GAAG4B,SAAS;QACZL,MAAMD;QACNG,OAAOD;IACT;AACF,EAAE"}
@@ -192,7 +192,6 @@ const useShapeStyles = /*#__PURE__*/ (0, _react.__styles)({
192
192
  ]
193
193
  });
194
194
  const useImageSwatchStyles_unstable = (state)=>{
195
- 'use no memo';
196
195
  const styles = useStyles();
197
196
  const selectedStyles = useStylesSelected();
198
197
  const sizeStyles = useSizeStyles();
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useImageSwatchStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, makeResetStyles } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createCustomFocusIndicatorStyle } from \"@fluentui/react-tabster\";\nexport const imageSwatchClassNames = {\n root: 'fui-ImageSwatch'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n display: 'inline-flex',\n boxSizing: 'border-box',\n border: `1px solid ${tokens.colorTransparentStroke}`,\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n padding: '0',\n ':hover': {\n cursor: 'pointer',\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorBrandStroke1}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`\n },\n ':hover:active': {\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorCompoundBrandStrokePressed}, inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorStrokeFocus1}`\n },\n ':focus': {\n outline: 'none'\n },\n ':focus-visible': {\n outline: 'none'\n },\n ...createCustomFocusIndicatorStyle({\n border: 'none',\n outline: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`\n }),\n // High contrast styles\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n ':hover': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorBrandStroke2Hover}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`\n },\n ':hover:active': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke2Pressed}, inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorStrokeFocus1}`\n }\n }\n});\nconst useStylesSelected = makeStyles({\n selected: {\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke1}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`,\n ':hover': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorCompoundBrandStrokeHover}, inset 0 0 0 6px ${tokens.colorStrokeFocus1}`\n },\n ':hover:active': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorCompoundBrandStrokePressed}, inset 0 0 0 7px ${tokens.colorStrokeFocus1}`\n },\n ...createCustomFocusIndicatorStyle({\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus2}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`\n }),\n '@media (forced-colors: active)': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke2Pressed}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`\n }\n }\n});\nconst useSizeStyles = makeStyles({\n 'extra-small': {\n width: '20px',\n height: '20px'\n },\n small: {\n width: '24px',\n height: '24px'\n },\n medium: {\n width: '28px',\n height: '28px'\n },\n large: {\n width: '32px',\n height: '32px'\n }\n});\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium,\n ...createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusMedium\n })\n },\n circular: {\n borderRadius: tokens.borderRadiusCircular,\n ...createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusCircular\n })\n },\n square: {\n borderRadius: tokens.borderRadiusNone,\n ...createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusNone\n })\n }\n});\n/**\n * Apply styling to the ImageSwatch slots based on the state\n */ export const useImageSwatchStyles_unstable = (state)=>{\n const styles = useStyles();\n const selectedStyles = useStylesSelected();\n const sizeStyles = useSizeStyles();\n const shapeStyles = useShapeStyles();\n const { size = 'medium', shape = 'square' } = state;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(imageSwatchClassNames.root, styles, sizeStyles[size], shapeStyles[shape], state.selected && selectedStyles.selected, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","__resetStyles","tokens","createCustomFocusIndicatorStyle","imageSwatchClassNames","root","useStyles","r","s","useStylesSelected","selected","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","E5pizo","Bvxd0ez","vajtyg","j6ew2k","Bv9i2bc","d","p","h","m","useSizeStyles","a9b677","Bqenvij","small","medium","large","useShapeStyles","rounded","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","circular","square","useImageSwatchStyles_unstable","state","styles","selectedStyles","sizeStyles","shapeStyles","size","shape","className"],"mappings":"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"}
@@ -120,7 +120,6 @@ const useShapeStyles = (0, _react.makeStyles)({
120
120
  }
121
121
  });
122
122
  const useImageSwatchStyles_unstable = (state)=>{
123
- 'use no memo';
124
123
  const styles = useStyles();
125
124
  const selectedStyles = useStylesSelected();
126
125
  const sizeStyles = useSizeStyles();
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ImageSwatch/useImageSwatchStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, makeResetStyles } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ImageSwatchSlots, ImageSwatchState } from './ImageSwatch.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const imageSwatchClassNames: SlotClassNames<ImageSwatchSlots> = {\n root: 'fui-ImageSwatch',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n display: 'inline-flex',\n boxSizing: 'border-box',\n border: `1px solid ${tokens.colorTransparentStroke}`,\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n padding: '0',\n ':hover': {\n cursor: 'pointer',\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorBrandStroke1}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`,\n },\n ':hover:active': {\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorCompoundBrandStrokePressed}, inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorStrokeFocus1}`,\n },\n ':focus': {\n outline: 'none',\n },\n ':focus-visible': {\n outline: 'none',\n },\n ...createCustomFocusIndicatorStyle({\n border: 'none',\n outline: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`,\n }),\n\n // High contrast styles\n\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n ':hover': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorBrandStroke2Hover}, inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus1}`,\n },\n ':hover:active': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke2Pressed}, inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorStrokeFocus1}`,\n },\n },\n});\n\nconst useStylesSelected = makeStyles({\n selected: {\n border: 'none',\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke1}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`,\n ':hover': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorCompoundBrandStrokeHover}, inset 0 0 0 6px ${tokens.colorStrokeFocus1}`,\n },\n ':hover:active': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorCompoundBrandStrokePressed}, inset 0 0 0 7px ${tokens.colorStrokeFocus1}`,\n },\n ...createCustomFocusIndicatorStyle({\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorStrokeFocus2}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`,\n }),\n '@media (forced-colors: active)': {\n boxShadow: `inset 0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorBrandStroke2Pressed}, inset 0 0 0 5px ${tokens.colorStrokeFocus1}`,\n },\n },\n});\n\nconst useSizeStyles = makeStyles({\n 'extra-small': {\n width: '20px',\n height: '20px',\n },\n small: {\n width: '24px',\n height: '24px',\n },\n medium: {\n width: '28px',\n height: '28px',\n },\n large: {\n width: '32px',\n height: '32px',\n },\n});\n\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium,\n ...createCustomFocusIndicatorStyle({ borderRadius: tokens.borderRadiusMedium }),\n },\n circular: {\n borderRadius: tokens.borderRadiusCircular,\n ...createCustomFocusIndicatorStyle({ borderRadius: tokens.borderRadiusCircular }),\n },\n square: {\n borderRadius: tokens.borderRadiusNone,\n ...createCustomFocusIndicatorStyle({ borderRadius: tokens.borderRadiusNone }),\n },\n});\n\n/**\n * Apply styling to the ImageSwatch slots based on the state\n */\nexport const useImageSwatchStyles_unstable = (state: ImageSwatchState): ImageSwatchState => {\n const styles = useStyles();\n const selectedStyles = useStylesSelected();\n const sizeStyles = useSizeStyles();\n const shapeStyles = useShapeStyles();\n\n const { size = 'medium', shape = 'square' } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n imageSwatchClassNames.root,\n styles,\n sizeStyles[size],\n shapeStyles[shape],\n state.selected && selectedStyles.selected,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","makeResetStyles","tokens","createCustomFocusIndicatorStyle","imageSwatchClassNames","root","useStyles","display","boxSizing","border","colorTransparentStroke","backgroundSize","backgroundRepeat","padding","cursor","boxShadow","strokeWidthThick","colorBrandStroke1","strokeWidthThicker","colorStrokeFocus1","colorCompoundBrandStrokePressed","strokeWidthThickest","outline","colorStrokeFocus2","forcedColorAdjust","colorBrandStroke2Hover","colorBrandStroke2Pressed","useStylesSelected","selected","colorCompoundBrandStrokeHover","useSizeStyles","width","height","small","medium","large","useShapeStyles","rounded","borderRadius","borderRadiusMedium","circular","borderRadiusCircular","square","borderRadiusNone","useImageSwatchStyles_unstable","state","styles","selectedStyles","sizeStyles","shapeStyles","size","shape","className"],"mappings":"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"}
@@ -11,10 +11,10 @@ Object.defineProperty(exports, "SwatchPicker", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useSwatchPicker = require("./useSwatchPicker");
15
- const _renderSwatchPicker = require("./renderSwatchPicker");
16
- const _useSwatchPickerStylesstyles = require("./useSwatchPickerStyles.styles");
17
- const _useSwatchPickerContextValues = require("./useSwatchPickerContextValues");
14
+ const _useSwatchPicker = require("./useSwatchPicker.cjs");
15
+ const _renderSwatchPicker = require("./renderSwatchPicker.cjs");
16
+ const _useSwatchPickerStylesstyles = require("./useSwatchPickerStyles.styles.cjs");
17
+ const _useSwatchPickerContextValues = require("./useSwatchPickerContextValues.cjs");
18
18
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
19
19
  const SwatchPicker = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  const state = (0, _useSwatchPicker.useSwatchPicker_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSwatchPicker_unstable } from './useSwatchPicker';\nimport { renderSwatchPicker_unstable } from './renderSwatchPicker';\nimport { useSwatchPickerStyles_unstable } from './useSwatchPickerStyles.styles';\nimport type { SwatchPickerProps } from './SwatchPicker.types';\nimport { useSwatchPickerContextValues } from './useSwatchPickerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SwatchPicker component - TODO: add more docs\n */\nexport const SwatchPicker: ForwardRefComponent<SwatchPickerProps> = React.forwardRef((props, ref) => {\n const state = useSwatchPicker_unstable(props, ref);\n const contextValues = useSwatchPickerContextValues(state);\n\n useSwatchPickerStyles_unstable(state);\n useCustomStyleHook_unstable('useSwatchPickerStyles_unstable')(state);\n\n return renderSwatchPicker_unstable(state, contextValues);\n});\n\nSwatchPicker.displayName = 'SwatchPicker';\n"],"names":["React","useSwatchPicker_unstable","renderSwatchPicker_unstable","useSwatchPickerStyles_unstable","useSwatchPickerContextValues","useCustomStyleHook_unstable","SwatchPicker","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;iCAEU,oBAAoB;oCACjB,uBAAuB;6CACpB,iCAAiC;8CAEnC,iCAAiC;qCAClC,kCAAkC;AAKvE,MAAMM,eAAAA,WAAAA,GAAuDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,YAAQT,yCAAAA,EAAyBO,OAAOC;IAC9C,MAAME,oBAAgBP,0DAAAA,EAA6BM;QAEnDP,2DAAAA,EAA+BO;QAC/BL,gDAAAA,EAA4B,kCAAkCK;IAE9D,WAAOR,+CAAAA,EAA4BQ,OAAOC;AAC5C,GAAG;AAEHL,aAAaM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSwatchPicker_unstable } from './useSwatchPicker';\nimport { renderSwatchPicker_unstable } from './renderSwatchPicker';\nimport { useSwatchPickerStyles_unstable } from './useSwatchPickerStyles.styles';\nimport type { SwatchPickerProps } from './SwatchPicker.types';\nimport { useSwatchPickerContextValues } from './useSwatchPickerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SwatchPicker component - TODO: add more docs\n */\nexport const SwatchPicker: ForwardRefComponent<SwatchPickerProps> = React.forwardRef((props, ref) => {\n const state = useSwatchPicker_unstable(props, ref);\n const contextValues = useSwatchPickerContextValues(state);\n\n useSwatchPickerStyles_unstable(state);\n useCustomStyleHook_unstable('useSwatchPickerStyles_unstable')(state);\n\n return renderSwatchPicker_unstable(state, contextValues);\n});\n\nSwatchPicker.displayName = 'SwatchPicker';\n"],"names":["React","useSwatchPicker_unstable","renderSwatchPicker_unstable","useSwatchPickerStyles_unstable","useSwatchPickerContextValues","useCustomStyleHook_unstable","SwatchPicker","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;iCAEU,uBAAoB;oCACjB,0BAAuB;6CACpB,oCAAiC;8CAEnC,oCAAiC;qCAClC,kCAAkC;AAKvE,MAAMM,eAAAA,WAAAA,GAAuDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,YAAQT,yCAAAA,EAAyBO,OAAOC;IAC9C,MAAME,oBAAgBP,0DAAAA,EAA6BM;QAEnDP,2DAAAA,EAA+BO;QAC/BL,gDAAAA,EAA4B,kCAAkCK;IAE9D,WAAOR,+CAAAA,EAA4BQ,OAAOC;AAC5C,GAAG;AAEHL,aAAaM,WAAW,GAAG"}
@@ -1,6 +1,4 @@
1
- /**
2
- * State used in rendering SwatchPicker
3
- */ "use strict";
1
+ "use strict";
4
2
  Object.defineProperty(exports, "__esModule", {
5
3
  value: true
6
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SwatchPicker/SwatchPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot, EventHandler, EventData } from '@fluentui/react-utilities';\nimport type { SwatchPickerContextValue } from '../../contexts/swatchPicker';\n\nexport type SwatchPickerSlots = {\n root: Slot<'div'>;\n};\n\nexport type SwatchPickerOnSelectEventHandler = EventHandler<SwatchPickerOnSelectionChangeData>;\n\nexport type SwatchPickerOnSelectionChangeData = EventData<'click', React.MouseEvent<HTMLButtonElement>> & {\n selectedValue: string;\n selectedSwatch: string;\n};\n\n/**\n * SwatchPicker Props\n */\nexport type SwatchPickerProps = ComponentProps<SwatchPickerSlots> & {\n /**\n * Default selected value\n */\n defaultSelectedValue?: string;\n\n /**\n * Sets the focus behavior for the SwatchPicker.\n *\n * `arrow`\n * This behavior will cycle through all elements inside of the SwatchPicker when pressing the Arrow key.\n *\n * `tab`\n * This behavior will cycle through all elements inside of the SwatchPicker when pressing the Tab key.\n *\n * @default 'arrow'\n */\n focusMode?: 'arrow' | 'tab';\n\n /**\n * Whether SwatchPicker is row or grid\n */\n layout?: 'row' | 'grid';\n\n /**\n * Triggers a callback when the value has been changed\n */\n onSelectionChange?: EventHandler<SwatchPickerOnSelectionChangeData>;\n\n /**\n * Controlled selected value\n */\n selectedValue?: string;\n\n /**\n * Swatch size\n * @defaultvalue 'medium'\n */\n size?: 'extra-small' | 'small' | 'medium' | 'large';\n\n /**\n * Swatch shape\n * @defaultvalue 'square'\n */\n shape?: 'rounded' | 'square' | 'circular';\n\n /**\n * Spacing between swatches\n * @defaultvalue 'medium'\n */\n spacing?: 'small' | 'medium';\n};\n\n/**\n * State used in rendering SwatchPicker\n */\nexport type SwatchPickerState = ComponentState<SwatchPickerSlots> &\n SwatchPickerContextValue &\n Pick<SwatchPickerProps, 'layout' | 'size' | 'shape' | 'spacing'> & {\n isGrid: boolean;\n };\n"],"names":[],"mappings":"AAuEA;;CAEC,GACD,WAII"}
1
+ {"version":3,"sources":["../src/components/SwatchPicker/SwatchPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot, EventHandler, EventData } from '@fluentui/react-utilities';\nimport type { SwatchPickerContextValue } from '../../contexts/swatchPicker';\n\nexport type SwatchPickerSlots = {\n root: Slot<'div'>;\n};\n\nexport type SwatchPickerOnSelectEventHandler = EventHandler<SwatchPickerOnSelectionChangeData>;\n\nexport type SwatchPickerOnSelectionChangeData = EventData<'click', React.MouseEvent<HTMLButtonElement>> & {\n selectedValue: string;\n selectedSwatch: string;\n};\n\n/**\n * SwatchPicker Props\n */\nexport type SwatchPickerProps = ComponentProps<SwatchPickerSlots> & {\n /**\n * Default selected value\n */\n defaultSelectedValue?: string;\n\n /**\n * Sets the focus behavior for the SwatchPicker.\n *\n * `arrow`\n * This behavior will cycle through all elements inside of the SwatchPicker when pressing the Arrow key.\n *\n * `tab`\n * This behavior will cycle through all elements inside of the SwatchPicker when pressing the Tab key.\n *\n * @default 'arrow'\n */\n focusMode?: 'arrow' | 'tab';\n\n /**\n * Whether SwatchPicker is row or grid\n */\n layout?: 'row' | 'grid';\n\n /**\n * Triggers a callback when the value has been changed\n */\n onSelectionChange?: EventHandler<SwatchPickerOnSelectionChangeData>;\n\n /**\n * Controlled selected value\n */\n selectedValue?: string;\n\n /**\n * Swatch size\n * @defaultvalue 'medium'\n */\n size?: 'extra-small' | 'small' | 'medium' | 'large';\n\n /**\n * Swatch shape\n * @defaultvalue 'square'\n */\n shape?: 'rounded' | 'square' | 'circular';\n\n /**\n * Spacing between swatches\n * @defaultvalue 'medium'\n */\n spacing?: 'small' | 'medium';\n};\n\nexport type SwatchPickerBaseProps = Omit<SwatchPickerProps, 'size' | 'shape' | 'spacing'>;\n\n/**\n * State used in rendering SwatchPicker\n */\nexport type SwatchPickerState = ComponentState<SwatchPickerSlots> &\n SwatchPickerContextValue &\n Pick<SwatchPickerProps, 'layout' | 'size' | 'shape' | 'spacing'> & {\n isGrid: boolean;\n };\n\nexport type SwatchPickerBaseState = Omit<SwatchPickerState, 'size' | 'shape' | 'spacing'>;\n"],"names":[],"mappings":""}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  swatchPickerClassNames: function() {
19
19
  return _useSwatchPickerStylesstyles.swatchPickerClassNames;
20
20
  },
21
+ useSwatchPickerBase_unstable: function() {
22
+ return _useSwatchPicker.useSwatchPickerBase_unstable;
23
+ },
21
24
  useSwatchPickerStyles_unstable: function() {
22
25
  return _useSwatchPickerStylesstyles.useSwatchPickerStyles_unstable;
23
26
  },
@@ -25,7 +28,7 @@ _export(exports, {
25
28
  return _useSwatchPicker.useSwatchPicker_unstable;
26
29
  }
27
30
  });
28
- const _SwatchPicker = require("./SwatchPicker");
29
- const _renderSwatchPicker = require("./renderSwatchPicker");
30
- const _useSwatchPicker = require("./useSwatchPicker");
31
- const _useSwatchPickerStylesstyles = require("./useSwatchPickerStyles.styles");
31
+ const _SwatchPicker = require("./SwatchPicker.cjs");
32
+ const _renderSwatchPicker = require("./renderSwatchPicker.cjs");
33
+ const _useSwatchPicker = require("./useSwatchPicker.cjs");
34
+ const _useSwatchPickerStylesstyles = require("./useSwatchPickerStyles.styles.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPicker/index.ts"],"sourcesContent":["export { SwatchPicker } from './SwatchPicker';\nexport type {\n SwatchPickerBaseProps,\n SwatchPickerBaseState,\n SwatchPickerOnSelectEventHandler,\n SwatchPickerOnSelectionChangeData,\n SwatchPickerProps,\n SwatchPickerSlots,\n SwatchPickerState,\n} from './SwatchPicker.types';\nexport { renderSwatchPicker_unstable } from './renderSwatchPicker';\nexport { useSwatchPicker_unstable, useSwatchPickerBase_unstable } from './useSwatchPicker';\nexport { swatchPickerClassNames, useSwatchPickerStyles_unstable } from './useSwatchPickerStyles.styles';\n"],"names":["SwatchPicker","renderSwatchPicker_unstable","useSwatchPicker_unstable","useSwatchPickerBase_unstable","swatchPickerClassNames","useSwatchPickerStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAUZC,+CAA2B;;;eAE3BG,mDAAsB;;;eADID,6CAA4B;;;eAC9BE,2DAA8B;;;eADtDH,yCAAwB;;;8BAXJ,oBAAiB;oCAUF,0BAAuB;iCACI,uBAAoB;6CACpB,oCAAiC"}
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "renderSwatchPicker_unstable", {
10
10
  });
11
11
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactutilities = require("@fluentui/react-utilities");
13
- const _swatchPicker = require("../../contexts/swatchPicker");
13
+ const _swatchPicker = require("../../contexts/swatchPicker.cjs");
14
14
  const renderSwatchPicker_unstable = (state, contextValues)=>{
15
15
  (0, _reactutilities.assertSlots)(state);
16
16
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_swatchPicker.SwatchPickerProvider, {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPicker/renderSwatchPicker.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { SwatchPickerProvider } from '../../contexts/swatchPicker';\nimport type { SwatchPickerContextValues } from '../../contexts/swatchPicker';\nimport type { SwatchPickerBaseState, SwatchPickerSlots } from './SwatchPicker.types';\n\n/**\n * Render the final JSX of SwatchPicker\n */\nexport const renderSwatchPicker_unstable = (\n state: SwatchPickerBaseState,\n contextValues: SwatchPickerContextValues,\n): JSXElement => {\n assertSlots<SwatchPickerSlots>(state);\n\n return (\n <SwatchPickerProvider value={contextValues.swatchPicker}>\n <state.root>{state.root.children}</state.root>\n </SwatchPickerProvider>\n );\n};\n"],"names":["assertSlots","SwatchPickerProvider","renderSwatchPicker_unstable","state","contextValues","value","swatchPicker","root","children"],"mappings":";;;;+BAYaE;;;;;;4BAXb,gDAAiD;gCAErB,4BAA4B;8BAEnB,iCAA8B;AAO5D,oCAAoC,CACzCC,OACAC;QAEAJ,2BAAAA,EAA+BG;IAE/B,OAAA,WAAA,OACE,eAAA,EAACF,kCAAAA,EAAAA;QAAqBI,OAAOD,cAAcE,YAAY;kBACrD,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA;sBAAEJ,MAAMI,IAAI,CAACC,QAAQ;;;AAGtC,EAAE"}
@@ -3,25 +3,28 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "useSwatchPicker_unstable", {
7
- enumerable: true,
8
- get: function() {
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ useSwatchPickerBase_unstable: function() {
14
+ return useSwatchPickerBase_unstable;
15
+ },
16
+ useSwatchPicker_unstable: function() {
9
17
  return useSwatchPicker_unstable;
10
18
  }
11
19
  });
12
20
  const _reactfield = require("@fluentui/react-field");
13
21
  const _reacttabster = require("@fluentui/react-tabster");
14
22
  const _reactutilities = require("@fluentui/react-utilities");
15
- const useSwatchPicker_unstable = (props, ref)=>{
23
+ const useSwatchPickerBase_unstable = (props, ref)=>{
16
24
  // Merge props from surrounding <Field>, if any
17
25
  props = (0, _reactfield.useFieldControlProps_unstable)(props);
18
- const { focusMode = 'arrow', layout, onSelectionChange, size = 'medium', shape, spacing = 'medium', style, ...rest } = props;
26
+ const { layout, onSelectionChange, style, ...rest } = props;
19
27
  const isGrid = layout === 'grid';
20
- const focusAttributes = (0, _reacttabster.useArrowNavigationGroup)({
21
- circular: true,
22
- axis: isGrid ? 'grid-linear' : 'both',
23
- memorizeCurrent: true
24
- });
25
28
  const role = isGrid ? 'grid' : 'radiogroup';
26
29
  const [selectedValue, setSelectedValue] = (0, _reactutilities.useControllableState)({
27
30
  state: props.selectedValue,
@@ -44,14 +47,29 @@ const useSwatchPicker_unstable = (props, ref)=>{
44
47
  root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
45
48
  ref,
46
49
  role,
47
- ...focusMode === 'arrow' ? focusAttributes : {},
48
50
  ...rest
49
51
  }), {
50
52
  elementType: 'div'
51
53
  }),
52
54
  isGrid,
53
55
  requestSelectionChange,
54
- selectedValue,
56
+ selectedValue
57
+ };
58
+ };
59
+ const useSwatchPicker_unstable = (props, ref)=>{
60
+ const { focusMode = 'arrow', size = 'medium', shape, spacing = 'medium', ...rest } = props;
61
+ const baseState = useSwatchPickerBase_unstable(rest, ref);
62
+ const focusAttributes = (0, _reacttabster.useArrowNavigationGroup)({
63
+ circular: true,
64
+ axis: baseState.isGrid ? 'grid-linear' : 'both',
65
+ memorizeCurrent: true
66
+ });
67
+ return {
68
+ ...baseState,
69
+ root: {
70
+ ...baseState.root,
71
+ ...focusMode === 'arrow' ? focusAttributes : {}
72
+ },
55
73
  size,
56
74
  shape,
57
75
  spacing
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPicker/useSwatchPicker.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\n\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { getIntrinsicElementProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\n\nimport type {\n SwatchPickerBaseProps,\n SwatchPickerBaseState,\n SwatchPickerProps,\n SwatchPickerState,\n} from './SwatchPicker.types';\n\n/**\n * Create the base state required to render unstyled SwatchPicker.\n *\n * The returned state can be modified with hooks before being passed to renderSwatchPicker_unstable.\n *\n * @param props - props from this instance of SwatchPicker\n * @param ref - reference to root HTMLElement of SwatchPicker\n */\nexport const useSwatchPickerBase_unstable = (\n props: SwatchPickerBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): SwatchPickerBaseState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const { layout, onSelectionChange, style, ...rest } = props;\n\n const isGrid = layout === 'grid';\n\n const role = isGrid ? 'grid' : 'radiogroup';\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: props.selectedValue,\n defaultState: props.defaultSelectedValue,\n initialState: '',\n });\n\n const requestSelectionChange: SwatchPickerState['requestSelectionChange'] = useEventCallback((event, data) => {\n onSelectionChange?.(event, {\n type: 'click',\n event,\n selectedValue: data.selectedValue,\n selectedSwatch: data.selectedSwatch,\n });\n setSelectedValue(data.selectedValue);\n });\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role,\n ...rest,\n }),\n { elementType: 'div' },\n ),\n isGrid,\n requestSelectionChange,\n selectedValue,\n };\n};\n\n/**\n * Create the state required to render SwatchPicker.\n *\n * The returned state can be modified with hooks such as useSwatchPickerStyles_unstable,\n * before being passed to renderSwatchPicker_unstable.\n *\n * @param props - props from this instance of SwatchPicker\n * @param ref - reference to root HTMLElement of SwatchPicker\n */\nexport const useSwatchPicker_unstable = (\n props: SwatchPickerProps,\n ref: React.Ref<HTMLDivElement>,\n): SwatchPickerState => {\n const { focusMode = 'arrow', size = 'medium', shape, spacing = 'medium', ...rest } = props;\n\n const baseState = useSwatchPickerBase_unstable(rest, ref);\n\n const focusAttributes = useArrowNavigationGroup({\n circular: true,\n axis: baseState.isGrid ? 'grid-linear' : 'both',\n memorizeCurrent: true,\n });\n\n return {\n ...baseState,\n root: {\n ...baseState.root,\n ...(focusMode === 'arrow' ? focusAttributes : {}),\n },\n size,\n shape,\n spacing,\n };\n};\n"],"names":["useFieldControlProps_unstable","useArrowNavigationGroup","getIntrinsicElementProps","useControllableState","useEventCallback","slot","useSwatchPickerBase_unstable","props","ref","layout","onSelectionChange","style","rest","isGrid","role","selectedValue","setSelectedValue","state","defaultState","defaultSelectedValue","initialState","requestSelectionChange","event","data","type","selectedSwatch","components","root","always","elementType","useSwatchPicker_unstable","focusMode","size","shape","spacing","baseState","focusAttributes","circular","axis","memorizeCurrent"],"mappings":"AAAA;;;;;;;;;;;;IAuBaM,4BAAAA;;;IAwDAwB,wBAAAA;;;;4BA3EiC,wBAAwB;8BAC9B,0BAA0B;gCACqB,4BAA4B;AAiB5G,qCAAqC,CAC1CvB,OACAC;IAEA,+CAA+C;IAC/CD,YAAQP,yCAAAA,EAA8BO;IAEtC,MAAM,EAAEE,MAAM,EAAEC,iBAAiB,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGL;IAEtD,MAAMM,SAASJ,WAAW;IAE1B,MAAMK,OAAOD,SAAS,SAAS;IAE/B,MAAM,CAACE,eAAeC,iBAAiB,OAAGb,oCAAAA,EAAqB;QAC7Dc,OAAOV,MAAMQ,aAAa;QAC1BG,cAAcX,MAAMY,oBAAoB;QACxCC,cAAc;IAChB;IAEA,MAAMC,6BAAsEjB,gCAAAA,EAAiB,CAACkB,OAAOC;QACnGb,sBAAAA,QAAAA,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAoBY,OAAO;YACzBE,MAAM;YACNF;YACAP,eAAeQ,KAAKR,aAAa;YACjCU,gBAAgBF,KAAKE,cAAc;QACrC;QACAT,iBAAiBO,KAAKR,aAAa;IACrC;IAEA,OAAO;QACLW,YAAY;YACVC,MAAM;QACR;QACAA,MAAMtB,oBAAAA,CAAKuB,MAAM,KACf1B,wCAAAA,EAAyB,OAAO;YAC9BM;YACAM;YACA,GAAGF,IAAI;QACT,IACA;YAAEiB,aAAa;QAAM;QAEvBhB;QACAQ;QACAN;IACF;AACF,EAAE;AAWK,iCAAiC,CACtCR,OACAC;IAEA,MAAM,EAAEuB,YAAY,OAAO,EAAEC,OAAO,QAAQ,EAAEC,KAAK,EAAEC,UAAU,QAAQ,EAAE,GAAGtB,MAAM,GAAGL;IAErF,MAAM4B,YAAY7B,6BAA6BM,MAAMJ;IAErD,MAAM4B,sBAAkBnC,qCAAAA,EAAwB;QAC9CoC,UAAU;QACVC,MAAMH,UAAUtB,MAAM,GAAG,gBAAgB;QACzC0B,iBAAiB;IACnB;IAEA,OAAO;QACL,GAAGJ,SAAS;QACZR,MAAM;YACJ,GAAGQ,UAAUR,IAAI;YACjB,GAAII,cAAc,UAAUK,kBAAkB,CAAC,CAAC;QAClD;QACAJ;QACAC;QACAC;IACF;AACF,EAAE"}
@@ -74,7 +74,6 @@ const swatchPickerClassNames = {
74
74
  ]
75
75
  });
76
76
  const useSwatchPickerStyles_unstable = (state)=>{
77
- 'use no memo';
78
77
  const styles = useStyles();
79
78
  const layoutStyle = state.isGrid ? styles.grid : styles.row;
80
79
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSwatchPickerStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nexport const swatchPickerClassNames = {\n root: 'fui-SwatchPicker'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n padding: `${tokens.spacingHorizontalNone} ${tokens.spacingVerticalNone}`,\n display: 'flex'\n },\n row: {\n flexDirection: 'row'\n },\n grid: {\n flexDirection: 'column'\n },\n spacingSmall: {\n gap: '2px'\n },\n spacingMedium: {\n gap: '4px'\n }\n});\n/**\n * Apply styling to the SwatchPicker slots based on the state\n */ export const useSwatchPickerStyles_unstable = (state)=>{\n const styles = useStyles();\n const layoutStyle = state.isGrid ? styles.grid : styles.row;\n const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(swatchPickerClassNames.root, styles.root, layoutStyle, spacingStyle, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","tokens","swatchPickerClassNames","root","useStyles","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","mc9l5x","row","Beiy3e4","grid","spacingSmall","i8kkvl","Belr9w4","rmohyg","spacingMedium","d","p","useSwatchPickerStyles_unstable","state","styles","layoutStyle","isGrid","spacingStyle","spacing","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCG,sBAAsB;;;IAyBlBmB,8BAA8B;;;;uBA3BN,gBAAgB;AAElD,+BAA+B;IAClClB,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAE,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,GAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,IAAA,EAAA;QAAAD,OAAA,EAAA;IAAA;IAAAE,YAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,aAAA,EAAA;QAAAH,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAE,CAAA,EAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;KAAA;AAAA,CAiBrB,CAAC;AAGS,uCAAwCE,KAAK,IAAG;IACvD,MAAMC,MAAM,GAAGnB,SAAS,CAAC,CAAC;IAC1B,MAAMoB,WAAW,GAAGF,KAAK,CAACG,MAAM,GAAGF,MAAM,CAACV,IAAI,GAAGU,MAAM,CAACZ,GAAG;IAC3D,MAAMe,YAAY,GAAGJ,KAAK,CAACK,OAAO,KAAK,OAAO,GAAGJ,MAAM,CAACT,YAAY,GAAGS,MAAM,CAACL,aAAa;IAC3F,oDAAA;IACAI,KAAK,CAACnB,IAAI,CAACyB,SAAS,OAAG5B,mBAAY,EAACE,sBAAsB,CAACC,IAAI,EAAEoB,MAAM,CAACpB,IAAI,EAAEqB,WAAW,EAAEE,YAAY,EAAEJ,KAAK,CAACnB,IAAI,CAACyB,SAAS,CAAC;IAC9H,OAAON,KAAK;AAChB,CAAC"}
@@ -43,7 +43,6 @@ const swatchPickerClassNames = {
43
43
  }
44
44
  });
45
45
  const useSwatchPickerStyles_unstable = (state)=>{
46
- 'use no memo';
47
46
  const styles = useStyles();
48
47
  const layoutStyle = state.isGrid ? styles.grid : styles.row;
49
48
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPicker/useSwatchPickerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SwatchPickerSlots, SwatchPickerState } from './SwatchPicker.types';\nimport { tokens } from '@fluentui/react-theme';\nexport const swatchPickerClassNames: SlotClassNames<SwatchPickerSlots> = {\n root: 'fui-SwatchPicker',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n padding: `${tokens.spacingHorizontalNone} ${tokens.spacingVerticalNone}`,\n display: 'flex',\n },\n row: {\n flexDirection: 'row',\n },\n grid: {\n flexDirection: 'column',\n },\n spacingSmall: { gap: '2px' },\n spacingMedium: { gap: '4px' },\n});\n\n/**\n * Apply styling to the SwatchPicker slots based on the state\n */\nexport const useSwatchPickerStyles_unstable = (state: SwatchPickerState): SwatchPickerState => {\n const styles = useStyles();\n const layoutStyle = state.isGrid ? styles.grid : styles.row;\n\n const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n swatchPickerClassNames.root,\n styles.root,\n layoutStyle,\n spacingStyle,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","swatchPickerClassNames","root","useStyles","padding","spacingHorizontalNone","spacingVerticalNone","display","row","flexDirection","grid","spacingSmall","gap","spacingMedium","useSwatchPickerStyles_unstable","state","styles","layoutStyle","isGrid","spacingStyle","spacing","className"],"mappings":"AAAA;;;;;;;;;;;;IAMaG,sBAAAA;;;IAyBAa,8BAAAA;;;;uBA7B4B,iBAAiB;4BAGnC,wBAAwB;AACxC,+BAAkE;IACvEZ,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYL,iBAAAA,EAAW;IAC3BI,MAAM;QACJE,SAAS,GAAGJ,kBAAAA,CAAOK,qBAAqB,CAAC,CAAC,EAAEL,kBAAAA,CAAOM,mBAAmB,EAAE;QACxEC,SAAS;IACX;IACAC,KAAK;QACHC,eAAe;IACjB;IACAC,MAAM;QACJD,eAAe;IACjB;IACAE,cAAc;QAAEC,KAAK;IAAM;IAC3BC,eAAe;QAAED,KAAK;IAAM;AAC9B;AAKO,uCAAuC,CAACG;IAC7C,MAAMC,SAASb;IACf,MAAMc,cAAcF,MAAMG,MAAM,GAAGF,OAAON,IAAI,GAAGM,OAAOR,GAAG;IAE3D,MAAMW,eAAeJ,MAAMK,OAAO,KAAK,UAAUJ,OAAOL,YAAY,GAAGK,OAAOH,aAAa;IAC3F,oDAAoD;IACpDE,MAAMb,IAAI,CAACmB,SAAS,OAAGtB,mBAAAA,EACrBE,uBAAuBC,IAAI,EAC3Bc,OAAOd,IAAI,EACXe,aACAE,cACAJ,MAAMb,IAAI,CAACmB,SAAS;IAGtB,OAAON;AACT,EAAE"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "SwatchPickerRow", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useSwatchPickerRow = require("./useSwatchPickerRow");
15
- const _renderSwatchPickerRow = require("./renderSwatchPickerRow");
16
- const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles");
14
+ const _useSwatchPickerRow = require("./useSwatchPickerRow.cjs");
15
+ const _renderSwatchPickerRow = require("./renderSwatchPickerRow.cjs");
16
+ const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const SwatchPickerRow = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useSwatchPickerRow.useSwatchPickerRow_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSwatchPickerRow_unstable } from './useSwatchPickerRow';\nimport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nimport { useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\nimport type { SwatchPickerRowProps } from './SwatchPickerRow.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SwatchPickerRow component is used to render a row of swatches.\n */\nexport const SwatchPickerRow: ForwardRefComponent<SwatchPickerRowProps> = React.forwardRef((props, ref) => {\n const state = useSwatchPickerRow_unstable(props, ref);\n\n useSwatchPickerRowStyles_unstable(state);\n useCustomStyleHook_unstable('useSwatchPickerRowStyles_unstable')(state);\n return renderSwatchPickerRow_unstable(state);\n});\n\nSwatchPickerRow.displayName = 'SwatchPickerRow';\n"],"names":["React","useSwatchPickerRow_unstable","renderSwatchPickerRow_unstable","useSwatchPickerRowStyles_unstable","useCustomStyleHook_unstable","SwatchPickerRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;oCAEa,uBAAuB;uCACpB,0BAA0B;gDACvB,oCAAoC;qCAE1C,kCAAkC;AAKvE,MAAMK,kBAAAA,WAAAA,GAA6DL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,YAAQR,+CAAAA,EAA4BM,OAAOC;QAEjDL,iEAAAA,EAAkCM;QAClCL,gDAAAA,EAA4B,qCAAqCK;IACjE,WAAOP,qDAAAA,EAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSwatchPickerRow_unstable } from './useSwatchPickerRow';\nimport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nimport { useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\nimport type { SwatchPickerRowProps } from './SwatchPickerRow.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SwatchPickerRow component is used to render a row of swatches.\n */\nexport const SwatchPickerRow: ForwardRefComponent<SwatchPickerRowProps> = React.forwardRef((props, ref) => {\n const state = useSwatchPickerRow_unstable(props, ref);\n\n useSwatchPickerRowStyles_unstable(state);\n useCustomStyleHook_unstable('useSwatchPickerRowStyles_unstable')(state);\n return renderSwatchPickerRow_unstable(state);\n});\n\nSwatchPickerRow.displayName = 'SwatchPickerRow';\n"],"names":["React","useSwatchPickerRow_unstable","renderSwatchPickerRow_unstable","useSwatchPickerRowStyles_unstable","useCustomStyleHook_unstable","SwatchPickerRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;oCAEa,0BAAuB;uCACpB,6BAA0B;gDACvB,uCAAoC;qCAE1C,kCAAkC;AAKvE,MAAMK,kBAAAA,WAAAA,GAA6DL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,YAAQR,+CAAAA,EAA4BM,OAAOC;QAEjDL,iEAAAA,EAAkCM;QAClCL,gDAAAA,EAA4B,qCAAqCK;IACjE,WAAOP,qDAAAA,EAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerProps } from '../SwatchPicker/SwatchPicker.types';\n\nexport type SwatchPickerRowSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * SwatchPickerRow Props\n */\nexport type SwatchPickerRowProps = ComponentProps<SwatchPickerRowSlots>;\n\n/**\n * State used in rendering SwatchPickerRow\n */\nexport type SwatchPickerRowState = ComponentState<SwatchPickerRowSlots> & Pick<SwatchPickerProps, 'spacing'>;\n"],"names":[],"mappings":"AAYA;;CAEC,GACD,WAA6G"}
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerProps } from '../SwatchPicker/SwatchPicker.types';\n\nexport type SwatchPickerRowSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * SwatchPickerRow Props\n */\nexport type SwatchPickerRowProps = ComponentProps<SwatchPickerRowSlots>;\n\nexport type SwatchPickerRowBaseProps = ComponentProps<SwatchPickerRowSlots>;\n\n/**\n * State used in rendering SwatchPickerRow\n */\nexport type SwatchPickerRowState = ComponentState<SwatchPickerRowSlots> & Pick<SwatchPickerProps, 'spacing'>;\n\nexport type SwatchPickerRowBaseState = ComponentState<SwatchPickerRowSlots>;\n"],"names":[],"mappings":""}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  swatchPickerRowClassNames: function() {
19
19
  return _useSwatchPickerRowStylesstyles.swatchPickerRowClassNames;
20
20
  },
21
+ useSwatchPickerRowBase_unstable: function() {
22
+ return _useSwatchPickerRow.useSwatchPickerRowBase_unstable;
23
+ },
21
24
  useSwatchPickerRowStyles_unstable: function() {
22
25
  return _useSwatchPickerRowStylesstyles.useSwatchPickerRowStyles_unstable;
23
26
  },
@@ -25,7 +28,7 @@ _export(exports, {
25
28
  return _useSwatchPickerRow.useSwatchPickerRow_unstable;
26
29
  }
27
30
  });
28
- const _SwatchPickerRow = require("./SwatchPickerRow");
29
- const _renderSwatchPickerRow = require("./renderSwatchPickerRow");
30
- const _useSwatchPickerRow = require("./useSwatchPickerRow");
31
- const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles");
31
+ const _SwatchPickerRow = require("./SwatchPickerRow.cjs");
32
+ const _renderSwatchPickerRow = require("./renderSwatchPickerRow.cjs");
33
+ const _useSwatchPickerRow = require("./useSwatchPickerRow.cjs");
34
+ const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/index.ts"],"sourcesContent":["export { SwatchPickerRow } from './SwatchPickerRow';\nexport type {\n SwatchPickerRowBaseProps,\n SwatchPickerRowBaseState,\n SwatchPickerRowProps,\n SwatchPickerRowSlots,\n SwatchPickerRowState,\n} from './SwatchPickerRow.types';\nexport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nexport { useSwatchPickerRow_unstable, useSwatchPickerRowBase_unstable } from './useSwatchPickerRow';\nexport { swatchPickerRowClassNames, useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\n"],"names":["SwatchPickerRow","renderSwatchPickerRow_unstable","useSwatchPickerRow_unstable","useSwatchPickerRowBase_unstable","swatchPickerRowClassNames","useSwatchPickerRowStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,gCAAe;;;eAQfC,qDAA8B;;;eAE9BG,yDAAyB;;;eADID,mDAA+B;;;eACjCE,iEAAiC;;;eAD5DH,+CAA2B;;;iCATJ,uBAAoB;uCAQL,6BAA0B;oCACI,0BAAuB;gDACvB,uCAAoC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/renderSwatchPickerRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SwatchPickerRowBaseState, SwatchPickerRowSlots } from './SwatchPickerRow.types';\n\n/**\n * Render the final JSX of SwatchPickerRow\n */\nexport const renderSwatchPickerRow_unstable = (state: SwatchPickerRowBaseState): JSXElement => {\n assertSlots<SwatchPickerRowSlots>(state);\n return <state.root />;\n};\n"],"names":["assertSlots","renderSwatchPickerRow_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCAErB,4BAA4B;AAOjD,MAAMC,iCAAiC,CAACC;QAC7CF,2BAAAA,EAAkCE;IAClC,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
@@ -3,17 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "useSwatchPickerRow_unstable", {
7
- enumerable: true,
8
- get: function() {
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ useSwatchPickerRowBase_unstable: function() {
14
+ return useSwatchPickerRowBase_unstable;
15
+ },
16
+ useSwatchPickerRow_unstable: function() {
9
17
  return useSwatchPickerRow_unstable;
10
18
  }
11
19
  });
12
20
  const _reactutilities = require("@fluentui/react-utilities");
13
- const _swatchPicker = require("../../contexts/swatchPicker");
14
- const useSwatchPickerRow_unstable = (props, ref)=>{
21
+ const _swatchPicker = require("../../contexts/swatchPicker.cjs");
22
+ const useSwatchPickerRowBase_unstable = (props, ref)=>{
15
23
  const { style, ...rest } = props;
16
- const spacing = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.spacing);
17
24
  return {
18
25
  components: {
19
26
  root: 'div'
@@ -24,7 +31,14 @@ const useSwatchPickerRow_unstable = (props, ref)=>{
24
31
  ...rest
25
32
  }), {
26
33
  elementType: 'div'
27
- }),
34
+ })
35
+ };
36
+ };
37
+ const useSwatchPickerRow_unstable = (props, ref)=>{
38
+ const spacing = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.spacing);
39
+ const baseState = useSwatchPickerRowBase_unstable(props, ref);
40
+ return {
41
+ ...baseState,
28
42
  spacing
29
43
  };
30
44
  };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/useSwatchPickerRow.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type {\n SwatchPickerRowBaseProps,\n SwatchPickerRowBaseState,\n SwatchPickerRowProps,\n SwatchPickerRowState,\n} from './SwatchPickerRow.types';\nimport { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';\n\n/**\n * Create the base state required to render unstyled SwatchPickerRow.\n *\n * The returned state can be modified with hooks before being passed to renderSwatchPickerRow_unstable.\n *\n * @param props - props from this instance of SwatchPickerRow\n * @param ref - reference to root HTMLDivElement of SwatchPickerRow\n */\nexport const useSwatchPickerRowBase_unstable = (\n props: SwatchPickerRowBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): SwatchPickerRowBaseState => {\n const { style, ...rest } = props;\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'row',\n ...rest,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Create the state required to render SwatchPickerRow.\n *\n * The returned state can be modified with hooks such as useSwatchPickerRowStyles_unstable,\n * before being passed to renderSwatchPickerRow_unstable.\n *\n * @param props - props from this instance of SwatchPickerRow\n * @param ref - reference to root HTMLDivElement of SwatchPickerRow\n */\nexport const useSwatchPickerRow_unstable = (\n props: SwatchPickerRowProps,\n ref: React.Ref<HTMLDivElement>,\n): SwatchPickerRowState => {\n const spacing = useSwatchPickerContextValue_unstable(ctx => ctx.spacing);\n const baseState = useSwatchPickerRowBase_unstable(props, ref);\n\n return {\n ...baseState,\n spacing,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useSwatchPickerContextValue_unstable","useSwatchPickerRowBase_unstable","props","ref","style","rest","components","root","always","role","elementType","useSwatchPickerRow_unstable","spacing","ctx","baseState"],"mappings":"AAAA;;;;;;;;;;;;IAoBaG,+BAAAA;;;+BA8BAU;eAAAA;;;gCA/CkC,4BAA4B;8BAOtB,iCAA8B;AAU5E,wCAAwC,CAC7CT,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGH;IAE3B,OAAO;QACLI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,oBAAAA,CAAKS,MAAM,KACfV,wCAAAA,EAAyB,OAAO;YAC9BK;YACAM,MAAM;YACN,GAAGJ,IAAI;QACT,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE;AAWK,oCAAoC,CACzCR,OACAC;IAEA,MAAMS,cAAUZ,kDAAAA,EAAqCa,CAAAA,MAAOA,IAAID,OAAO;IACvE,MAAME,YAAYb,gCAAgCC,OAAOC;IAEzD,OAAO;QACL,GAAGW,SAAS;QACZF;IACF;AACF,EAAE"}
@@ -40,7 +40,6 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
40
40
  ]
41
41
  });
42
42
  const useSwatchPickerRowStyles_unstable = (state)=>{
43
- 'use no memo';
44
43
  const resetStyles = useResetStyles();
45
44
  const styles = useStyles();
46
45
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSwatchPickerRowStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses, makeStyles } from \"@griffel/react\";\nexport const swatchPickerRowClassNames = {\n root: 'fui-SwatchPickerRow'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n display: 'flex',\n flexDirection: 'row'\n});\nconst useStyles = makeStyles({\n spacingSmall: {\n columnGap: '2px'\n },\n spacingMedium: {\n columnGap: '4px'\n }\n});\n/**\n * Apply styling to the SwatchPickerRow slots based on the state\n */ export const useSwatchPickerRowStyles_unstable = (state)=>{\n const resetStyles = useResetStyles();\n const styles = useStyles();\n const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(swatchPickerRowClassNames.root, resetStyles, spacingStyle, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","__styles","swatchPickerRowClassNames","root","useResetStyles","useStyles","spacingSmall","i8kkvl","spacingMedium","d","useSwatchPickerRowStyles_unstable","state","resetStyles","styles","spacingStyle","spacing","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECG,yBAAyB;;;qCAmBY;;;;uBApBQ,gBAAgB;AACnE,kCAAkC;IACrCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,cAAc,GAAA,WAAA,OAAGL,oBAAA,EAAA,YAAA,MAAA;IAAA;CAG1B,CAAC;AACF,MAAMM,SAAS,GAAA,WAAA,OAAGJ,eAAA,EAAA;IAAAK,YAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,aAAA,EAAA;QAAAD,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAE,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAOjB,CAAC;AAGS,MAAMC,qCAAqCC,KAAK,IAAG;IAC1D,MAAMC,WAAW,GAAGR,cAAc,CAAC,CAAC;IACpC,MAAMS,MAAM,GAAGR,SAAS,CAAC,CAAC;IAC1B,MAAMS,YAAY,GAAGH,KAAK,CAACI,OAAO,KAAK,OAAO,GAAGF,MAAM,CAACP,YAAY,GAAGO,MAAM,CAACL,aAAa;IAC3F,oDAAA;IACAG,KAAK,CAACR,IAAI,CAACa,SAAS,OAAGhB,mBAAY,EAACE,yBAAyB,CAACC,IAAI,EAAES,WAAW,EAAEE,YAAY,EAAEH,KAAK,CAACR,IAAI,CAACa,SAAS,CAAC;IACpH,OAAOL,KAAK;AAChB,CAAC"}
@@ -36,7 +36,6 @@ const useStyles = (0, _react.makeStyles)({
36
36
  }
37
37
  });
38
38
  const useSwatchPickerRowStyles_unstable = (state)=>{
39
- 'use no memo';
40
39
  const resetStyles = useResetStyles();
41
40
  const styles = useStyles();
42
41
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses, makeStyles } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SwatchPickerRowSlots, SwatchPickerRowState } from './SwatchPickerRow.types';\n\nexport const swatchPickerRowClassNames: SlotClassNames<SwatchPickerRowSlots> = {\n root: 'fui-SwatchPickerRow',\n};\n\n/**\n * Styles for the root slot\n */\nconst useResetStyles = makeResetStyles({\n display: 'flex',\n flexDirection: 'row',\n});\n\nconst useStyles = makeStyles({\n spacingSmall: {\n columnGap: '2px',\n },\n spacingMedium: {\n columnGap: '4px',\n },\n});\n\n/**\n * Apply styling to the SwatchPickerRow slots based on the state\n */\nexport const useSwatchPickerRowStyles_unstable = (state: SwatchPickerRowState): SwatchPickerRowState => {\n const resetStyles = useResetStyles();\n const styles = useStyles();\n const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(swatchPickerRowClassNames.root, resetStyles, spacingStyle, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","makeStyles","swatchPickerRowClassNames","root","useResetStyles","display","flexDirection","useStyles","spacingSmall","columnGap","spacingMedium","useSwatchPickerRowStyles_unstable","state","resetStyles","styles","spacingStyle","spacing","className"],"mappings":"AAAA;;;;;;;;;;;;IAMaG,yBAAAA;;;qCAwBAS;;;;uBA5B6C,iBAAiB;AAIpE,kCAAwE;IAC7ER,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,qBAAiBL,sBAAAA,EAAgB;IACrCM,SAAS;IACTC,eAAe;AACjB;AAEA,MAAMC,gBAAYN,iBAAAA,EAAW;IAC3BO,cAAc;QACZC,WAAW;IACb;IACAC,eAAe;QACbD,WAAW;IACb;AACF;AAKO,MAAME,oCAAoC,CAACC;IAChD,MAAMC,cAAcT;IACpB,MAAMU,SAASP;IACf,MAAMQ,eAAeH,MAAMI,OAAO,KAAK,UAAUF,OAAON,YAAY,GAAGM,OAAOJ,aAAa;IAE3F,oDAAoD;IACpDE,MAAMT,IAAI,CAACc,SAAS,OAAGjB,mBAAAA,EAAaE,0BAA0BC,IAAI,EAAEU,aAAaE,cAAcH,MAAMT,IAAI,CAACc,SAAS;IAEnH,OAAOL;AACT,EAAE"}
@@ -22,5 +22,5 @@ _export(exports, {
22
22
  return _useSwatchPickerContextValues.useSwatchPickerContextValues;
23
23
  }
24
24
  });
25
- const _swatchPicker = require("./swatchPicker");
26
- const _useSwatchPickerContextValues = require("../components/SwatchPicker/useSwatchPickerContextValues");
25
+ const _swatchPicker = require("./swatchPicker.cjs");
26
+ const _useSwatchPickerContextValues = require("../components/SwatchPicker/useSwatchPickerContextValues.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export type { SwatchPickerContextValue, SwatchPickerContextValues } from './swatchPicker';\nexport {\n SwatchPickerProvider,\n swatchPickerContextDefaultValue,\n useSwatchPickerContextValue_unstable,\n} from './swatchPicker';\nexport { useSwatchPickerContextValues } from '../components/SwatchPicker/useSwatchPickerContextValues';\n"],"names":["SwatchPickerProvider","swatchPickerContextDefaultValue","useSwatchPickerContextValue_unstable","useSwatchPickerContextValues"],"mappings":";;;;;;;;;;;;eAEEA,kCAAoB;;;eACpBC,6CAA+B;;;eAC/BC,kDAAoC;;;eAE7BC,0DAA4B;;;8BAD9B,iBAAiB;8CACqB,0DAA0D"}
1
+ {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export type { SwatchPickerContextValue, SwatchPickerContextValues } from './swatchPicker';\nexport {\n SwatchPickerProvider,\n swatchPickerContextDefaultValue,\n useSwatchPickerContextValue_unstable,\n} from './swatchPicker';\nexport { useSwatchPickerContextValues } from '../components/SwatchPicker/useSwatchPickerContextValues';\n"],"names":["SwatchPickerProvider","swatchPickerContextDefaultValue","useSwatchPickerContextValue_unstable","useSwatchPickerContextValues"],"mappings":";;;;;;;;;;;;eAEEA,kCAAoB;;;eACpBC,6CAA+B;;;eAC/BC,kDAAoC;;;eAE7BC,0DAA4B;;;8BAD9B,oBAAiB;8CACqB,6DAA0D"}