@pantograph/vue 0.30.13 → 0.30.15

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, useSlots as S, computed as $, createElementBlock as m, openBlock as r, normalizeStyle as h, normalizeClass as o, unref as e, createBlock as O, createCommentVNode as b, createElementVNode as j, createSlots as P, withCtx as V, renderSlot as i, createTextVNode as g, toDisplayString as p, createVNode as f, normalizeProps as z, guardReactiveProps as w } from "vue";
1
+ import { defineComponent as N, useSlots as S, computed as $, createElementBlock as m, openBlock as i, normalizeStyle as h, normalizeClass as o, unref as e, createBlock as O, createCommentVNode as b, createElementVNode as j, createSlots as z, withCtx as P, renderSlot as r, createTextVNode as g, toDisplayString as p, createVNode as f, normalizeProps as V, guardReactiveProps as w } from "vue";
2
2
  import { getComponentOptions as E, getBemBlock as I, generateVariantClassList as L, normCls as s, getBemElement as c, getComponentName as T } from "@pantograph/utils";
3
3
  import { cva as x } from "class-variance-authority";
4
4
  import { _ as D } from "../IconButton.vue_vue_type_script_setup_true_lang-BR82Bz96.js";
@@ -40,7 +40,7 @@ const F = ["info", "success", "danger", "warning", "hint"], G = /* @__PURE__ */
40
40
  hint: "tabler:bulb",
41
41
  info: "tabler:info-circle"
42
42
  }, y = $(() => u.icon ?? v[u.type]);
