flysoft-react-ui 1.2.9 → 1.2.10
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/AI_CONTEXT.md
CHANGED
|
@@ -744,6 +744,7 @@ interface DialogProps {
|
|
|
744
744
|
onClose?: () => void;
|
|
745
745
|
closeOnOverlayClick?: boolean; // default: false
|
|
746
746
|
compact?: boolean; // default: false
|
|
747
|
+
bodyWidth?: string | number; // Custom dialog width (e.g. "800px", "80vw", 600). Default: max-w-lg
|
|
747
748
|
}
|
|
748
749
|
```
|
|
749
750
|
|
package/AI_INTEGRATION_GUIDE.md
CHANGED
|
@@ -90,7 +90,7 @@ This project uses `flysoft-react-ui` as the default UI library.
|
|
|
90
90
|
- `Badge` — Props: variant, size, rounded, icon, iconPosition, bg, textColor, onClick
|
|
91
91
|
- `Avatar` — Props: text (for initials), image, bgColor, textColor, size
|
|
92
92
|
- `RoadMap` — Stage visualization. Props: stages ({name, description?, icon?, variant?, bg?, disabled?}[])
|
|
93
|
-
- `Dialog` — Modal. Props: isOpen, title, children, footer, onClose, closeOnOverlayClick, compact
|
|
93
|
+
- `Dialog` — Modal. Props: isOpen, title, children, footer, onClose, closeOnOverlayClick, compact, bodyWidth
|
|
94
94
|
- `Loader` — Loading indicator. Props: isLoading, text, keepContentWhileLoading, contentLoadingNode, overlayClassName
|
|
95
95
|
- `FiltersDialog` — Groups multiple filters in dialog. Props: filters (FilterConfig[])
|
|
96
96
|
- `Snackbar` — (Used internally) Toast notification
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/utils/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/utils/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0HxC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2991,15 +2991,16 @@ const dn = ({
|
|
|
2991
2991
|
footer: n,
|
|
2992
2992
|
onClose: s,
|
|
2993
2993
|
closeOnOverlayClick: o = !1,
|
|
2994
|
-
compact: a = !1
|
|
2994
|
+
compact: a = !1,
|
|
2995
|
+
bodyWidth: i
|
|
2995
2996
|
}) => (me(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
2996
2997
|
document.body.style.overflow = "";
|
|
2997
2998
|
}), [e]), me(() => {
|
|
2998
|
-
const
|
|
2999
|
-
|
|
2999
|
+
const u = (d) => {
|
|
3000
|
+
d.key === "Escape" && e && s && s();
|
|
3000
3001
|
};
|
|
3001
|
-
return e && document.addEventListener("keydown",
|
|
3002
|
-
document.removeEventListener("keydown",
|
|
3002
|
+
return e && document.addEventListener("keydown", u), () => {
|
|
3003
|
+
document.removeEventListener("keydown", u);
|
|
3003
3004
|
};
|
|
3004
3005
|
}, [e, s]), e ? /* @__PURE__ */ $(
|
|
3005
3006
|
"div",
|
|
@@ -3021,9 +3022,13 @@ const dn = ({
|
|
|
3021
3022
|
/* @__PURE__ */ $(
|
|
3022
3023
|
"div",
|
|
3023
3024
|
{
|
|
3024
|
-
className:
|
|
3025
|
-
onClick: (
|
|
3026
|
-
style: {
|
|
3025
|
+
className: `relative bg-[var(--color-bg-default)] rounded-lg shadow-[var(--shadow-xl)] border border-[var(--color-border-default)] font-[var(--font-default)] max-h-[90vh] flex flex-col${i ? "" : " w-auto max-w-lg min-w-[400px]"}`,
|
|
3026
|
+
onClick: (u) => u.stopPropagation(),
|
|
3027
|
+
style: {
|
|
3028
|
+
overflow: "visible",
|
|
3029
|
+
width: i !== void 0 ? typeof i == "number" ? `${i}px` : i : void 0,
|
|
3030
|
+
maxWidth: i !== void 0 ? "calc(100vw - 2rem)" : void 0
|
|
3031
|
+
},
|
|
3027
3032
|
children: [
|
|
3028
3033
|
/* @__PURE__ */ $(
|
|
3029
3034
|
"div",
|