@wello-dev/core 1.0.6 → 1.0.8

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.
Files changed (36) hide show
  1. package/dist/{chunk-QCMTAQSP.js → chunk-BVUV3Y3X.js} +12 -5
  2. package/dist/chunk-BVUV3Y3X.js.map +1 -0
  3. package/dist/{chunk-XBLREJCR.js → chunk-EYNM2DF5.js} +11 -6
  4. package/dist/chunk-EYNM2DF5.js.map +1 -0
  5. package/dist/{chunk-BZPG4NZ6.js → chunk-HIYHBWWU.js} +2 -2
  6. package/dist/{chunk-2WHZJI3S.js → chunk-JHBUYAOW.js} +2 -2
  7. package/dist/{chunk-FSR3OEUP.js → chunk-MWWNTAPV.js} +4 -4
  8. package/dist/{chunk-RVFCTNPD.js → chunk-N54W2U6W.js} +2 -2
  9. package/dist/{chunk-YRKCM3OL.js → chunk-OHP4OBN2.js} +7 -6
  10. package/dist/{chunk-YRKCM3OL.js.map → chunk-OHP4OBN2.js.map} +1 -1
  11. package/dist/{chunk-A76QHCP5.js → chunk-RW2ATREO.js} +2 -2
  12. package/dist/{chunk-DRSBB5T4.js → chunk-XPSIP4MN.js} +2 -2
  13. package/dist/{chunk-NH26XE7T.js → chunk-ZJHKJGKJ.js} +2 -2
  14. package/dist/components/ColorPicker/ColorInput.js +3 -3
  15. package/dist/components/Combobox/Combobox.js +3 -3
  16. package/dist/components/Combobox/Select.js +4 -4
  17. package/dist/components/Combobox/TagsInput.js +4 -4
  18. package/dist/components/Menu/Menu.js +3 -3
  19. package/dist/components/PhoneInput/PhoneInput.js +5 -5
  20. package/dist/components/Popover/Popover.js +2 -2
  21. package/dist/components/Tooltip/Tooltip.js +2 -2
  22. package/dist/index.cjs +25 -12
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +100 -100
  25. package/dist/shadcn/Floating.js +5 -5
  26. package/dist/styles.css +47 -6
  27. package/package.json +1 -1
  28. package/dist/chunk-QCMTAQSP.js.map +0 -1
  29. package/dist/chunk-XBLREJCR.js.map +0 -1
  30. /package/dist/{chunk-BZPG4NZ6.js.map → chunk-HIYHBWWU.js.map} +0 -0
  31. /package/dist/{chunk-2WHZJI3S.js.map → chunk-JHBUYAOW.js.map} +0 -0
  32. /package/dist/{chunk-FSR3OEUP.js.map → chunk-MWWNTAPV.js.map} +0 -0
  33. /package/dist/{chunk-RVFCTNPD.js.map → chunk-N54W2U6W.js.map} +0 -0
  34. /package/dist/{chunk-A76QHCP5.js.map → chunk-RW2ATREO.js.map} +0 -0
  35. /package/dist/{chunk-DRSBB5T4.js.map → chunk-XPSIP4MN.js.map} +0 -0
  36. /package/dist/{chunk-NH26XE7T.js.map → chunk-ZJHKJGKJ.js.map} +0 -0
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  Tooltip,
4
4
  TooltipFloating
5
- } from "../../chunk-2WHZJI3S.js";
6
- import "../../chunk-QCMTAQSP.js";
5
+ } from "../../chunk-JHBUYAOW.js";
6
+ import "../../chunk-BVUV3Y3X.js";
7
7
  import "../../chunk-2TFJ4SMR.js";
8
8
  import "../../chunk-H4D7LXZL.js";
9
9
  import "../../chunk-CTBTEAD6.js";
package/dist/index.cjs CHANGED
@@ -5667,8 +5667,12 @@ function useFloating(options) {
5667
5667
  }
5668
5668
  }
5669
5669
  if (shift) {
5670
- if (side === "top" || side === "bottom") x = Math.min(Math.max(x, padding), Math.max(padding, vw - width - padding));
5671
- else y = Math.min(Math.max(y, padding), Math.max(padding, vh - height - padding));
5670
+ const clampX = (v) => Math.min(Math.max(v, padding), Math.max(padding, vw - width - padding));
5671
+ const clampY = (v) => Math.min(Math.max(v, padding), Math.max(padding, vh - height - padding));
5672
+ if (side === "top" || side === "bottom") x = clampX(x);
5673
+ else y = clampY(y);
5674
+ if (side === "top" || side === "bottom") y = clampY(y);
5675
+ else x = clampX(x);
5672
5676
  }
5673
5677
  if (width > 0) lockedSide.current = side;
