@beweco/aurora-ui 0.6.20 → 0.6.22

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.cjs.js CHANGED
@@ -2250,19 +2250,52 @@ var FlagIcon = function (_a) {
2250
2250
  }, children: jsxRuntime.jsx(FlagComponent, {}) }));
2251
2251
  };
2252
2252
 
2253
+ var sanitizeAmountInput = function (raw, maxFractionDigits) {
2254
+ if (maxFractionDigits <= 0) {
2255
+ var digitsOnly = raw.replace(/\D/g, "");
2256
+ return { display: digitsOnly, amountForParent: digitsOnly };
2257
+ }
2258
+ var normalized = raw.replace(/,/g, ".").replace(/[^\d.]/g, "");
2259
+ var firstDot = normalized.indexOf(".");
2260
+ if (firstDot !== -1) {
2261
+ normalized =
2262
+ normalized.slice(0, firstDot + 1) +
2263
+ normalized.slice(firstDot + 1).replace(/\./g, "");
2264
+ }
2265
+ var _a = normalized.split("."), intRaw = _a[0], _b = _a[1], fracRaw = _b === void 0 ? "" : _b;
2266
+ var intPart = intRaw.replace(/\D/g, "");
2267
+ var fracPart = fracRaw.replace(/\D/g, "").slice(0, maxFractionDigits);
2268
+ if (intPart === "" && fracPart.length > 0) {
2269
+ intPart = "0";
2270
+ }
2271
+ var hasDot = normalized.includes(".");
2272
+ var fracDigitsOnly = fracRaw.replace(/\D/g, "");
2273
+ var showTrailingDot = hasDot && fracDigitsOnly.length === 0 && fracPart.length === 0;
2274
+ var display = showTrailingDot
2275
+ ? "".concat(intPart, ".")
2276
+ : hasDot
2277
+ ? "".concat(intPart, ".").concat(fracPart)
2278
+ : intPart;
2279
+ var amountForParent = showTrailingDot
2280
+ ? intPart
2281
+ : hasDot
2282
+ ? "".concat(intPart, ".").concat(fracPart)
2283
+ : intPart;
2284
+ return { display: display, amountForParent: amountForParent };
2285
+ };
2253
2286
  var Currency = function (_a) {
2254
- var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j;
2287
+ var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j, _k = _a.maxFractionDigits, maxFractionDigits = _k === void 0 ? 0 : _k;
2255
2288
  var options = React.useMemo(function () {
2256
2289
  var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
2257
2290
  return o.length > 0 ? o : defaultCurrencyOptions;
2258
2291
  }, [optionsProp]);
2259
- var _k = React.useState(false), isDropdownOpen = _k[0], setIsDropdownOpen = _k[1];
2260
- var _l = React.useState(options[0]), selected = _l[0], setSelected = _l[1];
2261
- var _m = React.useState(""), inputValue = _m[0], setInputValue = _m[1];
2292
+ var _l = React.useState(false), isDropdownOpen = _l[0], setIsDropdownOpen = _l[1];
2293
+ var _m = React.useState(options[0]), selected = _m[0], setSelected = _m[1];
2294
+ var _o = React.useState(""), inputValue = _o[0], setInputValue = _o[1];
2262
2295
  var dropdownRef = React.useRef(null);
2263
2296
  var portalDropdownRef = React.useRef(null);
2264
- var _o = React.useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
2265
- var _p = React.useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
2297
+ var _p = React.useState({}), dropdownPosition = _p[0], setDropdownPosition = _p[1];
2298
+ var _q = React.useState(options), filteredOptions = _q[0], setFilteredOptions = _q[1];
2266
2299
  var t = __assign(__assign({}, defaultTranslations$b), translations);
2267
2300
  var getCountryName = function (opt) { var _a, _b; return (_b = (_a = t.countries) === null || _a === void 0 ? void 0 : _a[opt.country]) !== null && _b !== void 0 ? _b : opt.name; };
2268
2301
  var finalLabel = label !== null && label !== void 0 ? label : t.label;
@@ -2349,16 +2382,16 @@ var Currency = function (_a) {
2349
2382
  emitChange(opt, inputValue);
2350
2383
  };
2351
2384
  var handleInputChange = function (e) {
2352
- var val = e.target.value.replace(/\D/g, "");
2353
- setInputValue(val);
2354
- emitChange(selected, val);
2385
+ var _a = sanitizeAmountInput(e.target.value, maxFractionDigits), display = _a.display, amountForParent = _a.amountForParent;
2386
+ setInputValue(display);
2387
+ emitChange(selected, amountForParent);
2355
2388
  };
2356
2389
  var selectorPillClass = showInput
2357
2390
  ? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
2358
2391
  : "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
2359
2392
  var selectorLocked = currencySelectorLocked || disabled;
2360
2393
  var selectorInner = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [jsxRuntime.jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selected.currency })] }), !currencySelectorLocked && !disabled && (jsxRuntime.jsx("span", { className: !showInput ? 'ml-auto' : 'ml-1', children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }) }))] }));
