@tectra-ng/blocks 0.4.2 → 0.4.3
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/app-layout/README.md +2 -0
- package/confetti/README.md +1 -1
- package/fesm2022/tectra-ng-blocks-app-layout.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-confetti.mjs +13 -3
- package/fesm2022/tectra-ng-blocks-confetti.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs +2 -2
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-kanban.mjs +90 -10
- package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-network-status.mjs +28 -7
- package/fesm2022/tectra-ng-blocks-network-status.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs +22 -1
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks-theme-configurator.mjs +11 -3
- package/fesm2022/tectra-ng-blocks-theme-configurator.mjs.map +1 -1
- package/fesm2022/tectra-ng-blocks.mjs +1 -1
- package/kanban/README.md +13 -2
- package/network-status/README.md +1 -0
- package/package.json +6 -6
- package/pinned-tabs/README.md +1 -0
- package/theme-configurator/README.md +5 -5
- package/types/tectra-ng-blocks-confetti.d.ts +3 -0
- package/types/tectra-ng-blocks-confetti.d.ts.map +1 -1
- package/types/tectra-ng-blocks-kanban.d.ts +51 -11
- package/types/tectra-ng-blocks-kanban.d.ts.map +1 -1
- package/types/tectra-ng-blocks-network-status.d.ts +7 -0
- package/types/tectra-ng-blocks-network-status.d.ts.map +1 -1
- package/types/tectra-ng-blocks-pinned-tabs.d.ts +7 -0
- package/types/tectra-ng-blocks-pinned-tabs.d.ts.map +1 -1
- package/types/tectra-ng-blocks-theme-configurator.d.ts +1 -1
- package/types/tectra-ng-blocks.d.ts +1 -1
package/app-layout/README.md
CHANGED
|
@@ -12,6 +12,8 @@ The shell of a signed-in app: a sidebar menu, a top bar, the page and a footer.
|
|
|
12
12
|
|
|
13
13
|
`model` takes `TxPanelMenuItem` sections, as `tx-panel-menu` with `variant="sidebar"` draws them: a section with a `label` gets a title, items take `icon`, `routerLink`, `badge`, `disabled` (a lock), nested `items` and `active`. Without the sidebar (`[sidebar]="false"`) the top bar shows the logo and the title instead — for pages before the user has a workspace.
|
|
14
14
|
|
|
15
|
+
When the page is printed the sidebar, the top bar and the backdrop are left out and the page content takes the full width of the paper.
|
|
16
|
+
|
|
15
17
|
## Inputs
|
|
16
18
|
| Name | Description |
|
|
17
19
|
|---|---|
|
package/confetti/README.md
CHANGED
|
@@ -16,7 +16,7 @@ A one-time burst of confetti from the middle of its box — for a finished onboa
|
|
|
16
16
|
}
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The burst plays once when it appears; `play()` plays it again. Ten pieces fly out in the primary, muted and success colours; give your own with `pieces`. It is decorative (`aria-hidden`); with reduced motion the pieces
|
|
19
|
+
The burst plays once when it appears; `play()` plays it again. Ten pieces fly out in the primary, muted and success colours; give your own with `pieces`. The pieces stay for a moment where they land, fade out and are removed. It is decorative (`aria-hidden`); with reduced motion the pieces do not fly — they appear at their places and fade out.
|
|
20
20
|
|
|
21
21
|
## Inputs
|
|
22
22
|
| Name | Description |
|
|
@@ -300,7 +300,7 @@ var TxAppLayout = class TxAppLayout {
|
|
|
300
300
|
}],
|
|
301
301
|
ngImport: i0,
|
|
302
302
|
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
303
|
-
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}\n"],
|
|
303
|
+
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}@media print{:host,:host([data-styled]){display:block;min-height:0;background:none;isolation:auto}:host .tx-app-layout__backdrop,:host .tx-app-layout__slot,:host .tx-app-layout__mask,:host .tx-app-layout__topbar{display:none!important}:host .tx-app-layout__column,:host .tx-app-layout__wrapper{display:block}:host .tx-app-layout__wrapper{padding:0!important}:host .tx-app-layout__content{max-width:none!important;margin:0!important}}\n"],
|
|
304
304
|
dependencies: [
|
|
305
305
|
{
|
|
306
306
|
kind: "directive",
|
|
@@ -420,7 +420,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
420
420
|
},
|
|
421
421
|
viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],
|
|
422
422
|
template: "@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n",
|
|
423
|
-
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}\n"]
|
|
423
|
+
styles: [":host{position:relative;display:flex;isolation:isolate}:host([data-responsive=container]){container:tx-app-layout/inline-size;contain:layout}.tx-app-layout__backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none}.tx-app-layout__slot{position:sticky;flex-shrink:0}.tx-app-layout__sidebar{position:absolute;top:0;left:0;display:flex;flex-direction:column;box-sizing:border-box;height:100%}.tx-app-layout__sidebar-header{display:flex;flex-shrink:0;align-items:center;overflow:hidden}.tx-app-layout__brand,.tx-app-layout__plain-brand{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.tx-app-layout__name{white-space:nowrap;text-box:trim-both cap alphabetic}.tx-app-layout__anchor{display:none;flex-shrink:0;place-items:center;margin-inline-start:auto;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__menu{flex:1;min-height:0;overflow:hidden}.tx-app-layout__mask{position:fixed;inset:0;display:none}.tx-app-layout__column{display:flex;flex:1;flex-direction:column;min-width:0}.tx-app-layout__topbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.tx-app-layout__menu-button{display:none;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-app-layout__topbar-end{display:flex;flex:1;align-items:center;justify-content:flex-end;min-width:0}.tx-app-layout__wrapper{display:flex;flex:1;flex-direction:column;box-sizing:border-box}.tx-app-layout__content{flex:1;width:100%}.tx-app-layout__pin-icon{grid-area:1/1}:host(.tx-app-layout--wide) .tx-app-layout__anchor{display:inline-grid}:host(.tx-app-layout--wide) .tx-app-layout__menu{overflow:auto}:host([data-styled]){min-height:var(--tx-app-layout-min-height);background:var(--tx-app-layout-background);color:var(--tx-app-layout-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-app-layout__backdrop{background:var(--tx-app-layout-backdrop-spectrum)}:host([data-styled]) .tx-app-layout__backdrop[data-variant=accent]{background:var(--tx-app-layout-backdrop-accent)}:host([data-styled]) .tx-app-layout__backdrop:after{position:absolute;inset:0;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");background-size:var(--tx-app-layout-backdrop-noise-size) var(--tx-app-layout-backdrop-noise-size);opacity:var(--tx-app-layout-backdrop-noise-opacity);content:\"\"}:host([data-styled]):has(.tx-app-layout__backdrop){background:transparent}:host([data-styled]) .tx-app-layout__slot{top:var(--tx-app-layout-top-offset);z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar{z-index:var(--tx-app-layout-sidebar-z-index);width:var(--tx-app-layout-sidebar-rail-width);border-inline-end:1px solid var(--tx-app-layout-sidebar-border-color);background:var(--tx-app-layout-sidebar-background);transition:width var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__sidebar-header{height:var(--tx-app-layout-sidebar-header-height);padding-inline-start:calc((var(--tx-app-layout-sidebar-rail-width) - var(--tx-app-layout-sidebar-logo-size)) / 2);border-bottom:1px solid var(--tx-app-layout-sidebar-border-color);transition:padding var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-styled]) .tx-app-layout__brand{color:var(--tx-app-layout-sidebar-name-color)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__logo{flex-shrink:0;width:var(--tx-app-layout-sidebar-logo-size);height:var(--tx-app-layout-sidebar-logo-size)}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{width:0;overflow:hidden;opacity:0;font-size:var(--tx-app-layout-sidebar-name-font-size);font-weight:var(--tx-app-layout-sidebar-name-font-weight);letter-spacing:var(--tx-app-layout-sidebar-name-letter-spacing);transition:opacity var(--tx-app-layout-sidebar-name-hide-duration)}:host([data-styled]) .tx-app-layout__anchor{width:var(--tx-app-layout-sidebar-pin-size);height:var(--tx-app-layout-sidebar-pin-size);border-radius:var(--tx-app-layout-sidebar-pin-border-radius);color:var(--tx-app-layout-sidebar-pin-color);font-size:var(--tx-app-layout-sidebar-pin-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__anchor:hover{background:var(--tx-app-layout-sidebar-pin-hover-background);color:var(--tx-app-layout-sidebar-pin-hover-color)}:host([data-styled]) .tx-app-layout__anchor:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-app-layout__pin-icon{opacity:0;scale:.5;rotate:-45deg;transition:opacity var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),scale var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing),rotate var(--tx-app-layout-sidebar-pin-swap-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__pin-icon--on{opacity:1;scale:1;rotate:0deg}:host([data-styled]) .tx-app-layout__sidebar{--tx-app-layout-menu-indent1: var(--tx-panel-menu-sidebar-indent1);--tx-app-layout-menu-indent2: var(--tx-panel-menu-sidebar-indent2);--tx-app-layout-menu-indent3: var(--tx-panel-menu-sidebar-indent3);--tx-app-layout-menu-badge-start: var(--tx-panel-menu-sidebar-collapsed-badge-start);--tx-app-layout-menu-lock-start: var(--tx-panel-menu-sidebar-collapsed-lock-start);--tx-app-layout-menu-shift: calc( (var(--tx-app-layout-sidebar-rail-width) - var(--tx-panel-menu-sidebar-icon-size)) / 2 - var(--tx-app-layout-sidebar-menu-item-inset) - var(--tx-panel-menu-sidebar-indent1) )}:host([data-styled]) .tx-app-layout__menu{--tx-panel-menu-sidebar-indent1: calc(var(--tx-app-layout-menu-indent1) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent2: calc(var(--tx-app-layout-menu-indent2) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-indent3: calc(var(--tx-app-layout-menu-indent3) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-badge-start: calc(var(--tx-app-layout-menu-badge-start) + var(--tx-app-layout-menu-shift));--tx-panel-menu-sidebar-collapsed-lock-start: calc(var(--tx-app-layout-menu-lock-start) + var(--tx-app-layout-menu-shift));padding:var(--tx-app-layout-sidebar-menu-padding);scrollbar-color:var(--tx-app-layout-sidebar-scrollbar-color) transparent;scrollbar-width:thin}:host([data-styled]) .tx-app-layout__mask{z-index:var(--tx-app-layout-mask-z-index);background:var(--tx-app-layout-mask-background);animation:tx-app-layout-fade var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__topbar{gap:var(--tx-app-layout-topbar-gap);min-height:var(--tx-app-layout-topbar-min-height);padding:var(--tx-app-layout-topbar-padding);background:var(--tx-app-layout-topbar-background)}:host([data-styled]) .tx-app-layout__menu-button{width:var(--tx-app-layout-menu-button-size);height:var(--tx-app-layout-menu-button-size);margin-inline-end:var(--tx-app-layout-menu-button-margin-end);border-radius:var(--tx-app-layout-menu-button-border-radius);color:var(--tx-app-layout-menu-button-color);font-size:var(--tx-app-layout-menu-button-icon-size);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-app-layout__menu-button:hover{background:var(--tx-app-layout-menu-button-hover-background)}:host([data-styled]) .tx-app-layout__menu-button:focus-visible{outline:none;box-shadow:var(--tx-app-layout-menu-button-focus-ring-shadow)}:host([data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-padding)}:host([data-styled]) .tx-app-layout__content{max-width:var(--tx-app-layout-content-max-width);margin-inline:auto}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__sidebar-header{padding:var(--tx-app-layout-sidebar-header-padding)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand{gap:var(--tx-app-layout-sidebar-brand-gap)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__brand .tx-app-layout__name{width:auto;opacity:1;transition-duration:var(--tx-app-layout-sidebar-name-reveal-duration)}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:tx-app-layout-fade var(--tx-motion-duration) linear}:host([data-styled].tx-app-layout--anchored) .tx-app-layout__slot{width:var(--tx-app-layout-sidebar-width)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__topbar{padding-inline:var(--tx-app-layout-plain-padding)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand{gap:var(--tx-app-layout-plain-brand-gap);color:var(--tx-app-layout-plain-color)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__logo{width:var(--tx-app-layout-plain-logo-size);height:var(--tx-app-layout-plain-logo-size)}:host([data-styled].tx-app-layout--plain) .tx-app-layout__plain-brand .tx-app-layout__name{font-size:var(--tx-app-layout-plain-name-font-size);font-weight:var(--tx-app-layout-plain-name-font-weight);line-height:var(--tx-app-layout-plain-name-line-height)}@media(width<1024px){:host([data-responsive=viewport]) .tx-app-layout__slot{position:static}:host([data-responsive=viewport]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=viewport].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=viewport]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=viewport]) .tx-app-layout__anchor{display:none}:host([data-responsive=viewport][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=viewport][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=viewport][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@container tx-app-layout (width < 1024px){:host([data-responsive=container]) .tx-app-layout__slot{position:static}:host([data-responsive=container]) .tx-app-layout__sidebar{position:fixed;transform:translate(-100%)}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__sidebar{transform:none}:host([data-responsive=container].tx-app-layout--open) .tx-app-layout__mask{display:block}:host([data-responsive=container]) .tx-app-layout__menu-button{display:inline-flex}:host([data-responsive=container]) .tx-app-layout__anchor{display:none}:host([data-responsive=container][data-styled]) .tx-app-layout__slot{width:0;height:auto}:host([data-responsive=container][data-styled]) .tx-app-layout__sidebar{top:var(--tx-app-layout-top-offset);height:calc(var(--tx-app-layout-viewport-height) - var(--tx-app-layout-top-offset));width:var(--tx-app-layout-sidebar-width);transition:transform var(--tx-app-layout-sidebar-duration) var(--tx-app-layout-sidebar-easing)}:host([data-responsive=container][data-styled]) .tx-app-layout__topbar{padding-inline-start:var(--tx-app-layout-topbar-mobile-padding-start)}:host([data-responsive=container][data-styled]) .tx-app-layout__wrapper{padding:var(--tx-app-layout-content-mobile-padding)}}@keyframes tx-app-layout-fade{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-app-layout__slot,:host([data-styled]) .tx-app-layout__sidebar,:host([data-styled]) .tx-app-layout__sidebar-header,:host([data-styled]) .tx-app-layout__menu-button,:host([data-styled]) .tx-app-layout__anchor,:host([data-styled]) .tx-app-layout__pin-icon{transition:none}:host([data-styled]) .tx-app-layout__mask{animation:none}:host([data-styled].tx-app-layout--wide) .tx-app-layout__anchor{animation:none}:host([data-styled]) .tx-app-layout__brand .tx-app-layout__name{transition:none}}@media print{:host,:host([data-styled]){display:block;min-height:0;background:none;isolation:auto}:host .tx-app-layout__backdrop,:host .tx-app-layout__slot,:host .tx-app-layout__mask,:host .tx-app-layout__topbar{display:none!important}:host .tx-app-layout__column,:host .tx-app-layout__wrapper{display:block}:host .tx-app-layout__wrapper{padding:0!important}:host .tx-app-layout__content{max-width:none!important;margin:0!important}}\n"]
|
|
424
424
|
}]
|
|
425
425
|
}],
|
|
426
426
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-app-layout.mjs","names":[],"sources":["../../../../packages/blocks/app-layout/src/app-layout.icons.ts","../../../../packages/blocks/app-layout/src/app-layout.theme.ts","../../../../packages/blocks/app-layout/src/app-layout.component.ts","../../../../packages/blocks/app-layout/src/app-layout.component.html"],"sourcesContent":["import { TxIconSet, txIconAngleDoubleLeft, txIconBars, txIconSidebar, txIconThumbtack } from '@tectra-ng/icons';\n\nexport const APP_LAYOUT_ICON_DEFAULTS: TxIconSet = {\n 'angle-double-left': txIconAngleDoubleLeft,\n bars: txIconBars,\n sidebar: txIconSidebar,\n thumbtack: txIconThumbtack,\n};\n","import { appLayoutTokens, panelMenuTokens } from '@tectra-ng/themes';\n\nexport const APP_LAYOUT_THEME = {\n appLayout: appLayoutTokens,\n panelMenu: panelMenuTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n OnInit,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraAppLayoutTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelMenu, TxPanelMenuItem } from '@tectra-ng/ui/panel-menu';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { filter } from 'rxjs';\nimport { TxAppLayoutBackdrop, TxAppLayoutPart, TxAppLayoutResponsive } from './app-layout.types';\nimport { APP_LAYOUT_ICON_DEFAULTS } from './app-layout.icons';\nimport { APP_LAYOUT_THEME } from './app-layout.theme';\n\nconst MOBILE_WIDTH = 1024;\nconst PICKED = 'a[href], [role=\"treeitem\"]:not([aria-expanded])';\n\n@Component({\n selector: 'tx-app-layout',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxPanelMenu, TxTooltip],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-app-layout',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-app-layout--plain]': '!sidebar()',\n '[class.tx-app-layout--anchored]': 'sidebar() && anchored()',\n '[class.tx-app-layout--wide]': 'sidebar() && wide()',\n '[class.tx-app-layout--open]': 'sidebar() && mobileOpen()',\n '(keydown.escape)': 'closeFromKeyboard()',\n },\n viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],\n})\nexport class TxAppLayout implements OnInit {\n private readonly appLayoutTheme = injectTokens(APP_LAYOUT_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly menuButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n\n readonly model = input<TxPanelMenuItem[]>([]);\n readonly logo = input<string | undefined>(undefined);\n readonly title = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[] | undefined>('/');\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly anchored = model(true);\n readonly stateKey = input<string | undefined>(undefined);\n readonly backdrop = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly backdropVariant = input<TxAppLayoutBackdrop>('spectrum');\n readonly responsive = input<TxAppLayoutResponsive>('viewport');\n readonly menuLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAppLayoutTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAppLayoutPart, TxAppLayout> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('appLayout', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly id = uniqueId('tx-app-layout');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-app-layout'), ...this.passThrough().root?.style }));\n\n readonly mobile = signal(false);\n readonly mobileOpen = signal(false);\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n readonly expanded = computed(() => this.anchored() || this.hovered() || this.focused());\n readonly wide = computed(() => this.mobile() || this.expanded());\n protected readonly menuName = computed(() => this.menuLabel() ?? this.translations().menu);\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n inject(Router, { optional: true })\n ?.events.pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.mobileOpen.set(false));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (mobile: boolean) => {\n this.mobile.set(mobile);\n if (!mobile) {\n this.mobileOpen.set(false);\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < MOBILE_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${MOBILE_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n ngOnInit(): void {\n const stored = this.readAnchored();\n if (stored !== null) {\n this.anchored.set(stored);\n }\n }\n\n toggleAnchored(): void {\n const next = !this.anchored();\n this.anchored.set(next);\n this.hovered.set(true);\n this.writeAnchored(next);\n }\n\n toggleMobile(): void {\n this.mobileOpen.update((open) => !open);\n }\n\n closeMobile(): void {\n this.mobileOpen.set(false);\n }\n\n protected setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n }\n\n protected onFocusIn(event: FocusEvent): void {\n this.focused.set((event.target as HTMLElement | null)?.matches(':focus-visible') ?? false);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !(event.currentTarget as HTMLElement).contains(next)) {\n this.focused.set(false);\n }\n }\n\n protected onSidebarClick(event: Event): void {\n if (this.mobile() && (event.target as HTMLElement | null)?.closest(PICKED)) {\n this.mobileOpen.set(false);\n }\n }\n\n protected closeFromKeyboard(): void {\n if (this.mobileOpen()) {\n this.mobileOpen.set(false);\n this.menuButton()?.nativeElement.focus();\n }\n }\n\n private storage(): Storage | null {\n try {\n return this.document.defaultView?.localStorage ?? null;\n } catch {\n return null;\n }\n }\n\n private readAnchored(): boolean | null {\n const key = this.stateKey();\n if (!key) {\n return null;\n }\n try {\n const value = this.storage()?.getItem(key);\n return value === null || value === undefined ? null : value === 'true';\n } catch {\n return null;\n }\n }\n\n private writeAnchored(value: boolean): void {\n const key = this.stateKey();\n if (!key) {\n return;\n }\n try {\n this.storage()?.setItem(key, String(value));\n } catch {\n return;\n }\n }\n}\n","@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n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UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-app-layout.mjs","names":[],"sources":["../../../../packages/blocks/app-layout/src/app-layout.icons.ts","../../../../packages/blocks/app-layout/src/app-layout.theme.ts","../../../../packages/blocks/app-layout/src/app-layout.component.ts","../../../../packages/blocks/app-layout/src/app-layout.component.html"],"sourcesContent":["import { TxIconSet, txIconAngleDoubleLeft, txIconBars, txIconSidebar, txIconThumbtack } from '@tectra-ng/icons';\n\nexport const APP_LAYOUT_ICON_DEFAULTS: TxIconSet = {\n 'angle-double-left': txIconAngleDoubleLeft,\n bars: txIconBars,\n sidebar: txIconSidebar,\n thumbtack: txIconThumbtack,\n};\n","import { appLayoutTokens, panelMenuTokens } from '@tectra-ng/themes';\n\nexport const APP_LAYOUT_THEME = {\n appLayout: appLayoutTokens,\n panelMenu: panelMenuTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n OnInit,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router, RouterLink } from '@angular/router';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraAppLayoutTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelMenu, TxPanelMenuItem } from '@tectra-ng/ui/panel-menu';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { filter } from 'rxjs';\nimport { TxAppLayoutBackdrop, TxAppLayoutPart, TxAppLayoutResponsive } from './app-layout.types';\nimport { APP_LAYOUT_ICON_DEFAULTS } from './app-layout.icons';\nimport { APP_LAYOUT_THEME } from './app-layout.theme';\n\nconst MOBILE_WIDTH = 1024;\nconst PICKED = 'a[href], [role=\"treeitem\"]:not([aria-expanded])';\n\n@Component({\n selector: 'tx-app-layout',\n imports: [NgTemplateOutlet, RouterLink, TxIcon, TxPanelMenu, TxTooltip],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-app-layout',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-responsive]': 'responsive()',\n '[class.tx-app-layout--plain]': '!sidebar()',\n '[class.tx-app-layout--anchored]': 'sidebar() && anchored()',\n '[class.tx-app-layout--wide]': 'sidebar() && wide()',\n '[class.tx-app-layout--open]': 'sidebar() && mobileOpen()',\n '(keydown.escape)': 'closeFromKeyboard()',\n },\n viewProviders: [provideTxIconDefaults(APP_LAYOUT_ICON_DEFAULTS)],\n})\nexport class TxAppLayout implements OnInit {\n private readonly appLayoutTheme = injectTokens(APP_LAYOUT_THEME);\n\n private readonly document = inject(DOCUMENT);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly menuButton = viewChild<ElementRef<HTMLButtonElement>>('menuButton');\n\n readonly model = input<TxPanelMenuItem[]>([]);\n readonly logo = input<string | undefined>(undefined);\n readonly title = input<string | undefined>(undefined);\n readonly homeLink = input<string | readonly unknown[] | undefined>('/');\n readonly sidebar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly anchored = model(true);\n readonly stateKey = input<string | undefined>(undefined);\n readonly backdrop = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly backdropVariant = input<TxAppLayoutBackdrop>('spectrum');\n readonly responsive = input<TxAppLayoutResponsive>('viewport');\n readonly menuLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAppLayoutTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAppLayoutPart, TxAppLayout> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('appLayout', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n protected readonly id = uniqueId('tx-app-layout');\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-app-layout'), ...this.passThrough().root?.style }));\n\n readonly mobile = signal(false);\n readonly mobileOpen = signal(false);\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n readonly expanded = computed(() => this.anchored() || this.hovered() || this.focused());\n readonly wide = computed(() => this.mobile() || this.expanded());\n protected readonly menuName = computed(() => this.menuLabel() ?? this.translations().menu);\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n inject(Router, { optional: true })\n ?.events.pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.mobileOpen.set(false));\n afterNextRender(() => {\n const view = this.document.defaultView;\n if (!view) {\n return;\n }\n const update = (mobile: boolean) => {\n this.mobile.set(mobile);\n if (!mobile) {\n this.mobileOpen.set(false);\n }\n };\n if (this.responsive() === 'container' && 'ResizeObserver' in view) {\n const observer = new view.ResizeObserver(([entry]) => update(entry.contentRect.width < MOBILE_WIDTH));\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n return;\n }\n const media = view.matchMedia?.(`(width < ${MOBILE_WIDTH}px)`);\n if (media) {\n const change = () => update(media.matches);\n change();\n media.addEventListener?.('change', change);\n destroyRef.onDestroy(() => media.removeEventListener?.('change', change));\n }\n });\n }\n\n ngOnInit(): void {\n const stored = this.readAnchored();\n if (stored !== null) {\n this.anchored.set(stored);\n }\n }\n\n toggleAnchored(): void {\n const next = !this.anchored();\n this.anchored.set(next);\n this.hovered.set(true);\n this.writeAnchored(next);\n }\n\n toggleMobile(): void {\n this.mobileOpen.update((open) => !open);\n }\n\n closeMobile(): void {\n this.mobileOpen.set(false);\n }\n\n protected setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n }\n\n protected onFocusIn(event: FocusEvent): void {\n this.focused.set((event.target as HTMLElement | null)?.matches(':focus-visible') ?? false);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next || !(event.currentTarget as HTMLElement).contains(next)) {\n this.focused.set(false);\n }\n }\n\n protected onSidebarClick(event: Event): void {\n if (this.mobile() && (event.target as HTMLElement | null)?.closest(PICKED)) {\n this.mobileOpen.set(false);\n }\n }\n\n protected closeFromKeyboard(): void {\n if (this.mobileOpen()) {\n this.mobileOpen.set(false);\n this.menuButton()?.nativeElement.focus();\n }\n }\n\n private storage(): Storage | null {\n try {\n return this.document.defaultView?.localStorage ?? null;\n } catch {\n return null;\n }\n }\n\n private readAnchored(): boolean | null {\n const key = this.stateKey();\n if (!key) {\n return null;\n }\n try {\n const value = this.storage()?.getItem(key);\n return value === null || value === undefined ? null : value === 'true';\n } catch {\n return null;\n }\n }\n\n private writeAnchored(value: boolean): void {\n const key = this.stateKey();\n if (!key) {\n return;\n }\n try {\n this.storage()?.setItem(key, String(value));\n } catch {\n return;\n }\n }\n}\n","@if (backdrop()) {\n <div class=\"tx-app-layout__backdrop\" aria-hidden=\"true\" [attr.data-variant]=\"backdropVariant()\"></div>\n}\n@if (sidebar()) {\n <div class=\"tx-app-layout__slot\">\n <aside\n class=\"tx-app-layout__sidebar\"\n [id]=\"id + '-sidebar'\"\n [attr.aria-label]=\"menuName()\"\n [attr.inert]=\"mobile() && !mobileOpen() ? '' : null\"\n [class]=\"passThrough().sidebar?.class\"\n [style]=\"passThrough().sidebar?.style\"\n (mouseenter)=\"setHovered(true)\"\n (mouseleave)=\"setHovered(false)\"\n (focusin)=\"onFocusIn($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"tx-app-layout__sidebar-header\">\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__brand\" [class]=\"passThrough().brand?.class\" [style]=\"passThrough().brand?.style\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n <button\n type=\"button\"\n class=\"tx-app-layout__anchor\"\n tooltipPlacement=\"right\"\n [attr.aria-pressed]=\"anchored()\"\n [attr.aria-label]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n [txTooltip]=\"anchored() ? translations().unpinMenu : translations().pinMenu\"\n (click)=\"toggleAnchored()\"\n >\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"thumbtack\" [class.tx-app-layout__pin-icon--on]=\"!anchored()\" />\n <tx-icon class=\"tx-app-layout__pin-icon\" aria-hidden=\"true\" name=\"angle-double-left\" [class.tx-app-layout__pin-icon--on]=\"anchored()\" />\n </button>\n </div>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- picks inside the menu are its own links and tree items -->\n <div class=\"tx-app-layout__menu\" (click)=\"onSidebarClick($event)\">\n <tx-panel-menu\n variant=\"sidebar\"\n [ariaLabel]=\"menuName()\"\n [model]=\"model()\"\n [collapsed]=\"!wide()\"\n [unstyled]=\"isUnstyled()\"\n [class]=\"passThrough().menu?.class\"\n [style]=\"passThrough().menu?.style\"\n />\n </div>\n </aside>\n </div>\n <div class=\"tx-app-layout__mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"closeMobile()\"></div>\n}\n<div class=\"tx-app-layout__column\">\n <header class=\"tx-app-layout__topbar\" [class]=\"passThrough().topbar?.class\" [style]=\"passThrough().topbar?.style\">\n @if (sidebar()) {\n <button\n #menuButton\n type=\"button\"\n class=\"tx-app-layout__menu-button\"\n [attr.aria-label]=\"menuName()\"\n [attr.aria-expanded]=\"mobileOpen()\"\n [attr.aria-controls]=\"id + '-sidebar'\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n (click)=\"toggleMobile()\"\n >\n <tx-icon name=\"bars\" aria-hidden=\"true\" />\n </button>\n } @else {\n @if (homeLink() !== undefined) {\n <a class=\"tx-app-layout__plain-brand\" [routerLink]=\"homeLink()\" [attr.aria-label]=\"title() ?? null\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </a>\n } @else {\n <span class=\"tx-app-layout__plain-brand\">\n <ng-container [ngTemplateOutlet]=\"brand\" />\n </span>\n }\n }\n <div class=\"tx-app-layout__topbar-end\">\n <ng-content select=\"[txAppTopbar]\" />\n </div>\n </header>\n <div class=\"tx-app-layout__wrapper\">\n <main class=\"tx-app-layout__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\">\n <ng-content />\n </main>\n <ng-content select=\"[txAppFooter]\" />\n </div>\n</div>\n\n<ng-template #brand>\n @if (logo()) {\n <img class=\"tx-app-layout__logo\" alt=\"\" [src]=\"logo()\" />\n }\n @if (title()) {\n <span class=\"tx-app-layout__name\">{{ title() }}</span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAEA,MAAa,2BAAsC;CACjD,qBAAqB;CACrB,MAAM;CACN,SAAS;CACT,WAAW;AACZ;ACLD,MAAa,mBAAmB;CAC9B,WAAW;CACX,WAAW;AACZ;AC2BD,MAAM,eAAe;AACrB,MAAM,SAAS;AAuBf,IAAa,cAAb,MAAa,YAAW;CACL,iBAAiB,aAAa,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88
|
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
89
89
|
run = signal(0, ...ngDevMode ? [{ debugName: "run" }] : /* istanbul ignore next */ []);
|
|
90
|
-
|
|
90
|
+
endedRun = signal(-1, ...ngDevMode ? [{ debugName: "endedRun" }] : /* istanbul ignore next */ []);
|
|
91
|
+
endedPieces = 0;
|
|
92
|
+
runs = computed(() => this.endedRun() === this.run() ? [] : [this.run()], ...ngDevMode ? [{ debugName: "runs" }] : /* istanbul ignore next */ []);
|
|
91
93
|
play() {
|
|
94
|
+
this.endedPieces = 0;
|
|
92
95
|
this.run.update((run) => run + 1);
|
|
93
96
|
}
|
|
97
|
+
pieceEnded(event) {
|
|
98
|
+
if (!/(fade|glimpse)$/.test(event.animationName)) return;
|
|
99
|
+
this.endedPieces += 1;
|
|
100
|
+
if (this.endedPieces >= this.pieces().length) this.endedRun.set(this.run());
|
|
101
|
+
}
|
|
94
102
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
95
103
|
minVersion: "12.0.0",
|
|
96
104
|
version: "22.2.5",
|
|
@@ -172,12 +180,13 @@ var TxConfetti = class TxConfetti {
|
|
|
172
180
|
[style.--tx-confetti-i]="index"
|
|
173
181
|
[class]="passThrough().piece?.class"
|
|
174
182
|
[style]="passThrough().piece?.style"
|
|
183
|
+
(animationend)="pieceEnded($event)"
|
|
175
184
|
></span>
|
|
176
185
|
}
|
|
177
186
|
}
|
|
178
187
|
`,
|
|
179
188
|
isInline: true,
|
|
180
|
-
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) both
|
|
189
|
+
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);--_start: calc(var(--tx-confetti-i) * var(--tx-confetti-motion-stagger) + var(--tx-confetti-delay, 0ms));animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) var(--_start) both,tx-confetti-fade var(--tx-confetti-motion-fade-duration) ease-in calc(var(--_start) + var(--tx-confetti-motion-duration) + var(--tx-confetti-motion-hold)) forwards}:host([data-styled]) .tx-confetti__piece[data-tone=neutral]{width:var(--tx-confetti-piece-neutral-width);height:var(--tx-confetti-piece-neutral-height);margin:calc(var(--tx-confetti-piece-neutral-height) / -2) 0 0 calc(var(--tx-confetti-piece-neutral-width) / -2);background:var(--tx-confetti-colors-neutral)}:host([data-styled]) .tx-confetti__piece[data-tone=success]{border-radius:50%;background:var(--tx-confetti-colors-success)}@keyframes tx-confetti-burst{0%{opacity:0;transform:translate(0) rotate(0) scale(.4)}30%{opacity:1}to{opacity:1;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r)) scale(1)}}@keyframes tx-confetti-fade{to{opacity:0}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-confetti__piece{opacity:0;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r));animation:tx-confetti-glimpse calc(var(--tx-confetti-motion-duration) + var(--tx-confetti-motion-hold) + var(--tx-confetti-motion-fade-duration)) linear var(--tx-confetti-delay, 0ms) both}}@keyframes tx-confetti-glimpse{0%,to{opacity:0}15%,70%{opacity:1}}\n"],
|
|
181
190
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
182
191
|
});
|
|
183
192
|
};
|
|
@@ -202,6 +211,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
202
211
|
[style.--tx-confetti-i]="index"
|
|
203
212
|
[class]="passThrough().piece?.class"
|
|
204
213
|
[style]="passThrough().piece?.style"
|
|
214
|
+
(animationend)="pieceEnded($event)"
|
|
205
215
|
></span>
|
|
206
216
|
}
|
|
207
217
|
}
|
|
@@ -215,7 +225,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
215
225
|
"[style.--tx-confetti-delay.ms]": "delay()",
|
|
216
226
|
"[attr.data-styled]": "!isUnstyled() || null"
|
|
217
227
|
},
|
|
218
|
-
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) both
|
|
228
|
+
styles: [":host{position:absolute;inset:0;overflow:visible;pointer-events:none}.tx-confetti__piece{position:absolute;top:50%;left:50%}:host([data-styled]) .tx-confetti__piece{width:var(--tx-confetti-piece-size);height:var(--tx-confetti-piece-size);margin:calc(var(--tx-confetti-piece-size) / -2) 0 0 calc(var(--tx-confetti-piece-size) / -2);border-radius:var(--tx-confetti-piece-border-radius);background:var(--tx-confetti-colors-accent);--_start: calc(var(--tx-confetti-i) * var(--tx-confetti-motion-stagger) + var(--tx-confetti-delay, 0ms));animation:tx-confetti-burst var(--tx-confetti-motion-duration) var(--tx-confetti-motion-easing) var(--_start) both,tx-confetti-fade var(--tx-confetti-motion-fade-duration) ease-in calc(var(--_start) + var(--tx-confetti-motion-duration) + var(--tx-confetti-motion-hold)) forwards}:host([data-styled]) .tx-confetti__piece[data-tone=neutral]{width:var(--tx-confetti-piece-neutral-width);height:var(--tx-confetti-piece-neutral-height);margin:calc(var(--tx-confetti-piece-neutral-height) / -2) 0 0 calc(var(--tx-confetti-piece-neutral-width) / -2);background:var(--tx-confetti-colors-neutral)}:host([data-styled]) .tx-confetti__piece[data-tone=success]{border-radius:50%;background:var(--tx-confetti-colors-success)}@keyframes tx-confetti-burst{0%{opacity:0;transform:translate(0) rotate(0) scale(.4)}30%{opacity:1}to{opacity:1;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r)) scale(1)}}@keyframes tx-confetti-fade{to{opacity:0}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-confetti__piece{opacity:0;transform:translate(var(--tx-confetti-x),var(--tx-confetti-y)) rotate(var(--tx-confetti-r));animation:tx-confetti-glimpse calc(var(--tx-confetti-motion-duration) + var(--tx-confetti-motion-hold) + var(--tx-confetti-motion-fade-duration)) linear var(--tx-confetti-delay, 0ms) both}}@keyframes tx-confetti-glimpse{0%,to{opacity:0}15%,70%{opacity:1}}\n"]
|
|
219
229
|
}]
|
|
220
230
|
}],
|
|
221
231
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-blocks-confetti.mjs","names":[],"sources":["../../../../packages/blocks/confetti/src/confetti.types.ts","../../../../packages/blocks/confetti/src/confetti.theme.ts","../../../../packages/blocks/confetti/src/confetti.component.ts"],"sourcesContent":["/** Colour of a confetti piece: `accent`, `neutral` or `success`. */\nexport type TxConfettiTone = 'accent' | 'neutral' | 'success';\n\n/** One piece of a confetti burst. */\nexport interface TxConfettiPiece {\n /** Where the piece lands, horizontally from the middle, in px. */\n x: number;\n /** Where the piece lands, vertically from the middle, in px. */\n y: number;\n /** Turn of the piece when it lands, in degrees. */\n rotate: number;\n /** Colour of the piece. */\n tone: TxConfettiTone;\n}\n\n/** Names of the parts of `tx-confetti` that its `pt` input can style. */\nexport type TxConfettiPart = 'root' | 'piece';\n\n/** The ten pieces `tx-confetti` bursts by default. */\nexport const TX_CONFETTI_PIECES: readonly TxConfettiPiece[] = [\n { x: -150, y: -90, rotate: 25, tone: 'accent' },\n { x: 140, y: -110, rotate: -35, tone: 'neutral' },\n { x: -120, y: 120, rotate: 60, tone: 'neutral' },\n { x: 160, y: 80, rotate: -15, tone: 'accent' },\n { x: -40, y: -160, rotate: 45, tone: 'success' },\n { x: 60, y: 160, rotate: -50, tone: 'success' },\n { x: -180, y: 10, rotate: 10, tone: 'accent' },\n { x: 190, y: -20, rotate: 80, tone: 'neutral' },\n { x: 90, y: -170, rotate: -70, tone: 'accent' },\n { x: -90, y: 175, rotate: 35, tone: 'success' },\n];\n","import { confettiTokens } from '@tectra-ng/themes';\n\nexport const CONFETTI_THEME = {\n confetti: confettiTokens,\n};\n","import { ChangeDetectionStrategy, Component, computed, input, numberAttribute, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraConfettiTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TX_CONFETTI_PIECES, TxConfettiPart, TxConfettiPiece } from './confetti.types';\nimport { CONFETTI_THEME } from './confetti.theme';\n\n@Component({\n selector: 'tx-confetti',\n template: `\n @for (run of runs(); track run) {\n @for (piece of pieces(); track $index; let index = $index) {\n <span\n class=\"tx-confetti__piece\"\n [attr.data-tone]=\"piece.tone\"\n [style.--tx-confetti-x.px]=\"piece.x\"\n [style.--tx-confetti-y.px]=\"piece.y\"\n [style.--tx-confetti-r.deg]=\"piece.rotate\"\n [style.--tx-confetti-i]=\"index\"\n [class]=\"passThrough().piece?.class\"\n [style]=\"passThrough().piece?.style\"\n ></span>\n }\n }\n `,\n styleUrl: './confetti.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-confetti',\n 'aria-hidden': 'true',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[style.--tx-confetti-delay.ms]': 'delay()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxConfetti {\n private readonly confettiTheme = injectTokens(CONFETTI_THEME);\n\n readonly pieces = input<readonly TxConfettiPiece[]>(TX_CONFETTI_PIECES);\n readonly delay = input<number, unknown>(0, { transform: numberAttribute });\n readonly dt = input<TectraDeepPartial<TectraConfettiTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxConfettiPart, TxConfetti> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('confetti', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-confetti'), ...this.passThrough().root?.style }));\n\n private readonly run = signal(0);\n protected readonly runs = computed(() => [this.run()]);\n\n play(): void {\n this.run.update((run) => run + 1);\n }\n}\n"],"mappings":";;;;;AAmBA,MAAa,qBAAiD;CAC5D;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAQ;CAC7C;EAAE,GAAG;EAAK,GAAG;EAAM,QAAQ;EAAK,MAAM;CAAS;CAC/C;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;CAC9C;EAAE,GAAG;EAAK,GAAG;EAAI,QAAQ;EAAK,MAAM;CAAQ;CAC5C;EAAE,GAAG;EAAK,GAAG;EAAM,QAAQ;EAAI,MAAM;CAAS;CAC9C;EAAE,GAAG;EAAI,GAAG;EAAK,QAAQ;EAAK,MAAM;CAAS;CAC7C;EAAE,GAAG;EAAM,GAAG;EAAI,QAAQ;EAAI,MAAM;CAAQ;CAC5C;EAAE,GAAG;EAAK,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;CAC7C;EAAE,GAAG;EAAI,GAAG;EAAM,QAAQ;EAAK,MAAM;CAAQ;CAC7C;EAAE,GAAG;EAAK,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;AAC9C;AC5BD,MAAa,iBAAiB,EAC5B,UAAU,eACX;
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-confetti.mjs","names":[],"sources":["../../../../packages/blocks/confetti/src/confetti.types.ts","../../../../packages/blocks/confetti/src/confetti.theme.ts","../../../../packages/blocks/confetti/src/confetti.component.ts"],"sourcesContent":["/** Colour of a confetti piece: `accent`, `neutral` or `success`. */\nexport type TxConfettiTone = 'accent' | 'neutral' | 'success';\n\n/** One piece of a confetti burst. */\nexport interface TxConfettiPiece {\n /** Where the piece lands, horizontally from the middle, in px. */\n x: number;\n /** Where the piece lands, vertically from the middle, in px. */\n y: number;\n /** Turn of the piece when it lands, in degrees. */\n rotate: number;\n /** Colour of the piece. */\n tone: TxConfettiTone;\n}\n\n/** Names of the parts of `tx-confetti` that its `pt` input can style. */\nexport type TxConfettiPart = 'root' | 'piece';\n\n/** The ten pieces `tx-confetti` bursts by default. */\nexport const TX_CONFETTI_PIECES: readonly TxConfettiPiece[] = [\n { x: -150, y: -90, rotate: 25, tone: 'accent' },\n { x: 140, y: -110, rotate: -35, tone: 'neutral' },\n { x: -120, y: 120, rotate: 60, tone: 'neutral' },\n { x: 160, y: 80, rotate: -15, tone: 'accent' },\n { x: -40, y: -160, rotate: 45, tone: 'success' },\n { x: 60, y: 160, rotate: -50, tone: 'success' },\n { x: -180, y: 10, rotate: 10, tone: 'accent' },\n { x: 190, y: -20, rotate: 80, tone: 'neutral' },\n { x: 90, y: -170, rotate: -70, tone: 'accent' },\n { x: -90, y: 175, rotate: 35, tone: 'success' },\n];\n","import { confettiTokens } from '@tectra-ng/themes';\n\nexport const CONFETTI_THEME = {\n confetti: confettiTokens,\n};\n","import { ChangeDetectionStrategy, Component, computed, input, numberAttribute, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraConfettiTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TX_CONFETTI_PIECES, TxConfettiPart, TxConfettiPiece } from './confetti.types';\nimport { CONFETTI_THEME } from './confetti.theme';\n\n@Component({\n selector: 'tx-confetti',\n template: `\n @for (run of runs(); track run) {\n @for (piece of pieces(); track $index; let index = $index) {\n <span\n class=\"tx-confetti__piece\"\n [attr.data-tone]=\"piece.tone\"\n [style.--tx-confetti-x.px]=\"piece.x\"\n [style.--tx-confetti-y.px]=\"piece.y\"\n [style.--tx-confetti-r.deg]=\"piece.rotate\"\n [style.--tx-confetti-i]=\"index\"\n [class]=\"passThrough().piece?.class\"\n [style]=\"passThrough().piece?.style\"\n (animationend)=\"pieceEnded($event)\"\n ></span>\n }\n }\n `,\n styleUrl: './confetti.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-confetti',\n 'aria-hidden': 'true',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[style.--tx-confetti-delay.ms]': 'delay()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxConfetti {\n private readonly confettiTheme = injectTokens(CONFETTI_THEME);\n\n readonly pieces = input<readonly TxConfettiPiece[]>(TX_CONFETTI_PIECES);\n readonly delay = input<number, unknown>(0, { transform: numberAttribute });\n readonly dt = input<TectraDeepPartial<TectraConfettiTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxConfettiPart, TxConfetti> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('confetti', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-confetti'), ...this.passThrough().root?.style }));\n\n private readonly run = signal(0);\n private readonly endedRun = signal(-1);\n private endedPieces = 0;\n protected readonly runs = computed(() => (this.endedRun() === this.run() ? [] : [this.run()]));\n\n play(): void {\n this.endedPieces = 0;\n this.run.update((run) => run + 1);\n }\n\n protected pieceEnded(event: AnimationEvent): void {\n if (!/(fade|glimpse)$/.test(event.animationName)) {\n return;\n }\n this.endedPieces += 1;\n if (this.endedPieces >= this.pieces().length) {\n this.endedRun.set(this.run());\n }\n }\n}\n"],"mappings":";;;;;AAmBA,MAAa,qBAAiD;CAC5D;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAQ;CAC7C;EAAE,GAAG;EAAK,GAAG;EAAM,QAAQ;EAAK,MAAM;CAAS;CAC/C;EAAE,GAAG;EAAM,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;CAC9C;EAAE,GAAG;EAAK,GAAG;EAAI,QAAQ;EAAK,MAAM;CAAQ;CAC5C;EAAE,GAAG;EAAK,GAAG;EAAM,QAAQ;EAAI,MAAM;CAAS;CAC9C;EAAE,GAAG;EAAI,GAAG;EAAK,QAAQ;EAAK,MAAM;CAAS;CAC7C;EAAE,GAAG;EAAM,GAAG;EAAI,QAAQ;EAAI,MAAM;CAAQ;CAC5C;EAAE,GAAG;EAAK,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;CAC7C;EAAE,GAAG;EAAI,GAAG;EAAM,QAAQ;EAAK,MAAM;CAAQ;CAC7C;EAAE,GAAG;EAAK,GAAG;EAAK,QAAQ;EAAI,MAAM;CAAS;AAC9C;AC5BD,MAAa,iBAAiB,EAC5B,UAAU,eACX;ACiCD,IAAa,aAAb,MAAa,WAAU;CACJ,gBAAgB,aAAa,cAAc;CAEnD,SAAS,MAAkC,oBAAmB,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,QAAQ,MAAuB,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,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