@fluentui/react-color-picker 9.2.18 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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 +17 -2
- package/dist/index.d.cts +283 -0
- 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.js +5 -5
- package/lib/components/AlphaSlider/AlphaSlider.js.map +1 -1
- package/lib/components/AlphaSlider/index.js +4 -4
- package/lib/components/AlphaSlider/index.js.map +1 -1
- package/lib/components/AlphaSlider/renderAlphaSlider.js +1 -1
- package/lib/components/AlphaSlider/useAlphaSlider.js +3 -3
- package/lib/components/AlphaSlider/useAlphaSlider.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderState.js +9 -9
- package/lib/components/AlphaSlider/useAlphaSliderState.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.js +3 -3
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.js.map +1 -1
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js +3 -3
- package/lib/components/AlphaSlider/useAlphaSliderStyles.styles.raw.js.map +1 -1
- package/lib/components/ColorArea/ColorArea.js +5 -5
- package/lib/components/ColorArea/ColorArea.js.map +1 -1
- package/lib/components/ColorArea/index.js +4 -4
- package/lib/components/ColorArea/index.js.map +1 -1
- package/lib/components/ColorArea/renderColorArea.js +1 -1
- package/lib/components/ColorArea/useColorArea.js +10 -10
- package/lib/components/ColorArea/useColorArea.js.map +1 -1
- package/lib/components/ColorArea/useColorAreaStyles.styles.js +3 -3
- package/lib/components/ColorArea/useColorAreaStyles.styles.js.map +1 -1
- package/lib/components/ColorArea/useColorAreaStyles.styles.raw.js +3 -3
- package/lib/components/ColorPicker/ColorPicker.js +6 -6
- package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/index.js +4 -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 +1 -1
- package/lib/components/ColorPicker/useColorPickerContextValues.js +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.js +5 -5
- package/lib/components/ColorSlider/ColorSlider.js.map +1 -1
- package/lib/components/ColorSlider/index.js +4 -4
- package/lib/components/ColorSlider/index.js.map +1 -1
- package/lib/components/ColorSlider/renderColorSlider.js +1 -1
- package/lib/components/ColorSlider/useColorSlider.js +10 -10
- package/lib/components/ColorSlider/useColorSlider.js.map +1 -1
- package/lib/components/ColorSlider/useColorSliderStyles.styles.js +2 -2
- package/lib/components/ColorSlider/useColorSliderStyles.styles.js.map +1 -1
- package/lib/components/ColorSlider/useColorSliderStyles.styles.raw.js +2 -2
- package/lib/contexts/colorPicker.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/utils/adjustChannel.js +2 -2
- package/lib/utils/adjustChannel.js.map +1 -1
- package/lib/utils/constants.js +1 -1
- package/lib/utils/getCoordinates.js +1 -1
- package/lib-commonjs/{AlphaSlider.js → AlphaSlider.cjs} +1 -1
- package/lib-commonjs/{AlphaSlider.js.map → AlphaSlider.cjs.map} +1 -1
- package/lib-commonjs/{ColorArea.js → ColorArea.cjs} +1 -1
- package/lib-commonjs/{ColorArea.js.map → ColorArea.cjs.map} +1 -1
- package/lib-commonjs/{ColorPicker.js → ColorPicker.cjs} +1 -1
- package/lib-commonjs/{ColorPicker.js.map → ColorPicker.cjs.map} +1 -1
- package/lib-commonjs/{ColorSlider.js → ColorSlider.cjs} +1 -1
- package/lib-commonjs/{ColorSlider.js.map → ColorSlider.cjs.map} +1 -1
- 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/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/AlphaSlider/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/AlphaSlider/{useAlphaSlider.js → useAlphaSlider.cjs} +2 -2
- package/lib-commonjs/components/AlphaSlider/{useAlphaSlider.js.map → useAlphaSlider.cjs.map} +1 -1
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderState.js → useAlphaSliderState.cjs} +6 -6
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderState.js.map → useAlphaSliderState.cjs.map} +1 -1
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderStyles.styles.js → useAlphaSliderStyles.styles.cjs} +1 -1
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderStyles.styles.raw.js → useAlphaSliderStyles.styles.raw.cjs} +1 -1
- package/lib-commonjs/components/AlphaSlider/{useAlphaSliderStyles.styles.raw.js.map → useAlphaSliderStyles.styles.raw.cjs.map} +1 -1
- 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/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ColorArea/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ColorArea/{useColorArea.js → useColorArea.cjs} +4 -4
- package/lib-commonjs/components/ColorArea/{useColorArea.js.map → useColorArea.cjs.map} +1 -1
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.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/ColorPicker/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ColorPicker/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ColorPicker/{renderColorPicker.js → renderColorPicker.cjs} +1 -1
- package/lib-commonjs/components/ColorPicker/{renderColorPicker.js.map → renderColorPicker.cjs.map} +1 -1
- 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/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ColorSlider/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSlider/{useColorSlider.js → useColorSlider.cjs} +6 -6
- package/lib-commonjs/components/ColorSlider/{useColorSlider.js.map → useColorSlider.cjs.map} +1 -1
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.cjs.map +1 -0
- package/lib-commonjs/{index.js → index.cjs} +4 -4
- package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/utils/{adjustChannel.js → adjustChannel.cjs} +1 -1
- package/lib-commonjs/utils/{adjustChannel.js.map → adjustChannel.cjs.map} +1 -1
- package/package.json +19 -18
- package/lib-commonjs/components/AlphaSlider/useAlphaSliderStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorArea/useColorAreaStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorPicker/useColorPickerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ColorSlider/useColorSliderStyles.styles.js.map +0 -1
- /package/lib-commonjs/components/AlphaSlider/{AlphaSlider.types.js → AlphaSlider.types.cjs} +0 -0
- /package/lib-commonjs/components/AlphaSlider/{AlphaSlider.types.js.map → AlphaSlider.types.cjs.map} +0 -0
- /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/AlphaSlider/{renderAlphaSlider.js.map → renderAlphaSlider.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorArea/{ColorArea.types.js → ColorArea.types.cjs} +0 -0
- /package/lib-commonjs/components/ColorArea/{ColorArea.types.js.map → ColorArea.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorArea/{renderColorArea.js → renderColorArea.cjs} +0 -0
- /package/lib-commonjs/components/ColorArea/{renderColorArea.js.map → renderColorArea.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorArea/{useColorAreaStyles.styles.js → useColorAreaStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ColorArea/{useColorAreaStyles.styles.raw.js → useColorAreaStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ColorArea/{useColorAreaStyles.styles.raw.js.map → useColorAreaStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorPicker/{ColorPicker.types.js → ColorPicker.types.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{ColorPicker.types.js.map → ColorPicker.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPicker.js → useColorPicker.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPicker.js.map → useColorPicker.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPickerContextValues.js → useColorPickerContextValues.cjs} +0 -0
- /package/lib-commonjs/components/ColorPicker/{useColorPickerContextValues.js.map → useColorPickerContextValues.cjs.map} +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/components/ColorSlider/{ColorSlider.types.js → ColorSlider.types.cjs} +0 -0
- /package/lib-commonjs/components/ColorSlider/{ColorSlider.types.js.map → ColorSlider.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorSlider/{renderColorSlider.js → renderColorSlider.cjs} +0 -0
- /package/lib-commonjs/components/ColorSlider/{renderColorSlider.js.map → renderColorSlider.cjs.map} +0 -0
- /package/lib-commonjs/components/ColorSlider/{useColorSliderStyles.styles.js → useColorSliderStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ColorSlider/{useColorSliderStyles.styles.raw.js → useColorSliderStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ColorSlider/{useColorSliderStyles.styles.raw.js.map → useColorSliderStyles.styles.raw.cjs.map} +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/types/{color.js → color.cjs} +0 -0
- /package/lib-commonjs/types/{color.js.map → color.cjs.map} +0 -0
- /package/lib-commonjs/utils/{constants.js → constants.cjs} +0 -0
- /package/lib-commonjs/utils/{constants.js.map → constants.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,27 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-color-picker
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 09 Jul 2026 17:34:03 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.74.3-experimental.esm.20260709-49ee7a20cf.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-color-picker_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
8
|
+
|
|
9
|
+
Thu, 09 Jul 2026 17:34:03 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-color-picker_v9.2.18..@fluentui/react-color-picker_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Release 9.74.3-experimental.esm.20260709-49ee7a20cf ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-context-selector to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
17
|
+
- Bump @fluentui/react-shared-contexts to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
19
|
+
- Bump @fluentui/react-theme to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
20
|
+
- Bump @fluentui/react-utilities to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
21
|
+
|
|
7
22
|
## [9.2.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-color-picker_v9.2.18)
|
|
8
23
|
|
|
9
|
-
Wed, 24 Jun 2026 11:
|
|
24
|
+
Wed, 24 Jun 2026 11:09:41 GMT
|
|
10
25
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-color-picker_v9.2.17..@fluentui/react-color-picker_v9.2.18)
|
|
11
26
|
|
|
12
27
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { EventData } from '@fluentui/react-utilities';
|
|
4
|
+
import type { EventHandler } from '@fluentui/react-utilities';
|
|
5
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
6
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
7
|
+
import * as React_2 from 'react';
|
|
8
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
9
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* AlphaSlider component
|
|
13
|
+
*/
|
|
14
|
+
export declare const AlphaSlider: ForwardRefComponent<AlphaSliderProps>;
|
|
15
|
+
|
|
16
|
+
export declare const alphaSliderClassNames: SlotClassNames<AlphaSliderSlots>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* AlphaSlider Props
|
|
20
|
+
*/
|
|
21
|
+
export declare type AlphaSliderProps = Omit<ColorSliderProps, 'channel'> & {
|
|
22
|
+
/**
|
|
23
|
+
* The `transparency` property determines how the alpha channel is interpreted.
|
|
24
|
+
* - When `false`, the alpha channel represents the opacity of the color.
|
|
25
|
+
* - When `true`, the alpha channel represents the transparency of the color.
|
|
26
|
+
* For example, a 30% transparent color has 70% opacity.
|
|
27
|
+
*
|
|
28
|
+
* @defaultvalue false
|
|
29
|
+
*/
|
|
30
|
+
transparency?: boolean;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type AlphaSliderSlots = ColorSliderSlots;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* State used in rendering AlphaSlider
|
|
37
|
+
*/
|
|
38
|
+
export declare type AlphaSliderState = ComponentState<AlphaSliderSlots> & Pick<AlphaSliderProps, 'vertical'> & Omit<ColorSliderState, keyof ColorSliderSlots | 'components'>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* ColorArea component
|
|
42
|
+
*/
|
|
43
|
+
export declare const ColorArea: ForwardRefComponent<ColorAreaProps>;
|
|
44
|
+
|
|
45
|
+
export declare const colorAreaClassNames: SlotClassNames<ColorAreaSlots>;
|
|
46
|
+
|
|
47
|
+
declare type ColorAreaOnColorChangeData = EventData<'change', React_2.SyntheticEvent | PointerEvent> & {
|
|
48
|
+
color: HsvColor;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* ColorArea Props
|
|
53
|
+
*/
|
|
54
|
+
export declare type ColorAreaProps = Omit<ComponentProps<Partial<ColorAreaSlots>>, 'color' | 'onChange'> & Pick<ColorPickerProps, 'shape'> & {
|
|
55
|
+
/**
|
|
56
|
+
* The current color of the ColorArea.
|
|
57
|
+
*/
|
|
58
|
+
color?: HsvColor;
|
|
59
|
+
/**
|
|
60
|
+
* The starting value for an uncontrolled ColorArea.
|
|
61
|
+
*/
|
|
62
|
+
defaultColor?: HsvColor;
|
|
63
|
+
/**
|
|
64
|
+
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
65
|
+
*/
|
|
66
|
+
onChange?: EventHandler<ColorAreaOnColorChangeData>;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export declare type ColorAreaSlots = {
|
|
70
|
+
root: NonNullable<Slot<'div'>>;
|
|
71
|
+
thumb?: NonNullable<Slot<'div'>>;
|
|
72
|
+
inputX?: NonNullable<Slot<'input'>>;
|
|
73
|
+
inputY?: NonNullable<Slot<'input'>>;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* State used in rendering ColorArea
|
|
78
|
+
*/
|
|
79
|
+
export declare type ColorAreaState = ComponentState<Required<ColorAreaSlots>> & Pick<ColorAreaProps, 'color' | 'shape'>;
|
|
80
|
+
|
|
81
|
+
declare type ColorChannel = 'hue' | 'saturation' | 'value';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* ColorPicker component
|
|
85
|
+
*/
|
|
86
|
+
export declare const ColorPicker: ForwardRefComponent<ColorPickerProps>;
|
|
87
|
+
|
|
88
|
+
export declare const colorPickerClassNames: SlotClassNames<ColorPickerSlots>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The context through which individual color controls communicate with the picker.
|
|
92
|
+
*/
|
|
93
|
+
declare type ColorPickerContextValue = Pick<ColorPickerProps, 'shape' | 'color'> & {
|
|
94
|
+
/**
|
|
95
|
+
* Callback used by Sliders to request a change on it's selected value
|
|
96
|
+
* Should be used to get value of color channel
|
|
97
|
+
*
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
requestChange: (event: React_2.ChangeEvent<HTMLInputElement>, data: {
|
|
101
|
+
color: HsvColor;
|
|
102
|
+
}) => void;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
declare type ColorPickerContextValues = {
|
|
106
|
+
colorPicker: ColorPickerContextValue;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type ColorPickerOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLInputElement>> & {
|
|
110
|
+
color: HsvColor;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* ColorPicker Props
|
|
115
|
+
*/
|
|
116
|
+
export declare type ColorPickerProps = Omit<ComponentProps<Partial<ColorPickerSlots>>, 'color'> & {
|
|
117
|
+
/**
|
|
118
|
+
* Selected color.
|
|
119
|
+
*/
|
|
120
|
+
color?: HsvColor;
|
|
121
|
+
/**
|
|
122
|
+
* Callback for when the user changes the color.
|
|
123
|
+
*/
|
|
124
|
+
onColorChange?: EventHandler<ColorPickerOnChangeData>;
|
|
125
|
+
/**
|
|
126
|
+
* ColorPicker shape
|
|
127
|
+
* @defaultvalue 'rounded'
|
|
128
|
+
*/
|
|
129
|
+
shape?: 'rounded' | 'square';
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export declare type ColorPickerSlots = {
|
|
133
|
+
root: Slot<'div'>;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* State used in rendering ColorPicker
|
|
138
|
+
*/
|
|
139
|
+
export declare type ColorPickerState = ComponentState<ColorPickerSlots> & ColorPickerContextValue;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* ColorSlider component
|
|
143
|
+
*/
|
|
144
|
+
export declare const ColorSlider: ForwardRefComponent<ColorSliderProps>;
|
|
145
|
+
|
|
146
|
+
export declare const colorSliderClassNames: SlotClassNames<ColorSliderSlots>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* ColorSlider Props
|
|
150
|
+
*/
|
|
151
|
+
export declare type ColorSliderProps = Omit<ComponentProps<Partial<ColorSliderSlots>, 'input'>, 'defaultValue' | 'onChange' | 'value' | 'color'> & Pick<ColorPickerProps, 'shape'> & {
|
|
152
|
+
/**
|
|
153
|
+
* Color channel of the Slider.
|
|
154
|
+
* @default `hue`
|
|
155
|
+
*/
|
|
156
|
+
channel?: ColorChannel;
|
|
157
|
+
/**
|
|
158
|
+
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
159
|
+
*/
|
|
160
|
+
onChange?: EventHandler<SliderOnChangeData>;
|
|
161
|
+
/**
|
|
162
|
+
* Render the Slider in a vertical orientation, smallest value on the bottom.
|
|
163
|
+
* @default `false`
|
|
164
|
+
*/
|
|
165
|
+
vertical?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Color of the ColorPicker
|
|
168
|
+
*/
|
|
169
|
+
color?: HsvColor;
|
|
170
|
+
/**
|
|
171
|
+
* The starting color for an uncontrolled ColorSlider.
|
|
172
|
+
*/
|
|
173
|
+
defaultColor?: HsvColor;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export declare type ColorSliderSlots = {
|
|
177
|
+
root: NonNullable<Slot<'div'>>;
|
|
178
|
+
rail: NonNullable<Slot<'div'>>;
|
|
179
|
+
thumb: NonNullable<Slot<'div'>>;
|
|
180
|
+
input: NonNullable<Slot<'input'>>;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* State used in rendering ColorSlider
|
|
185
|
+
*/
|
|
186
|
+
export declare type ColorSliderState = ComponentState<ColorSliderSlots> & Pick<ColorSliderProps, 'vertical' | 'shape' | 'channel'>;
|
|
187
|
+
|
|
188
|
+
declare type HsvColor = {
|
|
189
|
+
h: number;
|
|
190
|
+
s: number;
|
|
191
|
+
v: number;
|
|
192
|
+
a?: number;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Render the final JSX of AlphaSlider
|
|
197
|
+
*/
|
|
198
|
+
export declare const renderAlphaSlider_unstable: (state: AlphaSliderState) => JSXElement;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Render the final JSX of ColorArea
|
|
202
|
+
*/
|
|
203
|
+
export declare const renderColorArea_unstable: (state: ColorAreaState) => JSXElement;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Render the final JSX of ColorPicker
|
|
207
|
+
*/
|
|
208
|
+
export declare const renderColorPicker_unstable: (state: ColorPickerState, contextValues: ColorPickerContextValues) => JSXElement;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Render the final JSX of ColorSlider
|
|
212
|
+
*/
|
|
213
|
+
export declare const renderColorSlider_unstable: (state: ColorSliderState) => JSXElement;
|
|
214
|
+
|
|
215
|
+
declare type SliderOnChangeData = EventData<'change', React_2.ChangeEvent<HTMLInputElement>> & {
|
|
216
|
+
color: HsvColor;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Create the state required to render AlphaSlider.
|
|
221
|
+
*
|
|
222
|
+
* The returned state can be modified with hooks such as useAlphaSliderStyles_unstable,
|
|
223
|
+
* before being passed to renderAlphaSlider_unstable.
|
|
224
|
+
*
|
|
225
|
+
* @param props - props from this instance of AlphaSlider
|
|
226
|
+
* @param ref - reference to root HTMLInputElement of AlphaSlider
|
|
227
|
+
*/
|
|
228
|
+
export declare const useAlphaSlider_unstable: (props: AlphaSliderProps, ref: React_2.Ref<HTMLInputElement>) => AlphaSliderState;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Apply styling to the AlphaSlider slots based on the state
|
|
232
|
+
*/
|
|
233
|
+
export declare const useAlphaSliderStyles_unstable: (state: AlphaSliderState) => AlphaSliderState;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Create the state required to render ColorArea.
|
|
237
|
+
*
|
|
238
|
+
* The returned state can be modified with hooks such as useColorAreaStyles_unstable,
|
|
239
|
+
* before being passed to renderColorArea_unstable.
|
|
240
|
+
*
|
|
241
|
+
* @param props - props from this instance of ColorArea
|
|
242
|
+
* @param ref - reference to root HTMLDivElement of ColorArea
|
|
243
|
+
*/
|
|
244
|
+
export declare const useColorArea_unstable: (props: ColorAreaProps, ref: React_2.Ref<HTMLDivElement>) => ColorAreaState;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Apply styling to the ColorArea slots based on the state
|
|
248
|
+
*/
|
|
249
|
+
export declare const useColorAreaStyles_unstable: (state: ColorAreaState) => ColorAreaState;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Create the state required to render ColorPicker.
|
|
253
|
+
*
|
|
254
|
+
* The returned state can be modified with hooks such as useColorPickerStyles_unstable,
|
|
255
|
+
* before being passed to renderColorPicker_unstable.
|
|
256
|
+
*
|
|
257
|
+
* @param props - props from this instance of ColorPicker
|
|
258
|
+
* @param ref - reference to root HTMLDivElement of ColorPicker
|
|
259
|
+
*/
|
|
260
|
+
export declare const useColorPicker_unstable: (props: ColorPickerProps, ref: React_2.Ref<HTMLDivElement>) => ColorPickerState;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Apply styling to the ColorPicker slots based on the state
|
|
264
|
+
*/
|
|
265
|
+
export declare const useColorPickerStyles_unstable: (state: ColorPickerState) => ColorPickerState;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Create the state required to render ColorSlider.
|
|
269
|
+
*
|
|
270
|
+
* The returned state can be modified with hooks such as useColorSliderStyles_unstable,
|
|
271
|
+
* before being passed to renderColorSlider_unstable.
|
|
272
|
+
*
|
|
273
|
+
* @param props - props from this instance of ColorSlider
|
|
274
|
+
* @param ref - reference to root HTMLInputElement of ColorSlider
|
|
275
|
+
*/
|
|
276
|
+
export declare const useColorSlider_unstable: (props: ColorSliderProps, ref: React_2.Ref<HTMLInputElement>) => ColorSliderState;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Apply styling to the ColorSlider slots based on the state
|
|
280
|
+
*/
|
|
281
|
+
export declare const useColorSliderStyles_unstable: (state: ColorSliderState) => ColorSliderState;
|
|
282
|
+
|
|
283
|
+
export { }
|
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, 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 { AlphaSliderProps, AlphaSliderSlots, AlphaSliderState } from './components/AlphaSlider/index';\nexport {\n AlphaSlider,\n alphaSliderCSSVars,\n alphaSliderClassNames,\n renderAlphaSlider_unstable,\n useAlphaSliderStyles_unstable,\n useAlphaSlider_unstable,\n} from './components/AlphaSlider/index';\n"],"names":["AlphaSlider","alphaSliderCSSVars","alphaSliderClassNames","renderAlphaSlider_unstable","useAlphaSliderStyles_unstable","useAlphaSlider_unstable"],"mappings":"AACA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,
|
|
1
|
+
{"version":3,"sources":["../src/AlphaSlider.ts"],"sourcesContent":["export type { AlphaSliderProps, AlphaSliderSlots, AlphaSliderState } from './components/AlphaSlider/index';\nexport {\n AlphaSlider,\n alphaSliderCSSVars,\n alphaSliderClassNames,\n renderAlphaSlider_unstable,\n useAlphaSliderStyles_unstable,\n useAlphaSlider_unstable,\n} from './components/AlphaSlider/index';\n"],"names":["AlphaSlider","alphaSliderCSSVars","alphaSliderClassNames","renderAlphaSlider_unstable","useAlphaSliderStyles_unstable","useAlphaSlider_unstable"],"mappings":"AACA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,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, 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":"AAMA,SACEA,SAAS,EACTC,gBAAgB,EAChBC,mBAAmB,EACnBC,wBAAwB,EACxBC,2BAA2B,EAC3BC,qBAAqB,QAChB
|
|
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":"AAMA,SACEA,SAAS,EACTC,gBAAgB,EAChBC,mBAAmB,EACnBC,wBAAwB,EACxBC,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, 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":"AAMA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,
|
|
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":"AAMA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,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, 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":"AAMA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,
|
|
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":"AAMA,SACEA,WAAW,EACXC,kBAAkB,EAClBC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,oCAAiC"}
|
|
@@ -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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AlphaSlider } from
|
|
2
|
-
export { renderAlphaSlider_unstable } from
|
|
3
|
-
export { useAlphaSlider_unstable } from
|
|
4
|
-
export { alphaSliderCSSVars, alphaSliderClassNames, useAlphaSliderStyles_unstable } from
|
|
1
|
+
export { AlphaSlider } from "./AlphaSlider.js";
|
|
2
|
+
export { renderAlphaSlider_unstable } from "./renderAlphaSlider.js";
|
|
3
|
+
export { useAlphaSlider_unstable } from "./useAlphaSlider.js";
|
|
4
|
+
export { alphaSliderCSSVars, alphaSliderClassNames, useAlphaSliderStyles_unstable } from "./useAlphaSliderStyles.styles.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AlphaSlider/index.ts"],"sourcesContent":["export { AlphaSlider } from './AlphaSlider';\nexport type { AlphaSliderProps, AlphaSliderSlots, AlphaSliderState } from './AlphaSlider.types';\nexport { renderAlphaSlider_unstable } from './renderAlphaSlider';\nexport { useAlphaSlider_unstable } from './useAlphaSlider';\nexport {\n alphaSliderCSSVars,\n alphaSliderClassNames,\n useAlphaSliderStyles_unstable,\n} from './useAlphaSliderStyles.styles';\n"],"names":["AlphaSlider","renderAlphaSlider_unstable","useAlphaSlider_unstable","alphaSliderCSSVars","alphaSliderClassNames","useAlphaSliderStyles_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/index.ts"],"sourcesContent":["export { AlphaSlider } from './AlphaSlider';\nexport type { AlphaSliderProps, AlphaSliderSlots, AlphaSliderState } from './AlphaSlider.types';\nexport { renderAlphaSlider_unstable } from './renderAlphaSlider';\nexport { useAlphaSlider_unstable } from './useAlphaSlider';\nexport {\n alphaSliderCSSVars,\n alphaSliderClassNames,\n useAlphaSliderStyles_unstable,\n} from './useAlphaSliderStyles.styles';\n"],"names":["AlphaSlider","renderAlphaSlider_unstable","useAlphaSlider_unstable","alphaSliderCSSVars","alphaSliderClassNames","useAlphaSliderStyles_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SACEC,kBAAkB,EAClBC,qBAAqB,EACrBC,6BAA6B,QACxB,mCAAgC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { assertSlots } from
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of AlphaSlider
|
|
5
5
|
*/ export const renderAlphaSlider_unstable = (state)=>{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { getPartitionedNativeProps, useId, slot } from
|
|
3
|
-
import { useAlphaSliderState_unstable } from
|
|
4
|
-
import { useColorPickerContextValue_unstable } from
|
|
2
|
+
import { getPartitionedNativeProps, useId, slot } from "@fluentui/react-utilities";
|
|
3
|
+
import { useAlphaSliderState_unstable } from "./useAlphaSliderState.js";
|
|
4
|
+
import { useColorPickerContextValue_unstable } from "../../contexts/colorPicker.js";
|
|
5
5
|
/**
|
|
6
6
|
* Create the state required to render AlphaSlider.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSlider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getPartitionedNativeProps, useId, slot } from '@fluentui/react-utilities';\nimport type { AlphaSliderProps, AlphaSliderState } from './AlphaSlider.types';\nimport { useAlphaSliderState_unstable } from './useAlphaSliderState';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\n\n/**\n * Create the state required to render AlphaSlider.\n *\n * The returned state can be modified with hooks such as useAlphaSliderStyles_unstable,\n * before being passed to renderAlphaSlider_unstable.\n *\n * @param props - props from this instance of AlphaSlider\n * @param ref - reference to root HTMLInputElement of AlphaSlider\n */\nexport const useAlphaSlider_unstable = (\n props: AlphaSliderProps,\n ref: React.Ref<HTMLInputElement>,\n): AlphaSliderState => {\n const shapeFromContext = useColorPickerContextValue_unstable(ctx => ctx.shape);\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['onChange', 'color'],\n });\n\n const {\n shape = shapeFromContext,\n vertical,\n // Slots\n root,\n input,\n rail,\n thumb,\n } = props;\n\n const state: AlphaSliderState = {\n shape,\n vertical,\n components: {\n input: 'input',\n rail: 'div',\n root: 'div',\n thumb: 'div',\n },\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'div',\n }),\n input: slot.always(input, {\n defaultProps: {\n id: useId('slider-', props.id),\n ref,\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 useAlphaSliderState_unstable(state, props);\n\n return state;\n};\n"],"names":["getPartitionedNativeProps","useId","slot","useAlphaSliderState_unstable","useColorPickerContextValue_unstable","useAlphaSlider_unstable","props","ref","shapeFromContext","ctx","shape","nativeProps","primarySlotTagName","excludedPropNames","vertical","root","input","rail","thumb","state","components","always","defaultProps","elementType","id","primary","type"],"mappings":"AAAA;AAGA,SAASA,yBAAyB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAEnF,SAASC,4BAA4B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSlider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getPartitionedNativeProps, useId, slot } from '@fluentui/react-utilities';\nimport type { AlphaSliderProps, AlphaSliderState } from './AlphaSlider.types';\nimport { useAlphaSliderState_unstable } from './useAlphaSliderState';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\n\n/**\n * Create the state required to render AlphaSlider.\n *\n * The returned state can be modified with hooks such as useAlphaSliderStyles_unstable,\n * before being passed to renderAlphaSlider_unstable.\n *\n * @param props - props from this instance of AlphaSlider\n * @param ref - reference to root HTMLInputElement of AlphaSlider\n */\nexport const useAlphaSlider_unstable = (\n props: AlphaSliderProps,\n ref: React.Ref<HTMLInputElement>,\n): AlphaSliderState => {\n const shapeFromContext = useColorPickerContextValue_unstable(ctx => ctx.shape);\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['onChange', 'color'],\n });\n\n const {\n shape = shapeFromContext,\n vertical,\n // Slots\n root,\n input,\n rail,\n thumb,\n } = props;\n\n const state: AlphaSliderState = {\n shape,\n vertical,\n components: {\n input: 'input',\n rail: 'div',\n root: 'div',\n thumb: 'div',\n },\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'div',\n }),\n input: slot.always(input, {\n defaultProps: {\n id: useId('slider-', props.id),\n ref,\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 useAlphaSliderState_unstable(state, props);\n\n return state;\n};\n"],"names":["getPartitionedNativeProps","useId","slot","useAlphaSliderState_unstable","useColorPickerContextValue_unstable","useAlphaSlider_unstable","props","ref","shapeFromContext","ctx","shape","nativeProps","primarySlotTagName","excludedPropNames","vertical","root","input","rail","thumb","state","components","always","defaultProps","elementType","id","primary","type"],"mappings":"AAAA;AAGA,SAASA,yBAAyB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAEnF,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,mCAAmC,QAAQ,gCAA6B;AAEjF;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CACrCC,OACAC;IAEA,MAAMC,mBAAmBJ,oCAAoCK,CAAAA,MAAOA,IAAIC,KAAK;IAC7E,MAAMC,cAAcX,0BAA0B;QAC5CM;QACAM,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;SAAQ;IAC1C;IAEA,MAAM,EACJH,QAAQF,gBAAgB,EACxBM,QAAQ,EACR,QAAQ;IACRC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,KAAK,EACN,GAAGZ;IAEJ,MAAMa,QAA0B;QAC9BT;QACAI;QACAM,YAAY;YACVJ,OAAO;YACPC,MAAM;YACNF,MAAM;YACNG,OAAO;QACT;QACAH,MAAMb,KAAKmB,MAAM,CAACN,MAAM;YACtBO,cAAcX,YAAYI,IAAI;YAC9BQ,aAAa;QACf;QACAP,OAAOd,KAAKmB,MAAM,CAACL,OAAO;YACxBM,cAAc;gBACZE,IAAIvB,MAAM,WAAWK,MAAMkB,EAAE;gBAC7BjB;gBACA,GAAGI,YAAYc,OAAO;gBACtBC,MAAM;YACR;YACAH,aAAa;QACf;QACAN,MAAMf,KAAKmB,MAAM,CAACJ,MAAM;YAAEM,aAAa;QAAM;QAC7CL,OAAOhB,KAAKmB,MAAM,CAACH,OAAO;YAAEK,aAAa;QAAM;IACjD;IAEApB,6BAA6BgB,OAAOb;IAEpC,OAAOa;AACT,EAAE"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { tinycolor } from
|
|
3
|
-
import { clamp, useControllableState, useEventCallback } from
|
|
4
|
-
import { useFluent_unstable as useFluent } from
|
|
5
|
-
import { alphaSliderCSSVars } from
|
|
6
|
-
import { useColorPickerContextValue_unstable } from
|
|
7
|
-
import { MIN, MAX } from
|
|
8
|
-
import { getPercent } from
|
|
9
|
-
import { adjustToTransparency, calculateTransparencyValue, getSliderDirection } from
|
|
10
|
-
import { createHsvColor } from
|
|
2
|
+
import { tinycolor } from "@ctrl/tinycolor";
|
|
3
|
+
import { clamp, useControllableState, useEventCallback } from "@fluentui/react-utilities";
|
|
4
|
+
import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
|
|
5
|
+
import { alphaSliderCSSVars } from "./useAlphaSliderStyles.styles.js";
|
|
6
|
+
import { useColorPickerContextValue_unstable } from "../../contexts/colorPicker.js";
|
|
7
|
+
import { MIN, MAX } from "../../utils/constants.js";
|
|
8
|
+
import { getPercent } from "../../utils/getPercent.js";
|
|
9
|
+
import { adjustToTransparency, calculateTransparencyValue, getSliderDirection } from "./alphaSliderUtils.js";
|
|
10
|
+
import { createHsvColor } from "../../utils/createHsvColor.js";
|
|
11
11
|
export const useAlphaSliderState_unstable = (state, props)=>{
|
|
12
12
|
var _props_defaultColor;
|
|
13
13
|
const { dir } = useFluent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSliderState.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { tinycolor } from '@ctrl/tinycolor';\nimport { clamp, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { alphaSliderCSSVars } from './useAlphaSliderStyles.styles';\nimport type { AlphaSliderState, AlphaSliderProps } from './AlphaSlider.types';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\nimport { MIN, MAX } from '../../utils/constants';\nimport { getPercent } from '../../utils/getPercent';\nimport { adjustToTransparency, calculateTransparencyValue, getSliderDirection } from './alphaSliderUtils';\nimport { createHsvColor } from '../../utils/createHsvColor';\n\nexport const useAlphaSliderState_unstable = (state: AlphaSliderState, props: AlphaSliderProps): AlphaSliderState => {\n const { dir } = useFluent();\n const onChangeFromContext = useColorPickerContextValue_unstable(ctx => ctx.requestChange);\n const colorFromContext = useColorPickerContextValue_unstable(ctx => ctx.color);\n const { color, onChange = onChangeFromContext, transparency = false, vertical = false } = props;\n const hsvColor = color || colorFromContext;\n const hslColor = tinycolor(hsvColor).toHsl();\n\n const [currentValue, setCurrentValue] = useControllableState({\n defaultState: calculateTransparencyValue(transparency, props.defaultColor?.a),\n state: calculateTransparencyValue(transparency, hsvColor?.a),\n initialState: adjustToTransparency(100, transparency),\n });\n\n const clampedValue = clamp(currentValue, MIN, MAX);\n const valuePercent = getPercent(clampedValue, MIN, MAX);\n\n const inputOnChange = state.input.onChange;\n\n const _onChange: React.ChangeEventHandler<HTMLInputElement> = useEventCallback(event => {\n const newValue = adjustToTransparency(Number(event.target.value), transparency);\n const newColor = createHsvColor({ ...hsvColor, a: newValue / 100 });\n setCurrentValue(newValue);\n inputOnChange?.(event);\n onChange?.(event, { type: 'change', event, color: newColor });\n });\n\n const sliderDirection = getSliderDirection(dir, vertical, transparency);\n\n const rootVariables = {\n [alphaSliderCSSVars.sliderDirectionVar]: sliderDirection,\n [alphaSliderCSSVars.sliderProgressVar]: `${valuePercent}%`,\n [alphaSliderCSSVars.thumbColorVar]: `hsla(${hslColor.h} ${hslColor.s * 100}%, ${hslColor.l * 100}%, ${hslColor.a})`,\n [alphaSliderCSSVars.railColorVar]: `hsl(${hslColor.h} ${hslColor.s * 100}%, ${hslColor.l * 100}%)`,\n };\n\n // Root props\n // eslint-disable-next-line react-hooks/immutability\n state.root.style = {\n ...rootVariables,\n ...state.root.style,\n };\n\n // Input Props\n // eslint-disable-next-line react-hooks/immutability\n state.input.value = clampedValue;\n // eslint-disable-next-line react-hooks/immutability\n state.input.onChange = _onChange;\n\n return state;\n};\n"],"names":["tinycolor","clamp","useControllableState","useEventCallback","useFluent_unstable","useFluent","alphaSliderCSSVars","useColorPickerContextValue_unstable","MIN","MAX","getPercent","adjustToTransparency","calculateTransparencyValue","getSliderDirection","createHsvColor","useAlphaSliderState_unstable","state","props","dir","onChangeFromContext","ctx","requestChange","colorFromContext","color","onChange","transparency","vertical","hsvColor","hslColor","toHsl","currentValue","setCurrentValue","defaultState","defaultColor","a","initialState","clampedValue","valuePercent","inputOnChange","input","_onChange","event","newValue","Number","target","value","newColor","type","sliderDirection","rootVariables","sliderDirectionVar","sliderProgressVar","thumbColorVar","h","s","l","railColorVar","root","style"],"mappings":"AAAA;AAGA,SAASA,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,KAAK,EAAEC,oBAAoB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC1F,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSliderState.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { tinycolor } from '@ctrl/tinycolor';\nimport { clamp, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { alphaSliderCSSVars } from './useAlphaSliderStyles.styles';\nimport type { AlphaSliderState, AlphaSliderProps } from './AlphaSlider.types';\nimport { useColorPickerContextValue_unstable } from '../../contexts/colorPicker';\nimport { MIN, MAX } from '../../utils/constants';\nimport { getPercent } from '../../utils/getPercent';\nimport { adjustToTransparency, calculateTransparencyValue, getSliderDirection } from './alphaSliderUtils';\nimport { createHsvColor } from '../../utils/createHsvColor';\n\nexport const useAlphaSliderState_unstable = (state: AlphaSliderState, props: AlphaSliderProps): AlphaSliderState => {\n const { dir } = useFluent();\n const onChangeFromContext = useColorPickerContextValue_unstable(ctx => ctx.requestChange);\n const colorFromContext = useColorPickerContextValue_unstable(ctx => ctx.color);\n const { color, onChange = onChangeFromContext, transparency = false, vertical = false } = props;\n const hsvColor = color || colorFromContext;\n const hslColor = tinycolor(hsvColor).toHsl();\n\n const [currentValue, setCurrentValue] = useControllableState({\n defaultState: calculateTransparencyValue(transparency, props.defaultColor?.a),\n state: calculateTransparencyValue(transparency, hsvColor?.a),\n initialState: adjustToTransparency(100, transparency),\n });\n\n const clampedValue = clamp(currentValue, MIN, MAX);\n const valuePercent = getPercent(clampedValue, MIN, MAX);\n\n const inputOnChange = state.input.onChange;\n\n const _onChange: React.ChangeEventHandler<HTMLInputElement> = useEventCallback(event => {\n const newValue = adjustToTransparency(Number(event.target.value), transparency);\n const newColor = createHsvColor({ ...hsvColor, a: newValue / 100 });\n setCurrentValue(newValue);\n inputOnChange?.(event);\n onChange?.(event, { type: 'change', event, color: newColor });\n });\n\n const sliderDirection = getSliderDirection(dir, vertical, transparency);\n\n const rootVariables = {\n [alphaSliderCSSVars.sliderDirectionVar]: sliderDirection,\n [alphaSliderCSSVars.sliderProgressVar]: `${valuePercent}%`,\n [alphaSliderCSSVars.thumbColorVar]: `hsla(${hslColor.h} ${hslColor.s * 100}%, ${hslColor.l * 100}%, ${hslColor.a})`,\n [alphaSliderCSSVars.railColorVar]: `hsl(${hslColor.h} ${hslColor.s * 100}%, ${hslColor.l * 100}%)`,\n };\n\n // Root props\n // eslint-disable-next-line react-hooks/immutability\n state.root.style = {\n ...rootVariables,\n ...state.root.style,\n };\n\n // Input Props\n // eslint-disable-next-line react-hooks/immutability\n state.input.value = clampedValue;\n // eslint-disable-next-line react-hooks/immutability\n state.input.onChange = _onChange;\n\n return state;\n};\n"],"names":["tinycolor","clamp","useControllableState","useEventCallback","useFluent_unstable","useFluent","alphaSliderCSSVars","useColorPickerContextValue_unstable","MIN","MAX","getPercent","adjustToTransparency","calculateTransparencyValue","getSliderDirection","createHsvColor","useAlphaSliderState_unstable","state","props","dir","onChangeFromContext","ctx","requestChange","colorFromContext","color","onChange","transparency","vertical","hsvColor","hslColor","toHsl","currentValue","setCurrentValue","defaultState","defaultColor","a","initialState","clampedValue","valuePercent","inputOnChange","input","_onChange","event","newValue","Number","target","value","newColor","type","sliderDirection","rootVariables","sliderDirectionVar","sliderProgressVar","thumbColorVar","h","s","l","railColorVar","root","style"],"mappings":"AAAA;AAGA,SAASA,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,KAAK,EAAEC,oBAAoB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC1F,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,kBAAkB,QAAQ,mCAAgC;AAEnE,SAASC,mCAAmC,QAAQ,gCAA6B;AACjF,SAASC,GAAG,EAAEC,GAAG,QAAQ,2BAAwB;AACjD,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,oBAAoB,EAAEC,0BAA0B,EAAEC,kBAAkB,QAAQ,wBAAqB;AAC1G,SAASC,cAAc,QAAQ,gCAA6B;AAE5D,OAAO,MAAMC,+BAA+B,CAACC,OAAyBC;QASXA;IARzD,MAAM,EAAEC,GAAG,EAAE,GAAGb;IAChB,MAAMc,sBAAsBZ,oCAAoCa,CAAAA,MAAOA,IAAIC,aAAa;IACxF,MAAMC,mBAAmBf,oCAAoCa,CAAAA,MAAOA,IAAIG,KAAK;IAC7E,MAAM,EAAEA,KAAK,EAAEC,WAAWL,mBAAmB,EAAEM,eAAe,KAAK,EAAEC,WAAW,KAAK,EAAE,GAAGT;IAC1F,MAAMU,WAAWJ,SAASD;IAC1B,MAAMM,WAAW5B,UAAU2B,UAAUE,KAAK;IAE1C,MAAM,CAACC,cAAcC,gBAAgB,GAAG7B,qBAAqB;QAC3D8B,cAAcpB,2BAA2Ba,eAAcR,sBAAAA,MAAMgB,YAAY,cAAlBhB,0CAAAA,oBAAoBiB,CAAC;QAC5ElB,OAAOJ,2BAA2Ba,cAAcE,qBAAAA,+BAAAA,SAAUO,CAAC;QAC3DC,cAAcxB,qBAAqB,KAAKc;IAC1C;IAEA,MAAMW,eAAenC,MAAM6B,cAActB,KAAKC;IAC9C,MAAM4B,eAAe3B,WAAW0B,cAAc5B,KAAKC;IAEnD,MAAM6B,gBAAgBtB,MAAMuB,KAAK,CAACf,QAAQ;IAE1C,MAAMgB,YAAwDrC,iBAAiBsC,CAAAA;QAC7E,MAAMC,WAAW/B,qBAAqBgC,OAAOF,MAAMG,MAAM,CAACC,KAAK,GAAGpB;QAClE,MAAMqB,WAAWhC,eAAe;YAAE,GAAGa,QAAQ;YAAEO,GAAGQ,WAAW;QAAI;QACjEX,gBAAgBW;QAChBJ,0BAAAA,oCAAAA,cAAgBG;QAChBjB,qBAAAA,+BAAAA,SAAWiB,OAAO;YAAEM,MAAM;YAAUN;YAAOlB,OAAOuB;QAAS;IAC7D;IAEA,MAAME,kBAAkBnC,mBAAmBK,KAAKQ,UAAUD;IAE1D,MAAMwB,gBAAgB;QACpB,CAAC3C,mBAAmB4C,kBAAkB,CAAC,EAAEF;QACzC,CAAC1C,mBAAmB6C,iBAAiB,CAAC,EAAE,GAAGd,aAAa,CAAC,CAAC;QAC1D,CAAC/B,mBAAmB8C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAExB,SAASyB,CAAC,CAAC,CAAC,EAAEzB,SAAS0B,CAAC,GAAG,IAAI,GAAG,EAAE1B,SAAS2B,CAAC,GAAG,IAAI,GAAG,EAAE3B,SAASM,CAAC,CAAC,CAAC,CAAC;QACnH,CAAC5B,mBAAmBkD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE5B,SAASyB,CAAC,CAAC,CAAC,EAAEzB,SAAS0B,CAAC,GAAG,IAAI,GAAG,EAAE1B,SAAS2B,CAAC,GAAG,IAAI,EAAE,CAAC;IACpG;IAEA,aAAa;IACb,oDAAoD;IACpDvC,MAAMyC,IAAI,CAACC,KAAK,GAAG;QACjB,GAAGT,aAAa;QAChB,GAAGjC,MAAMyC,IAAI,CAACC,KAAK;IACrB;IAEA,cAAc;IACd,oDAAoD;IACpD1C,MAAMuB,KAAK,CAACM,KAAK,GAAGT;IACpB,oDAAoD;IACpDpB,MAAMuB,KAAK,CAACf,QAAQ,GAAGgB;IAEvB,OAAOxB;AACT,EAAE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { __styles, mergeClasses } from
|
|
4
|
-
import { tokens } from
|
|
5
|
-
import { useColorSliderStyles_unstable } from
|
|
3
|
+
import { __styles, mergeClasses } from "@griffel/react";
|
|
4
|
+
import { tokens } from "@fluentui/react-theme";
|
|
5
|
+
import { useColorSliderStyles_unstable } from "../ColorSlider/useColorSliderStyles.styles.js";
|
|
6
6
|
const TRANSPARENT_IMAGE_URL = 'https://fabricweb.azureedge.net/fabric-website/assets/images/transparent-pattern.png';
|
|
7
7
|
export const alphaSliderClassNames = {
|
|
8
8
|
root: 'fui-AlphaSlider',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tokens","useColorSliderStyles_unstable","TRANSPARENT_IMAGE_URL","alphaSliderClassNames","root","rail","thumb","input","alphaSliderCSSVars","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","useStyles","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bcmaq0h","d","p","useThumbStyles","De3pzq","cmx5o7","horizontal","Bz10aip","oyh7mz","vertical","B5kzvoi","useAlphaSliderStyles_unstable","state","styles","thumbStyles","className"],"sources":["useAlphaSliderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","useColorSliderStyles_unstable","TRANSPARENT_IMAGE_URL","alphaSliderClassNames","root","rail","thumb","input","alphaSliderCSSVars","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","useStyles","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bcmaq0h","d","p","useThumbStyles","De3pzq","cmx5o7","horizontal","Bz10aip","oyh7mz","vertical","B5kzvoi","useAlphaSliderStyles_unstable","state","styles","thumbStyles","className"],"sources":["useAlphaSliderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { useColorSliderStyles_unstable } from \"../ColorSlider/useColorSliderStyles.styles.js\";\nconst TRANSPARENT_IMAGE_URL = 'https://fabricweb.azureedge.net/fabric-website/assets/images/transparent-pattern.png';\nexport const alphaSliderClassNames = {\n root: 'fui-AlphaSlider',\n rail: 'fui-AlphaSlider__rail',\n thumb: 'fui-AlphaSlider__thumb',\n input: 'fui-AlphaSlider__input'\n};\nexport 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/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n rail: {\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n backgroundImage: `linear-gradient(var(${alphaSliderCSSVars.sliderDirectionVar}), transparent, var(${alphaSliderCSSVars.railColorVar})), url(${TRANSPARENT_IMAGE_URL})`\n }\n});\n/**\n * Styles for the thumb slot\n */ const useThumbStyles = makeStyles({\n thumb: {\n backgroundColor: tokens.colorNeutralBackground1,\n '::before': {\n backgroundColor: `var(${alphaSliderCSSVars.thumbColorVar})`\n }\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${alphaSliderCSSVars.sliderProgressVar})`\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${alphaSliderCSSVars.sliderProgressVar})`\n }\n});\n/**\n * Apply styling to the AlphaSlider slots based on the state\n */ export const useAlphaSliderStyles_unstable = (state)=>{\n const styles = useStyles();\n const thumbStyles = useThumbStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(alphaSliderClassNames.root, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(alphaSliderClassNames.input, state.input.className);\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(alphaSliderClassNames.rail, styles.rail, state.rail.className);\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(alphaSliderClassNames.thumb, thumbStyles.thumb, state.vertical ? thumbStyles.vertical : thumbStyles.horizontal, state.thumb.className);\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(alphaSliderClassNames.thumb, thumbStyles.thumb, state.vertical ? thumbStyles.vertical : thumbStyles.horizontal, state.thumb.className);\n useColorSliderStyles_unstable(state);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,6BAA6B,QAAQ,+CAA+C;AAC7F,MAAMC,qBAAqB,GAAG,sFAAsF;AACpH,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE,uBAAuB;EAC7BC,KAAK,EAAE,wBAAwB;EAC/BC,KAAK,EAAE;AACX,CAAC;AACD,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,kBAAkB,EAAE,8BAA8B;EAClDC,iBAAiB,EAAE,6BAA6B;EAChDC,aAAa,EAAE,iCAAiC;EAChDC,YAAY,EAAE;AAClB,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGf,QAAA;EAAAO,IAAA;IAAAS,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;AAAA,CAKrB,CAAC;AACF;AACA;AACA;AAAI,MAAMC,cAAc,gBAAGpC,QAAA;EAAAQ,KAAA;IAAA6B,MAAA;IAAAC,MAAA;EAAA;EAAAC,UAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAF,OAAA;IAAAG,OAAA;EAAA;AAAA;EAAAT,CAAA;AAAA,CAe1B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMU,6BAA6B,GAAIC,KAAK,IAAG;EACtD,MAAMC,MAAM,GAAG/B,SAAS,CAAC,CAAC;EAC1B,MAAMgC,WAAW,GAAGX,cAAc,CAAC,CAAC;EACpC;EACAS,KAAK,CAACvC,IAAI,CAAC0C,SAAS,GAAG/C,YAAY,CAACI,qBAAqB,CAACC,IAAI,EAAEuC,KAAK,CAACvC,IAAI,CAAC0C,SAAS,CAAC;EACrF;EACAH,KAAK,CAACpC,KAAK,CAACuC,SAAS,GAAG/C,YAAY,CAACI,qBAAqB,CAACI,KAAK,EAAEoC,KAAK,CAACpC,KAAK,CAACuC,SAAS,CAAC;EACxF;EACAH,KAAK,CAACtC,IAAI,CAACyC,SAAS,GAAG/C,YAAY,CAACI,qBAAqB,CAACE,IAAI,EAAEuC,MAAM,CAACvC,IAAI,EAAEsC,KAAK,CAACtC,IAAI,CAACyC,SAAS,CAAC;EAClG;EACAH,KAAK,CAACrC,KAAK,CAACwC,SAAS,GAAG/C,YAAY,CAACI,qBAAqB,CAACG,KAAK,EAAEuC,WAAW,CAACvC,KAAK,EAAEqC,KAAK,CAACH,QAAQ,GAAGK,WAAW,CAACL,QAAQ,GAAGK,WAAW,CAACR,UAAU,EAAEM,KAAK,CAACrC,KAAK,CAACwC,SAAS,CAAC;EAC3K;EACAH,KAAK,CAACrC,KAAK,CAACwC,SAAS,GAAG/C,YAAY,CAACI,qBAAqB,CAACG,KAAK,EAAEuC,WAAW,CAACvC,KAAK,EAAEqC,KAAK,CAACH,QAAQ,GAAGK,WAAW,CAACL,QAAQ,GAAGK,WAAW,CAACR,UAAU,EAAEM,KAAK,CAACrC,KAAK,CAACwC,SAAS,CAAC;EAC3K7C,6BAA6B,CAAC0C,KAAK,CAAC;EACpC,OAAOA,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { makeStyles, mergeClasses } from
|
|
3
|
-
import { tokens } from
|
|
4
|
-
import { useColorSliderStyles_unstable } from
|
|
2
|
+
import { makeStyles, mergeClasses } from "@griffel/react";
|
|
3
|
+
import { tokens } from "@fluentui/react-theme";
|
|
4
|
+
import { useColorSliderStyles_unstable } from "../ColorSlider/useColorSliderStyles.styles.js";
|
|
5
5
|
const TRANSPARENT_IMAGE_URL = 'https://fabricweb.azureedge.net/fabric-website/assets/images/transparent-pattern.png';
|
|
6
6
|
export const alphaSliderClassNames = {
|
|
7
7
|
root: 'fui-AlphaSlider',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSliderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useColorSliderStyles_unstable } from '../ColorSlider/useColorSliderStyles.styles';\nimport type { AlphaSliderSlots, AlphaSliderState } from './AlphaSlider.types';\n\nconst TRANSPARENT_IMAGE_URL = 'https://fabricweb.azureedge.net/fabric-website/assets/images/transparent-pattern.png';\n\nexport const alphaSliderClassNames: SlotClassNames<AlphaSliderSlots> = {\n root: 'fui-AlphaSlider',\n rail: 'fui-AlphaSlider__rail',\n thumb: 'fui-AlphaSlider__thumb',\n input: 'fui-AlphaSlider__input',\n};\n\nexport 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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n rail: {\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n backgroundImage: `linear-gradient(var(${alphaSliderCSSVars.sliderDirectionVar}), transparent, var(${alphaSliderCSSVars.railColorVar})), url(${TRANSPARENT_IMAGE_URL})`,\n },\n});\n\n/**\n * Styles for the thumb slot\n */\nconst useThumbStyles = makeStyles({\n thumb: {\n backgroundColor: tokens.colorNeutralBackground1,\n '::before': {\n backgroundColor: `var(${alphaSliderCSSVars.thumbColorVar})`,\n },\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${alphaSliderCSSVars.sliderProgressVar})`,\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${alphaSliderCSSVars.sliderProgressVar})`,\n },\n});\n\n/**\n * Apply styling to the AlphaSlider slots based on the state\n */\nexport const useAlphaSliderStyles_unstable = (state: AlphaSliderState): AlphaSliderState => {\n const styles = useStyles();\n const thumbStyles = useThumbStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(alphaSliderClassNames.root, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(alphaSliderClassNames.input, state.input.className);\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(alphaSliderClassNames.rail, styles.rail, state.rail.className);\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n alphaSliderClassNames.thumb,\n thumbStyles.thumb,\n state.vertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n alphaSliderClassNames.thumb,\n thumbStyles.thumb,\n state.vertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n useColorSliderStyles_unstable(state);\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","useColorSliderStyles_unstable","TRANSPARENT_IMAGE_URL","alphaSliderClassNames","root","rail","thumb","input","alphaSliderCSSVars","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","useStyles","border","colorNeutralStroke1","backgroundImage","useThumbStyles","backgroundColor","colorNeutralBackground1","horizontal","transform","left","vertical","bottom","useAlphaSliderStyles_unstable","state","styles","thumbStyles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,6BAA6B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/AlphaSlider/useAlphaSliderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useColorSliderStyles_unstable } from '../ColorSlider/useColorSliderStyles.styles';\nimport type { AlphaSliderSlots, AlphaSliderState } from './AlphaSlider.types';\n\nconst TRANSPARENT_IMAGE_URL = 'https://fabricweb.azureedge.net/fabric-website/assets/images/transparent-pattern.png';\n\nexport const alphaSliderClassNames: SlotClassNames<AlphaSliderSlots> = {\n root: 'fui-AlphaSlider',\n rail: 'fui-AlphaSlider__rail',\n thumb: 'fui-AlphaSlider__thumb',\n input: 'fui-AlphaSlider__input',\n};\n\nexport 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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n rail: {\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n backgroundImage: `linear-gradient(var(${alphaSliderCSSVars.sliderDirectionVar}), transparent, var(${alphaSliderCSSVars.railColorVar})), url(${TRANSPARENT_IMAGE_URL})`,\n },\n});\n\n/**\n * Styles for the thumb slot\n */\nconst useThumbStyles = makeStyles({\n thumb: {\n backgroundColor: tokens.colorNeutralBackground1,\n '::before': {\n backgroundColor: `var(${alphaSliderCSSVars.thumbColorVar})`,\n },\n },\n horizontal: {\n transform: 'translateX(-50%)',\n left: `var(${alphaSliderCSSVars.sliderProgressVar})`,\n },\n vertical: {\n transform: 'translateY(50%)',\n bottom: `var(${alphaSliderCSSVars.sliderProgressVar})`,\n },\n});\n\n/**\n * Apply styling to the AlphaSlider slots based on the state\n */\nexport const useAlphaSliderStyles_unstable = (state: AlphaSliderState): AlphaSliderState => {\n const styles = useStyles();\n const thumbStyles = useThumbStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(alphaSliderClassNames.root, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(alphaSliderClassNames.input, state.input.className);\n // eslint-disable-next-line react-hooks/immutability\n state.rail.className = mergeClasses(alphaSliderClassNames.rail, styles.rail, state.rail.className);\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n alphaSliderClassNames.thumb,\n thumbStyles.thumb,\n state.vertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.thumb.className = mergeClasses(\n alphaSliderClassNames.thumb,\n thumbStyles.thumb,\n state.vertical ? thumbStyles.vertical : thumbStyles.horizontal,\n state.thumb.className,\n );\n\n useColorSliderStyles_unstable(state);\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","useColorSliderStyles_unstable","TRANSPARENT_IMAGE_URL","alphaSliderClassNames","root","rail","thumb","input","alphaSliderCSSVars","sliderDirectionVar","sliderProgressVar","thumbColorVar","railColorVar","useStyles","border","colorNeutralStroke1","backgroundImage","useThumbStyles","backgroundColor","colorNeutralBackground1","horizontal","transform","left","vertical","bottom","useAlphaSliderStyles_unstable","state","styles","thumbStyles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,6BAA6B,QAAQ,gDAA6C;AAG3F,MAAMC,wBAAwB;AAE9B,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;IACNC,MAAM;IACNC,OAAO;IACPC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,qBAAqB;IAChCC,oBAAoB,CAAC,4BAA4B,CAAC;IAClDC,mBAAmB,CAAC,2BAA2B,CAAC;IAChDC,eAAe,CAAC,+BAA+B,CAAC;IAChDC,cAAc,CAAC,8BAA8B,CAAC;AAChD,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYf,WAAW;IAC3BO,MAAM;QACJS,QAAQ,CAAC,UAAU,EAAEd,OAAOe,mBAAmB,EAAE;QACjDC,iBAAiB,CAAC,oBAAoB,EAAER,mBAAmBC,kBAAkB,CAAC,oBAAoB,EAAED,mBAAmBI,YAAY,CAAC,QAAQ,EAAEV,sBAAsB,CAAC,CAAC;IACxK;AACF;AAEA;;CAEC,GACD,MAAMe,iBAAiBnB,WAAW;IAChCQ,OAAO;QACLY,iBAAiBlB,OAAOmB,uBAAuB;QAC/C,YAAY;YACVD,iBAAiB,CAAC,IAAI,EAAEV,mBAAmBG,aAAa,CAAC,CAAC,CAAC;QAC7D;IACF;IACAS,YAAY;QACVC,WAAW;QACXC,MAAM,CAAC,IAAI,EAAEd,mBAAmBE,iBAAiB,CAAC,CAAC,CAAC;IACtD;IACAa,UAAU;QACRF,WAAW;QACXG,QAAQ,CAAC,IAAI,EAAEhB,mBAAmBE,iBAAiB,CAAC,CAAC,CAAC;IACxD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMe,gCAAgC,CAACC;IAC5C,MAAMC,SAASd;IACf,MAAMe,cAAcX;IACpB,oDAAoD;IACpDS,MAAMtB,IAAI,CAACyB,SAAS,GAAG9B,aAAaI,sBAAsBC,IAAI,EAAEsB,MAAMtB,IAAI,CAACyB,SAAS;IACpF,oDAAoD;IACpDH,MAAMnB,KAAK,CAACsB,SAAS,GAAG9B,aAAaI,sBAAsBI,KAAK,EAAEmB,MAAMnB,KAAK,CAACsB,SAAS;IACvF,oDAAoD;IACpDH,MAAMrB,IAAI,CAACwB,SAAS,GAAG9B,aAAaI,sBAAsBE,IAAI,EAAEsB,OAAOtB,IAAI,EAAEqB,MAAMrB,IAAI,CAACwB,SAAS;IAEjG,oDAAoD;IACpDH,MAAMpB,KAAK,CAACuB,SAAS,GAAG9B,aACtBI,sBAAsBG,KAAK,EAC3BsB,YAAYtB,KAAK,EACjBoB,MAAMH,QAAQ,GAAGK,YAAYL,QAAQ,GAAGK,YAAYR,UAAU,EAC9DM,MAAMpB,KAAK,CAACuB,SAAS;IAGvB,oDAAoD;IACpDH,MAAMpB,KAAK,CAACuB,SAAS,GAAG9B,aACtBI,sBAAsBG,KAAK,EAC3BsB,YAAYtB,KAAK,EACjBoB,MAAMH,QAAQ,GAAGK,YAAYL,QAAQ,GAAGK,YAAYR,UAAU,EAC9DM,MAAMpB,KAAK,CAACuB,SAAS;IAGvB5B,8BAA8ByB;IAC9B,OAAOA;AACT,EAAE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useColorArea_unstable } from
|
|
4
|
-
import { renderColorArea_unstable } from
|
|
5
|
-
import { useColorAreaStyles_unstable } from
|
|
6
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useColorArea_unstable } from "./useColorArea.js";
|
|
4
|
+
import { renderColorArea_unstable } from "./renderColorArea.js";
|
|
5
|
+
import { useColorAreaStyles_unstable } from "./useColorAreaStyles.styles.js";
|
|
6
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
7
7
|
/**
|
|
8
8
|
* ColorArea component
|
|
9
9
|
*/ export const ColorArea = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ColorArea/ColorArea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useColorArea_unstable } from './useColorArea';\nimport { renderColorArea_unstable } from './renderColorArea';\nimport { useColorAreaStyles_unstable } from './useColorAreaStyles.styles';\nimport type { ColorAreaProps } from './ColorArea.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ColorArea component\n */\nexport const ColorArea: ForwardRefComponent<ColorAreaProps> = React.forwardRef((props, ref) => {\n const state = useColorArea_unstable(props, ref);\n\n useColorAreaStyles_unstable(state);\n useCustomStyleHook_unstable('useColorAreaStyles_unstable')(state);\n\n return renderColorArea_unstable(state);\n});\n\nColorArea.displayName = 'ColorArea';\n"],"names":["React","useColorArea_unstable","renderColorArea_unstable","useColorAreaStyles_unstable","useCustomStyleHook_unstable","ColorArea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/ColorArea/ColorArea.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useColorArea_unstable } from './useColorArea';\nimport { renderColorArea_unstable } from './renderColorArea';\nimport { useColorAreaStyles_unstable } from './useColorAreaStyles.styles';\nimport type { ColorAreaProps } from './ColorArea.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ColorArea component\n */\nexport const ColorArea: ForwardRefComponent<ColorAreaProps> = React.forwardRef((props, ref) => {\n const state = useColorArea_unstable(props, ref);\n\n useColorAreaStyles_unstable(state);\n useCustomStyleHook_unstable('useColorAreaStyles_unstable')(state);\n\n return renderColorArea_unstable(state);\n});\n\nColorArea.displayName = 'ColorArea';\n"],"names":["React","useColorArea_unstable","renderColorArea_unstable","useColorAreaStyles_unstable","useCustomStyleHook_unstable","ColorArea","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,iCAA8B;AAE1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,4BAA4B,+BAA+BK;IAE3D,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|