@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,25 +1,19 @@
1
1
  'use client';
2
- import { useFieldControlProps_unstable } from '@fluentui/react-field';
3
- import { useArrowNavigationGroup } from '@fluentui/react-tabster';
4
- import { getIntrinsicElementProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';
2
+ import { useFieldControlProps_unstable } from "@fluentui/react-field";
3
+ import { useArrowNavigationGroup } from "@fluentui/react-tabster";
4
+ import { getIntrinsicElementProps, useControllableState, useEventCallback, slot } from "@fluentui/react-utilities";
5
5
  /**
6
- * Create the state required to render SwatchPicker.
6
+ * Create the base state required to render unstyled SwatchPicker.
7
7
  *
8
- * The returned state can be modified with hooks such as useSwatchPickerStyles_unstable,
9
- * before being passed to renderSwatchPicker_unstable.
8
+ * The returned state can be modified with hooks before being passed to renderSwatchPicker_unstable.
10
9
  *
11
10
  * @param props - props from this instance of SwatchPicker
12
11
  * @param ref - reference to root HTMLElement of SwatchPicker
13
- */ export const useSwatchPicker_unstable = (props, ref)=>{
12
+ */ export const useSwatchPickerBase_unstable = (props, ref)=>{
14
13
  // Merge props from surrounding <Field>, if any
15
14
  props = useFieldControlProps_unstable(props);
16
- const { focusMode = 'arrow', layout, onSelectionChange, size = 'medium', shape, spacing = 'medium', style, ...rest } = props;
15
+ const { layout, onSelectionChange, style, ...rest } = props;
17
16
  const isGrid = layout === 'grid';
18
- const focusAttributes = useArrowNavigationGroup({
19
- circular: true,
20
- axis: isGrid ? 'grid-linear' : 'both',
21
- memorizeCurrent: true
22
- });
23
17
  const role = isGrid ? 'grid' : 'radiogroup';
24
18
  const [selectedValue, setSelectedValue] = useControllableState({
25
19
  state: props.selectedValue,
@@ -42,14 +36,37 @@ import { getIntrinsicElementProps, useControllableState, useEventCallback, slot
42
36
  root: slot.always(getIntrinsicElementProps('div', {
43
37
  ref,
44
38
  role,
45
- ...focusMode === 'arrow' ? focusAttributes : {},
46
39
  ...rest
47
40
  }), {
48
41
  elementType: 'div'
49
42
  }),
50
43
  isGrid,
51
44
  requestSelectionChange,
52
- selectedValue,
45
+ selectedValue
46
+ };
47
+ };
48
+ /**
49
+ * Create the state required to render SwatchPicker.
50
+ *
51
+ * The returned state can be modified with hooks such as useSwatchPickerStyles_unstable,
52
+ * before being passed to renderSwatchPicker_unstable.
53
+ *
54
+ * @param props - props from this instance of SwatchPicker
55
+ * @param ref - reference to root HTMLElement of SwatchPicker
56
+ */ export const useSwatchPicker_unstable = (props, ref)=>{
57
+ const { focusMode = 'arrow', size = 'medium', shape, spacing = 'medium', ...rest } = props;
58
+ const baseState = useSwatchPickerBase_unstable(rest, ref);
59
+ const focusAttributes = useArrowNavigationGroup({
60
+ circular: true,
61
+ axis: baseState.isGrid ? 'grid-linear' : 'both',
62
+ memorizeCurrent: true
63
+ });
64
+ return {
65
+ ...baseState,
66
+ root: {
67
+ ...baseState.root,
68
+ ...focusMode === 'arrow' ? focusAttributes : {}
69
+ },
53
70
  size,
54
71
  shape,
55
72
  spacing
@@ -1 +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 { SwatchPickerProps, SwatchPickerState } from './SwatchPicker.types';\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 // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const {\n focusMode = 'arrow',\n layout,\n onSelectionChange,\n size = 'medium',\n shape,\n spacing = 'medium',\n style,\n ...rest\n } = props;\n\n const isGrid = layout === 'grid';\n const focusAttributes = useArrowNavigationGroup({\n circular: true,\n axis: isGrid ? 'grid-linear' : 'both',\n memorizeCurrent: true,\n });\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 ...(focusMode === 'arrow' ? focusAttributes : {}),\n ...rest,\n }),\n { elementType: 'div' },\n ),\n isGrid,\n requestSelectionChange,\n selectedValue,\n size,\n shape,\n spacing,\n };\n};\n"],"names":["useFieldControlProps_unstable","useArrowNavigationGroup","getIntrinsicElementProps","useControllableState","useEventCallback","slot","useSwatchPicker_unstable","props","ref","focusMode","layout","onSelectionChange","size","shape","spacing","style","rest","isGrid","focusAttributes","circular","axis","memorizeCurrent","role","selectedValue","setSelectedValue","state","defaultState","defaultSelectedValue","initialState","requestSelectionChange","event","data","type","selectedSwatch","components","root","always","elementType"],"mappings":"AAAA;AAIA,SAASA,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,wBAAwB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAInH;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,+CAA+C;IAC/CD,QAAQP,8BAA8BO;IAEtC,MAAM,EACJE,YAAY,OAAO,EACnBC,MAAM,EACNC,iBAAiB,EACjBC,OAAO,QAAQ,EACfC,KAAK,EACLC,UAAU,QAAQ,EAClBC,KAAK,EACL,GAAGC,MACJ,GAAGT;IAEJ,MAAMU,SAASP,WAAW;IAC1B,MAAMQ,kBAAkBjB,wBAAwB;QAC9CkB,UAAU;QACVC,MAAMH,SAAS,gBAAgB;QAC/BI,iBAAiB;IACnB;IAEA,MAAMC,OAAOL,SAAS,SAAS;IAE/B,MAAM,CAACM,eAAeC,iBAAiB,GAAGrB,qBAAqB;QAC7DsB,OAAOlB,MAAMgB,aAAa;QAC1BG,cAAcnB,MAAMoB,oBAAoB;QACxCC,cAAc;IAChB;IAEA,MAAMC,yBAAsEzB,iBAAiB,CAAC0B,OAAOC;QACnGpB,8BAAAA,wCAAAA,kBAAoBmB,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,MAAM9B,KAAK+B,MAAM,CACflC,yBAAyB,OAAO;YAC9BM;YACAc;YACA,GAAIb,cAAc,UAAUS,kBAAkB,CAAC,CAAC;YAChD,GAAGF,IAAI;QACT,IACA;YAAEqB,aAAa;QAAM;QAEvBpB;QACAY;QACAN;QACAX;QACAC;QACAC;IACF;AACF,EAAE"}
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;AAIA,SAASA,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,wBAAwB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AASnH;;;;;;;CAOC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,+CAA+C;IAC/CD,QAAQP,8BAA8BO;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,GAAGb,qBAAqB;QAC7Dc,OAAOV,MAAMQ,aAAa;QAC1BG,cAAcX,MAAMY,oBAAoB;QACxCC,cAAc;IAChB;IAEA,MAAMC,yBAAsEjB,iBAAiB,CAACkB,OAAOC;QACnGb,8BAAAA,wCAAAA,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,KAAKuB,MAAM,CACf1B,yBAAyB,OAAO;YAC9BM;YACAM;YACA,GAAGF,IAAI;QACT,IACA;YAAEiB,aAAa;QAAM;QAEvBhB;QACAQ;QACAN;IACF;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMe,2BAA2B,CACtCvB,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,kBAAkBnC,wBAAwB;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"}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import * as React from 'react';
2
+ import * as React from "react";
3
3
  export const useSwatchPickerContextValues = (state)=>{
4
4
  const { isGrid, size, shape, spacing, requestSelectionChange, selectedValue } = state;
5
5
  const swatchPicker = React.useMemo(()=>({
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { __styles, mergeClasses } from '@griffel/react';
4
- import { tokens } from '@fluentui/react-theme';
3
+ import { __styles, mergeClasses } from "@griffel/react";
4
+ import { tokens } from "@fluentui/react-theme";
5
5
  export const swatchPickerClassNames = {
6
6
  root: 'fui-SwatchPicker'
7
7
  };
@@ -46,8 +46,6 @@ const useStyles = /*#__PURE__*/__styles({
46
46
  * Apply styling to the SwatchPicker slots based on the state
47
47
  */
48
48
  export const useSwatchPickerStyles_unstable = state => {
49
- 'use no memo';
50
-
51
49
  const styles = useStyles();
52
50
  const layoutStyle = state.isGrid ? styles.grid : styles.row;
53
51
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -1 +1 @@
1
- {"version":3,"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"],"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 'use no memo';\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"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGL,QAAA;EAAAI,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,GAAA;IAAAC,OAAA;EAAA;EAAAC,IAAA;IAAAD,OAAA;EAAA;EAAAE,YAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,aAAA;IAAAH,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAiBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,aAAa;;EACb,MAAMC,MAAM,GAAGnB,SAAS,CAAC,CAAC;EAC1B,MAAMoB,WAAW,GAAGF,KAAK,CAACG,MAAM,GAAGF,MAAM,CAACV,IAAI,GAAGU,MAAM,CAACZ,GAAG;EAC3D,MAAMe,YAAY,GAAGJ,KAAK,CAACK,OAAO,KAAK,OAAO,GAAGJ,MAAM,CAACT,YAAY,GAAGS,MAAM,CAACL,aAAa;EAC3F;EACAI,KAAK,CAACnB,IAAI,CAACyB,SAAS,GAAG5B,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEoB,MAAM,CAACpB,IAAI,EAAEqB,WAAW,EAAEE,YAAY,EAAEJ,KAAK,CAACnB,IAAI,CAACyB,SAAS,CAAC;EAC9H,OAAON,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"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"],"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"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGL,QAAA;EAAAI,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,GAAA;IAAAC,OAAA;EAAA;EAAAC,IAAA;IAAAD,OAAA;EAAA;EAAAE,YAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,aAAA;IAAAH,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAE,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAiBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,MAAMC,MAAM,GAAGnB,SAAS,CAAC,CAAC;EAC1B,MAAMoB,WAAW,GAAGF,KAAK,CAACG,MAAM,GAAGF,MAAM,CAACV,IAAI,GAAGU,MAAM,CAACZ,GAAG;EAC3D,MAAMe,YAAY,GAAGJ,KAAK,CAACK,OAAO,KAAK,OAAO,GAAGJ,MAAM,CAACT,YAAY,GAAGS,MAAM,CAACL,aAAa;EAC3F;EACAI,KAAK,CAACnB,IAAI,CAACyB,SAAS,GAAG5B,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEoB,MAAM,CAACpB,IAAI,EAAEqB,WAAW,EAAEE,YAAY,EAAEJ,KAAK,CAACnB,IAAI,CAACyB,SAAS,CAAC;EAC9H,OAAON,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { makeStyles, mergeClasses } from '@griffel/react';
3
- import { tokens } from '@fluentui/react-theme';
2
+ import { makeStyles, mergeClasses } from "@griffel/react";
3
+ import { tokens } from "@fluentui/react-theme";
4
4
  export const swatchPickerClassNames = {
5
5
  root: 'fui-SwatchPicker'
6
6
  };
@@ -27,7 +27,6 @@ export const swatchPickerClassNames = {
27
27
  /**
28
28
  * Apply styling to the SwatchPicker slots based on the state
29
29
  */ export const useSwatchPickerStyles_unstable = (state)=>{
30
- 'use no memo';
31
30
  const styles = useStyles();
32
31
  const layoutStyle = state.isGrid ? styles.grid : styles.row;
33
32
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -1 +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 'use no memo';\n\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;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYL,WAAW;IAC3BI,MAAM;QACJE,SAAS,GAAGJ,OAAOK,qBAAqB,CAAC,CAAC,EAAEL,OAAOM,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;AAEA;;CAEC,GACD,OAAO,MAAME,iCAAiC,CAACC;IAC7C;IAEA,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,GAAGtB,aACrBE,uBAAuBC,IAAI,EAC3Bc,OAAOd,IAAI,EACXe,aACAE,cACAJ,MAAMb,IAAI,CAACmB,SAAS;IAGtB,OAAON;AACT,EAAE"}
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;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYL,WAAW;IAC3BI,MAAM;QACJE,SAAS,GAAGJ,OAAOK,qBAAqB,CAAC,CAAC,EAAEL,OAAOM,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;AAEA;;CAEC,GACD,OAAO,MAAME,iCAAiC,CAACC;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,GAAGtB,aACrBE,uBAAuBC,IAAI,EAC3Bc,OAAOd,IAAI,EACXe,aACAE,cACAJ,MAAMb,IAAI,CAACmB,SAAS;IAGtB,OAAON;AACT,EAAE"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useSwatchPickerRow_unstable } from './useSwatchPickerRow';
4
- import { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';
5
- import { useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';
6
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
+ import * as React from "react";
3
+ import { useSwatchPickerRow_unstable } from "./useSwatchPickerRow.js";
4
+ import { renderSwatchPickerRow_unstable } from "./renderSwatchPickerRow.js";
5
+ import { useSwatchPickerRowStyles_unstable } from "./useSwatchPickerRowStyles.styles.js";
6
+ import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
7
7
  /**
8
8
  * SwatchPickerRow component is used to render a row of swatches.
9
9
  */ export const SwatchPickerRow = /*#__PURE__*/ React.forwardRef((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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,iCAAiC,QAAQ,uCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
@@ -1,3 +1 @@
1
- /**
2
- * State used in rendering SwatchPickerRow
3
- */ export { };
1
+ export { };
@@ -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":"AAmBA,WAA4E"}
@@ -1,4 +1,4 @@
1
- export { SwatchPickerRow } from './SwatchPickerRow';
2
- export { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';
3
- export { useSwatchPickerRow_unstable } from './useSwatchPickerRow';
4
- export { swatchPickerRowClassNames, useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';
1
+ export { SwatchPickerRow } from "./SwatchPickerRow.js";
2
+ export { renderSwatchPickerRow_unstable } from "./renderSwatchPickerRow.js";
3
+ export { useSwatchPickerRow_unstable, useSwatchPickerRowBase_unstable } from "./useSwatchPickerRow.js";
4
+ export { swatchPickerRowClassNames, useSwatchPickerRowStyles_unstable } from "./useSwatchPickerRowStyles.styles.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SwatchPickerRow/index.ts"],"sourcesContent":["export { SwatchPickerRow } from './SwatchPickerRow';\nexport type { SwatchPickerRowProps, SwatchPickerRowSlots, SwatchPickerRowState } from './SwatchPickerRow.types';\nexport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nexport { useSwatchPickerRow_unstable } from './useSwatchPickerRow';\nexport { swatchPickerRowClassNames, useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\n"],"names":["SwatchPickerRow","renderSwatchPickerRow_unstable","useSwatchPickerRow_unstable","swatchPickerRowClassNames","useSwatchPickerRowStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,oCAAoC"}
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":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AAQpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,uCAAoC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-utilities';
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of SwatchPickerRow
5
5
  */ export const renderSwatchPickerRow_unstable = (state)=>{
@@ -1 +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 { SwatchPickerRowState, SwatchPickerRowSlots } from './SwatchPickerRow.types';\n\n/**\n * Render the final JSX of SwatchPickerRow\n */\nexport const renderSwatchPickerRow_unstable = (state: SwatchPickerRowState): JSXElement => {\n assertSlots<SwatchPickerRowSlots>(state);\n return <state.root />;\n};\n"],"names":["assertSlots","renderSwatchPickerRow_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAClC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
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":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAClC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,17 +1,15 @@
1
1
  'use client';
2
- import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
3
- import { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';
2
+ import { getIntrinsicElementProps, slot } from "@fluentui/react-utilities";
3
+ import { useSwatchPickerContextValue_unstable } from "../../contexts/swatchPicker.js";
4
4
  /**
5
- * Create the state required to render SwatchPickerRow.
5
+ * Create the base state required to render unstyled SwatchPickerRow.
6
6
  *
7
- * The returned state can be modified with hooks such as useSwatchPickerRowStyles_unstable,
8
- * before being passed to renderSwatchPickerRow_unstable.
7
+ * The returned state can be modified with hooks before being passed to renderSwatchPickerRow_unstable.
9
8
  *
10
9
  * @param props - props from this instance of SwatchPickerRow
11
10
  * @param ref - reference to root HTMLDivElement of SwatchPickerRow
12
- */ export const useSwatchPickerRow_unstable = (props, ref)=>{
11
+ */ export const useSwatchPickerRowBase_unstable = (props, ref)=>{
13
12
  const { style, ...rest } = props;
14
- const spacing = useSwatchPickerContextValue_unstable((ctx)=>ctx.spacing);
15
13
  return {
16
14
  components: {
17
15
  root: 'div'
@@ -22,7 +20,22 @@ import { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicke
22
20
  ...rest
23
21
  }), {
24
22
  elementType: 'div'
25
- }),
23
+ })
24
+ };
25
+ };
26
+ /**
27
+ * Create the state required to render SwatchPickerRow.
28
+ *
29
+ * The returned state can be modified with hooks such as useSwatchPickerRowStyles_unstable,
30
+ * before being passed to renderSwatchPickerRow_unstable.
31
+ *
32
+ * @param props - props from this instance of SwatchPickerRow
33
+ * @param ref - reference to root HTMLDivElement of SwatchPickerRow
34
+ */ export const useSwatchPickerRow_unstable = (props, ref)=>{
35
+ const spacing = useSwatchPickerContextValue_unstable((ctx)=>ctx.spacing);
36
+ const baseState = useSwatchPickerRowBase_unstable(props, ref);
37
+ return {
38
+ ...baseState,
26
39
  spacing
27
40
  };
28
41
  };
@@ -1 +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 { SwatchPickerRowProps, SwatchPickerRowState } from './SwatchPickerRow.types';\nimport { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';\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 { style, ...rest } = props;\n const spacing = useSwatchPickerContextValue_unstable(ctx => ctx.spacing);\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 spacing,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useSwatchPickerContextValue_unstable","useSwatchPickerRow_unstable","props","ref","style","rest","spacing","ctx","components","root","always","role","elementType"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,oCAAoC,QAAQ,8BAA8B;AAEnF;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGH;IAC3B,MAAMI,UAAUN,qCAAqCO,CAAAA,MAAOA,IAAID,OAAO;IAEvE,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMV,KAAKW,MAAM,CACfZ,yBAAyB,OAAO;YAC9BK;YACAQ,MAAM;YACN,GAAGN,IAAI;QACT,IACA;YAAEO,aAAa;QAAM;QAEvBN;IACF;AACF,EAAE"}
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;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAO3E,SAASC,oCAAoC,QAAQ,iCAA8B;AAEnF;;;;;;;CAOC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGH;IAE3B,OAAO;QACLI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfV,yBAAyB,OAAO;YAC9BK;YACAM,MAAM;YACN,GAAGJ,IAAI;QACT,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCT,OACAC;IAEA,MAAMS,UAAUZ,qCAAqCa,CAAAA,MAAOA,IAAID,OAAO;IACvE,MAAME,YAAYb,gCAAgCC,OAAOC;IAEzD,OAAO;QACL,GAAGW,SAAS;QACZF;IACF;AACF,EAAE"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { __resetStyles, mergeClasses, __styles } from '@griffel/react';
3
+ import { __resetStyles, mergeClasses, __styles } from "@griffel/react";
4
4
  export const swatchPickerRowClassNames = {
5
5
  root: 'fui-SwatchPickerRow'
6
6
  };
@@ -22,8 +22,6 @@ const useStyles = /*#__PURE__*/__styles({
22
22
  * Apply styling to the SwatchPickerRow slots based on the state
23
23
  */
24
24
  export const useSwatchPickerRowStyles_unstable = state => {
25
- 'use no memo';
26
-
27
25
  const resetStyles = useResetStyles();
28
26
  const styles = useStyles();
29
27
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -1 +1 @@
1
- {"version":3,"names":["__resetStyles","mergeClasses","__styles","swatchPickerRowClassNames","root","useResetStyles","useStyles","spacingSmall","i8kkvl","spacingMedium","d","useSwatchPickerRowStyles_unstable","state","resetStyles","styles","spacingStyle","spacing","className"],"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 'use no memo';\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"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAA0BC,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AAC1E,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,cAAc,gBAAGL,aAAA,kEAG1B,CAAC;AACF,MAAMM,SAAS,gBAAGJ,QAAA;EAAAK,YAAA;IAAAC,MAAA;EAAA;EAAAC,aAAA;IAAAD,MAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,CAOjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,aAAa;;EACb,MAAMC,WAAW,GAAGR,cAAc,CAAC,CAAC;EACpC,MAAMS,MAAM,GAAGR,SAAS,CAAC,CAAC;EAC1B,MAAMS,YAAY,GAAGH,KAAK,CAACI,OAAO,KAAK,OAAO,GAAGF,MAAM,CAACP,YAAY,GAAGO,MAAM,CAACL,aAAa;EAC3F;EACAG,KAAK,CAACR,IAAI,CAACa,SAAS,GAAGhB,YAAY,CAACE,yBAAyB,CAACC,IAAI,EAAES,WAAW,EAAEE,YAAY,EAAEH,KAAK,CAACR,IAAI,CAACa,SAAS,CAAC;EACpH,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__resetStyles","mergeClasses","__styles","swatchPickerRowClassNames","root","useResetStyles","useStyles","spacingSmall","i8kkvl","spacingMedium","d","useSwatchPickerRowStyles_unstable","state","resetStyles","styles","spacingStyle","spacing","className"],"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"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAA0BC,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AAC1E,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,cAAc,gBAAGL,aAAA,kEAG1B,CAAC;AACF,MAAMM,SAAS,gBAAGJ,QAAA;EAAAK,YAAA;IAAAC,MAAA;EAAA;EAAAC,aAAA;IAAAD,MAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,CAOjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,MAAMC,WAAW,GAAGR,cAAc,CAAC,CAAC;EACpC,MAAMS,MAAM,GAAGR,SAAS,CAAC,CAAC;EAC1B,MAAMS,YAAY,GAAGH,KAAK,CAACI,OAAO,KAAK,OAAO,GAAGF,MAAM,CAACP,YAAY,GAAGO,MAAM,CAACL,aAAa;EAC3F;EACAG,KAAK,CAACR,IAAI,CAACa,SAAS,GAAGhB,YAAY,CAACE,yBAAyB,CAACC,IAAI,EAAES,WAAW,EAAEE,YAAY,EAAEH,KAAK,CAACR,IAAI,CAACa,SAAS,CAAC;EACpH,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { makeResetStyles, mergeClasses, makeStyles } from '@griffel/react';
2
+ import { makeResetStyles, mergeClasses, makeStyles } from "@griffel/react";
3
3
  export const swatchPickerRowClassNames = {
4
4
  root: 'fui-SwatchPickerRow'
5
5
  };
@@ -20,7 +20,6 @@ const useStyles = makeStyles({
20
20
  /**
21
21
  * Apply styling to the SwatchPickerRow slots based on the state
22
22
  */ export const useSwatchPickerRowStyles_unstable = (state)=>{
23
- 'use no memo';
24
23
  const resetStyles = useResetStyles();
25
24
  const styles = useStyles();
26
25
  const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
@@ -1 +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 'use no memo';\n\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;AAEA,SAASA,eAAe,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAI3E,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBL,gBAAgB;IACrCM,SAAS;IACTC,eAAe;AACjB;AAEA,MAAMC,YAAYN,WAAW;IAC3BO,cAAc;QACZC,WAAW;IACb;IACAC,eAAe;QACbD,WAAW;IACb;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,oCAAoC,CAACC;IAChD;IAEA,MAAMC,cAAcT;IACpB,MAAMU,SAASP;IACf,MAAMQ,eAAeH,MAAMI,OAAO,KAAK,UAAUF,OAAON,YAAY,GAAGM,OAAOJ,aAAa;IAE3F,oDAAoD;IACpDE,MAAMT,IAAI,CAACc,SAAS,GAAGjB,aAAaE,0BAA0BC,IAAI,EAAEU,aAAaE,cAAcH,MAAMT,IAAI,CAACc,SAAS;IAEnH,OAAOL;AACT,EAAE"}
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;AAEA,SAASA,eAAe,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAI3E,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBL,gBAAgB;IACrCM,SAAS;IACTC,eAAe;AACjB;AAEA,MAAMC,YAAYN,WAAW;IAC3BO,cAAc;QACZC,WAAW;IACb;IACAC,eAAe;QACbD,WAAW;IACb;AACF;AAEA;;CAEC,GACD,OAAO,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,GAAGjB,aAAaE,0BAA0BC,IAAI,EAAEU,aAAaE,cAAcH,MAAMT,IAAI,CAACc,SAAS;IAEnH,OAAOL;AACT,EAAE"}
@@ -1,2 +1,2 @@
1
- export { SwatchPickerProvider, swatchPickerContextDefaultValue, useSwatchPickerContextValue_unstable } from './swatchPicker';
2
- export { useSwatchPickerContextValues } from '../components/SwatchPicker/useSwatchPickerContextValues';
1
+ export { SwatchPickerProvider, swatchPickerContextDefaultValue, useSwatchPickerContextValue_unstable } from "./swatchPicker.js";
2
+ export { useSwatchPickerContextValues } from "../components/SwatchPicker/useSwatchPickerContextValues.js";
@@ -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":"AACA,SACEA,oBAAoB,EACpBC,+BAA+B,EAC/BC,oCAAoC,QAC/B,iBAAiB;AACxB,SAASC,4BAA4B,QAAQ,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":"AACA,SACEA,oBAAoB,EACpBC,+BAA+B,EAC/BC,oCAAoC,QAC/B,oBAAiB;AACxB,SAASC,4BAA4B,QAAQ,6DAA0D"}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ import { createContext, useContextSelector } from "@fluentui/react-context-selector";
3
3
  export const swatchPickerContextDefaultValue = {
4
4
  requestSelectionChange: ()=>{
5
5
  /*noop*/ },
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { SwatchPicker, renderSwatchPicker_unstable, useSwatchPickerStyles_unstable, useSwatchPicker_unstable, swatchPickerClassNames } from './SwatchPicker';
2
- export { SwatchPickerProvider, swatchPickerContextDefaultValue, useSwatchPickerContextValue_unstable, useSwatchPickerContextValues } from './contexts';
3
- export { ColorSwatch, renderColorSwatch_unstable, useColorSwatchStyles_unstable, useColorSwatch_unstable, colorSwatchClassNames, swatchCSSVars } from './ColorSwatch';
4
- export { ImageSwatch, renderImageSwatch_unstable, useImageSwatchStyles_unstable, useImageSwatch_unstable, imageSwatchClassNames } from './ImageSwatch';
5
- export { SwatchPickerRow, renderSwatchPickerRow_unstable, useSwatchPickerRowStyles_unstable, useSwatchPickerRow_unstable, swatchPickerRowClassNames } from './SwatchPickerRow';
6
- export { renderSwatchPickerGrid } from './utils/renderUtils';
7
- export { EmptySwatch, renderEmptySwatch_unstable, useEmptySwatchStyles_unstable, useEmptySwatch_unstable, emptySwatchClassNames } from './EmptySwatch';
1
+ export { SwatchPicker, renderSwatchPicker_unstable, useSwatchPickerStyles_unstable, useSwatchPicker_unstable, useSwatchPickerBase_unstable, swatchPickerClassNames } from "./SwatchPicker.js";
2
+ export { SwatchPickerProvider, swatchPickerContextDefaultValue, useSwatchPickerContextValue_unstable, useSwatchPickerContextValues } from "./contexts/index.js";
3
+ export { ColorSwatch, renderColorSwatch_unstable, useColorSwatchStyles_unstable, useColorSwatch_unstable, useColorSwatchBase_unstable, colorSwatchClassNames, swatchCSSVars } from "./ColorSwatch.js";
4
+ export { ImageSwatch, renderImageSwatch_unstable, useImageSwatchStyles_unstable, useImageSwatch_unstable, useImageSwatchBase_unstable, imageSwatchClassNames } from "./ImageSwatch.js";
5
+ export { SwatchPickerRow, renderSwatchPickerRow_unstable, useSwatchPickerRowStyles_unstable, useSwatchPickerRowBase_unstable, useSwatchPickerRow_unstable, swatchPickerRowClassNames } from "./SwatchPickerRow.js";
6
+ export { renderSwatchPickerGrid } from "./utils/renderUtils.js";
7
+ export { EmptySwatch, renderEmptySwatch_unstable, useEmptySwatchStyles_unstable, useEmptySwatch_unstable, useEmptySwatchBase_unstable, emptySwatchClassNames } from "./EmptySwatch.js";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SwatchPicker,\n renderSwatchPicker_unstable,\n useSwatchPickerStyles_unstable,\n useSwatchPicker_unstable,\n swatchPickerClassNames,\n} from './SwatchPicker';\nexport {\n SwatchPickerProvider,\n swatchPickerContextDefaultValue,\n useSwatchPickerContextValue_unstable,\n useSwatchPickerContextValues,\n} from './contexts';\nexport type { SwatchPickerContextValue, SwatchPickerContextValues } from './contexts';\nexport type {\n SwatchPickerProps,\n SwatchPickerSlots,\n SwatchPickerState,\n SwatchPickerOnSelectionChangeData,\n SwatchPickerOnSelectEventHandler,\n} from './SwatchPicker';\nexport {\n ColorSwatch,\n renderColorSwatch_unstable,\n useColorSwatchStyles_unstable,\n useColorSwatch_unstable,\n colorSwatchClassNames,\n swatchCSSVars,\n} from './ColorSwatch';\nexport type { ColorSwatchProps, ColorSwatchSlots, ColorSwatchState } from './ColorSwatch';\nexport {\n ImageSwatch,\n renderImageSwatch_unstable,\n useImageSwatchStyles_unstable,\n useImageSwatch_unstable,\n imageSwatchClassNames,\n} from './ImageSwatch';\nexport type { ImageSwatchProps, ImageSwatchSlots, ImageSwatchState } from './ImageSwatch';\nexport type { SwatchPickerRowProps, SwatchPickerRowSlots, SwatchPickerRowState } from './SwatchPickerRow';\nexport {\n SwatchPickerRow,\n renderSwatchPickerRow_unstable,\n useSwatchPickerRowStyles_unstable,\n useSwatchPickerRow_unstable,\n swatchPickerRowClassNames,\n} from './SwatchPickerRow';\nexport { renderSwatchPickerGrid } from './utils/renderUtils';\nexport type { SwatchProps, SwatchPickerGridProps } from './utils/renderUtils';\nexport {\n EmptySwatch,\n renderEmptySwatch_unstable,\n useEmptySwatchStyles_unstable,\n useEmptySwatch_unstable,\n emptySwatchClassNames,\n} from './EmptySwatch';\nexport type { EmptySwatchProps, EmptySwatchSlots, EmptySwatchState } from './EmptySwatch';\n"],"names":["SwatchPicker","renderSwatchPicker_unstable","useSwatchPickerStyles_unstable","useSwatchPicker_unstable","swatchPickerClassNames","SwatchPickerProvider","swatchPickerContextDefaultValue","useSwatchPickerContextValue_unstable","useSwatchPickerContextValues","ColorSwatch","renderColorSwatch_unstable","useColorSwatchStyles_unstable","useColorSwatch_unstable","colorSwatchClassNames","swatchCSSVars","ImageSwatch","renderImageSwatch_unstable","useImageSwatchStyles_unstable","useImageSwatch_unstable","imageSwatchClassNames","SwatchPickerRow","renderSwatchPickerRow_unstable","useSwatchPickerRowStyles_unstable","useSwatchPickerRow_unstable","swatchPickerRowClassNames","renderSwatchPickerGrid","EmptySwatch","renderEmptySwatch_unstable","useEmptySwatchStyles_unstable","useEmptySwatch_unstable","emptySwatchClassNames"],"mappings":"AAAA,SACEA,YAAY,EACZC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,EACxBC,sBAAsB,QACjB,iBAAiB;AACxB,SACEC,oBAAoB,EACpBC,+BAA+B,EAC/BC,oCAAoC,EACpCC,4BAA4B,QACvB,aAAa;AASpB,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,qBAAqB,EACrBC,aAAa,QACR,gBAAgB;AAEvB,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,qBAAqB,QAChB,gBAAgB;AAGvB,SACEC,eAAe,EACfC,8BAA8B,EAC9BC,iCAAiC,EACjCC,2BAA2B,EAC3BC,yBAAyB,QACpB,oBAAoB;AAC3B,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,qBAAqB,QAChB,gBAAgB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SwatchPicker,\n renderSwatchPicker_unstable,\n useSwatchPickerStyles_unstable,\n useSwatchPicker_unstable,\n useSwatchPickerBase_unstable,\n swatchPickerClassNames,\n} from './SwatchPicker';\nexport {\n SwatchPickerProvider,\n swatchPickerContextDefaultValue,\n useSwatchPickerContextValue_unstable,\n useSwatchPickerContextValues,\n} from './contexts';\nexport type { SwatchPickerContextValue, SwatchPickerContextValues } from './contexts';\nexport type {\n SwatchPickerBaseProps,\n SwatchPickerBaseState,\n SwatchPickerProps,\n SwatchPickerSlots,\n SwatchPickerState,\n SwatchPickerOnSelectionChangeData,\n SwatchPickerOnSelectEventHandler,\n} from './SwatchPicker';\nexport {\n ColorSwatch,\n renderColorSwatch_unstable,\n useColorSwatchStyles_unstable,\n useColorSwatch_unstable,\n useColorSwatchBase_unstable,\n colorSwatchClassNames,\n swatchCSSVars,\n} from './ColorSwatch';\nexport type {\n ColorSwatchBaseProps,\n ColorSwatchBaseState,\n ColorSwatchProps,\n ColorSwatchSlots,\n ColorSwatchState,\n} from './ColorSwatch';\nexport {\n ImageSwatch,\n renderImageSwatch_unstable,\n useImageSwatchStyles_unstable,\n useImageSwatch_unstable,\n useImageSwatchBase_unstable,\n imageSwatchClassNames,\n} from './ImageSwatch';\nexport type {\n ImageSwatchBaseProps,\n ImageSwatchBaseState,\n ImageSwatchProps,\n ImageSwatchSlots,\n ImageSwatchState,\n} from './ImageSwatch';\nexport type {\n SwatchPickerRowBaseProps,\n SwatchPickerRowBaseState,\n SwatchPickerRowProps,\n SwatchPickerRowSlots,\n SwatchPickerRowState,\n} from './SwatchPickerRow';\nexport {\n SwatchPickerRow,\n renderSwatchPickerRow_unstable,\n useSwatchPickerRowStyles_unstable,\n useSwatchPickerRowBase_unstable,\n useSwatchPickerRow_unstable,\n swatchPickerRowClassNames,\n} from './SwatchPickerRow';\nexport { renderSwatchPickerGrid } from './utils/renderUtils';\nexport type { SwatchProps, SwatchPickerGridProps } from './utils/renderUtils';\nexport {\n EmptySwatch,\n renderEmptySwatch_unstable,\n useEmptySwatchStyles_unstable,\n useEmptySwatch_unstable,\n useEmptySwatchBase_unstable,\n emptySwatchClassNames,\n} from './EmptySwatch';\nexport type {\n EmptySwatchBaseProps,\n EmptySwatchBaseState,\n EmptySwatchProps,\n EmptySwatchSlots,\n EmptySwatchState,\n} from './EmptySwatch';\n"],"names":["SwatchPicker","renderSwatchPicker_unstable","useSwatchPickerStyles_unstable","useSwatchPicker_unstable","useSwatchPickerBase_unstable","swatchPickerClassNames","SwatchPickerProvider","swatchPickerContextDefaultValue","useSwatchPickerContextValue_unstable","useSwatchPickerContextValues","ColorSwatch","renderColorSwatch_unstable","useColorSwatchStyles_unstable","useColorSwatch_unstable","useColorSwatchBase_unstable","colorSwatchClassNames","swatchCSSVars","ImageSwatch","renderImageSwatch_unstable","useImageSwatchStyles_unstable","useImageSwatch_unstable","useImageSwatchBase_unstable","imageSwatchClassNames","SwatchPickerRow","renderSwatchPickerRow_unstable","useSwatchPickerRowStyles_unstable","useSwatchPickerRowBase_unstable","useSwatchPickerRow_unstable","swatchPickerRowClassNames","renderSwatchPickerGrid","EmptySwatch","renderEmptySwatch_unstable","useEmptySwatchStyles_unstable","useEmptySwatch_unstable","useEmptySwatchBase_unstable","emptySwatchClassNames"],"mappings":"AAAA,SACEA,YAAY,EACZC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,EACxBC,4BAA4B,EAC5BC,sBAAsB,QACjB,oBAAiB;AACxB,SACEC,oBAAoB,EACpBC,+BAA+B,EAC/BC,oCAAoC,EACpCC,4BAA4B,QACvB,sBAAa;AAWpB,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,aAAa,QACR,mBAAgB;AAQvB,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,EAC3BC,qBAAqB,QAChB,mBAAgB;AAevB,SACEC,eAAe,EACfC,8BAA8B,EAC9BC,iCAAiC,EACjCC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,yBAAyB,QACpB,uBAAoB;AAC3B,SAASC,sBAAsB,QAAQ,yBAAsB;AAE7D,SACEC,WAAW,EACXC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,EAC3BC,qBAAqB,QAChB,mBAAgB"}
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { ColorSwatch, SwatchPickerRow, ImageSwatch } from '../';
1
+ import * as React from "react";
2
+ import { ColorSwatch, SwatchPickerRow, ImageSwatch } from "../index.js";
3
3
  export const renderSwatchPickerGrid = (props)=>{
4
4
  const { items, columnCount, renderRow, renderSwatch } = props;
5
5
  const _renderRow = renderRow || (({ children, rowId })=>/*#__PURE__*/ React.createElement(SwatchPickerRow, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/renderUtils.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ColorSwatch, SwatchPickerRow, ImageSwatch } from '../';\nimport type { ColorSwatchProps, ImageSwatchProps } from '../';\n\nexport type SwatchProps = ImageSwatchProps | ColorSwatchProps;\n\nexport type SwatchPickerGridProps = {\n items: SwatchProps[];\n columnCount: number;\n renderRow?: (props: { children: JSXElement[]; rowId: string | number }) => JSXElement;\n renderSwatch?: (item: SwatchProps) => JSXElement;\n};\n\nexport const renderSwatchPickerGrid = (props: SwatchPickerGridProps): JSXElement[] => {\n const { items, columnCount, renderRow, renderSwatch } = props;\n const _renderRow = renderRow || (({ children, rowId }) => <SwatchPickerRow key={rowId}>{children}</SwatchPickerRow>);\n const _renderSwatch =\n renderSwatch ||\n ((item: SwatchProps) =>\n (item as ImageSwatchProps).src ? (\n <ImageSwatch key={item.value} src={(item as ImageSwatchProps).src ?? ''} {...item} />\n ) : (\n <ColorSwatch key={item.value} color={item.color || ''} {...item} />\n ));\n\n const rowCount = Math.ceil(items.length / columnCount);\n const rows = Array.from({ length: rowCount }, (_, i) => {\n const start = i * columnCount;\n const end = start + columnCount;\n return items.slice(start, end);\n });\n\n return rows.map((row, index) => _renderRow({ children: row.map(_renderSwatch), rowId: index }));\n};\n"],"names":["React","ColorSwatch","SwatchPickerRow","ImageSwatch","renderSwatchPickerGrid","props","items","columnCount","renderRow","renderSwatch","_renderRow","children","rowId","key","_renderSwatch","item","src","value","color","rowCount","Math","ceil","length","rows","Array","from","_","i","start","end","slice","map","row","index"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,WAAW,EAAEC,eAAe,EAAEC,WAAW,QAAQ,MAAM;AAYhE,OAAO,MAAMC,yBAAyB,CAACC;IACrC,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGJ;IACxD,MAAMK,aAAaF,aAAc,CAAA,CAAC,EAAEG,QAAQ,EAAEC,KAAK,EAAE,iBAAK,oBAACV;YAAgBW,KAAKD;WAAQD,SAA0B;IAClH,MAAMG,gBACJL,gBACC,CAAA,CAACM;YAEqC;eADrC,AAACA,KAA0BC,GAAG,iBAC5B,oBAACb;YAAYU,KAAKE,KAAKE,KAAK;YAAED,KAAK,CAAA,YAAA,AAACD,KAA0BC,GAAG,cAA9B,uBAAA,YAAkC;YAAK,GAAGD,IAAI;2BAEjF,oBAACd;YAAYY,KAAKE,KAAKE,KAAK;YAAEC,OAAOH,KAAKG,KAAK,IAAI;YAAK,GAAGH,IAAI;;KACjE;IAEJ,MAAMI,WAAWC,KAAKC,IAAI,CAACf,MAAMgB,MAAM,GAAGf;IAC1C,MAAMgB,OAAOC,MAAMC,IAAI,CAAC;QAAEH,QAAQH;IAAS,GAAG,CAACO,GAAGC;QAChD,MAAMC,QAAQD,IAAIpB;QAClB,MAAMsB,MAAMD,QAAQrB;QACpB,OAAOD,MAAMwB,KAAK,CAACF,OAAOC;IAC5B;IAEA,OAAON,KAAKQ,GAAG,CAAC,CAACC,KAAKC,QAAUvB,WAAW;YAAEC,UAAUqB,IAAID,GAAG,CAACjB;YAAgBF,OAAOqB;QAAM;AAC9F,EAAE"}
1
+ {"version":3,"sources":["../src/utils/renderUtils.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ColorSwatch, SwatchPickerRow, ImageSwatch } from '../';\nimport type { ColorSwatchProps, ImageSwatchProps } from '../';\n\nexport type SwatchProps = ImageSwatchProps | ColorSwatchProps;\n\nexport type SwatchPickerGridProps = {\n items: SwatchProps[];\n columnCount: number;\n renderRow?: (props: { children: JSXElement[]; rowId: string | number }) => JSXElement;\n renderSwatch?: (item: SwatchProps) => JSXElement;\n};\n\nexport const renderSwatchPickerGrid = (props: SwatchPickerGridProps): JSXElement[] => {\n const { items, columnCount, renderRow, renderSwatch } = props;\n const _renderRow = renderRow || (({ children, rowId }) => <SwatchPickerRow key={rowId}>{children}</SwatchPickerRow>);\n const _renderSwatch =\n renderSwatch ||\n ((item: SwatchProps) =>\n (item as ImageSwatchProps).src ? (\n <ImageSwatch key={item.value} src={(item as ImageSwatchProps).src ?? ''} {...item} />\n ) : (\n <ColorSwatch key={item.value} color={item.color || ''} {...item} />\n ));\n\n const rowCount = Math.ceil(items.length / columnCount);\n const rows = Array.from({ length: rowCount }, (_, i) => {\n const start = i * columnCount;\n const end = start + columnCount;\n return items.slice(start, end);\n });\n\n return rows.map((row, index) => _renderRow({ children: row.map(_renderSwatch), rowId: index }));\n};\n"],"names":["React","ColorSwatch","SwatchPickerRow","ImageSwatch","renderSwatchPickerGrid","props","items","columnCount","renderRow","renderSwatch","_renderRow","children","rowId","key","_renderSwatch","item","src","value","color","rowCount","Math","ceil","length","rows","Array","from","_","i","start","end","slice","map","row","index"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,WAAW,EAAEC,eAAe,EAAEC,WAAW,QAAQ,cAAM;AAYhE,OAAO,MAAMC,yBAAyB,CAACC;IACrC,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGJ;IACxD,MAAMK,aAAaF,aAAc,CAAA,CAAC,EAAEG,QAAQ,EAAEC,KAAK,EAAE,iBAAK,oBAACV;YAAgBW,KAAKD;WAAQD,SAA0B;IAClH,MAAMG,gBACJL,gBACC,CAAA,CAACM;YAEqC;eADrC,AAACA,KAA0BC,GAAG,iBAC5B,oBAACb;YAAYU,KAAKE,KAAKE,KAAK;YAAED,KAAK,CAAA,YAAA,AAACD,KAA0BC,GAAG,cAA9B,uBAAA,YAAkC;YAAK,GAAGD,IAAI;2BAEjF,oBAACd;YAAYY,KAAKE,KAAKE,KAAK;YAAEC,OAAOH,KAAKG,KAAK,IAAI;YAAK,GAAGH,IAAI;;KACjE;IAEJ,MAAMI,WAAWC,KAAKC,IAAI,CAACf,MAAMgB,MAAM,GAAGf;IAC1C,MAAMgB,OAAOC,MAAMC,IAAI,CAAC;QAAEH,QAAQH;IAAS,GAAG,CAACO,GAAGC;QAChD,MAAMC,QAAQD,IAAIpB;QAClB,MAAMsB,MAAMD,QAAQrB;QACpB,OAAOD,MAAMwB,KAAK,CAACF,OAAOC;IAC5B;IAEA,OAAON,KAAKQ,GAAG,CAAC,CAACC,KAAKC,QAAUvB,WAAW;YAAEC,UAAUqB,IAAID,GAAG,CAACjB;YAAgBF,OAAOqB;QAAM;AAC9F,EAAE"}
@@ -21,6 +21,9 @@ _export(exports, {
21
21
  swatchCSSVars: function() {
22
22
  return _index.swatchCSSVars;
23
23
  },
24
+ useColorSwatchBase_unstable: function() {
25
+ return _index.useColorSwatchBase_unstable;
26
+ },
24
27
  useColorSwatchStyles_unstable: function() {
25
28
  return _index.useColorSwatchStyles_unstable;
26
29
  },
@@ -28,4 +31,4 @@ _export(exports, {
28
31
  return _index.useColorSwatch_unstable;
29
32
  }
30
33
  });
31
- const _index = require("./components/ColorSwatch/index");
34
+ const _index = require("./components/ColorSwatch/index.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ColorSwatch.ts"],"sourcesContent":["export type {\n ColorSwatchBaseProps,\n ColorSwatchBaseState,\n ColorSwatchProps,\n ColorSwatchSlots,\n ColorSwatchState,\n} from './components/ColorSwatch/index';\nexport {\n ColorSwatch,\n colorSwatchClassNames,\n renderColorSwatch_unstable,\n swatchCSSVars,\n useColorSwatchStyles_unstable,\n useColorSwatch_unstable,\n useColorSwatchBase_unstable,\n} from './components/ColorSwatch/index';\n"],"names":["ColorSwatch","colorSwatchClassNames","renderColorSwatch_unstable","swatchCSSVars","useColorSwatchStyles_unstable","useColorSwatch_unstable","useColorSwatchBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,kBAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAC1BC,oBAAa;;;eAGbG,kCAA2B;;;eAF3BF,oCAA6B;;;eAC7BC,8BAAuB;;;uBAElB,oCAAiC"}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  renderEmptySwatch_unstable: function() {
19
19
  return _index.renderEmptySwatch_unstable;
20
20
  },
21
+ useEmptySwatchBase_unstable: function() {
22
+ return _index.useEmptySwatchBase_unstable;
23
+ },
21
24
  useEmptySwatchStyles_unstable: function() {
22
25
  return _index.useEmptySwatchStyles_unstable;
23
26
  },
@@ -25,4 +28,4 @@ _export(exports, {
25
28
  return _index.useEmptySwatch_unstable;
26
29
  }
27
30
  });
28
- const _index = require("./components/EmptySwatch/index");
31
+ const _index = require("./components/EmptySwatch/index.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/EmptySwatch.ts"],"sourcesContent":["export type {\n EmptySwatchBaseProps,\n EmptySwatchBaseState,\n EmptySwatchProps,\n EmptySwatchSlots,\n EmptySwatchState,\n} from './components/EmptySwatch/index';\nexport {\n EmptySwatch,\n emptySwatchClassNames,\n renderEmptySwatch_unstable,\n useEmptySwatchBase_unstable,\n useEmptySwatchStyles_unstable,\n useEmptySwatch_unstable,\n} from './components/EmptySwatch/index';\n"],"names":["EmptySwatch","emptySwatchClassNames","renderEmptySwatch_unstable","useEmptySwatchBase_unstable","useEmptySwatchStyles_unstable","useEmptySwatch_unstable"],"mappings":";;;;;;;;;;;;eAQEA,kBAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAC1BC,kCAA2B;;;eAC3BC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,oCAAiC"}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  renderImageSwatch_unstable: function() {
19
19
  return _index.renderImageSwatch_unstable;
20
20
  },
21
+ useImageSwatchBase_unstable: function() {
22
+ return _index.useImageSwatchBase_unstable;
23
+ },
21
24
  useImageSwatchStyles_unstable: function() {
22
25
  return _index.useImageSwatchStyles_unstable;
23
26
  },
@@ -25,4 +28,4 @@ _export(exports, {
25
28
  return _index.useImageSwatch_unstable;
26
29
  }
27
30
  });
28
- const _index = require("./components/ImageSwatch/index");
31
+ const _index = require("./components/ImageSwatch/index.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ImageSwatch.ts"],"sourcesContent":["export type {\n ImageSwatchBaseProps,\n ImageSwatchBaseState,\n ImageSwatchProps,\n ImageSwatchSlots,\n ImageSwatchState,\n} from './components/ImageSwatch/index';\nexport {\n ImageSwatch,\n imageSwatchClassNames,\n renderImageSwatch_unstable,\n useImageSwatchStyles_unstable,\n useImageSwatch_unstable,\n useImageSwatchBase_unstable,\n} from './components/ImageSwatch/index';\n"],"names":["ImageSwatch","imageSwatchClassNames","renderImageSwatch_unstable","useImageSwatchStyles_unstable","useImageSwatch_unstable","useImageSwatchBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,kBAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAG1BG,kCAA2B;;;eAF3BF,oCAA6B;;;eAC7BC,8BAAuB;;;uBAElB,oCAAiC"}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  swatchPickerClassNames: function() {
19
19
  return _index.swatchPickerClassNames;
20
20
  },
21
+ useSwatchPickerBase_unstable: function() {
22
+ return _index.useSwatchPickerBase_unstable;
23
+ },
21
24
  useSwatchPickerStyles_unstable: function() {
22
25
  return _index.useSwatchPickerStyles_unstable;
23
26
  },
@@ -25,4 +28,4 @@ _export(exports, {
25
28
  return _index.useSwatchPicker_unstable;
26
29
  }
27
30
  });
28
- const _index = require("./components/SwatchPicker/index");
31
+ const _index = require("./components/SwatchPicker/index.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SwatchPicker.ts"],"sourcesContent":["export type {\n SwatchPickerBaseProps,\n SwatchPickerBaseState,\n SwatchPickerOnSelectEventHandler,\n SwatchPickerOnSelectionChangeData,\n SwatchPickerProps,\n SwatchPickerSlots,\n SwatchPickerState,\n} from './components/SwatchPicker/index';\nexport {\n SwatchPicker,\n renderSwatchPicker_unstable,\n swatchPickerClassNames,\n useSwatchPickerStyles_unstable,\n useSwatchPicker_unstable,\n useSwatchPickerBase_unstable,\n} from './components/SwatchPicker/index';\n"],"names":["SwatchPicker","renderSwatchPicker_unstable","swatchPickerClassNames","useSwatchPickerStyles_unstable","useSwatchPicker_unstable","useSwatchPickerBase_unstable"],"mappings":";;;;;;;;;;;;eAUEA,mBAAY;;;eACZC,kCAA2B;;;eAC3BC,6BAAsB;;;eAGtBG,mCAA4B;;;eAF5BF,qCAA8B;;;eAC9BC,+BAAwB;;;uBAEnB,qCAAkC"}
@@ -18,6 +18,9 @@ _export(exports, {
18
18
  swatchPickerRowClassNames: function() {
19
19
  return _index.swatchPickerRowClassNames;
20
20
  },
21
+ useSwatchPickerRowBase_unstable: function() {
22
+ return _index.useSwatchPickerRowBase_unstable;
23
+ },
21
24
  useSwatchPickerRowStyles_unstable: function() {
22
25
  return _index.useSwatchPickerRowStyles_unstable;
23
26
  },
@@ -25,4 +28,4 @@ _export(exports, {
25
28
  return _index.useSwatchPickerRow_unstable;
26
29
  }
27
30
  });
28
- const _index = require("./components/SwatchPickerRow/index");
31
+ const _index = require("./components/SwatchPickerRow/index.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SwatchPickerRow.ts"],"sourcesContent":["export type {\n SwatchPickerRowBaseProps,\n SwatchPickerRowBaseState,\n SwatchPickerRowProps,\n SwatchPickerRowSlots,\n SwatchPickerRowState,\n} from './components/SwatchPickerRow/index';\nexport {\n SwatchPickerRow,\n renderSwatchPickerRow_unstable,\n swatchPickerRowClassNames,\n useSwatchPickerRowStyles_unstable,\n useSwatchPickerRow_unstable,\n useSwatchPickerRowBase_unstable,\n} from './components/SwatchPickerRow/index';\n"],"names":["SwatchPickerRow","renderSwatchPickerRow_unstable","swatchPickerRowClassNames","useSwatchPickerRowStyles_unstable","useSwatchPickerRow_unstable","useSwatchPickerRowBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,sBAAe;;;eACfC,qCAA8B;;;eAC9BC,gCAAyB;;;eAGzBG,sCAA+B;;;eAF/BF,wCAAiC;;;eACjCC,kCAA2B;;;uBAEtB,wCAAqC"}