prlg-ui 1.8.313 → 1.8.314

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 (36) hide show
  1. package/dist/DateFormatter-BHT1a2Uj.js +1837 -0
  2. package/dist/DateFormatter-K5-0YX5v.cjs +1 -0
  3. package/dist/Image-bZf6ZaIG.js +200 -0
  4. package/dist/Image-kzSjYHy-.cjs +1 -0
  5. package/dist/blocks/index.cjs.js +1 -1
  6. package/dist/blocks/index.es.js +74 -74
  7. package/dist/{dayjs.util-CjzwpJrv.js → dayjs.util-DSjkslnJ.js} +1 -1
  8. package/dist/{dayjs.util-BwrUD5bd.cjs → dayjs.util-DVNMZ0pw.cjs} +1 -1
  9. package/dist/eventBus.util-K9Yq6hZm.cjs +1 -0
  10. package/dist/{eventBus.util-DjOylFpN.js → eventBus.util-msbJpg6N.js} +24 -24
  11. package/dist/fonts/Inter/.DS_Store +0 -0
  12. package/dist/icons/index.cjs.js +1 -1
  13. package/dist/icons/index.es.js +382 -339
  14. package/dist/icons.d.ts +4 -0
  15. package/dist/{index-DAoqDSY3.cjs → index-Bart793F.cjs} +20 -2
  16. package/dist/{index-BPZa5uFL.js → index-NJFcTcwk.js} +26 -6
  17. package/dist/parseFileSize.util-BAG-MLFl.js +756 -0
  18. package/dist/parseFileSize.util-zKz6zjwq.cjs +1 -0
  19. package/dist/prlg-ui.cjs.js +1 -1
  20. package/dist/prlg-ui.css +1 -1
  21. package/dist/prlg-ui.es.js +2765 -2765
  22. package/dist/reka-ui/index.cjs.js +5 -5
  23. package/dist/reka-ui/index.es.js +6120 -7674
  24. package/dist/rekaUI.d.ts +2 -2
  25. package/dist/{uploadFile.util-DAZ85cUN.cjs → uploadFile.util-C-KPiLD9.cjs} +1 -1
  26. package/dist/{uploadFile.util-COEVam78.js → uploadFile.util-CaG3C2Ri.js} +1 -1
  27. package/dist/utils/index.cjs.js +1 -1
  28. package/dist/utils/index.es.js +402 -338
  29. package/dist/utils/internationalized.utils.ts +1 -0
  30. package/dist/utils.d.ts +3 -0
  31. package/package.json +1 -1
  32. package/dist/Image-A6kr2Mp0.js +0 -200
  33. package/dist/Image-MDiNezjY.cjs +0 -1
  34. package/dist/eventBus.util-DHkO4j-V.cjs +0 -1
  35. package/dist/parseFileSize.util-B7mr_w32.js +0 -639
  36. package/dist/parseFileSize.util-DgxaYqGV.cjs +0 -1
