@1024pix/pix-ui 55.24.0 → 55.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +0,0 @@
1
- <div class={{this.classNames}} ...attributes>
2
- <section
3
- class="pix-app-layout__banner"
4
- id="pix-layout-banner-container"
5
- {{on-window-resize this.handleMarginContainerNavigation}}
6
- >
7
- {{yield to="banner"}}
8
- </section>
9
- <div class="pix-app-layout__navigation">{{yield to="navigation"}}</div>
10
- <div class="pix-app-layout__main">{{yield to="main"}}</div>
11
- <div class="pix-app-layout__footer">{{yield to="footer"}}</div>
12
- </div>
@@ -1,46 +0,0 @@
1
- import { VARIANTS } from '@1024pix/pix-ui/helpers/variants';
2
- import { warn } from '@ember/debug';
3
- import { service } from '@ember/service';
4
- import Component from '@glimmer/component';
5
- export default class PixAppLayout extends Component {
6
- @service elementHelper;
7
-
8
- constructor(...args) {
9
- super(...args);
10
-
11
- this.elementHelper.waitForElement('pix-layout-banner-container').then((elementList) => {
12
- this.#computeMarginTopElement(elementList);
13
- });
14
- }
15
-
16
- #computeMarginTopElement(bannerContainer) {
17
- const baseFontRemRatio = Number(
18
- getComputedStyle(document.querySelector('html')).fontSize.match(/\d+(\.\d+)?/)[0],
19
- );
20
- const bannerHeight = bannerContainer.getBoundingClientRect().height;
21
- const top = bannerHeight / baseFontRemRatio;
22
-
23
- const layoutElement = document.querySelector('.pix-app-layout');
24
- layoutElement.style.setProperty('--pix-app-layout-top', `${top}rem`);
25
- }
26
-
27
- handleMarginContainerNavigation = (element) => {
28
- this.#computeMarginTopElement(element);
29
- };
30
-
31
- get variant() {
32
- const value = this.args.variant ?? 'primary';
33
- warn(
34
- `PixAppLayout: @variant "${value}" should be ${VARIANTS.join(', ')}`,
35
- VARIANTS.includes(value),
36
- {
37
- id: 'pix-ui.pix-app-layout.variant.not-valid',
38
- },
39
- );
40
-
41
- return value;
42
- }
43
- get classNames() {
44
- return ['pix-app-layout', `pix-app-layout--${this.variant}`].join(' ');
45
- }
46
- }