@easemate/web-kit 0.5.2 → 0.5.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/build/react.cjs CHANGED
@@ -15312,6 +15312,11 @@ var init_panel = __esm({
15312
15312
  tag: "ease-panel",
15313
15313
  shadowMode: "open",
15314
15314
  styles: `
15315
+ :host {
15316
+ display: block;
15317
+ box-sizing: border-box;
15318
+ }
15319
+
15315
15320
  @property --ease-panel-top-fade {
15316
15321
  syntax: "<length>";
15317
15322
  inherits: false;
@@ -15325,7 +15330,9 @@ var init_panel = __esm({
15325
15330
  }
15326
15331
 
15327
15332
  [part="section"] {
15328
- display: block;
15333
+ display: flex;
15334
+ flex-direction: column;
15335
+ max-height: inherit;
15329
15336
  width: 100%;
15330
15337
  max-width: var(--ease-panel-max-width);
15331
15338
  border-radius: var(--ease-panel-radius);
@@ -15462,9 +15469,10 @@ var init_panel = __esm({
15462
15469
 
15463
15470
  [part="content"] {
15464
15471
  display: block;
15472
+ flex: 1 1 auto;
15473
+ min-height: 0;
15465
15474
  width: 100%;
15466
15475
  box-sizing: border-box;
15467
- margin: auto;
15468
15476
  overflow: hidden;
15469
15477
  }
15470
15478
 
@@ -15473,19 +15481,10 @@ var init_panel = __esm({
15473
15481
  }
15474
15482
 
15475
15483
  [part="body"] {
15484
+ display: block;
15485
+ height: 100%;
15476
15486
  width: 100%;
15477
15487
  position: relative;
15478
- overflow-y: auto;
15479
- mask-image: linear-gradient(to bottom, #0000, #ffff var(--top-fade) calc(100% - var(--bottom-fade)), #0000);
15480
- animation-name: scroll-fade;
15481
- animation-timeline: scroll(self y);
15482
- scroll-snap-type: y mandatory;
15483
- scrollbar-width: none;
15484
- max-height: calc(100dvh - 32px - var(--ease-panel-padding));
15485
-
15486
- &::-webkit-scrollbar {
15487
- display: none;
15488
- }
15489
15488
  }
15490
15489
 
15491
15490
  @keyframes scroll-fade {
@@ -15511,6 +15510,7 @@ var init_panel = __esm({
15511
15510
 
15512
15511
  [part="tab-panel"][data-state="active"] {
15513
15512
  display: block;
15513
+ height: 100%;
15514
15514
  pointer-events: auto;
15515
15515
  }
15516
15516
 
@@ -15538,6 +15538,17 @@ var init_panel = __esm({
15538
15538
  grid-gap: var(--ease-panel-gap);
15539
15539
  box-sizing: border-box;
15540
15540
  width: 100%;
15541
+ max-height: 100%;
15542
+ overflow-y: auto;
15543
+ mask-image: linear-gradient(to bottom, #0000, #ffff var(--top-fade) calc(100% - var(--bottom-fade)), #0000);
15544
+ animation-name: scroll-fade;
15545
+ animation-timeline: scroll(self y);
15546
+ scroll-snap-type: y mandatory;
15547
+ scrollbar-width: none;
15548
+
15549
+ &::-webkit-scrollbar {
15550
+ display: none;
15551
+ }
15541
15552
  }
15542
15553
  `
15543
15554
  }), _dec121 = Prop({
@@ -15680,8 +15691,8 @@ var init_panel = __esm({
15680
15691
  </div>
15681
15692
  </div>
15682
15693
  <div part="content">
15683
- <div part="body" style=${this.maxHeight ? `max-height: ${this.maxHeight};` : ""}>
15684
- ${hasTabs ? this.#renderTabPanels() : import_lit_html22.html`<div part="items"><slot></slot></div>`}
15694
+ <div part="body">
15695
+ ${hasTabs ? this.#renderTabPanels() : import_lit_html22.html`<div part="items" style=${this.maxHeight ? `max-height: ${this.maxHeight}` : import_lit_html22.nothing}><slot></slot></div>`}
15685
15696
  </div>
15686
15697
  </div>
15687
15698
  <div part="footer">
@@ -15723,7 +15734,7 @@ var init_panel = __esm({
15723
15734
  data-state=${index === this.activeTab ? "active" : "hidden"}
15724
15735
  data-index=${index}
15725
15736
  >
15726
- <div part="items">
15737
+ <div part="items" style=${this.maxHeight ? `max-height: ${this.maxHeight}` : import_lit_html22.nothing}>
15727
15738
  <slot name=${`tab-${tab.id}`}></slot>
15728
15739
  </div>
15729
15740
  </div>
@@ -15818,12 +15829,15 @@ var init_panel = __esm({
15818
15829
  } catch {
15819
15830
  }
15820
15831
  fromPanel.setAttribute("data-state", "hidden");
15832
+ content.style.height = "auto";
15821
15833
  const previousToState = toPanel.getAttribute("data-state");
15822
15834
  toPanel.style.display = "block";
15823
15835
  toPanel.style.visibility = "hidden";
15824
15836
  toPanel.style.opacity = "0";
15825
- void toPanel.offsetHeight;
15826
- const endHeight = toPanel.getBoundingClientRect().height;
15837
+ void content.offsetHeight;
15838
+ const endHeight = content.getBoundingClientRect().height;
15839
+ content.style.height = `${startHeight}px`;
15840
+ void content.offsetHeight;
15827
15841
  if (startHeight !== endHeight) {
15828
15842
  content.setAttribute("data-animating", "true");
15829
15843
  void content.offsetHeight;