@@ -0,0 +1 @@
1
+ export * from "@internationalized/date";
package/dist/utils.d.ts CHANGED
@@ -152,6 +152,9 @@ export declare const useBodyScroll: () => {
152
152
 
153
153
  export declare type VueInstance = ComponentPublicInstance;
154
154
 
155
+
156
+ export * from "@internationalized/date";
157
+
155
158
  export { }
156
159
 
157
160
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prlg-ui",
3
3
  "private": false,
4
- "version": "1.8.313",
4
+ "version": "1.8.314",
5
5
  "type": "module",
6
6
  "main": "dist/prlg-ui.umd.js",
7
7
  "module": "dist/prlg-ui.es.js",
@@ -1,200 +0,0 @@
1
- import { defineComponent as w, useId as x, ref as z, computed as I, onMounted as b, createElementBlock as i, openBlock as t, normalizeClass as h, createCommentVNode as o, createBlock as F, createVNode as p, unref as d, resolveDynamicComponent as M, toDisplayString as _, Teleport as E, Transition as V, withCtx as O, normalizeStyle as N, createElementVNode as r, useTemplateRef as W, Fragment as j } from "vue";
2
- import { F as D, E as P, W as R, P as q } from "./FileIcon-D68SKu3j.js";
3
- import { C, _ as k, E as A } from "./EyeIcon-D6SZWKKH.js";
4
- import { h as B } from "./parseFileSize.util-B7mr_w32.js";
5
- import { u as G } from "./useOverlay-CkT4RNfY.js";
6
- function H(e) {
7
- return e.startsWith("image/") ? "image" : e === "application/pdf" ? "pdf" : e === "application/msword" || e === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ? "word" : e === "application/vnd.ms-excel" || e === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ? "excel" : "other";
8
- }
9
- const J = {
10
- key: 1,
11
- class: "file__title"
12
- }, K = {
13
- key: 2,
14
- class: "file__info"
15
- }, L = {
16
- key: 0,
17
- class: "file__type"
18
- }, Q = {
19
- key: 1,
20
- class: "file__info-separator"
21
- }, U = {
22
- key: 2,
23
- class: "file__size"
24
- }, X = /* @__PURE__ */ w({
25
- __name: "File",
26
- props: {
27
- file: {},
28
- viewName: { type: Boolean, default: !1 },
29
- outlined: { type: Boolean, default: !0 },
30
- removable: { type: Boolean }
31
- },
32
- emits: ["remove"],
33
- setup(e, { emit: v }) {
34
- const c = v, a = x(), l = z(null);
35
- async function n(m, u = "image") {
36
- const y = await (await fetch(m)).blob(), $ = y.type.split("/")[1] || "", S = $ ? `${u}.${$}` : u;
37
- return new File([y], S, { type: y.type });
38
- }
39
- const s = I(() => l.value && l.value.mime ? H(l.value.mime) : null), f = I(() => {
40
- switch (s.value) {
41
- case "pdf":
42
- return q;
43
- case "word":
44
- return R;
45
- case "excel":
46
- return P;
47
- case "other":
48
- default:
49
- return D;
50
- }
51
- });
52
- return b(async () => {
53
- if (typeof e.file == "string") {
54
- const m = await n(e.file);
55
- l.value = {
56
- id: a,
57
- url: e.file,
58
- name: m.name,
59
- mime: m.type,
60
- size: m.size
61
- };
62
- } else
63
- l.value = e.file;
64
- }), (m, u) => (t(), i("div", {
65
- class: h(["file", { "file--outlined": e.outlined }])
66
- }, [
67
- e.removable && typeof e.file != "string" ? (t(), i("button", {
68
- key: 0,
69
- class: "file__remove",
70
- onClick: u[0] || (u[0] = (g) => c("remove", e.file))
71
- }, [
72
- p(d(C))
73
- ])) : o("", !0),
74
- (t(), F(M(f.value), { class: "file__icon" })),
75
- l.value && l.value.name && e.viewName ? (t(), i("div", J, _(l.value ? l.value.name.split(".")[0] : "unknown"), 1)) : o("", !0),
76
- l.value ? (t(), i("div", K, [
77
- l.value.mime ? (t(), i("div", L, _(s.value), 1)) : o("", !0),
78
- l.value.mime && l.value.size ? (t(), i("div", Q)) : o("", !0),
79
- l.value.size ? (t(), i("div", U, _(l.value ? d(B)(l.value.size) : "0 Б"), 1)) : o("", !0)
80
- ])) : o("", !0)
81
- ], 2));
82
- }
83
- }), fe = /* @__PURE__ */ k(X, [["__scopeId", "data-v-7c3d1c11"]]), Y = { class: "image-full-modal__wrapper" }, Z = { class: "image-full-modal__header" }, T = { class: "image-full-modal__main" }, ee = ["src", "alt"], le = /* @__PURE__ */ w({
84
- __name: "ImageFullModal",
85
- props: {
86
- src: {},
87
- alt: {}
88
- },
89
- setup(e, { expose: v }) {
90
- const c = z(!1), { zIndex: a } = G("modal");
91
- return v({
92
- open: () => {
93
- c.value = !0;
94
- },
95
- close: () => {
96
- c.value = !1;
97
- }
98
- }), (l, n) => (t(), F(E, { to: "body" }, [
99
- p(V, { name: "fade" }, {
100
- default: O(() => [
101
- c.value ? (t(), i("div", {
102
- key: 0,
103
- class: "image-full-modal",
104
- style: N({ zIndex: d(a)?.zIndex })
105
- }, [
106
- r("div", {
107
- class: "image-full-modal__overlay",
108
- onClick: n[0] || (n[0] = (s) => c.value = !1)
109
- }),
110
- r("div", Y, [
111
- r("div", Z, [
112
- r("button", {
113
- class: "image-full-modal__close",
114
- onClick: n[1] || (n[1] = (s) => c.value = !1)
115
- }, [
116
- p(d(C))
117
- ])
118
- ]),
119
- r("div", T, [
120
- r("img", {
121
- src: e.src,
122
- alt: e.alt
123
- }, null, 8, ee)
124
- ]),
125
- n[2] || (n[2] = r("div", { class: "image-full-modal__footer" }, null, -1))
126
- ])
127
- ], 4)) : o("", !0)
128
- ]),
129
- _: 1
130
- })
131
- ]));
132
- }
133
- }), te = /* @__PURE__ */ k(le, [["__scopeId", "data-v-26b5c867"]]), ae = ["src", "alt"], ie = {
134
- key: 1,
135
- class: "image__info"
136
- }, ne = {
137
- key: 0,
138
- class: "image__size"
139
- }, se = /* @__PURE__ */ w({
140
- __name: "Image",
141
- props: {
142
- file: {},
143
- alt: {},
144
- size: { default: "medium" },
145
- fullScreen: { type: Boolean },
146
- viewInfo: { type: Boolean, default: !1 }
147
- },
148
- setup(e) {
149
- const v = x(), c = W("imageFullModal"), a = z(null);
150
- async function l(s, f = "image") {
151
- const u = await (await fetch(s)).blob(), g = u.type.split("/")[1] || "", y = g ? `${f}.${g}` : f;
152
- return new File([u], y, { type: u.type });
153
- }
154
- const n = I(() => typeof e.file == "string" ? e.file : e.file.url);
155
- return b(async () => {
156
- if (e.viewInfo)
157
- if (typeof e.file == "string") {
158
- const s = await l(e.file);
159
- a.value = {
160
- id: v,
161
- url: e.file,
162
- name: s.name,
163
- mime: s.type,
164
- size: s.size
165
- };
166
- } else
167
- a.value = e.file;
168
- }), (s, f) => (t(), i(j, null, [
169
- r("div", {
170
- class: h(["image", `image--${e.size}`, { "image--full-screen": e.fullScreen }])
171
- }, [
172
- e.fullScreen ? (t(), i("div", {
173
- key: 0,
174
- class: "image__overlay",
175
- onClick: f[0] || (f[0] = (m) => c.value?.open())
176
- }, [
177
- p(d(A))
178
- ])) : o("", !0),
179
- r("img", {
180
- src: n.value,
181
- alt: e.alt
182
- }, null, 8, ae),
183
- e.viewInfo && a.value && (a.value.mime || a.value.size) && e.size === "large" ? (t(), i("div", ie, [
184
- a.value.size ? (t(), i("div", ne, _(a.value ? d(B)(a.value.size) : "0 Б"), 1)) : o("", !0)
185
- ])) : o("", !0)
186
- ], 2),
187
- e.fullScreen ? (t(), F(te, {
188
- key: 0,
189
- ref: "imageFullModal",
190
- src: n.value,
191
- alt: e.alt
192
- }, null, 8, ["src", "alt"])) : o("", !0)
193
- ], 64));
194
- }
195
- }), de = /* @__PURE__ */ k(se, [["__scopeId", "data-v-903c99cc"]]);
196
- export {
197
- fe as F,
198
- de as I,
199
- H as g
200
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),v=require("./FileIcon-Dt-TWf3B.cjs"),u=require("./EyeIcon-CJg2W9QQ.cjs"),k=require("./parseFileSize.util-DgxaYqGV.cjs"),B=require("./useOverlay-DDiMe8yV.cjs");function g(l){return l.startsWith("image/")?"image":l==="application/pdf"?"pdf":l==="application/msword"||l==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"word":l==="application/vnd.ms-excel"||l==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"excel":"other"}const _={key:1,class:"file__title"},I={key:2,class:"file__info"},V={key:0,class:"file__type"},z={key:1,class:"file__info-separator"},C={key:2,class:"file__size"},E=e.defineComponent({__name:"File",props:{file:{},viewName:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},removable:{type:Boolean}},emits:["remove"],setup(l,{emit:m}){const i=m,o=e.useId(),t=e.ref(null);async function n(s,c="image"){const d=await(await fetch(s)).blob(),y=d.type.split("/")[1]||"",p=y?`${c}.${y}`:c;return new File([d],p,{type:d.type})}const a=e.computed(()=>t.value&&t.value.mime?g(t.value.mime):null),r=e.computed(()=>{switch(a.value){case"pdf":return v.PdfIcon;case"word":return v.WordIcon;case"excel":return v.ExcelIcon;case"other":default:return v.FileIcon}});return e.onMounted(async()=>{if(typeof l.file=="string"){const s=await n(l.file);t.value={id:o,url:l.file,name:s.name,mime:s.type,size:s.size}}else t.value=l.file}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["file",{"file--outlined":l.outlined}])},[l.removable&&typeof l.file!="string"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"file__remove",onClick:c[0]||(c[0]=f=>i("remove",l.file))},[e.createVNode(e.unref(u.CloseIcon))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{class:"file__icon"})),t.value&&t.value.name&&l.viewName?(e.openBlock(),e.createElementBlock("div",_,e.toDisplayString(t.value?t.value.name.split(".")[0]:"unknown"),1)):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",I,[t.value.mime?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0),t.value.mime&&t.value.size?(e.openBlock(),e.createElementBlock("div",z)):e.createCommentVNode("",!0),t.value.size?(e.openBlock(),e.createElementBlock("div",C,e.toDisplayString(t.value?e.unref(k.formatFileSize)(t.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),N=u._export_sfc(E,[["__scopeId","data-v-7c3d1c11"]]),F={class:"image-full-modal__wrapper"},w={class:"image-full-modal__header"},x={class:"image-full-modal__main"},$=["src","alt"],b=e.defineComponent({__name:"ImageFullModal",props:{src:{},alt:{}},setup(l,{expose:m}){const i=e.ref(!1),{zIndex:o}=B.useOverlay("modal");return m({open:()=>{i.value=!0},close:()=>{i.value=!1}}),(t,n)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-full-modal",style:e.normalizeStyle({zIndex:e.unref(o)?.zIndex})},[e.createElementVNode("div",{class:"image-full-modal__overlay",onClick:n[0]||(n[0]=a=>i.value=!1)}),e.createElementVNode("div",F,[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"image-full-modal__close",onClick:n[1]||(n[1]=a=>i.value=!1)},[e.createVNode(e.unref(u.CloseIcon))])]),e.createElementVNode("div",x,[e.createElementVNode("img",{src:l.src,alt:l.alt},null,8,$)]),n[2]||(n[2]=e.createElementVNode("div",{class:"image-full-modal__footer"},null,-1))])],4)):e.createCommentVNode("",!0)]),_:1})]))}}),h=u._export_sfc(b,[["__scopeId","data-v-26b5c867"]]),S=["src","alt"],M={key:1,class:"image__info"},q={key:0,class:"image__size"},D=e.defineComponent({__name:"Image",props:{file:{},alt:{},size:{default:"medium"},fullScreen:{type:Boolean},viewInfo:{type:Boolean,default:!1}},setup(l){const m=e.useId(),i=e.useTemplateRef("imageFullModal"),o=e.ref(null);async function t(a,r="image"){const c=await(await fetch(a)).blob(),f=c.type.split("/")[1]||"",d=f?`${r}.${f}`:r;return new File([c],d,{type:c.type})}const n=e.computed(()=>typeof l.file=="string"?l.file:l.file.url);return e.onMounted(async()=>{if(l.viewInfo)if(typeof l.file=="string"){const a=await t(l.file);o.value={id:m,url:l.file,name:a.name,mime:a.type,size:a.size}}else o.value=l.file}),(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["image",`image--${l.size}`,{"image--full-screen":l.fullScreen}])},[l.fullScreen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image__overlay",onClick:r[0]||(r[0]=s=>i.value?.open())},[e.createVNode(e.unref(u.EyeIcon))])):e.createCommentVNode("",!0),e.createElementVNode("img",{src:n.value,alt:l.alt},null,8,S),l.viewInfo&&o.value&&(o.value.mime||o.value.size)&&l.size==="large"?(e.openBlock(),e.createElementBlock("div",M,[o.value.size?(e.openBlock(),e.createElementBlock("div",q,e.toDisplayString(o.value?e.unref(k.formatFileSize)(o.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2),l.fullScreen?(e.openBlock(),e.createBlock(h,{key:0,ref:"imageFullModal",src:n.value,alt:l.alt},null,8,["src","alt"])):e.createCommentVNode("",!0)],64))}}),O=u._export_sfc(D,[["__scopeId","data-v-903c99cc"]]);exports.File=N;exports.Image=O;exports.getFileTypeByMime=g;
@@ -1 +0,0 @@
1
- "use strict";const l=require("vue");let r=null,c=0;function a(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{c++,c===1&&!r&&(r=a())},u=()=>{c>0&&c--,c===0&&r&&(r(),r=null)},i=()=>({unlockScroll:u,lockScroll:d}),f=["data-layer"],y=l.defineComponent({__name:"Portal",props:{overlayType:{default:"modal"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0},parentId:{}},setup(e){const t=e,n=l.computed(()=>{if(t.zIndex)return t.zIndex});return(o,s)=>e.show?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:e.target,disabled:!e.teleport},[l.createElementVNode("div",{style:l.normalizeStyle({zIndex:n.value,position:"relative",isolation:"isolate"}),"data-layer":e.overlayType},[l.renderSlot(o.$slots,"default")],12,f)],8,["to","disabled"])):l.createCommentVNode("",!0)}});function p(){const e=new Map;return{on(t,n){const o=e.get(t)||[];o.push(n),e.set(t,o)},off(t,n){const o=e.get(t);o&&e.set(t,o.filter(s=>s!==n))},emit(t,n){const o=e.get(t);o&&o.forEach(s=>s(n))},clear(){e.clear()}}}exports.EventBus=p;exports._sfc_main=y;exports.useBodyScroll=i;