@multiplatform.one/forms 7.70.0 → 7.72.0
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/Button/index.cjs +16 -0
- package/dist/cjs/Button/index.native.js +16 -0
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/echoContext.cjs +39 -0
- package/dist/cjs/FloatingPanel/echoContext.native.js +42 -0
- package/dist/cjs/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/index.cjs +212 -80
- package/dist/cjs/FloatingPanel/index.native.js +92 -17
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/panelWidth.cjs +92 -0
- package/dist/cjs/FloatingPanel/panelWidth.native.js +99 -0
- package/dist/cjs/FloatingPanel/panelWidth.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/pointAnchor.cjs +15 -5
- package/dist/cjs/FloatingPanel/pointAnchor.native.js +15 -5
- package/dist/cjs/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/useFloatingPanel.cjs +58 -4
- package/dist/cjs/FloatingPanel/useFloatingPanel.native.js +69 -4
- package/dist/cjs/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/cjs/InputParts/index.cjs +20 -1
- package/dist/cjs/InputParts/index.native.js +22 -2
- package/dist/cjs/InputParts/index.native.js.map +1 -1
- package/dist/cjs/Wheel/NativeWheel.native.js +1 -1
- package/dist/cjs/Wheel/NativeWheel.native.js.map +1 -1
- package/dist/cjs/Wheel/index.cjs +2 -1
- package/dist/cjs/Wheel/index.native.js +4 -1
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/Wheel/wheelShared.cjs +6 -1
- package/dist/cjs/Wheel/wheelShared.native.js +7 -1
- package/dist/cjs/Wheel/wheelShared.native.js.map +1 -1
- package/dist/cjs/fields/Combobox/index.cjs +1 -0
- package/dist/cjs/fields/Combobox/index.native.js +1 -0
- package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.cjs +6 -30
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.native.js +11 -34
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/catalog.cjs +2 -28
- package/dist/cjs/fields/DatePicker/catalog.native.js +2 -30
- package/dist/cjs/fields/DatePicker/catalog.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/index.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/parts.cjs +11 -20
- package/dist/cjs/fields/DatePicker/parts.native.js +13 -22
- package/dist/cjs/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/cjs/fields/SearchInput/index.cjs +23 -1
- package/dist/cjs/fields/SearchInput/index.native.js +23 -1
- package/dist/cjs/fields/SearchInput/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/index.cjs +65 -44
- package/dist/cjs/fields/Select/index.native.js +69 -47
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.cjs +3 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.native.js +3 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/cjs/fields/TimePicker/catalog.cjs +4 -25
- package/dist/cjs/fields/TimePicker/catalog.native.js +7 -29
- package/dist/cjs/fields/TimePicker/catalog.native.js.map +1 -1
- package/dist/cjs/fields/TimePicker/index.native.js.map +1 -1
- package/dist/cjs/fields/TimePicker/parts.cjs +8 -21
- package/dist/cjs/fields/TimePicker/parts.native.js +8 -21
- package/dist/cjs/fields/TimePicker/parts.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared/floatingList.cjs +13 -4
- package/dist/cjs/shared/floatingList.native.js +15 -4
- package/dist/cjs/shared/floatingList.native.js.map +1 -1
- package/dist/esm/Button/index.mjs +17 -1
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +17 -1
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/echoContext.mjs +11 -0
- package/dist/esm/FloatingPanel/echoContext.mjs.map +1 -0
- package/dist/esm/FloatingPanel/echoContext.native.js +11 -0
- package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/esm/FloatingPanel/index.mjs +213 -83
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +92 -19
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/panelWidth.mjs +63 -0
- package/dist/esm/FloatingPanel/panelWidth.mjs.map +1 -0
- package/dist/esm/FloatingPanel/panelWidth.native.js +67 -0
- package/dist/esm/FloatingPanel/panelWidth.native.js.map +1 -0
- package/dist/esm/FloatingPanel/pointAnchor.mjs +15 -5
- package/dist/esm/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/esm/FloatingPanel/pointAnchor.native.js +15 -5
- package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.mjs +58 -5
- package/dist/esm/FloatingPanel/useFloatingPanel.mjs.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js +69 -5
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/esm/InputParts/index.mjs +21 -2
- package/dist/esm/InputParts/index.mjs.map +1 -1
- package/dist/esm/InputParts/index.native.js +23 -3
- package/dist/esm/InputParts/index.native.js.map +1 -1
- package/dist/esm/Wheel/NativeWheel.native.js +1 -1
- package/dist/esm/Wheel/NativeWheel.native.js.map +1 -1
- package/dist/esm/Wheel/index.mjs +2 -1
- package/dist/esm/Wheel/index.mjs.map +1 -1
- package/dist/esm/Wheel/index.native.js +4 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wheel/wheelShared.mjs +6 -1
- package/dist/esm/Wheel/wheelShared.mjs.map +1 -1
- package/dist/esm/Wheel/wheelShared.native.js +7 -1
- package/dist/esm/Wheel/wheelShared.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.mjs +1 -0
- package/dist/esm/fields/Combobox/index.mjs.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js +1 -0
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.mjs +6 -30
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js +11 -34
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/catalog.mjs +2 -28
- package/dist/esm/fields/DatePicker/catalog.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/catalog.native.js +2 -30
- package/dist/esm/fields/DatePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/parts.mjs +11 -20
- package/dist/esm/fields/DatePicker/parts.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/parts.native.js +13 -22
- package/dist/esm/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/SearchInput/index.mjs +25 -3
- package/dist/esm/fields/SearchInput/index.mjs.map +1 -1
- package/dist/esm/fields/SearchInput/index.native.js +25 -3
- package/dist/esm/fields/SearchInput/index.native.js.map +1 -1
- package/dist/esm/fields/Select/index.mjs +66 -45
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +70 -48
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/Select/shouldInlineChoices.mjs +3 -1
- package/dist/esm/fields/Select/shouldInlineChoices.mjs.map +1 -1
- package/dist/esm/fields/Select/shouldInlineChoices.native.js +3 -1
- package/dist/esm/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/catalog.mjs +4 -25
- package/dist/esm/fields/TimePicker/catalog.mjs.map +1 -1
- package/dist/esm/fields/TimePicker/catalog.native.js +7 -29
- package/dist/esm/fields/TimePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/index.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/parts.mjs +8 -21
- package/dist/esm/fields/TimePicker/parts.mjs.map +1 -1
- package/dist/esm/fields/TimePicker/parts.native.js +8 -21
- package/dist/esm/fields/TimePicker/parts.native.js.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/shared/floatingList.mjs +14 -5
- package/dist/esm/shared/floatingList.mjs.map +1 -1
- package/dist/esm/shared/floatingList.native.js +16 -5
- package/dist/esm/shared/floatingList.native.js.map +1 -1
- package/dist/jsx/Button/index.mjs +17 -1
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +16 -0
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/echoContext.mjs +11 -0
- package/dist/jsx/FloatingPanel/echoContext.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/echoContext.native.js +42 -0
- package/dist/jsx/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/index.mjs +213 -83
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +92 -17
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/panelWidth.mjs +63 -0
- package/dist/jsx/FloatingPanel/panelWidth.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/panelWidth.native.js +99 -0
- package/dist/jsx/FloatingPanel/panelWidth.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/pointAnchor.mjs +15 -5
- package/dist/jsx/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/pointAnchor.native.js +15 -5
- package/dist/jsx/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/useFloatingPanel.mjs +58 -5
- package/dist/jsx/FloatingPanel/useFloatingPanel.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/useFloatingPanel.native.js +69 -4
- package/dist/jsx/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/jsx/InputParts/index.mjs +21 -2
- package/dist/jsx/InputParts/index.mjs.map +1 -1
- package/dist/jsx/InputParts/index.native.js +22 -2
- package/dist/jsx/InputParts/index.native.js.map +1 -1
- package/dist/jsx/Wheel/NativeWheel.native.js +1 -1
- package/dist/jsx/Wheel/NativeWheel.native.js.map +1 -1
- package/dist/jsx/Wheel/index.mjs +2 -1
- package/dist/jsx/Wheel/index.mjs.map +1 -1
- package/dist/jsx/Wheel/index.native.js +4 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wheel/wheelShared.mjs +6 -1
- package/dist/jsx/Wheel/wheelShared.mjs.map +1 -1
- package/dist/jsx/Wheel/wheelShared.native.js +7 -1
- package/dist/jsx/Wheel/wheelShared.native.js.map +1 -1
- package/dist/jsx/fields/Combobox/index.mjs +1 -0
- package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
- package/dist/jsx/fields/Combobox/index.native.js +1 -0
- package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.mjs +6 -30
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.native.js +11 -34
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/catalog.mjs +2 -28
- package/dist/jsx/fields/DatePicker/catalog.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/catalog.native.js +2 -30
- package/dist/jsx/fields/DatePicker/catalog.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/index.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/parts.mjs +11 -20
- package/dist/jsx/fields/DatePicker/parts.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/parts.native.js +13 -22
- package/dist/jsx/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/jsx/fields/SearchInput/index.mjs +25 -3
- package/dist/jsx/fields/SearchInput/index.mjs.map +1 -1
- package/dist/jsx/fields/SearchInput/index.native.js +23 -1
- package/dist/jsx/fields/SearchInput/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/index.mjs +66 -45
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +69 -47
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.mjs +3 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.mjs.map +1 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.native.js +3 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/jsx/fields/TimePicker/catalog.mjs +4 -25
- package/dist/jsx/fields/TimePicker/catalog.mjs.map +1 -1
- package/dist/jsx/fields/TimePicker/catalog.native.js +7 -29
- package/dist/jsx/fields/TimePicker/catalog.native.js.map +1 -1
- package/dist/jsx/fields/TimePicker/index.native.js.map +1 -1
- package/dist/jsx/fields/TimePicker/parts.mjs +8 -21
- package/dist/jsx/fields/TimePicker/parts.mjs.map +1 -1
- package/dist/jsx/fields/TimePicker/parts.native.js +8 -21
- package/dist/jsx/fields/TimePicker/parts.native.js.map +1 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared/floatingList.mjs +14 -5
- package/dist/jsx/shared/floatingList.mjs.map +1 -1
- package/dist/jsx/shared/floatingList.native.js +15 -4
- package/dist/jsx/shared/floatingList.native.js.map +1 -1
- package/package.json +8 -8
- package/src/Button/index.tsx +22 -0
- package/src/FloatingPanel/FloatingPanel.echoStretch.spec.tsx +67 -0
- package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +193 -2
- package/src/FloatingPanel/FloatingPanel.seamlessCover.spec.tsx +237 -0
- package/src/FloatingPanel/echoContext.ts +22 -0
- package/src/FloatingPanel/index.native.tsx +106 -9
- package/src/FloatingPanel/index.tsx +310 -102
- package/src/FloatingPanel/panelWidth.spec.ts +158 -0
- package/src/FloatingPanel/panelWidth.ts +122 -0
- package/src/FloatingPanel/panelWidthContract.spec.ts +10 -10
- package/src/FloatingPanel/pointAnchor.spec.ts +64 -2
- package/src/FloatingPanel/pointAnchor.ts +28 -3
- package/src/FloatingPanel/useFloatingPanel.spec.tsx +124 -4
- package/src/FloatingPanel/useFloatingPanel.ts +106 -33
- package/src/InputParts/index.tsx +30 -1
- package/src/Wheel/NativeWheel.native.tsx +1 -1
- package/src/Wheel/Wheel.spec.tsx +9 -0
- package/src/Wheel/index.tsx +12 -3
- package/src/Wheel/wheelShared.ts +6 -2
- package/src/fields/Combobox/index.tsx +1 -0
- package/src/fields/DatePicker/DatePicker.stories.tsx +3 -3
- package/src/fields/DatePicker/DatetimePicker.catalog.tsx +17 -45
- package/src/fields/DatePicker/DatetimePicker.native.tsx +3 -0
- package/src/fields/DatePicker/catalog.tsx +8 -39
- package/src/fields/DatePicker/index.native.tsx +3 -0
- package/src/fields/DatePicker/parts.tsx +13 -23
- package/src/fields/DatePicker/seamlessCover.spec.tsx +180 -0
- package/src/fields/DatePicker/touchWeb.spec.tsx +109 -167
- package/src/fields/SearchInput/SearchInput.spec.tsx +40 -0
- package/src/fields/SearchInput/index.tsx +47 -2
- package/src/fields/Select/Select.containingBlock.spec.tsx +191 -0
- package/src/fields/Select/Select.stories.tsx +43 -0
- package/src/fields/Select/index.tsx +109 -45
- package/src/fields/Select/shouldInlineChoices.spec.ts +13 -0
- package/src/fields/Select/shouldInlineChoices.ts +6 -0
- package/src/fields/TimePicker/catalog.tsx +12 -33
- package/src/fields/TimePicker/index.native.tsx +2 -0
- package/src/fields/TimePicker/parts.tsx +6 -20
- package/src/index.ts +1 -0
- package/src/shared/floatingList.tsx +21 -5
- package/types/Button/index.d.ts.map +1 -1
- package/types/FloatingPanel/echoContext.d.ts +14 -0
- package/types/FloatingPanel/echoContext.d.ts.map +1 -0
- package/types/FloatingPanel/index.d.ts +59 -0
- package/types/FloatingPanel/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.native.d.ts +9 -1
- package/types/FloatingPanel/index.native.d.ts.map +1 -1
- package/types/FloatingPanel/panelWidth.d.ts +71 -0
- package/types/FloatingPanel/panelWidth.d.ts.map +1 -0
- package/types/FloatingPanel/pointAnchor.d.ts +8 -1
- package/types/FloatingPanel/pointAnchor.d.ts.map +1 -1
- package/types/FloatingPanel/useFloatingPanel.d.ts +33 -2
- package/types/FloatingPanel/useFloatingPanel.d.ts.map +1 -1
- package/types/InputParts/index.d.ts +5 -1
- package/types/InputParts/index.d.ts.map +1 -1
- package/types/Wheel/index.d.ts.map +1 -1
- package/types/Wheel/wheelShared.d.ts +2 -1
- package/types/Wheel/wheelShared.d.ts.map +1 -1
- package/types/fields/Combobox/index.d.ts.map +1 -1
- package/types/fields/DatePicker/DatetimePicker.catalog.d.ts +6 -0
- package/types/fields/DatePicker/DatetimePicker.catalog.d.ts.map +1 -1
- package/types/fields/DatePicker/DatetimePicker.native.d.ts +3 -0
- package/types/fields/DatePicker/DatetimePicker.native.d.ts.map +1 -1
- package/types/fields/DatePicker/catalog.d.ts +6 -0
- package/types/fields/DatePicker/catalog.d.ts.map +1 -1
- package/types/fields/DatePicker/index.native.d.ts +3 -0
- package/types/fields/DatePicker/index.native.d.ts.map +1 -1
- package/types/fields/DatePicker/parts.d.ts +5 -7
- package/types/fields/DatePicker/parts.d.ts.map +1 -1
- package/types/fields/Input/index.d.ts +3 -1
- package/types/fields/Input/index.d.ts.map +1 -1
- package/types/fields/SearchInput/index.d.ts +11 -0
- package/types/fields/SearchInput/index.d.ts.map +1 -1
- package/types/fields/Select/index.d.ts +8 -1
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/fields/Select/shouldInlineChoices.d.ts +5 -1
- package/types/fields/Select/shouldInlineChoices.d.ts.map +1 -1
- package/types/fields/TimePicker/catalog.d.ts +7 -1
- package/types/fields/TimePicker/catalog.d.ts.map +1 -1
- package/types/fields/TimePicker/index.native.d.ts +2 -0
- package/types/fields/TimePicker/index.native.d.ts.map +1 -1
- package/types/fields/TimePicker/parts.d.ts +1 -3
- package/types/fields/TimePicker/parts.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/shared/floatingList.d.ts +5 -1
- package/types/shared/floatingList.d.ts.map +1 -1
- package/dist/cjs/shared/touchWebPicker.cjs +0 -136
- package/dist/cjs/shared/touchWebPicker.native.js +0 -154
- package/dist/cjs/shared/touchWebPicker.native.js.map +0 -1
- package/dist/esm/shared/touchWebPicker.mjs +0 -105
- package/dist/esm/shared/touchWebPicker.mjs.map +0 -1
- package/dist/esm/shared/touchWebPicker.native.js +0 -120
- package/dist/esm/shared/touchWebPicker.native.js.map +0 -1
- package/dist/jsx/shared/touchWebPicker.mjs +0 -105
- package/dist/jsx/shared/touchWebPicker.mjs.map +0 -1
- package/dist/jsx/shared/touchWebPicker.native.js +0 -154
- package/dist/jsx/shared/touchWebPicker.native.js.map +0 -1
- package/src/shared/touchWebPicker.spec.ts +0 -98
- package/src/shared/touchWebPicker.tsx +0 -158
- package/types/shared/touchWebPicker.d.ts +0 -40
- package/types/shared/touchWebPicker.d.ts.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var echoContext_exports = {};
|
|
26
|
+
__export(echoContext_exports, {
|
|
27
|
+
PanelEchoContext: () => PanelEchoContext,
|
|
28
|
+
PanelTriggerRadiusContext: () => PanelTriggerRadiusContext,
|
|
29
|
+
useInPanelEcho: () => useInPanelEcho,
|
|
30
|
+
usePanelTriggerRadiusReporter: () => usePanelTriggerRadiusReporter
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(echoContext_exports);
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
var PanelEchoContext = (0, import_react.createContext)(false);
|
|
35
|
+
function useInPanelEcho() {
|
|
36
|
+
return (0, import_react.useContext)(PanelEchoContext);
|
|
37
|
+
}
|
|
38
|
+
var PanelTriggerRadiusContext = (0, import_react.createContext)(null);
|
|
39
|
+
function usePanelTriggerRadiusReporter() {
|
|
40
|
+
return (0, import_react.useContext)(PanelTriggerRadiusContext);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=echoContext.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable"],"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","ignoreList":[]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { transitionProps } from "@multiplatform.one/theme";
|
|
2
2
|
import { cloneElement, isValidElement, useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, Surface, useResolvedKnobs, wasKeyboardFocus, ensureKeyboardModalityTracking, motionDurationMs } from "@multiplatform.one/theme";
|
|
4
|
-
import { isWeb, Sheet, View, YStack } from "tamagui";
|
|
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";
|
|
7
7
|
import { TrailingActionOverlay, TriggerWithTrailingAction } from "./trailingAction.mjs";
|
|
8
8
|
import { useReturnFocusOnClose, useSheetModalFocus } from "../shared/focusManagement.mjs";
|
|
9
9
|
import { useSheetEscapeDismiss } from "../shared/useSheetEscapeDismiss.mjs";
|
|
10
|
-
import { useFloatingPanel, panelViewportPadding } from "./useFloatingPanel.mjs";
|
|
10
|
+
import { useFloatingPanel, panelViewportPadding, paintedCornerBox } from "./useFloatingPanel.mjs";
|
|
11
|
+
import { fixedContainingBlockOrigin } from "./containingBlock.mjs";
|
|
12
|
+
import { echoOffset, panelLeftForWidth, screenBounds, slidesAlongScreen } from "./panelWidth.mjs";
|
|
11
13
|
import { OverlayStackProvider, useInsideOverlay, useOverlayZIndex } from "../shared/overlayStack.mjs";
|
|
12
14
|
import { resolveCompactFace } from "./compactFace.mjs";
|
|
13
15
|
import { isNestedPanelAction } from "./nestedAction.mjs";
|
|
14
16
|
import { PanelPortal } from "./PanelPortal.mjs";
|
|
15
|
-
import { fixedContainingBlockOrigin } from "./containingBlock.mjs";
|
|
16
17
|
import { contextMenuPoint, placeOverTrigger, pointOpensUp, pointPanelLeft, referenceCornerPoint } from "./pointAnchor.mjs";
|
|
17
18
|
import { floatingPanelActionProps, isNestedPanelAction as isNestedPanelAction2 } from "./nestedAction.mjs";
|
|
18
19
|
import { useFloatingPanel as useFloatingPanel2, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding as panelViewportPadding2, panelAnchorOffset, resolvePanelWidthMode } from "./useFloatingPanel.mjs";
|
|
@@ -70,12 +71,40 @@ function panelTransformOrigin(placement) {
|
|
|
70
71
|
return `${originY} ${originX}`;
|
|
71
72
|
}
|
|
72
73
|
const ECHO_STRIPPED_ATTRIBUTES = ["id", "for", "name", "data-testid", "aria-label", "aria-controls", "aria-labelledby", "aria-describedby", "aria-activedescendant"];
|
|
74
|
+
function childPath(root, node) {
|
|
75
|
+
const path = [];
|
|
76
|
+
for (let at = node; at && at !== root; at = at.parentElement) {
|
|
77
|
+
const parent = at.parentElement;
|
|
78
|
+
if (!parent) return null;
|
|
79
|
+
path.unshift(Array.prototype.indexOf.call(parent.children, at));
|
|
80
|
+
}
|
|
81
|
+
return path;
|
|
82
|
+
}
|
|
83
|
+
function followPath(root, path) {
|
|
84
|
+
let at = root;
|
|
85
|
+
for (const index of path) at = at?.children[index];
|
|
86
|
+
return at ?? null;
|
|
87
|
+
}
|
|
88
|
+
function dropEchoChrome(source, snapshot) {
|
|
89
|
+
const painted = paintedCornerBox(source);
|
|
90
|
+
const path = painted ? childPath(source, painted) : null;
|
|
91
|
+
const frame = path ? followPath(snapshot, path) : null;
|
|
92
|
+
if (!frame) return;
|
|
93
|
+
frame.style.setProperty("border-color", "transparent", "important");
|
|
94
|
+
frame.style.setProperty("background-color", "transparent", "important");
|
|
95
|
+
frame.style.setProperty("background-image", "none", "important");
|
|
96
|
+
frame.style.setProperty("box-shadow", "none", "important");
|
|
97
|
+
frame.style.setProperty("outline", "none", "important");
|
|
98
|
+
frame.setAttribute("data-fp-echo-frame", "");
|
|
99
|
+
}
|
|
73
100
|
function TriggerEchoRow({
|
|
74
101
|
sourceRef,
|
|
75
102
|
onPress,
|
|
76
103
|
children,
|
|
77
104
|
anchorRect,
|
|
78
|
-
source
|
|
105
|
+
source,
|
|
106
|
+
presentational = false,
|
|
107
|
+
edge = "top"
|
|
79
108
|
}) {
|
|
80
109
|
const rowRef = useRef(null);
|
|
81
110
|
const visualRef = useRef(null);
|
|
@@ -87,17 +116,31 @@ function TriggerEchoRow({
|
|
|
87
116
|
const control = source2.matches(PANEL_FOCUSABLE) ? source2 : source2.querySelector(PANEL_FOCUSABLE);
|
|
88
117
|
const labelledBy = control?.getAttribute("aria-labelledby");
|
|
89
118
|
const label = control?.getAttribute("aria-label") || labelledBy?.split(/\s+/).map(id => document.getElementById(id)?.textContent || "").join(" ") || control?.textContent || source2.textContent || "";
|
|
90
|
-
row.setAttribute("aria-label", label);
|
|
119
|
+
if (!presentational) row.setAttribute("aria-label", label);
|
|
91
120
|
const rect = anchorRect ?? source2.getBoundingClientRect();
|
|
92
|
-
row.
|
|
121
|
+
const grown = Number(row.getAttribute("data-fp-echo-stretched")) || 0;
|
|
122
|
+
const stretched = grown > rect.width;
|
|
123
|
+
row.style.width = `${stretched ? grown : rect.width}px`;
|
|
93
124
|
row.style.height = `${rect.height}px`;
|
|
94
125
|
const rtl = isRtl(source2);
|
|
95
126
|
row.style.alignSelf = "flex-start";
|
|
96
127
|
const frameStyle = row.parentElement ? getComputedStyle(row.parentElement) : null;
|
|
97
|
-
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
98
128
|
row.style.position = "sticky";
|
|
99
|
-
|
|
129
|
+
if (edge === "bottom") {
|
|
130
|
+
row.style.order = "1";
|
|
131
|
+
row.style.marginTop = "";
|
|
132
|
+
row.style.top = "";
|
|
133
|
+
row.style.marginBottom = `${-(parseFloat(frameStyle?.borderBottomWidth || "0") || 0)}px`;
|
|
134
|
+
row.style.bottom = row.style.marginBottom;
|
|
135
|
+
} else {
|
|
136
|
+
row.style.order = "";
|
|
137
|
+
row.style.marginBottom = "";
|
|
138
|
+
row.style.bottom = "";
|
|
139
|
+
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
140
|
+
row.style.top = row.style.marginTop;
|
|
141
|
+
}
|
|
100
142
|
row.style.zIndex = "1";
|
|
143
|
+
row.style.backgroundColor = frameStyle?.backgroundColor ?? "";
|
|
101
144
|
row.style.marginLeft = rtl ? "" : `${-(parseFloat(frameStyle?.borderLeftWidth || "0") || 0)}px`;
|
|
102
145
|
row.style.marginRight = rtl ? `${-(parseFloat(frameStyle?.borderRightWidth || "0") || 0)}px` : "";
|
|
103
146
|
const snapshot = children == null ? source2.cloneNode(true) : visualRef.current;
|
|
@@ -114,8 +157,11 @@ function TriggerEchoRow({
|
|
|
114
157
|
node.setAttribute("tabindex", "-1");
|
|
115
158
|
}
|
|
116
159
|
}
|
|
160
|
+
if (children == null) dropEchoChrome(source2, snapshot);
|
|
117
161
|
snapshot.setAttribute("inert", "");
|
|
118
162
|
snapshot.setAttribute("aria-hidden", "true");
|
|
163
|
+
snapshot.style.width = stretched ? "100%" : "";
|
|
164
|
+
snapshot.style.maxWidth = stretched ? "none" : "";
|
|
119
165
|
if (children == null) visualRef.current?.replaceChildren(snapshot);
|
|
120
166
|
};
|
|
121
167
|
sync();
|
|
@@ -123,12 +169,16 @@ function TriggerEchoRow({
|
|
|
123
169
|
const observer = new ResizeObserver(sync);
|
|
124
170
|
observer.observe(source2);
|
|
125
171
|
return () => observer.disconnect();
|
|
126
|
-
}, [sourceRef, source, children, anchorRect]);
|
|
172
|
+
}, [sourceRef, source, children, anchorRect, presentational, edge]);
|
|
127
173
|
return /* @__PURE__ */jsx(View, {
|
|
128
174
|
ref: rowRef,
|
|
129
175
|
"data-fp-trigger-row": "",
|
|
130
|
-
|
|
131
|
-
|
|
176
|
+
...(presentational ? {
|
|
177
|
+
"aria-hidden": true
|
|
178
|
+
} : {
|
|
179
|
+
role: "button",
|
|
180
|
+
"aria-expanded": true
|
|
181
|
+
}),
|
|
132
182
|
tabIndex: -1,
|
|
133
183
|
cursor: "pointer",
|
|
134
184
|
onPress,
|
|
@@ -144,6 +194,38 @@ function TriggerEchoRow({
|
|
|
144
194
|
})
|
|
145
195
|
});
|
|
146
196
|
}
|
|
197
|
+
const ECHO_FIELD = 'input, textarea, [role="combobox"], [aria-haspopup="listbox"]';
|
|
198
|
+
function placeEchoOverTrigger(panelElement, geometry, {
|
|
199
|
+
stretch = false
|
|
200
|
+
} = {}) {
|
|
201
|
+
const row = panelElement.querySelector("[data-fp-trigger-row]");
|
|
202
|
+
if (!row) return;
|
|
203
|
+
const offset = echoOffset(geometry);
|
|
204
|
+
const x = geometry.rtl ? -offset : offset;
|
|
205
|
+
row.style.translate = Math.abs(x) < 0.5 ? "" : `${x}px 0`;
|
|
206
|
+
const triggerWidth = geometry.triggerRight - geometry.triggerLeft;
|
|
207
|
+
const grown = geometry.panelWidth - offset;
|
|
208
|
+
const field = stretch && row.querySelector(ECHO_FIELD) != null;
|
|
209
|
+
const visual = row.firstElementChild;
|
|
210
|
+
const snapshot = visual?.firstElementChild;
|
|
211
|
+
if (field && grown > triggerWidth + 0.5) {
|
|
212
|
+
row.style.width = `${grown}px`;
|
|
213
|
+
row.setAttribute("data-fp-echo-stretched", String(grown));
|
|
214
|
+
for (const node of [visual, snapshot]) {
|
|
215
|
+
if (!node) continue;
|
|
216
|
+
node.style.width = "100%";
|
|
217
|
+
node.style.maxWidth = "none";
|
|
218
|
+
}
|
|
219
|
+
} else if (row.hasAttribute("data-fp-echo-stretched")) {
|
|
220
|
+
row.removeAttribute("data-fp-echo-stretched");
|
|
221
|
+
row.style.width = `${triggerWidth}px`;
|
|
222
|
+
for (const node of [visual, snapshot]) {
|
|
223
|
+
if (!node) continue;
|
|
224
|
+
node.style.width = "";
|
|
225
|
+
node.style.maxWidth = "";
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
147
229
|
const overlayFloatBreakpoint = OVERLAY_BREAKPOINT;
|
|
148
230
|
function subscribeViewport(listener) {
|
|
149
231
|
if (!isWeb || typeof window === "undefined") return () => {};
|
|
@@ -330,10 +412,12 @@ function FloatingPanelWeb({
|
|
|
330
412
|
sizing = "grow",
|
|
331
413
|
widthMode,
|
|
332
414
|
fitContent,
|
|
415
|
+
panelWidth,
|
|
333
416
|
contentPadding = "default",
|
|
334
417
|
openOn = "press",
|
|
335
418
|
cover = true,
|
|
336
419
|
triggerEcho = true,
|
|
420
|
+
coverAlign = "start",
|
|
337
421
|
triggerRow,
|
|
338
422
|
anchorRect,
|
|
339
423
|
clampCollisions = false,
|
|
@@ -354,6 +438,7 @@ function FloatingPanelWeb({
|
|
|
354
438
|
const contentRef = useRef(null);
|
|
355
439
|
const anchorPointRef = useRef(null);
|
|
356
440
|
const pointPlacementRef = useRef(null);
|
|
441
|
+
const coverAlignEndRef = useRef(false);
|
|
357
442
|
const repositionFnRef = useRef(null);
|
|
358
443
|
const resetPosition = () => {
|
|
359
444
|
overlayStyleRef.current = null;
|
|
@@ -375,6 +460,8 @@ function FloatingPanelWeb({
|
|
|
375
460
|
fitContent,
|
|
376
461
|
freeOverlay: isContextMenu,
|
|
377
462
|
cover,
|
|
463
|
+
panelWidth,
|
|
464
|
+
echo: cover && triggerEcho && !isContextMenu,
|
|
378
465
|
onBeforeOpen: resetPosition
|
|
379
466
|
});
|
|
380
467
|
useReturnFocusOnClose(open, skipReturnFocusRef, panel.refs.floating);
|
|
@@ -431,15 +518,42 @@ function FloatingPanelWeb({
|
|
|
431
518
|
const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
|
|
432
519
|
const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
|
|
433
520
|
const width = Math.max(layoutWidth || dropdownElement.offsetWidth, measured.width);
|
|
434
|
-
const
|
|
521
|
+
const startLeft = rtl ? measured.right - width : measured.left;
|
|
522
|
+
const endLeft = rtl ? measured.left : measured.right - width;
|
|
523
|
+
const iconCover = coverAlign === "auto";
|
|
524
|
+
const startFree = rtl ? startLeft >= viewportLeft + panelViewportPadding : startLeft + width <= viewportRight - panelViewportPadding;
|
|
525
|
+
const endFree = rtl ? endLeft + width <= viewportRight - panelViewportPadding : endLeft >= viewportLeft + panelViewportPadding;
|
|
526
|
+
let alignEnd = iconCover && !startFree && endFree;
|
|
527
|
+
const slides = slidesAlongScreen(panelWidth);
|
|
528
|
+
const margins = {
|
|
529
|
+
boundsLeft: viewportLeft + panelViewportPadding,
|
|
530
|
+
boundsRight: viewportRight - panelViewportPadding
|
|
531
|
+
};
|
|
532
|
+
const room = panelWidth === "screen" ? screenBounds({
|
|
533
|
+
triggerLeft: measured.left,
|
|
534
|
+
triggerRight: measured.right,
|
|
535
|
+
...margins,
|
|
536
|
+
rtl
|
|
537
|
+
}) : {
|
|
538
|
+
left: margins.boundsLeft,
|
|
539
|
+
right: margins.boundsRight
|
|
540
|
+
};
|
|
541
|
+
const left = slides ? panelLeftForWidth({
|
|
542
|
+
triggerLeft: measured.left,
|
|
543
|
+
triggerRight: measured.right,
|
|
544
|
+
width,
|
|
545
|
+
boundsLeft: room.left,
|
|
546
|
+
boundsRight: room.right,
|
|
547
|
+
rtl
|
|
548
|
+
}) : alignEnd ? endLeft : startLeft;
|
|
435
549
|
const firstActionHeight = contentRef.current?.querySelector(PANEL_FOCUSABLE)?.getBoundingClientRect().height || Number(panel.knobProps.menuRow.minHeight) || totalContentHeight;
|
|
436
550
|
const bodyStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
437
551
|
const bodyPadding = (parseFloat(bodyStyle?.paddingTop || "0") || 0) + (parseFloat(bodyStyle?.paddingBottom || "0") || 0);
|
|
438
552
|
const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
|
|
439
553
|
let placedTop = measured.top;
|
|
440
554
|
let placedLeft = left;
|
|
441
|
-
if (measured.width > 0 && measured.height > 0 && (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)) {
|
|
442
|
-
if (!clampCollisions) {
|
|
555
|
+
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)) {
|
|
556
|
+
if (!clampCollisions && !iconCover) {
|
|
443
557
|
dropdownElement.style.visibility = "hidden";
|
|
444
558
|
setCollisionSheet(true);
|
|
445
559
|
return;
|
|
@@ -459,11 +573,23 @@ function FloatingPanelWeb({
|
|
|
459
573
|
right: viewportRight - panelViewportPadding,
|
|
460
574
|
bottom: viewportBottom - panelViewportPadding
|
|
461
575
|
},
|
|
462
|
-
rtl
|
|
576
|
+
rtl,
|
|
577
|
+
align: coverAlign
|
|
463
578
|
});
|
|
464
579
|
placedTop = placed.top;
|
|
465
|
-
placedLeft = placed.left;
|
|
580
|
+
if (!slides) placedLeft = placed.left;
|
|
581
|
+
alignEnd = placed.end;
|
|
466
582
|
}
|
|
583
|
+
coverAlignEndRef.current = alignEnd;
|
|
584
|
+
placeEchoOverTrigger(dropdownElement, {
|
|
585
|
+
triggerLeft: measured.left,
|
|
586
|
+
triggerRight: measured.right,
|
|
587
|
+
panelLeft: placedLeft,
|
|
588
|
+
panelWidth: width,
|
|
589
|
+
rtl
|
|
590
|
+
}, {
|
|
591
|
+
stretch: panelWidth !== void 0
|
|
592
|
+
});
|
|
467
593
|
const top2 = placedTop - containingBlock.top;
|
|
468
594
|
const cssLeft2 = placedLeft - containingBlock.left;
|
|
469
595
|
const maxHeight = Math.max(0, viewportBottom - panelViewportPadding - placedTop);
|
|
@@ -471,7 +597,7 @@ function FloatingPanelWeb({
|
|
|
471
597
|
dropdownElement.style.left = `${cssLeft2}px`;
|
|
472
598
|
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
473
599
|
dropdownElement.dir = rtl ? "rtl" : "ltr";
|
|
474
|
-
dropdownElement.style.transformOrigin = rtl ? "top right" : "top left";
|
|
600
|
+
dropdownElement.style.transformOrigin = rtl !== alignEnd ? "top right" : "top left";
|
|
475
601
|
dropdownElement.style.visibility = "visible";
|
|
476
602
|
overlayStyleRef.current = {
|
|
477
603
|
top: top2,
|
|
@@ -602,7 +728,7 @@ function FloatingPanelWeb({
|
|
|
602
728
|
});
|
|
603
729
|
}
|
|
604
730
|
});
|
|
605
|
-
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
731
|
+
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
606
732
|
repositionFnRef.current = repositionOverlay;
|
|
607
733
|
const click = useClick(panel.context, {
|
|
608
734
|
event: "mousedown",
|
|
@@ -742,74 +868,78 @@ function FloatingPanelWeb({
|
|
|
742
868
|
children
|
|
743
869
|
}), panel.mounted && !collisionSheet && /* @__PURE__ */jsx(PanelPortal, {
|
|
744
870
|
anchor: panel.triggerRef.current,
|
|
745
|
-
children: /* @__PURE__ */
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
871
|
+
children: /* @__PURE__ */jsx(Theme, {
|
|
872
|
+
name: "alt1",
|
|
873
|
+
children: /* @__PURE__ */jsxs(YStack, {
|
|
874
|
+
...getFloatingProps({
|
|
875
|
+
ref: panel.refs.setFloating,
|
|
876
|
+
style: {
|
|
877
|
+
...elevatedSurfaceStyle,
|
|
878
|
+
position: panel.strategy,
|
|
879
|
+
top: overlayStyleRef.current?.top ?? panel.y ?? 0,
|
|
880
|
+
left: overlayStyleRef.current?.left ?? panel.x ?? 0,
|
|
881
|
+
scrollbarWidth: "none",
|
|
882
|
+
zIndex: panelZIndex,
|
|
883
|
+
overflow: "auto",
|
|
884
|
+
...(cover && !isContextMenu ? {
|
|
885
|
+
overflowX: "hidden"
|
|
886
|
+
} : {}),
|
|
887
|
+
...panel.floatingStyleRef.current,
|
|
888
|
+
...(overlayStyleRef.current ? {
|
|
889
|
+
maxHeight: overlayStyleRef.current.maxHeight
|
|
890
|
+
} : {}),
|
|
891
|
+
opacity: panel.visible ? 1 : 0,
|
|
892
|
+
// `none`, not scale(1): any transform makes this panel the
|
|
893
|
+
// containing block of a nested panel's `position: fixed`, which
|
|
894
|
+
// then positions against this box and is clipped by its scroll.
|
|
895
|
+
transform: panel.visible ? "none" : "scale(0.96)",
|
|
896
|
+
transition: webTransition,
|
|
897
|
+
transformOrigin: cover && !isContextMenu ? isRtl(panel.triggerRef.current) !== coverAlignEndRef.current ? "top right" : "top left" : panelTransformOrigin(pointPlacementRef.current ? `${pointPlacementRef.current.dropup ? "top" : "bottom"}-${pointPlacementRef.current.alignEnd ? "end" : "start"}` : panel.placement)
|
|
898
|
+
},
|
|
899
|
+
onScroll: handleScroll,
|
|
900
|
+
onTransitionEnd: event => {
|
|
901
|
+
if (event.target === event.currentTarget && (event.propertyName === "height" || event.propertyName === "max-height")) {
|
|
902
|
+
panel.updateArrows(event.currentTarget);
|
|
903
|
+
}
|
|
775
904
|
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
905
|
+
}),
|
|
906
|
+
"data-testid": "floating-panel-viewport",
|
|
907
|
+
"data-fp-panel": "",
|
|
908
|
+
...panelChromeFocus,
|
|
909
|
+
pointerEvents: panel.visible ? "auto" : "none",
|
|
910
|
+
...elevatedSurfaceProps,
|
|
911
|
+
borderRadius: panel.dropdownRadius,
|
|
912
|
+
paddingVertical: 0,
|
|
913
|
+
paddingBottom: panel.coverCornerInset || 0,
|
|
914
|
+
children: [isContextMenu || !cover || !triggerEcho ? null : /* @__PURE__ */jsx(TriggerEchoRow, {
|
|
915
|
+
sourceRef: panel.triggerRef,
|
|
916
|
+
source: trigger,
|
|
917
|
+
anchorRect,
|
|
918
|
+
onPress: () => onOpenChange(false),
|
|
919
|
+
children: triggerRow
|
|
920
|
+
}), /* @__PURE__ */jsx(ScrollArrow, {
|
|
921
|
+
direction: "up",
|
|
922
|
+
scrollRef: panel.refs.floating,
|
|
923
|
+
visible: panel.arrowUp,
|
|
924
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
925
|
+
}), /* @__PURE__ */jsx(View, {
|
|
926
|
+
ref: contentRef,
|
|
927
|
+
...(contentPadding !== "none" ? panel.knobProps.panelPadding : void 0),
|
|
928
|
+
...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
|
|
929
|
+
children: /* @__PURE__ */jsx(OverlayStackProvider, {
|
|
930
|
+
zIndex: panelZIndex,
|
|
931
|
+
children
|
|
932
|
+
})
|
|
933
|
+
}), /* @__PURE__ */jsx(ScrollArrow, {
|
|
934
|
+
direction: "down",
|
|
935
|
+
scrollRef: panel.refs.floating,
|
|
936
|
+
visible: panel.arrowDown,
|
|
937
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
938
|
+
})]
|
|
939
|
+
})
|
|
810
940
|
})
|
|
811
941
|
})]
|
|
812
942
|
});
|
|
813
943
|
}
|
|
814
|
-
export { FloatingPanel, floatingPanelActionProps, isNestedPanelAction2 as isNestedPanelAction, panelAnchorOffset, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding2 as panelViewportPadding, resolvePanelWidthMode, useFloatingPanel2 as useFloatingPanel, useViewportGtSm };
|
|
944
|
+
export { FloatingPanel, TriggerEchoRow, floatingPanelActionProps, isNestedPanelAction2 as isNestedPanelAction, panelAnchorOffset, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding2 as panelViewportPadding, placeEchoOverTrigger, resolvePanelWidthMode, useFloatingPanel2 as useFloatingPanel, useViewportGtSm };
|
|
815
945
|
//# sourceMappingURL=index.mjs.map
|