@zag-js/color-picker 0.23.0 → 0.25.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/dist/index.d.mts +101 -32
- package/dist/index.d.ts +101 -32
- package/dist/index.js +516 -300
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +515 -303
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -12
- package/src/color-picker.anatomy.ts +11 -5
- package/src/color-picker.connect.ts +206 -124
- package/src/color-picker.dom.ts +26 -4
- package/src/color-picker.machine.ts +240 -128
- package/src/color-picker.parse.ts +14 -0
- package/src/color-picker.types.ts +110 -30
- package/src/index.ts +9 -6
- package/src/utils/get-channel-input-value.ts +45 -11
- package/src/utils/get-slider-background.ts +14 -12
- package/src/utils/get-channel-details.ts +0 -60
package/dist/index.d.mts
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, Orientation, PropTypes, CommonProperties, Context, NormalizeProps } from '@zag-js/types';
|
|
2
|
+
import { RequiredBy, Orientation, PropTypes, CommonProperties, MaybeElement, Context, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import { ColorChannel, Color, ColorFormat } from '@zag-js/color-utils';
|
|
4
4
|
export { Color, ColorAxes, ColorChannel, ColorFormat, ColorType } from '@zag-js/color-utils';
|
|
5
5
|
import * as _zag_js_core from '@zag-js/core';
|
|
6
6
|
import { StateMachine } from '@zag-js/core';
|
|
7
|
+
import { InteractOutsideHandlers } from '@zag-js/dismissable';
|
|
8
|
+
import { PositioningOptions } from '@zag-js/popper';
|
|
9
|
+
import { MaybeFunction } from '@zag-js/utils';
|
|
7
10
|
|
|
8
|
-
declare const anatomy: _zag_js_anatomy.Anatomy<"area" | "areaThumb" | "
|
|
11
|
+
declare const anatomy: _zag_js_anatomy.Anatomy<"root" | "label" | "control" | "trigger" | "positioner" | "content" | "area" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderTrack" | "channelSliderThumb" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatch" | "eyeDropperTrigger">;
|
|
9
12
|
|
|
10
13
|
interface ValueChangeDetails {
|
|
11
|
-
value:
|
|
12
|
-
|
|
14
|
+
value: Color;
|
|
15
|
+
valueAsString: string;
|
|
16
|
+
}
|
|
17
|
+
interface OpenChangeDetails {
|
|
18
|
+
open: boolean;
|
|
13
19
|
}
|
|
14
20
|
type ExtendedColorChannel = ColorChannel | "hex" | "css";
|
|
15
21
|
type ElementIds = Partial<{
|
|
22
|
+
root: string;
|
|
23
|
+
control: string;
|
|
24
|
+
trigger: string;
|
|
25
|
+
label: string;
|
|
26
|
+
input: string;
|
|
16
27
|
content: string;
|
|
17
28
|
area: string;
|
|
18
29
|
areaGradient: string;
|
|
@@ -21,7 +32,7 @@ type ElementIds = Partial<{
|
|
|
21
32
|
channelSliderTrack(id: ColorChannel): string;
|
|
22
33
|
channelSliderThumb(id: ColorChannel): string;
|
|
23
34
|
}>;
|
|
24
|
-
interface PublicContext extends CommonProperties {
|
|
35
|
+
interface PublicContext extends CommonProperties, InteractOutsideHandlers {
|
|
25
36
|
/**
|
|
26
37
|
* The ids of the elements in the color picker. Useful for composition.
|
|
27
38
|
*/
|
|
@@ -33,7 +44,7 @@ interface PublicContext extends CommonProperties {
|
|
|
33
44
|
/**
|
|
34
45
|
* The current color value
|
|
35
46
|
*/
|
|
36
|
-
value:
|
|
47
|
+
value: Color;
|
|
37
48
|
/**
|
|
38
49
|
* Whether the color picker is disabled
|
|
39
50
|
*/
|
|
@@ -51,9 +62,30 @@ interface PublicContext extends CommonProperties {
|
|
|
51
62
|
*/
|
|
52
63
|
onValueChangeEnd?: (details: ValueChangeDetails) => void;
|
|
53
64
|
/**
|
|
54
|
-
*
|
|
65
|
+
* Handler that is called when the user opens or closes the color picker.
|
|
66
|
+
*/
|
|
67
|
+
onOpenChange?: (details: OpenChangeDetails) => void;
|
|
68
|
+
/**
|
|
69
|
+
* The name for the form input
|
|
55
70
|
*/
|
|
56
71
|
name?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The positioning options for the color picker
|
|
74
|
+
*/
|
|
75
|
+
positioning: PositioningOptions;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to automatically set focus on the first focusable
|
|
78
|
+
* content within the color picker when opened.
|
|
79
|
+
*/
|
|
80
|
+
autoFocus?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The initial focus element when the color picker is opened.
|
|
83
|
+
*/
|
|
84
|
+
initialFocusEl?: MaybeFunction<MaybeElement>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the color picker is open
|
|
87
|
+
*/
|
|
88
|
+
open?: boolean;
|
|
57
89
|
}
|
|
58
90
|
type PrivateContext = Context<{}>;
|
|
59
91
|
type ComputedContext = Readonly<{
|
|
@@ -71,7 +103,7 @@ type ComputedContext = Readonly<{
|
|
|
71
103
|
* @computed
|
|
72
104
|
* The color value as a Color object
|
|
73
105
|
*/
|
|
74
|
-
|
|
106
|
+
valueAsString: string;
|
|
75
107
|
/**
|
|
76
108
|
* @computed
|
|
77
109
|
* Whether the color picker is disabled
|
|
@@ -82,43 +114,59 @@ type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
|
82
114
|
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
|
|
83
115
|
}
|
|
84
116
|
interface MachineState {
|
|
85
|
-
|
|
117
|
+
tags: "open" | "closed" | "dragging" | "focused";
|
|
118
|
+
value: "idle" | "focused" | "open" | "open:dragging";
|
|
86
119
|
}
|
|
87
120
|
type State = StateMachine.State<MachineContext, MachineState>;
|
|
88
121
|
type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
89
|
-
interface
|
|
122
|
+
interface ChannelProps {
|
|
90
123
|
channel: ColorChannel;
|
|
91
124
|
orientation?: Orientation;
|
|
92
125
|
}
|
|
93
|
-
interface
|
|
126
|
+
interface ChannelInputProps {
|
|
94
127
|
channel: ExtendedColorChannel;
|
|
95
128
|
orientation?: Orientation;
|
|
96
129
|
}
|
|
97
|
-
interface
|
|
98
|
-
xChannel
|
|
99
|
-
yChannel
|
|
130
|
+
interface AreaProps {
|
|
131
|
+
xChannel?: ColorChannel;
|
|
132
|
+
yChannel?: ColorChannel;
|
|
100
133
|
}
|
|
101
|
-
interface
|
|
102
|
-
|
|
134
|
+
interface SwatchTriggerProps {
|
|
135
|
+
/**
|
|
136
|
+
* The color value
|
|
137
|
+
*/
|
|
103
138
|
value: string | Color;
|
|
104
139
|
}
|
|
140
|
+
interface SwatchProps {
|
|
141
|
+
/**
|
|
142
|
+
* The color value
|
|
143
|
+
*/
|
|
144
|
+
value: string | Color;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to include the alpha channel in the color
|
|
147
|
+
*/
|
|
148
|
+
respectAlpha?: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface TransparencyGridProps {
|
|
151
|
+
size?: string;
|
|
152
|
+
}
|
|
105
153
|
interface MachineApi<T extends PropTypes = PropTypes> {
|
|
106
154
|
/**
|
|
107
155
|
* Whether the color picker is being dragged
|
|
108
156
|
*/
|
|
109
157
|
isDragging: boolean;
|
|
110
158
|
/**
|
|
111
|
-
*
|
|
159
|
+
* Whether the color picker is open
|
|
112
160
|
*/
|
|
113
|
-
|
|
161
|
+
isOpen: boolean;
|
|
114
162
|
/**
|
|
115
|
-
* The current color value (as a
|
|
163
|
+
* The current color value (as a string)
|
|
116
164
|
*/
|
|
117
|
-
|
|
165
|
+
value: Color;
|
|
118
166
|
/**
|
|
119
|
-
* The
|
|
167
|
+
* The current color value (as a Color object)
|
|
120
168
|
*/
|
|
121
|
-
|
|
169
|
+
valueAsString: string;
|
|
122
170
|
/**
|
|
123
171
|
* The current color channels of the color
|
|
124
172
|
*/
|
|
@@ -127,34 +175,55 @@ interface MachineApi<T extends PropTypes = PropTypes> {
|
|
|
127
175
|
* Function to set the color value
|
|
128
176
|
*/
|
|
129
177
|
setColor(value: string | Color): void;
|
|
178
|
+
/**
|
|
179
|
+
* Function to set the color value
|
|
180
|
+
*/
|
|
181
|
+
getChannelValue(channel: ColorChannel): string;
|
|
130
182
|
/**
|
|
131
183
|
* Function to set the color value of a specific channel
|
|
132
184
|
*/
|
|
133
185
|
setChannelValue(channel: ColorChannel, value: number): void;
|
|
186
|
+
/**
|
|
187
|
+
* The current color format
|
|
188
|
+
*/
|
|
189
|
+
format: ColorFormat;
|
|
134
190
|
/**
|
|
135
191
|
* Function to set the color format
|
|
136
192
|
*/
|
|
137
193
|
setFormat(format: ColorFormat): void;
|
|
194
|
+
/**
|
|
195
|
+
* The alpha value of the color
|
|
196
|
+
*/
|
|
197
|
+
alpha: number;
|
|
138
198
|
/**
|
|
139
199
|
* Function to set the color alpha
|
|
140
200
|
*/
|
|
141
201
|
setAlpha(value: number): void;
|
|
202
|
+
rootProps: T["element"];
|
|
203
|
+
labelProps: T["element"];
|
|
204
|
+
controlProps: T["element"];
|
|
205
|
+
triggerProps: T["button"];
|
|
206
|
+
positionerProps: T["element"];
|
|
142
207
|
contentProps: T["element"];
|
|
143
208
|
hiddenInputProps: T["input"];
|
|
144
|
-
getAreaProps(props
|
|
145
|
-
|
|
146
|
-
getAreaThumbProps(props
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
getChannelSliderThumbProps(props:
|
|
150
|
-
getChannelInputProps(props:
|
|
209
|
+
getAreaProps(props?: AreaProps): T["element"];
|
|
210
|
+
getAreaBackgroundProps(props?: AreaProps): T["element"];
|
|
211
|
+
getAreaThumbProps(props?: AreaProps): T["element"];
|
|
212
|
+
getChannelSliderProps(props: ChannelProps): T["element"];
|
|
213
|
+
getChannelSliderTrackProps(props: ChannelProps): T["element"];
|
|
214
|
+
getChannelSliderThumbProps(props: ChannelProps): T["element"];
|
|
215
|
+
getChannelInputProps(props: ChannelInputProps): T["input"];
|
|
216
|
+
getTransparencyGridProps(props?: TransparencyGridProps): T["element"];
|
|
151
217
|
eyeDropperTriggerProps: T["button"];
|
|
152
|
-
|
|
153
|
-
|
|
218
|
+
swatchGroupProps: T["element"];
|
|
219
|
+
getSwatchTriggerProps(props: SwatchTriggerProps): T["button"];
|
|
220
|
+
getSwatchProps(props: SwatchProps): T["element"];
|
|
154
221
|
}
|
|
155
222
|
|
|
156
223
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T>;
|
|
157
224
|
|
|
158
225
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
159
226
|
|
|
160
|
-
|
|
227
|
+
declare const parse: (color: string) => Color;
|
|
228
|
+
|
|
229
|
+
export { MachineApi as Api, AreaProps, ChannelInputProps, ChannelProps, UserDefinedContext as Context, SwatchProps, SwatchTriggerProps, TransparencyGridProps, anatomy, connect, machine, parse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, Orientation, PropTypes, CommonProperties, Context, NormalizeProps } from '@zag-js/types';
|
|
2
|
+
import { RequiredBy, Orientation, PropTypes, CommonProperties, MaybeElement, Context, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import { ColorChannel, Color, ColorFormat } from '@zag-js/color-utils';
|
|
4
4
|
export { Color, ColorAxes, ColorChannel, ColorFormat, ColorType } from '@zag-js/color-utils';
|
|
5
5
|
import * as _zag_js_core from '@zag-js/core';
|
|
6
6
|
import { StateMachine } from '@zag-js/core';
|
|
7
|
+
import { InteractOutsideHandlers } from '@zag-js/dismissable';
|
|
8
|
+
import { PositioningOptions } from '@zag-js/popper';
|
|
9
|
+
import { MaybeFunction } from '@zag-js/utils';
|
|
7
10
|
|
|
8
|
-
declare const anatomy: _zag_js_anatomy.Anatomy<"area" | "areaThumb" | "
|
|
11
|
+
declare const anatomy: _zag_js_anatomy.Anatomy<"root" | "label" | "control" | "trigger" | "positioner" | "content" | "area" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderTrack" | "channelSliderThumb" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatch" | "eyeDropperTrigger">;
|
|
9
12
|
|
|
10
13
|
interface ValueChangeDetails {
|
|
11
|
-
value:
|
|
12
|
-
|
|
14
|
+
value: Color;
|
|
15
|
+
valueAsString: string;
|
|
16
|
+
}
|
|
17
|
+
interface OpenChangeDetails {
|
|
18
|
+
open: boolean;
|
|
13
19
|
}
|
|
14
20
|
type ExtendedColorChannel = ColorChannel | "hex" | "css";
|
|
15
21
|
type ElementIds = Partial<{
|
|
22
|
+
root: string;
|
|
23
|
+
control: string;
|
|
24
|
+
trigger: string;
|
|
25
|
+
label: string;
|
|
26
|
+
input: string;
|
|
16
27
|
content: string;
|
|
17
28
|
area: string;
|
|
18
29
|
areaGradient: string;
|
|
@@ -21,7 +32,7 @@ type ElementIds = Partial<{
|
|
|
21
32
|
channelSliderTrack(id: ColorChannel): string;
|
|
22
33
|
channelSliderThumb(id: ColorChannel): string;
|
|
23
34
|
}>;
|
|
24
|
-
interface PublicContext extends CommonProperties {
|
|
35
|
+
interface PublicContext extends CommonProperties, InteractOutsideHandlers {
|
|
25
36
|
/**
|
|
26
37
|
* The ids of the elements in the color picker. Useful for composition.
|
|
27
38
|
*/
|
|
@@ -33,7 +44,7 @@ interface PublicContext extends CommonProperties {
|
|
|
33
44
|
/**
|
|
34
45
|
* The current color value
|
|
35
46
|
*/
|
|
36
|
-
value:
|
|
47
|
+
value: Color;
|
|
37
48
|
/**
|
|
38
49
|
* Whether the color picker is disabled
|
|
39
50
|
*/
|
|
@@ -51,9 +62,30 @@ interface PublicContext extends CommonProperties {
|
|
|
51
62
|
*/
|
|
52
63
|
onValueChangeEnd?: (details: ValueChangeDetails) => void;
|
|
53
64
|
/**
|
|
54
|
-
*
|
|
65
|
+
* Handler that is called when the user opens or closes the color picker.
|
|
66
|
+
*/
|
|
67
|
+
onOpenChange?: (details: OpenChangeDetails) => void;
|
|
68
|
+
/**
|
|
69
|
+
* The name for the form input
|
|
55
70
|
*/
|
|
56
71
|
name?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The positioning options for the color picker
|
|
74
|
+
*/
|
|
75
|
+
positioning: PositioningOptions;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to automatically set focus on the first focusable
|
|
78
|
+
* content within the color picker when opened.
|
|
79
|
+
*/
|
|
80
|
+
autoFocus?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The initial focus element when the color picker is opened.
|
|
83
|
+
*/
|
|
84
|
+
initialFocusEl?: MaybeFunction<MaybeElement>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the color picker is open
|
|
87
|
+
*/
|
|
88
|
+
open?: boolean;
|
|
57
89
|
}
|
|
58
90
|
type PrivateContext = Context<{}>;
|
|
59
91
|
type ComputedContext = Readonly<{
|
|
@@ -71,7 +103,7 @@ type ComputedContext = Readonly<{
|
|
|
71
103
|
* @computed
|
|
72
104
|
* The color value as a Color object
|
|
73
105
|
*/
|
|
74
|
-
|
|
106
|
+
valueAsString: string;
|
|
75
107
|
/**
|
|
76
108
|
* @computed
|
|
77
109
|
* Whether the color picker is disabled
|
|
@@ -82,43 +114,59 @@ type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
|
82
114
|
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
|
|
83
115
|
}
|
|
84
116
|
interface MachineState {
|
|
85
|
-
|
|
117
|
+
tags: "open" | "closed" | "dragging" | "focused";
|
|
118
|
+
value: "idle" | "focused" | "open" | "open:dragging";
|
|
86
119
|
}
|
|
87
120
|
type State = StateMachine.State<MachineContext, MachineState>;
|
|
88
121
|
type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
89
|
-
interface
|
|
122
|
+
interface ChannelProps {
|
|
90
123
|
channel: ColorChannel;
|
|
91
124
|
orientation?: Orientation;
|
|
92
125
|
}
|
|
93
|
-
interface
|
|
126
|
+
interface ChannelInputProps {
|
|
94
127
|
channel: ExtendedColorChannel;
|
|
95
128
|
orientation?: Orientation;
|
|
96
129
|
}
|
|
97
|
-
interface
|
|
98
|
-
xChannel
|
|
99
|
-
yChannel
|
|
130
|
+
interface AreaProps {
|
|
131
|
+
xChannel?: ColorChannel;
|
|
132
|
+
yChannel?: ColorChannel;
|
|
100
133
|
}
|
|
101
|
-
interface
|
|
102
|
-
|
|
134
|
+
interface SwatchTriggerProps {
|
|
135
|
+
/**
|
|
136
|
+
* The color value
|
|
137
|
+
*/
|
|
103
138
|
value: string | Color;
|
|
104
139
|
}
|
|
140
|
+
interface SwatchProps {
|
|
141
|
+
/**
|
|
142
|
+
* The color value
|
|
143
|
+
*/
|
|
144
|
+
value: string | Color;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to include the alpha channel in the color
|
|
147
|
+
*/
|
|
148
|
+
respectAlpha?: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface TransparencyGridProps {
|
|
151
|
+
size?: string;
|
|
152
|
+
}
|
|
105
153
|
interface MachineApi<T extends PropTypes = PropTypes> {
|
|
106
154
|
/**
|
|
107
155
|
* Whether the color picker is being dragged
|
|
108
156
|
*/
|
|
109
157
|
isDragging: boolean;
|
|
110
158
|
/**
|
|
111
|
-
*
|
|
159
|
+
* Whether the color picker is open
|
|
112
160
|
*/
|
|
113
|
-
|
|
161
|
+
isOpen: boolean;
|
|
114
162
|
/**
|
|
115
|
-
* The current color value (as a
|
|
163
|
+
* The current color value (as a string)
|
|
116
164
|
*/
|
|
117
|
-
|
|
165
|
+
value: Color;
|
|
118
166
|
/**
|
|
119
|
-
* The
|
|
167
|
+
* The current color value (as a Color object)
|
|
120
168
|
*/
|
|
121
|
-
|
|
169
|
+
valueAsString: string;
|
|
122
170
|
/**
|
|
123
171
|
* The current color channels of the color
|
|
124
172
|
*/
|
|
@@ -127,34 +175,55 @@ interface MachineApi<T extends PropTypes = PropTypes> {
|
|
|
127
175
|
* Function to set the color value
|
|
128
176
|
*/
|
|
129
177
|
setColor(value: string | Color): void;
|
|
178
|
+
/**
|
|
179
|
+
* Function to set the color value
|
|
180
|
+
*/
|
|
181
|
+
getChannelValue(channel: ColorChannel): string;
|
|
130
182
|
/**
|
|
131
183
|
* Function to set the color value of a specific channel
|
|
132
184
|
*/
|
|
133
185
|
setChannelValue(channel: ColorChannel, value: number): void;
|
|
186
|
+
/**
|
|
187
|
+
* The current color format
|
|
188
|
+
*/
|
|
189
|
+
format: ColorFormat;
|
|
134
190
|
/**
|
|
135
191
|
* Function to set the color format
|
|
136
192
|
*/
|
|
137
193
|
setFormat(format: ColorFormat): void;
|
|
194
|
+
/**
|
|
195
|
+
* The alpha value of the color
|
|
196
|
+
*/
|
|
197
|
+
alpha: number;
|
|
138
198
|
/**
|
|
139
199
|
* Function to set the color alpha
|
|
140
200
|
*/
|
|
141
201
|
setAlpha(value: number): void;
|
|
202
|
+
rootProps: T["element"];
|
|
203
|
+
labelProps: T["element"];
|
|
204
|
+
controlProps: T["element"];
|
|
205
|
+
triggerProps: T["button"];
|
|
206
|
+
positionerProps: T["element"];
|
|
142
207
|
contentProps: T["element"];
|
|
143
208
|
hiddenInputProps: T["input"];
|
|
144
|
-
getAreaProps(props
|
|
145
|
-
|
|
146
|
-
getAreaThumbProps(props
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
getChannelSliderThumbProps(props:
|
|
150
|
-
getChannelInputProps(props:
|
|
209
|
+
getAreaProps(props?: AreaProps): T["element"];
|
|
210
|
+
getAreaBackgroundProps(props?: AreaProps): T["element"];
|
|
211
|
+
getAreaThumbProps(props?: AreaProps): T["element"];
|
|
212
|
+
getChannelSliderProps(props: ChannelProps): T["element"];
|
|
213
|
+
getChannelSliderTrackProps(props: ChannelProps): T["element"];
|
|
214
|
+
getChannelSliderThumbProps(props: ChannelProps): T["element"];
|
|
215
|
+
getChannelInputProps(props: ChannelInputProps): T["input"];
|
|
216
|
+
getTransparencyGridProps(props?: TransparencyGridProps): T["element"];
|
|
151
217
|
eyeDropperTriggerProps: T["button"];
|
|
152
|
-
|
|
153
|
-
|
|
218
|
+
swatchGroupProps: T["element"];
|
|
219
|
+
getSwatchTriggerProps(props: SwatchTriggerProps): T["button"];
|
|
220
|
+
getSwatchProps(props: SwatchProps): T["element"];
|
|
154
221
|
}
|
|
155
222
|
|
|
156
223
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T>;
|
|
157
224
|
|
|
158
225
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
159
226
|
|
|
160
|
-
|
|
227
|
+
declare const parse: (color: string) => Color;
|
|
228
|
+
|
|
229
|
+
export { MachineApi as Api, AreaProps, ChannelInputProps, ChannelProps, UserDefinedContext as Context, SwatchProps, SwatchTriggerProps, TransparencyGridProps, anatomy, connect, machine, parse };
|