tfs-input 0.9.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +5 -5
- package/dist/style.css +49 -1
- package/dist/tfsInput.js +52 -30
- package/dist/tfsInput.umd.cjs +55 -1
- package/package.json +2 -2
- package/src/main.js +1 -3
- package/src/tfsInput.vue +3 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Farhan Madni
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -37,11 +37,11 @@ const name = ref("");
|
|
37
37
|
|
38
38
|
### Props
|
39
39
|
|
40
|
-
| **Prop**
|
41
|
-
| ----------- |
|
42
|
-
| `label` | String
|
43
|
-
| `val` | String
|
44
|
-
| `placehold` | String
|
40
|
+
| **Prop** | **Type** | **Description** |
|
41
|
+
| ----------- | -------- | ----------------------------------- |
|
42
|
+
| `label` | String | Text displayed as a floating label. |
|
43
|
+
| `val` | String | Bound value for input. |
|
44
|
+
| `placehold` | String | Placeholder text for input. |
|
45
45
|
|
46
46
|
### Emits
|
47
47
|
|
package/dist/style.css
CHANGED
@@ -1 +1,49 @@
|
|
1
|
-
.contain[data-v-
|
1
|
+
.contain[data-v-cb9a3059] {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
.inp[data-v-cb9a3059] {
|
5
|
+
background-color: transparent;
|
6
|
+
color: #27272a;
|
7
|
+
border: 1px solid #52525b;
|
8
|
+
width: 100%;
|
9
|
+
margin: 5px 15px;
|
10
|
+
border-radius: 8.75px;
|
11
|
+
background: none;
|
12
|
+
padding: 12px 16px;
|
13
|
+
font-size: 18px;
|
14
|
+
}
|
15
|
+
.inp[data-v-cb9a3059]:focus {
|
16
|
+
border: 1px solid #2563eb;
|
17
|
+
outline: none;
|
18
|
+
}
|
19
|
+
.inp[data-v-cb9a3059]::placeholder,
|
20
|
+
.inp[data-v-cb9a3059]::-webkit-input-placeholder,
|
21
|
+
.inp[data-v-cb9a3059]::-ms-input-placeholder,
|
22
|
+
.inp[data-v-cb9a3059]::-moz-input-placeholder {
|
23
|
+
color: #71717a;
|
24
|
+
}
|
25
|
+
.inp[data-v-cb9a3059],
|
26
|
+
.label[data-v-cb9a3059] {
|
27
|
+
transition:
|
28
|
+
color,
|
29
|
+
background-color,
|
30
|
+
border-color 0.2s ease-out;
|
31
|
+
}
|
32
|
+
.label[data-v-cb9a3059] {
|
33
|
+
background-color: transparent;
|
34
|
+
color: #71717a;
|
35
|
+
border: 1px solid #52525b;
|
36
|
+
font-size: 15px;
|
37
|
+
font-weight: 600;
|
38
|
+
padding: 0 6px;
|
39
|
+
border-radius: 7.25px;
|
40
|
+
position: absolute;
|
41
|
+
top: -12px;
|
42
|
+
left: 40px;
|
43
|
+
-webkit-backdrop-filter: blur(8px);
|
44
|
+
backdrop-filter: blur(8px);
|
45
|
+
}
|
46
|
+
.contain:focus-within .label[data-v-cb9a3059] {
|
47
|
+
color: #2563eb;
|
48
|
+
border: 1px solid #2563eb;
|
49
|
+
}
|
package/dist/tfsInput.js
CHANGED
@@ -1,31 +1,53 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
val: String,
|
12
|
-
placehold: String
|
1
|
+
import {
|
2
|
+
openBlock as s,
|
3
|
+
createElementBlock as c,
|
4
|
+
createElementVNode as o,
|
5
|
+
toDisplayString as p,
|
6
|
+
} from "vue";
|
7
|
+
const r = (t, l) => {
|
8
|
+
const e = t.__vccOpts || t;
|
9
|
+
for (const [a, n] of l) e[a] = n;
|
10
|
+
return e;
|
13
11
|
},
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
12
|
+
i = { class: "contain" },
|
13
|
+
u = ["placeholder", "value"],
|
14
|
+
d = { class: "label" },
|
15
|
+
v = {
|
16
|
+
__name: "tfsInput",
|
17
|
+
props: {
|
18
|
+
label: String,
|
19
|
+
val: String,
|
20
|
+
placehold: String,
|
21
|
+
},
|
22
|
+
emits: ["update:val"],
|
23
|
+
setup(t, { expose: l }) {
|
24
|
+
return (
|
25
|
+
l({
|
26
|
+
name: "tInput",
|
27
|
+
}),
|
28
|
+
(e, a) => (
|
29
|
+
s(),
|
30
|
+
c("div", i, [
|
31
|
+
o(
|
32
|
+
"input",
|
33
|
+
{
|
34
|
+
class: "inp",
|
35
|
+
name: "text",
|
36
|
+
type: "text",
|
37
|
+
placeholder: t.placehold,
|
38
|
+
value: t.val,
|
39
|
+
onInput:
|
40
|
+
a[0] || (a[0] = (n) => e.$emit("update:val", n.target.value)),
|
41
|
+
},
|
42
|
+
null,
|
43
|
+
40,
|
44
|
+
u,
|
45
|
+
),
|
46
|
+
o("label", d, p(t.label), 1),
|
47
|
+
])
|
48
|
+
)
|
49
|
+
);
|
50
|
+
},
|
51
|
+
},
|
52
|
+
m = /* @__PURE__ */ r(v, [["__scopeId", "data-v-cb9a3059"]]);
|
53
|
+
export { m as tInput };
|
package/dist/tfsInput.umd.cjs
CHANGED
@@ -1 +1,55 @@
|
|
1
|
-
(function(t,
|
1
|
+
(function (t, e) {
|
2
|
+
typeof exports == "object" && typeof module < "u"
|
3
|
+
? e(exports, require("vue"))
|
4
|
+
: typeof define == "function" && define.amd
|
5
|
+
? define(["exports", "vue"], e)
|
6
|
+
: ((t = typeof globalThis < "u" ? globalThis : t || self),
|
7
|
+
e((t["tfs-Input"] = {}), t.Vue));
|
8
|
+
})(this, function (t, e) {
|
9
|
+
"use strict";
|
10
|
+
const i = (n, a) => {
|
11
|
+
const o = n.__vccOpts || n;
|
12
|
+
for (const [l, s] of a) o[l] = s;
|
13
|
+
return o;
|
14
|
+
},
|
15
|
+
c = { class: "contain" },
|
16
|
+
p = ["placeholder", "value"],
|
17
|
+
u = { class: "label" },
|
18
|
+
d = i(
|
19
|
+
{
|
20
|
+
__name: "tfsInput",
|
21
|
+
props: { label: String, val: String, placehold: String },
|
22
|
+
emits: ["update:val"],
|
23
|
+
setup(n, { expose: a }) {
|
24
|
+
return (
|
25
|
+
a({ name: "tInput" }),
|
26
|
+
(o, l) => (
|
27
|
+
e.openBlock(),
|
28
|
+
e.createElementBlock("div", c, [
|
29
|
+
e.createElementVNode(
|
30
|
+
"input",
|
31
|
+
{
|
32
|
+
class: "inp",
|
33
|
+
name: "text",
|
34
|
+
type: "text",
|
35
|
+
placeholder: n.placehold,
|
36
|
+
value: n.val,
|
37
|
+
onInput:
|
38
|
+
l[0] ||
|
39
|
+
(l[0] = (s) => o.$emit("update:val", s.target.value)),
|
40
|
+
},
|
41
|
+
null,
|
42
|
+
40,
|
43
|
+
p,
|
44
|
+
),
|
45
|
+
e.createElementVNode("label", u, e.toDisplayString(n.label), 1),
|
46
|
+
])
|
47
|
+
)
|
48
|
+
);
|
49
|
+
},
|
50
|
+
},
|
51
|
+
[["__scopeId", "data-v-cb9a3059"]],
|
52
|
+
);
|
53
|
+
(t.tInput = d),
|
54
|
+
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
55
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tfs-input",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.5",
|
4
4
|
"private": false,
|
5
5
|
"type": "module",
|
6
6
|
"description": "Customizable Vue input component floating labels for modern UIs.",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
],
|
42
42
|
"repository": {
|
43
43
|
"type": "git",
|
44
|
-
"url": "
|
44
|
+
"url": "https://github.com/MFM-347/tfsInput.git"
|
45
45
|
},
|
46
46
|
"bugs": {
|
47
47
|
"url": "https://github.com/MFM-347/tfsInput/issues"
|
package/src/main.js
CHANGED