@v1nt1248/3nclient-lib 0.0.41 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/components/index.d.ts +22 -38
- package/dist/components/ui3n-badge-simple.vue.d.ts +3 -3
- package/dist/components/ui3n-badge.vue.d.ts +2 -2
- package/dist/components/ui3n-breadcrumb.vue.d.ts +7 -7
- package/dist/components/ui3n-breadcrumbs.vue.d.ts +3 -3
- package/dist/components/ui3n-button.vue.d.ts +29 -4
- package/dist/components/ui3n-checkbox.vue.d.ts +3 -3
- package/dist/components/ui3n-chip.vue.d.ts +3 -3
- package/dist/components/ui3n-dialog.vue.d.ts +6 -5
- package/dist/components/ui3n-drop-files.vue.d.ts +23 -3
- package/dist/components/ui3n-emoji.vue.d.ts +3 -3
- package/dist/components/ui3n-icon.vue.d.ts +29 -3
- package/dist/components/ui3n-input.vue.d.ts +9 -9
- package/dist/components/ui3n-list.vue.d.ts +4 -4
- package/dist/components/ui3n-menu.vue.d.ts +3 -3
- package/dist/components/ui3n-notification.vue.d.ts +32 -2
- package/dist/components/ui3n-switch.vue.d.ts +55 -0
- package/dist/components/ui3n-table-sort-icon.vue.d.ts +1 -1
- package/dist/components/ui3n-table.vue.d.ts +4 -3
- package/dist/components/ui3n-tabs.vue.d.ts +3 -3
- package/dist/components/ui3n-text.vue.d.ts +29 -3
- package/dist/components/ui3n-virtual-scroll.vue.d.ts +12 -9
- package/dist/constants/types.d.ts +2 -4
- package/dist/directives/index.d.ts +3 -2
- package/dist/directives/ui3n-click-outside.d.ts +2 -1
- package/dist/directives/ui3n-html.d.ts +1 -0
- package/dist/index.d.ts +27 -29
- package/dist/plugins/dialogs.d.ts +3 -3
- package/dist/plugins/i18n.d.ts +2 -2
- package/dist/plugins/icons.d.ts +1 -0
- package/dist/plugins/index.d.ts +5 -8
- package/dist/plugins/notifications.d.ts +2 -2
- package/dist/plugins/store-dialogs.d.ts +2 -1
- package/dist/plugins/store-notifications.d.ts +2 -1
- package/dist/plugins/store-vue-bus.d.ts +2 -1
- package/dist/plugins/vue-bus.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/tools/sqlite-on-3nstorage/index.d.ts +3 -2
- package/dist/tools/ui.helpers.d.ts +1 -0
- package/dist/ui-3n-lib.js +6953 -6615
- package/package.json +57 -58
- package/src/components/index.ts +47 -41
- package/src/components/ui3n-badge-simple.vue +35 -38
- package/src/components/ui3n-badge.vue +25 -25
- package/src/components/ui3n-breadcrumb.vue +44 -44
- package/src/components/ui3n-breadcrumbs.vue +19 -19
- package/src/components/ui3n-button.vue +240 -150
- package/src/components/ui3n-checkbox.vue +199 -158
- package/src/components/ui3n-chip.vue +96 -98
- package/src/components/ui3n-dialog.vue +225 -235
- package/src/components/ui3n-drop-files.vue +146 -154
- package/src/components/ui3n-emoji.vue +62 -64
- package/src/components/ui3n-icon.vue +32 -13
- package/src/components/ui3n-input.vue +239 -221
- package/src/components/ui3n-list.vue +92 -111
- package/src/components/ui3n-menu.vue +101 -100
- package/src/components/ui3n-notification.vue +182 -113
- package/src/components/ui3n-switch.vue +146 -0
- package/src/components/ui3n-table-sort-icon.vue +1 -2
- package/src/components/ui3n-table.vue +229 -223
- package/src/components/ui3n-tabs.vue +141 -148
- package/src/components/ui3n-text.vue +235 -146
- package/src/components/ui3n-virtual-scroll.vue +68 -68
- package/dist/stories/Ui3nBadge.stories.d.ts +0 -124
- package/dist/stories/Ui3nBreadcrumbs.stories.d.ts +0 -252
- package/dist/stories/Ui3nButton.stories.d.ts +0 -152
- package/dist/stories/Ui3nCheckbox.stories.d.ts +0 -186
- package/dist/stories/Ui3nChip.stories.d.ts +0 -562
- package/dist/stories/Ui3nDialog.stories.d.ts +0 -41
- package/dist/stories/Ui3nDropFiles.stories.d.ts +0 -73
- package/dist/stories/Ui3nEmoji.stories.d.ts +0 -39
- package/dist/stories/Ui3nIcon.stories.d.ts +0 -80
- package/dist/stories/Ui3nInput.stories.d.ts +0 -456
- package/dist/stories/Ui3nList.stories.d.ts +0 -54
- package/dist/stories/Ui3nTabs.stories.d.ts +0 -177
- package/dist/stories/data/data-to-list.d.ts +0 -8
- package/dist/stories/data/icons.d.ts +0 -1
|
@@ -1,176 +1,158 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import { computed, nextTick, onMounted, ref } from 'vue';
|
|
4
|
+
import type { Component } from 'vue';
|
|
5
|
+
import Ui3nButton from './ui3n-button.vue';
|
|
6
|
+
|
|
7
|
+
export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
8
|
+
|
|
9
|
+
export interface Ui3nDialogProps {
|
|
10
|
+
teleport?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
width?: string | number;
|
|
13
|
+
cssClass?: string[];
|
|
14
|
+
cssStyle?: Record<string, string>;
|
|
15
|
+
contentCssClass?: string[];
|
|
16
|
+
contentCssStyle?: Record<string, string>;
|
|
17
|
+
confirmButton?: boolean;
|
|
18
|
+
cancelButton?: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
onConfirm?: (data: any) => void;
|
|
21
|
+
onCancel?: (data: any) => void;
|
|
22
|
+
confirmButtonText?: string;
|
|
23
|
+
cancelButtonText?: string;
|
|
24
|
+
confirmButtonColor?: string;
|
|
25
|
+
cancelButtonColor?: string;
|
|
26
|
+
confirmButtonBackground?: string;
|
|
27
|
+
cancelButtonBackground?: string;
|
|
28
|
+
closeOnClickOverlay?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Ui3nDialogComponentProps {
|
|
32
|
+
component: Component;
|
|
33
|
+
componentProps?: Record<string, any>;
|
|
34
|
+
dialogProps?: Ui3nDialogProps;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Ui3nDialogComponentEmits {
|
|
38
|
+
(ev: 'open', value?: any): void;
|
|
39
|
+
(ev: 'before-close', value?: any): void;
|
|
40
|
+
(ev: 'close', value?: any): void;
|
|
41
|
+
(ev: 'confirm', value?: any): void;
|
|
42
|
+
(ev: 'cancel', value?: any): void;
|
|
43
|
+
(ev: 'click-overlay', value?: any): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const props = defineProps<Ui3nDialogComponentProps>();
|
|
47
|
+
|
|
48
|
+
const emits = defineEmits<Ui3nDialogComponentEmits>();
|
|
49
|
+
|
|
50
|
+
const show = ref(true);
|
|
51
|
+
const data = ref(null);
|
|
52
|
+
const isValid = ref(true);
|
|
53
|
+
const dialogElement = ref<HTMLDivElement | null>(null);
|
|
54
|
+
|
|
55
|
+
const dialogProps = computed<Ui3nDialogProps>(() => ({
|
|
56
|
+
teleport: props.dialogProps?.teleport ?? 'body',
|
|
57
|
+
title: props.dialogProps?.title ?? '',
|
|
58
|
+
width: props.dialogProps?.width ?? 380,
|
|
59
|
+
cssClass: props.dialogProps?.cssClass ?? [],
|
|
60
|
+
cssStyle: props.dialogProps?.cssStyle ?? {},
|
|
61
|
+
contentCssClass: props.dialogProps?.contentCssClass ?? [],
|
|
62
|
+
contentCssStyle: props.dialogProps?.contentCssStyle ?? {},
|
|
63
|
+
confirmButton: props.dialogProps?.confirmButton ?? true,
|
|
64
|
+
cancelButton: props.dialogProps?.confirmButton ?? true,
|
|
65
|
+
confirmButtonText: props.dialogProps?.confirmButtonText ?? 'Done',
|
|
66
|
+
cancelButtonText: props.dialogProps?.cancelButtonText ?? 'Cancel',
|
|
67
|
+
confirmButtonColor: props.dialogProps?.confirmButtonColor ?? 'var(--color-text-button-primary-default)',
|
|
68
|
+
cancelButtonColor: props.dialogProps?.cancelButtonColor ?? 'var(--color-text-button-secondary-default)',
|
|
69
|
+
confirmButtonBackground: props.dialogProps?.confirmButtonBackground ?? 'var(--color-bg-button-primary-default)',
|
|
70
|
+
cancelButtonBackground: props.dialogProps?.cancelButtonBackground ?? 'var(--color-bg-button-secondary-default)',
|
|
71
|
+
closeOnClickOverlay: props.dialogProps?.closeOnClickOverlay ?? true,
|
|
72
|
+
}));
|
|
73
|
+
const cssStyle = computed(() => ({ width: `${dialogProps.value.width}px`, ...dialogProps.value.cssStyle }));
|
|
74
|
+
|
|
75
|
+
onMounted(() => {
|
|
76
|
+
if (dialogElement.value) {
|
|
77
|
+
dialogElement.value.style.setProperty('--dialog-confirm-button-color', dialogProps.value.confirmButtonColor!);
|
|
78
|
+
dialogElement.value.style.setProperty('--dialog-cancel-button-color', dialogProps.value.cancelButtonColor!);
|
|
79
|
+
dialogElement.value.style.setProperty('--dialog-confirm-background-color', dialogProps.value.confirmButtonBackground!);
|
|
80
|
+
dialogElement.value.style.setProperty('--dialog-cancel-background-color', dialogProps.value.cancelButtonBackground!);
|
|
29
81
|
}
|
|
30
82
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
83
|
+
if (dialogElement.value) {
|
|
84
|
+
nextTick(() => {
|
|
85
|
+
dialogElement.value!.focus();
|
|
86
|
+
});
|
|
35
87
|
}
|
|
88
|
+
});
|
|
36
89
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
91
|
+
const selectData = (value: any) => {
|
|
92
|
+
data.value = value;
|
|
93
|
+
if (
|
|
94
|
+
!dialogProps.value.confirmButton
|
|
95
|
+
&& !dialogProps.value.cancelButton
|
|
96
|
+
&& props.dialogProps?.onConfirm
|
|
97
|
+
) {
|
|
98
|
+
props.dialogProps?.onConfirm(data.value);
|
|
99
|
+
closeDialog();
|
|
44
100
|
}
|
|
101
|
+
};
|
|
45
102
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
cancelButton = true,
|
|
61
|
-
confirmButtonText = 'Done',
|
|
62
|
-
cancelButtonText = 'Cancel',
|
|
63
|
-
confirmButtonColor = 'var(--system-white, #fff)',
|
|
64
|
-
cancelButtonColor = 'var(--blue-main, #0090ec)',
|
|
65
|
-
confirmButtonBackground = 'var(--blue-main, #0090ec)',
|
|
66
|
-
cancelButtonBackground = 'var(--system-white, #fff)',
|
|
67
|
-
closeOnClickOverlay = true,
|
|
68
|
-
} = props.dialogProps || {}
|
|
69
|
-
return {
|
|
70
|
-
teleport,
|
|
71
|
-
title,
|
|
72
|
-
cssClass: cssClass ? `ui3n-dialog ${cssClass}` : 'ui3n-dialog',
|
|
73
|
-
cssStyle: { width: `${width}px`, ...cssStyle },
|
|
74
|
-
contentCssClass: contentCssClass ? `ui3n-dialog__content ${contentCssClass}` : 'ui3n-dialog__content',
|
|
75
|
-
contentCssStyle,
|
|
76
|
-
confirmButton,
|
|
77
|
-
cancelButton,
|
|
78
|
-
confirmButtonText,
|
|
79
|
-
cancelButtonText,
|
|
80
|
-
confirmButtonColor,
|
|
81
|
-
cancelButtonColor,
|
|
82
|
-
confirmButtonBackground,
|
|
83
|
-
cancelButtonBackground,
|
|
84
|
-
closeOnClickOverlay,
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const show = ref(true)
|
|
89
|
-
const data = ref(null)
|
|
90
|
-
const isValid = ref(true)
|
|
91
|
-
const dialogElement = ref<HTMLDivElement | null>(null)
|
|
92
|
-
|
|
93
|
-
onMounted(() => {
|
|
94
|
-
if (dialogElement.value) {
|
|
95
|
-
dialogElement.value.style.setProperty('--dialog-confirm-button-color', dialogProps.value.confirmButtonColor)
|
|
96
|
-
dialogElement.value.style.setProperty('--dialog-cancel-button-color', dialogProps.value.cancelButtonColor)
|
|
97
|
-
dialogElement.value.style.setProperty('--dialog-confirm-background-color', dialogProps.value.confirmButtonBackground)
|
|
98
|
-
dialogElement.value.style.setProperty('--dialog-cancel-background-color', dialogProps.value.cancelButtonBackground)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (dialogElement.value) {
|
|
102
|
-
nextTick(() => {
|
|
103
|
-
dialogElement.value!.focus()
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
109
|
-
const selectData = (value: any) => {
|
|
110
|
-
data.value = value
|
|
111
|
-
if (
|
|
112
|
-
!dialogProps.value.confirmButton
|
|
113
|
-
&& !dialogProps.value.cancelButton
|
|
114
|
-
&& props.dialogProps?.onConfirm
|
|
115
|
-
) {
|
|
116
|
-
props.dialogProps.onConfirm(data.value)
|
|
117
|
-
closeDialog()
|
|
118
|
-
}
|
|
103
|
+
const validate = (value: boolean) => {
|
|
104
|
+
isValid.value = value;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const closeDialog = (arg?: { ev?: Event, withAction?: boolean }) => {
|
|
108
|
+
const { ev, withAction = true } = arg || {};
|
|
109
|
+
if (ev) {
|
|
110
|
+
ev.stopImmediatePropagation();
|
|
111
|
+
ev.preventDefault();
|
|
112
|
+
}
|
|
113
|
+
show.value = false;
|
|
114
|
+
props.dialogProps?.onClose && props.dialogProps.onClose();
|
|
115
|
+
if (withAction) {
|
|
116
|
+
emits('close');
|
|
119
117
|
}
|
|
118
|
+
};
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
const startEmit = (event: Ui3nDialogEvent) => {
|
|
121
|
+
if (event === 'click-overlay') {
|
|
122
|
+
emits(event);
|
|
123
|
+
closeDialog();
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
ev.stopImmediatePropagation()
|
|
129
|
-
ev.preventDefault()
|
|
130
|
-
}
|
|
131
|
-
show.value = false
|
|
132
|
-
props.dialogProps?.onClose && props.dialogProps.onClose()
|
|
133
|
-
if (withAction) {
|
|
134
|
-
emit('close')
|
|
135
|
-
}
|
|
126
|
+
if (event === 'confirm') {
|
|
127
|
+
props.dialogProps?.onConfirm && props.dialogProps.onConfirm(data.value);
|
|
128
|
+
closeDialog();
|
|
136
129
|
}
|
|
137
130
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
closeDialog()
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (event === 'confirm') {
|
|
145
|
-
props.dialogProps?.onConfirm && props.dialogProps.onConfirm(data.value)
|
|
146
|
-
closeDialog()
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (event === 'cancel') {
|
|
150
|
-
props.dialogProps?.onCancel && props.dialogProps.onCancel(data.value)
|
|
151
|
-
closeDialog()
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (data.value) {
|
|
155
|
-
// @ts-ignore
|
|
156
|
-
emit(event, data.value)
|
|
157
|
-
} else {
|
|
158
|
-
// @ts-ignore
|
|
159
|
-
emit(event)
|
|
160
|
-
}
|
|
131
|
+
if (event === 'cancel') {
|
|
132
|
+
props.dialogProps?.onCancel && props.dialogProps.onCancel(data.value);
|
|
133
|
+
closeDialog();
|
|
161
134
|
}
|
|
162
135
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
event.
|
|
166
|
-
|
|
136
|
+
if (data.value) {
|
|
137
|
+
// @ts-ignore
|
|
138
|
+
emits(event, data.value);
|
|
139
|
+
} else {
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
emits(event);
|
|
167
142
|
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const handleEvent = (event: Event, eventName: Ui3nDialogEvent) => {
|
|
146
|
+
event.stopImmediatePropagation();
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
startEmit(eventName);
|
|
149
|
+
};
|
|
168
150
|
</script>
|
|
169
151
|
|
|
170
152
|
<template>
|
|
171
153
|
<div
|
|
172
154
|
v-if="show"
|
|
173
|
-
class="
|
|
155
|
+
:class="$style.overlay"
|
|
174
156
|
@click="dialogProps.closeOnClickOverlay
|
|
175
157
|
? closeDialog({ ev: $event })
|
|
176
158
|
: startEmit('click-overlay')
|
|
@@ -179,37 +161,39 @@
|
|
|
179
161
|
<div
|
|
180
162
|
ref="dialogElement"
|
|
181
163
|
tabindex="1"
|
|
182
|
-
:class="dialogProps.cssClass"
|
|
183
|
-
:style="
|
|
164
|
+
:class="[$style.dialog, ...dialogProps.cssClass]"
|
|
165
|
+
:style="cssStyle"
|
|
184
166
|
@keydown.esc.stop="startEmit('cancel')"
|
|
185
167
|
@keydown.enter.stop=" isValid && startEmit('confirm')"
|
|
186
168
|
>
|
|
187
169
|
<div
|
|
188
170
|
v-if="dialogProps.title"
|
|
189
|
-
class="
|
|
171
|
+
:class="$style.title"
|
|
190
172
|
@click.stop
|
|
191
173
|
>
|
|
192
174
|
<span>{{ dialogProps.title }}</span>
|
|
193
|
-
<ui3n-button
|
|
194
|
-
round
|
|
195
|
-
color="transparent"
|
|
196
|
-
icon="close"
|
|
197
|
-
icon-size="12"
|
|
198
|
-
icon-color="var(--gray-90, #444)"
|
|
199
|
-
class="ui3n-dialog__close"
|
|
200
|
-
@click="closeDialog({ ev: $event })"
|
|
201
|
-
/>
|
|
202
175
|
</div>
|
|
203
176
|
|
|
177
|
+
<ui3n-button
|
|
178
|
+
:class="$style.closeBtn"
|
|
179
|
+
type="icon"
|
|
180
|
+
size="small"
|
|
181
|
+
color="transparent"
|
|
182
|
+
icon="close"
|
|
183
|
+
icon-size="16"
|
|
184
|
+
icon-color="var(--color-icon-control-primary-default)"
|
|
185
|
+
@click="closeDialog({ ev: $event })"
|
|
186
|
+
/>
|
|
187
|
+
|
|
204
188
|
<div
|
|
205
189
|
v-if="props.component"
|
|
206
|
-
:class="dialogProps.contentCssClass"
|
|
190
|
+
:class="[$style.content, ...dialogProps.contentCssClass]"
|
|
207
191
|
:style="dialogProps.contentCssStyle"
|
|
208
192
|
@click.stop
|
|
209
193
|
>
|
|
210
194
|
<component
|
|
211
|
-
:is="
|
|
212
|
-
v-bind="
|
|
195
|
+
:is="component"
|
|
196
|
+
v-bind="componentProps"
|
|
213
197
|
@select="selectData"
|
|
214
198
|
@validate="validate"
|
|
215
199
|
@close="closeDialog({ ev: $event })"
|
|
@@ -221,13 +205,14 @@
|
|
|
221
205
|
<div
|
|
222
206
|
v-if="dialogProps.confirmButton || dialogProps.cancelButton"
|
|
223
207
|
:class="[
|
|
224
|
-
|
|
225
|
-
|
|
208
|
+
$style.actions,
|
|
209
|
+
dialogProps.confirmButton && dialogProps.cancelButton && $style.bothBtns,
|
|
226
210
|
]"
|
|
227
211
|
@click.stop
|
|
228
212
|
>
|
|
229
213
|
<ui3n-button
|
|
230
214
|
v-if="dialogProps.cancelButton"
|
|
215
|
+
type="secondary"
|
|
231
216
|
:color="dialogProps.cancelButtonBackground"
|
|
232
217
|
:text-color="dialogProps.cancelButtonColor"
|
|
233
218
|
@click="handleEvent($event, 'cancel')"
|
|
@@ -249,71 +234,76 @@
|
|
|
249
234
|
</div>
|
|
250
235
|
</template>
|
|
251
236
|
|
|
252
|
-
<style lang="scss">
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
.ui3n-dialog__overlay {
|
|
256
|
-
position: fixed;
|
|
257
|
-
z-index: 1000;
|
|
258
|
-
inset: 0;
|
|
259
|
-
display: flex;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
align-items: center;
|
|
262
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
263
|
-
}
|
|
237
|
+
<style lang="scss" module>
|
|
238
|
+
@import "../assets/styles/mixins";
|
|
264
239
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
240
|
+
.overlay {
|
|
241
|
+
position: fixed;
|
|
242
|
+
z-index: 1000;
|
|
243
|
+
inset: 0;
|
|
244
|
+
display: flex;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
align-items: center;
|
|
247
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.dialog {
|
|
251
|
+
--dialog-border-radius: 8px;
|
|
252
|
+
--dialog-title-padding: 16px 32px 16px 16px;
|
|
253
|
+
--dialog-title-font-size: 14px;
|
|
254
|
+
--dialog-actions-padding: 16px;
|
|
255
|
+
--dialog-confirm-button-color: var(--color-text-button-primary-default);
|
|
256
|
+
--dialog-cancel-button-color: var(--color-text-button-secondary-default);
|
|
257
|
+
--dialog-confirm-background-color: var(--color-bg-button-primary-default);
|
|
258
|
+
--dialog-cancel-background-color: var(--color-bg-button-secondary-default);
|
|
259
|
+
|
|
260
|
+
position: relative;
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
height: auto;
|
|
264
|
+
max-height: 95%;
|
|
265
|
+
background-color: var(--color-bg-block-primary-default);
|
|
266
|
+
border-radius: var(--dialog-border-radius);
|
|
267
|
+
outline: none;
|
|
268
|
+
@include elevation();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.title {
|
|
272
|
+
position: relative;
|
|
273
|
+
width: 100%;
|
|
274
|
+
height: calc(var(--spacing-m) * 3);
|
|
275
|
+
display: flex;
|
|
276
|
+
justify-content: flex-start;
|
|
277
|
+
align-items: center;
|
|
278
|
+
padding: var(--dialog-title-padding);
|
|
279
|
+
font-size: var(--dialog-title-font-size);
|
|
280
|
+
font-weight: 600;
|
|
281
|
+
line-height: 1.2;
|
|
282
|
+
color: var(--color-text-control-primary-default);
|
|
283
|
+
border-bottom: 1px solid var(--color-border-block-primary-default);
|
|
284
|
+
@include text-overflow-ellipsis();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.closeBtn {
|
|
288
|
+
position: absolute;
|
|
289
|
+
right: 4px;
|
|
290
|
+
top: 12px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.content {
|
|
294
|
+
flex-grow: 2;
|
|
295
|
+
overflow-y: auto;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.actions {
|
|
299
|
+
padding: var(--dialog-actions-padding);
|
|
300
|
+
display: flex;
|
|
301
|
+
justify-content: flex-end;
|
|
302
|
+
align-items: center;
|
|
303
|
+
gap: var(--spacing-s);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.bothBtns {
|
|
307
|
+
margin-left: var(--spacing-s);
|
|
308
|
+
}
|
|
319
309
|
</style>
|