@fluentui/react-color-picker 9.3.1 → 9.3.3

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 (129) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/lib/components/AlphaSlider/AlphaSlider.constants.js.map +1 -1
  3. package/lib/components/AlphaSlider/AlphaSlider.js.map +1 -1
  4. package/lib/components/AlphaSlider/AlphaSlider.types.js.map +1 -1
  5. package/lib/components/AlphaSlider/alphaSliderUtils.js +1 -1
  6. package/lib/components/AlphaSlider/alphaSliderUtils.js.map +1 -1
  7. package/lib/components/AlphaSlider/index.js.map +1 -1
  8. package/lib/components/AlphaSlider/renderAlphaSlider.js +2 -2
  9. package/lib/components/AlphaSlider/renderAlphaSlider.js.map +1 -1
  10. package/lib/components/AlphaSlider/useAlphaSlider.js +1 -0
  11. package/lib/components/AlphaSlider/useAlphaSlider.js.map +1 -1
  12. package/lib/components/AlphaSlider/useAlphaSliderState.js +12 -13
  13. package/lib/components/AlphaSlider/useAlphaSliderState.js.map +1 -1
  14. package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js.map +1 -1
  15. package/lib/components/ColorArea/ColorArea.constants.js.map +1 -1
  16. package/lib/components/ColorArea/ColorArea.js.map +1 -1
  17. package/lib/components/ColorArea/ColorArea.types.js.map +1 -1
  18. package/lib/components/ColorArea/index.js.map +1 -1
  19. package/lib/components/ColorArea/renderColorArea.js +2 -2
  20. package/lib/components/ColorArea/renderColorArea.js.map +1 -1
  21. package/lib/components/ColorArea/useColorArea.js +1 -0
  22. package/lib/components/ColorArea/useColorArea.js.map +1 -1
  23. package/lib/components/ColorArea/useColorAreaStyles.styles.raw.js.map +1 -1
  24. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  25. package/lib/components/ColorPicker/ColorPicker.types.js.map +1 -1
  26. package/lib/components/ColorPicker/index.js.map +1 -1
  27. package/lib/components/ColorPicker/renderColorPicker.js +2 -2
  28. package/lib/components/ColorPicker/renderColorPicker.js.map +1 -1
  29. package/lib/components/ColorPicker/useColorPicker.js.map +1 -1
  30. package/lib/components/ColorPicker/useColorPickerContextValues.js.map +1 -1
  31. package/lib/components/ColorPicker/useColorPickerStyles.styles.raw.js.map +1 -1
  32. package/lib/components/ColorSlider/ColorSlider.constants.js +1 -0
  33. package/lib/components/ColorSlider/ColorSlider.constants.js.map +1 -1
  34. package/lib/components/ColorSlider/ColorSlider.js.map +1 -1
  35. package/lib/components/ColorSlider/ColorSlider.types.js.map +1 -1
  36. package/lib/components/ColorSlider/index.js.map +1 -1
  37. package/lib/components/ColorSlider/renderColorSlider.js +2 -2
  38. package/lib/components/ColorSlider/renderColorSlider.js.map +1 -1
  39. package/lib/components/ColorSlider/useColorSlider.js +28 -11
  40. package/lib/components/ColorSlider/useColorSlider.js.map +1 -1
  41. package/lib/components/ColorSlider/useColorSliderStyles.styles.js +4 -3
  42. package/lib/components/ColorSlider/useColorSliderStyles.styles.js.map +1 -1
  43. package/lib/components/ColorSlider/useColorSliderStyles.styles.raw.js +3 -2
  44. package/lib/components/ColorSlider/useColorSliderStyles.styles.raw.js.map +1 -1
  45. package/lib/contexts/colorPicker.js.map +1 -1
  46. package/lib/types/color.js.map +1 -1
  47. package/lib/utils/adjustChannel.js.map +1 -1
  48. package/lib/utils/constants.js.map +1 -1
  49. package/lib/utils/createHslColor.js.map +1 -1
  50. package/lib/utils/createHsvColor.js.map +1 -1
  51. package/lib/utils/getCoordinates.js.map +1 -1
  52. package/lib-commonjs/AlphaSlider.cjs +8 -8
  53. package/lib-commonjs/ColorArea.cjs +8 -8
  54. package/lib-commonjs/ColorPicker.cjs +9 -9
  55. package/lib-commonjs/ColorPicker.cjs.map +1 -1
  56. package/lib-commonjs/ColorSlider.cjs +8 -8
  57. package/lib-commonjs/components/AlphaSlider/AlphaSlider.cjs.map +1 -1
  58. package/lib-commonjs/components/AlphaSlider/AlphaSlider.constants.cjs.map +1 -1
  59. package/lib-commonjs/components/AlphaSlider/AlphaSlider.types.cjs.map +1 -1
  60. package/lib-commonjs/components/AlphaSlider/alphaSliderUtils.cjs +5 -5
  61. package/lib-commonjs/components/AlphaSlider/alphaSliderUtils.cjs.map +1 -1
  62. package/lib-commonjs/components/AlphaSlider/index.cjs +8 -8
  63. package/lib-commonjs/components/AlphaSlider/index.cjs.map +1 -1
  64. package/lib-commonjs/components/AlphaSlider/renderAlphaSlider.cjs.map +1 -1
  65. package/lib-commonjs/components/AlphaSlider/useAlphaSlider.cjs +4 -3
  66. package/lib-commonjs/components/AlphaSlider/useAlphaSlider.cjs.map +1 -1
  67. package/lib-commonjs/components/AlphaSlider/useAlphaSliderState.cjs +10 -11
  68. package/lib-commonjs/components/AlphaSlider/useAlphaSliderState.cjs.map +1 -1
  69. package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.cjs +3 -3
  70. package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.cjs.map +1 -1
  71. package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.raw.cjs +3 -3
  72. package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.raw.cjs.map +1 -1
  73. package/lib-commonjs/components/ColorArea/ColorArea.cjs.map +1 -1
  74. package/lib-commonjs/components/ColorArea/ColorArea.constants.cjs.map +1 -1
  75. package/lib-commonjs/components/ColorArea/ColorArea.types.cjs.map +1 -1
  76. package/lib-commonjs/components/ColorArea/index.cjs +8 -8
  77. package/lib-commonjs/components/ColorArea/index.cjs.map +1 -1
  78. package/lib-commonjs/components/ColorArea/renderColorArea.cjs.map +1 -1
  79. package/lib-commonjs/components/ColorArea/useColorArea.cjs +4 -3
  80. package/lib-commonjs/components/ColorArea/useColorArea.cjs.map +1 -1
  81. package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.cjs +3 -3
  82. package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.cjs.map +1 -1
  83. package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.raw.cjs +3 -3
  84. package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.raw.cjs.map +1 -1
  85. package/lib-commonjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  86. package/lib-commonjs/components/ColorPicker/ColorPicker.types.cjs.map +1 -1
  87. package/lib-commonjs/components/ColorPicker/index.cjs +9 -9
  88. package/lib-commonjs/components/ColorPicker/index.cjs.map +1 -1
  89. package/lib-commonjs/components/ColorPicker/renderColorPicker.cjs.map +1 -1
  90. package/lib-commonjs/components/ColorPicker/useColorPicker.cjs +3 -3
  91. package/lib-commonjs/components/ColorPicker/useColorPicker.cjs.map +1 -1
  92. package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.cjs +3 -3
  93. package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.cjs.map +1 -1
  94. package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.cjs +3 -3
  95. package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.cjs.map +1 -1
  96. package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.raw.cjs +3 -3
  97. package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.raw.cjs.map +1 -1
  98. package/lib-commonjs/components/ColorSlider/ColorSlider.cjs.map +1 -1
  99. package/lib-commonjs/components/ColorSlider/ColorSlider.constants.cjs +1 -0
  100. package/lib-commonjs/components/ColorSlider/ColorSlider.constants.cjs.map +1 -1
  101. package/lib-commonjs/components/ColorSlider/ColorSlider.types.cjs.map +1 -1
  102. package/lib-commonjs/components/ColorSlider/index.cjs +8 -8
  103. package/lib-commonjs/components/ColorSlider/index.cjs.map +1 -1
  104. package/lib-commonjs/components/ColorSlider/renderColorSlider.cjs.map +1 -1
  105. package/lib-commonjs/components/ColorSlider/useColorSlider.cjs +30 -13
  106. package/lib-commonjs/components/ColorSlider/useColorSlider.cjs.map +1 -1
  107. package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.cjs +8 -16
  108. package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.cjs.map +1 -1
  109. package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.raw.cjs +6 -5
  110. package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.raw.cjs.map +1 -1
  111. package/lib-commonjs/contexts/colorPicker.cjs +4 -4
  112. package/lib-commonjs/contexts/colorPicker.cjs.map +1 -1
  113. package/lib-commonjs/index.cjs +27 -27
  114. package/lib-commonjs/index.cjs.map +1 -1
  115. package/lib-commonjs/types/color.cjs.map +1 -1
  116. package/lib-commonjs/utils/adjustChannel.cjs +3 -3
  117. package/lib-commonjs/utils/adjustChannel.cjs.map +1 -1
  118. package/lib-commonjs/utils/constants.cjs +6 -6
  119. package/lib-commonjs/utils/constants.cjs.map +1 -1
  120. package/lib-commonjs/utils/createHslColor.cjs +3 -3
  121. package/lib-commonjs/utils/createHslColor.cjs.map +1 -1
  122. package/lib-commonjs/utils/createHsvColor.cjs.map +1 -1
  123. package/lib-commonjs/utils/getCoordinates.cjs +3 -3
  124. package/lib-commonjs/utils/getCoordinates.cjs.map +1 -1
  125. package/package.json +5 -5
  126. package/lib/utils/getPercent.js +0 -11
  127. package/lib/utils/getPercent.js.map +0 -1
  128. package/lib-commonjs/utils/getPercent.cjs +0 -21
  129. package/lib-commonjs/utils/getPercent.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/ColorSlider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useColorSlider_unstable } from './useColorSlider';\nimport { renderColorSlider_unstable } from './renderColorSlider';\nimport { useColorSliderStyles_unstable } from './useColorSliderStyles.styles';\nimport type { ColorSliderProps } from './ColorSlider.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ColorSlider component\n */\nexport const ColorSlider: ForwardRefComponent<ColorSliderProps> = React.forwardRef((props, ref) => {\n const state = useColorSlider_unstable(props, ref);\n\n useColorSliderStyles_unstable(state);\n useCustomStyleHook_unstable('useColorSliderStyles_unstable')(state);\n\n return renderColorSlider_unstable(state);\n});\n\nColorSlider.displayName = 'ColorSlider';\n"],"names":["React","useColorSlider_unstable","renderColorSlider_unstable","useColorSliderStyles_unstable","useCustomStyleHook_unstable","ColorSlider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,6BAA6B,QAAQ,mCAAgC;AAE9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAC9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/ColorSlider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useColorSlider_unstable } from './useColorSlider';\nimport { renderColorSlider_unstable } from './renderColorSlider';\nimport { useColorSliderStyles_unstable } from './useColorSliderStyles.styles';\nimport type { ColorSliderProps } from './ColorSlider.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ColorSlider component\n */\nexport const ColorSlider: ForwardRefComponent<ColorSliderProps> = React.forwardRef((props, ref) => {\n const state = useColorSlider_unstable(props, ref);\n\n useColorSliderStyles_unstable(state);\n useCustomStyleHook_unstable('useColorSliderStyles_unstable')(state);\n\n return renderColorSlider_unstable(state);\n});\n\nColorSlider.displayName = 'ColorSlider';\n"],"names":["React","useColorSlider_unstable","renderColorSlider_unstable","useColorSliderStyles_unstable","useCustomStyleHook_unstable","ColorSlider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,6BAA6B,QAAQ,mCAAgC;AAE9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAC9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/ColorSlider.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot, EventHandler, EventData } from '@fluentui/react-utilities';\nimport type { HsvColor } from '../../types/color';\nimport type { ColorPickerProps } from '../ColorPicker/ColorPicker.types';\n\nexport type SliderOnChangeData = EventData<'change', React.ChangeEvent<HTMLInputElement>> & {\n color: HsvColor;\n};\n\nexport type ColorSliderSlots = {\n root: NonNullable<Slot<'div'>>;\n rail: NonNullable<Slot<'div'>>;\n thumb: NonNullable<Slot<'div'>>;\n input: NonNullable<Slot<'input'>>;\n};\n\nexport type ColorChannel = 'hue' | 'saturation' | 'value';\n\n/**\n * ColorSlider Props\n */\nexport type ColorSliderProps = Omit<\n ComponentProps<Partial<ColorSliderSlots>, 'input'>,\n 'defaultValue' | 'onChange' | 'value' | 'color'\n> &\n Pick<ColorPickerProps, 'shape'> & {\n /**\n * Color channel of the Slider.\n * @default `hue`\n */\n channel?: ColorChannel;\n\n /**\n * Triggers a callback when the value has been changed. This will be called on every individual step.\n */\n onChange?: EventHandler<SliderOnChangeData>;\n\n /**\n * Render the Slider in a vertical orientation, smallest value on the bottom.\n * @default `false`\n */\n vertical?: boolean;\n\n /**\n * Color of the ColorPicker\n */\n color?: HsvColor;\n\n /**\n * The starting color for an uncontrolled ColorSlider.\n */\n defaultColor?: HsvColor;\n };\n\nexport type ColorSliderBaseProps = Omit<ColorSliderProps, 'shape'>;\n\n/**\n * State used in rendering ColorSlider\n */\nexport type ColorSliderState = ComponentState<ColorSliderSlots> &\n Pick<ColorSliderProps, 'vertical' | 'shape' | 'channel'>;\n\nexport type ColorSliderBaseState = Omit<ColorSliderState, 'shape'>;\n"],"names":[],"mappings":"AA8DA,WAAmE"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/ColorSlider.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot, EventHandler, EventData } from '@fluentui/react-utilities';\nimport type { HsvColor } from '../../types/color';\nimport type { ColorPickerProps } from '../ColorPicker/ColorPicker.types';\n\nexport type SliderOnChangeData = EventData<'change', React.ChangeEvent<HTMLInputElement>> & {\n color: HsvColor;\n};\n\nexport type ColorSliderSlots = {\n root: NonNullable<Slot<'div'>>;\n rail: NonNullable<Slot<'div'>>;\n thumb: NonNullable<Slot<'div'>>;\n input: NonNullable<Slot<'input'>>;\n};\n\nexport type ColorChannel = 'hue' | 'saturation' | 'value';\n\n/**\n * ColorSlider Props\n */\nexport type ColorSliderProps = Omit<\n ComponentProps<Partial<ColorSliderSlots>, 'input'>,\n 'defaultValue' | 'onChange' | 'value' | 'color'\n> &\n Pick<ColorPickerProps, 'shape'> & {\n /**\n * Color channel of the Slider.\n * @default `hue`\n */\n channel?: ColorChannel;\n\n /**\n * Triggers a callback when the value has been changed. This will be called on every individual step.\n */\n onChange?: EventHandler<SliderOnChangeData>;\n\n /**\n * Render the Slider in a vertical orientation, smallest value on the bottom.\n * @default `false`\n */\n vertical?: boolean;\n\n /**\n * Color of the ColorPicker\n */\n color?: HsvColor;\n\n /**\n * The starting color for an uncontrolled ColorSlider.\n */\n defaultColor?: HsvColor;\n };\n\nexport type ColorSliderBaseProps = Omit<ColorSliderProps, 'shape'>;\n\n/**\n * State used in rendering ColorSlider\n */\nexport type ColorSliderState = ComponentState<ColorSliderSlots> &\n Pick<ColorSliderProps, 'vertical' | 'shape' | 'channel'>;\n\nexport type ColorSliderBaseState = Omit<ColorSliderState, 'shape'>;\n"],"names":[],"mappings":"AA8DA,WAAmE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/index.ts"],"sourcesContent":["export { ColorSlider } from './ColorSlider';\nexport type {\n ColorChannel,\n ColorSliderBaseProps,\n ColorSliderBaseState,\n ColorSliderProps,\n ColorSliderSlots,\n ColorSliderState,\n SliderOnChangeData,\n} from './ColorSlider.types';\nexport { renderColorSlider_unstable } from './renderColorSlider';\nexport { useColorSliderBase_unstable, useColorSlider_unstable } from './useColorSlider';\nexport { colorSliderClassNames, useColorSliderStyles_unstable } from './useColorSliderStyles.styles';\nexport { colorSliderCSSVars } from './ColorSlider.constants';\n"],"names":["ColorSlider","renderColorSlider_unstable","useColorSliderBase_unstable","useColorSlider_unstable","colorSliderClassNames","useColorSliderStyles_unstable","colorSliderCSSVars"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAU5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,2BAA2B,EAAEC,uBAAuB,QAAQ,sBAAmB;AACxF,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,mCAAgC;AACrG,SAASC,kBAAkB,QAAQ,6BAA0B"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/index.ts"],"sourcesContent":["export { ColorSlider } from './ColorSlider';\nexport type {\n ColorChannel,\n ColorSliderBaseProps,\n ColorSliderBaseState,\n ColorSliderProps,\n ColorSliderSlots,\n ColorSliderState,\n SliderOnChangeData,\n} from './ColorSlider.types';\nexport { renderColorSlider_unstable } from './renderColorSlider';\nexport { useColorSliderBase_unstable, useColorSlider_unstable } from './useColorSlider';\nexport { colorSliderClassNames, useColorSliderStyles_unstable } from './useColorSliderStyles.styles';\nexport { colorSliderCSSVars } from './ColorSlider.constants';\n"],"names":["ColorSlider","renderColorSlider_unstable","useColorSliderBase_unstable","useColorSlider_unstable","colorSliderClassNames","useColorSliderStyles_unstable","colorSliderCSSVars"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAU5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,2BAA2B,EAAEC,uBAAuB,QAAQ,sBAAmB;AACxF,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,mCAAgC;AACrG,SAASC,kBAAkB,QAAQ,6BAA0B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of ColorSlider
5
5
  */ export const renderColorSlider_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/renderColorSlider.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 { ColorSliderBaseState, ColorSliderSlots } from './ColorSlider.types';\n\n/**\n * Render the final JSX of ColorSlider\n */\nexport const renderColorSlider_unstable = (state: ColorSliderBaseState): JSXElement => {\n assertSlots<ColorSliderSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.rail />\n <state.thumb />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderColorSlider_unstable","state","root","input","rail","thumb"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAE9B,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,IAAI;0BACX,KAACH,MAAMI,KAAK;;;AAGlB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/renderColorSlider.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 { ColorSliderBaseState, ColorSliderSlots } from './ColorSlider.types';\n\n/**\n * Render the final JSX of ColorSlider\n */\nexport const renderColorSlider_unstable = (state: ColorSliderBaseState): JSXElement => {\n assertSlots<ColorSliderSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.rail />\n <state.thumb />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderColorSlider_unstable","state","root","input","rail","thumb"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAE9B,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,IAAI;0BACX,KAACH,MAAMI,KAAK;;;AAGlB,EAAE"}
@@ -1,10 +1,9 @@
1
1
  'use client';
2
- import { getPartitionedNativeProps, useId, slot, useControllableState, useEventCallback } from "@fluentui/react-utilities";
2
+ import { getPartitionedNativeProps, getPercentInRange, useId, slot, useControllableState, useEventCallback } from "@fluentui/react-utilities";
3
3
  import { colorSliderCSSVars } from "./ColorSlider.constants.js";
4
4
  import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
5
5
  import { useColorPickerContextValue_unstable } from "../../contexts/colorPicker.js";
6
6
  import { MIN, HUE_MAX, MAX as COLOR_MAX } from "../../utils/constants.js";
7
- import { getPercent } from "../../utils/getPercent.js";
8
7
  import { createHsvColor } from "../../utils/createHsvColor.js";
9
8
  import { clampValue, adjustChannel } from "../../utils/adjustChannel.js";
10
9
  import { INITIAL_COLOR_HSV } from "../../utils/constants.js";
@@ -31,11 +30,10 @@ import { createHslColor, createHslColorString } from "../../utils/createHslColor
31
30
  });
