@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
|
@@ -23,6 +23,7 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
23
23
|
var FloatingPanel_exports = {};
|
|
24
24
|
__export(FloatingPanel_exports, {
|
|
25
25
|
FloatingPanel: () => FloatingPanel,
|
|
26
|
+
TriggerEchoRow: () => TriggerEchoRow,
|
|
26
27
|
floatingPanelActionProps: () => import_nestedAction2.floatingPanelActionProps,
|
|
27
28
|
isNestedPanelAction: () => import_nestedAction2.isNestedPanelAction,
|
|
28
29
|
panelAnchorOffset: () => import_useFloatingPanel2.panelAnchorOffset,
|
|
@@ -30,6 +31,7 @@ __export(FloatingPanel_exports, {
|
|
|
30
31
|
panelGrowDuration: () => import_useFloatingPanel2.panelGrowDuration,
|
|
31
32
|
panelTransition: () => import_useFloatingPanel2.panelTransition,
|
|
32
33
|
panelViewportPadding: () => import_useFloatingPanel2.panelViewportPadding,
|
|
34
|
+
placeEchoOverTrigger: () => placeEchoOverTrigger,
|
|
33
35
|
resolvePanelWidthMode: () => import_useFloatingPanel2.resolvePanelWidthMode,
|
|
34
36
|
useFloatingPanel: () => import_useFloatingPanel2.useFloatingPanel,
|
|
35
37
|
useViewportGtSm: () => useViewportGtSm
|
|
@@ -45,11 +47,12 @@ var import_trailingAction = require("./trailingAction.cjs");
|
|
|
45
47
|
var import_focusManagement = require("../shared/focusManagement.cjs");
|
|
46
48
|
var import_useSheetEscapeDismiss = require("../shared/useSheetEscapeDismiss.cjs");
|
|
47
49
|
var import_useFloatingPanel = require("./useFloatingPanel.cjs");
|
|
50
|
+
var import_containingBlock = require("./containingBlock.cjs");
|
|
51
|
+
var import_panelWidth = require("./panelWidth.cjs");
|
|
48
52
|
var import_overlayStack = require("../shared/overlayStack.cjs");
|
|
49
53
|
var import_compactFace = require("./compactFace.cjs");
|
|
50
54
|
var import_nestedAction = require("./nestedAction.cjs");
|
|
51
55
|
var import_PanelPortal = require("./PanelPortal.cjs");
|
|
52
|
-
var import_containingBlock = require("./containingBlock.cjs");
|
|
53
56
|
var import_pointAnchor = require("./pointAnchor.cjs");
|
|
54
57
|
var import_nestedAction2 = require("./nestedAction.cjs");
|
|
55
58
|
var import_useFloatingPanel2 = require("./useFloatingPanel.cjs");
|
|
@@ -107,12 +110,40 @@ function panelTransformOrigin(placement) {
|
|
|
107
110
|
return `${originY} ${originX}`;
|
|
108
111
|
}
|
|
109
112
|
const ECHO_STRIPPED_ATTRIBUTES = ["id", "for", "name", "data-testid", "aria-label", "aria-controls", "aria-labelledby", "aria-describedby", "aria-activedescendant"];
|
|
113
|
+
function childPath(root, node) {
|
|
114
|
+
const path = [];
|
|
115
|
+
for (let at = node; at && at !== root; at = at.parentElement) {
|
|
116
|
+
const parent = at.parentElement;
|
|
117
|
+
if (!parent) return null;
|
|
118
|
+
path.unshift(Array.prototype.indexOf.call(parent.children, at));
|
|
119
|
+
}
|
|
120
|
+
return path;
|
|
121
|
+
}
|
|
122
|
+
function followPath(root, path) {
|
|
123
|
+
let at = root;
|
|
124
|
+
for (const index of path) at = at?.children[index];
|
|
125
|
+
return at ?? null;
|
|
126
|
+
}
|
|
127
|
+
function dropEchoChrome(source, snapshot) {
|
|
128
|
+
const painted = (0, import_useFloatingPanel.paintedCornerBox)(source);
|
|
129
|
+
const path = painted ? childPath(source, painted) : null;
|
|
130
|
+
const frame = path ? followPath(snapshot, path) : null;
|
|
131
|
+
if (!frame) return;
|
|
132
|
+
frame.style.setProperty("border-color", "transparent", "important");
|
|
133
|
+
frame.style.setProperty("background-color", "transparent", "important");
|
|
134
|
+
frame.style.setProperty("background-image", "none", "important");
|
|
135
|
+
frame.style.setProperty("box-shadow", "none", "important");
|
|
136
|
+
frame.style.setProperty("outline", "none", "important");
|
|
137
|
+
frame.setAttribute("data-fp-echo-frame", "");
|
|
138
|
+
}
|
|
110
139
|
function TriggerEchoRow({
|
|
111
140
|
sourceRef,
|
|
112
141
|
onPress,
|
|
113
142
|
children,
|
|
114
143
|
anchorRect,
|
|
115
|
-
source
|
|
144
|
+
source,
|
|
145
|
+
presentational = false,
|
|
146
|
+
edge = "top"
|
|
116
147
|
}) {
|
|
117
148
|
const rowRef = (0, import_react.useRef)(null);
|
|
118
149
|
const visualRef = (0, import_react.useRef)(null);
|
|
@@ -124,17 +155,31 @@ function TriggerEchoRow({
|
|
|
124
155
|
const control = source2.matches(PANEL_FOCUSABLE) ? source2 : source2.querySelector(PANEL_FOCUSABLE);
|
|
125
156
|
const labelledBy = control?.getAttribute("aria-labelledby");
|
|
126
157
|
const label = control?.getAttribute("aria-label") || labelledBy?.split(/\s+/).map(id => document.getElementById(id)?.textContent || "").join(" ") || control?.textContent || source2.textContent || "";
|
|
127
|
-
row.setAttribute("aria-label", label);
|
|
158
|
+
if (!presentational) row.setAttribute("aria-label", label);
|
|
128
159
|
const rect = anchorRect ?? source2.getBoundingClientRect();
|
|
129
|
-
row.
|
|
160
|
+
const grown = Number(row.getAttribute("data-fp-echo-stretched")) || 0;
|
|
161
|
+
const stretched = grown > rect.width;
|
|
162
|
+
row.style.width = `${stretched ? grown : rect.width}px`;
|
|
130
163
|
row.style.height = `${rect.height}px`;
|
|
131
164
|
const rtl = isRtl(source2);
|
|
132
165
|
row.style.alignSelf = "flex-start";
|
|
133
166
|
const frameStyle = row.parentElement ? getComputedStyle(row.parentElement) : null;
|
|
134
|
-
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
135
167
|
row.style.position = "sticky";
|
|
136
|
-
|
|
168
|
+
if (edge === "bottom") {
|
|
169
|
+
row.style.order = "1";
|
|
170
|
+
row.style.marginTop = "";
|
|
171
|
+
row.style.top = "";
|
|
172
|
+
row.style.marginBottom = `${-(parseFloat(frameStyle?.borderBottomWidth || "0") || 0)}px`;
|
|
173
|
+
row.style.bottom = row.style.marginBottom;
|
|
174
|
+
} else {
|
|
175
|
+
row.style.order = "";
|
|
176
|
+
row.style.marginBottom = "";
|
|
177
|
+
row.style.bottom = "";
|
|
178
|
+
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
179
|
+
row.style.top = row.style.marginTop;
|
|
180
|
+
}
|
|
137
181
|
row.style.zIndex = "1";
|
|
182
|
+
row.style.backgroundColor = frameStyle?.backgroundColor ?? "";
|
|
138
183
|
row.style.marginLeft = rtl ? "" : `${-(parseFloat(frameStyle?.borderLeftWidth || "0") || 0)}px`;
|
|
139
184
|
row.style.marginRight = rtl ? `${-(parseFloat(frameStyle?.borderRightWidth || "0") || 0)}px` : "";
|
|
140
185
|
const snapshot = children == null ? source2.cloneNode(true) : visualRef.current;
|
|
@@ -151,8 +196,11 @@ function TriggerEchoRow({
|
|
|
151
196
|
node.setAttribute("tabindex", "-1");
|
|
152
197
|
}
|
|
153
198
|
}
|
|
199
|
+
if (children == null) dropEchoChrome(source2, snapshot);
|
|
154
200
|
snapshot.setAttribute("inert", "");
|
|
155
201
|
snapshot.setAttribute("aria-hidden", "true");
|
|
202
|
+
snapshot.style.width = stretched ? "100%" : "";
|
|
203
|
+
snapshot.style.maxWidth = stretched ? "none" : "";
|
|
156
204
|
if (children == null) visualRef.current?.replaceChildren(snapshot);
|
|
157
205
|
};
|
|
158
206
|
sync();
|
|
@@ -160,12 +208,16 @@ function TriggerEchoRow({
|
|
|
160
208
|
const observer = new ResizeObserver(sync);
|
|
161
209
|
observer.observe(source2);
|
|
162
210
|
return () => observer.disconnect();
|
|
163
|
-
}, [sourceRef, source, children, anchorRect]);
|
|
211
|
+
}, [sourceRef, source, children, anchorRect, presentational, edge]);
|
|
164
212
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
165
213
|
ref: rowRef,
|
|
166
214
|
"data-fp-trigger-row": "",
|
|
167
|
-
|
|
168
|
-
|
|
215
|
+
...(presentational ? {
|
|
216
|
+
"aria-hidden": true
|
|
217
|
+
} : {
|
|
218
|
+
role: "button",
|
|
219
|
+
"aria-expanded": true
|
|
220
|
+
}),
|
|
169
221
|
tabIndex: -1,
|
|
170
222
|
cursor: "pointer",
|
|
171
223
|
onPress,
|
|
@@ -181,6 +233,38 @@ function TriggerEchoRow({
|
|
|
181
233
|
})
|
|
182
234
|
});
|
|
183
235
|
}
|
|
236
|
+
const ECHO_FIELD = 'input, textarea, [role="combobox"], [aria-haspopup="listbox"]';
|
|
237
|
+
function placeEchoOverTrigger(panelElement, geometry, {
|
|
238
|
+
stretch = false
|
|
239
|
+
} = {}) {
|
|
240
|
+
const row = panelElement.querySelector("[data-fp-trigger-row]");
|
|
241
|
+
if (!row) return;
|
|
242
|
+
const offset = (0, import_panelWidth.echoOffset)(geometry);
|
|
243
|
+
const x = geometry.rtl ? -offset : offset;
|
|
244
|
+
row.style.translate = Math.abs(x) < 0.5 ? "" : `${x}px 0`;
|
|
245
|
+
const triggerWidth = geometry.triggerRight - geometry.triggerLeft;
|
|
246
|
+
const grown = geometry.panelWidth - offset;
|
|
247
|
+
const field = stretch && row.querySelector(ECHO_FIELD) != null;
|
|
248
|
+
const visual = row.firstElementChild;
|
|
249
|
+
const snapshot = visual?.firstElementChild;
|
|
250
|
+
if (field && grown > triggerWidth + 0.5) {
|
|
251
|
+
row.style.width = `${grown}px`;
|
|
252
|
+
row.setAttribute("data-fp-echo-stretched", String(grown));
|
|
253
|
+
for (const node of [visual, snapshot]) {
|
|
254
|
+
if (!node) continue;
|
|
255
|
+
node.style.width = "100%";
|
|
256
|
+
node.style.maxWidth = "none";
|
|
257
|
+
}
|
|
258
|
+
} else if (row.hasAttribute("data-fp-echo-stretched")) {
|
|
259
|
+
row.removeAttribute("data-fp-echo-stretched");
|
|
260
|
+
row.style.width = `${triggerWidth}px`;
|
|
261
|
+
for (const node of [visual, snapshot]) {
|
|
262
|
+
if (!node) continue;
|
|
263
|
+
node.style.width = "";
|
|
264
|
+
node.style.maxWidth = "";
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
184
268
|
const overlayFloatBreakpoint = import_theme2.OVERLAY_BREAKPOINT;
|
|
185
269
|
function subscribeViewport(listener) {
|
|
186
270
|
if (!import_tamagui.isWeb || typeof window === "undefined") return () => {};
|
|
@@ -367,10 +451,12 @@ function FloatingPanelWeb({
|
|
|
367
451
|
sizing = "grow",
|
|
368
452
|
widthMode,
|
|
369
453
|
fitContent,
|
|
454
|
+
panelWidth,
|
|
370
455
|
contentPadding = "default",
|
|
371
456
|
openOn = "press",
|
|
372
457
|
cover = true,
|
|
373
458
|
triggerEcho = true,
|
|
459
|
+
coverAlign = "start",
|
|
374
460
|
triggerRow,
|
|
375
461
|
anchorRect,
|
|
376
462
|
clampCollisions = false,
|
|
@@ -391,6 +477,7 @@ function FloatingPanelWeb({
|
|
|
391
477
|
const contentRef = (0, import_react.useRef)(null);
|
|
392
478
|
const anchorPointRef = (0, import_react.useRef)(null);
|
|
393
479
|
const pointPlacementRef = (0, import_react.useRef)(null);
|
|
480
|
+
const coverAlignEndRef = (0, import_react.useRef)(false);
|
|
394
481
|
const repositionFnRef = (0, import_react.useRef)(null);
|
|
395
482
|
const resetPosition = () => {
|
|
396
483
|
overlayStyleRef.current = null;
|
|
@@ -412,6 +499,8 @@ function FloatingPanelWeb({
|
|
|
412
499
|
fitContent,
|
|
413
500
|
freeOverlay: isContextMenu,
|
|
414
501
|
cover,
|
|
502
|
+
panelWidth,
|
|
503
|
+
echo: cover && triggerEcho && !isContextMenu,
|
|
415
504
|
onBeforeOpen: resetPosition
|
|
416
505
|
});
|
|
417
506
|
(0, import_focusManagement.useReturnFocusOnClose)(open, skipReturnFocusRef, panel.refs.floating);
|
|
@@ -468,15 +557,42 @@ function FloatingPanelWeb({
|
|
|
468
557
|
const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
|
|
469
558
|
const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
|
|
470
559
|
const width = Math.max(layoutWidth || dropdownElement.offsetWidth, measured.width);
|
|
471
|
-
const
|
|
560
|
+
const startLeft = rtl ? measured.right - width : measured.left;
|
|
561
|
+
const endLeft = rtl ? measured.left : measured.right - width;
|
|
562
|
+
const iconCover = coverAlign === "auto";
|
|
563
|
+
const startFree = rtl ? startLeft >= viewportLeft + import_useFloatingPanel.panelViewportPadding : startLeft + width <= viewportRight - import_useFloatingPanel.panelViewportPadding;
|
|
564
|
+
const endFree = rtl ? endLeft + width <= viewportRight - import_useFloatingPanel.panelViewportPadding : endLeft >= viewportLeft + import_useFloatingPanel.panelViewportPadding;
|
|
565
|
+
let alignEnd = iconCover && !startFree && endFree;
|
|
566
|
+
const slides = (0, import_panelWidth.slidesAlongScreen)(panelWidth);
|
|
567
|
+
const margins = {
|
|
568
|
+
boundsLeft: viewportLeft + import_useFloatingPanel.panelViewportPadding,
|
|
569
|
+
boundsRight: viewportRight - import_useFloatingPanel.panelViewportPadding
|
|
570
|
+
};
|
|
571
|
+
const room = panelWidth === "screen" ? (0, import_panelWidth.screenBounds)({
|
|
572
|
+
triggerLeft: measured.left,
|
|
573
|
+
triggerRight: measured.right,
|
|
574
|
+
...margins,
|
|
575
|
+
rtl
|
|
576
|
+
}) : {
|
|
577
|
+
left: margins.boundsLeft,
|
|
578
|
+
right: margins.boundsRight
|
|
579
|
+
};
|
|
580
|
+
const left = slides ? (0, import_panelWidth.panelLeftForWidth)({
|
|
581
|
+
triggerLeft: measured.left,
|
|
582
|
+
triggerRight: measured.right,
|
|
583
|
+
width,
|
|
584
|
+
boundsLeft: room.left,
|
|
585
|
+
boundsRight: room.right,
|
|
586
|
+
rtl
|
|
587
|
+
}) : alignEnd ? endLeft : startLeft;
|
|
472
588
|
const firstActionHeight = contentRef.current?.querySelector(PANEL_FOCUSABLE)?.getBoundingClientRect().height || Number(panel.knobProps.menuRow.minHeight) || totalContentHeight;
|
|
473
589
|
const bodyStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
474
590
|
const bodyPadding = (parseFloat(bodyStyle?.paddingTop || "0") || 0) + (parseFloat(bodyStyle?.paddingBottom || "0") || 0);
|
|
475
591
|
const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
|
|
476
592
|
let placedTop = measured.top;
|
|
477
593
|
let placedLeft = left;
|
|
478
|
-
if (measured.width > 0 && measured.height > 0 && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - import_useFloatingPanel.panelViewportPadding) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - import_useFloatingPanel.panelViewportPadding)) {
|
|
479
|
-
if (!clampCollisions) {
|
|
594
|
+
if (measured.width > 0 && measured.height > 0 && (!slides && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - import_useFloatingPanel.panelViewportPadding)) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - import_useFloatingPanel.panelViewportPadding)) {
|
|
595
|
+
if (!clampCollisions && !iconCover) {
|
|
480
596
|
dropdownElement.style.visibility = "hidden";
|
|
481
597
|
setCollisionSheet(true);
|
|
482
598
|
return;
|
|
@@ -496,11 +612,23 @@ function FloatingPanelWeb({
|
|
|
496
612
|
right: viewportRight - import_useFloatingPanel.panelViewportPadding,
|
|
497
613
|
bottom: viewportBottom - import_useFloatingPanel.panelViewportPadding
|
|
498
614
|
},
|
|
499
|
-
rtl
|
|
615
|
+
rtl,
|
|
616
|
+
align: coverAlign
|
|
500
617
|
});
|
|
501
618
|
placedTop = placed.top;
|
|
502
|
-
placedLeft = placed.left;
|
|
619
|
+
if (!slides) placedLeft = placed.left;
|
|
620
|
+
alignEnd = placed.end;
|
|
503
621
|
}
|
|
622
|
+
coverAlignEndRef.current = alignEnd;
|
|
623
|
+
placeEchoOverTrigger(dropdownElement, {
|
|
624
|
+
triggerLeft: measured.left,
|
|
625
|
+
triggerRight: measured.right,
|
|
626
|
+
panelLeft: placedLeft,
|
|
627
|
+
panelWidth: width,
|
|
628
|
+
rtl
|
|
629
|
+
}, {
|
|
630
|
+
stretch: panelWidth !== void 0
|
|
631
|
+
});
|
|
504
632
|
const top2 = placedTop - containingBlock.top;
|
|
505
633
|
const cssLeft2 = placedLeft - containingBlock.left;
|
|
506
634
|
const maxHeight = Math.max(0, viewportBottom - import_useFloatingPanel.panelViewportPadding - placedTop);
|
|
@@ -508,7 +636,7 @@ function FloatingPanelWeb({
|
|
|
508
636
|
dropdownElement.style.left = `${cssLeft2}px`;
|
|
509
637
|
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
510
638
|
dropdownElement.dir = rtl ? "rtl" : "ltr";
|
|
511
|
-
dropdownElement.style.transformOrigin = rtl ? "top right" : "top left";
|
|
639
|
+
dropdownElement.style.transformOrigin = rtl !== alignEnd ? "top right" : "top left";
|
|
512
640
|
dropdownElement.style.visibility = "visible";
|
|
513
641
|
overlayStyleRef.current = {
|
|
514
642
|
top: top2,
|
|
@@ -639,7 +767,7 @@ function FloatingPanelWeb({
|
|
|
639
767
|
});
|
|
640
768
|
}
|
|
641
769
|
});
|
|
642
|
-
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
770
|
+
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
643
771
|
repositionFnRef.current = repositionOverlay;
|
|
644
772
|
const click = (0, import_react2.useClick)(panel.context, {
|
|
645
773
|
event: "mousedown",
|
|
@@ -779,71 +907,75 @@ function FloatingPanelWeb({
|
|
|
779
907
|
children
|
|
780
908
|
}), panel.mounted && !collisionSheet && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PanelPortal.PanelPortal, {
|
|
781
909
|
anchor: panel.triggerRef.current,
|
|
782
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.
|
|
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
|
-
|
|
810
|
-
|
|
811
|
-
|
|
910
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Theme, {
|
|
911
|
+
name: "alt1",
|
|
912
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
913
|
+
...getFloatingProps({
|
|
914
|
+
ref: panel.refs.setFloating,
|
|
915
|
+
style: {
|
|
916
|
+
...elevatedSurfaceStyle,
|
|
917
|
+
position: panel.strategy,
|
|
918
|
+
top: overlayStyleRef.current?.top ?? panel.y ?? 0,
|
|
919
|
+
left: overlayStyleRef.current?.left ?? panel.x ?? 0,
|
|
920
|
+
scrollbarWidth: "none",
|
|
921
|
+
zIndex: panelZIndex,
|
|
922
|
+
overflow: "auto",
|
|
923
|
+
...(cover && !isContextMenu ? {
|
|
924
|
+
overflowX: "hidden"
|
|
925
|
+
} : {}),
|
|
926
|
+
...panel.floatingStyleRef.current,
|
|
927
|
+
...(overlayStyleRef.current ? {
|
|
928
|
+
maxHeight: overlayStyleRef.current.maxHeight
|
|
929
|
+
} : {}),
|
|
930
|
+
opacity: panel.visible ? 1 : 0,
|
|
931
|
+
// `none`, not scale(1): any transform makes this panel the
|
|
932
|
+
// containing block of a nested panel's `position: fixed`, which
|
|
933
|
+
// then positions against this box and is clipped by its scroll.
|
|
934
|
+
transform: panel.visible ? "none" : "scale(0.96)",
|
|
935
|
+
transition: webTransition,
|
|
936
|
+
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)
|
|
937
|
+
},
|
|
938
|
+
onScroll: handleScroll,
|
|
939
|
+
onTransitionEnd: event => {
|
|
940
|
+
if (event.target === event.currentTarget && (event.propertyName === "height" || event.propertyName === "max-height")) {
|
|
941
|
+
panel.updateArrows(event.currentTarget);
|
|
942
|
+
}
|
|
812
943
|
}
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
944
|
+
}),
|
|
945
|
+
"data-testid": "floating-panel-viewport",
|
|
946
|
+
"data-fp-panel": "",
|
|
947
|
+
...panelChromeFocus,
|
|
948
|
+
pointerEvents: panel.visible ? "auto" : "none",
|
|
949
|
+
...elevatedSurfaceProps,
|
|
950
|
+
borderRadius: panel.dropdownRadius,
|
|
951
|
+
paddingVertical: 0,
|
|
952
|
+
paddingBottom: panel.coverCornerInset || 0,
|
|
953
|
+
children: [isContextMenu || !cover || !triggerEcho ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(TriggerEchoRow, {
|
|
954
|
+
sourceRef: panel.triggerRef,
|
|
955
|
+
source: trigger,
|
|
956
|
+
anchorRect,
|
|
957
|
+
onPress: () => onOpenChange(false),
|
|
958
|
+
children: triggerRow
|
|
959
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floatingList.ScrollArrow, {
|
|
960
|
+
direction: "up",
|
|
961
|
+
scrollRef: panel.refs.floating,
|
|
962
|
+
visible: panel.arrowUp,
|
|
963
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
964
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
965
|
+
ref: contentRef,
|
|
966
|
+
...(contentPadding !== "none" ? panel.knobProps.panelPadding : void 0),
|
|
967
|
+
...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
|
|
968
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_overlayStack.OverlayStackProvider, {
|
|
969
|
+
zIndex: panelZIndex,
|
|
970
|
+
children
|
|
971
|
+
})
|
|
972
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floatingList.ScrollArrow, {
|
|
973
|
+
direction: "down",
|
|
974
|
+
scrollRef: panel.refs.floating,
|
|
975
|
+
visible: panel.arrowDown,
|
|
976
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
977
|
+
})]
|
|
978
|
+
})
|
|
847
979
|
})
|
|
848
980
|
})]
|
|
849
981
|
});
|
|
@@ -25,12 +25,14 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
25
25
|
var index_native_exports = {};
|
|
26
26
|
__export(index_native_exports, {
|
|
27
27
|
FloatingPanel: () => FloatingPanel,
|
|
28
|
+
TriggerEchoRow: () => TriggerEchoRow,
|
|
28
29
|
floatingPanelActionProps: () => import_nestedAction.floatingPanelActionProps,
|
|
29
30
|
isNestedPanelAction: () => import_nestedAction.isNestedPanelAction,
|
|
30
31
|
panelAnimationDuration: () => import_useFloatingPanel2.panelAnimationDuration,
|
|
31
32
|
panelGrowDuration: () => import_useFloatingPanel2.panelGrowDuration,
|
|
32
33
|
panelTransition: () => import_useFloatingPanel2.panelTransition,
|
|
33
34
|
panelViewportPadding: () => import_useFloatingPanel2.panelViewportPadding,
|
|
35
|
+
placeEchoOverTrigger: () => placeEchoOverTrigger,
|
|
34
36
|
useFloatingPanel: () => import_useFloatingPanel2.useFloatingPanel,
|
|
35
37
|
useViewportGtSm: () => useViewportGtSm
|
|
36
38
|
});
|
|
@@ -48,6 +50,8 @@ var import_t = require("../shared/t.native.js");
|
|
|
48
50
|
var import_overlaySizeClass = require("../shared/overlaySizeClass.native.js");
|
|
49
51
|
var import_useKeyboardInset = require("../shared/useKeyboardInset.native.js");
|
|
50
52
|
var import_compactFace = require("./compactFace.native.js");
|
|
53
|
+
var import_panelWidth = require("./panelWidth.native.js");
|
|
54
|
+
var import_echoContext = require("./echoContext.native.js");
|
|
51
55
|
var import_pointAnchor = require("./pointAnchor.native.js");
|
|
52
56
|
var import_RegularPanel = require("./RegularPanel.native.js");
|
|
53
57
|
var import_useFloatingPanel = require("./useFloatingPanel.native.js");
|
|
@@ -83,7 +87,9 @@ function FloatingPanel(param) {
|
|
|
83
87
|
compactFace,
|
|
84
88
|
triggerRow,
|
|
85
89
|
triggerEcho = true,
|
|
90
|
+
coverAlign = "start",
|
|
86
91
|
anchorMode,
|
|
92
|
+
panelWidth = "content",
|
|
87
93
|
sheet,
|
|
88
94
|
widthMode,
|
|
89
95
|
fitContent
|
|
@@ -152,6 +158,12 @@ function FloatingPanel(param) {
|
|
|
152
158
|
var anchored = asMenu || asRegular;
|
|
153
159
|
var triggerRef = (0, import_react.useRef)(null);
|
|
154
160
|
var [anchor, setAnchor] = (0, import_react.useState)(null);
|
|
161
|
+
var [triggerRadius, setTriggerRadius] = (0, import_react.useState)(null);
|
|
162
|
+
var reportTriggerRadius = (0, import_react.useCallback)(function (radius) {
|
|
163
|
+
return setTriggerRadius(function (prev) {
|
|
164
|
+
return prev === radius ? prev : radius;
|
|
165
|
+
});
|
|
166
|
+
}, []);
|
|
155
167
|
(0, import_react.useLayoutEffect)(function () {
|
|
156
168
|
if (!anchored || !open) {
|
|
157
169
|
setAnchor(null);
|
|
@@ -468,9 +480,12 @@ function FloatingPanel(param) {
|
|
|
468
480
|
style: {
|
|
469
481
|
width: triggerSizing === "content" ? void 0 : "100%"
|
|
470
482
|
},
|
|
471
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
472
|
-
|
|
473
|
-
|
|
483
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_echoContext.PanelTriggerRadiusContext.Provider, {
|
|
484
|
+
value: reportTriggerRadius,
|
|
485
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_trailingAction.TriggerWithTrailingAction, {
|
|
486
|
+
trigger,
|
|
487
|
+
triggerEnd
|
|
488
|
+
})
|
|
474
489
|
})
|
|
475
490
|
}))
|
|
476
491
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_trailingAction.TrailingActionOverlay, {
|
|
@@ -502,6 +517,9 @@ function FloatingPanel(param) {
|
|
|
502
517
|
},
|
|
503
518
|
echo: triggerEcho ? triggerRow !== null && triggerRow !== void 0 ? triggerRow : trigger : null,
|
|
504
519
|
echoLabel: triggerA11y === null || triggerA11y === void 0 ? void 0 : triggerA11y.label,
|
|
520
|
+
coverAlign: anchorMode === "attach" ? "start" : coverAlign,
|
|
521
|
+
panelWidth,
|
|
522
|
+
triggerRadius: anchorMode === "attach" ? null : triggerRadius,
|
|
505
523
|
framePadding,
|
|
506
524
|
frameGap,
|
|
507
525
|
onBackdropPress: handleBackdropPress,
|
|
@@ -656,26 +674,56 @@ function TriggerMenuPanel(param) {
|
|
|
656
674
|
bounds,
|
|
657
675
|
echo,
|
|
658
676
|
echoLabel,
|
|
677
|
+
coverAlign,
|
|
678
|
+
panelWidth,
|
|
679
|
+
triggerRadius,
|
|
659
680
|
framePadding,
|
|
660
681
|
frameGap,
|
|
661
682
|
onBackdropPress,
|
|
662
683
|
onClose,
|
|
663
684
|
children
|
|
664
685
|
} = param;
|
|
665
|
-
var _ref, _ref1, _ref2, _ref3;
|
|
686
|
+
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
666
687
|
var {
|
|
667
688
|
knobProps
|
|
668
689
|
} = (0, import_theme2.useResolvedKnobs)({
|
|
669
690
|
painted: false
|
|
670
691
|
});
|
|
671
692
|
var [size, setSize] = (0, import_react.useState)(null);
|
|
693
|
+
var room = panelWidth === "screen" && anchor ? {
|
|
694
|
+
...bounds,
|
|
695
|
+
...(0, import_panelWidth.screenBounds)({
|
|
696
|
+
triggerLeft: anchor.x,
|
|
697
|
+
triggerRight: anchor.x + anchor.width,
|
|
698
|
+
boundsLeft: bounds.left,
|
|
699
|
+
boundsRight: bounds.right,
|
|
700
|
+
rtl: import_react_native.I18nManager.isRTL
|
|
701
|
+
})
|
|
702
|
+
} : bounds;
|
|
703
|
+
var widthBox = (0, import_panelWidth.panelWidthBox)(panelWidth, {
|
|
704
|
+
trigger: (_ref = anchor === null || anchor === void 0 ? void 0 : anchor.width) !== null && _ref !== void 0 ? _ref : 0,
|
|
705
|
+
available: room.right - room.left,
|
|
706
|
+
echo: echo != null,
|
|
707
|
+
floor: Math.max(import_compactFace.MENU_MIN_WIDTH, (_ref1 = anchor === null || anchor === void 0 ? void 0 : anchor.width) !== null && _ref1 !== void 0 ? _ref1 : 0)
|
|
708
|
+
});
|
|
672
709
|
var placement = anchor && size ? (attach ? import_pointAnchor.placeBesideTrigger : import_pointAnchor.placeOverTrigger)({
|
|
673
710
|
trigger: anchor,
|
|
674
711
|
width: size.width,
|
|
675
712
|
height: size.height,
|
|
676
|
-
bounds,
|
|
677
|
-
rtl: import_react_native.I18nManager.isRTL
|
|
713
|
+
bounds: room,
|
|
714
|
+
rtl: import_react_native.I18nManager.isRTL,
|
|
715
|
+
align: coverAlign
|
|
678
716
|
}) : null;
|
|
717
|
+
var half = anchor ? Math.min(anchor.width, anchor.height) / 2 : void 0;
|
|
718
|
+
var radius = triggerRadius != null && half != null ? Math.min(triggerRadius, half) : coverAlign === "auto" && half ? half : void 0;
|
|
719
|
+
var borderWidth = Number(knobProps.elevatedSurface.borderWidth) || 0;
|
|
720
|
+
var echoShift = anchor && placement ? (0, import_panelWidth.echoOffset)({
|
|
721
|
+
triggerLeft: anchor.x,
|
|
722
|
+
triggerRight: anchor.x + anchor.width,
|
|
723
|
+
panelLeft: placement.left,
|
|
724
|
+
panelWidth: placement.width,
|
|
725
|
+
rtl: import_react_native.I18nManager.isRTL
|
|
726
|
+
}) : 0;
|
|
679
727
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_react_native.View, {
|
|
680
728
|
style: import_react_native.StyleSheet.absoluteFill,
|
|
681
729
|
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
|
|
@@ -698,25 +746,36 @@ function TriggerMenuPanel(param) {
|
|
|
698
746
|
},
|
|
699
747
|
style: {
|
|
700
748
|
position: "absolute",
|
|
701
|
-
left: (
|
|
702
|
-
top: (
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
maxHeight: (_ref3 = placement === null || placement === void 0 ? void 0 : placement.maxHeight) !== null && _ref3 !== void 0 ? _ref3 : bounds.bottom - bounds.top,
|
|
749
|
+
left: (_ref2 = placement === null || placement === void 0 ? void 0 : placement.left) !== null && _ref2 !== void 0 ? _ref2 : bounds.left,
|
|
750
|
+
top: (_ref3 = placement === null || placement === void 0 ? void 0 : placement.top) !== null && _ref3 !== void 0 ? _ref3 : bounds.top,
|
|
751
|
+
...widthBox,
|
|
752
|
+
maxHeight: (_ref4 = placement === null || placement === void 0 ? void 0 : placement.maxHeight) !== null && _ref4 !== void 0 ? _ref4 : bounds.bottom - bounds.top,
|
|
706
753
|
opacity: placement ? 1 : 0
|
|
707
754
|
},
|
|
708
|
-
children:
|
|
755
|
+
children: (
|
|
756
|
+
/* FZ-8414: the shadow rides this unclipped frame; iOS drops the
|
|
757
|
+
shadow of a layer that also clips, and in dark the menu melted
|
|
758
|
+
into the page. The clip lives on the inner stack. */
|
|
759
|
+
/* @__PURE__ */
|
|
760
|
+
(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
709
761
|
testID: "floating-panel-menu-surface",
|
|
710
762
|
...knobProps.elevatedSurface,
|
|
763
|
+
...(radius != null ? {
|
|
764
|
+
borderRadius: radius
|
|
765
|
+
} : void 0),
|
|
711
766
|
flexShrink: 1,
|
|
712
767
|
minHeight: 0,
|
|
713
768
|
onAccessibilityEscape: onClose,
|
|
714
769
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
715
770
|
testID: "floating-panel-menu-clip",
|
|
716
|
-
borderRadius: knobProps.elevatedSurface.borderRadius,
|
|
717
|
-
overflow: "hidden",
|
|
718
771
|
flexShrink: 1,
|
|
719
772
|
minHeight: 0,
|
|
773
|
+
overflow: "hidden",
|
|
774
|
+
...(radius != null ? {
|
|
775
|
+
borderRadius: Math.max(0, radius - borderWidth)
|
|
776
|
+
} : {
|
|
777
|
+
borderRadius: knobProps.elevatedSurface.borderRadius
|
|
778
|
+
}),
|
|
720
779
|
children: [echo != null && anchor && anchor.height > 0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
|
|
721
780
|
testID: "floating-panel-menu-echo",
|
|
722
781
|
onPress: onClose,
|
|
@@ -725,14 +784,26 @@ function TriggerMenuPanel(param) {
|
|
|
725
784
|
accessibilityLabel: echoLabel
|
|
726
785
|
} : void 0),
|
|
727
786
|
"aria-expanded": true,
|
|
787
|
+
// The frame's border is inside the anchor box: pull the echo
|
|
788
|
+
// back over it so its content lands where the trigger's did.
|
|
789
|
+
// Exactly the trigger's box at the start edge: a menu wider than
|
|
790
|
+
// its trigger (the 250pt pull-down floor) must not stretch the
|
|
791
|
+
// echo and re-centre a pill's label (FZ-8438).
|
|
728
792
|
style: {
|
|
729
793
|
height: anchor.height,
|
|
730
|
-
|
|
794
|
+
width: anchor.width,
|
|
795
|
+
alignSelf: "flex-start",
|
|
796
|
+
margin: -borderWidth,
|
|
797
|
+
marginStart: echoShift - borderWidth,
|
|
798
|
+
marginBottom: 0,
|
|
731
799
|
justifyContent: "center"
|
|
732
800
|
},
|
|
733
801
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
734
802
|
pointerEvents: "none",
|
|
735
|
-
children:
|
|
803
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_echoContext.PanelEchoContext.Provider, {
|
|
804
|
+
value: true,
|
|
805
|
+
children: echo
|
|
806
|
+
})
|
|
736
807
|
})
|
|
737
808
|
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.ScrollView, {
|
|
738
809
|
style: {
|
|
@@ -747,7 +818,7 @@ function TriggerMenuPanel(param) {
|
|
|
747
818
|
})
|
|
748
819
|
})]
|
|
749
820
|
})
|
|
750
|
-
})
|
|
821
|
+
}))
|
|
751
822
|
})]
|
|
752
823
|
});
|
|
753
824
|
}
|
|
@@ -822,4 +893,8 @@ function PointPanel(param) {
|
|
|
822
893
|
})]
|
|
823
894
|
});
|
|
824
895
|
}
|
|
896
|
+
function TriggerEchoRow(_props) {
|
|
897
|
+
return null;
|
|
898
|
+
}
|
|
899
|
+
function placeEchoOverTrigger(_panelElement, _geometry, _options) {}
|
|
825
900
|
//# sourceMappingURL=index.native.js.map
|