@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.3
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/dist/components/VvAccordion/VvAccordion.es.js +7 -0
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvAction/VvAction.es.js +9 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +3 -0
- package/dist/components/VvAction/index.d.ts +1 -0
- package/dist/components/VvAlert/VvAlert.es.js +7 -0
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +7 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +7 -0
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +9 -1
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +6 -3
- package/dist/components/VvButton/index.d.ts +1 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvCard/VvCard.es.js +7 -0
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -3
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +7 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +16 -2
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +37 -37
- package/dist/components/VvCombobox/index.d.ts +13 -11
- package/dist/components/VvDialog/VvDialog.es.js +7 -0
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +7 -0
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +31 -31
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +3 -0
- package/dist/components/VvDropdown/index.d.ts +10 -10
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +7 -0
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvNav/VvNav.es.js +69 -56
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +12 -8
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/index.d.ts +1 -12
- package/dist/components/VvNavItem/VvNavItem.es.js +392 -0
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.es.js +7 -0
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +7 -0
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +7 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +7 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +7 -7
- package/dist/components/VvTab/VvTab.es.js +127 -87
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +19 -6
- package/dist/components/VvTab/index.d.ts +9 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +7 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +246 -200
- package/dist/components/index.umd.js +1 -1
- package/dist/directives/index.es.js +7 -0
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +7 -0
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +29 -12
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +5 -5
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +31 -31
- package/dist/stories/Tab/Tab.settings.d.ts +3 -23
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/floating-ui.d.ts +6 -0
- package/dist/types/generic.d.ts +5 -0
- package/dist/types/group.d.ts +37 -0
- package/dist/types/nav.d.ts +17 -0
- package/package.json +41 -33
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAction/VvAction.vue +1 -0
- package/src/components/VvCombobox/VvCombobox.vue +11 -4
- package/src/components/VvNav/VvNav.vue +29 -51
- package/src/components/VvNav/VvNavItem.vue +18 -0
- package/src/components/VvNav/VvNavSeparator.vue +11 -0
- package/src/components/VvNav/index.ts +2 -15
- package/src/components/VvTab/VvTab.vue +60 -36
- package/src/components/VvTab/index.ts +10 -4
- package/src/props/index.ts +19 -3
- package/src/stories/Nav/Nav.settings.ts +3 -4
- package/src/stories/Nav/Nav.test.ts +4 -15
- package/src/stories/Tab/Tab.settings.ts +8 -8
- package/src/stories/Tab/Tab.stories.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +6 -14
- package/src/types/nav.ts +19 -0
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
- package/src/components/VvNav/VvNavItemTitle.vue +0 -11
- package/src/components/VvNav/VvNavSeparator.ts +0 -8
- /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
- /package/src/types/{alert.d.ts → alert.ts} +0 -0
- /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
- /package/src/types/{generic.d.ts → generic.ts} +0 -0
- /package/src/types/{group.d.ts → group.ts} +0 -0
|
@@ -95,24 +95,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
95
95
|
};
|
|
96
96
|
shift: {
|
|
97
97
|
type: globalThis.PropType<boolean | {
|
|
98
|
-
mainAxis?: boolean | undefined;
|
|
99
|
-
crossAxis?: boolean | undefined;
|
|
100
98
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
101
99
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
102
100
|
altBoundary?: boolean | undefined;
|
|
103
101
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
102
|
+
crossAxis?: boolean | undefined;
|
|
103
|
+
mainAxis?: boolean | undefined;
|
|
104
104
|
limiter?: {
|
|
105
105
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
106
106
|
options?: any;
|
|
107
107
|
} | undefined;
|
|
108
108
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
109
109
|
} | import("@floating-ui/dom").Derivable<{
|
|
110
|
-
mainAxis?: boolean | undefined;
|
|
111
|
-
crossAxis?: boolean | undefined;
|
|
112
110
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
113
111
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
114
112
|
altBoundary?: boolean | undefined;
|
|
115
113
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
114
|
+
crossAxis?: boolean | undefined;
|
|
115
|
+
mainAxis?: boolean | undefined;
|
|
116
116
|
limiter?: {
|
|
117
117
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
118
118
|
options?: any;
|
|
@@ -123,24 +123,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
123
123
|
};
|
|
124
124
|
flip: {
|
|
125
125
|
type: globalThis.PropType<boolean | {
|
|
126
|
-
mainAxis?: boolean | undefined;
|
|
127
|
-
crossAxis?: boolean | undefined;
|
|
128
126
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
129
127
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
130
128
|
altBoundary?: boolean | undefined;
|
|
131
129
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
130
|
+
crossAxis?: boolean | undefined;
|
|
131
|
+
mainAxis?: boolean | undefined;
|
|
132
132
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
133
133
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
134
134
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
135
135
|
flipAlignment?: boolean | undefined;
|
|
136
136
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
137
137
|
} | import("@floating-ui/dom").Derivable<{
|
|
138
|
-
mainAxis?: boolean | undefined;
|
|
139
|
-
crossAxis?: boolean | undefined;
|
|
140
138
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
141
139
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
142
140
|
altBoundary?: boolean | undefined;
|
|
143
141
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
142
|
+
crossAxis?: boolean | undefined;
|
|
143
|
+
mainAxis?: boolean | undefined;
|
|
144
144
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
145
145
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
146
146
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
@@ -197,21 +197,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
197
197
|
};
|
|
198
198
|
autoPlacement: {
|
|
199
199
|
type: globalThis.PropType<boolean | {
|
|
200
|
-
crossAxis?: boolean | undefined;
|
|
201
200
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
202
201
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
203
202
|
altBoundary?: boolean | undefined;
|
|
204
203
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
204
|
+
crossAxis?: boolean | undefined;
|
|
205
205
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
206
206
|
autoAlignment?: boolean | undefined;
|
|
207
207
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
208
208
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
209
209
|
} | import("@floating-ui/dom").Derivable<{
|
|
210
|
-
crossAxis?: boolean | undefined;
|
|
211
210
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
212
211
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
213
212
|
altBoundary?: boolean | undefined;
|
|
214
213
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
214
|
+
crossAxis?: boolean | undefined;
|
|
215
215
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
216
216
|
autoAlignment?: boolean | undefined;
|
|
217
217
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
@@ -377,24 +377,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
377
377
|
};
|
|
378
378
|
shift: {
|
|
379
379
|
type: globalThis.PropType<boolean | {
|
|
380
|
-
mainAxis?: boolean | undefined;
|
|
381
|
-
crossAxis?: boolean | undefined;
|
|
382
380
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
383
381
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
384
382
|
altBoundary?: boolean | undefined;
|
|
385
383
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
384
|
+
crossAxis?: boolean | undefined;
|
|
385
|
+
mainAxis?: boolean | undefined;
|
|
386
386
|
limiter?: {
|
|
387
387
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
388
388
|
options?: any;
|
|
389
389
|
} | undefined;
|
|
390
390
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
391
391
|
} | import("@floating-ui/dom").Derivable<{
|
|
392
|
-
mainAxis?: boolean | undefined;
|
|
393
|
-
crossAxis?: boolean | undefined;
|
|
394
392
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
395
393
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
396
394
|
altBoundary?: boolean | undefined;
|
|
397
395
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
396
|
+
crossAxis?: boolean | undefined;
|
|
397
|
+
mainAxis?: boolean | undefined;
|
|
398
398
|
limiter?: {
|
|
399
399
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
400
400
|
options?: any;
|
|
@@ -405,24 +405,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
405
405
|
};
|
|
406
406
|
flip: {
|
|
407
407
|
type: globalThis.PropType<boolean | {
|
|
408
|
-
mainAxis?: boolean | undefined;
|
|
409
|
-
crossAxis?: boolean | undefined;
|
|
410
408
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
411
409
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
412
410
|
altBoundary?: boolean | undefined;
|
|
413
411
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
412
|
+
crossAxis?: boolean | undefined;
|
|
413
|
+
mainAxis?: boolean | undefined;
|
|
414
414
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
415
415
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
416
416
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
417
417
|
flipAlignment?: boolean | undefined;
|
|
418
418
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
419
419
|
} | import("@floating-ui/dom").Derivable<{
|
|
420
|
-
mainAxis?: boolean | undefined;
|
|
421
|
-
crossAxis?: boolean | undefined;
|
|
422
420
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
423
421
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
424
422
|
altBoundary?: boolean | undefined;
|
|
425
423
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
424
|
+
crossAxis?: boolean | undefined;
|
|
425
|
+
mainAxis?: boolean | undefined;
|
|
426
426
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
427
427
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
428
428
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
@@ -479,21 +479,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
479
479
|
};
|
|
480
480
|
autoPlacement: {
|
|
481
481
|
type: globalThis.PropType<boolean | {
|
|
482
|
-
crossAxis?: boolean | undefined;
|
|
483
482
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
484
483
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
485
484
|
altBoundary?: boolean | undefined;
|
|
486
485
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
486
|
+
crossAxis?: boolean | undefined;
|
|
487
487
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
488
488
|
autoAlignment?: boolean | undefined;
|
|
489
489
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
490
490
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
491
491
|
} | import("@floating-ui/dom").Derivable<{
|
|
492
|
-
crossAxis?: boolean | undefined;
|
|
493
492
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
494
493
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
495
494
|
altBoundary?: boolean | undefined;
|
|
496
495
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
496
|
+
crossAxis?: boolean | undefined;
|
|
497
497
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
498
498
|
autoAlignment?: boolean | undefined;
|
|
499
499
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
@@ -566,31 +566,36 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
566
566
|
}>> & {
|
|
567
567
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
568
568
|
}, {
|
|
569
|
+
readonly: boolean;
|
|
569
570
|
disabled: boolean;
|
|
570
|
-
|
|
571
|
+
valid: boolean;
|
|
572
|
+
invalid: boolean;
|
|
573
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
574
|
+
multiple: boolean;
|
|
575
|
+
unselectable: boolean;
|
|
571
576
|
options: (string | Option)[];
|
|
577
|
+
floating: boolean;
|
|
572
578
|
placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
573
579
|
strategy: "absolute" | "fixed";
|
|
574
|
-
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
575
580
|
shift: boolean | {
|
|
576
|
-
mainAxis?: boolean | undefined;
|
|
577
|
-
crossAxis?: boolean | undefined;
|
|
578
581
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
579
582
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
580
583
|
altBoundary?: boolean | undefined;
|
|
581
584
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
585
|
+
crossAxis?: boolean | undefined;
|
|
586
|
+
mainAxis?: boolean | undefined;
|
|
582
587
|
limiter?: {
|
|
583
588
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
584
589
|
options?: any;
|
|
585
590
|
} | undefined;
|
|
586
591
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
587
592
|
} | import("@floating-ui/dom").Derivable<{
|
|
588
|
-
mainAxis?: boolean | undefined;
|
|
589
|
-
crossAxis?: boolean | undefined;
|
|
590
593
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
591
594
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
592
595
|
altBoundary?: boolean | undefined;
|
|
593
596
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
597
|
+
crossAxis?: boolean | undefined;
|
|
598
|
+
mainAxis?: boolean | undefined;
|
|
594
599
|
limiter?: {
|
|
595
600
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
596
601
|
options?: any;
|
|
@@ -598,26 +603,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
598
603
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
599
604
|
}> | undefined;
|
|
600
605
|
tabindex: string | number;
|
|
601
|
-
unselectable: boolean;
|
|
602
606
|
flip: boolean | {
|
|
603
|
-
mainAxis?: boolean | undefined;
|
|
604
|
-
crossAxis?: boolean | undefined;
|
|
605
607
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
606
608
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
607
609
|
altBoundary?: boolean | undefined;
|
|
608
610
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
611
|
+
crossAxis?: boolean | undefined;
|
|
612
|
+
mainAxis?: boolean | undefined;
|
|
609
613
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
610
614
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
611
615
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
612
616
|
flipAlignment?: boolean | undefined;
|
|
613
617
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
614
618
|
} | import("@floating-ui/dom").Derivable<{
|
|
615
|
-
mainAxis?: boolean | undefined;
|
|
616
|
-
crossAxis?: boolean | undefined;
|
|
617
619
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
618
620
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
619
621
|
altBoundary?: boolean | undefined;
|
|
620
622
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
623
|
+
crossAxis?: boolean | undefined;
|
|
624
|
+
mainAxis?: boolean | undefined;
|
|
621
625
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
622
626
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
623
627
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
@@ -628,11 +632,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
628
632
|
iconPosition: "before" | "after";
|
|
629
633
|
loading: boolean;
|
|
630
634
|
loadingLabel: string;
|
|
631
|
-
multiple: boolean;
|
|
632
|
-
readonly: boolean;
|
|
633
635
|
hintLabel: string;
|
|
634
|
-
invalid: boolean;
|
|
635
|
-
valid: boolean;
|
|
636
636
|
size: boolean | {
|
|
637
637
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
638
638
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
@@ -680,21 +680,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
680
680
|
transitionName: string;
|
|
681
681
|
offset: string | import("@floating-ui/core").OffsetOptions | undefined;
|
|
682
682
|
autoPlacement: boolean | {
|
|
683
|
-
crossAxis?: boolean | undefined;
|
|
684
683
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
685
684
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
686
685
|
altBoundary?: boolean | undefined;
|
|
687
686
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
687
|
+
crossAxis?: boolean | undefined;
|
|
688
688
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
689
689
|
autoAlignment?: boolean | undefined;
|
|
690
690
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
691
691
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
692
692
|
} | import("@floating-ui/dom").Derivable<{
|
|
693
|
-
crossAxis?: boolean | undefined;
|
|
694
693
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
695
694
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
696
695
|
altBoundary?: boolean | undefined;
|
|
697
696
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
697
|
+
crossAxis?: boolean | undefined;
|
|
698
698
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
699
699
|
autoAlignment?: boolean | undefined;
|
|
700
700
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
@@ -169,24 +169,24 @@ export declare const VvComboboxProps: {
|
|
|
169
169
|
};
|
|
170
170
|
shift: {
|
|
171
171
|
type: PropType<boolean | {
|
|
172
|
-
mainAxis?: boolean | undefined;
|
|
173
|
-
crossAxis?: boolean | undefined;
|
|
174
172
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
175
173
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
176
174
|
altBoundary?: boolean | undefined;
|
|
177
175
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
176
|
+
crossAxis?: boolean | undefined;
|
|
177
|
+
mainAxis?: boolean | undefined;
|
|
178
178
|
limiter?: {
|
|
179
179
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
180
180
|
options?: any;
|
|
181
181
|
} | undefined;
|
|
182
182
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
183
183
|
} | import("@floating-ui/dom").Derivable<{
|
|
184
|
-
mainAxis?: boolean | undefined;
|
|
185
|
-
crossAxis?: boolean | undefined;
|
|
186
184
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
187
185
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
188
186
|
altBoundary?: boolean | undefined;
|
|
189
187
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
188
|
+
crossAxis?: boolean | undefined;
|
|
189
|
+
mainAxis?: boolean | undefined;
|
|
190
190
|
limiter?: {
|
|
191
191
|
fn: (state: import("@floating-ui/core").MiddlewareState) => import("@floating-ui/core").Coords;
|
|
192
192
|
options?: any;
|
|
@@ -197,24 +197,24 @@ export declare const VvComboboxProps: {
|
|
|
197
197
|
};
|
|
198
198
|
flip: {
|
|
199
199
|
type: PropType<boolean | {
|
|
200
|
-
mainAxis?: boolean | undefined;
|
|
201
|
-
crossAxis?: boolean | undefined;
|
|
202
200
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
203
201
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
204
202
|
altBoundary?: boolean | undefined;
|
|
205
203
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
204
|
+
crossAxis?: boolean | undefined;
|
|
205
|
+
mainAxis?: boolean | undefined;
|
|
206
206
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
207
207
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
208
208
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
209
209
|
flipAlignment?: boolean | undefined;
|
|
210
210
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
211
211
|
} | import("@floating-ui/dom").Derivable<{
|
|
212
|
-
mainAxis?: boolean | undefined;
|
|
213
|
-
crossAxis?: boolean | undefined;
|
|
214
212
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
215
213
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
216
214
|
altBoundary?: boolean | undefined;
|
|
217
215
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
216
|
+
crossAxis?: boolean | undefined;
|
|
217
|
+
mainAxis?: boolean | undefined;
|
|
218
218
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
219
219
|
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
220
220
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
@@ -271,21 +271,21 @@ export declare const VvComboboxProps: {
|
|
|
271
271
|
};
|
|
272
272
|
autoPlacement: {
|
|
273
273
|
type: PropType<boolean | {
|
|
274
|
-
crossAxis?: boolean | undefined;
|
|
275
274
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
276
275
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
277
276
|
altBoundary?: boolean | undefined;
|
|
278
277
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
278
|
+
crossAxis?: boolean | undefined;
|
|
279
279
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
280
280
|
autoAlignment?: boolean | undefined;
|
|
281
281
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
282
282
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
283
283
|
} | import("@floating-ui/dom").Derivable<{
|
|
284
|
-
crossAxis?: boolean | undefined;
|
|
285
284
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
286
285
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
287
286
|
altBoundary?: boolean | undefined;
|
|
288
287
|
padding?: import("@floating-ui/utils").Padding | undefined;
|
|
288
|
+
crossAxis?: boolean | undefined;
|
|
289
289
|
alignment?: import("@floating-ui/utils").Alignment | null | undefined;
|
|
290
290
|
autoAlignment?: boolean | undefined;
|
|
291
291
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
@@ -323,7 +323,9 @@ export declare const VvComboboxProps: {
|
|
|
323
323
|
default: string;
|
|
324
324
|
};
|
|
325
325
|
valueKey: {
|
|
326
|
-
type: (StringConstructor | FunctionConstructor)[];
|
|
326
|
+
type: (StringConstructor | FunctionConstructor)[]; /**
|
|
327
|
+
* Show native select
|
|
328
|
+
*/
|
|
327
329
|
default: string;
|
|
328
330
|
};
|
|
329
331
|
disabledKey: {
|
|
@@ -298,6 +298,12 @@ const ActiveProps = {
|
|
|
298
298
|
*/
|
|
299
299
|
active: Boolean
|
|
300
300
|
};
|
|
301
|
+
const CurrentProps = {
|
|
302
|
+
/**
|
|
303
|
+
* Whether the item is current
|
|
304
|
+
*/
|
|
305
|
+
current: Boolean
|
|
306
|
+
};
|
|
301
307
|
const PressedProps = {
|
|
302
308
|
/**
|
|
303
309
|
* Whether the item is pressed
|
|
@@ -429,6 +435,7 @@ const IdProps = {
|
|
|
429
435
|
...LabelProps,
|
|
430
436
|
...PressedProps,
|
|
431
437
|
...ActiveProps,
|
|
438
|
+
...CurrentProps,
|
|
432
439
|
...LinkProps,
|
|
433
440
|
/**
|
|
434
441
|
* Button type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDialog=o(e.vue,e.vue$1,e.core)}(this,(function(e,o,t){"use strict";const n={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{});const a=Symbol.for("volver");const c=e.defineComponent({name:"VvIcon",props:n,setup(t){const n=t,r=e.computed((()=>"string"==typeof n.rotate?parseFloat(n.rotate):n.rotate)),l=e.ref(!0),i=e.inject(a),{modifiers:c}=e.toRefs(n),s=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-icon",c),u=e.computed((()=>n.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=n.name??"",t=`@${u.value}:${n.prefix}:${e}`;if(o.iconExists(t))return t;const r=null==i?void 0:i.iconsCollections.find((t=>{const n=`@${u.value}:${t.prefix}:${e}`;return o.iconExists(n)}));return r?`@${u.value}:${r.prefix}:${e}`:e}));function v(e){const t=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),r=(null==t?void 0:t.innerHTML.trim())||"";t&&r&&o.addIcon(`@${u.value}:${n.prefix}:${n.name}`,{body:r,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&n.src&&!o.iconExists(`@${u.value}:${n.prefix}:${n.name}`)&&(l.value=!1,i.fetchIcon(n.src).then((e=>{e&&(v(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),n.svg&&v(n.svg),(t,n)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(s)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(r),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}});Boolean,Boolean,Boolean;l.before;const s={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,i.button;const u={...s,title:String,modelValue:{type:Boolean,default:void 0},transition:{type:String,default:"fade-block"},size:String,keepOpen:{type:Boolean,default:!1}},d=["onCancel"],v={key:0,class:"vv-dialog__header"},f={class:"vv-dialog__content"},p={key:1,class:"vv-dialog__footer"};return e.defineComponent({name:"VvDialog",props:u,emits:["open","close","update:modelValue","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(o,{expose:n,emit:r}){const l=o,i=e.ref(),a=t.useVModel(l,"modelValue",r),s=e.ref(!1),u=e.computed({get:()=>a.value??s.value,set:e=>{void 0!==a.value?a.value=e:s.value=e}}),m=e.ref(null),g=e.computed((()=>{const{id:e}=l;return{id:e}})),h=e.computed((()=>l.size?["vv-dialog",`vv-dialog--${l.size}`]:"vv-dialog")),b=e.computed((()=>`vv-dialog--${l.transition}`)),y={"before-enter":()=>{var e,o;(null==(e=i.value)?void 0:e.open)||null==(o=i.value)||o.showModal(),r("open"),r("before-enter")},"after-leave":()=>{var e,o;(null==(e=i.value)?void 0:e.open)&&(null==(o=i.value)||o.close()),r("close"),r("after-leave")},enter:()=>{r("enter")},"after-enter":()=>{r("after-enter")},"enter-cancelled":()=>{r("enter-cancelled")},"before-leave":()=>{r("before-leave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leave-cancelled")}};function $(){u.value=!1}t.onClickOutside(m,(()=>{l.keepOpen||$()})),n({close:$,open:function(){u.value=!0}});const B=()=>{l.keepOpen||$()};return(o,t)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({name:e.unref(b)},e.toHandlers(y)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("dialog",e.mergeProps(e.unref(g),{ref_key:"dialogEl",ref:i,class:e.unref(h),onCancel:e.withModifiers(B,["stop","prevent"])}),[e.createElementVNode("article",{ref_key:"modalWrapper",ref:m,class:"vv-dialog__wrapper"},[o.$slots.header||o.title?(e.openBlock(),e.createElementBlock("header",v,[e.renderSlot(o.$slots,"header",{},(()=>[e.createTextVNode(e.toDisplayString(o.title)+" ",1),e.createElementVNode("button",{type:"button","aria-label":"Close",class:"vv-dialog__close",onClickPassive:$},[e.createVNode(c,{name:"close"})],32)]))])):e.createCommentVNode("",!0),e.createElementVNode("div",f,[e.renderSlot(o.$slots,"default")]),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",p,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("",!0)],512)],16,d),[[e.vShow,e.unref(u)]])])),_:3},16,["name"]))}})}));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@vueuse/core"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDialog=o(e.vue,e.vue$1,e.core)}(this,(function(e,o,t){"use strict";const n={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),l=(e=>(e.before="before",e.after="after",e))(l||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{});const a=Symbol.for("volver");const c=e.defineComponent({name:"VvIcon",props:n,setup(t){const n=t,r=e.computed((()=>"string"==typeof n.rotate?parseFloat(n.rotate):n.rotate)),l=e.ref(!0),i=e.inject(a),{modifiers:c}=e.toRefs(n),s=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-icon",c),u=e.computed((()=>n.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=n.name??"",t=`@${u.value}:${n.prefix}:${e}`;if(o.iconExists(t))return t;const r=null==i?void 0:i.iconsCollections.find((t=>{const n=`@${u.value}:${t.prefix}:${e}`;return o.iconExists(n)}));return r?`@${u.value}:${r.prefix}:${e}`:e}));function v(e){const t=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),r=(null==t?void 0:t.innerHTML.trim())||"";t&&r&&o.addIcon(`@${u.value}:${n.prefix}:${n.name}`,{body:r,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&n.src&&!o.iconExists(`@${u.value}:${n.prefix}:${n.name}`)&&(l.value=!1,i.fetchIcon(n.src).then((e=>{e&&(v(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),n.svg&&v(n.svg),(t,n)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(s)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(r),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("",!0)}});Boolean,Boolean,Boolean,Boolean;l.before;const s={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,i.button;const u={...s,title:String,modelValue:{type:Boolean,default:void 0},transition:{type:String,default:"fade-block"},size:String,keepOpen:{type:Boolean,default:!1}},d=["onCancel"],v={key:0,class:"vv-dialog__header"},f={class:"vv-dialog__content"},p={key:1,class:"vv-dialog__footer"};return e.defineComponent({name:"VvDialog",props:u,emits:["open","close","update:modelValue","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(o,{expose:n,emit:r}){const l=o,i=e.ref(),a=t.useVModel(l,"modelValue",r),s=e.ref(!1),u=e.computed({get:()=>a.value??s.value,set:e=>{void 0!==a.value?a.value=e:s.value=e}}),m=e.ref(null),g=e.computed((()=>{const{id:e}=l;return{id:e}})),h=e.computed((()=>l.size?["vv-dialog",`vv-dialog--${l.size}`]:"vv-dialog")),b=e.computed((()=>`vv-dialog--${l.transition}`)),y={"before-enter":()=>{var e,o;(null==(e=i.value)?void 0:e.open)||null==(o=i.value)||o.showModal(),r("open"),r("before-enter")},"after-leave":()=>{var e,o;(null==(e=i.value)?void 0:e.open)&&(null==(o=i.value)||o.close()),r("close"),r("after-leave")},enter:()=>{r("enter")},"after-enter":()=>{r("after-enter")},"enter-cancelled":()=>{r("enter-cancelled")},"before-leave":()=>{r("before-leave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leave-cancelled")}};function $(){u.value=!1}t.onClickOutside(m,(()=>{l.keepOpen||$()})),n({close:$,open:function(){u.value=!0}});const B=()=>{l.keepOpen||$()};return(o,t)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({name:e.unref(b)},e.toHandlers(y)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("dialog",e.mergeProps(e.unref(g),{ref_key:"dialogEl",ref:i,class:e.unref(h),onCancel:e.withModifiers(B,["stop","prevent"])}),[e.createElementVNode("article",{ref_key:"modalWrapper",ref:m,class:"vv-dialog__wrapper"},[o.$slots.header||o.title?(e.openBlock(),e.createElementBlock("header",v,[e.renderSlot(o.$slots,"header",{},(()=>[e.createTextVNode(e.toDisplayString(o.title)+" ",1),e.createElementVNode("button",{type:"button","aria-label":"Close",class:"vv-dialog__close",onClickPassive:$},[e.createVNode(c,{name:"close"})],32)]))])):e.createCommentVNode("",!0),e.createElementVNode("div",f,[e.renderSlot(o.$slots,"default")]),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",p,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("",!0)],512)],16,d),[[e.vShow,e.unref(u)]])])),_:3},16,["name"]))}})}));
|
|
@@ -99,6 +99,12 @@ const ActiveProps = {
|
|
|
99
99
|
*/
|
|
100
100
|
active: Boolean
|
|
101
101
|
};
|
|
102
|
+
const CurrentProps = {
|
|
103
|
+
/**
|
|
104
|
+
* Whether the item is current
|
|
105
|
+
*/
|
|
106
|
+
current: Boolean
|
|
107
|
+
};
|
|
102
108
|
const PressedProps = {
|
|
103
109
|
/**
|
|
104
110
|
* Whether the item is pressed
|
|
@@ -236,6 +242,7 @@ const DropdownProps = {
|
|
|
236
242
|
...LabelProps,
|
|
237
243
|
...PressedProps,
|
|
238
244
|
...ActiveProps,
|
|
245
|
+
...CurrentProps,
|
|
239
246
|
...LinkProps,
|
|
240
247
|
/**
|
|
241
248
|
* Button type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.nanoid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.listbox="listbox",e.menu="menu",e))(s||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),v=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});i.before;const m={id:[String,Number]},b={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};d.button;const g={...m,...b,...v,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:s.menu,validator:e=>Object.values(s).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:g,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const v=u,{id:m}=e.toRefs(v),b=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(m),g=e.useAttrs(),y=e.ref("auto"),x=e.ref("auto"),w=e.ref(null),S=e.ref(),E=e.ref(null),k=e.ref(null),P=e.computed({get:()=>v.reference??w.value,set:e=>{w.value=e}}),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.nanoid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.listbox="listbox",e.menu="menu",e))(s||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),v=(Boolean,Boolean,Boolean,Boolean,{modifiers:[String,Array]});i.before;const m={id:[String,Number]},b={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};d.button;const g={...m,...b,...v,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:s.menu,validator:e=>Object.values(s).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:g,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const v=u,{id:m}=e.toRefs(v),b=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(m),g=e.useAttrs(),y=e.ref("auto"),x=e.ref("auto"),w=e.ref(null),S=e.ref(),E=e.ref(null),k=e.ref(null),P=e.computed({get:()=>v.reference??w.value,set:e=>{w.value=e}}),B=e.ref(!1);e.onMounted((()=>{r.useMutationObserver(S.value,(()=>{var e;B.value="true"===(null==(e=window.getComputedStyle(S.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const O=e.computed((()=>{const e=[];if(v.autoPlacement?"boolean"==typeof v.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(v.autoPlacement)):v.flip&&("boolean"==typeof v.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(v.flip))),v.shift&&("boolean"==typeof v.shift?e.push(t.shift()):e.push(t.shift(v.shift))),v.size){const o=({availableWidth:e,availableHeight:t})=>{y.value=`${e}px`,x.value=`${t}px`};"boolean"==typeof v.size?e.push(t.size({apply:o})):e.push(t.size({...v.size,apply:o}))}return v.offset&&(e.push(t.offset(Number(v.offset))),["string","number"].includes(typeof v.offset)?e.push(t.offset(Number(v.offset))):e.push(t.offset(v.offset))),v.arrow&&e.push(t.arrow({element:E})),e})),{x:$,y:z,middlewareData:V,placement:j,strategy:C}=t.useFloating(P,S,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:v.strategy===a.fixed}),placement:e.computed((()=>v.placement)),strategy:e.computed((()=>v.strategy)),middleware:O}),A=e.computed((()=>{var e;if(B.value)return;const t=v.triggerWidth&&P.value?`${null==(e=P.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${z.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:y.value,maxHeight:x.value,width:t}})),N=e.computed((()=>j.value.split("-")[0])),D=e.computed((()=>{var e,t,o,r,l;if(B.value)return;const a={[n.top]:n.bottom,[n.right]:n.left,[n.bottom]:n.top,[n.left]:n.right}[N.value];return{left:void 0!==(null==(e=V.value.arrow)?void 0:e.x)?`${null==(t=V.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=V.value.arrow)?void 0:o.y)?`${null==(r=V.value.arrow)?void 0:r.y}px`:void 0,[a]:-((null==(l=E.value)?void 0:l.offsetWidth)??0)/2+"px"}})),_=r.useVModel(v,"modelValue",d),F=e.ref(!1),R=e.computed({get:()=>_.value??F.value,set:e=>{void 0!==_.value?_.value=e:F.value=e}}),T=()=>{R.value=!0},W=()=>{R.value=!1},q=()=>{R.value=!R.value},K=e=>{P.value=e};i({toggle:q,show:T,hide:W,init:K,customPosition:B}),e.watch(R,(t=>{t&&v.autofocusFirst&&e.nextTick((()=>{const e=Y(S.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),r.onClickOutside(S,(()=>{!v.keepOpen&&R.value&&(R.value=!1)}),{ignore:[P]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=P.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),H=e.computed((()=>({"aria-controls":b.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:U,bus:I}=function({reference:t,id:o,expanded:r,aria:a}){const n=l(),u=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(p,{reference:t,id:o,expanded:r,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:u}}({reference:P,id:b,expanded:R,aria:H});I.on("click",q);const{role:G,modifiers:J}=e.toRefs(v),{itemRole:L}=function({role:t,expanded:o}){const r=e.computed((()=>t.value===s.listbox?f.option:f.presentation));return e.provide(c,{role:r,expanded:o}),{itemRole:r}}({role:G,expanded:R}),Q=function(t,o,r){return e.computed((()=>{const l={[t]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{l[`${t}--${o}`]=e.unref(r.value[o])})),l}))}("vv-dropdown",J,e.computed((()=>({arrow:v.arrow})))),{focused:X}=r.useFocusWithin(S);function Y(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}r.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),W())})),r.onKeyStroke("ArrowDown",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),r.onKeyStroke("ArrowUp",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),r.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&X.value&&t&&(null==t||t.click())}));const Z={"before-enter":()=>{d(R.value?"beforeExpand":"beforeCollapse"),d("before-enter")},"after-leave":()=>{d(R.value?"afterExpand":"afterCollapse"),d("after-leave")},enter:()=>{d("enter")},"after-enter":()=>{d("after-enter")},"enter-cancelled":()=>{d("enter-cancelled")},"before-leave":()=>{d("before-leave")},leave:()=>{d("leave")},"leave-cancelled":()=>{d("leave-cancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:K,show:T,hide:W,toggle:q,expanded:e.unref(R),aria:e.unref(H)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(Z)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:S,style:e.normalizeStyle(e.unref(A)),class:e.normalizeClass(e.unref(Q))},[v.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:E,style:e.normalizeStyle(e.unref(D)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(g),{id:e.unref(b),ref_key:"listEl",ref:k,tabindex:e.unref(R)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(L)})))],16,h),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}})}));
|