@alikhalilll/ui 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/README.md +147 -195
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-o1XhV9DM.mjs +132 -0
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-o1XhV9DM.mjs.map +1 -0
- package/dist/chunks/{AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-CCGyy9Lp.mjs → AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BYEb5UBL.mjs} +9 -9
- package/dist/chunks/{AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-CCGyy9Lp.mjs.map → AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BYEb5UBL.mjs.map} +1 -1
- package/dist/chunks/{ATellInput.vue_vue_type_script_setup_true_lang-B4lyNu_f.mjs → ATellInput.vue_vue_type_script_setup_true_lang-Clc-B8SW.mjs} +2 -2
- package/dist/chunks/{ATellInput.vue_vue_type_script_setup_true_lang-B4lyNu_f.mjs.map → ATellInput.vue_vue_type_script_setup_true_lang-Clc-B8SW.mjs.map} +1 -1
- package/dist/index.d.ts +61 -53
- package/dist/index.mjs +24 -23
- package/dist/popover.d.ts +9 -1
- package/dist/popover.mjs +3 -2
- package/dist/responsive-popover.mjs +1 -1
- package/dist/tell-input.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-BRqULKIg.mjs +0 -103
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-BRqULKIg.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
|
|
|
26
26
|
size: Size;
|
|
27
27
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
|
|
29
|
-
declare const __VLS_component_10: DefineComponent<
|
|
29
|
+
declare const __VLS_component_10: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_8> & Readonly<{}>, {
|
|
30
30
|
sideOffset: number;
|
|
31
31
|
align: "start" | "center" | "end";
|
|
32
32
|
overlay: boolean;
|
|
@@ -80,7 +80,7 @@ kbdOpen: string | null;
|
|
|
80
80
|
kbdClose: string | null;
|
|
81
81
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
82
82
|
|
|
83
|
-
declare const __VLS_component_13: DefineComponent<
|
|
83
|
+
declare const __VLS_component_13: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{}>, {
|
|
84
84
|
width: number;
|
|
85
85
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
86
86
|
|
|
@@ -134,14 +134,14 @@ shouldScaleBackground: boolean;
|
|
|
134
134
|
|
|
135
135
|
declare const __VLS_component_6: DefineComponent<DrawerTriggerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DrawerTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
136
136
|
|
|
137
|
-
declare const __VLS_component_7: DefineComponent<
|
|
137
|
+
declare const __VLS_component_7: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
138
138
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
139
139
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
140
140
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
141
141
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
142
142
|
openAutoFocus: (event: Event) => any;
|
|
143
143
|
closeAutoFocus: (event: Event) => any;
|
|
144
|
-
}, string, PublicProps, Readonly<
|
|
144
|
+
}, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{
|
|
145
145
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
146
146
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
147
147
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
@@ -159,7 +159,7 @@ modal: boolean;
|
|
|
159
159
|
breakpoint: string;
|
|
160
160
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
161
161
|
|
|
162
|
-
declare const __VLS_component_9: DefineComponent<
|
|
162
|
+
declare const __VLS_component_9: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{}>, {
|
|
163
163
|
breakpoint: string;
|
|
164
164
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
165
165
|
|
|
@@ -177,6 +177,43 @@ declare type __VLS_Props = {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
declare type __VLS_Props_10 = {
|
|
180
|
+
class?: HTMLAttributes['class'];
|
|
181
|
+
triggerClass?: HTMLAttributes['class'];
|
|
182
|
+
contentClass?: HTMLAttributes['class'];
|
|
183
|
+
popoverClass?: HTMLAttributes['class'];
|
|
184
|
+
drawerClass?: HTMLAttributes['class'];
|
|
185
|
+
searchPlaceholder?: string;
|
|
186
|
+
emptyText?: string;
|
|
187
|
+
loadingText?: string;
|
|
188
|
+
suggestedLabel?: string;
|
|
189
|
+
allCountriesLabel?: string;
|
|
190
|
+
/** ISO2 codes that are selectable. Others are listed but disabled. */
|
|
191
|
+
allowedDialCodes?: string[];
|
|
192
|
+
disabled?: boolean;
|
|
193
|
+
/** Drives the trigger button padding + text size. Matches ATellInput's `size`. */
|
|
194
|
+
size?: Size;
|
|
195
|
+
/** Max items rendered under the "Suggested" header (current + recents, deduped). */
|
|
196
|
+
suggestedLimit?: number;
|
|
197
|
+
/** Cap the number of matching countries shown in search results. */
|
|
198
|
+
maxResults?: number;
|
|
199
|
+
/** Override the flag URL builder, e.g. `(iso, w) => \`/flags/${iso}.svg\``. */
|
|
200
|
+
flagUrl?: (iso2: string, width: number) => string;
|
|
201
|
+
/**
|
|
202
|
+
* Custom search predicate. Default: substring match on the precomputed `search_key`.
|
|
203
|
+
* Return `true` to keep the country in results.
|
|
204
|
+
*/
|
|
205
|
+
searcher?: (query: string, country: CountryOption) => boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Provide your own country list (bypasses the REST Countries fetch). Useful when you
|
|
208
|
+
* already have a curated subset, an i18n'd list, or want to avoid the network call.
|
|
209
|
+
*/
|
|
210
|
+
countries?: CountryOption[];
|
|
211
|
+
/** Override the right-side kbd hints. Pass `null` to hide. */
|
|
212
|
+
kbdOpen?: string | null;
|
|
213
|
+
kbdClose?: string | null;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
declare type __VLS_Props_11 = {
|
|
180
217
|
/** ISO 3166-1 alpha-2 country code, case-insensitive. */
|
|
181
218
|
iso2: string;
|
|
182
219
|
/** Pixel width served by flagcdn. 40 is crisp at retina up to ~24px wide. */
|
|
@@ -191,20 +228,26 @@ declare type __VLS_Props_10 = {
|
|
|
191
228
|
|
|
192
229
|
declare type __VLS_Props_2 = PopoverContentProps & {
|
|
193
230
|
class?: HTMLAttributes['class'];
|
|
194
|
-
/**
|
|
231
|
+
/** Dim the entire viewport behind the popover and block all interaction with the
|
|
232
|
+
* page (clicks are captured by the overlay; body scroll is locked while open).
|
|
233
|
+
* Pair with `<APopover :modal="true">` (the default) for the full modal behaviour. */
|
|
195
234
|
overlay?: boolean;
|
|
196
235
|
overlayClass?: HTMLAttributes['class'];
|
|
197
236
|
};
|
|
198
237
|
|
|
199
|
-
declare type __VLS_Props_3 =
|
|
238
|
+
declare type __VLS_Props_3 = {
|
|
200
239
|
class?: HTMLAttributes['class'];
|
|
201
240
|
};
|
|
202
241
|
|
|
203
|
-
declare type __VLS_Props_4 =
|
|
242
|
+
declare type __VLS_Props_4 = DialogContentProps & {
|
|
204
243
|
class?: HTMLAttributes['class'];
|
|
205
244
|
};
|
|
206
245
|
|
|
207
|
-
declare type __VLS_Props_5 = {
|
|
246
|
+
declare type __VLS_Props_5 = DialogOverlayProps & {
|
|
247
|
+
class?: HTMLAttributes['class'];
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
declare type __VLS_Props_6 = {
|
|
208
251
|
/** CSS media query for the desktop break. Below this width we render a vaul drawer. */
|
|
209
252
|
breakpoint?: string;
|
|
210
253
|
/**
|
|
@@ -214,12 +257,12 @@ declare type __VLS_Props_5 = {
|
|
|
214
257
|
modal?: boolean;
|
|
215
258
|
};
|
|
216
259
|
|
|
217
|
-
declare type
|
|
260
|
+
declare type __VLS_Props_7 = {
|
|
218
261
|
breakpoint?: string;
|
|
219
262
|
asChild?: boolean;
|
|
220
263
|
};
|
|
221
264
|
|
|
222
|
-
declare type
|
|
265
|
+
declare type __VLS_Props_8 = {
|
|
223
266
|
breakpoint?: string;
|
|
224
267
|
/** Classes applied on both branches. Avoid width / inset classes here. */
|
|
225
268
|
class?: HTMLAttributes['class'];
|
|
@@ -237,57 +280,20 @@ declare type __VLS_Props_7 = {
|
|
|
237
280
|
sideOffset?: number;
|
|
238
281
|
};
|
|
239
282
|
|
|
240
|
-
declare type
|
|
241
|
-
|
|
242
|
-
declare type __VLS_Props_9 = {
|
|
243
|
-
class?: HTMLAttributes['class'];
|
|
244
|
-
triggerClass?: HTMLAttributes['class'];
|
|
245
|
-
contentClass?: HTMLAttributes['class'];
|
|
246
|
-
popoverClass?: HTMLAttributes['class'];
|
|
247
|
-
drawerClass?: HTMLAttributes['class'];
|
|
248
|
-
searchPlaceholder?: string;
|
|
249
|
-
emptyText?: string;
|
|
250
|
-
loadingText?: string;
|
|
251
|
-
suggestedLabel?: string;
|
|
252
|
-
allCountriesLabel?: string;
|
|
253
|
-
/** ISO2 codes that are selectable. Others are listed but disabled. */
|
|
254
|
-
allowedDialCodes?: string[];
|
|
255
|
-
disabled?: boolean;
|
|
256
|
-
/** Drives the trigger button padding + text size. Matches ATellInput's `size`. */
|
|
257
|
-
size?: Size;
|
|
258
|
-
/** Max items rendered under the "Suggested" header (current + recents, deduped). */
|
|
259
|
-
suggestedLimit?: number;
|
|
260
|
-
/** Cap the number of matching countries shown in search results. */
|
|
261
|
-
maxResults?: number;
|
|
262
|
-
/** Override the flag URL builder, e.g. `(iso, w) => \`/flags/${iso}.svg\``. */
|
|
263
|
-
flagUrl?: (iso2: string, width: number) => string;
|
|
264
|
-
/**
|
|
265
|
-
* Custom search predicate. Default: substring match on the precomputed `search_key`.
|
|
266
|
-
* Return `true` to keep the country in results.
|
|
267
|
-
*/
|
|
268
|
-
searcher?: (query: string, country: CountryOption) => boolean;
|
|
269
|
-
/**
|
|
270
|
-
* Provide your own country list (bypasses the REST Countries fetch). Useful when you
|
|
271
|
-
* already have a curated subset, an i18n'd list, or want to avoid the network call.
|
|
272
|
-
*/
|
|
273
|
-
countries?: CountryOption[];
|
|
274
|
-
/** Override the right-side kbd hints. Pass `null` to hide. */
|
|
275
|
-
kbdOpen?: string | null;
|
|
276
|
-
kbdClose?: string | null;
|
|
277
|
-
};
|
|
283
|
+
declare type __VLS_Props_9 = ExtendedProps;
|
|
278
284
|
|
|
279
285
|
declare type __VLS_PublicProps = {
|
|
280
286
|
'open'?: boolean;
|
|
281
|
-
} &
|
|
287
|
+
} & __VLS_Props_6;
|
|
282
288
|
|
|
283
289
|
declare type __VLS_PublicProps_2 = {
|
|
284
290
|
'phone'?: string;
|
|
285
291
|
'country'?: number | null;
|
|
286
|
-
} &
|
|
292
|
+
} & __VLS_Props_9;
|
|
287
293
|
|
|
288
294
|
declare type __VLS_PublicProps_3 = {
|
|
289
295
|
'selected'?: string;
|
|
290
|
-
} &
|
|
296
|
+
} & __VLS_Props_10;
|
|
291
297
|
|
|
292
298
|
declare function __VLS_template(): {
|
|
293
299
|
attrs: Partial<{}>;
|
|
@@ -746,7 +752,7 @@ export declare const ADrawer: __VLS_WithTemplateSlots_5<typeof __VLS_component_5
|
|
|
746
752
|
|
|
747
753
|
export declare const ADrawerContent: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
748
754
|
|
|
749
|
-
export declare const ADrawerOverlay: DefineComponent<
|
|
755
|
+
export declare const ADrawerOverlay: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
750
756
|
|
|
751
757
|
export declare const ADrawerTrigger: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
752
758
|
|
|
@@ -756,6 +762,8 @@ export declare const APopover: __VLS_WithTemplateSlots_2<typeof __VLS_component_
|
|
|
756
762
|
|
|
757
763
|
export declare const APopoverContent: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
758
764
|
|
|
765
|
+
export declare const APopoverOverlay: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
766
|
+
|
|
759
767
|
export declare const APopoverTrigger: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
760
768
|
|
|
761
769
|
export declare const AResponsivePopover: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { _ as a } from "./chunks/AInput.vue_vue_type_script_setup_true_lang-BJUP7ePq.mjs";
|
|
2
|
-
import { _ as s, a as t, b as n } from "./chunks/APopoverContent.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as u, a as
|
|
5
|
-
import { _ as D, a as
|
|
2
|
+
import { _ as s, a as t, b as n, c as p } from "./chunks/APopoverContent.vue_vue_type_script_setup_true_lang-o1XhV9DM.mjs";
|
|
3
|
+
import { _ as l, a as i, b as c, c as v } from "./chunks/ADrawerContent.vue_vue_type_script_setup_true_lang-BivIZvV1.mjs";
|
|
4
|
+
import { _ as u, a as P, b as f } from "./chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BYEb5UBL.mjs";
|
|
5
|
+
import { _ as D, a as S, b as T, D as _, c as d, d as m, e as C, u as E, f as y } from "./chunks/ATellInput.vue_vue_type_script_setup_true_lang-Clc-B8SW.mjs";
|
|
6
6
|
import { c as b } from "./chunks/cn-B6yFEsav.mjs";
|
|
7
|
-
import { D as
|
|
7
|
+
import { D as w, S as F, c as h, a as O, b as U, d as H } from "./chunks/sizes-B_9MfLkz.mjs";
|
|
8
8
|
export {
|
|
9
9
|
D as ACountryFlag,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
S as ACountrySelect,
|
|
11
|
+
l as ADrawer,
|
|
12
|
+
i as ADrawerContent,
|
|
13
|
+
c as ADrawerOverlay,
|
|
14
|
+
v as ADrawerTrigger,
|
|
15
15
|
a as AInput,
|
|
16
16
|
s as APopover,
|
|
17
17
|
t as APopoverContent,
|
|
18
|
-
n as
|
|
18
|
+
n as APopoverOverlay,
|
|
19
|
+
p as APopoverTrigger,
|
|
19
20
|
u as AResponsivePopover,
|
|
20
|
-
|
|
21
|
+
P as AResponsivePopoverContent,
|
|
21
22
|
f as AResponsivePopoverTrigger,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
T as ATellInput,
|
|
24
|
+
_ as DEFAULT_ERROR_MESSAGES,
|
|
25
|
+
w as DEFAULT_SIZE,
|
|
26
|
+
F as SIZES,
|
|
27
|
+
d as aTellInputVariants,
|
|
27
28
|
b as cn,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
h as controlHeight,
|
|
30
|
+
O as controlHeightPx,
|
|
30
31
|
U as controlPaddingX,
|
|
31
32
|
H as controlTextSize,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
m as defaultFlagUrl,
|
|
34
|
+
C as detectCountry,
|
|
35
|
+
E as useCountryDetection,
|
|
36
|
+
y as usePhoneValidation
|
|
36
37
|
};
|
|
37
38
|
//# sourceMappingURL=index.mjs.map
|
package/dist/popover.d.ts
CHANGED
|
@@ -41,11 +41,17 @@ overlay: boolean;
|
|
|
41
41
|
|
|
42
42
|
declare type __VLS_Props = PopoverContentProps & {
|
|
43
43
|
class?: HTMLAttributes['class'];
|
|
44
|
-
/**
|
|
44
|
+
/** Dim the entire viewport behind the popover and block all interaction with the
|
|
45
|
+
* page (clicks are captured by the overlay; body scroll is locked while open).
|
|
46
|
+
* Pair with `<APopover :modal="true">` (the default) for the full modal behaviour. */
|
|
45
47
|
overlay?: boolean;
|
|
46
48
|
overlayClass?: HTMLAttributes['class'];
|
|
47
49
|
};
|
|
48
50
|
|
|
51
|
+
declare type __VLS_Props_2 = {
|
|
52
|
+
class?: HTMLAttributes['class'];
|
|
53
|
+
};
|
|
54
|
+
|
|
49
55
|
declare function __VLS_template(): {
|
|
50
56
|
attrs: Partial<{}>;
|
|
51
57
|
slots: {
|
|
@@ -104,6 +110,8 @@ export declare const APopover: __VLS_WithTemplateSlots<typeof __VLS_component, _
|
|
|
104
110
|
|
|
105
111
|
export declare const APopoverContent: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
106
112
|
|
|
113
|
+
export declare const APopoverOverlay: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
114
|
+
|
|
107
115
|
export declare const APopoverTrigger: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
108
116
|
|
|
109
117
|
export { }
|
package/dist/popover.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as e, a, b as p } from "./chunks/APopoverContent.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as e, a, b as p, c as v } from "./chunks/APopoverContent.vue_vue_type_script_setup_true_lang-o1XhV9DM.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as APopover,
|
|
4
4
|
a as APopoverContent,
|
|
5
|
-
p as
|
|
5
|
+
p as APopoverOverlay,
|
|
6
|
+
v as APopoverTrigger
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=popover.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as s, a as p, b as r } from "./chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as s, a as p, b as r } from "./chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BYEb5UBL.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AResponsivePopover,
|
|
4
4
|
p as AResponsivePopoverContent,
|
package/dist/tell-input.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, a as s, b as l, D as n, c as u, d as o, e as r, u as A, f as c } from "./chunks/ATellInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as e, a as s, b as l, D as n, c as u, d as o, e as r, u as A, f as c } from "./chunks/ATellInput.vue_vue_type_script_setup_true_lang-Clc-B8SW.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as ACountryFlag,
|
|
4
4
|
s as ACountrySelect,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alikhalilll/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Headless, shadcn-vue style Vue 3 component library — every component is its own importable subpath (`@alikhalilll/ui/tell-input`, `@alikhalilll/ui/popover`, …) so users pay only for what they actually use.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "alikhalilll",
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as n, createBlock as c, unref as e, mergeProps as u, withCtx as l, renderSlot as f, normalizeProps as g, guardReactiveProps as B, createElementBlock as _, normalizeClass as P, createCommentVNode as h, createVNode as b } from "vue";
|
|
2
|
-
import { useForwardPropsEmits as v, PopoverRoot as w, useForwardProps as C, PopoverTrigger as O, PopoverPortal as A, PopoverContent as k } from "reka-ui";
|
|
3
|
-
import { reactiveOmit as z } from "@vueuse/core";
|
|
4
|
-
import { c as y } from "./cn-B6yFEsav.mjs";
|
|
5
|
-
const D = /* @__PURE__ */ p({
|
|
6
|
-
__name: "APopover",
|
|
7
|
-
props: {
|
|
8
|
-
defaultOpen: { type: Boolean },
|
|
9
|
-
open: { type: Boolean },
|
|
10
|
-
modal: { type: Boolean, default: !0 }
|
|
11
|
-
},
|
|
12
|
-
emits: ["update:open"],
|
|
13
|
-
setup(t, { emit: a }) {
|
|
14
|
-
const r = v(t, a);
|
|
15
|
-
return (i, d) => (n(), c(e(w), u({ "data-slot": "popover" }, e(r)), {
|
|
16
|
-
default: l((m) => [
|
|
17
|
-
f(i.$slots, "default", g(B(m)))
|
|
18
|
-
]),
|
|
19
|
-
_: 3
|
|
20
|
-
}, 16));
|
|
21
|
-
}
|
|
22
|
-
}), E = /* @__PURE__ */ p({
|
|
23
|
-
__name: "APopoverTrigger",
|
|
24
|
-
props: {
|
|
25
|
-
asChild: { type: Boolean },
|
|
26
|
-
as: {}
|
|
27
|
-
},
|
|
28
|
-
setup(t) {
|
|
29
|
-
const o = C(t);
|
|
30
|
-
return (s, r) => (n(), c(e(O), u({ "data-slot": "popover-trigger" }, e(o)), {
|
|
31
|
-
default: l(() => [
|
|
32
|
-
f(s.$slots, "default")
|
|
33
|
-
]),
|
|
34
|
-
_: 3
|
|
35
|
-
}, 16));
|
|
36
|
-
}
|
|
37
|
-
}), j = /* @__PURE__ */ p({
|
|
38
|
-
inheritAttrs: !1,
|
|
39
|
-
__name: "APopoverContent",
|
|
40
|
-
props: {
|
|
41
|
-
forceMount: { type: Boolean },
|
|
42
|
-
side: {},
|
|
43
|
-
sideOffset: { default: 4 },
|
|
44
|
-
sideFlip: { type: Boolean },
|
|
45
|
-
align: { default: "center" },
|
|
46
|
-
alignOffset: {},
|
|
47
|
-
alignFlip: { type: Boolean },
|
|
48
|
-
avoidCollisions: { type: Boolean },
|
|
49
|
-
collisionBoundary: {},
|
|
50
|
-
collisionPadding: {},
|
|
51
|
-
arrowPadding: {},
|
|
52
|
-
hideShiftedArrow: { type: Boolean },
|
|
53
|
-
sticky: {},
|
|
54
|
-
hideWhenDetached: { type: Boolean },
|
|
55
|
-
positionStrategy: {},
|
|
56
|
-
updatePositionStrategy: {},
|
|
57
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
58
|
-
prioritizePosition: { type: Boolean },
|
|
59
|
-
reference: {},
|
|
60
|
-
asChild: { type: Boolean },
|
|
61
|
-
as: {},
|
|
62
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
63
|
-
class: { type: [Boolean, null, String, Object, Array] },
|
|
64
|
-
overlay: { type: Boolean, default: !1 },
|
|
65
|
-
overlayClass: { type: [Boolean, null, String, Object, Array] }
|
|
66
|
-
},
|
|
67
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
68
|
-
setup(t, { emit: a }) {
|
|
69
|
-
const o = t, s = a, r = z(o, "class", "overlay", "overlayClass"), i = v(r, s);
|
|
70
|
-
return (d, m) => (n(), c(e(A), null, {
|
|
71
|
-
default: l(() => [
|
|
72
|
-
o.overlay ? (n(), _("div", {
|
|
73
|
-
key: 0,
|
|
74
|
-
"data-slot": "popover-overlay",
|
|
75
|
-
class: P(
|
|
76
|
-
e(y)(
|
|
77
|
-
"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
78
|
-
o.overlayClass
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
}, null, 2)) : h("", !0),
|
|
82
|
-
b(e(k), u({ "data-slot": "popover-content" }, { ...d.$attrs, ...e(i) }, {
|
|
83
|
-
class: e(y)(
|
|
84
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",
|
|
85
|
-
o.class
|
|
86
|
-
)
|
|
87
|
-
}), {
|
|
88
|
-
default: l(() => [
|
|
89
|
-
f(d.$slots, "default")
|
|
90
|
-
]),
|
|
91
|
-
_: 3
|
|
92
|
-
}, 16, ["class"])
|
|
93
|
-
]),
|
|
94
|
-
_: 3
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
export {
|
|
99
|
-
D as _,
|
|
100
|
-
j as a,
|
|
101
|
-
E as b
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=APopoverContent.vue_vue_type_script_setup_true_lang-BRqULKIg.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"APopoverContent.vue_vue_type_script_setup_true_lang-BRqULKIg.mjs","sources":["../../entries/popover/components/APopover.vue","../../entries/popover/components/APopoverTrigger.vue","../../entries/popover/components/APopoverContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { PopoverRootEmits, PopoverRootProps } from 'reka-ui';\nimport { PopoverRoot, useForwardPropsEmits } from 'reka-ui';\n\n/**\n * Defaults `modal` to `true` so the popover locks page scroll, traps focus, and an overlay\n * (rendered by APopoverContent when `overlay` is set) actually dims the page.\n * Pass `:modal=\"false\"` for tooltip-style non-modal popovers.\n */\nconst props = withDefaults(defineProps<PopoverRootProps>(), { modal: true });\nconst emits = defineEmits<PopoverRootEmits>();\nconst forwarded = useForwardPropsEmits(props, emits);\n</script>\n\n<template>\n <PopoverRoot v-slot=\"slotProps\" data-slot=\"popover\" v-bind=\"forwarded\">\n <slot v-bind=\"slotProps\" />\n </PopoverRoot>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopoverTriggerProps } from 'reka-ui';\nimport { PopoverTrigger, useForwardProps } from 'reka-ui';\n\nconst props = defineProps<PopoverTriggerProps>();\nconst forwarded = useForwardProps(props);\n</script>\n\n<template>\n <PopoverTrigger data-slot=\"popover-trigger\" v-bind=\"forwarded\">\n <slot />\n </PopoverTrigger>\n</template>\n","<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport { reactiveOmit } from '@vueuse/core';\nimport {\n PopoverContent,\n type PopoverContentEmits,\n type PopoverContentProps,\n PopoverPortal,\n useForwardPropsEmits,\n} from 'reka-ui';\nimport { cn } from '@/utils';\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(\n defineProps<\n PopoverContentProps & {\n class?: HTMLAttributes['class'];\n /** Render a dimmed, clickable backdrop behind the popover. Pair with `<APopover modal>`. */\n overlay?: boolean;\n overlayClass?: HTMLAttributes['class'];\n }\n >(),\n { align: 'center', sideOffset: 4, overlay: false }\n);\nconst emits = defineEmits<PopoverContentEmits>();\nconst delegated = reactiveOmit(props, 'class', 'overlay', 'overlayClass');\nconst forwarded = useForwardPropsEmits(delegated, emits);\n</script>\n\n<template>\n <PopoverPortal>\n <!--\n Overlay is a sibling of PopoverContent inside the same portal. Reka-ui's\n DismissableLayer treats any pointer-down outside the content as a dismiss,\n so clicking the overlay closes the popover for free. We still mark it\n pointer-events:auto explicitly to be safe.\n -->\n <div\n v-if=\"props.overlay\"\n data-slot=\"popover-overlay\"\n :class=\"\n cn(\n 'fixed inset-0 z-40 bg-black/60 backdrop-blur-sm pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n props.overlayClass\n )\n \"\n />\n <PopoverContent\n data-slot=\"popover-content\"\n v-bind=\"{ ...$attrs, ...forwarded }\"\n :class=\"\n cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n props.class\n )\n \"\n >\n <slot />\n </PopoverContent>\n </PopoverPortal>\n</template>\n"],"names":["forwarded","useForwardPropsEmits","__props","__emit","_openBlock","_createBlock","_unref","_mergeProps","_withCtx","slotProps","_renderSlot","_ctx","useForwardProps","props","emits","delegated","reactiveOmit","PopoverPortal","_createElementBlock","_normalizeClass","cn","_createVNode","PopoverContent","$attrs"],"mappings":";;;;;;;;;;;;;AAWA,UAAMA,IAAYC,EAFJC,GACAC,CACqC;sBAIjDC,EAAA,GAAAC,EAEcC,MAFdC,EAEc,EAFkB,aAAU,UAAA,GAAkBD,EAAAN,CAAA,CAAS,GAAA;AAAA,MACnE,SAAAQ,EAAA,CADmBC,MAAS;AAAA,QAC5BC,EAA2BC,yBAAbF,CAAS,CAAA,CAAA;AAAA,MAAA;;;;;;;;;;;ACX3B,UAAMT,IAAYY,EADJV,CACyB;sBAIrCE,EAAA,GAAAC,EAEiBC,MAFjBC,EAEiB,EAFD,aAAU,kBAAA,GAA0BD,EAAAN,CAAA,CAAS,GAAA;AAAA,iBAC3D,MAAQ;AAAA,QAARU,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIZ,UAAME,IAAQX,GAWRY,IAAQX,GACRY,IAAYC,EAAaH,GAAO,SAAS,WAAW,cAAc,GAClEb,IAAYC,EAAqBc,GAAWD,CAAK;2BAIrDT,EA6BgBC,EAAAW,CAAA,GAAA,MAAA;AAAA,iBAtBd,MASE;AAAA,QARMJ,EAAM,gBADdK,EASE,OAAA;AAAA;UAPA,aAAU;AAAA,UACT,OAAKC;AAAAA,YAAWb,EAAAc,CAAA;AAAA;cAAuNP,EAAM;AAAA,YAAA;AAAA;;QAOhPQ,EAWiBf,EAAAgB,CAAA,GAXjBf,EAWiB,EAVf,aAAU,kBAAA,GAAiB,EAAA,GACdgB,EAAAA,QAAM,GAAKjB,EAAAN,CAAA,KAAS;AAAA,UAChC,OAAgBM,EAAAc,CAAA;AAAA;YAAscP,EAAM;AAAA,UAAA;AAAA;qBAO7d,MAAQ;AAAA,YAARH,EAAQC,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;;"}
|