@pantograph/vue 0.0.3 → 0.6.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/ActionButton/ActionButton.d.ts +148 -5
- package/dist/ActionButton/index.cjs.js +1 -1
- package/dist/ActionButton/index.es.js +1 -1
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-9sHS6TT0.js +52 -0
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-BRYxIFQL.js +1 -0
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/index.cjs.js +1 -1
- package/dist/Avatar/index.es.js +1 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-D72SN0zC.js +1 -0
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BWeEmazM.js → Avatar.vue_vue_type_style_index_0_lang-RziDt5Qs.js} +19 -18
- package/dist/AvatarGroup/index.cjs.js +1 -1
- package/dist/AvatarGroup/index.es.js +1 -1
- package/dist/Badge/Badge.d.ts +3 -3
- package/dist/Badge/index.cjs.js +1 -1
- package/dist/Badge/index.es.js +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DzkeQwzH.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-LwccxMER.js +34 -0
- package/dist/Base/BaseBadge/BaseBadge.d.ts +6 -10
- package/dist/Base/BaseButton/BaseButton.d.ts +13 -15
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-B1Va5X21.js +1 -0
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CHhhflIH.js +107 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-BLGNTber.js +151 -0
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-HdsdAsR3.js +1 -0
- package/dist/Button/Button.d.ts +149 -5
- package/dist/Button/index.cjs.js +1 -1
- package/dist/Button/index.es.js +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-DMOtqE4k.js +49 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DNpM6F5j.js +1 -0
- package/dist/ButtonGroup/index.cjs.js +1 -1
- package/dist/ButtonGroup/index.es.js +1 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-BSj1Y1j2.js +1 -0
- package/dist/{ButtonGroup.vue_vue_type_script_setup_true_lang-jtE0Gtp9.js → ButtonGroup.vue_vue_type_script_setup_true_lang-DBq7tYaO.js} +11 -10
- package/dist/Checkbox/Checkbox.d.ts +6 -14
- package/dist/Checkbox/Checkbox.model.d.ts +0 -2
- package/dist/Checkbox/index.cjs.js +1 -1
- package/dist/Checkbox/index.es.js +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BQeNpCYy.js +1 -0
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-gsOfYgHe.js +245 -0
- package/dist/CheckboxGroup/index.cjs.js +1 -1
- package/dist/CheckboxGroup/index.es.js +1 -1
- package/dist/ConfigProvider/index.cjs.js +1 -0
- package/dist/ConfigProvider/index.d.ts +40 -0
- package/dist/ConfigProvider/index.es.js +112 -0
- package/dist/ConfigProvider/utils.d.ts +4 -0
- package/dist/Divider/Divider.d.ts +27 -0
- package/dist/Divider/Divider.model.d.ts +2 -0
- package/dist/Divider/index.cjs.js +1 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.es.js +6 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js +1 -0
- package/dist/Divider.vue_vue_type_style_index_0_lang-SBMg48di.js +40 -0
- package/dist/FloatButton/FloatButton.d.ts +149 -5
- package/dist/FloatButton/index.cjs.js +1 -1
- package/dist/FloatButton/index.es.js +1 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-BD8KDs-3.js +1 -0
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CLL_AR_I.js +47 -0
- package/dist/GraphicalObject/GraphicalObject.d.ts +3 -3
- package/dist/GraphicalObject/index.cjs.js +1 -1
- package/dist/GraphicalObject/index.es.js +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BKYCNg9l.js +1 -0
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-CcI-aIS4.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DqfDSUXz.js} +7 -6
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/index.cjs.js +1 -1
- package/dist/Icon/index.es.js +1 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js +1 -0
- package/dist/Icon.vue_vue_type_style_index_0_lang-W7sippxn.js +48 -0
- package/dist/IconButton/IconButton.d.ts +149 -5
- package/dist/IconButton/index.cjs.js +1 -1
- package/dist/IconButton/index.es.js +1 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DCrUZOP9.js +47 -0
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-DVbz9uji.js +1 -0
- package/dist/Image/Image.d.ts +48 -0
- package/dist/Image/Image.model.d.ts +6 -0
- package/dist/Image/index.cjs.js +1 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Image/index.es.js +117 -0
- package/dist/IndentLevel/IndentLevel.d.ts +35 -0
- package/dist/IndentLevel/IndentLevel.model.d.ts +4 -0
- package/dist/IndentLevel/index.cjs.js +1 -0
- package/dist/IndentLevel/index.d.ts +2 -0
- package/dist/IndentLevel/index.es.js +7 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-B_x8tshB.js +1 -0
- package/dist/IndentLevel.vue_vue_type_style_index_0_lang-jaoDj9GA.js +103 -0
- package/dist/Indicator/Indicator.d.ts +1 -1
- package/dist/Indicator/index.cjs.js +1 -1
- package/dist/Indicator/index.es.js +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D2iFmRna.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-jv3IND51.js +34 -0
- package/dist/Kbd/Kbd.d.ts +31 -0
- package/dist/Kbd/index.cjs.js +1 -0
- package/dist/Kbd/index.d.ts +1 -0
- package/dist/Kbd/index.es.js +5 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-Br1eygIf.js +1 -0
- package/dist/Kbd.vue_vue_type_style_index_0_lang-D5D9tTsQ.js +60 -0
- package/dist/MenuItem/MenuItem.model.d.ts +2 -0
- package/dist/MenuItem/index.cjs.js +1 -0
- package/dist/MenuItem/index.d.ts +1 -0
- package/dist/MenuItem/index.es.js +1 -0
- package/dist/Popover/Popover.d.ts +6 -83
- package/dist/Popover/index.cjs.js +1 -1
- package/dist/Popover/index.es.js +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-BZMSPrfB.js +1 -0
- package/dist/{Popover.vue_vue_type_style_index_0_lang-Jf0LVKU_.js → Popover.vue_vue_type_style_index_0_lang-DTr33v9y.js} +31 -29
- package/dist/RadioGroup/RadioGroup.d.ts +32 -0
- package/dist/RadioGroup/RadioGroup.model.d.ts +2 -0
- package/dist/RadioGroup/RadioGroupItem.d.ts +16 -0
- package/dist/RadioGroup/index.cjs.js +1 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.es.js +100 -0
- package/dist/Shortcut/Shortcut.d.ts +12 -0
- package/dist/Shortcut/index.cjs.js +1 -0
- package/dist/Shortcut/index.d.ts +1 -0
- package/dist/Shortcut/index.es.js +42 -0
- package/dist/Skeleton/index.cjs.js +1 -1
- package/dist/Skeleton/index.es.js +1 -1
- package/dist/{Skeleton.vue_vue_type_style_index_0_lang-C56TOumA.js → Skeleton.vue_vue_type_style_index_0_lang-BgVkwMj4.js} +10 -9
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-PNNUgKOq.js +1 -0
- package/dist/Spinner/Spinner.d.ts +2 -10
- package/dist/Spinner/index.cjs.js +1 -1
- package/dist/Spinner/index.es.js +1 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-BOXr-RUw.js +85 -0
- package/dist/Spinner.vue_vue_type_style_index_0_lang-DW5QRtWO.js +1 -0
- package/dist/Switch/Switch.d.ts +29 -0
- package/dist/Switch/Switch.model.d.ts +2 -0
- package/dist/Switch/index.cjs.js +1 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.es.js +104 -0
- package/dist/Tree/Tree.d.ts +66 -0
- package/dist/Tree/Tree.model.d.ts +71 -0
- package/dist/Tree/TreeNode.d.ts +33 -0
- package/dist/Tree/index.cjs.js +1 -0
- package/dist/Tree/index.d.ts +2 -0
- package/dist/Tree/index.es.js +458 -0
- package/dist/class-CjZYGZDW.js +1 -0
- package/dist/class-DyU-Ox8D.js +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +27 -24
- package/dist/omit-C_ZXwm9T.js +1 -0
- package/dist/omit-DtumnYm5.js +760 -0
- package/dist/options-B4iSAKol.js +1 -0
- package/dist/options-JBqnVZUl.js +9 -0
- package/dist/style/index.css +1 -1
- package/dist/utils/element.d.ts +1 -1
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.es.js +7 -4
- package/package.json +61 -16
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-Drb30rfG.js +0 -39
- package/dist/ActionButton.vue_vue_type_script_setup_true_lang-dxthnFw4.js +0 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BB-v9NHG.js +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CXfdGkKV.js +0 -33
- package/dist/Badge.vue_vue_type_script_setup_true_lang-sx-dXgFD.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-B-uDLmB_.js +0 -1
- package/dist/BaseButton.vue_vue_type_style_index_0_lang-F50Tg7IQ.js +0 -151
- package/dist/Button.vue_vue_type_script_setup_true_lang-Crhe5sHQ.js +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-XrPBGQq8.js +0 -36
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-DmShg2d-.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-BRJhkPIY.js +0 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_lang-OQRmH46S.js +0 -194
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-Bu9Ndwxm.js +0 -1
- package/dist/FloatButton.vue_vue_type_script_setup_true_lang-CCfZsUxy.js +0 -34
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BhMxC00o.js +0 -1
- package/dist/Icon.vue_vue_type_style_index_0_lang-CB4CYuWH.js +0 -47
- package/dist/Icon.vue_vue_type_style_index_0_lang-CV1YvIs-.js +0 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-BTG_oQuF.js +0 -34
- package/dist/IconButton.vue_vue_type_script_setup_true_lang-C93zhnQU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Z02asVPa.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-qIUYIdkm.js +0 -33
- package/dist/Logotype-Dark.svg +0 -3
- package/dist/Logotype-Light.svg +0 -3
- package/dist/Popover.vue_vue_type_style_index_0_lang-VH8LnLG9.js +0 -1
- package/dist/Skeleton.vue_vue_type_style_index_0_lang-B6-i0F1w.js +0 -1
- package/dist/Spinner.vue_vue_type_style_index_0_lang-B5byV1za.js +0 -75
- package/dist/Spinner.vue_vue_type_style_index_0_lang-Baaz0Dxb.js +0 -1
- package/dist/logo.svg +0 -4
- package/dist/omit-B0hUroNu.js +0 -1
- package/dist/omit-DU39EwuA.js +0 -851
- package/dist/options-B8SF1auT.js +0 -1
- package/dist/options-B8rT2fg0.js +0 -30
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Class } from '../types';
|
|
2
|
+
import { ImageAspectRatio, ImageType, ImageSizeRange } from './Image.model';
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
src?: string;
|
|
5
|
+
fallback?: string;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
hovered?: boolean;
|
|
8
|
+
alt?: string;
|
|
9
|
+
class?: Class;
|
|
10
|
+
imageCls?: Class;
|
|
11
|
+
hoverCls?: Class;
|
|
12
|
+
sizeRange?: ImageSizeRange;
|
|
13
|
+
aspectRatio?: ImageAspectRatio;
|
|
14
|
+
type?: ImageType;
|
|
15
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | string;
|
|
16
|
+
objectPosition?: 'center' | 'right' | 'left' | 'top' | 'bottom' | string;
|
|
17
|
+
fallbackDescription?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: {
|
|
22
|
+
fallback?(_: {}): any;
|
|
23
|
+
actions?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<ImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
error: () => any;
|
|
31
|
+
load: () => any;
|
|
32
|
+
}, string, import('vue').PublicProps, Readonly<ImageProps> & Readonly<{
|
|
33
|
+
onError?: (() => any) | undefined;
|
|
34
|
+
onLoad?: (() => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
type: ImageType;
|
|
37
|
+
src: string;
|
|
38
|
+
objectFit: "contain" | "cover" | "fill" | "none" | "scale-down" | string;
|
|
39
|
+
objectPosition: "center" | "right" | "left" | "top" | "bottom" | string;
|
|
40
|
+
fallbackDescription: string;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ImageSizeRanges: readonly ["xsm", "sm", "md", "lg"];
|
|
2
|
+
export type ImageSizeRange = (typeof ImageSizeRanges)[number];
|
|
3
|
+
export declare const ImageAspectRatios: readonly ["1:1", "4:3", "3:2", "16:9", "2:1"];
|
|
4
|
+
export type ImageAspectRatio = (typeof ImageAspectRatios)[number];
|
|
5
|
+
export declare const ImageTypes: readonly ["vertical", "horizontal"];
|
|
6
|
+
export type ImageType = (typeof ImageTypes)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../class-CjZYGZDW.js"),S=require("class-variance-authority"),w=require("lodash-es"),L=require("../Spinner.vue_vue_type_style_index_0_lang-DW5QRtWO.js"),V=require("../Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js"),p=["xsm","sm","md","lg"],k=["1:1","4:3","3:2","16:9","2:1"],i=["vertical","horizontal"],I=["alt","src"],h=e.defineComponent({__name:"Image",props:{src:{default:""},fallback:{},width:{},hovered:{type:Boolean},alt:{},class:{},imageCls:{},hoverCls:{},sizeRange:{},aspectRatio:{},type:{default:"horizontal"},objectFit:{default:"cover"},objectPosition:{default:"center"},fallbackDescription:{default:"This image couldn't be loaded."}},emits:["load","error"],setup(b,{emit:_}){const a=b,u=_,l=s.getBemBlock("image"),y=S.cva(l,{variants:{type:s.generateVariantClassList(i,l),aspectRatio:s.generateVariantClassList(k,l),sizeRange:s.generateVariantClassList(p,l),hovered:s.generateVariantClassList("hovered",l),loaded:s.generateVariantClassList("loaded",l),"fallback-content":s.generateVariantClassList("fallback-content",l)}}),m=e.useSlots(),n=e.ref(!1),r=e.ref(!1),o=e.ref(!1),d=e.toRef(()=>a.src);e.watch(d,()=>{r.value=!1,o.value=!1,n.value=!1});const c=e.toRef(()=>a.fallback);e.watch(c,()=>{o.value&&(o.value=!1,n.value=!1)});const f=e.computed(()=>r.value&&!m.fallback&&c.value?"fallback":"src"),z=e.computed(()=>f.value==="src"?d.value:c.value),C=()=>{n.value=!0,u("load")},B=()=>{f.value==="fallback"?(o.value=!0,n.value=!0):(r.value=!0,n.value=!0),u("error")},E=e.computed(()=>{const t=typeof a.width;if(["string","number"].includes(t))return t==="number"?`${a.width}px`:a.width}),R=e.computed(()=>{const t=String(a.width).replace("px",""),v=/^\d+(?:\.\d+)?$/,g=a.width&&v.test(t)?Number(t):a.width;return a.sizeRange==="xsm"||w.isNumber(g)&&g<100?"3xsm":"sm"});return(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(y)({sizeRange:a.sizeRange,type:!a.type||!e.unref(i).includes(a.type)?"vertical":a.type,aspectRatio:a.aspectRatio,hovered:a.hovered,loaded:n.value,"fallback-content":r.value&&(!c.value||o.value)}),a.class]),style:e.normalizeStyle({width:E.value})},[r.value&&(!c.value||o.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(l),"fallback"))},[e.renderSlot(t.$slots,"fallback",{},()=>[e.createVNode(V._sfc_main,{size:"sm",icon:"tabler:photo-exclamation",class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(l),"fallback__icon"))},null,8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(l),"fallback__text"))},e.toDisplayString(t.fallbackDescription),3)])],2)):(e.openBlock(),e.createElementBlock("img",{key:1,alt:t.alt,style:e.normalizeStyle({filter:n.value?"none":"blur(30px)",objectFit:t.objectFit,objectPosition:t.objectPosition}),src:z.value,class:e.normalizeClass([e.unref(s.getBemElement)(e.unref(l),"img"),t.imageCls]),onLoad:C,onError:B},null,46,I)),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L._sfc_main,{key:2,class:e.normalizeClass(e.unref(s.getBemElement)(e.unref(l),"loading")),size:R.value},null,8,["class","size"])),n.value&&!r.value&&(t.hovered||e.unref(m).actions)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass([e.unref(s.getBemElement)(e.unref(l),"hover_actions"),"pantograph-tokens dark",a.hoverCls])},[e.renderSlot(t.$slots,"actions")],2)):e.createCommentVNode("",!0)],6))}});exports.Image=h;exports.ImageAspectRatios=k;exports.ImageSizeRanges=p;exports.ImageTypes=i;exports.default=h;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as F, useSlots as V, ref as v, toRef as z, watch as w, computed as m, openBlock as d, createElementBlock as f, normalizeClass as o, unref as a, normalizeStyle as R, renderSlot as _, createVNode as D, createElementVNode as P, toDisplayString as T, createBlock as A, createCommentVNode as C } from "vue";
|
|
2
|
+
import { g as c, a as i, b as W } from "../class-DyU-Ox8D.js";
|
|
3
|
+
import { cva as q } from "class-variance-authority";
|
|
4
|
+
import { isNumber as G } from "lodash-es";
|
|
5
|
+
import { _ as H } from "../Spinner.vue_vue_type_style_index_0_lang-BOXr-RUw.js";
|
|
6
|
+
import { _ as J } from "../Icon.vue_vue_type_style_index_0_lang-W7sippxn.js";
|
|
7
|
+
const K = ["xsm", "sm", "md", "lg"], M = ["1:1", "4:3", "3:2", "16:9", "2:1"], S = ["vertical", "horizontal"], O = ["alt", "src"], ae = /* @__PURE__ */ F({
|
|
8
|
+
__name: "Image",
|
|
9
|
+
props: {
|
|
10
|
+
src: { default: "" },
|
|
11
|
+
fallback: {},
|
|
12
|
+
width: {},
|
|
13
|
+
hovered: { type: Boolean },
|
|
14
|
+
alt: {},
|
|
15
|
+
class: {},
|
|
16
|
+
imageCls: {},
|
|
17
|
+
hoverCls: {},
|
|
18
|
+
sizeRange: {},
|
|
19
|
+
aspectRatio: {},
|
|
20
|
+
type: { default: "horizontal" },
|
|
21
|
+
objectFit: { default: "cover" },
|
|
22
|
+
objectPosition: { default: "center" },
|
|
23
|
+
fallbackDescription: { default: "This image couldn't be loaded." }
|
|
24
|
+
},
|
|
25
|
+
emits: ["load", "error"],
|
|
26
|
+
setup(B, { emit: E }) {
|
|
27
|
+
const e = B, p = E, l = W("image"), j = q(l, {
|
|
28
|
+
variants: {
|
|
29
|
+
type: c(S, l),
|
|
30
|
+
aspectRatio: c(M, l),
|
|
31
|
+
sizeRange: c(K, l),
|
|
32
|
+
hovered: c("hovered", l),
|
|
33
|
+
loaded: c("loaded", l),
|
|
34
|
+
"fallback-content": c("fallback-content", l)
|
|
35
|
+
}
|
|
36
|
+
}), g = V(), s = v(!1), r = v(!1), n = v(!1), b = z(() => e.src);
|
|
37
|
+
w(b, () => {
|
|
38
|
+
r.value = !1, n.value = !1, s.value = !1;
|
|
39
|
+
});
|
|
40
|
+
const u = z(() => e.fallback);
|
|
41
|
+
w(u, () => {
|
|
42
|
+
n.value && (n.value = !1, s.value = !1);
|
|
43
|
+
});
|
|
44
|
+
const h = m(() => r.value && !g.fallback && u.value ? "fallback" : "src"), L = m(() => h.value === "src" ? b.value : u.value), $ = () => {
|
|
45
|
+
s.value = !0, p("load");
|
|
46
|
+
}, I = () => {
|
|
47
|
+
h.value === "fallback" ? (n.value = !0, s.value = !0) : (r.value = !0, s.value = !0), p("error");
|
|
48
|
+
}, N = m(() => {
|
|
49
|
+
const t = typeof e.width;
|
|
50
|
+
if (["string", "number"].includes(t))
|
|
51
|
+
return t === "number" ? `${e.width}px` : e.width;
|
|
52
|
+
}), x = m(() => {
|
|
53
|
+
const t = String(e.width).replace("px", ""), k = /^\d+(?:\.\d+)?$/, y = e.width && k.test(t) ? Number(t) : e.width;
|
|
54
|
+
return e.sizeRange === "xsm" || G(y) && y < 100 ? "3xsm" : "sm";
|
|
55
|
+
});
|
|
56
|
+
return (t, k) => (d(), f("div", {
|
|
57
|
+
class: o([
|
|
58
|
+
a(j)({
|
|
59
|
+
sizeRange: e.sizeRange,
|
|
60
|
+
type: !e.type || !a(S).includes(e.type) ? "vertical" : e.type,
|
|
61
|
+
aspectRatio: e.aspectRatio,
|
|
62
|
+
hovered: e.hovered,
|
|
63
|
+
loaded: s.value,
|
|
64
|
+
"fallback-content": r.value && (!u.value || n.value)
|
|
65
|
+
}),
|
|
66
|
+
e.class
|
|
67
|
+
]),
|
|
68
|
+
style: R({ width: N.value })
|
|
69
|
+
}, [
|
|
70
|
+
r.value && (!u.value || n.value) ? (d(), f("div", {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: o(a(i)(a(l), "fallback"))
|
|
73
|
+
}, [
|
|
74
|
+
_(t.$slots, "fallback", {}, () => [
|
|
75
|
+
D(J, {
|
|
76
|
+
size: "sm",
|
|
77
|
+
icon: "tabler:photo-exclamation",
|
|
78
|
+
class: o(a(i)(a(l), "fallback__icon"))
|
|
79
|
+
}, null, 8, ["class"]),
|
|
80
|
+
P("div", {
|
|
81
|
+
class: o(a(i)(a(l), "fallback__text"))
|
|
82
|
+
}, T(t.fallbackDescription), 3)
|
|
83
|
+
])
|
|
84
|
+
], 2)) : (d(), f("img", {
|
|
85
|
+
key: 1,
|
|
86
|
+
alt: t.alt,
|
|
87
|
+
style: R({
|
|
88
|
+
filter: s.value ? "none" : "blur(30px)",
|
|
89
|
+
objectFit: t.objectFit,
|
|
90
|
+
objectPosition: t.objectPosition
|
|
91
|
+
}),
|
|
92
|
+
src: L.value,
|
|
93
|
+
class: o([a(i)(a(l), "img"), t.imageCls]),
|
|
94
|
+
onLoad: $,
|
|
95
|
+
onError: I
|
|
96
|
+
}, null, 46, O)),
|
|
97
|
+
s.value ? C("", !0) : (d(), A(H, {
|
|
98
|
+
key: 2,
|
|
99
|
+
class: o(a(i)(a(l), "loading")),
|
|
100
|
+
size: x.value
|
|
101
|
+
}, null, 8, ["class", "size"])),
|
|
102
|
+
s.value && !r.value && (t.hovered || a(g).actions) ? (d(), f("div", {
|
|
103
|
+
key: 3,
|
|
104
|
+
class: o([a(i)(a(l), "hover_actions"), "pantograph-tokens dark", e.hoverCls])
|
|
105
|
+
}, [
|
|
106
|
+
_(t.$slots, "actions")
|
|
107
|
+
], 2)) : C("", !0)
|
|
108
|
+
], 6));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
ae as Image,
|
|
113
|
+
M as ImageAspectRatios,
|
|
114
|
+
K as ImageSizeRanges,
|
|
115
|
+
S as ImageTypes,
|
|
116
|
+
ae as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'radix-vue';
|
|
2
|
+
import { Class } from '../types';
|
|
3
|
+
import { IndentLevelShowLine, IndentLevelSize } from './IndentLevel.model.js';
|
|
4
|
+
export interface IndentLevelProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
5
|
+
size?: IndentLevelSize;
|
|
6
|
+
showLine?: IndentLevelShowLine | number;
|
|
7
|
+
children?: boolean;
|
|
8
|
+
level?: number | string;
|
|
9
|
+
expanded?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
class?: Class;
|
|
12
|
+
branchIcon?: string;
|
|
13
|
+
noRotateBranch?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {};
|
|
21
|
+
rootEl: any;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
declare const __VLS_component: import('vue').DefineComponent<IndentLevelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IndentLevelProps> & Readonly<{}>, {
|
|
25
|
+
size: IndentLevelSize;
|
|
26
|
+
level: number | string;
|
|
27
|
+
branchIcon: string;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const IndentLevelSizes: readonly ["2xsm", "xsm", "sm"];
|
|
2
|
+
export type IndentLevelSize = (typeof IndentLevelSizes)[number];
|
|
3
|
+
export declare const IndentLevelShowLines: readonly ["last", "all", "before", "self"];
|
|
4
|
+
export type IndentLevelShowLine = (typeof IndentLevelShowLines)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../IndentLevel.vue_vue_type_style_index_0_lang-B_x8tshB.js");exports.IndentLevel=e._sfc_main;exports.IndentLevelShowLines=e.IndentLevelShowLines;exports.IndentLevelSizes=e.IndentLevelSizes;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./class-CjZYGZDW.js"),u=require("radix-vue"),k=require("class-variance-authority"),g=require("./options-B4iSAKol.js"),d=require("./Divider.vue_vue_type_style_index_0_lang-C6Suy0tD.js"),L=require("./Spinner.vue_vue_type_style_index_0_lang-DW5QRtWO.js"),_=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-BKYCNg9l.js"),m=["2xsm","xsm","sm"],y=["last","all","before","self"],C={key:0},b=e.defineComponent({...g.getComponentOptions("IndentLevel"),__name:"IndentLevel",props:{size:{default:"xsm"},showLine:{},children:{type:Boolean},level:{default:1},expanded:{type:Boolean},loading:{type:Boolean},class:{},branchIcon:{default:"tabler:chevron-right"},noRotateBranch:{type:Boolean},as:{}},setup(p){const a=p,s=t.getBemBlock("indent_level"),i=t.getBemElement(s,"item"),f=t.getBemElement(i,"branch"),v=k.cva(s,{variants:{size:t.generateVariantClassList(m,s),expanded:t.generateVariantClassList("expanded",s),branchSlot:t.generateVariantClassList("branch-slot",s),selfDivider:t.generateVariantClassList("self-divider",s),noRotateBranch:t.generateVariantClassList("no-rotate-branch",s),loading:t.generateVariantClassList("loading",s)}}),r=e.computed(()=>{const n=Number(a.level);return n<1?1:n%10===0?n:Math.floor(n)}),l=e.computed(()=>{if(a.showLine)return typeof a.showLine=="string"?["all","self"].includes(a.showLine):a.showLine<=Number(a.level)}),h=n=>typeof a.showLine=="number"?a.showLine<=Number(n):!1;return(n,c)=>(e.openBlock(),e.createBlock(e.unref(u.Primitive),{as:n.as,class:e.normalizeClass([e.unref(v)({size:n.size,expanded:n.expanded,noRotateBranch:n.noRotateBranch,branchSlot:n.$slots.default,selfDivider:l.value,loading:n.loading}),a.class])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,o=>(e.openBlock(),e.createBlock(e.unref(u.Primitive),{as:n.as,class:e.normalizeClass([e.unref(i),{[e.unref(t.getBemModifier)(e.unref(s),"expand")]:o===r.value}]),key:o},{default:e.withCtx(()=>[o===r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.children?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.loading?(e.openBlock(),e.createBlock(L._sfc_main,{key:1,size:n.size},null,8,["size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.expanded&&l.value?(e.openBlock(),e.createElementBlock("div",C)):e.createCommentVNode("",!0),e.createVNode(_._sfc_main,{size:n.size,icon:n.branchIcon,color:"none",class:e.normalizeClass(e.unref(f)),onClick:c[0]||(c[0]=B=>n.$emit("toggleExpand",B))},{icon:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["size","icon","class"]),n.expanded&&l.value?(e.openBlock(),e.createBlock(d._sfc_main,{key:1,type:"vertical"})):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)],64)):["all","before"].includes(n.showLine)||n.showLine==="last"&&o===r.value-1||h(o)?(e.openBlock(),e.createBlock(d._sfc_main,{key:1,type:"vertical"})):e.createCommentVNode("",!0)]),_:2},1032,["as","class"]))),128))]),_:3},8,["as","class"]))}});exports.IndentLevelShowLines=y;exports.IndentLevelSizes=m;exports._sfc_main=b;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as C, computed as g, openBlock as n, createBlock as l, unref as o, normalizeClass as u, withCtx as p, createElementBlock as i, Fragment as m, renderList as S, createCommentVNode as c, createVNode as $, renderSlot as N } from "vue";
|
|
2
|
+
import { g as t, c as R, b as D, a as L } from "./class-DyU-Ox8D.js";
|
|
3
|
+
import { Primitive as b } from "radix-vue";
|
|
4
|
+
import { cva as E } from "class-variance-authority";
|
|
5
|
+
import { g as V } from "./options-JBqnVZUl.js";
|
|
6
|
+
import { _ as y } from "./Divider.vue_vue_type_style_index_0_lang-SBMg48di.js";
|
|
7
|
+
import { _ } from "./Spinner.vue_vue_type_style_index_0_lang-BOXr-RUw.js";
|
|
8
|
+
import { _ as M } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-DqfDSUXz.js";
|
|
9
|
+
const F = ["2xsm", "xsm", "sm"], Q = ["last", "all", "before", "self"], O = { key: 0 }, T = /* @__PURE__ */ C({
|
|
10
|
+
...V("IndentLevel"),
|
|
11
|
+
__name: "IndentLevel",
|
|
12
|
+
props: {
|
|
13
|
+
size: { default: "xsm" },
|
|
14
|
+
showLine: {},
|
|
15
|
+
children: { type: Boolean },
|
|
16
|
+
level: { default: 1 },
|
|
17
|
+
expanded: { type: Boolean },
|
|
18
|
+
loading: { type: Boolean },
|
|
19
|
+
class: {},
|
|
20
|
+
branchIcon: { default: "tabler:chevron-right" },
|
|
21
|
+
noRotateBranch: { type: Boolean },
|
|
22
|
+
as: {}
|
|
23
|
+
},
|
|
24
|
+
setup(B) {
|
|
25
|
+
const s = B, a = D("indent_level"), h = L(a, "item"), k = L(h, "branch"), w = E(a, {
|
|
26
|
+
variants: {
|
|
27
|
+
size: t(F, a),
|
|
28
|
+
expanded: t("expanded", a),
|
|
29
|
+
branchSlot: t("branch-slot", a),
|
|
30
|
+
selfDivider: t("self-divider", a),
|
|
31
|
+
noRotateBranch: t("no-rotate-branch", a),
|
|
32
|
+
loading: t("loading", a)
|
|
33
|
+
}
|
|
34
|
+
}), d = g(() => {
|
|
35
|
+
const e = Number(s.level);
|
|
36
|
+
return e < 1 ? 1 : e % 10 === 0 ? e : Math.floor(e);
|
|
37
|
+
}), f = g(() => {
|
|
38
|
+
if (s.showLine)
|
|
39
|
+
return typeof s.showLine == "string" ? ["all", "self"].includes(s.showLine) : s.showLine <= Number(s.level);
|
|
40
|
+
}), z = (e) => typeof s.showLine == "number" ? s.showLine <= Number(e) : !1;
|
|
41
|
+
return (e, v) => (n(), l(o(b), {
|
|
42
|
+
as: e.as,
|
|
43
|
+
class: u([
|
|
44
|
+
o(w)({
|
|
45
|
+
size: e.size,
|
|
46
|
+
expanded: e.expanded,
|
|
47
|
+
noRotateBranch: e.noRotateBranch,
|
|
48
|
+
branchSlot: e.$slots.default,
|
|
49
|
+
selfDivider: f.value,
|
|
50
|
+
loading: e.loading
|
|
51
|
+
}),
|
|
52
|
+
s.class
|
|
53
|
+
])
|
|
54
|
+
}, {
|
|
55
|
+
default: p(() => [
|
|
56
|
+
(n(!0), i(m, null, S(d.value, (r) => (n(), l(o(b), {
|
|
57
|
+
as: e.as,
|
|
58
|
+
class: u([o(h), { [o(R)(o(a), "expand")]: r === d.value }]),
|
|
59
|
+
key: r
|
|
60
|
+
}, {
|
|
61
|
+
default: p(() => [
|
|
62
|
+
r === d.value ? (n(), i(m, { key: 0 }, [
|
|
63
|
+
e.children ? (n(), i(m, { key: 0 }, [
|
|
64
|
+
e.loading ? (n(), l(_, {
|
|
65
|
+
key: 1,
|
|
66
|
+
size: e.size
|
|
67
|
+
}, null, 8, ["size"])) : (n(), i(m, { key: 0 }, [
|
|
68
|
+
e.expanded && f.value ? (n(), i("div", O)) : c("", !0),
|
|
69
|
+
$(M, {
|
|
70
|
+
size: e.size,
|
|
71
|
+
icon: e.branchIcon,
|
|
72
|
+
color: "none",
|
|
73
|
+
class: u(o(k)),
|
|
74
|
+
onClick: v[0] || (v[0] = (I) => e.$emit("toggleExpand", I))
|
|
75
|
+
}, {
|
|
76
|
+
icon: p(() => [
|
|
77
|
+
N(e.$slots, "default")
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, ["size", "icon", "class"]),
|
|
81
|
+
e.expanded && f.value ? (n(), l(y, {
|
|
82
|
+
key: 1,
|
|
83
|
+
type: "vertical"
|
|
84
|
+
})) : c("", !0)
|
|
85
|
+
], 64))
|
|
86
|
+
], 64)) : c("", !0)
|
|
87
|
+
], 64)) : ["all", "before"].includes(e.showLine) || e.showLine === "last" && r === d.value - 1 || z(r) ? (n(), l(y, {
|
|
88
|
+
key: 1,
|
|
89
|
+
type: "vertical"
|
|
90
|
+
})) : c("", !0)
|
|
91
|
+
]),
|
|
92
|
+
_: 2
|
|
93
|
+
}, 1032, ["as", "class"]))), 128))
|
|
94
|
+
]),
|
|
95
|
+
_: 3
|
|
96
|
+
}, 8, ["as", "class"]));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export {
|
|
100
|
+
F as I,
|
|
101
|
+
T as _,
|
|
102
|
+
Q as a
|
|
103
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseBadgeProps } from '../Base/BaseBadge/BaseBadge';
|
|
2
|
-
export type IndicatorProps = Pick<BaseBadgeProps, 'as' | 'class'
|
|
2
|
+
export type IndicatorProps = Partial<Pick<BaseBadgeProps, 'as' | 'class'>> & {
|
|
3
3
|
size?: 'tiny' | 'tinier';
|
|
4
4
|
color?: Exclude<BaseBadgeProps['color'], 'none'>;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Indicator.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Indicator.vue_vue_type_script_setup_true_lang-D2iFmRna.js");exports.Indicator=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),a=require("./omit-C_ZXwm9T.js"),p=require("./BaseBadge.vue_vue_type_style_index_0_lang-B1Va5X21.js"),u=require("./options-B4iSAKol.js"),_=e.defineComponent({...u.getComponentOptions("Indicator",!1),__name:"Indicator",props:{as:{},class:{},size:{},color:{}},setup(s){const n=s,r=e.useAttrs(),i=e.computed(()=>({...a.omit(r,"type","text","icon","mode"),...n}));return(t,m)=>(e.openBlock(),e.createBlock(p._sfc_main,e.mergeProps(i.value,{type:"minify",mode:"bold"}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),o=>({name:o,fn:e.withCtx(c=>[e.renderSlot(t.$slots,o,e.normalizeProps(e.guardReactiveProps(c)))])}))]),1040))}});exports._sfc_main=_;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as i, useAttrs as m, computed as p, openBlock as c, createBlock as d, mergeProps as l, createSlots as f, renderList as _, withCtx as u, renderSlot as g, normalizeProps as y, guardReactiveProps as b } from "vue";
|
|
2
|
+
import { o as k } from "./omit-DtumnYm5.js";
|
|
3
|
+
import { _ as C } from "./BaseBadge.vue_vue_type_style_index_0_lang-CHhhflIH.js";
|
|
4
|
+
import { g as P } from "./options-JBqnVZUl.js";
|
|
5
|
+
const B = /* @__PURE__ */ i({
|
|
6
|
+
...P("Indicator", !1),
|
|
7
|
+
__name: "Indicator",
|
|
8
|
+
props: {
|
|
9
|
+
as: {},
|
|
10
|
+
class: {},
|
|
11
|
+
size: {},
|
|
12
|
+
color: {}
|
|
13
|
+
},
|
|
14
|
+
setup(t) {
|
|
15
|
+
const r = t, s = m(), n = p(() => ({
|
|
16
|
+
...k(s, "type", "text", "icon", "mode"),
|
|
17
|
+
...r
|
|
18
|
+
}));
|
|
19
|
+
return (o, $) => (c(), d(C, l(n.value, {
|
|
20
|
+
type: "minify",
|
|
21
|
+
mode: "bold"
|
|
22
|
+
}), f({ _: 2 }, [
|
|
23
|
+
_(Object.keys(o.$slots), (e) => ({
|
|
24
|
+
name: e,
|
|
25
|
+
fn: u((a) => [
|
|
26
|
+
g(o.$slots, e, y(b(a)))
|
|
27
|
+
])
|
|
28
|
+
}))
|
|
29
|
+
]), 1040));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
B as _
|
|
34
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'radix-vue';
|
|
2
|
+
import { Class } from '../types';
|
|
3
|
+
export interface KbdProps extends Omit<PrimitiveProps, 'asChild'> {
|
|
4
|
+
iconOnly?: boolean;
|
|
5
|
+
class?: Class;
|
|
6
|
+
containerCls?: Class;
|
|
7
|
+
containerAs?: PrimitiveProps['as'];
|
|
8
|
+
text?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
icon?(_: {}): any;
|
|
15
|
+
text?(_: {}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {};
|
|
18
|
+
rootEl: any;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<KbdProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<KbdProps> & Readonly<{}>, {
|
|
22
|
+
text: string;
|
|
23
|
+
as: import('radix-vue', { with: { "resolution-mode": "import" } }).AsTag | import('vue').Component;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Kbd.vue_vue_type_style_index_0_lang-Br1eygIf.js");exports.Kbd=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Kbd, type KbdProps, default } from './Kbd';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./class-CjZYGZDW.js"),r=require("class-variance-authority"),i=require("radix-vue"),l=require("./Icon.vue_vue_type_style_index_0_lang-D-jaUivh.js"),u=require("./options-B4iSAKol.js"),d=e.defineComponent({...u.getComponentOptions("Kbd"),__name:"Kbd",props:{iconOnly:{type:Boolean},class:{},containerCls:{},containerAs:{},text:{default:void 0},icon:{},as:{default:"div"}},setup(a){const s=a,o=t.getBemBlock("kbd"),c=r.cva(o,{variants:{iconOnly:t.generateVariantClassList("icon-only",o)}});return(n,y)=>(e.openBlock(),e.createBlock(e.unref(i.Primitive),{class:e.normalizeClass([e.unref(c)({iconOnly:s.iconOnly}),s.class]),key:s.as,as:n.as},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.unref(i.Primitive),{class:e.normalizeClass([e.unref(t.getBemElement)(e.unref(o),"container"),s.containerCls]),key:n.iconOnly,as:n.containerAs,"as-child":n.iconOnly},{default:e.withCtx(()=>[n.iconOnly?(e.openBlock(),e.createBlock(l._sfc_main,{key:0,icon:n.icon,size:"2xsm"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon")]),_:3},8,["icon"])):e.renderSlot(n.$slots,"text",{key:1},()=>[e.createTextVNode(e.toDisplayString(n.text),1)])]),_:3},8,["class","as","as-child"]))]),_:3},8,["class","as"]))}});exports._sfc_main=d;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as a, createBlock as t, unref as s, normalizeClass as r, withCtx as i, renderSlot as l, createTextVNode as d, toDisplayString as y } from "vue";
|
|
2
|
+
import { g as u, a as k, b as C } from "./class-DyU-Ox8D.js";
|
|
3
|
+
import { cva as O } from "class-variance-authority";
|
|
4
|
+
import { Primitive as c } from "radix-vue";
|
|
5
|
+
import { _ as g } from "./Icon.vue_vue_type_style_index_0_lang-W7sippxn.js";
|
|
6
|
+
import { g as B } from "./options-JBqnVZUl.js";
|
|
7
|
+
const K = /* @__PURE__ */ f({
|
|
8
|
+
...B("Kbd"),
|
|
9
|
+
__name: "Kbd",
|
|
10
|
+
props: {
|
|
11
|
+
iconOnly: { type: Boolean },
|
|
12
|
+
class: {},
|
|
13
|
+
containerCls: {},
|
|
14
|
+
containerAs: {},
|
|
15
|
+
text: { default: void 0 },
|
|
16
|
+
icon: {},
|
|
17
|
+
as: { default: "div" }
|
|
18
|
+
},
|
|
19
|
+
setup(m) {
|
|
20
|
+
const e = m, o = C("kbd"), p = O(o, {
|
|
21
|
+
variants: {
|
|
22
|
+
iconOnly: u("icon-only", o)
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return (n, v) => (a(), t(s(c), {
|
|
26
|
+
class: r([s(p)({ iconOnly: e.iconOnly }), e.class]),
|
|
27
|
+
key: e.as,
|
|
28
|
+
as: n.as
|
|
29
|
+
}, {
|
|
30
|
+
default: i(() => [
|
|
31
|
+
(a(), t(s(c), {
|
|
32
|
+
class: r([s(k)(s(o), "container"), e.containerCls]),
|
|
33
|
+
key: n.iconOnly,
|
|
34
|
+
as: n.containerAs,
|
|
35
|
+
"as-child": n.iconOnly
|
|
36
|
+
}, {
|
|
37
|
+
default: i(() => [
|
|
38
|
+
n.iconOnly ? (a(), t(g, {
|
|
39
|
+
key: 0,
|
|
40
|
+
icon: n.icon,
|
|
41
|
+
size: "2xsm"
|
|
42
|
+
}, {
|
|
43
|
+
default: i(() => [
|
|
44
|
+
l(n.$slots, "icon")
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 8, ["icon"])) : l(n.$slots, "text", { key: 1 }, () => [
|
|
48
|
+
d(y(n.text), 1)
|
|
49
|
+
])
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 8, ["class", "as", "as-child"]))
|
|
53
|
+
]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, ["class", "as"]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
K as _
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|