@xqmsg/ui-core 0.14.4 → 0.14.5
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/input/StackedCheckbox/StackedCheckbox.d.ts +10 -0
- package/dist/ui-core.cjs.development.js +18 -18
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +19 -19
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/Input.stories.tsx +6 -0
- package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +27 -0
- package/src/components/input/StackedSwitch/index.tsx +2 -0
- package/src/components/input/index.tsx +5 -3
- package/src/components/table/index.tsx +2 -7
- package/dist/components/input/StackedCheckbox/StackedCheckboxGroup.d.ts +0 -10
- package/src/components/input/StackedCheckbox/StackedCheckboxGroup.tsx +0 -29
package/dist/ui-core.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useMemo, useCallback, useRef, useEffect, useState, memo, forwardRef, createElement } from 'react';
|
|
2
|
-
import { Image, Alert as Alert$1, AlertDescription, Box, Flex, Button as Button$2, Text as Text$2, Icon as Icon$1, Spinner,
|
|
2
|
+
import { Image, Alert as Alert$1, AlertDescription, Box, Flex, Button as Button$2, Text as Text$2, Icon as Icon$1, Spinner, Checkbox, Input as Input$2, InputGroup, RadioGroup, Radio, useOutsideClick, InputRightElement, Textarea as Textarea$1, Switch as Switch$1, FormLabel as FormLabel$1, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, useMediaQuery, Grid, GridItem, IconButton, Collapse, TableContainer, Table as Table$2, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, extendTheme } from '@chakra-ui/react';
|
|
3
3
|
import { FormProvider, useWatch, Controller } from 'react-hook-form';
|
|
4
4
|
import { truncate } from 'lodash-es';
|
|
5
5
|
import { CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
|
|
@@ -402,18 +402,15 @@ function Form(_ref) {
|
|
|
402
402
|
* A functional React component utilized to render the `StackedCheckbox` component.
|
|
403
403
|
*/
|
|
404
404
|
|
|
405
|
-
var
|
|
406
|
-
var
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
value: option.value
|
|
415
|
-
}, option.label));
|
|
416
|
-
}));
|
|
405
|
+
var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
406
|
+
var value = _ref2.value,
|
|
407
|
+
label = _ref2.label,
|
|
408
|
+
defaultValue = _ref2.defaultValue;
|
|
409
|
+
return /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
410
|
+
ref: _ref,
|
|
411
|
+
value: String(value),
|
|
412
|
+
defaultChecked: Boolean(defaultValue)
|
|
413
|
+
}, label);
|
|
417
414
|
});
|
|
418
415
|
|
|
419
416
|
function _extends() {
|
|
@@ -1100,6 +1097,7 @@ var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1100
1097
|
var isRequired = _ref2.isRequired,
|
|
1101
1098
|
_onChange = _ref2.onChange,
|
|
1102
1099
|
value = _ref2.value;
|
|
1100
|
+
if (value === null) return null;
|
|
1103
1101
|
return /*#__PURE__*/React__default.createElement(Switch$1, {
|
|
1104
1102
|
size: "lg",
|
|
1105
1103
|
ref: _ref,
|
|
@@ -1218,17 +1216,18 @@ function Input(_ref) {
|
|
|
1218
1216
|
});
|
|
1219
1217
|
|
|
1220
1218
|
case 'checkbox':
|
|
1221
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1219
|
+
return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
|
|
1222
1220
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1223
1221
|
name: name,
|
|
1224
1222
|
id: name,
|
|
1225
1223
|
isInvalid: isInvalid,
|
|
1226
|
-
options: options,
|
|
1227
1224
|
onChange: onChange,
|
|
1228
1225
|
onBlur: onBlur,
|
|
1229
1226
|
ref: ref,
|
|
1230
1227
|
disabled: disabled,
|
|
1231
|
-
value: value
|
|
1228
|
+
value: value,
|
|
1229
|
+
defaultValue: defaultValue,
|
|
1230
|
+
label: label
|
|
1232
1231
|
});
|
|
1233
1232
|
|
|
1234
1233
|
case 'multi-select':
|
|
@@ -1279,7 +1278,8 @@ function Input(_ref) {
|
|
|
1279
1278
|
onChange: onChange,
|
|
1280
1279
|
onBlur: onBlur,
|
|
1281
1280
|
ref: ref,
|
|
1282
|
-
value: value
|
|
1281
|
+
value: value,
|
|
1282
|
+
defaultValue: defaultValue
|
|
1283
1283
|
});
|
|
1284
1284
|
|
|
1285
1285
|
default:
|
|
@@ -1602,10 +1602,10 @@ function Table(_ref) {
|
|
|
1602
1602
|
border: "none",
|
|
1603
1603
|
overflowX: "auto",
|
|
1604
1604
|
bg: "white",
|
|
1605
|
-
width: "
|
|
1605
|
+
width: "100%"
|
|
1606
1606
|
}, /*#__PURE__*/React__default.createElement(Table$2, {
|
|
1607
1607
|
variant: "unstyled",
|
|
1608
|
-
width: "
|
|
1608
|
+
width: "100%",
|
|
1609
1609
|
style: {
|
|
1610
1610
|
borderCollapse: 'separate',
|
|
1611
1611
|
borderSpacing: '0px'
|