@nysds/nys-textinput 1.17.0 → 1.18.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/nys-textinput.js +1 -1
- package/package.json +4 -4
- package/dist/nys-textinput.d.ts +0 -147
package/dist/nys-textinput.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ifDefined as u } from "lit/directives/if-defined.js";
|
|
|
6
6
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
7
7
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
8
8
|
*
|
|
9
|
-
* Textinput Component v1.
|
|
9
|
+
* Textinput Component v1.18.0
|
|
10
10
|
* Part of the New York State Design System
|
|
11
11
|
* Repository: https://github.com/its-hcd/nysds
|
|
12
12
|
* License: MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/nys-textinput",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "The Textinput component from the NYS Design System.",
|
|
5
5
|
"module": "dist/nys-textinput.js",
|
|
6
6
|
"exports": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"lit-analyze": "lit-analyzer '**/*.ts'"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@nysds/nys-icon": "^1.
|
|
26
|
-
"@nysds/nys-label": "^1.
|
|
27
|
-
"@nysds/nys-errormessage": "^1.
|
|
25
|
+
"@nysds/nys-icon": "^1.18.0",
|
|
26
|
+
"@nysds/nys-label": "^1.18.0",
|
|
27
|
+
"@nysds/nys-errormessage": "^1.18.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"lit": "^3.3.1",
|
package/dist/nys-textinput.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* A text input for collecting short, single-line data. Supports validation, input masking (tel),
|
|
4
|
-
* password visibility toggle, and live error messaging. Form-associated via ElementInternals.
|
|
5
|
-
*
|
|
6
|
-
* Use for names, emails, passwords, phone numbers. For multi-line input, use `nys-textarea` instead.
|
|
7
|
-
* For predefined options, use `nys-select`, `nys-radiobutton`, or `nys-checkbox`.
|
|
8
|
-
*
|
|
9
|
-
* @summary Text input for short single-line data with validation and masking support.
|
|
10
|
-
* @element nys-textinput
|
|
11
|
-
*
|
|
12
|
-
* @slot description - Custom HTML description content below the label.
|
|
13
|
-
* @slot startButton - Button at input start. Use single `nys-button` only.
|
|
14
|
-
* @slot endButton - Button at input end. Use single `nys-button` only.
|
|
15
|
-
*
|
|
16
|
-
* @fires nys-input - Fired on input change. Detail: `{id, value}`.
|
|
17
|
-
* @fires nys-focus - Fired when input gains focus.
|
|
18
|
-
* @fires nys-blur - Fired when input loses focus. Triggers validation.
|
|
19
|
-
*
|
|
20
|
-
* @example Basic text input
|
|
21
|
-
* ```html
|
|
22
|
-
* <nys-textinput label="Full Name" required></nys-textinput>
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @example Required Email
|
|
26
|
-
* ```html
|
|
27
|
-
* <nys-textinput type="email" label="Email Address" required></nys-textinput>
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @example Phone with masking
|
|
31
|
-
* ```html
|
|
32
|
-
* <nys-textinput type="tel" label="Phone Number"></nys-textinput>
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @example Search with button
|
|
36
|
-
* ```html
|
|
37
|
-
* <nys-textinput type="search" placeholder="Search">
|
|
38
|
-
* <nys-button slot="endButton" label="Search" prefixIcon="search"></nys-button>
|
|
39
|
-
* </nys-textinput>
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare class NysTextinput extends LitElement {
|
|
43
|
-
static styles: import("lit").CSSResult;
|
|
44
|
-
static shadowRootOptions: {
|
|
45
|
-
delegatesFocus: boolean;
|
|
46
|
-
clonable?: boolean;
|
|
47
|
-
customElementRegistry?: CustomElementRegistry;
|
|
48
|
-
mode: ShadowRootMode;
|
|
49
|
-
serializable?: boolean;
|
|
50
|
-
slotAssignment?: SlotAssignmentMode;
|
|
51
|
-
};
|
|
52
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
53
|
-
id: string;
|
|
54
|
-
/** Name for form submission. */
|
|
55
|
-
name: string;
|
|
56
|
-
/**
|
|
57
|
-
* Input type: `text` (default), `email`, `number`, `password`, `search`, `tel` (auto-masked), `url`.
|
|
58
|
-
* @default "text"
|
|
59
|
-
*/
|
|
60
|
-
type: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
|
|
61
|
-
/** Visible label text. Required for accessibility. */
|
|
62
|
-
label: string;
|
|
63
|
-
/** Helper text below label. Use slot for custom HTML. */
|
|
64
|
-
description: string;
|
|
65
|
-
/** Placeholder text. Don't use as label replacement. */
|
|
66
|
-
placeholder: string;
|
|
67
|
-
/** Current input value. */
|
|
68
|
-
value: string;
|
|
69
|
-
/** Prevents interaction. */
|
|
70
|
-
disabled: boolean;
|
|
71
|
-
/** Makes input read-only but focusable. */
|
|
72
|
-
readonly: boolean;
|
|
73
|
-
/** Marks as required. Shows "Required" flag and validates on blur. */
|
|
74
|
-
required: boolean;
|
|
75
|
-
/** Shows "Optional" flag. Use when most fields are required. */
|
|
76
|
-
optional: boolean;
|
|
77
|
-
/** Tooltip text shown on hover/focus of info icon. */
|
|
78
|
-
tooltip: string;
|
|
79
|
-
/** Form `id` to associate with when input is outside form element. */
|
|
80
|
-
form: string | null;
|
|
81
|
-
/** Regex pattern for validation. Shows error on mismatch. */
|
|
82
|
-
pattern: string;
|
|
83
|
-
/** Maximum character length. */
|
|
84
|
-
maxlength: number | null;
|
|
85
|
-
/** Accessible label. When set, assuming "label" isn't provided for private special cases (i.e., <checkbox other>). */
|
|
86
|
-
ariaLabel: string;
|
|
87
|
-
/**
|
|
88
|
-
* Input width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default).
|
|
89
|
-
* @default "full"
|
|
90
|
-
*/
|
|
91
|
-
width: "sm" | "md" | "lg" | "full";
|
|
92
|
-
/** Step increment for `type="number"`. */
|
|
93
|
-
step: number | null;
|
|
94
|
-
/** Minimum value for `type="number"`. */
|
|
95
|
-
min: number | null;
|
|
96
|
-
/** Maximum value for `type="number"`. */
|
|
97
|
-
max: number | null;
|
|
98
|
-
/** Adjusts colors for dark backgrounds. */
|
|
99
|
-
inverted: boolean;
|
|
100
|
-
/** Shows error message when true. Set by validation or manually. */
|
|
101
|
-
showError: boolean;
|
|
102
|
-
/** Error message text. Shown only when `showError` is true. */
|
|
103
|
-
errorMessage: string;
|
|
104
|
-
private _inputEl;
|
|
105
|
-
private showPassword;
|
|
106
|
-
private _originalErrorMessage;
|
|
107
|
-
private _hasUserInteracted;
|
|
108
|
-
private _internals;
|
|
109
|
-
private _maskPatterns;
|
|
110
|
-
/**
|
|
111
|
-
* Lifecycle methods
|
|
112
|
-
* --------------------------------------------------------------------------
|
|
113
|
-
*/
|
|
114
|
-
static formAssociated: boolean;
|
|
115
|
-
constructor();
|
|
116
|
-
connectedCallback(): void;
|
|
117
|
-
disconnectedCallback(): void;
|
|
118
|
-
firstUpdated(): Promise<void>;
|
|
119
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
120
|
-
/**
|
|
121
|
-
* Form Integration
|
|
122
|
-
* --------------------------------------------------------------------------
|
|
123
|
-
*/
|
|
124
|
-
private _setValue;
|
|
125
|
-
private _manageRequire;
|
|
126
|
-
private _setValidityMessage;
|
|
127
|
-
private _validate;
|
|
128
|
-
formResetCallback(): void;
|
|
129
|
-
/**
|
|
130
|
-
* Functions
|
|
131
|
-
* --------------------------------------------------------------------------
|
|
132
|
-
*/
|
|
133
|
-
checkValidity(): boolean;
|
|
134
|
-
private _handleInvalid;
|
|
135
|
-
private _togglePasswordVisibility;
|
|
136
|
-
private _updateOverlay;
|
|
137
|
-
private _applyMask;
|
|
138
|
-
/**
|
|
139
|
-
* Event Handlers
|
|
140
|
-
* --------------------------------------------------------------------------
|
|
141
|
-
*/
|
|
142
|
-
private _handleInput;
|
|
143
|
-
private _handleFocus;
|
|
144
|
-
private _handleBlur;
|
|
145
|
-
private _validateButtonSlot;
|
|
146
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
147
|
-
}
|