@vlalg-nimbus/nb-buttons 1.0.0 → 1.0.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/README.md +43 -43
- package/dist/nb-buttons.js +5 -5
- package/dist/nb-buttons.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# nb-buttons
|
|
2
|
-
> This component is only for [Vue.js 3+](https://vuejs.org/)
|
|
3
|
-
|
|
4
|
-
<br />
|
|
5
|
-
|
|
6
|
-
This lib contains button components.
|
|
7
|
-
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @vlalg-nimbus/nb-buttons
|
|
12
|
-
|
|
13
|
-
# or
|
|
14
|
-
|
|
15
|
-
yarn add @vlalg-nimbus/nb-buttons
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
// main.js
|
|
22
|
-
import { createApp } from 'vue'
|
|
23
|
-
import App from './App.vue'
|
|
24
|
-
|
|
25
|
-
import NbButtonsComponents from '@vlalg-nimbus/nb-buttons'
|
|
26
|
-
import "@vlalg-nimbus/nb-buttons/dist/style.css";
|
|
27
|
-
|
|
28
|
-
const app = createApp(App)
|
|
29
|
-
app.use(NbButtonsComponents)
|
|
30
|
-
app.mount('#app')
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Components list
|
|
34
|
-
|
|
35
|
-
The components that are part of this lib are:
|
|
36
|
-
|
|
37
|
-
- <a href="http://nimbus.tec.br/vue-components/nb-buttons/nb-button-mechanical" target="_blank">nb-button-mechanical</a>
|
|
38
|
-
|
|
39
|
-
Click on each one above to find out how to use it, properties, events, etc.
|
|
40
|
-
|
|
41
|
-
## License
|
|
42
|
-
|
|
43
|
-
[MIT](http://opensource.org/licenses/MIT)
|
|
1
|
+
# nb-buttons
|
|
2
|
+
> This component is only for [Vue.js 3+](https://vuejs.org/)
|
|
3
|
+
|
|
4
|
+
<br />
|
|
5
|
+
|
|
6
|
+
This lib contains button components.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @vlalg-nimbus/nb-buttons
|
|
12
|
+
|
|
13
|
+
# or
|
|
14
|
+
|
|
15
|
+
yarn add @vlalg-nimbus/nb-buttons
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
// main.js
|
|
22
|
+
import { createApp } from 'vue'
|
|
23
|
+
import App from './App.vue'
|
|
24
|
+
|
|
25
|
+
import NbButtonsComponents from '@vlalg-nimbus/nb-buttons'
|
|
26
|
+
import "@vlalg-nimbus/nb-buttons/dist/style.css";
|
|
27
|
+
|
|
28
|
+
const app = createApp(App)
|
|
29
|
+
app.use(NbButtonsComponents)
|
|
30
|
+
app.mount('#app')
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Components list
|
|
34
|
+
|
|
35
|
+
The components that are part of this lib are:
|
|
36
|
+
|
|
37
|
+
- <a href="http://nimbus.tec.br/vue-components/nb-buttons/nb-button-mechanical" target="_blank">nb-button-mechanical</a>
|
|
38
|
+
|
|
39
|
+
Click on each one above to find out how to use it, properties, events, etc.
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
[MIT](http://opensource.org/licenses/MIT)
|
package/dist/nb-buttons.js
CHANGED
|
@@ -76,10 +76,10 @@ const J = (e, o) => {
|
|
|
76
76
|
setup(e, { emit: o }) {
|
|
77
77
|
const n = e;
|
|
78
78
|
T((t) => ({
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
79
|
+
"0d969adb": N.value,
|
|
80
|
+
"7f770345": j(u),
|
|
81
|
+
"9e68b528": B.value,
|
|
82
|
+
"36ce51de": k.value
|
|
83
83
|
}));
|
|
84
84
|
const {
|
|
85
85
|
display: r,
|
|
@@ -143,7 +143,7 @@ const J = (e, o) => {
|
|
|
143
143
|
], 14, K)
|
|
144
144
|
], 6)) : H("", !0);
|
|
145
145
|
}
|
|
146
|
-
}), U = /* @__PURE__ */ J(Q, [["__scopeId", "data-v-
|
|
146
|
+
}), U = /* @__PURE__ */ J(Q, [["__scopeId", "data-v-7fd9684d"]]), f = { NbButtonMechanical: U }, ee = {
|
|
147
147
|
install(e) {
|
|
148
148
|
for (const o in f)
|
|
149
149
|
if (Object.prototype.hasOwnProperty.call(f, o)) {
|
package/dist/nb-buttons.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("vue")):typeof define=="function"&&define.amd?define(["vue"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.NbButtons=r(e.Vue))})(this,function(e){"use strict";const r="",v=(t,n)=>{const a=t.__vccOpts||t;for(const[d,u]of n)a[d]=u;return a},C=["id"],s={NbButtonMechanical:v(Object.assign({name:"NbButtonMechanical",inheritAttrs:!1},{__name:"NbButtonMechanical",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const n=t?t.toLowerCase():"";return["b","ib"].includes(n)}},textColor:{type:String,default:"#ffffff"},containerColor:{type:String,default:"#ffffff"},buttonColor:{type:String,default:"#bbbbbb"},paddingX:{type:Number,default:1,validator:t=>t||1},paddingY:{type:Number,default:.2,validator:t=>t||.2},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},borderRadius:{type:Number,default:.375},animationSlow:{type:Boolean,default:!1},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||400}},emits:["clicked"],setup(t,{emit:n}){const a=t;e.useCssVars(o=>({"
|
|
1
|
+
(function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("vue")):typeof define=="function"&&define.amd?define(["vue"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.NbButtons=r(e.Vue))})(this,function(e){"use strict";const r="",v=(t,n)=>{const a=t.__vccOpts||t;for(const[d,u]of n)a[d]=u;return a},C=["id"],s={NbButtonMechanical:v(Object.assign({name:"NbButtonMechanical",inheritAttrs:!1},{__name:"NbButtonMechanical",props:{nbId:{type:String,required:!0},display:{type:String,default:"b",validator:(t="b")=>{const n=t?t.toLowerCase():"";return["b","ib"].includes(n)}},textColor:{type:String,default:"#ffffff"},containerColor:{type:String,default:"#ffffff"},buttonColor:{type:String,default:"#bbbbbb"},paddingX:{type:Number,default:1,validator:t=>t||1},paddingY:{type:Number,default:.2,validator:t=>t||.2},disabled:{type:Boolean,default:!1,validator:t=>typeof t=="boolean"&&[!0,!1].includes(t)},borderRadius:{type:Number,default:.375},animationSlow:{type:Boolean,default:!1},fontFamily:{type:String,default:"'Lato', sans-serif"},fontSize:{type:String,default:"1.6em",validator:t=>t||"1.6em"},fontWeight:{type:Number,default:400,validator:t=>t||400}},emits:["clicked"],setup(t,{emit:n}){const a=t;e.useCssVars(o=>({"0d969adb":B.value,"7f770345":e.unref(u),"9e68b528":z.value,"36ce51de":k.value}));const{display:d,buttonColor:u,textColor:b,containerColor:m,paddingX:i,paddingY:c,borderRadius:f,disabled:S,animationSlow:_,fontFamily:y,fontSize:V,fontWeight:p}=e.toRefs(a),l=e.computed(()=>{const o=S.value?"component-disabled":"",g=d.value!=="b"?"inline-block":"block",W=m.value?m.value:"#ffffff",M=u.value?u.value:"#bbbbbb",T=b.value?b.value:"#ffffff",X=!i.value||i.value<0?1:i.value,Y=!c.value||c.value<0?.2:c.value,$=!f.value||f.value<0?0:f.value,I=_.value?"":"component-transition__no-slow",O=y.value?y.value:"'Lato', sans-serif",j=V.value?V.value:"1.6em",D=!p.value||p.value<0?100:p.value;return{disabled:o,display:g,containerColor:W,buttonColor:M,textColor:T,paddingX:X,paddingY:Y,borderRadius:$,animationSlow:I,font:O,fontSize:j,fontWeight:D}}),h=e.computed(()=>l.value.disabled),x=e.computed(()=>({display:l.value.display})),N=e.computed(()=>{const o=l.value;return{border:`2px solid ${o.containerColor}`,color:o.textColor,backgroundColor:o.buttonColor,padding:`${o.paddingY}rem ${o.paddingX}rem`,borderRadius:`${o.borderRadius}rem`,fontSize:o.fontSize,fontWeight:o.fontWeight}}),w=e.computed(()=>l.value.animationSlow),B=e.computed(()=>l.value.font),k=e.computed(()=>l.value.textColor),z=e.computed(()=>l.value.buttonColor),R=()=>{n("clicked")};return(o,g)=>t.nbId?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nb-wrapper",h.value]),style:e.normalizeStyle([x.value]),onClick:R},[e.createElementVNode("div",{id:t.nbId,class:e.normalizeClass(["nb-reset","component","component-transition",w.value]),style:e.normalizeStyle([N.value])},[e.renderSlot(o.$slots,"content",{},()=>[e.createTextVNode("Default Text")],!0)],14,C)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-7fd9684d"]])};return{install(t){for(const n in s)if(Object.prototype.hasOwnProperty.call(s,n)){const a=s[n];t.component(a.name,a)}}}});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap";.nb-wrapper[data-v-
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap";.nb-wrapper[data-v-7fd9684d]{margin:0;padding:0;font-size:62.5%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:bottom}.nb-reset[data-v-7fd9684d]{font-family:Lato,sans-serif;font-style:normal;font-weight:light;line-height:1.42857143}.nb-reset *[data-v-7fd9684d]{margin:0;padding:0}.nb-reset *[data-v-7fd9684d],.nb-reset *[data-v-7fd9684d]:before,.nb-reset *[data-v-7fd9684d]:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.component[data-v-7fd9684d]{margin:0 3px 5px 0;padding:0;box-sizing:border-box;line-height:1.42857143;font-family:Lato,sans-serif;font-family:var(--0d969adb);-webkit-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:pointer;text-align:center;-webkit-text-decoration-line:none;text-decoration-line:none;white-space:nowrap;box-shadow:3px 3px 0 -1px var(--7f770345),3px 3px 0 var(--7f770345)}.component.component-transition[data-v-7fd9684d]{transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.component.component-transition.component-transition__no-slow[data-v-7fd9684d]{transition:all .05s ease-in!important}.component[data-v-7fd9684d]:hover{box-shadow:0 0 0 -1px var(--7f770345),0 0 0 var(--7f770345);transform:translate(3px,3px)}.component[data-v-7fd9684d]:active,.component[data-v-7fd9684d]:focus{outline:2px solid transparent;outline-offset:2px}.component[data-v-7fd9684d]:active{box-shadow:0 0 #0000,0 0 #0000,0 0 #0000;left:1px;top:1px}.component-disabled[data-v-7fd9684d]{cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.component-disabled .component[data-v-7fd9684d]{--disabled-button-color: var(--9e68b528);--disabled-color: var(--36ce51de);background-color:var(--disabled-button-color)!important;color:var(--disabled-color)!important;opacity:.7;border-radius:inherit}
|
package/package.json
CHANGED