@v1nt1248/3nclient-lib 0.1.74 → 0.1.76
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/types/index.d.ts +5 -0
- package/dist/components/ui3n-dialog/types.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +2537 -2520
- package/dist/ui3n-plugins.js +903 -886
- package/package.json +1 -1
- package/src/components/types/index.ts +6 -0
- package/src/components/ui3n-dialog/types.ts +2 -1
- package/src/components/ui3n-dialog/ui3n-dialog.vue +45 -6
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
|
-
import type { ExtractComponentProps } from '../types/index';
|
|
2
|
+
import type { ExtractComponentProps, Ui3nIconField } from '../types/index';
|
|
3
3
|
|
|
4
4
|
export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
5
5
|
|
|
6
6
|
export interface Ui3nDialogProps {
|
|
7
7
|
id?: string;
|
|
8
8
|
title?: string;
|
|
9
|
+
icon?: string | Ui3nIconField;
|
|
9
10
|
width?: string | number;
|
|
10
11
|
draggable?: boolean;
|
|
11
12
|
cssClass?: string[];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { type Component, computed, nextTick, onMounted, ref } from 'vue';
|
|
3
3
|
import omit from 'lodash/omit';
|
|
4
4
|
import Ui3nButton from '../ui3n-button/ui3n-button.vue';
|
|
5
|
+
import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue';
|
|
5
6
|
import type { Ui3nDialogEvent, Ui3nDialogComponentProps, Ui3nDialogComponentEmits } from './types';
|
|
6
7
|
import { ExtractComponentProps } from '@/components/types';
|
|
7
8
|
import { determineWindowWidth } from './util';
|
|
@@ -55,6 +56,26 @@
|
|
|
55
56
|
}),
|
|
56
57
|
}));
|
|
57
58
|
|
|
59
|
+
const iconData = computed(() => {
|
|
60
|
+
if (!props.dialogProps?.icon) return null;
|
|
61
|
+
|
|
62
|
+
if (typeof props.dialogProps.icon === 'string') {
|
|
63
|
+
return {
|
|
64
|
+
icon: props.dialogProps.icon,
|
|
65
|
+
width: 14,
|
|
66
|
+
height: 14,
|
|
67
|
+
color: 'var(--color-icon-control-secondary-default)',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
icon: props.dialogProps.icon.icon,
|
|
73
|
+
width: props.dialogProps.icon.size || 14,
|
|
74
|
+
height: props.dialogProps.icon.size || 14,
|
|
75
|
+
color: props.dialogProps.icon.color || 'var(--color-icon-control-secondary-default)',
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
|
|
58
79
|
function selectData(value: unknown) {
|
|
59
80
|
data.value = value;
|
|
60
81
|
if (
|
|
@@ -219,6 +240,12 @@
|
|
|
219
240
|
:class="$style.title"
|
|
220
241
|
@click.stop
|
|
221
242
|
>
|
|
243
|
+
<ui3n-icon
|
|
244
|
+
v-if="iconData"
|
|
245
|
+
v-bind="iconData"
|
|
246
|
+
:class="$style.icon"
|
|
247
|
+
/>
|
|
248
|
+
|
|
222
249
|
<span>{{ currentDialogProps.title }}</span>
|
|
223
250
|
</div>
|
|
224
251
|
|
|
@@ -299,7 +326,7 @@
|
|
|
299
326
|
|
|
300
327
|
.dialog {
|
|
301
328
|
--dialog-border-radius: 8px;
|
|
302
|
-
--dialog-title-padding:
|
|
329
|
+
--dialog-title-padding: 0 32px 0 16px;
|
|
303
330
|
--dialog-title-font-size: 14px;
|
|
304
331
|
--dialog-actions-padding: 16px;
|
|
305
332
|
--dialog-confirm-button-color: var(--color-text-button-primary-default);
|
|
@@ -330,13 +357,25 @@
|
|
|
330
357
|
display: flex;
|
|
331
358
|
justify-content: flex-start;
|
|
332
359
|
align-items: center;
|
|
360
|
+
column-gap: var(--spacing-s);
|
|
333
361
|
padding: var(--dialog-title-padding);
|
|
334
|
-
font-size: var(--dialog-title-font-size);
|
|
335
|
-
font-weight: 600;
|
|
336
|
-
line-height: 1.2;
|
|
337
|
-
color: var(--color-text-control-primary-default);
|
|
338
362
|
border-bottom: 1px solid var(--color-border-block-primary-default);
|
|
339
|
-
|
|
363
|
+
|
|
364
|
+
span {
|
|
365
|
+
display: block;
|
|
366
|
+
position: relative;
|
|
367
|
+
height: var(--dialog-title-font-size);
|
|
368
|
+
flex-grow: 1;
|
|
369
|
+
font-size: var(--dialog-title-font-size);
|
|
370
|
+
font-weight: 600;
|
|
371
|
+
color: var(--color-text-control-primary-default);
|
|
372
|
+
@include mixins.text-overflow-ellipsis();
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.icon {
|
|
376
|
+
position: relative;
|
|
377
|
+
top: -1px;
|
|
378
|
+
}
|
|
340
379
|
}
|
|
341
380
|
|
|
342
381
|
.dragHandleIcon {
|