@getflip/swirl-components 0.127.2 → 0.128.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.
@@ -219,6 +219,19 @@
219
219
  display: block;
220
220
  }
221
221
 
222
+ .app-layout--has-bottom-bar .app-layout__body {
223
+ grid-template-rows: minmax(3.5rem, auto) auto 1fr auto;
224
+ grid-template-areas:
225
+ "app-bar"
226
+ "banner"
227
+ "content"
228
+ "bottom-bar";
229
+ }
230
+
231
+ .app-layout--has-bottom-bar .app-layout__bottom-bar {
232
+ display: block;
233
+ }
234
+
222
235
  .app-layout--has-custom-app-bar-back-button .app-layout__custom-app-bar-back-button {
223
236
  display: block;
224
237
  }
@@ -355,6 +368,15 @@
355
368
  gap: var(--s-space-8);
356
369
  }
357
370
 
371
+ .app-layout__bottom-bar {
372
+ display: none;
373
+ min-width: 0;
374
+ align-items: center;
375
+ border-top: var(--s-border-width-default) solid var(--s-border-default);
376
+ background-color: var(--s-background-default);
377
+ grid-area: bottom-bar;
378
+ }
379
+
358
380
  .app-layout__back-to-navigation-button {
359
381
  padding-left: var(--s-space-8);
360
382
  }
@@ -7,6 +7,7 @@ import { isMobileViewport } from "../../utils";
7
7
  * @slot navigation-controls - Controls for the navigation header
8
8
  * @slot navigation-mobile-menu-button - Used to add a mobile shell layout menu button to navigation
9
9
  * @slot app-bar - The app bar contents
10
+ * @slot bottom-bar - The bottom bar contents
10
11
  * @slot custom-app-bar-back-button - Replaces the mobile default back button of the content app bar
11
12
  * @slot app-bar-mobile-menu-button - Used to add a mobile shell layout menu button to the app bar
12
13
  * @slot banner - Used to show a banner below the app bar