5674
5678
  let referenceHidden = rect.bottom <= 0 || rect.top >= vh || rect.right <= 0 || rect.left >= vw;
@@ -5706,11 +5710,14 @@ function useFloating(options) {
5706
5710
  }, [opened, update2]);
5707
5711
  (0, import_react32.useEffect)(() => {
5708
5712
  if (!opened) return;
5709
- let frame = requestAnimationFrame(update2);
5713
+ let frame = 0;
5710
5714
  const onChange = () => {
5711
5715
  cancelAnimationFrame(frame);
5712
- frame = requestAnimationFrame(update2);
5716
+ frame = requestAnimationFrame(() => {
5717
+ frame = requestAnimationFrame(update2);
5718
+ });
5713
5719
  };
5720
+ onChange();
5714
5721
  window.addEventListener("scroll", onChange, true);
5715
5722
  window.addEventListener("resize", onChange);
5716
5723
  const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(onChange) : null;
@@ -5905,13 +5912,14 @@ var PopoverDropdown = factory(({ children, className, style, ...others }, ref) =
5905
5912
  style: {
5906
5913
  ...transitionStyles2,
5907
5914
  ...dropdown.style,
5915
+ // transform (not top/left) — survives filter/mask containing blocks on ancestors
5916
+ // when a portal is briefly missing, and avoids inset shorthand fights.
5908
5917
  position: "fixed",
5909
- // Clear any inherited inset from host CSS so left/top win.
5910
- inset: "auto",
5911
- top: floating.y,
5912
- left: floating.x,
5918
+ top: 0,
5919
+ left: 0,
5913
5920
  right: "auto",
5914
5921
  bottom: "auto",
5922
+ transform: floating.ready ? `translate3d(${Math.round(floating.x)}px, ${Math.round(floating.y)}px, 0)` : "translate3d(-9999px, -9999px, 0)",
5915
5923
  width,
5916
5924
  zIndex: props.zIndex,
5917
5925
  // Invisible until measured, so it doesn't flash at 0,0.
@@ -9547,7 +9555,7 @@ var DEFAULT_PHONE_CODE = "20";
9547
9555
 
9548
9556
  // src/components/PhoneInput/PhoneInput.tsx
9549
9557
  var import_jsx_runtime68 = (
9550
- // Always LTR: flag then dial code (RTL pages were flipping to "966 | flag").
9558
+ // Match classic PhoneInput: dial code then flag (trigger + list). Isolated LTR so RTL pages don't reorder.
9551
9559
  require("react/jsx-runtime")
9552
9560
  );
9553
9561
  var DEFAULT_COUNTRIES = ALL_PHONE_COUNTRIES;
@@ -9683,8 +9691,8 @@ var PhoneInput = factory((_props, ref) => {
9683
9691
  if (fitted !== latest.current.phone) latest.current.setPhone(fitted);
9684
9692
  }, [countryCode]);
9685
9693
  const showCountry = (item) => renderCountry ? renderCountry(item) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { ...getStyles("codeValue"), dir: "ltr", children: [
9686
- typeof item.flag === "string" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { ...getStyles("flag"), src: item.flag, alt: item.name ?? "", onError: (event) => event.currentTarget.style.display = "none" }) : item.flag,
9687
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { ...getStyles("dialCode"), children: item.code })
9694
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { ...getStyles("dialCode"), children: item.code }),
9695
+ typeof item.flag === "string" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { ...getStyles("flag"), src: item.flag, alt: item.name ?? "", onError: (event) => event.currentTarget.style.display = "none" }) : item.flag
9688
9696
  ] });
9689
9697
  const toOption = (item) => ({ value: item.code, label: showCountry(item), searchText: `${item.name ?? ""} ${item.code}`, resolved: item });
9690
9698
  const hasMessage = (message) => message !== void 0 && message !== null && message !== false && message !== true && message !== "";
@@ -9709,8 +9717,13 @@ var PhoneInput = factory((_props, ref) => {
9709
9717
  "aria-label": codePlaceholder,
9710
9718
  ...selectProps,
9711
9719
  // PhoneInput wins these after selectProps — dial codes stay LTR and compact.
9712
- searchable: false,
9720
+ searchable: true,
9713
9721
  checkIconPosition: "right",
9722
+ // LTR trigger; chevron sits on the physical left like the old Mantine control.
9723
+ dir: "ltr",
9724
+ rightSectionWidth: "1.5rem",
9725
+ // Search box + ~5 country rows; still short enough that flip-to-top stays near the trigger.
9726
+ maxDropdownHeight: selectProps?.maxDropdownHeight ?? 280,
9714
9727
  classNames: {
9715
9728
  ...selectPropClassNames,
9716
9729
  dropdown: ["wello-PhoneInput-dropdown", selectPropClassNames.dropdown].filter(Boolean).join(" ")