@alikhalilll/a-tel-input 1.1.0 → 1.1.1
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/.media/README.md +3 -0
- package/.media/hero.png +0 -0
- package/README.md +15 -3
- package/dist/index.cjs +27 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +18 -4
- package/package.json +2 -1
- package/src/components/ACountrySelect.vue +17 -3
- package/web-types.json +1 -1
package/.media/README.md
ADDED
package/.media/hero.png
ADDED
|
Binary file
|
package/README.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# `@alikhalilll/a-tel-input`
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img
|
|
5
|
+
src="https://raw.githubusercontent.com/alikhalilll/ali-nuxt-toolkit/master/packages/ui-components/ATelInput/.media/hero.png"
|
|
6
|
+
alt="ATelInput — input on the left with the country picker open next to it, showing flags, country names, and dial codes"
|
|
7
|
+
width="820"
|
|
8
|
+
/>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<sub>Headless picker — popover on desktop, bottom-sheet on mobile.</sub>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
3
15
|
> A headless, shadcn-vue style **international telephone input** for Vue 3 / Nuxt 3+.
|
|
4
16
|
> Country auto-detect · libphonenumber-js validation · responsive picker (popover ⇆ drawer) ·
|
|
5
17
|
> RTL & i18n ready · first-class VeeValidate + Zod integration · server-side validation hook.
|
|
6
18
|
|
|
7
|
-
[](https://www.npmjs.com/package/@alikhalilll/a-tel-input)
|
|
8
|
-
[](./LICENSE)
|
|
9
|
-
[](https://www.npmjs.com/package/@alikhalilll/a-tel-input)
|
|
19
|
+
[](https://www.npmjs.com/package/@alikhalilll/a-tel-input)
|
|
20
|
+
[](./LICENSE)
|
|
21
|
+
[](https://www.npmjs.com/package/@alikhalilll/a-tel-input)
|
|
10
22
|
|
|
11
23
|
```bash
|
|
12
24
|
# pnpm
|
package/dist/index.cjs
CHANGED
|
@@ -16604,11 +16604,6 @@ const _sfc_main$2$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16604
16604
|
const open = (0, vue.useModel)(__props, "open");
|
|
16605
16605
|
const isDesktop = (0, _vueuse_core.useMediaQuery)(() => props.breakpoint);
|
|
16606
16606
|
/**
|
|
16607
|
-
* Pre-imported on both branches — do NOT lazy-load. Switching the component identity at runtime
|
|
16608
|
-
* means we still hydrate the right tree client-side.
|
|
16609
|
-
*/
|
|
16610
|
-
const Root = (0, vue.computed)(() => isDesktop.value ? APopover_default : ADrawer_default);
|
|
16611
|
-
/**
|
|
16612
16607
|
* Per-branch `modal` resolution — the two roots interpret the prop differently:
|
|
16613
16608
|
*
|
|
16614
16609
|
* APopover (desktop, reka-ui): `modal=true` triggers `PopoverContentModal` + its
|
|
@@ -16625,7 +16620,7 @@ const _sfc_main$2$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16625
16620
|
return props.scrollLock === "body";
|
|
16626
16621
|
});
|
|
16627
16622
|
const drawerModal = (0, vue.computed)(() => props.modal !== false);
|
|
16628
|
-
const
|
|
16623
|
+
const drawerNoBodyStyles = (0, vue.computed)(() => props.scrollLock !== "body");
|
|
16629
16624
|
provideResponsivePopoverContext({
|
|
16630
16625
|
open: (0, vue.computed)(() => open.value ?? false),
|
|
16631
16626
|
isDesktop: (0, vue.computed)(() => isDesktop.value),
|
|
@@ -16635,10 +16630,15 @@ const _sfc_main$2$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16635
16630
|
props,
|
|
16636
16631
|
open,
|
|
16637
16632
|
isDesktop,
|
|
16638
|
-
Root,
|
|
16639
16633
|
rekaModal,
|
|
16640
16634
|
drawerModal,
|
|
16641
|
-
|
|
16635
|
+
drawerNoBodyStyles,
|
|
16636
|
+
get APopover() {
|
|
16637
|
+
return APopover_default;
|
|
16638
|
+
},
|
|
16639
|
+
get ADrawer() {
|
|
16640
|
+
return ADrawer_default;
|
|
16641
|
+
}
|
|
16642
16642
|
};
|
|
16643
16643
|
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
16644
16644
|
enumerable: false,
|
|
@@ -16648,15 +16648,30 @@ const _sfc_main$2$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
16648
16648
|
}
|
|
16649
16649
|
});
|
|
16650
16650
|
function _sfc_render$2$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16651
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)(
|
|
16651
|
+
return $setup.isDesktop ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["APopover"], {
|
|
16652
|
+
key: 0,
|
|
16652
16653
|
open: $setup.open,
|
|
16653
16654
|
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => $setup.open = $event),
|
|
16654
|
-
modal: $setup.
|
|
16655
|
+
modal: $setup.rekaModal,
|
|
16656
|
+
"data-slot": "responsive-popover"
|
|
16657
|
+
}, {
|
|
16658
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { isDesktop: true })]),
|
|
16659
|
+
_: 3
|
|
16660
|
+
}, 8, ["open", "modal"])) : ((0, vue.openBlock)(), (0, vue.createBlock)($setup["ADrawer"], {
|
|
16661
|
+
key: 1,
|
|
16662
|
+
open: $setup.open,
|
|
16663
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => $setup.open = $event),
|
|
16664
|
+
modal: $setup.drawerModal,
|
|
16665
|
+
"no-body-styles": $setup.drawerNoBodyStyles,
|
|
16655
16666
|
"data-slot": "responsive-popover"
|
|
16656
16667
|
}, {
|
|
16657
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { isDesktop:
|
|
16668
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", { isDesktop: false })]),
|
|
16658
16669
|
_: 3
|
|
16659
|
-
},
|
|
16670
|
+
}, 8, [
|
|
16671
|
+
"open",
|
|
16672
|
+
"modal",
|
|
16673
|
+
"no-body-styles"
|
|
16674
|
+
]));
|
|
16660
16675
|
}
|
|
16661
16676
|
var AResponsivePopover_default = /* @__PURE__ */ export_helper_default$3(_sfc_main$2$2, [["render", _sfc_render$2$2], ["__file", "/Users/alikhalill/Desktop/my-projects/ali-nuxt-toolkit/packages/ui-components/AResponsivePopover/src/components/AResponsivePopover.vue"]]);
|
|
16662
16677
|
const _sfc_main$1$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|