@@ -178,6 +179,7 @@ export class SwirlAppLayout {
178
179
  this.hasNavigation &&
179
180
  !this.hasCustomAppBarBackButton;
180
181
  const hasAppBarControls = Boolean(this.el.querySelector('[slot="app-bar-controls"]'));
182
+ const hasBottomBar = Boolean(this.el.querySelector('[slot="bottom-bar"]'));
181
183
  const hasAppBarMobileMenuButton = Boolean(this.el.querySelector('[slot="app-bar-mobile-menu-button"]'));
182
184
  const hasCustomSidebarHeader = Boolean(this.el.querySelector('[slot="custom-sidebar-header"]'));
183
185
  const hasFloatingActionButton = Boolean(this.el.querySelector('[slot="floating-action-button"]')) ||
@@ -185,6 +187,7 @@ export class SwirlAppLayout {
185
187
  const className = classnames("app-layout", `app-layout--mobile-view-${this.mobileView}`, `app-layout--transitioning-from-${this.transitioningFrom}`, `app-layout--transitioning-to-${this.transitioningTo}`, `app-layout--transition-style-${this.transitionStyle}`, {
186
188
  "app-layout--has-app-bar-mobile-menu-button": hasAppBarMobileMenuButton,
187
189
  "app-layout--has-app-bar-controls": hasAppBarControls,
190
+ "app-layout--has-bottom-bar": hasBottomBar,
188
191
  "app-layout--has-custom-app-bar-back-button": this.hasCustomAppBarBackButton,
189
192
  "app-layout--has-custom-sidebar-header": hasCustomSidebarHeader,
190
193
  "app-layout--has-floating-action-button": hasFloatingActionButton,
@@ -196,7 +199,7 @@ export class SwirlAppLayout {
196
199
  });
197
200
  return (h(Host, null, h("section", { "aria-labelledby": "app-name", class: className, role: "document", tabIndex: 0 }, h("div", { class: "app-layout__grid" }, h("header", { class: "app-layout__header" }, h("span", { class: "app-layout__navigation-mobile-menu-button" }, h("slot", { name: "navigation-mobile-menu-button" })), this.showNavigationBackButton && (h("span", { class: "app-layout__navigation-back-button" }, h("swirl-button", { hideLabel: true, icon: "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.navigationBackButtonLabel, onClick: this.onNavigationBackButtonClick }))), h("swirl-heading", { as: "h1", class: "app-layout__app-name", headingId: "app-name", level: 3, text: this.appName }), this.hasNavigation && (h("span", { class: "app-layout__navigation-controls" }, h("slot", { name: "navigation-controls" })))), h("nav", { "aria-label": this.navigationLabel, class: "app-layout__navigation" }, h("slot", { name: "navigation" })), h("section", { "aria-labelledby": "app-name", class: "app-layout__body" }, !this.hideAppBar && (h("header", { class: "app-layout__app-bar" }, h("span", { class: "app-layout__app-bar-mobile-menu-button" }, h("slot", { name: "app-bar-mobile-menu-button" })), showBackToNavigationButton && (h("span", { class: "app-layout__back-to-navigation-button" }, h("swirl-button", { hideLabel: true, icon: this.transitionStyle === "dialog"
198
201
  ? "<swirl-icon-close></swirl-icon-close>"
199
- : "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.backToNavigationViewButtonLabel, onClick: this.onBackToNavigationViewButtonClick }))), h("span", { class: "app-layout__custom-app-bar-back-button" }, h("slot", { name: "custom-app-bar-back-button" })), h("div", { class: "app-layout__app-bar-content" }, h("slot", { name: "app-bar" })), h("div", { class: "app-layout__app-bar-controls" }, h("slot", { name: "app-bar-controls" })))), h("div", { class: "app-layout__banner" }, h("slot", { name: "banner" })), h("div", { class: "app-layout__content" }, h("slot", { name: "content" }))), h("aside", { class: "app-layout__sidebar" }, h("header", { class: "app-layout__custom-sidebar-header" }, h("slot", { name: "custom-sidebar-header" })), h("header", { class: "app-layout__sidebar-header" }, h("swirl-button", { class: "app-layout__sidebar-close-button", hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.sidebarCloseButtonLabel, onClick: this.onSidebarCloseButtonClick }), h("swirl-heading", { as: "h3", class: "app-layout__sidebar-heading", headingId: "sidebar-heading", level: 3, text: this.sidebarHeading })), h("div", { class: "app-layout__sidebar-content" }, h("slot", { name: "sidebar" }))), h("span", { class: "app-layout__floating-action-button" }, this.ctaLabel && (h("swirl-button", { hideLabel: Boolean(this.ctaIcon), icon: this.ctaIcon, intent: "primary", label: this.ctaLabel, onClick: this.onCtaClick, variant: "floating" })), h("slot", { name: "floating-action-button" }))))));
202
+ : "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.backToNavigationViewButtonLabel, onClick: this.onBackToNavigationViewButtonClick }))), h("span", { class: "app-layout__custom-app-bar-back-button" }, h("slot", { name: "custom-app-bar-back-button" })), h("div", { class: "app-layout__app-bar-content" }, h("slot", { name: "app-bar" })), h("div", { class: "app-layout__app-bar-controls" }, h("slot", { name: "app-bar-controls" })))), h("div", { class: "app-layout__banner" }, h("slot", { name: "banner" })), h("div", { class: "app-layout__content" }, h("slot", { name: "content" })), h("div", { class: "app-layout__bottom-bar" }, h("slot", { name: "bottom-bar" }))), h("aside", { class: "app-layout__sidebar" }, h("header", { class: "app-layout__custom-sidebar-header" }, h("slot", { name: "custom-sidebar-header" })), h("header", { class: "app-layout__sidebar-header" }, h("swirl-button", { class: "app-layout__sidebar-close-button", hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.sidebarCloseButtonLabel, onClick: this.onSidebarCloseButtonClick }), h("swirl-heading", { as: "h3", class: "app-layout__sidebar-heading", headingId: "sidebar-heading", level: 3, text: this.sidebarHeading })), h("div", { class: "app-layout__sidebar-content" }, h("slot", { name: "sidebar" }))), h("span", { class: "app-layout__floating-action-button" }, this.ctaLabel && (h("swirl-button", { hideLabel: Boolean(this.ctaIcon), icon: this.ctaIcon, intent: "primary", label: this.ctaLabel, onClick: this.onCtaClick, variant: "floating" })), h("slot", { name: "floating-action-button" }))))));
200
203
  }
201
204
  static get is() { return "swirl-app-layout"; }
202
205
  static get encapsulation() { return "shadow"; }
@@ -11,6 +11,7 @@
11
11
  display: flex;
12
12
  width: 100%;
13
13
  max-width: 100%;
14
+ margin: 0;
14
15
  }
15
16
 
16
17
  .stack ::slotted(*) {