@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
@@ -77,8 +77,12 @@ function useFloating(options) {
77
77
  }
78
78
  }
79
79
  if (shift) {
80
- if (side === "top" || side === "bottom") x = Math.min(Math.max(x, padding), Math.max(padding, vw - width - padding));
81
- else y = Math.min(Math.max(y, padding), Math.max(padding, vh - height - padding));
80
+ const clampX = (v) => Math.min(Math.max(v, padding), Math.max(padding, vw - width - padding));
81
+ const clampY = (v) => Math.min(Math.max(v, padding), Math.max(padding, vh - height - padding));
82
+ if (side === "top" || side === "bottom") x = clampX(x);
83
+ else y = clampY(y);
84
+ if (side === "top" || side === "bottom") y = clampY(y);
85
+ else x = clampX(x);
82
86
  }
83
87
  if (width > 0) lockedSide.current = side;
84
88
  let referenceHidden = rect.bottom <= 0 || rect.top >= vh || rect.right <= 0 || rect.left >= vw;
@@ -116,11 +120,14 @@ function useFloating(options) {
116
120
  }, [opened, update]);
117
121
  useEffect(() => {
118
122
  if (!opened) return;
119
- let frame = requestAnimationFrame(update);
123
+ let frame = 0;
120
124
  const onChange = () => {
121
125
  cancelAnimationFrame(frame);
122
- frame = requestAnimationFrame(update);
126
+ frame = requestAnimationFrame(() => {
127
+ frame = requestAnimationFrame(update);
128
+ });
123
129
  };
130
+ onChange();
124
131
  window.addEventListener("scroll", onChange, true);
125
132
  window.addEventListener("resize", onChange);
126
133
  const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(onChange) : null;
@@ -155,4 +162,4 @@ function useFloating(options) {
155
162
  export {
156
163
  useFloating
157
164
  };
158
- //# sourceMappingURL=chunk-QCMTAQSP.js.map
165
+ //# sourceMappingURL=chunk-BVUV3Y3X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/overlay/use-floating.ts"],"sourcesContent":["import { useCallback, useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nexport type FloatingSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n/** `start`/`end` follow `dir`; `left`/`right` are physical and never RTL-flipped. */\nexport type FloatingAlign = \"start\" | \"center\" | \"end\" | \"left\" | \"right\";\nexport type FloatingPosition =\n | FloatingSide\n | `${FloatingSide}-start`\n | `${FloatingSide}-end`\n | `${FloatingSide}-left`\n | `${FloatingSide}-right`;\n\nexport interface UseFloatingOptions {\n opened: boolean;\n /** Default: 'bottom' */\n position?: FloatingPosition;\n /** Gap between target and dropdown, px. Default: 8 */\n offset?: number;\n /** Move to the opposite side when there is no room. Default: true */\n flip?: boolean;\n /** Slide along the target to stay in the viewport. Default: true */\n shift?: boolean;\n /** Distance kept from the viewport edges, px. Default: 8 */\n padding?: number;\n /** RTL swaps logical start / end on top and bottom (not physical left / right) */\n dir?: \"ltr\" | \"rtl\";\n /** Arrow size, for keeping it inside rounded corners */\n arrowSize?: number;\n /** Space between the arrow and the dropdown corner. Default: 5 */\n arrowOffset?: number;\n /** Arrow at the side edge or centered on the target. Default: 'side' */\n arrowPosition?: \"side\" | \"center\";\n onPositionChange?: (position: FloatingPosition) => void;\n /** Stay on the side it opened on, instead of flipping while scrolling. Default: true */\n preventPositionChangeWhenVisible?: boolean;\n}\n\nexport interface FloatingState {\n x: number;\n y: number;\n /** Final position after flipping */\n placement: FloatingPosition;\n arrowX?: number;\n arrowY?: number;\n /** Target size, for `width=\"target\"` */\n referenceWidth: number;\n ready: boolean;\n /** The target is scrolled out of sight */\n referenceHidden: boolean;\n}\n\nconst OPPOSITE: Record<FloatingSide, FloatingSide> = { top: \"bottom\", bottom: \"top\", left: \"right\", right: \"left\" };\n\ntype PlaceAlign = \"start\" | \"center\" | \"end\";\n\nfunction split(position: FloatingPosition): [FloatingSide, FloatingAlign] {\n const [side, align] = position.split(\"-\") as [FloatingSide, FloatingAlign | undefined];\n return [side, align ?? \"center\"];\n}\n\n/** Map alignment to place() coords. Physical left/right never pass through RTL mirroring. */\nfunction toPlaceAlign(align: FloatingAlign, dir: \"ltr\" | \"rtl\", side: FloatingSide): PlaceAlign {\n if (align === \"center\") return \"center\";\n if (align === \"left\") return \"start\";\n if (align === \"right\") return \"end\";\n // Logical start/end — mirror only for top/bottom in RTL.\n if (dir === \"rtl\" && (side === \"top\" || side === \"bottom\")) {\n return align === \"start\" ? \"end\" : \"start\";\n }\n return align;\n}\n\n/** Coordinates of a dropdown for a side / alignment, in viewport (fixed) coordinates. */\nfunction place(ref: DOMRect, width: number, height: number, side: FloatingSide, align: PlaceAlign, offset: number) {\n let x = 0;\n let y = 0;\n if (side === \"top\" || side === \"bottom\") {\n y = side === \"bottom\" ? ref.bottom + offset : ref.top - offset - height;\n x = align === \"start\" ? ref.left : align === \"end\" ? ref.right - width : ref.left + ref.width / 2 - width / 2;\n } else {\n x = side === \"right\" ? ref.right + offset : ref.left - offset - width;\n y = align === \"start\" ? ref.top : align === \"end\" ? ref.bottom - height : ref.top + ref.height / 2 - height / 2;\n }\n return { x, y };\n}\n\n/**\n * Positions a floating element next to a reference element (position: fixed), with flip,\n * shift and an arrow. Updates on scroll, resize and size changes.\n */\nexport function useFloating(options: UseFloatingOptions) {\n const {\n opened,\n position = \"bottom\",\n offset = 8,\n flip = true,\n shift = true,\n padding = 8,\n dir = \"ltr\",\n arrowSize = 0,\n arrowOffset = 5,\n arrowPosition = \"side\",\n onPositionChange,\n preventPositionChangeWhenVisible = true,\n } = options;\n const reference = useRef<HTMLElement | null>(null);\n const floating = useRef<HTMLElement | null>(null);\n const [state, setState] = useState<FloatingState>({ x: 0, y: 0, placement: position, referenceWidth: 0, ready: false, referenceHidden: false });\n const lastPlacement = useRef(position);\n const lockedSide = useRef<FloatingSide | null>(null);\n const changed = useRef(onPositionChange);\n changed.current = onPositionChange;\n\n const update = useCallback(() => {\n const ref = reference.current;\n const el = floating.current;\n if (!ref || !el) return;\n const rect = ref.getBoundingClientRect();\n const width = el.offsetWidth;\n const height = el.offsetHeight;\n const vw = document.documentElement.clientWidth;\n const vh = document.documentElement.clientHeight;\n let [side, rawAlign] = split(position);\n const align = toPlaceAlign(rawAlign, dir, side);\n\n const locked = preventPositionChangeWhenVisible ? lockedSide.current : null;\n if (locked) side = locked;\n let { x, y } = place(rect, width, height, side, align, offset);\n if (flip && !locked) {\n const overflows = (s: FloatingSide, px: number, py: number) =>\n s === \"bottom\" ? py + height > vh - padding : s === \"top\" ? py < padding : s === \"right\" ? px + width > vw - padding : px < padding;\n if (overflows(side, x, y)) {\n const other = OPPOSITE[side];\n const flipped = place(rect, width, height, other, align, offset);\n const room = (s: FloatingSide) =>\n s === \"bottom\" ? vh - rect.bottom : s === \"top\" ? rect.top : s === \"right\" ? vw - rect.right : rect.left;\n if (!overflows(other, flipped.x, flipped.y) || room(other) > room(side)) {\n side = other;\n ({ x, y } = flipped);\n }\n }\n }\n if (shift) {\n const clampX = (v: number) => Math.min(Math.max(v, padding), Math.max(padding, vw - width - padding));\n const clampY = (v: number) => Math.min(Math.max(v, padding), Math.max(padding, vh - height - padding));\n // Cross axis: always keep it on screen.\n if (side === \"top\" || side === \"bottom\") x = clampX(x);\n else y = clampY(y);\n // Main axis: when neither side has room (a tall date-time picker in a short window), the\n // flip above picks the roomier side but the dropdown still ran off the screen edge. Slide it\n // back into view instead, over the target if need be, so its header and actions stay reachable.\n // A dropdown that fits is never moved. Taller than the window: its top edge stays visible.\n if (side === \"top\" || side === \"bottom\") y = clampY(y);\n else x = clampX(x);\n }\n\n // Nothing measured yet means it isn't really open, so it may still pick a side.\n if (width > 0) lockedSide.current = side;\n\n // Outside the viewport, or cut off by a scrolling parent.\n let referenceHidden = rect.bottom <= 0 || rect.top >= vh || rect.right <= 0 || rect.left >= vw;\n for (let parent = ref.parentElement; parent && !referenceHidden && parent !== document.body; parent = parent.parentElement) {\n const style = getComputedStyle(parent);\n if (style.overflowX === \"visible\" && style.overflowY === \"visible\") continue;\n const box = parent.getBoundingClientRect();\n referenceHidden = rect.bottom <= box.top || rect.top >= box.bottom || rect.right <= box.left || rect.left >= box.right;\n }\n\n // Arrow: points at the target, kept away from the rounded corners.\n let arrowX: number | undefined;\n let arrowY: number | undefined;\n if (arrowSize) {\n const min = arrowOffset + arrowSize;\n if (side === \"top\" || side === \"bottom\") {\n const target =\n arrowPosition === \"center\" || align === \"center\"\n ? rect.left + rect.width / 2 - x\n : align === \"start\"\n ? Math.min(rect.width / 2, min + arrowSize) + (rect.left - x)\n : rect.right - x - Math.min(rect.width / 2, min + arrowSize);\n arrowX = Math.min(Math.max(target, min), width - min);\n } else {\n const target =\n arrowPosition === \"center\" || align === \"center\"\n ? rect.top + rect.height / 2 - y\n : align === \"start\"\n ? Math.min(rect.height / 2, min + arrowSize) + (rect.top - y)\n : rect.bottom - y - Math.min(rect.height / 2, min + arrowSize);\n arrowY = Math.min(Math.max(target, min), height - min);\n }\n }\n\n // Keep the caller's alignment token (left/right/start/end) so RTL remounts don't rewrite it.\n const placement = (rawAlign === \"center\" ? side : `${side}-${rawAlign}`) as FloatingPosition;\n if (placement !== lastPlacement.current) {\n lastPlacement.current = placement;\n changed.current?.(placement);\n }\n setState((prev) =>\n prev.referenceHidden === referenceHidden && prev.x === x && prev.y === y && prev.placement === placement && prev.arrowX === arrowX && prev.arrowY === arrowY && prev.referenceWidth === rect.width && prev.ready\n ? prev\n : { x, y, placement, arrowX, arrowY, referenceWidth: rect.width, ready: true, referenceHidden },\n );\n }, [position, offset, flip, shift, padding, dir, arrowSize, arrowOffset, arrowPosition, preventPositionChangeWhenVisible]);\n\n useLayoutEffect(() => {\n lockedSide.current = null;\n if (opened) update();\n else setState((prev) => (prev.ready ? { ...prev, ready: false } : prev));\n }, [opened, update]);\n\n useEffect(() => {\n if (!opened) return;\n // Double rAF: first layout after portal mount, second after dropdown content paints\n // (height 0 on the first pass would skip flip / lock the wrong side).\n let frame = 0;\n const onChange = () => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n frame = requestAnimationFrame(update);\n });\n };\n onChange();\n window.addEventListener(\"scroll\", onChange, true);\n window.addEventListener(\"resize\", onChange);\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(onChange) : null;\n if (reference.current) observer?.observe(reference.current);\n if (floating.current) observer?.observe(floating.current);\n return () => {\n cancelAnimationFrame(frame);\n window.removeEventListener(\"scroll\", onChange, true);\n window.removeEventListener(\"resize\", onChange);\n observer?.disconnect();\n };\n }, [opened, update]);\n\n // React calls an old ref callback with null and the new one with the node on every render when the\n // callback changes, so only a different node counts. Measuring here on each render can feed itself.\n const setReference = useCallback(\n (node: HTMLElement | null) => {\n if (node === reference.current) return;\n reference.current = node;\n if (node && opened) update();\n },\n [opened, update],\n );\n const setFloating = useCallback(\n (node: HTMLElement | null) => {\n if (node === floating.current) return;\n floating.current = node;\n if (node) update();\n },\n [update],\n );\n return { ...state, update, reference, floating, setReference, setFloating };\n}\n"],"mappings":";;;AAAA,SAAS,aAAa,WAAW,iBAAiB,QAAQ,gBAAgB;AAmD1E,IAAM,WAA+C,EAAE,KAAK,UAAU,QAAQ,OAAO,MAAM,SAAS,OAAO,OAAO;AAIlH,SAAS,MAAM,UAA2D;AACxE,QAAM,CAAC,MAAM,KAAK,IAAI,SAAS,MAAM,GAAG;AACxC,SAAO,CAAC,MAAM,SAAS,QAAQ;AACjC;AAGA,SAAS,aAAa,OAAsB,KAAoB,MAAgC;AAC9F,MAAI,UAAU,SAAU,QAAO;AAC/B,MAAI,UAAU,OAAQ,QAAO;AAC7B,MAAI,UAAU,QAAS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,UAAM,WAAW,OAAO,mBAAmB,cAAc,IAAI,eAAe,QAAQ,IAAI;AACxF,QAAI,UAAU,QAAS,WAAU,QAAQ,UAAU,OAAO;AAC1D,QAAI,SAAS,QAAS,WAAU,QAAQ,SAAS,OAAO;AACxD,WAAO,MAAM;AACX,2BAAqB,KAAK;AAC1B,aAAO,oBAAoB,UAAU,UAAU,IAAI;AACnD,aAAO,oBAAoB,UAAU,QAAQ;AAC7C,gBAAU,WAAW;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,QAAQ,MAAM,CAAC;AAInB,QAAM,eAAe;AAAA,IACnB,CAAC,SAA6B;AAC5B,UAAI,SAAS,UAAU,QAAS;AAChC,gBAAU,UAAU;AACpB,UAAI,QAAQ,OAAQ,QAAO;AAAA,IAC7B;AAAA,IACA,CAAC,QAAQ,MAAM;AAAA,EACjB;AACA,QAAM,cAAc;AAAA,IAClB,CAAC,SAA6B;AAC5B,UAAI,SAAS,SAAS,QAAS;AAC/B,eAAS,UAAU;AACnB,UAAI,KAAM,QAAO;AAAA,IACnB;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AACA,SAAO,EAAE,GAAG,OAAO,QAAQ,WAAW,UAAU,cAAc,YAAY;AAC5E;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-TVOR2RGE.js";
5
5
  import {
6
6
  Select
7
- } from "./chunk-RVFCTNPD.js";
7
+ } from "./chunk-N54W2U6W.js";
8
8
  import {
9
9
  InputError,
10
10
  InputWrapper
@@ -367,10 +367,10 @@ var PhoneInput = factory((_props, ref) => {
367
367
  if (fitted !== latest.current.phone) latest.current.setPhone(fitted);
368
368
  }, [countryCode]);
369
369
  const showCountry = (item) => renderCountry ? renderCountry(item) : (
370
- // Always LTR: flag then dial code (RTL pages were flipping to "966 | flag").
370
+ // Match classic PhoneInput: dial code then flag (trigger + list). Isolated LTR so RTL pages don't reorder.
371
371
  /* @__PURE__ */ jsxs("span", { ...getStyles("codeValue"), dir: "ltr", children: [
372
- typeof item.flag === "string" ? /* @__PURE__ */ jsx("img", { ...getStyles("flag"), src: item.flag, alt: item.name ?? "", onError: (event) => event.currentTarget.style.display = "none" }) : item.flag,
373
- /* @__PURE__ */ jsx("span", { ...getStyles("dialCode"), children: item.code })
372
+ /* @__PURE__ */ jsx("span", { ...getStyles("dialCode"), children: item.code }),
373
+ typeof item.flag === "string" ? /* @__PURE__ */ jsx("img", { ...getStyles("flag"), src: item.flag, alt: item.name ?? "", onError: (event) => event.currentTarget.style.display = "none" }) : item.flag
374
374
  ] })
375
375
  );
376
376
  const toOption = (item) => ({ value: item.code, label: showCountry(item), searchText: `${item.name ?? ""} ${item.code}`, resolved: item });
@@ -396,8 +396,13 @@ var PhoneInput = factory((_props, ref) => {
396
396
  "aria-label": codePlaceholder,
397
397
  ...selectProps,
398
398
  // PhoneInput wins these after selectProps — dial codes stay LTR and compact.
399
- searchable: false,
399
+ searchable: true,
400
400
  checkIconPosition: "right",
401
+ // LTR trigger; chevron sits on the physical left like the old Mantine control.
402
+ dir: "ltr",
403
+ rightSectionWidth: "1.5rem",
404
+ // Search box + ~5 country rows; still short enough that flip-to-top stays near the trigger.
405
+ maxDropdownHeight: selectProps?.maxDropdownHeight ?? 280,
401
406
  classNames: {
402
407
  ...selectPropClassNames,
403
408
  dropdown: ["wello-PhoneInput-dropdown", selectPropClassNames.dropdown].filter(Boolean).join(" ")
@@ -506,4 +511,4 @@ export {
506
511
  fitPhoneNumber,
507
512
  PhoneInput
508
513
  };
509
- //# sourceMappingURL=chunk-XBLREJCR.js.map
514
+ //# sourceMappingURL=chunk-EYNM2DF5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/PhoneInput/PhoneInput.tsx","../src/components/PhoneInput/countries.ts"],"sourcesContent":["import { useEndpointLoaders } from \"../../core/api/api\";\r\nimport { useWelloLabels } from \"../../core/provider/labels\";\r\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from \"react\";\r\nimport { Box, type BoxProps } from \"../../core/Box/Box\";\r\nimport { factory } from \"../../core/factory/factory\";\r\nimport { useComponentStyles, useProps, type StylesApiProps } from \"../../core/styles-api/styles-api\";\r\nimport { useId } from \"../../core/utils\";\r\nimport { Select, type LoadOptionsInput, type SingleSelectProps } from \"../Combobox/Select\";\r\nimport { InputError, InputWrapper } from \"../Input/Input\";\r\nimport { Skeleton } from \"../Skeleton/Skeleton\";\r\nimport { ALL_PHONE_COUNTRIES, DEFAULT_PHONE_CODE } from \"./countries\";\r\n\r\nexport type PhoneInputStylesNames = \"root\" | \"label\" | \"description\" | \"field\" | \"code\" | \"codeValue\" | \"flag\" | \"dialCode\" | \"input\" | \"errors\" | \"error\";\r\n\r\n/** A country. Your API's names work too: `phone_code`, `phone_limit`, `phone_number_limit`, `phone_starting_number`. */\r\nexport interface PhoneCountry {\r\n /** Dial code, without + */\r\n code?: string | number;\r\n phone_code?: string | number;\r\n value?: string | number;\r\n name?: string;\r\n /** Image URL or your own element */\r\n flag?: ReactNode;\r\n /** Digits allowed */\r\n limit?: number | string | null;\r\n phone_limit?: number | string | null;\r\n phone_number_limit?: number | string | null;\r\n /** First digit of the number; applied when the country changes */\r\n startingNumber?: number | string | null;\r\n phone_starting_number?: number | string | null;\r\n [key: string]: unknown;\r\n}\r\n\r\n/** A country with its fields resolved. */\r\nexport interface ResolvedPhoneCountry {\r\n code: string;\r\n name?: string;\r\n flag?: ReactNode;\r\n limit: number | null;\r\n startingNumber: string | null;\r\n /** What you passed */\r\n country: PhoneCountry;\r\n}\r\n\r\nexport interface PhoneInputProps extends BoxProps, StylesApiProps<PhoneInputStylesNames, PhoneInputProps> {\r\n label?: ReactNode;\r\n description?: ReactNode;\r\n /** Number error, under the field */\r\n error?: ReactNode;\r\n /** Dial code error, under the field */\r\n codeError?: ReactNode;\r\n required?: boolean;\r\n withAsterisk?: boolean;\r\n\r\n /** The number: digits only */\r\n value?: string | number | null;\r\n defaultValue?: string | number;\r\n onChange?: (value: string) => void;\r\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\r\n name?: string;\r\n id?: string;\r\n /** Text, or a function of the limit. Default: \"10 digits\" */\r\n placeholder?: string | ((limit: number | null) => string);\r\n disabled?: boolean;\r\n readOnly?: boolean;\r\n /** Skeleton instead of the field */\r\n loading?: boolean;\r\n\r\n /** The dial code */\r\n code?: string | number | null;\r\n defaultCode?: string | number;\r\n /** `seed` is true when a fixed list picked its first country by itself, so a form shouldn't turn dirty */\r\n onCodeChange?: (code: string, country: ResolvedPhoneCountry | null, meta: { seed: boolean }) => void;\r\n /** Form name of the dial code (hidden input) */\r\n codeName?: string;\r\n /** Form name of the limit (hidden input) */\r\n limitName?: string;\r\n /** Form name of the country's required first digit(s) (hidden input) */\r\n startingNumberName?: string;\r\n\r\n /** Fixed list. Default: every country's dial code, starting on Egypt (+20) */\r\n countries?: PhoneCountry[];\r\n /**\r\n * Address of the countries on your API (`\"countries\"`): the only thing needed to fetch them. The base address and\r\n * headers come from the theme's `api`. With `params={{ paginate: false }}` everything is asked at once.\r\n */\r\n endpoint?: string | null;\r\n /** With `endpoint`: more query parameters */\r\n params?: Record<string, unknown>;\r\n /** With `endpoint`: use `api.generalBaseURL` */\r\n general?: boolean;\r\n /** With `endpoint`: turn the whole answer into the list of countries, when `{ data: [...] }` or an array doesn't fit */\r\n select?: (data: any) => PhoneCountry[];\r\n /** Fetch countries instead. Same input as Select's `loadOptions` */\r\n loadCountries?: (input: LoadOptionsInput) => Promise<PhoneCountry[] | { items: PhoneCountry[]; total?: number; hasMore?: boolean }> | PhoneCountry[] | { items: PhoneCountry[]; total?: number; hasMore?: boolean };\r\n /** Change it to fetch again */\r\n loadKey?: string | number | null;\r\n\r\n /** Digits allowed. Default: from the country */\r\n limit?: number | null;\r\n onLimitChange?: (limit: number | null) => void;\r\n onStartingNumberChange?: (startingNumber: string | null) => void;\r\n /** Change it to fire `onLimitChange` and `onStartingNumberChange` again (e.g. after a form reset) */\r\n resyncToken?: string | number | null;\r\n\r\n /** Own flag + code, in the field and the list */\r\n renderCountry?: (country: ResolvedPhoneCountry) => ReactNode;\r\n /** Shown when there is no dial code. Default: 'Code' */\r\n codePlaceholder?: string;\r\n /** Anything else for the dial code Select: search text, messages, classNames… */\r\n selectProps?: Partial<SingleSelectProps>;\r\n}\r\n\r\nconst DEFAULT_COUNTRIES = ALL_PHONE_COUNTRIES;\r\n\r\nconst digitsOnly = (value: unknown) => String(value ?? \"\").replace(/\\D/g, \"\");\r\n\r\nfunction parseLimit(value: unknown) {\r\n const limit = Number(value);\r\n return Number.isFinite(limit) && limit > 0 ? limit : null;\r\n}\r\n\r\n/** Country `startingNumber` / `phone_starting_number` as digits. */\r\nexport function normalizeStartingNumber(value: unknown): string | null {\r\n if (value == null || value === \"\") return null;\r\n const digits = digitsOnly(value);\r\n return digits || null;\r\n}\r\n\r\n/**\r\n * True when digits already match the required start, or are still a partial prefix of it\r\n * (so typing the first digit of a multi-digit start is allowed).\r\n */\r\nexport function matchesPhoneStartingNumber(digits: string, start: string | null): boolean {\r\n if (!start || !digits) return true;\r\n return digits.startsWith(start) || start.startsWith(digits);\r\n}\r\n\r\n/** Fills in a country's fields from any of their names. */\r\nexport function resolvePhoneCountry(country: PhoneCountry): ResolvedPhoneCountry {\r\n return {\r\n code: String(country.code ?? country.phone_code ?? country.value ?? \"\"),\r\n name: country.name,\r\n flag: country.flag,\r\n limit: parseLimit(country.limit ?? country.phone_limit ?? country.phone_number_limit),\r\n startingNumber: normalizeStartingNumber(country.startingNumber ?? country.phone_starting_number),\r\n country,\r\n };\r\n}\r\n\r\n/** Number after moving to a country: right first digit, not over its limit. */\r\nexport function fitPhoneNumber(value: unknown, country: Pick<ResolvedPhoneCountry, \"limit\" | \"startingNumber\">) {\r\n let phone = digitsOnly(value);\r\n if (phone && country.startingNumber && !phone.startsWith(country.startingNumber)) {\r\n phone = country.startingNumber + phone.slice(country.startingNumber.length);\r\n }\r\n return country.limit ? phone.slice(0, country.limit) : phone;\r\n}\r\n\r\n/**\r\n * Phone number with a dial code. Keeps digits only, limits them per country and fixes the\r\n * first digit when the country changes. Takes react-hook-form's `{...field}` for the number.\r\n *\r\n * @example\r\n * <PhoneInput label=\"Phone\" value={phone} onChange={setPhone} code={code} onCodeChange={setCode} countries={[\r\n * { code: \"966\", name: \"Saudi Arabia\", flag: \"https://flagcdn.com/sa.svg\", limit: 9, startingNumber: 5 },\r\n * { code: \"20\", name: \"Egypt\", flag: \"https://flagcdn.com/eg.svg\", limit: 10, startingNumber: 1 },\r\n * ]} />\r\n * <PhoneInput {...field} loadCountries={() => api.countries().then((r) => r.data)} onCodeChange={(c) => setValue(\"phone_code\", c)} onLimitChange={(l) => setValue(\"phone_limit\", l)} />\r\n */\r\nexport const PhoneInput = factory<{ props: PhoneInputProps; ref: HTMLInputElement; stylesNames: PhoneInputStylesNames }>((_props, ref) => {\r\n const labels = useWelloLabels();\r\n const props = useProps(\"PhoneInput\", {}, _props);\r\n const [getStyles, rest] = useComponentStyles(\"PhoneInput\", props);\r\n const {\r\n label,\r\n description,\r\n error,\r\n codeError,\r\n required,\r\n withAsterisk,\r\n value: controlled,\r\n defaultValue,\r\n onChange,\r\n onBlur,\r\n name,\r\n id,\r\n placeholder,\r\n disabled,\r\n readOnly,\r\n loading,\r\n code: codeProp,\r\n defaultCode,\r\n onCodeChange,\r\n codeName,\r\n limitName,\r\n startingNumberName,\r\n countries,\r\n endpoint,\r\n params,\r\n general,\r\n select: selectCountries,\r\n loadCountries: loadCountriesProp,\r\n loadKey: loadKeyProp,\r\n limit: limitProp,\r\n onLimitChange,\r\n onStartingNumberChange,\r\n resyncToken,\r\n renderCountry,\r\n codePlaceholder = labels.phoneCode,\r\n selectProps,\r\n // Layout goes on the root.\r\n m, mt, mb, ml, mr, ms, me, mx, my, w, miw, maw, flex,\r\n ...inputProps\r\n } = rest;\r\n const inputId = useId(id);\r\n const fromEndpoint = useEndpointLoaders({ endpoint, params, general, select: selectCountries, hasShow: false });\r\n const loadCountries = (loadCountriesProp ?? fromEndpoint.loadOptions) as PhoneInputProps[\"loadCountries\"];\r\n const loadKey = loadKeyProp ?? fromEndpoint.loadKey;\r\n const remote = !!loadCountries;\r\n\r\n // Number\r\n const [internal, setInternal] = useState(digitsOnly(defaultValue));\r\n const phone = controlled !== undefined ? digitsOnly(controlled) : internal;\r\n const setPhone = (next: string) => {\r\n if (controlled === undefined) setInternal(next);\r\n onChange?.(next);\r\n };\r\n\r\n // Dial code\r\n const [codeInternal, setCodeInternal] = useState(defaultCode === undefined ? \"\" : String(defaultCode));\r\n const code = codeProp !== undefined ? String(codeProp ?? \"\") : codeInternal;\r\n const list = useMemo(() => (countries?.length ? countries : DEFAULT_COUNTRIES).map(resolvePhoneCountry), [countries]);\r\n const [fetched, setFetched] = useState<ResolvedPhoneCountry | null>(null);\r\n const country = remote ? (fetched && fetched.code === code ? fetched : null) : (list.find((item) => item.code === code) ?? null);\r\n const limit = limitProp ?? country?.limit ?? null;\r\n const startingNumber = country?.startingNumber ?? null;\r\n\r\n const setCode = (next: string, resolved: ResolvedPhoneCountry | null, seed = false) => {\r\n if (codeProp === undefined) setCodeInternal(next);\r\n onCodeChange?.(next, resolved, { seed });\r\n };\r\n\r\n // A fixed list always has a code: start on the first country.\r\n // With no list of your own, the full list starts on Egypt, not on the first name alphabetically.\r\n const usesDefaults = !remote && !countries?.length;\r\n const first = remote ? undefined : usesDefaults ? (list.find((item) => item.code === DEFAULT_PHONE_CODE) ?? list[0]) : list[0];\r\n useEffect(() => {\r\n if (!code && first) setCode(first.code, first, true);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [code, first?.code]);\r\n\r\n // Tell the form the limit and first digit of the current country.\r\n const callbacks = useRef({ onLimitChange, onStartingNumberChange });\r\n callbacks.current = { onLimitChange, onStartingNumberChange };\r\n const countryLimit = country?.limit ?? null;\r\n useEffect(() => callbacks.current.onLimitChange?.(countryLimit), [countryLimit, resyncToken]);\r\n useEffect(() => callbacks.current.onStartingNumberChange?.(startingNumber), [startingNumber, resyncToken]);\r\n\r\n // Changing country fits the number to it. The first country is left alone: that's saved data.\r\n const lastCode = useRef(\"\");\r\n const latest = useRef({ phone, setPhone });\r\n latest.current = { phone, setPhone };\r\n const countryCode = country?.code ?? \"\";\r\n useEffect(() => {\r\n const previous = lastCode.current;\r\n lastCode.current = countryCode;\r\n if (!previous || !country || previous === countryCode) return;\r\n const fitted = fitPhoneNumber(latest.current.phone, country);\r\n if (fitted !== latest.current.phone) latest.current.setPhone(fitted);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [countryCode]);\r\n\r\n const showCountry = (item: ResolvedPhoneCountry) =>\r\n renderCountry ? (\r\n renderCountry(item)\r\n ) : (\r\n // Match classic PhoneInput: dial code then flag (trigger + list). Isolated LTR so RTL pages don't reorder.\r\n <span {...getStyles(\"codeValue\")} dir=\"ltr\">\r\n <span {...getStyles(\"dialCode\")}>{item.code}</span>\r\n {typeof item.flag === \"string\" ? <img {...getStyles(\"flag\")} src={item.flag} alt={item.name ?? \"\"} onError={(event) => (event.currentTarget.style.display = \"none\")} /> : item.flag}\r\n </span>\r\n );\r\n const toOption = (item: ResolvedPhoneCountry) => ({ value: item.code, label: showCountry(item), searchText: `${item.name ?? \"\"} ${item.code}`, resolved: item });\r\n\r\n const hasMessage = (message: ReactNode) => message !== undefined && message !== null && message !== false && message !== true && message !== \"\";\r\n const startingMismatch =\r\n !!startingNumber && !!phone && !matchesPhoneStartingNumber(phone, startingNumber);\r\n const startingError = startingMismatch ? labels.phoneStartingNumber(startingNumber) : null;\r\n // External `error` wins; otherwise show the starting-digit message while typing.\r\n const numberError = hasMessage(error) ? error : startingError;\r\n const hasError = hasMessage(numberError) || hasMessage(codeError);\r\n const errorId = `${inputId}-phone-error`;\r\n const shownPlaceholder = typeof placeholder === \"function\" ? placeholder(limit) : (placeholder ?? (limit ? labels.phoneDigits(limit) : undefined));\r\n const layout = { m, mt, mb, ml, mr, ms, me, mx, my, w, miw, maw, flex };\r\n\r\n if (loading) return <Skeleton height={36} radius={999} {...layout} />;\r\n\r\n const selectPropClassNames =\r\n typeof selectProps?.classNames === \"object\" && selectProps.classNames\r\n ? (selectProps.classNames as Record<string, string | undefined>)\r\n : {};\r\n const select = {\r\n value: code,\r\n emptyValue: \"\",\r\n disabled,\r\n readOnly,\r\n placeholder: codePlaceholder,\r\n withFooter: false,\r\n radius: 0,\r\n \"aria-invalid\": !!codeError || undefined,\r\n \"aria-label\": codePlaceholder,\r\n ...selectProps,\r\n // PhoneInput wins these after selectProps — dial codes stay LTR and compact.\r\n searchable: true,\r\n checkIconPosition: \"right\" as const,\r\n // LTR trigger; chevron sits on the physical left like the old Mantine control.\r\n dir: \"ltr\" as const,\r\n rightSectionWidth: \"1.5rem\",\r\n // Search box + ~5 country rows; still short enough that flip-to-top stays near the trigger.\r\n maxDropdownHeight: selectProps?.maxDropdownHeight ?? 280,\r\n classNames: {\r\n ...selectPropClassNames,\r\n dropdown: [\"wello-PhoneInput-dropdown\", selectPropClassNames.dropdown].filter(Boolean).join(\" \"),\r\n },\r\n attributes: {\r\n ...(typeof selectProps?.attributes === \"object\" ? selectProps.attributes : {}),\r\n // Physical LTR on the portaled node — portal root may still be dir=rtl from <html>.\r\n dropdown: {\r\n ...((typeof selectProps?.attributes === \"object\" && selectProps.attributes?.dropdown) || {}),\r\n dir: \"ltr\",\r\n },\r\n },\r\n comboboxProps: {\r\n middlewares: { flip: true, shift: true },\r\n ...selectProps?.comboboxProps,\r\n // Physical left — never mirrors in RTL (start/end would).\r\n position: \"bottom-left\" as const,\r\n // Shrink-wrap to flag+code; `target` was the narrow trigger and fought min-width.\r\n width: \"auto\" as const,\r\n withinPortal: true,\r\n // overflow:hidden on the phone field must not hide the menu as \"detached\".\r\n hideDetached: false,\r\n dir: \"ltr\" as const,\r\n },\r\n onChange: (next: unknown, option: unknown) => {\r\n const resolved = (option as { resolved?: ResolvedPhoneCountry } | null)?.resolved ?? null;\r\n if (resolved) setFetched(resolved);\r\n setCode(String(next ?? \"\"), resolved);\r\n selectProps?.onChange?.(next, option as never);\r\n },\r\n };\r\n\r\n return (\r\n <InputWrapper\r\n id={inputId}\r\n label={label}\r\n description={description}\r\n required={required || withAsterisk}\r\n labelProps={getStyles(\"label\")}\r\n descriptionProps={getStyles(\"description\")}\r\n {...getStyles(\"root\")}\r\n {...layout}\r\n >\r\n {/* The code stays on the left in both directions, like a written phone number. */}\r\n <Box {...getStyles(\"field\")} mod={{ error: hasError, disabled }}>\r\n <div {...getStyles(\"code\")} data-error={codeError ? true : undefined}>\r\n {remote ? (\r\n <Select\r\n {...select}\r\n allowDeselect\r\n onOptionSelect={(option) => {\r\n setFetched((option as { resolved: ResolvedPhoneCountry }).resolved);\r\n selectProps?.onOptionSelect?.(option);\r\n }}\r\n loadKey={loadKey}\r\n loadOptions={(input) =>\r\n Promise.resolve(loadCountries!(input)).then((result) =>\r\n Array.isArray(result) ? result.map((item) => toOption(resolvePhoneCountry(item))) : { ...result, items: result.items.map((item) => toOption(resolvePhoneCountry(item))) },\r\n )\r\n }\r\n />\r\n ) : list.length > 1 ? (\r\n <Select {...select} allowDeselect={false} options={list.map(toOption)} />\r\n ) : (\r\n <span className=\"wello-PhoneInput-single\">{list[0] && showCountry(list[0])}</span>\r\n )}\r\n </div>\r\n <input\r\n {...(inputProps as object)}\r\n {...getStyles(\"input\")}\r\n ref={ref}\r\n id={inputId}\r\n type=\"tel\"\r\n inputMode=\"numeric\"\r\n autoComplete=\"tel-national\"\r\n // Digits + placeholders stay LTR (avoids \"أرقام 9\" bidi flip on RTL pages).\r\n dir=\"ltr\"\r\n name={name}\r\n value={phone}\r\n disabled={disabled}\r\n readOnly={readOnly}\r\n required={required}\r\n maxLength={limit ?? undefined}\r\n placeholder={shownPlaceholder}\r\n aria-invalid={hasMessage(numberError) || undefined}\r\n aria-describedby={hasMessage(numberError) ? errorId : undefined}\r\n onBlur={onBlur}\r\n onChange={(event) => {\r\n const digits = digitsOnly(event.currentTarget.value);\r\n setPhone(limit ? digits.slice(0, limit) : digits);\r\n }}\r\n />\r\n </Box>\r\n {(hasMessage(numberError) || hasMessage(codeError)) && (\r\n <div {...getStyles(\"errors\")}>\r\n {hasMessage(numberError) && (\r\n <InputError {...getStyles(\"error\")} id={errorId}>\r\n {numberError}\r\n </InputError>\r\n )}\r\n {hasMessage(codeError) && <InputError {...getStyles(\"error\")} data-code>{codeError}</InputError>}\r\n </div>\r\n )}\r\n {codeName && <input type=\"hidden\" name={codeName} value={code} />}\r\n {limitName && <input type=\"hidden\" name={limitName} value={limit ?? \"\"} />}\r\n {startingNumberName && <input type=\"hidden\" name={startingNumberName} value={startingNumber ?? \"\"} />}\r\n </InputWrapper>\r\n );\r\n});\r\nPhoneInput.displayName = \"PhoneInput\";\r\n","import type { PhoneCountry } from \"./PhoneInput\";\n\n/**\n * [ISO code, name, dial code]. One entry for each dial code: where countries share one (+1, +7, +44) the main\n * country stands for it, and the name says so. Digit limits differ by number type, so only Egypt (the default)\n * has one; pass your own `countries` for the rest.\n */\nconst ROWS: [string, string, string][] = [\n [\"af\", \"Afghanistan\", \"93\"],\n [\"al\", \"Albania\", \"355\"],\n [\"dz\", \"Algeria\", \"213\"],\n [\"ad\", \"Andorra\", \"376\"],\n [\"ao\", \"Angola\", \"244\"],\n [\"ar\", \"Argentina\", \"54\"],\n [\"am\", \"Armenia\", \"374\"],\n [\"aw\", \"Aruba\", \"297\"],\n [\"au\", \"Australia\", \"61\"],\n [\"at\", \"Austria\", \"43\"],\n [\"az\", \"Azerbaijan\", \"994\"],\n [\"bh\", \"Bahrain\", \"973\"],\n [\"bd\", \"Bangladesh\", \"880\"],\n [\"by\", \"Belarus\", \"375\"],\n [\"be\", \"Belgium\", \"32\"],\n [\"bz\", \"Belize\", \"501\"],\n [\"bj\", \"Benin\", \"229\"],\n [\"bt\", \"Bhutan\", \"975\"],\n [\"bo\", \"Bolivia\", \"591\"],\n [\"ba\", \"Bosnia and Herzegovina\", \"387\"],\n [\"bw\", \"Botswana\", \"267\"],\n [\"br\", \"Brazil\", \"55\"],\n [\"bn\", \"Brunei\", \"673\"],\n [\"bg\", \"Bulgaria\", \"359\"],\n [\"bf\", \"Burkina Faso\", \"226\"],\n [\"bi\", \"Burundi\", \"257\"],\n [\"kh\", \"Cambodia\", \"855\"],\n [\"cm\", \"Cameroon\", \"237\"],\n [\"cv\", \"Cape Verde\", \"238\"],\n [\"cf\", \"Central African Republic\", \"236\"],\n [\"td\", \"Chad\", \"235\"],\n [\"cl\", \"Chile\", \"56\"],\n [\"cn\", \"China\", \"86\"],\n [\"co\", \"Colombia\", \"57\"],\n [\"km\", \"Comoros\", \"269\"],\n [\"cg\", \"Congo\", \"242\"],\n [\"cd\", \"DR Congo\", \"243\"],\n [\"cr\", \"Costa Rica\", \"506\"],\n [\"ci\", \"Côte d'Ivoire\", \"225\"],\n [\"hr\", \"Croatia\", \"385\"],\n [\"cu\", \"Cuba\", \"53\"],\n [\"cy\", \"Cyprus\", \"357\"],\n [\"cz\", \"Czechia\", \"420\"],\n [\"dk\", \"Denmark\", \"45\"],\n [\"dj\", \"Djibouti\", \"253\"],\n [\"ec\", \"Ecuador\", \"593\"],\n [\"eg\", \"Egypt\", \"20\"],\n [\"sv\", \"El Salvador\", \"503\"],\n [\"gq\", \"Equatorial Guinea\", \"240\"],\n [\"er\", \"Eritrea\", \"291\"],\n [\"ee\", \"Estonia\", \"372\"],\n [\"sz\", \"Eswatini\", \"268\"],\n [\"et\", \"Ethiopia\", \"251\"],\n [\"fj\", \"Fiji\", \"679\"],\n [\"fi\", \"Finland\", \"358\"],\n [\"fr\", \"France\", \"33\"],\n [\"gf\", \"French Guiana\", \"594\"],\n [\"pf\", \"French Polynesia\", \"689\"],\n [\"ga\", \"Gabon\", \"241\"],\n [\"gm\", \"Gambia\", \"220\"],\n [\"ge\", \"Georgia\", \"995\"],\n [\"de\", \"Germany\", \"49\"],\n [\"gh\", \"Ghana\", \"233\"],\n [\"gi\", \"Gibraltar\", \"350\"],\n [\"gr\", \"Greece\", \"30\"],\n [\"gl\", \"Greenland\", \"299\"],\n [\"gp\", \"Guadeloupe\", \"590\"],\n [\"gt\", \"Guatemala\", \"502\"],\n [\"gn\", \"Guinea\", \"224\"],\n [\"gw\", \"Guinea-Bissau\", \"245\"],\n [\"gy\", \"Guyana\", \"592\"],\n [\"ht\", \"Haiti\", \"509\"],\n [\"hn\", \"Honduras\", \"504\"],\n [\"hk\", \"Hong Kong\", \"852\"],\n [\"hu\", \"Hungary\", \"36\"],\n [\"is\", \"Iceland\", \"354\"],\n [\"in\", \"India\", \"91\"],\n [\"id\", \"Indonesia\", \"62\"],\n [\"ir\", \"Iran\", \"98\"],\n [\"iq\", \"Iraq\", \"964\"],\n [\"ie\", \"Ireland\", \"353\"],\n // [\"il\", \"Israel\", \"972\"],\n [\"it\", \"Italy\", \"39\"],\n [\"jp\", \"Japan\", \"81\"],\n [\"jo\", \"Jordan\", \"962\"],\n [\"ke\", \"Kenya\", \"254\"],\n [\"ki\", \"Kiribati\", \"686\"],\n [\"kw\", \"Kuwait\", \"965\"],\n [\"kg\", \"Kyrgyzstan\", \"996\"],\n [\"la\", \"Laos\", \"856\"],\n [\"lv\", \"Latvia\", \"371\"],\n [\"lb\", \"Lebanon\", \"961\"],\n [\"ls\", \"Lesotho\", \"266\"],\n [\"lr\", \"Liberia\", \"231\"],\n [\"ly\", \"Libya\", \"218\"],\n [\"li\", \"Liechtenstein\", \"423\"],\n [\"lt\", \"Lithuania\", \"370\"],\n [\"lu\", \"Luxembourg\", \"352\"],\n [\"mo\", \"Macao\", \"853\"],\n [\"mg\", \"Madagascar\", \"261\"],\n [\"mw\", \"Malawi\", \"265\"],\n [\"my\", \"Malaysia\", \"60\"],\n [\"mv\", \"Maldives\", \"960\"],\n [\"ml\", \"Mali\", \"223\"],\n [\"mt\", \"Malta\", \"356\"],\n [\"mq\", \"Martinique\", \"596\"],\n [\"mr\", \"Mauritania\", \"222\"],\n [\"mu\", \"Mauritius\", \"230\"],\n [\"mx\", \"Mexico\", \"52\"],\n [\"md\", \"Moldova\", \"373\"],\n [\"mc\", \"Monaco\", \"377\"],\n [\"mn\", \"Mongolia\", \"976\"],\n [\"me\", \"Montenegro\", \"382\"],\n [\"ma\", \"Morocco\", \"212\"],\n [\"mz\", \"Mozambique\", \"258\"],\n [\"mm\", \"Myanmar\", \"95\"],\n [\"na\", \"Namibia\", \"264\"],\n [\"np\", \"Nepal\", \"977\"],\n [\"nl\", \"Netherlands\", \"31\"],\n [\"nc\", \"New Caledonia\", \"687\"],\n [\"nz\", \"New Zealand\", \"64\"],\n [\"ni\", \"Nicaragua\", \"505\"],\n [\"ne\", \"Niger\", \"227\"],\n [\"ng\", \"Nigeria\", \"234\"],\n [\"kp\", \"North Korea\", \"850\"],\n [\"mk\", \"North Macedonia\", \"389\"],\n [\"no\", \"Norway\", \"47\"],\n [\"om\", \"Oman\", \"968\"],\n [\"pk\", \"Pakistan\", \"92\"],\n [\"ps\", \"Palestine\", \"970\"],\n [\"pa\", \"Panama\", \"507\"],\n [\"pg\", \"Papua New Guinea\", \"675\"],\n [\"py\", \"Paraguay\", \"595\"],\n [\"pe\", \"Peru\", \"51\"],\n [\"ph\", \"Philippines\", \"63\"],\n [\"pl\", \"Poland\", \"48\"],\n [\"pt\", \"Portugal\", \"351\"],\n [\"qa\", \"Qatar\", \"974\"],\n [\"re\", \"Réunion\", \"262\"],\n [\"ro\", \"Romania\", \"40\"],\n [\"ru\", \"Russia / Kazakhstan\", \"7\"],\n [\"rw\", \"Rwanda\", \"250\"],\n [\"ws\", \"Samoa\", \"685\"],\n [\"sm\", \"San Marino\", \"378\"],\n [\"st\", \"São Tomé and Príncipe\", \"239\"],\n [\"sa\", \"Saudi Arabia\", \"966\"],\n [\"sn\", \"Senegal\", \"221\"],\n [\"rs\", \"Serbia\", \"381\"],\n [\"sc\", \"Seychelles\", \"248\"],\n [\"sl\", \"Sierra Leone\", \"232\"],\n [\"sg\", \"Singapore\", \"65\"],\n [\"sk\", \"Slovakia\", \"421\"],\n [\"si\", \"Slovenia\", \"386\"],\n [\"sb\", \"Solomon Islands\", \"677\"],\n [\"so\", \"Somalia\", \"252\"],\n [\"za\", \"South Africa\", \"27\"],\n [\"kr\", \"South Korea\", \"82\"],\n [\"ss\", \"South Sudan\", \"211\"],\n [\"es\", \"Spain\", \"34\"],\n [\"lk\", \"Sri Lanka\", \"94\"],\n [\"sd\", \"Sudan\", \"249\"],\n [\"sr\", \"Suriname\", \"597\"],\n [\"se\", \"Sweden\", \"46\"],\n [\"ch\", \"Switzerland\", \"41\"],\n [\"sy\", \"Syria\", \"963\"],\n [\"tw\", \"Taiwan\", \"886\"],\n [\"tj\", \"Tajikistan\", \"992\"],\n [\"tz\", \"Tanzania\", \"255\"],\n [\"th\", \"Thailand\", \"66\"],\n [\"tl\", \"Timor-Leste\", \"670\"],\n [\"tg\", \"Togo\", \"228\"],\n [\"to\", \"Tonga\", \"676\"],\n [\"tn\", \"Tunisia\", \"216\"],\n [\"tr\", \"Türkiye\", \"90\"],\n [\"tm\", \"Turkmenistan\", \"993\"],\n [\"ug\", \"Uganda\", \"256\"],\n [\"ua\", \"Ukraine\", \"380\"],\n [\"ae\", \"United Arab Emirates\", \"971\"],\n [\"gb\", \"United Kingdom\", \"44\"],\n [\"us\", \"United States / Canada\", \"1\"],\n [\"uy\", \"Uruguay\", \"598\"],\n [\"uz\", \"Uzbekistan\", \"998\"],\n [\"vu\", \"Vanuatu\", \"678\"],\n [\"ve\", \"Venezuela\", \"58\"],\n [\"vn\", \"Vietnam\", \"84\"],\n [\"ye\", \"Yemen\", \"967\"],\n [\"zm\", \"Zambia\", \"260\"],\n [\"zw\", \"Zimbabwe\", \"263\"],\n];\n\n/** Egypt's own numbers: ten digits, starting with 1. */\nconst EGYPT_RULE = { limit: 10, startingNumber: 1 };\n\n/** Every dial code, by country name: what `PhoneInput` lists when no `countries`, `loadCountries` or `endpoint` is given. */\nexport const ALL_PHONE_COUNTRIES: PhoneCountry[] = ROWS.map(([iso, name, code]) => ({\n code,\n name,\n flag: `https://flagcdn.com/${iso}.svg`,\n ...(code === \"20\" ? EGYPT_RULE : {}),\n}));\n\n/** The country selected when nothing else is: Egypt (+20). */\nexport const DEFAULT_PHONE_CODE = \"20\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,WAAW,SAAS,QAAQ,gBAAgC;;;ACKrE,IAAM,OAAmC;AAAA,EACvC,CAAC,MAAM,eAAe,IAAI;AAAA,EAC1B,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,UAAU,KAAK;AAAA,EACtB,CAAC,MAAM,aAAa,IAAI;AAAA,EACxB,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,SAAS,KAAK;AAAA,EACrB,CAAC,MAAM,aAAa,IAAI;AAAA,EACxB,CAAC,MAAM,WAAW,IAAI;AAAA,EACtB,CAAC,MAAM,cAAc,KAAK;AAAA,EAC1B,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,cAAc,KAAK;AAAA,EAC1B,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,WAAW,IAAI;AAAA,EACtB,CAAC,MAAM,UAAU,KAAK;AAAA,EACtB,CAAC,MAAM,SAAS,KAAK;AAAA,EACrB,CAAC,MAAM,UAAU,KAAK;AAAA,EACtB,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,0BAA0B,KAAK;AAAA,EACtC,CAAC,MAAM,YAAY,KAAK;AAAA,EACxB,CAAC,MAAM,UAAU,IAAI;AAAA,EACrB,CAAC,MAAM,UAAU,KAAK;AAAA,EACtB,CAAC,MAAM,YAAY,KAAK;AAAA,EACxB,CAAC,MAAM,gBAAgB,KAAK;AAAA,EAC5B,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,YAAY,KAAK;AAAA,EACxB,CAAC,MAAM,YAAY,K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J;AAAA,cACA,OAAO;AAAA,cACP;AAAA,cACA;AAAA,cACA;AAAA,cACA,WAAW,SAAS;AAAA,cACpB,aAAa;AAAA,cACb,gBAAc,WAAW,WAAW,KAAK;AAAA,cACzC,oBAAkB,WAAW,WAAW,IAAI,UAAU;AAAA,cACtD;AAAA,cACA,UAAU,CAAC,UAAU;AACnB,sBAAM,SAAS,WAAW,MAAM,cAAc,KAAK;AACnD,yBAAS,QAAQ,OAAO,MAAM,GAAG,KAAK,IAAI,MAAM;AAAA,cAClD;AAAA;AAAA,UACF;AAAA,WACF;AAAA,SACE,WAAW,WAAW,KAAK,WAAW,SAAS,MAC/C,qBAAC,SAAK,GAAG,UAAU,QAAQ,GACxB;AAAA,qBAAW,WAAW,KACrB,oBAAC,cAAY,GAAG,UAAU,OAAO,GAAG,IAAI,SACrC,uBACH;AAAA,UAED,WAAW,SAAS,KAAK,oBAAC,cAAY,GAAG,UAAU,OAAO,GAAG,aAAS,MAAE,qBAAU;AAAA,WACrF;AAAA,QAED,YAAY,oBAAC,WAAM,MAAK,UAAS,MAAM,UAAU,OAAO,MAAM;AAAA,QAC9D,aAAa,oBAAC,WAAM,MAAK,UAAS,MAAM,WAAW,OAAO,SAAS,IAAI;AAAA,QACvE,sBAAsB,oBAAC,WAAM,MAAK,UAAS,MAAM,oBAAoB,OAAO,kBAAkB,IAAI;AAAA;AAAA;AAAA,EACrG;AAEJ,CAAC;AACD,WAAW,cAAc;","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  Popover,
7
7
  PopoverDropdown,
8
8
  PopoverTarget
9
- } from "./chunk-YRKCM3OL.js";
9
+ } from "./chunk-OHP4OBN2.js";
10
10
  import {
11
11
  factory
12
12
  } from "./chunk-CJ7I6UM7.js";
@@ -341,4 +341,4 @@ export {
341
341
  ComboboxClearButton,
342
342
  CheckIcon
343
343
  };
344
- //# sourceMappingURL=chunk-BZPG4NZ6.js.map
344
+ //# sourceMappingURL=chunk-HIYHBWWU.js.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useFloating
4
- } from "./chunk-QCMTAQSP.js";
4
+ } from "./chunk-BVUV3Y3X.js";
5
5
  import {
6
6
  OptionalPortal
7
7
  } from "./chunk-2TFJ4SMR.js";
@@ -200,4 +200,4 @@ export {
200
200
  Tooltip,
201
201
  TooltipFloating
202
202
  };
203
- //# sourceMappingURL=chunk-2WHZJI3S.js.map
203
+ //# sourceMappingURL=chunk-JHBUYAOW.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Tooltip,
4
4
  TooltipFloating
5
- } from "./chunk-2WHZJI3S.js";
5
+ } from "./chunk-JHBUYAOW.js";
6
6
  import {
7
7
  Menu,
8
8
  MenuDivider,
@@ -10,12 +10,12 @@ import {
10
10
  MenuItem,
11
11
  MenuLabel,
12
12
  MenuTarget
13
- } from "./chunk-A76QHCP5.js";
13
+ } from "./chunk-RW2ATREO.js";
14
14
  import {
15
15
  Popover,
16
16
  PopoverDropdown,
17
17
  PopoverTarget
18
- } from "./chunk-YRKCM3OL.js";
18
+ } from "./chunk-OHP4OBN2.js";
19
19
  import {
20
20
  part,
21
21
  toPosition,
@@ -273,4 +273,4 @@ export {
273
273
  DropdownMenuSubTrigger,
274
274
  DropdownMenuSubContent
275
275
  };
276
- //# sourceMappingURL=chunk-FSR3OEUP.js.map
276
+ //# sourceMappingURL=chunk-MWWNTAPV.js.map
@@ -14,7 +14,7 @@ import {
14
14
  ComboboxSearch,
15
15
  ComboboxTarget,
16
16
  useCombobox
17
- } from "./chunk-BZPG4NZ6.js";
17
+ } from "./chunk-HIYHBWWU.js";
18
18
  import {
19
19
  Input,
20
20
  InputBase
@@ -618,4 +618,4 @@ var Select2 = SelectRoot;
618
618
  export {
619
619
  Select2 as Select
620
620
  };
621
- //# sourceMappingURL=chunk-RVFCTNPD.js.map
621
+ //# sourceMappingURL=chunk-N54W2U6W.js.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useFloating
4
- } from "./chunk-QCMTAQSP.js";
4
+ } from "./chunk-BVUV3Y3X.js";
5
5
  import {
6
6
  useClickOutside,
7
7
  useEscape,
@@ -206,13 +206,14 @@ var PopoverDropdown = factory(({ children, className, style, ...others }, ref) =
206
206
  style: {
207
207
  ...transitionStyles,
208
208
  ...dropdown.style,
209
+ // transform (not top/left) — survives filter/mask containing blocks on ancestors
210
+ // when a portal is briefly missing, and avoids inset shorthand fights.
209
211
  position: "fixed",
210
- // Clear any inherited inset from host CSS so left/top win.
211
- inset: "auto",
212
- top: floating.y,
213
- left: floating.x,
212
+ top: 0,
213
+ left: 0,
214
214
  right: "auto",
215
215
  bottom: "auto",
216
+ transform: floating.ready ? `translate3d(${Math.round(floating.x)}px, ${Math.round(floating.y)}px, 0)` : "translate3d(-9999px, -9999px, 0)",
216
217
  width,
217
218
  zIndex: props.zIndex,
218
219
  // Invisible until measured, so it doesn't flash at 0,0.
@@ -256,4 +257,4 @@ export {
256
257
  PopoverTarget,
257
258
  PopoverDropdown
258
259
  };
259
- //# sourceMappingURL=chunk-YRKCM3OL.js.map
260
+ //# sourceMappingURL=chunk-OHP4OBN2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n createContext,\n isValidElement,\n useContext,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { Box, type BoxProps } from \"../../core/Box/Box\";\nimport { factory } from \"../../core/factory/factory\";\nimport { useClickOutside, useEscape, useFocusTrap } from \"../../core/overlay/focus\";\nimport { useFloating, type FloatingPosition } from \"../../core/overlay/use-floating\";\nimport { useDirection } from \"../../core/provider/WelloProvider\";\nimport {\n useComponentStyles,\n useProps,\n type GetStyles,\n type StylesApiProps,\n} from \"../../core/styles-api/styles-api\";\nimport type { WelloRadius, WelloShadow } from \"../../core/theme/types\";\nimport { getRadius, getShadow, rem } from \"../../core/theme/units\";\nimport { mergeRefs, useId } from \"../../core/utils\";\nimport { OptionalPortal, type PortalProps } from \"../Portal/Portal\";\nimport { Transition, type TransitionProps } from \"../Transition/Transition\";\n\nexport type PopoverStylesNames = \"dropdown\" | \"arrow\";\nexport type PopoverWidth = \"target\" | \"auto\" | number | (string & {});\n\nexport interface PopoverBaseProps {\n /** Default: 'bottom' */\n position?: FloatingPosition;\n /** Default: 8 */\n offset?: number;\n /** `'target'` = same width as the target. Default: 'max-content' */\n width?: PopoverWidth;\n withArrow?: boolean;\n /** Default: 7 */\n arrowSize?: number;\n /** Default: 5 */\n arrowOffset?: number;\n /** Default: 0 */\n arrowRadius?: number;\n /** Default: 'side' */\n arrowPosition?: \"side\" | \"center\";\n /** Default: true */\n withinPortal?: boolean;\n portalProps?: Omit<PortalProps, \"children\">;\n /** Default: 300 */\n zIndex?: number | string;\n radius?: WelloRadius;\n /** Default: 'md' */\n shadow?: WelloShadow;\n /** Default: { transition: 'fade', duration: 150 } */\n transitionProps?: Omit<TransitionProps, \"mounted\" | \"children\">;\n /** Keep the dropdown in the DOM while closed */\n keepMounted?: boolean;\n /** Flip / shift to stay on screen. Default: both true */\n middlewares?: { flip?: boolean; shift?: boolean };\n onPositionChange?: (position: FloatingPosition) => void;\n /** Hide the dropdown */\n disabled?: boolean;\n /** Hide it while the target is scrolled out of sight. Default: true */\n hideDetached?: boolean;\n /** Stay on the side it opened on, instead of flipping while scrolling. Default: true */\n preventPositionChangeWhenVisible?: boolean;\n /**\n * Floating alignment dir (`start` / `end`). Default: app direction.\n * Pass `\"ltr\"` for controls that stay left-anchored in RTL (e.g. PhoneInput dial code).\n */\n dir?: \"ltr\" | \"rtl\";\n}\n\nexport interface PopoverProps\n extends PopoverBaseProps, StylesApiProps<PopoverStylesNames, PopoverProps> {\n /** Controlled state */\n opened?: boolean;\n defaultOpened?: boolean;\n onChange?: (opened: boolean) => void;\n onOpen?: () => void;\n onClose?: () => void;\n /** Keep Tab inside the dropdown */\n trapFocus?: boolean;\n /** Focus the target back on close. Default: false */\n returnFocus?: boolean;\n /** Default: true */\n closeOnEscape?: boolean;\n /** Default: true */\n closeOnClickOutside?: boolean;\n /** Default: ['mousedown', 'touchstart'] */\n clickOutsideEvents?: string[];\n /** aria roles on target / dropdown. Default: true */\n withRoles?: boolean;\n /** Base id of the dropdown */\n id?: string;\n /** Close on Escape / click outside does nothing; you control it */\n children?: ReactNode;\n /** Set by Menu */\n __staticSelector?: string;\n __role?: string;\n}\n\ninterface PopoverContextValue {\n opened: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n floating: ReturnType<typeof useFloating>;\n targetRef: React.MutableRefObject<HTMLElement | null>;\n dropdownRef: React.MutableRefObject<HTMLElement | null>;\n getStyles: GetStyles<PopoverStylesNames>;\n props: PopoverProps;\n id: string;\n /** Nested popovers register their dropdown so clicks in them don't close this one */\n registerChild: (ref: React.MutableRefObject<HTMLElement | null>) => () => void;\n}\n\nconst PopoverContext = createContext<PopoverContextValue | null>(null);\n\nexport function usePopoverContext() {\n const context = useContext(PopoverContext);\n if (!context) throw new Error(\"Popover.Target / Popover.Dropdown must be inside <Popover>\");\n return context;\n}\n\n/** Root of a popover; use `Popover.Target` and `Popover.Dropdown` inside. */\nexport function Popover(_props: PopoverProps) {\n const props = useProps(\n \"Popover\",\n {\n position: \"bottom\",\n offset: 8,\n width: \"max-content\",\n hideDetached: true,\n preventPositionChangeWhenVisible: true,\n arrowSize: 7,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: \"side\",\n withinPortal: true,\n zIndex: 300,\n shadow: \"md\",\n closeOnEscape: true,\n closeOnClickOutside: true,\n withRoles: true,\n returnFocus: false,\n },\n _props,\n );\n const name = props.__staticSelector ?? \"Popover\";\n const [getStyles] = useComponentStyles(name, props, {\n rootSelector: \"dropdown\",\n varsResolver: (_theme, p) => ({\n dropdown: {\n \"--popover-radius\": p.radius === undefined ? undefined : getRadius(p.radius),\n \"--popover-shadow\": getShadow(p.shadow),\n },\n }),\n });\n const [internal, setInternal] = useState(!!props.defaultOpened);\n const opened = !props.disabled && (props.opened ?? internal);\n const setOpened = (next: boolean) => {\n if (next === opened) return;\n if (props.opened === undefined) setInternal(next);\n props.onChange?.(next);\n (next ? props.onOpen : props.onClose)?.();\n };\n const { dir: appDir } = useDirection();\n const floating = useFloating({\n opened,\n position: props.position,\n offset: props.offset! + (props.withArrow ? props.arrowSize! / 2 : 0),\n flip: props.middlewares?.flip ?? true,\n shift: props.middlewares?.shift ?? true,\n dir: props.dir ?? appDir,\n arrowSize: props.withArrow ? props.arrowSize : 0,\n arrowOffset: props.arrowOffset,\n arrowPosition: props.arrowPosition,\n onPositionChange: props.onPositionChange,\n preventPositionChangeWhenVisible: props.preventPositionChangeWhenVisible,\n });\n const targetRef = useRef<HTMLElement | null>(null);\n const dropdownRef = useRef<HTMLElement | null>(null);\n const id = useId(props.id);\n const children = useRef(new Set<React.MutableRefObject<HTMLElement | null>>());\n const parent = useContext(PopoverContext);\n useEffect(() => parent?.registerChild(dropdownRef), [parent]);\n\n useClickOutside(\n () => props.closeOnClickOutside && setOpened(false),\n () => [targetRef, dropdownRef, ...children.current],\n opened,\n props.clickOutsideEvents,\n );\n useEscape(() => {\n if (props.closeOnEscape) {\n setOpened(false);\n targetRef.current?.focus();\n }\n }, opened);\n\n return (\n <PopoverContext.Provider\n value={{\n opened,\n open: () => setOpened(true),\n close: () => setOpened(false),\n toggle: () => setOpened(!opened),\n floating,\n targetRef,\n dropdownRef,\n getStyles,\n props,\n id,\n // Ancestors learn about nested dropdowns too, at any depth.\n registerChild: (ref) => {\n children.current.add(ref);\n const up = parent?.registerChild(ref);\n return () => {\n children.current.delete(ref);\n up?.();\n };\n },\n }}\n >\n {props.children}\n </PopoverContext.Provider>\n );\n}\n\nexport interface PopoverTargetProps {\n /** One element; receives ref, onClick and aria attributes */\n children: ReactElement;\n /** Prop the ref goes to. Default: 'ref' */\n refProp?: string;\n /** Set aria-haspopup, aria-expanded and aria-controls on the target. Default: the popover's `withRoles` */\n withRoles?: boolean;\n /** Extra props merged into the child */\n popupType?: string;\n}\n\nexport function PopoverTarget({\n children,\n refProp = \"ref\",\n popupType = \"dialog\",\n withRoles,\n}: PopoverTargetProps) {\n const context = usePopoverContext();\n if (!isValidElement(children)) throw new Error(\"Popover.Target needs one element child\");\n const child = children as ReactElement<Record<string, any>>;\n const roles = (withRoles ?? context.props.withRoles)\n ? {\n \"aria-haspopup\": popupType,\n \"aria-expanded\": context.opened,\n \"aria-controls\": context.opened ? `${context.id}-dropdown` : undefined,\n id: child.props.id ?? `${context.id}-target`,\n }\n : {};\n return cloneElement(child, {\n ...roles,\n \"data-expanded\": context.opened || undefined,\n [refProp]: mergeRefs(context.targetRef, context.floating.setReference, child.props.ref),\n onClick: (event: React.MouseEvent) => {\n child.props.onClick?.(event);\n if (!event.defaultPrevented && !context.props.__role) context.toggle();\n },\n });\n}\n\nexport interface PopoverDropdownProps extends BoxProps {\n children?: ReactNode;\n className?: string;\n}\n\nexport const PopoverDropdown = factory<{\n props: PopoverDropdownProps;\n ref: HTMLDivElement;\n stylesNames: \"dropdown\";\n}>(({ children, className, style, ...others }, ref) => {\n const context = usePopoverContext();\n const { props, floating } = context;\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n useFocusTrap(dropdownRef, context.opened && !!props.trapFocus, props.returnFocus);\n // Avoid width:0 before the first measure — that collapses offsetWidth and skews place().\n const width =\n props.width === \"target\"\n ? floating.referenceWidth > 0\n ? floating.referenceWidth\n : undefined\n : props.width === \"auto\"\n ? undefined\n : rem(props.width as number | string);\n return (\n <OptionalPortal withinPortal={props.withinPortal} {...props.portalProps}>\n <Transition\n mounted={context.opened}\n keepMounted={props.keepMounted}\n transition=\"fade\"\n duration={150}\n {...props.transitionProps}\n >\n {(transitionStyles) => {\n const dropdown = context.getStyles(\"dropdown\", { className });\n return (\n <Box\n ref={mergeRefs(ref, dropdownRef, context.dropdownRef, floating.setFloating)}\n id={`${context.id}-dropdown`}\n role={props.withRoles ? (props.__role ?? \"dialog\") : undefined}\n aria-labelledby={props.withRoles ? `${context.id}-target` : undefined}\n tabIndex={-1}\n {...dropdown}\n data-position={floating.placement}\n style={{\n ...transitionStyles,\n ...dropdown.style,\n position: \"fixed\",\n // Clear any inherited inset from host CSS so left/top win.\n inset: \"auto\",\n top: floating.y,\n left: floating.x,\n right: \"auto\",\n bottom: \"auto\",\n width,\n zIndex: props.zIndex as CSSProperties[\"zIndex\"],\n // Invisible until measured, so it doesn't flash at 0,0.\n visibility: floating.ready && !(props.hideDetached && floating.referenceHidden)\n ? (transitionStyles.visibility as CSSProperties[\"visibility\"])\n : \"hidden\",\n ...(typeof style === \"object\" ? style : undefined),\n }}\n {...others}\n >\n {children}\n {props.withArrow && (\n <div\n {...context.getStyles(\"arrow\")}\n data-position={floating.placement}\n style={{\n ...context.getStyles(\"arrow\").style,\n [\"--_arrow\" as string]: `${props.arrowSize}px`,\n width: props.arrowSize,\n height: props.arrowSize,\n borderRadius: props.arrowRadius,\n left:\n floating.arrowX !== undefined\n ? floating.arrowX - props.arrowSize! / 2\n : undefined,\n top:\n floating.arrowY !== undefined\n ? floating.arrowY - props.arrowSize! / 2\n : undefined,\n }}\n />\n )}\n </Box>\n );\n }}\n </Transition>\n </OptionalPortal>\n );\n});\nPopoverDropdown.displayName = \"PopoverDropdown\";\n\nPopover.Target = PopoverTarget;\nPopover.Dropdown = PopoverDropdown;\nPopover.displayName = \"Popover\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAkMH,cAsGQ,YAtGR;AArFJ,IAAM,iBAAiB,cAA0C,IAAI;AAE9D,SAAS,oBAAoB;AAClC,QAAM,UAAU,WAAW,cAAc;AACzC,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,4DAA4D;AAC1F,SAAO;AACT;AAGO,SAAS,QAAQ,QAAsB;AAC5C,QAAM,QAAQ;A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,EACF,GACF;AAEJ,CAAC;AACD,gBAAgB,cAAc;AAE9B,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,QAAQ,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n createContext,\n isValidElement,\n useContext,\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { Box, type BoxProps } from \"../../core/Box/Box\";\nimport { factory } from \"../../core/factory/factory\";\nimport { useClickOutside, useEscape, useFocusTrap } from \"../../core/overlay/focus\";\nimport { useFloating, type FloatingPosition } from \"../../core/overlay/use-floating\";\nimport { useDirection } from \"../../core/provider/WelloProvider\";\nimport {\n useComponentStyles,\n useProps,\n type GetStyles,\n type StylesApiProps,\n} from \"../../core/styles-api/styles-api\";\nimport type { WelloRadius, WelloShadow } from \"../../core/theme/types\";\nimport { getRadius, getShadow, rem } from \"../../core/theme/units\";\nimport { mergeRefs, useId } from \"../../core/utils\";\nimport { OptionalPortal, type PortalProps } from \"../Portal/Portal\";\nimport { Transition, type TransitionProps } from \"../Transition/Transition\";\n\nexport type PopoverStylesNames = \"dropdown\" | \"arrow\";\nexport type PopoverWidth = \"target\" | \"auto\" | number | (string & {});\n\nexport interface PopoverBaseProps {\n /** Default: 'bottom' */\n position?: FloatingPosition;\n /** Default: 8 */\n offset?: number;\n /** `'target'` = same width as the target. Default: 'max-content' */\n width?: PopoverWidth;\n withArrow?: boolean;\n /** Default: 7 */\n arrowSize?: number;\n /** Default: 5 */\n arrowOffset?: number;\n /** Default: 0 */\n arrowRadius?: number;\n /** Default: 'side' */\n arrowPosition?: \"side\" | \"center\";\n /** Default: true */\n withinPortal?: boolean;\n portalProps?: Omit<PortalProps, \"children\">;\n /** Default: 300 */\n zIndex?: number | string;\n radius?: WelloRadius;\n /** Default: 'md' */\n shadow?: WelloShadow;\n /** Default: { transition: 'fade', duration: 150 } */\n transitionProps?: Omit<TransitionProps, \"mounted\" | \"children\">;\n /** Keep the dropdown in the DOM while closed */\n keepMounted?: boolean;\n /** Flip / shift to stay on screen. Default: both true */\n middlewares?: { flip?: boolean; shift?: boolean };\n onPositionChange?: (position: FloatingPosition) => void;\n /** Hide the dropdown */\n disabled?: boolean;\n /** Hide it while the target is scrolled out of sight. Default: true */\n hideDetached?: boolean;\n /** Stay on the side it opened on, instead of flipping while scrolling. Default: true */\n preventPositionChangeWhenVisible?: boolean;\n /**\n * Floating alignment dir (`start` / `end`). Default: app direction.\n * Pass `\"ltr\"` for controls that stay left-anchored in RTL (e.g. PhoneInput dial code).\n */\n dir?: \"ltr\" | \"rtl\";\n}\n\nexport interface PopoverProps\n extends PopoverBaseProps, StylesApiProps<PopoverStylesNames, PopoverProps> {\n /** Controlled state */\n opened?: boolean;\n defaultOpened?: boolean;\n onChange?: (opened: boolean) => void;\n onOpen?: () => void;\n onClose?: () => void;\n /** Keep Tab inside the dropdown */\n trapFocus?: boolean;\n /** Focus the target back on close. Default: false */\n returnFocus?: boolean;\n /** Default: true */\n closeOnEscape?: boolean;\n /** Default: true */\n closeOnClickOutside?: boolean;\n /** Default: ['mousedown', 'touchstart'] */\n clickOutsideEvents?: string[];\n /** aria roles on target / dropdown. Default: true */\n withRoles?: boolean;\n /** Base id of the dropdown */\n id?: string;\n /** Close on Escape / click outside does nothing; you control it */\n children?: ReactNode;\n /** Set by Menu */\n __staticSelector?: string;\n __role?: string;\n}\n\ninterface PopoverContextValue {\n opened: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n floating: ReturnType<typeof useFloating>;\n targetRef: React.MutableRefObject<HTMLElement | null>;\n dropdownRef: React.MutableRefObject<HTMLElement | null>;\n getStyles: GetStyles<PopoverStylesNames>;\n props: PopoverProps;\n id: string;\n /** Nested popovers register their dropdown so clicks in them don't close this one */\n registerChild: (ref: React.MutableRefObject<HTMLElement | null>) => () => void;\n}\n\nconst PopoverContext = createContext<PopoverContextValue | null>(null);\n\nexport function usePopoverContext() {\n const context = useContext(PopoverContext);\n if (!context) throw new Error(\"Popover.Target / Popover.Dropdown must be inside <Popover>\");\n return context;\n}\n\n/** Root of a popover; use `Popover.Target` and `Popover.Dropdown` inside. */\nexport function Popover(_props: PopoverProps) {\n const props = useProps(\n \"Popover\",\n {\n position: \"bottom\",\n offset: 8,\n width: \"max-content\",\n hideDetached: true,\n preventPositionChangeWhenVisible: true,\n arrowSize: 7,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: \"side\",\n withinPortal: true,\n zIndex: 300,\n shadow: \"md\",\n closeOnEscape: true,\n closeOnClickOutside: true,\n withRoles: true,\n returnFocus: false,\n },\n _props,\n );\n const name = props.__staticSelector ?? \"Popover\";\n const [getStyles] = useComponentStyles(name, props, {\n rootSelector: \"dropdown\",\n varsResolver: (_theme, p) => ({\n dropdown: {\n \"--popover-radius\": p.radius === undefined ? undefined : getRadius(p.radius),\n \"--popover-shadow\": getShadow(p.shadow),\n },\n }),\n });\n const [internal, setInternal] = useState(!!props.defaultOpened);\n const opened = !props.disabled && (props.opened ?? internal);\n const setOpened = (next: boolean) => {\n if (next === opened) return;\n if (props.opened === undefined) setInternal(next);\n props.onChange?.(next);\n (next ? props.onOpen : props.onClose)?.();\n };\n const { dir: appDir } = useDirection();\n const floating = useFloating({\n opened,\n position: props.position,\n offset: props.offset! + (props.withArrow ? props.arrowSize! / 2 : 0),\n flip: props.middlewares?.flip ?? true,\n shift: props.middlewares?.shift ?? true,\n dir: props.dir ?? appDir,\n arrowSize: props.withArrow ? props.arrowSize : 0,\n arrowOffset: props.arrowOffset,\n arrowPosition: props.arrowPosition,\n onPositionChange: props.onPositionChange,\n preventPositionChangeWhenVisible: props.preventPositionChangeWhenVisible,\n });\n const targetRef = useRef<HTMLElement | null>(null);\n const dropdownRef = useRef<HTMLElement | null>(null);\n const id = useId(props.id);\n const children = useRef(new Set<React.MutableRefObject<HTMLElement | null>>());\n const parent = useContext(PopoverContext);\n useEffect(() => parent?.registerChild(dropdownRef), [parent]);\n\n useClickOutside(\n () => props.closeOnClickOutside && setOpened(false),\n () => [targetRef, dropdownRef, ...children.current],\n opened,\n props.clickOutsideEvents,\n );\n useEscape(() => {\n if (props.closeOnEscape) {\n setOpened(false);\n targetRef.current?.focus();\n }\n }, opened);\n\n return (\n <PopoverContext.Provider\n value={{\n opened,\n open: () => setOpened(true),\n close: () => setOpened(false),\n toggle: () => setOpened(!opened),\n floating,\n targetRef,\n dropdownRef,\n getStyles,\n props,\n id,\n // Ancestors learn about nested dropdowns too, at any depth.\n registerChild: (ref) => {\n children.current.add(ref);\n const up = parent?.registerChild(ref);\n return () => {\n children.current.delete(ref);\n up?.();\n };\n },\n }}\n >\n {props.children}\n </PopoverContext.Provider>\n );\n}\n\nexport interface PopoverTargetProps {\n /** One element; receives ref, onClick and aria attributes */\n children: ReactElement;\n /** Prop the ref goes to. Default: 'ref' */\n refProp?: string;\n /** Set aria-haspopup, aria-expanded and aria-controls on the target. Default: the popover's `withRoles` */\n withRoles?: boolean;\n /** Extra props merged into the child */\n popupType?: string;\n}\n\nexport function PopoverTarget({\n children,\n refProp = \"ref\",\n popupType = \"dialog\",\n withRoles,\n}: PopoverTargetProps) {\n const context = usePopoverContext();\n if (!isValidElement(children)) throw new Error(\"Popover.Target needs one element child\");\n const child = children as ReactElement<Record<string, any>>;\n const roles = (withRoles ?? context.props.withRoles)\n ? {\n \"aria-haspopup\": popupType,\n \"aria-expanded\": context.opened,\n \"aria-controls\": context.opened ? `${context.id}-dropdown` : undefined,\n id: child.props.id ?? `${context.id}-target`,\n }\n : {};\n return cloneElement(child, {\n ...roles,\n \"data-expanded\": context.opened || undefined,\n [refProp]: mergeRefs(context.targetRef, context.floating.setReference, child.props.ref),\n onClick: (event: React.MouseEvent) => {\n child.props.onClick?.(event);\n if (!event.defaultPrevented && !context.props.__role) context.toggle();\n },\n });\n}\n\nexport interface PopoverDropdownProps extends BoxProps {\n children?: ReactNode;\n className?: string;\n}\n\nexport const PopoverDropdown = factory<{\n props: PopoverDropdownProps;\n ref: HTMLDivElement;\n stylesNames: \"dropdown\";\n}>(({ children, className, style, ...others }, ref) => {\n const context = usePopoverContext();\n const { props, floating } = context;\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n useFocusTrap(dropdownRef, context.opened && !!props.trapFocus, props.returnFocus);\n // Avoid width:0 before the first measure — that collapses offsetWidth and skews place().\n const width =\n props.width === \"target\"\n ? floating.referenceWidth > 0\n ? floating.referenceWidth\n : undefined\n : props.width === \"auto\"\n ? undefined\n : rem(props.width as number | string);\n return (\n <OptionalPortal withinPortal={props.withinPortal} {...props.portalProps}>\n <Transition\n mounted={context.opened}\n keepMounted={props.keepMounted}\n transition=\"fade\"\n duration={150}\n {...props.transitionProps}\n >\n {(transitionStyles) => {\n const dropdown = context.getStyles(\"dropdown\", { className });\n return (\n <Box\n ref={mergeRefs(ref, dropdownRef, context.dropdownRef, floating.setFloating)}\n id={`${context.id}-dropdown`}\n role={props.withRoles ? (props.__role ?? \"dialog\") : undefined}\n aria-labelledby={props.withRoles ? `${context.id}-target` : undefined}\n tabIndex={-1}\n {...dropdown}\n data-position={floating.placement}\n style={{\n ...transitionStyles,\n ...dropdown.style,\n // transform (not top/left) — survives filter/mask containing blocks on ancestors\n // when a portal is briefly missing, and avoids inset shorthand fights.\n position: \"fixed\",\n top: 0,\n left: 0,\n right: \"auto\",\n bottom: \"auto\",\n transform: floating.ready\n ? `translate3d(${Math.round(floating.x)}px, ${Math.round(floating.y)}px, 0)`\n : \"translate3d(-9999px, -9999px, 0)\",\n width,\n zIndex: props.zIndex as CSSProperties[\"zIndex\"],\n // Invisible until measured, so it doesn't flash at 0,0.\n visibility: floating.ready && !(props.hideDetached && floating.referenceHidden)\n ? (transitionStyles.visibility as CSSProperties[\"visibility\"])\n : \"hidden\",\n ...(typeof style === \"object\" ? style : undefined),\n }}\n {...others}\n >\n {children}\n {props.withArrow && (\n <div\n {...context.getStyles(\"arrow\")}\n data-position={floating.placement}\n style={{\n ...context.getStyles(\"arrow\").style,\n [\"--_arrow\" as string]: `${props.arrowSize}px`,\n width: props.arrowSize,\n height: props.arrowSize,\n borderRadius: props.arrowRadius,\n left:\n floating.arrowX !== undefined\n ? floating.arrowX - props.arrowSize! / 2\n : undefined,\n top:\n floating.arrowY !== undefined\n ? floating.arrowY - props.arrowSize! / 2\n : undefined,\n }}\n />\n )}\n </Box>\n );\n }}\n </Transition>\n </OptionalPortal>\n );\n});\nPopoverDropdown.displayName = \"PopoverDropdown\";\n\nPopover.Target = PopoverTarget;\nPopover.Dropdown = PopoverDropdown;\nPopover.displayName = \"Popover\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAkMH,cAsGQ,YAtGR;AArFJ,IAAM,iBAAiB,cAA0C,IAAI;AAE9D,SAAS,oBAAoB;AAClC,QAAM,UAAU,WAAW,cAAc;AACzC,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,4DAA4D;AAC1F,SAAO;AACT;AAGO,SAAS,QAAQ,QAAsB;AAC5C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,cAAc;AAAA,MACd,kCAAkC;AAAA,MAClC,WAAW;AAAA,MACX,aAAa;AAAA,MACb,aAAa;AAAA,MACb,eAAe;AAAA,MACf,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,qBAAqB;AAAA,MACrB,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AAAA,IACA;AAAA,EACF;AACA,QAAM,OAAO,MAAM,oBAAoB;AACvC,QAAM,CAAC,SAAS,IAAI,mBAAmB,MAAM,OAAO;AAAA,IAClD,cAAc;AAAA,IACd,cAAc,CAAC,QAAQ,OAAO;AAAA,MAC5B,UAAU;A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;AAAA,cACR,WAAW,SAAS,QAChB,eAAe,KAAK,MAAM,SAAS,CAAC,CAAC,OAAO,KAAK,MAAM,SAAS,CAAC,CAAC,WAClE;AAAA,cACJ;AAAA,cACA,QAAQ,MAAM;AAAA;AAAA,cAEd,YAAY,SAAS,SAAS,EAAE,MAAM,gBAAgB,SAAS,mBAC1D,iBAAiB,aAClB;AAAA,cACJ,GAAI,OAAO,UAAU,WAAW,QAAQ;AAAA,YAC1C;AAAA,YACC,GAAG;AAAA,YAEH;AAAA;AAAA,cACA,MAAM,aACL;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG,QAAQ,UAAU,OAAO;AAAA,kBAC7B,iBAAe,SAAS;AAAA,kBACxB,OAAO;AAAA,oBACL,GAAG,QAAQ,UAAU,OAAO,EAAE;AAAA,oBAC9B,CAAC,UAAoB,GAAG,GAAG,MAAM,SAAS;AAAA,oBAC1C,OAAO,MAAM;AAAA,oBACb,QAAQ,MAAM;AAAA,oBACd,cAAc,MAAM;AAAA,oBACpB,MACE,SAAS,WAAW,SAChB,SAAS,SAAS,MAAM,YAAa,IACrC;AAAA,oBACN,KACE,SAAS,WAAW,SAChB,SAAS,SAAS,MAAM,YAAa,IACrC;AAAA,kBACR;AAAA;AAAA,cACF;AAAA;AAAA;AAAA,QAEJ;AAAA,MAEJ;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;AACD,gBAAgB,cAAc;AAE9B,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,QAAQ,cAAc;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  PopoverDropdown,
5
5
  PopoverTarget,
6
6
  usePopoverContext
7
- } from "./chunk-YRKCM3OL.js";
7
+ } from "./chunk-OHP4OBN2.js";
8
8
  import {
9
9
  UnstyledButton
10
10
  } from "./chunk-5SQC5LKY.js";
@@ -216,4 +216,4 @@ export {
216
216
  MenuLabel,
217
217
  MenuDivider
218
218
  };
219
- //# sourceMappingURL=chunk-A76QHCP5.js.map
219
+ //# sourceMappingURL=chunk-RW2ATREO.js.map
@@ -18,7 +18,7 @@ import {
18
18
  Popover,
19
19
  PopoverDropdown,
20
20
  PopoverTarget
21
- } from "./chunk-YRKCM3OL.js";
21
+ } from "./chunk-OHP4OBN2.js";
22
22
  import {
23
23
  factory
24
24
  } from "./chunk-CJ7I6UM7.js";
