@beweco/aurora-ui 0.6.9 → 0.6.11

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
@@ -2251,18 +2251,18 @@ var FlagIcon = function (_a) {
2251
2251
  };
2252
2252
 
2253
2253
  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, optionsProp = _a.options, _h = _a.translations, translations = _h === void 0 ? {} : _h;
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;
2255
2255
  var options = React.useMemo(function () {
2256
2256
  var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
2257
2257
  return o.length > 0 ? o : defaultCurrencyOptions;
2258
2258
  }, [optionsProp]);
2259
- var _j = React.useState(false), isDropdownOpen = _j[0], setIsDropdownOpen = _j[1];
2260
- var _k = React.useState(options[0]), selected = _k[0], setSelected = _k[1];
2261
- var _l = React.useState(""), inputValue = _l[0], setInputValue = _l[1];
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];
2262
2262
  var dropdownRef = React.useRef(null);
2263
2263
  var portalDropdownRef = React.useRef(null);
2264
- var _m = React.useState({}), dropdownPosition = _m[0], setDropdownPosition = _m[1];
2265
- var _o = React.useState(options), filteredOptions = _o[0], setFilteredOptions = _o[1];
2264
+ var _o = React.useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
2265
+ var _p = React.useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
2266
2266
  var t = __assign(__assign({}, defaultTranslations$b), translations);
2267
2267
  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
2268
  var finalLabel = label !== null && label !== void 0 ? label : t.label;
@@ -2307,7 +2307,7 @@ var Currency = function (_a) {
2307
2307
  position: "absolute",
2308
2308
  top: "".concat(rect.bottom + window.scrollY + 4, "px"),
2309
2309
  left: "".concat(rect.left + window.scrollX, "px"),
2310
- width: "15rem",
2310
+ width: showInput ? "15rem" : "".concat(rect.width, "px"),
2311
2311
  zIndex: 50,
2312
2312
  });
2313
2313
  }
@@ -2329,11 +2329,19 @@ var Currency = function (_a) {
2329
2329
  };
2330
2330
  }, [isDropdownOpen]);
2331
2331
  var emitChange = function (opt, amount) {
2332
- onChange === null || onChange === void 0 ? void 0 : onChange({
2333
- country: opt.country,
2334
- currency: opt.currency,
2335
- amount: amount,
2336
- });
2332
+ if (showInput) {
2333
+ onChange === null || onChange === void 0 ? void 0 : onChange({
2334
+ country: opt.country,
2335
+ currency: opt.currency,
2336
+ amount: amount,
2337
+ });
2338
+ }
2339
+ else {
2340
+ onChange === null || onChange === void 0 ? void 0 : onChange({
2341
+ country: opt.country,
2342
+ currency: opt.currency,
2343
+ });
2344
+ }
2337
2345
  };
2338
2346
  var handleOptionSelect = function (opt) {
2339
2347
  setSelected(opt);
@@ -2345,10 +2353,12 @@ var Currency = function (_a) {
2345
2353
  setInputValue(val);
2346
2354
  emitChange(selected, val);
2347
2355
  };
2348
- var selectorPillClass = "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors";
2356
+ var selectorPillClass = showInput
2357
+ ? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
2358
+ : "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
2349
2359
  var selectorLocked = currencySelectorLocked || disabled;
2350
- var selectorInner = (jsxRuntime.jsxs(jsxRuntime.Fragment, { 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(IconComponent, { icon: "solar:alt-arrow-down-outline", className: "w-4 h-4 text-default-400 transition-transform duration-200 data-[open=true]:rotate-180" }))] }));
2351
- 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 min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 ".concat(error ? "!border-danger-500 " : "border-default-200").concat(disabled ? " opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ml-2 shrink-0", 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 })) }), 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 &&
2360
+ 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 &&
2352
2362
  !currencySelectorLocked &&
2353
2363
  !disabled &&
