@pingux/astro 2.154.1-alpha.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;
|
|
@@ -150,7 +152,8 @@ var ColorField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
150
152
|
}, (0, _react2.jsx)(_reactColor.SketchPicker, {
|
|
151
153
|
width: sizeValues.width,
|
|
152
154
|
color: getRgbaFromState(state),
|
|
153
|
-
onChange: handleColorChange
|
|
155
|
+
onChange: handleColorChange,
|
|
156
|
+
disableAlpha: shouldDisableAlpha
|
|
154
157
|
}))));
|
|
155
158
|
});
|
|
156
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;
|
|
@@ -139,7 +141,8 @@ var ColorField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
139
141
|
}, ___EmotionJSX(SketchPicker, {
|
|
140
142
|
width: sizeValues.width,
|
|
141
143
|
color: getRgbaFromState(state),
|
|
142
|
-
onChange: handleColorChange
|
|
144
|
+
onChange: handleColorChange,
|
|
145
|
+
disableAlpha: shouldDisableAlpha
|
|
143
146
|
}))));
|
|
144
147
|
});
|
|
145
148
|
ColorField.displayName = displayName;
|