@grayscale-dev/dragon 0.1.5 → 0.1.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/README.md +22 -2
- package/dist/components/dui-input.d.ts +9 -0
- package/dist/index.js +189 -65
- package/dist/manifest.json +55 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ npm --workspace packages/ui run build:manifest
|
|
|
23
23
|
npm --workspace packages/ui run test
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Covers value/property sync, native `input`/`change` events, form association, focus forwarding, styling hooks, and manifest integrity.
|
|
26
|
+
Covers value/property sync, native `input`/`change` events, form association, focus forwarding, styling hooks, masking behavior, and manifest integrity.
|
|
27
27
|
|
|
28
28
|
**Usage (Vanilla)**
|
|
29
29
|
|
|
@@ -142,7 +142,27 @@ dui-input::part(input) {
|
|
|
142
142
|
|
|
143
143
|
- `label-position="above"` (default): label sits above the field.
|
|
144
144
|
- `label-position="floating"`: label sits like a placeholder and floats to the top-left on focus or when the input has a value.
|
|
145
|
-
- Floating mode hides placeholder text to avoid overlap with the label.
|
|
145
|
+
- Floating mode hides placeholder text to avoid overlap with the label, unless regex placeholder mode is enabled while focused.
|
|
146
|
+
|
|
147
|
+
**Masking**
|
|
148
|
+
|
|
149
|
+
`regex` enables mask formatting using a supported regex-like pattern.
|
|
150
|
+
|
|
151
|
+
- Example phone pattern: `^\(\d{3}\)\s\d{3}-\d{4}$`
|
|
152
|
+
- As the user types, input is normalized to the mask shape.
|
|
153
|
+
- `show-regex-placeholder` shows a generated placeholder such as `(xxx) xxx-xxxx`.
|
|
154
|
+
- With `label-position="floating"`, the regex placeholder appears only while focused.
|
|
155
|
+
|
|
156
|
+
Example:
|
|
157
|
+
|
|
158
|
+
```html
|
|
159
|
+
<dui-input
|
|
160
|
+
label="Phone"
|
|
161
|
+
label-position="floating"
|
|
162
|
+
regex="^\(\d{3}\)\s\d{3}-\d{4}$"
|
|
163
|
+
show-regex-placeholder
|
|
164
|
+
></dui-input>
|
|
165
|
+
```
|
|
146
166
|
|
|
147
167
|
**Form Behavior**
|
|
148
168
|
|
|
@@ -11,21 +11,30 @@ export declare class DuiInput extends LitElement {
|
|
|
11
11
|
autocomplete?: string;
|
|
12
12
|
label: string;
|
|
13
13
|
labelPosition: 'floating' | 'above';
|
|
14
|
+
regex: string;
|
|
15
|
+
showRegexPlaceholder: boolean;
|
|
16
|
+
showRegexPlaceholer: boolean;
|
|
14
17
|
private inputEl?;
|
|
15
18
|
private internals?;
|
|
16
19
|
private defaultValue?;
|
|
20
|
+
private mask;
|
|
21
|
+
private isFocused;
|
|
17
22
|
constructor();
|
|
18
23
|
connectedCallback(): void;
|
|
24
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
19
25
|
updated(changed: Map<string, unknown>): void;
|
|
20
26
|
focus(options?: FocusOptions): void;
|
|
21
27
|
blur(): void;
|
|
22
28
|
formResetCallback(): void;
|
|
23
29
|
formStateRestoreCallback(state: unknown): void;
|
|
24
30
|
formDisabledCallback(disabled: boolean): void;
|
|
31
|
+
private normalizeMaskedValue;
|
|
25
32
|
private syncFormValue;
|
|
26
33
|
private handleInput;
|
|
27
34
|
private handleChange;
|
|
28
35
|
private handleKeydown;
|
|
36
|
+
private handleFocus;
|
|
37
|
+
private handleBlur;
|
|
29
38
|
render(): import("lit-html").TemplateResult<1>;
|
|
30
39
|
}
|
|
31
40
|
declare global {
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,107 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { ifDefined as
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
(
|
|
7
|
-
return
|
|
1
|
+
import { css as w, LitElement as $, html as m } from "lit";
|
|
2
|
+
import { property as u, query as V, customElement as P } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined as x } from "lit/directives/if-defined.js";
|
|
4
|
+
var z = Object.defineProperty, R = Object.getOwnPropertyDescriptor, r = (t, e, i, s) => {
|
|
5
|
+
for (var l = s > 1 ? void 0 : s ? R(e, i) : e, a = t.length - 1, n; a >= 0; a--)
|
|
6
|
+
(n = t[a]) && (l = (s ? n(e, i, l) : n(l)) || l);
|
|
7
|
+
return s && l && z(e, i, l), l;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
function E(t) {
|
|
10
|
+
const e = t.trim();
|
|
11
|
+
if (e.startsWith("/") && e.lastIndexOf("/") > 0) {
|
|
12
|
+
const i = e.lastIndexOf("/");
|
|
13
|
+
return e.slice(1, i);
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
function f(t, e) {
|
|
18
|
+
if (t[e] !== "{")
|
|
19
|
+
return { count: 1, nextIndex: e };
|
|
20
|
+
let i = e + 1, s = "";
|
|
21
|
+
for (; i < t.length && /\d/.test(t[i]); )
|
|
22
|
+
s += t[i], i += 1;
|
|
23
|
+
return !s || t[i] !== "}" ? { count: 1, nextIndex: e } : {
|
|
24
|
+
count: Number(s),
|
|
25
|
+
nextIndex: i + 1
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function g(t, e, i) {
|
|
29
|
+
const s = Number.isFinite(i) && i > 0 ? Math.floor(i) : 1;
|
|
30
|
+
for (let l = 0; l < s; l += 1)
|
|
31
|
+
e.kind === "slot" ? t.push({ kind: "slot", test: e.test, placeholder: e.placeholder }) : t.push({ kind: "literal", value: e.value });
|
|
32
|
+
}
|
|
33
|
+
function k(t) {
|
|
34
|
+
if (!t.trim()) return null;
|
|
35
|
+
let e = E(t);
|
|
36
|
+
if (e.startsWith("^") && (e = e.slice(1)), e.endsWith("$") && (e = e.slice(0, -1)), !e) return null;
|
|
37
|
+
const i = [];
|
|
38
|
+
for (let l = 0; l < e.length; l += 1) {
|
|
39
|
+
const a = e[l];
|
|
40
|
+
if (a === "\\") {
|
|
41
|
+
const h = e[l + 1];
|
|
42
|
+
if (!h) return null;
|
|
43
|
+
let d;
|
|
44
|
+
h === "d" ? d = { kind: "slot", test: (c) => /^\d$/.test(c), placeholder: "x" } : h === "w" ? d = { kind: "slot", test: (c) => /^\w$/.test(c), placeholder: "x" } : h === "s" ? d = { kind: "literal", value: " " } : d = { kind: "literal", value: h };
|
|
45
|
+
const p = f(e, l + 2);
|
|
46
|
+
g(i, d, p.count), l = p.nextIndex - 1;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (a === "[") {
|
|
50
|
+
const h = e.indexOf("]", l + 1);
|
|
51
|
+
if (h === -1) return null;
|
|
52
|
+
const d = e.slice(l + 1, h);
|
|
53
|
+
if (!d) return null;
|
|
54
|
+
const p = new RegExp(`^[${d}]$`), c = {
|
|
55
|
+
kind: "slot",
|
|
56
|
+
test: (y) => p.test(y),
|
|
57
|
+
placeholder: "x"
|
|
58
|
+
}, v = f(e, h + 1);
|
|
59
|
+
g(i, c, v.count), l = v.nextIndex - 1;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (a === ".") {
|
|
63
|
+
const h = {
|
|
64
|
+
kind: "slot",
|
|
65
|
+
test: (p) => /^[\s\S]$/.test(p),
|
|
66
|
+
placeholder: "x"
|
|
67
|
+
}, d = f(e, l + 1);
|
|
68
|
+
g(i, h, d.count), l = d.nextIndex - 1;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (a === "+" || a === "*" || a === "?" || a === "{" || a === "}")
|
|
72
|
+
return null;
|
|
73
|
+
const n = { kind: "literal", value: a }, b = f(e, l + 1);
|
|
74
|
+
g(i, n, b.count), l = b.nextIndex - 1;
|
|
75
|
+
}
|
|
76
|
+
const s = i.map((l) => l.kind === "literal" ? l.value : l.placeholder).join("");
|
|
77
|
+
return {
|
|
78
|
+
source: e,
|
|
79
|
+
tokens: i,
|
|
80
|
+
placeholder: s
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
let o = class extends $ {
|
|
10
84
|
constructor() {
|
|
11
|
-
super(), this.value = "", this.placeholder = "", this.name = "", this.disabled = !1, this.required = !1, this.type = "text", this.label = "", this.labelPosition = "above", "attachInternals" in this && (this.internals = this.attachInternals());
|
|
85
|
+
super(), this.value = "", this.placeholder = "", this.name = "", this.disabled = !1, this.required = !1, this.type = "text", this.label = "", this.labelPosition = "above", this.regex = "", this.showRegexPlaceholder = !1, this.showRegexPlaceholer = !1, this.mask = null, this.isFocused = !1, "attachInternals" in this && (this.internals = this.attachInternals());
|
|
12
86
|
}
|
|
13
87
|
connectedCallback() {
|
|
14
|
-
super.connectedCallback(), this.
|
|
88
|
+
if (super.connectedCallback(), this.mask = k(this.regex), this.defaultValue === void 0) {
|
|
89
|
+
const t = this.getAttribute("value") ?? "";
|
|
90
|
+
this.defaultValue = this.normalizeMaskedValue(t);
|
|
91
|
+
}
|
|
92
|
+
this.value = this.normalizeMaskedValue(this.value), this.syncFormValue();
|
|
93
|
+
}
|
|
94
|
+
willUpdate(t) {
|
|
95
|
+
t.has("regex") && (this.mask = k(this.regex), this.defaultValue = this.normalizeMaskedValue(this.getAttribute("value") ?? "")), t.has("showRegexPlaceholer") && this.showRegexPlaceholer && (this.showRegexPlaceholder = !0);
|
|
15
96
|
}
|
|
16
97
|
updated(t) {
|
|
98
|
+
if (t.has("value") || t.has("regex")) {
|
|
99
|
+
const e = this.normalizeMaskedValue(this.value);
|
|
100
|
+
if (e !== this.value) {
|
|
101
|
+
this.value = e;
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
17
105
|
(t.has("value") || t.has("disabled")) && this.syncFormValue();
|
|
18
106
|
}
|
|
19
107
|
focus(t) {
|
|
@@ -26,11 +114,31 @@ let e = class extends c {
|
|
|
26
114
|
this.value = this.defaultValue ?? "";
|
|
27
115
|
}
|
|
28
116
|
formStateRestoreCallback(t) {
|
|
29
|
-
typeof t == "string" && (this.value = t);
|
|
117
|
+
typeof t == "string" && (this.value = this.normalizeMaskedValue(t));
|
|
30
118
|
}
|
|
31
119
|
formDisabledCallback(t) {
|
|
32
120
|
this.disabled = t;
|
|
33
121
|
}
|
|
122
|
+
normalizeMaskedValue(t) {
|
|
123
|
+
if (!this.mask) return t;
|
|
124
|
+
const e = this.mask.tokens.filter(
|
|
125
|
+
(n) => n.kind === "slot"
|
|
126
|
+
), i = [];
|
|
127
|
+
let s = 0;
|
|
128
|
+
for (const n of t) {
|
|
129
|
+
if (s >= e.length) break;
|
|
130
|
+
e[s].test(n) && (i.push(n), s += 1);
|
|
131
|
+
}
|
|
132
|
+
let l = "", a = 0;
|
|
133
|
+
for (const n of this.mask.tokens)
|
|
134
|
+
if (n.kind === "slot") {
|
|
135
|
+
if (a >= i.length)
|
|
136
|
+
break;
|
|
137
|
+
l += i[a], a += 1;
|
|
138
|
+
} else
|
|
139
|
+
i.length > 0 && a <= i.length && (l += n.value);
|
|
140
|
+
return l;
|
|
141
|
+
}
|
|
34
142
|
syncFormValue() {
|
|
35
143
|
if (this.internals) {
|
|
36
144
|
if (this.disabled) {
|
|
@@ -42,24 +150,33 @@ let e = class extends c {
|
|
|
42
150
|
}
|
|
43
151
|
handleInput(t) {
|
|
44
152
|
t.stopPropagation();
|
|
45
|
-
const
|
|
46
|
-
|
|
153
|
+
const e = t.target, i = this.normalizeMaskedValue(e.value);
|
|
154
|
+
e.value !== i && (e.value = i), this.value = i, this.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 }));
|
|
47
155
|
}
|
|
48
156
|
handleChange(t) {
|
|
49
157
|
t.stopPropagation();
|
|
50
|
-
const
|
|
51
|
-
|
|
158
|
+
const e = t.target, i = this.normalizeMaskedValue(e.value);
|
|
159
|
+
e.value !== i && (e.value = i), this.value = i, this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
52
160
|
}
|
|
53
161
|
handleKeydown(t) {
|
|
54
162
|
if (t.key !== "Enter") return;
|
|
55
|
-
const
|
|
56
|
-
|
|
163
|
+
const e = t.target, i = this.normalizeMaskedValue(e.value);
|
|
164
|
+
e.value !== i && (e.value = i), this.value = i, this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
165
|
+
}
|
|
166
|
+
handleFocus() {
|
|
167
|
+
this.isFocused = !0, this.requestUpdate();
|
|
168
|
+
}
|
|
169
|
+
handleBlur() {
|
|
170
|
+
this.isFocused = !1, this.requestUpdate();
|
|
57
171
|
}
|
|
58
172
|
render() {
|
|
59
|
-
const t = this.label.length > 0,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
173
|
+
const t = this.label.length > 0, e = t && this.labelPosition === "floating", i = this.value.length > 0, s = (this.showRegexPlaceholder || this.showRegexPlaceholer) && this.mask !== null, l = s ? this.mask?.placeholder : void 0;
|
|
174
|
+
let a;
|
|
175
|
+
e ? a = s && this.isFocused ? l : void 0 : s ? a = l : a = this.placeholder || void 0;
|
|
176
|
+
const n = this.label || a || this.placeholder || l || void 0;
|
|
177
|
+
return m`
|
|
178
|
+
<div class="field ${e ? "floating" : ""}" data-has-value=${i}>
|
|
179
|
+
${t ? m`<label for="input">${this.label}</label>` : null}
|
|
63
180
|
<input
|
|
64
181
|
id="input"
|
|
65
182
|
part="input"
|
|
@@ -68,9 +185,11 @@ let e = class extends c {
|
|
|
68
185
|
.name=${this.name}
|
|
69
186
|
?disabled=${this.disabled}
|
|
70
187
|
?required=${this.required}
|
|
71
|
-
placeholder=${
|
|
72
|
-
autocomplete=${
|
|
73
|
-
aria-label=${
|
|
188
|
+
.placeholder=${a ?? ""}
|
|
189
|
+
autocomplete=${x(this.autocomplete)}
|
|
190
|
+
aria-label=${x(n)}
|
|
191
|
+
@focus=${this.handleFocus}
|
|
192
|
+
@blur=${this.handleBlur}
|
|
74
193
|
@input=${this.handleInput}
|
|
75
194
|
@change=${this.handleChange}
|
|
76
195
|
@keydown=${this.handleKeydown}
|
|
@@ -79,8 +198,8 @@ let e = class extends c {
|
|
|
79
198
|
`;
|
|
80
199
|
}
|
|
81
200
|
};
|
|
82
|
-
|
|
83
|
-
|
|
201
|
+
o.formAssociated = !0;
|
|
202
|
+
o.styles = w`
|
|
84
203
|
:host {
|
|
85
204
|
display: inline-block;
|
|
86
205
|
width: 100%;
|
|
@@ -116,7 +235,7 @@ e.styles = h`
|
|
|
116
235
|
|
|
117
236
|
.field.floating[data-has-value='true'] label,
|
|
118
237
|
:host(:focus-within) .field.floating label {
|
|
119
|
-
top:
|
|
238
|
+
top: 4px;
|
|
120
239
|
transform: scale(0.85);
|
|
121
240
|
color: var(--ui-input-label-color, #475569);
|
|
122
241
|
}
|
|
@@ -138,10 +257,6 @@ e.styles = h`
|
|
|
138
257
|
color: var(--ui-input-placeholder-color, #9aa4b2);
|
|
139
258
|
}
|
|
140
259
|
|
|
141
|
-
.field.floating input::placeholder {
|
|
142
|
-
color: transparent;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
260
|
input:focus {
|
|
146
261
|
box-shadow: var(--ui-input-focus-ring, 0 0 0 3px rgba(24, 98, 255, 0.25));
|
|
147
262
|
}
|
|
@@ -158,39 +273,48 @@ e.styles = h`
|
|
|
158
273
|
padding-left: var(--ui-input-floating-padding-left, 12px);
|
|
159
274
|
}
|
|
160
275
|
`;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
],
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
],
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
],
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
],
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
],
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
],
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
],
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
],
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
],
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
],
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
],
|
|
276
|
+
r([
|
|
277
|
+
u({ type: String })
|
|
278
|
+
], o.prototype, "value", 2);
|
|
279
|
+
r([
|
|
280
|
+
u({ type: String })
|
|
281
|
+
], o.prototype, "placeholder", 2);
|
|
282
|
+
r([
|
|
283
|
+
u({ type: String, reflect: !0 })
|
|
284
|
+
], o.prototype, "name", 2);
|
|
285
|
+
r([
|
|
286
|
+
u({ type: Boolean, reflect: !0 })
|
|
287
|
+
], o.prototype, "disabled", 2);
|
|
288
|
+
r([
|
|
289
|
+
u({ type: Boolean, reflect: !0 })
|
|
290
|
+
], o.prototype, "required", 2);
|
|
291
|
+
r([
|
|
292
|
+
u({ type: String, reflect: !0 })
|
|
293
|
+
], o.prototype, "type", 2);
|
|
294
|
+
r([
|
|
295
|
+
u({ type: String, reflect: !0 })
|
|
296
|
+
], o.prototype, "autocomplete", 2);
|
|
297
|
+
r([
|
|
298
|
+
u({ type: String })
|
|
299
|
+
], o.prototype, "label", 2);
|
|
300
|
+
r([
|
|
301
|
+
u({ type: String, attribute: "label-position" })
|
|
302
|
+
], o.prototype, "labelPosition", 2);
|
|
303
|
+
r([
|
|
304
|
+
u({ type: String, reflect: !0 })
|
|
305
|
+
], o.prototype, "regex", 2);
|
|
306
|
+
r([
|
|
307
|
+
u({ type: Boolean, attribute: "show-regex-placeholder", reflect: !0 })
|
|
308
|
+
], o.prototype, "showRegexPlaceholder", 2);
|
|
309
|
+
r([
|
|
310
|
+
u({ type: Boolean, attribute: "show-regex-placeholer", reflect: !0 })
|
|
311
|
+
], o.prototype, "showRegexPlaceholer", 2);
|
|
312
|
+
r([
|
|
313
|
+
V("input")
|
|
314
|
+
], o.prototype, "inputEl", 2);
|
|
315
|
+
o = r([
|
|
316
|
+
P("dui-input")
|
|
317
|
+
], o);
|
|
194
318
|
export {
|
|
195
|
-
|
|
319
|
+
o as DuiInput
|
|
196
320
|
};
|
package/dist/manifest.json
CHANGED
|
@@ -17,11 +17,25 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "placeholder",
|
|
20
|
-
"description": "Placeholder text shown when value is empty. Hidden in floating label mode.",
|
|
20
|
+
"description": "Placeholder text shown when value is empty. Hidden in floating label mode unless regex placeholder is enabled while focused.",
|
|
21
21
|
"type": "string",
|
|
22
22
|
"default": "",
|
|
23
23
|
"control": "text"
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
"name": "regex",
|
|
27
|
+
"description": "Regex-like mask definition. Supported patterns include escaped literals and quantified slots such as ^\\(\\d{3}\\)\\s\\d{3}-\\d{4}$.",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "",
|
|
30
|
+
"control": "text"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "show-regex-placeholder",
|
|
34
|
+
"description": "If true and regex is valid, placeholder is generated from the regex mask (for floating labels, shown only while focused).",
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"default": false,
|
|
37
|
+
"control": "boolean"
|
|
38
|
+
},
|
|
25
39
|
{
|
|
26
40
|
"name": "name",
|
|
27
41
|
"description": "Name used when submitting with a form.",
|
|
@@ -90,6 +104,18 @@
|
|
|
90
104
|
"type": "string",
|
|
91
105
|
"default": ""
|
|
92
106
|
},
|
|
107
|
+
{
|
|
108
|
+
"name": "regex",
|
|
109
|
+
"description": "Mask source pattern used to constrain input formatting.",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"default": ""
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "showRegexPlaceholder",
|
|
115
|
+
"description": "Enables regex-derived placeholder text.",
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": false
|
|
118
|
+
},
|
|
93
119
|
{
|
|
94
120
|
"name": "labelPosition",
|
|
95
121
|
"description": "Reflects the label presentation mode.",
|
|
@@ -243,35 +269,41 @@
|
|
|
243
269
|
"description": "Native input behavior options.",
|
|
244
270
|
"order": 2
|
|
245
271
|
},
|
|
272
|
+
{
|
|
273
|
+
"id": "mask",
|
|
274
|
+
"label": "Mask",
|
|
275
|
+
"description": "Regex masking controls.",
|
|
276
|
+
"order": 3
|
|
277
|
+
},
|
|
246
278
|
{
|
|
247
279
|
"id": "typography",
|
|
248
280
|
"label": "Typography",
|
|
249
|
-
"order":
|
|
281
|
+
"order": 4
|
|
250
282
|
},
|
|
251
283
|
{
|
|
252
284
|
"id": "spacing",
|
|
253
285
|
"label": "Spacing",
|
|
254
|
-
"order":
|
|
286
|
+
"order": 5
|
|
255
287
|
},
|
|
256
288
|
{
|
|
257
289
|
"id": "floating",
|
|
258
290
|
"label": "Floating Label",
|
|
259
|
-
"order":
|
|
291
|
+
"order": 6
|
|
260
292
|
},
|
|
261
293
|
{
|
|
262
294
|
"id": "shape",
|
|
263
295
|
"label": "Shape",
|
|
264
|
-
"order":
|
|
296
|
+
"order": 7
|
|
265
297
|
},
|
|
266
298
|
{
|
|
267
299
|
"id": "color",
|
|
268
300
|
"label": "Color",
|
|
269
|
-
"order":
|
|
301
|
+
"order": 8
|
|
270
302
|
},
|
|
271
303
|
{
|
|
272
304
|
"id": "state",
|
|
273
305
|
"label": "States",
|
|
274
|
-
"order":
|
|
306
|
+
"order": 9
|
|
275
307
|
}
|
|
276
308
|
],
|
|
277
309
|
"controls": [
|
|
@@ -331,6 +363,22 @@
|
|
|
331
363
|
"label": "Required",
|
|
332
364
|
"order": 4
|
|
333
365
|
},
|
|
366
|
+
{
|
|
367
|
+
"id": "regex",
|
|
368
|
+
"kind": "attribute",
|
|
369
|
+
"ref": "regex",
|
|
370
|
+
"group": "mask",
|
|
371
|
+
"label": "Regex Mask",
|
|
372
|
+
"order": 1
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"id": "show-regex-placeholder",
|
|
376
|
+
"kind": "attribute",
|
|
377
|
+
"ref": "show-regex-placeholder",
|
|
378
|
+
"group": "mask",
|
|
379
|
+
"label": "Show Regex Placeholder",
|
|
380
|
+
"order": 2
|
|
381
|
+
},
|
|
334
382
|
{
|
|
335
383
|
"id": "token-font-size",
|
|
336
384
|
"kind": "cssToken",
|