@abdellatifui/react 3.2.91 → 3.2.92

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/nextgen.css CHANGED
@@ -98,7 +98,10 @@
98
98
  .abdellatifuimap .maplibregl-ctrl *{
99
99
  border-radius: 100px;
100
100
  cursor: default !important;
101
- }/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
101
+ }.css-opacity-0 {
102
+ opacity: 0 !important;
103
+ }
104
+ /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
102
105
  /*! Generated by Font Squirrel (https://www.fontsquirrel.com) on May 13, 2024 */
103
106
  @layer properties {
104
107
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
package/dist/nextgen.d.ts CHANGED
@@ -72,6 +72,7 @@ export declare interface AccordionItemProps {
72
72
  disabled?: boolean;
73
73
  className?: string;
74
74
  defaultOpen?: boolean;
75
+ delay?: number;
75
76
  onOpen?: (params: {
76
77
  value: any;
77
78
  props: any;
package/dist/nextgen.js CHANGED
@@ -24048,6 +24048,7 @@ const vrs$c = cva("px-1", {
24048
24048
  const AccordionItem = (props) => {
24049
24049
  const key = useGeneratedId(5, false, false);
24050
24050
  const ref = useRef();
24051
+ const contentRef = useRef();
24051
24052
  const refTrigger = useRef();
24052
24053
  const {
24053
24054
  value = key,
@@ -24059,7 +24060,8 @@ const AccordionItem = (props) => {
24059
24060
  onClose = () => {
24060
24061
  },
24061
24062
  defaultOpen = false,
24062
- disabled = false
24063
+ disabled = false,
24064
+ delay = 0
24063
24065
  } = props;
24064
24066
  const { updateApi, options: options2 } = useContext(AccordionContext);
24065
24067
  const id = useGeneratedId(5, true, false);
@@ -24068,8 +24070,12 @@ const AccordionItem = (props) => {
24068
24070
  const form = { ...props, open: isOpen, ref, refTrigger };
24069
24071
  if (isOpen) {
24070
24072
  onOpen(form);
24073
+ setTimeout(() => {
24074
+ $(contentRef.current).find("div").first().removeClass("css-opacity-0");
24075
+ }, delay);
24071
24076
  }
24072
24077
  if (!isOpen) {
24078
+ $(contentRef.current).find("div").first().addClass("css-opacity-0");
24073
24079
  onClose(form);
24074
24080
  }
24075
24081
  updateApi((prev) => ({ ...prev, ...form }));
@@ -24082,13 +24088,29 @@ const AccordionItem = (props) => {
24082
24088
  }, 100);
24083
24089
  }
24084
24090
  }, [defaultOpen]);
24085
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem$1, { ref, id, onClick: handleClick, className: cn(vrs$c({
24086
- disabled,
24087
- border: options2.border
24088
- }), className), disabled, value, children: [
24089
- /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { ref: refTrigger, children: header }),
24090
- /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { children })
24091
- ] }, key);
24091
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
24092
+ AccordionItem$1,
24093
+ {
24094
+ ref,
24095
+ id,
24096
+ onClick: handleClick,
24097
+ className: cn(vrs$c({ disabled, border: options2.border }), className),
24098
+ disabled,
24099
+ value,
24100
+ children: [
24101
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { ref: refTrigger, children: header }),
24102
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24103
+ AccordionContent,
24104
+ {
24105
+ className: "css-opacity-0",
24106
+ ref: contentRef,
24107
+ children
24108
+ }
24109
+ )
24110
+ ]
24111
+ },
24112
+ key
24113
+ );
24092
24114
  };
24093
24115
  const CopyButton = forwardRef((props, ref) => {
24094
24116
  const [icon, setIcon] = useState(/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 16 }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abdellatifui/react",
3
3
  "private": false,
4
- "version": "3.2.91",
4
+ "version": "3.2.92",
5
5
  "type": "module",
6
6
  "types": "dist/nextgen.d.ts",
7
7
  "files": [