@m3e/web 2.5.14 → 2.5.16

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.
Files changed (49) hide show
  1. package/dist/all.js +133 -81
  2. package/dist/all.js.map +1 -1
  3. package/dist/all.min.js +35 -35
  4. package/dist/all.min.js.map +1 -1
  5. package/dist/core.js +46 -11
  6. package/dist/core.js.map +1 -1
  7. package/dist/core.min.js +1 -1
  8. package/dist/core.min.js.map +1 -1
  9. package/dist/css-custom-data.json +20 -0
  10. package/dist/custom-elements.json +89 -30
  11. package/dist/datepicker.js +0 -2
  12. package/dist/datepicker.js.map +1 -1
  13. package/dist/datepicker.min.js +1 -1
  14. package/dist/datepicker.min.js.map +1 -1
  15. package/dist/form-field.js +1 -1
  16. package/dist/form-field.js.map +1 -1
  17. package/dist/form-field.min.js +1 -1
  18. package/dist/form-field.min.js.map +1 -1
  19. package/dist/html-custom-data.json +2 -2
  20. package/dist/nav-bar.js +4 -2
  21. package/dist/nav-bar.js.map +1 -1
  22. package/dist/nav-bar.min.js +1 -1
  23. package/dist/nav-bar.min.js.map +1 -1
  24. package/dist/nav-rail.js +1 -1
  25. package/dist/nav-rail.js.map +1 -1
  26. package/dist/nav-rail.min.js +1 -1
  27. package/dist/nav-rail.min.js.map +1 -1
  28. package/dist/skeleton.js +81 -65
  29. package/dist/skeleton.js.map +1 -1
  30. package/dist/skeleton.min.js +1 -1
  31. package/dist/skeleton.min.js.map +1 -1
  32. package/dist/slider.js +1 -0
  33. package/dist/slider.js.map +1 -1
  34. package/dist/slider.min.js +1 -1
  35. package/dist/slider.min.js.map +1 -1
  36. package/dist/src/core/shared/primitives/CollapsibleElement.d.ts +1 -1
  37. package/dist/src/core/shared/primitives/CollapsibleElement.d.ts.map +1 -1
  38. package/dist/src/core/shared/primitives/CollapsibleOrientation.d.ts +1 -1
  39. package/dist/src/core/shared/primitives/CollapsibleOrientation.d.ts.map +1 -1
  40. package/dist/src/datepicker/DatepickerElement.d.ts.map +1 -1
  41. package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
  42. package/dist/src/nav-bar/NavBarElement.d.ts +2 -0
  43. package/dist/src/nav-bar/NavBarElement.d.ts.map +1 -1
  44. package/dist/src/nav-bar/NavItemElement.d.ts.map +1 -1
  45. package/dist/src/nav-rail/NavRailElement.d.ts.map +1 -1
  46. package/dist/src/skeleton/SkeletonElement.d.ts +12 -6
  47. package/dist/src/skeleton/SkeletonElement.d.ts.map +1 -1
  48. package/dist/src/slider/SliderElement.d.ts.map +1 -1
  49. package/package.json +1 -1
package/dist/core.js CHANGED
@@ -3954,6 +3954,7 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
3954
3954
  /** @inheritdoc */