@@ -203,4 +203,4 @@ ColorInput.displayName = "ColorInput";
203
203
  export {
204
204
  ColorInput
205
205
  };
206
- //# sourceMappingURL=chunk-DRSBB5T4.js.map
206
+ //# sourceMappingURL=chunk-XPSIP4MN.js.map
@@ -19,7 +19,7 @@ import {
19
19
  ComboboxOptions,
20
20
  ComboboxTarget,
21
21
  useCombobox
22
- } from "./chunk-BZPG4NZ6.js";
22
+ } from "./chunk-HIYHBWWU.js";
23
23
 
24
24
  // src/components/Combobox/TagsInput.tsx
25
25
  import { useMemo, useState } from "react";
@@ -197,4 +197,4 @@ function TagsInput({
197
197
  export {
198
198
  TagsInput
199
199
  };
200
- //# sourceMappingURL=chunk-NH26XE7T.js.map
200
+ //# sourceMappingURL=chunk-ZJHKJGKJ.js.map
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  ColorInput
4
- } from "../../chunk-DRSBB5T4.js";
4
+ } from "../../chunk-XPSIP4MN.js";
5
5
  import "../../chunk-VIO22OUP.js";
6
6
  import "../../chunk-MWYGXAJQ.js";
7
7
  import "../../chunk-JJXJXOZ7.js";
