btxui 1.0.8 → 1.0.10
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/index.js +36 -25
- package/dist/index.js.gz +0 -0
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -422,14 +422,10 @@ const theme = {
|
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
424
|
const GLOBAL_STYLE_NAME = "BTXUIGlobal";
|
|
425
|
-
const _sfc_main$
|
|
426
|
-
__name: "
|
|
425
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
426
|
+
__name: "b-style",
|
|
427
427
|
props: {
|
|
428
|
-
|
|
429
|
-
class: {
|
|
430
|
-
type: String,
|
|
431
|
-
required: false
|
|
432
|
-
}
|
|
428
|
+
class: {}
|
|
433
429
|
},
|
|
434
430
|
setup(__props) {
|
|
435
431
|
const props = __props;
|
|
@@ -481,10 +477,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
481
477
|
return `${style.pro}-${dirs[r2] || r2}: ${value}${r4 || style.unit || ""}`;
|
|
482
478
|
}
|
|
483
479
|
};
|
|
484
|
-
const parseStyles = () => {
|
|
485
|
-
if (!
|
|
480
|
+
const parseStyles = (_class) => {
|
|
481
|
+
if (!_class)
|
|
486
482
|
return;
|
|
487
|
-
|
|
483
|
+
_class.split(" ").forEach((rule) => {
|
|
488
484
|
if (!styleMap.value.includes(rule)) {
|
|
489
485
|
styleMap.value.push(rule);
|
|
490
486
|
styles[rule] = parseStyle(rule);
|
|
@@ -497,16 +493,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
497
493
|
});
|
|
498
494
|
};
|
|
499
495
|
onMounted(() => {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
496
|
+
if (props.class) {
|
|
497
|
+
initStyle();
|
|
498
|
+
parseStyles(props.class);
|
|
499
|
+
setStyle();
|
|
500
|
+
}
|
|
503
501
|
});
|
|
504
502
|
return (_ctx, _cache) => {
|
|
505
503
|
return renderSlot(_ctx.$slots, "default");
|
|
506
504
|
};
|
|
507
505
|
}
|
|
508
506
|
});
|
|
509
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
507
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
510
508
|
__name: "b-view",
|
|
511
509
|
props: {
|
|
512
510
|
class: {},
|
|
@@ -514,7 +512,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
514
512
|
},
|
|
515
513
|
setup(__props) {
|
|
516
514
|
return (_ctx, _cache) => {
|
|
517
|
-
return openBlock(), createBlock(_sfc_main$
|
|
515
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
518
516
|
class: normalizeClass(_ctx.class)
|
|
519
517
|
}, {
|
|
520
518
|
default: withCtx(() => [
|
|
@@ -530,21 +528,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
530
528
|
};
|
|
531
529
|
}
|
|
532
530
|
});
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
531
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
532
|
+
__name: "b-text",
|
|
533
|
+
props: {
|
|
534
|
+
class: {}
|
|
537
535
|
},
|
|
538
|
-
{
|
|
539
|
-
|
|
540
|
-
|
|
536
|
+
setup(__props) {
|
|
537
|
+
return (_ctx, _cache) => {
|
|
538
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
539
|
+
class: normalizeClass(_ctx.class)
|
|
540
|
+
}, {
|
|
541
|
+
default: withCtx(() => [
|
|
542
|
+
createElementVNode("span", {
|
|
543
|
+
class: normalizeClass(_ctx.class)
|
|
544
|
+
}, [
|
|
545
|
+
renderSlot(_ctx.$slots, "default")
|
|
546
|
+
], 2)
|
|
547
|
+
]),
|
|
548
|
+
_: 3
|
|
549
|
+
}, 8, ["class"]);
|
|
550
|
+
};
|
|
541
551
|
}
|
|
542
|
-
|
|
552
|
+
});
|
|
553
|
+
const initGlobalComponents = [_sfc_main$2, _sfc_main$1, _sfc_main];
|
|
543
554
|
const index = {
|
|
544
555
|
name: "btxui",
|
|
545
556
|
install(app) {
|
|
546
|
-
initGlobalComponents.forEach((
|
|
547
|
-
app.component(
|
|
557
|
+
initGlobalComponents.forEach((wid) => {
|
|
558
|
+
app.component(wid.__name, wid);
|
|
548
559
|
});
|
|
549
560
|
}
|
|
550
561
|
};
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={resize:"font-size: 1rem; lineHeight: 1.5;",bold:"font-weight: bold;",show:'display: "block";',hide:'display: "none";',flex:'display: "flex"; justifyContent: "flex-start"; alignItems: "stretch";',"flex-column":'display: "flex"; flexDirection: "column";',"flex-1":'display: "flex"; justifyContent: "flex-start"; alignItems: "flex-start";',"flex-2":'display: "flex"; justifyContent: "center"; alignItems: "flex-start";',"flex-3":'display: "flex"; justifyContent: "flex-end"; alignItems: "flex-start";',"flex-4":'display: "flex"; justifyContent: "flex-start"; alignItems: "center"',"flex-5":{display:"flex",justifyContent:"center",alignItems:"center"},"flex-6":{display:"flex",justifyContent:"flex-end",alignItems:"center"},"flex-7":{display:"flex",justifyContent:"flex-start",alignItems:"flex-end"},"flex-8":{display:"flex",justifyContent:"center",alignItems:"flex-end"},"flex-9":{display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},"flex-between":{display:"flex",justifyContent:"space-between",alignItems:"center"},"flex-around":{display:"flex",justifyContent:"space-around",alignItems:"center"},grid:{display:"flex",flexWrap:"wrap",alignContent:"flex-start"},"max-h":{height:"100%"},"max-w":{width:"100%"},max:{height:"100%",width:"100%"},"max-screen":{height:"100%",width:"100%",position:"fixed",left:0,top:0},item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:{position:"fixed"},rel:{position:"relative"},abs:{position:"absolute"},"z-1":{zIndex:-1},z0:{zIndex:0},z1:{zIndex:1},z2:{zIndex:2},z3:{zIndex:3},z4:{zIndex:4},z5:{zIndex:5},z6:{zIndex:6},z7:{zIndex:7},z8:{zIndex:8},z9:{zIndex:9},z10:{zIndex:10},"no-scroll":{overflow:"hidden"},"over-show":{overflow:"visible"},"over-scroll":{overflow:"scroll"},"over-hide":{overflow:"hidden"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":{backgroundPosition:"left top"},"bg-pos-2":{backgroundPosition:"center top"},"bg-pos-3":{backgroundPosition:"right top"},"bg-pos-4":{backgroundPosition:"left center"},"bg-pos-5":{backgroundPosition:"center center"},"bg-pos-6":{backgroundPosition:"right center"},"bg-pos-7":{backgroundPosition:"left bottom"},"bg-pos-8":{backgroundPosition:"center bottom"},"bg-pos-9":{backgroundPosition:"right bottom"},round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"borderRadius: 4px;","round-t":"borderBottomRightRadius: 0; borderBottomLeftRadius: 0;","round-b":"borderTopRightRadius: 0; borderTopLeftRadius: 0;","round-l":"borderTopRightRadius: 0; borderBottomRightRadius: 0;","round-r":"borderTopLeftRadius: 0; borderBottomLeftRadius: 0;",line:"borderStyle: solid;",dashed:"borderStyle: dashed;","line-l":"borderLeftStyle: solid;","line-r":"borderRightStyle: solid;","line-t":"borderTopStyle: solid;","line-b":"borderBottomStyle: solid;","dashed-l":"borderLeftStyle: dashed;","dashed-r":"borderRightStyle: dashed;","dashed-t":"borderTopStyle: dashed;","dashed-b":"borderBottomStyle: dashed;","line-outside":"backgroundClip: padding-box;","text-line":{textShadow:"1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5)"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},shadow:{boxShadow:"0 4px 17px"},"shadow-sm":{boxShadow:"0 2px 4px"},"shadow-lg":{boxShadow:"0 14px 40px"},"shadow-relief":{boxShadow:"1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4)"},trans:{transition:"all .7s"},"trans-fast":{transition:"all .4s"},"trans-slow":{transition:"all 1.4s"},"trans-no":{transition:"none"},"blur-no":{filter:"blur(0px)"},"blur-sm":{filter:"blur(2px)"},"blur-md":{filter:"blur(7px)"},"blur-lg":{filter:"blur(17px)"},"dark-no":{filter:"brightness(100%)"},"dark-sm":{filter:"brightness(80%)"},"dark-md":{filter:"brightness(50%)"},"dark-lg":{filter:"brightness(20%)"},"gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: auto;","touch-none":"touchAction: none;",p:{pro:"text-align"},color:{pro:"color"},bg:{pro:"background"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},rule_2:{font:{pro:"fontFamily"},fsize:{pro:"fontSize",unit:"em"},lh:{pro:"lineHeight"},lspace:{pro:"letterSpacing",unit:"rem"},alpha:{pro:"opacity",extra:{visibility:"visible"},escape:{0:{visibility:"hidden"}}},line:{pro:"borderColor"},grow:{pro:"flexGrow",extra:{flexBasis:0}},order:{pro:"order"},column:{pro:"columnCount",extra:{columnGap:0}},rw:{pro:"maxWidth",unit:"rem"},lw:{pro:"minWidth",unit:"rem"},th:{pro:"maxHeight",unit:"rem"},bh:{pro:"minHeight",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},translateX:{pro:"transform",tmp:"translateX(%{}%)",unit:"%"},translateY:{pro:"transform",tmp:"translateY(%{}%)",unit:"%"},scale:{pro:"transform",tmp:"scale(%{}%)"},rotate:{pro:"transform",tmp:"rotate(%{}%)",unit:"deg"},transform:{pro:"transform"},origin:{pro:"transformOrigin"},thick:{pro:"borderWidth",unit:"px"},trans:{pro:"transition"}},rule_3:{l:{pro:["Left"],unit:"rem"},r:{pro:["Right"],unit:"rem"},t:{pro:["Top"],unit:"rem"},b:{pro:["Bottom"],unit:"rem"},v:{pro:["Top","Bottom"],unit:"rem"},h:{pro:["Left","Right"],unit:"rem"},gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"},color:{pro:["Color"]},size:{pro:["Size"]},pos:{pro:["Position"]},delay:{pro:["Delay"],unit:"s"}}},
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={resize:"font-size: 1rem; lineHeight: 1.5;",bold:"font-weight: bold;",show:'display: "block";',hide:'display: "none";',flex:'display: "flex"; justifyContent: "flex-start"; alignItems: "stretch";',"flex-column":'display: "flex"; flexDirection: "column";',"flex-1":'display: "flex"; justifyContent: "flex-start"; alignItems: "flex-start";',"flex-2":'display: "flex"; justifyContent: "center"; alignItems: "flex-start";',"flex-3":'display: "flex"; justifyContent: "flex-end"; alignItems: "flex-start";',"flex-4":'display: "flex"; justifyContent: "flex-start"; alignItems: "center"',"flex-5":{display:"flex",justifyContent:"center",alignItems:"center"},"flex-6":{display:"flex",justifyContent:"flex-end",alignItems:"center"},"flex-7":{display:"flex",justifyContent:"flex-start",alignItems:"flex-end"},"flex-8":{display:"flex",justifyContent:"center",alignItems:"flex-end"},"flex-9":{display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},"flex-between":{display:"flex",justifyContent:"space-between",alignItems:"center"},"flex-around":{display:"flex",justifyContent:"space-around",alignItems:"center"},grid:{display:"flex",flexWrap:"wrap",alignContent:"flex-start"},"max-h":{height:"100%"},"max-w":{width:"100%"},max:{height:"100%",width:"100%"},"max-screen":{height:"100%",width:"100%",position:"fixed",left:0,top:0},item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:{position:"fixed"},rel:{position:"relative"},abs:{position:"absolute"},"z-1":{zIndex:-1},z0:{zIndex:0},z1:{zIndex:1},z2:{zIndex:2},z3:{zIndex:3},z4:{zIndex:4},z5:{zIndex:5},z6:{zIndex:6},z7:{zIndex:7},z8:{zIndex:8},z9:{zIndex:9},z10:{zIndex:10},"no-scroll":{overflow:"hidden"},"over-show":{overflow:"visible"},"over-scroll":{overflow:"scroll"},"over-hide":{overflow:"hidden"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":{backgroundPosition:"left top"},"bg-pos-2":{backgroundPosition:"center top"},"bg-pos-3":{backgroundPosition:"right top"},"bg-pos-4":{backgroundPosition:"left center"},"bg-pos-5":{backgroundPosition:"center center"},"bg-pos-6":{backgroundPosition:"right center"},"bg-pos-7":{backgroundPosition:"left bottom"},"bg-pos-8":{backgroundPosition:"center bottom"},"bg-pos-9":{backgroundPosition:"right bottom"},round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"borderRadius: 4px;","round-t":"borderBottomRightRadius: 0; borderBottomLeftRadius: 0;","round-b":"borderTopRightRadius: 0; borderTopLeftRadius: 0;","round-l":"borderTopRightRadius: 0; borderBottomRightRadius: 0;","round-r":"borderTopLeftRadius: 0; borderBottomLeftRadius: 0;",line:"borderStyle: solid;",dashed:"borderStyle: dashed;","line-l":"borderLeftStyle: solid;","line-r":"borderRightStyle: solid;","line-t":"borderTopStyle: solid;","line-b":"borderBottomStyle: solid;","dashed-l":"borderLeftStyle: dashed;","dashed-r":"borderRightStyle: dashed;","dashed-t":"borderTopStyle: dashed;","dashed-b":"borderBottomStyle: dashed;","line-outside":"backgroundClip: padding-box;","text-line":{textShadow:"1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5)"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},shadow:{boxShadow:"0 4px 17px"},"shadow-sm":{boxShadow:"0 2px 4px"},"shadow-lg":{boxShadow:"0 14px 40px"},"shadow-relief":{boxShadow:"1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4)"},trans:{transition:"all .7s"},"trans-fast":{transition:"all .4s"},"trans-slow":{transition:"all 1.4s"},"trans-no":{transition:"none"},"blur-no":{filter:"blur(0px)"},"blur-sm":{filter:"blur(2px)"},"blur-md":{filter:"blur(7px)"},"blur-lg":{filter:"blur(17px)"},"dark-no":{filter:"brightness(100%)"},"dark-sm":{filter:"brightness(80%)"},"dark-md":{filter:"brightness(50%)"},"dark-lg":{filter:"brightness(20%)"},"gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: auto;","touch-none":"touchAction: none;",p:{pro:"text-align"},color:{pro:"color"},bg:{pro:"background"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},rule_2:{font:{pro:"fontFamily"},fsize:{pro:"fontSize",unit:"em"},lh:{pro:"lineHeight"},lspace:{pro:"letterSpacing",unit:"rem"},alpha:{pro:"opacity",extra:{visibility:"visible"},escape:{0:{visibility:"hidden"}}},line:{pro:"borderColor"},grow:{pro:"flexGrow",extra:{flexBasis:0}},order:{pro:"order"},column:{pro:"columnCount",extra:{columnGap:0}},rw:{pro:"maxWidth",unit:"rem"},lw:{pro:"minWidth",unit:"rem"},th:{pro:"maxHeight",unit:"rem"},bh:{pro:"minHeight",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},translateX:{pro:"transform",tmp:"translateX(%{}%)",unit:"%"},translateY:{pro:"transform",tmp:"translateY(%{}%)",unit:"%"},scale:{pro:"transform",tmp:"scale(%{}%)"},rotate:{pro:"transform",tmp:"rotate(%{}%)",unit:"deg"},transform:{pro:"transform"},origin:{pro:"transformOrigin"},thick:{pro:"borderWidth",unit:"px"},trans:{pro:"transition"}},rule_3:{l:{pro:["Left"],unit:"rem"},r:{pro:["Right"],unit:"rem"},t:{pro:["Top"],unit:"rem"},b:{pro:["Bottom"],unit:"rem"},v:{pro:["Top","Bottom"],unit:"rem"},h:{pro:["Left","Right"],unit:"rem"},gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"},color:{pro:["Color"]},size:{pro:["Size"]},pos:{pro:["Position"]},delay:{pro:["Delay"],unit:"s"}}},o={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}},r="BTXUIGlobal",n=e.defineComponent({__name:"b-style",props:{class:{}},setup(n){const i=n,l=e.ref(),s=e.computed((()=>{const e=[];for(let t of l.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),a=e.reactive({}),d=e=>isNaN(1*e)?!!o.colors[e]&&o.colors[e]:e,p=e=>{e&&e.split(" ").forEach((e=>{s.value.includes(e)||(s.value.push(e),a[e]=(e=>{let o=t[e];if(o)return o;const r=e.split("-"),n={l:"left",t:"top",r:"right",b:"bottom"};let[i,l,s,a]=r;if(o=t[i],o){let e=d(l);if(e)return`${o.pro}: ${e}${s||o.unit||""}`;if(e=d(s),e)return`${o.pro}-${n[l]||l}: ${e}${a||o.unit||""}`}})(e))}))};return e.onMounted((()=>{i.class&&((()=>{let e=document.head.querySelector(`#${r}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",r),document.head.appendChild(e)),l.value=e})(),p(i.class),Object.keys(a).forEach((e=>{l.value.sheet.addRule(`.${e}`,a[e])})))})),(t,o)=>e.renderSlot(t.$slots,"default")}}),i=[n,e.defineComponent({__name:"b-view",props:{class:{},bgImg:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(n,{class:e.normalizeClass(t.class)},{default:e.withCtx((()=>[e.createElementVNode("div",{class:e.normalizeClass(t.class),style:e.normalizeStyle({backgroundImage:`url(${t.bgImg})`})},[e.renderSlot(t.$slots,"default")],6)])),_:3},8,["class"]))}),e.defineComponent({__name:"b-text",props:{class:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(n,{class:e.normalizeClass(t.class)},{default:e.withCtx((()=>[e.createElementVNode("span",{class:e.normalizeClass(t.class)},[e.renderSlot(t.$slots,"default")],2)])),_:3},8,["class"]))})];return{name:"btxui",install(e){i.forEach((t=>{e.component(t.__name,t)}))}}}));
|