@espri/vue-components 2.0.3 → 2.1.0

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/README.md CHANGED
@@ -25,6 +25,7 @@ import EspriInputNumber from '@espri/vue-components/input-number';
25
25
  ### Inputs
26
26
 
27
27
  - `EspriInputNumber`
28
+ - `EspriInputPassword`
28
29
  - `EspriInputText`
29
30
  - `EspriSelect`
30
31
 
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };
package/dist/index.es.js CHANGED
@@ -1,10 +1,12 @@
1
- import { default as t } from "./input-number.es.js";
2
- import { default as p } from "./input-text.es.js";
3
- import { default as f } from "./select.es.js";
4
- import { default as u } from "./virtual-keyboard.es.js";
1
+ import { default as e } from "./input-number.es.js";
2
+ import { default as p } from "./input-password.es.js";
3
+ import { default as s } from "./input-text.es.js";
4
+ import { default as u } from "./select.es.js";
5
+ import { default as l } from "./virtual-keyboard.es.js";
5
6
  export {
6
- t as EspriInputNumber,
7
- p as EspriInputText,
8
- f as EspriSelect,
9
- u as EspriVirtualKeyboard
7
+ e as EspriInputNumber,
8
+ p as EspriInputPassword,
9
+ s as EspriInputText,
10
+ u as EspriSelect,
11
+ l as EspriVirtualKeyboard
10
12
  };
@@ -0,0 +1 @@
1
+ .error[data-v-8eb7b6a7]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
@@ -1,9 +1,7 @@
1
- import { defineComponent as b, computed as m, openBlock as i, createElementBlock as d, normalizeClass as u, createBlock as c, unref as a, withCtx as V, createVNode as _, createElementVNode as p, createTextVNode as h, toDisplayString as f, createCommentVNode as v } from "vue";
1
+ import { defineComponent as _, computed as m, openBlock as a, createElementBlock as d, normalizeClass as u, createBlock as c, unref as o, withCtx as g, createVNode as V, createElementVNode as p, createTextVNode as v, toDisplayString as f, createCommentVNode as h } from "vue";
2
2
  import { Skeleton as k, FloatLabel as B, InputNumber as C } from "primevue";
