@jars-labs/jars-components 1.0.9 → 1.0.10

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.
@@ -85,8 +85,7 @@ var Icon = function (_a) {
85
85
  var parent_1 = svgRef.current.parentElement;
86
86
  var isParentContent = false;
87
87
  while (parent_1) {
88
- if (parent_1.classList.contains('mantine-Accordion-root') ||
89
- parent_1.classList.contains('mantine-Tabs-panel')) {
88
+ if (parent_1.classList.contains('mantine-Accordion-root')) {
90
89
  isParentContent = true;
91
90
  break;
92
91
  }
@@ -161,7 +160,7 @@ var Animation = function (_a) {
161
160
  var refVector = useRef(null);
162
161
  var _b = useState(null), lottie = _b[0], setLottie = _b[1];
163
162
  useEffect(function () {
164
- import('./lottie-uxb8tIPw.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
163
+ import('./lottie-CMIUDj7j.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
165
164
  }, []);
166
165
  useEffect(function () {
167
166
  if (lottie && refVector.current) {
@@ -338,7 +337,7 @@ var Info = function (props) {
338
337
  return (jsxs(Icon, __assign({}, props, { children: [jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M11.999 8C11.861 8 11.749 8.112 11.75 8.25C11.75 8.388 11.862 8.5 12 8.5C12.138 8.5 12.25 8.388 12.25 8.25C12.25 8.112 12.138 8 11.999 8" }), jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 21V21C7.029 21 3 16.971 3 12V12C3 7.029 7.029 3 12 3V3C16.971 3 21 7.029 21 12V12C21 16.971 16.971 21 12 21Z", clipRule: "evenodd" }), jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 12V17" })] })));
339
338
  };
340
339
 
341
- var styles$j = {"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"};
340
+ var styles$j = {"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","title0":"Text-module_title0__NvhiO","title0-mobile":"Text-module_title0-mobile__y1sTi","title1":"Text-module_title1__Oa54p","title1-500":"Text-module_title1-500__Md7EO","title1-500-mobile":"Text-module_title1-500-mobile__Y78Lk","l-medium":"Text-module_l-medium__U22ra","l-regular":"Text-module_l-regular__ihWaL","xxxl-medium":"Text-module_xxxl-medium__O3TD0","xxl-medium":"Text-module_xxl-medium__DWGly","xl-medium":"Text-module_xl-medium__cobLu","base-regular":"Text-module_base-regular__TwXtn","base-medium":"Text-module_base-medium__-4t3q","m-regular":"Text-module_m-regular__Lx6ru","m-medium":"Text-module_m-medium__upYpJ","s-light":"Text-module_s-light__oSwjg","xs-light":"Text-module_xs-light__rLaCR","xxs-normal":"Text-module_xxs-normal__TQEfr","xxs-light":"Text-module_xxs-light__4hw2o","xxs-bold":"Text-module_xxs-bold__LiO7o","title2":"Text-module_title2__vmM-P","title3":"Text-module_title3__r5irn","headline":"Text-module_headline__bgILl","headline-xxl":"Text-module_headline-xxl__uINnx","subheader":"Text-module_subheader__3CmmH","subheader-bold":"Text-module_subheader-bold__nUCe5","input":"Text-module_input__uD4E2"};
342
341
 
343
342
  var elementType = {
344
343
  h1: 'h1',
@@ -469,18 +468,20 @@ var Autocomplete = function (_a) {
469
468
  store.openDropdown();
470
469
  }
471
470
  if (event.currentTarget.value === '') {
471
+ store.resetSelectedOption();
472
472
  store.closeDropdown();
473
473
  }
474
474
  }, value: searchValue, holdSpace: false, leftSection: jsx(Search, {}), rightSection: jsx(ActionIcon, { radius: "sm", variant: "light", onClick: function () {
475
475
  onSearchChange('');
476
476
  onOptionSubmit === null || onOptionSubmit === undefined ? undefined : onOptionSubmit('');
477
+ store.resetSelectedOption();
477
478
  store.closeDropdown();
478
479
  }, style: { visibility: searchValue ? 'visible' : 'hidden' }, children: jsx(Close, {}) }), onKeyDown: function (event) {
479
480
  if (event.key === 'Enter' && options.length !== 1) {
480
481
  handleOptionSubmit(searchValue);
481
482
  store.toggleDropdown();
482
483
  }
483
- else if (event.key === 'Enter') {
484
+ else if (event.key === 'Enter' && !loading) {
484
485
  handleOptionSubmit(options[0]);
485
486
  store.toggleDropdown();
486
487
  }
@@ -525,7 +526,7 @@ var badgeVariantMap = {
525
526
  var sizeMap$1 = {
526
527
  small: {
527
528
  textVariant: 'xxs',
528
- padding: '4px 12px',
529
+ padding: '8px 12px',
529
530
  },
530
531
  medium: {
531
532
  textVariant: 'xs',
@@ -533,7 +534,7 @@ var sizeMap$1 = {
533
534
  },
534
535
  large: {
535
536
  textVariant: 's',
536
- padding: '10px 16px',
537
+ padding: '8px 16px',
537
538
  },
538
539
  };
539
540
  var Badge = forwardRef(function (_a, ref) {
@@ -542,7 +543,7 @@ var Badge = forwardRef(function (_a, ref) {
542
543
  var backgroundColor = (_b = badgeVariantMap[variant]) === null || _b === undefined ? undefined : _b.backgroundColor;
543
544
  var color = (_c = badgeVariantMap[variant]) === null || _c === undefined ? undefined : _c.color;
544
545
  var sizeStyles = sizeMap$1[size || 'small'];
545
- return (jsxs(Flex, { gap: 8, w: 'fit-content', bg: backgroundColor, p: sizeStyles.padding, style: __assign(__assign({}, style), { borderRadius: 999, alignItems: 'center' }), ref: ref, children: [icon, jsx(Text, { variant: sizeStyles.textVariant, weight: "regular", color: color, style: { lineHeight: 'normal' }, children: label })] }));
546
+ return (jsxs(Flex, { gap: 8, w: 'fit-content', bg: backgroundColor, p: sizeStyles.padding, style: __assign(__assign({}, style), { borderRadius: 999, alignItems: 'center' }), ref: ref, children: [icon, jsx(Text, { variant: sizeStyles.textVariant, color: color, children: label })] }));
546
547
  });
547
548
 
548
549
  var styles$i = {"button":"Button-module_button__7BLGt","label":"Button-module_label__447Ll","button-flex":"Button-module_button-flex__bzVRB","button--filled":"Button-module_button--filled__BKGu2","label-color--filled":"Button-module_label-color--filled__wJHlw","label-color--filled--disabled":"Button-module_label-color--filled--disabled__BbMbV","button--outlined":"Button-module_button--outlined__QZysw","label-color--outlined":"Button-module_label-color--outlined__seGi5","label-color--outlined--disabled":"Button-module_label-color--outlined--disabled__qXPjI","button--underlined":"Button-module_button--underlined__BsY5s","label-color--underlined":"Button-module_label-color--underlined__ymMfq","label-color--underlined--disabled":"Button-module_label-color--underlined--disabled__TBDd8","button--underlined-neutral":"Button-module_button--underlined-neutral__30A91","label-color--underlined-neutral":"Button-module_label-color--underlined-neutral__1xWMY","label-color--underlined-neutral--disabled":"Button-module_label-color--underlined-neutral--disabled__RQKW7","button--delete":"Button-module_button--delete__Xqpbl","label-color--delete":"Button-module_label-color--delete__iPB3X","label-color--delete--disabled":"Button-module_label-color--delete--disabled__lJkM6","button--small":"Button-module_button--small__3npYU","button--medium":"Button-module_button--medium__WRSIQ","button--large":"Button-module_button--large__bGVS1"};
@@ -881,7 +882,7 @@ var IncrementNumber = function (props) {
881
882
  return (jsxs("div", { className: styles$a['flex'], children: [props.disableDecrease ? (jsx("div", { style: { width: 24 } })) : (jsx("button", { className: styles$a['increment-button'], onClick: function () { return props.handleDecrease(props.value); }, children: jsx("img", { src: props.minusIconPath, width: 24, height: 24, alt: "-", style: {
882
883
  maxWidth: '100%',
883
884
  height: 'auto',
884
- } }) })), jsx(Text, { variant: "m", weight: "regular", style: { minWidth: 120 }, children: formatter.format(props.value) }), props.disableIncrease ? (jsx("div", { style: { width: 24 } })) : (jsx("button", { className: styles$a['increment-button'], onClick: function () { return props.handleIncrease(props.value); }, children: jsx("img", { src: props.plusIconPath, width: 24, height: 24, alt: "+", style: {
885
+ } }) })), jsx(Text, { variant: "m-regular", style: { minWidth: 120 }, children: formatter.format(props.value) }), props.disableIncrease ? (jsx("div", { style: { width: 24 } })) : (jsx("button", { className: styles$a['increment-button'], onClick: function () { return props.handleIncrease(props.value); }, children: jsx("img", { src: props.plusIconPath, width: 24, height: 24, alt: "+", style: {
885
886
  maxWidth: '100%',
886
887
  height: 'auto',
887
888
  } }) }))] }));
@@ -978,7 +979,8 @@ var Modal = function (_a) {
978
979
 
979
980
  var LinkModal = function (props) {
980
981
  var _a = t.useState(false), modalIsOpen = _a[0], setModalIsOpen = _a[1];
981
- return (jsxs(Fragment, { children: [jsx("a", { onClick: function () { return setModalIsOpen(!modalIsOpen); }, children: jsx(Text, { variant: "xs", weight: "regular", color: "var(--color-primary-300)", style: {
982
+ return (jsxs(Fragment, { children: [jsx("a", { onClick: function () { return setModalIsOpen(!modalIsOpen); }, children: jsx(Text, { variant: "xs-light", style: {
983
+ color: 'var(--color-primary-300)',
982
984
  textDecoration: 'underline',
983
985
  }, children: props.label }) }), jsx(Modal, { isOpen: modalIsOpen, onClose: function () { return setModalIsOpen(false); }, children: props.children })] }));
984
986
  };
@@ -1163,7 +1165,7 @@ var StatusBadge = function (props) {
1163
1165
  var _a, _b;
1164
1166
  var backgroundColor = ((_a = variantMap[props.variant]) === null || _a === undefined ? undefined : _a.backgroundColor) || 'var(--color-neutral-400)';
1165
1167
  var color = ((_b = variantMap[props.variant]) === null || _b === undefined ? undefined : _b.color) || 'var(--color-jet-black)';
1166
- return (jsxs("div", { style: __assign(__assign({}, props.style), { backgroundColor: backgroundColor, padding: "".concat(props.small ? 0 : 6, "px 14px"), borderRadius: 999, width: 'fit-content', display: 'flex', alignItems: 'center', gap: 8 }), children: [props.icon, jsx(Text, { variant: "s", weight: "regular", style: {
1168
+ return (jsxs("div", { style: __assign(__assign({}, props.style), { backgroundColor: backgroundColor, padding: "".concat(props.small ? 0 : 6, "px 14px"), borderRadius: 999, width: 'fit-content', display: 'flex', alignItems: 'center', gap: 8 }), children: [props.icon, jsx(Text, { variant: "input", style: {
1167
1169
  color: color,
1168
1170
  lineHeight: '16px',
1169
1171
  margin: '8px 0',
@@ -1413,7 +1415,7 @@ var Attachment = function (props) {
1413
1415
 
1414
1416
  var Bell = function (_a) {
1415
1417
  var _b = _a.width, width = _b === undefined ? '32px' : _b, _c = _a.height, height = _c === undefined ? '32px' : _c, _d = _a.viewBox, viewBox = _d === undefined ? '0 0 32 32' : _d, _e = _a.alert, alert = _e === undefined ? false : _e;
1416
- return (jsxs(Icon, { width: width, height: height, viewBox: viewBox, children: [jsx("path", { d: "M14.1429 27.8572H17.5714", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M22.7143 15C22.7143 13.1813 21.9919 11.4372 20.7059 10.1512C19.4199 8.86527 17.6758 8.14282 15.8572 8.14282C14.0385 8.14282 12.2944 8.86527 11.0084 10.1512C9.72247 11.4372 9.00002 13.1813 9.00002 15V21C9.00002 21.6819 8.72909 22.3361 8.24686 22.8183C7.76463 23.3005 7.11057 23.5714 6.42859 23.5714H25.2857C24.6038 23.5714 23.9496 23.3005 23.4674 22.8183C22.9852 22.3361 22.7143 21.6819 22.7143 21V15Z", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M4.71429 14.777C4.71522 13.1453 5.10435 11.5372 5.84956 10.0855C6.59476 8.63384 7.67464 7.38032 9.00001 6.42847", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M25.8648 10.0855C25.1196 8.63384 24.0396 7.38032 22.7143 6.42847", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), alert && (jsx("circle", { cx: "22.2857", cy: "9.14282", r: "5.5", fill: "var(--color-primary-300)", stroke: "white" }))] }));
1418
+ return (jsxs(Icon, { width: width, height: height, viewBox: viewBox, children: [jsx("path", { d: "M14.1429 27.8572H17.5714", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M22.7143 15C22.7143 13.1813 21.9919 11.4372 20.7059 10.1512C19.4199 8.86527 17.6758 8.14282 15.8572 8.14282C14.0385 8.14282 12.2944 8.86527 11.0084 10.1512C9.72247 11.4372 9.00002 13.1813 9.00002 15V21C9.00002 21.6819 8.72909 22.3361 8.24686 22.8183C7.76463 23.3005 7.11057 23.5714 6.42859 23.5714H25.2857C24.6038 23.5714 23.9496 23.3005 23.4674 22.8183C22.9852 22.3361 22.7143 21.6819 22.7143 21V15Z", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M4.71429 14.777C4.71522 13.1453 5.10435 11.5372 5.84956 10.0855C6.59476 8.63384 7.67464 7.38032 9.00001 6.42847", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M25.8648 10.0855C25.1196 8.63384 24.0396 7.38032 22.7143 6.42847", stroke: "black", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), alert && (jsx("circle", { cx: "22.2857", cy: "9.14282", r: "5.5", fill: "#7B34D6", stroke: "white" }))] }));
1417
1419
  };
1418
1420
 
1419
1421
  var Cat = function (props) {
@@ -1535,4 +1537,4 @@ var World = function (_a) {
1535
1537
  };
1536
1538
 
1537
1539
  export { Document as $, Accordion as A, Badge as B, Card as C, DateInput as D, EnterCodeInput as E, FileInput as F, Multiselect as G, Alert as H, IncrementNumber as I, Arrow as J, Attachment as K, Link as L, Message as M, NavBar as N, AvatarPlaceholder as O, PasswordInput as P, Bell as Q, RadioButton as R, SegmentedControl as S, Table as T, Calendar as U, Cat as V, Chevron as W, Clock as X, Close as Y, Cloud as Z, Delete as _, AccordionItem as a, Dog as a0, EyeHide as a1, EyeShow as a2, Fingerprint as a3, Google as a4, Grid as a5, HappyFace as a6, House as a7, HouseTime as a8, Identification as a9, Info as aa, Location as ab, Mail as ac, Menu as ad, MenuTouched as ae, Notification as af, Open as ag, Pets as ah, Phone as ai, Plaid as aj, Plus as ak, Remove as al, Search as am, ThreeDots as an, ThumbsDown as ao, Tick as ap, Umbrello as aq, Upload as ar, Visa as as, Warning as at, World as au, capitalizeFirstSentenceLetter as av, AccordionControl as b, AccordionPanel as c, ActionIcon as d, Animation as e, Autocomplete as f, getDefaultExportFromCjs as g, badgeVariantMap as h, Button as i, cardStatusVariantMap as j, CardStatus as k, Checkbox as l, Dropdown as m, FileUpload as n, Input as o, LinkModal as p, Loader as q, Modal as r, Pagination as s, Select as t, StatusBadge as u, Tabs as v, Text as w, Textarea as x, ToastContainer as y, Tooltip as z };
1538
- //# sourceMappingURL=index-Bsn_EcYJ.js.map
1540
+ //# sourceMappingURL=index-SJDXCSJk.js.map