@pantograph/vue 0.30.0 → 0.30.2

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.
@@ -0,0 +1,11 @@
1
+ import { ClassValue } from 'class-variance-authority/types';
2
+ export interface BlanketProps {
3
+ screen?: boolean;
4
+ zIndex?: number;
5
+ class?: ClassValue;
6
+ }
7
+ declare const _default: import('vue').DefineComponent<BlanketProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BlanketProps> & Readonly<{}>, {
8
+ zIndex: number;
9
+ screen: boolean;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -1 +1 @@
1
- export {};
1
+ export { default as Blanket, type BlanketProps, default } from './Blanket';
@@ -1 +1,5 @@
1
-
1
+ import { _ as t, _ as f } from "../Blanket.vue_vue_type_style_index_0_lang-Dv68meO4.js";
2
+ export {
3
+ t as Blanket,
4
+ f as default
5
+ };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Blanket.vue_vue_type_style_index_0_lang-WKNPEuJI.js");exports.Blanket=e._sfc_main;exports.default=e._sfc_main;
@@ -0,0 +1,22 @@
1
+ import { defineComponent as r, createElementBlock as a, openBlock as l, normalizeStyle as c, normalizeClass as p, unref as n } from "vue";
2
+ import { getComponentOptions as m, getBemBlock as d, normCls as i } from "@pantograph/utils";
3
+ const f = ["data-screen"], k = /* @__PURE__ */ r({
4
+ ...m("Blanket"),
5
+ __name: "Blanket",
6
+ props: {
7
+ screen: { type: Boolean, default: !0 },
8
+ zIndex: { default: 1 },
9
+ class: {}
10
+ },
11
+ setup(t) {
12
+ const o = t, s = d("blanket");
13
+ return (e, u) => (l(), a("div", {
14
+ class: p(n(i)(n(s), o.class)),
15
+ style: c({ zIndex: e.zIndex }),
16
+ "data-screen": e.screen ? "" : void 0
17
+ }, null, 14, f));
18
+ }
19
+ });
20
+ export {
21
+ k as _
22
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),n=require("@pantograph/utils"),l=["data-screen"],a=e.defineComponent({...n.getComponentOptions("Blanket"),__name:"Blanket",props:{screen:{type:Boolean,default:!0},zIndex:{default:1},class:{}},setup(t){const o=t,r=n.getBemBlock("blanket");return(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(r),o.class)),style:e.normalizeStyle({zIndex:s.zIndex}),"data-screen":s.screen?"":void 0},null,14,l))}});exports._sfc_main=a;
@@ -0,0 +1,45 @@
1
+ import { IconProps } from '../Icon';
2
+ import { StepStatus } from './Steps.model';
3
+ import { ClassValue } from 'class-variance-authority/types';
4
+ export interface StepItemProps extends IconProps {
5
+ index?: number;
6
+ status?: StepStatus;
7
+ number?: number | string;
8
+ title?: string;
9
+ description?: string;
10
+ containerCls?: ClassValue;
11
+ contentCls?: ClassValue;
12
+ titleCls?: ClassValue;
13
+ descriptionCls?: ClassValue;
14
+ iconCls?: ClassValue;
15
+ numberCls?: ClassValue;
16
+ leadingCls?: ClassValue;
17
+ disabled?: boolean;
18
+ }
19
+ export interface StepItemSlots {
20
+ title?: (params?: object) => any;
21
+ description?: (params?: object) => any;
22
+ leading?: (params?: object) => any;
23
+ icon?: (params?: object) => any;
24
+ }
25
+ export interface StepItemEmits {
26
+ (e: 'click'): void;
27
+ }
28
+ export interface StepItemContext {
29
+ props: StepItemProps;
30
+ slots: StepItemSlots;
31
+ }
32
+ export declare const injectStepContext: <T extends StepItemContext | null | undefined = StepItemContext>(fallback?: T | undefined) => T extends null ? StepItemContext | null : StepItemContext, provideStepContext: (contextValue: StepItemContext) => StepItemContext;
33
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<StepItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
34
+ click: () => any;
35
+ }, string, import('vue').PublicProps, Readonly<StepItemProps> & Readonly<{
36
+ onClick?: (() => any) | undefined;
37
+ }>, {
38
+ status: StepStatus;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<StepItemSlots> & StepItemSlots>;
40
+ export default _default;
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,50 @@
1
+ import { ClassValue } from 'class-variance-authority/types';
2
+ import { StepLeadingType } from './Steps.model';
3
+ import { StepItemProps } from './Step';
4
+ export type StepItem = Omit<StepItemProps, 'index' | 'status' | 'number'> & {
5
+ error?: boolean;
6
+ };
7
+ export interface StepsProps {
8
+ items?: StepItem[];
9
+ modelValue?: number;
10
+ vertical?: boolean;
11
+ class?: ClassValue;
12
+ leadingType?: StepLeadingType;
13
+ }
14
+ export interface StepsEmits {
15
+ (e: 'update:modelValue', value?: number): void;
16
+ (e: 'change', value?: number): void;
17
+ }
18
+ export interface StepsSlots {
19
+ default?: (params?: {
20
+ items: StepItem[];
21
+ }) => never;
22
+ item?: (item: StepItemProps) => never;
23
+ leading?: (item: StepItemProps) => never;
24
+ title?: (item: StepItemProps) => never;
25
+ description?: (item: StepItemProps) => never;
26
+ icon?: (item: StepItemProps) => never;
27
+ }
28
+ export declare const stepsPrefix: string;
29
+ export declare const stepPrefix: string;
30
+ export interface StepsContext {
31
+ props: StepsProps;
32
+ }
33
+ export declare const injectStepsContext: <T extends StepsContext | null | undefined = StepsContext>(fallback?: T | undefined) => T extends null ? StepsContext | null : StepsContext, provideStepsContext: (contextValue: StepsContext) => StepsContext;
34
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<StepsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
35
+ change: (value?: number | undefined) => any;
36
+ "update:modelValue": (value?: number | undefined) => any;
37
+ }, string, import('vue').PublicProps, Readonly<StepsProps> & Readonly<{
38
+ onChange?: ((value?: number | undefined) => any) | undefined;
39
+ "onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
40
+ }>, {
41
+ modelValue: number;
42
+ items: StepItem[];
43
+ leadingType: StepLeadingType;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<StepsSlots> & StepsSlots>;
45
+ export default _default;
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -1 +1,5 @@
1
- export {};
1
+ export declare const StepsPlugin: import('vue').Plugin;
2
+ export declare const StepPlugin: import('vue').Plugin;
3
+ export { default as Steps, default, stepsPrefix, stepPrefix, injectStepsContext, provideStepsContext, type StepItem, type StepsContext, type StepsEmits, type StepsProps, type StepsSlots, } from './Steps';
4
+ export { default as Step, injectStepContext, provideStepContext, type StepItemProps, type StepItemContext, type StepItemEmits, type StepItemSlots, } from './Step';
5
+ export * from './Steps.model';
@@ -1 +1,247 @@
1
-
1
+ import { defineComponent as $, createBlock as V, openBlock as y, h as b, useSlots as w, unref as l, normalizeClass as h, withCtx as C, createElementVNode as D, createVNode as k, computed as M, normalizeStyle as O, renderSlot as v, normalizeProps as U, guardReactiveProps as X, createElementBlock as Y, Fragment as q, renderList as A, mergeProps as S } from "vue";
2
+ import { cva as x } from "class-variance-authority";
3
+ import { getComponentOptions as T, getBemElement as m, isEmptyLikeLodash as H, normCls as d, getBemModifier as J, generateVariantClassList as I, getBemBlock as K, getValidNumber as Q, getComponentName as F } from "@pantograph/utils";
4
+ import { isEmptyElement as B, useVModel as W, installComponent as G } from "@pantograph/utils-vue";
5
+ import { _ as Z } from "../Icon.vue_vue_type_style_index_0_lang-CD9EvvB5.js";
6
+ import { omit as ee } from "es-toolkit";
7
+ import { createContext as R, RovingFocusItem as te, RovingFocusGroup as se } from "reka-ui";
8
+ const oe = ["completed", "current", "upcoming", "error"], Se = ["number", "icon"], ne = /* @__PURE__ */ $({
9
+ ...T("StepLeading"),
10
+ __name: "StepLeading",
11
+ setup(_) {
12
+ const r = re(), o = m(u, "leading"), a = () => {
13
+ if (r.props.icon) return r.props.icon;
14
+ switch (r.props.status) {
15
+ case "current":
16
+ return "tabler:progress";
17
+ case "upcoming":
18
+ return "tabler:circle-dashed";
19
+ case "error":
20
+ return "tabler:progress-alert";
21
+ case "completed":
22
+ return "tabler:circle-check-filled";
23
+ }
24
+ }, c = () => {
25
+ var L, z, E, N;
26
+ const f = (z = (L = r.slots).leading) == null ? void 0 : z.call(L, {}), p = !B(f), g = () => b(
27
+ "div",
28
+ { class: d(m(o, "number"), r.props.numberCls) },
29
+ p ? f : r.props.number
30
+ ), s = a(), i = (N = (E = r.slots).icon) == null ? void 0 : N.call(E, {});
31
+ let e = !1;
32
+ const t = () => (e = !0, b(
33
+ Z,
34
+ {
35
+ ...ee(r.props, ["status", "number", "iconCls", "numberCls"]),
36
+ icon: s,
37
+ size: "xsm",
38
+ class: d(r.props.iconCls)
39
+ },
40
+ () => i
41
+ ));
42
+ let n;
43
+ return p ? n = g() : !B(i) || r.props.icon || H(r.props.number) ? n = t() : n = g(), b(
44
+ "div",
45
+ {
46
+ class: d(o, r.props.leadingCls, {
47
+ [J(o, "icon")]: e
48
+ })
49
+ },
50
+ n
51
+ );
52
+ };
53
+ return (f, p) => (y(), V(c));
54
+ }
55
+ }), [re, ie] = R("Step"), j = /* @__PURE__ */ $({
56
+ ...T("Step"),
57
+ __name: "Step",
58
+ props: {
59
+ index: {},
60
+ status: { default: "upcoming" },
61
+ number: {},
62
+ title: {},
63
+ description: {},
64
+ containerCls: {},
65
+ contentCls: {},
66
+ titleCls: {},
67
+ descriptionCls: {},
68
+ iconCls: {},
69
+ numberCls: {},
70
+ leadingCls: {},
71
+ disabled: { type: Boolean },
72
+ size: {},
73
+ class: {},
74
+ icon: {},
75
+ flipOnDir: {},
76
+ customStroke: { type: Boolean },
77
+ flipX: { type: Boolean },
78
+ flipY: { type: Boolean }
79
+ },
80
+ emits: ["click"],
81
+ setup(_, { emit: r }) {
82
+ const o = _, a = w(), c = x(u, {
83
+ variants: {
84
+ status: I(oe, u),
85
+ vertical: I("vertical", u)
86
+ }
87
+ });
88
+ ie({
89
+ props: o,
90
+ slots: a
91
+ });
92
+ const f = le(), p = (e) => {
93
+ o.disabled && (e.preventDefault(), e.stopPropagation());
94
+ }, g = () => {
95
+ var n;
96
+ let e;
97
+ const t = (n = a.title) == null ? void 0 : n.call(a, {});
98
+ if (B(t) ? e = o.title : e = t, e)
99
+ return b("div", { class: d(m(u, "title"), o.titleCls) }, e);
100
+ }, s = () => {
101
+ var n;
102
+ let e;
103
+ const t = (n = a.description) == null ? void 0 : n.call(a, {});
104
+ if (B(t) ? e = o.description : e = t, e)
105
+ return b(
106
+ "div",
107
+ {
108
+ class: d(m(u, "description"), "paragraph", o.descriptionCls)
109
+ },
110
+ e
111
+ );
112
+ }, i = () => {
113
+ const e = g(), t = s();
114
+ if (e || t)
115
+ return b("div", { class: d(m(u, "content"), o.contentCls) }, [
116
+ e,
117
+ t
118
+ ]);
119
+ };
120
+ return (e, t) => {
121
+ var n;
122
+ return y(), V(l(te), {
123
+ as: "button",
124
+ tabStopId: (n = e.index) == null ? void 0 : n.toString(),
125
+ onPointerdown: p,
126
+ disabled: e.disabled,
127
+ class: h(
128
+ l(d)(
129
+ l(c)({
130
+ status: e.status,
131
+ vertical: l(f).props.vertical
132
+ }),
133
+ o.class
134
+ )
135
+ )
136
+ }, {
137
+ default: C(() => [
138
+ D("div", {
139
+ class: h(l(m)(l(u), "line"))
140
+ }, null, 2),
141
+ D("div", {
142
+ class: h(l(d)(l(m)(l(u), "container"), e.containerCls))
143
+ }, [
144
+ k(ne),
145
+ k(i)
146
+ ], 2)
147
+ ]),
148
+ _: 1
149
+ }, 8, ["tabStopId", "disabled", "class"]);
150
+ };
151
+ }
152
+ }), P = K("steps"), u = m(P, "step"), [le, ae] = R("Steps"), ce = /* @__PURE__ */ $({
153
+ ...T("Steps"),
154
+ __name: "Steps",
155
+ props: {
156
+ items: { default: () => [] },
157
+ modelValue: { default: 0 },
158
+ vertical: { type: Boolean },
159
+ class: {},
160
+ leadingType: { default: "icon" }
161
+ },
162
+ emits: ["update:modelValue", "change"],
163
+ setup(_, { emit: r }) {
164
+ const o = _, a = r;
165
+ w();
166
+ const c = W(o, "modelValue", a, {
167
+ onChange: (s) => {
168
+ a("change", s);
169
+ },
170
+ defaultValue: 0
171
+ }), f = x(P, {
172
+ variants: {
173
+ vertical: I("vertical", P)
174
+ }
175
+ }), p = M(() => {
176
+ var s;
177
+ return ((s = o.items) == null ? void 0 : s.map((i, e) => {
178
+ const t = e < c.value ? "completed" : e === c.value ? "current" : "upcoming", n = i.error ? "error" : t;
179
+ return {
180
+ ...i,
181
+ "data-completed": t === "completed" ? "" : void 0,
182
+ status: n,
183
+ index: e,
184
+ number: o.leadingType === "number" ? e + 1 : void 0,
185
+ disabled: i.disabled ? i.disabled : e > c.value + 1
186
+ };
187
+ })) ?? [];
188
+ }), g = (s) => {
189
+ const i = Q(s);
190
+ i !== void 0 && i !== c.value && (c.value = i);
191
+ };
192
+ return ae({ props: o }), (s, i) => {
193
+ var e;
194
+ return y(), V(l(se), {
195
+ as: "div",
196
+ style: O({
197
+ gridTemplateColumns: s.vertical ? "repeat(1, minmax(0, 1fr))" : `repeat(${p.value.length}, minmax(0, 1fr))`
198
+ }),
199
+ orientation: s.vertical ? "vertical" : "horizontal",
200
+ currentTabStopId: (e = l(c)) == null ? void 0 : e.toString(),
201
+ "onUpdate:currentTabStopId": g,
202
+ class: h(l(d)(l(f)({ vertical: s.vertical }), o.class))
203
+ }, {
204
+ default: C(() => [
205
+ v(s.$slots, "default", U(X({ items: p.value })), () => [
206
+ (y(!0), Y(q, null, A(p.value, (t, n) => v(s.$slots, "item", S({
207
+ key: n,
208
+ ref_for: !0
209
+ }, t), () => [
210
+ k(j, S({ ref_for: !0 }, t), {
211
+ leading: C(() => [
212
+ v(s.$slots, "leading", S({ ref_for: !0 }, t))
213
+ ]),
214
+ title: C(() => [
215
+ v(s.$slots, "title", S({ ref_for: !0 }, t))
216
+ ]),
217
+ description: C(() => [
218
+ v(s.$slots, "description", S({ ref_for: !0 }, t))
219
+ ]),
220
+ icon: C(() => [
221
+ v(s.$slots, "icon", S({ ref_for: !0 }, t))
222
+ ]),
223
+ _: 2
224
+ }, 1040)
225
+ ])), 128))
226
+ ])
227
+ ]),
228
+ _: 3
229
+ }, 8, ["style", "orientation", "currentTabStopId", "class"]);
230
+ };
231
+ }
232
+ }), Ce = G(ce, F("Steps")), be = G(j, F("Step"));
233
+ export {
234
+ j as Step,
235
+ Se as StepLeadingTypes,
236
+ be as StepPlugin,
237
+ oe as StepStatuses,
238
+ ce as Steps,
239
+ Ce as StepsPlugin,
240
+ ce as default,
241
+ re as injectStepContext,
242
+ le as injectStepsContext,
243
+ ie as provideStepContext,
244
+ ae as provideStepsContext,
245
+ u as stepPrefix,
246
+ P as stepsPrefix
247
+ };
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),P=require("class-variance-authority"),n=require("@pantograph/utils"),f=require("@pantograph/utils-vue"),L=require("../Icon.vue_vue_type_style_index_0_lang-DOQsa_aO.js"),z=require("es-toolkit"),v=require("reka-ui"),k=["completed","current","upcoming","error"],N=["number","icon"],$=e.defineComponent({...n.getComponentOptions("StepLeading"),__name:"StepLeading",setup(C){const i=V(),r=n.getBemElement(u,"leading"),c=()=>{if(i.props.icon)return i.props.icon;switch(i.props.status){case"current":return"tabler:progress";case"upcoming":return"tabler:circle-dashed";case"error":return"tabler:progress-alert";case"completed":return"tabler:circle-check-filled"}},p=()=>{var _,B,y,E;const d=(B=(_=i.slots).leading)==null?void 0:B.call(_,{}),m=!f.isEmptyElement(d),g=()=>e.h("div",{class:n.normCls(n.getBemElement(r,"number"),i.props.numberCls)},m?d:i.props.number),o=c(),a=(E=(y=i.slots).icon)==null?void 0:E.call(y,{});let t=!1;const s=()=>(t=!0,e.h(L._sfc_main,{...z.omit(i.props,["status","number","iconCls","numberCls"]),icon:o,size:"xsm",class:n.normCls(i.props.iconCls)},()=>a));let l;return m?l=g():!f.isEmptyElement(a)||i.props.icon||n.isEmptyLikeLodash(i.props.number)?l=s():l=g(),e.h("div",{class:n.normCls(r,i.props.leadingCls,{[n.getBemModifier(r,"icon")]:t})},l)};return(d,m)=>(e.openBlock(),e.createBlock(p))}}),[V,x]=v.createContext("Step"),b=e.defineComponent({...n.getComponentOptions("Step"),__name:"Step",props:{index:{},status:{default:"upcoming"},number:{},title:{},description:{},containerCls:{},contentCls:{},titleCls:{},descriptionCls:{},iconCls:{},numberCls:{},leadingCls:{},disabled:{type:Boolean},size:{},class:{},icon:{},flipOnDir:{},customStroke:{type:Boolean},flipX:{type:Boolean},flipY:{type:Boolean}},emits:["click"],setup(C,{emit:i}){const r=C,c=e.useSlots(),p=P.cva(u,{variants:{status:n.generateVariantClassList(k,u),vertical:n.generateVariantClassList("vertical",u)}});x({props:r,slots:c});const d=I(),m=t=>{r.disabled&&(t.preventDefault(),t.stopPropagation())},g=()=>{var l;let t;const s=(l=c.title)==null?void 0:l.call(c,{});if(f.isEmptyElement(s)?t=r.title:t=s,t)return e.h("div",{class:n.normCls(n.getBemElement(u,"title"),r.titleCls)},t)},o=()=>{var l;let t;const s=(l=c.description)==null?void 0:l.call(c,{});if(f.isEmptyElement(s)?t=r.description:t=s,t)return e.h("div",{class:n.normCls(n.getBemElement(u,"description"),"paragraph",r.descriptionCls)},t)},a=()=>{const t=g(),s=o();if(t||s)return e.h("div",{class:n.normCls(n.getBemElement(u,"content"),r.contentCls)},[t,s])};return(t,s)=>{var l;return e.openBlock(),e.createBlock(e.unref(v.RovingFocusItem),{as:"button",tabStopId:(l=t.index)==null?void 0:l.toString(),onPointerdown:m,disabled:t.disabled,class:e.normalizeClass(e.unref(n.normCls)(e.unref(p)({status:t.status,vertical:e.unref(d).props.vertical}),r.class))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.getBemElement)(e.unref(u),"line"))},null,2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(u),"container"),t.containerCls))},[e.createVNode($),e.createVNode(a)],2)]),_:1},8,["tabStopId","disabled","class"])}}}),S=n.getBemBlock("steps"),u=n.getBemElement(S,"step"),[I,T]=v.createContext("Steps"),h=e.defineComponent({...n.getComponentOptions("Steps"),__name:"Steps",props:{items:{default:()=>[]},modelValue:{default:0},vertical:{type:Boolean},class:{},leadingType:{default:"icon"}},emits:["update:modelValue","change"],setup(C,{emit:i}){const r=C,c=i;e.useSlots();const p=f.useVModel(r,"modelValue",c,{onChange:o=>{c("change",o)},defaultValue:0}),d=P.cva(S,{variants:{vertical:n.generateVariantClassList("vertical",S)}}),m=e.computed(()=>{var o;return((o=r.items)==null?void 0:o.map((a,t)=>{const s=t<p.value?"completed":t===p.value?"current":"upcoming",l=a.error?"error":s;return{...a,"data-completed":s==="completed"?"":void 0,status:l,index:t,number:r.leadingType==="number"?t+1:void 0,disabled:a.disabled?a.disabled:t>p.value+1}}))??[]}),g=o=>{const a=n.getValidNumber(o);a!==void 0&&a!==p.value&&(p.value=a)};return T({props:r}),(o,a)=>{var t;return e.openBlock(),e.createBlock(e.unref(v.RovingFocusGroup),{as:"div",style:e.normalizeStyle({gridTemplateColumns:o.vertical?"repeat(1, minmax(0, 1fr))":`repeat(${m.value.length}, minmax(0, 1fr))`}),orientation:o.vertical?"vertical":"horizontal",currentTabStopId:(t=e.unref(p))==null?void 0:t.toString(),"onUpdate:currentTabStopId":g,class:e.normalizeClass(e.unref(n.normCls)(e.unref(d)({vertical:o.vertical}),r.class))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",e.normalizeProps(e.guardReactiveProps({items:m.value})),()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(s,l)=>e.renderSlot(o.$slots,"item",e.mergeProps({key:l,ref_for:!0},s),()=>[e.createVNode(b,e.mergeProps({ref_for:!0},s),{leading:e.withCtx(()=>[e.renderSlot(o.$slots,"leading",e.mergeProps({ref_for:!0},s))]),title:e.withCtx(()=>[e.renderSlot(o.$slots,"title",e.mergeProps({ref_for:!0},s))]),description:e.withCtx(()=>[e.renderSlot(o.$slots,"description",e.mergeProps({ref_for:!0},s))]),icon:e.withCtx(()=>[e.renderSlot(o.$slots,"icon",e.mergeProps({ref_for:!0},s))]),_:2},1040)])),128))])]),_:3},8,["style","orientation","currentTabStopId","class"])}}}),w=f.installComponent(h,n.getComponentName("Steps")),q=f.installComponent(b,n.getComponentName("Step"));exports.Step=b;exports.StepLeadingTypes=N;exports.StepPlugin=q;exports.StepStatuses=k;exports.Steps=h;exports.StepsPlugin=w;exports.default=h;exports.injectStepContext=V;exports.injectStepsContext=I;exports.provideStepContext=x;exports.provideStepsContext=T;exports.stepPrefix=u;exports.stepsPrefix=S;
@@ -18,7 +18,7 @@ export interface ToastProps {
18
18
  actionsCls?: ClassValue;
19
19
  headerCls?: ClassValue;
20
20
  closeCls?: ClassValue;
21
- onCloseToast?: () => void;
21
+ onCloseNotification?: () => void;
22
22
  }
23
23
  export interface ToastSlots {
24
24
  render: () => never;
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, useSlots as w, computed as y, createElementBlock as i, openBlock as a, normalizeClass as t, unref as e, renderSlot as u, createCommentVNode as c, createElementVNode as f, createBlock as N, createVNode as g, normalizeStyle as V, createSlots as S, withCtx as z, createTextVNode as B, toDisplayString as v } from "vue";
1
+ import { defineComponent as T, useSlots as N, computed as f, createElementBlock as i, openBlock as a, normalizeClass as t, unref as e, renderSlot as u, createCommentVNode as c, createElementVNode as y, createBlock as w, createVNode as g, normalizeStyle as V, createSlots as S, withCtx as z, createTextVNode as B, toDisplayString as v } from "vue";
2
2
  import { cva as E } from "class-variance-authority";
3
3
  import { getComponentOptions as I, getBemBlock as D, generateVariantClassList as k, normCls as r, getBemElement as n, getComponentName as L } from "@pantograph/utils";
4
4
  import { _ as O } from "../IconButton.vue_vue_type_script_setup_true_lang-DsSD_y63.js";
@@ -8,7 +8,7 @@ import { getCssCoreVar as R } from "@pantograph/tokens";
8
8
  import { i as j } from "../isNumber-BduWbB-B.js";
9
9
  import { _ as q } from "../Progress.vue_vue_type_style_index_0_lang-Ba_Fby6M.js";
10
10
  import { installComponent as A } from "@pantograph/utils-vue";
11
- const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
11
+ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ T({
12
12
  ...I("Toast"),
13
13
  __name: "Toast",
14
14
  props: {
@@ -29,15 +29,15 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
29
29
  actionsCls: {},
30
30
  headerCls: {},
31
31
  closeCls: {},
32
- onCloseToast: {}
32
+ onCloseNotification: {}
33
33
  },
34
34
  setup(b) {
35
- const p = b, l = w(), s = D("toast"), T = E(s, {
35
+ const p = b, l = N(), s = D("toast"), $ = E(s, {
36
36
  variants: {
37
37
  type: k(F, s),
38
38
  paused: k("paused", s)
39
39
  }
40
- }), $ = y(() => {
40
+ }), h = f(() => {
41
41
  switch (p.type) {
42
42
  case "info":
43
43
  return "sky";
@@ -49,7 +49,7 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
49
49
  return "red";
50
50
  }
51
51
  return "primary";
52
- }), d = y(() => {
52
+ }), d = f(() => {
53
53
  if (p.icon) return p.icon;
54
54
  switch (p.type) {
55
55
  case "info":
@@ -63,7 +63,7 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
63
63
  }
64
64
  });
65
65
  return (o, m) => (a(), i("div", {
66
- class: t(e(r)(e(T)({ type: o.type, paused: o.paused }), p.class))
66
+ class: t(e(r)(e($)({ type: o.type, paused: o.paused }), p.class))
67
67
  }, [
68
68
  u(o.$slots, "render", {}, () => [
69
69
  l.icon || d.value ? (a(), i("div", {
@@ -84,10 +84,10 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
84
84
  } : void 0
85
85
  ]), 1032, ["icon", "style"])
86
86
  ], 2)) : c("", !0),
87
- f("div", {
87
+ y("div", {
88
88
  class: t(e(r)(e(n)(e(s), "body"), o.bodyCls))
89
89
  }, [
90
- f("div", {
90
+ y("div", {
91
91
  class: t(e(r)(e(n)(e(s), "content"), o.contentCls))
92
92
  }, [
93
93
  o.title || l.title ? (a(), i("div", {
@@ -113,7 +113,7 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
113
113
  type: "ghost",
114
114
  onClick: m[0] || (m[0] = (H) => {
115
115
  var C;
116
- return (C = o.onCloseToast) == null ? void 0 : C.call(o);
116
+ return (C = o.onCloseNotification) == null ? void 0 : C.call(o);
117
117
  })
118
118
  })
119
119
  ])
@@ -135,13 +135,13 @@ const F = ["info", "success", "warning", "error"], G = /* @__PURE__ */ h({
135
135
  u(o.$slots, "actions")
136
136
  ], 2)) : c("", !0)
137
137
  ], 2),
138
- o.progress && e(j)(o.duration) && ![0, 1 / 0].includes(o.duration) ? (a(), N(e(q), {
138
+ o.progress && e(j)(o.duration) && ![0, 1 / 0].includes(o.duration) ? (a(), w(e(q), {
139
139
  key: 1,
140
140
  class: t(e(r)(e(n)(e(s), "progress"), o.progressCls)),
141
141
  noTransition: "",
142
142
  notRounded: "",
143
143
  duration: o.duration,
144
- color: $.value
144
+ color: h.value
145
145
  }, null, 8, ["class", "duration", "color"])) : c("", !0)
146
146
  ])
147
147
  ], 2));
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("class-variance-authority"),n=require("@pantograph/utils"),f=require("../IconButton.vue_vue_type_script_setup_true_lang-CY2MXWF8.js"),B=require("../Icon.vue_vue_type_style_index_0_lang-DOQsa_aO.js");require("../Progress/index.umd.cjs");const g=require("@pantograph/tokens"),y=require("../isNumber-DMOjxgl8.js"),k=require("../Progress.vue_vue_type_style_index_0_lang-D_g_XsJ4.js"),v=require("@pantograph/utils-vue"),u=["info","success","warning","error"],l=e.defineComponent({...n.getComponentOptions("Toast"),__name:"Toast",props:{type:{},duration:{default:3e3},progress:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},paused:{type:Boolean},title:{},description:{},icon:{},class:{},bodyCls:{},progressCls:{},contentCls:{},titleCls:{},descriptionCls:{},actionsCls:{},headerCls:{},closeCls:{},onCloseToast:{}},setup(m){const s=m,t=e.useSlots(),r=n.getBemBlock("toast"),d=C.cva(r,{variants:{type:n.generateVariantClassList(u,r),paused:n.generateVariantClassList("paused",r)}}),p=e.computed(()=>{switch(s.type){case"info":return"sky";case"success":return"green";case"warning":return"yellow";case"error":return"red"}return"primary"}),a=e.computed(()=>{if(s.icon)return s.icon;switch(s.type){case"info":return"tabler:info-circle";case"success":return"tabler:circle-check";case"warning":return"tabler:alert-triangle";case"error":return"tabler:circle-x"}});return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(d)({type:o.type,paused:o.paused}),s.class))},[e.renderSlot(o.$slots,"render",{},()=>[t.icon||a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.getBemElement)(e.unref(r),"icon"))},[e.createVNode(B._sfc_main,{icon:a.value,size:"sm",style:e.normalizeStyle({color:e.unref(g.getCssCoreVar)("rouad")})},e.createSlots({_:2},[t.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","style"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"body"),o.bodyCls))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"content"),o.contentCls))},[o.title||t.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"header"),o.headerCls))},[o.title||t.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"title"),o.titleCls,"paragraph"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2)):e.createCommentVNode("",!0),s.closable||t.closeButton?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"close"),o.closeCls))},[e.renderSlot(o.$slots,"closeButton",{},()=>[e.createVNode(f._sfc_main,{icon:"tabler:x",color:"neutral",type:"ghost",onClick:i[0]||(i[0]=V=>{var c;return(c=o.onCloseToast)==null?void 0:c.call(o)})})])],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),o.description||t.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"description"),o.descriptionCls,"paragraph"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])],2)):e.createCommentVNode("",!0)],2),t.actions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"actions"),o.actionsCls))},[e.renderSlot(o.$slots,"actions")],2)):e.createCommentVNode("",!0)],2),o.progress&&e.unref(y.isNumber)(o.duration)&&![0,1/0].includes(o.duration)?(e.openBlock(),e.createBlock(e.unref(k._sfc_main),{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"progress"),o.progressCls)),noTransition:"",notRounded:"",duration:o.duration,color:p.value},null,8,["class","duration","color"])):e.createCommentVNode("",!0)])],2))}}),E=v.installComponent(l,n.getComponentName("Toast"));exports.Toast=l;exports.ToastPlugin=E;exports.ToastTypes=u;exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("class-variance-authority"),n=require("@pantograph/utils"),f=require("../IconButton.vue_vue_type_script_setup_true_lang-CY2MXWF8.js"),B=require("../Icon.vue_vue_type_style_index_0_lang-DOQsa_aO.js");require("../Progress/index.umd.cjs");const g=require("@pantograph/tokens"),y=require("../isNumber-DMOjxgl8.js"),k=require("../Progress.vue_vue_type_style_index_0_lang-D_g_XsJ4.js"),v=require("@pantograph/utils-vue"),u=["info","success","warning","error"],l=e.defineComponent({...n.getComponentOptions("Toast"),__name:"Toast",props:{type:{},duration:{default:3e3},progress:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},paused:{type:Boolean},title:{},description:{},icon:{},class:{},bodyCls:{},progressCls:{},contentCls:{},titleCls:{},descriptionCls:{},actionsCls:{},headerCls:{},closeCls:{},onCloseNotification:{}},setup(m){const s=m,t=e.useSlots(),r=n.getBemBlock("toast"),d=C.cva(r,{variants:{type:n.generateVariantClassList(u,r),paused:n.generateVariantClassList("paused",r)}}),p=e.computed(()=>{switch(s.type){case"info":return"sky";case"success":return"green";case"warning":return"yellow";case"error":return"red"}return"primary"}),a=e.computed(()=>{if(s.icon)return s.icon;switch(s.type){case"info":return"tabler:info-circle";case"success":return"tabler:circle-check";case"warning":return"tabler:alert-triangle";case"error":return"tabler:circle-x"}});return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(d)({type:o.type,paused:o.paused}),s.class))},[e.renderSlot(o.$slots,"render",{},()=>[t.icon||a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.getBemElement)(e.unref(r),"icon"))},[e.createVNode(B._sfc_main,{icon:a.value,size:"sm",style:e.normalizeStyle({color:e.unref(g.getCssCoreVar)("rouad")})},e.createSlots({_:2},[t.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"icon")]),key:"0"}:void 0]),1032,["icon","style"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"body"),o.bodyCls))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"content"),o.contentCls))},[o.title||t.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"header"),o.headerCls))},[o.title||t.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"title"),o.titleCls,"paragraph"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2)):e.createCommentVNode("",!0),s.closable||t.closeButton?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"close"),o.closeCls))},[e.renderSlot(o.$slots,"closeButton",{},()=>[e.createVNode(f._sfc_main,{icon:"tabler:x",color:"neutral",type:"ghost",onClick:i[0]||(i[0]=N=>{var c;return(c=o.onCloseNotification)==null?void 0:c.call(o)})})])],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),o.description||t.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"description"),o.descriptionCls,"paragraph"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])],2)):e.createCommentVNode("",!0)],2),t.actions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"actions"),o.actionsCls))},[e.renderSlot(o.$slots,"actions")],2)):e.createCommentVNode("",!0)],2),o.progress&&e.unref(y.isNumber)(o.duration)&&![0,1/0].includes(o.duration)?(e.openBlock(),e.createBlock(e.unref(k._sfc_main),{key:1,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(r),"progress"),o.progressCls)),noTransition:"",notRounded:"",duration:o.duration,color:p.value},null,8,["class","duration","color"])):e.createCommentVNode("",!0)])],2))}}),E=v.installComponent(l,n.getComponentName("Toast"));exports.Toast=l;exports.ToastPlugin=E;exports.ToastTypes=u;exports.default=l;