@hydrateless/vue 0.6.0 → 0.7.0
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 +2 -2
- package/dist/index.d.ts +46 -17
- package/dist/index.js +12 -20
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ enhancers, with automatic cleanup when components unmount.
|
|
|
10
10
|
npm install hydrateless @hydrateless/vue
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Import the CSS once (e.g
|
|
13
|
+
Import the CSS once (e.g., in your entry):
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import 'hydrateless/hydrateless.css';
|
|
@@ -43,7 +43,7 @@ Then use the directives in any template:
|
|
|
43
43
|
|
|
44
44
|
Available directives: `v-hl-accordion`, `v-hl-disclosure`, `v-hl-tabs`,
|
|
45
45
|
`v-hl-dropdown`, `v-hl-modal`, `v-hl-drawer`, `v-hl-popover`, `v-hl-tooltip`,
|
|
46
|
-
`v-hl-toc`. You can also import individual directives (e.g
|
|
46
|
+
`v-hl-toc`. You can also import individual directives (e.g., `vHlTabs`) and
|
|
47
47
|
register them locally.
|
|
48
48
|
|
|
49
49
|
## Components
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { Ref, ShallowRef, Plugin, Directive, PropType } from 'vue';
|
|
3
|
+
import * as _hydrateless_enhancers from '@hydrateless/enhancers';
|
|
3
4
|
import { EnhancerHandle, EnhanceToastOptions, ToastApi, EnhanceTabsOptions, EnhanceDropdownOptions, EnhanceMenuOptions, EnhanceComboboxOptions } from '@hydrateless/enhancers';
|
|
4
5
|
export { AccordionApi, ComboboxApi, Disposer, DrawerApi, DropdownApi, EnhancerHandle, ModalApi, PopoverApi, TabsApi, ToastApi, TooltipApi } from '@hydrateless/enhancers';
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ declare function useEnhancer<Api = null>(target: Ref<HTMLElement | null | undefi
|
|
|
19
20
|
/**
|
|
20
21
|
* Imperative toast API backed by a lazily-created document-level region (or a
|
|
21
22
|
* `[data-hl-toast-region]` you render yourself, e.g. via `<ToastRegion>`).
|
|
22
|
-
* Safe to call from any component
|
|
23
|
+
* Safe to call from any component: no provider required.
|
|
23
24
|
*/
|
|
24
25
|
declare function useToast(options?: EnhanceToastOptions): ToastApi;
|
|
25
26
|
|
|
@@ -35,17 +36,29 @@ declare function useToast(options?: EnhanceToastOptions): ToastApi;
|
|
|
35
36
|
*/
|
|
36
37
|
declare const HydratelessPlugin: Plugin;
|
|
37
38
|
|
|
39
|
+
/** `v-hl-accordion` directive: single-open accordion behavior on the bound element. */
|
|
38
40
|
declare const vHlAccordion: Directive<HTMLElement>;
|
|
41
|
+
/** `v-hl-disclosure` directive: groups `[data-hl-disclosure]` elements within the bound element. */
|
|
39
42
|
declare const vHlDisclosure: Directive<HTMLElement>;
|
|
43
|
+
/** `v-hl-tabs` directive: ARIA and keyboard navigation for a `[data-hl-tabs]` element. */
|
|
40
44
|
declare const vHlTabs: Directive<HTMLElement>;
|
|
45
|
+
/** `v-hl-dropdown` directive: menu-button behavior for a `[data-hl-dropdown]` element. */
|
|
41
46
|
declare const vHlDropdown: Directive<HTMLElement>;
|
|
47
|
+
/** `v-hl-modal` directive: wires modal openers/closers and a focus trap within the bound element. */
|
|
42
48
|
declare const vHlModal: Directive<HTMLElement>;
|
|
49
|
+
/** `v-hl-drawer` directive: wires drawer openers/closers within the bound element. */
|
|
43
50
|
declare const vHlDrawer: Directive<HTMLElement>;
|
|
51
|
+
/** `v-hl-popover` directive: wires popover openers/closers within the bound element. */
|
|
44
52
|
declare const vHlPopover: Directive<HTMLElement>;
|
|
53
|
+
/** `v-hl-tooltip` directive: wires `[data-hl-tooltip]` triggers within the bound element. */
|
|
45
54
|
declare const vHlTooltip: Directive<HTMLElement>;
|
|
55
|
+
/** `v-hl-toc` directive: builds a table of contents from the surrounding document. */
|
|
46
56
|
declare const vHlToc: Directive<HTMLElement>;
|
|
57
|
+
/** `v-hl-menu` directive: menubar/navigation behavior for a `[data-hl-menu]` element. */
|
|
47
58
|
declare const vHlMenu: Directive<HTMLElement>;
|
|
59
|
+
/** `v-hl-combobox` directive: editable combobox behavior for a `[data-hl-combobox]` element. */
|
|
48
60
|
declare const vHlCombobox: Directive<HTMLElement>;
|
|
61
|
+
/** `v-hl-command` directive: command-palette behavior for a `[data-hl-command]` element. */
|
|
49
62
|
declare const vHlCommand: Directive<HTMLElement>;
|
|
50
63
|
/** Map of directive names (without the `v-` prefix) to their definitions. */
|
|
51
64
|
declare const directives: Record<string, Directive<HTMLElement>>;
|
|
@@ -275,7 +288,7 @@ declare const Dropdown: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
275
288
|
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
276
289
|
}>, {
|
|
277
290
|
defaultOpen: boolean;
|
|
278
|
-
placement:
|
|
291
|
+
placement: _hydrateless_enhancers.Placement | undefined;
|
|
279
292
|
open: boolean | undefined;
|
|
280
293
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
281
294
|
/** The button that opens the menu. */
|
|
@@ -408,28 +421,35 @@ declare const Drawer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
408
421
|
closeOnBackdrop: boolean;
|
|
409
422
|
side: "left" | "right";
|
|
410
423
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
424
|
+
/** Header region of a {@link Modal}. */
|
|
411
425
|
declare const ModalHeader: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
412
426
|
[key: string]: any;
|
|
413
427
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
428
|
+
/** Body region of a {@link Modal}. */
|
|
414
429
|
declare const ModalBody: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
415
430
|
[key: string]: any;
|
|
416
431
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
432
|
+
/** Footer region of a {@link Modal}. */
|
|
417
433
|
declare const ModalFooter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
418
434
|
[key: string]: any;
|
|
419
435
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
436
|
+
/** Header region of a {@link Drawer}. */
|
|
420
437
|
declare const DrawerHeader: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
421
438
|
[key: string]: any;
|
|
422
439
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
440
|
+
/** Body region of a {@link Drawer}. */
|
|
423
441
|
declare const DrawerBody: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
424
442
|
[key: string]: any;
|
|
425
443
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
444
|
+
/** Footer region of a {@link Drawer}. */
|
|
426
445
|
declare const DrawerFooter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
427
446
|
[key: string]: any;
|
|
428
447
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
429
448
|
/**
|
|
430
|
-
* Controlled floating content
|
|
431
|
-
*
|
|
432
|
-
*
|
|
449
|
+
* Controlled floating content built on the native Popover API. The surface
|
|
450
|
+
* lives in the top layer with light-dismiss and Escape handled by the browser;
|
|
451
|
+
* visibility follows `open` and `update:open` is emitted when the browser
|
|
452
|
+
* dismisses it, so `v-model:open` stays in sync. Pair with your own trigger.
|
|
433
453
|
*/
|
|
434
454
|
declare const Popover: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
435
455
|
open: {
|
|
@@ -724,15 +744,19 @@ declare function useFieldBindings(): {
|
|
|
724
744
|
'aria-describedby': string | undefined;
|
|
725
745
|
'aria-invalid': true | undefined;
|
|
726
746
|
};
|
|
747
|
+
/** Label for a {@link Field}'s control, associated with it by id. */
|
|
727
748
|
declare const FieldLabel: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
728
749
|
[key: string]: any;
|
|
729
750
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
751
|
+
/** Help text for a {@link Field}, linked to its control via `aria-describedby`. */
|
|
730
752
|
declare const FieldHelp: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
731
753
|
[key: string]: any;
|
|
732
754
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
755
|
+
/** Validation message for a {@link Field}; renders nothing until it has content. */
|
|
733
756
|
declare const FieldError: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
734
757
|
[key: string]: any;
|
|
735
758
|
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
759
|
+
/** Groups related controls in a native fieldset with an optional `legend` slot. */
|
|
736
760
|
declare const Fieldset: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
737
761
|
[key: string]: any;
|
|
738
762
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
@@ -939,7 +963,7 @@ declare const Radio: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
939
963
|
required: true;
|
|
940
964
|
};
|
|
941
965
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
942
|
-
/** Segmented control
|
|
966
|
+
/** Segmented control: a styled radiogroup. Supports `v-model`. */
|
|
943
967
|
declare const SegmentedControl: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
944
968
|
modelValue: {
|
|
945
969
|
type: StringConstructor;
|
|
@@ -997,7 +1021,7 @@ declare const SegmentedControl: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
997
1021
|
}[];
|
|
998
1022
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
999
1023
|
|
|
1000
|
-
/** Button primitive
|
|
1024
|
+
/** Button primitive: `hl-button` with intent/variant/size modifiers. */
|
|
1001
1025
|
declare const Button: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1002
1026
|
variant: {
|
|
1003
1027
|
type: PropType<"solid" | "soft" | "outline" | "ghost" | "link">;
|
|
@@ -1060,7 +1084,7 @@ declare const Button: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1060
1084
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1061
1085
|
|
|
1062
1086
|
type Intent = 'neutral' | 'primary' | 'danger' | 'success' | 'warning' | 'info';
|
|
1063
|
-
/** Alert primitive
|
|
1087
|
+
/** Alert primitive: `hl-alert` with intent, optional `icon` slot + `title`. */
|
|
1064
1088
|
declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1065
1089
|
intent: {
|
|
1066
1090
|
type: PropType<Intent>;
|
|
@@ -1085,7 +1109,7 @@ declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1085
1109
|
title: string;
|
|
1086
1110
|
intent: Intent;
|
|
1087
1111
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1088
|
-
/** Badge primitive
|
|
1112
|
+
/** Badge primitive: `hl-badge` with intent/variant/size modifiers. */
|
|
1089
1113
|
declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1090
1114
|
intent: {
|
|
1091
1115
|
type: PropType<Intent>;
|
|
@@ -1119,7 +1143,7 @@ declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1119
1143
|
variant: "solid" | "soft" | "outline";
|
|
1120
1144
|
intent: Intent;
|
|
1121
1145
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1122
|
-
/** Progress primitive
|
|
1146
|
+
/** Progress primitive: native `<progress class="hl-progress">`. */
|
|
1123
1147
|
declare const Progress: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1124
1148
|
value: {
|
|
1125
1149
|
type: NumberConstructor;
|
|
@@ -1162,7 +1186,7 @@ declare const Progress: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1162
1186
|
intent: "primary" | "danger" | "success" | "warning" | "info";
|
|
1163
1187
|
max: number;
|
|
1164
1188
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1165
|
-
/** Spinner primitive
|
|
1189
|
+
/** Spinner primitive: `hl-spinner`, announced via `role="status"`. */
|
|
1166
1190
|
declare const Spinner: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1167
1191
|
size: {
|
|
1168
1192
|
type: PropType<"sm" | "md" | "lg" | "xl">;
|
|
@@ -1187,7 +1211,7 @@ declare const Spinner: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1187
1211
|
label: string;
|
|
1188
1212
|
size: "sm" | "md" | "lg" | "xl";
|
|
1189
1213
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1190
|
-
/** Skeleton placeholder primitive
|
|
1214
|
+
/** Skeleton placeholder primitive: `hl-skeleton`. */
|
|
1191
1215
|
declare const Skeleton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1192
1216
|
variant: {
|
|
1193
1217
|
type: PropType<"rect" | "text" | "circle">;
|
|
@@ -1226,7 +1250,7 @@ declare const ToastRegion: vue.DefineComponent<{}, () => vue.VNode<vue.RendererN
|
|
|
1226
1250
|
[key: string]: any;
|
|
1227
1251
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1228
1252
|
|
|
1229
|
-
/** Card container
|
|
1253
|
+
/** Card container: `hl-card`. Compose with the Card* parts. */
|
|
1230
1254
|
declare const Card: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1231
1255
|
interactive: {
|
|
1232
1256
|
type: BooleanConstructor;
|
|
@@ -1242,22 +1266,27 @@ declare const Card: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1242
1266
|
}>> & Readonly<{}>, {
|
|
1243
1267
|
interactive: boolean;
|
|
1244
1268
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1269
|
+
/** Header region of a {@link Card}. */
|
|
1245
1270
|
declare const CardHeader: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1246
1271
|
[key: string]: any;
|
|
1247
1272
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1273
|
+
/** Body region of a {@link Card}. */
|
|
1248
1274
|
declare const CardBody: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1249
1275
|
[key: string]: any;
|
|
1250
1276
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1277
|
+
/** Footer region of a {@link Card}. */
|
|
1251
1278
|
declare const CardFooter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1252
1279
|
[key: string]: any;
|
|
1253
1280
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1281
|
+
/** Title heading of a {@link Card}. */
|
|
1254
1282
|
declare const CardTitle: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1255
1283
|
[key: string]: any;
|
|
1256
1284
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1285
|
+
/** Descriptive text of a {@link Card}. */
|
|
1257
1286
|
declare const CardDescription: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1258
1287
|
[key: string]: any;
|
|
1259
1288
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1260
|
-
/** Avatar primitive
|
|
1289
|
+
/** Avatar primitive: `hl-avatar` with image + graceful fallback. */
|
|
1261
1290
|
declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1262
1291
|
src: {
|
|
1263
1292
|
type: StringConstructor;
|
|
@@ -1304,11 +1333,11 @@ declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1304
1333
|
declare const AvatarGroup: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1305
1334
|
[key: string]: any;
|
|
1306
1335
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1307
|
-
/** Keyboard key primitive
|
|
1336
|
+
/** Keyboard key primitive: `<kbd class="hl-kbd">`. */
|
|
1308
1337
|
declare const Kbd: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1309
1338
|
[key: string]: any;
|
|
1310
1339
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1311
|
-
/** Separator primitive
|
|
1340
|
+
/** Separator primitive: `<hr class="hl-separator">`. */
|
|
1312
1341
|
declare const Separator: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1313
1342
|
orientation: {
|
|
1314
1343
|
type: PropType<"horizontal" | "vertical">;
|
|
@@ -1334,7 +1363,7 @@ declare const Separator: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1334
1363
|
decorative: boolean;
|
|
1335
1364
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1336
1365
|
|
|
1337
|
-
/** Pagination primitive
|
|
1366
|
+
/** Pagination primitive: `hl-pagination` with smart ellipsis truncation. Emits `update:page`. */
|
|
1338
1367
|
declare const Pagination: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1339
1368
|
page: {
|
|
1340
1369
|
type: NumberConstructor;
|
package/dist/index.js
CHANGED
|
@@ -396,12 +396,10 @@ var MenuItem = defineComponent4({
|
|
|
396
396
|
// src/components/overlay.ts
|
|
397
397
|
import { defineComponent as defineComponent5, h as h5, onBeforeUnmount as onBeforeUnmount2, onMounted as onMounted4, ref as ref3, watch as watch4 } from "vue";
|
|
398
398
|
import {
|
|
399
|
-
combine,
|
|
400
399
|
enhanceDrawer as enhanceDrawer2,
|
|
401
400
|
enhanceModal as enhanceModal2,
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
onEscape
|
|
401
|
+
enhancePopover as enhancePopover2,
|
|
402
|
+
enhanceTooltip as enhanceTooltip2
|
|
405
403
|
} from "@hydrateless/enhancers";
|
|
406
404
|
function useDialogEnhancer(props, emit, enhance) {
|
|
407
405
|
const { host, api } = useHostEnhancer(
|
|
@@ -488,25 +486,19 @@ var Popover = defineComponent5({
|
|
|
488
486
|
},
|
|
489
487
|
emits: ["update:open"],
|
|
490
488
|
setup(props, { slots, attrs, emit }) {
|
|
491
|
-
const host =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
const el = host.value;
|
|
497
|
-
if (!el || !props.open) return;
|
|
498
|
-
const dismiss = () => emit("update:open", false);
|
|
499
|
-
dispose = combine([onClickOutside(el, dismiss), onEscape(dismiss, el.ownerDocument)]);
|
|
500
|
-
};
|
|
501
|
-
onMounted4(sync);
|
|
502
|
-
watch4(() => props.open, sync);
|
|
503
|
-
onBeforeUnmount2(() => {
|
|
504
|
-
dispose?.();
|
|
505
|
-
dispose = null;
|
|
489
|
+
const { host, api } = useHostEnhancer(
|
|
490
|
+
(el) => enhancePopover2(el, { onOpenChange: (open) => emit("update:open", open) })
|
|
491
|
+
);
|
|
492
|
+
onMounted4(() => {
|
|
493
|
+
if (props.open) api.value?.setOpen(true);
|
|
506
494
|
});
|
|
495
|
+
watch4(
|
|
496
|
+
() => props.open,
|
|
497
|
+
(open) => api.value?.setOpen(open)
|
|
498
|
+
);
|
|
507
499
|
return () => h5(
|
|
508
500
|
"div",
|
|
509
|
-
{ ...attrs, "data-hl-popover": "",
|
|
501
|
+
{ ...attrs, "data-hl-popover": "", popover: "auto", role: "dialog", ref: host },
|
|
510
502
|
slots.default?.()
|
|
511
503
|
);
|
|
512
504
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydrateless/vue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Vue 3 bindings for Hydrateless
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Vue 3 bindings for Hydrateless: first-class components, directives, composables, and a plugin.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test": "vitest run"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hydrateless/enhancers": "^0.
|
|
31
|
+
"@hydrateless/enhancers": "^0.7.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"vue": ">=3.3"
|