@xqmsg/ui-core 0.14.4 → 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/StackedCheckbox/StackedCheckbox.d.ts +10 -0
- 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 +336 -186
- 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 +337 -187
- 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 -47
- package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +27 -0
- 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 +9 -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 +5 -4
- package/src/components/table/index.tsx +2 -7
- 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/StackedCheckbox/StackedCheckboxGroup.d.ts +0 -10
- package/dist/components/input/StackedMultiSelect/components/MultiValue/index.d.ts +0 -10
- package/src/components/input/StackedCheckbox/StackedCheckboxGroup.tsx +0 -29
- package/src/components/input/StackedMultiSelect/components/MultiValue/index.tsx +0 -21
|
@@ -23,6 +23,91 @@ var NeutralIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214
|
|
|
23
23
|
|
|
24
24
|
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";
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* A functional React component utilized to render the `Button` component
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
var Button = function Button(_ref) {
|
|
31
|
+
var onClick = _ref.onClick,
|
|
32
|
+
text = _ref.text,
|
|
33
|
+
_ref$type = _ref.type,
|
|
34
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
35
|
+
ariaLabel = _ref.ariaLabel,
|
|
36
|
+
_ref$variant = _ref.variant,
|
|
37
|
+
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
38
|
+
disabled = _ref.disabled,
|
|
39
|
+
className = _ref.className,
|
|
40
|
+
width = _ref.width;
|
|
41
|
+
return /*#__PURE__*/React__default.createElement(react.Button, {
|
|
42
|
+
onClick: onClick,
|
|
43
|
+
type: type,
|
|
44
|
+
variant: variant,
|
|
45
|
+
disabled: disabled,
|
|
46
|
+
"aria-label": ariaLabel,
|
|
47
|
+
className: className,
|
|
48
|
+
width: width === 'fixed' ? '100%' : 'fit-content'
|
|
49
|
+
}, text);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A functional React component utilized to render the `Banner` component
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
var Banner = function Banner(_ref) {
|
|
57
|
+
var variant = _ref.variant,
|
|
58
|
+
message = _ref.message,
|
|
59
|
+
buttonText = _ref.buttonText,
|
|
60
|
+
onClick = _ref.onClick;
|
|
61
|
+
var Icon = React.useMemo(function () {
|
|
62
|
+
switch (variant) {
|
|
63
|
+
case 'error':
|
|
64
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
65
|
+
src: ErrorIcon,
|
|
66
|
+
alt: "error",
|
|
67
|
+
boxSize: "16px"
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
case 'neutral':
|
|
71
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
72
|
+
src: NeutralIcon,
|
|
73
|
+
alt: "neutral",
|
|
74
|
+
boxSize: "16px"
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
case 'positive':
|
|
78
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
79
|
+
src: PositiveIcon,
|
|
80
|
+
alt: "positive",
|
|
81
|
+
boxSize: "16px"
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
case 'warning':
|
|
85
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
86
|
+
src: WarningIcon,
|
|
87
|
+
alt: "warning",
|
|
88
|
+
boxSize: "16px"
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
default:
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}, [variant]);
|
|
95
|
+
return /*#__PURE__*/React__default.createElement(react.Alert, {
|
|
96
|
+
variant: variant
|
|
97
|
+
}, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Box, {
|
|
98
|
+
pb: "8px"
|
|
99
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
100
|
+
pt: "8px",
|
|
101
|
+
justifyContent: "flex-end"
|
|
102
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
103
|
+
variant: "secondary",
|
|
104
|
+
onClick: onClick,
|
|
105
|
+
text: buttonText,
|
|
106
|
+
width: "variable",
|
|
107
|
+
ariaLabel: "banner button"
|
|
108
|
+
}))));
|
|
109
|
+
};
|
|
110
|
+
|
|
26
111
|
var blue = {
|
|
27
112
|
50: 'hsl(209, 100%, 95%)',
|
|
28
113
|
100: 'hsl(209, 100%, 90%)',
|
|
@@ -158,64 +243,6 @@ var colors = {
|
|
|
158
243
|
blue: blue
|
|
159
244
|
};
|
|
160
245
|
|
|
161
|
-
/**
|
|
162
|
-
* A functional React component utilized to render the `Banner` component
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
var Banner = function Banner(_ref) {
|
|
166
|
-
var variant = _ref.variant,
|
|
167
|
-
message = _ref.message,
|
|
168
|
-
buttonText = _ref.buttonText,
|
|
169
|
-
onClick = _ref.onClick;
|
|
170
|
-
var Icon = React.useMemo(function () {
|
|
171
|
-
switch (variant) {
|
|
172
|
-
case 'error':
|
|
173
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
174
|
-
src: ErrorIcon,
|
|
175
|
-
alt: "error",
|
|
176
|
-
boxSize: "16px"
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
case 'neutral':
|
|
180
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
181
|
-
src: NeutralIcon,
|
|
182
|
-
alt: "neutral",
|
|
183
|
-
boxSize: "16px"
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
case 'positive':
|
|
187
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
188
|
-
src: PositiveIcon,
|
|
189
|
-
alt: "positive",
|
|
190
|
-
boxSize: "16px"
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
case 'warning':
|
|
194
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
195
|
-
src: WarningIcon,
|
|
196
|
-
alt: "warning",
|
|
197
|
-
boxSize: "16px"
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
default:
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
}, [variant]);
|
|
204
|
-
return /*#__PURE__*/React__default.createElement(react.Alert, {
|
|
205
|
-
variant: variant
|
|
206
|
-
}, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Box, {
|
|
207
|
-
pb: "8px"
|
|
208
|
-
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
209
|
-
pt: "8px",
|
|
210
|
-
justifyContent: "flex-end"
|
|
211
|
-
}, /*#__PURE__*/React__default.createElement(react.Button, {
|
|
212
|
-
size: "sm",
|
|
213
|
-
bg: "white",
|
|
214
|
-
color: colors.fill.action,
|
|
215
|
-
onClick: onClick
|
|
216
|
-
}, buttonText))));
|
|
217
|
-
};
|
|
218
|
-
|
|
219
246
|
/**
|
|
220
247
|
* A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
|
|
221
248
|
*/
|
|
@@ -303,32 +330,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
303
330
|
}));
|
|
304
331
|
};
|
|
305
332
|
|
|
306
|
-
/**
|
|
307
|
-
* A functional React component utilized to render the `Button` component
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
|
-
var Button = function Button(_ref) {
|
|
311
|
-
var onClick = _ref.onClick,
|
|
312
|
-
text = _ref.text,
|
|
313
|
-
_ref$type = _ref.type,
|
|
314
|
-
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
315
|
-
ariaLabel = _ref.ariaLabel,
|
|
316
|
-
_ref$variant = _ref.variant,
|
|
317
|
-
variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
|
|
318
|
-
disabled = _ref.disabled,
|
|
319
|
-
className = _ref.className,
|
|
320
|
-
width = _ref.width;
|
|
321
|
-
return /*#__PURE__*/React__default.createElement(react.Button, {
|
|
322
|
-
onClick: onClick,
|
|
323
|
-
type: type,
|
|
324
|
-
variant: variant,
|
|
325
|
-
disabled: disabled,
|
|
326
|
-
"aria-label": ariaLabel,
|
|
327
|
-
className: className,
|
|
328
|
-
width: width === 'variable' ? '100%' : 'fit-content'
|
|
329
|
-
}, text);
|
|
330
|
-
};
|
|
331
|
-
|
|
332
333
|
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";
|
|
333
334
|
|
|
334
335
|
/**
|
|
@@ -409,18 +410,15 @@ function Form(_ref) {
|
|
|
409
410
|
* A functional React component utilized to render the `StackedCheckbox` component.
|
|
410
411
|
*/
|
|
411
412
|
|
|
412
|
-
var
|
|
413
|
-
var
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
value: option.value
|
|
422
|
-
}, option.label));
|
|
423
|
-
}));
|
|
413
|
+
var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
414
|
+
var value = _ref2.value,
|
|
415
|
+
label = _ref2.label,
|
|
416
|
+
defaultValue = _ref2.defaultValue;
|
|
417
|
+
return /*#__PURE__*/React__default.createElement(react.Checkbox, {
|
|
418
|
+
ref: _ref,
|
|
419
|
+
value: String(value),
|
|
420
|
+
defaultChecked: Boolean(defaultValue)
|
|
421
|
+
}, label);
|
|
424
422
|
});
|
|
425
423
|
|
|
426
424
|
function _extends() {
|
|
@@ -505,16 +503,21 @@ var SubtractIcon = "data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%221
|
|
|
505
503
|
|
|
506
504
|
var Dropdown = function Dropdown(_ref) {
|
|
507
505
|
var onSelectItem = _ref.onSelectItem,
|
|
508
|
-
options = _ref.options
|
|
506
|
+
options = _ref.options,
|
|
507
|
+
dropdownRef = _ref.dropdownRef,
|
|
508
|
+
position = _ref.position;
|
|
509
509
|
var DropdownContent = React.useMemo(function () {
|
|
510
510
|
return options.map(function (option, idx) {
|
|
511
511
|
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(react.Box, {
|
|
512
512
|
color: colors.label.secondary.light,
|
|
513
513
|
fontSize: "13px",
|
|
514
|
+
width: "fit-content",
|
|
514
515
|
fontWeight: "bold",
|
|
515
516
|
px: "8px",
|
|
516
|
-
bg: "inherit"
|
|
517
|
+
bg: "inherit",
|
|
518
|
+
whiteSpace: "nowrap"
|
|
517
519
|
}, idx > 0 && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
520
|
+
width: "100%",
|
|
518
521
|
my: "3px",
|
|
519
522
|
borderTop: "2px solid",
|
|
520
523
|
borderColor: colors.border["default"]
|
|
@@ -528,17 +531,23 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
528
531
|
fontSize: "13px",
|
|
529
532
|
px: "8px",
|
|
530
533
|
py: "4px",
|
|
534
|
+
width: "fit-content",
|
|
531
535
|
color: colors.label.primary.light,
|
|
532
536
|
_hover: {
|
|
533
537
|
color: colors.label.primary.dark,
|
|
534
538
|
bg: colors.fill.action,
|
|
535
|
-
borderRadius: '4px'
|
|
539
|
+
borderRadius: '4px',
|
|
540
|
+
width: '100%'
|
|
536
541
|
},
|
|
537
|
-
bg: "inherit"
|
|
542
|
+
bg: "inherit",
|
|
543
|
+
whiteSpace: "nowrap"
|
|
538
544
|
}, option.label));
|
|
539
545
|
});
|
|
540
546
|
}, [onSelectItem, options]);
|
|
541
|
-
return /*#__PURE__*/React__default.createElement(react.
|
|
547
|
+
return /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
548
|
+
flexDirection: "column",
|
|
549
|
+
ref: dropdownRef,
|
|
550
|
+
scrollMargin: "15px",
|
|
542
551
|
bg: colors.fill.light.quaternary,
|
|
543
552
|
backdropFilter: "auto",
|
|
544
553
|
backdropBlur: "64px",
|
|
@@ -546,13 +555,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
546
555
|
border: "0.25px solid",
|
|
547
556
|
borderColor: colors.fill.light.tertiary,
|
|
548
557
|
mt: "3px",
|
|
549
|
-
maxH: "
|
|
558
|
+
maxH: "240px",
|
|
550
559
|
overflowY: "auto",
|
|
551
560
|
px: "8px",
|
|
552
561
|
py: "4px",
|
|
553
562
|
position: "absolute",
|
|
554
|
-
|
|
555
|
-
|
|
563
|
+
top: position === 'top' ? 26 : undefined,
|
|
564
|
+
bottom: position === 'bottom' ? 30 : undefined,
|
|
565
|
+
width: "fit-content",
|
|
566
|
+
minWidth: "100%",
|
|
567
|
+
zIndex: 100,
|
|
568
|
+
tabIndex: -2000
|
|
556
569
|
}, DropdownContent);
|
|
557
570
|
};
|
|
558
571
|
|
|
@@ -580,6 +593,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
580
593
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
581
594
|
|
|
582
595
|
var dropdownRef = React.useRef(null);
|
|
596
|
+
var dropdownMenuRef = React.useRef(null);
|
|
583
597
|
|
|
584
598
|
var _useState = React.useState(false),
|
|
585
599
|
isFocussed = _useState[0],
|
|
@@ -591,6 +605,21 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
591
605
|
selectedOption = _useState2[0],
|
|
592
606
|
setSelectedOption = _useState2[1];
|
|
593
607
|
|
|
608
|
+
var _useState3 = React.useState('top'),
|
|
609
|
+
position = _useState3[0],
|
|
610
|
+
setPosition = _useState3[1];
|
|
611
|
+
|
|
612
|
+
React.useEffect(function () {
|
|
613
|
+
var _dropdownRef$current;
|
|
614
|
+
|
|
615
|
+
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
616
|
+
|
|
617
|
+
if (document.body.clientHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
618
|
+
setPosition('top');
|
|
619
|
+
} else {
|
|
620
|
+
setPosition('bottom');
|
|
621
|
+
}
|
|
622
|
+
}, [dropdownRef]);
|
|
594
623
|
useDidMountEffect(function () {
|
|
595
624
|
var _options$find$label2, _options$find2;
|
|
596
625
|
|
|
@@ -630,7 +659,25 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
630
659
|
fontSize: "13px",
|
|
631
660
|
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
632
661
|
value: selectedOption,
|
|
633
|
-
autoComplete: "off"
|
|
662
|
+
autoComplete: "off",
|
|
663
|
+
onKeyDown: function onKeyDown(e) {
|
|
664
|
+
if (isFocussed) {
|
|
665
|
+
var _dropdownMenuRef$curr;
|
|
666
|
+
|
|
667
|
+
if (e.key === 'Tab') {
|
|
668
|
+
return setIsFocussed(false);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
var idx = options.findIndex(function (option) {
|
|
672
|
+
return option.label[0].toLocaleLowerCase() === e.key;
|
|
673
|
+
});
|
|
674
|
+
console.log(idx);
|
|
675
|
+
(_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
676
|
+
top: idx * 27,
|
|
677
|
+
behavior: 'smooth'
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
}
|
|
634
681
|
})), /*#__PURE__*/React__default.createElement(react.InputRightElement, {
|
|
635
682
|
cursor: "pointer",
|
|
636
683
|
onClick: function onClick() {
|
|
@@ -641,6 +688,8 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
641
688
|
alt: "subtract",
|
|
642
689
|
boxSize: "16px"
|
|
643
690
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
691
|
+
position: position,
|
|
692
|
+
dropdownRef: dropdownMenuRef,
|
|
644
693
|
onSelectItem: function onSelectItem(option) {
|
|
645
694
|
return handleOnSelectItem(option);
|
|
646
695
|
},
|
|
@@ -657,7 +706,9 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
|
|
|
657
706
|
|
|
658
707
|
return /*#__PURE__*/React__default.createElement(react.Textarea, Object.assign({
|
|
659
708
|
ref: _ref
|
|
660
|
-
}, props
|
|
709
|
+
}, props, {
|
|
710
|
+
fontSize: "13px"
|
|
711
|
+
}));
|
|
661
712
|
});
|
|
662
713
|
|
|
663
714
|
var _path;
|
|
@@ -689,12 +740,13 @@ var Token = function Token(_ref) {
|
|
|
689
740
|
alignItems: "center",
|
|
690
741
|
width: "fit-content",
|
|
691
742
|
w: "auto",
|
|
692
|
-
h: "
|
|
693
|
-
pl: "
|
|
694
|
-
pr: "
|
|
743
|
+
h: "16px",
|
|
744
|
+
pl: "6px",
|
|
745
|
+
pr: "2px",
|
|
695
746
|
py: "2px",
|
|
696
747
|
position: "relative"
|
|
697
748
|
}, /*#__PURE__*/React__default.createElement(react.Text, {
|
|
749
|
+
whiteSpace: "nowrap",
|
|
698
750
|
color: colors.label.primary.light,
|
|
699
751
|
fontSize: "13px",
|
|
700
752
|
pr: "4px"
|
|
@@ -702,8 +754,8 @@ var Token = function Token(_ref) {
|
|
|
702
754
|
length: 15,
|
|
703
755
|
omission: '...'
|
|
704
756
|
})), /*#__PURE__*/React__default.createElement(Memo, {
|
|
705
|
-
width: "
|
|
706
|
-
height: "
|
|
757
|
+
width: "11px",
|
|
758
|
+
height: "11px",
|
|
707
759
|
onClick: onDelete,
|
|
708
760
|
cursor: "pointer"
|
|
709
761
|
}));
|
|
@@ -719,14 +771,15 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
719
771
|
control = _ref2.control,
|
|
720
772
|
name = _ref2.name,
|
|
721
773
|
placeholder = _ref2.placeholder,
|
|
722
|
-
disabled = _ref2.disabled
|
|
723
|
-
maxLength = _ref2.maxLength,
|
|
724
|
-
setError = _ref2.setError;
|
|
774
|
+
disabled = _ref2.disabled;
|
|
725
775
|
var watchedValue = reactHookForm.useWatch({
|
|
726
776
|
control: control,
|
|
727
777
|
name: name
|
|
728
778
|
});
|
|
729
779
|
var dropdownRef = React.useRef(null);
|
|
780
|
+
var dropdownMenuRef = React.useRef(null);
|
|
781
|
+
var scrollRef = React.useRef(null);
|
|
782
|
+
var inputRef = React.useRef(null);
|
|
730
783
|
|
|
731
784
|
var _useState = React.useState([]),
|
|
732
785
|
localValues = _useState[0],
|
|
@@ -740,15 +793,28 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
740
793
|
isFocussed = _useState3[0],
|
|
741
794
|
setIsFocussed = _useState3[1];
|
|
742
795
|
|
|
796
|
+
var _useState4 = React.useState(false),
|
|
797
|
+
shouldSideScroll = _useState4[0],
|
|
798
|
+
setShouldSideScroll = _useState4[1];
|
|
799
|
+
|
|
800
|
+
var _useState5 = React.useState('top'),
|
|
801
|
+
position = _useState5[0],
|
|
802
|
+
setPosition = _useState5[1];
|
|
803
|
+
|
|
804
|
+
React.useEffect(function () {
|
|
805
|
+
var _dropdownRef$current;
|
|
806
|
+
|
|
807
|
+
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
808
|
+
|
|
809
|
+
if (document.body.clientHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
810
|
+
setPosition('top');
|
|
811
|
+
} else {
|
|
812
|
+
setPosition('bottom');
|
|
813
|
+
}
|
|
814
|
+
}, [dropdownRef]);
|
|
743
815
|
react.useOutsideClick({
|
|
744
816
|
ref: dropdownRef,
|
|
745
817
|
handler: function handler() {
|
|
746
|
-
if (maxLength && localValues.length > maxLength) {
|
|
747
|
-
setError(name, {
|
|
748
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
|
|
752
818
|
return setIsFocussed(false);
|
|
753
819
|
}
|
|
754
820
|
}); // gets latest watched form value (common delimited) from RHF state and creates a list
|
|
@@ -758,24 +824,27 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
758
824
|
setLocalValues([]);
|
|
759
825
|
}
|
|
760
826
|
|
|
761
|
-
if (
|
|
827
|
+
if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
|
|
828
|
+
if (shouldSideScroll) {
|
|
829
|
+
var _scrollRef$current;
|
|
830
|
+
|
|
831
|
+
scrollRef.current.scrollTo({
|
|
832
|
+
left: (_scrollRef$current = scrollRef.current) == null ? void 0 : _scrollRef$current.scrollWidth,
|
|
833
|
+
behavior: 'smooth'
|
|
834
|
+
});
|
|
835
|
+
setShouldSideScroll(false);
|
|
836
|
+
}
|
|
837
|
+
|
|
762
838
|
setLocalValues(watchedValue.split(',').filter(Boolean).map(function (value) {
|
|
763
839
|
return options.find(function (option) {
|
|
764
840
|
return option.value === value;
|
|
765
841
|
});
|
|
766
842
|
}));
|
|
767
843
|
}
|
|
768
|
-
}, [
|
|
844
|
+
}, [options, shouldSideScroll, watchedValue]);
|
|
769
845
|
|
|
770
846
|
var handleChange = function handleChange(option) {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
if (maxLength && localValues.length > maxLength) {
|
|
774
|
-
return setError(name, {
|
|
775
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
|
|
847
|
+
setShouldSideScroll(true);
|
|
779
848
|
var newValue = [].concat(localValues, [option]).map(function (_ref3) {
|
|
780
849
|
var value = _ref3.value;
|
|
781
850
|
return value;
|
|
@@ -819,9 +888,27 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
819
888
|
|
|
820
889
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
821
890
|
ref: dropdownRef,
|
|
822
|
-
position: "relative"
|
|
891
|
+
position: "relative",
|
|
892
|
+
onKeyDown: function onKeyDown(e) {
|
|
893
|
+
if (isFocussed) {
|
|
894
|
+
var _dropdownMenuRef$curr;
|
|
895
|
+
|
|
896
|
+
if (e.key === 'Tab') {
|
|
897
|
+
return setIsFocussed(false);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
var idx = options.findIndex(function (option) {
|
|
901
|
+
return option.label[0].toLocaleLowerCase() === e.key;
|
|
902
|
+
});
|
|
903
|
+
(_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
904
|
+
top: idx * 27,
|
|
905
|
+
behavior: 'smooth'
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
}
|
|
823
909
|
}, /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
824
910
|
fontSize: "13px",
|
|
911
|
+
h: "26px",
|
|
825
912
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
826
913
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
827
914
|
py: "5px",
|
|
@@ -830,23 +917,42 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
830
917
|
alignItems: "center",
|
|
831
918
|
justifyContent: "space-between",
|
|
832
919
|
onClick: function onClick() {
|
|
833
|
-
|
|
920
|
+
if (!disabled) {
|
|
921
|
+
var _inputRef$current;
|
|
922
|
+
|
|
923
|
+
if (isFocussed) {
|
|
924
|
+
return setIsFocussed(false);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
(_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();
|
|
928
|
+
setIsFocussed(true);
|
|
929
|
+
}
|
|
834
930
|
},
|
|
835
931
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
836
932
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
837
933
|
}, /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
838
|
-
height: "28px",
|
|
839
934
|
alignItems: "center",
|
|
840
|
-
|
|
841
|
-
|
|
935
|
+
h: "inherit",
|
|
936
|
+
width: "90%",
|
|
937
|
+
overflowX: "scroll",
|
|
842
938
|
style: {
|
|
843
939
|
scrollbarWidth: 'none'
|
|
844
940
|
/* Firefox */
|
|
845
|
-
|
|
846
|
-
|
|
941
|
+
,
|
|
942
|
+
msOverflowStyle: 'none'
|
|
943
|
+
},
|
|
944
|
+
sx: {
|
|
945
|
+
'::-webkit-scrollbar': {
|
|
946
|
+
display: 'none'
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
ref: scrollRef
|
|
847
950
|
}, localValues.length ? localValues.map(function (option) {
|
|
848
951
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
849
|
-
mr: "4px"
|
|
952
|
+
mr: "4px",
|
|
953
|
+
width: "fit-content",
|
|
954
|
+
h: "16px",
|
|
955
|
+
borderRadius: "full"
|
|
850
956
|
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
851
957
|
label: option.label,
|
|
852
958
|
onDelete: function onDelete() {
|
|
@@ -856,8 +962,20 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
856
962
|
}) : /*#__PURE__*/React__default.createElement(react.Text, {
|
|
857
963
|
color: colors.label.secondary.light,
|
|
858
964
|
fontSize: "13px"
|
|
859
|
-
}, placeholder)), /*#__PURE__*/React__default.createElement(react.
|
|
860
|
-
|
|
965
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(react.Input, {
|
|
966
|
+
padding: 0,
|
|
967
|
+
border: "none",
|
|
968
|
+
height: "0",
|
|
969
|
+
width: "0",
|
|
970
|
+
autoComplete: "off",
|
|
971
|
+
type: "text",
|
|
972
|
+
ref: inputRef,
|
|
973
|
+
tabIndex: -1,
|
|
974
|
+
_focus: {
|
|
975
|
+
boxShadow: 'none !important'
|
|
976
|
+
}
|
|
977
|
+
}), /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
978
|
+
mr: "4px",
|
|
861
979
|
justifyContent: "center",
|
|
862
980
|
alignItems: "center"
|
|
863
981
|
}, /*#__PURE__*/React__default.createElement(react.Image, {
|
|
@@ -865,10 +983,12 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
865
983
|
alt: "subtract",
|
|
866
984
|
boxSize: "16px"
|
|
867
985
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
986
|
+
dropdownRef: dropdownMenuRef,
|
|
868
987
|
onSelectItem: function onSelectItem(option) {
|
|
869
988
|
return handleChange(option);
|
|
870
989
|
},
|
|
871
|
-
options: localOptions
|
|
990
|
+
options: localOptions,
|
|
991
|
+
position: position
|
|
872
992
|
}));
|
|
873
993
|
});
|
|
874
994
|
|
|
@@ -882,8 +1002,6 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
882
1002
|
control = _ref2.control,
|
|
883
1003
|
placeholder = _ref2.placeholder,
|
|
884
1004
|
disabled = _ref2.disabled,
|
|
885
|
-
maxLength = _ref2.maxLength,
|
|
886
|
-
setError = _ref2.setError,
|
|
887
1005
|
clearErrors = _ref2.clearErrors;
|
|
888
1006
|
var watchedValue = reactHookForm.useWatch({
|
|
889
1007
|
control: control,
|
|
@@ -896,6 +1014,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
896
1014
|
|
|
897
1015
|
var inputRef = React.useRef(null);
|
|
898
1016
|
var inputWrapperRef = React.useRef(null);
|
|
1017
|
+
var scrollRef = React.useRef(null);
|
|
899
1018
|
|
|
900
1019
|
var _useState2 = React.useState(null),
|
|
901
1020
|
tokenIndex = _useState2[0],
|
|
@@ -905,9 +1024,13 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
905
1024
|
isFocussed = _useState3[0],
|
|
906
1025
|
setIsFocussed = _useState3[1];
|
|
907
1026
|
|
|
908
|
-
var _useState4 = React.useState(
|
|
909
|
-
|
|
910
|
-
|
|
1027
|
+
var _useState4 = React.useState(false),
|
|
1028
|
+
shouldSideScroll = _useState4[0],
|
|
1029
|
+
setShouldSideScroll = _useState4[1];
|
|
1030
|
+
|
|
1031
|
+
var _useState5 = React.useState(''),
|
|
1032
|
+
localValue = _useState5[0],
|
|
1033
|
+
setLocalValue = _useState5[1]; // gets latest watched form value (common delimited) from RHF state and creates a list
|
|
911
1034
|
|
|
912
1035
|
|
|
913
1036
|
React.useEffect(function () {
|
|
@@ -916,19 +1039,24 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
916
1039
|
}
|
|
917
1040
|
|
|
918
1041
|
if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
|
|
1042
|
+
if (shouldSideScroll) {
|
|
1043
|
+
var _scrollRef$current;
|
|
1044
|
+
|
|
1045
|
+
scrollRef.current.scrollTo({
|
|
1046
|
+
left: (_scrollRef$current = scrollRef.current) == null ? void 0 : _scrollRef$current.scrollWidth,
|
|
1047
|
+
behavior: 'smooth'
|
|
1048
|
+
});
|
|
1049
|
+
setShouldSideScroll(false);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
919
1052
|
setLatestFormValueToArray(watchedValue.split(',').filter(Boolean));
|
|
920
1053
|
}
|
|
921
|
-
}, [watchedValue]);
|
|
1054
|
+
}, [watchedValue, shouldSideScroll]);
|
|
922
1055
|
|
|
923
1056
|
var onHandleKeyDown = function onHandleKeyDown(e) {
|
|
924
|
-
|
|
925
|
-
if (maxLength && lastestFormValueToArray.length >= maxLength) {
|
|
926
|
-
return setError(name, {
|
|
927
|
-
type: 'maxLength',
|
|
928
|
-
message: "Exceeded maximum of " + maxLength + " options"
|
|
929
|
-
});
|
|
930
|
-
}
|
|
1057
|
+
setShouldSideScroll(true);
|
|
931
1058
|
|
|
1059
|
+
if (e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') {
|
|
932
1060
|
if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
|
|
933
1061
|
setLocalValue(lastestFormValueToArray[tokenIndex]);
|
|
934
1062
|
|
|
@@ -945,10 +1073,11 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
945
1073
|
|
|
946
1074
|
var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
|
|
947
1075
|
setLocalValue('');
|
|
948
|
-
|
|
1076
|
+
setValue(name, filteredUniqueValues.toString().replace(/\s/g, ''), {
|
|
949
1077
|
shouldValidate: true,
|
|
950
1078
|
shouldDirty: true
|
|
951
1079
|
});
|
|
1080
|
+
return setIsFocussed(false);
|
|
952
1081
|
}
|
|
953
1082
|
|
|
954
1083
|
if (!localValue.trim().length && lastestFormValueToArray.length) {
|
|
@@ -1007,7 +1136,6 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1007
1136
|
clearErrors(name);
|
|
1008
1137
|
|
|
1009
1138
|
if (localValue.trim()) {
|
|
1010
|
-
if (maxLength && watchedValue.length + localValue.trim().length > maxLength) return setLocalValue('');
|
|
1011
1139
|
var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
|
|
1012
1140
|
setValue(name, filteredUniqueValues.toString().replace(/\s/g, ''), {
|
|
1013
1141
|
shouldValidate: true,
|
|
@@ -1043,22 +1171,30 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1043
1171
|
},
|
|
1044
1172
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
1045
1173
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
1046
|
-
ref: inputWrapperRef
|
|
1174
|
+
ref: inputWrapperRef,
|
|
1175
|
+
h: "26px"
|
|
1047
1176
|
}, /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
1048
|
-
|
|
1177
|
+
h: "18px",
|
|
1049
1178
|
alignItems: "center",
|
|
1050
|
-
width
|
|
1051
|
-
maxW
|
|
1052
|
-
overflowX: "
|
|
1179
|
+
// width="fit-content"
|
|
1180
|
+
// maxW="80%"
|
|
1181
|
+
overflowX: "scroll",
|
|
1053
1182
|
style: {
|
|
1054
1183
|
scrollbarWidth: 'none'
|
|
1055
1184
|
/* Firefox */
|
|
1056
|
-
|
|
1057
|
-
|
|
1185
|
+
,
|
|
1186
|
+
msOverflowStyle: 'none'
|
|
1187
|
+
},
|
|
1188
|
+
sx: {
|
|
1189
|
+
'::-webkit-scrollbar': {
|
|
1190
|
+
display: 'none'
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
ref: scrollRef
|
|
1058
1194
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
1059
1195
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
1060
1196
|
mr: "4px",
|
|
1061
|
-
border: tokenIndex === index ? "
|
|
1197
|
+
border: tokenIndex === index ? "1px solid " + colors.border.focus : 'none',
|
|
1062
1198
|
borderRadius: "full",
|
|
1063
1199
|
onClick: function onClick() {
|
|
1064
1200
|
return setTokenIndex(index);
|
|
@@ -1083,7 +1219,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1083
1219
|
padding: 0,
|
|
1084
1220
|
width: "100%",
|
|
1085
1221
|
border: "none",
|
|
1086
|
-
height: "
|
|
1222
|
+
height: "auto",
|
|
1087
1223
|
color: tokenIndex !== null ? 'transparent' : colors.label.primary,
|
|
1088
1224
|
_focus: {
|
|
1089
1225
|
boxShadow: 'none !important'
|
|
@@ -1095,6 +1231,9 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1095
1231
|
ref: inputRef,
|
|
1096
1232
|
onFocus: function onFocus() {
|
|
1097
1233
|
return setIsFocussed(true);
|
|
1234
|
+
},
|
|
1235
|
+
onBlur: function onBlur() {
|
|
1236
|
+
return setIsFocussed(false);
|
|
1098
1237
|
}
|
|
1099
1238
|
}))));
|
|
1100
1239
|
});
|
|
@@ -1107,8 +1246,14 @@ var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1107
1246
|
var isRequired = _ref2.isRequired,
|
|
1108
1247
|
_onChange = _ref2.onChange,
|
|
1109
1248
|
value = _ref2.value;
|
|
1249
|
+
if (value === null) return null;
|
|
1110
1250
|
return /*#__PURE__*/React__default.createElement(react.Switch, {
|
|
1111
|
-
|
|
1251
|
+
h: "26px",
|
|
1252
|
+
mx: "4px",
|
|
1253
|
+
_focus: {
|
|
1254
|
+
border: '2px solid',
|
|
1255
|
+
borderColor: colors.border.focus
|
|
1256
|
+
},
|
|
1112
1257
|
ref: _ref,
|
|
1113
1258
|
isRequired: isRequired,
|
|
1114
1259
|
value: String(value),
|
|
@@ -1225,17 +1370,18 @@ function Input(_ref) {
|
|
|
1225
1370
|
});
|
|
1226
1371
|
|
|
1227
1372
|
case 'checkbox':
|
|
1228
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1373
|
+
return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
|
|
1229
1374
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1230
1375
|
name: name,
|
|
1231
1376
|
id: name,
|
|
1232
1377
|
isInvalid: isInvalid,
|
|
1233
|
-
options: options,
|
|
1234
1378
|
onChange: onChange,
|
|
1235
1379
|
onBlur: onBlur,
|
|
1236
1380
|
ref: ref,
|
|
1237
1381
|
disabled: disabled,
|
|
1238
|
-
value: value
|
|
1382
|
+
value: value,
|
|
1383
|
+
defaultValue: defaultValue,
|
|
1384
|
+
label: label
|
|
1239
1385
|
});
|
|
1240
1386
|
|
|
1241
1387
|
case 'multi-select':
|
|
@@ -1254,8 +1400,7 @@ function Input(_ref) {
|
|
|
1254
1400
|
control: control,
|
|
1255
1401
|
setError: setError,
|
|
1256
1402
|
clearErrors: clearErrors,
|
|
1257
|
-
placeholder: placeholder
|
|
1258
|
-
maxLength: maxLength
|
|
1403
|
+
placeholder: placeholder
|
|
1259
1404
|
});
|
|
1260
1405
|
|
|
1261
1406
|
case 'pilled-text':
|
|
@@ -1286,7 +1431,8 @@ function Input(_ref) {
|
|
|
1286
1431
|
onChange: onChange,
|
|
1287
1432
|
onBlur: onBlur,
|
|
1288
1433
|
ref: ref,
|
|
1289
|
-
value: value
|
|
1434
|
+
value: value,
|
|
1435
|
+
defaultValue: defaultValue
|
|
1290
1436
|
});
|
|
1291
1437
|
|
|
1292
1438
|
default:
|
|
@@ -1609,10 +1755,10 @@ function Table(_ref) {
|
|
|
1609
1755
|
border: "none",
|
|
1610
1756
|
overflowX: "auto",
|
|
1611
1757
|
bg: "white",
|
|
1612
|
-
width: "
|
|
1758
|
+
width: "100%"
|
|
1613
1759
|
}, /*#__PURE__*/React__default.createElement(react.Table, {
|
|
1614
1760
|
variant: "unstyled",
|
|
1615
|
-
width: "
|
|
1761
|
+
width: "100%",
|
|
1616
1762
|
style: {
|
|
1617
1763
|
borderCollapse: 'separate',
|
|
1618
1764
|
borderSpacing: '0px'
|
|
@@ -1849,13 +1995,14 @@ var Badge = {
|
|
|
1849
1995
|
|
|
1850
1996
|
var baseStyle$2 = /*#__PURE__*/system.defineStyle({
|
|
1851
1997
|
borderRadius: '4px',
|
|
1852
|
-
fontSize: '
|
|
1998
|
+
fontSize: '13px',
|
|
1853
1999
|
bg: colors.fill.action,
|
|
1854
2000
|
color: colors.label.primary.dark,
|
|
2001
|
+
border: 'none',
|
|
1855
2002
|
px: '8px',
|
|
1856
2003
|
py: '4px',
|
|
1857
2004
|
bgGradient: 'linear-gradient(#FFFFFF29, #FFFFFF00)',
|
|
1858
|
-
shadow: '
|
|
2005
|
+
shadow: '0.5px 0.5px 1px 1px #0000001A',
|
|
1859
2006
|
_disabled: {
|
|
1860
2007
|
backgroundColor: 'gray.100',
|
|
1861
2008
|
borderColor: 'gray.100',
|
|
@@ -1871,20 +2018,19 @@ var baseStyle$2 = /*#__PURE__*/system.defineStyle({
|
|
|
1871
2018
|
bgGradient: colors.fill.light.quaternary
|
|
1872
2019
|
},
|
|
1873
2020
|
_focus: {
|
|
1874
|
-
|
|
1875
|
-
|
|
2021
|
+
outline: "2px solid " + colors.border.focus,
|
|
2022
|
+
outlineOffset: '0px'
|
|
1876
2023
|
}
|
|
1877
2024
|
});
|
|
1878
2025
|
|
|
1879
|
-
var
|
|
2026
|
+
var variantPrimary = function variantPrimary() {
|
|
1880
2027
|
return _extends({}, baseStyle$2);
|
|
1881
2028
|
};
|
|
1882
2029
|
|
|
1883
|
-
var
|
|
2030
|
+
var variantSecondary = function variantSecondary() {
|
|
1884
2031
|
return _extends({}, baseStyle$2, {
|
|
1885
2032
|
color: colors.fill.action,
|
|
1886
2033
|
bg: colors.label.primary.dark,
|
|
1887
|
-
border: 'none',
|
|
1888
2034
|
_hover: {
|
|
1889
2035
|
bg: colors.label.primary.dark
|
|
1890
2036
|
},
|
|
@@ -1900,11 +2046,11 @@ var variantOutline$1 = function variantOutline() {
|
|
|
1900
2046
|
};
|
|
1901
2047
|
|
|
1902
2048
|
var variants$2 = {
|
|
1903
|
-
|
|
1904
|
-
|
|
2049
|
+
primary: /*#__PURE__*/variantPrimary(),
|
|
2050
|
+
secondary: /*#__PURE__*/variantSecondary()
|
|
1905
2051
|
};
|
|
1906
2052
|
var defaultProps$2 = {
|
|
1907
|
-
|
|
2053
|
+
variant: 'primary'
|
|
1908
2054
|
};
|
|
1909
2055
|
var Button$1 = {
|
|
1910
2056
|
baseStyle: baseStyle$2,
|
|
@@ -2008,6 +2154,7 @@ var parts$3 = ['field'];
|
|
|
2008
2154
|
var baseStyle$7 = {
|
|
2009
2155
|
field: {
|
|
2010
2156
|
fontSize: '13px',
|
|
2157
|
+
h: '26px',
|
|
2011
2158
|
'::placeholder': {
|
|
2012
2159
|
color: colors.label.secondary.light
|
|
2013
2160
|
},
|
|
@@ -2489,7 +2636,8 @@ var baseStyle$c = {
|
|
|
2489
2636
|
},
|
|
2490
2637
|
th: {
|
|
2491
2638
|
bg: colors.label.primary.dark,
|
|
2492
|
-
padding: '5px 8px !important'
|
|
2639
|
+
padding: '5px 8px !important',
|
|
2640
|
+
fontSize: '13px'
|
|
2493
2641
|
},
|
|
2494
2642
|
tr: {
|
|
2495
2643
|
fontSize: '13px',
|
|
@@ -2758,9 +2906,11 @@ var Tabs = {
|
|
|
2758
2906
|
};
|
|
2759
2907
|
|
|
2760
2908
|
var baseStyle$e = /*#__PURE__*/_extends({}, Input$1.baseStyle.field, {
|
|
2909
|
+
fontSize: '13px',
|
|
2761
2910
|
display: 'block',
|
|
2762
2911
|
paddingY: '8px',
|
|
2763
|
-
|
|
2912
|
+
paddingX: '5px',
|
|
2913
|
+
height: '78px',
|
|
2764
2914
|
lineHeight: 'short'
|
|
2765
2915
|
});
|
|
2766
2916
|
|