@jars-labs/jars-components 1.0.55-hotfix-1 → 1.0.55-hotfix-2

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.
@@ -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-lyoNo44r.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
186
+ import('./lottie-Chz8gp_I.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) {
@@ -483,6 +483,7 @@ var Autocomplete = function (_a) {
483
483
  var options = _a.options, _b = _a.placeholder, placeholder = _b === undefined ? 'Search' : _b, onOptionSubmit = _a.onOptionSubmit, _c = _a.disabled, disabled = _c === undefined ? false : _c, onClear = _a.onClear, onSearchChange = _a.onSearchChange, searchValue = _a.searchValue, _d = _a.loading, loading = _d === undefined ? false : _d, _e = _a.minCharactersToShowDropdown, minCharactersToShowDropdown = _e === undefined ? 2 : _e, style = _a.style, initialValue = _a.initialValue;
484
484
  var handleOptionSubmit = function (option) {
485
485
  onOptionSubmit === null || onOptionSubmit === undefined ? undefined : onOptionSubmit(option);
486
+ onSearchChange((option === null || option === undefined ? undefined : option.label) || '');
486
487
  };
487
488
  var boldedOptions = options.map(function (option) {
488
489
  var index = option.label.toLowerCase().indexOf(searchValue.toLowerCase());
@@ -521,12 +522,13 @@ var Autocomplete = function (_a) {
521
522
  setHasClearedInitial(true);
522
523
  setTouched(true);
523
524
  onSearchChange('');
524
- onClear === null || onClear === undefined ? undefined : onClear();
525
+ onClear === null || onClear === undefined ? undefined : onClear(); // ✅ acción explícita
525
526
  store.resetSelectedOption();
526
527
  store.closeDropdown();
527
528
  }, style: { visibility: inputValue ? 'visible' : 'hidden' }, children: jsx(Close, {}) }), onKeyDown: function (event) {
528
529
  if (event.key !== 'Enter')
529
530
  return;
531
+ // ENTER = free search, not a specific option
530
532
  onOptionSubmit(null);
531
533
  store.closeDropdown();
532
534
  }, style: style })); } }));
@@ -1332,7 +1334,6 @@ var Select = function (_a) {
1332
1334
  var _f = useState(false), isFocused = _f[0], setIsFocused = _f[1];
1333
1335
  var _g = useState(false), isHovered = _g[0], setIsHovered = _g[1];
1334
1336
  var _h = useState(false), isOpen = _h[0], setIsOpen = _h[1];
1335
- var allowedValues = useMemo(function () { return data.map(function (option) { return option.value; }); }, [data]);
1336
1337
  var showLabel = isFocused || value;
1337
1338
  var placeHolderValue = showLabel ? placeholder : label;
1338
1339
  var ErrorSection = useMemo(function () { return (jsxs(Flex, { className: styles$6.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$6.errorText), children: error })] })); }, [error]);
@@ -1341,8 +1342,8 @@ var Select = function (_a) {
1341
1342
  if (onBlur) {
1342
1343
  onBlur();
1343
1344
  }
1344
- if (value && !allowedValues.includes(value)) {
1345
- onChange === null || onChange === undefined ? undefined : onChange(null);
1345
+ if (!value && onChange) {
1346
+ onChange(null);
1346
1347
  }
1347
1348
  };
1348
1349
  return (jsxs("div", { className: styles$6.container, children: [showLabel && (jsx("label", { className: classNames(styles$6.label, (_b = {},
@@ -1357,7 +1358,7 @@ var Select = function (_a) {
1357
1358
  option: styles$6.option,
1358
1359
  }, 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$6.description }, errorProps: { className: styles$6.error }, rightSection: jsx(Chevron, { rotate: isOpen ? 90 : 270 }), rightSectionProps: {
1359
1360
  className: styles$6.chevron,
1360
- }, withCheckIcon: false, onDropdownOpen: function () { return setIsOpen(true); }, onDropdownClose: function () { return setIsOpen(false); }, disabled: disabled, searchable: searchable, allowDeselect: false, autoComplete: "new-password" }) })] }));
1361
+ }, withCheckIcon: false, onDropdownOpen: function () { return setIsOpen(true); }, onDropdownClose: function () { return setIsOpen(false); }, disabled: disabled, searchable: searchable }) })] }));
1361
1362
  };
1362
1363
  Select.displayName = 'Select';
1363
1364
 
@@ -1986,4 +1987,4 @@ var Refresh = function (props) {
1986
1987
  Refresh.displayName = 'Refresh';
1987
1988
 
1988
1989
  export { ChevronCollapse as $, Accordion as A, Badge as B, Card as C, DateInput as D, EnterCodeInput as E, FileInput as F, ToastContainer as G, Tooltip as H, IncrementNumber as I, Multiselect as J, NavBarSide as K, Link as L, Message as M, NavBar as N, Alert as O, PasswordInput as P, Arrow as Q, RadioButton as R, SegmentedControl as S, Table as T, Attachment as U, AvatarPlaceholder as V, Bell as W, Calendar as X, Cat as Y, Chat as Z, Chevron as _, AccordionItem as a, Clock as a0, Close as a1, Cloud as a2, Delete as a3, Document as a4, Dog as a5, EyeHide as a6, EyeShow as a7, Fingerprint as a8, Google as a9, Visa as aA, Warning as aB, World as aC, AISearch as aD, AIGenerate as aE, AIPrompt as aF, AIRedo as aG, Refresh as aH, capitalizeFirstSentenceLetter as aI, Grid as aa, Hamburger as ab, HappyFace as ac, House as ad, HouseTime as ae, Identification as af, Info as ag, Location as ah, Mail as ai, Menu as aj, MenuTouched as ak, Notification as al, Open as am, Pets as an, Phone as ao, Plaid as ap, Plus as aq, Remove as ar, Search as as, Shield as at, StepIndicator as au, ThreeDots as av, ThumbsDown as aw, Tick as ax, Umbrello as ay, Upload as az, 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, Chip as m, Dropdown as n, FileUpload as o, Input as p, LinkModal as q, Loader as r, Modal as s, Pagination as t, Select as u, StatusBadge as v, Stepper as w, Tabs as x, Text as y, Textarea as z };
1989
- //# sourceMappingURL=index-d_mR-3VI.js.map
1990
+ //# sourceMappingURL=index-pzUo6ujg.js.map