@versini/ui-panel 8.0.7 → 8.1.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -40
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,19 +1,7 @@
1
1
  /*!
2
- @versini/ui-panel v8.0.7
2
+ @versini/ui-panel v8.1.0
3
3
  © 2025 gizmette.com
4
4
  */
5
- try {
6
- if (!window.__VERSINI_UI_PANEL__) {
7
- window.__VERSINI_UI_PANEL__ = {
8
- version: "8.0.7",
9
- buildTime: "12/18/2025 07:40 PM EST",
10
- homepage: "https://www.npmjs.com/package/@versini/ui-panel",
11
- license: "MIT",
12
- };
13
- }
14
- } catch (error) {
15
- // nothing to declare officer
16
- }
17
5
 
18
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
7
  import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useClick, useDismiss, useFloating, useInteractions, useMergeRefs, useRole } from "@floating-ui/react";
@@ -42,21 +30,9 @@ const NONE = "none";
42
30
 
43
31
  ;// CONCATENATED MODULE: ../ui-modal/dist/index.js
44
32
  /*!
45
- @versini/ui-modal v3.2.1
33
+ @versini/ui-modal v3.3.0
46
34
  © 2025 gizmette.com
47
- */ try {
48
- if (!window.__VERSINI_UI_MODAL__) {
49
- window.__VERSINI_UI_MODAL__ = {
50
- version: "3.2.1",
51
- buildTime: "12/18/2025 07:40 PM EST",
52
- homepage: "https://github.com/aversini/ui-components",
53
- license: "MIT"
54
- };
55
- }
56
- } catch (error) {
57
- // nothing to declare officer
58
- }
59
-
35
+ */
60
36
 
61
37
 
62
38
 
