@multiplatform.one/forms 7.80.0 → 7.81.1
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/AdaptivePopup/index.cjs +2 -1
- package/dist/cjs/AdaptivePopup/index.native.js +2 -1
- package/dist/cjs/AdaptivePopup/index.native.js.map +1 -1
- package/dist/cjs/Button/index.cjs +12 -5
- package/dist/cjs/Button/index.native.js +14 -6
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/PanelHeader.cjs +3 -8
- package/dist/cjs/FloatingPanel/PanelHeader.native.js +3 -8
- package/dist/cjs/FloatingPanel/PanelHeader.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/coverRect.cjs +0 -8
- package/dist/cjs/FloatingPanel/coverRect.native.js +0 -8
- package/dist/cjs/FloatingPanel/coverRect.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/echoContext.cjs +5 -27
- package/dist/cjs/FloatingPanel/echoContext.native.js +5 -28
- package/dist/cjs/FloatingPanel/echoContext.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/index.cjs +49 -131
- package/dist/cjs/FloatingPanel/index.native.js +216 -135
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/fields/Combobox/index.cjs +3 -10
- package/dist/cjs/fields/Combobox/index.native.js +3 -10
- package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/InlineChoices.cjs +4 -8
- package/dist/cjs/fields/Select/InlineChoices.native.js +4 -8
- package/dist/cjs/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/cjs/fields/Select/index.cjs +65 -201
- package/dist/cjs/fields/Select/index.native.js +74 -209
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.cjs +2 -2
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js +2 -2
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.native.js +4 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared/CheckGlyph.cjs +40 -0
- package/dist/cjs/shared/CheckGlyph.native.js +44 -0
- package/dist/cjs/shared/CheckGlyph.native.js.map +1 -0
- package/dist/cjs/shared/checkedOnField.cjs +104 -0
- package/dist/cjs/shared/checkedOnField.native.js +117 -0
- package/dist/cjs/shared/checkedOnField.native.js.map +1 -0
- package/dist/cjs/shared/floatingList.cjs +12 -5
- package/dist/cjs/shared/floatingList.native.js +15 -7
- package/dist/cjs/shared/floatingList.native.js.map +1 -1
- package/dist/esm/AdaptivePopup/index.mjs +3 -2
- package/dist/esm/AdaptivePopup/index.mjs.map +1 -1
- package/dist/esm/AdaptivePopup/index.native.js +3 -2
- package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
- package/dist/esm/Button/index.mjs +12 -5
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +14 -6
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/PanelHeader.mjs +3 -8
- package/dist/esm/FloatingPanel/PanelHeader.mjs.map +1 -1
- package/dist/esm/FloatingPanel/PanelHeader.native.js +3 -8
- package/dist/esm/FloatingPanel/PanelHeader.native.js.map +1 -1
- package/dist/esm/FloatingPanel/coverRect.mjs +1 -8
- package/dist/esm/FloatingPanel/coverRect.mjs.map +1 -1
- package/dist/esm/FloatingPanel/coverRect.native.js +1 -8
- package/dist/esm/FloatingPanel/coverRect.native.js.map +1 -1
- package/dist/esm/FloatingPanel/echoContext.mjs +4 -24
- package/dist/esm/FloatingPanel/echoContext.mjs.map +1 -1
- package/dist/esm/FloatingPanel/echoContext.native.js +4 -25
- package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -1
- package/dist/esm/FloatingPanel/index.mjs +53 -135
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +180 -99
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.mjs +4 -11
- package/dist/esm/fields/Combobox/index.mjs.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js +4 -11
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/Select/InlineChoices.mjs +2 -6
- package/dist/esm/fields/Select/InlineChoices.mjs.map +1 -1
- package/dist/esm/fields/Select/InlineChoices.native.js +2 -6
- package/dist/esm/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/esm/fields/Select/index.mjs +68 -204
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +77 -212
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs +3 -3
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js +3 -3
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/esm/index.mjs +3 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +3 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/shared/CheckGlyph.mjs +15 -0
- package/dist/esm/shared/CheckGlyph.mjs.map +1 -0
- package/dist/esm/shared/CheckGlyph.native.js +16 -0
- package/dist/esm/shared/CheckGlyph.native.js.map +1 -0
- package/dist/esm/shared/checkedOnField.mjs +76 -0
- package/dist/esm/shared/checkedOnField.mjs.map +1 -0
- package/dist/esm/shared/checkedOnField.native.js +86 -0
- package/dist/esm/shared/checkedOnField.native.js.map +1 -0
- package/dist/esm/shared/floatingList.mjs +9 -5
- package/dist/esm/shared/floatingList.mjs.map +1 -1
- package/dist/esm/shared/floatingList.native.js +12 -7
- package/dist/esm/shared/floatingList.native.js.map +1 -1
- package/dist/jsx/AdaptivePopup/index.mjs +3 -2
- package/dist/jsx/AdaptivePopup/index.mjs.map +1 -1
- package/dist/jsx/AdaptivePopup/index.native.js +2 -1
- package/dist/jsx/AdaptivePopup/index.native.js.map +1 -1
- package/dist/jsx/Button/index.mjs +12 -5
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +14 -6
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/PanelHeader.mjs +3 -8
- package/dist/jsx/FloatingPanel/PanelHeader.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/PanelHeader.native.js +3 -8
- package/dist/jsx/FloatingPanel/PanelHeader.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/coverRect.mjs +1 -8
- package/dist/jsx/FloatingPanel/coverRect.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/coverRect.native.js +0 -8
- package/dist/jsx/FloatingPanel/coverRect.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/echoContext.mjs +4 -24
- package/dist/jsx/FloatingPanel/echoContext.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/echoContext.native.js +5 -28
- package/dist/jsx/FloatingPanel/echoContext.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/index.mjs +53 -135
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +216 -135
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/fields/Combobox/index.mjs +4 -11
- package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
- package/dist/jsx/fields/Combobox/index.native.js +3 -10
- package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/InlineChoices.mjs +2 -6
- package/dist/jsx/fields/Select/InlineChoices.mjs.map +1 -1
- package/dist/jsx/fields/Select/InlineChoices.native.js +4 -8
- package/dist/jsx/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/jsx/fields/Select/index.mjs +68 -204
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +74 -209
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs +3 -3
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js +2 -2
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/jsx/index.js +3 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +3 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +4 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared/CheckGlyph.mjs +15 -0
- package/dist/jsx/shared/CheckGlyph.mjs.map +1 -0
- package/dist/jsx/shared/CheckGlyph.native.js +44 -0
- package/dist/jsx/shared/CheckGlyph.native.js.map +1 -0
- package/dist/jsx/shared/checkedOnField.mjs +76 -0
- package/dist/jsx/shared/checkedOnField.mjs.map +1 -0
- package/dist/jsx/shared/checkedOnField.native.js +117 -0
- package/dist/jsx/shared/checkedOnField.native.js.map +1 -0
- package/dist/jsx/shared/floatingList.mjs +9 -5
- package/dist/jsx/shared/floatingList.mjs.map +1 -1
- package/dist/jsx/shared/floatingList.native.js +15 -7
- package/dist/jsx/shared/floatingList.native.js.map +1 -1
- package/package.json +8 -8
- package/src/AdaptivePopup/index.tsx +6 -3
- package/src/Button/Button.iconButton.spec.tsx +39 -0
- package/src/Button/index.tsx +20 -8
- package/src/FloatingPanel/FloatingPanel.iconCover.spec.tsx +279 -0
- package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +78 -69
- package/src/FloatingPanel/FloatingPanel.seamlessCover.spec.tsx +12 -0
- package/src/FloatingPanel/PanelHeader.tsx +4 -12
- package/src/FloatingPanel/coverRect.ts +2 -15
- package/src/FloatingPanel/echoContext.ts +6 -40
- package/src/FloatingPanel/index.native.tsx +209 -144
- package/src/FloatingPanel/index.tsx +71 -187
- package/src/FloatingPanel/pointAnchor.spec.ts +1 -1
- package/src/FloatingPanel/pointAnchor.ts +4 -4
- package/src/FloatingPanel/sheetGrabber.spec.tsx +53 -0
- package/src/fields/Combobox/index.tsx +4 -9
- package/src/fields/Select/InlineChoices.tsx +2 -2
- package/src/fields/Select/Select.containingBlock.spec.tsx +131 -130
- package/src/fields/Select/Select.popUp.native.spec.tsx +276 -0
- package/src/fields/Select/Select.stories.tsx +26 -0
- package/src/fields/Select/index.tsx +84 -255
- package/src/fields/nativeDateTime/OsDateTimeSheet.tsx +3 -3
- package/src/index.ts +2 -1
- package/src/shared/CheckGlyph.tsx +12 -0
- package/src/shared/checkedOnField.ts +116 -0
- package/src/shared/floatingList.spec.tsx +154 -1
- package/src/shared/floatingList.tsx +18 -9
- package/types/AdaptivePopup/index.d.ts.map +1 -1
- package/types/Button/index.d.ts.map +1 -1
- package/types/FloatingPanel/PanelHeader.d.ts +1 -6
- package/types/FloatingPanel/PanelHeader.d.ts.map +1 -1
- package/types/FloatingPanel/coverRect.d.ts +2 -11
- package/types/FloatingPanel/coverRect.d.ts.map +1 -1
- package/types/FloatingPanel/echoContext.d.ts +5 -22
- package/types/FloatingPanel/echoContext.d.ts.map +1 -1
- package/types/FloatingPanel/index.d.ts +22 -9
- package/types/FloatingPanel/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.native.d.ts +8 -1
- package/types/FloatingPanel/index.native.d.ts.map +1 -1
- package/types/FloatingPanel/pointAnchor.d.ts +4 -4
- package/types/fields/Combobox/index.d.ts.map +1 -1
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/shared/CheckGlyph.d.ts +10 -0
- package/types/shared/CheckGlyph.d.ts.map +1 -0
- package/types/shared/checkedOnField.d.ts +54 -0
- package/types/shared/checkedOnField.d.ts.map +1 -0
- package/types/shared/floatingList.d.ts +5 -2
- package/types/shared/floatingList.d.ts.map +1 -1
- package/dist/cjs/FloatingPanel/iconEcho.cjs +0 -106
- package/dist/cjs/FloatingPanel/iconEcho.native.js +0 -116
- package/dist/cjs/FloatingPanel/iconEcho.native.js.map +0 -1
- package/dist/esm/FloatingPanel/iconEcho.mjs +0 -79
- package/dist/esm/FloatingPanel/iconEcho.mjs.map +0 -1
- package/dist/esm/FloatingPanel/iconEcho.native.js +0 -86
- package/dist/esm/FloatingPanel/iconEcho.native.js.map +0 -1
- package/dist/jsx/FloatingPanel/iconEcho.mjs +0 -79
- package/dist/jsx/FloatingPanel/iconEcho.mjs.map +0 -1
- package/dist/jsx/FloatingPanel/iconEcho.native.js +0 -116
- package/dist/jsx/FloatingPanel/iconEcho.native.js.map +0 -1
- package/src/FloatingPanel/FloatingPanel.iconEcho.spec.tsx +0 -357
- package/src/FloatingPanel/iconEcho.tsx +0 -124
- package/types/FloatingPanel/iconEcho.d.ts +0 -29
- package/types/FloatingPanel/iconEcho.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"],"sources":["../../../src/FloatingPanel/PanelHeader.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAKL,IAAAA,SAAA,GAAAC,MAAA,CAAAC,cAAA;AAFG,IAAAC,gBAAS,GAAcF,MAAA,CAAAG,wBAAkC;AAC9D,IAAAC,iBACE,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IAACC,YAAA,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IAAAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACC,IAAAC,IAAA,IAAWD,GAAA,EAAAZ,SACP,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACQ,IAAAC,WACZ,GAAAA,CAAAC,EAAa,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACbF,IAAA,WAAWA,IAAA,wBAAAA,IAAA;IAAA,KACX,IAAAG,GAAA,IAAAhB,iBAAqB,CAAAa,IAAA,GACpB,IAAG,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAEHnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAAA;EACH,OAAAE,EAAA;AAEJ","ignoreList":[]}
|
|
@@ -12,12 +12,5 @@ function pressTargetRect(trigger, min = MIN_PRESS_TARGET) {
|
|
|
12
12
|
function iconCoverRect(trigger, group) {
|
|
13
13
|
return group ?? pressTargetRect(trigger);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
if (cover.y === trigger.y && cover.height === trigger.height) return null;
|
|
17
|
-
return {
|
|
18
|
-
top: trigger.y - cover.y,
|
|
19
|
-
height: cover.height
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export { echoInCover, iconCoverRect, pressTargetRect };
|
|
15
|
+
export { iconCoverRect, pressTargetRect };
|
|
23
16
|
//# sourceMappingURL=coverRect.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MIN_PRESS_TARGET","pressTargetRect","trigger","min","width","Math","max","height","x","y","iconCoverRect","group"
|
|
1
|
+
{"version":3,"names":["MIN_PRESS_TARGET","pressTargetRect","trigger","min","width","Math","max","height","x","y","iconCoverRect","group"],"sources":["../../../src/FloatingPanel/coverRect.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,gBAAA,QAAwB;AAU1B,SAASC,gBAAgBC,OAAA,EAAsBC,GAAA,GAAMH,gBAAA,EAA+B;EACzF,MAAMI,KAAA,GAAQC,IAAA,CAAKC,GAAA,CAAIJ,OAAA,CAAQE,KAAA,EAAOD,GAAG;EACzC,MAAMI,MAAA,GAASF,IAAA,CAAKC,GAAA,CAAIJ,OAAA,CAAQK,MAAA,EAAQJ,GAAG;EAC3C,OAAO;IACLK,CAAA,EAAGN,OAAA,CAAQM,CAAA,IAAKJ,KAAA,GAAQF,OAAA,CAAQE,KAAA,IAAS;IACzCK,CAAA,EAAGP,OAAA,CAAQO,CAAA,IAAKF,MAAA,GAASL,OAAA,CAAQK,MAAA,IAAU;IAC3CH,KAAA;IACAG;EACF;AACF;AAOO,SAASG,cAAcR,OAAA,EAAsBS,KAAA,EAAwC;EAC1F,OAAOA,KAAA,IAASV,eAAA,CAAgBC,OAAO;AACzC","ignoreList":[]}
|
|
@@ -24,7 +24,6 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
24
24
|
}), mod);
|
|
25
25
|
var coverRect_exports = {};
|
|
26
26
|
__export(coverRect_exports, {
|
|
27
|
-
echoInCover: () => echoInCover,
|
|
28
27
|
iconCoverRect: () => iconCoverRect,
|
|
29
28
|
pressTargetRect: () => pressTargetRect
|
|
30
29
|
});
|
|
@@ -44,11 +43,4 @@ function pressTargetRect(trigger) {
|
|
|
44
43
|
function iconCoverRect(trigger, group) {
|
|
45
44
|
return group !== null && group !== void 0 ? group : pressTargetRect(trigger);
|
|
46
45
|
}
|
|
47
|
-
function echoInCover(trigger, cover) {
|
|
48
|
-
if (cover.y === trigger.y && cover.height === trigger.height) return null;
|
|
49
|
-
return {
|
|
50
|
-
top: trigger.y - cover.y,
|
|
51
|
-
height: cover.height
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
46
|
//# sourceMappingURL=coverRect.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"],"sources":["../../../src/FloatingPanel/coverRect.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAUF,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsC;AACpD,IAAAC,gBAAc,GAAKF,MAAI,CAAAG,wBAAkB;AACzC,IAAAC,iBAAe,GAAKJ,MAAI,CAAAK,mBAAmB;AAC3C,IAAAC,YAAO,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IACLC,QAAG,GAAQA,CAAAC,MAAK,EAAAC,GAAA,KAAQ;EAAiB,KACtC,IAAAC,IAAQ,IAAAD,GAAK,EAChBZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACA,IACFC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EACF,IAAAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IAOO,KAAS,IAAAG,GAAA,IAAAhB,iBAAoC,CAAAa,IAAwC,GAC1F,IAAO,CAAAX,YAAS,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAgB,KAAOA,GAAA,KAAAF,MAAA,EACzCnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA","ignoreList":[]}
|
|
@@ -7,29 +7,9 @@ const PanelTriggerRadiusContext = createContext(null);
|
|
|
7
7
|
function usePanelTriggerRadiusReporter() {
|
|
8
8
|
return useContext(PanelTriggerRadiusContext);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return useContext(
|
|
10
|
+
const PanelSheetContext = createContext(false);
|
|
11
|
+
function useInPanelSheet() {
|
|
12
|
+
return useContext(PanelSheetContext);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
offset,
|
|
16
|
-
width,
|
|
17
|
-
height,
|
|
18
|
-
panelWidth,
|
|
19
|
-
rtl = false
|
|
20
|
-
}) {
|
|
21
|
-
const atStart = offset + width / 2 < panelWidth / 2;
|
|
22
|
-
const start = atStart ? Math.max(0, offset + width) : 0;
|
|
23
|
-
const end = atStart ? 0 : Math.max(0, panelWidth - offset);
|
|
24
|
-
return {
|
|
25
|
-
height,
|
|
26
|
-
left: rtl ? end : start,
|
|
27
|
-
right: rtl ? start : end
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function sameEchoBox(a, b) {
|
|
31
|
-
if (a == null || b == null) return a === b;
|
|
32
|
-
return a.height === b.height && a.left === b.left && a.right === b.right;
|
|
33
|
-
}
|
|
34
|
-
export { PanelEchoContext, PanelIconEchoBoxContext, PanelTriggerRadiusContext, echoHeaderBox, sameEchoBox, useInPanelEcho, usePanelIconEchoBox, usePanelTriggerRadiusReporter };
|
|
14
|
+
export { PanelEchoContext, PanelSheetContext, PanelTriggerRadiusContext, useInPanelEcho, useInPanelSheet, usePanelTriggerRadiusReporter };
|
|
35
15
|
//# sourceMappingURL=echoContext.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","useContext","PanelEchoContext","useInPanelEcho","PanelTriggerRadiusContext","usePanelTriggerRadiusReporter","
|
|
1
|
+
{"version":3,"names":["createContext","useContext","PanelEchoContext","useInPanelEcho","PanelTriggerRadiusContext","usePanelTriggerRadiusReporter","PanelSheetContext","useInPanelSheet"],"sources":["../../../src/FloatingPanel/echoContext.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,EAAeC,UAAA,QAAkB;AAOnC,MAAMC,gBAAA,GAAmBF,aAAA,CAAc,KAAK;AAE5C,SAASG,eAAA,EAA0B;EACxC,OAAOF,UAAA,CAAWC,gBAAgB;AACpC;AAMO,MAAME,yBAAA,GAA4BJ,aAAA,CAAiD,IAAI;AAEvF,SAASK,8BAAA,EAAmE;EACjF,OAAOJ,UAAA,CAAWG,yBAAyB;AAC7C;AAOO,MAAME,iBAAA,GAAoBN,aAAA,CAAc,KAAK;AAE7C,SAASO,gBAAA,EAA2B;EACzC,OAAON,UAAA,CAAWK,iBAAiB;AACrC","ignoreList":[]}
|
|
@@ -25,12 +25,10 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
25
25
|
var echoContext_exports = {};
|
|
26
26
|
__export(echoContext_exports, {
|
|
27
27
|
PanelEchoContext: () => PanelEchoContext,
|
|
28
|
-
|
|
28
|
+
PanelSheetContext: () => PanelSheetContext,
|
|
29
29
|
PanelTriggerRadiusContext: () => PanelTriggerRadiusContext,
|
|
30
|
-
echoHeaderBox: () => echoHeaderBox,
|
|
31
|
-
sameEchoBox: () => sameEchoBox,
|
|
32
30
|
useInPanelEcho: () => useInPanelEcho,
|
|
33
|
-
|
|
31
|
+
useInPanelSheet: () => useInPanelSheet,
|
|
34
32
|
usePanelTriggerRadiusReporter: () => usePanelTriggerRadiusReporter
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(echoContext_exports);
|
|
@@ -43,29 +41,8 @@ var PanelTriggerRadiusContext = (0, import_react.createContext)(null);
|
|
|
43
41
|
function usePanelTriggerRadiusReporter() {
|
|
44
42
|
return (0, import_react.useContext)(PanelTriggerRadiusContext);
|
|
45
43
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return (0, import_react.useContext)(
|
|
49
|
-
}
|
|
50
|
-
function echoHeaderBox(param) {
|
|
51
|
-
var {
|
|
52
|
-
offset,
|
|
53
|
-
width,
|
|
54
|
-
height,
|
|
55
|
-
panelWidth,
|
|
56
|
-
rtl = false
|
|
57
|
-
} = param;
|
|
58
|
-
var atStart = offset + width / 2 < panelWidth / 2;
|
|
59
|
-
var start = atStart ? Math.max(0, offset + width) : 0;
|
|
60
|
-
var end = atStart ? 0 : Math.max(0, panelWidth - offset);
|
|
61
|
-
return {
|
|
62
|
-
height,
|
|
63
|
-
left: rtl ? end : start,
|
|
64
|
-
right: rtl ? start : end
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function sameEchoBox(a, b) {
|
|
68
|
-
if (a == null || b == null) return a === b;
|
|
69
|
-
return a.height === b.height && a.left === b.left && a.right === b.right;
|
|
44
|
+
var PanelSheetContext = (0, import_react.createContext)(false);
|
|
45
|
+
function useInPanelSheet() {
|
|
46
|
+
return (0, import_react.useContext)(PanelSheetContext);
|
|
70
47
|
}
|
|
71
48
|
//# sourceMappingURL=echoContext.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"],"sources":["../../../src/FloatingPanel/echoContext.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAOF,IAAAA,SAAM,GAAAC,MAAA,CAAAC,cAAmB;AAEzB,IAAAC,gBAAS,GAAAF,MAA0B,CAAAG,wBAAA;AACxC,IAAAC,iBAAkB,GAAAJ,MAAA,CAAAK,mBAAgB;AACpC,IAAAC,YAAA,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAMO,IAAAC,QAAM,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAEN,SAASC,IAAA,IAAAD,GAAA,EACdZ,SAAO,CAAAW,MAAW,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAyBE,UAAA;EAAA;AAC7C;AAOO,IAAAC,WAAM,GAAAA,CAAAC,EAAA,EAAAC,IAAoB,EAAAC,MAAA,EAAAC,IAAc,KAAK;EAE7C,IAAAF,IAAS,WAAAA,IAAA,KAA2B,mBAAAA,IAAA;IACzC,KAAO,IAAAG,GAAA,IAAWhB,iBAAiB,CAAAa,IAAA,GACrC,KAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,E","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { transitionProps } from "@multiplatform.one/theme";
|
|
1
|
+
import { transitionProps, overlayScrim, sheetGrabber, sheetGrabberClearance } from "@multiplatform.one/theme";
|
|
2
2
|
import { cloneElement, isValidElement, useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
-
import { OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, Surface,
|
|
3
|
+
import { OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, Surface, useResolvedKnobs, wasKeyboardFocus, ensureKeyboardModalityTracking, motionDurationMs } from "@multiplatform.one/theme";
|
|
4
4
|
import { isWeb, Sheet, Theme, View, YStack } from "tamagui";
|
|
5
5
|
import { useClick, useDismiss, useInteractions } from "@floating-ui/react";
|
|
6
6
|
import { ScrollArrow } from "../shared/floatingList.mjs";
|
|
@@ -14,9 +14,8 @@ import { OverlayStackProvider, useInsideOverlay, useOverlayZIndex } from "../sha
|
|
|
14
14
|
import { resolveCompactFace } from "./compactFace.mjs";
|
|
15
15
|
import { isNestedPanelAction } from "./nestedAction.mjs";
|
|
16
16
|
import { PanelPortal } from "./PanelPortal.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { echoInCover, iconCoverRect } from "./coverRect.mjs";
|
|
17
|
+
import { PanelSheetContext } from "./echoContext.mjs";
|
|
18
|
+
import { iconCoverRect } from "./coverRect.mjs";
|
|
20
19
|
import { groupSurfaceOf, paintedTriggerBox } from "./paintedBox.mjs";
|
|
21
20
|
import { contextMenuPoint, placeOverTrigger, pointOpensUp, pointPanelLeft, referenceCornerPoint } from "./pointAnchor.mjs";
|
|
22
21
|
import { floatingPanelActionProps, isNestedPanelAction as isNestedPanelAction2 } from "./nestedAction.mjs";
|
|
@@ -125,7 +124,6 @@ function TriggerEchoRow({
|
|
|
125
124
|
const stretched = grown > rect.width;
|
|
126
125
|
row.style.width = `${stretched ? grown : rect.width}px`;
|
|
127
126
|
row.style.height = `${rect.height}px`;
|
|
128
|
-
const rtl = isRtl(source2);
|
|
129
127
|
row.style.alignSelf = "flex-start";
|
|
130
128
|
const frameStyle = row.parentElement ? getComputedStyle(row.parentElement) : null;
|
|
131
129
|
row.style.position = "sticky";
|
|
@@ -133,8 +131,8 @@ function TriggerEchoRow({
|
|
|
133
131
|
row.style.top = row.style.marginTop;
|
|
134
132
|
row.style.zIndex = "1";
|
|
135
133
|
row.style.backgroundColor = frameStyle?.backgroundColor ?? "";
|
|
136
|
-
row.style.marginLeft =
|
|
137
|
-
row.style.marginRight =
|
|
134
|
+
row.style.marginLeft = `${-(parseFloat(frameStyle?.borderLeftWidth || "0") || 0)}px`;
|
|
135
|
+
row.style.marginRight = `${-(parseFloat(frameStyle?.borderRightWidth || "0") || 0)}px`;
|
|
138
136
|
const snapshot = children == null ? source2.cloneNode(true) : visualRef.current;
|
|
139
137
|
if (!snapshot) return;
|
|
140
138
|
const sourceFields = source2.querySelectorAll("input, textarea");
|
|
@@ -218,71 +216,6 @@ function placeEchoOverTrigger(panelElement, geometry, {
|
|
|
218
216
|
}
|
|
219
217
|
}
|
|
220
218
|
}
|
|
221
|
-
function IconEchoRow({
|
|
222
|
-
children
|
|
223
|
-
}) {
|
|
224
|
-
return /* @__PURE__ */jsx(View, {
|
|
225
|
-
"data-fp-icon-echo": "",
|
|
226
|
-
flexShrink: 0,
|
|
227
|
-
alignSelf: "stretch",
|
|
228
|
-
pointerEvents: "box-none",
|
|
229
|
-
style: {
|
|
230
|
-
order: -1,
|
|
231
|
-
position: "sticky",
|
|
232
|
-
zIndex: 1
|
|
233
|
-
},
|
|
234
|
-
children: /* @__PURE__ */jsx(View, {
|
|
235
|
-
"data-fp-icon-echo-box": "",
|
|
236
|
-
alignItems: "flex-start",
|
|
237
|
-
justifyContent: "flex-start",
|
|
238
|
-
children
|
|
239
|
-
})
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
function placeIconEcho(panelElement, {
|
|
243
|
-
offset,
|
|
244
|
-
width,
|
|
245
|
-
height,
|
|
246
|
-
up,
|
|
247
|
-
overlay,
|
|
248
|
-
group = null
|
|
249
|
-
}) {
|
|
250
|
-
const row = panelElement.querySelector("[data-fp-icon-echo]");
|
|
251
|
-
const box = row?.querySelector("[data-fp-icon-echo-box]");
|
|
252
|
-
if (!row || !box) return;
|
|
253
|
-
const frame = getComputedStyle(panelElement);
|
|
254
|
-
const border = side => parseFloat(frame[`border${side}Width`] || "0") || 0;
|
|
255
|
-
const rtl = panelElement.dir === "rtl";
|
|
256
|
-
row.style.order = up ? "1" : "-1";
|
|
257
|
-
row.style.height = `${height}px`;
|
|
258
|
-
row.style.backgroundColor = overlay ? "transparent" : frame.backgroundColor;
|
|
259
|
-
if (up) {
|
|
260
|
-
row.style.top = "";
|
|
261
|
-
row.style.marginTop = "";
|
|
262
|
-
row.style.marginBottom = `${-border("Bottom")}px`;
|
|
263
|
-
row.style.bottom = row.style.marginBottom;
|
|
264
|
-
} else {
|
|
265
|
-
row.style.bottom = "";
|
|
266
|
-
row.style.marginTop = `${-border("Top")}px`;
|
|
267
|
-
row.style.marginBottom = overlay ? `${-(height - border("Top"))}px` : "";
|
|
268
|
-
row.style.top = row.style.marginTop;
|
|
269
|
-
}
|
|
270
|
-
row.setAttribute("data-fp-icon-echo", overlay ? "overlay" : "band");
|
|
271
|
-
if (group) {
|
|
272
|
-
row.style.height = `${group.height}px`;
|
|
273
|
-
if (!up && overlay) row.style.marginBottom = `${-(group.height - border("Top"))}px`;
|
|
274
|
-
}
|
|
275
|
-
row.style.marginLeft = `${-border("Left")}px`;
|
|
276
|
-
row.style.marginRight = `${-border("Right")}px`;
|
|
277
|
-
box.style.width = `${width}px`;
|
|
278
|
-
box.style.height = `${height}px`;
|
|
279
|
-
box.style.marginLeft = rtl ? "" : `${offset}px`;
|
|
280
|
-
box.style.marginRight = rtl ? `${offset}px` : "";
|
|
281
|
-
box.style.alignSelf = "flex-start";
|
|
282
|
-
box.style.marginTop = group ? `${group.top}px` : "";
|
|
283
|
-
box.style.position = "relative";
|
|
284
|
-
box.style.zIndex = "1";
|
|
285
|
-
}
|
|
286
219
|
function layoutParentOf(element) {
|
|
287
220
|
let parent = element?.parentElement ?? null;
|
|
288
221
|
while (parent && getComputedStyle(parent).display === "contents") parent = parent.parentElement;
|
|
@@ -433,14 +366,17 @@ function FloatingPanelSheet({
|
|
|
433
366
|
...transitionProps(slideMotion),
|
|
434
367
|
children: [/* @__PURE__ */jsx(Sheet.Overlay, {
|
|
435
368
|
...transitionProps(scrimMotion),
|
|
436
|
-
backgroundColor:
|
|
369
|
+
backgroundColor: overlayScrim,
|
|
437
370
|
enterStyle: {
|
|
438
371
|
opacity: 0
|
|
439
372
|
},
|
|
440
373
|
exitStyle: {
|
|
441
374
|
opacity: 0
|
|
442
375
|
}
|
|
443
|
-
}), /* @__PURE__ */jsx(Sheet.Handle, {
|
|
376
|
+
}), /* @__PURE__ */jsx(Sheet.Handle, {
|
|
377
|
+
...sheetGrabber,
|
|
378
|
+
"aria-label": "Resize"
|
|
379
|
+
}), /* @__PURE__ */jsx(Sheet.Frame, {
|
|
444
380
|
"data-testid": "floating-panel-sheet",
|
|
445
381
|
...{
|
|
446
382
|
ref: sheetFrameRef,
|
|
@@ -449,16 +385,34 @@ function FloatingPanelSheet({
|
|
|
449
385
|
...knobProps.elevatedSurface,
|
|
450
386
|
borderBottomLeftRadius: 0,
|
|
451
387
|
borderBottomRightRadius: 0,
|
|
388
|
+
borderLeftWidth: 0,
|
|
389
|
+
borderRightWidth: 0,
|
|
390
|
+
borderBottomWidth: 0,
|
|
452
391
|
...panelChromeFocus,
|
|
453
392
|
padding: framePadding,
|
|
393
|
+
...(contentPadding === "none" ? {
|
|
394
|
+
paddingTop: sheetGrabberClearance
|
|
395
|
+
} : null),
|
|
454
396
|
gap: frameGap,
|
|
455
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */jsx(OverlayStackProvider, {
|
|
456
398
|
zIndex: sheetZIndex,
|
|
457
|
-
children:
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
399
|
+
children: /* @__PURE__ */jsxs(PanelSheetContext.Provider, {
|
|
400
|
+
value: true,
|
|
401
|
+
children: [header, scrollable ? /* @__PURE__ */jsx(Sheet.ScrollView, {
|
|
402
|
+
flex: header ? 1 : void 0,
|
|
403
|
+
...scrollViewProps,
|
|
404
|
+
children
|
|
405
|
+
}) : children, contentPadding === "none" ?
|
|
406
|
+
// An edge-to-edge list clears the home indicator (HIG); a padded
|
|
407
|
+
// frame's own padding already does.
|
|
408
|
+
/* @__PURE__ */
|
|
409
|
+
jsx(View, {
|
|
410
|
+
style: {
|
|
411
|
+
height: "env(safe-area-inset-bottom)"
|
|
412
|
+
},
|
|
413
|
+
flexShrink: 0
|
|
414
|
+
}) : null]
|
|
415
|
+
})
|
|
462
416
|
})
|
|
463
417
|
})]
|
|
464
418
|
})]
|
|
@@ -480,7 +434,7 @@ function FloatingPanelWeb({
|
|
|
480
434
|
cover = true,
|
|
481
435
|
triggerEcho = true,
|
|
482
436
|
coverAlign = "start",
|
|
483
|
-
|
|
437
|
+
iconCover,
|
|
484
438
|
triggerRow,
|
|
485
439
|
anchorRect,
|
|
486
440
|
clampCollisions = false,
|
|
@@ -491,10 +445,8 @@ function FloatingPanelWeb({
|
|
|
491
445
|
const isFill = sizing === "fill";
|
|
492
446
|
const isContextMenu = openOn === "contextmenu";
|
|
493
447
|
const pointMenu = isContextMenu && sheetProps.anchorMode !== "cover-trigger";
|
|
494
|
-
const
|
|
495
|
-
const
|
|
496
|
-
const iconEchoUpRef = useRef(false);
|
|
497
|
-
const [echoBox, setEchoBox] = useState(null);
|
|
448
|
+
const coversIcon = cover && !pointMenu && iconCover === true;
|
|
449
|
+
const openedUpRef = useRef(false);
|
|
498
450
|
const overlayStyleRef = useRef(null);
|
|
499
451
|
const pinnedTopRef = useRef(0);
|
|
500
452
|
const pinnedHeightRef = useRef(0);
|
|
@@ -582,19 +534,19 @@ function FloatingPanelWeb({
|
|
|
582
534
|
const viewportRight = viewportLeft + (viewport?.width ?? (document.documentElement.clientWidth || window.innerWidth));
|
|
583
535
|
const viewportBottom = viewportTop + (viewport?.height ?? window.innerHeight);
|
|
584
536
|
dropdownElement.style.left = `${viewportLeft - containingBlock.left}px`;
|
|
585
|
-
const groupSurface =
|
|
537
|
+
const groupSurface = coversIcon ? groupSurfaceOf(trig) : null;
|
|
586
538
|
const groupBox = groupSurface?.getBoundingClientRect() ?? null;
|
|
587
|
-
if (
|
|
539
|
+
if (coversIcon) dropdownElement.style.minWidth = groupBox ? `${groupBox.width}px` : "";
|
|
588
540
|
const layoutStyle = getComputedStyle(dropdownElement);
|
|
589
541
|
const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
|
|
590
542
|
const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
|
|
591
543
|
const width = Math.max(layoutWidth || dropdownElement.offsetWidth, measured.width);
|
|
592
544
|
const startLeft = rtl ? measured.right - width : measured.left;
|
|
593
545
|
const endLeft = rtl ? measured.left : measured.right - width;
|
|
594
|
-
const
|
|
546
|
+
const iconCover2 = coverAlign === "auto";
|
|
595
547
|
const startFree = rtl ? startLeft >= viewportLeft + panelViewportPadding : startLeft + width <= viewportRight - panelViewportPadding;
|
|
596
548
|
const endFree = rtl ? endLeft + width <= viewportRight - panelViewportPadding : endLeft >= viewportLeft + panelViewportPadding;
|
|
597
|
-
let alignEnd =
|
|
549
|
+
let alignEnd = iconCover2 && !startFree && endFree;
|
|
598
550
|
const slides = slidesAlongScreen(panelWidth);
|
|
599
551
|
const margins = {
|
|
600
552
|
boundsLeft: viewportLeft + panelViewportPadding,
|
|
@@ -621,7 +573,7 @@ function FloatingPanelWeb({
|
|
|
621
573
|
const bodyStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
622
574
|
const bodyPadding = (parseFloat(bodyStyle?.paddingTop || "0") || 0) + (parseFloat(bodyStyle?.paddingBottom || "0") || 0);
|
|
623
575
|
const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
|
|
624
|
-
const painted =
|
|
576
|
+
const painted = coversIcon ? paintedTriggerBox(trig, measured) : null;
|
|
625
577
|
const coverRect = painted ? iconCoverRect({
|
|
626
578
|
x: painted.left,
|
|
627
579
|
y: measured.top,
|
|
@@ -633,16 +585,10 @@ function FloatingPanelWeb({
|
|
|
633
585
|
width: groupBox.width,
|
|
634
586
|
height: groupBox.height
|
|
635
587
|
} : null) : null;
|
|
636
|
-
const echoCover = coverRect ? echoInCover({
|
|
637
|
-
x: measured.left,
|
|
638
|
-
y: measured.top,
|
|
639
|
-
width: measured.width,
|
|
640
|
-
height: measured.height
|
|
641
|
-
}, coverRect) : null;
|
|
642
588
|
let placedTop = measured.top;
|
|
643
589
|
let placedLeft = left;
|
|
644
590
|
let placedMaxHeight = null;
|
|
645
|
-
|
|
591
|
+
openedUpRef.current = false;
|
|
646
592
|
if (coverRect && measured.width > 0 && measured.height > 0) {
|
|
647
593
|
const placed = placeOverTrigger({
|
|
648
594
|
trigger: coverRect,
|
|
@@ -662,9 +608,9 @@ function FloatingPanelWeb({
|
|
|
662
608
|
if (!slides) placedLeft = placed.left;
|
|
663
609
|
alignEnd = placed.end;
|
|
664
610
|
placedMaxHeight = placed.maxHeight;
|
|
665
|
-
|
|
611
|
+
openedUpRef.current = placed.up;
|
|
666
612
|
} else if (measured.width > 0 && measured.height > 0 && (!slides && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - panelViewportPadding)) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - panelViewportPadding)) {
|
|
667
|
-
if (!clampCollisions && !
|
|
613
|
+
if (!clampCollisions && !iconCover2) {
|
|
668
614
|
dropdownElement.style.visibility = "hidden";
|
|
669
615
|
setCollisionSheet(true);
|
|
670
616
|
return;
|
|
@@ -692,30 +638,7 @@ function FloatingPanelWeb({
|
|
|
692
638
|
alignEnd = placed.end;
|
|
693
639
|
}
|
|
694
640
|
coverAlignEndRef.current = alignEnd;
|
|
695
|
-
|
|
696
|
-
triggerLeft: measured.left,
|
|
697
|
-
triggerRight: measured.right,
|
|
698
|
-
panelLeft: placedLeft,
|
|
699
|
-
panelWidth: width,
|
|
700
|
-
rtl
|
|
701
|
-
});
|
|
702
|
-
const echoOverlays = iconEcho != null && iconEchoOverlays(iconEcho, iconEchoUpRef.current);
|
|
703
|
-
const nextEchoBox = showIconEcho && echoOverlays ? echoHeaderBox({
|
|
704
|
-
offset: echoStart,
|
|
705
|
-
width: measured.width,
|
|
706
|
-
height: echoCover?.height ?? measured.height,
|
|
707
|
-
panelWidth: width,
|
|
708
|
-
rtl
|
|
709
|
-
}) : null;
|
|
710
|
-
setEchoBox(previous => sameEchoBox(previous, nextEchoBox) ? previous : nextEchoBox);
|
|
711
|
-
placeIconEcho(dropdownElement, {
|
|
712
|
-
offset: echoStart,
|
|
713
|
-
width: measured.width,
|
|
714
|
-
height: measured.height,
|
|
715
|
-
up: iconEchoUpRef.current,
|
|
716
|
-
overlay: echoOverlays,
|
|
717
|
-
group: echoCover
|
|
718
|
-
});
|
|
641
|
+
placedLeft = Math.round(placedLeft);
|
|
719
642
|
placeEchoOverTrigger(dropdownElement, {
|
|
720
643
|
triggerLeft: measured.left,
|
|
721
644
|
triggerRight: measured.right,
|
|
@@ -732,7 +655,7 @@ function FloatingPanelWeb({
|
|
|
732
655
|
dropdownElement.style.left = `${cssLeft2}px`;
|
|
733
656
|
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
734
657
|
dropdownElement.dir = rtl ? "rtl" : "ltr";
|
|
735
|
-
dropdownElement.style.transformOrigin = `${
|
|
658
|
+
dropdownElement.style.transformOrigin = `${openedUpRef.current ? "bottom" : "top"} ${rtl !== alignEnd ? "right" : "left"}`;
|
|
736
659
|
dropdownElement.style.visibility = "visible";
|
|
737
660
|
overlayStyleRef.current = {
|
|
738
661
|
top: top2,
|
|
@@ -863,7 +786,7 @@ function FloatingPanelWeb({
|
|
|
863
786
|
});
|
|
864
787
|
}
|
|
865
788
|
});
|
|
866
|
-
}, [isFill, isContextMenu, pointMenu,
|
|
789
|
+
}, [isFill, isContextMenu, pointMenu, coversIcon, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
867
790
|
repositionFnRef.current = repositionOverlay;
|
|
868
791
|
const click = useClick(panel.context, {
|
|
869
792
|
event: "mousedown",
|
|
@@ -1040,7 +963,7 @@ function FloatingPanelWeb({
|
|
|
1040
963
|
// then positions against this box and is clipped by its scroll.
|
|
1041
964
|
transform: panel.visible ? "none" : "scale(0.96)",
|
|
1042
965
|
transition: webTransition,
|
|
1043
|
-
transformOrigin: cover && !pointMenu ? `${
|
|
966
|
+
transformOrigin: cover && !pointMenu ? `${openedUpRef.current ? "bottom" : "top"} ${isRtl(panel.triggerRef.current) !== coverAlignEndRef.current ? "right" : "left"}` : panelTransformOrigin(pointPlacementRef.current ? `${pointPlacementRef.current.dropup ? "top" : "bottom"}-${pointPlacementRef.current.alignEnd ? "end" : "start"}` : panel.placement)
|
|
1044
967
|
},
|
|
1045
968
|
onScroll: handleScroll,
|
|
1046
969
|
onTransitionEnd: event => {
|
|
@@ -1057,7 +980,7 @@ function FloatingPanelWeb({
|
|
|
1057
980
|
borderRadius: panel.dropdownRadius,
|
|
1058
981
|
paddingVertical: 0,
|
|
1059
982
|
paddingBottom: panel.coverCornerInset || 0,
|
|
1060
|
-
children: [pointMenu || !cover || !triggerEcho ||
|
|
983
|
+
children: [pointMenu || !cover || !triggerEcho || coversIcon ? null : /* @__PURE__ */jsx(TriggerEchoRow, {
|
|
1061
984
|
sourceRef: panel.triggerRef,
|
|
1062
985
|
source: trigger,
|
|
1063
986
|
anchorRect,
|
|
@@ -1074,19 +997,14 @@ function FloatingPanelWeb({
|
|
|
1074
997
|
...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
|
|
1075
998
|
children: /* @__PURE__ */jsx(OverlayStackProvider, {
|
|
1076
999
|
zIndex: panelZIndex,
|
|
1077
|
-
children
|
|
1078
|
-
value: echoBox,
|
|
1079
|
-
children
|
|
1080
|
-
})
|
|
1000
|
+
children
|
|
1081
1001
|
})
|
|
1082
1002
|
}), /* @__PURE__ */jsx(ScrollArrow, {
|
|
1083
1003
|
direction: "down",
|
|
1084
1004
|
scrollRef: panel.refs.floating,
|
|
1085
1005
|
visible: panel.arrowDown,
|
|
1086
1006
|
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
1087
|
-
})
|
|
1088
|
-
children: iconEchoElement(trigger, iconEcho, () => onOpenChange(false), triggerSurface)
|
|
1089
|
-
}) : null]
|
|
1007
|
+
})]
|
|
1090
1008
|
})
|
|
1091
1009
|
})
|
|
1092
1010
|
})]
|