@getflip/swirl-components 0.167.2 → 0.168.0

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.
@@ -33,6 +33,7 @@ export class SwirlAppLayout {
33
33
  this.backToNavigationViewButtonLabel = "Back to navigation";
34
34
  this.ctaIcon = undefined;
35
35
  this.ctaLabel = undefined;
36
+ this.hasNavigation = undefined;
36
37
  this.hideAppBar = undefined;
37
38
  this.navigationBackButtonLabel = "Go back";
38
39
  this.navigationLabel = undefined;
@@ -41,7 +42,6 @@ export class SwirlAppLayout {
41
42
  this.sidebarHeading = undefined;
42
43
  this.transitionStyle = "slides";
43
44
  this.hasCustomAppBarBackButton = undefined;
44
- this.hasNavigation = undefined;
45
45
  this.hasSidebar = undefined;
46
46
  this.mobileView = "navigation";
47
47
  this.sidebarActive = undefined;
@@ -284,6 +284,23 @@ export class SwirlAppLayout {
284
284
  "attribute": "cta-label",
285
285
  "reflect": false
286
286
  },
287
+ "hasNavigation": {
288
+ "type": "boolean",
289
+ "mutable": true,
290
+ "complexType": {
291
+ "original": "boolean",
292
+ "resolved": "boolean",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": ""
300
+ },
301
+ "attribute": "has-navigation",
302
+ "reflect": false
303
+ },
287
304
  "hideAppBar": {
288
305
  "type": "boolean",
289
306
  "mutable": false,
@@ -411,7 +428,6 @@ export class SwirlAppLayout {
411
428
  static get states() {
412
429
  return {
413
430
  "hasCustomAppBarBackButton": {},
414
- "hasNavigation": {},
415
431
  "hasSidebar": {},
416
432
  "mobileView": {},
417
433
  "sidebarActive": {},
@@ -66,6 +66,7 @@ const Template = (args) => {
66
66
  export const SwirlAppLayout = Template.bind({});
67
67
  SwirlAppLayout.args = {
68
68
  appName: "App Name",
69
+ hasNavigation: true,
69
70
  navigationLabel: "Items",
70
71
  sidebarHeading: "Sidebar Heading",
71
72
  };
@@ -96,7 +96,7 @@ export class SwirlAvatar {
96
96
  const showIcon = !showImage && !showInitials && Boolean(this.icon);
97
97
  const showFallbackIcon = !showImage && !showInitials && !showIcon;
98
98
  const showBadge = Boolean(this.badge) && this.size === "m";
99
- const role = this.interactive ? "button" : "img";
99
+ const role = this.interactive ? "button" : undefined;
100
100
  const className = classnames("avatar", `avatar--color-${this.color}`, `avatar--size-${this.size}`, `avatar--variant-${this.variant}`, {
101
101
  "avatar--has-icon": showIcon || showFallbackIcon,
102
102
  "avatar--has-initials": showInitials,
@@ -7,7 +7,7 @@ describe("swirl-avatar", () => {
7
7
  html: `<swirl-avatar label="John Doe"></swirl-avatar>`,
8
8
  });
9
9
  expect(page.root).toEqualHtml(`
10
- <swirl-avatar aria-label="John Doe" label="John Doe" role="img">
10
+ <swirl-avatar aria-label="John Doe" label="John Doe">
11
11
  <mock:shadow-root>
12
12
  <span class="avatar avatar--color-kiwi avatar--has-icon avatar--size-m avatar--variant-round" part="avatar">
13
13
  <span class="avatar__icon">
@@ -33,7 +33,7 @@ describe("swirl-avatar", () => {
33
33
  html: `<swirl-avatar label="John Doe" src="https://"></swirl-avatar>`,
34
34
  });
35
35
  expect(page.root).toEqualHtml(`
36
- <swirl-avatar aria-label="John Doe" label="John Doe" role="img" src="https://">
36
+ <swirl-avatar aria-label="John Doe" label="John Doe" src="https://">
37
37
  <mock:shadow-root>
38
38
  <span class="avatar avatar--color-kiwi avatar--size-m avatar--variant-round" part="avatar">
39
39
  <span class="avatar__image">
@@ -53,7 +53,7 @@ describe("swirl-avatar", () => {
53
53
  html: `<swirl-avatar initials="JD" label="John Doe"></swirl-avatar>`,
54
54
  });
55
55
  expect(page.root).toEqualHtml(`
56
- <swirl-avatar aria-label="John Doe" initials="JD" label="John Doe" role="img">
56
+ <swirl-avatar aria-label="John Doe" initials="JD" label="John Doe">
57
57
  <mock:shadow-root>
58
58
  <span class="avatar avatar--color-kiwi avatar--has-initials avatar--size-m avatar--variant-round" part="avatar">
59
59
  <span class="avatar__initials">
@@ -75,7 +75,7 @@ describe("swirl-avatar", () => {
75
75
  html: `<swirl-avatar icon="<swirl-icon-close></swirl-icon-close>" label="John Doe"></swirl-avatar>`,
76
76
  });
77
77
  expect(page.root).toEqualHtml(`
78
- <swirl-avatar aria-label="John Doe" icon="<swirl-icon-close></swirl-icon-close>" label="John Doe" role="img">
78
+ <swirl-avatar aria-label="John Doe" icon="<swirl-icon-close></swirl-icon-close>" label="John Doe">
79
79
  <mock:shadow-root>
80
80
  <span class="avatar avatar--color-kiwi avatar--has-icon avatar--size-m avatar--variant-round" part="avatar">
81
81
  <span class="avatar__icon">
@@ -118,7 +118,7 @@ describe("swirl-avatar", () => {
118
118
  html: `<swirl-avatar badge="<swirl-badge aria-label='3 new messages' label='3'></swirl-badge>" badge-position="top" label="John Doe"></swirl-avatar>`,
119
119
  });
120
120
  expect(page.root).toEqualHtml(`
121
- <swirl-avatar aria-label="John Doe" badge="<swirl-badge aria-label='3 new messages' label='3'></swirl-badge>" badge-position="top" label="John Doe" role="img">
121
+ <swirl-avatar aria-label="John Doe" badge="<swirl-badge aria-label='3 new messages' label='3'></swirl-badge>" badge-position="top" label="John Doe">
122
122
  <mock:shadow-root>
123
123
  <span class="avatar avatar--color-kiwi avatar--has-icon avatar--size-m avatar--variant-round" part="avatar">
124
124
  <span class="avatar__icon">
@@ -141,7 +141,7 @@ describe("swirl-avatar", () => {
141
141
  html: `<swirl-avatar label="John Doe" show-label></swirl-avatar>`,
142
142
  });
143
143
  expect(page.root).toEqualHtml(`
144
- <swirl-avatar aria-label="John Doe" label="John Doe" role="img" show-label="">
144
+ <swirl-avatar aria-label="John Doe" label="John Doe" show-label="">
145
145
  <mock:shadow-root>
146
146
  <span class="avatar avatar--color-kiwi avatar--has-icon avatar--size-m avatar--variant-round" part="avatar">
147
147
  <span class="avatar__icon">