vira 31.10.2 → 31.11.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.
|
@@ -9,6 +9,7 @@ export declare const ViraDrawer: import("element-vir").DeclarativeElementDefinit
|
|
|
9
9
|
} & PartialWithUndefined<{
|
|
10
10
|
/** If this isn't set, make sure to use the drawer title slot to fill it in. */
|
|
11
11
|
drawerTitle: string;
|
|
12
|
+
noContentPadding: boolean;
|
|
12
13
|
}>, {
|
|
13
14
|
dialogElement: HTMLDialogElement | undefined;
|
|
14
15
|
contentElement: HTMLDivElement | undefined;
|
|
@@ -20,4 +21,4 @@ export declare const ViraDrawer: import("element-vir").DeclarativeElementDefinit
|
|
|
20
21
|
dragCurrentY: number;
|
|
21
22
|
}, {
|
|
22
23
|
drawerClose: import("element-vir").DefineEvent<void>;
|
|
23
|
-
}, "vira-drawer-dragging", "vira-drawer-backdrop-filter" | "vira-drawer-max-height", readonly ["drawerTitle"], readonly []>;
|
|
24
|
+
}, "vira-drawer-dragging" | "vira-drawer-no-content-padding", "vira-drawer-backdrop-filter" | "vira-drawer-max-height", readonly ["drawerTitle"], readonly []>;
|
|
@@ -46,6 +46,7 @@ export const ViraDrawer = defineViraElement()({
|
|
|
46
46
|
},
|
|
47
47
|
hostClasses: {
|
|
48
48
|
'vira-drawer-dragging': ({ state }) => state.isDragging,
|
|
49
|
+
'vira-drawer-no-content-padding': ({ inputs }) => !!inputs.noContentPadding,
|
|
49
50
|
},
|
|
50
51
|
slotNames: ['drawerTitle'],
|
|
51
52
|
cssVars: {
|
|
@@ -161,6 +162,12 @@ export const ViraDrawer = defineViraElement()({
|
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
}
|
|
165
|
+
|
|
166
|
+
${hostClasses['vira-drawer-no-content-padding'].selector} {
|
|
167
|
+
& dialog .drawer-content-wrapper .body {
|
|
168
|
+
padding: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
164
171
|
`,
|
|
165
172
|
render({ inputs, state, updateState, events, dispatch, slotNames }) {
|
|
166
173
|
if (state.dialogElement && inputs.open !== state.dialogElement.open) {
|
|
@@ -28,6 +28,7 @@ export declare const ViraModal: import("element-vir").DeclarativeElementDefiniti
|
|
|
28
28
|
blockLightDismissal: boolean;
|
|
29
29
|
modalSubtitle: string;
|
|
30
30
|
isMobileSize: boolean;
|
|
31
|
+
noContentPadding: boolean;
|
|
31
32
|
}>, {
|
|
32
33
|
dialogElement: HTMLDialogElement | undefined;
|
|
33
34
|
contentElement: HTMLDivElement | undefined;
|
|
@@ -36,4 +37,4 @@ export declare const ViraModal: import("element-vir").DeclarativeElementDefiniti
|
|
|
36
37
|
cleanupListeners: undefined | (() => void);
|
|
37
38
|
}, {
|
|
38
39
|
modalClose: import("element-vir").DefineEvent<void>;
|
|
39
|
-
}, "vira-modal-phone-size", "vira-modal-backdrop-filter", readonly ["modalTitle"], readonly []>;
|
|
40
|
+
}, "vira-modal-phone-size" | "vira-modal-no-content-padding", "vira-modal-backdrop-filter", readonly ["modalTitle"], readonly []>;
|
|
@@ -40,6 +40,7 @@ export const ViraModal = defineViraElement()({
|
|
|
40
40
|
},
|
|
41
41
|
hostClasses: {
|
|
42
42
|
'vira-modal-phone-size': ({ inputs }) => !!inputs.isMobileSize,
|
|
43
|
+
'vira-modal-no-content-padding': ({ inputs }) => !!inputs.noContentPadding,
|
|
43
44
|
},
|
|
44
45
|
slotNames: ['modalTitle'],
|
|
45
46
|
cssVars: {
|
|
@@ -131,6 +132,12 @@ export const ViraModal = defineViraElement()({
|
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
|
|
135
|
+
${hostClasses['vira-modal-no-content-padding'].selector} {
|
|
136
|
+
& dialog .modal-content-wrapper .body {
|
|
137
|
+
padding: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
134
141
|
${hostClasses['vira-modal-phone-size'].selector} {
|
|
135
142
|
& dialog {
|
|
136
143
|
width: 100dvw;
|