@v1nt1248/3nclient-lib 0.3.51 → 0.4.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 +2 -0
- package/dist/chunks/{ui3n-notification-o0tuhTpO.js → ui3n-notification-CTYQV3nR.js} +38 -37
- package/dist/src/components/ui3n-chip/ui3n-chip.d.ts +0 -5
- package/dist/src/components/ui3n-icon/ui3n-icon.d.ts +0 -1
- package/dist/src/components/ui3n-progress/ui3n-progress-circular.d.ts +0 -2
- package/dist/src/components/ui3n-progress/ui3n-progress-linear.d.ts +0 -2
- package/dist/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.d.ts +0 -7
- package/dist/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +0 -7
- package/dist/src/components/ui3n-slider/ui3n-slider.d.ts +0 -5
- package/dist/src/components/ui3n-tabs/ui3n-tabs.d.ts +0 -4
- package/dist/src/components/ui3n-tooltip/ui3n-tooltip.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1697 -1748
- package/dist/ui3n-plugins.js +2 -1
- package/package.json +11 -4
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +28 -25
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +18 -17
- package/src/components/ui3n-badge/ui3n-badge.vue +3 -2
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +11 -10
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +4 -1
- package/src/components/ui3n-button/ui3n-button.vue +244 -158
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +22 -21
- package/src/components/ui3n-chip/ui3n-chip.vue +56 -40
- package/src/components/ui3n-dialog/ui3n-dialog-provider.vue +1 -0
- package/src/components/ui3n-dialog/ui3n-dialog.vue +19 -18
- package/src/components/ui3n-drop-files/ui3n-drop-files.vue +8 -7
- package/src/components/ui3n-editable/ui3n-content-editable.vue +11 -10
- package/src/components/ui3n-editable/ui3n-editable.vue +26 -25
- package/src/components/ui3n-emoji/ui3n-emoji.vue +7 -6
- package/src/components/ui3n-icon/ui3n-icon.vue +26 -16
- package/src/components/ui3n-input/ui3n-input.vue +36 -32
- package/src/components/ui3n-input-file/ui3n-input-file.vue +8 -5
- package/src/components/ui3n-list/ui3n-list.vue +8 -7
- package/src/components/ui3n-menu/ui3n-menu.vue +6 -5
- package/src/components/ui3n-mobile-menu/ui3n-mobile-menu.vue +4 -3
- package/src/components/ui3n-mobile-menu-item/ui3n-mobile-menu-item.vue +7 -6
- package/src/components/ui3n-notification/ui3n-notification-container.vue +1 -0
- package/src/components/ui3n-notification/ui3n-notification.vue +28 -26
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +32 -19
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +31 -18
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +4 -1
- package/src/components/ui3n-radio-group/ui3n-radio.vue +6 -5
- package/src/components/ui3n-scrollbar/ui3n-scrollbar.vue +94 -83
- package/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.vue +51 -39
- package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +51 -39
- package/src/components/ui3n-selector/ui3n-selector.vue +33 -28
- package/src/components/ui3n-slider/ui3n-slider.vue +53 -34
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +10 -6
- package/src/components/ui3n-switch/ui3n-switch.vue +23 -22
- package/src/components/ui3n-table/ui3n-table.vue +50 -48
- package/src/components/ui3n-tabs/ui3n-tabs.vue +38 -20
- package/src/components/ui3n-text/ui3n-text.vue +15 -14
- package/src/components/ui3n-tooltip/ui3n-tooltip-old.vue +14 -11
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +38 -27
package/dist/ui3n-plugins.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { H as e, i as t, n, r, t as i } from "./chunks/plugins-keys-DdadrIAg.js";
|
|
2
|
-
import { i as a, t as o } from "./chunks/ui3n-notification-
|
|
2
|
+
import { i as a, t as o } from "./chunks/ui3n-notification-CTYQV3nR.js";
|
|
3
3
|
import { Fragment as s, createApp as c, createBlock as l, createElementBlock as u, defineComponent as d, markRaw as f, mergeProps as p, normalizeClass as m, openBlock as h, ref as g, renderList as _ } from "vue";
|
|
4
4
|
import "pinia";
|
|
5
5
|
import v from "mitt";
|
|
@@ -21,6 +21,7 @@ var y = /* @__PURE__ */ a(/* @__PURE__ */ d({
|
|
|
21
21
|
remove: i
|
|
22
22
|
}), (e, t) => (h(), u("div", {
|
|
23
23
|
id: "ui3n-notifications-container",
|
|
24
|
+
"data-ui3n": "notification-container",
|
|
24
25
|
class: m(e.$style.ui3nNotificationsWrapper)
|
|
25
26
|
}, [(h(!0), u(s, null, _(n.value, (e) => (h(), l(o, p({ key: e.id }, { ref_for: !0 }, e, { "on-close": () => a(e) }), null, 16, ["on-close"]))), 128))], 2));
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@v1nt1248/3nclient-lib",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"author": "v1nt1248",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -34,13 +34,17 @@
|
|
|
34
34
|
"build": "pnpm clean:dist && vite build",
|
|
35
35
|
"pack": "pnpm build && npm pack && cp *.tgz ./dist && rm *.tgz",
|
|
36
36
|
"preview": "vite preview",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"test:watch": "vitest",
|
|
37
39
|
"stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss,css}'",
|
|
38
40
|
"stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss,css}'",
|
|
39
|
-
"lint": "pnpm
|
|
40
|
-
"lint:fix": "pnpm
|
|
41
|
+
"lint": "pnpm eslint && pnpm stylelint",
|
|
42
|
+
"lint:fix": "pnpm eslint:fix && pnpm stylelint:fix",
|
|
41
43
|
"docs:dev": "vitepress dev docs",
|
|
42
44
|
"docs:build": "vitepress build docs",
|
|
43
|
-
"docs:preview": "vitepress preview docs"
|
|
45
|
+
"docs:preview": "vitepress preview docs",
|
|
46
|
+
"eslint": "eslint src",
|
|
47
|
+
"eslint:fix": "eslint --fix src"
|
|
44
48
|
},
|
|
45
49
|
"dependencies": {
|
|
46
50
|
"@floating-ui/dom": "1.7.6",
|
|
@@ -67,6 +71,7 @@
|
|
|
67
71
|
"@vue/compiler-core": "3.5.35",
|
|
68
72
|
"@vue/eslint-config-typescript": "14.7.0",
|
|
69
73
|
"@vue/runtime-core": "3.5.35",
|
|
74
|
+
"@vue/test-utils": "2.5.0",
|
|
70
75
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
71
76
|
"eslint": "10.4.0",
|
|
72
77
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
"eslint-plugin-vue": "10.9.1",
|
|
78
83
|
"globals": "17.6.0",
|
|
79
84
|
"jackspeak": "4.2.3",
|
|
85
|
+
"jsdom": "30.0.1",
|
|
80
86
|
"path": "0.12.7",
|
|
81
87
|
"pinia": "3.0.4",
|
|
82
88
|
"postcss-html": "1.8.1",
|
|
@@ -98,6 +104,7 @@
|
|
|
98
104
|
"vite-plugin-static-copy": "^4.1.1",
|
|
99
105
|
"vite-plugin-vue-devtools": "8.1.2",
|
|
100
106
|
"vitepress": "1.6.4",
|
|
107
|
+
"vitest": "4.1.11",
|
|
101
108
|
"vue": "3.5.35",
|
|
102
109
|
"vue-component-meta": "3.3.2",
|
|
103
110
|
"vue-docgen-api": "4.79.2",
|
|
@@ -380,7 +380,10 @@
|
|
|
380
380
|
</script>
|
|
381
381
|
|
|
382
382
|
<template>
|
|
383
|
-
<div
|
|
383
|
+
<div
|
|
384
|
+
data-ui3n="autocomplete"
|
|
385
|
+
:class="$style.ui3nAutocomplete"
|
|
386
|
+
>
|
|
384
387
|
<!-- 'hidden inputs' block for setting of 'name' attr when used in a form -->
|
|
385
388
|
<fieldset
|
|
386
389
|
v-if="name && !isEmpty(modelValue)"
|
|
@@ -545,17 +548,17 @@
|
|
|
545
548
|
|
|
546
549
|
<style lang="scss" module>
|
|
547
550
|
.ui3nAutocomplete {
|
|
548
|
-
--ui3n-autocomplete-min-height
|
|
549
|
-
--ui3n-autocomplete-font-size
|
|
550
|
-
--ui3n-autocomplete-item-font-size
|
|
551
|
-
--ui3n-autocomplete-padding-inline
|
|
552
|
-
--ui3n-autocomplete-padding-block
|
|
553
|
-
--ui3n-autocomplete-border-radius
|
|
551
|
+
--_autocomplete-min-height: var(--ui3n-autocomplete-min-height, 32px);
|
|
552
|
+
--_autocomplete-font-size: var(--ui3n-autocomplete-font-size, 12px);
|
|
553
|
+
--_autocomplete-item-font-size: var(--ui3n-autocomplete-item-font-size, 13px);
|
|
554
|
+
--_autocomplete-padding-inline: var(--ui3n-autocomplete-padding-inline, 8px);
|
|
555
|
+
--_autocomplete-padding-block: var(--ui3n-autocomplete-padding-block, 4px);
|
|
556
|
+
--_autocomplete-border-radius: var(--ui3n-autocomplete-border-radius, 4px);
|
|
554
557
|
|
|
555
558
|
position: relative;
|
|
556
559
|
display: flex;
|
|
557
560
|
width: 100%;
|
|
558
|
-
min-height: var(--
|
|
561
|
+
min-height: var(--_autocomplete-min-height);
|
|
559
562
|
|
|
560
563
|
:global(.match-search) {
|
|
561
564
|
font-weight: 600;
|
|
@@ -580,20 +583,20 @@
|
|
|
580
583
|
}
|
|
581
584
|
|
|
582
585
|
.displayValue {
|
|
583
|
-
font-size: var(--
|
|
584
|
-
line-height: var(--
|
|
586
|
+
font-size: var(--_autocomplete-font-size);
|
|
587
|
+
line-height: var(--_autocomplete-min-height);
|
|
585
588
|
font-weight: 400;
|
|
586
589
|
color: var(--color-text-control-primary-default);
|
|
587
590
|
}
|
|
588
591
|
|
|
589
592
|
.input {
|
|
590
|
-
border-radius: var(--
|
|
591
|
-
padding: 0 var(--
|
|
593
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
594
|
+
padding: 0 var(--_autocomplete-padding-inline);
|
|
592
595
|
flex: 1 1 60px;
|
|
593
596
|
min-width: 60px;
|
|
594
|
-
height: var(--
|
|
595
|
-
font-size: var(--
|
|
596
|
-
line-height: var(--
|
|
597
|
+
height: var(--_autocomplete-min-height);
|
|
598
|
+
font-size: var(--_autocomplete-font-size);
|
|
599
|
+
line-height: var(--_autocomplete-min-height);
|
|
597
600
|
font-weight: 400;
|
|
598
601
|
color: var(--color-text-control-primary-default);
|
|
599
602
|
background-color: transparent;
|
|
@@ -610,8 +613,8 @@
|
|
|
610
613
|
}
|
|
611
614
|
|
|
612
615
|
&.inputWithError {
|
|
613
|
-
height: calc(var(--
|
|
614
|
-
padding: 0 calc(var(--
|
|
616
|
+
height: calc(var(--_autocomplete-min-height) - 2px);
|
|
617
|
+
padding: 0 calc(var(--_autocomplete-padding-inline) - 1px);
|
|
615
618
|
border: 1px solid var(--error-content-default);
|
|
616
619
|
}
|
|
617
620
|
}
|
|
@@ -624,15 +627,15 @@
|
|
|
624
627
|
|
|
625
628
|
.item {
|
|
626
629
|
display: flex;
|
|
627
|
-
min-height: var(--
|
|
630
|
+
min-height: var(--_autocomplete-min-height);
|
|
628
631
|
justify-content: flex-start;
|
|
629
632
|
align-items: center;
|
|
630
|
-
padding: var(--
|
|
631
|
-
font-size: var(--
|
|
633
|
+
padding: var(--_autocomplete-padding-block) var(--_autocomplete-padding-inline);
|
|
634
|
+
font-size: var(--_autocomplete-item-font-size);
|
|
632
635
|
line-height: 1.23;
|
|
633
636
|
font-weight: 500;
|
|
634
637
|
color: var(--color-text-control-primary-default);
|
|
635
|
-
border-radius: var(--
|
|
638
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
636
639
|
user-select: none;
|
|
637
640
|
cursor: pointer;
|
|
638
641
|
|
|
@@ -655,15 +658,15 @@
|
|
|
655
658
|
|
|
656
659
|
.noData {
|
|
657
660
|
display: flex;
|
|
658
|
-
min-height: var(--
|
|
661
|
+
min-height: var(--_autocomplete-min-height);
|
|
659
662
|
justify-content: flex-start;
|
|
660
663
|
align-items: center;
|
|
661
|
-
padding: var(--
|
|
662
|
-
font-size: var(--
|
|
664
|
+
padding: var(--_autocomplete-padding-block) var(--_autocomplete-padding-inline);
|
|
665
|
+
font-size: var(--_autocomplete-item-font-size);
|
|
663
666
|
line-height: 1.23;
|
|
664
667
|
font-weight: 500;
|
|
665
668
|
color: var(--color-text-control-primary-default);
|
|
666
|
-
border-radius: var(--
|
|
669
|
+
border-radius: var(--_autocomplete-border-radius);
|
|
667
670
|
}
|
|
668
671
|
|
|
669
672
|
.chipsContainer {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<div
|
|
36
36
|
ref="element"
|
|
37
37
|
:id="id"
|
|
38
|
+
data-ui3n="badge-simple"
|
|
38
39
|
:class="[$style.ui3nBadgeSimple, dot && $style.ui3nBadgeDot]"
|
|
39
40
|
>
|
|
40
41
|
<span
|
|
@@ -48,11 +49,11 @@
|
|
|
48
49
|
|
|
49
50
|
<style lang="scss" module>
|
|
50
51
|
.ui3nBadgeSimple {
|
|
51
|
-
--ui3n-badge-size
|
|
52
|
-
--ui3n-badge-dot-size
|
|
53
|
-
--ui3n-badge-padding-inline
|
|
54
|
-
--ui3n-badge-nodot-border-radius
|
|
55
|
-
--ui3n-badge-font-size
|
|
52
|
+
--_badge-size: var(--ui3n-badge-size, 20px);
|
|
53
|
+
--_badge-dot-size: var(--ui3n-badge-dot-size, 8px);
|
|
54
|
+
--_badge-padding-inline: var(--ui3n-badge-padding-inline, 6px);
|
|
55
|
+
--_badge-nodot-border-radius: var(--ui3n-badge-nodot-border-radius, 10px);
|
|
56
|
+
--_badge-font-size: var(--ui3n-badge-font-size, 12px);
|
|
56
57
|
|
|
57
58
|
position: relative;
|
|
58
59
|
box-sizing: border-box;
|
|
@@ -60,29 +61,29 @@
|
|
|
60
61
|
outline: 1px var(--color-bg-block-primary-default) solid;
|
|
61
62
|
|
|
62
63
|
&:not(.ui3nBadgeDot) {
|
|
63
|
-
min-height: var(--
|
|
64
|
-
height: var(--
|
|
64
|
+
min-height: var(--_badge-size);
|
|
65
|
+
height: var(--_badge-size);
|
|
65
66
|
width: max-content;
|
|
66
|
-
padding: 0 var(--
|
|
67
|
-
border-radius: var(--
|
|
67
|
+
padding: 0 var(--_badge-padding-inline);
|
|
68
|
+
border-radius: var(--_badge-nodot-border-radius);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
.ui3nBadgeDot {
|
|
72
|
-
min-width: var(--
|
|
73
|
-
width: var(--
|
|
74
|
-
max-width: var(--
|
|
75
|
-
min-height: var(--
|
|
76
|
-
height: var(--
|
|
77
|
-
max-height: var(--
|
|
73
|
+
min-width: var(--_badge-dot-size);
|
|
74
|
+
width: var(--_badge-dot-size);
|
|
75
|
+
max-width: var(--_badge-dot-size);
|
|
76
|
+
min-height: var(--_badge-dot-size);
|
|
77
|
+
height: var(--_badge-dot-size);
|
|
78
|
+
max-height: var(--_badge-dot-size);
|
|
78
79
|
border-radius: 50%;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
.ui3nBadgeText {
|
|
82
83
|
display: block;
|
|
83
84
|
color: v-bind(textColor);
|
|
84
|
-
font-size: var(--
|
|
85
|
-
line-height: var(--
|
|
85
|
+
font-size: var(--_badge-font-size);
|
|
86
|
+
line-height: var(--_badge-size);
|
|
86
87
|
text-align: center;
|
|
87
88
|
}
|
|
88
89
|
</style>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<!-- eslint-disable vue/no-multiple-template-root -->
|
|
40
40
|
<div
|
|
41
41
|
v-if="hasDefaultSlot"
|
|
42
|
+
data-ui3n="badge"
|
|
42
43
|
:class="$style.ui3nBadge"
|
|
43
44
|
>
|
|
44
45
|
<div :class="$style.ui3nBadgeWrapper">
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
|
|
70
71
|
<style lang="scss" module>
|
|
71
72
|
.ui3nBadge {
|
|
72
|
-
--ui3n-badge-size
|
|
73
|
+
--_badge-size: var(--ui3n-badge-size, 20px);
|
|
73
74
|
|
|
74
75
|
position: relative;
|
|
75
76
|
}
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
.ui3nBadgeWrapper {
|
|
78
79
|
position: relative;
|
|
79
80
|
width: max-content;
|
|
80
|
-
min-width: var(--
|
|
81
|
+
min-width: var(--_badge-size);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
.ui3nBadgeContent {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
42
|
<div
|
|
43
|
+
data-ui3n="breadcrumb"
|
|
43
44
|
:class="cssClasses"
|
|
44
45
|
v-on="isActive && !(disabled || parentDisabled) ? { click: onClick } : {}"
|
|
45
46
|
>
|
|
@@ -65,11 +66,11 @@
|
|
|
65
66
|
|
|
66
67
|
<style lang="scss" module>
|
|
67
68
|
.ui3nBreadcrumb {
|
|
68
|
-
--ui3n-breadcrumb-font-size
|
|
69
|
-
--ui3n-breadcrumb-padding-inline
|
|
70
|
-
--ui3n-breadcrumb-separator-distance
|
|
71
|
-
--ui3n-breadcrumb-color-default
|
|
72
|
-
--ui3n-breadcrumb-color-selected
|
|
69
|
+
--_breadcrumb-font-size: var(--ui3n-breadcrumb-font-size, 16px);
|
|
70
|
+
--_breadcrumb-padding-inline: var(--ui3n-breadcrumb-padding-inline, 4px);
|
|
71
|
+
--_breadcrumb-separator-distance: var(--ui3n-breadcrumb-separator-distance, 8px);
|
|
72
|
+
--_breadcrumb-color-default: var(--ui3n-breadcrumb-color-default, var(--color-text-block-primary-default));
|
|
73
|
+
--_breadcrumb-color-selected: var(--ui3n-breadcrumb-color-selected, var(--color-text-block-accent-default));
|
|
73
74
|
|
|
74
75
|
display: flex;
|
|
75
76
|
align-items: center;
|
|
@@ -82,16 +83,16 @@
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.content {
|
|
85
|
-
font-size: var(--
|
|
86
|
+
font-size: var(--_breadcrumb-font-size);
|
|
86
87
|
line-height: 1.25;
|
|
87
|
-
color: var(--
|
|
88
|
+
color: var(--_breadcrumb-color-default);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
.ui3nBreadcrumbSeparator {
|
|
91
92
|
display: flex;
|
|
92
93
|
align-items: center;
|
|
93
|
-
margin: 0 var(--
|
|
94
|
-
padding-left: var(--
|
|
94
|
+
margin: 0 var(--_breadcrumb-separator-distance);
|
|
95
|
+
padding-left: var(--_breadcrumb-padding-inline);
|
|
95
96
|
color: var(--color-text-block-tertiary-default);
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
.content {
|
|
100
101
|
&:hover {
|
|
101
102
|
cursor: pointer;
|
|
102
|
-
color: var(--
|
|
103
|
+
color: var(--_breadcrumb-color-selected);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
}
|