@diwauhris/ui 1.7.40 → 1.7.42
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/lib/assets/ui.css +0 -13
- package/lib/index.cjs +12 -7
- package/lib/index.mjs +12 -7
- package/lib/types/lib/utils.d.ts +9 -0
- package/package.json +1 -1
package/lib/assets/ui.css
CHANGED
|
@@ -4169,11 +4169,6 @@
|
|
|
4169
4169
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
4170
4170
|
}
|
|
4171
4171
|
|
|
4172
|
-
.backdrop-blur {
|
|
4173
|
-
--tw-backdrop-blur: blur(8px);
|
|
4174
|
-
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
4175
|
-
}
|
|
4176
|
-
|
|
4177
4172
|
.backdrop-blur-sm {
|
|
4178
4173
|
--tw-backdrop-blur: blur(4px);
|
|
4179
4174
|
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
@@ -4249,14 +4244,6 @@
|
|
|
4249
4244
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
4250
4245
|
}
|
|
4251
4246
|
|
|
4252
|
-
.will-change-\[opacity\] {
|
|
4253
|
-
will-change: opacity;
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
|
-
.will-change-\[transform\2c opacity\] {
|
|
4257
|
-
will-change: transform,opacity;
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
4247
|
@keyframes enter {
|
|
4261
4248
|
from {
|
|
4262
4249
|
opacity: var(--tw-enter-opacity, 1);
|
package/lib/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ let sonner = require("sonner");
|
|
|
54
54
|
function cn(...inputs) {
|
|
55
55
|
return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
|
|
56
56
|
}
|
|
57
|
+
var FLOATING_LAYER_SELECTOR = `.pis-datepicker-popover, [data-pis-floating]`;
|
|
57
58
|
//#endregion
|
|
58
59
|
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
59
60
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -2462,16 +2463,16 @@ function Modal({ isOpen, onClose, title, children, icon, subtitle, headerMeta, f
|
|
|
2462
2463
|
onOpenChange: (isOpen) => {
|
|
2463
2464
|
if (!isOpen && !preventClose) onClose();
|
|
2464
2465
|
},
|
|
2465
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60
|
|
2466
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2466
2467
|
className: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2467
2468
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
|
|
2468
|
-
className: cn("pointer-events-auto relative", "flex w-full flex-col", "rounded-lg border border-slate-200 bg-white shadow-xl", "max-h-[85vh] outline-none", maxWidth
|
|
2469
|
+
className: cn("pointer-events-auto relative", "flex w-full flex-col", "rounded-lg border border-slate-200 bg-white shadow-xl", "max-h-[85vh] outline-none", maxWidth),
|
|
2469
2470
|
style: { padding: 0 },
|
|
2470
2471
|
onOpenAutoFocus,
|
|
2471
2472
|
onCloseAutoFocus,
|
|
2472
2473
|
onEscapeKeyDown: preventClose ? (e) => e.preventDefault() : onEscapeKeyDown,
|
|
2473
2474
|
onInteractOutside: (e) => {
|
|
2474
|
-
if (e.target?.closest(
|
|
2475
|
+
if (e.target?.closest(FLOATING_LAYER_SELECTOR)) {
|
|
2475
2476
|
e.preventDefault();
|
|
2476
2477
|
return;
|
|
2477
2478
|
}
|
|
@@ -2592,11 +2593,11 @@ function Dialog({ open, onClose, title, description, preventClose = false, size
|
|
|
2592
2593
|
onOpenChange: (isOpen) => {
|
|
2593
2594
|
if (!isOpen && !preventClose) onClose();
|
|
2594
2595
|
},
|
|
2595
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/
|
|
2596
|
-
className: cn("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "flex w-full flex-col overflow-hidden", "rounded-lg bg-white shadow-xl", "max-h-[90vh] outline-none", SIZE_CLASS[size]
|
|
2596
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
|
|
2597
|
+
className: cn("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "flex w-full flex-col overflow-hidden", "rounded-lg bg-white shadow-xl", "max-h-[90vh] outline-none", SIZE_CLASS[size]),
|
|
2597
2598
|
onEscapeKeyDown: preventClose ? (e) => e.preventDefault() : onEscapeKeyDown,
|
|
2598
2599
|
onInteractOutside: (e) => {
|
|
2599
|
-
if (e.target?.closest(
|
|
2600
|
+
if (e.target?.closest(FLOATING_LAYER_SELECTOR)) {
|
|
2600
2601
|
e.preventDefault();
|
|
2601
2602
|
return;
|
|
2602
2603
|
}
|
|
@@ -4265,7 +4266,11 @@ function Menu({ trigger, items, ariaLabel = "Menu", align = "right", open: contr
|
|
|
4265
4266
|
ref: panelRef,
|
|
4266
4267
|
role: "menu",
|
|
4267
4268
|
"aria-label": ariaLabel,
|
|
4268
|
-
|
|
4269
|
+
["data-pis-floating"]: "",
|
|
4270
|
+
style: {
|
|
4271
|
+
...panelStyle,
|
|
4272
|
+
pointerEvents: "auto"
|
|
4273
|
+
},
|
|
4269
4274
|
className: cn("overflow-y-auto overscroll-contain rounded-xl border border-slate-200 bg-white py-1 shadow-xl", panelClassName),
|
|
4270
4275
|
children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4271
4276
|
ref: (node) => {
|
package/lib/index.mjs
CHANGED
|
@@ -30,6 +30,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
30
30
|
function cn(...inputs) {
|
|
31
31
|
return twMerge(clsx(inputs));
|
|
32
32
|
}
|
|
33
|
+
var FLOATING_LAYER_SELECTOR = `.pis-datepicker-popover, [data-pis-floating]`;
|
|
33
34
|
//#endregion
|
|
34
35
|
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
35
36
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -2438,16 +2439,16 @@ function Modal({ isOpen, onClose, title, children, icon, subtitle, headerMeta, f
|
|
|
2438
2439
|
onOpenChange: (isOpen) => {
|
|
2439
2440
|
if (!isOpen && !preventClose) onClose();
|
|
2440
2441
|
},
|
|
2441
|
-
children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60
|
|
2442
|
+
children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60" }), /* @__PURE__ */ jsx("div", {
|
|
2442
2443
|
className: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2443
2444
|
children: /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
2444
|
-
className: cn("pointer-events-auto relative", "flex w-full flex-col", "rounded-lg border border-slate-200 bg-white shadow-xl", "max-h-[85vh] outline-none", maxWidth
|
|
2445
|
+
className: cn("pointer-events-auto relative", "flex w-full flex-col", "rounded-lg border border-slate-200 bg-white shadow-xl", "max-h-[85vh] outline-none", maxWidth),
|
|
2445
2446
|
style: { padding: 0 },
|
|
2446
2447
|
onOpenAutoFocus,
|
|
2447
2448
|
onCloseAutoFocus,
|
|
2448
2449
|
onEscapeKeyDown: preventClose ? (e) => e.preventDefault() : onEscapeKeyDown,
|
|
2449
2450
|
onInteractOutside: (e) => {
|
|
2450
|
-
if (e.target?.closest(
|
|
2451
|
+
if (e.target?.closest(FLOATING_LAYER_SELECTOR)) {
|
|
2451
2452
|
e.preventDefault();
|
|
2452
2453
|
return;
|
|
2453
2454
|
}
|
|
@@ -2568,11 +2569,11 @@ function Dialog({ open, onClose, title, description, preventClose = false, size
|
|
|
2568
2569
|
onOpenChange: (isOpen) => {
|
|
2569
2570
|
if (!isOpen && !preventClose) onClose();
|
|
2570
2571
|
},
|
|
2571
|
-
children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/
|
|
2572
|
-
className: cn("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "flex w-full flex-col overflow-hidden", "rounded-lg bg-white shadow-xl", "max-h-[90vh] outline-none", SIZE_CLASS[size]
|
|
2572
|
+
children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-brand-navy/60" }), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
2573
|
+
className: cn("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "flex w-full flex-col overflow-hidden", "rounded-lg bg-white shadow-xl", "max-h-[90vh] outline-none", SIZE_CLASS[size]),
|
|
2573
2574
|
onEscapeKeyDown: preventClose ? (e) => e.preventDefault() : onEscapeKeyDown,
|
|
2574
2575
|
onInteractOutside: (e) => {
|
|
2575
|
-
if (e.target?.closest(
|
|
2576
|
+
if (e.target?.closest(FLOATING_LAYER_SELECTOR)) {
|
|
2576
2577
|
e.preventDefault();
|
|
2577
2578
|
return;
|
|
2578
2579
|
}
|
|
@@ -4241,7 +4242,11 @@ function Menu({ trigger, items, ariaLabel = "Menu", align = "right", open: contr
|
|
|
4241
4242
|
ref: panelRef,
|
|
4242
4243
|
role: "menu",
|
|
4243
4244
|
"aria-label": ariaLabel,
|
|
4244
|
-
|
|
4245
|
+
["data-pis-floating"]: "",
|
|
4246
|
+
style: {
|
|
4247
|
+
...panelStyle,
|
|
4248
|
+
pointerEvents: "auto"
|
|
4249
|
+
},
|
|
4245
4250
|
className: cn("overflow-y-auto overscroll-contain rounded-xl border border-slate-200 bg-white py-1 shadow-xl", panelClassName),
|
|
4246
4251
|
children: items.map((item, index) => /* @__PURE__ */ jsxs("button", {
|
|
4247
4252
|
ref: (node) => {
|
package/lib/types/lib/utils.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { type ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
/**
|
|
4
|
+
* Floating layers (Menu panels, DatePicker calendars) portal to document.body.
|
|
5
|
+
* Inside an open Modal/Dialog, Radix blocks pointer events outside its content
|
|
6
|
+
* and treats any interaction there as "outside" (closing the dialog). Floating
|
|
7
|
+
* layers opt out by setting `pointer-events: auto` and carrying this marker;
|
|
8
|
+
* Modal and Dialog then ignore interactions that land inside them.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FLOATING_LAYER_ATTR = "data-pis-floating";
|
|
11
|
+
export declare const FLOATING_LAYER_SELECTOR = ".pis-datepicker-popover, [data-pis-floating]";
|