readytech-ui-library-v2 0.0.8 → 0.0.9
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.
@@ -1 +1 @@
|
|
1
|
-
.lv-button[data-v-ac3af47a]{border:one;background:red;padding:1rem}.class-input[data-v-f440ad26]{border:none;background:green;padding:1rem}.btn-primary[data-v-ad55ccd4]{background-color:#1976d2;color:#fff}.btn-primary[data-v-ad55ccd4]:hover{background-color:#1565c0}.btn-icon[data-v-ad55ccd4]{padding:0;width:48px;height:48px}.btn-disabled[data-v-ad55ccd4]{opacity:.6;pointer-events:none}
|
1
|
+
.lv-button[data-v-ac3af47a]{border:one;background:red;padding:1rem}.class-input[data-v-f440ad26]{border:none;background:green;padding:1rem}.btn-primary[data-v-ad55ccd4]{background-color:#1976d2;color:#fff}.btn-primary[data-v-ad55ccd4]:hover{background-color:#1565c0}.btn-icon[data-v-ad55ccd4]{padding:0;width:48px;height:48px}.btn-disabled[data-v-ad55ccd4]{opacity:.6;pointer-events:none}.v-badge[aria-label][data-v-9511f409]:focus{outline:2px solid #005fcc;outline-offset:4px}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import { createElementBlock as
|
2
|
-
const
|
1
|
+
import { createElementBlock as b, openBlock as r, renderSlot as u, toDisplayString as m, resolveComponent as s, createBlock as f, mergeProps as g, normalizeClass as y, withCtx as _, createTextVNode as v, computed as c } from "vue";
|
2
|
+
const i = (t, a) => {
|
3
3
|
const e = t.__vccOpts || t;
|
4
4
|
for (const [l, o] of a)
|
5
5
|
e[l] = o;
|
6
6
|
return e;
|
7
|
-
}, B = {},
|
8
|
-
function
|
9
|
-
return r(),
|
10
|
-
|
7
|
+
}, B = {}, h = { class: "lv-button" };
|
8
|
+
function x(t, a) {
|
9
|
+
return r(), b("button", h, [
|
10
|
+
u(t.$slots, "default", {}, void 0, !0)
|
11
11
|
]);
|
12
12
|
}
|
13
|
-
const
|
13
|
+
const S = /* @__PURE__ */ i(B, [["render", x], ["__scopeId", "data-v-ac3af47a"]]), k = {
|
14
14
|
name: "InputTaras",
|
15
15
|
props: {
|
16
16
|
prop: {
|
@@ -19,9 +19,9 @@ const v = /* @__PURE__ */ d(B, [["render", k], ["__scopeId", "data-v-ac3af47a"]]
|
|
19
19
|
}
|
20
20
|
}, C = { class: "class-input" };
|
21
21
|
function V(t, a, e, l, o, n) {
|
22
|
-
return r(),
|
22
|
+
return r(), b("h1", C, m(e.prop) + " taras", 1);
|
23
23
|
}
|
24
|
-
const I = /* @__PURE__ */
|
24
|
+
const I = /* @__PURE__ */ i(k, [["render", V], ["__scopeId", "data-v-f440ad26"]]), z = {
|
25
25
|
name: "RtText",
|
26
26
|
props: {
|
27
27
|
label: {
|
@@ -88,10 +88,10 @@ const I = /* @__PURE__ */ d(S, [["render", V], ["__scopeId", "data-v-f440ad26"]]
|
|
88
88
|
}
|
89
89
|
};
|
90
90
|
function R(t, a, e, l, o, n) {
|
91
|
-
const
|
92
|
-
return r(),
|
91
|
+
const d = s("v-text-field");
|
92
|
+
return r(), f(d, g(n.inputProps, {
|
93
93
|
modelValue: n.inputValue,
|
94
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
94
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => n.inputValue = p),
|
95
95
|
label: e.label,
|
96
96
|
placeholder: e.placeholder,
|
97
97
|
disabled: e.disabled,
|
@@ -104,7 +104,7 @@ function R(t, a, e, l, o, n) {
|
|
104
104
|
"onClick:clear": n.handleClear
|
105
105
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-messages", "prepend-icon", "hint", "autocomplete", "onClick:clear"]);
|
106
106
|
}
|
107
|
-
const
|
107
|
+
const T = /* @__PURE__ */ i(z, [["render", R], ["__scopeId", "data-v-406c1a0f"]]), L = {
|
108
108
|
name: "RtButton",
|
109
109
|
props: {
|
110
110
|
// Button text label
|
@@ -212,7 +212,7 @@ const z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-406c1a0f"]]
|
|
212
212
|
setup(t, { emit: a }) {
|
213
213
|
const e = () => {
|
214
214
|
a("click");
|
215
|
-
}, l =
|
215
|
+
}, l = c(() => t.primary ? "flat" : "outlined"), o = c(() => t.label || "Button"), n = c(() => ({
|
216
216
|
"btn-primary": t.primary,
|
217
217
|
"btn-icon": t.icon,
|
218
218
|
"btn-disabled": t.disabled
|
@@ -225,9 +225,9 @@ const z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-406c1a0f"]]
|
|
225
225
|
};
|
226
226
|
}
|
227
227
|
};
|
228
|
-
function
|
229
|
-
const
|
230
|
-
return r(),
|
228
|
+
function N(t, a, e, l, o, n) {
|
229
|
+
const d = s("v-btn");
|
230
|
+
return r(), f(d, {
|
231
231
|
type: "button",
|
232
232
|
variant: l.variant,
|
233
233
|
size: e.size,
|
@@ -253,19 +253,83 @@ function M(t, a, e, l, o, n) {
|
|
253
253
|
onClick: l.onClick,
|
254
254
|
"aria-label": l.ariaLabel
|
255
255
|
}, {
|
256
|
-
default:
|
257
|
-
|
258
|
-
|
256
|
+
default: _(() => [
|
257
|
+
u(t.$slots, "default", {}, () => [
|
258
|
+
v(m(e.label), 1)
|
259
259
|
], !0)
|
260
260
|
]),
|
261
261
|
_: 3
|
262
262
|
}, 8, ["variant", "size", "color", "icon", "disabled", "loading", "outlined", "text", "tile", "depressed", "rounded", "block", "href", "target", "elevation", "to", "replace", "exact", "append", "background-color", "class", "onClick", "aria-label"]);
|
263
263
|
}
|
264
|
-
const
|
264
|
+
const A = /* @__PURE__ */ i(L, [["render", N], ["__scopeId", "data-v-ad55ccd4"]]), M = {
|
265
|
+
name: "RtBadge",
|
266
|
+
props: {
|
267
|
+
value: {
|
268
|
+
type: [String, Number],
|
269
|
+
default: 0
|
270
|
+
},
|
271
|
+
color: {
|
272
|
+
type: String,
|
273
|
+
default: "red"
|
274
|
+
},
|
275
|
+
dot: {
|
276
|
+
type: Boolean,
|
277
|
+
default: !1
|
278
|
+
},
|
279
|
+
overlap: {
|
280
|
+
type: Boolean,
|
281
|
+
default: !1
|
282
|
+
},
|
283
|
+
content: {
|
284
|
+
type: String,
|
285
|
+
default: ""
|
286
|
+
},
|
287
|
+
size: {
|
288
|
+
type: [String, Number],
|
289
|
+
default: "20"
|
290
|
+
},
|
291
|
+
bottom: {
|
292
|
+
type: Boolean,
|
293
|
+
default: !1
|
294
|
+
},
|
295
|
+
top: {
|
296
|
+
type: Boolean,
|
297
|
+
default: !1
|
298
|
+
}
|
299
|
+
},
|
300
|
+
computed: {
|
301
|
+
getAriaLabel() {
|
302
|
+
return this.dot ? "Notification dot" : this.content ? `Badge content: ${this.content}` : this.value ? `Badge value: ${this.value}` : "Badge";
|
303
|
+
}
|
304
|
+
}
|
305
|
+
};
|
306
|
+
function P(t, a, e, l, o, n) {
|
307
|
+
const d = s("v-badge");
|
308
|
+
return r(), f(d, {
|
309
|
+
value: e.value,
|
310
|
+
color: e.color,
|
311
|
+
dot: e.dot,
|
312
|
+
overlap: e.overlap,
|
313
|
+
content: e.content,
|
314
|
+
size: e.size,
|
315
|
+
bottom: e.bottom,
|
316
|
+
top: e.top,
|
317
|
+
role: "status",
|
318
|
+
"aria-label": n.getAriaLabel,
|
319
|
+
"aria-live": e.dot ? "polite" : "off",
|
320
|
+
tabindex: "0"
|
321
|
+
}, {
|
322
|
+
default: _(() => [
|
323
|
+
u(t.$slots, "default", {}, void 0, !0)
|
324
|
+
]),
|
325
|
+
_: 3
|
326
|
+
}, 8, ["value", "color", "dot", "overlap", "content", "size", "bottom", "top", "aria-label", "aria-live"]);
|
327
|
+
}
|
328
|
+
const O = /* @__PURE__ */ i(M, [["render", P], ["__scopeId", "data-v-9511f409"]]), q = {
|
265
329
|
install: (t, a) => {
|
266
|
-
t.component("LearnVueButton",
|
330
|
+
t.component("LearnVueButton", S), t.component("InputTaras", I), t.component("RtText", T), t.component("RtButton", A), t.component("RtBadge", O);
|
267
331
|
}
|
268
332
|
};
|
269
333
|
export {
|
270
|
-
|
334
|
+
q as default
|
271
335
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(t,
|
1
|
+
(function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(t=typeof globalThis<"u"?globalThis:t||self,t["readytech-ui-library-v2"]=d(t.Vue))})(this,function(t){"use strict";const d=(a,l)=>{const e=a.__vccOpts||a;for(const[n,r]of l)e[n]=r;return e},c={},u={class:"lv-button"};function s(a,l){return t.openBlock(),t.createElementBlock("button",u,[t.renderSlot(a.$slots,"default",{},void 0,!0)])}const f=d(c,[["render",s],["__scopeId","data-v-ac3af47a"]]),p={name:"InputTaras",props:{prop:{required:!0}}},m={class:"class-input"};function b(a,l,e,n,r,o){return t.openBlock(),t.createElementBlock("h1",m,t.toDisplayString(e.prop)+" taras",1)}const _=d(p,[["render",b],["__scopeId","data-v-f440ad26"]]),y={name:"RtText",props:{label:{type:String,default:"Input Field"},hint:{type:String,default:""},placeholder:{type:String,default:""},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessages:{type:[String,Array],default:()=>[]},prependIcon:{type:String,default:""},clearable:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},computed:{inputValue:{get(){return this.modelValue},set(a){this.$emit("update:modelValue",a)}},inputProps(){return{...this.$props}}},methods:{handleClear(){this.$emit("clear")}}};function g(a,l,e,n,r,o){const i=t.resolveComponent("v-text-field");return t.openBlock(),t.createBlock(i,t.mergeProps(o.inputProps,{modelValue:o.inputValue,"onUpdate:modelValue":l[0]||(l[0]=V=>o.inputValue=V),label:e.label,placeholder:e.placeholder,disabled:e.disabled,error:e.error,"error-messages":e.errorMessages,"prepend-icon":e.prependIcon,clearable:"",hint:e.hint,autocomplete:e.autocomplete,"onClick:clear":o.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const B=d(y,[["render",g],["__scopeId","data-v-406c1a0f"]]),h={name:"RtButton",props:{label:{type:String,default:"Click Me"},primary:{type:Boolean,default:!1},size:{type:String,default:"default",validator:a=>["x-small","small","default","large","x-large"].includes(a)},color:{type:String,default:"primary"},backgroundColor:{type:String},icon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},text:{type:String,default:""},tile:{type:Boolean,default:!1},depressed:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},block:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},to:{type:[String,Object],default:null},replace:{type:Boolean,default:!1},exact:{type:Boolean,default:!1},append:{type:Boolean,default:!1},elevation:{type:[Number,String],default:2}},emits:["click"],setup(a,{emit:l}){const e=()=>{l("click")},n=t.computed(()=>a.primary?"flat":"outlined"),r=t.computed(()=>a.label||"Button"),o=t.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:e,variant:n,ariaLabel:r,buttonClasses:o}}};function k(a,l,e,n,r,o){const i=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(i,{type:"button",variant:n.variant,size:e.size,color:e.color,icon:e.icon,disabled:e.disabled,loading:e.loading,outlined:e.outlined,text:e.text,tile:e.tile,depressed:e.depressed,rounded:e.rounded,block:e.block,href:e.href,target:e.target,elevation:e.elevation,to:e.to,replace:e.replace,exact:e.exact,append:e.append,"background-color":e.backgroundColor,class:t.normalizeClass(n.buttonClasses),onClick:n.onClick,"aria-label":n.ariaLabel},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)],!0)]),_:3},8,["variant","size","color","icon","disabled","loading","outlined","text","tile","depressed","rounded","block","href","target","elevation","to","replace","exact","append","background-color","class","onClick","aria-label"])}const x=d(h,[["render",k],["__scopeId","data-v-ad55ccd4"]]),S={name:"RtBadge",props:{value:{type:[String,Number],default:0},color:{type:String,default:"red"},dot:{type:Boolean,default:!1},overlap:{type:Boolean,default:!1},content:{type:String,default:""},size:{type:[String,Number],default:"20"},bottom:{type:Boolean,default:!1},top:{type:Boolean,default:!1}},computed:{getAriaLabel(){return this.dot?"Notification dot":this.content?`Badge content: ${this.content}`:this.value?`Badge value: ${this.value}`:"Badge"}}};function C(a,l,e,n,r,o){const i=t.resolveComponent("v-badge");return t.openBlock(),t.createBlock(i,{value:e.value,color:e.color,dot:e.dot,overlap:e.overlap,content:e.content,size:e.size,bottom:e.bottom,top:e.top,role:"status","aria-label":o.getAriaLabel,"aria-live":e.dot?"polite":"off",tabindex:"0"},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["value","color","dot","overlap","content","size","bottom","top","aria-label","aria-live"])}const v=d(S,[["render",C],["__scopeId","data-v-9511f409"]]);return{install:(a,l)=>{a.component("LearnVueButton",f),a.component("InputTaras",_),a.component("RtText",B),a.component("RtButton",x),a.component("RtBadge",v)}}});
|