3
- const N = ["for"], D = {
4
- key: 0,
5
- class: "text-danger"
6
- }, E = { class: "text-danger" }, F = /* @__PURE__ */ b({
3
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ import './input-number.css';const E = ["for"], D = { key: 0 }, F = { class: "error" }, $ = /* @__PURE__ */ _({
7
5
  __name: "input-number",
8
6
  props: {
9
7
  label: {},
@@ -26,29 +24,29 @@ const N = ["for"], D = {
26
24
  placeholder: {}
27
25
  },
28
26
  emits: ["update:modelValue"],
29
- setup(x, { emit: g }) {
30
- const e = x, o = g, n = Math.random().toString(16).slice(2), s = m({
27
+ setup(x, { emit: b }) {
28
+ const e = x, i = b, s = Math.random().toString(16).slice(2), n = m({
31
29
  get() {
32
- return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (o("update:modelValue", null), null) : e.modelValue;
30
+ return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (i("update:modelValue", null), null) : e.modelValue;
33
31
  },
34
32
  set(t) {
35
- (t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), o("update:modelValue", t);
33
+ (t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), i("update:modelValue", t);
36
34
  }
37
35
  }), r = m(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
38
- return (t, l) => (i(), d("div", {
36
+ return (t, l) => (a(), d("div", {
39
37
  class: u(`field ${e.class || ""}`)
40
38
  }, [
41
- e.loading ? (i(), c(a(k), {
39
+ e.loading ? (a(), c(o(k), {
42
40
  key: 0,
43
41
  class: "skeleton-input mt-3"
44
- })) : (i(), c(a(B), {
42
+ })) : (a(), c(o(B), {
45
43
  key: 1,
46
44
  class: "mt-3"
47
45
  }, {
48
- default: V(() => [
49
- _(a(C), {
50
- modelValue: s.value,
51
- "onUpdate:modelValue": l[0] || (l[0] = (y) => s.value = y),
46
+ default: g(() => [
47
+ V(o(C), {
48
+ modelValue: n.value,
49
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => n.value = y),
52
50
  class: u(["w-full", e.class]),
53
51
  min: e.min,
54
52
  max: e.max,
@@ -62,19 +60,19 @@ const N = ["for"], D = {
62
60
  "input-class": e.inputClass,
63
61
  disabled: e.disabled,
64
62
  placeholder: e.placeholder,
65
- "input-id": a(n)
63
+ "input-id": o(s)
66
64
  }, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "input-class", "disabled", "placeholder", "input-id"]),
67
- p("label", { for: a(n) }, [
68
- h(f(e.label), 1),
69
- e.required ? (i(), d("span", D, " *")) : v("", !0)
70
- ], 8, N)
65
+ p("label", { for: o(s) }, [
66
+ v(f(e.label), 1),
67
+ e.required ? (a(), d("span", D, " *")) : h("", !0)
68
+ ], 8, E)
71
69
  ]),
72
70
  _: 1
73
71
  })),
74
- p("small", E, f(r.value), 1)
72
+ p("small", F, f(r.value), 1)
75
73
  ], 2));
76
74
  }
77
- }), q = F;
75
+ }), S = /* @__PURE__ */ N($, [["__scopeId", "data-v-8eb7b6a7"]]), R = S;
78
76
  export {
79
- q as default
77
+ R as default
80
78
  };
@@ -0,0 +1 @@
1
+ .error[data-v-e3a9900a]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
@@ -0,0 +1,68 @@
1
+ import { defineComponent as k, computed as r, openBlock as o, createElementBlock as i, normalizeClass as p, createBlock as c, unref as a, withCtx as y, createVNode as w, createElementVNode as u, createTextVNode as V, toDisplayString as m, createCommentVNode as v } from "vue";
2
+ import { Skeleton as B, FloatLabel as b, Password as x } from "primevue";
3
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ import './input-password.css';const P = ["for"], E = { key: 0 }, N = { class: "error" }, $ = /* @__PURE__ */ k({
5
+ __name: "input-password",
6
+ props: {
7
+ label: {},
8
+ modelValue: {},
9
+ class: {},
10
+ inputClass: {},
11
+ disabled: { type: Boolean },
12
+ required: { type: Boolean },
13
+ loading: { type: Boolean },
14
+ showError: { type: Boolean },
15
+ rules: {},
16
+ maxlength: {},
17
+ placeholder: {},
18
+ displayPasswordFeedBack: { type: Boolean },
19
+ displayPasswordToggle: { type: Boolean }
20
+ },
21
+ emits: ["update:modelValue"],
22
+ setup(g, { emit: f }) {
23
+ const e = g, _ = f, t = Math.random().toString(16).slice(2), d = r({
24
+ get() {
25
+ return e.modelValue;
26
+ },
27
+ set(s) {
28
+ _("update:modelValue", s);
29
+ }
30
+ }), n = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
31
+ return (s, l) => (o(), i("div", {
32
+ class: p(`field ${e.class || ""}`)
33
+ }, [
34
+ e.loading ? (o(), c(a(B), {
35
+ key: 0,
36
+ class: "skeleton-input mt-3"
37
+ })) : (o(), c(a(b), {
38
+ key: 1,
39
+ class: "mt-3"
40
+ }, {
41
+ default: y(() => [
42
+ w(a(x), {
43
+ modelValue: d.value,
44
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => d.value = h),
45
+ class: p(["w-full", e.class]),
46
+ "input-class": e.inputClass,
47
+ invalid: !!n.value,
48
+ maxlength: e.maxlength,
49
+ feedback: e.displayPasswordFeedBack,
50
+ "toggle-mask": e.displayPasswordToggle,
51
+ disabled: e.disabled,
52
+ placeholder: e.placeholder,
53
+ "input-id": a(t)
54
+ }, null, 8, ["modelValue", "class", "input-class", "invalid", "maxlength", "feedback", "toggle-mask", "disabled", "placeholder", "input-id"]),
55
+ u("label", { for: a(t) }, [
56
+ V(m(e.label), 1),
57
+ e.required ? (o(), i("span", E, " *")) : v("", !0)
58
+ ], 8, P)
59
+ ]),
60
+ _: 1
61
+ })),
62
+ u("small", N, m(n.value), 1)
63
+ ], 2));
64
+ }
65
+ }), F = /* @__PURE__ */ C($, [["__scopeId", "data-v-e3a9900a"]]), q = F;
66
+ export {
67
+ q as default
68
+ };
@@ -0,0 +1 @@
1
+ .error[data-v-2a41cea7]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
@@ -1,9 +1,7 @@
1
- import { defineComponent as V, computed as r, openBlock as a, createElementBlock as i, normalizeClass as u, createBlock as c, unref as t, withCtx as _, createVNode as v, createElementVNode as m, createTextVNode as b, toDisplayString as p, createCommentVNode as k } from "vue";
1
+ import { defineComponent as V, computed as d, openBlock as o, createElementBlock as i, normalizeClass as u, createBlock as c, unref as t, withCtx as g, createVNode as v, createElementVNode as m, createTextVNode as b, toDisplayString as p, createCommentVNode as k } from "vue";
2
2
  import { Skeleton as y, FloatLabel as B, InputText as E } from "primevue";
3
- const w = ["for"], C = {
4
- key: 0,
5
- class: "text-danger"
6
- }, N = { class: "text-danger" }, $ = /* @__PURE__ */ V({
3
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ import './input-text.css';const w = ["for"], I = { key: 0 }, N = { class: "error" }, T = /* @__PURE__ */ V({
7
5
  __name: "input-text",
8
6
  props: {
9
7
  label: {},
@@ -18,31 +16,31 @@ const w = ["for"], C = {
18
16
  placeholder: {}
19
17
  },
20
18
  emits: ["update:modelValue"],
21
- setup(h, { emit: f }) {
22
- const e = h, g = f, s = Math.random().toString(16).slice(2), n = r({
19
+ setup(_, { emit: f }) {
20
+ const e = _, h = f, s = Math.random().toString(16).slice(2), n = d({
23
21
  get() {
24
22
  return e.modelValue;
25
23
  },
26
- set(o) {
27
- g("update:modelValue", o);
24
+ set(a) {
25
+ h("update:modelValue", a);
28
26
  }
29
- }), d = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
30
- return (o, l) => (a(), i("div", {
27
+ }), r = d(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
28
+ return (a, l) => (o(), i("div", {
31
29
  class: u(`field ${e.class || ""}`)
32
30
  }, [
33
- e.loading ? (a(), c(t(y), {
31
+ e.loading ? (o(), c(t(y), {
34
32
  key: 0,
35
33
  class: "skeleton-input mt-3"
36
- })) : (a(), c(t(B), {
34
+ })) : (o(), c(t(B), {
37
35
  key: 1,
38
36
  class: "mt-3"
39
37
  }, {
40
- default: _(() => [
38
+ default: g(() => [
41
39
  v(t(E), {
42
40
  modelValue: n.value,
43
41
  "onUpdate:modelValue": l[0] || (l[0] = (x) => n.value = x),
44
42
  class: u(["w-full", e.class]),
45
- invalid: !!d.value,
43
+ invalid: !!r.value,
46
44
  maxlength: e.maxlength,
47
45
  disabled: e.disabled,
48
46
  placeholder: e.placeholder,
@@ -50,15 +48,15 @@ const w = ["for"], C = {
50
48
  }, null, 8, ["modelValue", "class", "invalid", "maxlength", "disabled", "placeholder", "input-id"]),
51
49
  m("label", { for: t(s) }, [
52
50
  b(p(e.label), 1),
53
- e.required ? (a(), i("span", C, " *")) : k("", !0)
51
+ e.required ? (o(), i("span", I, " *")) : k("", !0)
54
52
  ], 8, w)
55
53
  ]),
56
54
  _: 1
57
55
  })),
58
- m("small", N, p(d.value), 1)
56
+ m("small", N, p(r.value), 1)
59
57
  ], 2));
60
58
  }
61
- }), q = $;
59
+ }), $ = /* @__PURE__ */ C(T, [["__scopeId", "data-v-2a41cea7"]]), z = $;
62
60
  export {
63
- q as default
61
+ z as default
64
62
  };
@@ -0,0 +1 @@
1
+ .error[data-v-5a8f854e]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
package/dist/select.es.js CHANGED
@@ -1,9 +1,7 @@
1
- import { defineComponent as _, computed as r, openBlock as t, createElementBlock as i, normalizeClass as c, createBlock as u, unref as o, withCtx as b, createVNode as g, createElementVNode as p, createTextVNode as y, toDisplayString as m, createCommentVNode as k } from "vue";
2
- import { Skeleton as x, FloatLabel as B, Select as E } from "primevue";
3
- const S = ["for"], w = {
4
- key: 0,
5
- class: "text-danger"
6
- }, C = { class: "text-danger" }, N = /* @__PURE__ */ _({
1
+ import { defineComponent as h, computed as i, openBlock as t, createElementBlock as d, normalizeClass as c, createBlock as p, unref as o, withCtx as b, createVNode as y, createElementVNode as u, createTextVNode as g, toDisplayString as m, createCommentVNode as k } from "vue";
2
+ import { Skeleton as B, FloatLabel as x, Select as E } from "primevue";
3
+ import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ import './select.css';const C = ["for"], w = { key: 0 }, N = { class: "error" }, $ = /* @__PURE__ */ h({
7
5
  __name: "select",
8
6
  props: {
9
7
  label: {},
@@ -20,49 +18,49 @@ const S = ["for"], w = {
20
18
  modelValue: {}
21
19
  },
22
20
  emits: ["update:modelValue"],
23
- setup(f, { emit: v }) {
24
- const e = f, V = v, s = Math.random().toString(16).slice(2), n = r({
21
+ setup(f, { emit: _ }) {
22
+ const e = f, v = _, s = Math.random().toString(16).slice(2), n = i({
25
23
  get() {
26
24
  return e.modelValue;
27
25
  },
28
26
  set(a) {
29
- V("update:modelValue", a);
27
+ v("update:modelValue", a);
30
28
  }
31
- }), d = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
32
- return (a, l) => (t(), i("div", {
29
+ }), r = i(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
30
+ return (a, l) => (t(), d("div", {
33
31
  class: c(`field ${e.class || ""}`)
34
32
  }, [
35
- e.loading ? (t(), u(o(x), {
33
+ e.loading ? (t(), p(o(B), {
36
34
  key: 0,
37
35
  class: "skeleton-input mt-3"
38
- })) : (t(), u(o(B), {
36
+ })) : (t(), p(o(x), {
39
37
  key: 1,
40
38
  class: "mt-3"
41
39
  }, {
42
40
  default: b(() => [
43
- g(o(E), {
41
+ y(o(E), {
44
42
  modelValue: n.value,
45
- "onUpdate:modelValue": l[0] || (l[0] = (h) => n.value = h),
43
+ "onUpdate:modelValue": l[0] || (l[0] = (V) => n.value = V),
46
44
  options: e.options,
47
45
  "option-label": "label",
48
46
  "option-value": "value",
49
47
  class: c(["w-full", e.class]),
50
- invalid: !!d.value,
48
+ invalid: !!r.value,
51
49
  disabled: e.disabled,
52
50
  placeholder: e.placeholder,
53
51
  "input-id": o(s)
54
52
  }, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
55
- p("label", { for: o(s) }, [
56
- y(m(e.label), 1),
57
- e.required ? (t(), i("span", w, " *")) : k("", !0)
58
- ], 8, S)
53
+ u("label", { for: o(s) }, [
54
+ g(m(e.label), 1),
55
+ e.required ? (t(), d("span", w, " *")) : k("", !0)
56
+ ], 8, C)
59
57
  ]),
60
58
  _: 1
61
59
  })),
62
- p("small", C, m(d.value), 1)
60
+ u("small", N, m(r.value), 1)
63
61
  ], 2));
64
62
  }
65
- }), R = N;
63
+ }), q = /* @__PURE__ */ S($, [["__scopeId", "data-v-5a8f854e"]]), F = q;
66
64
  export {
67
- R as default
65
+ F as default
68
66
  };
@@ -1,5 +1,6 @@
1
1
  import EspriInputNumber from './input-number';
2
+ import EspriInputPassword from './input-password';
2
3
  import EspriInputText from './input-text';
3
4
  import EspriSelect from './select';
4
5
  import EspriVirtualKeyboard from './virtual-keyboard';
5
- export { EspriInputNumber, EspriInputText, EspriSelect, EspriVirtualKeyboard, };
6
+ export { EspriInputNumber, EspriInputPassword, EspriInputText, EspriSelect, EspriVirtualKeyboard, };
@@ -0,0 +1,19 @@
1
+ import type { DefineComponent } from 'vue';
2
+ import type EspriInputPasswordEmits from './interfaces/input-password-emits.interface';
3
+ import type { EspriInputPasswordEmitsForDoc } from './interfaces/input-password-emits.interface';
4
+ import type EspriInputPasswordProps from './interfaces/input-password-props.interface';
5
+ /**
6
+ * **ESPRI Digital - Input Password (Vue component)**
7
+ * --- ---
8
+ * ![ESPRIDigital](https://espridigital.fr/wp-content/uploads/2024/09/logo_espri_digital_white-100-1.png)
9
+ *
10
+ */
11
+ declare const EspriInputPassword: DefineComponent<EspriInputPasswordProps, {}, // For slots if any
12
+ {}, // For methods or data if any
13
+ {}, // Computed
14
+ {}, // Methods
15
+ {}, // Mixin
16
+ {}, // Extends
17
+ EspriInputPasswordEmitsForDoc>;
18
+ export default EspriInputPassword;
19
+ export type { EspriInputPasswordEmits, EspriInputPasswordProps };
@@ -0,0 +1,10 @@
1
+ import type { ObjectEmitsOptions } from 'vue';
2
+ export default interface EspriInputPasswordEmits {
3
+ (e: 'update:modelValue', value: any): void;
4
+ }
5
+ export interface EspriInputPasswordEmitsForDoc extends ObjectEmitsOptions {
6
+ /**
7
+ * Called when modelValue is updated.
8
+ */
9
+ 'update:modelValue': (value: any) => void;
10
+ }
@@ -0,0 +1,60 @@
1
+ export default interface EspriInputPasswordProps {
2
+ /**
3
+ * Label displayed above the input.
4
+ */
5
+ label: string;
6
+ /**
7
+ * Model value representing the current state of the input.
8
+ */
9
+ modelValue: string | null;
10
+ /**
11
+ * Class of the component.
12
+ */
13
+ class?: any;
14
+ /**
15
+ * Optional CSS class applied to the input element.
16
+ */
17
+ inputClass?: string;
18
+ /**
19
+ * Disables the input when true.
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Marks the input as required when true.
24
+ */
25
+ required?: boolean;
26
+ /**
27
+ * Indicates if the input is in a loading state.
28
+ */
29
+ loading: boolean;
30
+ /**
31
+ * Shows error messages when true.
32
+ */
33
+ showError?: boolean;
34
+ /**
35
+ * Validation rules for the input.
36
+ * Each rule can be undefined or an object containing:
37
+ * - $invalid: whether the rule is violated
38
+ * - $message: the error message associated with the rule
39
+ */
40
+ rules?: Array<{
41
+ $invalid: boolean;
42
+ $message: string;
43
+ } | undefined>;
44
+ /**
45
+ * Maximum number of characters allowed in the input.
46
+ */
47
+ maxlength?: number;
48
+ /**
49
+ * Placeholder text displayed inside the input.
50
+ */
51
+ placeholder?: string;
52
+ /**
53
+ * Whether to display feedback for the password field (e.g., strength meter).
54
+ */
55
+ displayPasswordFeedBack?: boolean;
56
+ /**
57
+ * Whether to display a toggle for showing/hiding the password.
58
+ */
59
+ displayPasswordToggle?: boolean;
60
+ }
@@ -1 +1 @@
1
- .hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}#keyboard[data-v-7fa2df55]{position:fixed;bottom:0;left:0;width:100%}.hide-keyboard[data-v-7fa2df55]{display:none}.hg-button[data-skbtn="{shift}"],.hg-button[data-skbtn="{enter}"]{flex-grow:1;font-size:1.5em;width:20px}.hg-button[data-skbtn="{bksp}"]{width:20px}.hg-button[data-skbtn="{space}"]{flex-grow:8}
1
+ .hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}#keyboard[data-v-d0bbce72]{position:fixed;bottom:0;left:0;width:100%;z-index:10}.hide-keyboard[data-v-d0bbce72]{display:none}.hg-button[data-skbtn="{shift}"],.hg-button[data-skbtn="{enter}"]{flex-grow:1;font-size:1.5em;width:20px}.hg-button[data-skbtn="{bksp}"]{width:20px}.hg-button[data-skbtn="{space}"]{flex-grow:8}
@@ -1,23 +1,24 @@
1
- import { defineComponent as F, ref as u, onMounted as A, onBeforeUnmount as M, watch as R, openBlock as q, createElementBlock as P, normalizeClass as T, createElementVNode as V } from "vue";
1
+ import { defineComponent as O, ref as a, onMounted as A, onBeforeUnmount as M, watch as R, openBlock as q, createElementBlock as P, normalizeClass as w, createElementVNode as V } from "vue";
2
2
  import Y from "simple-keyboard";
3
- import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textarea:not(.not-open-keyboard)", x = "default-class", d = 230, U = /* @__PURE__ */ F({
3
+ import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ import './virtual-keyboard.css';const L = "input:not(.not-open-keyboard), textarea:not(.not-open-keyboard)", T = "default-class", i = 230, z = /* @__PURE__ */ O({
4
5
  __name: "virtual-keyboard",
5
6
  props: {
6
7
  refreshInputsTimestamp: {}
7
8
  },
8
- setup(r) {
9
- const l = r, t = u(null), a = u(0), s = u(!0);
10
- let v = 0;
11
- const o = u(null), f = u();
12
- let i = 0;
13
- function C() {
9
+ setup(x) {
10
+ const C = x, t = a(null), s = a(0), u = a(!0);
11
+ let c = 0;
12
+ const n = a(null), d = a();
13
+ let r = 0;
14
+ function _() {
14
15
  return !!t.value?.className.includes("keyboard-force-dispatch-event");
15
16
  }
16
- function m() {
17
+ function v() {
17
18
  return t.value?.className.includes("keyboard-number") ? "numeric" : "text";
18
19
  }
19
20
  function I(e = !1) {
20
- o.value && o.value.setOptions({
21
+ n.value && n.value.setOptions({
21
22
  layout: {
22
23
  default: [
23
24
  `& é " ' ( § è ! ç à ) - {bksp}`,
@@ -35,15 +36,15 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
35
36
  ]
36
37
  },
37
38
  newLineOnEnter: e
38
- }), c();
39
+ }), l();
39
40
  }
40
- function c() {
41
- document.querySelectorAll("#keyboard .hg-rows, #keyboard .hg-row, #keyboard .hg-button").forEach((n) => {
42
- n.removeEventListener("mousedown", g), n.addEventListener("mousedown", g), n.removeEventListener("touchstart", k), n.addEventListener("touchstart", k);
41
+ function l() {
42
+ document.querySelectorAll("#keyboard .hg-rows, #keyboard .hg-row, #keyboard .hg-button").forEach((o) => {
43
+ o.removeEventListener("mousedown", y), o.addEventListener("mousedown", y), o.removeEventListener("touchstart", b), o.addEventListener("touchstart", b);
43
44
  });
44
45
  }
45
46
  function B() {
46
- o.value && o.value.setOptions({
47
+ n.value && n.value.setOptions({
47
48
  layout: {
48
49
  default: [
49
50
  "1 2 3 {bksp}",
@@ -53,76 +54,76 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
53
54
  ]
54
55
  },
55
56
  newLineOnEnter: !1
56
- }), c();
57
+ }), l();
57
58
  }
58
- function p() {
59
- document.querySelectorAll(_).forEach((e) => {
60
- e.addEventListener("focus", y), e.addEventListener("input", b);
59
+ function f() {
60
+ document.querySelectorAll(L).forEach((e) => {
61
+ e.addEventListener("focus", p), e.addEventListener("input", h);
61
62
  });
62
63
  }
63
- function h(e) {
64
- if (Date.now() - v < 100)
64
+ function m(e) {
65
+ if (Date.now() - c < 100)
65
66
  return;
66
- const n = e.target;
67
- t.value && !t.value.contains(n) && !f.value?.contains(n) && E();
67
+ const o = e.target;
68
+ t.value && !t.value.contains(o) && !d.value?.contains(o) && g();
68
69
  }
69
- function y(e) {
70
- v = Date.now(), t.value = e.target, o.value && (o.value.setInput(t.value.value), D());
70
+ function p(e) {
71
+ c = Date.now(), t.value = e.target, n.value && (n.value.setInput(t.value.value), D());
71
72
  }
72
- function b(e) {
73
- o.value?.setInput(e.target.value);
73
+ function h(e) {
74
+ n.value?.setInput(e.target.value);
74
75
  }
75
- function g(e) {
76
+ function y(e) {
76
77
  e.preventDefault();
77
78
  }
78
- function k(e) {
79
+ function b(e) {
79
80
  e.preventDefault();
80
81
  }
81
82
  function S() {
82
- if (o.value) {
83
- const n = o.value.options.layoutName === "default" ? "shift" : "default";
84
- o.value.setOptions({
85
- layoutName: n
86
- }), c();
83
+ if (n.value) {
84
+ const o = n.value.options.layoutName === "default" ? "shift" : "default";
85
+ n.value.setOptions({
86
+ layoutName: o
87
+ }), l();
87
88
  }
88
89
  }
89
- function E() {
90
- s.value = !0, t.value = null, a.value = 0, document.body.style.marginBottom = `${i + a.value}px`;
90
+ function g() {
91
+ u.value = !0, t.value = null, s.value = 0, document.body.style.marginBottom = `${r + s.value}px`;
91
92
  }
92
93
  function D() {
93
- if (s.value = !1, t.value) {
94
- m() === "numeric" ? B() : I(t.value.tagName.toLowerCase() === "textarea");
95
- const e = t.value.getBoundingClientRect(), n = document.documentElement.scrollHeight;
96
- n - e.bottom < d && (a.value = d - (n - e.bottom) + 30, i = +document.body.style.marginBottom.split("px")[0], document.body.style.marginBottom = `${i + a.value}px`);
94
+ if (u.value = !1, t.value) {
95
+ v() === "numeric" ? B() : I(t.value.tagName.toLowerCase() === "textarea");
96
+ const e = t.value.getBoundingClientRect(), o = document.documentElement.scrollHeight;
97
+ o - e.bottom < i && (s.value = i - (o - e.bottom) + 30, r = +document.body.style.marginBottom.split("px")[0], document.body.style.marginBottom = `${r + s.value}px`);
97
98
  }
98
99
  setTimeout(() => {
99
100
  if (t.value) {
100
- const e = t.value.getBoundingClientRect(), n = document.documentElement.scrollHeight, L = window.innerHeight, N = window.scrollY + L - e.bottom, H = window.scrollY + (window.scrollY + (d - N)) + 30, O = n - L;
101
- window.scrollTo({ top: Math.min(H, O), behavior: "smooth" });
101
+ const e = t.value.getBoundingClientRect(), o = document.documentElement.scrollHeight, E = window.innerHeight, N = window.scrollY + E - e.bottom, H = window.scrollY + (window.scrollY + (i - N)) + 30, F = o - E;
102
+ window.scrollTo({ top: Math.min(H, F), behavior: "smooth" });
102
103
  }
103
104
  }, 100);
104
105
  }
105
- function w() {
106
- document.querySelectorAll(_).forEach((e) => {
107
- e.removeEventListener("focus", y), e.removeEventListener("input", b);
106
+ function k() {
107
+ document.querySelectorAll(L).forEach((e) => {
108
+ e.removeEventListener("focus", p), e.removeEventListener("input", h);
108
109
  });
109
110
  }
110
111
  function K() {
111
- w(), p();
112
+ k(), f();
112
113
  }
113
114
  return A(async () => {
114
- o.value = new Y(x, {
115
+ n.value = new Y(T, {
115
116
  onChange: (e) => {
116
- t.value && (t.value.value = e, (C() || m() === "text") && t.value.dispatchEvent(new Event("input")));
117
+ t.value && (t.value.value = e, (_() || v() === "text") && t.value.dispatchEvent(new Event("input")));
117
118
  },
118
119
  onKeyPress: (e) => {
119
120
  if (t.value) {
120
- const n = (t.value.selectionStart || 0) + (e === "{bksp}" ? -1 : 1);
121
+ const o = (t.value.selectionStart || 0) + (e === "{bksp}" ? -1 : 1);
121
122
  setTimeout(() => {
122
- t.value && t.value.setSelectionRange(n, n);
123
+ t.value && t.value.setSelectionRange(o, o);
123
124
  }, 0);
124
125
  }
125
- e === "{shift}" || e === "{lock}" ? S() : e === "{enter}" && t.value && t.value.tagName.toLowerCase() !== "textarea" && (t.value.blur(), E());
126
+ e === "{shift}" || e === "{lock}" ? S() : e === "{enter}" && t.value && t.value.tagName.toLowerCase() !== "textarea" && (t.value.blur(), g());
126
127
  },
127
128
  display: {
128
129
  "{bksp}": "⌫",
@@ -132,28 +133,23 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
132
133
  "{space}": " ",
133
134
  "{tab}": "⇆"
134
135
  }
135
- }), p(), document.addEventListener("click", h);
136
+ }), f(), document.addEventListener("click", m);
136
137
  }), M(() => {
137
- w(), document.removeEventListener("click", h);
138
- }), R(() => l.refreshInputsTimestamp, () => {
138
+ k(), document.removeEventListener("click", m);
139
+ }), R(() => C.refreshInputsTimestamp, () => {
139
140
  K();
140
- }), (e, n) => (q(), P("div", {
141
+ }), (e, o) => (q(), P("div", {
141
142
  id: "keyboard",
142
143
  ref_key: "keyboardContainer",
143
- ref: f,
144
- class: T({ "hide-keyboard": s.value })
144
+ ref: d,
145
+ class: w({ "hide-keyboard": u.value })
145
146
  }, [
146
147
  V("div", {
147
- class: T(x)
148
+ class: w(T)
148
149
  })
149
150
  ], 2));
150
151
  }
151
- }), z = (r, l) => {
152
- const t = r.__vccOpts || r;
153
- for (const [a, s] of l)
154
- t[a] = s;
155
- return t;
156
- }, $ = /* @__PURE__ */ z(U, [["__scopeId", "data-v-7fa2df55"]]), J = $;
152
+ }), $ = /* @__PURE__ */ U(z, [["__scopeId", "data-v-d0bbce72"]]), Q = $;
157
153
  export {
158
- J as default
154
+ Q as default
159
155
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@espri/vue-components",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "ESPRI Digital - Vue components library",
5
5
  "author": "ESPRI Digital",
6
6
  "homepage": "https://github.com/ESPRI-Digital/vue-select#readme",
@@ -16,6 +16,10 @@
16
16
  "types": "./dist/types/input-number/index.d.ts",
17
17
  "import": "./dist/input-number.es.js"
18
18
  },
19
+ "./input-password": {
20
+ "types": "./dist/types/input-password/index.d.ts",
21
+ "import": "./dist/input-password.es.js"
22
+ },
19
23
  "./input-text": {
20
24
  "types": "./dist/types/input-text/index.d.ts",
21
25
  "import": "./dist/input-text.es.js"