@televet/kibble-ui 1.12.0 → 1.12.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.
package/build/components/Forms/Checkbox/components/CheckboxGroup/checkboxGroup.component.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { WithFormControlProps } from 'components/Forms/FormControl/formControl.c
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FlexDirection } from 'shared/types';
|
|
5
5
|
import { CheckboxProps } from '../../checkbox.component';
|
|
6
|
-
import { CheckboxSize } from '../../checkbox.types';
|
|
6
|
+
import { CheckboxSize, CheckboxVariant } from '../../checkbox.types';
|
|
7
7
|
export interface CheckboxGroupProps extends WithFormControlProps, CCheckboxGroupProps {
|
|
8
8
|
size?: CheckboxSize;
|
|
9
9
|
checkboxes: CheckboxProps[];
|
|
10
10
|
direction?: FlexDirection;
|
|
11
11
|
spacing?: SystemProps['margin'];
|
|
12
12
|
$isFieldInline?: boolean;
|
|
13
|
+
variant?: CheckboxVariant;
|
|
13
14
|
}
|
|
14
15
|
declare const WrappedCheckboxGroup: React.FC<CheckboxGroupProps & WithFormControlProps>;
|
|
15
16
|
export { WrappedCheckboxGroup as CheckboxGroup };
|
package/build/index.js
CHANGED
|
@@ -3610,10 +3610,10 @@ var Checkbox = function (_a) {
|
|
|
3610
3610
|
};
|
|
3611
3611
|
|
|
3612
3612
|
var CheckboxGroup = function (_a) {
|
|
3613
|
-
var checkboxes = _a.checkboxes, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.direction, direction = _c === void 0 ? 'row' : _c, spacing = _a.spacing, rest = __rest(_a, ["checkboxes", "size", "direction", "spacing"]);
|
|
3613
|
+
var checkboxes = _a.checkboxes, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.direction, direction = _c === void 0 ? 'row' : _c, spacing = _a.spacing, variant = _a.variant, rest = __rest(_a, ["checkboxes", "size", "direction", "spacing", "variant"]);
|
|
3614
3614
|
rest.$isFieldInline; var domProps = __rest(rest, ["$isFieldInline"]);
|
|
3615
3615
|
return (React__default["default"].createElement(react.CheckboxGroup, __assign({}, domProps),
|
|
3616
|
-
React__default["default"].createElement(react.Stack, { direction: direction, spacing: spacing }, checkboxes.map(function (checkbox, index) { return (React__default["default"].createElement(Checkbox, __assign({ key: index }, checkbox, { size: size }))); }))));
|
|
3616
|
+
React__default["default"].createElement(react.Stack, { direction: direction, spacing: spacing, display: "inline-flex" }, checkboxes.map(function (checkbox, index) { return (React__default["default"].createElement(Checkbox, __assign({ key: index }, checkbox, { size: size, variant: variant || checkbox.variant }))); }))));
|
|
3617
3617
|
};
|
|
3618
3618
|
CheckboxGroup.displayName = 'CheckboxGroup';
|
|
3619
3619
|
var WrappedCheckboxGroup = withFormControl(CheckboxGroup);
|
|
@@ -3771,7 +3771,7 @@ var WrappedTextArea = withFormControl(Textarea);
|
|
|
3771
3771
|
|
|
3772
3772
|
var FormControlConfig = {
|
|
3773
3773
|
baseStyle: {
|
|
3774
|
-
borderRadius:
|
|
3774
|
+
borderRadius: radii.base,
|
|
3775
3775
|
color: adaptiveColors.text.light.default,
|
|
3776
3776
|
},
|
|
3777
3777
|
variants: {
|
|
@@ -3815,7 +3815,7 @@ var FormControlConfig = {
|
|
|
3815
3815
|
},
|
|
3816
3816
|
sizes: {
|
|
3817
3817
|
sm: {
|
|
3818
|
-
borderRadius:
|
|
3818
|
+
borderRadius: radii.base,
|
|
3819
3819
|
fontSize: fontSizes.sm,
|
|
3820
3820
|
},
|
|
3821
3821
|
md: {
|
|
@@ -3859,7 +3859,7 @@ var RadioGroup = function (_a) {
|
|
|
3859
3859
|
var radios = _a.radios, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.direction, direction = _c === void 0 ? 'row' : _c, spacing = _a.spacing, rest = __rest(_a, ["radios", "size", "direction", "spacing"]);
|
|
3860
3860
|
rest.$isFieldInline; var domProps = __rest(rest, ["$isFieldInline"]);
|
|
3861
3861
|
return (React__default["default"].createElement(react.RadioGroup, __assign({}, domProps),
|
|
3862
|
-
React__default["default"].createElement(react.Stack, { direction: direction, spacing: spacing }, radios.map(function (radio, index) { return (React__default["default"].createElement(Radio, __assign({ key: index }, radio, { size: size }))); }))));
|
|
3862
|
+
React__default["default"].createElement(react.Stack, { direction: direction, spacing: spacing, maxW: rest.maxW || 'max-content' }, radios.map(function (radio, index) { return (React__default["default"].createElement(Radio, __assign({ key: index }, radio, { size: size }))); }))));
|
|
3863
3863
|
};
|
|
3864
3864
|
RadioGroup.displayName = 'RadioGroup';
|
|
3865
3865
|
var WrappedRadioGroup = withFormControl(RadioGroup);
|
|
@@ -3873,7 +3873,8 @@ var RadioConfig = {
|
|
|
3873
3873
|
control: {
|
|
3874
3874
|
background: colors.white,
|
|
3875
3875
|
borderColor: semanticColors.border.light.medium,
|
|
3876
|
-
|
|
3876
|
+
border: borders['1px'],
|
|
3877
|
+
position: 'relative',
|
|
3877
3878
|
_hover: {
|
|
3878
3879
|
borderColor: semanticColors.border.light.heavy,
|
|
3879
3880
|
_disabled: {
|
|
@@ -3883,6 +3884,12 @@ var RadioConfig = {
|
|
|
3883
3884
|
_checked: {
|
|
3884
3885
|
background: colors.teal[600],
|
|
3885
3886
|
borderColor: colors.teal[600],
|
|
3887
|
+
_before: {
|
|
3888
|
+
position: 'absolute',
|
|
3889
|
+
top: '50%',
|
|
3890
|
+
right: '50%',
|
|
3891
|
+
transform: 'translate(50%, -50%)',
|
|
3892
|
+
},
|
|
3886
3893
|
_hover: {
|
|
3887
3894
|
background: colors.teal[700],
|
|
3888
3895
|
borderColor: colors.teal[700],
|