@xqmsg/ui-core 0.14.3 → 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/theme/provider/index.d.ts +1 -1
- package/dist/ui-core.cjs.development.js +22 -20
- 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 +22 -20
- 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/StackedSelect/StackedSelect.tsx +1 -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/src/theme/provider/index.tsx +1 -1
- 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,9 +1,10 @@
|
|
|
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';
|
|
6
6
|
import { HiOutlineRefresh } from 'react-icons/hi';
|
|
7
|
+
import { ChakraProvider } from '@chakra-ui/provider';
|
|
7
8
|
import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
|
|
8
9
|
import { defineStyle } from '@chakra-ui/system';
|
|
9
10
|
|
|
@@ -401,18 +402,15 @@ function Form(_ref) {
|
|
|
401
402
|
* A functional React component utilized to render the `StackedCheckbox` component.
|
|
402
403
|
*/
|
|
403
404
|
|
|
404
|
-
var
|
|
405
|
-
var
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
value: option.value
|
|
414
|
-
}, option.label));
|
|
415
|
-
}));
|
|
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);
|
|
416
414
|
});
|
|
417
415
|
|
|
418
416
|
function _extends() {
|
|
@@ -621,7 +619,8 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
621
619
|
color: "transparent",
|
|
622
620
|
fontSize: "13px",
|
|
623
621
|
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
624
|
-
value: selectedOption
|
|
622
|
+
value: selectedOption,
|
|
623
|
+
autoComplete: "off"
|
|
625
624
|
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
626
625
|
cursor: "pointer",
|
|
627
626
|
onClick: function onClick() {
|
|
@@ -1098,6 +1097,7 @@ var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1098
1097
|
var isRequired = _ref2.isRequired,
|
|
1099
1098
|
_onChange = _ref2.onChange,
|
|
1100
1099
|
value = _ref2.value;
|
|
1100
|
+
if (value === null) return null;
|
|
1101
1101
|
return /*#__PURE__*/React__default.createElement(Switch$1, {
|
|
1102
1102
|
size: "lg",
|
|
1103
1103
|
ref: _ref,
|
|
@@ -1216,17 +1216,18 @@ function Input(_ref) {
|
|
|
1216
1216
|
});
|
|
1217
1217
|
|
|
1218
1218
|
case 'checkbox':
|
|
1219
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1219
|
+
return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
|
|
1220
1220
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1221
1221
|
name: name,
|
|
1222
1222
|
id: name,
|
|
1223
1223
|
isInvalid: isInvalid,
|
|
1224
|
-
options: options,
|
|
1225
1224
|
onChange: onChange,
|
|
1226
1225
|
onBlur: onBlur,
|
|
1227
1226
|
ref: ref,
|
|
1228
1227
|
disabled: disabled,
|
|
1229
|
-
value: value
|
|
1228
|
+
value: value,
|
|
1229
|
+
defaultValue: defaultValue,
|
|
1230
|
+
label: label
|
|
1230
1231
|
});
|
|
1231
1232
|
|
|
1232
1233
|
case 'multi-select':
|
|
@@ -1277,7 +1278,8 @@ function Input(_ref) {
|
|
|
1277
1278
|
onChange: onChange,
|
|
1278
1279
|
onBlur: onBlur,
|
|
1279
1280
|
ref: ref,
|
|
1280
|
-
value: value
|
|
1281
|
+
value: value,
|
|
1282
|
+
defaultValue: defaultValue
|
|
1281
1283
|
});
|
|
1282
1284
|
|
|
1283
1285
|
default:
|
|
@@ -1600,10 +1602,10 @@ function Table(_ref) {
|
|
|
1600
1602
|
border: "none",
|
|
1601
1603
|
overflowX: "auto",
|
|
1602
1604
|
bg: "white",
|
|
1603
|
-
width: "
|
|
1605
|
+
width: "100%"
|
|
1604
1606
|
}, /*#__PURE__*/React__default.createElement(Table$2, {
|
|
1605
1607
|
variant: "unstyled",
|
|
1606
|
-
width: "
|
|
1608
|
+
width: "100%",
|
|
1607
1609
|
style: {
|
|
1608
1610
|
borderCollapse: 'separate',
|
|
1609
1611
|
borderSpacing: '0px'
|