8
8
  import "../../chunk-57ZKN6G3.js";
9
9
  import "../../chunk-YFBYWNYF.js";
10
10
  import "../../chunk-ZJZUNSCO.js";
11
- import "../../chunk-YRKCM3OL.js";
12
- import "../../chunk-QCMTAQSP.js";
11
+ import "../../chunk-OHP4OBN2.js";
12
+ import "../../chunk-BVUV3Y3X.js";
13
13
  import "../../chunk-AZ4WBNXD.js";
14
14
  import "../../chunk-2TFJ4SMR.js";
15
15
  import "../../chunk-H4D7LXZL.js";
@@ -15,12 +15,12 @@ import {
15
15
  ComboboxTarget,
16
16
  useCombobox,
17
17
  useComboboxContext
18
- } from "../../chunk-BZPG4NZ6.js";
18
+ } from "../../chunk-HIYHBWWU.js";
19
19
  import "../../chunk-57ZKN6G3.js";
20
20
  import "../../chunk-YFBYWNYF.js";
21
21
  import "../../chunk-ZJZUNSCO.js";
22
- import "../../chunk-YRKCM3OL.js";
23
- import "../../chunk-QCMTAQSP.js";
22
+ import "../../chunk-OHP4OBN2.js";
23
+ import "../../chunk-BVUV3Y3X.js";
24
24
  import "../../chunk-AZ4WBNXD.js";
