@easemate/web-kit 0.5.1 → 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.js CHANGED
@@ -15299,20 +15299,27 @@ var init_panel = __esm({
15299
15299
  tag: "ease-panel",
15300
15300
  shadowMode: "open",
15301
15301
  styles: `
15302
- @property --top-fade {
15302
+ :host {
15303
+ display: block;
15304
+ box-sizing: border-box;
15305
+ }
15306
+
15307
+ @property --ease-panel-top-fade {
15303
15308
  syntax: "<length>";
15304
15309
  inherits: false;
15305
15310
  initial-value: 0px;
15306
15311
  }
15307
15312
 
15308
- @property --bottom-fade {
15313
+ @property --ease-panel-bottom-fade {
15309
15314
  syntax: "<length>";
15310
15315
  inherits: false;
15311
15316
  initial-value: 0px;
15312
15317
  }
15313
15318
 
15314
15319
  [part="section"] {
15315
- display: block;
15320
+ display: flex;
15321
+ flex-direction: column;
15322
+ max-height: inherit;
15316
15323
  width: 100%;
15317
15324
  max-width: var(--ease-panel-max-width);
15318
15325
  border-radius: var(--ease-panel-radius);
@@ -15449,9 +15456,10 @@ var init_panel = __esm({
15449
15456
 
15450
15457
  [part="content"] {
15451
15458
  display: block;
15459
+ flex: 1 1 auto;
15460
+ min-height: 0;
15452
15461
  width: 100%;
15453
15462
  box-sizing: border-box;
15454
- margin: auto;
15455
15463
  overflow: hidden;
15456
15464
  }
15457
15465
 
@@ -15460,18 +15468,10 @@ var init_panel = __esm({
15460
15468
  }
15461
15469
 
15462
15470
  [part="body"] {
15471
+ display: block;
15472
+ height: 100%;
15463
15473
  width: 100%;
15464
15474
  position: relative;
15465
- overflow-y: auto;
15466
- mask-image: linear-gradient(to bottom, #0000, #ffff var(--top-fade) calc(100% - var(--bottom-fade)), #0000);
15467
- animation-name: scroll-fade;
15468
- animation-timeline: scroll(self y);
15469
- scroll-snap-type: y mandatory;
15470
- scrollbar-width: none;
15471
-
15472
- &::-webkit-scrollbar {
15473
- display: none;
15474
- }
15475
15475
  }
15476
15476
 
15477
15477
  @keyframes scroll-fade {
@@ -15497,6 +15497,7 @@ var init_panel = __esm({
15497
15497
 
15498
15498
  [part="tab-panel"][data-state="active"] {
15499
15499
  display: block;
15500
+ height: 100%;
15500
15501
  pointer-events: auto;
15501
15502
  }
15502
15503
 
@@ -15524,6 +15525,17 @@ var init_panel = __esm({
15524
15525
  grid-gap: var(--ease-panel-gap);
15525
15526
  box-sizing: border-box;
15526
15527
  width: 100%;
15528
+ max-height: 100%;
15529
+ overflow-y: auto;
15530
+ mask-image: linear-gradient(to bottom, #0000, #ffff var(--top-fade) calc(100% - var(--bottom-fade)), #0000);
15531
+ animation-name: scroll-fade;
15532
+ animation-timeline: scroll(self y);
15533
+ scroll-snap-type: y mandatory;
15534
+ scrollbar-width: none;
15535
+
15536
+ &::-webkit-scrollbar {
15537
+ display: none;
15538
+ }
15527
15539
  }
15528
15540
  `
15529
15541
  }), _dec121 = Prop({
@@ -15666,8 +15678,8 @@ var init_panel = __esm({
15666
15678
  </div>
15667
15679
  </div>
15668
15680
  <div part="content">
15669
- <div part="body" style=${this.maxHeight ? `max-height: ${this.maxHeight};` : ""}>
15670
- ${hasTabs ? this.#renderTabPanels() : html21`<div part="items"><slot></slot></div>`}
15681
+ <div part="body">
15682
+ ${hasTabs ? this.#renderTabPanels() : html21`<div part="items" style=${this.maxHeight ? `max-height: ${this.maxHeight}` : nothing2}><slot></slot></div>`}
15671
15683
  </div>
15672
15684
  </div>
15673
15685
  <div part="footer">
@@ -15709,7 +15721,7 @@ var init_panel = __esm({
15709
15721
  data-state=${index === this.activeTab ? "active" : "hidden"}
15710
15722
  data-index=${index}
15711
15723
  >
15712
- <div part="items">
15724
+ <div part="items" style=${this.maxHeight ? `max-height: ${this.maxHeight}` : nothing2}>
15713
15725
  <slot name=${`tab-${tab.id}`}></slot>
15714
15726
  </div>
15715
15727
  </div>
@@ -15804,12 +15816,15 @@ var init_panel = __esm({
15804
15816
  } catch {
15805
15817
  }
15806
15818
  fromPanel.setAttribute("data-state", "hidden");
15819
+ content.style.height = "auto";
15807
15820
  const previousToState = toPanel.getAttribute("data-state");
15808
15821
  toPanel.style.display = "block";
15809
15822
  toPanel.style.visibility = "hidden";
15810
15823
  toPanel.style.opacity = "0";
15811
- void toPanel.offsetHeight;
15812
- const endHeight = toPanel.getBoundingClientRect().height;
15824
+ void content.offsetHeight;
15825
+ const endHeight = content.getBoundingClientRect().height;
15826
+ content.style.height = `${startHeight}px`;
15827
+ void content.offsetHeight;
15813
15828
  if (startHeight !== endHeight) {
15814
15829
  content.setAttribute("data-animating", "true");
15815
15830
  void content.offsetHeight;