@tamagui/popper 1.1.7 → 1.1.9
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/cjs/Popper.js +77 -41
- package/dist/cjs/Popper.js.map +3 -3
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/Popper.js +78 -44
- package/dist/esm/Popper.js.map +3 -3
- package/dist/esm/index.js +0 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/jsx/Popper.js +82 -29
- package/dist/jsx/Popper.js.map +2 -2
- package/dist/jsx/index.js +0 -4
- package/dist/jsx/index.js.map +2 -2
- package/package.json +9 -8
- package/src/Popper.tsx +53 -17
- package/src/index.tsx +0 -1
- package/types/Popper.d.ts +13 -14
- package/types/index.d.ts +0 -1
- package/dist/cjs/floating.js +0 -19
- package/dist/cjs/floating.js.map +0 -7
- package/dist/cjs/floating.native.js +0 -19
- package/dist/cjs/floating.native.js.map +0 -7
- package/dist/cjs/useFloating.js +0 -44
- package/dist/cjs/useFloating.js.map +0 -7
- package/dist/esm/floating.js +0 -2
- package/dist/esm/floating.js.map +0 -7
- package/dist/esm/floating.native.js +0 -2
- package/dist/esm/floating.native.js.map +0 -7
- package/dist/esm/useFloating.js +0 -13
- package/dist/esm/useFloating.js.map +0 -7
- package/dist/jsx/floating.js +0 -2
- package/dist/jsx/floating.js.map +0 -7
- package/dist/jsx/floating.native.js +0 -2
- package/dist/jsx/floating.native.js.map +0 -7
- package/dist/jsx/useFloating.js +0 -12
- package/dist/jsx/useFloating.js.map +0 -7
- package/src/floating.native.tsx +0 -1
- package/src/floating.tsx +0 -1
- package/src/useFloating.tsx +0 -22
- package/types/floating.d.ts +0 -2
- package/types/floating.native.d.ts +0 -2
- package/types/useFloating.d.ts +0 -19
package/dist/cjs/useFloating.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var useFloating_exports = {};
|
|
26
|
-
__export(useFloating_exports, {
|
|
27
|
-
FloatingOverrideContext: () => FloatingOverrideContext,
|
|
28
|
-
useFloating: () => useFloating
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(useFloating_exports);
|
|
31
|
-
var import_react = require("react");
|
|
32
|
-
var Floating = __toESM(require("./floating"));
|
|
33
|
-
const FloatingOverrideContext = (0, import_react.createContext)(null);
|
|
34
|
-
const useFloating = (props) => {
|
|
35
|
-
var _a;
|
|
36
|
-
const context = (0, import_react.useContext)(FloatingOverrideContext);
|
|
37
|
-
return (_a = context || Floating.useFloating) == null ? void 0 : _a(props);
|
|
38
|
-
};
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
FloatingOverrideContext,
|
|
42
|
-
useFloating
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=useFloating.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useFloating.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext, useContext } from 'react'\n\nimport * as Floating from './floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating\n\ntype UseFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps): UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,eAA0B;AAcnB,MAAM,8BAA0B,4BAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AAlB3E;AAmBE,QAAM,cAAU,yBAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/floating.js
DELETED
package/dist/esm/floating.js.map
DELETED
package/dist/esm/useFloating.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
import * as Floating from "./floating";
|
|
3
|
-
const FloatingOverrideContext = createContext(null);
|
|
4
|
-
const useFloating = (props) => {
|
|
5
|
-
var _a;
|
|
6
|
-
const context = useContext(FloatingOverrideContext);
|
|
7
|
-
return (_a = context || Floating.useFloating) == null ? void 0 : _a(props);
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
FloatingOverrideContext,
|
|
11
|
-
useFloating
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=useFloating.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useFloating.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext, useContext } from 'react'\n\nimport * as Floating from './floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating\n\ntype UseFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps): UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAcnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AAlB3E;AAmBE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/jsx/floating.js
DELETED
package/dist/jsx/floating.js.map
DELETED
package/dist/jsx/useFloating.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
import * as Floating from "./floating";
|
|
3
|
-
const FloatingOverrideContext = createContext(null);
|
|
4
|
-
const useFloating = (props) => {
|
|
5
|
-
const context = useContext(FloatingOverrideContext);
|
|
6
|
-
return (context || Floating.useFloating)?.(props);
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
FloatingOverrideContext,
|
|
10
|
-
useFloating
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=useFloating.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useFloating.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext, useContext } from 'react'\n\nimport * as Floating from './floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating\n\ntype UseFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps): UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAcnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AACzE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,WAAW,SAAS,eAAe,KAAK;AAClD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/floating.native.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@floating-ui/react-native'
|
package/src/floating.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@floating-ui/react-dom'
|
package/src/useFloating.tsx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react'
|
|
2
|
-
|
|
3
|
-
import * as Floating from './floating'
|
|
4
|
-
|
|
5
|
-
export type UseFloatingFn = typeof Floating.useFloating
|
|
6
|
-
|
|
7
|
-
type UseFloatingProps = UseFloatingFn extends (props: infer Props) => any
|
|
8
|
-
? Props
|
|
9
|
-
: never
|
|
10
|
-
|
|
11
|
-
export type UseFloatingReturn = Floating.UseFloatingReturn & {
|
|
12
|
-
context?: any
|
|
13
|
-
getFloatingProps?: (props: { ref: any; [key: string]: any }) => any
|
|
14
|
-
getReferenceProps?: (props: { ref: any; [key: string]: any }) => any
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)
|
|
18
|
-
|
|
19
|
-
export const useFloating = (props: UseFloatingProps): UseFloatingReturn => {
|
|
20
|
-
const context = useContext(FloatingOverrideContext)
|
|
21
|
-
return (context || Floating.useFloating)?.(props)
|
|
22
|
-
}
|
package/types/floating.d.ts
DELETED
package/types/useFloating.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as Floating from './floating';
|
|
3
|
-
export type UseFloatingFn = typeof Floating.useFloating;
|
|
4
|
-
type UseFloatingProps = UseFloatingFn extends (props: infer Props) => any ? Props : never;
|
|
5
|
-
export type UseFloatingReturn = Floating.UseFloatingReturn & {
|
|
6
|
-
context?: any;
|
|
7
|
-
getFloatingProps?: (props: {
|
|
8
|
-
ref: any;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}) => any;
|
|
11
|
-
getReferenceProps?: (props: {
|
|
12
|
-
ref: any;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}) => any;
|
|
15
|
-
};
|
|
16
|
-
export declare const FloatingOverrideContext: import("react").Context<typeof Floating.useFloating | null>;
|
|
17
|
-
export declare const useFloating: (props: UseFloatingProps) => UseFloatingReturn;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=useFloating.d.ts.map
|