@citizenplane/pimp 18.19.6 → 18.19.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpInput.vue"],"names":[],"mappings":"AAmDA;
|
|
1
|
+
{"version":3,"file":"CpInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpInput.vue"],"names":[],"mappings":"AAmDA;AAqdA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAUxC,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAC9C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IACtC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,KAAK,WAAW,GAAG,KAAK,CAAC;AAmHzB,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC,CAAC;AAeF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAmMxD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOxD,QAAA,MAAM,UAAU;;;;;;;WAzVN,MAAM;UACP,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;UAGvC,KAAK;gBAFC,MAAM,GAAG,MAAM,GAAG,OAAO;aAG5B,MAAM;kBAVD,MAAM;UACd,MAAM;aACH,MAAM,GAAG,IAAI;6EAgWvB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/pimp.es.js
CHANGED
|
@@ -25308,76 +25308,79 @@ var DA = (e, t) => ({
|
|
|
25308
25308
|
}),
|
|
25309
25309
|
emits: /*@__PURE__*/ S(["update:modelValue"], ["update:modelValue"]),
|
|
25310
25310
|
setup(e, { emit: t }) {
|
|
25311
|
-
let n = e, i = t, o = ue(),
|
|
25312
|
-
|
|
25313
|
-
|
|
25311
|
+
let n = e, i = t, o = ue(), d = a(() => {
|
|
25312
|
+
let { class: e, id: t, ...n } = o;
|
|
25313
|
+
return n;
|
|
25314
|
+
}), f = N(o.id || z()), h = z(), g = z(), _ = a(() => `${h} ${g}`), v = fe(), y = a(() => $E(n.label)), b = de(e, "modelValue", { set(e) {
|
|
25315
|
+
return le(e), e;
|
|
25316
|
+
} }), x = N(!0), S = N(null), E = a(() => ge("disabled")), D = a(() => ge("required")), O = a(() => o.type === "email"), A = a(() => [
|
|
25314
25317
|
o.class,
|
|
25315
25318
|
`cpInput--${n.size}`,
|
|
25316
25319
|
{
|
|
25317
|
-
"cpInput--isInvalid":
|
|
25318
|
-
"cpInput--isDisabled":
|
|
25320
|
+
"cpInput--isInvalid": j.value,
|
|
25321
|
+
"cpInput--isDisabled": E.value,
|
|
25319
25322
|
"cpInput--hasNoBorder": n.removeBorder,
|
|
25320
25323
|
"cpInput--isSearch": n.isSearch
|
|
25321
25324
|
}
|
|
25322
|
-
]),
|
|
25323
|
-
i("update:modelValue", e),
|
|
25324
|
-
},
|
|
25325
|
-
|
|
25326
|
-
},
|
|
25327
|
-
if (!
|
|
25328
|
-
|
|
25329
|
-
},
|
|
25325
|
+
]), j = a(() => n.isInvalid || !x.value), ee = a(() => !!v["leading-icon"]), te = a(() => ee.value || n.isSearch || O.value), ne = a(() => !!v["trailing-icon"]), re = a(() => ne.value || n.isSearch), ie = a(() => re.value && !n.isSearch), P = a(() => S.value?.children.namedItem(f.value)), oe = a(() => j.value && n.errorMessage.length), se = a(() => n.isSearch && b.value.toString().length && !E.value), ce = a(() => n.help?.length && !oe.value), le = (e) => {
|
|
25326
|
+
i("update:modelValue", e), he();
|
|
25327
|
+
}, pe = () => {
|
|
25328
|
+
P.value && P.value.focus();
|
|
25329
|
+
}, he = () => {
|
|
25330
|
+
if (!P.value) return !1;
|
|
25331
|
+
x.value = P.value.validity && P.value.validity.valid || P.value.validity && P.value.validity.valueMissing;
|
|
25332
|
+
}, ge = (e) => o[e] === "" || o[e] === !0, _e = () => i("update:modelValue", "");
|
|
25330
25333
|
return k(async () => {
|
|
25331
|
-
await w(),
|
|
25334
|
+
await w(), he();
|
|
25332
25335
|
}), (t, n) => {
|
|
25333
|
-
let i = I("cp-icon"), a = I("cp-transition-expand"), o = ae("bind-once"),
|
|
25336
|
+
let i = I("cp-icon"), a = I("cp-transition-expand"), o = ae("bind-once"), v = ae("maska");
|
|
25334
25337
|
return M(), l("div", {
|
|
25335
|
-
"aria-disabled":
|
|
25336
|
-
class: T(["cpInput",
|
|
25337
|
-
onClick:
|
|
25338
|
+
"aria-disabled": E.value,
|
|
25339
|
+
class: T(["cpInput", A.value]),
|
|
25340
|
+
onClick: pe
|
|
25338
25341
|
}, [
|
|
25339
25342
|
e.label ? H((M(), s(ij, {
|
|
25340
25343
|
key: 0,
|
|
25341
|
-
"is-invalid":
|
|
25342
|
-
required:
|
|
25344
|
+
"is-invalid": j.value,
|
|
25345
|
+
required: D.value,
|
|
25343
25346
|
tooltip: e.tooltip
|
|
25344
25347
|
}, {
|
|
25345
|
-
default: V(() => [p(L(
|
|
25348
|
+
default: V(() => [p(L(y.value), 1)]),
|
|
25346
25349
|
_: 1
|
|
25347
25350
|
}, 8, [
|
|
25348
25351
|
"is-invalid",
|
|
25349
25352
|
"required",
|
|
25350
25353
|
"tooltip"
|
|
25351
|
-
])), [[o, { for:
|
|
25354
|
+
])), [[o, { for: f.value }]]) : c("", !0),
|
|
25352
25355
|
u("div", {
|
|
25353
25356
|
ref_key: "cpInputContainer",
|
|
25354
|
-
ref:
|
|
25355
|
-
class: T(["cpInput__container", { "cpInput__container--hasBeforeIcon":
|
|
25357
|
+
ref: S,
|
|
25358
|
+
class: T(["cpInput__container", { "cpInput__container--hasBeforeIcon": te.value }])
|
|
25356
25359
|
}, [
|
|
25357
|
-
|
|
25360
|
+
te.value ? (M(), l("div", oj, [e.isSearch ? (M(), s(i, {
|
|
25358
25361
|
key: 0,
|
|
25359
25362
|
type: "search"
|
|
25360
|
-
})) :
|
|
25363
|
+
})) : O.value ? (M(), s(i, {
|
|
25361
25364
|
key: 1,
|
|
25362
25365
|
type: "mail"
|
|
25363
25366
|
})) : F(t.$slots, "leading-icon", { key: 2 })])) : c("", !0),
|
|
25364
|
-
H(u("input", C({ "onUpdate:modelValue": n[0] ||= (e) =>
|
|
25365
|
-
"aria-describedby":
|
|
25366
|
-
"aria-invalid":
|
|
25367
|
+
H(u("input", C({ "onUpdate:modelValue": n[0] ||= (e) => b.value = e }, d.value, {
|
|
25368
|
+
"aria-describedby": _.value,
|
|
25369
|
+
"aria-invalid": j.value,
|
|
25367
25370
|
class: "cpInput__inner",
|
|
25368
25371
|
"data-maska": e.mask,
|
|
25369
|
-
disabled:
|
|
25372
|
+
disabled: E.value
|
|
25370
25373
|
}), null, 16, sj), [
|
|
25371
|
-
[me,
|
|
25372
|
-
[o, { id:
|
|
25373
|
-
[
|
|
25374
|
+
[me, b.value],
|
|
25375
|
+
[o, { id: f.value }],
|
|
25376
|
+
[v]
|
|
25374
25377
|
]),
|
|
25375
|
-
|
|
25376
|
-
default: V(() => [
|
|
25378
|
+
re.value ? (M(), l("div", cj, [ie.value ? F(t.$slots, "trailing-icon", { key: 0 }) : c("", !0), m(r, { name: "fade" }, {
|
|
25379
|
+
default: V(() => [se.value ? (M(), l("button", {
|
|
25377
25380
|
key: 0,
|
|
25378
25381
|
class: "cpInput__clear",
|
|
25379
25382
|
type: "button",
|
|
25380
|
-
onClick:
|
|
25383
|
+
onClick: _e
|
|
25381
25384
|
}, [m(i, {
|
|
25382
25385
|
class: "cpInput__clearIcon",
|
|
25383
25386
|
type: "x"
|
|
@@ -25386,13 +25389,13 @@ var DA = (e, t) => ({
|
|
|
25386
25389
|
})])) : c("", !0)
|
|
25387
25390
|
], 2),
|
|
25388
25391
|
m(a, { mode: "out-in" }, {
|
|
25389
|
-
default: V(() => [
|
|
25392
|
+
default: V(() => [oe.value ? (M(), l("p", {
|
|
25390
25393
|
key: 0,
|
|
25391
|
-
id: R(
|
|
25394
|
+
id: R(g),
|
|
25392
25395
|
class: "cpInput__error"
|
|
25393
|
-
}, L(e.errorMessage), 9, lj)) :
|
|
25396
|
+
}, L(e.errorMessage), 9, lj)) : ce.value ? (M(), l("p", {
|
|
25394
25397
|
key: 1,
|
|
25395
|
-
id: R(
|
|
25398
|
+
id: R(h),
|
|
25396
25399
|
class: "cpInput__help"
|
|
25397
25400
|
}, L(e.help), 9, uj)) : c("", !0)]),
|
|
25398
25401
|
_: 1
|