alif-ui 2.0.0-alpha.15 → 2.0.0-alpha.16

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.
@@ -1,13 +1,19 @@
1
- import "react";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import t from "react-dom";
1
+ "use client";
2
+ import { useEffect as e, useState as t } from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import r from "react-dom";
4
5
  //#region src/lib/components/Portal/Portal.tsx
5
- var n = ({ children: n, placement: r, isFixed: i = !1 }) => r ? t.createPortal(/* @__PURE__ */ e("div", {
6
- style: {
7
- position: i ? "fixed" : "absolute",
8
- ...r
9
- },
10
- children: n
11
- }), document.body) : t.createPortal(n, document.body);
6
+ var i = ({ children: i, placement: a, isFixed: o = !1 }) => {
7
+ let [s, c] = t(!1);
8
+ return e(() => {
9
+ c(!0);
10
+ }, []), s ? a ? r.createPortal(/* @__PURE__ */ n("div", {
11
+ style: {
12
+ position: o ? "fixed" : "absolute",
13
+ ...a
14
+ },
15
+ children: i
16
+ }), document.body) : r.createPortal(i, document.body) : null;
17
+ };
12
18
  //#endregion
13
- export { n as Portal };
19
+ export { i as Portal };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { calculateSliderValue as e } from "../Slider.utils.js";
2
3
  import { SliderBase as t } from "../SliderBase/SliderBase.js";
3
4
  import { Thumb as n } from "../Thumb/Thumb.js";
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { calculateSliderValue as e } from "../Slider.utils.js";
2
3
  import { getTrackStyle as t } from "./Slider.utils.js";
3
4
  import { SliderBase as n } from "../SliderBase/SliderBase.js";
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { PortalProps } from './Portal.types';
3
- export declare const Portal: ({ children, placement, isFixed, }: PortalProps) => React.ReactPortal;
3
+ export declare const Portal: ({ children, placement, isFixed, }: PortalProps) => React.ReactPortal | null;
4
4
  //# sourceMappingURL=Portal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,MAAM,GAAI,mCAIpB,WAAW,sBAgBb,CAAC"}
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,MAAM,GAAI,mCAIpB,WAAW,6BA0Bb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RangeSlider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Slider/RangeSlider/RangeSlider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,eAAO,MAAM,WAAW,GAAI,oEASzB,gBAAgB,4CA0ElB,CAAC"}
1
+ {"version":3,"file":"RangeSlider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Slider/RangeSlider/RangeSlider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,eAAO,MAAM,WAAW,GAAI,oEASzB,gBAAgB,4CA0ElB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Slider/Slider/Slider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,eAAO,MAAM,MAAM,GAAI,oEASpB,WAAW,4CAgCb,CAAC"}
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Slider/Slider/Slider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,eAAO,MAAM,MAAM,GAAI,oEASpB,WAAW,4CAgCb,CAAC"}
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "ISC",
23
23
  "private": false,
24
- "version": "2.0.0-alpha.15",
24
+ "version": "2.0.0-alpha.16",
25
25
  "type": "module",
26
26
  "files": [
27
27
  "dist"