2361
- return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsxRuntime.jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsxRuntime.jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsxRuntime.jsx(react.Input, { type: "text", inputMode: "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
2394
+ return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsxRuntime.jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsxRuntime.jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsxRuntime.jsx(react.Input, { type: "text", inputMode: maxFractionDigits > 0 ? "decimal" : "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
2362
2395
  !currencySelectorLocked &&
2363
2396
  !disabled &&
2364
2397
  reactDom.createPortal(jsxRuntime.jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", role: "listbox", children: [jsxRuntime.jsx("div", { className: "p-2", children: jsxRuntime.jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
package/dist/index.esm.js CHANGED
@@ -2251,19 +2251,52 @@ var FlagIcon = function (_a) {
2251
2251
  }, children: jsx(FlagComponent, {}) }));
2252
2252
  };
2253
2253
 
2254
+ var sanitizeAmountInput = function (raw, maxFractionDigits) {
2255
+ if (maxFractionDigits <= 0) {
2256
+ var digitsOnly = raw.replace(/\D/g, "");
2257
+ return { display: digitsOnly, amountForParent: digitsOnly };
2258
+ }
2259
+ var normalized = raw.replace(/,/g, ".").replace(/[^\d.]/g, "");
2260
+ var firstDot = normalized.indexOf(".");
2261
+ if (firstDot !== -1) {
2262
+ normalized =
2263
+ normalized.slice(0, firstDot + 1) +
2264
+ normalized.slice(firstDot + 1).replace(/\./g, "");
2265
+ }
2266
+ var _a = normalized.split("."), intRaw = _a[0], _b = _a[1], fracRaw = _b === void 0 ? "" : _b;
2267
+ var intPart = intRaw.replace(/\D/g, "");
2268
+ var fracPart = fracRaw.replace(/\D/g, "").slice(0, maxFractionDigits);
2269
+ if (intPart === "" && fracPart.length > 0) {
2270
+ intPart = "0";
2271
+ }
2272
+ var hasDot = normalized.includes(".");
2273
+ var fracDigitsOnly = fracRaw.replace(/\D/g, "");
2274
+ var showTrailingDot = hasDot && fracDigitsOnly.length === 0 && fracPart.length === 0;
2275
+ var display = showTrailingDot
2276
+ ? "".concat(intPart, ".")
2277
+ : hasDot
2278
+ ? "".concat(intPart, ".").concat(fracPart)
2279
+ : intPart;
2280
+ var amountForParent = showTrailingDot
2281
+ ? intPart
2282
+ : hasDot
2283
+ ? "".concat(intPart, ".").concat(fracPart)
2284
+ : intPart;
2285
+ return { display: display, amountForParent: amountForParent };
2286
+ };
2254
2287
  var Currency = function (_a) {
2255
- var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j;
2288
+ var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "currency" : _f, _g = _a.currencySelectorLocked, currencySelectorLocked = _g === void 0 ? false : _g, _h = _a.showInput, showInput = _h === void 0 ? true : _h, optionsProp = _a.options, _j = _a.translations, translations = _j === void 0 ? {} : _j, _k = _a.maxFractionDigits, maxFractionDigits = _k === void 0 ? 0 : _k;
2256
2289
  var options = useMemo(function () {
2257
2290
  var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
2258
2291
  return o.length > 0 ? o : defaultCurrencyOptions;
2259
2292
  }, [optionsProp]);
2260
- var _k = useState(false), isDropdownOpen = _k[0], setIsDropdownOpen = _k[1];
2261
- var _l = useState(options[0]), selected = _l[0], setSelected = _l[1];
2262
- var _m = useState(""), inputValue = _m[0], setInputValue = _m[1];
2293
+ var _l = useState(false), isDropdownOpen = _l[0], setIsDropdownOpen = _l[1];
2294
+ var _m = useState(options[0]), selected = _m[0], setSelected = _m[1];
2295
+ var _o = useState(""), inputValue = _o[0], setInputValue = _o[1];
2263
2296
  var dropdownRef = useRef(null);
2264
2297
  var portalDropdownRef = useRef(null);
2265
- var _o = useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
2266
- var _p = useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
2298
+ var _p = useState({}), dropdownPosition = _p[0], setDropdownPosition = _p[1];
2299
+ var _q = useState(options), filteredOptions = _q[0], setFilteredOptions = _q[1];
2267
2300
  var t = __assign(__assign({}, defaultTranslations$b), translations);
2268
2301
  var getCountryName = function (opt) { var _a, _b; return (_b = (_a = t.countries) === null || _a === void 0 ? void 0 : _a[opt.country]) !== null && _b !== void 0 ? _b : opt.name; };
2269
2302
  var finalLabel = label !== null && label !== void 0 ? label : t.label;
@@ -2350,16 +2383,16 @@ var Currency = function (_a) {
2350
2383
  emitChange(opt, inputValue);
2351
2384
  };
2352
2385
  var handleInputChange = function (e) {
2353
- var val = e.target.value.replace(/\D/g, "");
2354
- setInputValue(val);
2355
- emitChange(selected, val);
2386
+ var _a = sanitizeAmountInput(e.target.value, maxFractionDigits), display = _a.display, amountForParent = _a.amountForParent;
2387
+ setInputValue(display);
2388
+ emitChange(selected, amountForParent);
2356
2389
  };
2357
2390
  var selectorPillClass = showInput
2358
2391
  ? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
2359
2392
  : "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
2360
2393
  var selectorLocked = currencySelectorLocked || disabled;
2361
2394
  var selectorInner = (jsxs(Fragment, { children: [jsxs("span", { className: "flex items-center gap-1", children: [jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsx("span", { className: "text-xs text-default-500", children: selected.currency })] }), !currencySelectorLocked && !disabled && (jsx("span", { className: !showInput ? 'ml-auto' : 'ml-1', children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }) }))] }));
