tfs-input 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/tfsInput.js +10 -10
- package/dist/tfsInput.umd.cjs +1 -1
- package/package.json +2 -2
- package/src/tfsInput.vue +16 -7
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.contain[data-v-
|
1
|
+
[data-v-2ea9708e]:root,.light[data-v-2ea9708e]{--c1: #52525b;--c2: #71717a}.dark[data-v-2ea9708e]{--c1: #71717a;--c2: #a1a1aa}.contain[data-v-2ea9708e]{position:relative}.inp[data-v-2ea9708e]{background-color:transparent;color:var(--text);border:1px solid var(--c1);width:90%;margin:5px 15px;border-radius:8.75px;background:none;padding:12px 16px;font-size:18px}.inp[data-v-2ea9708e]:focus{border:1px solid var(--primary);outline:none}.inp[data-v-2ea9708e]::placeholder{color:var(--c2)}.inp[data-v-2ea9708e],.label[data-v-2ea9708e]{transition:color,background-color,border-color .2s ease-out}.label[data-v-2ea9708e]{background-color:transparent;color:var(--c2);border:1px solid var(--c1);font-size:15px;font-weight:600;padding:0 6px;border-radius:7.25px;position:absolute;top:-12px;left:24px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.contain:focus-within .label[data-v-2ea9708e]{color:var(--primary);border:1px solid var(--primary)}
|
package/dist/tfsInput.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { computed as r, openBlock as c, createElementBlock as s, normalizeStyle as
|
2
|
-
const
|
1
|
+
import { computed as r, openBlock as c, createElementBlock as s, normalizeStyle as u, createElementVNode as n, toDisplayString as p } 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
|
-
}, d = ["placeholder", "value"], m = { class: "label" },
|
7
|
+
}, d = ["placeholder", "value"], m = { class: "label" }, y = {
|
8
8
|
name: "tInput"
|
9
|
-
},
|
9
|
+
}, v = /* @__PURE__ */ Object.assign(y, {
|
10
10
|
props: {
|
11
|
-
label: String,
|
12
|
-
val: String,
|
13
|
-
placehold: String,
|
11
|
+
label: { type: String, default: "Label" },
|
12
|
+
val: { type: String, default: "Input Value" },
|
13
|
+
placehold: { type: String, default: "Placeholder" },
|
14
14
|
primaryColor: {
|
15
15
|
type: String,
|
16
16
|
default: "#2563eb"
|
@@ -28,7 +28,7 @@ const u = (t, a) => {
|
|
28
28
|
}));
|
29
29
|
return (e, l) => (c(), s("div", {
|
30
30
|
class: "contain",
|
31
|
-
style:
|
31
|
+
style: u(a.value)
|
32
32
|
}, [
|
33
33
|
n("input", {
|
34
34
|
class: "inp",
|
@@ -41,7 +41,7 @@ const u = (t, a) => {
|
|
41
41
|
n("label", m, p(t.label), 1)
|
42
42
|
], 4));
|
43
43
|
}
|
44
|
-
}),
|
44
|
+
}), g = /* @__PURE__ */ i(v, [["__scopeId", "data-v-2ea9708e"]]);
|
45
45
|
export {
|
46
|
-
|
46
|
+
g as default
|
47
47
|
};
|
package/dist/tfsInput.umd.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(e,
|
1
|
+
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e["tfs-Input"]=l(e.Vue))})(this,function(e){"use strict";const l=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},i=["placeholder","value"],s={class:"label"};return l(Object.assign({name:"tInput"},{props:{label:{type:String,default:"Label"},val:{type:String,default:"Input Value"},placehold:{type:String,default:"Placeholder"},primaryColor:{type:String,default:"#2563eb"},textColor:{type:String,default:"#27272a"}},emits:["update:val"],setup(t){const o=e.computed(()=>({"--primary":t.primaryColor,"--text":t.textColor}));return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:"contain",style:e.normalizeStyle(o.value)},[e.createElementVNode("input",{class:"inp",name:"text",type:"text",placeholder:t.placehold,value:t.val,onInput:a[0]||(a[0]=r=>n.$emit("update:val",r.target.value))},null,40,i),e.createElementVNode("label",s,e.toDisplayString(t.label),1)],4))}}),[["__scopeId","data-v-2ea9708e"]])});
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "tfs-input",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.8",
|
4
4
|
"private": false,
|
5
5
|
"type": "module",
|
6
6
|
"description": "Customizable Vue input component floating labels for modern UIs.",
|
7
|
-
"homepage": "https://
|
7
|
+
"homepage": "https://MFM-347.github.io/tfsInput",
|
8
8
|
"files": [
|
9
9
|
"dist/*",
|
10
10
|
"src/*"
|
package/src/tfsInput.vue
CHANGED
@@ -22,9 +22,9 @@ export default {
|
|
22
22
|
import { computed } from "vue";
|
23
23
|
|
24
24
|
const { label, val, placehold, primaryColor, textColor } = defineProps({
|
25
|
-
label: String,
|
26
|
-
val: String,
|
27
|
-
placehold: String,
|
25
|
+
label: { type: String, default: "Label" },
|
26
|
+
val: { type: String, default: "Input Value" },
|
27
|
+
placehold: { type: String, default: "Placeholder" },
|
28
28
|
primaryColor: {
|
29
29
|
type: String,
|
30
30
|
default: "#2563eb",
|
@@ -44,6 +44,15 @@ const colors = computed(() => ({
|
|
44
44
|
</script>
|
45
45
|
|
46
46
|
<style scoped>
|
47
|
+
:root,
|
48
|
+
.light {
|
49
|
+
--c1: #52525b;
|
50
|
+
--c2: #71717a;
|
51
|
+
}
|
52
|
+
.dark {
|
53
|
+
--c1: #71717a;
|
54
|
+
--c2: #a1a1aa;
|
55
|
+
}
|
47
56
|
.contain {
|
48
57
|
position: relative;
|
49
58
|
}
|
@@ -51,7 +60,7 @@ const colors = computed(() => ({
|
|
51
60
|
.inp {
|
52
61
|
background-color: transparent;
|
53
62
|
color: var(--text);
|
54
|
-
border: 1px solid
|
63
|
+
border: 1px solid var(--c1);
|
55
64
|
width: 90%;
|
56
65
|
margin: 5px 15px;
|
57
66
|
border-radius: 8.75px;
|
@@ -66,7 +75,7 @@ const colors = computed(() => ({
|
|
66
75
|
}
|
67
76
|
|
68
77
|
.inp::placeholder {
|
69
|
-
color:
|
78
|
+
color: var(--c2);
|
70
79
|
}
|
71
80
|
|
72
81
|
.inp,
|
@@ -79,8 +88,8 @@ const colors = computed(() => ({
|
|
79
88
|
|
80
89
|
.label {
|
81
90
|
background-color: transparent;
|
82
|
-
color:
|
83
|
-
border: 1px solid
|
91
|
+
color: var(--c2);
|
92
|
+
border: 1px solid var(--c1);
|
84
93
|
font-size: 15px;
|
85
94
|
font-weight: 600;
|
86
95
|
padding: 0 6px;
|