@televet/kibble-ui 1.14.4 → 1.14.6
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.
|
@@ -3,6 +3,7 @@ import { SwitchProps as CSwitchProps } from '@chakra-ui/react';
|
|
|
3
3
|
import { WithFormControlProps } from '../FormControl/formControl.component';
|
|
4
4
|
export interface SwitchProps extends WithFormControlProps, CSwitchProps {
|
|
5
5
|
isFieldInline?: boolean;
|
|
6
|
+
isIndeterminate?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare const WrappedSwitch: React.FC<SwitchProps>;
|
|
8
9
|
export { WrappedSwitch as Switch };
|
package/build/index.js
CHANGED
|
@@ -4680,8 +4680,8 @@ var WrappedSelect = withFormControl(Select);
|
|
|
4680
4680
|
var SelectConfig = __assign({}, FormControlConfig);
|
|
4681
4681
|
|
|
4682
4682
|
var Switch = function (props) {
|
|
4683
|
-
var isChecked = props.isChecked, isFieldInline = props.isFieldInline, domProps = __rest(props, ["isChecked", "isFieldInline"]);
|
|
4684
|
-
return (React__default["default"].createElement(react.Switch, __assign({ colorScheme: "teal", isChecked: isChecked, display: isFieldInline ? 'inline-block' : 'block' }, domProps)));
|
|
4683
|
+
var isChecked = props.isChecked, isIndeterminate = props.isIndeterminate, isFieldInline = props.isFieldInline, domProps = __rest(props, ["isChecked", "isIndeterminate", "isFieldInline"]);
|
|
4684
|
+
return (React__default["default"].createElement(react.Switch, __assign({ colorScheme: "teal", isChecked: isChecked, display: isFieldInline ? 'inline-block' : 'block' }, (isIndeterminate && { variant: 'indeterminate' }), domProps)));
|
|
4685
4685
|
};
|
|
4686
4686
|
Switch.displayName = 'Switch';
|
|
4687
4687
|
var WrappedSwitch = withFormControl(Switch);
|
|
@@ -6873,29 +6873,45 @@ var SwitchConfig = {
|
|
|
6873
6873
|
sizes: {
|
|
6874
6874
|
sm: {
|
|
6875
6875
|
container: (_a = {},
|
|
6876
|
-
_a[$thumbWidth.variable] = '
|
|
6877
|
-
_a[$thumbHeight.variable] = '
|
|
6878
|
-
_a[$trackWidth.variable] = '
|
|
6879
|
-
_a[$trackHeight.variable] = '
|
|
6876
|
+
_a[$thumbWidth.variable] = '12px',
|
|
6877
|
+
_a[$thumbHeight.variable] = '12px',
|
|
6878
|
+
_a[$trackWidth.variable] = '24px',
|
|
6879
|
+
_a[$trackHeight.variable] = '6px',
|
|
6880
6880
|
_a),
|
|
6881
6881
|
},
|
|
6882
6882
|
md: {
|
|
6883
6883
|
container: (_b = {},
|
|
6884
|
-
_b[$thumbWidth.variable] = '
|
|
6885
|
-
_b[$thumbHeight.variable] = '
|
|
6886
|
-
_b[$trackWidth.variable] = '
|
|
6887
|
-
_b[$trackHeight.variable] = '
|
|
6884
|
+
_b[$thumbWidth.variable] = '16px',
|
|
6885
|
+
_b[$thumbHeight.variable] = '16px',
|
|
6886
|
+
_b[$trackWidth.variable] = '32px',
|
|
6887
|
+
_b[$trackHeight.variable] = '8px',
|
|
6888
6888
|
_b),
|
|
6889
6889
|
},
|
|
6890
6890
|
lg: {
|
|
6891
6891
|
container: (_c = {},
|
|
6892
|
-
_c[$thumbWidth.variable] = '
|
|
6893
|
-
_c[$thumbHeight.variable] = '
|
|
6894
|
-
_c[$trackWidth.variable] = '
|
|
6895
|
-
_c[$trackHeight.variable] = '
|
|
6892
|
+
_c[$thumbWidth.variable] = '20px',
|
|
6893
|
+
_c[$thumbHeight.variable] = '20px',
|
|
6894
|
+
_c[$trackWidth.variable] = '40px',
|
|
6895
|
+
_c[$trackHeight.variable] = '10px',
|
|
6896
6896
|
_c),
|
|
6897
6897
|
},
|
|
6898
6898
|
},
|
|
6899
|
+
variants: {
|
|
6900
|
+
indeterminate: {
|
|
6901
|
+
thumb: {
|
|
6902
|
+
bg: coreColors.gray[500],
|
|
6903
|
+
left: '50%',
|
|
6904
|
+
transform: "translate(-50%, -50%)",
|
|
6905
|
+
transitionDuration: 'slower',
|
|
6906
|
+
_checked: {
|
|
6907
|
+
bg: coreColors.gray[500],
|
|
6908
|
+
left: '50%',
|
|
6909
|
+
transform: "translate(-50%, -50%)",
|
|
6910
|
+
transitionDuration: 'slower',
|
|
6911
|
+
},
|
|
6912
|
+
},
|
|
6913
|
+
},
|
|
6914
|
+
},
|
|
6899
6915
|
};
|
|
6900
6916
|
|
|
6901
6917
|
var DrawerConfig = {
|
|
@@ -6999,7 +7015,7 @@ var Modal = function (_a) {
|
|
|
6999
7015
|
var fullScreenMobileContentMargin = react.useBreakpointValue({ base: 0, md: 16 });
|
|
7000
7016
|
var Modal = (React__default["default"].createElement(react.Modal, __assign({ closeOnEsc: allowEscape, closeOnOverlayClick: allowEscape, autoFocus: !!initialFocusRef, isOpen: isOpen, onClose: onClose, scrollBehavior: scrollBehavior, isCentered: isCentered, size: useFullScreenMobile ? fullScreenMobileSize : size, motionPreset: "slideInBottom" }, rest),
|
|
7001
7017
|
React__default["default"].createElement(react.ModalOverlay, null),
|
|
7002
|
-
React__default["default"].createElement(react.ModalContent, { backgroundColor: backgroundColor, m: useFullScreenMobile ? fullScreenMobileContentMargin : 16, borderRadius: useFullScreenMobile ? fullScreenMobileBorderRadius : radii.xl }, children)));
|
|
7018
|
+
React__default["default"].createElement(react.ModalContent, { backgroundColor: backgroundColor, m: useFullScreenMobile ? fullScreenMobileContentMargin : 16, borderRadius: useFullScreenMobile ? fullScreenMobileBorderRadius : radii.xl, minH: { base: '-webkit-fill-available', md: 'auto' } }, children)));
|
|
7003
7019
|
return withDarkMode$1(Modal, !!darkMode);
|
|
7004
7020
|
};
|
|
7005
7021
|
|