btxui 1.0.6 → 1.0.8
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.
|
@@ -425,7 +425,11 @@ const GLOBAL_STYLE_NAME = "BTXUIGlobal";
|
|
|
425
425
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
426
426
|
__name: "index",
|
|
427
427
|
props: {
|
|
428
|
-
|
|
428
|
+
// 样式集
|
|
429
|
+
class: {
|
|
430
|
+
type: String,
|
|
431
|
+
required: false
|
|
432
|
+
}
|
|
429
433
|
},
|
|
430
434
|
setup(__props) {
|
|
431
435
|
const props = __props;
|
|
@@ -477,8 +481,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
477
481
|
return `${style.pro}-${dirs[r2] || r2}: ${value}${r4 || style.unit || ""}`;
|
|
478
482
|
}
|
|
479
483
|
};
|
|
480
|
-
const parseStyles = (
|
|
481
|
-
|
|
484
|
+
const parseStyles = () => {
|
|
485
|
+
if (!props.class)
|
|
486
|
+
return;
|
|
487
|
+
props.class.split(" ").forEach((rule) => {
|
|
482
488
|
if (!styleMap.value.includes(rule)) {
|
|
483
489
|
styleMap.value.push(rule);
|
|
484
490
|
styles[rule] = parseStyle(rule);
|
|
@@ -491,11 +497,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
491
497
|
});
|
|
492
498
|
};
|
|
493
499
|
onMounted(() => {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
setStyle();
|
|
498
|
-
}
|
|
500
|
+
initStyle();
|
|
501
|
+
parseStyles();
|
|
502
|
+
setStyle();
|
|
499
503
|
});
|
|
500
504
|
return (_ctx, _cache) => {
|
|
501
505
|
return renderSlot(_ctx.$slots, "default");
|
|
@@ -503,7 +507,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
503
507
|
}
|
|
504
508
|
});
|
|
505
509
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
506
|
-
__name: "
|
|
510
|
+
__name: "b-view",
|
|
507
511
|
props: {
|
|
508
512
|
class: {},
|
|
509
513
|
bgImg: {}
|
package/dist/index.js.gz
ADDED
|
Binary file
|
|
@@ -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"}}},r={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}}},o="BTXUIGlobal",
|
|
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"}}},r={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}}},o="BTXUIGlobal",i=e.defineComponent({__name:"index",props:{class:{type:String,required:!1}},setup(i){const n=i,l=e.ref(),a=e.computed((()=>{const e=[];for(let t of l.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),s=e.reactive({}),d=e=>isNaN(1*e)?!!r.colors[e]&&r.colors[e]:e,p=()=>{n.class&&n.class.split(" ").forEach((e=>{a.value.includes(e)||(a.value.push(e),s[e]=(e=>{let r=t[e];if(r)return r;const o=e.split("-"),i={l:"left",t:"top",r:"right",b:"bottom"};let[n,l,a,s]=o;if(r=t[n],r){let e=d(l);if(e)return`${r.pro}: ${e}${a||r.unit||""}`;if(e=d(a),e)return`${r.pro}-${i[l]||l}: ${e}${s||r.unit||""}`}})(e))}))};return e.onMounted((()=>{(()=>{let e=document.head.querySelector(`#${o}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",o),document.head.appendChild(e)),l.value=e})(),p(),Object.keys(s).forEach((e=>{l.value.sheet.addRule(`.${e}`,s[e])}))})),(t,r)=>e.renderSlot(t.$slots,"default")}}),n=[{name:"styles",wid:i},{name:"b-view",wid:e.defineComponent({__name:"b-view",props:{class:{},bgImg:{}},setup:t=>(t,r)=>(e.openBlock(),e.createBlock(i,{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"]))})}];return{name:"btxui",install(e){n.forEach((t=>{e.component(t.name,t.wid)}))}}}));
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "btxui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
|
-
"
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "btxstudio",
|
|
10
11
|
"license": "ISC"
|
|
11
12
|
}
|
package/index.js.gz
DELETED
|
Binary file
|
|
File without changes
|