@v1nt1248/3nclient-lib 0.3.27 → 0.3.29

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.
Files changed (115) hide show
  1. package/dist/chunks/ui3n-notification-Dr_3Td9N.js +279 -0
  2. package/dist/components/index.d.ts +12 -12
  3. package/dist/components/ui3n-autocomplete/types.d.ts +8 -0
  4. package/dist/components/ui3n-autocomplete/ui3n-autocomplete.d.ts +2 -2
  5. package/dist/components/ui3n-badge/types.d.ts +12 -0
  6. package/dist/components/ui3n-badge/ui3n-badge-simple.d.ts +1 -1
  7. package/dist/components/ui3n-badge/ui3n-badge.d.ts +1 -1
  8. package/dist/components/ui3n-breadcrumbs/types.d.ts +1 -1
  9. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumb.d.ts +2 -2
  10. package/dist/components/ui3n-button/types.d.ts +4 -2
  11. package/dist/components/ui3n-checkbox/types.d.ts +11 -0
  12. package/dist/components/ui3n-checkbox/ui3n-checkbox.d.ts +4 -1
  13. package/dist/components/ui3n-chip/types.d.ts +6 -1
  14. package/dist/components/ui3n-chip/ui3n-chip.d.ts +2 -0
  15. package/dist/components/ui3n-drop-files/types.d.ts +7 -0
  16. package/dist/components/ui3n-drop-files/ui3n-drop-files.d.ts +7 -1
  17. package/dist/components/ui3n-editable/types.d.ts +11 -0
  18. package/dist/components/ui3n-editable/ui3n-editable.d.ts +4 -2
  19. package/dist/components/ui3n-icon/types.d.ts +5 -1
  20. package/dist/components/ui3n-icon/ui3n-icon.d.ts +2 -2
  21. package/dist/components/ui3n-input/types.d.ts +4 -0
  22. package/dist/components/ui3n-input/ui3n-input.d.ts +4 -1
  23. package/dist/components/ui3n-input-file/types.d.ts +11 -0
  24. package/dist/components/ui3n-input-file/ui3n-input-file.d.ts +4 -1
  25. package/dist/components/ui3n-list/types.d.ts +4 -0
  26. package/dist/components/ui3n-menu/types.d.ts +4 -0
  27. package/dist/components/ui3n-menu/ui3n-menu.d.ts +1 -1
  28. package/dist/components/ui3n-notification/ui3n-notification.d.ts +2 -2
  29. package/dist/components/ui3n-progress/ui3n-progress-circular.d.ts +1 -1
  30. package/dist/components/ui3n-progress/ui3n-progress-linear.d.ts +1 -1
  31. package/dist/components/ui3n-radio-group/types.d.ts +18 -0
  32. package/dist/components/ui3n-radio-group/ui3n-radio-group.d.ts +3 -1
  33. package/dist/components/ui3n-radio-group/ui3n-radio.d.ts +6 -7
  34. package/dist/components/ui3n-scrollbar-horizontal/types.d.ts +1 -0
  35. package/dist/components/ui3n-scrollbar-horizontal/ui3n-scroolbar-horizontal.d.ts +1 -0
  36. package/dist/components/ui3n-scrollbar-vertical/types.d.ts +3 -0
  37. package/dist/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +3 -0
  38. package/dist/components/ui3n-selector/types.d.ts +11 -0
  39. package/dist/components/ui3n-selector/ui3n-selector.d.ts +2 -2
  40. package/dist/components/ui3n-slider/types.d.ts +11 -0
  41. package/dist/components/ui3n-slider/ui3n-slider.d.ts +4 -1
  42. package/dist/components/ui3n-step-line-bar/types.d.ts +4 -0
  43. package/dist/components/ui3n-switch/types.d.ts +11 -0
  44. package/dist/components/ui3n-switch/ui3n-switch.d.ts +4 -1
  45. package/dist/components/ui3n-table/composables/useTable.d.ts +1 -0
  46. package/dist/components/ui3n-table/types.d.ts +4 -0
  47. package/dist/components/ui3n-table/ui3n-table-sort-icon.d.ts +4 -1
  48. package/dist/components/ui3n-tabs/types.d.ts +4 -0
  49. package/dist/components/ui3n-text/types.d.ts +11 -0
  50. package/dist/components/ui3n-text/ui3n-text.d.ts +4 -1
  51. package/dist/components/ui3n-tooltip/types.d.ts +4 -0
  52. package/dist/components/ui3n-tooltip/ui3n-tooltip.d.ts +4 -2
  53. package/dist/style.css +1 -1
  54. package/dist/ui3n-components.js +2083 -1697
  55. package/dist/ui3n-plugins.js +1 -1
  56. package/package.json +1 -1
  57. package/src/components/index.ts +29 -7
  58. package/src/components/ui3n-autocomplete/types.ts +9 -1
  59. package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +182 -51
  60. package/src/components/ui3n-badge/types.ts +10 -0
  61. package/src/components/ui3n-badge/ui3n-badge-simple.vue +54 -55
  62. package/src/components/ui3n-badge/ui3n-badge.vue +4 -0
  63. package/src/components/ui3n-breadcrumbs/types.ts +1 -1
  64. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +7 -5
  65. package/src/components/ui3n-button/types.ts +4 -2
  66. package/src/components/ui3n-button/ui3n-button.vue +24 -19
  67. package/src/components/ui3n-checkbox/types.ts +12 -0
  68. package/src/components/ui3n-checkbox/ui3n-checkbox.vue +79 -29
  69. package/src/components/ui3n-chip/types.ts +6 -1
  70. package/src/components/ui3n-chip/ui3n-chip.vue +64 -61
  71. package/src/components/ui3n-dialog/ui3n-dialog.vue +3 -3
  72. package/src/components/ui3n-drop-files/types.ts +8 -0
  73. package/src/components/ui3n-drop-files/ui3n-drop-files.vue +73 -29
  74. package/src/components/ui3n-editable/types.ts +12 -0
  75. package/src/components/ui3n-editable/ui3n-editable.vue +56 -24
  76. package/src/components/ui3n-icon/types.ts +5 -1
  77. package/src/components/ui3n-icon/ui3n-icon.vue +45 -50
  78. package/src/components/ui3n-input/types.ts +4 -0
  79. package/src/components/ui3n-input/ui3n-input.vue +14 -1
  80. package/src/components/ui3n-input-file/types.ts +12 -0
  81. package/src/components/ui3n-input-file/ui3n-input-file.vue +33 -16
  82. package/src/components/ui3n-list/types.ts +4 -0
  83. package/src/components/ui3n-list/ui3n-list.vue +3 -1
  84. package/src/components/ui3n-menu/types.ts +4 -0
  85. package/src/components/ui3n-menu/ui3n-menu.vue +43 -32
  86. package/src/components/ui3n-notification/ui3n-notification.vue +190 -175
  87. package/src/components/ui3n-progress/ui3n-progress-circular.vue +40 -22
  88. package/src/components/ui3n-progress/ui3n-progress-linear.vue +14 -7
  89. package/src/components/ui3n-radio-group/types.ts +20 -0
  90. package/src/components/ui3n-radio-group/ui3n-radio-group.vue +61 -48
  91. package/src/components/ui3n-radio-group/ui3n-radio.vue +60 -65
  92. package/src/components/ui3n-scrollbar-horizontal/types.ts +1 -0
  93. package/src/components/ui3n-scrollbar-horizontal/ui3n-scroolbar-horizontal.vue +8 -1
  94. package/src/components/ui3n-scrollbar-vertical/types.ts +3 -0
  95. package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +12 -5
  96. package/src/components/ui3n-selector/types.ts +12 -0
  97. package/src/components/ui3n-selector/ui3n-selector.vue +63 -40
  98. package/src/components/ui3n-slider/types.ts +12 -0
  99. package/src/components/ui3n-slider/ui3n-slider.vue +88 -39
  100. package/src/components/ui3n-step-line-bar/types.ts +4 -0
  101. package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +8 -10
  102. package/src/components/ui3n-switch/types.ts +12 -0
  103. package/src/components/ui3n-switch/ui3n-switch.vue +57 -25
  104. package/src/components/ui3n-table/composables/useTable.ts +17 -0
  105. package/src/components/ui3n-table/types.ts +4 -0
  106. package/src/components/ui3n-table/ui3n-table-sort-icon.vue +9 -8
  107. package/src/components/ui3n-table/ui3n-table.vue +48 -17
  108. package/src/components/ui3n-tabs/types.ts +4 -0
  109. package/src/components/ui3n-tabs/ui3n-tabs.vue +146 -108
  110. package/src/components/ui3n-text/types.ts +12 -0
  111. package/src/components/ui3n-text/ui3n-text.vue +56 -15
  112. package/src/components/ui3n-tooltip/types.ts +4 -0
  113. package/src/components/ui3n-tooltip/ui3n-tooltip.vue +61 -43
  114. package/src/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue +201 -17
  115. package/dist/chunks/ui3n-notification-DlDM-u-R.js +0 -276
