init component
This commit is contained in:
44
node_modules/buetify/lib/components/icon/BIcon.d.ts
generated
vendored
Executable file
44
node_modules/buetify/lib/components/icon/BIcon.d.ts
generated
vendored
Executable file
@@ -0,0 +1,44 @@
|
||||
import './icon.sass';
|
||||
import { PropType, ExtractPropTypes } from 'vue';
|
||||
import { ColorVariant } from '../../types/ColorVariants';
|
||||
import { SizeVariant } from '../../types/SizeVariants';
|
||||
export declare const BIconPropsDefinition: {
|
||||
variant: {
|
||||
type: PropType<ColorVariant>;
|
||||
default: "";
|
||||
};
|
||||
size: {
|
||||
type: PropType<SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
tag: {
|
||||
type: StringConstructor;
|
||||
default: string;
|
||||
};
|
||||
};
|
||||
export declare type BIconProps = ExtractPropTypes<typeof BIconPropsDefinition>;
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
variant: {
|
||||
type: PropType<ColorVariant>;
|
||||
default: "";
|
||||
};
|
||||
size: {
|
||||
type: PropType<SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
tag: {
|
||||
type: StringConstructor;
|
||||
default: string;
|
||||
};
|
||||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
||||
tag: string;
|
||||
variant: ColorVariant;
|
||||
size: SizeVariant;
|
||||
} & {}>, {
|
||||
tag: string;
|
||||
variant: ColorVariant;
|
||||
size: SizeVariant;
|
||||
}>;
|
||||
export default _default;
|
||||
50
node_modules/buetify/lib/components/icon/BIcon.js
generated
vendored
Executable file
50
node_modules/buetify/lib/components/icon/BIcon.js
generated
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
import "../../../src/components/icon/icon.sass";
|
||||
import { isString } from '../../utils/helpers';
|
||||
import { h, defineComponent } from 'vue';
|
||||
|
||||
function convertVariant(variant) {
|
||||
if (isString(variant)) {
|
||||
return variant.replace('is', 'has-text');
|
||||
} else {
|
||||
// eslint-disable-next-line
|
||||
const x = {};
|
||||
|
||||
for (const k in variant) {
|
||||
const nk = k.replace('is', 'has-text');
|
||||
x[nk] = variant[k];
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
export const BIconPropsDefinition = {
|
||||
variant: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'span'
|
||||
}
|
||||
};
|
||||
export default defineComponent({
|
||||
name: 'b-icon',
|
||||
props: BIconPropsDefinition,
|
||||
|
||||
setup(props, {
|
||||
slots
|
||||
}) {
|
||||
return () => h( // eslint-disable-next-line
|
||||
props.tag, {
|
||||
class: ['icon', props.size, convertVariant(props.variant)]
|
||||
}, // eslint-disable-next-line
|
||||
slots.default && slots.default());
|
||||
}
|
||||
|
||||
});
|
||||
//# sourceMappingURL=BIcon.js.map
|
||||
1
node_modules/buetify/lib/components/icon/BIcon.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/icon/BIcon.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/icon/BIcon.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAP;AACA,SAAS,QAAT,QAAyB,qBAAzB;AACA,SAAS,CAAT,EAAY,eAAZ,QAA+D,KAA/D;;AAIA,SAAS,cAAT,CAAwB,OAAxB,EAAiE;AAC/D,MAAI,QAAQ,CAAC,OAAD,CAAZ,EAAuB;AACrB,WAAO,OAAO,CAAC,OAAR,CAAgB,IAAhB,EAAsB,UAAtB,CAAP;AACD,GAFD,MAEO;AACL;AACA,UAAM,CAAC,GAAQ,EAAf;;AACA,SAAK,MAAM,CAAX,IAAgB,OAAhB,EAAyB;AACvB,YAAM,EAAE,GAAG,CAAC,CAAC,OAAF,CAAU,IAAV,EAAgB,UAAhB,CAAX;AACA,MAAA,CAAC,CAAC,EAAD,CAAD,GAAQ,OAAO,CAAC,CAAD,CAAf;AACD;;AACD,WAAO,CAAP;AACD;AACF;;AAED,OAAO,MAAM,oBAAoB,GAAG;AAClC,EAAA,OAAO,EAAE;AACP,IAAA,IAAI,EAAE,MADC;AAEP,IAAA,OAAO,EAAE;AAFF,GADyB;AAKlC,EAAA,IAAI,EAAE;AACJ,IAAA,IAAI,EAAE,MADF;AAEJ,IAAA,OAAO,EAAE;AAFL,GAL4B;AASlC,EAAA,GAAG,EAAE;AACH,IAAA,IAAI,EAAE,MADH;AAEH,IAAA,OAAO,EAAE;AAFN;AAT6B,CAA7B;AAiBP,eAAe,eAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,QADuB;AAE7B,EAAA,KAAK,EAAE,oBAFsB;;AAG7B,EAAA,KAAK,CAAC,KAAD,EAAQ;AAAE,IAAA;AAAF,GAAR,EAAiB;AACpB,WAAO,MACL,CAAC,EACC;AACA,IAAA,KAAK,CAAC,GAFP,EAGC;AACE,MAAA,KAAK,EAAE,CAAC,MAAD,EAAS,KAAK,CAAC,IAAf,EAAqB,cAAc,CAAC,KAAK,CAAC,OAAP,CAAnC;AADT,KAHD,EAMC;AACA,IAAA,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,OAAN,EAPlB,CADH;AAUD;;AAd4B,CAAD,CAA9B","sourcesContent":["import './icon.sass';\nimport { isString } from '../../utils/helpers';\nimport { h, defineComponent, PropType, ExtractPropTypes } from 'vue';\nimport { ColorVariant, ColorVariantFlags } from '../../types/ColorVariants';\nimport { SizeVariant } from '../../types/SizeVariants';\n\nfunction convertVariant(variant: ColorVariant | ColorVariantFlags): string | ColorVariantFlags {\n if (isString(variant)) {\n return variant.replace('is', 'has-text');\n } else {\n // eslint-disable-next-line\n const x: any = {};\n for (const k in variant) {\n const nk = k.replace('is', 'has-text');\n x[nk] = variant[k as ColorVariant];\n }\n return x;\n }\n}\n\nexport const BIconPropsDefinition = {\n variant: {\n type: String as PropType<ColorVariant>,\n default: '' as const\n },\n size: {\n type: String as PropType<SizeVariant>,\n default: '' as const\n },\n tag: {\n type: String,\n default: 'span'\n }\n};\n\nexport type BIconProps = ExtractPropTypes<typeof BIconPropsDefinition>;\n\nexport default defineComponent({\n name: 'b-icon',\n props: BIconPropsDefinition,\n setup(props, { slots }) {\n return () =>\n h(\n // eslint-disable-next-line\n props.tag,\n {\n class: ['icon', props.size, convertVariant(props.variant)]\n },\n // eslint-disable-next-line\n slots.default && slots.default()\n );\n }\n});\n"],"sourceRoot":"","file":"BIcon.js"}
|
||||
3
node_modules/buetify/lib/components/icon/index.d.ts
generated
vendored
Executable file
3
node_modules/buetify/lib/components/icon/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
import BIcon from './BIcon';
|
||||
export { BIcon };
|
||||
export default BIcon;
|
||||
4
node_modules/buetify/lib/components/icon/index.js
generated
vendored
Executable file
4
node_modules/buetify/lib/components/icon/index.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
import BIcon from './BIcon';
|
||||
export { BIcon };
|
||||
export default BIcon;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/icon/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/icon/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAP,MAAkB,SAAlB;AAEA,SAAS,KAAT;AAEA,eAAe,KAAf","sourcesContent":["import BIcon from './BIcon';\n\nexport { BIcon };\n\nexport default BIcon;\n"],"sourceRoot":"","file":"index.js"}
|
||||
Reference in New Issue
Block a user