@sheinx/hooks 3.9.8-beta.1 → 3.9.8-beta.11
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/cjs/common/use-position-style/index.d.ts +1 -1
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/components/use-popup/index.d.ts +1 -0
- package/cjs/components/use-popup/index.d.ts.map +1 -1
- package/cjs/components/use-popup/index.js +7 -0
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.d.ts.map +1 -1
- package/cjs/utils/index.js +12 -0
- package/cjs/utils/rtl.d.ts +5 -0
- package/cjs/utils/rtl.d.ts.map +1 -0
- package/cjs/utils/rtl.js +25 -0
- package/esm/common/use-position-style/index.d.ts +1 -1
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/components/use-popup/index.d.ts +1 -0
- package/esm/components/use-popup/index.d.ts.map +1 -1
- package/esm/components/use-popup/index.js +2 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +2 -1
- package/esm/utils/rtl.d.ts +5 -0
- package/esm/utils/rtl.d.ts.map +1 -0
- package/esm/utils/rtl.js +19 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type HorizontalPosition = 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top' | 'left' | 'right';
|
|
3
3
|
export type VerticalPosition = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'top' | 'bottom';
|
|
4
|
-
type PositionType = HorizontalPosition | VerticalPosition | 'cover';
|
|
4
|
+
export type PositionType = HorizontalPosition | VerticalPosition | 'cover';
|
|
5
5
|
export interface PositionStyleConfig {
|
|
6
6
|
position: PositionType | undefined;
|
|
7
7
|
absolute: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings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AC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,GAAG,gBAAgB,KAAK,IAAI,CAAC;IAErE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;CACpD;AAsBD,eAAO,MAAM,gBAAgB,WAAY,mBAAmB;;CAoW3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -10,6 +10,12 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
return _usePopup.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
+
Object.defineProperty(exports, "popupContext", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _popupContext.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
13
19
|
Object.defineProperty(exports, "usePopup", {
|
|
14
20
|
enumerable: true,
|
|
15
21
|
get: function get() {
|
|
@@ -17,4 +23,5 @@ Object.defineProperty(exports, "usePopup", {
|
|
|
17
23
|
}
|
|
18
24
|
});
|
|
19
25
|
var _usePopup = _interopRequireDefault(require("./use-popup"));
|
|
26
|
+
var _popupContext = _interopRequireDefault(require("./popup-context"));
|
|
20
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/cjs/utils/index.d.ts
CHANGED
package/cjs/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
|
package/cjs/utils/index.js
CHANGED
|
@@ -306,6 +306,18 @@ Object.keys(_cleanProps).forEach(function (key) {
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
});
|
|
309
|
+
var _rtl = require("./rtl");
|
|
310
|
+
Object.keys(_rtl).forEach(function (key) {
|
|
311
|
+
if (key === "default" || key === "__esModule") return;
|
|
312
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
313
|
+
if (key in exports && exports[key] === _rtl[key]) return;
|
|
314
|
+
Object.defineProperty(exports, key, {
|
|
315
|
+
enumerable: true,
|
|
316
|
+
get: function get() {
|
|
317
|
+
return _rtl[key];
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
});
|
|
309
321
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
310
322
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
311
323
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PositionType } from '../components/use-popup/use-popup.type';
|
|
2
|
+
type OppositePositionType = PositionType | 'auto';
|
|
3
|
+
export declare const getRTLPosition: (position: OppositePositionType | undefined, isRTL: boolean) => OppositePositionType | undefined;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=rtl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtl.d.ts","sourceRoot":"","sources":["rtl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAE3E,KAAK,oBAAoB,GAAG,YAAY,GAAG,MAAM,CAAC;AAkBlD,eAAO,MAAM,cAAc,aACf,oBAAoB,GAAG,SAAS,SACnC,OAAO,KACb,oBAAoB,GAAG,SAIzB,CAAC"}
|
package/cjs/utils/rtl.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRTLPosition = void 0;
|
|
7
|
+
var oppositeMap = {
|
|
8
|
+
left: 'right',
|
|
9
|
+
right: 'left',
|
|
10
|
+
'left-top': 'right-top',
|
|
11
|
+
'left-bottom': 'right-bottom',
|
|
12
|
+
'right-top': 'left-top',
|
|
13
|
+
'right-bottom': 'left-bottom',
|
|
14
|
+
'top-left': 'top-right',
|
|
15
|
+
'top-right': 'top-left',
|
|
16
|
+
'bottom-left': 'bottom-right',
|
|
17
|
+
'bottom-right': 'bottom-left',
|
|
18
|
+
top: 'top',
|
|
19
|
+
bottom: 'bottom',
|
|
20
|
+
auto: 'auto'
|
|
21
|
+
};
|
|
22
|
+
var getRTLPosition = exports.getRTLPosition = function getRTLPosition(position, isRTL) {
|
|
23
|
+
if (!isRTL || !position) return position;
|
|
24
|
+
return oppositeMap[position] || position;
|
|
25
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type HorizontalPosition = 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top' | 'left' | 'right';
|
|
3
3
|
export type VerticalPosition = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'top' | 'bottom';
|
|
4
|
-
type PositionType = HorizontalPosition | VerticalPosition | 'cover';
|
|
4
|
+
export type PositionType = HorizontalPosition | VerticalPosition | 'cover';
|
|
5
5
|
export interface PositionStyleConfig {
|
|
6
6
|
position: PositionType | undefined;
|
|
7
7
|
absolute: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAWpE,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,CAAC;AAYb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAWpE,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cA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1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/esm/utils/index.d.ts
CHANGED
package/esm/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
|
package/esm/utils/index.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PositionType } from '../components/use-popup/use-popup.type';
|
|
2
|
+
type OppositePositionType = PositionType | 'auto';
|
|
3
|
+
export declare const getRTLPosition: (position: OppositePositionType | undefined, isRTL: boolean) => OppositePositionType | undefined;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=rtl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtl.d.ts","sourceRoot":"","sources":["rtl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAE3E,KAAK,oBAAoB,GAAG,YAAY,GAAG,MAAM,CAAC;AAkBlD,eAAO,MAAM,cAAc,aACf,oBAAoB,GAAG,SAAS,SACnC,OAAO,KACb,oBAAoB,GAAG,SAIzB,CAAC"}
|
package/esm/utils/rtl.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var oppositeMap = {
|
|
2
|
+
left: 'right',
|
|
3
|
+
right: 'left',
|
|
4
|
+
'left-top': 'right-top',
|
|
5
|
+
'left-bottom': 'right-bottom',
|
|
6
|
+
'right-top': 'left-top',
|
|
7
|
+
'right-bottom': 'left-bottom',
|
|
8
|
+
'top-left': 'top-right',
|
|
9
|
+
'top-right': 'top-left',
|
|
10
|
+
'bottom-left': 'bottom-right',
|
|
11
|
+
'bottom-right': 'bottom-left',
|
|
12
|
+
top: 'top',
|
|
13
|
+
bottom: 'bottom',
|
|
14
|
+
auto: 'auto'
|
|
15
|
+
};
|
|
16
|
+
export var getRTLPosition = function getRTLPosition(position, isRTL) {
|
|
17
|
+
if (!isRTL || !position) return position;
|
|
18
|
+
return oppositeMap[position] || position;
|
|
19
|
+
};
|