2362
- return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsx(Input$1, { type: "text", inputMode: "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
2395
+ return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "currency-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full ".concat(showInput ? 'min-h-[56px] shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500' : '', " transition-colors ").concat(showInput && error ? "!border-danger-500 " : "").concat(disabled ? " opacity-60" : ""), children: [jsx("div", { className: "relative ".concat(showInput ? 'ml-2 shrink-0' : 'w-full'), ref: dropdownRef, children: selectorLocked ? (jsx("div", { className: "".concat(selectorPillClass, " ").concat(disabled ? "" : "cursor-default"), "aria-label": "".concat(selected.currency, ", ").concat(getCountryName(selected)), children: selectorInner })) : (jsx("button", { type: "button", className: "".concat(selectorPillClass, " focus:outline-none"), onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-expanded": isDropdownOpen, "aria-haspopup": "listbox", "aria-label": t.selectCurrencyAriaLabel, children: selectorInner })) }), showInput && (jsx(Input$1, { type: "text", inputMode: maxFractionDigits > 0 ? "decimal" : "numeric", className: "flex-1 min-w-0 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "transaction-amount", id: "currency-input-".concat(name) }))] }), error && errorText && (jsx("span", { className: "text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
2363
2396
  !currencySelectorLocked &&
2364
2397
  !disabled &&
2365
2398
  createPortal(jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", role: "listbox", children: [jsx("div", { className: "p-2", children: jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAK1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8RjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAkD1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkSjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -51,5 +51,11 @@ export interface CurrencyInputProps {
51
51
  /** Lista de opciones; por defecto se usan países alineados con el componente Phone. */
52
52
  options?: CurrencyOption[];
53
53
  translations?: CurrencyTranslations;
54
+ /**
55
+ * Dígitos máximos tras el separador decimal en el importe.
56
+ * `0` (por defecto): solo enteros (comportamiento anterior).
57
+ * `2`: permite un separador `.` o `,` y hasta 2 decimales.
58
+ */
59
+ maxFractionDigits?: number;
54
60
  }
55
61
  //# sourceMappingURL=Currency.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.types.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
1
+ {"version":3,"file":"Currency.types.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.20",
3
+ "version": "0.6.22",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",