@triptease/tt-navbar 0.0.30 → 0.0.32

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.30
2
+ * @triptease/tt-navbar v0.0.32
3
3
  */
4
4
 
5
5
  // src/urlMappings.ts
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent tt-navbar following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "tt-navbar",
6
- "version": "0.0.30",
6
+ "version": "0.0.32",
7
7
  "type": "module",
8
8
  "main": "dist/src/index.js",
9
9
  "module": "dist/src/index.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@triptease/icons": "^1.1.1",
31
- "@triptease/tt-combobox": "^5.2.1",
31
+ "@triptease/tt-combobox": "^5.3.0",
32
32
  "lit": "^3.1.4"
33
33
  },
34
34
  "devDependencies": {
package/src/styles.ts CHANGED
@@ -15,7 +15,7 @@ const visuallyHiddenCss = css`
15
15
 
16
16
  export const styles = css`
17
17
  :host {
18
- --nav-bar-width: 250px;
18
+ --nav-bar-width: 260px;
19
19
 
20
20
  display: block;
21
21
  height: 100vh;
@@ -369,6 +369,7 @@ export const styles = css`
369
369
  --tt-combobox-list-max-width: 80ch;
370
370
  --tt-combobox-min-width: 244px;
371
371
  --tt-combobox-max-width: 244px;
372
+ --tt-combobox-option-selected-color: var(--color-text-inverted-500);
372
373
  }
373
374
 
374
375
  .single-client-name {
@@ -317,6 +317,8 @@ describe('TtNavbar', () => {
317
317
  { clientKey: 'abc123', displayName: 'Client Two' }
318
318
  ];
319
319
  navbar.onClientChange = onClientChange;
320
+
321
+ console.log(getComputedStyle(navbar).getPropertyValue('--nav-bar-width'));
320
322
  await navbar.updateComplete;
321
323
 
322
324
  const combobox = navbar.shadowRoot?.querySelector('tt-combobox');
@@ -326,4 +328,22 @@ describe('TtNavbar', () => {
326
328
 
327
329
  expect(selectedClientKey).to.equal('abc123');
328
330
  });
331
+
332
+ it('should set the --nav-bar-width css variable when collapsed', async () => {
333
+ const navbar = await fixture<TtNavbar>(
334
+ `<tt-navbar client-key=${CLIENT_KEY}></tt-navbar>`
335
+ );
336
+
337
+ await expect(getComputedStyle(navbar).getPropertyValue('--nav-bar-width').trim()).to.equal('260px');
338
+
339
+ const navbarToggleBtn = navbar.shadowRoot!.querySelector(
340
+ '#navbar-toggle-btn'
341
+ ) as HTMLButtonElement;
342
+
343
+ navbarToggleBtn.click();
344
+ await elementUpdated(navbar);
345
+
346
+ await expect(getComputedStyle(navbar).getPropertyValue('--nav-bar-width').trim()).to.equal('fit-content');
347
+
348
+ });
329
349
  });