lilact 0.31.9 → 0.31.11
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/dist/lilact.development.js +12 -14
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +4 -4
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +4 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/accessories.ErrorBoundary.html +3 -3
- package/docs/classes/accessories.Suspense.html +2 -2
- package/docs/classes/components.Component.html +9 -9
- package/docs/classes/components.HTMLComponent.html +10 -10
- package/docs/classes/components.RootComponent.html +5 -5
- package/docs/functions/components.cloneComponent.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createPortal.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/static/demos/css-transition.jsx +5 -7
- package/docs/static/lilact.development.js +12 -14
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +4 -4
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +4 -4
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/demos/css-transition.jsx +5 -7
- package/examples/lilact.development.js +12 -14
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +4 -4
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +4 -4
- package/package.json +1 -1
- package/src/components.jsx +17 -19
|
@@ -2652,7 +2652,7 @@ var ComponentCore = class {
|
|
|
2652
2652
|
this.component.componentWillUpdate(next_props, next_state);
|
|
2653
2653
|
}
|
|
2654
2654
|
const prev_state = this.state, prev_props = this.props;
|
|
2655
|
-
if (this.element) {
|
|
2655
|
+
if (this.element && !(this?.component instanceof RootComponent)) {
|
|
2656
2656
|
this.updateElementProps(next_props);
|
|
2657
2657
|
}
|
|
2658
2658
|
this.props = next_props;
|
|
@@ -2789,7 +2789,7 @@ var ComponentCore = class {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
for (let a in this.props) {
|
|
2791
2791
|
const al = a.toLowerCase();
|
|
2792
|
-
if (!patch.hasOwnProperty(a)) {
|
|
2792
|
+
if (!patch.hasOwnProperty(a) || !a.startsWith("data-") && !a.startsWith("aria-") && (patch[a] === void 0 || patch[a] === null || patch[a] === "" || patch[a] === false)) {
|
|
2793
2793
|
if (events_set.has(al)) {
|
|
2794
2794
|
this.event_detachers[al]();
|
|
2795
2795
|
} else {
|
|
@@ -2856,25 +2856,23 @@ var ComponentCore = class {
|
|
|
2856
2856
|
this.updateElementClass(patch);
|
|
2857
2857
|
}
|
|
2858
2858
|
updateElementClass(patch = this.props) {
|
|
2859
|
-
let cn = patch?.className;
|
|
2860
|
-
cn ?? (cn = patch?.class ? patch.class : "");
|
|
2859
|
+
let cn = patch?.className ?? patch?.class ?? "";
|
|
2861
2860
|
if (this?.parent?.[CHILD_CLASS_ADDENDUM]) {
|
|
2862
|
-
cn += " " + this
|
|
2861
|
+
cn += " " + this.parent[CHILD_CLASS_ADDENDUM];
|
|
2862
|
+
}
|
|
2863
|
+
cn = cn.trim();
|
|
2864
|
+
for (const n of Array.from(this.element.classList)) {
|
|
2865
|
+
if (cn.indexOf(n) === -1) {
|
|
2866
|
+
this.element.classList.remove(n);
|
|
2867
|
+
}
|
|
2863
2868
|
}
|
|
2864
2869
|
if (cn.length > 0) {
|
|
2865
2870
|
cn = cn.split(/\s+/g);
|
|
2866
|
-
for (const n of Array.from(this.element.classList)) {
|
|
2867
|
-
if (cn.indexOf(n) === -1) {
|
|
2868
|
-
this.element.classList.remove(n);
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
2871
|
for (const n of cn) {
|
|
2872
2872
|
if (n.length > 0) {
|
|
2873
2873
|
this.element.classList.add(n);
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
} else {
|
|
2877
|
-
delete this.element.className;
|
|
2878
2876
|
}
|
|
2879
2877
|
}
|
|
2880
2878
|
scanZombies(container2, next_element) {
|
|
@@ -3182,10 +3180,10 @@ var Component = class {
|
|
|
3182
3180
|
* It can also be set for function components.
|
|
3183
3181
|
* @type {string}
|
|
3184
3182
|
*/
|
|
3185
|
-
displayName() {
|
|
3183
|
+
get displayName() {
|
|
3186
3184
|
const entity = this[CORE].entity;
|
|
3187
3185
|
if (entity?.displayName) {
|
|
3188
|
-
return
|
|
3186
|
+
return entity.displayName;
|
|
3189
3187
|
}
|
|
3190
3188
|
if (typeof entity === "string") {
|
|
3191
3189
|
return entity;
|