43
- return (a, d) => (r(), m("div", {
43
+ return (a, d) => (i(), m("div", {
44
44
  class: o(
45
45
  e(s)(
46
46
  e(k)({
@@ -55,16 +55,16 @@ const F = ["info", "success", "danger", "warning", "hint"], G = /* @__PURE__ */
55
55
  "--ptc-alert-br": t.br
56
56
  })
57
57
  }, [
58
- n.icon || y.value ? (r(), O(M, {
58
+ n.icon || y.value ? (i(), O(M, {
59
59
  key: 0,
60
- size: "md",
60
+ size: "sm",
61
61
  icon: y.value,
62
62
  class: o(e(s)(e(c)(e(l), "icon"), t.iconCls))
63
- }, P({ _: 2 }, [
63
+ }, z({ _: 2 }, [
64
64
  n.icon ? {
65
65
  name: "icon",
66
- fn: V(() => [
67
- i(a.$slots, "icon")
66
+ fn: P(() => [
67
+ r(a.$slots, "icon")
68
68
  ]),
69
69
  key: "0"
70
70
  } : void 0
@@ -72,41 +72,42 @@ const F = ["info", "success", "danger", "warning", "hint"], G = /* @__PURE__ */
72
72
  j("div", {
73
73
  class: o(e(s)(e(c)(e(l), "body"), t.bodyCls))
74
74
  }, [
75
- i(a.$slots, "default", {}, () => [
76
- t.title || n.title ? (r(), m("div", {
75
+ r(a.$slots, "default", {}, () => [
76
+ t.title || n.title ? (i(), m("div", {
77
77
  key: 0,
78
78
  class: o(e(s)(e(c)(e(l), "title"), t.titleCls, "paragraph"))
79
79
  }, [
80
- i(a.$slots, "title", {}, () => [
80
+ r(a.$slots, "title", {}, () => [
81
81
  g(p(t.title), 1)
82
82
  ])
83
83
  ], 2)) : b("", !0),
84
- t.description || n.description ? (r(), m("div", {
84
+ t.description || n.description ? (i(), m("div", {
85
85
  key: 1,
86
86
  class: o(e(s)(e(c)(e(l), "description"), t.descriptionCls, "paragraph"))
87
87
  }, [
88
- i(a.$slots, "description", {}, () => [
88
+ r(a.$slots, "description", {}, () => [
89
89
  g(p(t.description), 1)
90
90
  ])
91
91
  ], 2)) : b("", !0),
92
- t.link || n.link ? (r(), m("div", {
92
+ t.link || n.link ? (i(), m("div", {
93
93
  key: 2,
94
94
  class: o(e(c)(e(l), "action"))
95
95
  }, [
96
- i(a.$slots, "link", {}, () => [
97
- f(e(R), z(w(t.linkProps)), null, 16)
96
+ r(a.$slots, "link", {}, () => [
97
+ f(e(R), V(w(t.linkProps)), null, 16)
98
98
  ])
99
99
  ], 2)) : b("", !0)
100
100
  ])
101
101
  ], 2),
102
- u.closeable || n.closeable ? (r(), m("div", {
102
+ u.closeable || n.closeable ? (i(), m("div", {
103
103
  key: 1,
104
104
  class: o(e(s)(e(c)(e(l), "closeable"), t.closeableCls))
105
105
  }, [
106
- i(a.$slots, "closeable", {}, () => [
106
+ r(a.$slots, "closeable", {}, () => [
107
107
  f(D, {
108
108
  icon: "tabler:x",
109
109
  color: "neutral",
110
+ size: "sm",
110
111
  type: "ghost",
111
112
  onClick: d[0] || (d[0] = (A) => B("close", A))
112
113
  })
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@pantograph/utils"),f=require("class-variance-authority"),C=require("../IconButton.vue_vue_type_script_setup_true_lang-i5ZOiWt-.js"),p=require("../GraphicalObject.vue_vue_type_script_setup_true_lang-BDZKksip.js"),B=require("../Link/index.umd.cjs"),k=require("@pantograph/utils-vue"),u=["info","success","danger","warning","hint"],a=e.defineComponent({...l.getComponentOptions("Alert"),__name:"Alert",props:{type:{default:"hint"},closeable:{type:Boolean},class:{type:[Array,Object,String,Number,null,Boolean]},icon:{},iconCls:{type:[Array,Object,String,Number,null,Boolean]},bodyCls:{type:[Array,Object,String,Number,null,Boolean]},closeableCls:{type:[Array,Object,String,Number,null,Boolean]},fg:{},br:{},bg:{},title:{},titleCls:{type:[Array,Object,String,Number,null,Boolean]},description:{},descriptionCls:{type:[Array,Object,String,Number,null,Boolean]},link:{type:Boolean},linkProps:{}},emits:["close"],setup(t,{emit:m}){const s=t,d=m,n=l.getBemBlock("alert"),g=f.cva(n,{variants:{type:l.generateVariantClassList(u,n)}}),r=e.useSlots(),y={success:"tabler:circle-check",warning:"tabler:alert-triangle",danger:"tabler:circle-x",hint:"tabler:bulb",info:"tabler:info-circle"},i=e.computed(()=>s.icon??y[s.type]);return(o,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(g)({type:t.type}),s.class)),style:e.normalizeStyle({"--ptc-alert-fg":t.fg,"--ptc-alert-bg":t.bg,"--ptc-alert-br":t.br})},[r.icon||i.value?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,size:"md",icon:i.value,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"icon"),t.iconCls))},e.createSlots({_:2},[r.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"body"),t.bodyCls))},[e.renderSlot(o.$slots,"default",{},()=>[t.title||r.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"title"),t.titleCls,"paragraph"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||r.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"description"),t.descriptionCls,"paragraph"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.link||r.link?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l.getBemElement)(e.unref(n),"action"))},[e.renderSlot(o.$slots,"link",{},()=>[e.createVNode(e.unref(B.Link),e.normalizeProps(e.guardReactiveProps(t.linkProps)),null,16)])],2)):e.createCommentVNode("",!0)])],2),s.closeable||r.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"closeable"),t.closeableCls))},[e.renderSlot(o.$slots,"closeable",{},()=>[e.createVNode(C._sfc_main,{icon:"tabler:x",color:"neutral",type:"ghost",onClick:c[0]||(c[0]=b=>d("close",b))})])],2)):e.createCommentVNode("",!0)],6))}}),v=k.installComponent(a,l.getComponentName("Alert"));exports.Alert=a;exports.AlertPlugin=v;exports.AlertTypes=u;exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@pantograph/utils"),f=require("class-variance-authority"),C=require("../IconButton.vue_vue_type_script_setup_true_lang-i5ZOiWt-.js"),p=require("../GraphicalObject.vue_vue_type_script_setup_true_lang-BDZKksip.js"),B=require("../Link/index.umd.cjs"),k=require("@pantograph/utils-vue"),u=["info","success","danger","warning","hint"],a=e.defineComponent({...l.getComponentOptions("Alert"),__name:"Alert",props:{type:{default:"hint"},closeable:{type:Boolean},class:{type:[Array,Object,String,Number,null,Boolean]},icon:{},iconCls:{type:[Array,Object,String,Number,null,Boolean]},bodyCls:{type:[Array,Object,String,Number,null,Boolean]},closeableCls:{type:[Array,Object,String,Number,null,Boolean]},fg:{},br:{},bg:{},title:{},titleCls:{type:[Array,Object,String,Number,null,Boolean]},description:{},descriptionCls:{type:[Array,Object,String,Number,null,Boolean]},link:{type:Boolean},linkProps:{}},emits:["close"],setup(t,{emit:m}){const s=t,d=m,n=l.getBemBlock("alert"),g=f.cva(n,{variants:{type:l.generateVariantClassList(u,n)}}),r=e.useSlots(),y={success:"tabler:circle-check",warning:"tabler:alert-triangle",danger:"tabler:circle-x",hint:"tabler:bulb",info:"tabler:info-circle"},i=e.computed(()=>s.icon??y[s.type]);return(o,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(g)({type:t.type}),s.class)),style:e.normalizeStyle({"--ptc-alert-fg":t.fg,"--ptc-alert-bg":t.bg,"--ptc-alert-br":t.br})},[r.icon||i.value?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,size:"sm",icon:i.value,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"icon"),t.iconCls))},e.createSlots({_:2},[r.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"body"),t.bodyCls))},[e.renderSlot(o.$slots,"default",{},()=>[t.title||r.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"title"),t.titleCls,"paragraph"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||r.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"description"),t.descriptionCls,"paragraph"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.link||r.link?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(l.getBemElement)(e.unref(n),"action"))},[e.renderSlot(o.$slots,"link",{},()=>[e.createVNode(e.unref(B.Link),e.normalizeProps(e.guardReactiveProps(t.linkProps)),null,16)])],2)):e.createCommentVNode("",!0)])],2),s.closeable||r.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l.normCls)(e.unref(l.getBemElement)(e.unref(n),"closeable"),t.closeableCls))},[e.renderSlot(o.$slots,"closeable",{},()=>[e.createVNode(C._sfc_main,{icon:"tabler:x",color:"neutral",size:"sm",type:"ghost",onClick:c[0]||(c[0]=b=>d("close",b))})])],2)):e.createCommentVNode("",!0)],6))}}),v=k.installComponent(a,l.getComponentName("Alert"));exports.Alert=a;exports.AlertPlugin=v;exports.AlertTypes=u;exports.default=a;