@@ -65,9 +41,9 @@ function useModal({ initialOpen = false, open: controlledOpen, onOpenChange: set
65
41
  const [uncontrolledOpen, setUncontrolledOpen] = useState(initialOpen);
66
42
  const [labelId, setLabelId] = useState();
67
43
  const [descriptionId, setDescriptionId] = useState();
68
- /* v8 ignore next 2 */ const open = controlledOpen ?? uncontrolledOpen;
44
+ /* v8 ignore start */ const open = controlledOpen ?? uncontrolledOpen;
69
45
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
70
- const data = useFloating({
46
+ /* v8 ignore stop */ const data = useFloating({
71
47
  open,
72
48
  onOpenChange: setOpen
73
49
  });
@@ -107,10 +83,10 @@ function useModal({ initialOpen = false, open: controlledOpen, onOpenChange: set
107
83
  }
108
84
  const useModalContext = ()=>{
109
85
  const context = useContext(ModalContext);
110
- /* v8 ignore next 3 */ if (context == null) {
86
+ /* v8 ignore start */ if (context == null) {
111
87
  throw new Error("Modal components must be wrapped in <Modal />");
112
88
  }
113
- return context;
89
+ /* v8 ignore stop */ return context;
114
90
  };
115
91
  function Modal({ children, ...options }) {
116
92
  const dialog = useModal(options);
@@ -125,10 +101,10 @@ const Modal_ModalContent = /*#__PURE__*/ forwardRef(function ModalContent(props,
125
101
  context.refs.setFloating,
126
102
  propRef
127
103
  ]);
128
- /* v8 ignore next 3 */ if (!floatingContext.open) {
104
+ /* v8 ignore start */ if (!floatingContext.open) {
129
105
  return null;
130
106
  }
131
- const { overlayBackground, ...rest } = props;
107
+ /* v8 ignore stop */ const { overlayBackground, ...rest } = props;
132
108
  const overlayClass = clsx("grid place-items-center", {
133
109
  [`${overlayBackground}`]: overlayBackground,
134
110
  "bg-black sm:bg-black/[.8]": !overlayBackground
@@ -204,7 +180,8 @@ const Modal_ModalClose = /*#__PURE__*/ forwardRef(function ModalClose(props, ref
204
180
  })
205
181
  });
206
182
  });
207
- /* v8 ignore next 1 */
183
+ // force new release
184
+ /* v8 ignore start */ /* v8 ignore stop */
208
185
 
209
186
  ;// CONCATENATED MODULE: ./src/components/Panel/utilities.ts
210
187
 
@@ -290,12 +267,12 @@ const getPanelClassName = ({ className, kind, borderMode, animation, maxWidth =
290
267
 
291
268
  const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "light", kind = /* inlined export .TYPE_PANEL */ ("panel"), className, animation = false, animationType = /* inlined export .ANIMATION_SLIDE */ ("slide"), maxWidth = /* inlined export .MEDIUM */ ("medium"), maxHeight, blurEffect = /* inlined export .NONE */ ("none"), initialFocus })=>{
292
269
  const originalTitleRef = useRef("");
293
- /* v8 ignore next 9 */ const [animationStyles, setAnimationStyles] = useState(!animation ? {} : animationType === /* inlined export .ANIMATION_FADE */ ("fade") ? {
270
+ /* v8 ignore start */ const [animationStyles, setAnimationStyles] = useState(!animation ? {} : animationType === /* inlined export .ANIMATION_FADE */ ("fade") ? {
294
271
  opacity: 0
295
272
  } : {
296
273
  transform: "translateY(-100vh)"
297
274
  });
298
- const panelClassName = getPanelClassName({
275
+ /* v8 ignore stop */ const panelClassName = getPanelClassName({
299
276
  className,
300
277
  kind,
301
278
  borderMode,
@@ -309,7 +286,7 @@ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "ligh
309
286
  * If the panel is opened, set the document
310
287
  * title to the panel's title. If it's closed,
311
288
  * restore the original document.title.
312
- */ useEffect(()=>{
289
+ */ /* v8 ignore start - document title manipulation */ useEffect(()=>{
313
290
  if (open) {
314
291
  originalTitleRef.current = document.title;
315
292
  document.title = `${title} | ${originalTitleRef.current}`;
@@ -323,9 +300,9 @@ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "ligh
323
300
  title,
324
301
  open
325
302
  ]);
326
- /**
303
+ /* v8 ignore stop */ /**
327
304
  * Effect to handle the opening and closing animations.
328
- */ /* v8 ignore next 30 */ useEffect(()=>{
305
+ */ /* v8 ignore start */ useEffect(()=>{
329
306
  if (!animation) {
330
307
  return;
331
308
  }
@@ -351,7 +328,7 @@ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "ligh
351
328
  animation,
352
329
  animationType
353
330
  ]);
354
- return /*#__PURE__*/ jsx(Fragment, {
331
+ /* v8 ignore stop */ return /*#__PURE__*/ jsx(Fragment, {
355
332
  children: open && /*#__PURE__*/ jsx(Modal, {
356
333
  open: open,
357
334
  onOpenChange: onOpenChange,
@@ -415,6 +392,7 @@ const Panel = ({ open, onOpenChange, title, children, footer, borderMode = "ligh
415
392
  };
416
393
 
417
394
  ;// CONCATENATED MODULE: ./src/components/index.ts
395
+ // force new release
418
396
 
419
397
 
420
398
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-panel",
3
- "version": "8.0.7",
3
+ "version": "8.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@testing-library/jest-dom": "6.9.1",
46
- "@versini/ui-modal": "3.2.1"
46
+ "@versini/ui-modal": "3.3.0"
47
47
  },
48
48
  "dependencies": {
49
49
  "@tailwindcss/typography": "0.5.19",
@@ -53,5 +53,5 @@
53
53
  "sideEffects": [
54
54
  "**/*.css"
55
55
  ],
56
- "gitHead": "fb7669ae0c6d32d93751d7116fa6f5388a26ab55"
56
+ "gitHead": "b2ee2e328ecadfbedcb26d14afa896a30f0ab54b"
57
57
  }