@versini/ui-panel 3.5.1 → 4.0.0

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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { JSX } from 'react/jsx-runtime';
2
2
 
3
3
  export declare const MESSAGEBOX_CLASSNAME = "av-messagebox";
4
4
 
5
- export declare const Panel: ({ open, onOpenChange, title, children, footer, borderMode, kind, className, animation, animationType, maxWidth, maxHeight, headerBlurEffect, footerBlurEffect, }: PanelProps) => JSX.Element;
5
+ export declare const Panel: ({ open, onOpenChange, title, children, footer, borderMode, kind, className, animation, animationType, maxWidth, maxHeight, blurEffect, }: PanelProps) => JSX.Element;
6
6
 
7
7
  export declare const PANEL_CLASSNAME = "av-panel";
8
8
 
@@ -65,15 +65,10 @@ declare type PanelProps = {
65
65
  */
66
66
  maxHeight?: "small" | "medium" | "large";
67
67
  /**
68
- * The blur effect to apply to the header background.
68
+ * The blur effect to apply to the header and footer backgrounds.
69
69
  * @default "none"
70
70
  */
71
- headerBlurEffect?: "none" | "light" | "heavy";
72
- /**
73
- * The blur effect to apply to the footer background.
74
- * @default "none"
75
- */
76
- footerBlurEffect?: "none" | "light" | "heavy";
71
+ blurEffect?: "none" | "small" | "medium" | "large";
77
72
  };
78
73
 
79
74
  export { }
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /*!
2
- @versini/ui-panel v3.5.1
2
+ @versini/ui-panel v4.0.0
3
3
  © 2025 gizmette.com
4
4
  */
5
5
  try {
6
6
  if (!window.__VERSINI_UI_PANEL__) {
7
7
  window.__VERSINI_UI_PANEL__ = {
8
- version: "3.5.1",
9
- buildTime: "11/28/2025 12:47 PM EST",
8
+ version: "4.0.0",
9
+ buildTime: "11/28/2025 01:51 PM EST",
10
10
  homepage: "https://github.com/aversini/ui-components",
11
11
  license: "MIT",
12
12
  };
@@ -46,7 +46,7 @@ const PANEL_CLASSNAME = "av-panel";
46
46
  if (!window.__VERSINI_UI_MODAL__) {
47
47
  window.__VERSINI_UI_MODAL__ = {
48
48
  version: "3.1.0",
49
- buildTime: "11/28/2025 12:47 PM EST",
49
+ buildTime: "11/28/2025 01:51 PM EST",
50
50
  homepage: "https://github.com/aversini/ui-components",
51
51
  license: "MIT"
52
52
  };
@@ -206,7 +206,15 @@ const Modal_ModalClose = /*#__PURE__*/ forwardRef(function ModalClose(props, ref
206
206
 
207
207
  const TYPE_PANEL = "panel";
208
208
  const TYPE_MESSAGEBOX = "messagebox";
209
- const getPanelClassName = ({ className, kind, borderMode, animation, maxWidth = "medium", maxHeight, headerBlurEffect = "none", footerBlurEffect = "none" })=>{
209
+ const getFooterAndHeaderCommonClasses = ({ blurEffect })=>{
210
+ return clsx("sticky z-10 backdrop-brightness-50", {
211
+ "backdrop-blur-sm": blurEffect === "small",
212
+ "backdrop-blur-md": blurEffect === "medium",
213
+ "backdrop-blur-lg": blurEffect === "large",
214
+ "bg-surface-darker": blurEffect === "none"
215
+ });
216
+ };
217
+ const getPanelClassName = ({ className, kind, borderMode, animation, maxWidth = "medium", maxHeight, blurEffect = "none" })=>{
210
218
  // Apply default maxHeight only for TYPE_PANEL to maintain backward compatibility
211
219
  const effectiveMaxHeight = maxHeight ?? (kind === TYPE_PANEL ? "large" : undefined);
212
220
  return {
@@ -235,15 +243,17 @@ const getPanelClassName = ({ className, kind, borderMode, animation, maxWidth =
235
243
  [`${className}`]: !!className
236
244
  }),
237
245
  innerWrapper: "content flex flex-col overflow-y-auto",
238
- footer: clsx("p-2 sticky bottom-0 z-10 sm:rounded-b-md", "backdrop-brightness-50", {
239
- "backdrop-blur-sm": footerBlurEffect === "light",
240
- "backdrop-blur-lg": footerBlurEffect === "heavy",
241
- "bg-surface-dark": footerBlurEffect === "none"
246
+ footer: clsx(getFooterAndHeaderCommonClasses({
247
+ blurEffect
248
+ }), "p-2 bottom-0", {
249
+ "sm:rounded-b-md": kind === TYPE_PANEL,
250
+ "rounded-b-md": kind === TYPE_MESSAGEBOX
242
251
  }),
243
- header: clsx("flex flex-row-reverse items-center justify-between", "sticky top-0 z-10 sm:rounded-t-md", "backdrop-brightness-50", {
244
- "backdrop-blur-sm": headerBlurEffect === "light",
245
- "backdrop-blur-lg": headerBlurEffect === "heavy",
246
- "bg-surface-dark": headerBlurEffect === "none"
252
+ header: clsx("flex flex-row-reverse items-center justify-between", getFooterAndHeaderCommonClasses({
253
+ blurEffect
254
+ }), "top-0", {
255
+ "sm:rounded-t-md": kind === TYPE_PANEL,
256
+ "rounded-t-md": kind === TYPE_MESSAGEBOX
247
257
  }),
248
258
  title: "mb-0 p-2",
249
259
  close: "p-2",
@@ -260,7 +270,7 @@ const getPanelClassName = ({ className, kind, borderMode, animation, maxWidth =
260
270
 
261
271
  const ANIMATION_SLIDE = "slide";
262
272
  const ANIMATION_FADE = "fade";
263
- const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "light", kind = TYPE_PANEL, className, animation = false, animationType = ANIMATION_SLIDE, maxWidth = "medium", maxHeight, headerBlurEffect = "none", footerBlurEffect = "none" })=>{
273
+ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "light", kind = TYPE_PANEL, className, animation = false, animationType = ANIMATION_SLIDE, maxWidth = "medium", maxHeight, blurEffect = "none" })=>{
264
274
  const originalTitleRef = useRef("");
265
275
  /* v8 ignore next 9 */ const [animationStyles, setAnimationStyles] = useState(!animation ? {} : animationType === ANIMATION_FADE ? {
266
276
  opacity: 0
@@ -274,8 +284,7 @@ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "ligh
274
284
  animation,
275
285
  maxWidth,
276
286
  maxHeight,
277
- headerBlurEffect,
278
- footerBlurEffect
287
+ blurEffect
279
288
  });
280
289
  /**
281
290
  * If the panel is opened, set the document
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-panel",
3
- "version": "3.5.1",
3
+ "version": "4.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -50,5 +50,5 @@
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "ca6d7648786a5ed9f6f4880b0edb36beca9439a5"
53
+ "gitHead": "278b6a2454814292c7b6b61ddaeb1c769630082e"
54
54
  }