ropav 0.0.13 → 0.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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/card.css +26 -26
- package/dist/card.js +6 -16
- package/dist/components/card/types.d.ts +0 -3
- package/dist/components/dialog/types.d.ts +1 -0
- package/dist/components/dropdown-menu/types.d.ts +2 -6
- package/dist/components/modal/types.d.ts +1 -0
- package/dist/components/overlay/index.d.ts +3 -0
- package/dist/components/overlay/index.js +3 -2
- package/dist/components/overlay/overlay-layer-provider.d.ts +21 -0
- package/dist/components/overlay/types.d.ts +10 -1
- package/dist/components/overlay/useOverlayZIndex.d.ts +4 -0
- package/dist/components/popover/types.d.ts +1 -0
- package/dist/components/toast/types.d.ts +1 -0
- package/dist/components/tooltip/types.d.ts +1 -0
- package/dist/composables/useOverlayLayer.d.ts +1 -1
- package/dist/dialog.js +7 -2
- package/dist/dropdown-menu.js +18 -21
- package/dist/index.js +3 -2
- package/dist/modal.css +28 -28
- package/dist/modal.js +5 -3
- package/dist/overlay2.js +16 -1
- package/dist/popover.js +7 -2
- package/dist/toast.css +21 -21
- package/dist/toast.js +10 -2
- package/dist/tooltip.js +8 -1
- package/dist/{useOverlayLayer.js → useOverlayZIndex.js} +29 -4
- package/docs/public-overlay-layer-api.md +65 -0
- package/docs/public-styles-api.md +1 -5
- package/package.json +38 -41
- package/dist/legacy-unlayered.css +0 -5382
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 daopk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ import { Button } from 'ropav';
|
|
|
41
41
|
|
|
42
42
|
Use typed `classNames` and `styles`, documented state attributes, and variables listed in the packaged styles manifest. DOM nesting, internal selectors and undocumented variables are private implementation details.
|
|
43
43
|
|
|
44
|
-
See the [Public Styles API](./docs/public-styles-api.md) and [public token table](./docs/public-tokens.md).
|
|
44
|
+
See the [Public Styles API](./docs/public-styles-api.md) and [public token table](./docs/public-tokens.md). Consumers can declare `reset, ropav.tokens, ropav.components, app` to establish their cascade layer order.
|
|
45
45
|
|
|
46
46
|
For headless Tooltip, HoverCard and custom menu markup, see the
|
|
47
47
|
[public floating API](./docs/public-floating-api.md).
|
package/dist/card.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ropav.components {
|
|
2
|
-
.rp-card[data-v-
|
|
2
|
+
.rp-card[data-v-114f8e01] {
|
|
3
3
|
--_rp-card-bg: var(--rp-color-default);
|
|
4
4
|
--_rp-card-border: var(--rp-color-default-border);
|
|
5
5
|
--_rp-card-fg: var(--rp-color-text);
|
|
@@ -19,89 +19,89 @@
|
|
|
19
19
|
border-radius: var(--_rp-card-radius);
|
|
20
20
|
transition: background-color var(--rp-transition-fast), border-color var(--rp-transition-fast);
|
|
21
21
|
}
|
|
22
|
-
.rp-card--layer-base[data-v-
|
|
22
|
+
.rp-card--layer-base[data-v-114f8e01] {
|
|
23
23
|
--_rp-card-bg: var(--rp-color-body);
|
|
24
24
|
}
|
|
25
|
-
.rp-card--layer-surface[data-v-
|
|
25
|
+
.rp-card--layer-surface[data-v-114f8e01] {
|
|
26
26
|
--_rp-card-bg: var(--rp-color-default);
|
|
27
27
|
}
|
|
28
|
-
.rp-card--layer-raised[data-v-
|
|
28
|
+
.rp-card--layer-raised[data-v-114f8e01] {
|
|
29
29
|
--_rp-card-bg: var(--rp-color-default);
|
|
30
30
|
}
|
|
31
|
-
.rp-card--borderless[data-v-
|
|
31
|
+
.rp-card--borderless[data-v-114f8e01] {
|
|
32
32
|
--_rp-card-border: transparent;
|
|
33
33
|
}
|
|
34
|
-
.rp-card--header-bordered .rp-card__header[data-v-
|
|
34
|
+
.rp-card--header-bordered .rp-card__header[data-v-114f8e01] {
|
|
35
35
|
border-bottom: var(--rp-border-width-thin) solid var(--_rp-card-header-border);
|
|
36
36
|
}
|
|
37
|
-
.rp-card--footer-bordered .rp-card__footer[data-v-
|
|
37
|
+
.rp-card--footer-bordered .rp-card__footer[data-v-114f8e01] {
|
|
38
38
|
border-top: var(--rp-border-width-thin) solid var(--_rp-card-footer-border);
|
|
39
39
|
}
|
|
40
|
-
.rp-card--header-compact .rp-card__header[data-v-
|
|
40
|
+
.rp-card--header-compact .rp-card__header[data-v-114f8e01] {
|
|
41
41
|
padding-block-end: calc(var(--_rp-card-padding) / 2);
|
|
42
42
|
}
|
|
43
|
-
.rp-card--header-compact .rp-card__body[data-v-
|
|
43
|
+
.rp-card--header-compact .rp-card__body[data-v-114f8e01] {
|
|
44
44
|
padding-block-start: calc(var(--_rp-card-padding) / 2);
|
|
45
45
|
}
|
|
46
|
-
.rp-card--footer-compact .rp-card__body[data-v-
|
|
46
|
+
.rp-card--footer-compact .rp-card__body[data-v-114f8e01] {
|
|
47
47
|
padding-block-end: calc(var(--_rp-card-padding) / 2);
|
|
48
48
|
}
|
|
49
|
-
.rp-card--footer-compact .rp-card__footer[data-v-
|
|
49
|
+
.rp-card--footer-compact .rp-card__footer[data-v-114f8e01] {
|
|
50
50
|
padding-block-start: calc(var(--_rp-card-padding) / 2);
|
|
51
51
|
}
|
|
52
|
-
.rp-card--padding-none[data-v-
|
|
52
|
+
.rp-card--padding-none[data-v-114f8e01] {
|
|
53
53
|
--_rp-card-padding: var(--rp-spacing-0);
|
|
54
54
|
}
|
|
55
|
-
.rp-card--padding-sm[data-v-
|
|
55
|
+
.rp-card--padding-sm[data-v-114f8e01] {
|
|
56
56
|
--_rp-card-padding: var(--rp-spacing-3);
|
|
57
57
|
}
|
|
58
|
-
.rp-card--padding-md[data-v-
|
|
58
|
+
.rp-card--padding-md[data-v-114f8e01] {
|
|
59
59
|
--_rp-card-padding: var(--rp-spacing-5);
|
|
60
60
|
}
|
|
61
|
-
.rp-card--padding-lg[data-v-
|
|
61
|
+
.rp-card--padding-lg[data-v-114f8e01] {
|
|
62
62
|
--_rp-card-padding: var(--rp-spacing-6);
|
|
63
63
|
}
|
|
64
|
-
.rp-card--radius-none[data-v-
|
|
64
|
+
.rp-card--radius-none[data-v-114f8e01] {
|
|
65
65
|
--_rp-card-radius: var(--rp-radius-none);
|
|
66
66
|
}
|
|
67
|
-
.rp-card--radius-xs[data-v-
|
|
67
|
+
.rp-card--radius-xs[data-v-114f8e01] {
|
|
68
68
|
--_rp-card-radius: var(--rp-radius-xs);
|
|
69
69
|
}
|
|
70
|
-
.rp-card--radius-sm[data-v-
|
|
70
|
+
.rp-card--radius-sm[data-v-114f8e01] {
|
|
71
71
|
--_rp-card-radius: var(--rp-radius-sm);
|
|
72
72
|
}
|
|
73
|
-
.rp-card--radius-md[data-v-
|
|
73
|
+
.rp-card--radius-md[data-v-114f8e01] {
|
|
74
74
|
--_rp-card-radius: var(--rp-radius-md);
|
|
75
75
|
}
|
|
76
|
-
.rp-card--radius-lg[data-v-
|
|
76
|
+
.rp-card--radius-lg[data-v-114f8e01] {
|
|
77
77
|
--_rp-card-radius: var(--rp-radius-lg);
|
|
78
78
|
}
|
|
79
|
-
.rp-card--radius-xl[data-v-
|
|
79
|
+
.rp-card--radius-xl[data-v-114f8e01] {
|
|
80
80
|
--_rp-card-radius: var(--rp-radius-xl);
|
|
81
81
|
}
|
|
82
|
-
.rp-card__header[data-v-
|
|
82
|
+
.rp-card__header[data-v-114f8e01], .rp-card__body[data-v-114f8e01], .rp-card__footer[data-v-114f8e01] {
|
|
83
83
|
box-sizing: border-box;
|
|
84
84
|
padding: var(--_rp-card-padding);
|
|
85
85
|
}
|
|
86
|
-
.rp-card__header[data-v-
|
|
86
|
+
.rp-card__header[data-v-114f8e01], .rp-card__footer[data-v-114f8e01] {
|
|
87
87
|
display: grid;
|
|
88
88
|
gap: var(--rp-spacing-1);
|
|
89
89
|
}
|
|
90
|
-
.rp-card__body[data-v-
|
|
90
|
+
.rp-card__body[data-v-114f8e01] {
|
|
91
91
|
flex: 1 1 auto;
|
|
92
92
|
min-width: 0;
|
|
93
93
|
color: var(--rp-color-text);
|
|
94
94
|
font-size: var(--rp-font-size-md);
|
|
95
95
|
line-height: var(--rp-line-height-md);
|
|
96
96
|
}
|
|
97
|
-
.rp-card__title[data-v-
|
|
97
|
+
.rp-card__title[data-v-114f8e01] {
|
|
98
98
|
margin: 0;
|
|
99
99
|
color: var(--rp-color-text);
|
|
100
100
|
font-size: var(--rp-font-size-lg);
|
|
101
101
|
font-weight: var(--rp-font-weight-semibold);
|
|
102
102
|
line-height: var(--rp-line-height-xs);
|
|
103
103
|
}
|
|
104
|
-
.rp-card__description[data-v-
|
|
104
|
+
.rp-card__description[data-v-114f8e01] {
|
|
105
105
|
margin: 0;
|
|
106
106
|
color: var(--rp-color-dimmed);
|
|
107
107
|
font-size: var(--rp-font-size-sm);
|
package/dist/card.js
CHANGED
|
@@ -4,10 +4,10 @@ import { n as useStylesApi } from "./styles-api.js";
|
|
|
4
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
5
|
import { computed, createIf, createSlot, defineVaporComponent, renderEffect, setDynamicProps, setInsertionState, setText, template, toDisplayString, txt, unref, useSlots } from "vue";
|
|
6
6
|
//#region src/components/card/card.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
7
|
-
var t0 = template("<div data-v-
|
|
8
|
-
var t1 = template("<p data-v-
|
|
9
|
-
var t2 = template("<div data-v-
|
|
10
|
-
var t3 = template("<div data-v-
|
|
7
|
+
var t0 = template("<div data-v-114f8e01> ");
|
|
8
|
+
var t1 = template("<p data-v-114f8e01> ");
|
|
9
|
+
var t2 = template("<div data-v-114f8e01>");
|
|
10
|
+
var t3 = template("<div data-v-114f8e01>", 1);
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/components/card/card.vue
|
|
13
13
|
var card_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
@@ -32,13 +32,6 @@ var card_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
32
32
|
},
|
|
33
33
|
title: { default: "" },
|
|
34
34
|
description: { default: "" },
|
|
35
|
-
bodyClass: { type: [
|
|
36
|
-
Boolean,
|
|
37
|
-
null,
|
|
38
|
-
String,
|
|
39
|
-
Object,
|
|
40
|
-
Array
|
|
41
|
-
] },
|
|
42
35
|
classNames: {},
|
|
43
36
|
styles: {}
|
|
44
37
|
},
|
|
@@ -95,10 +88,7 @@ var card_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
95
88
|
setInsertionState(n19, null, 1);
|
|
96
89
|
createIf(() => hasBody.value, () => {
|
|
97
90
|
const n14 = t2();
|
|
98
|
-
renderEffect(() => setDynamicProps(n14, [unref(getPartAttrs)("body", {
|
|
99
|
-
class: "rp-card__body",
|
|
100
|
-
compatibilityClass: __props.bodyClass
|
|
101
|
-
})]));
|
|
91
|
+
renderEffect(() => setDynamicProps(n14, [unref(getPartAttrs)("body", { class: "rp-card__body" })]));
|
|
102
92
|
setInsertionState(n14, null, 0);
|
|
103
93
|
createSlot("default", null, null, 1);
|
|
104
94
|
return n14;
|
|
@@ -113,7 +103,7 @@ var card_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
113
103
|
});
|
|
114
104
|
return n19;
|
|
115
105
|
}
|
|
116
|
-
}), [["__scopeId", "data-v-
|
|
106
|
+
}), [["__scopeId", "data-v-114f8e01"]]);
|
|
117
107
|
//#endregion
|
|
118
108
|
//#region src/components/card/types.ts
|
|
119
109
|
var cardParts = [
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'vue';
|
|
2
1
|
import { StylesApiProps } from '../../styles-api.js';
|
|
3
2
|
export declare const cardParts: readonly ["root", "header", "title", "description", "body", "footer"];
|
|
4
3
|
export type CardPart = (typeof cardParts)[number];
|
|
@@ -14,6 +13,4 @@ export interface CardProps extends StylesApiProps<CardPart> {
|
|
|
14
13
|
footerBorder?: boolean;
|
|
15
14
|
title?: string;
|
|
16
15
|
description?: string;
|
|
17
|
-
/** @deprecated Use `classNames.body` instead. */
|
|
18
|
-
bodyClass?: HTMLAttributes['class'];
|
|
19
16
|
}
|
|
@@ -12,6 +12,7 @@ export type DialogFocusTrapOptions = Omit<FocusTrapOptions, 'allowOutsideClick'
|
|
|
12
12
|
export interface DialogRootProps {
|
|
13
13
|
open?: boolean;
|
|
14
14
|
defaultOpen?: boolean;
|
|
15
|
+
baseZIndex?: number;
|
|
15
16
|
modal?: boolean;
|
|
16
17
|
closeOnEscape?: boolean;
|
|
17
18
|
closeOnOutsideClick?: boolean;
|
|
@@ -107,6 +107,7 @@ export interface DropdownMenuRenderedItem {
|
|
|
107
107
|
}
|
|
108
108
|
export interface DropdownMenuProps extends FloatingPositionProps<DropdownMenuPlacement>, StylesApiProps<DropdownMenuPart> {
|
|
109
109
|
id?: string;
|
|
110
|
+
baseZIndex?: number;
|
|
110
111
|
items?: DropdownMenuItem[];
|
|
111
112
|
open?: boolean;
|
|
112
113
|
disabled?: boolean;
|
|
@@ -114,10 +115,6 @@ export interface DropdownMenuProps extends FloatingPositionProps<DropdownMenuPla
|
|
|
114
115
|
ariaLabel?: string;
|
|
115
116
|
modal?: boolean;
|
|
116
117
|
ignore?: readonly DropdownMenuInteractOutsideTarget[];
|
|
117
|
-
/** @deprecated Use `teleport` instead. */
|
|
118
|
-
portal?: boolean;
|
|
119
|
-
/** @deprecated Use `teleportTo` instead. */
|
|
120
|
-
portalTo?: string | HTMLElement;
|
|
121
118
|
}
|
|
122
119
|
export type DropdownMenuAs = string | Component;
|
|
123
120
|
export type DropdownMenuCheckedState = boolean | 'indeterminate';
|
|
@@ -142,6 +139,7 @@ export interface DropdownMenuRootPrimitiveProps {
|
|
|
142
139
|
id?: string;
|
|
143
140
|
open?: boolean;
|
|
144
141
|
defaultOpen?: boolean;
|
|
142
|
+
baseZIndex?: number;
|
|
145
143
|
disabled?: boolean;
|
|
146
144
|
modal?: boolean;
|
|
147
145
|
target?: FloatingTarget | null;
|
|
@@ -182,8 +180,6 @@ export interface DropdownMenuContentPrimitiveProps {
|
|
|
182
180
|
collisionPadding?: FloatingCollisionPadding;
|
|
183
181
|
autoUpdateOptions?: FloatingAutoUpdateOptions;
|
|
184
182
|
arrow?: boolean;
|
|
185
|
-
/** @deprecated Use `flip` and `shift` instead. */
|
|
186
|
-
avoidCollisions?: boolean;
|
|
187
183
|
forceMount?: boolean;
|
|
188
184
|
ignore?: readonly DropdownMenuInteractOutsideTarget[];
|
|
189
185
|
ariaLabel?: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { default as Overlay } from './overlay.js';
|
|
2
|
+
export { default as OverlayLayerProvider } from './overlay-layer-provider.js';
|
|
2
3
|
export { overlayParts } from './types.js';
|
|
4
|
+
export { useOverlayZIndex } from './useOverlayZIndex.js';
|
|
5
|
+
export type { OverlayLayerProviderProps, UseOverlayZIndexOptions } from './types.js';
|
|
3
6
|
export type { OverlayBlur, OverlayPart, OverlayProps, OverlayZIndex } from './types.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as useOverlayZIndex } from "../../useOverlayZIndex.js";
|
|
1
2
|
import { t as overlay_default } from "../../overlay.js";
|
|
2
|
-
import { t as overlayParts } from "../../overlay2.js";
|
|
3
|
-
export { overlay_default as Overlay, overlayParts };
|
|
3
|
+
import { n as overlay_layer_provider_default, t as overlayParts } from "../../overlay2.js";
|
|
4
|
+
export { overlay_default as Overlay, overlay_layer_provider_default as OverlayLayerProvider, overlayParts, useOverlayZIndex };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OverlayLayerProviderProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<OverlayLayerProviderProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {}) => any;
|
|
10
|
+
};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import('vue').VNode & {
|
|
13
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'vue';
|
|
1
|
+
import { CSSProperties, MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import { StylesApiProps } from '../../styles-api.js';
|
|
3
3
|
export declare const overlayParts: readonly ["root"];
|
|
4
4
|
export type OverlayPart = (typeof overlayParts)[number];
|
|
@@ -13,3 +13,12 @@ export interface OverlayProps extends StylesApiProps<OverlayPart> {
|
|
|
13
13
|
interactive?: boolean;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
}
|
|
16
|
+
export interface OverlayLayerProviderProps {
|
|
17
|
+
baseZIndex: number;
|
|
18
|
+
}
|
|
19
|
+
export interface UseOverlayZIndexOptions {
|
|
20
|
+
baseZIndex?: MaybeRefOrGetter<number | null | undefined>;
|
|
21
|
+
defaultBaseZIndex?: number;
|
|
22
|
+
offset?: MaybeRefOrGetter<number>;
|
|
23
|
+
aboveParent?: MaybeRefOrGetter<boolean>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { UseOverlayZIndexOptions } from './types.js';
|
|
3
|
+
export declare function provideOverlayZIndex(baseZIndex: MaybeRefOrGetter<number>): ComputedRef<number>;
|
|
4
|
+
export declare function useOverlayZIndex(options?: UseOverlayZIndexOptions): ComputedRef<number>;
|
|
@@ -37,6 +37,7 @@ export interface PopoverContentSlotProps {
|
|
|
37
37
|
}
|
|
38
38
|
export interface PopoverProps extends FloatingPositionProps<PopoverPlacement>, StylesApiProps<PopoverPart> {
|
|
39
39
|
id?: string;
|
|
40
|
+
baseZIndex?: number;
|
|
40
41
|
contentClass?: string;
|
|
41
42
|
open?: boolean;
|
|
42
43
|
disabled?: boolean;
|
|
@@ -75,6 +75,7 @@ export interface ToastProviderProps extends ToastStoreOptions {
|
|
|
75
75
|
export interface ToastViewportProps extends TeleportProps, StylesApiProps<ToastViewportPart> {
|
|
76
76
|
position?: ToastPosition;
|
|
77
77
|
label?: string;
|
|
78
|
+
baseZIndex?: number;
|
|
78
79
|
}
|
|
79
80
|
export interface ToastOptions extends Omit<ToastProps, 'open'> {
|
|
80
81
|
/** Replaces an active toast with the same id and starts a fresh lifecycle. */
|
|
@@ -21,6 +21,7 @@ export interface TooltipSlotProps {
|
|
|
21
21
|
}
|
|
22
22
|
export interface TooltipProps extends FloatingPositionProps<TooltipPlacement>, StylesApiProps<TooltipPart> {
|
|
23
23
|
id?: string;
|
|
24
|
+
baseZIndex?: number;
|
|
24
25
|
content?: string;
|
|
25
26
|
color?: TooltipColor;
|
|
26
27
|
autoContrast?: boolean;
|
|
@@ -22,7 +22,7 @@ export interface UseOverlayLayerOptions {
|
|
|
22
22
|
modal?: MaybeRefOrGetter<boolean>;
|
|
23
23
|
modalEffects?: boolean;
|
|
24
24
|
preventScroll?: MaybeRefOrGetter<boolean>;
|
|
25
|
-
baseZIndex?: number
|
|
25
|
+
baseZIndex?: MaybeRefOrGetter<number>;
|
|
26
26
|
}
|
|
27
27
|
export declare function useOverlayLayer(options: UseOverlayLayerOptions): OverlayLayerContext;
|
|
28
28
|
export declare function useOverlayLayerBranch(element: Ref<HTMLElement | null>, options?: {
|
package/dist/dialog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as useRequiredInject } from "./useRequiredInject.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as useOverlayLayerBranch, n as useOverlayZIndex, r as useOverlayLayer } from "./useOverlayZIndex.js";
|
|
3
3
|
import { t as useFocusTrap } from "./useFocusTrap.js";
|
|
4
4
|
import { t as provideTeleportTarget } from "./useTeleportTarget.js";
|
|
5
5
|
import { VaporTeleport, applyVShow, computed, createComponent, createDynamicComponent, createIf, createSlot, defineVaporComponent, extend, isRef, mergeProps, nextTick, onBeforeUnmount, provide, ref, setTemplateRefBinding, shallowRef, unref, useAttrs, useId, watch } from "vue";
|
|
@@ -298,6 +298,7 @@ var dialog_root_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
298
298
|
type: Boolean,
|
|
299
299
|
default: false
|
|
300
300
|
},
|
|
301
|
+
baseZIndex: {},
|
|
301
302
|
modal: {
|
|
302
303
|
type: Boolean,
|
|
303
304
|
default: true
|
|
@@ -343,7 +344,11 @@ var dialog_root_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
343
344
|
modal,
|
|
344
345
|
modalEffects: true,
|
|
345
346
|
preventScroll,
|
|
346
|
-
baseZIndex:
|
|
347
|
+
baseZIndex: useOverlayZIndex({
|
|
348
|
+
baseZIndex: () => props.baseZIndex,
|
|
349
|
+
defaultBaseZIndex: 1e3,
|
|
350
|
+
aboveParent: false
|
|
351
|
+
})
|
|
347
352
|
});
|
|
348
353
|
function setOpen(value) {
|
|
349
354
|
const previous = isOpen.value;
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -2,7 +2,7 @@ import './dropdown-menu.css';
|
|
|
2
2
|
import { t as bem } from "./bem.js";
|
|
3
3
|
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
4
4
|
import { t as useRequiredInject } from "./useRequiredInject.js";
|
|
5
|
-
import {
|
|
5
|
+
import { n as useOverlayZIndex, r as useOverlayLayer } from "./useOverlayZIndex.js";
|
|
6
6
|
import { n as useFloatingPosition, r as useFloatingTarget, t as isElementReference } from "./useFloatingPosition.js";
|
|
7
7
|
import { n as useTeleportPositioningKey, r as useTeleportTarget, t as provideTeleportTarget } from "./useTeleportTarget.js";
|
|
8
8
|
import { VaporTeleport, VaporTransition, child, computed, createComponent, createComponentWithFallback, createDynamicComponent, createFor, createIf, createSlot, createTemplateRefSetter, defineVaporComponent, extend, isRef, markRaw, mergeProps, nextTick, onBeforeUnmount, onMounted, onUnmounted, provide, ref, renderEffect, resolveComponent, setAttr, setDynamicProps, setInsertionState, setStaticTemplateRef, setStyle, setTemplateRefBinding, setText, shallowRef, template, toDisplayString, txt, unref, useAttrs, useId, watch } from "vue";
|
|
@@ -433,9 +433,9 @@ function useDropdownMenuPrimitiveContent(props, attrs, events, submenu) {
|
|
|
433
433
|
placement: () => props.placement ?? defaultPlacement,
|
|
434
434
|
strategy: () => props.strategy ?? "absolute",
|
|
435
435
|
offset: () => props.offset,
|
|
436
|
-
flip: () => props.
|
|
436
|
+
flip: () => props.flip !== false,
|
|
437
437
|
flipOptions: () => props.flipOptions,
|
|
438
|
-
shift: () => props.
|
|
438
|
+
shift: () => props.shift !== false,
|
|
439
439
|
collisionPadding: () => props.collisionPadding ?? 8,
|
|
440
440
|
autoUpdateOptions: () => props.autoUpdateOptions,
|
|
441
441
|
restartKey: teleportPositioningKey
|
|
@@ -597,10 +597,6 @@ var dropdown_menu_content_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
597
597
|
type: Boolean,
|
|
598
598
|
default: false
|
|
599
599
|
},
|
|
600
|
-
avoidCollisions: {
|
|
601
|
-
type: Boolean,
|
|
602
|
-
default: true
|
|
603
|
-
},
|
|
604
600
|
forceMount: {
|
|
605
601
|
type: Boolean,
|
|
606
602
|
default: false
|
|
@@ -1054,6 +1050,7 @@ var dropdown_menu_root_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
1054
1050
|
type: Boolean,
|
|
1055
1051
|
default: false
|
|
1056
1052
|
},
|
|
1053
|
+
baseZIndex: {},
|
|
1057
1054
|
disabled: {
|
|
1058
1055
|
type: Boolean,
|
|
1059
1056
|
default: false
|
|
@@ -1085,10 +1082,15 @@ var dropdown_menu_root_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
1085
1082
|
const contentElement = ref(null);
|
|
1086
1083
|
const inside = /* @__PURE__ */ new Set();
|
|
1087
1084
|
let returnFocusElement = null;
|
|
1085
|
+
const baseZIndex = useOverlayZIndex({
|
|
1086
|
+
baseZIndex: () => props.baseZIndex,
|
|
1087
|
+
defaultBaseZIndex: 100,
|
|
1088
|
+
aboveParent: false
|
|
1089
|
+
});
|
|
1088
1090
|
const layer = useOverlayLayer({
|
|
1089
1091
|
active: computed(() => isOpen.value && !disabled.value),
|
|
1090
1092
|
element: contentElement,
|
|
1091
|
-
baseZIndex
|
|
1093
|
+
baseZIndex
|
|
1092
1094
|
});
|
|
1093
1095
|
function setOpen(value) {
|
|
1094
1096
|
if (value && disabled.value) return;
|
|
@@ -1300,10 +1302,6 @@ var dropdown_menu_sub_content_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
1300
1302
|
},
|
|
1301
1303
|
collisionPadding: { default: 8 },
|
|
1302
1304
|
autoUpdateOptions: {},
|
|
1303
|
-
avoidCollisions: {
|
|
1304
|
-
type: Boolean,
|
|
1305
|
-
default: true
|
|
1306
|
-
},
|
|
1307
1305
|
forceMount: {
|
|
1308
1306
|
type: Boolean,
|
|
1309
1307
|
default: false
|
|
@@ -2366,10 +2364,9 @@ function useDropdownMenu(props, emit = {}) {
|
|
|
2366
2364
|
const generatedId = useId();
|
|
2367
2365
|
const menuId = computed(() => props.id ?? `${generatedId}-menu`);
|
|
2368
2366
|
const placement = computed(() => props.placement ?? "bottom-start");
|
|
2369
|
-
const
|
|
2370
|
-
const teleportTo = useTeleportTarget(() => requestedTeleportTarget.value);
|
|
2367
|
+
const teleportTo = useTeleportTarget(() => props.teleportTo);
|
|
2371
2368
|
const teleportPositioningKey = useTeleportPositioningKey();
|
|
2372
|
-
const shouldTeleport = computed(() => props.
|
|
2369
|
+
const shouldTeleport = computed(() => props.teleport !== false);
|
|
2373
2370
|
const { isExplicitTarget, reference, resolvedTarget } = useFloatingTarget(() => props.target, rootRef);
|
|
2374
2371
|
const targetElement = computed(() => isElementReference(resolvedTarget.value) ? resolvedTarget.value : null);
|
|
2375
2372
|
const visibleItems = computed(() => props.items ?? []);
|
|
@@ -2379,7 +2376,11 @@ function useDropdownMenu(props, emit = {}) {
|
|
|
2379
2376
|
const layer = useOverlayLayer({
|
|
2380
2377
|
active: isVisible,
|
|
2381
2378
|
element: menuRef,
|
|
2382
|
-
baseZIndex:
|
|
2379
|
+
baseZIndex: useOverlayZIndex({
|
|
2380
|
+
baseZIndex: () => props.baseZIndex,
|
|
2381
|
+
defaultBaseZIndex: 100,
|
|
2382
|
+
aboveParent: false
|
|
2383
|
+
})
|
|
2383
2384
|
});
|
|
2384
2385
|
const contentHasSubmenu = computed(() => hasNestedItems(visibleItems.value));
|
|
2385
2386
|
const isEmpty = computed(() => visibleItems.value.length === 0);
|
|
@@ -2597,6 +2598,7 @@ var dropdown_menu_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
2597
2598
|
__name: "dropdown-menu",
|
|
2598
2599
|
props: {
|
|
2599
2600
|
id: {},
|
|
2601
|
+
baseZIndex: {},
|
|
2600
2602
|
items: { default: () => [] },
|
|
2601
2603
|
open: {
|
|
2602
2604
|
type: Boolean,
|
|
@@ -2616,11 +2618,6 @@ var dropdown_menu_default = /* @__PURE__ */ defineVaporComponent({
|
|
|
2616
2618
|
default: false
|
|
2617
2619
|
},
|
|
2618
2620
|
ignore: {},
|
|
2619
|
-
portal: {
|
|
2620
|
-
type: Boolean,
|
|
2621
|
-
default: void 0
|
|
2622
|
-
},
|
|
2623
|
-
portalTo: {},
|
|
2624
2621
|
target: {},
|
|
2625
2622
|
placement: { default: "bottom-start" },
|
|
2626
2623
|
strategy: { default: "absolute" },
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { n as color_input_default, t as colorInputParts } from "./color-input.js
|
|
|
14
14
|
import { t as color_swatch_default } from "./color-swatch.js";
|
|
15
15
|
import { t as color_picker_default } from "./color-picker.js";
|
|
16
16
|
import { t as input_default } from "./input.js";
|
|
17
|
+
import { n as useOverlayZIndex } from "./useOverlayZIndex.js";
|
|
17
18
|
import { t as useFocusTrap } from "./useFocusTrap.js";
|
|
18
19
|
import { n as useFloatingPosition } from "./useFloatingPosition.js";
|
|
19
20
|
import { r as useTeleportTarget } from "./useTeleportTarget.js";
|
|
@@ -31,7 +32,7 @@ import { t as inputParts } from "./input2.js";
|
|
|
31
32
|
import { t as overlay_default } from "./overlay.js";
|
|
32
33
|
import { n as modal_default, t as modalParts } from "./modal.js";
|
|
33
34
|
import { n as number_input_default, t as numberInputParts } from "./number-input.js";
|
|
34
|
-
import { t as overlayParts } from "./overlay2.js";
|
|
35
|
+
import { n as overlay_layer_provider_default, t as overlayParts } from "./overlay2.js";
|
|
35
36
|
import { n as popoverPlacements, t as popoverParts } from "./popover2.js";
|
|
36
37
|
import { a as progress_default, i as progressSizes, n as progressParts, r as progressRadiuses, t as progressColors } from "./progress.js";
|
|
37
38
|
import { i as radioParts, n as radio_default, r as radioGroupParts, t as radio_group_default } from "./radio.js";
|
|
@@ -44,4 +45,4 @@ import { t as teleport_provider_default } from "./teleport-provider.js";
|
|
|
44
45
|
import { n as textarea_default, t as textareaParts } from "./textarea.js";
|
|
45
46
|
import { a as toastColors, c as toastRadiuses, d as toastViewportParts, f as createToastStore, i as useToast, l as toastTypes, n as toast_viewport_default, o as toastParts, p as toast_default, r as toast_provider_default, s as toastPositions, t as useToastState, u as toastVariants } from "./toast.js";
|
|
46
47
|
import { t as tooltipParts } from "./tooltip2.js";
|
|
47
|
-
export { accordion_default as Accordion, accordion_item_default as AccordionItem, alert_default as Alert, aspect_ratio_default as AspectRatio, avatar_default as Avatar, badge_default as Badge, button_default as Button, button_group_default as ButtonGroup, button_link_default as ButtonLink, card_default as Card, checkbox_default as Checkbox, collapse_default as Collapse, color_input_default as ColorInput, color_picker_default as ColorPicker, color_swatch_default as ColorSwatch, dialog_close_default as DialogClose, dialog_content_default as DialogContent, dialog_description_default as DialogDescription, dialog_overlay_default as DialogOverlay, dialog_portal_default as DialogPortal, dialog_root_default as DialogRoot, dialog_title_default as DialogTitle, dialog_trigger_default as DialogTrigger, dropdown_menu_default as DropdownMenu, dropdown_menu_checkbox_item_default as DropdownMenuCheckboxItem, dropdown_menu_content_default as DropdownMenuContent, dropdown_menu_context_trigger_default as DropdownMenuContextTrigger, DropdownMenuItem, dropdown_menu_item_indicator_default as DropdownMenuItemIndicator, dropdown_menu_label_default as DropdownMenuLabel, dropdown_menu_portal_default as DropdownMenuPortal, dropdown_menu_radio_group_default as DropdownMenuRadioGroup, dropdown_menu_radio_item_default as DropdownMenuRadioItem, dropdown_menu_root_default as DropdownMenuRoot, dropdown_menu_separator_default as DropdownMenuSeparator, dropdown_menu_sub_default as DropdownMenuSub, dropdown_menu_sub_content_default as DropdownMenuSubContent, dropdown_menu_sub_trigger_default as DropdownMenuSubTrigger, dropdown_menu_trigger_default as DropdownMenuTrigger, field_default as Field, focus_trap_default as FocusTrap, icon_button_default as IconButton, input_default as Input, modal_default as Modal, number_input_default as NumberInput, overlay_default as Overlay, popover_default as Popover, progress_default as Progress, radio_default as Radio, radio_group_default as RadioGroup, range_slider_default as RangeSlider, select_default as Select, slider_default as Slider, switch_default as Switch, tabs_default as Tabs, tabs_content_default as TabsContent, tabs_list_default as TabsList, tabs_trigger_default as TabsTrigger, teleport_provider_default as TeleportProvider, textarea_default as Textarea, toast_default as Toast, toast_provider_default as ToastProvider, toast_viewport_default as ToastViewport, tooltip_default as Tooltip, accordionItemParts, accordionParts, alertColors, alertParts, alertRadiuses, alertVariants, aspectRatioParts, avatarColors, avatarParts, avatarRadiuses, avatarSizes, avatarVariants, badgeColors, badgeParts, badgeRadiuses, badgeSizes, badgeVariants, buttonGroupParts, buttonLinkParts, buttonParts, cardParts, checkboxParts, collapseParts, colorInputParts, colorPickerFormats, colorPickerParts, colorPickerSizes, colorSwatchParts, createToastStore, dropdownMenuParts, fieldParts, focusTrapParts, iconButtonParts, inputParts, modalParts, numberInputParts, overlayParts, popoverParts, popoverPlacements, progressColors, progressParts, progressRadiuses, progressSizes, radioGroupParts, radioParts, rangeSliderParts, selectParts, sliderColors, sliderOrientations, sliderParts, sliderSizes, switchParts, tabsContentParts, tabsListParts, tabsParts, tabsTriggerParts, textareaParts, toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, tooltipParts, useAccordion, useAccordionItem, useCollapse, useDropdownMenu, useFloatingPosition, useFocusTrap, useHoverDisclosure, useTabs, useTabsContent, useTabsList, useTabsTrigger, useTeleportTarget, useToast, useToastState };
|
|
48
|
+
export { accordion_default as Accordion, accordion_item_default as AccordionItem, alert_default as Alert, aspect_ratio_default as AspectRatio, avatar_default as Avatar, badge_default as Badge, button_default as Button, button_group_default as ButtonGroup, button_link_default as ButtonLink, card_default as Card, checkbox_default as Checkbox, collapse_default as Collapse, color_input_default as ColorInput, color_picker_default as ColorPicker, color_swatch_default as ColorSwatch, dialog_close_default as DialogClose, dialog_content_default as DialogContent, dialog_description_default as DialogDescription, dialog_overlay_default as DialogOverlay, dialog_portal_default as DialogPortal, dialog_root_default as DialogRoot, dialog_title_default as DialogTitle, dialog_trigger_default as DialogTrigger, dropdown_menu_default as DropdownMenu, dropdown_menu_checkbox_item_default as DropdownMenuCheckboxItem, dropdown_menu_content_default as DropdownMenuContent, dropdown_menu_context_trigger_default as DropdownMenuContextTrigger, DropdownMenuItem, dropdown_menu_item_indicator_default as DropdownMenuItemIndicator, dropdown_menu_label_default as DropdownMenuLabel, dropdown_menu_portal_default as DropdownMenuPortal, dropdown_menu_radio_group_default as DropdownMenuRadioGroup, dropdown_menu_radio_item_default as DropdownMenuRadioItem, dropdown_menu_root_default as DropdownMenuRoot, dropdown_menu_separator_default as DropdownMenuSeparator, dropdown_menu_sub_default as DropdownMenuSub, dropdown_menu_sub_content_default as DropdownMenuSubContent, dropdown_menu_sub_trigger_default as DropdownMenuSubTrigger, dropdown_menu_trigger_default as DropdownMenuTrigger, field_default as Field, focus_trap_default as FocusTrap, icon_button_default as IconButton, input_default as Input, modal_default as Modal, number_input_default as NumberInput, overlay_default as Overlay, overlay_layer_provider_default as OverlayLayerProvider, popover_default as Popover, progress_default as Progress, radio_default as Radio, radio_group_default as RadioGroup, range_slider_default as RangeSlider, select_default as Select, slider_default as Slider, switch_default as Switch, tabs_default as Tabs, tabs_content_default as TabsContent, tabs_list_default as TabsList, tabs_trigger_default as TabsTrigger, teleport_provider_default as TeleportProvider, textarea_default as Textarea, toast_default as Toast, toast_provider_default as ToastProvider, toast_viewport_default as ToastViewport, tooltip_default as Tooltip, accordionItemParts, accordionParts, alertColors, alertParts, alertRadiuses, alertVariants, aspectRatioParts, avatarColors, avatarParts, avatarRadiuses, avatarSizes, avatarVariants, badgeColors, badgeParts, badgeRadiuses, badgeSizes, badgeVariants, buttonGroupParts, buttonLinkParts, buttonParts, cardParts, checkboxParts, collapseParts, colorInputParts, colorPickerFormats, colorPickerParts, colorPickerSizes, colorSwatchParts, createToastStore, dropdownMenuParts, fieldParts, focusTrapParts, iconButtonParts, inputParts, modalParts, numberInputParts, overlayParts, popoverParts, popoverPlacements, progressColors, progressParts, progressRadiuses, progressSizes, radioGroupParts, radioParts, rangeSliderParts, selectParts, sliderColors, sliderOrientations, sliderParts, sliderSizes, switchParts, tabsContentParts, tabsListParts, tabsParts, tabsTriggerParts, textareaParts, toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, tooltipParts, useAccordion, useAccordionItem, useCollapse, useDropdownMenu, useFloatingPosition, useFocusTrap, useHoverDisclosure, useOverlayZIndex, useTabs, useTabsContent, useTabsList, useTabsTrigger, useTeleportTarget, useToast, useToastState };
|