@ctlyst.id/internal-ui 2.0.20 → 2.0.22
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/components/checkbox/components/checkbox.d.ts +3 -9
- package/dist/internal-ui.cjs.development.js +17 -12
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +3 -3
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +17 -12
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
@@ -1,16 +1,10 @@
|
|
1
|
-
import type { CheckboxProps } from '@chakra-ui/react';
|
1
|
+
import type { BoxProps, CheckboxProps } from '@chakra-ui/react';
|
2
2
|
import type { PropsWithChildren } from 'react';
|
3
3
|
export interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {
|
4
4
|
isError?: boolean;
|
5
5
|
helpText?: string;
|
6
6
|
errorText?: string;
|
7
|
+
boxProps?: BoxProps;
|
7
8
|
}
|
8
|
-
declare
|
9
|
-
declare namespace CheckboxComponent {
|
10
|
-
var defaultProps: {
|
11
|
-
isError: boolean;
|
12
|
-
helpText: string;
|
13
|
-
errorText: string;
|
14
|
-
};
|
15
|
-
}
|
9
|
+
declare const CheckboxComponent: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"input", CheckboxComponentProps>;
|
16
10
|
export default CheckboxComponent;
|
@@ -390,19 +390,21 @@ CardCustom.defaultProps = {
|
|
390
390
|
isRounded: true
|
391
391
|
};
|
392
392
|
|
393
|
-
|
393
|
+
const CheckboxComponent = /*#__PURE__*/react.forwardRef(({
|
394
394
|
isError = false,
|
395
395
|
helpText = '',
|
396
396
|
errorText = '',
|
397
|
+
boxProps,
|
397
398
|
children,
|
398
399
|
isDisabled,
|
399
400
|
...rest
|
400
|
-
}) {
|
401
|
+
}, ref) => {
|
401
402
|
const variant = isError ? 'errors' : 'unstyled';
|
402
|
-
return /*#__PURE__*/React__default.createElement(react.Box,
|
403
|
+
return /*#__PURE__*/React__default.createElement(react.Box, Object.assign({}, boxProps), /*#__PURE__*/React__default.createElement(react.Box, {
|
403
404
|
display: "flex"
|
404
405
|
}, /*#__PURE__*/React__default.createElement(react.Checkbox, Object.assign({
|
405
|
-
variant: variant
|
406
|
+
variant: variant,
|
407
|
+
ref: ref
|
406
408
|
}, rest, {
|
407
409
|
isDisabled: isDisabled
|
408
410
|
}), children && /*#__PURE__*/React__default.createElement(react.Text, {
|
@@ -424,11 +426,12 @@ function CheckboxComponent({
|
|
424
426
|
textStyle: "text.xs",
|
425
427
|
color: "black.medium"
|
426
428
|
}, helpText)));
|
427
|
-
}
|
429
|
+
});
|
428
430
|
CheckboxComponent.defaultProps = {
|
429
431
|
isError: false,
|
430
432
|
helpText: '',
|
431
|
-
errorText: ''
|
433
|
+
errorText: '',
|
434
|
+
boxProps: {}
|
432
435
|
};
|
433
436
|
|
434
437
|
const Field = props => {
|
@@ -3346,16 +3349,18 @@ const Tab = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
3346
3349
|
})));
|
3347
3350
|
});
|
3348
3351
|
|
3349
|
-
const TabList = /*#__PURE__*/react.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(react.TabList, {
|
3352
|
+
const TabList = /*#__PURE__*/react.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(react.TabList, Object.assign({
|
3350
3353
|
borderBottom: "1px solid",
|
3351
|
-
borderColor: react.useColorModeValue('gray.200', 'bright-gray.800')
|
3354
|
+
borderColor: react.useColorModeValue('gray.200', 'bright-gray.800')
|
3355
|
+
}, props, {
|
3352
3356
|
ref: ref
|
3353
|
-
}, props.children));
|
3357
|
+
}), props.children));
|
3354
3358
|
|
3355
|
-
const TabPanel = /*#__PURE__*/react.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(react.TabPanel, {
|
3356
|
-
px: 0
|
3359
|
+
const TabPanel = /*#__PURE__*/react.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(react.TabPanel, Object.assign({
|
3360
|
+
px: 0
|
3361
|
+
}, props, {
|
3357
3362
|
ref: ref
|
3358
|
-
}, props.children));
|
3363
|
+
}), props.children));
|
3359
3364
|
|
3360
3365
|
const messages = {
|
3361
3366
|
dragActive: 'Drop file disini...',
|