@aquera/nile-elements 0.1.14 → 0.1.16
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 +8 -0
- package/demo/index.html +4 -72
- package/demo/variables.css +19 -58
- package/demo/variables_v2.css +0 -2
- package/dist/nile-button/nile-button.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +77 -83
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +11 -18
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +2 -2
- package/dist/nile-form-group/nile-form-group.css.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.css.cjs.js.map +1 -1
- package/dist/nile-form-group/nile-form-group.css.esm.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.esm.js +0 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +3 -3
- package/dist/src/nile-button/nile-button.css.js +77 -83
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.js +5 -12
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.test.js +5 -17
- package/dist/src/nile-checkbox/nile-checkbox.test.js.map +1 -1
- package/dist/src/nile-form-group/nile-form-group.css.js +1 -1
- package/dist/src/nile-form-group/nile-form-group.css.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js +0 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js.map +1 -1
- package/dist/src/nile-toast/nile-toast.d.ts +1 -0
- package/dist/src/nile-toast/nile-toast.js +5 -1
- package/dist/src/nile-toast/nile-toast.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-button/nile-button.css.ts +77 -83
- package/src/nile-checkbox/nile-checkbox.test.ts +6 -21
- package/src/nile-checkbox/nile-checkbox.ts +5 -12
- package/src/nile-form-group/nile-form-group.css.ts +1 -1
- package/src/nile-stepper-item/nile-stepper-item.css.ts +0 -1
- package/src/nile-toast/nile-toast.ts +3 -1
- package/vscode-html-custom-data.json +5 -1
package/package.json
CHANGED
@@ -71,158 +71,158 @@ export const styles = css`
|
|
71
71
|
|
72
72
|
/* Primary */
|
73
73
|
.button--standard.button--primary {
|
74
|
-
background-color: var(--nile-colors-
|
75
|
-
border-color: var(--nile-colors-
|
76
|
-
color: var(--nile-colors-
|
74
|
+
background-color: var(--nile-colors-primary-600);
|
75
|
+
border-color: var(--nile-colors-primary-600);
|
76
|
+
color: var(--nile-colors-white-base);
|
77
77
|
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
78
78
|
}
|
79
79
|
|
80
80
|
.button--standard.button--primary:hover:not(.button--disabled) {
|
81
|
-
background-color: var(--nile-colors-
|
82
|
-
border-color: var(--nile-colors-
|
83
|
-
color: var(--nile-colors-
|
81
|
+
background-color: var(--nile-colors-primary-700);
|
82
|
+
border-color: var(--nile-colors-primary-700);
|
83
|
+
color: var(--nile-colors-white-base);
|
84
84
|
}
|
85
85
|
|
86
86
|
.button--standard.button--primary:active:not(.button--disabled) {
|
87
|
-
background-color: var(--nile-colors-
|
88
|
-
border-color: var(--nile-colors-
|
89
|
-
color: var(--nile-colors-
|
87
|
+
background-color: var(--nile-colors-primary-700);
|
88
|
+
border-color: var(--nile-colors-primary-900);
|
89
|
+
color: var(--nile-colors-white-base);
|
90
90
|
box-shadow: 0px 1px 2px 0px rgba(0, 82, 145, 0.1),
|
91
91
|
0px 0px 0px 4px rgba(0, 94, 166, 0.15);
|
92
92
|
}
|
93
93
|
|
94
94
|
.button--standard.button--primary.button--disabled {
|
95
|
-
background-color: var(--nile-colors-
|
96
|
-
border-color: var(--nile-colors-
|
97
|
-
color: var(--nile-colors-
|
95
|
+
background-color: var(--nile-colors-neutral-700);
|
96
|
+
border-color: var(--nile-colors-neutral-700);
|
97
|
+
color: var(--nile-colors-neutral-500);
|
98
98
|
cursor: not-allowed;
|
99
99
|
}
|
100
100
|
|
101
101
|
.button--standard.button--primary.button--disabled:hover,
|
102
102
|
.button--standard.button--primary.button--disabled:active {
|
103
|
-
background-color: var(--nile-colors-
|
104
|
-
border-color: var(--nile-colors-
|
105
|
-
color: var(--nile-colors-
|
103
|
+
background-color: var(--nile-colors-neutral-700);
|
104
|
+
border-color: var(--nile-colors-neutral-700);
|
105
|
+
color: var(--nile-colors-neutral-500);
|
106
106
|
cursor: not-allowed;
|
107
107
|
}
|
108
108
|
|
109
109
|
/* Secondary */
|
110
110
|
.button--standard.button--secondary {
|
111
|
-
background-color: var(--nile-colors-
|
112
|
-
border-color: var(--nile-colors-
|
113
|
-
color: var(--nile-colors-
|
111
|
+
background-color: var(--nile-colors-neutral-400);
|
112
|
+
border-color: var(--nile-colors-neutral-400);
|
113
|
+
color: var(--nile-colors-dark-900);
|
114
114
|
}
|
115
115
|
|
116
116
|
.button--standard.button--secondary:hover:not(.button--disabled) {
|
117
|
-
background-color: var(--nile-colors-
|
118
|
-
border-color: var(--nile-colors-
|
119
|
-
color: var(--nile-colors-
|
117
|
+
background-color: var(--nile-colors-neutral-500);
|
118
|
+
border-color: var(--nile-colors-neutral-400);
|
119
|
+
color: var(--nile-colors-dark-900);
|
120
120
|
}
|
121
121
|
|
122
122
|
.button--standard.button--secondary:active:not(.button--disabled) {
|
123
|
-
background-color: var(--nile-colors-
|
124
|
-
border-color: var(--nile-colors-
|
125
|
-
color: var(--nile-colors-
|
123
|
+
background-color: var(--nile-colors-neutral-500);
|
124
|
+
border-color: var(--nile-colors-neutral-700);
|
125
|
+
color: var(--nile-colors-dark-900);
|
126
126
|
}
|
127
127
|
|
128
128
|
.button--standard.button--secondary.button--disabled {
|
129
|
-
background-color: var(--nile-colors-
|
130
|
-
border-color: var(--nile-colors-
|
131
|
-
color: var(--nile-colors-
|
129
|
+
background-color: var(--nile-colors-neutral-400);
|
130
|
+
border-color: var(--nile-colors-neutral-400);
|
131
|
+
color: var(--nile-colors-dark-500);
|
132
132
|
cursor: not-allowed;
|
133
133
|
}
|
134
134
|
|
135
135
|
.button--standard.button--secondary.button--disabled:hover,
|
136
136
|
.button--standard.button--secondary.button--disabled:active {
|
137
|
-
background-color: var(--nile-colors-
|
138
|
-
border-color: var(--nile-colors-
|
139
|
-
color: var(--nile-colors-
|
137
|
+
background-color: var(--nile-colors-neutral-400);
|
138
|
+
border-color: var(--nile-colors-neutral-400);
|
139
|
+
color: var(--nile-colors-dark-500);
|
140
140
|
cursor: not-allowed;
|
141
141
|
}
|
142
142
|
|
143
143
|
/* Tertiary */
|
144
144
|
.button--standard.button--tertiary {
|
145
|
-
background-color: var(--nile-colors-
|
146
|
-
border-color: var(--nile-colors-
|
147
|
-
color: var(--nile-colors-
|
145
|
+
background-color: var(--nile-colors-white-base);
|
146
|
+
border-color: var(--nile-colors-neutral-500);
|
147
|
+
color: var(--nile-colors-dark-900);
|
148
148
|
}
|
149
149
|
|
150
150
|
.button--standard.button--tertiary:hover:not(.button--disabled) {
|
151
|
-
background-color: var(--nile-colors-
|
151
|
+
background-color: var(--nile-colors-dark-200);
|
152
152
|
border-color: var(--nile-colors-neutral-500);
|
153
|
-
color: var(--nile-colors-
|
153
|
+
color: var(--nile-colors-dark-900);
|
154
154
|
}
|
155
155
|
|
156
156
|
.button--standard.button--tertiary:active:not(.button--disabled) {
|
157
|
-
background-color: var(--nile-colors-
|
158
|
-
border-color: var(--nile-colors-
|
159
|
-
color: var(--nile-colors-
|
157
|
+
background-color: var(--nile-colors-neutral-400);
|
158
|
+
border-color: var(--nile-colors-neutral-700);
|
159
|
+
color: var(--nile-colors-dark-900);
|
160
160
|
}
|
161
161
|
|
162
162
|
.button--standard.button--tertiary.button--disabled,
|
163
163
|
.button--standard.button--tertiary.button--disabled:hover,
|
164
164
|
.button--standard.button--tertiary.button--disabled:active {
|
165
165
|
border-color: var(--nile-colors-neutral-500);
|
166
|
-
background-color: var(--nile-colors-
|
167
|
-
color: var(--nile-colors-
|
166
|
+
background-color: var(--nile-colors-white-base);
|
167
|
+
color: var(--nile-colors-neutral-500);
|
168
168
|
cursor: not-allowed;
|
169
169
|
box-shadow: none;
|
170
170
|
}
|
171
171
|
|
172
172
|
/* ghost */
|
173
173
|
.button--standard.button--ghost {
|
174
|
-
background-color: var(--nile-colors-
|
174
|
+
background-color: var(--nile-colors-white-base);
|
175
175
|
border-color: transparent;
|
176
|
-
color: var(--nile-colors-
|
176
|
+
color: var(--nile-colors-dark-900);
|
177
177
|
}
|
178
178
|
|
179
179
|
.button--standard.button--ghost:hover:not(.button--disabled) {
|
180
|
-
background-color: var(--nile-colors-
|
180
|
+
background-color: var(--nile-colors-dark-200);
|
181
181
|
border-color: transparent;
|
182
|
-
color: var(--nile-colors-
|
182
|
+
color: var(--nile-colors-dark-900);
|
183
183
|
}
|
184
184
|
|
185
185
|
.button--standard.button--ghost:active:not(.button--disabled) {
|
186
|
-
background-color: var(--nile-colors-
|
186
|
+
background-color: var(--nile-colors-neutral-400);
|
187
187
|
border-color: transparent;
|
188
|
-
color: var(--nile-colors-
|
188
|
+
color: var(--nile-colors-dark-900);
|
189
189
|
}
|
190
190
|
|
191
191
|
.button--standard.button--ghost.button--disabled,
|
192
192
|
.button--standard.button--ghost.button--disabled:hover,
|
193
193
|
.button--standard.button--ghost.button--disabled:active {
|
194
194
|
border-color: transparent;
|
195
|
-
background-color: var(--nile-colors-
|
196
|
-
color: var(--nile-colors-
|
195
|
+
background-color: var(--nile-colors-white-base);
|
196
|
+
color: var(--nile-colors-neutral-500);
|
197
197
|
cursor: not-allowed;
|
198
198
|
box-shadow: none;
|
199
199
|
}
|
200
200
|
|
201
201
|
/* caution */
|
202
202
|
.button--standard.button--caution {
|
203
|
-
background-color: var(--nile-colors-
|
204
|
-
border-color: var(--nile-colors-
|
205
|
-
color: var(--nile-colors-
|
203
|
+
background-color: var(--nile-colors-red-500);
|
204
|
+
border-color: var(--nile-colors-red-500);
|
205
|
+
color: var(--nile-colors-white-base);
|
206
206
|
}
|
207
207
|
|
208
208
|
.button--standard.button--caution:hover:not(.button--disabled) {
|
209
|
-
background-color: var(--nile-colors-
|
210
|
-
border-color: var(--nile-colors-
|
211
|
-
color: var(--nile-colors-
|
209
|
+
background-color: var(--nile-colors-red-700);
|
210
|
+
border-color: var(--nile-colors-red-700);
|
211
|
+
color: var(--nile-colors-white-base);
|
212
212
|
}
|
213
213
|
|
214
214
|
.button--standard.button--caution:active:not(.button--disabled) {
|
215
|
-
background-color: var(--nile-colors-
|
216
|
-
border-color:
|
217
|
-
color: var(--nile-colors-
|
215
|
+
background-color: var(--nile-colors-red-700);
|
216
|
+
border-color: #820B0B;
|
217
|
+
color: var(--nile-colors-white-base);
|
218
218
|
}
|
219
219
|
|
220
220
|
.button--standard.button--caution.button--disabled,
|
221
221
|
.button--standard.button--caution.button--disabled:hover,
|
222
222
|
.button--standard.button--caution.button--disabled:active {
|
223
|
-
background-color: var(--nile-colors-
|
224
|
-
border-color: var(--nile-colors-
|
225
|
-
color: var(--nile-colors-
|
223
|
+
background-color: var(--nile-colors-neutral-500);
|
224
|
+
border-color: var(--nile-colors-neutral-500);
|
225
|
+
color: var(--nile-colors-neutral-400);
|
226
226
|
}
|
227
227
|
|
228
228
|
/* destructive */
|
@@ -294,7 +294,7 @@ export const styles = css`
|
|
294
294
|
|
295
295
|
.button--standard.button--secondary-grey.button--disabled {
|
296
296
|
background-color: #eaecf0;
|
297
|
-
border-color: var(--nile-colors-
|
297
|
+
border-color: var(--nile-colors-neutral-700);
|
298
298
|
color: #98a2b3;
|
299
299
|
cursor: not-allowed;
|
300
300
|
}
|
@@ -302,7 +302,7 @@ export const styles = css`
|
|
302
302
|
.button--standard.button--secondary-grey.button--disabled:hover,
|
303
303
|
.button--standard.button--secondary-grey.button--disabled:active {
|
304
304
|
background-color: #eaecf0;
|
305
|
-
border-color: var(--nile-colors-
|
305
|
+
border-color: var(--nile-colors-neutral-700);
|
306
306
|
color: #98a2b3;
|
307
307
|
cursor: not-allowed;
|
308
308
|
}
|
@@ -347,78 +347,72 @@ export const styles = css`
|
|
347
347
|
|
348
348
|
/* Primary Variant - Nile Icon Fill */
|
349
349
|
.button--standard.button--primary ::slotted(nile-icon:not([color])) {
|
350
|
-
--nile-svg-fill: var(--nile-colors-
|
350
|
+
--nile-svg-fill: var(--nile-colors-white-base) !important;
|
351
351
|
}
|
352
352
|
.button--standard.button--primary:hover:not(.button--disabled)
|
353
353
|
::slotted(nile-icon:not([color])),
|
354
354
|
.button--standard.button--primary:active:not(.button--disabled)
|
355
355
|
::slotted(nile-icon:not([color])) {
|
356
|
-
--nile-svg-fill: var(--nile-colors-
|
356
|
+
--nile-svg-fill: var(--nile-colors-white-base) !important;
|
357
357
|
}
|
358
358
|
.button--standard.button--primary.button--disabled ::slotted(nile-icon:not([color])) {
|
359
|
-
--nile-svg-fill: var(--nile-colors-
|
359
|
+
--nile-svg-fill: var(--nile-colors-neutral-500) !important;
|
360
360
|
}
|
361
361
|
|
362
362
|
/* Secondary Variant */
|
363
363
|
.button--standard.button--secondary ::slotted(nile-icon:not([color])) {
|
364
|
-
--nile-svg-fill: var(--nile-colors-
|
364
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
365
365
|
}
|
366
366
|
.button--standard.button--secondary:hover:not(.button--disabled)
|
367
367
|
::slotted(nile-icon:not([color])),
|
368
368
|
.button--standard.button--secondary:active:not(.button--disabled)
|
369
369
|
::slotted(nile-icon:not([color])) {
|
370
|
-
--nile-svg-fill: var(--nile-colors-
|
370
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
371
371
|
}
|
372
372
|
.button--standard.button--secondary.button--disabled ::slotted(nile-icon:not([color])) {
|
373
|
-
--nile-svg-fill: var(
|
374
|
-
--nile-colors-button-secondary-disabled-text
|
375
|
-
) !important;
|
373
|
+
--nile-svg-fill: var(--nile-colors-dark-500) !important;
|
376
374
|
}
|
377
375
|
|
378
376
|
/* Tertiary Variant */
|
379
377
|
.button--standard.button--tertiary ::slotted(nile-icon:not([color])) {
|
380
|
-
--nile-svg-fill: var(--nile-colors-
|
378
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
381
379
|
}
|
382
380
|
.button--standard.button--tertiary:hover:not(.button--disabled)
|
383
381
|
::slotted(nile-icon:not([color])),
|
384
382
|
.button--standard.button--tertiary:active:not(.button--disabled)
|
385
383
|
::slotted(nile-icon:not([color])) {
|
386
|
-
--nile-svg-fill: var(--nile-colors-
|
384
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
387
385
|
}
|
388
386
|
.button--standard.button--tertiary.button--disabled ::slotted(nile-icon:not([color])) {
|
389
|
-
--nile-svg-fill: var(
|
390
|
-
--nile-colors-button-tertiary-disabled-text
|
391
|
-
) !important;
|
387
|
+
--nile-svg-fill: var(--nile-colors-neutral-500) !important;
|
392
388
|
}
|
393
389
|
|
394
390
|
/* Ghost Variant */
|
395
391
|
.button--standard.button--ghost ::slotted(nile-icon:not([color])) {
|
396
|
-
--nile-svg-fill: var(--nile-colors-
|
392
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
397
393
|
}
|
398
394
|
.button--standard.button--ghost:hover:not(.button--disabled)
|
399
395
|
::slotted(nile-icon:not([color])),
|
400
396
|
.button--standard.button--ghost:active:not(.button--disabled)
|
401
397
|
::slotted(nile-icon:not([color])) {
|
402
|
-
--nile-svg-fill: var(--nile-colors-
|
398
|
+
--nile-svg-fill: var(--nile-colors-dark-900) !important;
|
403
399
|
}
|
404
400
|
.button--standard.button--ghost ::slotted(nile-icon:not([color])) {
|
405
|
-
--nile-svg-fill: var(
|
406
|
-
--nile-colors-button-tertiary-disabled-text
|
407
|
-
) !important;
|
401
|
+
--nile-svg-fill: var(--nile-colors-neutral-500) !important;
|
408
402
|
}
|
409
403
|
|
410
404
|
/* Caution Variant */
|
411
405
|
.button--standard.button--caution ::slotted(nile-icon:not([color])) {
|
412
|
-
--nile-svg-fill: var(--nile-colors-
|
406
|
+
--nile-svg-fill: var(--nile-colors-white-base) !important;
|
413
407
|
}
|
414
408
|
.button--standard.button--caution:hover:not(.button--disabled)
|
415
409
|
::slotted(nile-icon:not([color])),
|
416
410
|
.button--standard.button--caution:active:not(.button--disabled)
|
417
411
|
::slotted(nile-icon:not([color])) {
|
418
|
-
--nile-svg-fill: var(--nile-colors-
|
412
|
+
--nile-svg-fill: var(--nile-colors-white-base) !important;
|
419
413
|
}
|
420
414
|
.button--standard.button--caution.button--disabled ::slotted(nile-icon:not([color])) {
|
421
|
-
--nile-svg-fill: var(--nile-colors-
|
415
|
+
--nile-svg-fill: var(--nile-colors-neutral-400) !important;
|
422
416
|
}
|
423
417
|
|
424
418
|
/* destructive */
|
@@ -2,6 +2,10 @@ import { fixture, html, expect, oneEvent } from '@open-wc/testing';
|
|
2
2
|
import './nile-checkbox';
|
3
3
|
import { NileCheckbox } from './nile-checkbox';
|
4
4
|
|
5
|
+
function wait(ms:number=50000) {
|
6
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
7
|
+
}
|
8
|
+
|
5
9
|
describe('NileCheckbox', () => {
|
6
10
|
it('renders correctly with default properties', async () => {
|
7
11
|
const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);
|
@@ -83,9 +87,8 @@ describe('NileCheckbox', () => {
|
|
83
87
|
const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text="test-help"></nile-checkbox>`);
|
84
88
|
el.showHelpText = true;
|
85
89
|
await el.updateComplete;
|
86
|
-
|
87
|
-
|
88
|
-
expect(helpTextIcon).to.exist;
|
90
|
+
const helpText=el.shadowRoot?.querySelector("nile-form-help-text")?.textContent?.trim()
|
91
|
+
expect(helpText).to.equal('test-help')
|
89
92
|
});
|
90
93
|
|
91
94
|
it('updates host class based on helpText', async () => {
|
@@ -166,23 +169,5 @@ describe('NileCheckbox', () => {
|
|
166
169
|
expect(checkbox.getAttribute('form')).to.equal('test-form');
|
167
170
|
});
|
168
171
|
|
169
|
-
it('displays and hides help text correctly', async () => {
|
170
|
-
const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text="test-help"></nile-checkbox>`);
|
171
|
-
|
172
|
-
// Initially, help text should not be shown
|
173
|
-
expect(el.showHelpText).to.be.false;
|
174
|
-
|
175
|
-
// Show the help text
|
176
|
-
el.showHelpText = true;
|
177
|
-
await el.updateComplete;
|
178
|
-
let helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');
|
179
|
-
expect(helpTextIcon).to.exist;
|
180
|
-
|
181
|
-
// Hide the help text
|
182
|
-
el.showHelpText = false;
|
183
|
-
await el.updateComplete;
|
184
|
-
helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');
|
185
|
-
expect(helpTextIcon).to.be.exist;
|
186
|
-
});
|
187
172
|
});
|
188
173
|
|
@@ -216,7 +216,7 @@ export class NileCheckbox extends NileElement {
|
|
216
216
|
@blur=${this.handleBlur}
|
217
217
|
@focus=${this.handleFocus}
|
218
218
|
/>
|
219
|
-
|
219
|
+
|
220
220
|
<span
|
221
221
|
part="control${this.checked ? ' control--checked' : ''}${this
|
222
222
|
.indeterminate
|
@@ -249,24 +249,17 @@ export class NileCheckbox extends NileElement {
|
|
249
249
|
`
|
250
250
|
: ''}
|
251
251
|
</span>
|
252
|
-
|
252
|
+
|
253
253
|
<div part="label" class="checkbox__label">
|
254
254
|
${typeof this.label === 'boolean' ? '' : this.label}
|
255
255
|
<slot></slot>
|
256
256
|
</div>
|
257
257
|
</label>
|
258
|
-
|
258
|
+
|
259
259
|
${hasHelpText
|
260
|
-
? html`
|
261
|
-
<nile-tooltip content="${this.helpText}" placement="bottom">
|
262
|
-
<nile-icon
|
263
|
-
name="question"
|
264
|
-
class="checkbox__helptext-icon"
|
265
|
-
></nile-icon>
|
266
|
-
</nile-tooltip>
|
267
|
-
`
|
260
|
+
? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `
|
268
261
|
: ``}
|
269
|
-
|
262
|
+
|
270
263
|
${hasErrorMessage
|
271
264
|
? html`
|
272
265
|
<nile-form-error-message
|
@@ -22,7 +22,7 @@ export const styles = css`
|
|
22
22
|
width: max-content;
|
23
23
|
box-shadow: 0px 2px 4px 0px rgba(119, 125, 130, 0.15);
|
24
24
|
border-radius: var(--nile-radius-base-standard);
|
25
|
-
border: 1px solid var(--nile-colors-
|
25
|
+
border: 1px solid var(--nile-colors-neutral-400);
|
26
26
|
background: var(--nile-colors-white-base);
|
27
27
|
font-family: var(--nile-font-family-serif);
|
28
28
|
}
|
@@ -82,6 +82,8 @@ export class NileToast extends NileElement {
|
|
82
82
|
@property({ type: Boolean, reflect: true }) hasSlottedIcon = false;
|
83
83
|
|
84
84
|
@property({ type: String, reflect: true }) prefixImageUrl = '';
|
85
|
+
|
86
|
+
@property({ type: String, reflect: true }) closeIconName = 'close';
|
85
87
|
|
86
88
|
/** The alert's theme variant. */
|
87
89
|
@property({ reflect: true }) variant:
|
@@ -366,7 +368,7 @@ export class NileToast extends NileElement {
|
|
366
368
|
part="close-button"
|
367
369
|
exportparts="base:close-button__base"
|
368
370
|
class="alert__close-button"
|
369
|
-
name="
|
371
|
+
name="${this.closeIconName}"
|
370
372
|
label="close"
|
371
373
|
size="20"
|
372
374
|
color="#98A2B3"
|
@@ -3621,7 +3621,7 @@
|
|
3621
3621
|
},
|
3622
3622
|
{
|
3623
3623
|
"name": "nile-toast",
|
3624
|
-
"description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the alert opens.\n\n * `nile-after-show` {} - Emitted after the alert opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the alert closes.\n\n * `nile-after-hide` {} - Emitted after the alert closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The alert's main content.\n\n * `icon` {} - An icon to show in the alert. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\nProperties:\n\n * `styles` - \n\n * `autoHideTimeout` {`number`} - \n\n * `hasSlotController` - \n\n * `base` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3624
|
+
"description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the alert opens.\n\n * `nile-after-show` {} - Emitted after the alert opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the alert closes.\n\n * `nile-after-hide` {} - Emitted after the alert closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The alert's main content.\n\n * `icon` {} - An icon to show in the alert. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `closeIconName` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\nProperties:\n\n * `styles` - \n\n * `autoHideTimeout` {`number`} - \n\n * `hasSlotController` - \n\n * `base` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `closeIconName` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
3625
3625
|
"attributes": [
|
3626
3626
|
{
|
3627
3627
|
"name": "open",
|
@@ -3652,6 +3652,10 @@
|
|
3652
3652
|
"name": "prefixImageUrl",
|
3653
3653
|
"description": "`prefixImageUrl` {`string`} - \n\nProperty: prefixImageUrl\n\nDefault: "
|
3654
3654
|
},
|
3655
|
+
{
|
3656
|
+
"name": "closeIconName",
|
3657
|
+
"description": "`closeIconName` {`string`} - \n\nProperty: closeIconName\n\nDefault: close"
|
3658
|
+
},
|
3655
3659
|
{
|
3656
3660
|
"name": "variant",
|
3657
3661
|
"description": "`variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\nProperty: variant\n\nDefault: success",
|