@jars-labs/jars-components 1.0.80 → 1.0.81
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/{index-Di2CTm6m.js → index-UZcWaZ0v.js} +89 -57
- package/dist/index-UZcWaZ0v.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{lottie-CAeceDXT.js → lottie-y_cAn6IW.js} +2 -2
- package/dist/{lottie-CAeceDXT.js.map → lottie-y_cAn6IW.js.map} +1 -1
- package/dist/types/Avatar/Avatar.d.ts +2 -2
- package/dist/types/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/DateInput/DateInput.d.ts.map +1 -1
- package/dist/types/Icons/AvatarPlaceholder.d.ts.map +1 -1
- package/dist/types/Icons/Icon.d.ts.map +1 -1
- package/dist/types/Icons/IconTypes.d.ts +8 -8
- package/dist/types/Icons/IconTypes.d.ts.map +1 -1
- package/dist/types/Input/Input.d.ts.map +1 -1
- package/dist/types/Input/inputWrapperSlotProps.d.ts +12 -0
- package/dist/types/Input/inputWrapperSlotProps.d.ts.map +1 -0
- package/dist/types/Select/Select.d.ts.map +1 -1
- package/dist/types/Textarea/Textarea.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/index-Di2CTm6m.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Accordion as Accordion$1, AccordionItem as AccordionItem$1, AccordionControl as AccordionControl$1, AccordionPanel as AccordionPanel$1, ActionIcon as ActionIcon$1, Group, Combobox, useCombobox, Flex, TextInput, Loader as Loader$1, Checkbox as Checkbox$1, Menu as Menu$1, Divider, Modal as Modal$1, Tooltip as Tooltip$1, Box, Tabs as Tabs$1, Pagination as Pagination$1, Radio, SegmentedControl as SegmentedControl$1, Select as Select$1, Stepper as Stepper$1, StepperStep, Progress, Table as Table$1, Textarea as Textarea$1 } from '@mantine/core';
|
|
2
|
+
import { Accordion as Accordion$1, AccordionItem as AccordionItem$1, AccordionControl as AccordionControl$1, AccordionPanel as AccordionPanel$1, ActionIcon as ActionIcon$1, Group, Combobox, useCombobox, Flex, TextInput, Loader as Loader$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Menu as Menu$1, Divider, Modal as Modal$1, Tooltip as Tooltip$1, Box, Tabs as Tabs$1, Pagination as Pagination$1, Radio, SegmentedControl as SegmentedControl$1, Select as Select$1, Stepper as Stepper$1, StepperStep, Progress, Table as Table$1, Textarea as Textarea$1 } from '@mantine/core';
|
|
3
3
|
import React, { useRef, useState, useEffect, forwardRef, useMemo, useLayoutEffect } from 'react';
|
|
4
4
|
import { DateInput as DateInput$1 } from '@mantine/dates';
|
|
5
5
|
import { ToastContainer as ToastContainer$1 } from 'react-toastify';
|
|
@@ -59,14 +59,14 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
59
59
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
var styles$
|
|
62
|
+
var styles$q = {"accordion":"Accordion-module_accordion__Nl0Vb","item":"Accordion-module_item__85Qrt","item-neutral":"Accordion-module_item-neutral__c06SU","item-white":"Accordion-module_item-white__l-DtA","chevron":"Accordion-module_chevron__kqKKx","bottom-right":"Accordion-module_bottom-right__2C-t6","control":"Accordion-module_control__92uvC","content":"Accordion-module_content__LkKAo","label":"Accordion-module_label__VkyEF"};
|
|
63
63
|
|
|
64
64
|
var serverSideRenderSVG = function (_a, children) {
|
|
65
65
|
var width = _a.width, height = _a.height, viewBox = _a.viewBox, fill = _a.fill, rotate = _a.rotate;
|
|
66
66
|
return (jsx("svg", { width: width, height: height, viewBox: viewBox, fill: fill, preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", transform: "rotate(".concat(rotate, ")"), children: children }));
|
|
67
67
|
};
|
|
68
68
|
var Icon = function (_a) {
|
|
69
|
-
var _b = _a.width, width = _b === undefined ? '32px' : _b, _c = _a.height, height = _c === undefined ? '32px' : _c, viewBox = _a.viewBox, _d = _a.fill, fill = _d === undefined ? 'none' : _d, _e = _a.stroke, stroke = _e === undefined ? 'currentColor' : _e, _f = _a.rotate, rotate = _f === undefined ? 0 : _f, _g = _a.style, style = _g === undefined ? {} : _g, children = _a.children;
|
|
69
|
+
var _b = _a.width, width = _b === undefined ? '32px' : _b, _c = _a.height, height = _c === undefined ? '32px' : _c, viewBox = _a.viewBox, _d = _a.fill, fill = _d === undefined ? 'none' : _d, _e = _a.stroke, stroke = _e === undefined ? 'currentColor' : _e, _f = _a.rotate, rotate = _f === undefined ? 0 : _f, _g = _a.style, style = _g === undefined ? {} : _g, children = _a.children, rest = __rest(_a, ["width", "height", "viewBox", "fill", "stroke", "rotate", "style", "children"]);
|
|
70
70
|
if (typeof window === 'undefined') {
|
|
71
71
|
serverSideRenderSVG({
|
|
72
72
|
width: width,
|
|
@@ -108,7 +108,7 @@ var Icon = function (_a) {
|
|
|
108
108
|
};
|
|
109
109
|
centerSvgInViewBox();
|
|
110
110
|
}, [viewBox]);
|
|
111
|
-
return (jsx("svg", { ref: svgRef, width: width, height: height, viewBox: viewBox, fill: fill, stroke: stroke, preserveAspectRatio: "xMidYMid meet", style: __assign(__assign({}, style), { transform: "rotate(".concat(rotate, "deg)"), transformOrigin: 'center' }), children: jsx("g", { transform: transform || undefined, children: children }) }));
|
|
111
|
+
return (jsx("svg", __assign({ ref: svgRef, width: width, height: height, viewBox: viewBox, fill: fill, stroke: stroke, preserveAspectRatio: "xMidYMid meet", style: __assign(__assign({}, style), { transform: "rotate(".concat(rotate, "deg)"), transformOrigin: 'center' }) }, rest, { children: jsx("g", { transform: transform || undefined, children: children }) })));
|
|
112
112
|
};
|
|
113
113
|
Icon.displayName = 'Icon';
|
|
114
114
|
|
|
@@ -131,30 +131,30 @@ var Accordion = function (_a) {
|
|
|
131
131
|
return child;
|
|
132
132
|
});
|
|
133
133
|
return (jsx(Accordion$1, { variant: "unstyled", chevron: jsx(Chevron, { rotate: 270, width: "24px", height: "24px" }), chevronSize: 24, classNames: {
|
|
134
|
-
root: styles$
|
|
135
|
-
chevron: "".concat(styles$
|
|
134
|
+
root: styles$q.accordion,
|
|
135
|
+
chevron: "".concat(styles$q.chevron, " ").concat(styles$q[customChevronPosition]),
|
|
136
136
|
}, multiple: true, children: childrenWithColor }));
|
|
137
137
|
};
|
|
138
138
|
Accordion.displayName = 'Accordion';
|
|
139
139
|
var AccordionItem = function (_a) {
|
|
140
140
|
var children = _a.children, value = _a.value, _b = _a.bgColor, bgColor = _b === undefined ? 'neutral' : _b, props = __rest(_a, ["children", "value", "bgColor"]);
|
|
141
141
|
return (jsx(AccordionItem$1, __assign({ classNames: {
|
|
142
|
-
item: "".concat(styles$
|
|
142
|
+
item: "".concat(styles$q.item, " ").concat(bgColor === 'white' ? styles$q['item-white'] : styles$q['item-neutral']),
|
|
143
143
|
}, value: value }, props, { children: children })));
|
|
144
144
|
};
|
|
145
145
|
AccordionItem.displayName = 'AccordionItem';
|
|
146
146
|
var AccordionControl = function (_a) {
|
|
147
147
|
var children = _a.children;
|
|
148
|
-
return (jsx(AccordionControl$1, { classNames: { label: styles$
|
|
148
|
+
return (jsx(AccordionControl$1, { classNames: { label: styles$q.label, control: styles$q.control }, children: children }));
|
|
149
149
|
};
|
|
150
150
|
AccordionControl.displayName = 'AccordionControl';
|
|
151
151
|
var AccordionPanel = function (_a) {
|
|
152
152
|
var children = _a.children;
|
|
153
|
-
return (jsx(AccordionPanel$1, { classNames: { content: styles$
|
|
153
|
+
return (jsx(AccordionPanel$1, { classNames: { content: styles$q.content }, children: children }));
|
|
154
154
|
};
|
|
155
155
|
AccordionPanel.displayName = 'AccordionPanel';
|
|
156
156
|
|
|
157
|
-
var styles$
|
|
157
|
+
var styles$p = {"root":"ActionIcon-module_root__orJKP"};
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* ActionIcon component to display an icon with a clickable action.
|
|
@@ -173,7 +173,7 @@ var styles$o = {"root":"ActionIcon-module_root__orJKP"};
|
|
|
173
173
|
var ActionIcon = forwardRef(function (_a, ref) {
|
|
174
174
|
var onClick = _a.onClick, _b = _a.radius, radius = _b === undefined ? 'xl' : _b, _c = _a.color, color = _c === undefined ? 'var(--color-neutral-200)' : _c, _d = _a.variant, variant = _d === undefined ? 'filled' : _d, _e = _a.size, size = _e === undefined ? 'md' : _e, _f = _a.disabled, disabled = _f === undefined ? false : _f, children = _a.children, rest = __rest(_a, ["onClick", "radius", "color", "variant", "size", "disabled", "children"]);
|
|
175
175
|
return (jsx(ActionIcon$1, __assign({ onClick: onClick && onClick, radius: radius, variant: variant, size: size, disabled: disabled, classNames: {
|
|
176
|
-
root: styles$
|
|
176
|
+
root: styles$p.root,
|
|
177
177
|
}, color: color, ref: ref }, rest, { children: jsx(Group, { children: children }) })));
|
|
178
178
|
});
|
|
179
179
|
ActionIcon.displayName = 'ActionIcon';
|
|
@@ -183,7 +183,7 @@ var Animation = function (_a) {
|
|
|
183
183
|
var refVector = useRef(null);
|
|
184
184
|
var _b = useState(null), lottie = _b[0], setLottie = _b[1];
|
|
185
185
|
useEffect(function () {
|
|
186
|
-
import('./lottie-
|
|
186
|
+
import('./lottie-y_cAn6IW.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
|
|
187
187
|
}, []);
|
|
188
188
|
useEffect(function () {
|
|
189
189
|
if (lottie && refVector.current) {
|
|
@@ -201,7 +201,7 @@ var Animation = function (_a) {
|
|
|
201
201
|
};
|
|
202
202
|
Animation.displayName = 'Animation';
|
|
203
203
|
|
|
204
|
-
var styles$
|
|
204
|
+
var styles$o = {"dropdown":"Dropdown-module_dropdown__Pf3Aj","option":"Dropdown-module_option__5-7L7"};
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
*
|
|
@@ -241,7 +241,7 @@ var Dropdown = function (_a) {
|
|
|
241
241
|
store.selectOption(index);
|
|
242
242
|
onOptionSubmit === null || onOptionSubmit === undefined ? undefined : onOptionSubmit(option);
|
|
243
243
|
closeOnSelect && store.closeDropdown();
|
|
244
|
-
}, className: styles$
|
|
244
|
+
}, className: styles$o.option, children: option }, index));
|
|
245
245
|
}
|
|
246
246
|
return option;
|
|
247
247
|
});
|
|
@@ -249,7 +249,7 @@ var Dropdown = function (_a) {
|
|
|
249
249
|
return (jsxs(Combobox, __assign({ store: store, onOptionSubmit: function (value) {
|
|
250
250
|
onOptionSubmit === null || onOptionSubmit === undefined ? undefined : onOptionSubmit(value);
|
|
251
251
|
closeOnSelect && store.closeDropdown();
|
|
252
|
-
} }, rest, { children: [jsx(Combobox.Target, { children: jsx(Flex, { w: "100%", children: typeof children === 'function' ? children(store) : children }) }), jsxs(Combobox.Dropdown, { classNames: { dropdown: styles$
|
|
252
|
+
} }, rest, { children: [jsx(Combobox.Target, { children: jsx(Flex, { w: "100%", children: typeof children === 'function' ? children(store) : children }) }), jsxs(Combobox.Dropdown, { classNames: { dropdown: styles$o.dropdown }, children: [jsx(Combobox.Options, { mah: maxHeight, style: { overflow: maxHeight ? 'auto' : 'unset' }, children: renderOptions(options, onOptionSubmit) }), footer && (jsx(Combobox.Footer, { children: typeof footer === 'function' ? footer(store) : footer }))] })] })));
|
|
253
253
|
};
|
|
254
254
|
Dropdown.displayName = 'Dropdown';
|
|
255
255
|
Dropdown.Option = Combobox.Option;
|
|
@@ -358,7 +358,11 @@ function requireClassnames () {
|
|
|
358
358
|
var classnamesExports = requireClassnames();
|
|
359
359
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
360
360
|
|
|
361
|
-
var styles$
|
|
361
|
+
var styles$n = {"container":"Input-module_container__zzWGm","input":"Input-module_input__aRXjR","inputError":"Input-module_inputError__s3cRz","inputLeftIcon":"Input-module_inputLeftIcon__gObSe","inputRightIcon":"Input-module_inputRightIcon__hWB1a","label":"Input-module_label__HtZ2L","labelFocused":"Input-module_labelFocused__3-p5R","labelError":"Input-module_labelError__MA8Ti","labelDisabled":"Input-module_labelDisabled__lhjNw","description":"Input-module_description__Q1Rbw","error":"Input-module_error__yiAgw","errorVisible":"Input-module_errorVisible__IS7J2","errorHidden":"Input-module_errorHidden__8-hAw","errorText":"Input-module_errorText__wKZ67","leftSection":"Input-module_leftSection__YyGeo","rightSection":"Input-module_rightSection__zMH-z"};
|
|
362
|
+
|
|
363
|
+
var inputWrapperSlotElement = { component: 'div' };
|
|
364
|
+
var inputDescriptionProps = __assign({ className: styles$n.description }, inputWrapperSlotElement);
|
|
365
|
+
var inputErrorProps = __assign({ className: styles$n.error }, inputWrapperSlotElement);
|
|
362
366
|
|
|
363
367
|
var Info = function (_a) {
|
|
364
368
|
var width = _a.width, height = _a.height, viewBox = _a.viewBox, _b = _a.stroke, stroke = _b === undefined ? 'currentColor' : _b, _c = _a.strokeWidth, strokeWidth = _c === undefined ? 1.5 : _c;
|
|
@@ -366,7 +370,7 @@ var Info = function (_a) {
|
|
|
366
370
|
};
|
|
367
371
|
Info.displayName = 'Info';
|
|
368
372
|
|
|
369
|
-
var styles$
|
|
373
|
+
var styles$m = {"text":"Text-module_text__3xRq3","h1":"Text-module_h1__RkLfx","h2":"Text-module_h2__fAm7L","h3":"Text-module_h3__o11c2","h4":"Text-module_h4__RIwZg","m":"Text-module_m__nlfmp","s":"Text-module_s__t9q3d","xs":"Text-module_xs__ZU2jV","xxs":"Text-module_xxs__hmZHQ","bold":"Text-module_bold__N75tZ","medium":"Text-module_medium__Q8kf4","regular":"Text-module_regular__-EdPk"};
|
|
370
374
|
|
|
371
375
|
var elementType = {
|
|
372
376
|
h1: 'h1',
|
|
@@ -377,7 +381,7 @@ var elementType = {
|
|
|
377
381
|
var Text = React.forwardRef(function (props, ref) {
|
|
378
382
|
var as = props.as, children = props.children, className = props.className, color = props.color, style = props.style, variant = props.variant, weight = props.weight, rest = __rest(props, ["as", "children", "className", "color", "style", "variant", "weight"]);
|
|
379
383
|
var combinedStyle = __assign(__assign({}, style), { color: color });
|
|
380
|
-
var combinedClassName = classNames(className, styles$
|
|
384
|
+
var combinedClassName = classNames(className, styles$m['text'], styles$m[variant || ''], styles$m[weight || '']);
|
|
381
385
|
return React.createElement(as || elementType[variant] || 'p', __assign({ ref: ref, className: combinedClassName, style: combinedStyle }, rest), children);
|
|
382
386
|
});
|
|
383
387
|
Text.displayName = 'Text';
|
|
@@ -447,19 +451,19 @@ var Input = function (_a) {
|
|
|
447
451
|
var showLabel = !hideLabel && (isFocused || value.trim());
|
|
448
452
|
var placeHolderValue = placeholder && isFocused ? placeholder : (label !== null && label !== undefined ? label : placeholder);
|
|
449
453
|
var ErrorSection = useMemo(function () {
|
|
450
|
-
return holdSpace && (jsxs(Flex, { className: classNames(styles$
|
|
454
|
+
return holdSpace && (jsxs(Flex, { className: classNames(styles$n.error, error ? styles$n.errorVisible : styles$n.errorHidden), gap: 4, ml: 0, style: { alignItems: 'flex-start' }, children: [jsx(Flex, { style: { flexShrink: 0 }, children: jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }) }), jsx(Text, { variant: "xs", className: classNames(styles$n.errorText), as: "span", children: capitalizeFirstSentenceLetter(error) })] }));
|
|
451
455
|
}, [error]);
|
|
452
|
-
return (jsxs("div", { className: styles$
|
|
453
|
-
_b[styles$
|
|
454
|
-
_b[styles$
|
|
455
|
-
_b[styles$
|
|
456
|
+
return (jsxs("div", { className: styles$n.container, children: [showLabel && (jsx("label", { className: classNames(styles$n.label, (_b = {},
|
|
457
|
+
_b[styles$n.labelError] = error && !isFocused,
|
|
458
|
+
_b[styles$n.labelFocused] = isFocused || isHovered,
|
|
459
|
+
_b[styles$n.labelDisabled] = disabled,
|
|
456
460
|
_b)), children: label })), jsx("div", { onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onFocus: function () { return setIsFocused(true); }, onBlur: function () { return setIsFocused(false); }, children: jsx(TextInput, __assign({ classNames: {
|
|
457
|
-
input: classNames(styles$
|
|
458
|
-
_c[styles$
|
|
459
|
-
_c[styles$
|
|
460
|
-
_c[styles$
|
|
461
|
+
input: classNames(styles$n.input, (_c = {},
|
|
462
|
+
_c[styles$n.inputLeftIcon] = leftSection,
|
|
463
|
+
_c[styles$n.inputRightIcon] = rightSection,
|
|
464
|
+
_c[styles$n.inputError] = error,
|
|
461
465
|
_c)),
|
|
462
|
-
}, placeholder: placeHolderValue, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps:
|
|
466
|
+
}, placeholder: placeHolderValue, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps: inputDescriptionProps, errorProps: inputErrorProps, inputWrapperOrder: ['label', 'input', 'description', 'error'], value: value, onChange: onChange, leftSection: leftSection, rightSection: rightSection, leftSectionProps: { className: styles$n.leftSection }, rightSectionProps: { className: styles$n.rightSection }, type: type, disabled: disabled }, rest)) })] }));
|
|
463
467
|
};
|
|
464
468
|
Input.displayName = 'Input';
|
|
465
469
|
|
|
@@ -544,12 +548,40 @@ var Autocomplete = function (_a) {
|
|
|
544
548
|
};
|
|
545
549
|
Autocomplete.displayName = 'Autocomplete';
|
|
546
550
|
|
|
551
|
+
var styles$l = {"avatar":"Avatar-module_avatar__QJpdG","placeholder":"Avatar-module_placeholder__9AtPN"};
|
|
552
|
+
|
|
547
553
|
var AvatarPlaceholder = function (_a) {
|
|
548
|
-
var width = _a.width, height = _a.height,
|
|
549
|
-
return (jsxs(Icon, { width: width, height: height, viewBox: viewBox, rotate: rotate,
|
|
554
|
+
var width = _a.width, height = _a.height, _b = _a.viewBox, viewBox = _b === undefined ? '0 0 24 24' : _b, rotate = _a.rotate, rest = __rest(_a, ["width", "height", "viewBox", "rotate"]);
|
|
555
|
+
return (jsxs(Icon, __assign({ stroke: "none", width: width, height: height, viewBox: viewBox, rotate: rotate }, rest, { children: [jsx("ellipse", { cx: "11.755", cy: "5.818", fill: "var(--color-tertiary-200)", rx: "5.878", ry: "5.818" }), jsx("path", { fill: "var(--color-primary-300)", d: "M24 24H12 0c0-6.56 5.373-11.879 12-11.879s12 5.319 12 11.88z" })] })));
|
|
550
556
|
};
|
|
551
557
|
AvatarPlaceholder.displayName = 'AvatarPlaceholder';
|
|
552
558
|
|
|
559
|
+
var sizeMapping = {
|
|
560
|
+
small: '32px',
|
|
561
|
+
medium: '48px',
|
|
562
|
+
large: '112px',
|
|
563
|
+
extraLarge: '150px',
|
|
564
|
+
};
|
|
565
|
+
var placeholderSizeMapping = {
|
|
566
|
+
small: '14px',
|
|
567
|
+
medium: '22px',
|
|
568
|
+
large: '46px',
|
|
569
|
+
extraLarge: '60px',
|
|
570
|
+
};
|
|
571
|
+
var Avatar = function (_a) {
|
|
572
|
+
var src = _a.src, alt = _a.alt, _b = _a.size, size = _b === undefined ? 'medium' : _b, testId = _a.testId, rest = __rest(_a, ["src", "alt", "size", "testId"]);
|
|
573
|
+
return (jsx(Avatar$1, __assign({ src: src, alt: alt, "data-testid": testId, radius: "xl", variant: "outline", styles: {
|
|
574
|
+
root: {
|
|
575
|
+
minWidth: sizeMapping[size],
|
|
576
|
+
minHeight: sizeMapping[size],
|
|
577
|
+
},
|
|
578
|
+
}, classNames: {
|
|
579
|
+
root: styles$l.avatar,
|
|
580
|
+
placeholder: styles$l.placeholder,
|
|
581
|
+
} }, rest, { children: jsx(AvatarPlaceholder, { role: "img", "aria-label": alt, "data-testid": testId ? "".concat(testId, "-placeholder") : undefined, width: placeholderSizeMapping[size], height: placeholderSizeMapping[size] }) })));
|
|
582
|
+
};
|
|
583
|
+
Avatar.displayName = 'Avatar';
|
|
584
|
+
|
|
553
585
|
var badgeVariantMap = {
|
|
554
586
|
notes: {
|
|
555
587
|
backgroundColor: 'var(--color-neutral-100)',
|
|
@@ -834,10 +866,10 @@ var DateInput = function (_a) {
|
|
|
834
866
|
var showLabel = !hideLabel && (isFocused || value);
|
|
835
867
|
var placeHolderValue = placeholder && isFocused ? placeholder : (label !== null && label !== undefined ? label : placeholder);
|
|
836
868
|
var ErrorSection = useMemo(function () {
|
|
837
|
-
return holdSpace && (jsxs(Flex, { className: styles$
|
|
869
|
+
return holdSpace && (jsxs(Flex, { className: styles$n.error, gap: 4, ml: 16, style: {
|
|
838
870
|
visibility: error ? 'visible' : 'hidden',
|
|
839
871
|
alignItems: 'flex-start',
|
|
840
|
-
}, children: [jsx(Flex, { style: { flexShrink: 0 }, children: jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }) }), jsx(Text, { variant: "xs", className: classNames(styles$
|
|
872
|
+
}, children: [jsx(Flex, { style: { flexShrink: 0 }, children: jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }) }), jsx(Text, { variant: "xs", className: classNames(styles$n.errorText), children: capitalizeFirstSentenceLetter(error || '') })] }));
|
|
841
873
|
}, [error, holdSpace]);
|
|
842
874
|
var handleBlur = function (e) {
|
|
843
875
|
setIsFocused(false);
|
|
@@ -845,16 +877,16 @@ var DateInput = function (_a) {
|
|
|
845
877
|
onBlur(e);
|
|
846
878
|
}
|
|
847
879
|
};
|
|
848
|
-
return (jsxs("div", { className: styles$
|
|
849
|
-
_b[styles$
|
|
850
|
-
_b[styles$
|
|
851
|
-
_b[styles$
|
|
880
|
+
return (jsxs("div", { className: styles$n.container, children: [showLabel && (jsx("label", { className: classNames(styles$n.label, (_b = {},
|
|
881
|
+
_b[styles$n.labelError] = error && !isFocused,
|
|
882
|
+
_b[styles$n.labelFocused] = isFocused || isHovered,
|
|
883
|
+
_b[styles$n.labelDisabled] = disabled,
|
|
852
884
|
_b)), children: label })), jsx("div", { onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onFocus: function () { return setIsFocused(true); }, onBlur: function () { return setIsFocused(false); }, children: jsx(DateInput$1, __assign({ name: name, classNames: {
|
|
853
|
-
input: classNames(styles$
|
|
854
|
-
_c[styles$
|
|
855
|
-
_c[styles$
|
|
885
|
+
input: classNames(styles$n.input, (_c = {},
|
|
886
|
+
_c[styles$n.inputError] = error,
|
|
887
|
+
_c[styles$n.inputRightIcon] = true,
|
|
856
888
|
_c)),
|
|
857
|
-
}, valueFormat: "MM/DD/YYYY", dateParser: dateParser, rightSection: jsx(Calendar, { stroke: "var(--color-neutral-600)", width: "18px", height: "18px", viewBox: "0 0 24 24" }), rightSectionProps: { className: styles$
|
|
889
|
+
}, valueFormat: "MM/DD/YYYY", dateParser: dateParser, rightSection: jsx(Calendar, { stroke: "var(--color-neutral-600)", width: "18px", height: "18px", viewBox: "0 0 24 24" }), rightSectionProps: { className: styles$n.rightSection }, placeholder: placeHolderValue, value: value, onChange: onChange, onBlur: handleBlur, error: ErrorSection, errorProps: inputErrorProps, inputWrapperOrder: ['label', 'input', 'error'], disabled: disabled }, rest)) })] }));
|
|
858
890
|
};
|
|
859
891
|
DateInput.displayName = 'DateInput';
|
|
860
892
|
|
|
@@ -1338,17 +1370,17 @@ var MultiselectInternal = function (_a) {
|
|
|
1338
1370
|
}, onClick: function (e) { return e.stopPropagation(); } }))] }));
|
|
1339
1371
|
};
|
|
1340
1372
|
PillAndSearchSection.displayName = 'PillAndSearchSection';
|
|
1341
|
-
var ErrorSection = (jsxs(Flex, { className: styles$
|
|
1342
|
-
var DescriptionSection = (jsx(Flex, { className: styles$
|
|
1373
|
+
var ErrorSection = (jsxs(Flex, { className: styles$n.error, gap: 4, ml: 16, mt: 8, style: { visibility: error ? 'visible' : 'hidden' }, children: [jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }), jsx(Text, { variant: "xs", className: classNames(styles$n.errorText), children: error })] }));
|
|
1374
|
+
var DescriptionSection = (jsx(Flex, { className: styles$n.description, gap: 4, ml: 16, mt: 8, style: { visibility: description ? 'visible' : 'hidden' }, children: jsx(Text, { variant: "xs", children: description }) }));
|
|
1343
1375
|
var dropdownFooter = function (store) { return (jsxs(Flex, { justify: "flex-end", py: 8, gap: 8, children: [jsx(Button, { variant: "outlined", label: "Clear", size: "small", onClick: handleClear }), jsx(Button, { variant: "filled", label: "Apply", size: "small", onClick: function () { return handleApply(store.closeDropdown); } })] })); };
|
|
1344
1376
|
return (jsx(Dropdown, { options: dropdownOptions, maxHeight: 300, footer: dropdownFooter, children: function (store) {
|
|
1345
1377
|
var _a, _b;
|
|
1346
1378
|
var floatLabel = store.dropdownOpened || hasSelectedOptions;
|
|
1347
|
-
return (jsxs("div", { className: styles$
|
|
1348
|
-
_a[styles$
|
|
1349
|
-
_a[styles$
|
|
1350
|
-
_a)), children: label })), jsxs(Box, { className: classNames(styles$
|
|
1351
|
-
_b[styles$
|
|
1379
|
+
return (jsxs("div", { className: styles$n.container, children: [floatLabel && (jsx("label", { className: classNames(styles$n.label, (_a = {},
|
|
1380
|
+
_a[styles$n.labelError] = error && !isFocused,
|
|
1381
|
+
_a[styles$n.labelFocused] = isFocused || isHovered,
|
|
1382
|
+
_a)), children: label })), jsxs(Box, { className: classNames(styles$n.input, multiselectStyles.input, (_b = {},
|
|
1383
|
+
_b[styles$n.inputError] = error && !isFocused,
|
|
1352
1384
|
_b[multiselectStyles.inputFocused] = isFocused || store.dropdownOpened,
|
|
1353
1385
|
_b[multiselectStyles.disabled] = disabled,
|
|
1354
1386
|
_b)), onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onClick: function () { return store.toggleDropdown(); }, onFocus: function () { return setIsFocused(true); }, onBlur: handleBlur, tabIndex: 0, children: [jsx(PillAndSearchSection, { store: store, maxPills: maxPills }), jsx(Chevron, { rotate: store.dropdownOpened ? 90 : 270 })] }), error ? ErrorSection : DescriptionSection] }));
|
|
@@ -1585,7 +1617,7 @@ var Select = function (_a) {
|
|
|
1585
1617
|
label: styles$4['default-label'],
|
|
1586
1618
|
dropdown: styles$4.dropdown,
|
|
1587
1619
|
option: styles$4.option,
|
|
1588
|
-
}, data: data, placeholder: placeHolderValue, value: value, name: name || '', onChange: onChange, comboboxProps: { zIndex: 1000 }, error: ErrorSection, onFocus: function () { return setIsFocused(true); }, onBlur: handleBlur, inputWrapperOrder: ['label', 'input', 'description', 'error'], description: !error && description && jsx(Text, { variant: "xs", children: description }), descriptionProps: { className: styles$4.description }, errorProps: { className: styles$4.error }, rightSection: jsx(Chevron, { rotate: isOpen ? 90 : 270 }), rightSectionPointerEvents: "none", rightSectionProps: {
|
|
1620
|
+
}, data: data, placeholder: placeHolderValue, value: value, name: name || '', onChange: onChange, comboboxProps: { zIndex: 1000 }, error: ErrorSection, onFocus: function () { return setIsFocused(true); }, onBlur: handleBlur, inputWrapperOrder: ['label', 'input', 'description', 'error'], description: !error && description && jsx(Text, { variant: "xs", children: description }), descriptionProps: __assign({ className: styles$4.description }, inputWrapperSlotElement), errorProps: __assign({ className: styles$4.error }, inputWrapperSlotElement), rightSection: jsx(Chevron, { rotate: isOpen ? 90 : 270 }), rightSectionPointerEvents: "none", rightSectionProps: {
|
|
1589
1621
|
className: styles$4.chevron,
|
|
1590
1622
|
}, withCheckIcon: false, onDropdownOpen: function () { return setIsOpen(true); }, onDropdownClose: function () { return setIsOpen(false); }, disabled: disabled, searchable: searchable, allowDeselect: false, autoComplete: "new-password", renderOption: renderOption }) })] }));
|
|
1591
1623
|
};
|
|
@@ -1795,16 +1827,16 @@ var Textarea = function (_a) {
|
|
|
1795
1827
|
var _j = useState(false), isHovered = _j[0], setIsHovered = _j[1];
|
|
1796
1828
|
var showLabel = !hideLabel && (isFocused || value.trim());
|
|
1797
1829
|
var ErrorSection = useMemo(function () {
|
|
1798
|
-
return holdSpace && (jsxs(Flex, { className: styles$
|
|
1830
|
+
return holdSpace && (jsxs(Flex, { className: styles$n.error, gap: 4, ml: 0, style: { visibility: error ? 'visible' : 'hidden' }, children: [jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }), jsx(Text, { variant: "xs", className: classNames(styles$n.errorText), as: "span", children: capitalizeFirstSentenceLetter(error) })] }));
|
|
1799
1831
|
}, [error]);
|
|
1800
|
-
return (jsxs("div", { className: styles$
|
|
1801
|
-
_b[styles$
|
|
1802
|
-
_b[styles$
|
|
1832
|
+
return (jsxs("div", { className: styles$n.container, children: [showLabel && (jsx("label", { className: classNames(styles$n.label, (_b = {},
|
|
1833
|
+
_b[styles$n.labelError] = error && !isFocused,
|
|
1834
|
+
_b[styles$n.labelFocused] = isFocused || isHovered,
|
|
1803
1835
|
_b)), children: label })), jsx("div", { onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onFocus: function () { return setIsFocused(true); }, onBlur: function () { return setIsFocused(false); }, children: jsx(Textarea$1, __assign({ classNames: {
|
|
1804
|
-
input: classNames(styles$
|
|
1805
|
-
_c[styles$
|
|
1836
|
+
input: classNames(styles$n.input, (_c = {},
|
|
1837
|
+
_c[styles$n.inputError] = error,
|
|
1806
1838
|
_c)),
|
|
1807
|
-
}, placeholder: placeholder !== null && placeholder !== undefined ? placeholder : label, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps:
|
|
1839
|
+
}, placeholder: placeholder !== null && placeholder !== undefined ? placeholder : label, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps: inputDescriptionProps, errorProps: inputErrorProps, inputWrapperOrder: ['label', 'input', 'description', 'error'], value: value, onChange: onChange, autosize: rest.h ? false : rest.autosize, minRows: 2 }, rest, { styles: {
|
|
1808
1840
|
input: {
|
|
1809
1841
|
height: typeof rest.h === 'string' || typeof rest.h === 'number'
|
|
1810
1842
|
? rest.h
|
|
@@ -2050,5 +2082,5 @@ var World = function (_a) {
|
|
|
2050
2082
|
};
|
|
2051
2083
|
World.displayName = 'World';
|
|
2052
2084
|
|
|
2053
|
-
export {
|
|
2054
|
-
//# sourceMappingURL=index-
|
|
2085
|
+
export { AvatarPlaceholder as $, Accordion as A, Badge as B, Card as C, DateInput as D, EnterCodeInput as E, FileInput as F, Tabs as G, Text as H, IncrementNumber as I, Textarea as J, ToastContainer as K, Link as L, Message as M, NavBar as N, Tooltip as O, Pagination as P, AIGenerate as Q, RadioButton as R, SegmentedControl as S, Table as T, AIPrompt as U, AIRedo as V, AISearch as W, Alert as X, Archive as Y, Arrow as Z, Attachment as _, AccordionItem as a, Bell as a0, Calendar as a1, Camera as a2, Cat as a3, Chat as a4, Check as a5, Chevron as a6, ChevronCollapse as a7, Clock as a8, Close as a9, Plus as aA, Refresh as aB, Remove as aC, Search as aD, Shield as aE, StepIndicator as aF, ThreeDots as aG, ThumbsDown as aH, Tick as aI, Umbrello as aJ, Upload as aK, Visa as aL, Warning as aM, World as aN, capitalizeFirstSentenceLetter as aO, Cloud as aa, CloudUpload as ab, CreditCard as ac, Delete as ad, Document as ae, Dog as af, EyeHide as ag, EyeShow as ah, Fingerprint as ai, Google as aj, Grid as ak, Hamburger as al, HappyFace as am, House as an, HouseTime as ao, Identification as ap, Info as aq, Location as ar, Mail as as, Menu as at, MenuTouched as au, Notification as av, Open as aw, Pets as ax, Phone as ay, Plaid as az, AccordionControl as b, AccordionPanel as c, ActionIcon as d, Animation as e, Autocomplete as f, getDefaultExportFromCjs as g, Avatar as h, badgeVariantMap as i, Button as j, cardStatusVariantMap as k, CardStatus as l, Checkbox as m, Chip as n, Dropdown as o, FileUpload as p, Input as q, LinkModal as r, Loader as s, Modal as t, Multiselect as u, NavBarSide as v, PasswordInput as w, Select as x, StatusBadge as y, Stepper as z };
|
|
2086
|
+
//# sourceMappingURL=index-UZcWaZ0v.js.map
|