secure-ui-components 0.2.2 → 0.2.4
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/components/secure-card/secure-card.js +1 -766
- package/dist/components/secure-datetime/secure-datetime.js +1 -570
- package/dist/components/secure-file-upload/secure-file-upload.js +1 -868
- package/dist/components/secure-form/secure-form.js +1 -797
- package/dist/components/secure-input/secure-input.css +67 -1
- package/dist/components/secure-input/secure-input.d.ts +14 -0
- package/dist/components/secure-input/secure-input.d.ts.map +1 -1
- package/dist/components/secure-input/secure-input.js +1 -805
- package/dist/components/secure-input/secure-input.js.map +1 -1
- package/dist/components/secure-password-confirm/secure-password-confirm.js +1 -329
- package/dist/components/secure-select/secure-select.js +1 -589
- package/dist/components/secure-submit-button/secure-submit-button.js +1 -378
- package/dist/components/secure-table/secure-table.js +33 -528
- package/dist/components/secure-telemetry-provider/secure-telemetry-provider.js +1 -201
- package/dist/components/secure-textarea/secure-textarea.css +66 -1
- package/dist/components/secure-textarea/secure-textarea.d.ts +11 -0
- package/dist/components/secure-textarea/secure-textarea.d.ts.map +1 -1
- package/dist/components/secure-textarea/secure-textarea.js +1 -436
- package/dist/components/secure-textarea/secure-textarea.js.map +1 -1
- package/dist/core/base-component.d.ts +18 -0
- package/dist/core/base-component.d.ts.map +1 -1
- package/dist/core/base-component.js +1 -455
- package/dist/core/base-component.js.map +1 -1
- package/dist/core/security-config.js +1 -242
- package/dist/core/types.js +0 -2
- package/dist/index.js +1 -17
- package/dist/package.json +4 -2
- package/package.json +4 -2
|
@@ -121,11 +121,77 @@ label {
|
|
|
121
121
|
|
|
122
122
|
@media (prefers-reduced-motion: reduce) {
|
|
123
123
|
.input-field,
|
|
124
|
-
.error-container
|
|
124
|
+
.error-container,
|
|
125
|
+
.threat-container {
|
|
125
126
|
transition: none !important;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
/* Threat Feedback Container */
|
|
131
|
+
.threat-container {
|
|
132
|
+
margin-top: var(--secure-ui-form-error-margin-top);
|
|
133
|
+
font-size: var(--secure-ui-error-font-size);
|
|
134
|
+
color: var(--secure-ui-color-warning);
|
|
135
|
+
line-height: var(--secure-ui-line-height-normal);
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
max-height: 40px;
|
|
138
|
+
opacity: 1;
|
|
139
|
+
transform: translateY(0);
|
|
140
|
+
transition: all 0.5s ease-in-out;
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: var(--secure-ui-space-1, 4px);
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.threat-container.hidden {
|
|
148
|
+
max-height: 0;
|
|
149
|
+
opacity: 0;
|
|
150
|
+
transform: translateY(-4px);
|
|
151
|
+
margin-top: 0;
|
|
152
|
+
transition: all 0.2s ease-in-out;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.threat-message {
|
|
156
|
+
flex: 1;
|
|
157
|
+
min-width: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.threat-badge {
|
|
161
|
+
display: inline-block;
|
|
162
|
+
padding: var(--secure-ui-badge-padding);
|
|
163
|
+
font-size: var(--secure-ui-badge-font-size);
|
|
164
|
+
font-weight: var(--secure-ui-font-weight-semibold);
|
|
165
|
+
border-radius: var(--secure-ui-badge-border-radius);
|
|
166
|
+
background-color: color-mix(in srgb, var(--secure-ui-color-warning) 12%, transparent);
|
|
167
|
+
color: var(--secure-ui-color-warning);
|
|
168
|
+
border: var(--secure-ui-border-width-thin) solid currentColor;
|
|
169
|
+
font-family: var(--secure-ui-font-family-mono, monospace);
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.threat-tier {
|
|
174
|
+
display: inline-block;
|
|
175
|
+
padding: var(--secure-ui-badge-padding);
|
|
176
|
+
font-size: var(--secure-ui-badge-font-size);
|
|
177
|
+
font-weight: var(--secure-ui-font-weight-semibold);
|
|
178
|
+
border-radius: var(--secure-ui-badge-border-radius);
|
|
179
|
+
background-color: var(--secure-ui-color-bg-tertiary);
|
|
180
|
+
color: var(--secure-ui-color-text-secondary);
|
|
181
|
+
border: var(--secure-ui-border-width-thin) solid var(--secure-ui-color-border);
|
|
182
|
+
text-transform: uppercase;
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Threat state on the input field */
|
|
187
|
+
.input-field.threat {
|
|
188
|
+
border-color: var(--secure-ui-color-warning) !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.input-field.threat:focus {
|
|
192
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--secure-ui-color-warning) 25%, transparent);
|
|
193
|
+
}
|
|
194
|
+
|
|
129
195
|
/* Security Tier-Specific Styles */
|
|
130
196
|
/* :host([security-tier="public"]) .input-field {
|
|
131
197
|
border-color: var(--secure-ui-tier-public);
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* @license MIT
|
|
30
30
|
*/
|
|
31
31
|
import { SecureBaseComponent } from '../../core/base-component.js';
|
|
32
|
+
import type { SecurityTierValue } from '../../core/types.js';
|
|
32
33
|
/**
|
|
33
34
|
* Secure Input Web Component
|
|
34
35
|
*
|
|
@@ -105,6 +106,19 @@ export declare class SecureInput extends SecureBaseComponent {
|
|
|
105
106
|
* @public
|
|
106
107
|
*/
|
|
107
108
|
blur(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Show inline threat feedback inside the component's shadow DOM.
|
|
111
|
+
* Called by the base class when a threat is detected and threat-feedback is set.
|
|
112
|
+
* Uses a separate container from validation errors so #clearErrors() does not
|
|
113
|
+
* clobber an active threat message.
|
|
114
|
+
* @protected
|
|
115
|
+
*/
|
|
116
|
+
protected showThreatFeedback(patternId: string, tier: SecurityTierValue): void;
|
|
117
|
+
/**
|
|
118
|
+
* Clear the threat feedback container.
|
|
119
|
+
* @protected
|
|
120
|
+
*/
|
|
121
|
+
protected clearThreatFeedback(): void;
|
|
108
122
|
/**
|
|
109
123
|
* Cleanup on disconnect
|
|
110
124
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-input.d.ts","sourceRoot":"","sources":["../../../src/components/secure-input/secure-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"secure-input.d.ts","sourceRoot":"","sources":["../../../src/components/secure-input/secure-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,mBAAmB;;IAkDlD;;;;OAIG;IACH,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAcxC;IAED;;OAEG;;IAKH;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAM,IAAI,gBAAgB,GAAG,WAAW,GAAG,IAAI;IA6oBzD;;;;OAIG;IACH,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAkBtG;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;;OAIG;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAEtB;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,IAAI,KAAK,IAAI,OAAO,CAyDnB;IAED;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAMb;;;;OAIG;IACH,IAAI,IAAI,IAAI;IAMZ;;;;;;OAMG;cACgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI;IA8BvF;;;OAGG;cACgB,mBAAmB,IAAI,IAAI;IAY9C;;OAEG;IACH,oBAAoB,IAAI,IAAI;CAS7B;AAKD,eAAe,WAAW,CAAC"}
|