@@ -1,276 +0,0 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onMounted as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, unref as m, useCssModule as h, useCssVars as g, watch as _, withDirectives as v, withKeys as y } from "vue";
2
- //#region src/directives/ui3n-ripple.ts
3
- var b = {}, x = "";
4
- function S({ el: e, duration: t }) {
5
- let n = document.createElement("div"), r = Math.max(e.clientWidth, e.clientHeight), i = r / 2;
6
- n.style.width = n.style.height = `${r}px`, n.style.left = `${Math.round(e.clientWidth / 2 - i)}px`, n.style.top = `${Math.round(e.clientHeight / 2 - i)}px`, n.classList.add("ui3n-ripple"), x && n.style.setProperty("--ui3n-ripple-bg-color", x), t && n.style.setProperty("--ui3n-ripple-duration", `${t}ms`);
7
- let a = e.getElementsByClassName("ui3n-ripple")[0];
8
- a && a.remove(), e.appendChild(n);
9
- }
10
- function C({ eventName: e, el: t, duration: n }) {
11
- ["click", "keydown"].includes(e) && (b[e] = new AbortController(), t.addEventListener(e, function() {
12
- S({
13
- el: t,
14
- duration: n
15
- });
16
- }, { signal: b[e].signal }));
17
- }
18
- var w = {
19
- mounted(e, t) {
20
- let { color: n, duration: r, eventsTriggers: i = [], disabled: a = !1 } = t.value || {};
21
- x = n || "", !a && ((!i.length || i.length && i.includes("click")) && C({
22
- eventName: "click",
23
- el: e,
24
- duration: r
25
- }), i.length && i.includes("enter") && C({
26
- eventName: "keydown",
27
- el: e,
28
- duration: r
29
- }));
30
- },
31
- beforeUnmount() {
32
- Object.keys(b).forEach((e) => {
33
- b[e].abort();
34
- });
35
- }
36
- }, T = ["data-icon", "title"], E = /* @__PURE__ */ o({
37
- __name: "ui3n-icon",
38
- props: {
39
- icon: {},
40
- title: { default: "" },
41
- size: {},
42
- width: {},
43
- height: {},
44
- color: { default: "var(--color-icon-control-primary-default)" },
45
- horizontalFlip: { type: Boolean },
46
- verticalFlip: { type: Boolean },
47
- rotate: { default: 0 }
48
- },
49
- emits: ["click"],
50
- setup(t, { emit: n }) {
51
- g((e) => ({
52
- v170e4988: e.color,
53
- v4efed7e4: d.value,
54
- v33baaab5: f.value
55
- }));
56
- let i = t, a = n, o = e(() => i.size || i.width || 16), l = e(() => i.size || i.height || 16), d = e(() => `${o.value}px`), f = e(() => `${l.value}px`), p = e(() => {
57
- let e = {}, t = [];
58
- return i.horizontalFlip && t.push("rotateY(180deg)"), i.verticalFlip && t.push("rotateX(180deg)"), i.rotate && t.push(`rotate(${i.rotate}deg)`), t.length && (e.transform = t.join(" ")), e;
59
- });
60
- function m(e) {
61
- a("click", e);
62
- }
63
- return (e, n) => (u(), r("div", {
64
- class: s(e.$style.ui3nIcon),
65
- "data-icon": t.icon,
66
- title: t.title,
67
- style: c(p.value),
68
- onClick: m
69
- }, null, 14, T));
70
- }
71
- }), D = { ui3nIcon: "_ui3nIcon_zqqfa_1" }, O = (e, t) => {
72
- let n = e.__vccOpts || e;
73
- for (let [e, r] of t) n[e] = r;
74
- return n;
75
- }, k = /* @__PURE__ */ O(E, [["__cssModules", { $style: D }]]), A = {
76
- small: 12,
77
- regular: 16,
78
- large: 24
79
- }, j = ["disabled"], M = /* @__PURE__ */ O(/* @__PURE__ */ o({
80
- __name: "ui3n-button",
81
- props: {
82
- type: { default: "primary" },
83
- size: { default: "regular" },
84
- square: { type: Boolean },
85
- block: { type: Boolean },
86
- textColor: {},
87
- color: {},
88
- elevation: { type: Boolean },
89
- icon: {},
90
- iconSize: {},
91
- iconColor: {},
92
- iconPosition: { default: "right" },
93
- disabled: {
94
- type: Boolean,
95
- default: !1
96
- }
97
- },
98
- emits: [
99
- "init",
100
- "click",
101
- "enter",
102
- "focus",
103
- "blur"
104
- ],
105
- setup(i, { emit: a }) {
106
- let o = w, c = i, p = a, g = h(), b = d(null), x = e(() => {
107
- let e = [
108
- g.ui3nButton,
109
- g[c.size],
110
- g[c.type]
111
- ];
112
- return c.block && c.type !== "icon" && e.push(g.block), c.square && e.push(g.square), c.icon && e.push(g[`withIcon-${c.iconPosition}`]), c.elevation && e.push(g.elevation), e;
113
- }), S = e(() => c.iconSize ? c.iconSize : A[c.size]), C = e(() => c.iconColor ? c.iconColor : "inherit");
114
- async function T(e, t) {
115
- ["init", "enter"].includes(e) ? p(e, b.value) : p(e, t);
116
- }
117
- return _([() => c.color, () => c.textColor], (e, t) => {
118
- if (!b.value) return;
119
- let [n, r] = t, [i, a] = e;
120
- (c.type === "custom" || c.type === "icon") && i !== n && b.value.style.setProperty("--ui3n-button-bg-color", i ?? "var(--color-bg-button-primary-default)"), (c.type === "custom" || c.type === "icon") && a !== r && b.value.style.setProperty("--ui3n-button-text-color", a ?? "var(--color-text-button-primary-default)");
121
- }), l(() => {
122
- b.value && ((c.type === "custom" || c.type === "icon") && c.color && b.value.style.setProperty("--ui3n-button-bg-color", c.color), c.type === "custom" && c.textColor && b.value.style.setProperty("--ui3n-button-text-color", c.textColor), T("init"));
123
- }), (e, a) => v((u(), r("button", {
124
- ref_key: "buttonEl",
125
- ref: b,
126
- class: s(x.value),
127
- type: "button",
128
- disabled: i.disabled,
129
- onClick: a[0] ||= (e) => T("click", e),
130
- onFocusin: a[1] ||= (e) => T("focus", e),
131
- onFocusout: a[2] ||= (e) => T("blur", e),
132
- onKeydown: a[3] ||= y((e) => T("enter"), ["enter"])
133
- }, [i.icon ? (u(), t(k, {
134
- key: 0,
135
- class: s(e.$style.buttonIcon),
136
- icon: i.icon,
137
- size: S.value,
138
- color: C.value
139
- }, null, 8, [
140
- "class",
141
- "icon",
142
- "size",
143
- "color"
144
- ])) : n("", !0), i.type === "icon" ? n("", !0) : (u(), r("span", {
145
- key: 1,
146
- class: s(e.$style.text)
147
- }, [f(e.$slots, "default")], 2))], 42, j)), [[m(o)]]);
148
- }
149
- }), [["__cssModules", { $style: {
150
- ui3nButton: "_ui3nButton_ih1y4_3",
151
- "withIcon-left": "_withIcon-left_ih1y4_31",
152
- "withIcon-right": "_withIcon-right_ih1y4_34",
153
- square: "_square_ih1y4_37",
154
- regular: "_regular_ih1y4_44",
155
- small: "_small_ih1y4_51",
156
- large: "_large_ih1y4_58",
157
- block: "_block_ih1y4_65",
158
- primary: "_primary_ih1y4_69",
159
- elevation: "_elevation_ih1y4_92",
160
- text: "_text_ih1y4_97",
161
- secondary: "_secondary_ih1y4_129",
162
- tertiary: "_tertiary_ih1y4_183",
163
- outline: "_outline_ih1y4_238",
164
- icon: "_icon_ih1y4_266",
165
- custom: "_custom_ih1y4_286",
166
- buttonIcon: "_buttonIcon_ih1y4_315"
167
- } }]]), N = ["id"], P = /* @__PURE__ */ O(/* @__PURE__ */ o({
168
- __name: "ui3n-notification",
169
- props: {
170
- id: {},
171
- type: { default: "info" },
172
- content: {},
173
- position: { default: "center" },
174
- duration: { default: 0 },
175
- withIcon: {
176
- type: Boolean,
177
- default: !0
178
- },
179
- teleport: {},
180
- onOpen: {
181
- type: Function,
182
- default: () => void 0
183
- },
184
- onClose: {
185
- type: Function,
186
- default: () => void 0
187
- }
188
- },
189
- setup(o) {
190
- let c = o, d = {
191
- success: {
192
- color: "var(--success-content-default)",
193
- icon: "round-check-circle",
194
- iconColor: "var(--success-fill-default)",
195
- iconRotate: 0
196
- },
197
- warning: {
198
- color: "var(--warning-content-default)",
199
- icon: "round-warning",
200
- iconColor: "var(--warning-fill-default)",
201
- iconRotate: 0
202
- },
203
- info: {
204
- color: "var(--info-content-default)",
205
- icon: "round-info",
206
- iconColor: "var(--info-fill-default)",
207
- iconRotate: 180
208
- },
209
- error: {
210
- color: "var(--error-content-default)",
211
- icon: "round-info",
212
- iconColor: "var(--error-fill-default)",
213
- iconRotate: 180
214
- }
215
- }, f = h(), m = e(() => {
216
- let e = [
217
- f.ui3nNotification,
218
- f[`${c.type}Type`],
219
- f[`${c.position}Position`]
220
- ];
221
- return c.withIcon && e.push(f.withIcon), e;
222
- });
223
- function g() {
224
- c.onClose();
225
- }
226
- return l(() => {
227
- c.duration > 500 && setTimeout(() => {
228
- c.onClose();
229
- }, c.duration);
230
- }), (e, c) => (u(), r("div", {
231
- id: o.id,
232
- class: s(m.value)
233
- }, [
234
- o.withIcon ? (u(), r("div", {
235
- key: 0,
236
- class: s(e.$style.ui3nNotificationIcon)
237
- }, [a(k, {
238
- icon: d[o.type].icon,
239
- width: "16",
240
- height: "16",
241
- rotate: d[o.type].iconRotate,
242
- color: d[o.type].iconColor
243
- }, null, 8, [
244
- "icon",
245
- "rotate",
246
- "color"
247
- ])], 2)) : n("", !0),
248
- i("div", { class: s(e.$style.ui3nNotificationContent) }, p(o.content), 3),
249
- o.duration ? n("", !0) : (u(), t(M, {
250
- key: 1,
251
- type: "icon",
252
- size: "small",
253
- color: "transparent",
254
- icon: "round-close",
255
- "icon-color": d[o.type].color,
256
- class: s(e.$style.closeBtn),
257
- onClick: g
258
- }, null, 8, ["icon-color", "class"]))
259
- ], 10, N));
260
- }
261
- }), [["__cssModules", { $style: {
262
- ui3nNotification: "_ui3nNotification_1tbbz_1",
263
- withIcon: "_withIcon_1tbbz_16",
264
- ui3nNotificationIcon: "_ui3nNotificationIcon_1tbbz_20",
265
- ui3nNotificationContent: "_ui3nNotificationContent_1tbbz_32",
266
- closeBtn: "_closeBtn_1tbbz_40",
267
- infoType: "_infoType_1tbbz_47",
268
- successType: "_successType_1tbbz_57",
269
- warningType: "_warningType_1tbbz_67",
270
- errorType: "_errorType_1tbbz_77",
271
- leftPosition: "_leftPosition_1tbbz_87",
272
- centerPosition: "_centerPosition_1tbbz_92",
273
- rightPosition: "_rightPosition_1tbbz_97"
274
- } }]]);
275
- //#endregion
276
- export { w as a, O as i, M as n, k as r, P as t };