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 CHANGED
@@ -1 +1 @@
1
- .contain[data-v-4c91c086]{position:relative}.inp[data-v-4c91c086]{background-color:transparent;color:var(--text);border:1px solid #52525b;width:90%;margin:5px 15px;border-radius:8.75px;background:none;padding:12px 16px;font-size:18px}.inp[data-v-4c91c086]:focus{border:1px solid var(--primary);outline:none}.inp[data-v-4c91c086]::placeholder{color:#71717a}.inp[data-v-4c91c086],.label[data-v-4c91c086]{transition:color,background-color,border-color .2s ease-out}.label[data-v-4c91c086]{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:24px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.contain:focus-within .label[data-v-4c91c086]{color:var(--primary);border:1px solid var(--primary)}
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 i, createElementVNode as n, toDisplayString as p } from "vue";
2
- const u = (t, a) => {
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" }, v = {
7
+ }, d = ["placeholder", "value"], m = { class: "label" }, y = {
8
8
  name: "tInput"
9
- }, y = /* @__PURE__ */ Object.assign(v, {
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: i(a.value)
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
- }), f = /* @__PURE__ */ u(y, [["__scopeId", "data-v-4c91c086"]]);
44
+ }), g = /* @__PURE__ */ i(v, [["__scopeId", "data-v-2ea9708e"]]);
45
45
  export {
46
- f as default
46
+ g as default
47
47
  };
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e["tfs-Input"]=n(e.Vue))})(this,function(e){"use strict";const n=(t,a)=>{const l=t.__vccOpts||t;for(const[o,i]of a)l[o]=i;return l},r=["placeholder","value"],s={class:"label"};return n(Object.assign({name:"tInput"},{props:{label:String,val:String,placehold:String,primaryColor:{type:String,default:"#2563eb"},textColor:{type:String,default:"#27272a"}},emits:["update:val"],setup(t){const a=e.computed(()=>({"--primary":t.primaryColor,"--text":t.textColor}));return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:"contain",style:e.normalizeStyle(a.value)},[e.createElementVNode("input",{class:"inp",name:"text",type:"text",placeholder:t.placehold,value:t.val,onInput:o[0]||(o[0]=i=>l.$emit("update:val",i.target.value))},null,40,r),e.createElementVNode("label",s,e.toDisplayString(t.label),1)],4))}}),[["__scopeId","data-v-4c91c086"]])});
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.7",
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://github.com/MFM-347/tfsInput#readme",
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 #52525b;
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: #71717a;
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: #71717a;
83
- border: 1px solid #52525b;
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;