25
25
  import "../../chunk-2TFJ4SMR.js";
26
26
  import "../../chunk-H4D7LXZL.js";
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  Select
4
- } from "../../chunk-RVFCTNPD.js";
4
+ } from "../../chunk-N54W2U6W.js";
5
5
  import "../../chunk-DHAMBKCR.js";
6
- import "../../chunk-BZPG4NZ6.js";
6
+ import "../../chunk-HIYHBWWU.js";
7
7
  import "../../chunk-JJXJXOZ7.js";
8
8
  import "../../chunk-DCC7EE67.js";
9
9
  import "../../chunk-57ZKN6G3.js";
10
10
  import "../../chunk-YFBYWNYF.js";
11
11
  import "../../chunk-ZJZUNSCO.js";
12
- import "../../chunk-YRKCM3OL.js";
13
- import "../../chunk-QCMTAQSP.js";
12
+ import "../../chunk-OHP4OBN2.js";
13
+ import "../../chunk-BVUV3Y3X.js";
14
14
  import "../../chunk-AZ4WBNXD.js";
15
15
  import "../../chunk-2TFJ4SMR.js";
16
16
  import "../../chunk-H4D7LXZL.js";
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  TagsInput
4
- } from "../../chunk-NH26XE7T.js";
4
+ } from "../../chunk-ZJHKJGKJ.js";
5
5
  import "../../chunk-CGR72YL6.js";
