next-flow-design 1.0.2 → 1.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/dist/index.js CHANGED
@@ -1,92 +1,10 @@
1
- import { css as d, LitElement as c, html as i } from "lit";
2
- import { b as u, n as a, r as g, t as w } from "./nf-select-CUntTjoX.js";
3
- import { N as P } from "./nf-select-CUntTjoX.js";
4
- const v = d`:host{min-width:10rem;position:relative;display:inline-block}::slotted(*){position:absolute;top:50%;left:.75rem;transform:translateY(-50%)}.input{position:absolute;inset:0;padding:var(--nf-input-padding);outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-color);font-weight:var(--nf-font-weight)}.input:has(.toggle-password){padding-right:2.5rem}.input .toggle-password{position:absolute;top:50%;right:.5rem;transform:translateY(-50%);background:0 0;border:none;cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;color:#aaa;transition:color var(--nf-transition-fast) ease;outline:0}.input .toggle-password:hover{color:#c1c1c1}.input .toggle-password:active{color:#e1e1e1}.input .toggle-password svg{display:block}`;
5
- var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (e, t, l, n) => {
6
- for (var s = n > 1 ? void 0 : n ? y(t, l) : t, p = e.length - 1, h; p >= 0; p--)
7
- (h = e[p]) && (s = (n ? h(t, l, s) : h(s)) || s);
8
- return n && s && b(t, l, s), s;
9
- };
10
- let o = class extends c {
11
- constructor() {
12
- super(...arguments), this.value = "", this.placeholder = "", this.type = "text", this.showPassword = !1, this.onInput = (e) => {
13
- e.stopPropagation();
14
- const t = e.target?.value;
15
- this.dispatchEvent(
16
- new CustomEvent("input", {
17
- detail: t,
18
- bubbles: !0,
19
- composed: !0
20
- })
21
- ), t !== void 0 && this.value !== t && this.dispatchEvent(
22
- new CustomEvent("change", {
23
- detail: t,
24
- bubbles: !0,
25
- composed: !0
26
- })
27
- );
28
- }, this.onChange = (e) => {
29
- e.stopPropagation();
30
- const t = e.target?.value;
31
- t !== void 0 && this.value !== t && this.dispatchEvent(
32
- new CustomEvent("change", {
33
- detail: t,
34
- bubbles: !0,
35
- composed: !0
36
- })
37
- );
38
- }, this.onKeyDown = (e) => {
39
- if (e.key === "Enter") {
40
- e.stopPropagation();
41
- const t = e.target?.value;
42
- t !== void 0 && this.dispatchEvent(
43
- new CustomEvent("pressEnter", {
44
- detail: t,
45
- bubbles: !0,
46
- composed: !0
47
- })
48
- );
49
- }
50
- }, this.togglePasswordVisibility = (e) => {
51
- e.preventDefault(), e.stopPropagation(), this.showPassword = !this.showPassword;
52
- };
53
- }
54
- render() {
55
- const e = this.type === "password" && !this.showPassword ? "password" : "text", t = this.type === "password";
56
- return i`<slot></slot><input .value=${e} @change=${this.value} @input=${this.placeholder} @keydown=${this.maxLength ?? ""} class=input maxlength=${this.onInput} placeholder=${this.onChange} type=${this.onKeyDown}> ${t ? i`<button @click=${this.togglePasswordVisibility} aria-label=${this.showPassword ? "Hide password" : "Show password"} class=toggle-password tabindex=-1 type=button>${this.showPassword ? this.renderEyeOffIcon() : this.renderEyeIcon()}</button>` : ""}`;
57
- }
58
- renderEyeIcon() {
59
- return i`<svg fill=none height=16 stroke=currentColor stroke-width=2 viewBox="0 0 24 24"width=16><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx=12 cy=12 r=3 /></svg>`;
60
- }
61
- renderEyeOffIcon() {
62
- return i`<svg fill=none height=16 stroke=currentColor stroke-width=2 viewBox="0 0 24 24"width=16><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1=1 x2=23 y1=1 y2=23 /></svg>`;
63
- }
64
- connectedCallback() {
65
- this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
66
- this.style.transition = "";
67
- });
68
- }
69
- };
70
- o.styles = [u, v];
71
- r([
72
- a({ type: String })
73
- ], o.prototype, "value", 2);
74
- r([
75
- a({ type: String })
76
- ], o.prototype, "placeholder", 2);
77
- r([
78
- a({ type: String })
79
- ], o.prototype, "type", 2);
80
- r([
81
- a({ type: Number })
82
- ], o.prototype, "maxLength", 2);
83
- r([
84
- g()
85
- ], o.prototype, "showPassword", 2);
86
- o = r([
87
- w("nf-input")
88
- ], o);
1
+ import { d as l, e as f, a as m, c as n, N, f as a, b as s } from "./nf-slider-CZmx94AZ.js";
89
2
  export {
90
- o as NfInputElement,
91
- P as NfSelectElement
3
+ l as NfCheckboxElement,
4
+ f as NfColorPickerElement,
5
+ m as NfInputElement,
6
+ n as NfInputNumberElement,
7
+ N as NfSelectElement,
8
+ a as NfSliderElement,
9
+ s as NfSwitchElement
92
10
  };