@aquera/nile-elements 0.0.1-beta.13 → 0.0.1-beta.14
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/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-input/nile-input.css.js +18 -24
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-input/nile-input.d.ts +2 -0
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-input/nile-input.js +15 -0
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
- package/.rollup.cache/Users/ravisankar/repos/design-system/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +18 -24
- package/dist/nile-input/nile-input.esm.js +14 -5
- package/dist/src/nile-input/nile-input.css.js +18 -24
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.d.ts +2 -0
- package/dist/src/nile-input/nile-input.js +15 -0
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-input/nile-input.css.ts +18 -24
- package/src/nile-input/nile-input.ts +13 -0
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.0.1-beta.
|
6
|
+
"version": "0.0.1-beta.14",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -30,16 +30,8 @@ export const styles = css`
|
|
30
30
|
margin-bottom: 12px;
|
31
31
|
}
|
32
32
|
|
33
|
-
.form-control--has-label.form-control--small .form-control__label {
|
34
|
-
font-size: 14px;
|
35
|
-
}
|
36
|
-
|
37
33
|
.form-control--has-label.form-control--medium .form-control__label {
|
38
|
-
font-size:
|
39
|
-
}
|
40
|
-
|
41
|
-
.form-control--has-label.form-control--large .form-control__label {
|
42
|
-
font-size: 1.25rem;
|
34
|
+
font-size: 14px;
|
43
35
|
}
|
44
36
|
|
45
37
|
:host([required]) .form-control--has-label .form-control__label::after {
|
@@ -51,20 +43,23 @@ export const styles = css`
|
|
51
43
|
/* Help text */
|
52
44
|
.form-control--has-help-text .form-control__help-text {
|
53
45
|
display: block;
|
54
|
-
color:
|
55
|
-
margin-top:
|
46
|
+
color: #7F7F7F;
|
47
|
+
margin-top: 6px;
|
56
48
|
}
|
57
49
|
|
58
|
-
|
59
|
-
|
50
|
+
/* Error message */
|
51
|
+
.form-control__error-message {
|
52
|
+
display: block;
|
53
|
+
color: #A4121C;
|
54
|
+
margin-top: 12px;
|
55
|
+
font-size: 12px;
|
56
|
+
font-style: normal;
|
57
|
+
line-height: 12px;
|
58
|
+
letter-spacing: 0.2px;
|
60
59
|
}
|
61
60
|
|
62
61
|
.form-control--has-help-text.form-control--medium .form-control__help-text {
|
63
|
-
font-size:
|
64
|
-
}
|
65
|
-
|
66
|
-
.form-control--has-help-text.form-control--large .form-control__help-text {
|
67
|
-
font-size: 1rem;
|
62
|
+
font-size: 10.24px;
|
68
63
|
}
|
69
64
|
|
70
65
|
.form-control--has-help-text.form-control--radio-group
|
@@ -97,13 +92,12 @@ export const styles = css`
|
|
97
92
|
|
98
93
|
.input--standard:hover:not(.input--disabled) {
|
99
94
|
background-color: hsl(0, 0%, 100%);
|
100
|
-
border-color: #
|
95
|
+
border-color: #000;
|
101
96
|
}
|
102
97
|
|
103
98
|
.input--standard.input--focused:not(.input--disabled) {
|
104
99
|
background-color: hsl(0, 0%, 100%);
|
105
100
|
border-color: #005ea6;
|
106
|
-
box-shadow: 0 0 0 3px hsl(198.6 88.7% 48.4% / 40%);
|
107
101
|
}
|
108
102
|
|
109
103
|
.input--standard.input--focused:not(.input--disabled) .input__control {
|
@@ -111,8 +105,8 @@ export const styles = css`
|
|
111
105
|
}
|
112
106
|
|
113
107
|
.input--standard.input--disabled {
|
114
|
-
background-color:
|
115
|
-
border-color:
|
108
|
+
background-color: #fff;
|
109
|
+
border-color: #c7ced4;
|
116
110
|
opacity: 0.5;
|
117
111
|
cursor: not-allowed;
|
118
112
|
}
|
@@ -304,11 +298,11 @@ export const styles = css`
|
|
304
298
|
}
|
305
299
|
|
306
300
|
.input--medium .input__prefix::slotted(*) {
|
307
|
-
margin-inline-start:
|
301
|
+
margin-inline-start: 12px;
|
308
302
|
}
|
309
303
|
|
310
304
|
.input--medium .input__suffix::slotted(*) {
|
311
|
-
margin-inline-end:
|
305
|
+
margin-inline-end: 12px;
|
312
306
|
}
|
313
307
|
|
314
308
|
.input--large {
|
@@ -91,6 +91,9 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
91
91
|
/** The input's help text. If you need to display HTML, use the `help-text` slot instead. */
|
92
92
|
@property({ attribute: 'help-text' }) helpText = '';
|
93
93
|
|
94
|
+
/** The input's error message. If you need to display HTML, use the `error-message` slot instead. */
|
95
|
+
@property({ attribute: 'error-message' }) errorMessage = '';
|
96
|
+
|
94
97
|
/** Adds a clear button when the input is not empty. */
|
95
98
|
@property({ type: Boolean }) clearable = false;
|
96
99
|
|
@@ -395,6 +398,7 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
395
398
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
396
399
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
397
400
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
401
|
+
const hasErrorMessage = this.errorMessage ? true : false;
|
398
402
|
const hasClearIcon =
|
399
403
|
this.clearable && !this.disabled && !this.readonly && (typeof this.value === 'number' || this.value.length > 0);
|
400
404
|
|
@@ -536,6 +540,15 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
536
540
|
>
|
537
541
|
${this.helpText}
|
538
542
|
</slot>
|
543
|
+
<slot
|
544
|
+
name="error-message"
|
545
|
+
part="form-control-error-message"
|
546
|
+
id="error-message"
|
547
|
+
class="form-control__error-message"
|
548
|
+
aria-hidden=${hasErrorMessage ? 'false' : 'true'}
|
549
|
+
>
|
550
|
+
${this.errorMessage}
|
551
|
+
</slot>
|
539
552
|
</div>
|
540
553
|
</div>
|
541
554
|
`;
|