6
6
  import "../../chunk-UYKK6PVB.js";
7
- import "../../chunk-BZPG4NZ6.js";
7
+ import "../../chunk-HIYHBWWU.js";
8
8
  import "../../chunk-JJXJXOZ7.js";
9
9
  import "../../chunk-57ZKN6G3.js";
10
10
  import "../../chunk-YFBYWNYF.js";
11
11
  import "../../chunk-ZJZUNSCO.js";
12
- import "../../chunk-YRKCM3OL.js";
13
- import "../../chunk-QCMTAQSP.js";
12
+ import "../../chunk-OHP4OBN2.js";
13
+ import "../../chunk-BVUV3Y3X.js";
14
14
  import "../../chunk-AZ4WBNXD.js";
15
15
  import "../../chunk-2TFJ4SMR.js";
16
16
  import "../../chunk-H4D7LXZL.js";
@@ -6,9 +6,9 @@ import {
6
6
  MenuItem,
7
7
  MenuLabel,
8
8
  MenuTarget
9
- } from "../../chunk-A76QHCP5.js";
10
- import "../../chunk-YRKCM3OL.js";
11
- import "../../chunk-QCMTAQSP.js";
9
+ } from "../../chunk-RW2ATREO.js";
10
+ import "../../chunk-OHP4OBN2.js";
11
+ import "../../chunk-BVUV3Y3X.js";
12
12
  import "../../chunk-AZ4WBNXD.js";
