@aquera/nile-elements 2.0.7 → 2.0.9
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/dist/index.js +627 -265
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +4 -8
- 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 +4 -5
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +2 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +126 -6
- package/dist/nile-select/nile-select.esm.js +77 -11
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +3 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -3
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +126 -6
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +71 -12
- package/dist/src/nile-chip/nile-chip.css.js +4 -8
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +4 -5
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.test.js +5 -0
- package/dist/src/nile-input/nile-input.test.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +126 -6
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +43 -5
- package/dist/src/nile-select/nile-select.js +445 -106
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.test.d.ts +1 -0
- package/dist/src/nile-select/nile-select.test.js +342 -1
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +3 -1
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +126 -6
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +45 -4
- package/dist/src/nile-virtual-select/nile-virtual-select.js +385 -59
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +253 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-chip/nile-chip.css.ts +4 -8
- package/src/nile-input/nile-input.css.ts +4 -5
- package/src/nile-input/nile-input.test.ts +6 -0
- package/src/nile-select/nile-select.css.ts +126 -6
- package/src/nile-select/nile-select.test.ts +478 -1
- package/src/nile-select/nile-select.ts +499 -91
- package/src/nile-select/virtual-scroll-helper.ts +3 -1
- package/src/nile-virtual-select/nile-virtual-select.css.ts +126 -6
- package/src/nile-virtual-select/nile-virtual-select.test.ts +352 -1
- package/src/nile-virtual-select/nile-virtual-select.ts +460 -55
- package/vscode-html-custom-data.json +40 -6
package/package.json
CHANGED
|
@@ -123,7 +123,7 @@ export const styles = css`
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.nile-chip--disabled {
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
/* opacity: 0.5; */
|
|
128
128
|
cursor: not-allowed;
|
|
129
129
|
border-radius: var(--nile-radius-radius-xs,var(--ng-radius-md));
|
|
@@ -178,7 +178,7 @@ export const styles = css`
|
|
|
178
178
|
nile-auto-complete::part(base) {
|
|
179
179
|
height: auto;
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
.nile-chip:hover:not(.nile-chip--disabled) {
|
|
183
183
|
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-neutral));
|
|
184
184
|
box-shadow: var(--nile-box-shadow-10);
|
|
@@ -189,8 +189,8 @@ export const styles = css`
|
|
|
189
189
|
box-shadow: none;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
.nile-chip
|
|
192
|
+
.nile-chip.nile-chip--open:hover,
|
|
193
|
+
:host(:not([disabled])) .nile-chip:focus-within {
|
|
194
194
|
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-brand));
|
|
195
195
|
box-shadow: var(--nile-box-shadow-10, 0 0 0 1px var(--ng-colors-border-brand) inset ); /* Need to create token for it */
|
|
196
196
|
}
|
|
@@ -200,10 +200,6 @@ export const styles = css`
|
|
|
200
200
|
gap: 2px;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
nile-auto-complete::part(base)::before {
|
|
204
|
-
box-shadow: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
203
|
:host([required]) .form-control--has-label .form-control__label::after {
|
|
208
204
|
content: '*';
|
|
209
205
|
margin-inline-start: -2px;
|
|
@@ -194,7 +194,7 @@ export const styles = css`
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.input--standard.input--focused:not(.input--disabled) .input__control {
|
|
197
|
-
color: var(--nile-colors-primary-900);
|
|
197
|
+
color: var(--nile-colors-primary-900, var(--ng-colors-text-primary-900));
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.input--standard.input--disabled {
|
|
@@ -349,7 +349,7 @@ export const styles = css`
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
.input:hover:not(.input--disabled) .input__control {
|
|
352
|
-
color: var(--nile-colors-dark-900);
|
|
352
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
.input__control:focus {
|
|
@@ -561,9 +561,8 @@ export const styles = css`
|
|
|
561
561
|
box-shadow: 0 0 0 0;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
:host([no-border]) .input--standard.input--focused:not(.input--disabled) {
|
|
565
|
-
|
|
566
|
-
box-shadow: 0 0 0 0;
|
|
564
|
+
:host([no-border]) .input--standard.input--focused:not(.input--disabled)::before {
|
|
565
|
+
box-shadow: none;
|
|
567
566
|
}
|
|
568
567
|
|
|
569
568
|
.input__password {
|
|
@@ -103,4 +103,10 @@ describe('NileInput', () => {
|
|
|
103
103
|
it('98. type tel', async () => { const el = await fixture<NileInput>(html`<nile-input type="tel"></nile-input>`); expect(el.type).to.equal('tel'); });
|
|
104
104
|
it('99. type url', async () => { const el = await fixture<NileInput>(html`<nile-input type="url"></nile-input>`); expect(el.type).to.equal('url'); });
|
|
105
105
|
it('100. full integration', async () => { const el = await fixture<NileInput>(html`<nile-input type="email" name="email" value="test@test.com" size="large" filled pill class="inp" id="i1"></nile-input>`); expect(el.type).to.equal('email'); expect(el.name).to.equal('email'); expect(el.value).to.equal('test@test.com'); expect(el.size).to.equal('large'); expect(el.filled).to.be.true; expect(el.pill).to.be.true; expect(el.id).to.equal('i1'); });
|
|
106
|
+
|
|
107
|
+
// UIF-1350 — nile-chip / nile-auto-complete render a borderless nile-input; the
|
|
108
|
+
// nxtgen focus ring is an inset box-shadow on ::before, so `no-border` has to
|
|
109
|
+
// suppress it too or a blue border shows up inside the chip on focus.
|
|
110
|
+
it('101. no-border paints no focus ring', async () => { const el = await fixture<NileInput>(html`<nile-input no-border no-outline style="--ng-colors-border-brand: rgb(0, 0, 255)"></nile-input>`); el.input.focus(); await el.updateComplete; const base = el.shadowRoot!.querySelector('[part="base"]') as HTMLElement; expect(base.classList.contains('input--focused')).to.be.true; expect(getComputedStyle(base, '::before').boxShadow).to.equal('none'); });
|
|
111
|
+
it('102. focus ring still paints without no-border', async () => { const el = await fixture<NileInput>(html`<nile-input style="--ng-colors-border-brand: rgb(0, 0, 255)"></nile-input>`); el.input.focus(); await el.updateComplete; const base = el.shadowRoot!.querySelector('[part="base"]') as HTMLElement; expect(getComputedStyle(base, '::before').boxShadow).to.contain('inset'); });
|
|
106
112
|
});
|
|
@@ -195,7 +195,7 @@ export const styles = css`
|
|
|
195
195
|
display: flex;
|
|
196
196
|
flex: 1;
|
|
197
197
|
align-items: center;
|
|
198
|
-
flex-wrap:
|
|
198
|
+
flex-wrap: nowrap;
|
|
199
199
|
margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));
|
|
200
200
|
width: 100%;
|
|
201
201
|
overflow: hidden;
|
|
@@ -216,6 +216,98 @@ export const styles = css`
|
|
|
216
216
|
margin-right: var(--nile-spacing-5xl, var(--ng-spacing-5xl));
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
button.select__tags-count {
|
|
220
|
+
appearance: none;
|
|
221
|
+
-webkit-appearance: none;
|
|
222
|
+
background: none;
|
|
223
|
+
text-align: inherit;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
button.select__tags-count:disabled {
|
|
227
|
+
cursor: not-allowed;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.select__tags--fitted {
|
|
231
|
+
min-width: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.select__tags nile-lite-tooltip.select__tag-tip {
|
|
235
|
+
display: contents;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.select__tags nile-tag {
|
|
239
|
+
flex: 0 1 auto;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
min-width: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* A chip is capped - and so truncated - only when a tooltip can reveal the
|
|
245
|
+
full value. Without one it keeps its natural width and the fit pass moves
|
|
246
|
+
the surplus into the +N button instead. */
|
|
247
|
+
:host([showtooltip]) .select__tags nile-tag {
|
|
248
|
+
max-width: var(--nile-width-180px, var(--ng-height-180px));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Only the fitted layout can move a chip into the +N button, so only there
|
|
252
|
+
can a chip refuse to shrink. */
|
|
253
|
+
:host(:not([showtooltip])) .select__tags--fitted nile-tag {
|
|
254
|
+
flex-shrink: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.select__tags nile-tag::part(base) {
|
|
258
|
+
max-width: 100%;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.select__tags nile-tag::part(prefix_content_wrapper) {
|
|
262
|
+
flex: 1 1 auto;
|
|
263
|
+
min-width: 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.select__tags nile-tag::part(content) {
|
|
267
|
+
display: block;
|
|
268
|
+
flex: 1 1 auto;
|
|
269
|
+
min-width: 0;
|
|
270
|
+
/* The tag's line-height of 1 leaves the clip box shorter than the glyph
|
|
271
|
+
box, so descenders are cut. Pad the clip box, negate it in layout. */
|
|
272
|
+
padding-block: 3px;
|
|
273
|
+
margin-block: -3px;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
white-space: nowrap;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host([showtooltip]) .select__tags nile-tag::part(content) {
|
|
279
|
+
text-overflow: ellipsis;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.select__tags nile-tag::part(remove-button) {
|
|
283
|
+
flex: 0 0 auto;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.select__tags--fitted nile-tag:focus-visible {
|
|
287
|
+
outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
288
|
+
outline-offset: 1px;
|
|
289
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.select__tags--fitted .select__tags-count {
|
|
293
|
+
flex: 0 0 auto;
|
|
294
|
+
margin: 0;
|
|
295
|
+
padding: 0 var(--nile-spacing-xsmall, var(--ng-spacing-md));
|
|
296
|
+
height: var(--nile-height-26px, var(--ng-height-26px));
|
|
297
|
+
display: inline-flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
white-space: nowrap;
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
border: 1px dashed
|
|
302
|
+
var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));
|
|
303
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-sm));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.select__tags--fitted .select__tags-count:focus-visible {
|
|
307
|
+
outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
308
|
+
outline-offset: 1px;
|
|
309
|
+
}
|
|
310
|
+
|
|
219
311
|
.select__tags::slotted(nile-tag) {
|
|
220
312
|
cursor: pointer !important;
|
|
221
313
|
}
|
|
@@ -443,6 +535,8 @@ export const styles = css`
|
|
|
443
535
|
bottom: 0;
|
|
444
536
|
z-index: 1;
|
|
445
537
|
background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
538
|
+
container-type: inline-size;
|
|
539
|
+
container-name: nile-select-footer;
|
|
446
540
|
}
|
|
447
541
|
|
|
448
542
|
.select__custom-footer {
|
|
@@ -469,10 +563,40 @@ export const styles = css`
|
|
|
469
563
|
flex-direction: row;
|
|
470
564
|
align-items: center;
|
|
471
565
|
padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
472
|
-
gap: var(--nile-spacing-
|
|
566
|
+
gap: var(--nile-spacing-none, var(--ng-spacing-none));
|
|
473
567
|
justify-content: space-between;
|
|
474
568
|
}
|
|
475
569
|
|
|
570
|
+
.select__footer-action,
|
|
571
|
+
.select__footer .select__clear {
|
|
572
|
+
display: inline-flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
575
|
+
min-width: 0;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.select__footer-glyph {
|
|
579
|
+
flex: 0 0 auto;
|
|
580
|
+
display: inline-flex;
|
|
581
|
+
vertical-align: middle;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.select__footer-label {
|
|
585
|
+
white-space: nowrap;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
@container nile-select-footer (max-width: 178px) {
|
|
589
|
+
.select__clear .select__footer-label {
|
|
590
|
+
display: none;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
@container nile-select-footer (max-width: 137px) {
|
|
595
|
+
.select__footer-label {
|
|
596
|
+
display: none;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
476
600
|
:host([legacy]) .select__footer {
|
|
477
601
|
background: var(--nile-colors-neutral-100);
|
|
478
602
|
border-top: 1px solid var(--nile-colors-neutral-400);
|
|
@@ -516,10 +640,6 @@ export const styles = css`
|
|
|
516
640
|
}
|
|
517
641
|
}
|
|
518
642
|
|
|
519
|
-
.select__invisible {
|
|
520
|
-
opacity: 0;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
643
|
.select__prefix--from-options {
|
|
524
644
|
margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));
|
|
525
645
|
}
|