@m2s2/vue-lib 2.5.2 → 2.5.3
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/index.cjs +1 -1
- package/dist/index.mjs +58 -57
- package/dist/{index16.cjs → index17.cjs} +1 -1
- package/dist/{index16.mjs → index17.mjs} +1 -1
- package/dist/{index22.cjs → index23.cjs} +1 -1
- package/dist/{index22.mjs → index23.mjs} +1 -1
- package/dist/{index24.cjs → index25.cjs} +1 -1
- package/dist/{index24.mjs → index25.mjs} +1 -1
- package/dist/{index26.cjs → index27.cjs} +1 -1
- package/dist/{index26.mjs → index27.mjs} +3 -3
- package/dist/{index30.cjs → index31.cjs} +1 -1
- package/dist/{index30.mjs → index31.mjs} +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.mjs +40 -9
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +9 -85
- package/dist/index37.cjs +1 -0
- package/dist/index37.mjs +87 -0
- package/dist/index39.cjs +1 -1
- package/dist/index39.mjs +30 -9
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +9 -26
- package/dist/index41.cjs +1 -0
- package/dist/index41.mjs +28 -0
- package/dist/index43.cjs +1 -1
- package/dist/index43.mjs +30 -9
- package/dist/index44.cjs +1 -1
- package/dist/index44.mjs +9 -34
- package/dist/index45.cjs +1 -1
- package/dist/index45.mjs +34 -9
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +9 -49
- package/dist/index47.cjs +1 -0
- package/dist/index47.mjs +51 -0
- package/dist/index51.cjs +1 -1
- package/dist/index51.mjs +27 -3
- package/dist/index52.cjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.mjs +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.mjs +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.mjs +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.mjs +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.mjs +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.mjs +3 -2
- package/dist/index68.cjs +1 -1
- package/dist/index68.mjs +2 -3
- package/dist/index69.cjs +1 -1
- package/dist/index69.mjs +3 -2
- package/dist/index70.cjs +1 -1
- package/dist/index70.mjs +2 -3
- package/dist/index71.cjs +1 -1
- package/dist/index71.mjs +3 -2
- package/dist/index72.cjs +1 -1
- package/dist/index72.mjs +1 -1
- package/dist/index73.cjs +1 -1
- package/dist/index73.mjs +2 -3
- package/dist/index74.cjs +1 -1
- package/dist/index74.mjs +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.mjs +3 -51
- package/dist/index76.cjs +1 -59
- package/dist/index76.mjs +51 -1150
- package/dist/index77.cjs +59 -1
- package/dist/index77.mjs +1146 -18
- package/dist/index78.cjs +1 -5
- package/dist/index78.mjs +22 -19
- package/dist/index79.cjs +5 -1
- package/dist/index79.mjs +19 -6
- package/dist/index81.cjs +1 -1
- package/dist/index81.mjs +6 -2
- package/dist/index82.cjs +1 -0
- package/dist/index82.mjs +4 -0
- package/dist/vue-lib/src/index.d.ts +1 -0
- package/dist/vue-lib/src/index.d.ts.map +1 -1
- package/dist/vue-lib.css +1 -1
- package/package.json +1 -1
- package/dist/index34.cjs +0 -1
- package/dist/index34.mjs +0 -42
- package/dist/index38.cjs +0 -1
- package/dist/index38.mjs +0 -32
- package/dist/index42.cjs +0 -1
- package/dist/index42.mjs +0 -32
- package/dist/index50.cjs +0 -1
- package/dist/index50.mjs +0 -29
- /package/dist/{index10.cjs → index11.cjs} +0 -0
- /package/dist/{index10.mjs → index11.mjs} +0 -0
- /package/dist/{index12.cjs → index13.cjs} +0 -0
- /package/dist/{index12.mjs → index13.mjs} +0 -0
- /package/dist/{index14.cjs → index15.cjs} +0 -0
- /package/dist/{index14.mjs → index15.mjs} +0 -0
- /package/dist/{index18.cjs → index19.cjs} +0 -0
- /package/dist/{index18.mjs → index19.mjs} +0 -0
- /package/dist/{index20.cjs → index21.cjs} +0 -0
- /package/dist/{index20.mjs → index21.mjs} +0 -0
- /package/dist/{index28.cjs → index29.cjs} +0 -0
- /package/dist/{index28.mjs → index29.mjs} +0 -0
- /package/dist/{index2.cjs → index3.cjs} +0 -0
- /package/dist/{index2.mjs → index3.mjs} +0 -0
- /package/dist/{index32.cjs → index33.cjs} +0 -0
- /package/dist/{index32.mjs → index33.mjs} +0 -0
- /package/dist/{index48.cjs → index49.cjs} +0 -0
- /package/dist/{index48.mjs → index49.mjs} +0 -0
- /package/dist/{index4.cjs → index5.cjs} +0 -0
- /package/dist/{index4.mjs → index5.mjs} +0 -0
- /package/dist/{index6.cjs → index7.cjs} +0 -0
- /package/dist/{index6.mjs → index7.mjs} +0 -0
- /package/dist/{index8.cjs → index9.cjs} +0 -0
- /package/dist/{index8.mjs → index9.mjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const e=require("./index3.cjs");;/* empty css */const r=require("./index5.cjs");;/* empty css */const u=require("./index7.cjs");;/* empty css */const t=require("./index9.cjs");;/* empty css */const _=require("./index11.cjs");;/* empty css */const i=require("./index13.cjs");;/* empty css */const s=require("./index15.cjs");;/* empty css */const a=require("./index17.cjs");;/* empty css */const o=require("./index19.cjs");;/* empty css */const p=require("./index21.cjs");;/* empty css */const n=require("./index23.cjs");;/* empty css */const c=require("./index25.cjs");;/* empty css */const v=require("./index27.cjs");;/* empty css */const q=require("./index29.cjs");;/* empty css */const l=require("./index31.cjs");;/* empty css */const g=require("./index33.cjs");;/* empty css */const d=require("./index35.cjs"),y=require("./index36.cjs"),P=require("./index37.cjs");;/* empty css */const S=require("./index39.cjs"),D=require("./index40.cjs"),h=require("./index41.cjs");;/* empty css */const b=require("./index43.cjs"),m=require("./index44.cjs"),B=require("./index45.cjs"),C=require("./index46.cjs"),T=require("./index47.cjs");;/* empty css */const w=require("./index49.cjs");;/* empty css */const F=require("./index51.cjs");exports.Chat=e;exports.SectionHeader=r;exports.StatRow=u;exports.StatusBadge=t;exports.PageHeader=_;exports.CtaSection=i;exports.ProcessSteps=s;exports.Footer=a;exports.Navbar=o;exports.BaseCard=p;exports.FeatureCard=n;exports.BlogCard=c;exports.BlogEditor=v;exports.DataTable=q;exports.SubscribeForm=l;exports.Dialog=g;exports.DialogProvider=d;exports.useDialog=y.useDialog;exports.Panel=P;exports.PanelProvider=S;exports.usePanel=D.usePanel;exports.LoadingButton=h;exports.ThemeProvider=b;exports.useTheme=m.useTheme;exports.AuthProvider=B;exports.useAuth=C.useAuth;exports.Dropdown=T;exports.DropdownItem=w;exports.createM2S2=F.createM2S2;
|
package/dist/index.mjs
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
import { default as B } from "./index2.mjs";
|
|
2
1
|
/* empty css */
|
|
3
|
-
import { default as
|
|
2
|
+
import { default as C } from "./index3.mjs";
|
|
4
3
|
/* empty css */
|
|
5
|
-
import { default as
|
|
4
|
+
import { default as w } from "./index5.mjs";
|
|
6
5
|
/* empty css */
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as T } from "./index7.mjs";
|
|
8
7
|
/* empty css */
|
|
9
|
-
import { default as
|
|
8
|
+
import { default as H } from "./index9.mjs";
|
|
10
9
|
/* empty css */
|
|
11
|
-
import { default as
|
|
10
|
+
import { default as I } from "./index11.mjs";
|
|
12
11
|
/* empty css */
|
|
13
|
-
import { default as
|
|
12
|
+
import { default as M } from "./index13.mjs";
|
|
14
13
|
/* empty css */
|
|
15
|
-
import { default as
|
|
14
|
+
import { default as R } from "./index15.mjs";
|
|
16
15
|
/* empty css */
|
|
17
|
-
import { default as
|
|
16
|
+
import { default as k } from "./index17.mjs";
|
|
18
17
|
/* empty css */
|
|
19
|
-
import { default as
|
|
18
|
+
import { default as y } from "./index19.mjs";
|
|
20
19
|
/* empty css */
|
|
21
|
-
import { default as
|
|
20
|
+
import { default as G } from "./index21.mjs";
|
|
22
21
|
/* empty css */
|
|
23
|
-
import { default as
|
|
22
|
+
import { default as K } from "./index23.mjs";
|
|
24
23
|
/* empty css */
|
|
25
|
-
import { default as
|
|
24
|
+
import { default as Q } from "./index25.mjs";
|
|
26
25
|
/* empty css */
|
|
27
|
-
import { default as
|
|
26
|
+
import { default as V } from "./index27.mjs";
|
|
28
27
|
/* empty css */
|
|
29
|
-
import { default as
|
|
28
|
+
import { default as X } from "./index29.mjs";
|
|
30
29
|
/* empty css */
|
|
31
|
-
import { default as
|
|
30
|
+
import { default as Z } from "./index31.mjs";
|
|
32
31
|
/* empty css */
|
|
33
|
-
import { default as
|
|
34
|
-
import { useDialog as to } from "./index35.mjs";
|
|
35
|
-
import { default as ao } from "./index36.mjs";
|
|
32
|
+
import { default as $ } from "./index33.mjs";
|
|
36
33
|
/* empty css */
|
|
37
|
-
import { default as
|
|
38
|
-
import {
|
|
39
|
-
import { default as
|
|
34
|
+
import { default as ro } from "./index35.mjs";
|
|
35
|
+
import { useDialog as eo } from "./index36.mjs";
|
|
36
|
+
import { default as mo } from "./index37.mjs";
|
|
40
37
|
/* empty css */
|
|
41
|
-
import { default as
|
|
42
|
-
import {
|
|
43
|
-
import { default as
|
|
44
|
-
import { useAuth as co } from "./index45.mjs";
|
|
45
|
-
import { default as vo } from "./index46.mjs";
|
|
38
|
+
import { default as po } from "./index39.mjs";
|
|
39
|
+
import { usePanel as uo } from "./index40.mjs";
|
|
40
|
+
import { default as lo } from "./index41.mjs";
|
|
46
41
|
/* empty css */
|
|
47
|
-
import { default as
|
|
42
|
+
import { default as no } from "./index43.mjs";
|
|
43
|
+
import { useTheme as go } from "./index44.mjs";
|
|
44
|
+
import { default as Do } from "./index45.mjs";
|
|
45
|
+
import { useAuth as ho } from "./index46.mjs";
|
|
46
|
+
import { default as Bo } from "./index47.mjs";
|
|
48
47
|
/* empty css */
|
|
49
|
-
import {
|
|
48
|
+
import { default as bo } from "./index49.mjs";
|
|
49
|
+
/* empty css */
|
|
50
|
+
import { createM2S2 as Fo } from "./index51.mjs";
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
Do as AuthProvider,
|
|
53
|
+
G as BaseCard,
|
|
54
|
+
Q as BlogCard,
|
|
55
|
+
V as BlogEditor,
|
|
56
|
+
C as Chat,
|
|
57
|
+
M as CtaSection,
|
|
58
|
+
X as DataTable,
|
|
59
|
+
$ as Dialog,
|
|
60
|
+
ro as DialogProvider,
|
|
61
|
+
Bo as Dropdown,
|
|
62
|
+
bo as DropdownItem,
|
|
63
|
+
K as FeatureCard,
|
|
64
|
+
k as Footer,
|
|
64
65
|
lo as LoadingButton,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
y as Navbar,
|
|
67
|
+
I as PageHeader,
|
|
68
|
+
mo as Panel,
|
|
69
|
+
po as PanelProvider,
|
|
70
|
+
R as ProcessSteps,
|
|
71
|
+
w as SectionHeader,
|
|
72
|
+
T as StatRow,
|
|
73
|
+
H as StatusBadge,
|
|
74
|
+
Z as SubscribeForm,
|
|
75
|
+
no as ThemeProvider,
|
|
76
|
+
Fo as createM2S2,
|
|
77
|
+
ho as useAuth,
|
|
78
|
+
eo as useDialog,
|
|
79
|
+
uo as usePanel,
|
|
80
|
+
go as useTheme
|
|
80
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),a=require("./
|
|
1
|
+
"use strict";const e=require("vue"),a=require("./index76.cjs"),n={class:"m2s2-footer"},l={class:"footer-inner"},s={class:"footer-copy"},c={class:"footer-social","aria-label":"Social links"},i=["href","title","aria-label"],_=e.defineComponent({__name:"Footer",props:{config:{}},setup(o){const r=new Date().getFullYear();return(p,u)=>(e.openBlock(),e.createElementBlock("footer",n,[e.createElementVNode("div",l,[e.createElementVNode("span",s," © "+e.toDisplayString(e.unref(r))+" "+e.toDisplayString(o.config.brandName)+" — All Rights Reserved ",1),e.createElementVNode("nav",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.config.links,t=>(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:t.type,href:t.href,class:"social-link",title:t.label??t.type,"aria-label":t.label??t.type},{ref_for:!0},t.type!=="email"?{target:"_blank",rel:"noopener noreferrer"}:{}),[e.createVNode(a,{type:t.type},null,8,["type"])],16,i))),128))])])]))}});module.exports=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as l, openBlock as t, createElementBlock as o, createElementVNode as r, toDisplayString as s, unref as c, Fragment as i, renderList as f, mergeProps as p, createVNode as _ } from "vue";
|
|
2
|
-
import m from "./
|
|
2
|
+
import m from "./index76.mjs";
|
|
3
3
|
const d = { class: "m2s2-footer" }, u = { class: "footer-inner" }, y = { class: "footer-copy" }, h = {
|
|
4
4
|
class: "footer-social",
|
|
5
5
|
"aria-label": "Social links"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./
|
|
1
|
+
"use strict";const e=require("vue"),o=require("./index21.cjs");;/* empty css */const i={class:"fc-header"},l=["innerHTML"],r={class:"fc-title"},a={class:"fc-body"},s={key:0,class:"fc-list"},d={key:1,class:"fc-note"},u=e.defineComponent({__name:"FeatureCard",props:{config:{}},setup(t){return(f,m)=>(e.openBlock(),e.createBlock(o,{featured:t.config.featured??!1},{default:e.withCtx(()=>{var n;return[e.createElementVNode("div",i,[t.config.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:"fc-icon","aria-hidden":"true",innerHTML:t.config.icon},null,8,l)):e.createCommentVNode("",!0),e.createElementVNode("h2",r,e.toDisplayString(t.config.title),1)]),e.createElementVNode("p",a,e.toDisplayString(t.config.body),1),(n=t.config.items)!=null&&n.length?(e.openBlock(),e.createElementBlock("ul",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.items,c=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(c),1))),128))])):e.createCommentVNode("",!0),t.config.note?(e.openBlock(),e.createElementBlock("p",d,e.toDisplayString(t.config.note),1)):e.createCommentVNode("",!0)]}),_:1},8,["featured"]))}});module.exports=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, openBlock as t, createBlock as r, withCtx as l, createElementVNode as o, createElementBlock as n, createCommentVNode as i, toDisplayString as c, Fragment as d, renderList as u } from "vue";
|
|
2
|
-
import m from "./
|
|
2
|
+
import m from "./index21.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
const g = { class: "fc-header" }, h = ["innerHTML"], k = { class: "fc-title" }, y = { class: "fc-body" }, _ = {
|
|
5
5
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./
|
|
1
|
+
"use strict";const e=require("vue"),o=require("./index78.cjs"),n={class:"m2s2-blog-card"},a={class:"bc-cover"},i=["src","alt"],s={key:1,class:"bc-cover-placeholder"},l={class:"bc-cover-tag"},r={class:"bc-inner"},d={class:"bc-meta"},m=["dateTime"],g={key:0,class:"bc-reading-time"},f={class:"bc-title"},h=["href"],k={class:"bc-summary"},u={class:"bc-tags"},E=e.defineComponent({__name:"BlogCard",props:{config:{}},setup(t){return(b,B)=>(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",a,[t.config.coverImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.config.coverImage,alt:t.config.title,class:"bc-cover-img",loading:"lazy"},null,8,i)):(e.openBlock(),e.createElementBlock("div",s,[e.createElementVNode("span",l,e.toDisplayString(t.config.tags[0]),1)]))]),e.createElementVNode("div",r,[e.createElementVNode("div",d,[e.createElementVNode("time",{dateTime:t.config.date},e.toDisplayString(e.unref(o.formatBlogDate)(t.config.date)),9,m),t.config.readingTime?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(t.config.readingTime)+" min read",1)):e.createCommentVNode("",!0)]),e.createElementVNode("h2",f,[e.createElementVNode("a",{href:`/blog/${t.config.slug}`},e.toDisplayString(t.config.title),9,h)]),e.createElementVNode("p",k,e.toDisplayString(t.config.summary),1),e.createElementVNode("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.tags,c=>(e.openBlock(),e.createElementBlock("span",{key:c,class:"bc-tag"},e.toDisplayString(c),1))),128))])])]))}});module.exports=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as o, unref as a, createCommentVNode as d, Fragment as l, renderList as g } from "vue";
|
|
2
|
-
import { formatBlogDate as r } from "./
|
|
2
|
+
import { formatBlogDate as r } from "./index78.mjs";
|
|
3
3
|
const m = { class: "m2s2-blog-card" }, f = { class: "bc-cover" }, h = ["src", "alt"], b = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "bc-cover-placeholder"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),oe=require("./
|
|
1
|
+
"use strict";const e=require("vue"),oe=require("./index77.cjs"),p=require("./index78.cjs"),se=require("./index79.cjs"),ie={class:"be-root"},re={class:"be-meta"},de={class:"be-field be-field--full"},ue=["value"],ce={class:"be-field"},ve={class:"be-field"},me={class:"be-field be-field--full"},be={class:"be-field be-field--full"},pe={class:"be-field"},fe={class:"be-tags"},Ve=["aria-label","onClick"],ge={class:"be-field"},Ee={class:"be-field be-field--cover"},Ne={class:"be-cover"},xe=["src"],we={class:"be-cover__pick"},ke={class:"be-field"},Te={class:"be-field"},_e={class:"be-field be-field--narrow-pair"},ye={class:"be-editor"},Pe={class:"be-toolbar",role:"toolbar","aria-label":"Formatting"},he=["title","onClick"],De={class:"be-panes"},Ce={class:"be-pane be-pane--write"},Ie=["value"],Se={class:"be-pane be-pane--preview"},Be=["innerHTML"],Ue={class:"be-footer"},Me={class:"be-footer__meta"},Le=["disabled"],Re=e.defineComponent({__name:"BlogEditor",props:{initialPost:{default:void 0},coverImageUrl:{default:void 0}},emits:["publish","coverImageSelected"],setup(J,{emit:Q}){var C,I,S,B,U,M,L,R,q,F,O,A,$,H,G,K,W;const n=J,P=Q,d=e.ref(((C=n.initialPost)==null?void 0:C.title)??""),c=e.ref(((I=n.initialPost)==null?void 0:I.slug)??""),f=e.ref(((S=n.initialPost)==null?void 0:S.date)??p.todayAsIsoDate()),v=e.ref(((B=n.initialPost)==null?void 0:B.summary)??""),V=e.ref(((U=n.initialPost)==null?void 0:U.excerpt)??""),o=e.ref([...((M=n.initialPost)==null?void 0:M.tags)??[]]),u=e.ref(((L=n.initialPost)==null?void 0:L.readingTime)??1),r=e.ref(((R=n.initialPost)==null?void 0:R.content)??""),g=e.ref((q=n.initialPost)==null?void 0:q.coverImage),m=e.ref(""),_=e.ref(!!n.initialPost),h=e.ref(null),E=e.ref(((O=(F=n.initialPost)==null?void 0:F.series)==null?void 0:O.id)??""),N=e.ref((($=(A=n.initialPost)==null?void 0:A.series)==null?void 0:$.title)??""),x=e.ref(((G=(H=n.initialPost)==null?void 0:H.series)==null?void 0:G.part)??1),w=e.ref(((W=(K=n.initialPost)==null?void 0:K.series)==null?void 0:W.total)??1);e.watch(()=>n.initialPost,a=>{var t,l,s,i;a&&(d.value=a.title,c.value=a.slug,f.value=a.date,v.value=a.summary,V.value=a.excerpt??"",o.value=[...a.tags],u.value=a.readingTime??1,r.value=a.content,g.value=a.coverImage,E.value=((t=a.series)==null?void 0:t.id)??"",N.value=((l=a.series)==null?void 0:l.title)??"",x.value=((s=a.series)==null?void 0:s.part)??1,w.value=((i=a.series)==null?void 0:i.total)??1,_.value=!0)});const X=e.computed(()=>oe.marked.parse(r.value)),D=e.computed(()=>d.value.trim().length>0&&v.value.trim().length>0&&r.value.trim().length>0),y=e.computed(()=>g.value??n.coverImageUrl);function Y(a){d.value=a.target.value,_.value||(c.value=p.generateSlug(d.value)),u.value=p.calcReadingTime(r.value)}function Z(a){r.value=a.target.value,u.value=p.calcReadingTime(r.value)}function ee(a){if(a.key==="Enter"||a.key===","){a.preventDefault();const t=m.value.trim().replace(/,/g,"").toLowerCase();t&&!o.value.includes(t)&&(o.value=[...o.value,t]),m.value=""}a.key==="Backspace"&&!m.value&&o.value.length&&(o.value=o.value.slice(0,-1))}function te(a){o.value=o.value.filter(t=>t!==a)}function le(a){var s;const t=(s=a.target.files)==null?void 0:s[0];if(!t)return;P("coverImageSelected",t);const l=new FileReader;l.onload=()=>{g.value=l.result},l.readAsDataURL(t)}function ae(a){const t=h.value;if(!t)return;const l=t.selectionStart,s=t.selectionEnd,i=r.value;let k,T;if(a.wrap){const[b,j]=a.wrap,z=i.slice(l,s)||"text";k=i.slice(0,l)+b+z+j+i.slice(s),T=l+b.length+z.length+j.length}else if(a.prefix){const b=i.lastIndexOf(`
|
|
2
2
|
`,l-1)+1;k=i.slice(0,b)+a.prefix+i.slice(b),T=l+a.prefix.length}else if(a.block)k=i.slice(0,l)+a.block+i.slice(s),T=l+a.block.length;else return;r.value=k,setTimeout(()=>{t.selectionStart=t.selectionEnd=T,t.focus()},0)}function ne(){if(!D.value)return;const a=E.value.trim();P("publish",{title:d.value,slug:c.value||p.generateSlug(d.value),date:f.value,summary:v.value,excerpt:V.value||void 0,tags:o.value,readingTime:u.value,content:r.value,coverImage:n.coverImageUrl??g.value,series:a?{id:a,title:N.value.trim()||a,part:x.value,total:w.value}:void 0})}return(a,t)=>(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("section",re,[e.createElementVNode("div",de,[t[11]||(t[11]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Title "),e.createElementVNode("span",{class:"be-required"},"*")],-1)),e.createElementVNode("input",{class:"be-input",type:"text",value:d.value,placeholder:"Post title…",onInput:Y},null,40,ue)]),e.createElementVNode("div",ce,[t[12]||(t[12]=e.createElementVNode("label",{class:"be-label"},"Slug",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>c.value=l),class:"be-input",type:"text",placeholder:"post-slug",onInput:t[1]||(t[1]=l=>_.value=!0)},null,544),[[e.vModelText,c.value]])]),e.createElementVNode("div",ve,[t[13]||(t[13]=e.createElementVNode("label",{class:"be-label"},"Date",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>f.value=l),class:"be-input",type:"date"},null,512),[[e.vModelText,f.value]])]),e.createElementVNode("div",me,[t[14]||(t[14]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Summary "),e.createElementVNode("span",{class:"be-required"},"*")],-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":t[3]||(t[3]=l=>v.value=l),class:"be-input be-input--textarea",rows:"2",placeholder:"Short description shown in blog listings…"},null,512),[[e.vModelText,v.value]])]),e.createElementVNode("div",be,[t[15]||(t[15]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Excerpt "),e.createElementVNode("span",{class:"be-optional"},"(optional)")],-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":t[4]||(t[4]=l=>V.value=l),class:"be-input be-input--textarea",rows:"2",placeholder:"Longer teaser for social previews…"},null,512),[[e.vModelText,V.value]])]),e.createElementVNode("div",pe,[t[16]||(t[16]=e.createElementVNode("label",{class:"be-label"},"Tags",-1)),e.createElementVNode("div",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,l=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"be-tag"},[e.createTextVNode(e.toDisplayString(l)+" ",1),e.createElementVNode("button",{type:"button",class:"be-tag__remove","aria-label":`Remove tag ${l}`,onClick:s=>te(l)},"×",8,Ve)]))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>m.value=l),class:"be-tag-input",type:"text",placeholder:"Add tag, press Enter…",onKeydown:ee},null,544),[[e.vModelText,m.value]])])]),e.createElementVNode("div",ge,[t[17]||(t[17]=e.createElementVNode("label",{class:"be-label"},"Reading time (min)",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[6]||(t[6]=l=>u.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,u.value,void 0,{number:!0}]])]),e.createElementVNode("div",Ee,[t[18]||(t[18]=e.createElementVNode("label",{class:"be-label"},"Cover Image",-1)),e.createElementVNode("div",Ne,[y.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"be-cover__preview",src:y.value,alt:"Cover preview"},null,8,xe)):e.createCommentVNode("",!0),e.createElementVNode("label",we,[e.createTextVNode(e.toDisplayString(y.value?"Replace":"Choose image")+" ",1),e.createElementVNode("input",{type:"file",accept:"image/*",hidden:"",onChange:le},null,32)])])]),t[23]||(t[23]=e.createElementVNode("div",{class:"be-field-group-label"},[e.createTextVNode(" Series "),e.createElementVNode("span",{class:"be-optional"},"(optional)")],-1)),e.createElementVNode("div",ke,[t[19]||(t[19]=e.createElementVNode("label",{class:"be-label"},"Series ID",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[7]||(t[7]=l=>E.value=l),class:"be-input",type:"text",placeholder:"e.g. go-backend"},null,512),[[e.vModelText,E.value]])]),e.createElementVNode("div",Te,[t[20]||(t[20]=e.createElementVNode("label",{class:"be-label"},"Series Title",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[8]||(t[8]=l=>N.value=l),class:"be-input",type:"text",placeholder:"e.g. Go Backend Series"},null,512),[[e.vModelText,N.value]])]),e.createElementVNode("div",_e,[e.createElementVNode("div",null,[t[21]||(t[21]=e.createElementVNode("label",{class:"be-label"},"Part",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[9]||(t[9]=l=>x.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,x.value,void 0,{number:!0}]])]),e.createElementVNode("div",null,[t[22]||(t[22]=e.createElementVNode("label",{class:"be-label"},"Total Parts",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[10]||(t[10]=l=>w.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,w.value,void 0,{number:!0}]])])])]),e.createElementVNode("section",ye,[e.createElementVNode("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(se.BLOG_EDITOR_TOOLBAR),l=>(e.openBlock(),e.createElementBlock("button",{key:l.label,type:"button",class:"be-toolbar__btn",title:l.label,onClick:s=>ae(l)},e.toDisplayString(l.icon),9,he))),128))]),e.createElementVNode("div",De,[e.createElementVNode("div",Ce,[t[24]||(t[24]=e.createElementVNode("div",{class:"be-pane__label"}," Markdown ",-1)),e.createElementVNode("textarea",{ref_key:"textareaEl",ref:h,class:"be-pane__textarea",value:r.value,placeholder:"Write your post in markdown…",spellcheck:"true",onInput:Z},null,40,Ie)]),e.createElementVNode("div",Se,[t[25]||(t[25]=e.createElementVNode("div",{class:"be-pane__label"}," Preview ",-1)),e.createElementVNode("div",{class:"be-pane__preview prose",innerHTML:X.value},null,8,Be)])])]),e.createElementVNode("footer",Ue,[e.createElementVNode("span",Me,"~"+e.toDisplayString(u.value)+" min read",1),e.createElementVNode("button",{type:"button",class:"be-publish",disabled:!D.value,onClick:ne}," Publish Post ",8,Le)])]))}});module.exports=Re;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ge, ref as i, watch as fe, computed as L, openBlock as c, createElementBlock as m, createElementVNode as l, createTextVNode as g, withDirectives as d, vModelText as v, Fragment as te, renderList as ae, toDisplayString as V, createCommentVNode as _e, unref as ye } from "vue";
|
|
2
|
-
import { marked as we } from "./
|
|
3
|
-
import { todayAsIsoDate as xe, generateSlug as se, calcReadingTime as ie } from "./
|
|
4
|
-
import { BLOG_EDITOR_TOOLBAR as Pe } from "./
|
|
2
|
+
import { marked as we } from "./index77.mjs";
|
|
3
|
+
import { todayAsIsoDate as xe, generateSlug as se, calcReadingTime as ie } from "./index78.mjs";
|
|
4
|
+
import { BLOG_EDITOR_TOOLBAR as Pe } from "./index79.mjs";
|
|
5
5
|
const ke = { class: "be-root" }, Te = { class: "be-meta" }, Ce = { class: "be-field be-field--full" }, Ie = ["value"], Ue = { class: "be-field" }, Se = { class: "be-field" }, he = { class: "be-field be-field--full" }, Ve = { class: "be-field be-field--full" }, Ee = { class: "be-field" }, De = { class: "be-tags" }, Le = ["aria-label", "onClick"], Re = { class: "be-field" }, Be = { class: "be-field be-field--cover" }, Oe = { class: "be-cover" }, Ae = ["src"], Fe = { class: "be-cover__pick" }, Me = { class: "be-field" }, $e = { class: "be-field" }, He = { class: "be-field be-field--narrow-pair" }, Ne = { class: "be-editor" }, qe = {
|
|
6
6
|
class: "be-toolbar",
|
|
7
7
|
role: "toolbar",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),b=require("./
|
|
1
|
+
"use strict";const e=require("vue"),b=require("./index81.cjs"),d={key:0,class:"sub-form"},m=["disabled"],v=["disabled"],p=["disabled"],k={key:0,class:"sub-feedback sub-feedback--error"},g={key:1,class:"sub-success"},f={key:1,class:"sub-auth"},y=["disabled"],h={key:0,class:"sub-feedback sub-feedback--success"},B=["disabled"],E={key:2,class:"sub-feedback sub-feedback--error"},_=e.defineComponent({__name:"SubscribeForm",props:{mode:{default:"anon"},subscribeAnon:{type:Function,default:void 0},subscribeAuth:{type:Function,default:void 0},unsubscribeAuth:{type:Function,default:void 0}},setup(c){const u=c,n=e.ref(""),l=e.ref(""),t=e.ref("idle"),o=e.ref(!1),r=e.computed(()=>b.validateEmail(n.value));async function a(){if(t.value!=="submitting")if(u.mode==="auth")if(o.value){if(!u.unsubscribeAuth)return;t.value="submitting";try{await u.unsubscribeAuth(),o.value=!1,t.value="idle"}catch{t.value="error"}}else{if(!u.subscribeAuth)return;t.value="submitting";try{await u.subscribeAuth(),o.value=!0,t.value="done"}catch{t.value="error"}}else{if(!r.value||!u.subscribeAnon)return;t.value="submitting";try{await u.subscribeAnon(n.value.trim(),l.value.trim()),t.value="done"}catch{t.value="error"}}}return(V,s)=>c.mode==="anon"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value!=="done"?(e.openBlock(),e.createElementBlock("div",d,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>l.value=i),class:"sub-input",type:"text",placeholder:"Your name (optional)",disabled:t.value==="submitting"},null,8,m),[[e.vModelText,l.value]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[1]||(s[1]=i=>n.value=i),class:"sub-input",type:"email",placeholder:"your@email.com",disabled:t.value==="submitting"},null,8,v),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"sub-btn",disabled:!r.value||t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Submitting…":"Subscribe"),9,p),t.value==="error"?(e.openBlock(),e.createElementBlock("p",k," Something went wrong — please try again. ")):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",g,[...s[2]||(s[2]=[e.createElementVNode("span",{class:"sub-success-icon"},"✓",-1),e.createElementVNode("p",{class:"sub-success-text"}," Check your email to confirm your subscription. ",-1)])]))],64)):(e.openBlock(),e.createElementBlock("div",f,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s[3]||(s[3]=e.createElementVNode("span",{class:"sub-subscribed-label"},"✓ Subscribed to blog updates",-1)),e.createElementVNode("button",{class:"sub-btn sub-btn--unsub",disabled:t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Unsubscribing…":"Unsubscribe"),9,B)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{class:"sub-btn",disabled:t.value==="submitting",onClick:a},e.toDisplayString(t.value==="submitting"?"Subscribing…":"Subscribe to Blog Updates"),9,y),t.value==="done"?(e.openBlock(),e.createElementBlock("p",h," You're subscribed! ")):e.createCommentVNode("",!0)],64)),t.value==="error"?(e.openBlock(),e.createElementBlock("p",E," Something went wrong — please try again. ")):e.createCommentVNode("",!0)]))}});module.exports=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as o, computed as k, openBlock as s, createElementBlock as t, Fragment as d, withDirectives as g, createElementVNode as i, vModelText as y, toDisplayString as m, createCommentVNode as v } from "vue";
|
|
2
|
-
import { validateEmail as _ } from "./
|
|
2
|
+
import { validateEmail as _ } from "./index81.mjs";
|
|
3
3
|
const A = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "sub-form"
|
package/dist/index35.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const e=require("vue"),u=require("./index33.cjs");;/* empty css */const i=require("./index36.cjs"),c=e.defineComponent({__name:"DialogProvider",setup(s){const t=e.ref(null);function o(r){return new Promise(n=>{t.value={data:r,resolve:n}})}function a(r,n){return o({title:r,message:n,actions:[{label:"Cancel",value:!1,variant:"secondary"},{label:"Confirm",value:!0,variant:"primary"}]})}function l(r){var n;(n=t.value)==null||n.resolve(r),t.value=null}return e.provide(i.DIALOG_KEY,{dialog:o,confirm:a}),(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(r.$slots,"default"),t.value?(e.openBlock(),e.createBlock(u,{key:0,data:t.value.data,open:!0,onAction:l,onClose:n[0]||(n[0]=v=>l(null))},null,8,["data"])):e.createCommentVNode("",!0)],64))}});module.exports=c;
|
package/dist/index35.mjs
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineComponent as u, ref as i, provide as m, openBlock as a, createElementBlock as c, Fragment as s, renderSlot as f, createBlock as v, createCommentVNode as p } from "vue";
|
|
2
|
+
import d from "./index33.mjs";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { DIALOG_KEY as _ } from "./index36.mjs";
|
|
5
|
+
const b = /* @__PURE__ */ u({
|
|
6
|
+
__name: "DialogProvider",
|
|
7
|
+
setup(C) {
|
|
8
|
+
const o = i(null);
|
|
9
|
+
function r(n) {
|
|
10
|
+
return new Promise((e) => {
|
|
11
|
+
o.value = { data: n, resolve: e };
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function l(n, e) {
|
|
15
|
+
return r({
|
|
16
|
+
title: n,
|
|
17
|
+
message: e,
|
|
18
|
+
actions: [
|
|
19
|
+
{ label: "Cancel", value: !1, variant: "secondary" },
|
|
20
|
+
{ label: "Confirm", value: !0, variant: "primary" }
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function t(n) {
|
|
25
|
+
var e;
|
|
26
|
+
(e = o.value) == null || e.resolve(n), o.value = null;
|
|
27
|
+
}
|
|
28
|
+
return m(_, { dialog: r, confirm: l }), (n, e) => (a(), c(s, null, [
|
|
29
|
+
f(n.$slots, "default"),
|
|
30
|
+
o.value ? (a(), v(d, {
|
|
31
|
+
key: 0,
|
|
32
|
+
data: o.value.data,
|
|
33
|
+
open: !0,
|
|
34
|
+
onAction: t,
|
|
35
|
+
onClose: e[0] || (e[0] = (k) => t(null))
|
|
36
|
+
}, null, 8, ["data"])) : p("", !0)
|
|
37
|
+
], 64));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
8
40
|
export {
|
|
9
|
-
|
|
10
|
-
e as useDialog
|
|
41
|
+
b as default
|
|
11
42
|
};
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=Symbol("dialog");function i(){const e=t.inject(o);if(!e)throw new Error("useDialog must be used within a <DialogProvider>");return e}exports.DIALOG_KEY=o;exports.useDialog=i;
|
package/dist/index36.mjs
CHANGED
|
@@ -1,87 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, A = { class: "panel-body" }, D = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "panel-message"
|
|
11
|
-
}, F = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "panel-footer"
|
|
14
|
-
}, L = ["onClick"], j = /* @__PURE__ */ C({
|
|
15
|
-
__name: "Panel",
|
|
16
|
-
props: {
|
|
17
|
-
data: {},
|
|
18
|
-
open: { type: Boolean }
|
|
19
|
-
},
|
|
20
|
-
emits: ["action", "close"],
|
|
21
|
-
setup(e, { emit: b }) {
|
|
22
|
-
const c = e, d = b, r = () => c.data.side ?? "right";
|
|
23
|
-
function p(s) {
|
|
24
|
-
d("action", s.value);
|
|
25
|
-
}
|
|
26
|
-
function v() {
|
|
27
|
-
c.data.modal || d("close");
|
|
28
|
-
}
|
|
29
|
-
return (s, m) => (t(), g($, { to: "body" }, [
|
|
30
|
-
h(y, { name: "panel-overlay-fade" }, {
|
|
31
|
-
default: k(() => [
|
|
32
|
-
e.open ? (t(), a("div", {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "m2s2-panel-overlay",
|
|
35
|
-
onClick: w(v, ["self"])
|
|
36
|
-
})) : l("", !0)
|
|
37
|
-
]),
|
|
38
|
-
_: 1
|
|
39
|
-
}),
|
|
40
|
-
h(y, {
|
|
41
|
-
name: `panel-slide-${r()}`
|
|
42
|
-
}, {
|
|
43
|
-
default: k(() => {
|
|
44
|
-
var u;
|
|
45
|
-
return [
|
|
46
|
-
e.open ? (t(), a("div", {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: f(["m2s2-panel-content", `m2s2-panel-content--${r()}`]),
|
|
49
|
-
style: B(e.data.width ? { "--panel-width": e.data.width } : {}),
|
|
50
|
-
role: "dialog",
|
|
51
|
-
"aria-modal": !0,
|
|
52
|
-
"aria-labelledby": "panel-title"
|
|
53
|
-
}, [
|
|
54
|
-
o("div", x, [
|
|
55
|
-
o("div", z, [
|
|
56
|
-
o("h2", E, i(e.data.title), 1),
|
|
57
|
-
e.data.subtitle ? (t(), a("p", T, i(e.data.subtitle), 1)) : l("", !0)
|
|
58
|
-
]),
|
|
59
|
-
e.data.modal ? l("", !0) : (t(), a("button", {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "panel-close",
|
|
62
|
-
"aria-label": "Close",
|
|
63
|
-
onClick: m[0] || (m[0] = (n) => d("close"))
|
|
64
|
-
}, " ✕ "))
|
|
65
|
-
]),
|
|
66
|
-
o("div", A, [
|
|
67
|
-
e.data.message && !s.$slots.default ? (t(), a("p", D, i(e.data.message), 1)) : l("", !0),
|
|
68
|
-
N(s.$slots, "default")
|
|
69
|
-
]),
|
|
70
|
-
(u = e.data.actions) != null && u.length ? (t(), a("div", F, [
|
|
71
|
-
(t(!0), a(S, null, V(e.data.actions, (n) => (t(), a("button", {
|
|
72
|
-
key: n.label,
|
|
73
|
-
class: f(["panel-btn", `panel-btn--${n.variant ?? "secondary"}`]),
|
|
74
|
-
onClick: (M) => p(n)
|
|
75
|
-
}, i(n.label), 11, L))), 128))
|
|
76
|
-
])) : l("", !0)
|
|
77
|
-
], 6)) : l("", !0)
|
|
78
|
-
];
|
|
79
|
-
}),
|
|
80
|
-
_: 3
|
|
81
|
-
}, 8, ["name"])
|
|
82
|
-
]));
|
|
83
|
-
}
|
|
84
|
-
});
|
|
1
|
+
import { inject as i } from "vue";
|
|
2
|
+
const r = Symbol("dialog");
|
|
3
|
+
function e() {
|
|
4
|
+
const o = i(r);
|
|
5
|
+
if (!o) throw new Error("useDialog must be used within a <DialogProvider>");
|
|
6
|
+
return o;
|
|
7
|
+
}
|
|
85
8
|
export {
|
|
86
|
-
|
|
9
|
+
r as DIALOG_KEY,
|
|
10
|
+
e as useDialog
|
|
87
11
|
};
|
package/dist/index37.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),k={class:"panel-header"},u={class:"panel-header-text"},p={id:"panel-title",class:"panel-title"},y={key:0,class:"panel-subtitle"},B={class:"panel-body"},h={key:0,class:"panel-message"},C={key:0,class:"panel-footer"},b=["onClick"],f=e.defineComponent({__name:"Panel",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:d}){const o=t,n=d,s=()=>o.data.side??"right";function r(l){n("action",l.value)}function m(){o.data.modal||n("close")}return(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-overlay-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-panel-overlay",onClick:e.withModifiers(m,["self"])})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`panel-slide-${s()}`},{default:e.withCtx(()=>{var i;return[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m2s2-panel-content",`m2s2-panel-content--${s()}`]),style:e.normalizeStyle(t.data.width?{"--panel-width":t.data.width}:{}),role:"dialog","aria-modal":!0,"aria-labelledby":"panel-title"},[e.createElementVNode("div",k,[e.createElementVNode("div",u,[e.createElementVNode("h2",p,e.toDisplayString(t.data.title),1),t.data.subtitle?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.subtitle),1)):e.createCommentVNode("",!0)]),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"panel-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>n("close"))}," ✕ "))]),e.createElementVNode("div",B,[t.data.message&&!l.$slots.default?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),(i=t.data.actions)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["panel-btn",`panel-btn--${a.variant??"secondary"}`]),onClick:v=>r(a)},e.toDisplayString(a.label),11,b))),128))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]}),_:3},8,["name"])]))}});module.exports=f;
|
package/dist/index37.mjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as C, openBlock as t, createBlock as g, Teleport as $, createVNode as h, Transition as y, withCtx as k, createElementBlock as a, withModifiers as w, createCommentVNode as l, normalizeStyle as B, normalizeClass as f, createElementVNode as o, toDisplayString as i, renderSlot as N, Fragment as S, renderList as V } from "vue";
|
|
2
|
+
const x = { class: "panel-header" }, z = { class: "panel-header-text" }, E = {
|
|
3
|
+
id: "panel-title",
|
|
4
|
+
class: "panel-title"
|
|
5
|
+
}, T = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "panel-subtitle"
|
|
8
|
+
}, A = { class: "panel-body" }, D = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "panel-message"
|
|
11
|
+
}, F = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "panel-footer"
|
|
14
|
+
}, L = ["onClick"], j = /* @__PURE__ */ C({
|
|
15
|
+
__name: "Panel",
|
|
16
|
+
props: {
|
|
17
|
+
data: {},
|
|
18
|
+
open: { type: Boolean }
|
|
19
|
+
},
|
|
20
|
+
emits: ["action", "close"],
|
|
21
|
+
setup(e, { emit: b }) {
|
|
22
|
+
const c = e, d = b, r = () => c.data.side ?? "right";
|
|
23
|
+
function p(s) {
|
|
24
|
+
d("action", s.value);
|
|
25
|
+
}
|
|
26
|
+
function v() {
|
|
27
|
+
c.data.modal || d("close");
|
|
28
|
+
}
|
|
29
|
+
return (s, m) => (t(), g($, { to: "body" }, [
|
|
30
|
+
h(y, { name: "panel-overlay-fade" }, {
|
|
31
|
+
default: k(() => [
|
|
32
|
+
e.open ? (t(), a("div", {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "m2s2-panel-overlay",
|
|
35
|
+
onClick: w(v, ["self"])
|
|
36
|
+
})) : l("", !0)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}),
|
|
40
|
+
h(y, {
|
|
41
|
+
name: `panel-slide-${r()}`
|
|
42
|
+
}, {
|
|
43
|
+
default: k(() => {
|
|
44
|
+
var u;
|
|
45
|
+
return [
|
|
46
|
+
e.open ? (t(), a("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: f(["m2s2-panel-content", `m2s2-panel-content--${r()}`]),
|
|
49
|
+
style: B(e.data.width ? { "--panel-width": e.data.width } : {}),
|
|
50
|
+
role: "dialog",
|
|
51
|
+
"aria-modal": !0,
|
|
52
|
+
"aria-labelledby": "panel-title"
|
|
53
|
+
}, [
|
|
54
|
+
o("div", x, [
|
|
55
|
+
o("div", z, [
|
|
56
|
+
o("h2", E, i(e.data.title), 1),
|
|
57
|
+
e.data.subtitle ? (t(), a("p", T, i(e.data.subtitle), 1)) : l("", !0)
|
|
58
|
+
]),
|
|
59
|
+
e.data.modal ? l("", !0) : (t(), a("button", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "panel-close",
|
|
62
|
+
"aria-label": "Close",
|
|
63
|
+
onClick: m[0] || (m[0] = (n) => d("close"))
|
|
64
|
+
}, " ✕ "))
|
|
65
|
+
]),
|
|
66
|
+
o("div", A, [
|
|
67
|
+
e.data.message && !s.$slots.default ? (t(), a("p", D, i(e.data.message), 1)) : l("", !0),
|
|
68
|
+
N(s.$slots, "default")
|
|
69
|
+
]),
|
|
70
|
+
(u = e.data.actions) != null && u.length ? (t(), a("div", F, [
|
|
71
|
+
(t(!0), a(S, null, V(e.data.actions, (n) => (t(), a("button", {
|
|
72
|
+
key: n.label,
|
|
73
|
+
class: f(["panel-btn", `panel-btn--${n.variant ?? "secondary"}`]),
|
|
74
|
+
onClick: (M) => p(n)
|
|
75
|
+
}, i(n.label), 11, L))), 128))
|
|
76
|
+
])) : l("", !0)
|
|
77
|
+
], 6)) : l("", !0)
|
|
78
|
+
];
|
|
79
|
+
}),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 8, ["name"])
|
|
82
|
+
]));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
j as default
|
|
87
|
+
};
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const e=require("vue"),u=require("./index37.cjs");;/* empty css */const a=require("./index40.cjs"),s=e.defineComponent({__name:"PanelProvider",setup(c){const t=e.ref(null);function o(r){return new Promise(n=>{t.value={data:r,resolve:n}})}function l(r){var n;(n=t.value)==null||n.resolve(r),t.value=null}return e.provide(a.PANEL_KEY,{panel:o}),(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(r.$slots,"default"),t.value?(e.openBlock(),e.createBlock(u,{key:0,data:t.value.data,open:!0,onAction:l,onClose:n[0]||(n[0]=i=>l(null))},null,8,["data"])):e.createCommentVNode("",!0)],64))}});module.exports=s;
|
package/dist/index39.mjs
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineComponent as a, ref as u, provide as m, openBlock as r, createElementBlock as i, Fragment as c, renderSlot as p, createBlock as s, createCommentVNode as f } from "vue";
|
|
2
|
+
import d from "./index37.mjs";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { PANEL_KEY as v } from "./index40.mjs";
|
|
5
|
+
const $ = /* @__PURE__ */ a({
|
|
6
|
+
__name: "PanelProvider",
|
|
7
|
+
setup(_) {
|
|
8
|
+
const n = u(null);
|
|
9
|
+
function l(o) {
|
|
10
|
+
return new Promise((e) => {
|
|
11
|
+
n.value = { data: o, resolve: e };
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function t(o) {
|
|
15
|
+
var e;
|
|
16
|
+
(e = n.value) == null || e.resolve(o), n.value = null;
|
|
17
|
+
}
|
|
18
|
+
return m(v, { panel: l }), (o, e) => (r(), i(c, null, [
|
|
19
|
+
p(o.$slots, "default"),
|
|
20
|
+
n.value ? (r(), s(d, {
|
|
21
|
+
key: 0,
|
|
22
|
+
data: n.value.data,
|
|
23
|
+
open: !0,
|
|
24
|
+
onAction: t,
|
|
25
|
+
onClose: e[0] || (e[0] = (k) => t(null))
|
|
26
|
+
}, null, 8, ["data"])) : f("", !0)
|
|
27
|
+
], 64));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
8
30
|
export {
|
|
9
|
-
|
|
10
|
-
o as usePanel
|
|
31
|
+
$ as default
|
|
11
32
|
};
|
package/dist/index40.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=Symbol("panel");function r(){const e=t.inject(n);if(!e)throw new Error("usePanel must be used within a <PanelProvider>");return e}exports.PANEL_KEY=n;exports.usePanel=r;
|