13
13
  import "../../chunk-2TFJ4SMR.js";
14
14
  import "../../chunk-H4D7LXZL.js";
@@ -5,18 +5,18 @@ import {
5
5
  matchesPhoneStartingNumber,
6
6
  normalizeStartingNumber,
7
7
  resolvePhoneCountry
8
- } from "../../chunk-XBLREJCR.js";
8
+ } from "../../chunk-EYNM2DF5.js";
9
9
  import "../../chunk-TVOR2RGE.js";
10
- import "../../chunk-RVFCTNPD.js";
10
+ import "../../chunk-N54W2U6W.js";
11
11
  import "../../chunk-DHAMBKCR.js";
12
- import "../../chunk-BZPG4NZ6.js";
12
+ import "../../chunk-HIYHBWWU.js";
13
13
  import "../../chunk-JJXJXOZ7.js";
14
14
  import "../../chunk-DCC7EE67.js";
15
15
  import "../../chunk-57ZKN6G3.js";
16
16
  import "../../chunk-YFBYWNYF.js";
17
17
  import "../../chunk-ZJZUNSCO.js";
18
- import "../../chunk-YRKCM3OL.js";
19
- import "../../chunk-QCMTAQSP.js";
18
+ import "../../chunk-OHP4OBN2.js";
19
+ import "../../chunk-BVUV3Y3X.js";
20
20
  import "../../chunk-AZ4WBNXD.js";
21
21
  import "../../chunk-2TFJ4SMR.js";
22
22
  import "../../chunk-H4D7LXZL.js";
@@ -4,8 +4,8 @@ import {
4
4
  PopoverDropdown,
5
5
  PopoverTarget,
6
6
  usePopoverContext
7
- } from "../../chunk-YRKCM3OL.js";
8
- import "../../chunk-QCMTAQSP.js";
7
+ } from "../../chunk-OHP4OBN2.js";
8
+ import "../../chunk-BVUV3Y3X.js";
9
9
  import "../../chunk-AZ4WBNXD.js";
10
10
  import "../../chunk-2TFJ4SMR.js";
11
11
  import "../../chunk-H4D7LXZL.js";