@aquera/nile-elements 2.0.7 → 2.0.8

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/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": "2.0.7",
6
+ "version": "2.0.8",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -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.nile-chip--open:hover {
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
- border: none;
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
  });