3955
3955
  update(changedProperties) {
3956
3956
  super.update(changedProperties);
3957
+ const noAnimate = this.noAnimate || changedProperties.has("orientation") && !changedProperties.has("open");
3957
3958
  addCustomState(this, "--no-animate");
3958
3959
  if (!__classPrivateFieldGet(this, _M3eCollapsibleElement_slotChanged, "f")) {
3959
3960
  if (this.open) {
@@ -3966,9 +3967,9 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
3966
3967
  this.toggleAttribute("inert", !this.open);
3967
3968
  if (this.open) {
3968
3969
  __classPrivateFieldSet(this, _M3eCollapsibleElement_hasOpened, true, "f");
3969
- if (!(prefersReducedMotion() || this.noAnimate)) {
3970
+ if (!(noAnimate || prefersReducedMotion())) {
3970
3971
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_autoSize).call(this);
3971
- setCustomState(this, "--overflows", this.orientation === "vertical" ? this.clientHeight < this.scrollHeight : this.clientWidth < this.scrollWidth);
3972
+ setCustomState(this, "--overflows", this.orientation === "vertical" ? this.clientHeight < this.scrollHeight : this.orientation === "horizontal" ? this.clientWidth < this.scrollWidth : this.clientHeight < this.scrollHeight || this.clientWidth < this.scrollWidth);
3972
3973
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
3973
3974
  }
3974
3975
  deleteCustomState(this, "--closing");
@@ -3977,7 +3978,7 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
3977
3978
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
3978
3979
  deleteCustomState(this, "--no-animate");
3979
3980
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_actualSize).call(this);
3980
- if (prefersReducedMotion() || this.noAnimate) {
3981
+ if (noAnimate || prefersReducedMotion()) {
3981
3982
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_autoSize).call(this);
3982
3983
  deleteCustomState(this, "--opening");
3983
3984
  this.dispatchEvent(new Event("opened"));
@@ -4000,7 +4001,7 @@ let M3eCollapsibleElement = class M3eCollapsibleElement extends AttachInternals(
4000
4001
  if (__classPrivateFieldGet(this, _M3eCollapsibleElement_hasOpened, "f")) {
4001
4002
  deleteCustomState(this, "--no-animate");
4002
4003
  }
4003
- if (prefersReducedMotion() || this.noAnimate) {
4004
+ if (noAnimate || prefersReducedMotion()) {
4004
4005
  __classPrivateFieldGet(this, _M3eCollapsibleElement_instances, "m", _M3eCollapsibleElement_clearSize).call(this);
4005
4006
  deleteCustomState(this, "--closing");
4006
4007
  this.dispatchEvent(new Event("closed"));
@@ -4031,16 +4032,43 @@ _M3eCollapsibleElement_handleSlotChange = function _M3eCollapsibleElement_handle
4031
4032
  __classPrivateFieldSet(this, _M3eCollapsibleElement_slotChanged, true, "f");
4032
4033
  };
4033
4034
  _M3eCollapsibleElement_autoSize = function _M3eCollapsibleElement_autoSize() {
4034
- this.style[this.orientation === "vertical" ? "height" : "width"] = "auto";
4035
+ switch (this.orientation) {
4036
+ case "vertical":
4037
+ this.style.height = "auto";
4038
+ break;
4039
+ case "horizontal":
4040
+ this.style.width = "auto";
4041
+ break;
4042
+ case "both":
4043
+ this.style.height = this.style.width = "auto";
4044
+ break;
4045
+ }
4035
4046
  };
4036
4047
  _M3eCollapsibleElement_clearSize = function _M3eCollapsibleElement_clearSize() {
4037
- this.style[this.orientation === "vertical" ? "height" : "width"] = "";
4048
+ switch (this.orientation) {
4049
+ case "vertical":
4050
+ this.style.height = "";
4051
+ break;
4052
+ case "horizontal":
4053
+ this.style.width = "";
4054
+ break;
4055
+ case "both":
4056
+ this.style.height = this.style.width = "";
4057
+ break;
4058
+ }
4038
4059
  };
4039
4060
  _M3eCollapsibleElement_actualSize = function _M3eCollapsibleElement_actualSize() {
4040
- if (this.orientation === "vertical") {
4041
- this.style.height = `${this.scrollHeight}px`;
4042
- } else {
4043
- this.style.width = `${this.scrollWidth}px`;
4061
+ switch (this.orientation) {
4062
+ case "vertical":
4063
+ this.style.height = `${this.scrollHeight}px`;
4064
+ break;
4065
+ case "horizontal":
4066
+ this.style.width = `${this.scrollWidth}px`;
4067
+ break;
4068
+ case "both":
4069
+ this.style.height = `${this.scrollHeight}px`;
4070
+ this.style.width = `${this.scrollWidth}px`;
4071
+ break;
4044
4072
  }
4045
4073
  };
4046
4074
  /** The styles of the element. */
@@ -4058,7 +4086,14 @@ M3eCollapsibleElement.styles = css`:host { display: block; overflow: hidden; } :
4058
4086
  padding-left var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4059
4087
  ${DesignToken.motion.easing.standard},
4060
4088
  padding-right var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4061
- ${DesignToken.motion.easing.standard}`)}; } :host(:not(:is(:state(--closing), :--closing)):not([open])) { visibility: hidden; } :host([orientation="vertical"]:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host([orientation="horizontal"]:not([open])) { min-width: unset !important; padding-left: 0px !important; padding-right: 0px !important; } :host([no-animate]), :host(:is(:state(--no-animate), :--no-animate)) { transition-duration: 0ms; } :host([orientation="vertical"]:is(:state(--opening), :--opening)), :host([orientation="vertical"]:is(:state(--closing), :--closing)) { overflow-y: hidden !important; } :host([orientation="horizontal"]:is(:state(--opening), :--opening)), :host([orientation="horizontal"]:is(:state(--closing), :--closing)) { overflow-x: hidden !important; } :host(:is(:state(--overflows), :--overflows)) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`;
4089
+ ${DesignToken.motion.easing.standard}`)}; } :host([orientation="both"]) { height: 0px; width: 0px; transition: ${unsafeCSS(`visibility var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4090
+ ${DesignToken.motion.easing.standard},
4091
+ width var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4092
+ ${DesignToken.motion.easing.standard},
4093
+ height var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4094
+ ${DesignToken.motion.easing.standard},
4095
+ padding var(--m3e-collapsible-animation-duration, ${DesignToken.motion.duration.medium1})
4096
+ ${DesignToken.motion.easing.standard}`)}; } :host(:not(:is(:state(--closing), :--closing)):not([open])) { visibility: hidden; } :host([orientation="vertical"]:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host([orientation="horizontal"]:not([open])) { min-width: unset !important; padding-left: 0px !important; padding-right: 0px !important; } :host([orientation="both"]:not([open])) { min-height: unset !important; min-width: unset !important; padding: 0px !important; } :host([no-animate]), :host(:is(:state(--no-animate), :--no-animate)) { transition-duration: 0ms; } :host([orientation="vertical"]:is(:state(--opening), :--opening)), :host([orientation="vertical"]:is(:state(--closing), :--closing)) { overflow-y: hidden !important; } :host([orientation="horizontal"]:is(:state(--opening), :--opening)), :host([orientation="horizontal"]:is(:state(--closing), :--closing)) { overflow-x: hidden !important; } :host([orientation="both"]:is(:state(--opening), :--opening)), :host([orientation="both"]:is(:state(--closing), :--closing)) { overflow-y: hidden !important; overflow-x: hidden !important; } :host(:is(:state(--overflows), :--overflows)) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`;
4062
4097
  __decorate([property({
4063
4098
  type: Boolean,
4064
4099
  reflect: true