@webority/ui-react 0.6.7 → 0.6.8
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/ui-react.js +7 -1
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -550,6 +550,12 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
550
550
|
<div class="datepicker-grid">${s}</div>
|
|
551
551
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
552
552
|
}
|
|
553
|
+
_position(e, t) {
|
|
554
|
+
let n = e.getBoundingClientRect(), r = t.offsetHeight, i = window.innerHeight - n.bottom, a = i < r + 4 && n.top > i;
|
|
555
|
+
t.classList.toggle("drop-up", a), t.style.position = "fixed", t.style.top = a ? `${Math.max(4, n.top - r - 4)}px` : `${n.bottom + 4}px`;
|
|
556
|
+
let o = t.offsetWidth, s = Math.min(n.left, window.innerWidth - o - 4);
|
|
557
|
+
t.style.left = `${Math.max(4, s)}px`;
|
|
558
|
+
}
|
|
553
559
|
_wire() {
|
|
554
560
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
555
561
|
if (!e || !t) return;
|
|
@@ -558,7 +564,7 @@ var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
558
564
|
let e = /* @__PURE__ */ new Date();
|
|
559
565
|
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
560
566
|
}
|
|
561
|
-
this._renderMonth(), t.hidden = !1, e.setAttribute("aria-expanded", "true");
|
|
567
|
+
this._renderMonth(), t.hidden = !1, this._position(e, t), e.setAttribute("aria-expanded", "true");
|
|
562
568
|
}, i = () => {
|
|
563
569
|
t.hidden = !0, e.setAttribute("aria-expanded", "false");
|
|
564
570
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-toastify": "^11.1.0",
|
|
32
|
-
"@webority/theme": "^0.6.
|
|
33
|
-
"@webority/ui-elements": "^0.6.
|
|
32
|
+
"@webority/theme": "^0.6.8",
|
|
33
|
+
"@webority/ui-elements": "^0.6.8"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"bootstrap": "5.3.3",
|