@fluentui/react-color-picker 9.2.18 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -2
- package/dist/index.d.cts +342 -0
- package/dist/index.d.ts +67 -8
- package/lib/AlphaSlider.js +1 -1
- package/lib/AlphaSlider.js.map +1 -1
- package/lib/ColorArea.js +1 -1
- package/lib/ColorArea.js.map +1 -1
- package/lib/ColorPicker.js +1 -1
- package/lib/ColorPicker.js.map +1 -1
- package/lib/ColorSlider.js +1 -1
- package/lib/ColorSlider.js.map +1 -1
- package/lib/components/AlphaSlider/AlphaSlider.constants.js +6 -0
- package/lib/components/AlphaSlider/AlphaSlider.constants.js.map +1 -0
- package/lib/components/AlphaSlider/AlphaSlider.js +5 -5
- package/lib/components/AlphaSlider/AlphaSlider.js.map +1 -1
- package/lib/components/AlphaSlider/AlphaSlider.types.js +1 -1
- package/lib/components/AlphaSlider/AlphaSlider.types.js.map +1 -1
- package/lib/components/AlphaSlider/index.js +5 -4
- package/lib/components/AlphaSlider/index.js.map +1 -1
- package/lib/components/AlphaSlider/renderAlphaSlider.js +1 -1
- package/lib/components/AlphaSlider/renderAlphaSlider.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSlider.js +11 -5
- package/lib/components/AlphaSlider/useAlphaSlider.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderState.js +12 -12
- package/lib/components/AlphaSlider/useAlphaSliderState.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.js +4 -9
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js +4 -9
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js.map +1 -1
- package/lib/components/ColorArea/ColorArea.constants.js +6 -0
- package/lib/components/ColorArea/ColorArea.constants.js.map +1 -0
- package/lib/components/ColorArea/ColorArea.js +5 -5
- package/lib/components/ColorArea/ColorArea.js.map +1 -1
- package/lib/components/ColorArea/ColorArea.types.js +1 -1
- package/lib/components/ColorArea/ColorArea.types.js.map +1 -1
- package/lib/components/ColorArea/index.js +5 -4
- package/lib/components/ColorArea/index.js.map +1 -1
- package/lib/components/ColorArea/renderColorArea.js +1 -1
- package/lib/components/ColorArea/renderColorArea.js.map +1 -1
- package/lib/components/ColorArea/useColorArea.js +32 -18
- package/lib/components/ColorArea/useColorArea.js.map +1 -1
- package/lib/components/ColorArea/useColorAreaStyles.styles.js +4 -9
- package/lib/components/ColorArea/useColorAreaStyles.styles.js.map +1 -1
- package/lib/components/ColorArea/useColorAreaStyles.styles.raw.js +4 -9
- package/lib/components/ColorArea/useColorAreaStyles.styles.raw.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.js +6 -6
- package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.types.js +1 -3
- package/lib/components/ColorPicker/ColorPicker.types.js.map +1 -1
- package/lib/components/ColorPicker/index.js +5 -4
- package/lib/components/ColorPicker/index.js.map +1 -1
- package/lib/components/ColorPicker/renderColorPicker.js +2 -2
- package/lib/components/ColorPicker/renderColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/useColorPicker.js +10 -4
- package/lib/components/ColorPicker/useColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/useColorPickerContextValues.js +15 -1
- package/lib/components/ColorPicker/useColorPickerContextValues.js.map +1 -1
- package/lib/components/ColorPicker/useColorPickerStyles.styles.js +2 -2
- package/lib/components/ColorPicker/useColorPickerStyles.styles.js.map +1 -1
- package/lib/components/ColorPicker/useColorPickerStyles.styles.raw.js +2 -2
- package/lib/components/ColorSlider/ColorSlider.constants.js +8 -0
- package/lib/components/ColorSlider/ColorSlider.constants.js.map +1 -0
- package/lib/components/ColorSlider/ColorSlider.js +5 -5
- package/lib/components/ColorSlider/ColorSlider.js.map +1 -1
- package/lib/components/ColorSlider/ColorSlider.types.js +1 -3
- package/lib/components/ColorSlider/ColorSlider.types.js.map +1 -1
- package/lib/components/ColorSlider/index.js +5 -4
- package/lib/components/ColorSlider/index.js.map +1 -1
- package/lib/components/ColorSlider/renderColorSlider.js +1 -1
- package/lib/components/ColorSlider/renderColorSlider.js.map +1 -1
- package/lib/components/ColorSlider/useColorSlider.js +34 -20
- package/lib/components/ColorSlider/useColorSlider.js.map +1 -1
- package/lib/components/ColorSlider/useColorSliderStyles.styles.js +3 -10
- package/lib/components/ColorSlider/useColorSliderStyles.styles.js.map +1 -1
- package/lib/components/ColorSlider/useColorSliderStyles.styles.raw.js +3 -10
- package/lib/components/ColorSlider/useColorSliderStyles.styles.raw.js.map +1 -1
- package/lib/contexts/colorPicker.js +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/types/color.js.map +1 -1
- package/lib/utils/adjustChannel.js +2 -2
- package/lib/utils/adjustChannel.js.map +1 -1
- package/lib/utils/constants.js +6 -2
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/createHslColor.js +28 -0
- package/lib/utils/createHslColor.js.map +1 -0
- package/lib/utils/getCoordinates.js +1 -1
- package/lib-commonjs/{AlphaSlider.js → AlphaSlider.cjs} +4 -1
- package/lib-commonjs/AlphaSlider.cjs.map +1 -0
- package/lib-commonjs/{ColorArea.js → ColorArea.cjs} +4 -1
- package/lib-commonjs/ColorArea.cjs.map +1 -0
- package/lib-commonjs/{ColorPicker.js → ColorPicker.cjs} +10 -1
- package/lib-commonjs/ColorPicker.cjs.map +1 -0
- package/lib-commonjs/{ColorSlider.js → ColorSlider.cjs} +4 -1
- package/lib-commonjs/ColorSlider.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{AlphaSlider.js → AlphaSlider.cjs} +3 -3
- package/lib-commonjs/components/AlphaSlider/{AlphaSlider.js.map → AlphaSlider.cjs.map} +1 -1
- package/lib-commonjs/components/AlphaSlider/AlphaSlider.constants.cjs +16 -0
- package/lib-commonjs/components/AlphaSlider/AlphaSlider.constants.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{AlphaSlider.types.js → AlphaSlider.types.cjs} +1 -1
- package/lib-commonjs/components/AlphaSlider/{AlphaSlider.types.js.map → AlphaSlider.types.cjs.map} +1 -1
- package/lib-commonjs/components/AlphaSlider/{index.js → index.cjs} +9 -5
- package/lib-commonjs/components/AlphaSlider/index.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/renderAlphaSlider.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{useAlphaSlider.js → useAlphaSlider.cjs} +21 -7
- package/lib-commonjs/components/AlphaSlider/useAlphaSlider.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderState.js → useAlphaSliderState.cjs} +12 -12
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderState.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderStyles.styles.js → useAlphaSliderStyles.styles.cjs} +1 -10
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderStyles.styles.raw.js → useAlphaSliderStyles.styles.raw.cjs} +6 -14
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/{ColorArea.js → ColorArea.cjs} +3 -3
- package/lib-commonjs/components/ColorArea/{ColorArea.js.map → ColorArea.cjs.map} +1 -1
- package/lib-commonjs/components/ColorArea/ColorArea.constants.cjs +16 -0
- package/lib-commonjs/components/ColorArea/ColorArea.constants.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/{ColorArea.types.js → ColorArea.types.cjs} +1 -1
- package/lib-commonjs/components/ColorArea/{ColorArea.types.js.map → ColorArea.types.cjs.map} +1 -1
- package/lib-commonjs/components/ColorArea/{index.js → index.cjs} +9 -5
- package/lib-commonjs/components/ColorArea/index.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/renderColorArea.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/{useColorArea.js → useColorArea.cjs} +31 -16
- package/lib-commonjs/components/ColorArea/useColorArea.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/{useColorAreaStyles.styles.js → useColorAreaStyles.styles.cjs} +0 -9
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ColorArea/{useColorAreaStyles.styles.raw.js → useColorAreaStyles.styles.raw.cjs} +5 -13
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/ColorPicker/{ColorPicker.js → ColorPicker.cjs} +4 -4
- package/lib-commonjs/components/ColorPicker/{ColorPicker.js.map → ColorPicker.cjs.map} +1 -1
- package/lib-commonjs/components/{ColorSlider/ColorSlider.types.js → ColorPicker/ColorPicker.types.cjs} +1 -3
- package/lib-commonjs/components/ColorPicker/{ColorPicker.types.js.map → ColorPicker.types.cjs.map} +1 -1
- package/lib-commonjs/components/ColorPicker/{index.js → index.cjs} +14 -4
- package/lib-commonjs/components/ColorPicker/index.cjs.map +1 -0
- package/lib-commonjs/components/ColorPicker/{renderColorPicker.js → renderColorPicker.cjs} +1 -1
- package/lib-commonjs/components/ColorPicker/renderColorPicker.cjs.map +1 -0
- package/lib-commonjs/components/ColorPicker/{useColorPicker.js → useColorPicker.cjs} +20 -6
- package/lib-commonjs/components/ColorPicker/useColorPicker.cjs.map +1 -0
- package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.cjs +50 -0
- package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.cjs.map +1 -0
- package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/{ColorSlider.js → ColorSlider.cjs} +3 -3
- package/lib-commonjs/components/ColorSlider/{ColorSlider.js.map → ColorSlider.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSlider/ColorSlider.constants.cjs +18 -0
- package/lib-commonjs/components/ColorSlider/ColorSlider.constants.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/{ColorSlider.types.js.map → ColorSlider.types.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSlider/{index.js → index.cjs} +9 -5
- package/lib-commonjs/components/ColorSlider/index.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/renderColorSlider.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/{useColorSlider.js → useColorSlider.cjs} +34 -19
- package/lib-commonjs/components/ColorSlider/useColorSlider.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/{useColorSliderStyles.styles.js → useColorSliderStyles.styles.cjs} +2 -12
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ColorSlider/{useColorSliderStyles.styles.raw.js → useColorSliderStyles.styles.raw.cjs} +19 -29
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/{index.js → index.cjs} +23 -4
- package/lib-commonjs/index.cjs.map +1 -0
- package/lib-commonjs/{components/ColorPicker/ColorPicker.types.js → types/color.cjs} +1 -3
- package/lib-commonjs/types/color.cjs.map +1 -0
- package/lib-commonjs/utils/{adjustChannel.js → adjustChannel.cjs} +1 -1
- package/lib-commonjs/utils/{adjustChannel.js.map → adjustChannel.cjs.map} +1 -1
- package/lib-commonjs/utils/{constants.js → constants.cjs} +6 -2
- package/lib-commonjs/utils/constants.cjs.map +1 -0
- package/lib-commonjs/utils/createHslColor.cjs +41 -0
- package/lib-commonjs/utils/createHslColor.cjs.map +1 -0
- package/package.json +19 -14
- package/lib-commonjs/AlphaSlider.js.map +0 -1
- package/lib-commonjs/ColorArea.js.map +0 -1
- package/lib-commonjs/ColorPicker.js.map +0 -1
- package/lib-commonjs/ColorSlider.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/index.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/renderAlphaSlider.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/useAlphaSlider.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderState.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ColorArea/index.js.map +0 -1
- package/lib-commonjs/components/ColorArea/renderColorArea.js.map +0 -1
- package/lib-commonjs/components/ColorArea/useColorArea.js.map +0 -1
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/index.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/renderColorPicker.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/useColorPicker.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.js +0 -28
- package/lib-commonjs/components/ColorPicker/useColorPickerContextValues.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/index.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/renderColorSlider.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/useColorSlider.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/types/color.js.map +0 -1
- package/lib-commonjs/utils/constants.js.map +0 -1
- /package/lib-commonjs/components/AlphaSlider/{alphaSliderUtils.js → alphaSliderUtils.cjs} +0 -0
- /package/lib-commonjs/components/AlphaSlider/{alphaSliderUtils.js.map → alphaSliderUtils.cjs.map} +0 -0
- /package/lib-commonjs/components/AlphaSlider/{renderAlphaSlider.js → renderAlphaSlider.cjs} +0 -0
- /package/lib-commonjs/components/ColorArea/{renderColorArea.js → renderColorArea.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPickerStyles.styles.js → useColorPickerStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPickerStyles.styles.raw.js → useColorPickerStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPickerStyles.styles.raw.js.map → useColorPickerStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/{types/color.js → components/ColorSlider/ColorSlider.types.cjs} +0 -0
- /package/lib-commonjs/components/ColorSlider/{renderColorSlider.js → renderColorSlider.cjs} +0 -0
- /package/lib-commonjs/contexts/{colorPicker.js → colorPicker.cjs} +0 -0
- /package/lib-commonjs/contexts/{colorPicker.js.map → colorPicker.cjs.map} +0 -0
- /package/lib-commonjs/utils/{createHsvColor.js → createHsvColor.cjs} +0 -0
- /package/lib-commonjs/utils/{createHsvColor.js.map → createHsvColor.cjs.map} +0 -0
- /package/lib-commonjs/utils/{getCoordinates.js → getCoordinates.cjs} +0 -0
- /package/lib-commonjs/utils/{getCoordinates.js.map → getCoordinates.cjs.map} +0 -0
- /package/lib-commonjs/utils/{getPercent.js → getPercent.cjs} +0 -0
- /package/lib-commonjs/utils/{getPercent.js.map → getPercent.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-color-picker
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 11 Aug 2026 17:16:03 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-color-picker_v9.3.0)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Aug 2026 17:16:03 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-color-picker_v9.2.19..@fluentui/react-color-picker_v9.3.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- feat(react-color-picker): expose headless base APIs ([PR #36517](https://github.com/microsoft/fluentui/pull/36517) by dmytrokirpa@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-context-selector to v9.2.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v9.26.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- fix: use valid HSL syntax for color slider styles ([PR #36555](https://github.com/microsoft/fluentui/pull/36555) by dmytrokirpa@microsoft.com)
|
|
25
|
+
- refactor: Replace the tinycolor dependency with internal utilities. ([PR #36548](https://github.com/microsoft/fluentui/pull/36548) by dmytrokirpa@microsoft.com)
|
|
26
|
+
- fix: Move shared color picker CSS variables from style modules to constants files. ([PR #36552](https://github.com/microsoft/fluentui/pull/36552) by dmytrokirpa@microsoft.com)
|
|
27
|
+
- Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
|
|
28
|
+
|
|
29
|
+
## [9.2.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-color-picker_v9.2.19)
|
|
30
|
+
|
|
31
|
+
Tue, 04 Aug 2026 10:12:17 GMT
|
|
32
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-color-picker_v9.2.18..@fluentui/react-color-picker_v9.2.19)
|
|
33
|
+
|
|
34
|
+
### Patches
|
|
35
|
+
|
|
36
|
+
- Pin @ctrl/tinycolor version to prevent yarn modern duplication ([PR #35747](https://github.com/microsoft/fluentui/pull/35747) by vgenaev@gmail.com)
|
|
37
|
+
|
|
7
38
|
## [9.2.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-color-picker_v9.2.18)
|
|
8
39
|
|
|
9
|
-
Wed, 24 Jun 2026 11:
|
|
40
|
+
Wed, 24 Jun 2026 11:09:41 GMT
|
|
10
41
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-color-picker_v9.2.17..@fluentui/react-color-picker_v9.2.18)
|
|
11
42
|
|
|
12
43
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
4
|
+
import type { EventData } from '@fluentui/react-utilities';
|
|
5
|
+
import type { EventHandler } from '@fluentui/react-utilities';
|
|
6
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
7
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
|
+
import * as React_2 from 'react';
|
|
9
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
10
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* AlphaSlider component
|
|
14
|
+
*/
|
|
15
|
+
export declare const AlphaSlider: ForwardRefComponent<AlphaSliderProps>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* AlphaSlider Base Props
|
|
19
|
+
*/
|
|
20
|
+
export declare type AlphaSliderBaseProps = Omit<AlphaSliderProps, 'shape'>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* State used in rendering unstyled AlphaSlider
|
|
24
|
+
*/
|
|
25
|
+
export declare type AlphaSliderBaseState = Omit<AlphaSliderState, 'shape'>;
|
|
26
|
+
|
|
27
|
+
export declare const alphaSliderClassNames: SlotClassNames<AlphaSliderSlots>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* AlphaSlider Props
|
|
31
|
+
*/
|
|
32
|
+
export declare type AlphaSliderProps = Omit<ColorSliderProps, 'channel'> & {
|
|
33
|
+
/**
|
|
34
|
+
* The `transparency` property determines how the alpha channel is interpreted.
|
|
35
|
+
* - When `false`, the alpha channel represents the opacity of the color.
|
|
36
|
+
* - When `true`, the alpha channel represents the transparency of the color.
|
|
37
|
+
* For example, a 30% transparent color has 70% opacity.
|
|
38
|
+
*
|
|
39
|
+
* @defaultvalue false
|
|
40
|
+
*/
|
|
41
|
+
transparency?: boolean;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare type AlphaSliderSlots = ColorSliderSlots;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* State used in rendering AlphaSlider
|
|
48
|
+
*/
|
|
49
|
+
export declare type AlphaSliderState = ComponentState<AlphaSliderSlots> & Pick<AlphaSliderProps, 'vertical'> & Omit<ColorSliderState, keyof ColorSliderSlots | 'components'>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* ColorArea component
|
|
53
|
+
*/
|
|
54
|
+
export declare const ColorArea: ForwardRefComponent<ColorAreaProps>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* ColorArea Base Props
|
|
58
|
+
*/
|
|
59
|
+
export declare type ColorAreaBaseProps = Omit<ColorAreaProps, 'shape'>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* ColorArea Base State
|
|
63
|
+
*/
|
|
64
|
+
export declare type ColorAreaBaseState = ComponentState<Required<ColorAreaSlots>> & Pick<ColorAreaProps, 'color'>;
|
|
65
|
+
|
|
66
|
+
export declare const colorAreaClassNames: SlotClassNames<ColorAreaSlots>;
|
|
67
|
+
|
|
68
|
+
declare type ColorAreaOnColorChangeData = EventData<'change', React_2.SyntheticEvent | PointerEvent> & {
|
|
69
|
+
color: HsvColor;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* ColorArea Props
|
|
74
|
+
*/
|
|
75
|
+
export declare type ColorAreaProps = Omit<ComponentProps<Partial<ColorAreaSlots>>, 'color' | 'onChange'> & Pick<ColorPickerProps, 'shape'> & {
|
|
76
|
+
/**
|
|
77
|
+
* The current color of the ColorArea.
|
|
78
|
+
*/
|
|
79
|
+
color?: HsvColor;
|
|
80
|
+
/**
|
|
81
|
+
* The starting value for an uncontrolled ColorArea.
|
|
82
|
+
*/
|
|
83
|
+
defaultColor?: HsvColor;
|
|
84
|
+
/**
|
|
85
|
+
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
86
|
+
*/
|
|
87
|
+
onChange?: EventHandler<ColorAreaOnColorChangeData>;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export declare type ColorAreaSlots = {
|
|
91
|
+
root: NonNullable<Slot<'div'>>;
|
|
92
|
+
thumb?: NonNullable<Slot<'div'>>;
|
|
93
|
+
inputX?: NonNullable<Slot<'input'>>;
|
|
94
|
+
inputY?: NonNullable<Slot<'input'>>;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* State used in rendering ColorArea
|
|
99
|
+
*/
|
|
100
|
+
export declare type ColorAreaState = ComponentState<Required<ColorAreaSlots>> & Pick<ColorAreaProps, 'color' | 'shape'>;
|
|
101
|
+
|
|
102
|
+
export declare type ColorChannel = 'hue' | 'saturation' | 'value';
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* ColorPicker component
|
|
106
|
+
*/
|
|
107
|
+
export declare const ColorPicker: ForwardRefComponent<ColorPickerProps>;
|
|
108
|
+
|
|
109
|
+
/** ColorPicker Base Props */
|
|
110
|
+
export declare type ColorPickerBaseProps = Omit<ColorPickerProps, 'shape'>;
|
|
111
|
+
|
|
112
|
+
/** State used in rendering unstyled ColorPicker */
|
|
113
|
+
export declare type ColorPickerBaseState = Omit<ColorPickerState, 'shape'>;
|
|
114
|
+
|
|
115
|
+
export declare const colorPickerClassNames: SlotClassNames<ColorPickerSlots>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The context through which individual color controls communicate with the picker.
|
|
119
|
+
*/
|
|
120
|
+
export declare type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {
|
|
121
|
+
/**
|
|
122
|
+
* Callback used by Sliders to request a change on it's selected value
|
|
123
|
+
* Should be used to get value of color channel
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
requestChange: (event: React_2.ChangeEvent<HTMLInputElement>, data: {
|
|
128
|
+
color: HsvColor;
|
|
129
|
+
}) => void;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export declare type ColorPickerContextValues = {
|
|
133
|
+
colorPicker: ColorPickerContextValue;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
declare type ColorPickerOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLInputElement>> & {
|
|
137
|
+
color: HsvColor;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* ColorPicker Props
|
|
142
|
+
*/
|
|
143
|
+
export declare type ColorPickerProps = Omit<ComponentProps<Partial<ColorPickerSlots>>, 'color'> & {
|
|
144
|
+
/**
|
|
145
|
+
* Selected color.
|
|
146
|
+
*/
|
|
147
|
+
color?: HsvColor;
|
|
148
|
+
/**
|
|
149
|
+
* Callback for when the user changes the color.
|
|
150
|
+
*/
|
|
151
|
+
onColorChange?: EventHandler<ColorPickerOnChangeData>;
|
|
152
|
+
/**
|
|
153
|
+
* ColorPicker shape
|
|
154
|
+
* @defaultvalue 'rounded'
|
|
155
|
+
*/
|
|
156
|
+
shape?: 'rounded' | 'square';
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export declare type ColorPickerSlots = {
|
|
160
|
+
root: Slot<'div'>;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* State used in rendering ColorPicker
|
|
165
|
+
*/
|
|
166
|
+
export declare type ColorPickerState = ComponentState<ColorPickerSlots> & ColorPickerContextValue;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* ColorSlider component
|
|
170
|
+
*/
|
|
171
|
+
export declare const ColorSlider: ForwardRefComponent<ColorSliderProps>;
|
|
172
|
+
|
|
173
|
+
export declare type ColorSliderBaseProps = Omit<ColorSliderProps, 'shape'>;
|
|
174
|
+
|
|
175
|
+
export declare type ColorSliderBaseState = Omit<ColorSliderState, 'shape'>;
|
|
176
|
+
|
|
177
|
+
export declare const colorSliderClassNames: SlotClassNames<ColorSliderSlots>;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* ColorSlider Props
|
|
181
|
+
*/
|
|
182
|
+
export declare type ColorSliderProps = Omit<ComponentProps<Partial<ColorSliderSlots>, 'input'>, 'defaultValue' | 'onChange' | 'value' | 'color'> & Pick<ColorPickerProps, 'shape'> & {
|
|
183
|
+
/**
|
|
184
|
+
* Color channel of the Slider.
|
|
185
|
+
* @default `hue`
|
|
186
|
+
*/
|
|
187
|
+
channel?: ColorChannel;
|
|
188
|
+
/**
|
|
189
|
+
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
190
|
+
*/
|
|
191
|
+
onChange?: EventHandler<SliderOnChangeData>;
|
|
192
|
+
/**
|
|
193
|
+
* Render the Slider in a vertical orientation, smallest value on the bottom.
|
|
194
|
+
* @default `false`
|
|
195
|
+
*/
|
|
196
|
+
vertical?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Color of the ColorPicker
|
|
199
|
+
*/
|
|
200
|
+
color?: HsvColor;
|
|
201
|
+
/**
|
|
202
|
+
* The starting color for an uncontrolled ColorSlider.
|
|
203
|
+
*/
|
|
204
|
+
defaultColor?: HsvColor;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export declare type ColorSliderSlots = {
|
|
208
|
+
root: NonNullable<Slot<'div'>>;
|
|
209
|
+
rail: NonNullable<Slot<'div'>>;
|
|
210
|
+
thumb: NonNullable<Slot<'div'>>;
|
|
211
|
+
input: NonNullable<Slot<'input'>>;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* State used in rendering ColorSlider
|
|
216
|
+
*/
|
|
217
|
+
export declare type ColorSliderState = ComponentState<ColorSliderSlots> & Pick<ColorSliderProps, 'vertical' | 'shape' | 'channel'>;
|
|
218
|
+
|
|
219
|
+
declare type HsvColor = {
|
|
220
|
+
h: number;
|
|
221
|
+
s: number;
|
|
222
|
+
v: number;
|
|
223
|
+
a?: number;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Render the final JSX of AlphaSlider
|
|
228
|
+
*/
|
|
229
|
+
export declare const renderAlphaSlider_unstable: (state: AlphaSliderBaseState) => JSXElement;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Render the final JSX of ColorArea
|
|
233
|
+
*/
|
|
234
|
+
export declare const renderColorArea_unstable: (state: ColorAreaBaseState) => JSXElement;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Render the final JSX of ColorPicker
|
|
238
|
+
*/
|
|
239
|
+
export declare const renderColorPicker_unstable: (state: ColorPickerBaseState, contextValues: ColorPickerContextValues) => JSXElement;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Render the final JSX of ColorSlider
|
|
243
|
+
*/
|
|
244
|
+
export declare const renderColorSlider_unstable: (state: ColorSliderBaseState) => JSXElement;
|
|
245
|
+
|
|
246
|
+
declare type SliderOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLInputElement>> & {
|
|
247
|
+
color: HsvColor;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Create the state required to render AlphaSlider.
|
|
252
|
+
*
|
|
253
|
+
* The returned state can be modified with hooks such as useAlphaSliderStyles_unstable,
|
|
254
|
+
* before being passed to renderAlphaSlider_unstable.
|
|
255
|
+
*
|
|
256
|
+
* @param props - props from this instance of AlphaSlider
|
|
257
|
+
* @param ref - reference to root HTMLInputElement of AlphaSlider
|
|
258
|
+
*/
|
|
259
|
+
export declare const useAlphaSlider_unstable: (props: AlphaSliderProps, ref: React_2.Ref<HTMLInputElement>) => AlphaSliderState;
|
|
260
|
+
|
|
261
|
+
export declare const useAlphaSliderBase_unstable: (props: AlphaSliderBaseProps, ref: React_2.Ref<HTMLInputElement>) => AlphaSliderBaseState;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Apply styling to the AlphaSlider slots based on the state
|
|
265
|
+
*/
|
|
266
|
+
export declare const useAlphaSliderStyles_unstable: (state: AlphaSliderState) => AlphaSliderState;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Create the state required to render ColorArea.
|
|
270
|
+
*
|
|
271
|
+
* The returned state can be modified with hooks such as useColorAreaStyles_unstable,
|
|
272
|
+
* before being passed to renderColorArea_unstable.
|
|
273
|
+
*
|
|
274
|
+
* @param props - props from this instance of ColorArea
|
|
275
|
+
* @param ref - reference to root HTMLDivElement of ColorArea
|
|
276
|
+
*/
|
|
277
|
+
export declare const useColorArea_unstable: (props: ColorAreaProps, ref: React_2.Ref<HTMLDivElement>) => ColorAreaState;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Create the state required to render unstyled ColorArea.
|
|
281
|
+
*
|
|
282
|
+
* The returned state can be modified with hooks before being passed to renderColorArea_unstable.
|
|
283
|
+
*
|
|
284
|
+
* @param props - props from this instance of ColorArea
|
|
285
|
+
* @param ref - reference to root HTMLDivElement of ColorArea
|
|
286
|
+
*/
|
|
287
|
+
export declare const useColorAreaBase_unstable: (props: ColorAreaBaseProps, ref: React_2.Ref<HTMLDivElement>) => ColorAreaBaseState;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Apply styling to the ColorArea slots based on the state
|
|
291
|
+
*/
|
|
292
|
+
export declare const useColorAreaStyles_unstable: (state: ColorAreaState) => ColorAreaState;
|
|
293
|
+
|
|
294
|
+
export declare const useColorPicker_unstable: (props: ColorPickerProps, ref: React_2.Ref<HTMLDivElement>) => ColorPickerState;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Create the state required to render ColorPicker.
|
|
298
|
+
*
|
|
299
|
+
* The returned state can be modified with hooks such as useColorPickerStyles_unstable,
|
|
300
|
+
* before being passed to renderColorPicker_unstable.
|
|
301
|
+
*
|
|
302
|
+
* @param props - props from this instance of ColorPicker
|
|
303
|
+
* @param ref - reference to root HTMLDivElement of ColorPicker
|
|
304
|
+
*/
|
|
305
|
+
export declare const useColorPickerBase_unstable: (props: ColorPickerBaseProps, ref: React_2.Ref<HTMLDivElement>) => ColorPickerBaseState;
|
|
306
|
+
|
|
307
|
+
export declare const useColorPickerContextValue_unstable: <T>(selector: ContextSelector<ColorPickerContextValue, T>) => T;
|
|
308
|
+
|
|
309
|
+
export declare const useColorPickerContextValues: (state: ColorPickerState) => ColorPickerContextValues;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Apply styling to the ColorPicker slots based on the state
|
|
313
|
+
*/
|
|
314
|
+
export declare const useColorPickerStyles_unstable: (state: ColorPickerState) => ColorPickerState;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Create the state required to render ColorSlider.
|
|
318
|
+
*
|
|
319
|
+
* The returned state can be modified with hooks such as useColorSliderStyles_unstable,
|
|
320
|
+
* before being passed to renderColorSlider_unstable.
|
|
321
|
+
*
|
|
322
|
+
* @param props - props from this instance of ColorSlider
|
|
323
|
+
* @param ref - reference to root HTMLInputElement of ColorSlider
|
|
324
|
+
*/
|
|
325
|
+
export declare const useColorSlider_unstable: (props: ColorSliderProps, ref: React_2.Ref<HTMLInputElement>) => ColorSliderState;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Create the base state required to render unstyled ColorSlider.
|
|
329
|
+
*
|
|
330
|
+
* The returned state can be modified with hooks before being passed to renderColorSlider_unstable.
|
|
331
|
+
*
|
|
332
|
+
* @param props - props from this instance of ColorSlider
|
|
333
|
+
* @param ref - reference to root HTMLInputElement of ColorSlider
|
|
334
|
+
*/
|
|
335
|
+
export declare const useColorSliderBase_unstable: (props: ColorSliderBaseProps, ref: React_2.Ref<HTMLInputElement>) => ColorSliderBaseState;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Apply styling to the ColorSlider slots based on the state
|
|
339
|
+
*/
|
|
340
|
+
export declare const useColorSliderStyles_unstable: (state: ColorSliderState) => ColorSliderState;
|
|
341
|
+
|
|
342
|
+
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
3
4
|
import type { EventData } from '@fluentui/react-utilities';
|
|
4
5
|
import type { EventHandler } from '@fluentui/react-utilities';
|
|
5
6
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
@@ -13,6 +14,16 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
|
13
14
|
*/
|
|
14
15
|
export declare const AlphaSlider: ForwardRefComponent<AlphaSliderProps>;
|
|
15
16
|
|
|
17
|
+
/**
|
|
18
|
+
* AlphaSlider Base Props
|
|
19
|
+
*/
|
|
20
|
+
export declare type AlphaSliderBaseProps = Omit<AlphaSliderProps, 'shape'>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* State used in rendering unstyled AlphaSlider
|
|
24
|
+
*/
|
|
25
|
+
export declare type AlphaSliderBaseState = Omit<AlphaSliderState, 'shape'>;
|
|
26
|
+
|
|
16
27
|
export declare const alphaSliderClassNames: SlotClassNames<AlphaSliderSlots>;
|
|
17
28
|
|
|
18
29
|
/**
|
|
@@ -42,6 +53,16 @@ export declare type AlphaSliderState = ComponentState<AlphaSliderSlots> & Pick<A
|
|
|
42
53
|
*/
|
|
43
54
|
export declare const ColorArea: ForwardRefComponent<ColorAreaProps>;
|
|
44
55
|
|
|
56
|
+
/**
|
|
57
|
+
* ColorArea Base Props
|
|
58
|
+
*/
|
|
59
|
+
export declare type ColorAreaBaseProps = Omit<ColorAreaProps, 'shape'>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* ColorArea Base State
|
|
63
|
+
*/
|
|
64
|
+
export declare type ColorAreaBaseState = ComponentState<Required<ColorAreaSlots>> & Pick<ColorAreaProps, 'color'>;
|
|
65
|
+
|
|
45
66
|
export declare const colorAreaClassNames: SlotClassNames<ColorAreaSlots>;
|
|
46
67
|
|
|
47
68
|
declare type ColorAreaOnColorChangeData = EventData<'change', React_2.SyntheticEvent | PointerEvent> & {
|
|
@@ -78,19 +99,25 @@ export declare type ColorAreaSlots = {
|
|
|
78
99
|
*/
|
|
79
100
|
export declare type ColorAreaState = ComponentState<Required<ColorAreaSlots>> & Pick<ColorAreaProps, 'color' | 'shape'>;
|
|
80
101
|
|
|
81
|
-
declare type ColorChannel = 'hue' | 'saturation' | 'value';
|
|
102
|
+
export declare type ColorChannel = 'hue' | 'saturation' | 'value';
|
|
82
103
|
|
|
83
104
|
/**
|
|
84
105
|
* ColorPicker component
|
|
85
106
|
*/
|
|
86
107
|
export declare const ColorPicker: ForwardRefComponent<ColorPickerProps>;
|
|
87
108
|
|
|
109
|
+
/** ColorPicker Base Props */
|
|
110
|
+
export declare type ColorPickerBaseProps = Omit<ColorPickerProps, 'shape'>;
|
|
111
|
+
|
|
112
|
+
/** State used in rendering unstyled ColorPicker */
|
|
113
|
+
export declare type ColorPickerBaseState = Omit<ColorPickerState, 'shape'>;
|
|
114
|
+
|
|
88
115
|
export declare const colorPickerClassNames: SlotClassNames<ColorPickerSlots>;
|
|
89
116
|
|
|
90
117
|
/**
|
|
91
118
|
* The context through which individual color controls communicate with the picker.
|
|
92
119
|
*/
|
|
93
|
-
declare type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {
|
|
120
|
+
export declare type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {
|
|
94
121
|
/**
|
|
95
122
|
* Callback used by Sliders to request a change on it's selected value
|
|
96
123
|
* Should be used to get value of color channel
|
|
@@ -102,7 +129,7 @@ declare type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'>
|
|
|
102
129
|
}) => void;
|
|
103
130
|
};
|
|
104
131
|
|
|
105
|
-
declare type ColorPickerContextValues = {
|
|
132
|
+
export declare type ColorPickerContextValues = {
|
|
106
133
|
colorPicker: ColorPickerContextValue;
|
|
107
134
|
};
|
|
108
135
|
|
|
@@ -143,6 +170,10 @@ export declare type ColorPickerState = ComponentState<ColorPickerSlots> & ColorP
|
|
|
143
170
|
*/
|
|
144
171
|
export declare const ColorSlider: ForwardRefComponent<ColorSliderProps>;
|
|
145
172
|
|
|
173
|
+
export declare type ColorSliderBaseProps = Omit<ColorSliderProps, 'shape'>;
|
|
174
|
+
|
|
175
|
+
export declare type ColorSliderBaseState = Omit<ColorSliderState, 'shape'>;
|
|
176
|
+
|
|
146
177
|
export declare const colorSliderClassNames: SlotClassNames<ColorSliderSlots>;
|
|
147
178
|
|
|
148
179
|
/**
|
|
@@ -195,22 +226,22 @@ declare type HsvColor = {
|
|
|
195
226
|
/**
|
|
196
227
|
* Render the final JSX of AlphaSlider
|
|
197
228
|
*/
|
|
198
|
-
export declare const renderAlphaSlider_unstable: (state:
|
|
229
|
+
export declare const renderAlphaSlider_unstable: (state: AlphaSliderBaseState) => JSXElement;
|
|
199
230
|
|
|
200
231
|
/**
|
|
201
232
|
* Render the final JSX of ColorArea
|
|
202
233
|
*/
|
|
203
|
-
export declare const renderColorArea_unstable: (state:
|
|
234
|
+
export declare const renderColorArea_unstable: (state: ColorAreaBaseState) => JSXElement;
|
|
204
235
|
|
|
205
236
|
/**
|
|
206
237
|
* Render the final JSX of ColorPicker
|
|
207
238
|
*/
|
|
208
|
-
export declare const renderColorPicker_unstable: (state:
|
|
239
|
+
export declare const renderColorPicker_unstable: (state: ColorPickerBaseState, contextValues: ColorPickerContextValues) => JSXElement;
|
|
209
240
|
|
|
210
241
|
/**
|
|
211
242
|
* Render the final JSX of ColorSlider
|
|
212
243
|
*/
|
|
213
|
-
export declare const renderColorSlider_unstable: (state:
|
|
244
|
+
export declare const renderColorSlider_unstable: (state: ColorSliderBaseState) => JSXElement;
|
|
214
245
|
|
|
215
246
|
declare type SliderOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLInputElement>> & {
|
|
216
247
|
color: HsvColor;
|
|
@@ -227,6 +258,8 @@ declare type SliderOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLIn
|
|
|
227
258
|
*/
|
|
228
259
|
export declare const useAlphaSlider_unstable: (props: AlphaSliderProps, ref: React_2.Ref<HTMLInputElement>) => AlphaSliderState;
|
|
229
260
|
|
|
261
|
+
export declare const useAlphaSliderBase_unstable: (props: AlphaSliderBaseProps, ref: React_2.Ref<HTMLInputElement>) => AlphaSliderBaseState;
|
|
262
|
+
|
|
230
263
|
/**
|
|
231
264
|
* Apply styling to the AlphaSlider slots based on the state
|
|
232
265
|
*/
|
|
@@ -243,11 +276,23 @@ export declare const useAlphaSliderStyles_unstable: (state: AlphaSliderState) =>
|
|
|
243
276
|
*/
|
|
244
277
|
export declare const useColorArea_unstable: (props: ColorAreaProps, ref: React_2.Ref<HTMLDivElement>) => ColorAreaState;
|
|
245
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Create the state required to render unstyled ColorArea.
|
|
281
|
+
*
|
|
282
|
+
* The returned state can be modified with hooks before being passed to renderColorArea_unstable.
|
|
283
|
+
*
|
|
284
|
+
* @param props - props from this instance of ColorArea
|
|
285
|
+
* @param ref - reference to root HTMLDivElement of ColorArea
|
|
286
|
+
*/
|
|
287
|
+
export declare const useColorAreaBase_unstable: (props: ColorAreaBaseProps, ref: React_2.Ref<HTMLDivElement>) => ColorAreaBaseState;
|
|
288
|
+
|
|
246
289
|
/**
|
|
247
290
|
* Apply styling to the ColorArea slots based on the state
|
|
248
291
|
*/
|
|
249
292
|
export declare const useColorAreaStyles_unstable: (state: ColorAreaState) => ColorAreaState;
|
|
250
293
|
|
|
294
|
+
export declare const useColorPicker_unstable: (props: ColorPickerProps, ref: React_2.Ref<HTMLDivElement>) => ColorPickerState;
|
|
295
|
+
|
|
251
296
|
/**
|
|
252
297
|
* Create the state required to render ColorPicker.
|
|
253
298
|
*
|
|
@@ -257,7 +302,11 @@ export declare const useColorAreaStyles_unstable: (state: ColorAreaState) => Col
|
|
|
257
302
|
* @param props - props from this instance of ColorPicker
|
|
258
303
|
* @param ref - reference to root HTMLDivElement of ColorPicker
|
|
259
304
|
*/
|
|
260
|
-
export declare const
|
|
305
|
+
export declare const useColorPickerBase_unstable: (props: ColorPickerBaseProps, ref: React_2.Ref<HTMLDivElement>) => ColorPickerBaseState;
|
|
306
|
+
|
|
307
|
+
export declare const useColorPickerContextValue_unstable: <T>(selector: ContextSelector<ColorPickerContextValue, T>) => T;
|
|
308
|
+
|
|
309
|
+
export declare const useColorPickerContextValues: (state: ColorPickerState) => ColorPickerContextValues;
|
|
261
310
|
|
|
262
311
|
/**
|
|
263
312
|
* Apply styling to the ColorPicker slots based on the state
|
|
@@ -275,6 +324,16 @@ export declare const useColorPickerStyles_unstable: (state: ColorPickerState) =>
|
|
|
275
324
|
*/
|
|
276
325
|
export declare const useColorSlider_unstable: (props: ColorSliderProps, ref: React_2.Ref<HTMLInputElement>) => ColorSliderState;
|
|
277
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Create the base state required to render unstyled ColorSlider.
|
|
329
|
+
*
|
|
330
|
+
* The returned state can be modified with hooks before being passed to renderColorSlider_unstable.
|
|
331
|
+
*
|
|
332
|
+
* @param props - props from this instance of ColorSlider
|
|
333
|
+
* @param ref - reference to root HTMLInputElement of ColorSlider
|
|
334
|
+
*/
|
|
335
|
+
export declare const useColorSliderBase_unstable: (props: ColorSliderBaseProps, ref: React_2.Ref<HTMLInputElement>) => ColorSliderBaseState;
|
|
336
|
+
|
|
278
337
|
/**
|
|
279
338
|
* Apply styling to the ColorSlider slots based on the state
|
|
280
339
|
*/
|
package/lib/AlphaSlider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AlphaSlider, alphaSliderCSSVars, alphaSliderClassNames, renderAlphaSlider_unstable, useAlphaSliderStyles_unstable, useAlphaSlider_unstable } from
|
|
1
|
+
export { AlphaSlider, alphaSliderCSSVars, alphaSliderClassNames, renderAlphaSlider_unstable, useAlphaSliderBase_unstable, useAlphaSliderStyles_unstable, useAlphaSlider_unstable } from "./components/AlphaSlider/index.js";
|
package/lib/AlphaSlider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/AlphaSlider.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/AlphaSlider.ts"],"sourcesContent":["export type {\n AlphaSliderBaseProps,\n AlphaSliderBaseState,\n AlphaSliderProps,\n AlphaSliderSlots,\n AlphaSliderState,\n} from './components/AlphaSlider/index';\nexport {\n AlphaSlider,\n alphaSliderCSSVars,\n alphaSliderClassNames,\n renderAlphaSlider_unstable,\n useAlphaSliderBase_unstable,\n useAlphaSliderStyles_unstable,\n useAlphaSlider_unstable,\n} from './components/AlphaSlider/index';\n"],"names":["AlphaSlider","alphaSliderCSSVars","alphaSliderClassNames","renderAlphaSlider_unstable","useAlphaSliderBase_unstable","useAlphaSliderStyles_unstable","useAlphaSlider_unstable"],"mappings":"AAOA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,uBAAuB,QAClB,oCAAiC"}
|
package/lib/ColorArea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ColorArea, colorAreaCSSVars, colorAreaClassNames, renderColorArea_unstable, useColorAreaStyles_unstable, useColorArea_unstable } from
|
|
1
|
+
export { ColorArea, colorAreaCSSVars, colorAreaClassNames, renderColorArea_unstable, useColorAreaBase_unstable, useColorAreaStyles_unstable, useColorArea_unstable } from "./components/ColorArea/index.js";
|
package/lib/ColorArea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ColorArea.ts"],"sourcesContent":["export type {\n ColorAreaOnColorChangeData,\n ColorAreaProps,\n ColorAreaSlots,\n ColorAreaState,\n} from './components/ColorArea/index';\nexport {\n ColorArea,\n colorAreaCSSVars,\n colorAreaClassNames,\n renderColorArea_unstable,\n useColorAreaStyles_unstable,\n useColorArea_unstable,\n} from './components/ColorArea/index';\n"],"names":["ColorArea","colorAreaCSSVars","colorAreaClassNames","renderColorArea_unstable","useColorAreaStyles_unstable","useColorArea_unstable"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/ColorArea.ts"],"sourcesContent":["export type {\n ColorAreaBaseProps,\n ColorAreaBaseState,\n ColorAreaOnColorChangeData,\n ColorAreaProps,\n ColorAreaSlots,\n ColorAreaState,\n} from './components/ColorArea/index';\nexport {\n ColorArea,\n colorAreaCSSVars,\n colorAreaClassNames,\n renderColorArea_unstable,\n useColorAreaBase_unstable,\n useColorAreaStyles_unstable,\n useColorArea_unstable,\n} from './components/ColorArea/index';\n"],"names":["ColorArea","colorAreaCSSVars","colorAreaClassNames","renderColorArea_unstable","useColorAreaBase_unstable","useColorAreaStyles_unstable","useColorArea_unstable"],"mappings":"AAQA,SACEA,SAAS,EACTC,gBAAgB,EAChBC,mBAAmB,EACnBC,wBAAwB,EACxBC,yBAAyB,EACzBC,2BAA2B,EAC3BC,qBAAqB,QAChB,kCAA+B"}
|
package/lib/ColorPicker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ColorPicker, colorPickerClassNames, renderColorPicker_unstable, useColorPickerStyles_unstable, useColorPicker_unstable } from
|
|
1
|
+
export { ColorPicker, colorPickerClassNames, renderColorPicker_unstable, useColorPickerBaseContextValues_unstable, useColorPickerBase_unstable, useColorPickerContextValues, useColorPickerStyles_unstable, useColorPicker_unstable } from "./components/ColorPicker/index.js";
|
package/lib/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ColorPicker.ts"],"sourcesContent":["export type {\n ColorPickerOnChangeData,\n ColorPickerProps,\n ColorPickerSlots,\n ColorPickerState,\n} from './components/ColorPicker/index';\nexport {\n ColorPicker,\n colorPickerClassNames,\n renderColorPicker_unstable,\n useColorPickerStyles_unstable,\n useColorPicker_unstable,\n} from './components/ColorPicker/index';\n"],"names":["ColorPicker","colorPickerClassNames","renderColorPicker_unstable","useColorPickerStyles_unstable","useColorPicker_unstable"],"mappings":"
|
|
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":"AAQA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,wCAAwC,EACxCC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,uBAAuB,QAClB,oCAAiC"}
|
package/lib/ColorSlider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ColorSlider, colorSliderCSSVars, colorSliderClassNames, renderColorSlider_unstable, useColorSliderStyles_unstable, useColorSlider_unstable } from
|
|
1
|
+
export { ColorSlider, colorSliderCSSVars, colorSliderClassNames, renderColorSlider_unstable, useColorSliderBase_unstable, useColorSliderStyles_unstable, useColorSlider_unstable } from "./components/ColorSlider/index.js";
|
package/lib/ColorSlider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ColorSlider.ts"],"sourcesContent":["export type {\n ColorSliderProps,\n ColorSliderSlots,\n ColorSliderState,\n SliderOnChangeData,\n} from './components/ColorSlider/index';\nexport {\n ColorSlider,\n colorSliderCSSVars,\n colorSliderClassNames,\n renderColorSlider_unstable,\n useColorSliderStyles_unstable,\n useColorSlider_unstable,\n} from './components/ColorSlider/index';\n"],"names":["ColorSlider","colorSliderCSSVars","colorSliderClassNames","renderColorSlider_unstable","useColorSliderStyles_unstable","useColorSlider_unstable"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/ColorSlider.ts"],"sourcesContent":["export type {\n ColorChannel,\n ColorSliderBaseProps,\n ColorSliderBaseState,\n ColorSliderProps,\n ColorSliderSlots,\n ColorSliderState,\n SliderOnChangeData,\n} from './components/ColorSlider/index';\nexport {\n ColorSlider,\n colorSliderCSSVars,\n colorSliderClassNames,\n renderColorSlider_unstable,\n useColorSliderBase_unstable,\n useColorSliderStyles_unstable,\n useColorSlider_unstable,\n} from './components/ColorSlider/index';\n"],"names":["ColorSlider","colorSliderCSSVars","colorSliderClassNames","renderColorSlider_unstable","useColorSliderBase_unstable","useColorSliderStyles_unstable","useColorSlider_unstable"],"mappings":"AASA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,uBAAuB,QAClB,oCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/AlphaSlider.constants.ts"],"sourcesContent":["export const alphaSliderCSSVars = {\n sliderDirectionVar: `--fui-AlphaSlider--direction`,\n sliderProgressVar: `--fui-AlphaSlider--progress`,\n thumbColorVar: `--fui-AlphaSlider__thumb--color`,\n railColorVar: `--fui-AlphaSlider__rail--color`,\n};\n"],"names":["alphaSliderCSSVars","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB;IAChCC,oBAAoB,CAAC,4BAA4B,CAAC;IAClDC,mBAAmB,CAAC,2BAA2B,CAAC;IAChDC,eAAe,CAAC,+BAA+B,CAAC;IAChDC,cAAc,CAAC,8BAA8B,CAAC;AAChD,EAAE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useAlphaSlider_unstable } from
|
|
4
|
-
import { renderAlphaSlider_unstable } from
|
|
5
|
-
import { useAlphaSliderStyles_unstable } from
|
|
6
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useAlphaSlider_unstable } from "./useAlphaSlider.js";
|
|
4
|
+
import { renderAlphaSlider_unstable } from "./renderAlphaSlider.js";
|
|
5
|
+
import { useAlphaSliderStyles_unstable } from "./useAlphaSliderStyles.styles.js";
|
|
6
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
7
7
|
/**
|
|
8
8
|
* AlphaSlider component
|
|
9
9
|
*/ export const AlphaSlider = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AlphaSlider/AlphaSlider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useAlphaSlider_unstable } from './useAlphaSlider';\nimport { renderAlphaSlider_unstable } from './renderAlphaSlider';\nimport { useAlphaSliderStyles_unstable } from './useAlphaSliderStyles.styles';\nimport type { AlphaSliderProps } from './AlphaSlider.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * AlphaSlider component\n */\nexport const AlphaSlider: ForwardRefComponent<AlphaSliderProps> = React.forwardRef((props, ref) => {\n const state = useAlphaSlider_unstable(props, ref);\n\n useAlphaSliderStyles_unstable(state);\n useCustomStyleHook_unstable('useAlphaSliderStyles_unstable')(state);\n\n return renderAlphaSlider_unstable(state);\n});\n\nAlphaSlider.displayName = 'AlphaSlider';\n"],"names":["React","useAlphaSlider_unstable","renderAlphaSlider_unstable","useAlphaSliderStyles_unstable","useCustomStyleHook_unstable","AlphaSlider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/AlphaSlider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useAlphaSlider_unstable } from './useAlphaSlider';\nimport { renderAlphaSlider_unstable } from './renderAlphaSlider';\nimport { useAlphaSliderStyles_unstable } from './useAlphaSliderStyles.styles';\nimport type { AlphaSliderProps } from './AlphaSlider.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * AlphaSlider component\n */\nexport const AlphaSlider: ForwardRefComponent<AlphaSliderProps> = React.forwardRef((props, ref) => {\n const state = useAlphaSlider_unstable(props, ref);\n\n useAlphaSliderStyles_unstable(state);\n useCustomStyleHook_unstable('useAlphaSliderStyles_unstable')(state);\n\n return renderAlphaSlider_unstable(state);\n});\n\nAlphaSlider.displayName = 'AlphaSlider';\n"],"names":["React","useAlphaSlider_unstable","renderAlphaSlider_unstable","useAlphaSliderStyles_unstable","useCustomStyleHook_unstable","AlphaSlider","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"}
|