2354
2364
  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) {
@@ -2503,6 +2513,7 @@ var defaultTranslations$9 = {
2503
2513
  storyLabel: "Story",
2504
2514
  tiktokLabel: "TikTok",
2505
2515
  whatsappLabel: "WhatsApp",
2516
+ emailLabel: "Email",
2506
2517
  };
2507
2518
  /**
2508
2519
  * SocialMediaBar - Independent bar component for social media badges and actions
@@ -2525,7 +2536,7 @@ var SocialMediaBar = function (_a) {
2525
2536
  var showActions = actionsAlwaysVisible || isHovered;
2526
2537
  return (jsxRuntime.jsxs("div", { className: "flex items-center justify-between ".concat(className), children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [customBadge || (jsxRuntime.jsxs("div", { className: "backdrop-blur-xl border border-white/30 rounded-full px-3 py-1.5 shadow-xl flex items-center gap-2", style: {
2527
2538
  background: "linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 255, 0.25) 100%)",
2528
- }, children: [platform === "instagram-post" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-pink-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.instagramLabel })] })), platform === "instagram-story" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-purple-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.storyLabel })] })), platform === "tiktok-video" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "ic:baseline-tiktok", className: "w-4 h-4 text-white" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.tiktokLabel })] })), (platform === "whatsapp" || platform === "whatsapp-message") && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:whatsapp", className: "w-4 h-4 text-green-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.whatsappLabel })] }))] })), showPreview && onPreview && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
2539
+ }, children: [platform === "instagram-post" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-pink-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.instagramLabel })] })), platform === "instagram-story" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-purple-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.storyLabel })] })), platform === "tiktok-video" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "ic:baseline-tiktok", className: "w-4 h-4 text-white" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.tiktokLabel })] })), (platform === "whatsapp" || platform === "whatsapp-message") && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:whatsapp", className: "w-4 h-4 text-green-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.whatsappLabel })] })), platform === "email" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "solar:letter-bold", className: "w-4 h-4 text-sky-200" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.emailLabel })] }))] })), showPreview && onPreview && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
2529
2540
  e.stopPropagation();
2530
2541
  onPreview();
2531
2542
  }, className: "backdrop-blur-xl border border-white/30 rounded-lg w-8 h-8 shadow-xl flex items-center justify-center hover:scale-110 transition-all duration-200", style: {
package/dist/index.esm.js CHANGED
@@ -2252,18 +2252,18 @@ var FlagIcon = function (_a) {
2252
2252
  };
2253
2253
 
2254
2254
  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, optionsProp = _a.options, _h = _a.translations, translations = _h === void 0 ? {} : _h;
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;
2256
2256
  var options = useMemo(function () {
2257
2257
  var o = optionsProp !== null && optionsProp !== void 0 ? optionsProp : defaultCurrencyOptions;
2258
2258
  return o.length > 0 ? o : defaultCurrencyOptions;
2259
2259
  }, [optionsProp]);
2260
- var _j = useState(false), isDropdownOpen = _j[0], setIsDropdownOpen = _j[1];
2261
- var _k = useState(options[0]), selected = _k[0], setSelected = _k[1];
2262
- var _l = useState(""), inputValue = _l[0], setInputValue = _l[1];
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];
2263
2263
  var dropdownRef = useRef(null);
2264
2264
  var portalDropdownRef = useRef(null);
2265
- var _m = useState({}), dropdownPosition = _m[0], setDropdownPosition = _m[1];
2266
- var _o = useState(options), filteredOptions = _o[0], setFilteredOptions = _o[1];
2265
+ var _o = useState({}), dropdownPosition = _o[0], setDropdownPosition = _o[1];
2266
+ var _p = useState(options), filteredOptions = _p[0], setFilteredOptions = _p[1];
2267
2267
  var t = __assign(__assign({}, defaultTranslations$b), translations);
2268
2268
  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
2269
  var finalLabel = label !== null && label !== void 0 ? label : t.label;
@@ -2308,7 +2308,7 @@ var Currency = function (_a) {
2308
2308
  position: "absolute",
2309
2309
  top: "".concat(rect.bottom + window.scrollY + 4, "px"),
2310
2310
  left: "".concat(rect.left + window.scrollX, "px"),
2311
- width: "15rem",
2311
+ width: showInput ? "15rem" : "".concat(rect.width, "px"),
2312
2312
  zIndex: 50,
2313
2313
  });
2314
2314
  }
@@ -2330,11 +2330,19 @@ var Currency = function (_a) {
2330
2330
  };
2331
2331
  }, [isDropdownOpen]);
2332
2332
  var emitChange = function (opt, amount) {
2333
- onChange === null || onChange === void 0 ? void 0 : onChange({
2334
- country: opt.country,
2335
- currency: opt.currency,
2336
- amount: amount,
2337
- });
2333
+ if (showInput) {
2334
+ onChange === null || onChange === void 0 ? void 0 : onChange({
2335
+ country: opt.country,
2336
+ currency: opt.currency,
2337
+ amount: amount,
2338
+ });
2339
+ }
2340
+ else {
2341
+ onChange === null || onChange === void 0 ? void 0 : onChange({
2342
+ country: opt.country,
2343
+ currency: opt.currency,
2344
+ });
2345
+ }
2338
2346
  };
2339
2347
  var handleOptionSelect = function (opt) {
2340
2348
  setSelected(opt);
@@ -2346,10 +2354,12 @@ var Currency = function (_a) {
2346
2354
  setInputValue(val);
2347
2355
  emitChange(selected, val);
2348
2356
  };
2349
- var selectorPillClass = "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors";
2357
+ var selectorPillClass = showInput
2358
+ ? "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 transition-colors"
2359
+ : "flex items-center px-4 h-10 rounded-xl bg-default-100 transition-colors w-full";
2350
2360
  var selectorLocked = currencySelectorLocked || disabled;
2351
- var selectorInner = (jsxs(Fragment, { children: [jsx(FlagIcon, { countryCode: selected.country, size: "md" }), jsx("span", { className: "text-xs text-default-500", children: selected.currency }), !currencySelectorLocked && !disabled && (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" }))] }));
2352
- 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 min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 ".concat(error ? "!border-danger-500 " : "border-default-200").concat(disabled ? " opacity-60" : ""), children: [jsx("div", { className: "relative ml-2 shrink-0", 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 })) }), 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 &&
2361
+ 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 &&
2353
2363
  !currencySelectorLocked &&
2354
2364
  !disabled &&
2355
2365
  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) {
@@ -2504,6 +2514,7 @@ var defaultTranslations$9 = {
2504
2514
  storyLabel: "Story",
2505
2515
  tiktokLabel: "TikTok",
2506
2516
  whatsappLabel: "WhatsApp",
2517
+ emailLabel: "Email",
2507
2518
  };
2508
2519
  /**
2509
2520
  * SocialMediaBar - Independent bar component for social media badges and actions
@@ -2526,7 +2537,7 @@ var SocialMediaBar = function (_a) {
2526
2537
  var showActions = actionsAlwaysVisible || isHovered;
2527
2538
  return (jsxs("div", { className: "flex items-center justify-between ".concat(className), children: [jsxs("div", { className: "flex items-center gap-2", children: [customBadge || (jsxs("div", { className: "backdrop-blur-xl border border-white/30 rounded-full px-3 py-1.5 shadow-xl flex items-center gap-2", style: {
2528
2539
  background: "linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 255, 0.25) 100%)",
2529
- }, children: [platform === "instagram-post" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-pink-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.instagramLabel })] })), platform === "instagram-story" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-purple-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.storyLabel })] })), platform === "tiktok-video" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "ic:baseline-tiktok", className: "w-4 h-4 text-white" }), jsx("span", { className: "text-xs font-medium text-white", children: t.tiktokLabel })] })), (platform === "whatsapp" || platform === "whatsapp-message") && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:whatsapp", className: "w-4 h-4 text-green-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.whatsappLabel })] }))] })), showPreview && onPreview && (jsx("button", { type: "button", onClick: function (e) {
2540
+ }, children: [platform === "instagram-post" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-pink-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.instagramLabel })] })), platform === "instagram-story" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-purple-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.storyLabel })] })), platform === "tiktok-video" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "ic:baseline-tiktok", className: "w-4 h-4 text-white" }), jsx("span", { className: "text-xs font-medium text-white", children: t.tiktokLabel })] })), (platform === "whatsapp" || platform === "whatsapp-message") && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "mdi:whatsapp", className: "w-4 h-4 text-green-400" }), jsx("span", { className: "text-xs font-medium text-white", children: t.whatsappLabel })] })), platform === "email" && (jsxs(Fragment, { children: [jsx(IconComponent, { icon: "solar:letter-bold", className: "w-4 h-4 text-sky-200" }), jsx("span", { className: "text-xs font-medium text-white", children: t.emailLabel })] }))] })), showPreview && onPreview && (jsx("button", { type: "button", onClick: function (e) {
2530
2541
  e.stopPropagation();
2531
2542
  onPreview();
2532
2543
  }, className: "backdrop-blur-xl border border-white/30 rounded-lg w-8 h-8 shadow-xl flex items-center justify-center hover:scale-110 transition-all duration-200", style: {
@@ -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,EAAkB,MAAM,kBAAkB,CAAC;AAK3E,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+QjD,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;AAK1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8RjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -43,6 +43,11 @@ export interface CurrencyInputProps {
43
43
  * El campo de importe sigue siendo editable salvo que `disabled` sea true.
44
44
  */
45
45
  currencySelectorLocked?: boolean;
46
+ /**
47
+ * Si es false, oculta el campo de importe y muestra solo el selector de moneda.
48
+ * @default true
49
+ */
50
+ showInput?: boolean;
46
51
  /** Lista de opciones; por defecto se usan países alineados con el componente Phone. */
47
52
  options?: CurrencyOption[];
48
53
  translations?: CurrencyTranslations;
@@ -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,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;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SocialMediaBar.d.ts","sourceRoot":"","sources":["../../../../src/components/social-media-bar/SocialMediaBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACX,mBAAmB,EAEnB,MAAM,wBAAwB,CAAC;AAchC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqKxD,CAAC"}
1
+ {"version":3,"file":"SocialMediaBar.d.ts","sourceRoot":"","sources":["../../../../src/components/social-media-bar/SocialMediaBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACX,mBAAmB,EAEnB,MAAM,wBAAwB,CAAC;AAehC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgLxD,CAAC"}
@@ -14,11 +14,12 @@ export interface SocialMediaBarTranslations {
14
14
  storyLabel?: string;
15
15
  tiktokLabel?: string;
16
16
  whatsappLabel?: string;
17
+ emailLabel?: string;
17
18
  }
18
19
  /**
19
20
  * Social media platform types
20
21
  */
21
- export type SocialMediaPlatform = "instagram-post" | "instagram-story" | "tiktok-video" | "whatsapp-message" | "whatsapp";
22
+ export type SocialMediaPlatform = "instagram-post" | "instagram-story" | "tiktok-video" | "whatsapp-message" | "whatsapp" | "email";
22
23
  /**
23
24
  * Props for the SocialMediaBar component
24
25
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SocialMediaBar.types.d.ts","sourceRoot":"","sources":["../../../../src/components/social-media-bar/SocialMediaBar.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,UAAU,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,iCAAiC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAC1C,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0DAA0D;IAC1D,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC"}
1
+ {"version":3,"file":"SocialMediaBar.types.d.ts","sourceRoot":"","sources":["../../../../src/components/social-media-bar/SocialMediaBar.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,UAAU,GACV,OAAO,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,iCAAiC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAC1C,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0DAA0D;IAC1D,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",