readytech-ui-library-v2 0.0.5 → 0.0.7
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-5dfaad67]{border:none;background:green;padding:1rem}
|
1
|
+
.lv-button[data-v-ac3af47a]{border:one;background:red;padding:1rem}.class-input[data-v-5dfaad67]{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,27 +1,27 @@
|
|
1
|
-
import { createElementBlock as
|
1
|
+
import { createElementBlock as u, openBlock as r, renderSlot as s, toDisplayString as f, resolveComponent as p, createBlock as m, mergeProps as b, normalizeClass as y, withCtx as g, createTextVNode as h, computed as i } from "vue";
|
2
2
|
const d = (t, a) => {
|
3
3
|
const e = t.__vccOpts || t;
|
4
|
-
for (const [
|
5
|
-
e[
|
4
|
+
for (const [l, o] of a)
|
5
|
+
e[l] = o;
|
6
6
|
return e;
|
7
|
-
},
|
8
|
-
function
|
9
|
-
return
|
10
|
-
|
7
|
+
}, B = {}, x = { class: "lv-button" };
|
8
|
+
function k(t, a) {
|
9
|
+
return r(), u("button", x, [
|
10
|
+
s(t.$slots, "default", {}, void 0, !0)
|
11
11
|
]);
|
12
12
|
}
|
13
|
-
const
|
13
|
+
const v = /* @__PURE__ */ d(B, [["render", k], ["__scopeId", "data-v-ac3af47a"]]), S = {
|
14
14
|
name: "InputTaras",
|
15
15
|
props: {
|
16
16
|
prop: {
|
17
17
|
required: !0
|
18
18
|
}
|
19
19
|
}
|
20
|
-
},
|
21
|
-
function
|
22
|
-
return
|
20
|
+
}, C = { class: "class-input" };
|
21
|
+
function V(t, a, e, l, o, n) {
|
22
|
+
return r(), u("h1", C, f(e.prop) + " here", 1);
|
23
23
|
}
|
24
|
-
const I = /* @__PURE__ */ d(
|
24
|
+
const I = /* @__PURE__ */ d(S, [["render", V], ["__scopeId", "data-v-5dfaad67"]]), T = {
|
25
25
|
name: "RtText",
|
26
26
|
props: {
|
27
27
|
label: {
|
@@ -87,11 +87,11 @@ const I = /* @__PURE__ */ d(V, [["render", v], ["__scopeId", "data-v-5dfaad67"]]
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
};
|
90
|
-
function
|
91
|
-
const c =
|
92
|
-
return
|
90
|
+
function R(t, a, e, l, o, n) {
|
91
|
+
const c = p("v-text-field");
|
92
|
+
return r(), m(c, b(n.inputProps, {
|
93
93
|
modelValue: n.inputValue,
|
94
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
94
|
+
"onUpdate:modelValue": a[0] || (a[0] = (_) => n.inputValue = _),
|
95
95
|
label: e.label,
|
96
96
|
placeholder: e.placeholder,
|
97
97
|
disabled: e.disabled,
|
@@ -104,11 +104,168 @@ function B(t, a, e, r, l, 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 z = /* @__PURE__ */ d(T, [["render", R], ["__scopeId", "data-v-406c1a0f"]]), L = {
|
108
|
+
name: "RtButton",
|
109
|
+
props: {
|
110
|
+
// Button text label
|
111
|
+
label: {
|
112
|
+
type: String,
|
113
|
+
default: "Click Me"
|
114
|
+
},
|
115
|
+
// Primary styling
|
116
|
+
primary: {
|
117
|
+
type: Boolean,
|
118
|
+
default: !1
|
119
|
+
},
|
120
|
+
// Button size
|
121
|
+
size: {
|
122
|
+
type: String,
|
123
|
+
default: "default",
|
124
|
+
validator: (t) => ["x-small", "small", "default", "large", "x-large"].includes(t)
|
125
|
+
},
|
126
|
+
// Button color
|
127
|
+
color: {
|
128
|
+
type: String,
|
129
|
+
default: "primary"
|
130
|
+
},
|
131
|
+
// Custom background color
|
132
|
+
backgroundColor: {
|
133
|
+
type: String
|
134
|
+
},
|
135
|
+
// Icon button
|
136
|
+
icon: {
|
137
|
+
type: Boolean,
|
138
|
+
default: !1
|
139
|
+
},
|
140
|
+
// Disabled state
|
141
|
+
disabled: {
|
142
|
+
type: Boolean,
|
143
|
+
default: !1
|
144
|
+
},
|
145
|
+
// Loading state
|
146
|
+
loading: {
|
147
|
+
type: Boolean,
|
148
|
+
default: !1
|
149
|
+
},
|
150
|
+
// Outlined style
|
151
|
+
outlined: {
|
152
|
+
type: Boolean,
|
153
|
+
default: !1
|
154
|
+
},
|
155
|
+
// Text style
|
156
|
+
text: {
|
157
|
+
type: String,
|
158
|
+
default: ""
|
159
|
+
},
|
160
|
+
// Tile shape (square edges)
|
161
|
+
tile: {
|
162
|
+
type: Boolean,
|
163
|
+
default: !1
|
164
|
+
},
|
165
|
+
// Depressed style (no shadow)
|
166
|
+
depressed: {
|
167
|
+
type: Boolean,
|
168
|
+
default: !1
|
169
|
+
},
|
170
|
+
// Rounded corners
|
171
|
+
rounded: {
|
172
|
+
type: Boolean,
|
173
|
+
default: !1
|
174
|
+
},
|
175
|
+
// Full-width button
|
176
|
+
block: {
|
177
|
+
type: Boolean,
|
178
|
+
default: !1
|
179
|
+
},
|
180
|
+
// Link properties
|
181
|
+
href: {
|
182
|
+
type: String,
|
183
|
+
default: ""
|
184
|
+
},
|
185
|
+
target: {
|
186
|
+
type: String,
|
187
|
+
default: "_self"
|
188
|
+
},
|
189
|
+
to: {
|
190
|
+
type: [String, Object],
|
191
|
+
default: null
|
192
|
+
},
|
193
|
+
replace: {
|
194
|
+
type: Boolean,
|
195
|
+
default: !1
|
196
|
+
},
|
197
|
+
exact: {
|
198
|
+
type: Boolean,
|
199
|
+
default: !1
|
200
|
+
},
|
201
|
+
append: {
|
202
|
+
type: Boolean,
|
203
|
+
default: !1
|
204
|
+
},
|
205
|
+
// Button elevation (shadow)
|
206
|
+
elevation: {
|
207
|
+
type: [Number, String],
|
208
|
+
default: 2
|
209
|
+
}
|
210
|
+
},
|
211
|
+
emits: ["click"],
|
212
|
+
setup(t, { emit: a }) {
|
213
|
+
const e = () => {
|
214
|
+
a("click");
|
215
|
+
}, l = i(() => t.primary ? "flat" : "outlined"), o = i(() => t.label || "Button"), n = i(() => ({
|
216
|
+
"btn-primary": t.primary,
|
217
|
+
"btn-icon": t.icon,
|
218
|
+
"btn-disabled": t.disabled
|
219
|
+
}));
|
220
|
+
return {
|
221
|
+
onClick: e,
|
222
|
+
variant: l,
|
223
|
+
ariaLabel: o,
|
224
|
+
buttonClasses: n
|
225
|
+
};
|
226
|
+
}
|
227
|
+
};
|
228
|
+
function M(t, a, e, l, o, n) {
|
229
|
+
const c = p("v-btn");
|
230
|
+
return r(), m(c, {
|
231
|
+
type: "button",
|
232
|
+
variant: l.variant,
|
233
|
+
size: e.size,
|
234
|
+
color: e.color,
|
235
|
+
icon: e.icon,
|
236
|
+
disabled: e.disabled,
|
237
|
+
loading: e.loading,
|
238
|
+
outlined: e.outlined,
|
239
|
+
text: e.text,
|
240
|
+
tile: e.tile,
|
241
|
+
depressed: e.depressed,
|
242
|
+
rounded: e.rounded,
|
243
|
+
block: e.block,
|
244
|
+
href: e.href,
|
245
|
+
target: e.target,
|
246
|
+
elevation: e.elevation,
|
247
|
+
to: e.to,
|
248
|
+
replace: e.replace,
|
249
|
+
exact: e.exact,
|
250
|
+
append: e.append,
|
251
|
+
"background-color": e.backgroundColor,
|
252
|
+
class: y(l.buttonClasses),
|
253
|
+
onClick: l.onClick,
|
254
|
+
"aria-label": l.ariaLabel
|
255
|
+
}, {
|
256
|
+
default: g(() => [
|
257
|
+
s(t.$slots, "default", {}, () => [
|
258
|
+
h(f(e.label), 1)
|
259
|
+
], !0)
|
260
|
+
]),
|
261
|
+
_: 3
|
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
|
+
}
|
264
|
+
const N = /* @__PURE__ */ d(L, [["render", M], ["__scopeId", "data-v-ad55ccd4"]]), O = {
|
108
265
|
install: (t, a) => {
|
109
|
-
t.component("LearnVueButton",
|
266
|
+
t.component("LearnVueButton", v), t.component("InputTaras", I), t.component("RtText", z), t.component("RtButton", N);
|
110
267
|
}
|
111
268
|
};
|
112
269
|
export {
|
113
|
-
|
270
|
+
O as default
|
114
271
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(
|
1
|
+
(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,t["readytech-ui-library-v2"]=o(t.Vue))})(this,function(t){"use strict";const o=(a,l)=>{const e=a.__vccOpts||a;for(const[n,r]of l)e[n]=r;return e},i={},s={class:"lv-button"};function u(a,l){return t.openBlock(),t.createElementBlock("button",s,[t.renderSlot(a.$slots,"default",{},void 0,!0)])}const f=o(i,[["render",u],["__scopeId","data-v-ac3af47a"]]),p={name:"InputTaras",props:{prop:{required:!0}}},m={class:"class-input"};function b(a,l,e,n,r,d){return t.openBlock(),t.createElementBlock("h1",m,t.toDisplayString(e.prop)+" here",1)}const y=o(p,[["render",b],["__scopeId","data-v-5dfaad67"]]),_={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,d){const c=t.resolveComponent("v-text-field");return t.openBlock(),t.createBlock(c,t.mergeProps(d.inputProps,{modelValue:d.inputValue,"onUpdate:modelValue":l[0]||(l[0]=S=>d.inputValue=S),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":d.handleClear}),null,16,["modelValue","label","placeholder","disabled","error","error-messages","prepend-icon","hint","autocomplete","onClick:clear"])}const h=o(_,[["render",g],["__scopeId","data-v-406c1a0f"]]),B={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"),d=t.computed(()=>({"btn-primary":a.primary,"btn-icon":a.icon,"btn-disabled":a.disabled}));return{onClick:e,variant:n,ariaLabel:r,buttonClasses:d}}};function k(a,l,e,n,r,d){const c=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(c,{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=o(B,[["render",k],["__scopeId","data-v-ad55ccd4"]]);return{install:(a,l)=>{a.component("LearnVueButton",f),a.component("InputTaras",y),a.component("RtText",h),a.component("RtButton",x)}}});
|