@xqmsg/ui-core 0.14.5 → 0.15.0
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/StackedMultiSelect/index.d.ts +0 -1
- package/dist/components/input/StackedPilledInput/index.d.ts +0 -1
- package/dist/components/input/components/dropdown/index.d.ts +3 -1
- package/dist/theme/components/button.d.ts +10 -8
- package/dist/theme/components/input.d.ts +2 -0
- package/dist/theme/components/select.d.ts +2 -0
- package/dist/theme/components/table.d.ts +1 -0
- package/dist/theme/components/textarea.d.ts +3 -1
- package/dist/ui-core.cjs.development.js +318 -168
- 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 +319 -169
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/index.tsx +7 -15
- package/src/components/button/Button.stories.tsx +15 -5
- package/src/components/button/index.tsx +2 -2
- package/src/components/input/Input.stories.tsx +95 -53
- package/src/components/input/StackedMultiSelect/index.tsx +187 -144
- package/src/components/input/StackedPilledInput/index.tsx +217 -225
- package/src/components/input/StackedSelect/StackedSelect.tsx +34 -2
- package/src/components/input/StackedSwitch/index.tsx +7 -1
- package/src/components/input/StackedTextarea/StackedTextarea.tsx +1 -1
- package/src/components/input/components/dropdown/index.tsx +23 -6
- package/src/components/input/components/token/index.tsx +11 -6
- package/src/components/input/index.tsx +0 -1
- package/src/theme/components/button.ts +10 -10
- package/src/theme/components/input.ts +1 -0
- package/src/theme/components/table.ts +1 -0
- package/src/theme/components/textarea.ts +4 -1
- package/dist/components/input/StackedMultiSelect/components/MultiValue/index.d.ts +0 -10
- package/src/components/input/StackedMultiSelect/components/MultiValue/index.tsx +0 -21
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,
|
|
2
|
+
import { Button as Button$2, Image, Alert as Alert$1, AlertDescription, Box, Flex, 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';
|
|
@@ -16,6 +16,91 @@ var NeutralIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214
|
|
|
16
16
|
|
|
17
17
|
var WarningIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7%205V7.5M13%207C13%2010.3137%2010.3137%2013%207%2013C3.68629%2013%201%2010.3137%201%207C1%203.68629%203.68629%201%207%201C10.3137%201%2013%203.68629%2013%207ZM7%209.5H7.005V9.505H7V9.5Z%22%20stroke%3D%22%23F8CE52%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* A functional React component utilized to render the `Button` component
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
var Button = function Button(_ref) {
|
|
24
|
+
var onClick = _ref.onClick,
|
|
25
|
+
text = _ref.text,
|
|
26
|
+
_ref$type = _ref.type,
|
|
27
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
28
|
+
ariaLabel = _ref.ariaLabel,
|
|
29
|
+
_ref$variant = _ref.variant,
|
|
30
|
+
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
|
+
className = _ref.className,
|
|
33
|
+
width = _ref.width;
|
|
34
|
+
return /*#__PURE__*/React__default.createElement(Button$2, {
|
|
35
|
+
onClick: onClick,
|
|
36
|
+
type: type,
|
|
37
|
+
variant: variant,
|
|
38
|
+
disabled: disabled,
|
|
39
|
+
"aria-label": ariaLabel,
|
|
40
|
+
className: className,
|
|
41
|
+
width: width === 'fixed' ? '100%' : 'fit-content'
|
|
42
|
+
}, text);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A functional React component utilized to render the `Banner` component
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
var Banner = function Banner(_ref) {
|
|
50
|
+
var variant = _ref.variant,
|
|
51
|
+
message = _ref.message,
|
|
52
|
+
buttonText = _ref.buttonText,
|
|
53
|
+
onClick = _ref.onClick;
|
|
54
|
+
var Icon = useMemo(function () {
|
|
55
|
+
switch (variant) {
|
|
56
|
+
case 'error':
|
|
57
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
58
|
+
src: ErrorIcon,
|
|
59
|
+
alt: "error",
|
|
60
|
+
boxSize: "16px"
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
case 'neutral':
|
|
64
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
65
|
+
src: NeutralIcon,
|
|
66
|
+
alt: "neutral",
|
|
67
|
+
boxSize: "16px"
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
case 'positive':
|
|
71
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
72
|
+
src: PositiveIcon,
|
|
73
|
+
alt: "positive",
|
|
74
|
+
boxSize: "16px"
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
case 'warning':
|
|
78
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
79
|
+
src: WarningIcon,
|
|
80
|
+
alt: "warning",
|
|
81
|
+
boxSize: "16px"
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
default:
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}, [variant]);
|
|
88
|
+
return /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
89
|
+
variant: variant
|
|
90
|
+
}, /*#__PURE__*/React__default.createElement(AlertDescription, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
91
|
+
pb: "8px"
|
|
92
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(Flex, {
|
|
93
|
+
pt: "8px",
|
|
94
|
+
justifyContent: "flex-end"
|
|
95
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
96
|
+
variant: "secondary",
|
|
97
|
+
onClick: onClick,
|
|
98
|
+
text: buttonText,
|
|
99
|
+
width: "variable",
|
|
100
|
+
ariaLabel: "banner button"
|
|
101
|
+
}))));
|
|
102
|
+
};
|
|
103
|
+
|
|
19
104
|
var blue = {
|
|
20
105
|
50: 'hsl(209, 100%, 95%)',
|
|
21
106
|
100: 'hsl(209, 100%, 90%)',
|
|
@@ -151,64 +236,6 @@ var colors = {
|
|
|
151
236
|
blue: blue
|
|
152
237
|
};
|
|
153
238
|
|
|
154
|
-
/**
|
|
155
|
-
* A functional React component utilized to render the `Banner` component
|
|
156
|
-
*/
|
|
157
|
-
|
|
158
|
-
var Banner = function Banner(_ref) {
|
|
159
|
-
var variant = _ref.variant,
|
|
160
|
-
message = _ref.message,
|
|
161
|
-
buttonText = _ref.buttonText,
|
|
162
|
-
onClick = _ref.onClick;
|
|
163
|
-
var Icon = useMemo(function () {
|
|
164
|
-
switch (variant) {
|
|
165
|
-
case 'error':
|
|
166
|
-
return /*#__PURE__*/React__default.createElement(Image, {
|
|
167
|
-
src: ErrorIcon,
|
|
168
|
-
alt: "error",
|
|
169
|
-
boxSize: "16px"
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
case 'neutral':
|
|
173
|
-
return /*#__PURE__*/React__default.createElement(Image, {
|
|
174
|
-
src: NeutralIcon,
|
|
175
|
-
alt: "neutral",
|
|
176
|
-
boxSize: "16px"
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
case 'positive':
|
|
180
|
-
return /*#__PURE__*/React__default.createElement(Image, {
|
|
181
|
-
src: PositiveIcon,
|
|
182
|
-
alt: "positive",
|
|
183
|
-
boxSize: "16px"
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
case 'warning':
|
|
187
|
-
return /*#__PURE__*/React__default.createElement(Image, {
|
|
188
|
-
src: WarningIcon,
|
|
189
|
-
alt: "warning",
|
|
190
|
-
boxSize: "16px"
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
default:
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
}, [variant]);
|
|
197
|
-
return /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
198
|
-
variant: variant
|
|
199
|
-
}, /*#__PURE__*/React__default.createElement(AlertDescription, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
200
|
-
pb: "8px"
|
|
201
|
-
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(Flex, {
|
|
202
|
-
pt: "8px",
|
|
203
|
-
justifyContent: "flex-end"
|
|
204
|
-
}, /*#__PURE__*/React__default.createElement(Button$2, {
|
|
205
|
-
size: "sm",
|
|
206
|
-
bg: "white",
|
|
207
|
-
color: colors.fill.action,
|
|
208
|
-
onClick: onClick
|
|
209
|
-
}, buttonText))));
|
|
210
|
-
};
|
|
211
|
-
|
|
212
239
|
/**
|
|
213
240
|
* A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
|
|
214
241
|
*/
|
|
@@ -296,32 +323,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
296
323
|
}));
|
|
297
324
|
};
|
|
298
325
|
|
|
299
|
-
/**
|
|
300
|
-
* A functional React component utilized to render the `Button` component
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
var Button = function Button(_ref) {
|
|
304
|
-
var onClick = _ref.onClick,
|
|
305
|
-
text = _ref.text,
|
|
306
|
-
_ref$type = _ref.type,
|
|
307
|
-
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
308
|
-
ariaLabel = _ref.ariaLabel,
|
|
309
|
-
_ref$variant = _ref.variant,
|
|
310
|
-
variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
|
|
311
|
-
disabled = _ref.disabled,
|
|
312
|
-
className = _ref.className,
|
|
313
|
-
width = _ref.width;
|
|
314
|
-
return /*#__PURE__*/React__default.createElement(Button$2, {
|
|
315
|
-
onClick: onClick,
|
|
316
|
-
type: type,
|
|
317
|
-
variant: variant,
|
|
318
|
-
disabled: disabled,
|
|
319
|
-
"aria-label": ariaLabel,
|
|
320
|
-
className: className,
|
|
321
|
-
width: width === 'variable' ? '100%' : 'fit-content'
|
|
322
|
-
}, text);
|
|
323
|
-
};
|
|
324
|
-
|
|
325
326
|
var GoogleLogo = "data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20533.5%20544.3%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20%20%20%20d%3D%22M533.5%20278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1%2033.8-25.7%2063.7-54.4%2082.7v68h87.7c51.5-47.4%2081.1-117.4%2081.1-200.2z%22%20%20%20%20fill%3D%22%234285f4%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M272.1%20544.3c73.4%200%20135.3-24.1%20180.4-65.7l-87.7-68c-24.4%2016.6-55.9%2026-92.6%2026-71%200-131.2-47.9-152.8-112.3H28.9v70.1c46.2%2091.9%20140.3%20149.9%20243.2%20149.9z%22%20%20%20%20fill%3D%22%2334a853%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M119.3%20324.3c-11.4-33.8-11.4-70.4%200-104.2V150H28.9c-38.6%2076.9-38.6%20167.5%200%20244.4l90.4-70.1z%22%20%20%20%20fill%3D%22%23fbbc04%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M272.1%20107.7c38.8-.6%2076.3%2014%20104.4%2040.8l77.7-77.7C405%2024.6%20339.7-.8%20272.1%200%20169.2%200%2075.1%2058%2028.9%20150l90.4%2070.1c21.5-64.5%2081.8-112.4%20152.8-112.4z%22%20%20%20%20fill%3D%22%23ea4335%22%20%20%2F%3E%3C%2Fsvg%3E";
|
|
326
327
|
|
|
327
328
|
/**
|
|
@@ -495,16 +496,21 @@ var SubtractIcon = "data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%221
|
|
|
495
496
|
|
|
496
497
|
var Dropdown = function Dropdown(_ref) {
|
|
497
498
|
var onSelectItem = _ref.onSelectItem,
|
|
498
|
-
options = _ref.options
|
|
499
|
+
options = _ref.options,
|
|
500
|
+
dropdownRef = _ref.dropdownRef,
|
|
501
|
+
position = _ref.position;
|
|
499
502
|
var DropdownContent = useMemo(function () {
|
|
500
503
|
return options.map(function (option, idx) {
|
|
501
504
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React__default.createElement(Box, {
|
|
502
505
|
color: colors.label.secondary.light,
|
|
503
506
|
fontSize: "13px",
|
|
507
|
+
width: "fit-content",
|
|
504
508
|
fontWeight: "bold",
|
|
505
509
|
px: "8px",
|
|
506
|
-
bg: "inherit"
|
|
510
|
+
bg: "inherit",
|
|
511
|
+
whiteSpace: "nowrap"
|
|
507
512
|
}, idx > 0 && /*#__PURE__*/React__default.createElement(Box, {
|
|
513
|
+
width: "100%",
|
|
508
514
|
my: "3px",
|
|
509
515
|
borderTop: "2px solid",
|
|
510
516
|
borderColor: colors.border["default"]
|
|
@@ -518,17 +524,23 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
518
524
|
fontSize: "13px",
|
|
519
525
|
px: "8px",
|
|
520
526
|
py: "4px",
|
|
527
|
+
width: "fit-content",
|
|
521
528
|
color: colors.label.primary.light,
|
|
522
529
|
_hover: {
|
|
523
530
|
color: colors.label.primary.dark,
|
|
524
531
|
bg: colors.fill.action,
|
|
525
|
-
borderRadius: '4px'
|
|
532
|
+
borderRadius: '4px',
|
|
533
|
+
width: '100%'
|
|
526
534
|
},
|
|
527
|
-
bg: "inherit"
|
|
535
|
+
bg: "inherit",
|
|
536
|
+
whiteSpace: "nowrap"
|
|
528
537
|
}, option.label));
|
|
529
538
|
});
|
|
530
539
|
}, [onSelectItem, options]);
|
|
531
|
-
return /*#__PURE__*/React__default.createElement(
|
|
540
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
541
|
+
flexDirection: "column",
|
|
542
|
+
ref: dropdownRef,
|
|
543
|
+
scrollMargin: "15px",
|
|
532
544
|
bg: colors.fill.light.quaternary,
|
|
533
545
|
backdropFilter: "auto",
|
|
534
546
|
backdropBlur: "64px",
|
|
@@ -536,13 +548,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
536
548
|
border: "0.25px solid",
|
|
537
549
|
borderColor: colors.fill.light.tertiary,
|
|
538
550
|
mt: "3px",
|
|
539
|
-
maxH: "
|
|
551
|
+
maxH: "240px",
|
|
540
552
|
overflowY: "auto",
|
|
541
553
|
px: "8px",
|
|
542
554
|
py: "4px",
|
|
543
555
|
position: "absolute",
|
|
544
|
-
|
|
545
|
-
|
|
556
|
+
top: position === 'top' ? 26 : undefined,
|
|
557
|
+
bottom: position === 'bottom' ? 30 : undefined,
|
|
558
|
+
width: "fit-content",
|
|
559
|
+
minWidth: "100%",
|
|
560
|
+
zIndex: 100,
|
|
561
|
+
tabIndex: -2000
|
|
546
562
|
}, DropdownContent);
|
|
547
563
|
};
|
|
548
564
|
|
|
@@ -570,6 +586,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
570
586
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
571
587
|
|
|
572
588
|
var dropdownRef = useRef(null);
|
|
589
|
+
var dropdownMenuRef = useRef(null);
|
|
573
590
|
|
|
574
591
|
var _useState = useState(false),
|
|
575
592
|
isFocussed = _useState[0],
|
|
@@ -581,6 +598,21 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
581
598
|
selectedOption = _useState2[0],
|
|
582
599
|
setSelectedOption = _useState2[1];
|
|
583
600
|
|
|
601
|
+
var _useState3 = useState('top'),
|
|
602
|
+
position = _useState3[0],
|
|
603
|
+
setPosition = _useState3[1];
|
|
604
|
+
|
|
605
|
+
useEffect(function () {
|
|
606
|
+
var _dropdownRef$current;
|
|
607
|
+
|
|
608
|
+
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
609
|
+
|
|
610
|
+
if (document.body.clientHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
611
|
+
setPosition('top');
|
|
612
|
+
} else {
|
|
613
|
+
setPosition('bottom');
|
|
614
|
+
}
|
|
615
|
+
}, [dropdownRef]);
|
|
584
616
|
useDidMountEffect(function () {
|
|
585
617
|
var _options$find$label2, _options$find2;
|
|
586
618
|
|
|
@@ -620,7 +652,25 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
620
652
|
fontSize: "13px",
|
|
621
653
|
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
622
654
|
value: selectedOption,
|
|
623
|
-
autoComplete: "off"
|
|
655
|
+
autoComplete: "off",
|
|
656
|
+
onKeyDown: function onKeyDown(e) {
|
|
657
|
+
if (isFocussed) {
|
|
658
|
+
var _dropdownMenuRef$curr;
|
|
659
|
+
|
|
660
|
+
if (e.key === 'Tab') {
|
|
661
|
+
return setIsFocussed(false);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
var idx = options.findIndex(function (option) {
|
|
665
|
+
return option.label[0].toLocaleLowerCase() === e.key;
|
|
666
|
+
});
|
|
667
|
+
console.log(idx);
|
|
668
|
+
(_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
669
|
+
top: idx * 27,
|
|
670
|
+
behavior: 'smooth'
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
}
|
|
624
674
|
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
625
675
|
cursor: "pointer",
|
|
626
676
|
onClick: function onClick() {
|
|
@@ -631,6 +681,8 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
631
681
|
alt: "subtract",
|
|
632
682
|
boxSize: "16px"
|
|
633
683
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
684
|
+
position: position,
|
|
685
|
+
dropdownRef: dropdownMenuRef,
|
|
634
686
|
onSelectItem: function onSelectItem(option) {
|
|
635
687
|
return handleOnSelectItem(option);
|
|
636
688
|
},
|
|
@@ -647,7 +699,9 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
|
|
|
647
699
|
|
|
648
700
|
return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
|
|
649
701
|
ref: _ref
|
|
650
|
-
}, props
|
|
702
|
+
}, props, {
|
|
703
|
+
fontSize: "13px"
|
|
704
|
+
}));
|
|
651
705
|
});
|
|
652
706
|
|
|
653
707
|
var _path;
|
|
@@ -679,12 +733,13 @@ var Token = function Token(_ref) {
|
|
|
679
733
|
alignItems: "center",
|
|
680
734
|
width: "fit-content",
|
|
681
735
|
w: "auto",
|
|
682
|
-
h: "
|
|
683
|
-
pl: "
|
|
684
|
-
pr: "
|
|
736
|
+
h: "16px",
|
|
737
|
+
pl: "6px",
|
|
738
|
+
pr: "2px",
|
|
685
739
|
py: "2px",
|
|
686
740
|
position: "relative"
|
|
687
741
|
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
742
|
+
whiteSpace: "nowrap",
|
|
688
743
|
color: colors.label.primary.light,
|
|
689
744
|
fontSize: "13px",
|
|
690
745
|
pr: "4px"
|
|
@@ -692,8 +747,8 @@ var Token = function Token(_ref) {
|
|
|
692
747
|
length: 15,
|
|
693
748
|
omission: '...'
|
|
694
749
|
})), /*#__PURE__*/React__default.createElement(Memo, {
|
|
695
|
-
width: "
|
|
696
|
-
height: "
|
|
750
|
+
width: "11px",
|
|
751
|
+
height: "11px",
|
|
697
752
|
onClick: onDelete,
|
|
698
753
|
cursor: "pointer"
|
|
699
754
|
}));
|
|
@@ -709,14 +764,15 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
709
764
|
control = _ref2.control,
|
|
710
765
|
name = _ref2.name,
|
|
711
766
|
placeholder = _ref2.placeholder,
|
|
712
|
-
disabled = _ref2.disabled
|
|
713
|
-
maxLength = _ref2.maxLength,
|
|
714
|
-
setError = _ref2.setError;
|
|
767
|
+
disabled = _ref2.disabled;
|
|
715
768
|
var watchedValue = useWatch({
|
|
716
769
|
control: control,
|
|
717
770
|
name: name
|
|
718
771
|
});
|
|
719
772
|
var dropdownRef = useRef(null);
|
|
773
|
+
var dropdownMenuRef = useRef(null);
|
|
774
|
+
var scrollRef = useRef(null);
|
|
775
|
+
var inputRef = useRef(null);
|
|
720
776
|
|
|
721
777
|
var _useState = useState([]),
|
|
722
778
|
localValues = _useState[0],
|
|
@@ -730,15 +786,28 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
730
786
|
isFocussed = _useState3[0],
|
|
731
787
|
setIsFocussed = _useState3[1];
|
|
732
788
|
|
|
789
|
+
var _useState4 = useState(false),
|
|
790
|
+
shouldSideScroll = _useState4[0],
|
|
791
|
+
setShouldSideScroll = _useState4[1];
|
|
792
|
+
|
|
793
|
+
var _useState5 = useState('top'),
|
|
794
|
+
position = _useState5[0],
|
|
795
|
+
setPosition = _useState5[1];
|
|
796
|
+
|
|
797
|
+
useEffect(function () {
|
|
798
|
+
var _dropdownRef$current;
|
|
799
|
+
|
|
800
|
+
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
801
|
+
|
|
802
|
+
if (document.body.clientHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
803
|
+
setPosition('top');
|
|
804
|
+
} else {
|
|
805
|
+
setPosition('bottom');
|
|
806
|
+
}
|
|
807
|
+
}, [dropdownRef]);
|
|
733
808
|
useOutsideClick({
|
|
734
809
|
ref: dropdownRef,
|
|
735
810
|
handler: function handler() {
|
|
736
|
-
if (maxLength && localValues.length > maxLength) {
|
|
737
|
-
setError(name, {
|
|
738
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
|
|
742
811
|
return setIsFocussed(false);
|
|
743
812
|
}
|
|
744
813
|
}); // gets latest watched form value (common delimited) from RHF state and creates a list
|
|
@@ -748,24 +817,27 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
748
817
|
setLocalValues([]);
|
|
749
818
|
}
|
|
750
819
|
|
|
751
|
-
if (
|
|
820
|
+
if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
|
|
821
|
+
if (shouldSideScroll) {
|
|
822
|
+
var _scrollRef$current;
|
|
823
|
+
|
|
824
|
+
scrollRef.current.scrollTo({
|
|
825
|
+
left: (_scrollRef$current = scrollRef.current) == null ? void 0 : _scrollRef$current.scrollWidth,
|
|
826
|
+
behavior: 'smooth'
|
|
827
|
+
});
|
|
828
|
+
setShouldSideScroll(false);
|
|
829
|
+
}
|
|
830
|
+
|
|
752
831
|
setLocalValues(watchedValue.split(',').filter(Boolean).map(function (value) {
|
|
753
832
|
return options.find(function (option) {
|
|
754
833
|
return option.value === value;
|
|
755
834
|
});
|
|
756
835
|
}));
|
|
757
836
|
}
|
|
758
|
-
}, [
|
|
837
|
+
}, [options, shouldSideScroll, watchedValue]);
|
|
759
838
|
|
|
760
839
|
var handleChange = function handleChange(option) {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
if (maxLength && localValues.length > maxLength) {
|
|
764
|
-
return setError(name, {
|
|
765
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
|
|
840
|
+
setShouldSideScroll(true);
|
|
769
841
|
var newValue = [].concat(localValues, [option]).map(function (_ref3) {
|
|
770
842
|
var value = _ref3.value;
|
|
771
843
|
return value;
|
|
@@ -809,9 +881,27 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
809
881
|
|
|
810
882
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
811
883
|
ref: dropdownRef,
|
|
812
|
-
position: "relative"
|
|
884
|
+
position: "relative",
|
|
885
|
+
onKeyDown: function onKeyDown(e) {
|
|
886
|
+
if (isFocussed) {
|
|
887
|
+
var _dropdownMenuRef$curr;
|
|
888
|
+
|
|
889
|
+
if (e.key === 'Tab') {
|
|
890
|
+
return setIsFocussed(false);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
var idx = options.findIndex(function (option) {
|
|
894
|
+
return option.label[0].toLocaleLowerCase() === e.key;
|
|
895
|
+
});
|
|
896
|
+
(_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
897
|
+
top: idx * 27,
|
|
898
|
+
behavior: 'smooth'
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
}
|
|
813
902
|
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
814
903
|
fontSize: "13px",
|
|
904
|
+
h: "26px",
|
|
815
905
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
816
906
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
817
907
|
py: "5px",
|
|
@@ -820,23 +910,42 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
820
910
|
alignItems: "center",
|
|
821
911
|
justifyContent: "space-between",
|
|
822
912
|
onClick: function onClick() {
|
|
823
|
-
|
|
913
|
+
if (!disabled) {
|
|
914
|
+
var _inputRef$current;
|
|
915
|
+
|
|
916
|
+
if (isFocussed) {
|
|
917
|
+
return setIsFocussed(false);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
(_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();
|
|
921
|
+
setIsFocussed(true);
|
|
922
|
+
}
|
|
824
923
|
},
|
|
825
924
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
826
925
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
827
926
|
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
828
|
-
height: "28px",
|
|
829
927
|
alignItems: "center",
|
|
830
|
-
|
|
831
|
-
|
|
928
|
+
h: "inherit",
|
|
929
|
+
width: "90%",
|
|
930
|
+
overflowX: "scroll",
|
|
832
931
|
style: {
|
|
833
932
|
scrollbarWidth: 'none'
|
|
834
933
|
/* Firefox */
|
|
835
|
-
|
|
836
|
-
|
|
934
|
+
,
|
|
935
|
+
msOverflowStyle: 'none'
|
|
936
|
+
},
|
|
937
|
+
sx: {
|
|
938
|
+
'::-webkit-scrollbar': {
|
|
939
|
+
display: 'none'
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
ref: scrollRef
|
|
837
943
|
}, localValues.length ? localValues.map(function (option) {
|
|
838
944
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
839
|
-
mr: "4px"
|
|
945
|
+
mr: "4px",
|
|
946
|
+
width: "fit-content",
|
|
947
|
+
h: "16px",
|
|
948
|
+
borderRadius: "full"
|
|
840
949
|
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
841
950
|
label: option.label,
|
|
842
951
|
onDelete: function onDelete() {
|
|
@@ -846,8 +955,20 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
846
955
|
}) : /*#__PURE__*/React__default.createElement(Text$2, {
|
|
847
956
|
color: colors.label.secondary.light,
|
|
848
957
|
fontSize: "13px"
|
|
849
|
-
}, placeholder)), /*#__PURE__*/React__default.createElement(
|
|
850
|
-
|
|
958
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(Input$2, {
|
|
959
|
+
padding: 0,
|
|
960
|
+
border: "none",
|
|
961
|
+
height: "0",
|
|
962
|
+
width: "0",
|
|
963
|
+
autoComplete: "off",
|
|
964
|
+
type: "text",
|
|
965
|
+
ref: inputRef,
|
|
966
|
+
tabIndex: -1,
|
|
967
|
+
_focus: {
|
|
968
|
+
boxShadow: 'none !important'
|
|
969
|
+
}
|
|
970
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
971
|
+
mr: "4px",
|
|
851
972
|
justifyContent: "center",
|
|
852
973
|
alignItems: "center"
|
|
853
974
|
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
@@ -855,10 +976,12 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
855
976
|
alt: "subtract",
|
|
856
977
|
boxSize: "16px"
|
|
857
978
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
979
|
+
dropdownRef: dropdownMenuRef,
|
|
858
980
|
onSelectItem: function onSelectItem(option) {
|
|
859
981
|
return handleChange(option);
|
|
860
982
|
},
|
|
861
|
-
options: localOptions
|
|
983
|
+
options: localOptions,
|
|
984
|
+
position: position
|
|
862
985
|
}));
|
|
863
986
|
});
|
|
864
987
|
|
|
@@ -872,8 +995,6 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
872
995
|
control = _ref2.control,
|
|
873
996
|
placeholder = _ref2.placeholder,
|
|
874
997
|
disabled = _ref2.disabled,
|
|
875
|
-
maxLength = _ref2.maxLength,
|
|
876
|
-
setError = _ref2.setError,
|
|
877
998
|
clearErrors = _ref2.clearErrors;
|
|
878
999
|
var watchedValue = useWatch({
|
|
879
1000
|
control: control,
|
|
@@ -886,6 +1007,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
886
1007
|
|
|
887
1008
|
var inputRef = useRef(null);
|
|
888
1009
|
var inputWrapperRef = useRef(null);
|
|
1010
|
+
var scrollRef = useRef(null);
|
|
889
1011
|
|
|
890
1012
|
var _useState2 = useState(null),
|
|
891
1013
|
tokenIndex = _useState2[0],
|
|
@@ -895,9 +1017,13 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
895
1017
|
isFocussed = _useState3[0],
|
|
896
1018
|
setIsFocussed = _useState3[1];
|
|
897
1019
|
|
|
898
|
-
var _useState4 = useState(
|
|
899
|
-
|
|
900
|
-
|
|
1020
|
+
var _useState4 = useState(false),
|
|
1021
|
+
shouldSideScroll = _useState4[0],
|
|
1022
|
+
setShouldSideScroll = _useState4[1];
|
|
1023
|
+
|
|
1024
|
+
var _useState5 = useState(''),
|
|
1025
|
+
localValue = _useState5[0],
|
|
1026
|
+
setLocalValue = _useState5[1]; // gets latest watched form value (common delimited) from RHF state and creates a list
|
|
901
1027
|
|
|
902
1028
|
|
|
903
1029
|
useEffect(function () {
|
|
@@ -906,19 +1032,24 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
906
1032
|
}
|
|
907
1033
|
|
|
908
1034
|
if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
|
|
1035
|
+
if (shouldSideScroll) {
|
|
1036
|
+
var _scrollRef$current;
|
|
1037
|
+
|
|
1038
|
+
scrollRef.current.scrollTo({
|
|
1039
|
+
left: (_scrollRef$current = scrollRef.current) == null ? void 0 : _scrollRef$current.scrollWidth,
|
|
1040
|
+
behavior: 'smooth'
|
|
1041
|
+
});
|
|
1042
|
+
setShouldSideScroll(false);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
909
1045
|
setLatestFormValueToArray(watchedValue.split(',').filter(Boolean));
|
|
910
1046
|
}
|
|
911
|
-
}, [watchedValue]);
|
|
1047
|
+
}, [watchedValue, shouldSideScroll]);
|
|
912
1048
|
|
|
913
1049
|
var onHandleKeyDown = function onHandleKeyDown(e) {
|
|
914
|
-
|
|
915
|
-
if (maxLength && lastestFormValueToArray.length >= maxLength) {
|
|
916
|
-
return setError(name, {
|
|
917
|
-
type: 'maxLength',
|
|
918
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
919
|
-
});
|
|
920
|
-
}
|
|
1050
|
+
setShouldSideScroll(true);
|
|
921
1051
|
|
|
1052
|
+
if (e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') {
|
|
922
1053
|
if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
|
|
923
1054
|
setLocalValue(lastestFormValueToArray[tokenIndex]);
|
|
924
1055
|
|
|
@@ -935,10 +1066,11 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
935
1066
|
|
|
936
1067
|
var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
|
|
937
1068
|
setLocalValue('');
|
|
938
|
-
|
|
1069
|
+
setValue(name, filteredUniqueValues.toString().replace(/\s/g, ''), {
|
|
939
1070
|
shouldValidate: true,
|
|
940
1071
|
shouldDirty: true
|
|
941
1072
|
});
|
|
1073
|
+
return setIsFocussed(false);
|
|
942
1074
|
}
|
|
943
1075
|
|
|
944
1076
|
if (!localValue.trim().length && lastestFormValueToArray.length) {
|
|
@@ -997,7 +1129,6 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
997
1129
|
clearErrors(name);
|
|
998
1130
|
|
|
999
1131
|
if (localValue.trim()) {
|
|
1000
|
-
if (maxLength && watchedValue.length + localValue.trim().length > maxLength) return setLocalValue('');
|
|
1001
1132
|
var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
|
|
1002
1133
|
setValue(name, filteredUniqueValues.toString().replace(/\s/g, ''), {
|
|
1003
1134
|
shouldValidate: true,
|
|
@@ -1033,22 +1164,30 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1033
1164
|
},
|
|
1034
1165
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
1035
1166
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
1036
|
-
ref: inputWrapperRef
|
|
1167
|
+
ref: inputWrapperRef,
|
|
1168
|
+
h: "26px"
|
|
1037
1169
|
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
1038
|
-
|
|
1170
|
+
h: "18px",
|
|
1039
1171
|
alignItems: "center",
|
|
1040
|
-
width
|
|
1041
|
-
maxW
|
|
1042
|
-
overflowX: "
|
|
1172
|
+
// width="fit-content"
|
|
1173
|
+
// maxW="80%"
|
|
1174
|
+
overflowX: "scroll",
|
|
1043
1175
|
style: {
|
|
1044
1176
|
scrollbarWidth: 'none'
|
|
1045
1177
|
/* Firefox */
|
|
1046
|
-
|
|
1047
|
-
|
|
1178
|
+
,
|
|
1179
|
+
msOverflowStyle: 'none'
|
|
1180
|
+
},
|
|
1181
|
+
sx: {
|
|
1182
|
+
'::-webkit-scrollbar': {
|
|
1183
|
+
display: 'none'
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
ref: scrollRef
|
|
1048
1187
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
1049
1188
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1050
1189
|
mr: "4px",
|
|
1051
|
-
border: tokenIndex === index ? "
|
|
1190
|
+
border: tokenIndex === index ? "1px solid " + colors.border.focus : 'none',
|
|
1052
1191
|
borderRadius: "full",
|
|
1053
1192
|
onClick: function onClick() {
|
|
1054
1193
|
return setTokenIndex(index);
|
|
@@ -1073,7 +1212,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1073
1212
|
padding: 0,
|
|
1074
1213
|
width: "100%",
|
|
1075
1214
|
border: "none",
|
|
1076
|
-
height: "
|
|
1215
|
+
height: "auto",
|
|
1077
1216
|
color: tokenIndex !== null ? 'transparent' : colors.label.primary,
|
|
1078
1217
|
_focus: {
|
|
1079
1218
|
boxShadow: 'none !important'
|
|
@@ -1085,6 +1224,9 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1085
1224
|
ref: inputRef,
|
|
1086
1225
|
onFocus: function onFocus() {
|
|
1087
1226
|
return setIsFocussed(true);
|
|
1227
|
+
},
|
|
1228
|
+
onBlur: function onBlur() {
|
|
1229
|
+
return setIsFocussed(false);
|
|
1088
1230
|
}
|
|
1089
1231
|
}))));
|
|
1090
1232
|
});
|
|
@@ -1099,7 +1241,12 @@ var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1099
1241
|
value = _ref2.value;
|
|
1100
1242
|
if (value === null) return null;
|
|
1101
1243
|
return /*#__PURE__*/React__default.createElement(Switch$1, {
|
|
1102
|
-
|
|
1244
|
+
h: "26px",
|
|
1245
|
+
mx: "4px",
|
|
1246
|
+
_focus: {
|
|
1247
|
+
border: '2px solid',
|
|
1248
|
+
borderColor: colors.border.focus
|
|
1249
|
+
},
|
|
1103
1250
|
ref: _ref,
|
|
1104
1251
|
isRequired: isRequired,
|
|
1105
1252
|
value: String(value),
|
|
@@ -1246,8 +1393,7 @@ function Input(_ref) {
|
|
|
1246
1393
|
control: control,
|
|
1247
1394
|
setError: setError,
|
|
1248
1395
|
clearErrors: clearErrors,
|
|
1249
|
-
placeholder: placeholder
|
|
1250
|
-
maxLength: maxLength
|
|
1396
|
+
placeholder: placeholder
|
|
1251
1397
|
});
|
|
1252
1398
|
|
|
1253
1399
|
case 'pilled-text':
|
|
@@ -1842,13 +1988,14 @@ var Badge = {
|
|
|
1842
1988
|
|
|
1843
1989
|
var baseStyle$2 = /*#__PURE__*/defineStyle({
|
|
1844
1990
|
borderRadius: '4px',
|
|
1845
|
-
fontSize: '
|
|
1991
|
+
fontSize: '13px',
|
|
1846
1992
|
bg: colors.fill.action,
|
|
1847
1993
|
color: colors.label.primary.dark,
|
|
1994
|
+
border: 'none',
|
|
1848
1995
|
px: '8px',
|
|
1849
1996
|
py: '4px',
|
|
1850
1997
|
bgGradient: 'linear-gradient(#FFFFFF29, #FFFFFF00)',
|
|
1851
|
-
shadow: '
|
|
1998
|
+
shadow: '0.5px 0.5px 1px 1px #0000001A',
|
|
1852
1999
|
_disabled: {
|
|
1853
2000
|
backgroundColor: 'gray.100',
|
|
1854
2001
|
borderColor: 'gray.100',
|
|
@@ -1864,20 +2011,19 @@ var baseStyle$2 = /*#__PURE__*/defineStyle({
|
|
|
1864
2011
|
bgGradient: colors.fill.light.quaternary
|
|
1865
2012
|
},
|
|
1866
2013
|
_focus: {
|
|
1867
|
-
|
|
1868
|
-
|
|
2014
|
+
outline: "2px solid " + colors.border.focus,
|
|
2015
|
+
outlineOffset: '0px'
|
|
1869
2016
|
}
|
|
1870
2017
|
});
|
|
1871
2018
|
|
|
1872
|
-
var
|
|
2019
|
+
var variantPrimary = function variantPrimary() {
|
|
1873
2020
|
return _extends({}, baseStyle$2);
|
|
1874
2021
|
};
|
|
1875
2022
|
|
|
1876
|
-
var
|
|
2023
|
+
var variantSecondary = function variantSecondary() {
|
|
1877
2024
|
return _extends({}, baseStyle$2, {
|
|
1878
2025
|
color: colors.fill.action,
|
|
1879
2026
|
bg: colors.label.primary.dark,
|
|
1880
|
-
border: 'none',
|
|
1881
2027
|
_hover: {
|
|
1882
2028
|
bg: colors.label.primary.dark
|
|
1883
2029
|
},
|
|
@@ -1893,11 +2039,11 @@ var variantOutline$1 = function variantOutline() {
|
|
|
1893
2039
|
};
|
|
1894
2040
|
|
|
1895
2041
|
var variants$2 = {
|
|
1896
|
-
|
|
1897
|
-
|
|
2042
|
+
primary: /*#__PURE__*/variantPrimary(),
|
|
2043
|
+
secondary: /*#__PURE__*/variantSecondary()
|
|
1898
2044
|
};
|
|
1899
2045
|
var defaultProps$2 = {
|
|
1900
|
-
|
|
2046
|
+
variant: 'primary'
|
|
1901
2047
|
};
|
|
1902
2048
|
var Button$1 = {
|
|
1903
2049
|
baseStyle: baseStyle$2,
|
|
@@ -2001,6 +2147,7 @@ var parts$3 = ['field'];
|
|
|
2001
2147
|
var baseStyle$7 = {
|
|
2002
2148
|
field: {
|
|
2003
2149
|
fontSize: '13px',
|
|
2150
|
+
h: '26px',
|
|
2004
2151
|
'::placeholder': {
|
|
2005
2152
|
color: colors.label.secondary.light
|
|
2006
2153
|
},
|
|
@@ -2482,7 +2629,8 @@ var baseStyle$c = {
|
|
|
2482
2629
|
},
|
|
2483
2630
|
th: {
|
|
2484
2631
|
bg: colors.label.primary.dark,
|
|
2485
|
-
padding: '5px 8px !important'
|
|
2632
|
+
padding: '5px 8px !important',
|
|
2633
|
+
fontSize: '13px'
|
|
2486
2634
|
},
|
|
2487
2635
|
tr: {
|
|
2488
2636
|
fontSize: '13px',
|
|
@@ -2751,9 +2899,11 @@ var Tabs = {
|
|
|
2751
2899
|
};
|
|
2752
2900
|
|
|
2753
2901
|
var baseStyle$e = /*#__PURE__*/_extends({}, Input$1.baseStyle.field, {
|
|
2902
|
+
fontSize: '13px',
|
|
2754
2903
|
display: 'block',
|
|
2755
2904
|
paddingY: '8px',
|
|
2756
|
-
|
|
2905
|
+
paddingX: '5px',
|
|
2906
|
+
height: '78px',
|
|
2757
2907
|
lineHeight: 'short'
|
|
2758
2908
|
});
|
|
2759
2909
|
|