@phila/phila-ui-textarea 0.0.5 → 0.0.6
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.
- package/dist/TextArea.vue.d.ts +4 -4
- package/dist/textarea.js +19 -17
- package/dist/textarea.umd.cjs +1 -1
- package/package.json +3 -3
package/dist/TextArea.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
1
|
+
import { InputProps, TextboxProps } from "@phila/phila-ui-core";
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputProps & TextboxProps>, {
|
|
3
3
|
id: string;
|
|
4
4
|
errors(): never[];
|
|
5
5
|
label: string;
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
12
|
innerLabel: boolean;
|
|
13
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
14
|
[x: string]: (...args: unknown[]) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputProps & TextboxProps>, {
|
|
16
16
|
id: string;
|
|
17
17
|
errors(): never[];
|
|
18
18
|
label: string;
|
|
@@ -25,7 +25,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
25
|
innerLabel: boolean;
|
|
26
26
|
}>>>, {
|
|
27
27
|
id: string;
|
|
28
|
-
errors:
|
|
28
|
+
errors: import("@phila/phila-ui-core").InputErrors;
|
|
29
29
|
label: string;
|
|
30
30
|
desc: string;
|
|
31
31
|
placeholder: string;
|
package/dist/textarea.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./TextArea.css";
|
|
2
|
-
import { defineComponent as y, getCurrentInstance as I, openBlock as s, createElementBlock as a, normalizeClass as g, unref as t, createElementVNode as l, toDisplayString as n, createCommentVNode as
|
|
2
|
+
import { defineComponent as y, getCurrentInstance as I, openBlock as s, createElementBlock as a, normalizeClass as g, unref as t, createElementVNode as l, toDisplayString as n, createCommentVNode as p, mergeProps as k, Fragment as $, renderSlot as C, pushScopeId as B, popScopeId as S } from "vue";
|
|
3
3
|
import V from "@phila/phila-ui-core";
|
|
4
|
-
const L = (o) => (
|
|
4
|
+
const L = (o) => (B("data-v-34894edd"), o = o(), S(), o), P = { class: "field" }, T = ["for"], A = { class: "control" }, q = ["id", "value", "placeholder"], w = ["for"], D = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "supplemental-text"
|
|
7
7
|
}, E = {
|
|
@@ -12,18 +12,20 @@ const L = (o) => (S("data-v-34894edd"), o = o(), B(), o), P = { class: "field" }
|
|
|
12
12
|
class: "input-error-msg"
|
|
13
13
|
}, N = /* @__PURE__ */ L(() => /* @__PURE__ */ l("span", { class: "icon" }, [
|
|
14
14
|
/* @__PURE__ */ l("i", { class: "fas fa-exclamation-circle" })
|
|
15
|
-
], -1)),
|
|
15
|
+
], -1)), O = () => Math.random().toString(36).substring(2, 9), x = {
|
|
16
16
|
inheritAttrs: !1
|
|
17
|
-
},
|
|
18
|
-
...
|
|
17
|
+
}, z = /* @__PURE__ */ y({
|
|
18
|
+
...x,
|
|
19
19
|
__name: "TextArea",
|
|
20
20
|
props: {
|
|
21
|
-
id: { default:
|
|
21
|
+
id: { default: O() },
|
|
22
22
|
errors: { default() {
|
|
23
23
|
return [];
|
|
24
24
|
} },
|
|
25
25
|
optgroup: { type: Boolean },
|
|
26
|
+
disableableOptions: { type: Boolean },
|
|
26
27
|
options: {},
|
|
28
|
+
name: {},
|
|
27
29
|
textKey: {},
|
|
28
30
|
valueKey: {},
|
|
29
31
|
imaskProps: {},
|
|
@@ -37,16 +39,16 @@ const L = (o) => (S("data-v-34894edd"), o = o(), B(), o), P = { class: "field" }
|
|
|
37
39
|
innerLabel: { type: Boolean, default: !0 }
|
|
38
40
|
},
|
|
39
41
|
emits: ["update:modelValue", "input"],
|
|
40
|
-
setup(o, { emit:
|
|
41
|
-
const { formHelpers: r } = V, d = o, c =
|
|
42
|
+
setup(o, { emit: u }) {
|
|
43
|
+
const { formHelpers: r } = V, d = o, c = u, _ = I(), { error: m, classes: b } = r.useInput.useInputComposable(
|
|
42
44
|
_,
|
|
43
45
|
d
|
|
44
46
|
), { defaultPlaceholder: i, onInput: f } = r.useTextbox.useTextboxComposable(c, d);
|
|
45
47
|
return (e, h) => (s(), a("div", {
|
|
46
|
-
class: g(["input-wrap input-textarea", t(
|
|
48
|
+
class: g(["input-wrap input-textarea", t(b)])
|
|
47
49
|
}, [
|
|
48
50
|
l("div", P, [
|
|
49
|
-
e.innerLabel ?
|
|
51
|
+
e.innerLabel ? p("", !0) : (s(), a("label", {
|
|
50
52
|
key: 0,
|
|
51
53
|
for: `ta-${e.id}`
|
|
52
54
|
}, n(e.label) + " " + n(e.$attrs.required !== void 0 ? "*" : ""), 9, T)),
|
|
@@ -58,31 +60,31 @@ const L = (o) => (S("data-v-34894edd"), o = o(), B(), o), P = { class: "field" }
|
|
|
58
60
|
value: e.modelValue,
|
|
59
61
|
placeholder: e.$attrs.required !== void 0 && t(i) !== "" ? `${t(i)}` : t(i),
|
|
60
62
|
onInput: h[0] || (h[0] = //@ts-ignore
|
|
61
|
-
(...
|
|
63
|
+
(...v) => t(f) && t(f)(...v))
|
|
62
64
|
}), null, 16, q),
|
|
63
65
|
e.innerLabel ? (s(), a("label", {
|
|
64
66
|
key: 0,
|
|
65
67
|
for: `ta-${e.id}`
|
|
66
|
-
}, n(e.label ? e.label : t(i)), 9, w)) :
|
|
68
|
+
}, n(e.label ? e.label : t(i)), 9, w)) : p("", !0),
|
|
67
69
|
e.desc ? (s(), a("div", D, n(e.desc), 1)) : (s(), a($, { key: 2 }, [
|
|
68
70
|
e.$slots.desc ? (s(), a("div", E, [
|
|
69
71
|
C(e.$slots, "desc", {}, void 0, !0)
|
|
70
|
-
])) :
|
|
72
|
+
])) : p("", !0)
|
|
71
73
|
], 64))
|
|
72
74
|
])
|
|
73
75
|
]),
|
|
74
76
|
t(m) ? (s(), a("div", K, [
|
|
75
77
|
N,
|
|
76
78
|
l("span", null, n(t(m)), 1)
|
|
77
|
-
])) :
|
|
79
|
+
])) : p("", !0)
|
|
78
80
|
], 2));
|
|
79
81
|
}
|
|
80
|
-
}),
|
|
82
|
+
}), F = (o, u) => {
|
|
81
83
|
const r = o.__vccOpts || o;
|
|
82
|
-
for (const [d, c] of
|
|
84
|
+
for (const [d, c] of u)
|
|
83
85
|
r[d] = c;
|
|
84
86
|
return r;
|
|
85
|
-
}, j = /* @__PURE__ */
|
|
87
|
+
}, j = /* @__PURE__ */ F(z, [["__scopeId", "data-v-34894edd"]]);
|
|
86
88
|
export {
|
|
87
89
|
j as default
|
|
88
90
|
};
|
package/dist/textarea.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue"),require("@phila/phila-ui-core")):typeof define=="function"&&define.amd?define(["vue","@phila/phila-ui-core"],o):(t=typeof globalThis<"u"?globalThis:t||self,t.TextArea=o(t.Vue,t.PhilaUICore))})(this,function(t,o){"use strict";var i=document.createElement("style");i.textContent=`@font-face{font-family:Montserrat;src:local("Montserrat Regular"),local("Montserrat-Regular"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Italic"),local("OpenSans-Italic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Montserrat;src:local("Montserrat Bold"),local("Montserrat-Bold"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold Italic"),local("OpenSans-SemiBoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold"),local("OpenSans-SemiBold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff) format("woff");font-weight:600;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Regular"),local("OpenSans-Regular"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff) format("woff");font-weight:400;font-style:normal}textarea[data-v-34894edd]::-webkit-input-placeholder{color:#a1a1a1!important;opacity:1!important}textarea[data-v-34894edd]::-moz-placeholder{color:#a1a1a1!important;opacity:1!important}textarea[data-v-34894edd]:-moz-placeholder{color:#a1a1a1!important;opacity:1!important}textarea[data-v-34894edd]:-ms-input-placeholder{color:#a1a1a1!important;opacity:1!important}textarea[data-v-34894edd]::placeholder{color:#a1a1a1!important;opacity:1!important}textarea[data-v-34894edd]:focus::-webkit-input-placeholder{color:transparent}textarea[data-v-34894edd]:focus:-moz-placeholder{color:transparent}textarea[data-v-34894edd]:focus::-moz-placeholder{color:transparent}textarea[data-v-34894edd]:focus:-ms-input-placeholder{color:transparent}.input-textarea.inner-label textarea[data-v-34894edd]::-webkit-input-placeholder{color:#444!important;opacity:1!important}.input-textarea.inner-label textarea[data-v-34894edd]::-moz-placeholder{color:#444!important;opacity:1!important}.input-textarea.inner-label textarea[data-v-34894edd]:-moz-placeholder{color:#444!important;opacity:1!important}.input-textarea.inner-label textarea[data-v-34894edd]:-ms-input-placeholder{color:#444!important;opacity:1!important}.input-textarea.inner-label textarea[data-v-34894edd]::placeholder{color:#444!important;opacity:1!important}.input-textarea.inner-label .textarea+label[data-v-34894edd]{opacity:0;z-index:-1}.input-textarea.inner-label .textarea[data-v-34894edd]:not(:placeholder-shown),.input-textarea.inner-label .textarea[data-v-34894edd]:focus{padding:1.5rem 1rem 0 .75rem}.input-textarea.inner-label .textarea:not(:placeholder-shown)+label[data-v-34894edd],.input-textarea.inner-label .textarea:focus+label[data-v-34894edd]{opacity:1;z-index:1}.input-textarea.inner-label .textarea[data-v-34894edd]:not(:-ms-input-placeholder){padding:1.5rem 1rem 0 .75rem}.input-textarea.inner-label .textarea:not(:-ms-input-placeholder)+label[data-v-34894edd]{opacity:1;z-index:1}
|
|
2
|
-
`,document.head.appendChild(i);const m=a=>(t.pushScopeId("data-v-34894edd"),a=a(),t.popScopeId(),a),w={class:"field"},h=["for"],u={class:"control"},S=["id","value","placeholder"],y=["for"],g={key:1,class:"supplemental-text"},O={key:0,class:"supplemental-text"},x={key:0,class:"input-error-msg"},B=m(()=>t.createElementVNode("span",{class:"icon"},[t.createElementVNode("i",{class:"fas fa-exclamation-circle"})],-1)),b=()=>Math.random().toString(36).substring(2,9),k={inheritAttrs:!1},_=t.defineComponent({...k,__name:"TextArea",props:{id:{default:b()},errors:{default(){return[]}},optgroup:{type:Boolean},options:{},textKey:{},valueKey:{},imaskProps:{},label:{default:""},desc:{default:""},placeholder:{default:""},type:{default:"text"},modelValue:{default:""},icon:{default:""},isLoading:{type:Boolean,default:!1},innerLabel:{type:Boolean,default:!0}},emits:["update:modelValue","input"],setup(a,{emit:s}){const{formHelpers:n}=o,l=a,p=s,I=t.getCurrentInstance(),{error:d,classes:M}=n.useInput.useInputComposable(I,l),{defaultPlaceholder:r,onInput:f}=n.useTextbox.useTextboxComposable(p,l);return(e,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["input-wrap input-textarea",t.unref(M)])},[t.createElementVNode("div",w,[e.innerLabel?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("label",{key:0,for:`ta-${e.id}`},t.toDisplayString(e.label)+" "+t.toDisplayString(e.$attrs.required!==void 0?"*":""),9,h)),t.createElementVNode("div",u,[t.createElementVNode("textarea",t.mergeProps({id:`ta-${e.id}`,class:"textarea"},e.$attrs,{value:e.modelValue,placeholder:e.$attrs.required!==void 0&&t.unref(r)!==""?`${t.unref(r)}`:t.unref(r),onInput:c[0]||(c[0]=(...E)=>t.unref(f)&&t.unref(f)(...E))}),null,16,S),e.innerLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:`ta-${e.id}`},t.toDisplayString(e.label?e.label:t.unref(r)),9,y)):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("div",g,t.toDisplayString(e.desc),1)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[e.$slots.desc?(t.openBlock(),t.createElementBlock("div",O,[t.renderSlot(e.$slots,"desc",{},void 0,!0)])):t.createCommentVNode("",!0)],64))])]),t.unref(d)?(t.openBlock(),t.createElementBlock("div",x,[B,t.createElementVNode("span",null,t.toDisplayString(t.unref(d)),1)])):t.createCommentVNode("",!0)],2))}});return((a,s)=>{const n=a.__vccOpts||a;for(const[l,p]of s)n[l]=p;return n})(_,[["__scopeId","data-v-34894edd"]])});
|
|
2
|
+
`,document.head.appendChild(i);const m=a=>(t.pushScopeId("data-v-34894edd"),a=a(),t.popScopeId(),a),w={class:"field"},h=["for"],u={class:"control"},S=["id","value","placeholder"],y=["for"],g={key:1,class:"supplemental-text"},O={key:0,class:"supplemental-text"},x={key:0,class:"input-error-msg"},B=m(()=>t.createElementVNode("span",{class:"icon"},[t.createElementVNode("i",{class:"fas fa-exclamation-circle"})],-1)),b=()=>Math.random().toString(36).substring(2,9),k={inheritAttrs:!1},_=t.defineComponent({...k,__name:"TextArea",props:{id:{default:b()},errors:{default(){return[]}},optgroup:{type:Boolean},disableableOptions:{type:Boolean},options:{},name:{},textKey:{},valueKey:{},imaskProps:{},label:{default:""},desc:{default:""},placeholder:{default:""},type:{default:"text"},modelValue:{default:""},icon:{default:""},isLoading:{type:Boolean,default:!1},innerLabel:{type:Boolean,default:!0}},emits:["update:modelValue","input"],setup(a,{emit:s}){const{formHelpers:n}=o,l=a,p=s,I=t.getCurrentInstance(),{error:d,classes:M}=n.useInput.useInputComposable(I,l),{defaultPlaceholder:r,onInput:f}=n.useTextbox.useTextboxComposable(p,l);return(e,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["input-wrap input-textarea",t.unref(M)])},[t.createElementVNode("div",w,[e.innerLabel?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("label",{key:0,for:`ta-${e.id}`},t.toDisplayString(e.label)+" "+t.toDisplayString(e.$attrs.required!==void 0?"*":""),9,h)),t.createElementVNode("div",u,[t.createElementVNode("textarea",t.mergeProps({id:`ta-${e.id}`,class:"textarea"},e.$attrs,{value:e.modelValue,placeholder:e.$attrs.required!==void 0&&t.unref(r)!==""?`${t.unref(r)}`:t.unref(r),onInput:c[0]||(c[0]=(...E)=>t.unref(f)&&t.unref(f)(...E))}),null,16,S),e.innerLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:`ta-${e.id}`},t.toDisplayString(e.label?e.label:t.unref(r)),9,y)):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("div",g,t.toDisplayString(e.desc),1)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[e.$slots.desc?(t.openBlock(),t.createElementBlock("div",O,[t.renderSlot(e.$slots,"desc",{},void 0,!0)])):t.createCommentVNode("",!0)],64))])]),t.unref(d)?(t.openBlock(),t.createElementBlock("div",x,[B,t.createElementVNode("span",null,t.toDisplayString(t.unref(d)),1)])):t.createCommentVNode("",!0)],2))}});return((a,s)=>{const n=a.__vccOpts||a;for(const[l,p]of s)n[l]=p;return n})(_,[["__scopeId","data-v-34894edd"]])});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-textarea",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"preview": "vite preview"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@phila/phila-ui-core": "1.0.
|
|
28
|
+
"@phila/phila-ui-core": "^1.0.21",
|
|
29
29
|
"bulma": "^0.9.4",
|
|
30
30
|
"vue": "^3.3.8"
|
|
31
31
|
},
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.com/",
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "62924e3ac0fd1187900911ff3346a09929ec5aa3"
|
|
47
47
|
}
|