@pantograph/vue 0.28.8 → 0.29.1
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/Card/Card.d.ts +46 -0
- package/dist/Card/Card.model.d.ts +2 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +6 -0
- package/dist/Card/index.umd.cjs +1 -0
- package/dist/Card.vue_vue_type_style_index_0_lang-Cq4rXSmn.js +109 -0
- package/dist/Card.vue_vue_type_style_index_0_lang-Iyaj4565.js +1 -0
- package/dist/Chip/Chip.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +232 -229
- package/dist/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CardType } from './Card.model';
|
|
2
|
+
import { ClassValue } from 'class-variance-authority/types';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
type?: CardType;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
showFloatedActionsOnHover?: boolean;
|
|
7
|
+
leadingPadding?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
class?: ClassValue;
|
|
11
|
+
leadingCls?: ClassValue;
|
|
12
|
+
contentCls?: ClassValue;
|
|
13
|
+
titleCls?: ClassValue;
|
|
14
|
+
descriptionCls?: ClassValue;
|
|
15
|
+
actionsCls?: ClassValue;
|
|
16
|
+
floatedActionsCls?: ClassValue;
|
|
17
|
+
bodyCls?: ClassValue;
|
|
18
|
+
}
|
|
19
|
+
export interface CardSlots {
|
|
20
|
+
default: (data?: object) => never;
|
|
21
|
+
title: (data?: object) => never;
|
|
22
|
+
description: (data?: object) => never;
|
|
23
|
+
actions: (data?: object) => never;
|
|
24
|
+
floatedActions: (data?: object) => never;
|
|
25
|
+
leading: (data?: object) => never;
|
|
26
|
+
}
|
|
27
|
+
declare function __VLS_template(): {
|
|
28
|
+
attrs: Partial<{}>;
|
|
29
|
+
slots: Readonly<CardSlots> & CardSlots;
|
|
30
|
+
refs: {};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<CardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CardProps> & Readonly<{}>, {
|
|
35
|
+
type: CardType;
|
|
36
|
+
selected: boolean;
|
|
37
|
+
showFloatedActionsOnHover: boolean;
|
|
38
|
+
leadingPadding: boolean;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Card.vue_vue_type_style_index_0_lang-Iyaj4565.js");exports.Card=e._sfc_main;exports.CardTypes=e.CardTypes;exports.default=e._sfc_main;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent as E, useSlots as P, createElementBlock as _, openBlock as b, normalizeClass as u, unref as c, createVNode as d, createElementVNode as k, h as a } from "vue";
|
|
2
|
+
import { getComponentOptions as F, getBemBlock as O, generateVariantClassList as p, normCls as s, getBemElement as i } from "@pantograph/utils";
|
|
3
|
+
import { cva as S } from "class-variance-authority";
|
|
4
|
+
import { isEmptyElement as r } from "@pantograph/utils-vue";
|
|
5
|
+
const V = ["vertical", "horizontal"], N = /* @__PURE__ */ E({
|
|
6
|
+
...F("Card"),
|
|
7
|
+
__name: "Card",
|
|
8
|
+
props: {
|
|
9
|
+
type: { default: "vertical" },
|
|
10
|
+
selected: { type: Boolean, default: !1 },
|
|
11
|
+
showFloatedActionsOnHover: { type: Boolean, default: !0 },
|
|
12
|
+
leadingPadding: { type: Boolean, default: !0 },
|
|
13
|
+
title: {},
|
|
14
|
+
description: {},
|
|
15
|
+
class: {},
|
|
16
|
+
leadingCls: {},
|
|
17
|
+
contentCls: {},
|
|
18
|
+
titleCls: {},
|
|
19
|
+
descriptionCls: {},
|
|
20
|
+
actionsCls: {},
|
|
21
|
+
floatedActionsCls: {},
|
|
22
|
+
bodyCls: {}
|
|
23
|
+
},
|
|
24
|
+
setup(f) {
|
|
25
|
+
const o = f, l = O("card"), C = S(l, {
|
|
26
|
+
variants: {
|
|
27
|
+
type: p(V, l),
|
|
28
|
+
selected: p("selected", l),
|
|
29
|
+
leadingPadding: p("leading-padding", l)
|
|
30
|
+
}
|
|
31
|
+
}), n = P(), g = () => {
|
|
32
|
+
var e;
|
|
33
|
+
const t = (e = n.leading) == null ? void 0 : e.call(n, {});
|
|
34
|
+
return r(t) ? null : a("div", { class: s(i(l, "leading"), o.leadingCls) }, t);
|
|
35
|
+
}, m = () => {
|
|
36
|
+
var e;
|
|
37
|
+
const t = (e = n.title) == null ? void 0 : e.call(n, {});
|
|
38
|
+
return o.title || !r(t) ? a(
|
|
39
|
+
"div",
|
|
40
|
+
{ class: s(i(l, "title"), "paragraph", o.titleCls) },
|
|
41
|
+
t ?? o.title
|
|
42
|
+
) : null;
|
|
43
|
+
}, v = () => {
|
|
44
|
+
var e;
|
|
45
|
+
const t = (e = n.description) == null ? void 0 : e.call(n, {});
|
|
46
|
+
return o.description || !r(t) ? a(
|
|
47
|
+
"div",
|
|
48
|
+
{ class: s(i(l, "description"), "paragraph", o.descriptionCls) },
|
|
49
|
+
t ?? o.description
|
|
50
|
+
) : null;
|
|
51
|
+
}, y = () => {
|
|
52
|
+
const t = m(), e = v();
|
|
53
|
+
return t || e ? a("div", { class: s(i(l, "body"), o.bodyCls) }, [
|
|
54
|
+
t,
|
|
55
|
+
e
|
|
56
|
+
]) : null;
|
|
57
|
+
}, B = () => {
|
|
58
|
+
var e;
|
|
59
|
+
const t = (e = n.default) == null ? void 0 : e.call(n, {});
|
|
60
|
+
return r(t) ? null : t;
|
|
61
|
+
}, h = () => {
|
|
62
|
+
var e;
|
|
63
|
+
const t = (e = n.actions) == null ? void 0 : e.call(n, {});
|
|
64
|
+
return r(t) ? null : a("div", { class: s(i(l, "actions"), o.actionsCls) }, t);
|
|
65
|
+
}, A = () => {
|
|
66
|
+
var e;
|
|
67
|
+
const t = (e = n.floatedActions) == null ? void 0 : e.call(n, {});
|
|
68
|
+
return r(t) ? null : a(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
class: s(
|
|
72
|
+
i(l, "floated-actions"),
|
|
73
|
+
{
|
|
74
|
+
[`${i(l, "floated-actions")}--hover-only`]: o.showFloatedActionsOnHover
|
|
75
|
+
},
|
|
76
|
+
o.floatedActionsCls
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
t
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
return (t, e) => (b(), _("div", {
|
|
83
|
+
class: u(
|
|
84
|
+
c(s)(
|
|
85
|
+
c(C)({
|
|
86
|
+
type: t.type,
|
|
87
|
+
selected: t.selected,
|
|
88
|
+
leadingPadding: t.leadingPadding
|
|
89
|
+
}),
|
|
90
|
+
o.class
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
}, [
|
|
94
|
+
d(A),
|
|
95
|
+
d(g),
|
|
96
|
+
k("div", {
|
|
97
|
+
class: u(c(s)(c(i)(c(l), "content"), o.contentCls))
|
|
98
|
+
}, [
|
|
99
|
+
d(y),
|
|
100
|
+
d(B),
|
|
101
|
+
d(h)
|
|
102
|
+
], 2)
|
|
103
|
+
], 2));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export {
|
|
107
|
+
V as C,
|
|
108
|
+
N as _
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),s=require("@pantograph/utils"),E=require("class-variance-authority"),r=require("@pantograph/utils-vue"),a=["vertical","horizontal"],v=t.defineComponent({...s.getComponentOptions("Card"),__name:"Card",props:{type:{default:"vertical"},selected:{type:Boolean,default:!1},showFloatedActionsOnHover:{type:Boolean,default:!0},leadingPadding:{type:Boolean,default:!0},title:{},description:{},class:{},leadingCls:{},contentCls:{},titleCls:{},descriptionCls:{},actionsCls:{},floatedActionsCls:{},bodyCls:{}},setup(c){const i=c,o=s.getBemBlock("card"),d=E.cva(o,{variants:{type:s.generateVariantClassList(a,o),selected:s.generateVariantClassList("selected",o),leadingPadding:s.generateVariantClassList("leading-padding",o)}}),l=t.useSlots(),u=()=>{var n;const e=(n=l.leading)==null?void 0:n.call(l,{});return r.isEmptyElement(e)?null:t.h("div",{class:s.normCls(s.getBemElement(o,"leading"),i.leadingCls)},e)},m=()=>{var n;const e=(n=l.title)==null?void 0:n.call(l,{});return i.title||!r.isEmptyElement(e)?t.h("div",{class:s.normCls(s.getBemElement(o,"title"),"paragraph",i.titleCls)},e??i.title):null},p=()=>{var n;const e=(n=l.description)==null?void 0:n.call(l,{});return i.description||!r.isEmptyElement(e)?t.h("div",{class:s.normCls(s.getBemElement(o,"description"),"paragraph",i.descriptionCls)},e??i.description):null},C=()=>{const e=m(),n=p();return e||n?t.h("div",{class:s.normCls(s.getBemElement(o,"body"),i.bodyCls)},[e,n]):null},g=()=>{var n;const e=(n=l.default)==null?void 0:n.call(l,{});return r.isEmptyElement(e)?null:e},f=()=>{var n;const e=(n=l.actions)==null?void 0:n.call(l,{});return r.isEmptyElement(e)?null:t.h("div",{class:s.normCls(s.getBemElement(o,"actions"),i.actionsCls)},e)},y=()=>{var n;const e=(n=l.floatedActions)==null?void 0:n.call(l,{});return r.isEmptyElement(e)?null:t.h("div",{class:s.normCls(s.getBemElement(o,"floated-actions"),{[`${s.getBemElement(o,"floated-actions")}--hover-only`]:i.showFloatedActionsOnHover},i.floatedActionsCls)},e)};return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(s.normCls)(t.unref(d)({type:e.type,selected:e.selected,leadingPadding:e.leadingPadding}),i.class))},[t.createVNode(y),t.createVNode(u),t.createElementVNode("div",{class:t.normalizeClass(t.unref(s.normCls)(t.unref(s.getBemElement)(t.unref(o),"content"),i.contentCls))},[t.createVNode(C),t.createVNode(g),t.createVNode(f)],2)],2))}});exports.CardTypes=a;exports._sfc_main=v;
|
package/dist/Chip/Chip.d.ts
CHANGED
|
@@ -49,9 +49,9 @@ declare const __VLS_component: import('vue').DefineComponent<ChipProps, {}, {},
|
|
|
49
49
|
size: ChipSize;
|
|
50
50
|
closeable: boolean;
|
|
51
51
|
unExtendParent: boolean;
|
|
52
|
+
selected: boolean;
|
|
52
53
|
closeIcon: string;
|
|
53
54
|
overlayActions: boolean;
|
|
54
|
-
selected: boolean;
|
|
55
55
|
closeTrigger: "pointer" | "click";
|
|
56
56
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
57
57
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/dist/index.d.ts
CHANGED