@multiplatform.one/forms 7.71.0 → 7.73.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/circleGlyph.cjs +28 -0
- package/dist/cjs/Button/circleGlyph.native.js +31 -0
- package/dist/cjs/Button/circleGlyph.native.js.map +1 -0
- package/dist/cjs/Button/index.cjs +19 -3
- package/dist/cjs/Button/index.native.js +19 -3
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/PanelHeader.cjs +49 -0
- package/dist/cjs/FloatingPanel/PanelHeader.native.js +53 -0
- package/dist/cjs/FloatingPanel/PanelHeader.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/echoContext.cjs +67 -0
- package/dist/cjs/FloatingPanel/echoContext.native.js +71 -0
- package/dist/cjs/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/iconEcho.cjs +104 -0
- package/dist/cjs/FloatingPanel/iconEcho.native.js +114 -0
- package/dist/cjs/FloatingPanel/iconEcho.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/index.cjs +371 -86
- package/dist/cjs/FloatingPanel/index.native.js +164 -20
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/paintedBox.cjs +80 -0
- package/dist/cjs/FloatingPanel/paintedBox.native.js +85 -0
- package/dist/cjs/FloatingPanel/paintedBox.native.js.map +1 -0
- 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 +34 -5
- package/dist/cjs/FloatingPanel/pointAnchor.native.js +37 -8
- package/dist/cjs/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/useFloatingPanel.cjs +60 -5
- package/dist/cjs/FloatingPanel/useFloatingPanel.native.js +72 -5
- package/dist/cjs/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/cjs/InputParts/index.cjs +18 -0
- package/dist/cjs/InputParts/index.native.js +19 -1
- 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/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.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- 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/circleGlyph.mjs +3 -0
- package/dist/esm/Button/circleGlyph.mjs.map +1 -0
- package/dist/esm/Button/circleGlyph.native.js +3 -0
- package/dist/esm/Button/circleGlyph.native.js.map +1 -0
- package/dist/esm/Button/index.mjs +18 -2
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +18 -2
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/PanelHeader.mjs +24 -0
- package/dist/esm/FloatingPanel/PanelHeader.mjs.map +1 -0
- package/dist/esm/FloatingPanel/PanelHeader.native.js +25 -0
- package/dist/esm/FloatingPanel/PanelHeader.native.js.map +1 -0
- package/dist/esm/FloatingPanel/echoContext.mjs +35 -0
- package/dist/esm/FloatingPanel/echoContext.mjs.map +1 -0
- package/dist/esm/FloatingPanel/echoContext.native.js +36 -0
- package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/esm/FloatingPanel/iconEcho.mjs +77 -0
- package/dist/esm/FloatingPanel/iconEcho.mjs.map +1 -0
- package/dist/esm/FloatingPanel/iconEcho.native.js +84 -0
- package/dist/esm/FloatingPanel/iconEcho.native.js.map +1 -0
- package/dist/esm/FloatingPanel/index.mjs +373 -90
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +165 -23
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/paintedBox.mjs +52 -0
- package/dist/esm/FloatingPanel/paintedBox.mjs.map +1 -0
- package/dist/esm/FloatingPanel/paintedBox.native.js +54 -0
- package/dist/esm/FloatingPanel/paintedBox.native.js.map +1 -0
- 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 +34 -5
- package/dist/esm/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/esm/FloatingPanel/pointAnchor.native.js +37 -8
- package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.mjs +60 -6
- package/dist/esm/FloatingPanel/useFloatingPanel.mjs.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js +72 -6
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/esm/InputParts/index.mjs +19 -1
- package/dist/esm/InputParts/index.mjs.map +1 -1
- package/dist/esm/InputParts/index.native.js +20 -2
- 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/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 +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -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/circleGlyph.mjs +3 -0
- package/dist/jsx/Button/circleGlyph.mjs.map +1 -0
- package/dist/jsx/Button/circleGlyph.native.js +31 -0
- package/dist/jsx/Button/circleGlyph.native.js.map +1 -0
- package/dist/jsx/Button/index.mjs +18 -2
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +19 -3
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/PanelHeader.mjs +24 -0
- package/dist/jsx/FloatingPanel/PanelHeader.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/PanelHeader.native.js +53 -0
- package/dist/jsx/FloatingPanel/PanelHeader.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/echoContext.mjs +35 -0
- package/dist/jsx/FloatingPanel/echoContext.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/echoContext.native.js +71 -0
- package/dist/jsx/FloatingPanel/echoContext.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/iconEcho.mjs +77 -0
- package/dist/jsx/FloatingPanel/iconEcho.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/iconEcho.native.js +114 -0
- package/dist/jsx/FloatingPanel/iconEcho.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/index.mjs +373 -90
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +164 -20
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/paintedBox.mjs +52 -0
- package/dist/jsx/FloatingPanel/paintedBox.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/paintedBox.native.js +85 -0
- package/dist/jsx/FloatingPanel/paintedBox.native.js.map +1 -0
- 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 +34 -5
- package/dist/jsx/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/pointAnchor.native.js +37 -8
- package/dist/jsx/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/useFloatingPanel.mjs +60 -6
- package/dist/jsx/FloatingPanel/useFloatingPanel.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/useFloatingPanel.native.js +72 -5
- package/dist/jsx/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/jsx/InputParts/index.mjs +19 -1
- package/dist/jsx/InputParts/index.mjs.map +1 -1
- package/dist/jsx/InputParts/index.native.js +19 -1
- 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/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 +2 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +2 -0
- 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/circleGlyph.ts +6 -0
- package/src/Button/index.tsx +25 -7
- package/src/FloatingPanel/FloatingPanel.echoStretch.spec.tsx +67 -0
- package/src/FloatingPanel/FloatingPanel.iconEcho.spec.tsx +297 -0
- package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +280 -3
- package/src/FloatingPanel/FloatingPanel.seamlessCover.spec.tsx +237 -0
- package/src/FloatingPanel/PanelHeader.tsx +26 -0
- package/src/FloatingPanel/echoContext.ts +67 -0
- package/src/FloatingPanel/iconEcho.tsx +118 -0
- package/src/FloatingPanel/index.native.tsx +220 -12
- package/src/FloatingPanel/index.tsx +539 -109
- package/src/FloatingPanel/paintedBox.spec.ts +95 -0
- package/src/FloatingPanel/paintedBox.ts +75 -0
- 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 +111 -2
- package/src/FloatingPanel/pointAnchor.ts +56 -3
- package/src/FloatingPanel/useFloatingPanel.spec.tsx +124 -4
- package/src/FloatingPanel/useFloatingPanel.ts +112 -34
- package/src/InputParts/index.tsx +26 -0
- 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/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 +3 -0
- package/src/shared/floatingList.tsx +21 -5
- package/types/Button/circleGlyph.d.ts +7 -0
- package/types/Button/circleGlyph.d.ts.map +1 -0
- package/types/Button/index.d.ts +2 -6
- package/types/Button/index.d.ts.map +1 -1
- package/types/FloatingPanel/PanelHeader.d.ts +9 -0
- package/types/FloatingPanel/PanelHeader.d.ts.map +1 -0
- package/types/FloatingPanel/echoContext.d.ts +38 -0
- package/types/FloatingPanel/echoContext.d.ts.map +1 -0
- package/types/FloatingPanel/iconEcho.d.ts +29 -0
- package/types/FloatingPanel/iconEcho.d.ts.map +1 -0
- package/types/FloatingPanel/index.d.ts +69 -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/paintedBox.d.ts +29 -0
- package/types/FloatingPanel/paintedBox.d.ts.map +1 -0
- package/types/FloatingPanel/panelWidth.d.ts +71 -0
- package/types/FloatingPanel/panelWidth.d.ts.map +1 -0
- package/types/FloatingPanel/pointAnchor.d.ts +17 -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.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/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 +3 -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,118 @@
|
|
|
1
|
+
import { XIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { cloneElement, isValidElement, useState, type ReactElement, type ReactNode } from "react";
|
|
3
|
+
import { SurfaceContext, type SurfaceIntent } from "@multiplatform.one/theme";
|
|
4
|
+
import { useTheme, View } from "tamagui";
|
|
5
|
+
import { ICON_BUTTON_CIRCLE_GLYPH_RATIO } from "../Button/circleGlyph";
|
|
6
|
+
import { t } from "../shared/t";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* How a panel covering an icon-only trigger shows the pressed button (LC-112,
|
|
10
|
+
* FZ-8480 Round 37): in its exact spot, turned into an X that closes the
|
|
11
|
+
* panel, the way iOS morphs a + into an X. `"close"` lays the X over the
|
|
12
|
+
* content's header row (a panel's title shares the X's line); `"menu"` gives
|
|
13
|
+
* the X its own band above the rows, which run the panel's full width.
|
|
14
|
+
*/
|
|
15
|
+
export type IconEcho = "close" | "menu";
|
|
16
|
+
|
|
17
|
+
export const ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
|
|
18
|
+
|
|
19
|
+
const DROPPED_PROPS = [
|
|
20
|
+
"id",
|
|
21
|
+
"onLongPress",
|
|
22
|
+
"onKeyDown",
|
|
23
|
+
"onContextMenu",
|
|
24
|
+
"aria-haspopup",
|
|
25
|
+
"aria-expanded",
|
|
26
|
+
"aria-controls",
|
|
27
|
+
"aria-describedby",
|
|
28
|
+
"tooltip",
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* An X sits in the panel's corner over the content's header row, the way a
|
|
33
|
+
* sheet's close button shares the row with its title; a menu's X takes its
|
|
34
|
+
* own band above the rows. A panel that opened upward always gives the echo
|
|
35
|
+
* its own band.
|
|
36
|
+
*/
|
|
37
|
+
export function iconEchoOverlays(kind: IconEcho, up: boolean): boolean {
|
|
38
|
+
return kind === "close" && !up;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The pressed trigger drawn again over its panel as an X: the same element
|
|
43
|
+
* with the same size and plate and an X for its glyph, a fresh render that
|
|
44
|
+
* shares none of the consumer's refs. It renders on the trigger's own
|
|
45
|
+
* surface, so a bar button keeps its bar treatment (on iOS its own Liquid
|
|
46
|
+
* Glass circle) inside the panel. Pressing it closes the panel, and it reads
|
|
47
|
+
* "Close". A button (anything with an `icon`) is the control itself; any
|
|
48
|
+
* other trigger (an avatar) becomes an X in a circle of its size.
|
|
49
|
+
*/
|
|
50
|
+
export function iconEchoElement(
|
|
51
|
+
trigger: ReactNode,
|
|
52
|
+
kind: IconEcho,
|
|
53
|
+
onClose: () => void,
|
|
54
|
+
surface?: SurfaceIntent,
|
|
55
|
+
): ReactNode {
|
|
56
|
+
const echo = echoOf(trigger, kind, onClose);
|
|
57
|
+
if (echo == null || !surface) return echo;
|
|
58
|
+
return <SurfaceContext.Provider {...surface}>{echo}</SurfaceContext.Provider>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function echoOf(trigger: ReactNode, _kind: IconEcho, onClose: () => void): ReactNode {
|
|
62
|
+
if (!isValidElement(trigger)) return null;
|
|
63
|
+
const props = trigger.props as { icon?: unknown };
|
|
64
|
+
const label = t("Close");
|
|
65
|
+
const dropped = Object.fromEntries(DROPPED_PROPS.map((name) => [name, undefined]));
|
|
66
|
+
if (props.icon != null) {
|
|
67
|
+
return cloneElement(trigger as ReactElement<Record<string, unknown>>, {
|
|
68
|
+
...dropped,
|
|
69
|
+
ref: null,
|
|
70
|
+
icon: XIcon,
|
|
71
|
+
"aria-label": label,
|
|
72
|
+
onPress: onClose,
|
|
73
|
+
testID: ICON_ECHO_TEST_ID,
|
|
74
|
+
"data-testid": ICON_ECHO_TEST_ID,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return <CircleClose label={label} onClose={onClose} />;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The plate an avatar draws by default, so its X keeps the avatar's circle. */
|
|
81
|
+
const avatarPlate = "$selectedBackground";
|
|
82
|
+
|
|
83
|
+
/** The X's glyph before the circle has measured itself. */
|
|
84
|
+
const circleGlyphFallbackPx = 18;
|
|
85
|
+
|
|
86
|
+
/** An X in a circle the size of the trigger it replaces (an avatar). */
|
|
87
|
+
function CircleClose({ label, onClose }: { label: string; onClose: () => void }) {
|
|
88
|
+
const theme = useTheme();
|
|
89
|
+
const [side, setSide] = useState(0);
|
|
90
|
+
return (
|
|
91
|
+
<View
|
|
92
|
+
role="button"
|
|
93
|
+
aria-label={label}
|
|
94
|
+
tabIndex={0}
|
|
95
|
+
cursor="pointer"
|
|
96
|
+
width="100%"
|
|
97
|
+
height="100%"
|
|
98
|
+
borderRadius={100000}
|
|
99
|
+
backgroundColor={avatarPlate}
|
|
100
|
+
alignItems="center"
|
|
101
|
+
justifyContent="center"
|
|
102
|
+
pressStyle={{ opacity: 0.6 }}
|
|
103
|
+
onPress={onClose}
|
|
104
|
+
onLayout={(event) =>
|
|
105
|
+
setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height))
|
|
106
|
+
}
|
|
107
|
+
testID={ICON_ECHO_TEST_ID}
|
|
108
|
+
data-testid={ICON_ECHO_TEST_ID}
|
|
109
|
+
>
|
|
110
|
+
<XIcon
|
|
111
|
+
size={side > 0 ? Math.round(side * ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx}
|
|
112
|
+
weight="bold"
|
|
113
|
+
color={theme.selectedColor?.val ?? theme.color?.val}
|
|
114
|
+
aria-hidden
|
|
115
|
+
/>
|
|
116
|
+
</View>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -90,7 +90,12 @@ import {
|
|
|
90
90
|
type GestureResponderEvent,
|
|
91
91
|
} from "react-native";
|
|
92
92
|
import { SafeAreaInsetsContext, initialWindowMetrics } from "react-native-safe-area-context";
|
|
93
|
-
import {
|
|
93
|
+
import {
|
|
94
|
+
Surface,
|
|
95
|
+
SurfaceContext,
|
|
96
|
+
useResolvedKnobs,
|
|
97
|
+
motionDurationMs,
|
|
98
|
+
} from "@multiplatform.one/theme";
|
|
94
99
|
import { View, YStack } from "tamagui";
|
|
95
100
|
import { useInsideOverlay, useOverlayZIndex } from "../shared/overlayStack";
|
|
96
101
|
import { OverlayWindow } from "../shared/OverlayWindow";
|
|
@@ -98,7 +103,14 @@ import { t } from "../shared/t";
|
|
|
98
103
|
import { overlaySizeClass } from "../shared/overlaySizeClass";
|
|
99
104
|
import { useKeyboardInset } from "../shared/useKeyboardInset";
|
|
100
105
|
import type { FloatingPanelProps } from "./index";
|
|
101
|
-
import {
|
|
106
|
+
import { MENU_MIN_WIDTH, resolveCompactFace } from "./compactFace";
|
|
107
|
+
import { echoOffset, type PanelWidth, panelWidthBox, screenBounds } from "./panelWidth";
|
|
108
|
+
import {
|
|
109
|
+
echoHeaderBox,
|
|
110
|
+
PanelEchoContext,
|
|
111
|
+
PanelIconEchoBoxContext,
|
|
112
|
+
PanelTriggerRadiusContext,
|
|
113
|
+
} from "./echoContext";
|
|
102
114
|
import {
|
|
103
115
|
placeAtPoint,
|
|
104
116
|
placeBesideTrigger,
|
|
@@ -110,6 +122,7 @@ import {
|
|
|
110
122
|
import { RegularPanel } from "./RegularPanel";
|
|
111
123
|
import { panelViewportPadding, resolvePanelWidthMode } from "./useFloatingPanel";
|
|
112
124
|
import { TrailingActionOverlay, TriggerWithTrailingAction } from "./trailingAction";
|
|
125
|
+
import { iconEchoElement, iconEchoOverlays, type IconEcho } from "./iconEcho";
|
|
113
126
|
|
|
114
127
|
// Re-export the hook + constants so Select / Combobox / external consumers
|
|
115
128
|
// resolve identically on native (their floating cores are unused on device
|
|
@@ -164,13 +177,17 @@ export function FloatingPanel({
|
|
|
164
177
|
compactFace,
|
|
165
178
|
triggerRow,
|
|
166
179
|
triggerEcho = true,
|
|
180
|
+
coverAlign = "start",
|
|
181
|
+
iconEcho,
|
|
167
182
|
anchorMode,
|
|
183
|
+
panelWidth = "content",
|
|
168
184
|
sheet,
|
|
169
185
|
widthMode,
|
|
170
186
|
fitContent,
|
|
171
187
|
}: FloatingPanelProps) {
|
|
172
188
|
// The panel floats over the page: it never inherits a painted ancestor.
|
|
173
189
|
const { knobProps } = useResolvedKnobs({ painted: false });
|
|
190
|
+
const triggerSurface = SurfaceContext.useStyledContext();
|
|
174
191
|
const windowZIndex = useOverlayZIndex("sheet");
|
|
175
192
|
const children = (
|
|
176
193
|
<Surface painted={false} elevated>
|
|
@@ -233,6 +250,11 @@ export function FloatingPanel({
|
|
|
233
250
|
const anchored = asMenu || asRegular;
|
|
234
251
|
const triggerRef = useRef<RNView | null>(null);
|
|
235
252
|
const [anchor, setAnchor] = useState<TriggerRect | null>(null);
|
|
253
|
+
const [triggerRadius, setTriggerRadius] = useState<number | null>(null);
|
|
254
|
+
const reportTriggerRadius = useCallback(
|
|
255
|
+
(radius: number) => setTriggerRadius((prev) => (prev === radius ? prev : radius)),
|
|
256
|
+
[],
|
|
257
|
+
);
|
|
236
258
|
// The trigger's window rect, read each time the menu opens: it may have
|
|
237
259
|
// moved (a scrolled sheet) since the last open.
|
|
238
260
|
useLayoutEffect(() => {
|
|
@@ -590,7 +612,9 @@ export function FloatingPanel({
|
|
|
590
612
|
collapsable={false}
|
|
591
613
|
style={{ width: triggerSizing === "content" ? undefined : "100%" }}
|
|
592
614
|
>
|
|
593
|
-
<
|
|
615
|
+
<PanelTriggerRadiusContext.Provider value={reportTriggerRadius}>
|
|
616
|
+
<TriggerWithTrailingAction trigger={trigger} triggerEnd={triggerEnd} />
|
|
617
|
+
</PanelTriggerRadiusContext.Provider>
|
|
594
618
|
</RNView>
|
|
595
619
|
</Pressable>
|
|
596
620
|
<TrailingActionOverlay>{triggerEnd}</TrailingActionOverlay>
|
|
@@ -623,8 +647,17 @@ export function FloatingPanel({
|
|
|
623
647
|
Math.max(safeArea?.bottom ?? 0, keyboardInset) -
|
|
624
648
|
panelViewportPadding,
|
|
625
649
|
}}
|
|
626
|
-
echo={triggerEcho ? (triggerRow ?? trigger) : null}
|
|
650
|
+
echo={triggerEcho && !iconEcho ? (triggerRow ?? trigger) : null}
|
|
627
651
|
echoLabel={triggerA11y?.label}
|
|
652
|
+
iconEcho={
|
|
653
|
+
iconEcho && anchorMode !== "attach"
|
|
654
|
+
? iconEchoElement(trigger, iconEcho, close, triggerSurface)
|
|
655
|
+
: null
|
|
656
|
+
}
|
|
657
|
+
iconEchoKind={iconEcho}
|
|
658
|
+
coverAlign={anchorMode === "attach" ? "start" : coverAlign}
|
|
659
|
+
panelWidth={panelWidth}
|
|
660
|
+
triggerRadius={anchorMode === "attach" ? null : triggerRadius}
|
|
628
661
|
framePadding={framePadding}
|
|
629
662
|
frameGap={frameGap}
|
|
630
663
|
onBackdropPress={handleBackdropPress}
|
|
@@ -789,6 +822,11 @@ function TriggerMenuPanel({
|
|
|
789
822
|
bounds,
|
|
790
823
|
echo,
|
|
791
824
|
echoLabel,
|
|
825
|
+
iconEcho = null,
|
|
826
|
+
iconEchoKind = "menu",
|
|
827
|
+
coverAlign,
|
|
828
|
+
panelWidth,
|
|
829
|
+
triggerRadius,
|
|
792
830
|
framePadding,
|
|
793
831
|
frameGap,
|
|
794
832
|
onBackdropPress,
|
|
@@ -800,6 +838,12 @@ function TriggerMenuPanel({
|
|
|
800
838
|
bounds: PanelBounds;
|
|
801
839
|
echo: ReactNode;
|
|
802
840
|
echoLabel?: string;
|
|
841
|
+
/** LC-112 (FZ-8480): the icon trigger drawn again in its own spot. */
|
|
842
|
+
iconEcho?: ReactNode;
|
|
843
|
+
iconEchoKind?: IconEcho;
|
|
844
|
+
coverAlign: "start" | "auto";
|
|
845
|
+
panelWidth: PanelWidth;
|
|
846
|
+
triggerRadius: number | null;
|
|
803
847
|
framePadding: string;
|
|
804
848
|
frameGap: string | undefined;
|
|
805
849
|
onBackdropPress: () => void;
|
|
@@ -808,16 +852,63 @@ function TriggerMenuPanel({
|
|
|
808
852
|
}) {
|
|
809
853
|
const { knobProps } = useResolvedKnobs({ painted: false });
|
|
810
854
|
const [size, setSize] = useState<{ width: number; height: number } | null>(null);
|
|
855
|
+
// LC-112 width setting (FZ-8438 r3). `"content"` keeps the iOS pull-down's
|
|
856
|
+
// 250pt floor (FZ-8220), and no panel is narrower than an echoed trigger.
|
|
857
|
+
const room =
|
|
858
|
+
panelWidth === "screen" && anchor
|
|
859
|
+
? {
|
|
860
|
+
...bounds,
|
|
861
|
+
...screenBounds({
|
|
862
|
+
triggerLeft: anchor.x,
|
|
863
|
+
triggerRight: anchor.x + anchor.width,
|
|
864
|
+
boundsLeft: bounds.left,
|
|
865
|
+
boundsRight: bounds.right,
|
|
866
|
+
rtl: I18nManager.isRTL,
|
|
867
|
+
}),
|
|
868
|
+
}
|
|
869
|
+
: bounds;
|
|
870
|
+
const widthBox = panelWidthBox(panelWidth, {
|
|
871
|
+
trigger: anchor?.width ?? 0,
|
|
872
|
+
available: room.right - room.left,
|
|
873
|
+
echo: echo != null,
|
|
874
|
+
floor: Math.max(MENU_MIN_WIDTH, anchor?.width ?? 0),
|
|
875
|
+
});
|
|
811
876
|
const placement =
|
|
812
877
|
anchor && size
|
|
813
878
|
? (attach ? placeBesideTrigger : placeOverTrigger)({
|
|
814
879
|
trigger: anchor,
|
|
815
880
|
width: size.width,
|
|
816
881
|
height: size.height,
|
|
817
|
-
bounds,
|
|
882
|
+
bounds: room,
|
|
818
883
|
rtl: I18nManager.isRTL,
|
|
884
|
+
align: coverAlign,
|
|
885
|
+
pinned: iconEcho != null,
|
|
819
886
|
})
|
|
820
887
|
: null;
|
|
888
|
+
// LC-112 seamless cover: the menu is its trigger grown open, so it draws the
|
|
889
|
+
// trigger's corner arc at all four corners. A field reports its radius; an
|
|
890
|
+
// icon button with no echo is a circle or capsule, half its short side.
|
|
891
|
+
const half = anchor ? Math.min(anchor.width, anchor.height) / 2 : undefined;
|
|
892
|
+
const radius =
|
|
893
|
+
triggerRadius != null && half != null
|
|
894
|
+
? Math.min(triggerRadius, half)
|
|
895
|
+
: coverAlign === "auto" && half
|
|
896
|
+
? half
|
|
897
|
+
: undefined;
|
|
898
|
+
const borderWidth = Number(knobProps.elevatedSurface.borderWidth) || 0;
|
|
899
|
+
const echoOverlays = iconEchoOverlays(iconEchoKind, placement?.up ?? false);
|
|
900
|
+
// A panel slid along the screen (a `"screen"` or fixed width, or one pushed
|
|
901
|
+
// back inside the margins) keeps its echo on the trigger.
|
|
902
|
+
const echoShift =
|
|
903
|
+
anchor && placement
|
|
904
|
+
? echoOffset({
|
|
905
|
+
triggerLeft: anchor.x,
|
|
906
|
+
triggerRight: anchor.x + anchor.width,
|
|
907
|
+
panelLeft: placement.left,
|
|
908
|
+
panelWidth: placement.width,
|
|
909
|
+
rtl: I18nManager.isRTL,
|
|
910
|
+
})
|
|
911
|
+
: 0;
|
|
821
912
|
return (
|
|
822
913
|
<RNView style={StyleSheet.absoluteFill}>
|
|
823
914
|
<Pressable
|
|
@@ -837,25 +928,30 @@ function TriggerMenuPanel({
|
|
|
837
928
|
position: "absolute",
|
|
838
929
|
left: placement?.left ?? bounds.left,
|
|
839
930
|
top: placement?.top ?? bounds.top,
|
|
840
|
-
|
|
841
|
-
maxWidth: bounds.right - bounds.left,
|
|
931
|
+
...widthBox,
|
|
842
932
|
maxHeight: placement?.maxHeight ?? bounds.bottom - bounds.top,
|
|
843
933
|
opacity: placement ? 1 : 0,
|
|
844
934
|
}}
|
|
845
935
|
>
|
|
936
|
+
{/* FZ-8414: the shadow rides this unclipped frame; iOS drops the
|
|
937
|
+
shadow of a layer that also clips, and in dark the menu melted
|
|
938
|
+
into the page. The clip lives on the inner stack. */}
|
|
846
939
|
<YStack
|
|
847
940
|
testID="floating-panel-menu-surface"
|
|
848
941
|
{...knobProps.elevatedSurface}
|
|
942
|
+
{...(radius != null ? { borderRadius: radius } : undefined)}
|
|
849
943
|
flexShrink={1}
|
|
850
944
|
minHeight={0}
|
|
851
945
|
onAccessibilityEscape={onClose}
|
|
852
946
|
>
|
|
853
947
|
<YStack
|
|
854
948
|
testID="floating-panel-menu-clip"
|
|
855
|
-
borderRadius={knobProps.elevatedSurface.borderRadius}
|
|
856
|
-
overflow="hidden"
|
|
857
949
|
flexShrink={1}
|
|
858
950
|
minHeight={0}
|
|
951
|
+
overflow="hidden"
|
|
952
|
+
{...(radius != null
|
|
953
|
+
? { borderRadius: Math.max(0, radius - borderWidth) }
|
|
954
|
+
: { borderRadius: knobProps.elevatedSurface.borderRadius })}
|
|
859
955
|
>
|
|
860
956
|
{echo != null && anchor && anchor.height > 0 ? (
|
|
861
957
|
<Pressable
|
|
@@ -864,19 +960,63 @@ function TriggerMenuPanel({
|
|
|
864
960
|
accessibilityRole="button"
|
|
865
961
|
{...(echoLabel ? { accessibilityLabel: echoLabel } : undefined)}
|
|
866
962
|
aria-expanded
|
|
867
|
-
|
|
963
|
+
// The frame's border is inside the anchor box: pull the echo
|
|
964
|
+
// back over it so its content lands where the trigger's did.
|
|
965
|
+
// Exactly the trigger's box at the start edge: a menu wider than
|
|
966
|
+
// its trigger (the 250pt pull-down floor) must not stretch the
|
|
967
|
+
// echo and re-centre a pill's label (FZ-8438).
|
|
968
|
+
style={{
|
|
969
|
+
height: anchor.height,
|
|
970
|
+
width: anchor.width,
|
|
971
|
+
alignSelf: "flex-start",
|
|
972
|
+
margin: -borderWidth,
|
|
973
|
+
marginStart: echoShift - borderWidth,
|
|
974
|
+
marginBottom: 0,
|
|
975
|
+
justifyContent: "center",
|
|
976
|
+
}}
|
|
868
977
|
>
|
|
869
|
-
<RNView pointerEvents="none">
|
|
978
|
+
<RNView pointerEvents="none">
|
|
979
|
+
<PanelEchoContext.Provider value>{echo}</PanelEchoContext.Provider>
|
|
980
|
+
</RNView>
|
|
870
981
|
</Pressable>
|
|
871
982
|
) : null}
|
|
983
|
+
{iconEcho != null && anchor && !placement?.up && !echoOverlays ? (
|
|
984
|
+
<IconEchoBand anchor={anchor} shift={echoShift} borderWidth={borderWidth} edge="top">
|
|
985
|
+
{iconEcho}
|
|
986
|
+
</IconEchoBand>
|
|
987
|
+
) : null}
|
|
872
988
|
<RNScrollView
|
|
873
989
|
style={{ flexGrow: 0, flexShrink: 1 }}
|
|
874
990
|
keyboardShouldPersistTaps="handled"
|
|
875
991
|
>
|
|
876
992
|
<YStack padding={framePadding} gap={frameGap}>
|
|
877
|
-
|
|
993
|
+
<PanelIconEchoBoxContext.Provider
|
|
994
|
+
value={
|
|
995
|
+
iconEcho != null && anchor && placement && echoOverlays
|
|
996
|
+
? echoHeaderBox({
|
|
997
|
+
offset: echoShift,
|
|
998
|
+
width: anchor.width,
|
|
999
|
+
height: anchor.height,
|
|
1000
|
+
panelWidth: placement.width,
|
|
1001
|
+
rtl: I18nManager.isRTL,
|
|
1002
|
+
})
|
|
1003
|
+
: null
|
|
1004
|
+
}
|
|
1005
|
+
>
|
|
1006
|
+
{children}
|
|
1007
|
+
</PanelIconEchoBoxContext.Provider>
|
|
878
1008
|
</YStack>
|
|
879
1009
|
</RNScrollView>
|
|
1010
|
+
{iconEcho != null && anchor && (placement?.up || echoOverlays) ? (
|
|
1011
|
+
<IconEchoBand
|
|
1012
|
+
anchor={anchor}
|
|
1013
|
+
shift={echoShift}
|
|
1014
|
+
borderWidth={borderWidth}
|
|
1015
|
+
edge={echoOverlays ? "overlay" : "bottom"}
|
|
1016
|
+
>
|
|
1017
|
+
{iconEcho}
|
|
1018
|
+
</IconEchoBand>
|
|
1019
|
+
) : null}
|
|
880
1020
|
</YStack>
|
|
881
1021
|
</YStack>
|
|
882
1022
|
</RNView>
|
|
@@ -884,6 +1024,62 @@ function TriggerMenuPanel({
|
|
|
884
1024
|
);
|
|
885
1025
|
}
|
|
886
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* The band an icon trigger's echo rides (LC-112, FZ-8480): the trigger's
|
|
1029
|
+
* height on the edge the menu shares with it, outside the scroll view so the
|
|
1030
|
+
* rows scroll under it, and the button in the trigger's own box, pulled back
|
|
1031
|
+
* over the frame's border so it lands exactly where the trigger is.
|
|
1032
|
+
*/
|
|
1033
|
+
function IconEchoBand({
|
|
1034
|
+
anchor,
|
|
1035
|
+
shift,
|
|
1036
|
+
borderWidth,
|
|
1037
|
+
edge,
|
|
1038
|
+
children,
|
|
1039
|
+
}: {
|
|
1040
|
+
anchor: TriggerRect;
|
|
1041
|
+
shift: number;
|
|
1042
|
+
borderWidth: number;
|
|
1043
|
+
/** `"overlay"`: an X laid over the content's top corner, taking no height. */
|
|
1044
|
+
edge: "top" | "bottom" | "overlay";
|
|
1045
|
+
children: ReactNode;
|
|
1046
|
+
}) {
|
|
1047
|
+
return (
|
|
1048
|
+
<RNView
|
|
1049
|
+
testID="floating-panel-icon-echo-band"
|
|
1050
|
+
pointerEvents="box-none"
|
|
1051
|
+
style={
|
|
1052
|
+
edge === "overlay"
|
|
1053
|
+
? {
|
|
1054
|
+
position: "absolute",
|
|
1055
|
+
top: -borderWidth,
|
|
1056
|
+
start: -borderWidth,
|
|
1057
|
+
end: -borderWidth,
|
|
1058
|
+
height: anchor.height,
|
|
1059
|
+
zIndex: 1,
|
|
1060
|
+
}
|
|
1061
|
+
: {
|
|
1062
|
+
height: anchor.height,
|
|
1063
|
+
marginHorizontal: -borderWidth,
|
|
1064
|
+
...(edge === "top" ? { marginTop: -borderWidth } : { marginBottom: -borderWidth }),
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
>
|
|
1068
|
+
<RNView
|
|
1069
|
+
style={{
|
|
1070
|
+
width: anchor.width,
|
|
1071
|
+
height: anchor.height,
|
|
1072
|
+
marginStart: shift,
|
|
1073
|
+
alignItems: "flex-start",
|
|
1074
|
+
justifyContent: "flex-start",
|
|
1075
|
+
}}
|
|
1076
|
+
>
|
|
1077
|
+
{children}
|
|
1078
|
+
</RNView>
|
|
1079
|
+
</RNView>
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
887
1083
|
/**
|
|
888
1084
|
* The menu at the long-press point: measured once per open at its natural
|
|
889
1085
|
* size, then placed by the same rule as the web pointer menu. Later layouts
|
|
@@ -957,3 +1153,15 @@ function PointPanel({
|
|
|
957
1153
|
</RNView>
|
|
958
1154
|
);
|
|
959
1155
|
}
|
|
1156
|
+
|
|
1157
|
+
/** Web only: native echoes the trigger inside its own menu face. */
|
|
1158
|
+
export function TriggerEchoRow(_props: { [key: string]: unknown }): null {
|
|
1159
|
+
return null;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/** Web only: native draws its echo in place, so there is nothing to move. */
|
|
1163
|
+
export function placeEchoOverTrigger(
|
|
1164
|
+
_panelElement: unknown,
|
|
1165
|
+
_geometry: unknown,
|
|
1166
|
+
_options?: { stretch?: boolean },
|
|
1167
|
+
): void {}
|