@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.
- package/components.json +9 -1
- package/dist/cjs/swirl-app-layout_6.cjs.entry.js +4 -2
- package/dist/cjs/swirl-stack.cjs.entry.js +1 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.css +22 -0
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.js +4 -1
- package/dist/collection/components/swirl-stack/swirl-stack.css +1 -0
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-app-layout2.js +4 -2
- package/dist/components/swirl-stack2.js +1 -1
- package/dist/esm/swirl-app-layout_6.entry.js +4 -2
- package/dist/esm/swirl-stack.entry.js +1 -1
- package/dist/swirl-components/p-b6574b40.entry.js +1 -0
- package/dist/swirl-components/p-ce8b942c.entry.js +1 -0
- package/dist/swirl-components/swirl-components.css +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-app-layout/swirl-app-layout.d.ts +1 -0
- package/package.json +1 -1
- package/dist/swirl-components/p-a1c42a2c.entry.js +0 -1
- package/dist/swirl-components/p-dc8bd5af.entry.js +0 -1
|
@@ -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"; }
|