@pingux/astro 2.154.0 → 2.154.1-alpha.1
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.
|
@@ -50,7 +50,9 @@ var ColorField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
50
50
|
labelProps = props.labelProps,
|
|
51
51
|
imperativeOnChange = props.onChange,
|
|
52
52
|
status = props.status,
|
|
53
|
-
mode = props.mode
|
|
53
|
+
mode = props.mode,
|
|
54
|
+
_props$shouldDisableA = props.shouldDisableAlpha,
|
|
55
|
+
shouldDisableAlpha = _props$shouldDisableA === void 0 ? false : _props$shouldDisableA;
|
|
54
56
|
var _getAriaAttributeProp = (0, _ariaAttributes.getAriaAttributeProps)(props),
|
|
55
57
|
ariaProps = _getAriaAttributeProp.ariaProps,
|
|
56
58
|
nonAriaProps = _getAriaAttributeProp.nonAriaProps;
|
|
@@ -146,12 +148,12 @@ var ColorField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
146
148
|
role: "presentation"
|
|
147
149
|
}), (0, _react2.jsx)(_reactAria.FocusScope, {
|
|
148
150
|
restoreFocus: true,
|
|
149
|
-
contain: true,
|
|
150
151
|
autoFocus: true
|
|
151
152
|
}, (0, _react2.jsx)(_reactColor.SketchPicker, {
|
|
152
153
|
width: sizeValues.width,
|
|
153
154
|
color: getRgbaFromState(state),
|
|
154
|
-
onChange: handleColorChange
|
|
155
|
+
onChange: handleColorChange,
|
|
156
|
+
disableAlpha: shouldDisableAlpha
|
|
155
157
|
}))));
|
|
156
158
|
});
|
|
157
159
|
ColorField.displayName = displayName;
|
|
@@ -25,6 +25,8 @@ export interface ColorFieldProps extends TestingAttributes {
|
|
|
25
25
|
align?: Alignment;
|
|
26
26
|
/** Where the popover menu opens relative to its trigger. */
|
|
27
27
|
direction?: Axis;
|
|
28
|
+
/** Disable alpha (opacity) slider in color picker */
|
|
29
|
+
shouldDisableAlpha?: boolean;
|
|
28
30
|
/** Text to display after the Color Field button. Useful for errors or other info. */
|
|
29
31
|
helperText?: React.ReactNode;
|
|
30
32
|
/** Props object that is spread directly into the helphint element. */
|
|
@@ -39,7 +39,9 @@ var ColorField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
39
39
|
labelProps = props.labelProps,
|
|
40
40
|
imperativeOnChange = props.onChange,
|
|
41
41
|
status = props.status,
|
|
42
|
-
mode = props.mode
|
|
42
|
+
mode = props.mode,
|
|
43
|
+
_props$shouldDisableA = props.shouldDisableAlpha,
|
|
44
|
+
shouldDisableAlpha = _props$shouldDisableA === void 0 ? false : _props$shouldDisableA;
|
|
43
45
|
var _getAriaAttributeProp = getAriaAttributeProps(props),
|
|
44
46
|
ariaProps = _getAriaAttributeProp.ariaProps,
|
|
45
47
|
nonAriaProps = _getAriaAttributeProp.nonAriaProps;
|
|
@@ -135,12 +137,12 @@ var ColorField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
135
137
|
role: "presentation"
|
|
136
138
|
}), ___EmotionJSX(FocusScope, {
|
|
137
139
|
restoreFocus: true,
|
|
138
|
-
contain: true,
|
|
139
140
|
autoFocus: true
|
|
140
141
|
}, ___EmotionJSX(SketchPicker, {
|
|
141
142
|
width: sizeValues.width,
|
|
142
143
|
color: getRgbaFromState(state),
|
|
143
|
-
onChange: handleColorChange
|
|
144
|
+
onChange: handleColorChange,
|
|
145
|
+
disableAlpha: shouldDisableAlpha
|
|
144
146
|
}))));
|
|
145
147
|
});
|
|
146
148
|
ColorField.displayName = displayName;
|