32
31
  const { color, channel = 'hue', onChange = onChangeFromContext, vertical, // Slots
33
32
  root, input, rail, thumb } = props;
34
- const hsvColor = color || colorFromContext;
35
- const hslColor = createHslColor(hsvColor);
33
+ const hslColor = createHslColor(color || colorFromContext);
36
34
  const [currentColor, setCurrentColor] = useControllableState({
37
35
  defaultState: props.defaultColor,
38
- state: hsvColor,
36
+ state: color || colorFromContext,
39
37
  initialState: INITIAL_COLOR_HSV
40
38
  });
41
39
  const MAX = channel === 'hue' ? HUE_MAX : COLOR_MAX;
@@ -45,21 +43,21 @@ import { createHslColor, createHslColorString } from "../../utils/createHslColor
45
43
  value: clampValue(currentColor.v * 100)
46
44
  };
47
45
  const clampedValue = adjustChannel(channel, valueChannelActions);
48
- const valuePercent = getPercent(clampedValue, MIN, MAX);
46
+ const valuePercent = getPercentInRange(clampedValue, MIN, MAX);
49
47
  const inputOnChange = input === null || input === void 0 ? void 0 : input.onChange;
50
48
  const _onChange = useEventCallback((event)=>{
51
49
  const newValue = Number(event.target.value);
52
50
  const colorActions = {
53
51
  hue: ()=>createHsvColor({
54
- ...hsvColor,
52
+ ...currentColor,
55
53
  h: newValue
56
54
  }),
57
55
  saturation: ()=>createHsvColor({
58
- ...hsvColor,
56
+ ...currentColor,
59
57
  s: newValue / 100
60
58
  }),
61
59
  value: ()=>createHsvColor({
62
- ...hsvColor,
60
+ ...currentColor,
63
61
  v: newValue / 100
64
62
  })
65
63
  };
@@ -75,8 +73,27 @@ import { createHslColor, createHslColorString } from "../../utils/createHslColor
75
73
  const rootVariables = {
76
74
  [colorSliderCSSVars.sliderDirectionVar]: vertical ? '180deg' : dir === 'ltr' ? '-90deg' : '90deg',
77
75
  [colorSliderCSSVars.sliderProgressVar]: `${valuePercent}%`,
78
- [colorSliderCSSVars.thumbColorVar]: channel === 'hue' ? `hsl(${clampedValue}, 100%, 50%)` : createHslColorString(hsvColor),
79
- [colorSliderCSSVars.railColorVar]: channel === 'hue' ? `hsl(${hslColor.h}, ${hslColor.s * 100}%, ${hslColor.l * 100}%)` : `hsl(${hslColor.h}, 100%, 50%)`
76
+ [colorSliderCSSVars.thumbColorVar]: channel === 'hue' ? `hsl(${clampedValue}, 100%, 50%)` : createHslColorString(currentColor),
77
+ [colorSliderCSSVars.railColorVar]: channel === 'hue' ? `hsl(${hslColor.h}, ${hslColor.s * 100}%, ${hslColor.l * 100}%)` : createHslColorString({
78
+ ...currentColor,
79
+ ...channel === 'saturation' ? {
80
+ s: 1
81
+ } : {
82
+ v: 1
83
+ },
84
+ a: 1
85
+ }),
86
+ ...channel !== 'hue' && {
87
+ [colorSliderCSSVars.railColorLowVar]: createHslColorString({
88
+ ...currentColor,
89
+ ...channel === 'saturation' ? {
90
+ s: 0
91
+ } : {
92
+ v: 0
93
+ },
94
+ a: 1
95
+ })
96
+ }
80
97
  };
81
98
  const state = {
82
99
  vertical,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/useColorSlider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n getPartitionedNativeProps,\n useId,\n slot,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { colorSliderCSSVars } from './ColorSlider.constants';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type {\n ColorSliderBaseProps,\n ColorSliderBaseState,\n ColorSliderProps,\n ColorSliderState,\n} from './ColorSlider.types';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\nimport { MIN, HUE_MAX, MAX as COLOR_MAX } from '../../utils/constants';\nimport { getPercent } from '../../utils/getPercent';\nimport { createHsvColor } from '../../utils/createHsvColor';\nimport { clampValue, type ChannelActions, adjustChannel } from '../../utils/adjustChannel';\nimport type { HsvColor } from '../../types/color';\nimport { INITIAL_COLOR_HSV } from '../../utils/constants';\nimport { createHslColor, createHslColorString } from '../../utils/createHslColor';\n\n/**\n * Create the base state required to render unstyled ColorSlider.\n *\n * The returned state can be modified with hooks before being passed to renderColorSlider_unstable.\n *\n * @param props - props from this instance of ColorSlider\n * @param ref - reference to root HTMLInputElement of ColorSlider\n */\nexport const useColorSliderBase_unstable = (\n props: ColorSliderBaseProps,\n ref: React.Ref<HTMLInputElement>,\n): ColorSliderBaseState => {\n 'use no memo'; // justified: compiler would optimize useColorSlider_unstable — manual opt-out to preserve runtime behavior\n\n const { dir } = useFluent();\n const onChangeFromContext = useColorPickerContextValue_unstable(ctx => ctx.requestChange);\n const colorFromContext = useColorPickerContextValue_unstable(ctx => ctx.color);\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['onChange', 'color'],\n });\n\n const {\n color,\n channel = 'hue',\n onChange = onChangeFromContext,\n vertical,\n // Slots\n root,\n input,\n rail,\n thumb,\n } = props;\n\n const hsvColor = color || colorFromContext;\n const hslColor = createHslColor(hsvColor);\n\n const [currentColor, setCurrentColor] = useControllableState<HsvColor>({\n defaultState: props.defaultColor,\n state: hsvColor,\n initialState: INITIAL_COLOR_HSV,\n });\n\n const MAX = channel === 'hue' ? HUE_MAX : COLOR_MAX;\n\n const valueChannelActions: ChannelActions<number> = {\n hue: clampValue(currentColor.h),\n saturation: clampValue(currentColor.s * 100),\n value: clampValue(currentColor.v * 100),\n };\n\n const clampedValue = adjustChannel(channel, valueChannelActions);\n const valuePercent = getPercent(clampedValue, MIN, MAX);\n\n const inputOnChange = input?.onChange;\n\n const _onChange: React.ChangeEventHandler<HTMLInputElement> = useEventCallback(event => {\n const newValue = Number(event.target.value);\n const colorActions: ChannelActions<() => HsvColor> = {\n hue: () => createHsvColor({ ...hsvColor, h: newValue }),\n saturation: () => createHsvColor({ ...hsvColor, s: newValue / 100 }),\n value: () => createHsvColor({ ...hsvColor, v: newValue / 100 }),\n };\n const newColor = adjustChannel(channel, colorActions)();\n\n setCurrentColor(newColor);\n\n inputOnChange?.(event);\n onChange?.(event, {\n type: 'change',\n event,\n color: newColor,\n });\n });\n\n const rootVariables = {\n [colorSliderCSSVars.sliderDirectionVar]: vertical ? '180deg' : dir === 'ltr' ? '-90deg' : '90deg',\n [colorSliderCSSVars.sliderProgressVar]: `${valuePercent}%`,\n [colorSliderCSSVars.thumbColorVar]:\n channel === 'hue' ? `hsl(${clampedValue}, 100%, 50%)` : createHslColorString(hsvColor),\n [colorSliderCSSVars.railColorVar]:\n channel === 'hue'\n ? `hsl(${hslColor.h}, ${hslColor.s * 100}%, ${hslColor.l * 100}%)`\n : `hsl(${hslColor.h}, 100%, 50%)`,\n };\n\n const state: ColorSliderBaseState = {\n vertical,\n channel,\n components: {\n input: 'input',\n rail: 'div',\n root: 'div',\n thumb: 'div',\n },\n root: slot.always(root, {\n defaultProps: {\n role: 'group',\n ...nativeProps.root,\n },\n elementType: 'div',\n }),\n input: slot.always(input, {\n defaultProps: {\n id: useId('slider-', props.id),\n ref,\n min: MIN,\n max: MAX,\n tabIndex: 0,\n ['aria-orientation']: vertical ? 'vertical' : 'horizontal',\n ...nativeProps.primary,\n type: 'range',\n },\n elementType: 'input',\n }),\n rail: slot.always(rail, { elementType: 'div' }),\n thumb: slot.always(thumb, { elementType: 'div' }),\n };\n\n // Root props\n state.root.style = {\n ...rootVariables,\n ...state.root.style,\n };\n\n // Input Props\n state.input.value = clampedValue;\n state.input.onChange = _onChange;\n return state;\n};\n\n/**\n * Create the state required to render ColorSlider.\n *\n * The returned state can be modified with hooks such as useColorSliderStyles_unstable,\n * before being passed to renderColorSlider_unstable.\n *\n * @param props - props from this instance of ColorSlider\n * @param ref - reference to root HTMLInputElement of ColorSlider\n */\nexport const useColorSlider_unstable = (\n props: ColorSliderProps,\n ref: React.Ref<HTMLInputElement>,\n): ColorSliderState => {\n const shapeFromContext = useColorPickerContextValue_unstable(ctx => ctx.shape);\n\n const { shape = shapeFromContext, ...baseProps } = props;\n\n const state: ColorSliderState = {\n ...useColorSliderBase_unstable(baseProps, ref),\n shape,\n };\n\n return state;\n};\n"],"names":["getPartitionedNativeProps","useId","slot","useControllableState","useEventCallback","colorSliderCSSVars","useFluent_unstable","useFluent","useColorPickerContextValue_unstable","MIN","HUE_MAX","MAX","COLOR_MAX","getPercent","createHsvColor","clampValue","adjustChannel","INITIAL_COLOR_HSV","createHslColor","createHslColorString","useColorSliderBase_unstable","props","ref","dir","onChangeFromContext","ctx","requestChange","colorFromContext","color","nativeProps","primarySlotTagName","excludedPropNames","channel","onChange","vertical","root","input","rail","thumb","hsvColor","hslColor","currentColor","setCurrentColor","defaultState","defaultColor","state","initialState","valueChannelActions","hue","h","saturation","s","value","v","clampedValue","valuePercent","inputOnChange","_onChange","event","newValue","Number","target","colorActions","newColor","type","rootVariables","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","l","components","always","defaultProps","role","elementType","id","min","max","tabIndex","primary","style","useColorSlider_unstable","shapeFromContext","shape","baseProps"],"mappings":"AAAA;AAGA,SACEA,yBAAyB,EACzBC,KAAK,EACLC,IAAI,EACJC,oBAAoB,EACpBC,gBAAgB,QACX,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAOlF,SAASC,mCAAmC,QAAQ,gCAA6B;AACjF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAOC,SAAS,QAAQ,2BAAwB;AACvE,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,UAAU,EAAuBC,aAAa,QAAQ,+BAA4B;AAE3F,SAASC,iBAAiB,QAAQ,2BAAwB;AAC1D,SAASC,cAAc,EAAEC,oBAAoB,QAAQ,gCAA6B;AAElF;;;;;;;CAOC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,eAAe,2GAA2G;IAE1H,MAAM,EAAEC,GAAG,EAAE,GAAGhB;IAChB,MAAMiB,sBAAsBhB,oCAAoCiB,CAAAA,MAAOA,IAAIC,a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7CrC,OAAOpC,KAAKsE,MAAM,CAAClC,OAAO;YAAEqC,aAAa;QAAM;IACjD;IAEA,aAAa;IACb9B,MAAMV,IAAI,CAAC8C,KAAK,GAAG;QACjB,GAAGhB,aAAa;QAChB,GAAGpB,MAAMV,IAAI,CAAC8C,KAAK;IACrB;IAEA,cAAc;IACdpC,MAAMT,KAAK,CAACgB,KAAK,GAAGE;IACpBT,MAAMT,KAAK,CAACH,QAAQ,GAAGwB;IACvB,OAAOZ;AACT,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMqC,0BAA0B,CACrC7D,OACAC;IAEA,MAAM6D,mBAAmB3E,oCAAoCiB,CAAAA,MAAOA,IAAI2D,KAAK;IAE7E,MAAM,EAAEA,QAAQD,gBAAgB,EAAE,GAAGE,WAAW,GAAGhE;IAEnD,MAAMwB,QAA0B;QAC9B,GAAGzB,4BAA4BiE,WAAW/D,IAAI;QAC9C8D;IACF;IAEA,OAAOvC;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/useColorSlider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n getPartitionedNativeProps,\n getPercentInRange,\n useId,\n slot,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { colorSliderCSSVars } from './ColorSlider.constants';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type {\n ColorSliderBaseProps,\n ColorSliderBaseState,\n ColorSliderProps,\n ColorSliderState,\n} from './ColorSlider.types';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\nimport { MIN, HUE_MAX, MAX as COLOR_MAX } from '../../utils/constants';\nimport { createHsvColor } from '../../utils/createHsvColor';\nimport { clampValue, type ChannelActions, adjustChannel } from '../../utils/adjustChannel';\nimport type { HsvColor } from '../../types/color';\nimport { INITIAL_COLOR_HSV } from '../../utils/constants';\nimport { createHslColor, createHslColorString } from '../../utils/createHslColor';\n\n/**\n * Create the base state required to render unstyled ColorSlider.\n *\n * The returned state can be modified with hooks before being passed to renderColorSlider_unstable.\n *\n * @param props - props from this instance of ColorSlider\n * @param ref - reference to root HTMLInputElement of ColorSlider\n */\nexport const useColorSliderBase_unstable = (\n props: ColorSliderBaseProps,\n ref: React.Ref<HTMLInputElement>,\n): ColorSliderBaseState => {\n 'use no memo'; // justified: compiler would optimize useColorSlider_unstable — manual opt-out to preserve runtime behavior\n\n const { dir } = useFluent();\n const onChangeFromContext = useColorPickerContextValue_unstable(ctx => ctx.requestChange);\n const colorFromContext = useColorPickerContextValue_unstable(ctx => ctx.color);\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['onChange', 'color'],\n });\n\n const {\n color,\n channel = 'hue',\n onChange = onChangeFromContext,\n vertical,\n // Slots\n root,\n input,\n rail,\n thumb,\n } = props;\n\n const hslColor = createHslColor(color || colorFromContext);\n const [currentColor, setCurrentColor] = useControllableState<HsvColor>({\n defaultState: props.defaultColor,\n state: color || colorFromContext,\n initialState: INITIAL_COLOR_HSV,\n });\n\n const MAX = channel === 'hue' ? HUE_MAX : COLOR_MAX;\n\n const valueChannelActions: ChannelActions<number> = {\n hue: clampValue(currentColor.h),\n saturation: clampValue(currentColor.s * 100),\n value: clampValue(currentColor.v * 100),\n };\n\n const clampedValue = adjustChannel(channel, valueChannelActions);\n const valuePercent = getPercentInRange(clampedValue, MIN, MAX);\n\n const inputOnChange = input?.onChange;\n\n const _onChange: React.ChangeEventHandler<HTMLInputElement> = useEventCallback(event => {\n const newValue = Number(event.target.value);\n const colorActions: ChannelActions<() => HsvColor> = {\n hue: () => createHsvColor({ ...currentColor, h: newValue }),\n saturation: () => createHsvColor({ ...currentColor, s: newValue / 100 }),\n value: () => createHsvColor({ ...currentColor, v: newValue / 100 }),\n };\n const newColor = adjustChannel(channel, colorActions)();\n\n setCurrentColor(newColor);\n\n inputOnChange?.(event);\n onChange?.(event, {\n type: 'change',\n event,\n color: newColor,\n });\n });\n\n const rootVariables = {\n [colorSliderCSSVars.sliderDirectionVar]: vertical ? '180deg' : dir === 'ltr' ? '-90deg' : '90deg',\n [colorSliderCSSVars.sliderProgressVar]: `${valuePercent}%`,\n [colorSliderCSSVars.thumbColorVar]:\n channel === 'hue' ? `hsl(${clampedValue}, 100%, 50%)` : createHslColorString(currentColor),\n [colorSliderCSSVars.railColorVar]:\n channel === 'hue'\n ? `hsl(${hslColor.h}, ${hslColor.s * 100}%, ${hslColor.l * 100}%)`\n : createHslColorString({\n ...currentColor,\n ...(channel === 'saturation' ? { s: 1 } : { v: 1 }),\n a: 1,\n }),\n ...(channel !== 'hue' && {\n [colorSliderCSSVars.railColorLowVar]: createHslColorString({\n ...currentColor,\n ...(channel === 'saturation' ? { s: 0 } : { v: 0 }),\n a: 1,\n }),\n }),\n };\n\n const state: ColorSliderBaseState = {\n vertical,\n channel,\n components: {\n input: 'input',\n rail: 'div',\n root: 'div',\n thumb: 'div',\n },\n root: slot.always(root, {\n defaultProps: {\n role: 'group',\n ...nativeProps.root,\n },\n elementType: 'div',\n }),\n input: slot.always(input, {\n defaultProps: {\n id: useId('slider-', props.id),\n ref,\n min: MIN,\n max: MAX,\n tabIndex: 0,\n ['aria-orientation']: vertical ? 'vertical' : 'horizontal',\n ...nativeProps.primary,\n type: 'range',\n },\n elementType: 'input',\n }),\n rail: slot.always(rail, { elementType: 'div' }),\n thumb: slot.always(thumb, { elementType: 'div' }),\n };\n\n // Root props\n state.root.style = {\n ...rootVariables,\n ...state.root.style,\n };\n\n // Input Props\n state.input.value = clampedValue;\n state.input.onChange = _onChange;\n return state;\n};\n\n/**\n * Create the state required to render ColorSlider.\n *\n * The returned state can be modified with hooks such as useColorSliderStyles_unstable,\n * before being passed to renderColorSlider_unstable.\n *\n * @param props - props from this instance of ColorSlider\n * @param ref - reference to root HTMLInputElement of ColorSlider\n */\nexport const useColorSlider_unstable = (\n props: ColorSliderProps,\n ref: React.Ref<HTMLInputElement>,\n): ColorSliderState => {\n const shapeFromContext = useColorPickerContextValue_unstable(ctx => ctx.shape);\n\n const { shape = shapeFromContext, ...baseProps } = props;\n\n const state: ColorSliderState = {\n ...useColorSliderBase_unstable(baseProps, ref),\n shape,\n };\n\n return state;\n};\n"],"names":["getPartitionedNativeProps","getPercentInRange","useId","slot","useControllableState","useEventCallback","colorSliderCSSVars","useFluent_unstable","useFluent","useColorPickerContextValue_unstable","MIN","HUE_MAX","MAX","COLOR_MAX","createHsvColor","clampValue","adjustChannel","INITIAL_COLOR_HSV","createHslColor","createHslColorString","useColorSliderBase_unstable","props","ref","dir","onChangeFromContext","ctx","requestChange","colorFromContext","color","nativeProps","primarySlotTagName","excludedPropNames","channel","onChange","vertical","root","input","rail","thumb","hslColor","currentColor","setCurrentColor","defaultState","defaultColor","state","initialState","valueChannelActions","hue","h","saturation","s","value","v","clampedValue","valuePercent","inputOnChange","_onChange","event","newValue","Number","target","colorActions","newColor","type","rootVariables","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","l","a","railColorLowVar","components","always","defaultProps","role","elementType","id","min","max","tabIndex","primary","style","useColorSlider_unstable","shapeFromContext","shape","baseProps"],"mappings":"AAAA;AAGA,SACEA,yBAAyB,EACzBC,iBAAiB,EACjBC,KAAK,EACLC,IAAI,EACJC,oBAAoB,EACpBC,gBAAgB,QACX,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAOlF,SAASC,mCAAmC,QAAQ,gCAA6B;AACjF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAOC,SAAS,QAAQ,2BAAwB;AACvE,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,UAAU,EAAuBC,aAAa,QAAQ,+BAA4B;AAE3F,SAASC,iBAAiB,QAAQ,2BAAwB;AAC1D,SAASC,cAAc,EAAEC,oBAAoB,QAAQ,gCAA6B;AAElF;;;;;;;CAOC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,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N,GAAG9C,YAAYM,IAAI;YACrB;YACAyC,aAAa;QACf;QACAxC,OAAOjC,KAAKsE,MAAM,CAACrC,OAAO;YACxBsC,cAAc;gBACZG,IAAI3E,MAAM,WAAWmB,MAAMwD,EAAE;gBAC7BvD;gBACAwD,KAAKpE;gBACLqE,KAAKnE;gBACLoE,UAAU;gBACV,CAAC,mBAAmB,EAAE9C,WAAW,aAAa;gBAC9C,GAAGL,YAAYoD,OAAO;gBACtBlB,MAAM;YACR;YACAa,aAAa;QACf;QACAvC,MAAMlC,KAAKsE,MAAM,CAACpC,MAAM;YAAEuC,aAAa;QAAM;QAC7CtC,OAAOnC,KAAKsE,MAAM,CAACnC,OAAO;YAAEsC,aAAa;QAAM;IACjD;IAEA,aAAa;IACbhC,MAAMT,IAAI,CAAC+C,KAAK,GAAG;QACjB,GAAGlB,aAAa;QAChB,GAAGpB,MAAMT,IAAI,CAAC+C,KAAK;IACrB;IAEA,cAAc;IACdtC,MAAMR,KAAK,CAACe,KAAK,GAAGE;IACpBT,MAAMR,KAAK,CAACH,QAAQ,GAAGuB;IACvB,OAAOZ;AACT,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMuC,0BAA0B,CACrC9D,OACAC;IAEA,MAAM8D,mBAAmB3E,oCAAoCgB,CAAAA,MAAOA,IAAI4D,KAAK;IAE7E,MAAM,EAAEA,QAAQD,gBAAgB,EAAE,GAAGE,WAAW,GAAGjE;IAEnD,MAAMuB,QAA0B;QAC9B,GAAGxB,4BAA4BkE,WAAWhE,IAAI;QAC9C+D;IACF;IAEA,OAAOzC;AACT,EAAE"}
@@ -10,6 +10,7 @@ export const colorSliderClassNames = {
10
10
  input: 'fui-ColorSlider__input'
11
11
  };
12
12
  const hueBackground = `linear-gradient(${ /*#__PURE__*/[`var(${colorSliderCSSVars.sliderDirectionVar})`, 'red', 'fuchsia', 'blue', 'aqua', 'lime', 'yellow', 'red'].join(',')})`;
13
+ const channelBackground = `linear-gradient(var(${colorSliderCSSVars.sliderDirectionVar}), var(${colorSliderCSSVars.railColorVar}), var(${colorSliderCSSVars.railColorLowVar}))`;
13
14
  /**
14
15
  * Styles for the root slot
15
16
  */
@@ -33,13 +34,13 @@ const useChannelStyles = /*#__PURE__*/__styles({
33
34
  Bcmaq0h: "f1curpo1"
34
35
  },
35
36
  saturation: {
36
- Bcmaq0h: ["fdhcg5e", "f1onqon0"]
37
+ Bcmaq0h: "f1vl4pgh"
37
38
  },
38
39
  value: {
39
- Bcmaq0h: ["f1r1ueul", "fbtriqu"]
40
+ Bcmaq0h: "f1vl4pgh"
40
41
  }
41
42
  }, {
42
- d: [".f1curpo1{background-image:linear-gradient(var(--fui-Slider--direction),red,fuchsia,blue,aqua,lime,yellow,red);}", ".fdhcg5e{background-image:linear-gradient(to right, #808080, var(--fui-Slider__rail--color));}", ".f1onqon0{background-image:linear-gradient(to left, #808080, var(--fui-Slider__rail--color));}", ".f1r1ueul{background-image:linear-gradient(to right, #000, var(--fui-Slider__rail--color));}", ".fbtriqu{background-image:linear-gradient(to left, #000, var(--fui-Slider__rail--color));}"]
43
+ d: [".f1curpo1{background-image:linear-gradient(var(--fui-Slider--direction),red,fuchsia,blue,aqua,lime,yellow,red);}", ".f1vl4pgh{background-image:linear-gradient(var(--fui-Slider--direction), var(--fui-Slider__rail--color), var(--fui-Slider__rail--color-low));}"]
43
44
  });
44
45
  /**
45
46
  * Styles for the rail slot
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","__resetStyles","mergeClasses","tokens","colorSliderCSSVars","colorSliderClassNames","root","rail","thumb","input","hueBackground","sliderDirectionVar","join","useRootStyles","useStyles","horizontal","Bf4jedk","wkccdc","Budl1dq","vertical","sshi5w","d","useChannelStyles","hue","Bcmaq0h","saturation","value","useRailStyles","Bkecrkj","Ijaq50","nk6f5a","Br312pm","Bw0ie65","qhf8xq","Bvjb7m6","Bpd4iqm","oeaueh","Bw0xxkn","Ftih45","Brfgrao","a9b677","Bqenvij","Fbdkly","mdwyqc","Baz25je","Ccq8qp","Bciustq","lawp4y","useThumbStyles","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","E5pizo","De3pzq","gc50h5","r59vdv","Budzafs","ck0cow","n07z76","Gng75u","Bcvre1j","Bcgcnre","Bqjgrrk","qa3bma","y0oebl","Biqmznv","Bm6vgfq","Bbv0w2i","uvfttm","eqrjj","Bk5zm6e","m598lv","B4f6apu","ydt019","Bq4z7u6","Bdkvgpv","B0qfbqy","kj8mxx","Bz10aip","oyh7mz","B5kzvoi","p","useShapeStyles","rounded","square","useInputStyles","Bceei9c","abs64n","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","jo39rj","C5zqim","Bdlbwnu","B8rk77i","Bbzx7hc","Hwkvcz","B0nnt1c","Brwsv5j","B2b7vog","B4hmq5e","B8jxwem","B18nadz","Ddg5ig","Byj09el","Dac2s3","Dd2y6r","Bk0t58e","Ewenww","Brqi8qb","zz3kca","low6xx","d0s10n","wea7l5","olu5tv","g5nsvh","Bqvnfwh","Biqzhck","kgocjf","i","useColorSliderStyles_unstable","state","rootStyles","styles","railStyles","thumbStyles","inputStyles","shapeStyles","channelStyles","isVertical","className","channel","shape"],"sources":["useColorSliderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, makeResetStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { colorSliderCSSVars } from \"./ColorSlider.constants.js\";\nexport const colorSliderClassNames = {\n root: 'fui-ColorSlider',\n rail: 'fui-ColorSlider__rail',\n thumb: 'fui-ColorSlider__thumb',\n input: 'fui-ColorSlider__input'\n};\nconst hueBackground = `linear-gradient(${[\n `var(${colorSliderCSSVars.sliderDirectionVar})`,\n 'red',\n 'fuchsia',\n 'blue',\n 'aqua',\n 'lime',\n 'yellow',\n 'red'\n].join(',')})`;\n/**\n * Styles for the root slot\n */ const useRootStyles = makeResetStyles({\n position: 'relative',\n display: 'inline-grid',\n touchAction: 'none',\n alignItems: 'center',\n justifyItems: 'center',\n [colorSliderCSSVars.thumbSizeVar]: '20px',\n [colorSliderCSSVars.railSizeVar]: '20px',\n minHeight: '32px'\n});\nconst useStyles = makeStyles({\n horizontal: {\n minWidth: '200px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n gridTemplateColumns: `1fr 100% 1fr`\n },\n vertical: {\n minHeight: '280px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr 100% 1fr`,\n gridTemplateColumns: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`\n }\n});\nconst useChannelStyles = makeStyles({\n hue: {\n backgroundImage: hueBackground\n },\n saturation: {\n backgroundImage: `linear-gradient(to right, #808080, var(${colorSliderCSSVars.railColorVar}))`\n },\n value: {\n backgroundImage: `linear-gradient(to right, #000, var(${colorSliderCSSVars.railColorVar}))`\n }\n});\n/**\n * Styles for the rail slot\n */ const useRailStyles = makeStyles({\n rail: {\n pointerEvents: 'none',\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'relative',\n forcedColorAdjust: 'none',\n outlineWidth: '1px',\n outlineStyle: 'solid',\n outlineColor: tokens.colorTransparentStroke,\n '::before': {\n content: \"''\",\n position: 'absolute'\n }\n },\n horizontal: {\n width: '100%',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n '::before': {\n left: '-1px',\n right: '-1px',\n height: `var(${colorSliderCSSVars.railSizeVar})`\n }\n },\n vertical: {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n height: '100%',\n '::before': {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n top: '-1px',\n bottom: '1px'\n }\n }\n});\n/**\n * Styles for the thumb slot\n */ const useThumbStyles = makeStyles({\n thumb: {\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'absolute',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n pointerEvents: 'none',\n outlineStyle: 'none',\n forcedColorAdjust: 'none',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralForeground4}`,\n boxShadow: tokens.shadow4,\n backgroundColor: `var(${colorSliderCSSVars.thumbColorVar})`,\n '::before': {\n position: 'absolute',\n inset: '0px',\n borderRadius: tokens.borderRadiusCircular,\n boxSizing: 'border-box',\n content: \"''\",\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralBackground1}`\n }\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${colorSliderCSSVars.sliderProgressVar})`\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${colorSliderCSSVars.sliderProgressVar})`\n }\n});\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium\n },\n square: {\n borderRadius: tokens.borderRadiusNone\n }\n});\n/**\n * Styles for the Input slot\n */ const useInputStyles = makeStyles({\n input: {\n cursor: 'pointer',\n opacity: 0,\n gridRowStart: '1',\n gridRowEnd: '-1',\n gridColumnStart: '1',\n gridColumnEnd: '-1',\n padding: '0',\n margin: '0',\n [`:focus-visible ~ .${colorSliderClassNames.thumb}`]: {\n border: `2px solid ${tokens.colorStrokeFocus2}`,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusCircular\n }\n },\n horizontal: {\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n width: '100%'\n },\n vertical: {\n height: '100%',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n 'writing-mode': 'vertical-lr',\n direction: 'rtl'\n }\n});\n/**\n * Apply styling to the ColorSlider slots based on the state\n */ export const useColorSliderStyles_unstable = (state)=>{\n const rootStyles = useRootStyles();\n const styles = useStyles();\n const railStyles = useRailStyles();\n const thumbStyles = useThumbStyles();\n const inputStyles = useInputStyles();\n const shapeStyles = useShapeStyles();\n const channelStyles = useChannelStyles();\n const isVertical = state.vertical;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(colorSliderClassNames.root, rootStyles, isVertical ? styles.vertical : styles.horizontal, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(colorSliderClassNames.rail, railStyles.rail, channelStyles[state.channel || 'hue'], shapeStyles[state.shape || 'rounded'], isVertical ? railStyles.vertical : railStyles.horizontal, state.rail.className);\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(colorSliderClassNames.thumb, thumbStyles.thumb, isVertical ? thumbStyles.vertical : thumbStyles.horizontal, state.thumb.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(colorSliderClassNames.input, inputStyles.input, isVertical ? inputStyles.vertical : inputStyles.horizontal, state.input.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAAC,aAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,QAAQ,4BAA4B;AAC/D,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE,uBAAuB;EAC7BC,KAAK,EAAE,wBAAwB;EAC/BC,KAAK,EAAE;AACX,CAAC;AACD,MAAMC,aAAa,GAAG,iCAAmB,CACrC,OAAON,kBAAkB,CAACO,kBAAkB,GAAG,EAC/C,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,KAAK,CACR,CAACC,IAAI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ACAgI,KAAK,CAAC7I,IAAI,CAACsJ,SAAS,GAAG1J,YAAY,CAACG,qBAAqB,CAACC,IAAI,EAAE8I,UAAU,EAAEO,UAAU,GAAGN,MAAM,CAAClI,QAAQ,GAAGkI,MAAM,CAACtI,UAAU,EAAEoI,KAAK,CAAC7I,IAAI,CAACsJ,SAAS,CAAC;EACnJ;EACAT,KAAK,CAAC5I,IAAI,CAACqJ,SAAS,GAAG1J,YAAY,CAACG,qBAAqB,CAACE,IAAI,EAAE+I,UAAU,CAAC/I,IAAI,EAAEmJ,aAAa,CAACP,KAAK,CAACU,OAAO,IAAI,KAAK,CAAC,EAAEJ,WAAW,CAACN,KAAK,CAACW,KAAK,IAAI,SAAS,CAAC,EAAEH,UAAU,GAAGL,UAAU,CAACnI,QAAQ,GAAGmI,UAAU,CAACvI,UAAU,EAAEoI,KAAK,CAAC5I,IAAI,CAACqJ,SAAS,CAAC;EAC9O;EACAT,KAAK,CAAC3I,KAAK,CAACoJ,SAAS,GAAG1J,YAAY,CAACG,qBAAqB,CAACG,KAAK,EAAE+I,WAAW,CAAC/I,KAAK,EAAEmJ,UAAU,GAAGJ,WAAW,CAACpI,QAAQ,GAAGoI,WAAW,CAACxI,UAAU,EAAEoI,KAAK,CAAC3I,KAAK,CAACoJ,SAAS,CAAC;EACvK;EACAT,KAAK,CAAC1I,KAAK,CAACmJ,SAAS,GAAG1J,YAAY,CAACG,qBAAqB,CAACI,KAAK,EAAE+I,WAAW,CAAC/I,KAAK,EAAEkJ,UAAU,GAAGH,WAAW,CAACrI,QAAQ,GAAGqI,WAAW,CAACzI,UAAU,EAAEoI,KAAK,CAAC1I,KAAK,CAACmJ,SAAS,CAAC;EACvK,OAAOT,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","__resetStyles","mergeClasses","tokens","colorSliderCSSVars","colorSliderClassNames","root","rail","thumb","input","hueBackground","sliderDirectionVar","join","channelBackground","railColorVar","railColorLowVar","useRootStyles","useStyles","horizontal","Bf4jedk","wkccdc","Budl1dq","vertical","sshi5w","d","useChannelStyles","hue","Bcmaq0h","saturation","value","useRailStyles","Bkecrkj","Ijaq50","nk6f5a","Br312pm","Bw0ie65","qhf8xq","Bvjb7m6","Bpd4iqm","oeaueh","Bw0xxkn","Ftih45","Brfgrao","a9b677","Bqenvij","Fbdkly","mdwyqc","Baz25je","Ccq8qp","Bciustq","lawp4y","useThumbStyles","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","E5pizo","De3pzq","gc50h5","r59vdv","Budzafs","ck0cow","n07z76","Gng75u","Bcvre1j","Bcgcnre","Bqjgrrk","qa3bma","y0oebl","Biqmznv","Bm6vgfq","Bbv0w2i","uvfttm","eqrjj","Bk5zm6e","m598lv","B4f6apu","ydt019","Bq4z7u6","Bdkvgpv","B0qfbqy","kj8mxx","Bz10aip","oyh7mz","B5kzvoi","p","useShapeStyles","rounded","square","useInputStyles","Bceei9c","abs64n","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","jo39rj","C5zqim","Bdlbwnu","B8rk77i","Bbzx7hc","Hwkvcz","B0nnt1c","Brwsv5j","B2b7vog","B4hmq5e","B8jxwem","B18nadz","Ddg5ig","Byj09el","Dac2s3","Dd2y6r","Bk0t58e","Ewenww","Brqi8qb","zz3kca","low6xx","d0s10n","wea7l5","olu5tv","g5nsvh","Bqvnfwh","Biqzhck","kgocjf","i","useColorSliderStyles_unstable","state","rootStyles","styles","railStyles","thumbStyles","inputStyles","shapeStyles","channelStyles","isVertical","className","channel","shape"],"sources":["useColorSliderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, makeResetStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { colorSliderCSSVars } from \"./ColorSlider.constants.js\";\nexport const colorSliderClassNames = {\n root: 'fui-ColorSlider',\n rail: 'fui-ColorSlider__rail',\n thumb: 'fui-ColorSlider__thumb',\n input: 'fui-ColorSlider__input'\n};\nconst hueBackground = `linear-gradient(${[\n `var(${colorSliderCSSVars.sliderDirectionVar})`,\n 'red',\n 'fuchsia',\n 'blue',\n 'aqua',\n 'lime',\n 'yellow',\n 'red'\n].join(',')})`;\nconst channelBackground = `linear-gradient(var(${colorSliderCSSVars.sliderDirectionVar}), var(${colorSliderCSSVars.railColorVar}), var(${colorSliderCSSVars.railColorLowVar}))`;\n/**\n * Styles for the root slot\n */ const useRootStyles = makeResetStyles({\n position: 'relative',\n display: 'inline-grid',\n touchAction: 'none',\n alignItems: 'center',\n justifyItems: 'center',\n [colorSliderCSSVars.thumbSizeVar]: '20px',\n [colorSliderCSSVars.railSizeVar]: '20px',\n minHeight: '32px'\n});\nconst useStyles = makeStyles({\n horizontal: {\n minWidth: '200px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n gridTemplateColumns: `1fr 100% 1fr`\n },\n vertical: {\n minHeight: '280px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr 100% 1fr`,\n gridTemplateColumns: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`\n }\n});\nconst useChannelStyles = makeStyles({\n hue: {\n backgroundImage: hueBackground\n },\n saturation: {\n backgroundImage: channelBackground\n },\n value: {\n backgroundImage: channelBackground\n }\n});\n/**\n * Styles for the rail slot\n */ const useRailStyles = makeStyles({\n rail: {\n pointerEvents: 'none',\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'relative',\n forcedColorAdjust: 'none',\n outlineWidth: '1px',\n outlineStyle: 'solid',\n outlineColor: tokens.colorTransparentStroke,\n '::before': {\n content: \"''\",\n position: 'absolute'\n }\n },\n horizontal: {\n width: '100%',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n '::before': {\n left: '-1px',\n right: '-1px',\n height: `var(${colorSliderCSSVars.railSizeVar})`\n }\n },\n vertical: {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n height: '100%',\n '::before': {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n top: '-1px',\n bottom: '1px'\n }\n }\n});\n/**\n * Styles for the thumb slot\n */ const useThumbStyles = makeStyles({\n thumb: {\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'absolute',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n pointerEvents: 'none',\n outlineStyle: 'none',\n forcedColorAdjust: 'none',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralForeground4}`,\n boxShadow: tokens.shadow4,\n backgroundColor: `var(${colorSliderCSSVars.thumbColorVar})`,\n '::before': {\n position: 'absolute',\n inset: '0px',\n borderRadius: tokens.borderRadiusCircular,\n boxSizing: 'border-box',\n content: \"''\",\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralBackground1}`\n }\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${colorSliderCSSVars.sliderProgressVar})`\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${colorSliderCSSVars.sliderProgressVar})`\n }\n});\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium\n },\n square: {\n borderRadius: tokens.borderRadiusNone\n }\n});\n/**\n * Styles for the Input slot\n */ const useInputStyles = makeStyles({\n input: {\n cursor: 'pointer',\n opacity: 0,\n gridRowStart: '1',\n gridRowEnd: '-1',\n gridColumnStart: '1',\n gridColumnEnd: '-1',\n padding: '0',\n margin: '0',\n [`:focus-visible ~ .${colorSliderClassNames.thumb}`]: {\n border: `2px solid ${tokens.colorStrokeFocus2}`,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusCircular\n }\n },\n horizontal: {\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n width: '100%'\n },\n vertical: {\n height: '100%',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n 'writing-mode': 'vertical-lr',\n direction: 'rtl'\n }\n});\n/**\n * Apply styling to the ColorSlider slots based on the state\n */ export const useColorSliderStyles_unstable = (state)=>{\n const rootStyles = useRootStyles();\n const styles = useStyles();\n const railStyles = useRailStyles();\n const thumbStyles = useThumbStyles();\n const inputStyles = useInputStyles();\n const shapeStyles = useShapeStyles();\n const channelStyles = useChannelStyles();\n const isVertical = state.vertical;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(colorSliderClassNames.root, rootStyles, isVertical ? styles.vertical : styles.horizontal, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(colorSliderClassNames.rail, railStyles.rail, channelStyles[state.channel || 'hue'], shapeStyles[state.shape || 'rounded'], isVertical ? railStyles.vertical : railStyles.horizontal, state.rail.className);\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(colorSliderClassNames.thumb, thumbStyles.thumb, isVertical ? thumbStyles.vertical : thumbStyles.horizontal, state.thumb.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(colorSliderClassNames.input, inputStyles.input, isVertical ? inputStyles.vertical : inputStyles.horizontal, state.input.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAAC,aAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,QAAQ,4BAA4B;AAC/D,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE,iBAAi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SAAS,GAAG7J,YAAY,CAACG,qBAAqB,CAACI,KAAK,EAAEkJ,WAAW,CAAClJ,KAAK,EAAEqJ,UAAU,GAAGH,WAAW,CAACrI,QAAQ,GAAGqI,WAAW,CAACzI,UAAU,EAAEoI,KAAK,CAAC7I,KAAK,CAACsJ,SAAS,CAAC;EACvK,OAAOT,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -18,6 +18,7 @@ const hueBackground = `linear-gradient(${[
18
18
  'yellow',
19
19
  'red'
20
20
  ].join(',')})`;
21
+ const channelBackground = `linear-gradient(var(${colorSliderCSSVars.sliderDirectionVar}), var(${colorSliderCSSVars.railColorVar}), var(${colorSliderCSSVars.railColorLowVar}))`;
21
22
  /**
22
23
  * Styles for the root slot
23
24
  */ const useRootStyles = makeResetStyles({
@@ -49,10 +50,10 @@ const useChannelStyles = makeStyles({
49
50
  backgroundImage: hueBackground
50
51
  },
51
52
  saturation: {
52
- backgroundImage: `linear-gradient(to right, #808080, var(${colorSliderCSSVars.railColorVar}))`
53
+ backgroundImage: channelBackground
53
54
  },
54
55
  value: {
55
- backgroundImage: `linear-gradient(to right, #000, var(${colorSliderCSSVars.railColorVar}))`
56
+ backgroundImage: channelBackground
56
57
  }
57
58
  });
58
59
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ColorSlider/useColorSliderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ColorSliderSlots, ColorSliderState } from './ColorSlider.types';\nimport { colorSliderCSSVars } from './ColorSlider.constants';\n\nexport const colorSliderClassNames: SlotClassNames<ColorSliderSlots> = {\n root: 'fui-ColorSlider',\n rail: 'fui-ColorSlider__rail',\n thumb: 'fui-ColorSlider__thumb',\n input: 'fui-ColorSlider__input',\n};\n\nconst hueBackground = `linear-gradient(${[\n `var(${colorSliderCSSVars.sliderDirectionVar})`,\n 'red',\n 'fuchsia',\n 'blue',\n 'aqua',\n 'lime',\n 'yellow',\n 'red',\n].join(',')})`;\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeResetStyles({\n position: 'relative',\n display: 'inline-grid',\n touchAction: 'none',\n alignItems: 'center',\n justifyItems: 'center',\n [colorSliderCSSVars.thumbSizeVar]: '20px',\n [colorSliderCSSVars.railSizeVar]: '20px',\n minHeight: '32px',\n});\n\nconst useStyles = makeStyles({\n horizontal: {\n minWidth: '200px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n gridTemplateColumns: `1fr 100% 1fr`,\n },\n\n vertical: {\n minHeight: '280px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr 100% 1fr`,\n gridTemplateColumns: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n },\n});\n\nconst useChannelStyles = makeStyles({\n hue: {\n backgroundImage: hueBackground,\n },\n saturation: {\n backgroundImage: `linear-gradient(to right, #808080, var(${colorSliderCSSVars.railColorVar}))`,\n },\n value: {\n backgroundImage: `linear-gradient(to right, #000, var(${colorSliderCSSVars.railColorVar}))`,\n },\n});\n\n/**\n * Styles for the rail slot\n */\nconst useRailStyles = makeStyles({\n rail: {\n pointerEvents: 'none',\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'relative',\n forcedColorAdjust: 'none',\n outlineWidth: '1px',\n outlineStyle: 'solid',\n outlineColor: tokens.colorTransparentStroke,\n '::before': {\n content: \"''\",\n position: 'absolute',\n },\n },\n\n horizontal: {\n width: '100%',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n '::before': {\n left: '-1px',\n right: '-1px',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n },\n },\n\n vertical: {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n height: '100%',\n '::before': {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n top: '-1px',\n bottom: '1px',\n },\n },\n});\n\n/**\n * Styles for the thumb slot\n */\nconst useThumbStyles = makeStyles({\n thumb: {\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'absolute',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n pointerEvents: 'none',\n outlineStyle: 'none',\n forcedColorAdjust: 'none',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralForeground4}`,\n boxShadow: tokens.shadow4,\n backgroundColor: `var(${colorSliderCSSVars.thumbColorVar})`,\n '::before': {\n position: 'absolute',\n inset: '0px',\n borderRadius: tokens.borderRadiusCircular,\n boxSizing: 'border-box',\n content: \"''\",\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralBackground1}`,\n },\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${colorSliderCSSVars.sliderProgressVar})`,\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${colorSliderCSSVars.sliderProgressVar})`,\n },\n});\n\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium,\n },\n square: {\n borderRadius: tokens.borderRadiusNone,\n },\n});\n\n/**\n * Styles for the Input slot\n */\nconst useInputStyles = makeStyles({\n input: {\n cursor: 'pointer',\n opacity: 0,\n gridRowStart: '1',\n gridRowEnd: '-1',\n gridColumnStart: '1',\n gridColumnEnd: '-1',\n padding: '0',\n margin: '0',\n [`:focus-visible ~ .${colorSliderClassNames.thumb}`]: {\n border: `2px solid ${tokens.colorStrokeFocus2}`,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusCircular,\n },\n },\n horizontal: {\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n width: '100%',\n },\n vertical: {\n height: '100%',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n 'writing-mode': 'vertical-lr',\n direction: 'rtl',\n },\n});\n\n/**\n * Apply styling to the ColorSlider slots based on the state\n */\nexport const useColorSliderStyles_unstable = (state: ColorSliderState): ColorSliderState => {\n const rootStyles = useRootStyles();\n const styles = useStyles();\n const railStyles = useRailStyles();\n const thumbStyles = useThumbStyles();\n const inputStyles = useInputStyles();\n const shapeStyles = useShapeStyles();\n const channelStyles = useChannelStyles();\n const isVertical = state.vertical;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n colorSliderClassNames.root,\n rootStyles,\n isVertical ? styles.vertical : styles.horizontal,\n state.root.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(\n colorSliderClassNames.rail,\n railStyles.rail,\n channelStyles[state.channel || 'hue'],\n shapeStyles[state.shape || 'rounded'],\n isVertical ? railStyles.vertical : railStyles.horizontal,\n state.rail.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n colorSliderClassNames.thumb,\n thumbStyles.thumb,\n isVertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(\n colorSliderClassNames.input,\n inputStyles.input,\n isVertical ? inputStyles.vertical : inputStyles.horizontal,\n state.input.className,\n );\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","tokens","colorSliderCSSVars","colorSliderClassNames","root","rail","thumb","input","hueBackground","sliderDirectionVar","join","useRootStyles","position","display","touchAction","alignItems","justifyItems","thumbSizeVar","railSizeVar","minHeight","useStyles","horizontal","minWidth","gridTemplateRows","gridTemplateColumns","vertical","useChannelStyles","hue","backgroundImage","saturation","railColorVar","value","useRailStyles","pointerEvents","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","forcedColorAdjust","outlineWidth","outlineStyle","outlineColor","colorTransparentStroke","content","width","height","left","right","top","bottom","useThumbStyles","borderRadius","borderRadiusCircular","border","strokeWidthThin","colorNeutralForeground4","boxShadow","shadow4","backgroundColor","thumbColorVar","inset","boxSizing","strokeWidthThick","colorNeutralBackground1","transform","sliderProgressVar","useShapeStyles","rounded","borderRadiusMedium","square","borderRadiusNone","useInputStyles","cursor","opacity","padding","margin","colorStrokeFocus2","outline","direction","useColorSliderStyles_unstable","state","rootStyles","styles","railStyles","thumbStyles","inputStyles","shapeStyles","channelStyles","isVertical","className","channel","shape"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAE3E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,kBAAkB,QAAQ,6BAA0B;AAE7D,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;IACNC,MAAM;IACNC,OAAO;IACPC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAgB,CAAC,gBAAgB,EAAE;IACvC,CAAC,IAAI,EAAEN,mBAAmBO,kBAAkB,CAAC,CAAC,CAAC;IAC/C;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAACC,IAAI,CAAC,KAAK,CAAC,CAAC;AAEd;;CAEC,GACD,MAAMC,gBAAgBZ,gBAAgB;IACpCa,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,YAAY;IACZC,cAAc;IACd,CAACd,mBAAmBe,YAAY,CAAC,EAAE;IACnC,CAACf,mBAAmBgB,WAAW,CAAC,EAAE;IAClCC,WAAW;AACb;AAEA,MAAMC,YAAYtB,WAAW;IAC3BuB,YAAY;QACVC,UAAU;QACV,6GAA6G;QAC7GC,kBAAkB,CAAC,QAAQ,EAAErB,mBAAmBe,YAAY,CAAC,KAAK,CAAC;QACnEO,qBAAqB,CAAC,YAAY,CAAC;IACrC;IAEAC,UAAU;QACRN,WAAW;QACX,6GAA6G;QAC7GI,kBAAkB,CAAC,YAAY,CAAC;QAChCC,qBAAqB,CAAC,QAAQ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,KAAK,EACjBiF,aAAaH,YAAY5D,QAAQ,GAAG4D,YAAYhE,UAAU,EAC1D2D,MAAMzE,KAAK,CAACkF,SAAS;IAEvB,OAAOT;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/ColorSlider/useColorSliderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ColorSliderSlots, ColorSliderState } from './ColorSlider.types';\nimport { colorSliderCSSVars } from './ColorSlider.constants';\n\nexport const colorSliderClassNames: SlotClassNames<ColorSliderSlots> = {\n root: 'fui-ColorSlider',\n rail: 'fui-ColorSlider__rail',\n thumb: 'fui-ColorSlider__thumb',\n input: 'fui-ColorSlider__input',\n};\n\nconst hueBackground = `linear-gradient(${[\n `var(${colorSliderCSSVars.sliderDirectionVar})`,\n 'red',\n 'fuchsia',\n 'blue',\n 'aqua',\n 'lime',\n 'yellow',\n 'red',\n].join(',')})`;\nconst channelBackground = `linear-gradient(var(${colorSliderCSSVars.sliderDirectionVar}), var(${colorSliderCSSVars.railColorVar}), var(${colorSliderCSSVars.railColorLowVar}))`;\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeResetStyles({\n position: 'relative',\n display: 'inline-grid',\n touchAction: 'none',\n alignItems: 'center',\n justifyItems: 'center',\n [colorSliderCSSVars.thumbSizeVar]: '20px',\n [colorSliderCSSVars.railSizeVar]: '20px',\n minHeight: '32px',\n});\n\nconst useStyles = makeStyles({\n horizontal: {\n minWidth: '200px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n gridTemplateColumns: `1fr 100% 1fr`,\n },\n\n vertical: {\n minHeight: '280px',\n // 3x3 grid with the rail and thumb in the center cell [2,2] and the hidden input stretching across all cells\n gridTemplateRows: `1fr 100% 1fr`,\n gridTemplateColumns: `1fr var(${colorSliderCSSVars.thumbSizeVar}) 1fr`,\n },\n});\n\nconst useChannelStyles = makeStyles({\n hue: {\n backgroundImage: hueBackground,\n },\n saturation: {\n backgroundImage: channelBackground,\n },\n value: {\n backgroundImage: channelBackground,\n },\n});\n\n/**\n * Styles for the rail slot\n */\nconst useRailStyles = makeStyles({\n rail: {\n pointerEvents: 'none',\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'relative',\n forcedColorAdjust: 'none',\n outlineWidth: '1px',\n outlineStyle: 'solid',\n outlineColor: tokens.colorTransparentStroke,\n '::before': {\n content: \"''\",\n position: 'absolute',\n },\n },\n\n horizontal: {\n width: '100%',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n '::before': {\n left: '-1px',\n right: '-1px',\n height: `var(${colorSliderCSSVars.railSizeVar})`,\n },\n },\n\n vertical: {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n height: '100%',\n '::before': {\n width: `var(${colorSliderCSSVars.railSizeVar})`,\n top: '-1px',\n bottom: '1px',\n },\n },\n});\n\n/**\n * Styles for the thumb slot\n */\nconst useThumbStyles = makeStyles({\n thumb: {\n gridRowStart: '2',\n gridRowEnd: '2',\n gridColumnStart: '2',\n gridColumnEnd: '2',\n position: 'absolute',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n pointerEvents: 'none',\n outlineStyle: 'none',\n forcedColorAdjust: 'none',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralForeground4}`,\n boxShadow: tokens.shadow4,\n backgroundColor: `var(${colorSliderCSSVars.thumbColorVar})`,\n '::before': {\n position: 'absolute',\n inset: '0px',\n borderRadius: tokens.borderRadiusCircular,\n boxSizing: 'border-box',\n content: \"''\",\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralBackground1}`,\n },\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${colorSliderCSSVars.sliderProgressVar})`,\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${colorSliderCSSVars.sliderProgressVar})`,\n },\n});\n\nconst useShapeStyles = makeStyles({\n rounded: {\n borderRadius: tokens.borderRadiusMedium,\n },\n square: {\n borderRadius: tokens.borderRadiusNone,\n },\n});\n\n/**\n * Styles for the Input slot\n */\nconst useInputStyles = makeStyles({\n input: {\n cursor: 'pointer',\n opacity: 0,\n gridRowStart: '1',\n gridRowEnd: '-1',\n gridColumnStart: '1',\n gridColumnEnd: '-1',\n padding: '0',\n margin: '0',\n [`:focus-visible ~ .${colorSliderClassNames.thumb}`]: {\n border: `2px solid ${tokens.colorStrokeFocus2}`,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusCircular,\n },\n },\n horizontal: {\n height: `var(${colorSliderCSSVars.thumbSizeVar})`,\n width: '100%',\n },\n vertical: {\n height: '100%',\n width: `var(${colorSliderCSSVars.thumbSizeVar})`,\n 'writing-mode': 'vertical-lr',\n direction: 'rtl',\n },\n});\n\n/**\n * Apply styling to the ColorSlider slots based on the state\n */\nexport const useColorSliderStyles_unstable = (state: ColorSliderState): ColorSliderState => {\n const rootStyles = useRootStyles();\n const styles = useStyles();\n const railStyles = useRailStyles();\n const thumbStyles = useThumbStyles();\n const inputStyles = useInputStyles();\n const shapeStyles = useShapeStyles();\n const channelStyles = useChannelStyles();\n const isVertical = state.vertical;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n colorSliderClassNames.root,\n rootStyles,\n isVertical ? styles.vertical : styles.horizontal,\n state.root.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(\n colorSliderClassNames.rail,\n railStyles.rail,\n channelStyles[state.channel || 'hue'],\n shapeStyles[state.shape || 'rounded'],\n isVertical ? railStyles.vertical : railStyles.horizontal,\n state.rail.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n colorSliderClassNames.thumb,\n thumbStyles.thumb,\n isVertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(\n colorSliderClassNames.input,\n inputStyles.input,\n isVertical ? inputStyles.vertical : inputStyles.horizontal,\n state.input.className,\n );\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","tokens","colorSliderCSSVars","colorSliderClassNames","root","rail","thumb","input","hueBackground","sliderDirectionVar","join","channelBackground","railColorVar","railColorLowVar","useRootStyles","position","display","touchAction","alignItems","justifyItems","thumbSizeVar","railSizeVar","minHeight","useStyles","horizontal","minWidth","gridTemplateRows","gridTemplateColumns","vertical","useChannelStyles","hue","backgroundImage","saturation","value","useRailStyles","pointerEvents","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","forcedColorAdjust","outlineWidth","outlineStyle","outlineColor","colorTransparentStroke","content","width","height","left","right","top","bottom","useThumbStyles","borderRadius","borderRadiusCircular","border","strokeWidthThin","colorNeutralForeground4","boxShadow","shadow4","backgroundColor","thumbColorVar","inset","boxSizing","strokeWidthThick","colorNeutralBackground1","transform","sliderProgressVar","useShapeStyles","rounded","borderRadiusMedium","square","borderRadiusNone","useInputStyles","cursor","opacity","padding","margin","colorStrokeFocus2","outline","direction","useColorSliderStyles_unstable","state","rootStyles","styles","railStyles","thumbStyles","inputStyles","shapeStyles","channelStyles","isVertical","className","channel","shape"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAE3E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,kBAAkB,QAAQ,6BAA0B;AAE7D,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;IACNC,MAAM;IACNC,OAAO;IACPC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAgB,CAAC,gBAAgB,EAAE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AI,EAC1B+E,YACAO,aAAaN,OAAOxD,QAAQ,GAAGwD,OAAO5D,UAAU,EAChD0D,MAAM9E,IAAI,CAACuF,SAAS;IAGtB,oDAAoD;IACpDT,MAAM7E,IAAI,CAACsF,SAAS,GAAG3F,aACrBG,sBAAsBE,IAAI,EAC1BgF,WAAWhF,IAAI,EACfoF,aAAa,CAACP,MAAMU,OAAO,IAAI,MAAM,EACrCJ,WAAW,CAACN,MAAMW,KAAK,IAAI,UAAU,EACrCH,aAAaL,WAAWzD,QAAQ,GAAGyD,WAAW7D,UAAU,EACxD0D,MAAM7E,IAAI,CAACsF,SAAS;IAGtB,oDAAoD;IACpDT,MAAM5E,KAAK,CAACqF,SAAS,GAAG3F,aACtBG,sBAAsBG,KAAK,EAC3BgF,YAAYhF,KAAK,EACjBoF,aAAaJ,YAAY1D,QAAQ,GAAG0D,YAAY9D,UAAU,EAC1D0D,MAAM5E,KAAK,CAACqF,SAAS;IAGvB,oDAAoD;IACpDT,MAAM3E,KAAK,CAACoF,SAAS,GAAG3F,aACtBG,sBAAsBI,KAAK,EAC3BgF,YAAYhF,KAAK,EACjBmF,aAAaH,YAAY3D,QAAQ,GAAG2D,YAAY/D,UAAU,EAC1D0D,MAAM3E,KAAK,CAACoF,SAAS;IAEvB,OAAOT;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/colorPicker.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { ColorPickerProps } from '../components/ColorPicker/ColorPicker.types';\nimport type { HsvColor } from '../types/color';\n\n/**\n * The context through which individual color controls communicate with the picker.\n */\nexport type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {\n /**\n * Callback used by Sliders to request a change on it's selected value\n * Should be used to get value of color channel\n *\n * @internal\n */\n requestChange: (event: React.ChangeEvent<HTMLInputElement>, data: { color: HsvColor }) => void;\n};\n\nexport const colorPickerContextDefaultValue: ColorPickerContextValue = {\n requestChange: () => {\n /*noop*/\n },\n color: undefined,\n shape: 'rounded',\n};\n\nexport type ColorPickerContextValues = {\n colorPicker: ColorPickerContextValue;\n};\n\nconst colorPickerContext = createContext<ColorPickerContextValue | undefined>(\n undefined,\n) as Context<ColorPickerContextValue>;\n\nexport const ColorPickerProvider = colorPickerContext.Provider;\n\nexport const useColorPickerContextValue_unstable = <T>(selector: ContextSelector<ColorPickerContextValue, T>): T =>\n useContextSelector(colorPickerContext, (ctx = colorPickerContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","colorPickerContextDefaultValue","requestChange","color","undefined","shape","colorPickerContext","ColorPickerProvider","Provider","useColorPickerContextValue_unstable","selector","ctx"],"mappings":"AAAA;AAGA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAkBrF,OAAO,MAAMC,iCAA0D;IACrEC,eAAe;IACb,MAAM,GACR;IACAC,OAAOC;IACPC,OAAO;AACT,EAAE;AAMF,MAAMC,qBAAqBP,cACzBK;AAGF,OAAO,MAAMG,sBAAsBD,mBAAmBE,QAAQ,CAAC;AAE/D,OAAO,MAAMC,sCAAsC,CAAIC,WACrDV,mBAAmBM,oBAAoB,CAACK,MAAMV,8BAA8B,GAAKS,SAASC,MAAM"}
1
+ {"version":3,"sources":["../../src/contexts/colorPicker.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { ColorPickerProps } from '../components/ColorPicker/ColorPicker.types';\nimport type { HsvColor } from '../types/color';\n\n/**\n * The context through which individual color controls communicate with the picker.\n */\nexport type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {\n /**\n * Callback used by Sliders to request a change on it's selected value\n * Should be used to get value of color channel\n *\n * @internal\n */\n requestChange: (event: React.ChangeEvent<HTMLInputElement>, data: { color: HsvColor }) => void;\n};\n\nexport const colorPickerContextDefaultValue: ColorPickerContextValue = {\n requestChange: () => {\n /*noop*/\n },\n color: undefined,\n shape: 'rounded',\n};\n\nexport type ColorPickerContextValues = {\n colorPicker: ColorPickerContextValue;\n};\n\nconst colorPickerContext = createContext<ColorPickerContextValue | undefined>(\n undefined,\n) as Context<ColorPickerContextValue>;\n\nexport const ColorPickerProvider = colorPickerContext.Provider;\n\nexport const useColorPickerContextValue_unstable = <T>(selector: ContextSelector<ColorPickerContextValue, T>): T =>\n useContextSelector(colorPickerContext, (ctx = colorPickerContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","colorPickerContextDefaultValue","requestChange","color","undefined","shape","colorPickerContext","ColorPickerProvider","Provider","useColorPickerContextValue_unstable","selector","ctx"],"mappings":"AAAA;AAGA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAkBrF,OAAO,MAAMC,iCAA0D;IACrEC,eAAe;IACb,MAAM,GACR;IACAC,OAAOC;IACPC,OAAO;AACT,EAAE;AAMF,MAAMC,qBAAqBP,cACzBK;AAGF,OAAO,MAAMG,sBAAsBD,mBAAmBE,QAAQ,CAAC;AAE/D,OAAO,MAAMC,sCAAsC,CAAIC,WACrDV,mBAAmBM,oBAAoB,CAACK,MAAMV,8BAA8B,GAAKS,SAASC,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/color.ts"],"sourcesContent":["export type HsvColor = {\n h: number;\n s: number;\n v: number;\n a?: number;\n};\n\nexport type HslColor = {\n h: number;\n s: number;\n l: number;\n a?: number;\n};\n"],"names":[],"mappings":"AAOA,WAKE"}
1
+ {"version":3,"sources":["../../src/types/color.ts"],"sourcesContent":["export type HsvColor = {\n h: number;\n s: number;\n v: number;\n a?: number;\n};\n\nexport type HslColor = {\n h: number;\n s: number;\n l: number;\n a?: number;\n};\n"],"names":[],"mappings":"AAOA,WAKE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/adjustChannel.ts"],"sourcesContent":["import type { ColorChannel } from '../components/ColorSlider/ColorSlider.types';\nimport { MIN, HUE_MAX, MAX as COLOR_MAX } from './constants';\nimport { clamp } from '@fluentui/react-utilities';\n\n/**\n * Clamps a given value to the valid range for a specified color channel.\n *\n * @param value - The numeric value to be clamped.\n * @param channel - The color channel to use for clamping. Defaults to 'hue'.\n * @returns The clamped value within the range defined by the color channel.\n */\nexport function clampValue(value: number, channel: ColorChannel = 'hue'): number {\n const MAX = channel === 'hue' ? HUE_MAX : COLOR_MAX;\n return clamp(value, MIN, MAX);\n}\n\nexport type ChannelActions<T> = {\n hue: T;\n saturation: T;\n value: T;\n};\n\n/**\n * Adjusts the specified color channel using the provided actions.\n *\n * @template T - The type of the result returned by the actions.\n * @param {ColorChannel} channel - The color channel to adjust.\n * @param {ChannelActions<T>} actions - An object containing actions for each color channel.\n * @returns {T} - The result of the action corresponding to the specified channel, or the hue action if the channel is not found.\n */\nexport function adjustChannel<T>(channel: ColorChannel, actions: ChannelActions<T>): T {\n return actions[channel] ?? actions.hue;\n}\n"],"names":["MIN","HUE_MAX","MAX","COLOR_MAX","clamp","clampValue","value","channel","adjustChannel","actions","hue"],"mappings":"AACA,SAASA,GAAG,EAAEC,OAAO,EAAEC,OAAOC,SAAS,QAAQ,iBAAc;AAC7D,SAASC,KAAK,QAAQ,4BAA4B;AAElD;;;;;;CAMC,GACD,OAAO,SAASC,WAAWC,KAAa,EAAEC,UAAwB,KAAK;IACrE,MAAML,MAAMK,YAAY,QAAQN,UAAUE;IAC1C,OAAOC,MAAME,OAAON,KAAKE;AAC3B;AAQA;;;;;;;CAOC,GACD,OAAO,SAASM,cAAiBD,OAAqB,EAAEE,OAA0B;QACzEA;IAAP,OAAOA,CAAAA,mBAAAA,OAAO,CAACF,QAAQ,cAAhBE,8BAAAA,mBAAoBA,QAAQC,GAAG;AACxC"}
1
+ {"version":3,"sources":["../../src/utils/adjustChannel.ts"],"sourcesContent":["import type { ColorChannel } from '../components/ColorSlider/ColorSlider.types';\nimport { MIN, HUE_MAX, MAX as COLOR_MAX } from './constants';\nimport { clamp } from '@fluentui/react-utilities';\n\n/**\n * Clamps a given value to the valid range for a specified color channel.\n *\n * @param value - The numeric value to be clamped.\n * @param channel - The color channel to use for clamping. Defaults to 'hue'.\n * @returns The clamped value within the range defined by the color channel.\n */\nexport function clampValue(value: number, channel: ColorChannel = 'hue'): number {\n const MAX = channel === 'hue' ? HUE_MAX : COLOR_MAX;\n return clamp(value, MIN, MAX);\n}\n\nexport type ChannelActions<T> = {\n hue: T;\n saturation: T;\n value: T;\n};\n\n/**\n * Adjusts the specified color channel using the provided actions.\n *\n * @template T - The type of the result returned by the actions.\n * @param {ColorChannel} channel - The color channel to adjust.\n * @param {ChannelActions<T>} actions - An object containing actions for each color channel.\n * @returns {T} - The result of the action corresponding to the specified channel, or the hue action if the channel is not found.\n */\nexport function adjustChannel<T>(channel: ColorChannel, actions: ChannelActions<T>): T {\n return actions[channel] ?? actions.hue;\n}\n"],"names":["MIN","HUE_MAX","MAX","COLOR_MAX","clamp","clampValue","value","channel","adjustChannel","actions","hue"],"mappings":"AACA,SAASA,GAAG,EAAEC,OAAO,EAAEC,OAAOC,SAAS,QAAQ,iBAAc;AAC7D,SAASC,KAAK,QAAQ,4BAA4B;AAElD;;;;;;CAMC,GACD,OAAO,SAASC,WAAWC,KAAa,EAAEC,UAAwB,KAAK;IACrE,MAAML,MAAMK,YAAY,QAAQN,UAAUE;IAC1C,OAAOC,MAAME,OAAON,KAAKE;AAC3B;AAQA;;;;;;;CAOC,GACD,OAAO,SAASM,cAAiBD,OAAqB,EAAEE,OAA0B;QACzEA;IAAP,QAAOA,mBAAAA,OAAO,CAACF,QAAQ,cAAhBE,8BAAAA,mBAAoBA,QAAQC,GAAG;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/constants.ts"],"sourcesContent":["export const MIN = 0;\nexport const MAX = 100;\nexport const HUE_MAX = 360;\nexport const INITIAL_COLOR = '#FFF';\nexport const INITIAL_COLOR_HSV = { h: 0, s: 0, v: 1, a: 1 };\n"],"names":["MIN","MAX","HUE_MAX","INITIAL_COLOR","INITIAL_COLOR_HSV","h","s","v","a"],"mappings":"AAAA,OAAO,MAAMA,MAAM,EAAE;AACrB,OAAO,MAAMC,MAAM,IAAI;AACvB,OAAO,MAAMC,UAAU,IAAI;AAC3B,OAAO,MAAMC,gBAAgB,OAAO;AACpC,OAAO,MAAMC,oBAAoB;IAAEC,GAAG;IAAGC,GAAG;IAAGC,GAAG;IAAGC,GAAG;AAAE,EAAE"}
1
+ {"version":3,"sources":["../../src/utils/constants.ts"],"sourcesContent":["export const MIN = 0;\nexport const MAX = 100;\nexport const HUE_MAX = 360;\nexport const INITIAL_COLOR = '#FFF';\nexport const INITIAL_COLOR_HSV = { h: 0, s: 0, v: 1, a: 1 };\n"],"names":["MIN","MAX","HUE_MAX","INITIAL_COLOR","INITIAL_COLOR_HSV","h","s","v","a"],"mappings":"AAAA,OAAO,MAAMA,MAAM,EAAE;AACrB,OAAO,MAAMC,MAAM,IAAI;AACvB,OAAO,MAAMC,UAAU,IAAI;AAC3B,OAAO,MAAMC,gBAAgB,OAAO;AACpC,OAAO,MAAMC,oBAAoB;IAAEC,GAAG;IAAGC,GAAG;IAAGC,GAAG;IAAGC,GAAG;AAAE,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/createHslColor.ts"],"sourcesContent":["import type { HslColor, HsvColor } from '../types/color';\n\n/**\n *\n * Creates an HSL color object from a given HSV color object.\n *\n * @param color - HSV color object to convert to HSL.\n * @returns HSL color object with the same hue and alpha values, and converted saturation and lightness values.\n */\nexport function createHslColor(color: Partial<HsvColor> = {}): HslColor {\n const { h = 0, s = 0, v = 0, a = 1 } = color;\n const l = v * (1 - s / 2);\n const hslSaturation = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);\n\n return { h, s: hslSaturation, l, a };\n}\n\n/**\n * Creates an HSL color string from a given HSV color object.\n *\n * @param color - HSV color object to convert to HSL string.\n * @returns - HSL color string in the format of \"hsla(h, s%, l%, a)\".\n */\nexport function createHslColorString(color: Partial<HsvColor> = {}): string {\n const hslColor = createHslColor(color);\n const saturation = Number((hslColor.s * 100).toFixed(2));\n const lightness = Number((hslColor.l * 100).toFixed(2));\n\n return `hsla(${hslColor.h}, ${saturation}%, ${lightness}%, ${hslColor.a})`;\n}\n"],"names":["createHslColor","color","h","s","v","a","l","hslSaturation","Math","min","createHslColorString","hslColor","saturation","Number","toFixed","lightness"],"mappings":"AAEA;;;;;;CAMC,GACD,OAAO,SAASA,eAAeC,QAA2B,CAAC,CAAC;IAC1D,MAAM,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAE,GAAGJ;IACvC,MAAMK,IAAIF,IAAK,CAAA,IAAID,IAAI,CAAA;IACvB,MAAMI,gBAAgBD,MAAM,KAAKA,MAAM,IAAI,IAAI,AAACF,CAAAA,IAAIE,CAAAA,IAAKE,KAAKC,GAAG,CAACH,GAAG,IAAIA;IAEzE,OAAO;QAAEJ;QAAGC,GAAGI;QAAeD;QAAGD;IAAE;AACrC;AAEA;;;;;CAKC,GACD,OAAO,SAASK,qBAAqBT,QAA2B,CAAC,CAAC;IAChE,MAAMU,WAAWX,eAAeC;IAChC,MAAMW,aAAaC,OAAO,AAACF,CAAAA,SAASR,CAAC,GAAG,GAAE,EAAGW,OAAO,CAAC;IACrD,MAAMC,YAAYF,OAAO,AAACF,CAAAA,SAASL,CAAC,GAAG,GAAE,EAAGQ,OAAO,CAAC;IAEpD,OAAO,CAAC,KAAK,EAAEH,SAAST,CAAC,CAAC,EAAE,EAAEU,WAAW,GAAG,EAAEG,UAAU,GAAG,EAAEJ,SAASN,CAAC,CAAC,CAAC,CAAC;AAC5E"}
1
+ {"version":3,"sources":["../../src/utils/createHslColor.ts"],"sourcesContent":["import type { HslColor, HsvColor } from '../types/color';\n\n/**\n *\n * Creates an HSL color object from a given HSV color object.\n *\n * @param color - HSV color object to convert to HSL.\n * @returns HSL color object with the same hue and alpha values, and converted saturation and lightness values.\n */\nexport function createHslColor(color: Partial<HsvColor> = {}): HslColor {\n const { h = 0, s = 0, v = 0, a = 1 } = color;\n const l = v * (1 - s / 2);\n const hslSaturation = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);\n\n return { h, s: hslSaturation, l, a };\n}\n\n/**\n * Creates an HSL color string from a given HSV color object.\n *\n * @param color - HSV color object to convert to HSL string.\n * @returns - HSL color string in the format of \"hsla(h, s%, l%, a)\".\n */\nexport function createHslColorString(color: Partial<HsvColor> = {}): string {\n const hslColor = createHslColor(color);\n const saturation = Number((hslColor.s * 100).toFixed(2));\n const lightness = Number((hslColor.l * 100).toFixed(2));\n\n return `hsla(${hslColor.h}, ${saturation}%, ${lightness}%, ${hslColor.a})`;\n}\n"],"names":["createHslColor","color","h","s","v","a","l","hslSaturation","Math","min","createHslColorString","hslColor","saturation","Number","toFixed","lightness"],"mappings":"AAEA;;;;;;CAMC,GACD,OAAO,SAASA,eAAeC,QAA2B,CAAC,CAAC;IAC1D,MAAM,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAE,GAAGJ;IACvC,MAAMK,IAAIF,IAAK,CAAA,IAAID,IAAI,CAAA;IACvB,MAAMI,gBAAgBD,MAAM,KAAKA,MAAM,IAAI,IAAI,AAACF,CAAAA,IAAIE,CAAAA,IAAKE,KAAKC,GAAG,CAACH,GAAG,IAAIA;IAEzE,OAAO;QAAEJ;QAAGC,GAAGI;QAAeD;QAAGD;IAAE;AACrC;AAEA;;;;;CAKC,GACD,OAAO,SAASK,qBAAqBT,QAA2B,CAAC,CAAC;IAChE,MAAMU,WAAWX,eAAeC;IAChC,MAAMW,aAAaC,OAAO,AAACF,CAAAA,SAASR,CAAC,GAAG,GAAE,EAAGW,OAAO,CAAC;IACrD,MAAMC,YAAYF,OAAO,AAACF,CAAAA,SAASL,CAAC,GAAG,GAAE,EAAGQ,OAAO,CAAC;IAEpD,OAAO,CAAC,KAAK,EAAEH,SAAST,CAAC,CAAC,EAAE,EAAEU,WAAW,GAAG,EAAEG,UAAU,GAAG,EAAEJ,SAASN,CAAC,CAAC,CAAC,CAAC;AAC5E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/createHsvColor.ts"],"sourcesContent":["import type { HsvColor } from '../types/color';\n\n/**\n * Creates an HSV color object with optional hue, saturation, value, and alpha components.\n *\n * @param {Partial<HsvColor>} param0 - An object containing optional HSV color components:\n * - `h` (number): The hue component, default is 0.\n * - `s` (number): The saturation component, default is 0.\n * - `v` (number): The value component, default is 0.\n * - `a` (number): The alpha component, default is 1.\n * @returns {HsvColor} The resulting HSV color object.\n */\nexport function createHsvColor({ h = 0, s = 0, v = 0, a = 1 }: Partial<HsvColor>): HsvColor {\n return { h, s, v, a };\n}\n"],"names":["createHsvColor","h","s","v","a"],"mappings":"AAEA;;;;;;;;;CASC,GACD,OAAO,SAASA,eAAe,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAqB;IAC9E,OAAO;QAAEH;QAAGC;QAAGC;QAAGC;IAAE;AACtB"}
1
+ {"version":3,"sources":["../../src/utils/createHsvColor.ts"],"sourcesContent":["import type { HsvColor } from '../types/color';\n\n/**\n * Creates an HSV color object with optional hue, saturation, value, and alpha components.\n *\n * @param {Partial<HsvColor>} param0 - An object containing optional HSV color components:\n * - `h` (number): The hue component, default is 0.\n * - `s` (number): The saturation component, default is 0.\n * - `v` (number): The value component, default is 0.\n * - `a` (number): The alpha component, default is 1.\n * @returns {HsvColor} The resulting HSV color object.\n */\nexport function createHsvColor({ h = 0, s = 0, v = 0, a = 1 }: Partial<HsvColor>): HsvColor {\n return { h, s, v, a };\n}\n"],"names":["createHsvColor","h","s","v","a"],"mappings":"AAEA;;;;;;;;;CASC,GACD,OAAO,SAASA,eAAe,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAEC,IAAI,CAAC,EAAqB;IAC9E,OAAO;QAAEH;QAAGC;QAAGC;QAAGC;IAAE;AACtB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/getCoordinates.ts"],"sourcesContent":["import { clamp } from '@fluentui/react-utilities';\n\n/**\n * Calculates the normalized coordinates of a mouse event relative to a given HTML element.\n *\n * @param element - The HTML element to calculate the coordinates relative to.\n * @param event - The mouse event containing the clientX and clientY properties.\n * @returns An object containing the normalized x and y coordinates, clamped between 0 and 1.\n */\nexport function getCoordinates(element: HTMLElement, event: PointerEvent): { x: number; y: number } {\n const rect = element.getBoundingClientRect();\n\n const newX = roundTwoDecimal((event.clientX - rect.left) / rect.width);\n const newY = roundTwoDecimal(1 - (event.clientY - rect.top) / rect.height);\n\n return {\n x: clamp(newX, 0, 1),\n y: clamp(newY, 0, 1),\n };\n}\n\n/**\n * Rounds a given number to two decimal places.\n *\n * @param num - The number to be rounded.\n * @returns The number rounded to two decimal places.\n */\nexport function roundTwoDecimal(num: number): number {\n return Math.round(num * 100) / 100;\n}\n"],"names":["clamp","getCoordinates","element","event","rect","getBoundingClientRect","newX","roundTwoDecimal","clientX","left","width","newY","clientY","top","height","x","y","num","Math","round"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAElD;;;;;;CAMC,GACD,OAAO,SAASC,eAAeC,OAAoB,EAAEC,KAAmB;IACtE,MAAMC,OAAOF,QAAQG,qBAAqB;IAE1C,MAAMC,OAAOC,gBAAgB,AAACJ,CAAAA,MAAMK,OAAO,GAAGJ,KAAKK,IAAI,AAAD,IAAKL,KAAKM,KAAK;IACrE,MAAMC,OAAOJ,gBAAgB,IAAI,AAACJ,CAAAA,MAAMS,OAAO,GAAGR,KAAKS,GAAG,AAAD,IAAKT,KAAKU,MAAM;IAEzE,OAAO;QACLC,GAAGf,MAAMM,MAAM,GAAG;QAClBU,GAAGhB,MAAMW,MAAM,GAAG;IACpB;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASJ,gBAAgBU,GAAW;IACzC,OAAOC,KAAKC,KAAK,CAACF,MAAM,OAAO;AACjC"}
1
+ {"version":3,"sources":["../../src/utils/getCoordinates.ts"],"sourcesContent":["import { clamp } from '@fluentui/react-utilities';\n\n/**\n * Calculates the normalized coordinates of a mouse event relative to a given HTML element.\n *\n * @param element - The HTML element to calculate the coordinates relative to.\n * @param event - The mouse event containing the clientX and clientY properties.\n * @returns An object containing the normalized x and y coordinates, clamped between 0 and 1.\n */\nexport function getCoordinates(element: HTMLElement, event: PointerEvent): { x: number; y: number } {\n const rect = element.getBoundingClientRect();\n\n const newX = roundTwoDecimal((event.clientX - rect.left) / rect.width);\n const newY = roundTwoDecimal(1 - (event.clientY - rect.top) / rect.height);\n\n return {\n x: clamp(newX, 0, 1),\n y: clamp(newY, 0, 1),\n };\n}\n\n/**\n * Rounds a given number to two decimal places.\n *\n * @param num - The number to be rounded.\n * @returns The number rounded to two decimal places.\n */\nexport function roundTwoDecimal(num: number): number {\n return Math.round(num * 100) / 100;\n}\n"],"names":["clamp","getCoordinates","element","event","rect","getBoundingClientRect","newX","roundTwoDecimal","clientX","left","width","newY","clientY","top","height","x","y","num","Math","round"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAElD;;;;;;CAMC,GACD,OAAO,SAASC,eAAeC,OAAoB,EAAEC,KAAmB;IACtE,MAAMC,OAAOF,QAAQG,qBAAqB;IAE1C,MAAMC,OAAOC,gBAAgB,AAACJ,CAAAA,MAAMK,OAAO,GAAGJ,KAAKK,IAAI,AAAD,IAAKL,KAAKM,KAAK;IACrE,MAAMC,OAAOJ,gBAAgB,IAAI,AAACJ,CAAAA,MAAMS,OAAO,GAAGR,KAAKS,GAAG,AAAD,IAAKT,KAAKU,MAAM;IAEzE,OAAO;QACLC,GAAGf,MAAMM,MAAM,GAAG;QAClBU,GAAGhB,MAAMW,MAAM,GAAG;IACpB;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASJ,gBAAgBU,GAAW;IACzC,OAAOC,KAAKC,KAAK,CAACF,MAAM,OAAO;AACjC"}
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- AlphaSlider: function() {
12
+ get AlphaSlider () {
13
13
  return _index.AlphaSlider;
14
14
  },
15
- alphaSliderCSSVars: function() {
15
+ get alphaSliderCSSVars () {
16
16
  return _index.alphaSliderCSSVars;
17
17
  },
18
- alphaSliderClassNames: function() {
18
+ get alphaSliderClassNames () {
19
19
  return _index.alphaSliderClassNames;
20
20
  },
21
- renderAlphaSlider_unstable: function() {
21
+ get renderAlphaSlider_unstable () {
22
22
  return _index.renderAlphaSlider_unstable;
23
23
  },
24
- useAlphaSliderBase_unstable: function() {
24
+ get useAlphaSliderBase_unstable () {
25
25
  return _index.useAlphaSliderBase_unstable;
26
26
  },
27
- useAlphaSliderStyles_unstable: function() {
27
+ get useAlphaSliderStyles_unstable () {
28
28
  return _index.useAlphaSliderStyles_unstable;
29
29
  },
30
- useAlphaSlider_unstable: function() {
30
+ get useAlphaSlider_unstable () {
31
31
  return _index.useAlphaSlider_unstable;
32
32
  }
33
33
  });
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ColorArea: function() {
12
+ get ColorArea () {
13
13
  return _index.ColorArea;
14
14
  },
15
- colorAreaCSSVars: function() {
15
+ get colorAreaCSSVars () {
16
16
  return _index.colorAreaCSSVars;
17
17
  },
18
- colorAreaClassNames: function() {
18
+ get colorAreaClassNames () {
19
19
  return _index.colorAreaClassNames;
20
20
  },
21
- renderColorArea_unstable: function() {
21
+ get renderColorArea_unstable () {
22
22
  return _index.renderColorArea_unstable;
23
23
  },
24
- useColorAreaBase_unstable: function() {
24
+ get useColorAreaBase_unstable () {
25
25
  return _index.useColorAreaBase_unstable;
26
26
  },
27
- useColorAreaStyles_unstable: function() {
27
+ get useColorAreaStyles_unstable () {
28
28
  return _index.useColorAreaStyles_unstable;
29
29
  },
30
- useColorArea_unstable: function() {
30
+ get useColorArea_unstable () {
31
31
  return _index.useColorArea_unstable;
32
32
  }
33
33
  });
@@ -5,32 +5,32 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ColorPicker: function() {
12
+ get ColorPicker () {
13
13
  return _index.ColorPicker;
14
14
  },
15
- colorPickerClassNames: function() {
15
+ get colorPickerClassNames () {
16
16
  return _index.colorPickerClassNames;
17
17
  },
18
- renderColorPicker_unstable: function() {
18
+ get renderColorPicker_unstable () {
19
19
  return _index.renderColorPicker_unstable;
20
20
  },
21
- useColorPickerBaseContextValues_unstable: function() {
21
+ get useColorPickerBaseContextValues_unstable () {
22
22
  return _index.useColorPickerBaseContextValues_unstable;
23
23
  },
24
- useColorPickerBase_unstable: function() {
24
+ get useColorPickerBase_unstable () {
25
25
  return _index.useColorPickerBase_unstable;
26
26
  },
27
- useColorPickerContextValues: function() {
27
+ get useColorPickerContextValues () {
28
28
  return _index.useColorPickerContextValues;
29
29
  },
30
- useColorPickerStyles_unstable: function() {
30
+ get useColorPickerStyles_unstable () {
31
31
  return _index.useColorPickerStyles_unstable;
32
32
  },
33
- useColorPicker_unstable: function() {
33
+ get useColorPicker_unstable () {
34
34
  return _index.useColorPicker_unstable;
35
35
  }
36
36
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ColorPicker.ts"],"sourcesContent":["export type {\n ColorPickerBaseProps,\n ColorPickerBaseState,\n ColorPickerOnChangeData,\n ColorPickerProps,\n ColorPickerSlots,\n ColorPickerState,\n} from './components/ColorPicker/index';\nexport {\n ColorPicker,\n colorPickerClassNames,\n renderColorPicker_unstable,\n useColorPickerBaseContextValues_unstable,\n useColorPickerBase_unstable,\n useColorPickerContextValues,\n useColorPickerStyles_unstable,\n useColorPicker_unstable,\n} from './components/ColorPicker/index';\n"],"names":["ColorPicker","colorPickerClassNames","renderColorPicker_unstable","useColorPickerBaseContextValues_unstable","useColorPickerBase_unstable","useColorPickerContextValues","useColorPickerStyles_unstable","useColorPicker_unstable"],"mappings":";;;;;;;;;;;IASEA;iCAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAC1BC,+CAAwC;;;eACxCC,kCAA2B;;;eAC3BC,kCAA2B;;;eAC3BC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,oCAAiC"}
1
+ {"version":3,"sources":["../src/ColorPicker.ts"],"sourcesContent":["export type {\n ColorPickerBaseProps,\n ColorPickerBaseState,\n ColorPickerOnChangeData,\n ColorPickerProps,\n ColorPickerSlots,\n ColorPickerState,\n} from './components/ColorPicker/index';\nexport {\n ColorPicker,\n colorPickerClassNames,\n renderColorPicker_unstable,\n useColorPickerBaseContextValues_unstable,\n useColorPickerBase_unstable,\n useColorPickerContextValues,\n useColorPickerStyles_unstable,\n useColorPicker_unstable,\n} from './components/ColorPicker/index';\n"],"names":["ColorPicker","colorPickerClassNames","renderColorPicker_unstable","useColorPickerBaseContextValues_unstable","useColorPickerBase_unstable","useColorPickerContextValues","useColorPickerStyles_unstable","useColorPicker_unstable"],"mappings":";;;;;;;;;;;;eASEA,kBAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAC1BC,+CAAwC;;;eACxCC,kCAA2B;;;eAC3BC,kCAA2B;;;eAC3BC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,oCAAiC"}