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 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** |**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. |
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-2143fbc4]{position:relative}.inp[data-v-2143fbc4]{background-color:transparent;color:#27272a;border:1px solid #52525b;width:100%;margin:5px 15px;border-radius:8.75px;background:none;padding:12px 16px;font-size:18px}.inp[data-v-2143fbc4]:focus{border:1px solid #2563eb;outline:none}.inp[data-v-2143fbc4]::placeholder,.inp[data-v-2143fbc4]::-webkit-input-placeholder,.inp[data-v-2143fbc4]::-ms-input-placeholder,.inp[data-v-2143fbc4]::-moz-input-placeholder{color:#71717a}.inp[data-v-2143fbc4],.label[data-v-2143fbc4]{transition:color,background-color,border-color .2s ease-out}.label[data-v-2143fbc4]{background-color:transparent;color:#71717a;border:1px solid #52525b;font-size:15px;font-weight:600;padding:0 6px;border-radius:7.25px;position:absolute;top:-12px;left:40px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.contain:focus-within .label[data-v-2143fbc4]{color:#2563eb;border:1px solid #2563eb}
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 { openBlock as s, createElementBlock as c, createElementVNode as n, toDisplayString as r } from "vue";
2
- const p = (t, l) => {
3
- const e = t.__vccOpts || t;
4
- for (const [a, o] of l)
5
- e[a] = o;
6
- return e;
7
- }, i = { class: "contain" }, u = ["placeholder", "value"], d = { class: "label" }, v = {
8
- __name: "tfsInput",
9
- props: {
10
- label: String,
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
- emits: ["update:val"],
15
- setup(t) {
16
- return (l, e) => (s(), c("div", i, [
17
- n("input", {
18
- class: "inp",
19
- name: "text",
20
- type: "text",
21
- placeholder: t.placehold,
22
- value: t.val,
23
- onInput: e[0] || (e[0] = (a) => l.$emit("update:val", a.target.value))
24
- }, null, 40, u),
25
- n("label", d, r(t.label), 1)
26
- ]));
27
- }
28
- }, m = /* @__PURE__ */ p(v, [["__scopeId", "data-v-2143fbc4"]]);
29
- export {
30
- m as tInput
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 };
@@ -1 +1,55 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t["tfs-Input"]={},t.Vue))})(this,function(t,e){"use strict";const a=(n,o)=>{const l=n.__vccOpts||n;for(const[s,u]of o)l[s]=u;return l},i={class:"contain"},c=["placeholder","value"],d={class:"label"},p=a({__name:"tfsInput",props:{label:String,val:String,placehold:String},emits:["update:val"],setup(n){return(o,l)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("input",{class:"inp",name:"text",type:"text",placeholder:n.placehold,value:n.val,onInput:l[0]||(l[0]=s=>o.$emit("update:val",s.target.value))},null,40,c),e.createElementVNode("label",d,e.toDisplayString(n.label),1)]))}},[["__scopeId","data-v-2143fbc4"]]);t.tInput=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
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.0",
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": "git+https://github.com/MFM-347/tfsInput.git"
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
@@ -1,3 +1 @@
1
- import tInput from "./tfsInput.vue";
2
-
3
- export { tInput };
1
+ export { default as tInput } from "./tfsInput.vue";
package/src/tfsInput.vue CHANGED
@@ -20,6 +20,9 @@ defineProps({
20
20
  });
21
21
 
22
22
  defineEmits(["update:val"]);
23
+ defineExpose({
24
+ name: "tInput",
25
+ });
23
26
  </script>
24
27
  <style scoped>
25
28
  .contain {