@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
|
@@ -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,15 @@ 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
|
|
56
|
+
var import_echoContext = require("./echoContext.cjs");
|
|
57
|
+
var import_iconEcho = require("./iconEcho.cjs");
|
|
58
|
+
var import_paintedBox = require("./paintedBox.cjs");
|
|
53
59
|
var import_pointAnchor = require("./pointAnchor.cjs");
|
|
54
60
|
var import_nestedAction2 = require("./nestedAction.cjs");
|
|
55
61
|
var import_useFloatingPanel2 = require("./useFloatingPanel.cjs");
|
|
@@ -107,12 +113,40 @@ function panelTransformOrigin(placement) {
|
|
|
107
113
|
return `${originY} ${originX}`;
|
|
108
114
|
}
|
|
109
115
|
const ECHO_STRIPPED_ATTRIBUTES = ["id", "for", "name", "data-testid", "aria-label", "aria-controls", "aria-labelledby", "aria-describedby", "aria-activedescendant"];
|
|
116
|
+
function childPath(root, node) {
|
|
117
|
+
const path = [];
|
|
118
|
+
for (let at = node; at && at !== root; at = at.parentElement) {
|
|
119
|
+
const parent = at.parentElement;
|
|
120
|
+
if (!parent) return null;
|
|
121
|
+
path.unshift(Array.prototype.indexOf.call(parent.children, at));
|
|
122
|
+
}
|
|
123
|
+
return path;
|
|
124
|
+
}
|
|
125
|
+
function followPath(root, path) {
|
|
126
|
+
let at = root;
|
|
127
|
+
for (const index of path) at = at?.children[index];
|
|
128
|
+
return at ?? null;
|
|
129
|
+
}
|
|
130
|
+
function dropEchoChrome(source, snapshot) {
|
|
131
|
+
const painted = (0, import_useFloatingPanel.paintedCornerBox)(source);
|
|
132
|
+
const path = painted ? childPath(source, painted) : null;
|
|
133
|
+
const frame = path ? followPath(snapshot, path) : null;
|
|
134
|
+
if (!frame) return;
|
|
135
|
+
frame.style.setProperty("border-color", "transparent", "important");
|
|
136
|
+
frame.style.setProperty("background-color", "transparent", "important");
|
|
137
|
+
frame.style.setProperty("background-image", "none", "important");
|
|
138
|
+
frame.style.setProperty("box-shadow", "none", "important");
|
|
139
|
+
frame.style.setProperty("outline", "none", "important");
|
|
140
|
+
frame.setAttribute("data-fp-echo-frame", "");
|
|
141
|
+
}
|
|
110
142
|
function TriggerEchoRow({
|
|
111
143
|
sourceRef,
|
|
112
144
|
onPress,
|
|
113
145
|
children,
|
|
114
146
|
anchorRect,
|
|
115
|
-
source
|
|
147
|
+
source,
|
|
148
|
+
presentational = false,
|
|
149
|
+
edge = "top"
|
|
116
150
|
}) {
|
|
117
151
|
const rowRef = (0, import_react.useRef)(null);
|
|
118
152
|
const visualRef = (0, import_react.useRef)(null);
|
|
@@ -124,17 +158,31 @@ function TriggerEchoRow({
|
|
|
124
158
|
const control = source2.matches(PANEL_FOCUSABLE) ? source2 : source2.querySelector(PANEL_FOCUSABLE);
|
|
125
159
|
const labelledBy = control?.getAttribute("aria-labelledby");
|
|
126
160
|
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);
|
|
161
|
+
if (!presentational) row.setAttribute("aria-label", label);
|
|
128
162
|
const rect = anchorRect ?? source2.getBoundingClientRect();
|
|
129
|
-
row.
|
|
163
|
+
const grown = Number(row.getAttribute("data-fp-echo-stretched")) || 0;
|
|
164
|
+
const stretched = grown > rect.width;
|
|
165
|
+
row.style.width = `${stretched ? grown : rect.width}px`;
|
|
130
166
|
row.style.height = `${rect.height}px`;
|
|
131
167
|
const rtl = isRtl(source2);
|
|
132
168
|
row.style.alignSelf = "flex-start";
|
|
133
169
|
const frameStyle = row.parentElement ? getComputedStyle(row.parentElement) : null;
|
|
134
|
-
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
135
170
|
row.style.position = "sticky";
|
|
136
|
-
|
|
171
|
+
if (edge === "bottom") {
|
|
172
|
+
row.style.order = "1";
|
|
173
|
+
row.style.marginTop = "";
|
|
174
|
+
row.style.top = "";
|
|
175
|
+
row.style.marginBottom = `${-(parseFloat(frameStyle?.borderBottomWidth || "0") || 0)}px`;
|
|
176
|
+
row.style.bottom = row.style.marginBottom;
|
|
177
|
+
} else {
|
|
178
|
+
row.style.order = "";
|
|
179
|
+
row.style.marginBottom = "";
|
|
180
|
+
row.style.bottom = "";
|
|
181
|
+
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
182
|
+
row.style.top = row.style.marginTop;
|
|
183
|
+
}
|
|
137
184
|
row.style.zIndex = "1";
|
|
185
|
+
row.style.backgroundColor = frameStyle?.backgroundColor ?? "";
|
|
138
186
|
row.style.marginLeft = rtl ? "" : `${-(parseFloat(frameStyle?.borderLeftWidth || "0") || 0)}px`;
|
|
139
187
|
row.style.marginRight = rtl ? `${-(parseFloat(frameStyle?.borderRightWidth || "0") || 0)}px` : "";
|
|
140
188
|
const snapshot = children == null ? source2.cloneNode(true) : visualRef.current;
|
|
@@ -151,8 +199,11 @@ function TriggerEchoRow({
|
|
|
151
199
|
node.setAttribute("tabindex", "-1");
|
|
152
200
|
}
|
|
153
201
|
}
|
|
202
|
+
if (children == null) dropEchoChrome(source2, snapshot);
|
|
154
203
|
snapshot.setAttribute("inert", "");
|
|
155
204
|
snapshot.setAttribute("aria-hidden", "true");
|
|
205
|
+
snapshot.style.width = stretched ? "100%" : "";
|
|
206
|
+
snapshot.style.maxWidth = stretched ? "none" : "";
|
|
156
207
|
if (children == null) visualRef.current?.replaceChildren(snapshot);
|
|
157
208
|
};
|
|
158
209
|
sync();
|
|
@@ -160,12 +211,16 @@ function TriggerEchoRow({
|
|
|
160
211
|
const observer = new ResizeObserver(sync);
|
|
161
212
|
observer.observe(source2);
|
|
162
213
|
return () => observer.disconnect();
|
|
163
|
-
}, [sourceRef, source, children, anchorRect]);
|
|
214
|
+
}, [sourceRef, source, children, anchorRect, presentational, edge]);
|
|
164
215
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
165
216
|
ref: rowRef,
|
|
166
217
|
"data-fp-trigger-row": "",
|
|
167
|
-
|
|
168
|
-
|
|
218
|
+
...(presentational ? {
|
|
219
|
+
"aria-hidden": true
|
|
220
|
+
} : {
|
|
221
|
+
role: "button",
|
|
222
|
+
"aria-expanded": true
|
|
223
|
+
}),
|
|
169
224
|
tabIndex: -1,
|
|
170
225
|
cursor: "pointer",
|
|
171
226
|
onPress,
|
|
@@ -181,6 +236,108 @@ function TriggerEchoRow({
|
|
|
181
236
|
})
|
|
182
237
|
});
|
|
183
238
|
}
|
|
239
|
+
const ECHO_FIELD = 'input, textarea, [role="combobox"], [aria-haspopup="listbox"]';
|
|
240
|
+
function placeEchoOverTrigger(panelElement, geometry, {
|
|
241
|
+
stretch = false
|
|
242
|
+
} = {}) {
|
|
243
|
+
const row = panelElement.querySelector("[data-fp-trigger-row]");
|
|
244
|
+
if (!row) return;
|
|
245
|
+
const offset = (0, import_panelWidth.echoOffset)(geometry);
|
|
246
|
+
const x = geometry.rtl ? -offset : offset;
|
|
247
|
+
row.style.translate = Math.abs(x) < 0.5 ? "" : `${x}px 0`;
|
|
248
|
+
const triggerWidth = geometry.triggerRight - geometry.triggerLeft;
|
|
249
|
+
const grown = geometry.panelWidth - offset;
|
|
250
|
+
const field = stretch && row.querySelector(ECHO_FIELD) != null;
|
|
251
|
+
const visual = row.firstElementChild;
|
|
252
|
+
const snapshot = visual?.firstElementChild;
|
|
253
|
+
if (field && grown > triggerWidth + 0.5) {
|
|
254
|
+
row.style.width = `${grown}px`;
|
|
255
|
+
row.setAttribute("data-fp-echo-stretched", String(grown));
|
|
256
|
+
for (const node of [visual, snapshot]) {
|
|
257
|
+
if (!node) continue;
|
|
258
|
+
node.style.width = "100%";
|
|
259
|
+
node.style.maxWidth = "none";
|
|
260
|
+
}
|
|
261
|
+
} else if (row.hasAttribute("data-fp-echo-stretched")) {
|
|
262
|
+
row.removeAttribute("data-fp-echo-stretched");
|
|
263
|
+
row.style.width = `${triggerWidth}px`;
|
|
264
|
+
for (const node of [visual, snapshot]) {
|
|
265
|
+
if (!node) continue;
|
|
266
|
+
node.style.width = "";
|
|
267
|
+
node.style.maxWidth = "";
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function IconEchoRow({
|
|
272
|
+
children
|
|
273
|
+
}) {
|
|
274
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
275
|
+
"data-fp-icon-echo": "",
|
|
276
|
+
flexShrink: 0,
|
|
277
|
+
alignSelf: "stretch",
|
|
278
|
+
pointerEvents: "box-none",
|
|
279
|
+
style: {
|
|
280
|
+
order: -1,
|
|
281
|
+
position: "sticky",
|
|
282
|
+
zIndex: 1
|
|
283
|
+
},
|
|
284
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
285
|
+
"data-fp-icon-echo-box": "",
|
|
286
|
+
alignItems: "flex-start",
|
|
287
|
+
justifyContent: "flex-start",
|
|
288
|
+
children
|
|
289
|
+
})
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function placeIconEcho(panelElement, {
|
|
293
|
+
offset,
|
|
294
|
+
width,
|
|
295
|
+
height,
|
|
296
|
+
up,
|
|
297
|
+
overlay,
|
|
298
|
+
group = null
|
|
299
|
+
}) {
|
|
300
|
+
const row = panelElement.querySelector("[data-fp-icon-echo]");
|
|
301
|
+
const box = row?.querySelector("[data-fp-icon-echo-box]");
|
|
302
|
+
if (!row || !box) return;
|
|
303
|
+
const frame = getComputedStyle(panelElement);
|
|
304
|
+
const border = side => parseFloat(frame[`border${side}Width`] || "0") || 0;
|
|
305
|
+
const rtl = panelElement.dir === "rtl";
|
|
306
|
+
row.style.order = up ? "1" : "-1";
|
|
307
|
+
row.style.height = `${height}px`;
|
|
308
|
+
row.style.backgroundColor = overlay ? "transparent" : frame.backgroundColor;
|
|
309
|
+
if (up) {
|
|
310
|
+
row.style.top = "";
|
|
311
|
+
row.style.marginTop = "";
|
|
312
|
+
row.style.marginBottom = `${-border("Bottom")}px`;
|
|
313
|
+
row.style.bottom = row.style.marginBottom;
|
|
314
|
+
} else {
|
|
315
|
+
row.style.bottom = "";
|
|
316
|
+
row.style.marginTop = `${-border("Top")}px`;
|
|
317
|
+
row.style.marginBottom = overlay ? `${-(height - border("Top"))}px` : "";
|
|
318
|
+
row.style.top = row.style.marginTop;
|
|
319
|
+
}
|
|
320
|
+
row.setAttribute("data-fp-icon-echo", overlay ? "overlay" : "band");
|
|
321
|
+
if (group) {
|
|
322
|
+
row.style.height = `${group.height}px`;
|
|
323
|
+
if (!up && overlay) row.style.marginBottom = `${-(group.height - border("Top"))}px`;
|
|
324
|
+
}
|
|
325
|
+
row.style.marginLeft = `${-border("Left")}px`;
|
|
326
|
+
row.style.marginRight = `${-border("Right")}px`;
|
|
327
|
+
box.style.width = `${width}px`;
|
|
328
|
+
box.style.height = `${height}px`;
|
|
329
|
+
box.style.marginLeft = rtl ? "" : `${offset}px`;
|
|
330
|
+
box.style.marginRight = rtl ? `${offset}px` : "";
|
|
331
|
+
box.style.alignSelf = "flex-start";
|
|
332
|
+
box.style.marginTop = group ? `${group.top}px` : "";
|
|
333
|
+
box.style.position = "relative";
|
|
334
|
+
box.style.zIndex = "1";
|
|
335
|
+
}
|
|
336
|
+
function layoutParentOf(element) {
|
|
337
|
+
let parent = element?.parentElement ?? null;
|
|
338
|
+
while (parent && getComputedStyle(parent).display === "contents") parent = parent.parentElement;
|
|
339
|
+
return parent;
|
|
340
|
+
}
|
|
184
341
|
const overlayFloatBreakpoint = import_theme2.OVERLAY_BREAKPOINT;
|
|
185
342
|
function subscribeViewport(listener) {
|
|
186
343
|
if (!import_tamagui.isWeb || typeof window === "undefined") return () => {};
|
|
@@ -367,10 +524,13 @@ function FloatingPanelWeb({
|
|
|
367
524
|
sizing = "grow",
|
|
368
525
|
widthMode,
|
|
369
526
|
fitContent,
|
|
527
|
+
panelWidth,
|
|
370
528
|
contentPadding = "default",
|
|
371
529
|
openOn = "press",
|
|
372
530
|
cover = true,
|
|
373
531
|
triggerEcho = true,
|
|
532
|
+
coverAlign = "start",
|
|
533
|
+
iconEcho,
|
|
374
534
|
triggerRow,
|
|
375
535
|
anchorRect,
|
|
376
536
|
clampCollisions = false,
|
|
@@ -380,6 +540,11 @@ function FloatingPanelWeb({
|
|
|
380
540
|
const [collisionSheet, setCollisionSheet] = (0, import_react.useState)(false);
|
|
381
541
|
const isFill = sizing === "fill";
|
|
382
542
|
const isContextMenu = openOn === "contextmenu";
|
|
543
|
+
const pointMenu = isContextMenu && sheetProps.anchorMode !== "cover-trigger";
|
|
544
|
+
const showIconEcho = cover && !pointMenu && iconEcho != null;
|
|
545
|
+
const triggerSurface = import_theme2.SurfaceContext.useStyledContext();
|
|
546
|
+
const iconEchoUpRef = (0, import_react.useRef)(false);
|
|
547
|
+
const [echoBox, setEchoBox] = (0, import_react.useState)(null);
|
|
383
548
|
const overlayStyleRef = (0, import_react.useRef)(null);
|
|
384
549
|
const pinnedTopRef = (0, import_react.useRef)(0);
|
|
385
550
|
const pinnedHeightRef = (0, import_react.useRef)(0);
|
|
@@ -391,6 +556,7 @@ function FloatingPanelWeb({
|
|
|
391
556
|
const contentRef = (0, import_react.useRef)(null);
|
|
392
557
|
const anchorPointRef = (0, import_react.useRef)(null);
|
|
393
558
|
const pointPlacementRef = (0, import_react.useRef)(null);
|
|
559
|
+
const coverAlignEndRef = (0, import_react.useRef)(false);
|
|
394
560
|
const repositionFnRef = (0, import_react.useRef)(null);
|
|
395
561
|
const resetPosition = () => {
|
|
396
562
|
overlayStyleRef.current = null;
|
|
@@ -410,8 +576,10 @@ function FloatingPanelWeb({
|
|
|
410
576
|
wheelGrowRef: isFill ? void 0 : grownRef,
|
|
411
577
|
widthMode: widthMode ?? (isContextMenu && fitContent === void 0 ? "fit-content" : void 0),
|
|
412
578
|
fitContent,
|
|
413
|
-
freeOverlay:
|
|
579
|
+
freeOverlay: pointMenu,
|
|
414
580
|
cover,
|
|
581
|
+
panelWidth,
|
|
582
|
+
echo: cover && triggerEcho && !pointMenu,
|
|
415
583
|
onBeforeOpen: resetPosition
|
|
416
584
|
});
|
|
417
585
|
(0, import_focusManagement.useReturnFocusOnClose)(open, skipReturnFocusRef, panel.refs.floating);
|
|
@@ -435,7 +603,7 @@ function FloatingPanelWeb({
|
|
|
435
603
|
if (pinnedTopRef.current === 0 && pinnedHeightRef.current === 0) {
|
|
436
604
|
dropdownElement.scrollTop = 0;
|
|
437
605
|
}
|
|
438
|
-
const point =
|
|
606
|
+
const point = pointMenu ? anchorPointRef.current ?? (0, import_pointAnchor.referenceCornerPoint)(trig, isRtl()) : null;
|
|
439
607
|
const measured = anchorRect ? {
|
|
440
608
|
...anchorRect,
|
|
441
609
|
top: anchorRect.y,
|
|
@@ -464,19 +632,77 @@ function FloatingPanelWeb({
|
|
|
464
632
|
const viewportRight = viewportLeft + (viewport?.width ?? (document.documentElement.clientWidth || window.innerWidth));
|
|
465
633
|
const viewportBottom = viewportTop + (viewport?.height ?? window.innerHeight);
|
|
466
634
|
dropdownElement.style.left = `${viewportLeft - containingBlock.left}px`;
|
|
635
|
+
const groupSurface = showIconEcho ? (0, import_paintedBox.groupSurfaceOf)(trig) : null;
|
|
636
|
+
const groupBox = groupSurface?.getBoundingClientRect() ?? null;
|
|
637
|
+
if (showIconEcho) dropdownElement.style.minWidth = groupBox ? `${groupBox.width}px` : "";
|
|
467
638
|
const layoutStyle = getComputedStyle(dropdownElement);
|
|
468
639
|
const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
|
|
469
640
|
const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
|
|
470
641
|
const width = Math.max(layoutWidth || dropdownElement.offsetWidth, measured.width);
|
|
471
|
-
const
|
|
642
|
+
const startLeft = rtl ? measured.right - width : measured.left;
|
|
643
|
+
const endLeft = rtl ? measured.left : measured.right - width;
|
|
644
|
+
const iconCover = coverAlign === "auto";
|
|
645
|
+
const startFree = rtl ? startLeft >= viewportLeft + import_useFloatingPanel.panelViewportPadding : startLeft + width <= viewportRight - import_useFloatingPanel.panelViewportPadding;
|
|
646
|
+
const endFree = rtl ? endLeft + width <= viewportRight - import_useFloatingPanel.panelViewportPadding : endLeft >= viewportLeft + import_useFloatingPanel.panelViewportPadding;
|
|
647
|
+
let alignEnd = iconCover && !startFree && endFree;
|
|
648
|
+
const slides = (0, import_panelWidth.slidesAlongScreen)(panelWidth);
|
|
649
|
+
const margins = {
|
|
650
|
+
boundsLeft: viewportLeft + import_useFloatingPanel.panelViewportPadding,
|
|
651
|
+
boundsRight: viewportRight - import_useFloatingPanel.panelViewportPadding
|
|
652
|
+
};
|
|
653
|
+
const room = panelWidth === "screen" ? (0, import_panelWidth.screenBounds)({
|
|
654
|
+
triggerLeft: measured.left,
|
|
655
|
+
triggerRight: measured.right,
|
|
656
|
+
...margins,
|
|
657
|
+
rtl
|
|
658
|
+
}) : {
|
|
659
|
+
left: margins.boundsLeft,
|
|
660
|
+
right: margins.boundsRight
|
|
661
|
+
};
|
|
662
|
+
const left = slides ? (0, import_panelWidth.panelLeftForWidth)({
|
|
663
|
+
triggerLeft: measured.left,
|
|
664
|
+
triggerRight: measured.right,
|
|
665
|
+
width,
|
|
666
|
+
boundsLeft: room.left,
|
|
667
|
+
boundsRight: room.right,
|
|
668
|
+
rtl
|
|
669
|
+
}) : alignEnd ? endLeft : startLeft;
|
|
472
670
|
const firstActionHeight = contentRef.current?.querySelector(PANEL_FOCUSABLE)?.getBoundingClientRect().height || Number(panel.knobProps.menuRow.minHeight) || totalContentHeight;
|
|
473
671
|
const bodyStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
474
672
|
const bodyPadding = (parseFloat(bodyStyle?.paddingTop || "0") || 0) + (parseFloat(bodyStyle?.paddingBottom || "0") || 0);
|
|
475
673
|
const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
|
|
476
674
|
let placedTop = measured.top;
|
|
477
675
|
let placedLeft = left;
|
|
478
|
-
|
|
479
|
-
|
|
676
|
+
let placedMaxHeight = null;
|
|
677
|
+
iconEchoUpRef.current = false;
|
|
678
|
+
if (showIconEcho && measured.width > 0 && measured.height > 0) {
|
|
679
|
+
const painted = groupBox ?? (0, import_paintedBox.paintedTriggerBox)(trig, measured);
|
|
680
|
+
const placed = (0, import_pointAnchor.placeOverTrigger)({
|
|
681
|
+
trigger: {
|
|
682
|
+
x: painted.left,
|
|
683
|
+
y: groupBox ? groupBox.top : measured.top,
|
|
684
|
+
width: painted.right - painted.left,
|
|
685
|
+
height: groupBox ? groupBox.height : measured.height
|
|
686
|
+
},
|
|
687
|
+
width,
|
|
688
|
+
height: totalContentHeight,
|
|
689
|
+
bounds: {
|
|
690
|
+
top: viewportTop + import_useFloatingPanel.panelViewportPadding,
|
|
691
|
+
left: viewportLeft + import_useFloatingPanel.panelViewportPadding,
|
|
692
|
+
right: viewportRight - import_useFloatingPanel.panelViewportPadding,
|
|
693
|
+
bottom: viewportBottom - import_useFloatingPanel.panelViewportPadding
|
|
694
|
+
},
|
|
695
|
+
rtl,
|
|
696
|
+
align: coverAlign,
|
|
697
|
+
pinned: true
|
|
698
|
+
});
|
|
699
|
+
placedTop = placed.top;
|
|
700
|
+
if (!slides) placedLeft = placed.left;
|
|
701
|
+
alignEnd = placed.end;
|
|
702
|
+
placedMaxHeight = placed.maxHeight;
|
|
703
|
+
iconEchoUpRef.current = placed.up;
|
|
704
|
+
} else 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)) {
|
|
705
|
+
if (!clampCollisions && !iconCover) {
|
|
480
706
|
dropdownElement.style.visibility = "hidden";
|
|
481
707
|
setCollisionSheet(true);
|
|
482
708
|
return;
|
|
@@ -496,19 +722,58 @@ function FloatingPanelWeb({
|
|
|
496
722
|
right: viewportRight - import_useFloatingPanel.panelViewportPadding,
|
|
497
723
|
bottom: viewportBottom - import_useFloatingPanel.panelViewportPadding
|
|
498
724
|
},
|
|
499
|
-
rtl
|
|
725
|
+
rtl,
|
|
726
|
+
align: coverAlign
|
|
500
727
|
});
|
|
501
728
|
placedTop = placed.top;
|
|
502
|
-
placedLeft = placed.left;
|
|
729
|
+
if (!slides) placedLeft = placed.left;
|
|
730
|
+
alignEnd = placed.end;
|
|
503
731
|
}
|
|
732
|
+
coverAlignEndRef.current = alignEnd;
|
|
733
|
+
const echoStart = (0, import_panelWidth.echoOffset)({
|
|
734
|
+
triggerLeft: measured.left,
|
|
735
|
+
triggerRight: measured.right,
|
|
736
|
+
panelLeft: placedLeft,
|
|
737
|
+
panelWidth: width,
|
|
738
|
+
rtl
|
|
739
|
+
});
|
|
740
|
+
const echoOverlays = iconEcho != null && (0, import_iconEcho.iconEchoOverlays)(iconEcho, iconEchoUpRef.current);
|
|
741
|
+
const nextEchoBox = showIconEcho && echoOverlays ? (0, import_echoContext.echoHeaderBox)({
|
|
742
|
+
offset: echoStart,
|
|
743
|
+
width: measured.width,
|
|
744
|
+
height: measured.height,
|
|
745
|
+
panelWidth: width,
|
|
746
|
+
rtl
|
|
747
|
+
}) : null;
|
|
748
|
+
setEchoBox(previous => (0, import_echoContext.sameEchoBox)(previous, nextEchoBox) ? previous : nextEchoBox);
|
|
749
|
+
placeIconEcho(dropdownElement, {
|
|
750
|
+
offset: echoStart,
|
|
751
|
+
width: measured.width,
|
|
752
|
+
height: measured.height,
|
|
753
|
+
up: iconEchoUpRef.current,
|
|
754
|
+
overlay: echoOverlays,
|
|
755
|
+
group: groupSurface && groupBox ? {
|
|
756
|
+
top: measured.top - groupBox.top,
|
|
757
|
+
height: groupBox.height
|
|
758
|
+
} : null
|
|
759
|
+
});
|
|
760
|
+
placeEchoOverTrigger(dropdownElement, {
|
|
761
|
+
triggerLeft: measured.left,
|
|
762
|
+
triggerRight: measured.right,
|
|
763
|
+
panelLeft: placedLeft,
|
|
764
|
+
panelWidth: width,
|
|
765
|
+
rtl
|
|
766
|
+
}, {
|
|
767
|
+
stretch: panelWidth !== void 0
|
|
768
|
+
});
|
|
504
769
|
const top2 = placedTop - containingBlock.top;
|
|
505
770
|
const cssLeft2 = placedLeft - containingBlock.left;
|
|
506
|
-
const maxHeight = Math.max(0, viewportBottom - import_useFloatingPanel.panelViewportPadding - placedTop);
|
|
771
|
+
const maxHeight = placedMaxHeight ?? Math.max(0, viewportBottom - import_useFloatingPanel.panelViewportPadding - placedTop);
|
|
507
772
|
dropdownElement.style.top = `${top2}px`;
|
|
508
773
|
dropdownElement.style.left = `${cssLeft2}px`;
|
|
509
774
|
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
510
775
|
dropdownElement.dir = rtl ? "rtl" : "ltr";
|
|
511
|
-
dropdownElement.style.transformOrigin =
|
|
776
|
+
dropdownElement.style.transformOrigin = `${iconEchoUpRef.current ? "bottom" : "top"} ${rtl !== alignEnd ? "right" : "left"}`;
|
|
512
777
|
dropdownElement.style.visibility = "visible";
|
|
513
778
|
overlayStyleRef.current = {
|
|
514
779
|
top: top2,
|
|
@@ -639,7 +904,7 @@ function FloatingPanelWeb({
|
|
|
639
904
|
});
|
|
640
905
|
}
|
|
641
906
|
});
|
|
642
|
-
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
907
|
+
}, [isFill, isContextMenu, pointMenu, showIconEcho, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
643
908
|
repositionFnRef.current = repositionOverlay;
|
|
644
909
|
const click = (0, import_react2.useClick)(panel.context, {
|
|
645
910
|
event: "mousedown",
|
|
@@ -685,7 +950,7 @@ function FloatingPanelWeb({
|
|
|
685
950
|
const handleScroll = (0, import_react.useCallback)(event => {
|
|
686
951
|
const el = event.target;
|
|
687
952
|
panel.updateArrows(el);
|
|
688
|
-
if (isFill || cover && !
|
|
953
|
+
if (isFill || cover && !pointMenu) return;
|
|
689
954
|
if (panel.initializingRef.current) {
|
|
690
955
|
lastScrollTopRef.current = el.scrollTop;
|
|
691
956
|
return;
|
|
@@ -708,7 +973,7 @@ function FloatingPanelWeb({
|
|
|
708
973
|
grownRef.current = true;
|
|
709
974
|
repositionFnRef.current?.();
|
|
710
975
|
}
|
|
711
|
-
}, [isFill, cover,
|
|
976
|
+
}, [isFill, cover, pointMenu, panel.updateArrows]);
|
|
712
977
|
const webTransition = panel.panelTransition;
|
|
713
978
|
const {
|
|
714
979
|
style: elevatedSurfaceStyle,
|
|
@@ -750,6 +1015,17 @@ function FloatingPanelWeb({
|
|
|
750
1015
|
onContextMenu: openFromContextMenu
|
|
751
1016
|
} : {})
|
|
752
1017
|
});
|
|
1018
|
+
const contentSized = sheetProps.triggerSizing === "content";
|
|
1019
|
+
const [hugSelf, setHugSelf] = (0, import_react.useState)(contentSized ? "flex-start" : void 0);
|
|
1020
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
1021
|
+
if (!contentSized) {
|
|
1022
|
+
setHugSelf(void 0);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
const parent = layoutParentOf(panel.triggerRef.current);
|
|
1026
|
+
const align = parent ? getComputedStyle(parent).alignItems : "stretch";
|
|
1027
|
+
setHugSelf(align === "stretch" || align === "normal" ? "flex-start" : void 0);
|
|
1028
|
+
}, [contentSized, panel.triggerRef]);
|
|
753
1029
|
for (const name of ["onMouseDown", "onClick", "onKeyDown", "onKeyUp"]) {
|
|
754
1030
|
const handler = referenceProps[name];
|
|
755
1031
|
if (typeof handler === "function") {
|
|
@@ -763,7 +1039,7 @@ function FloatingPanelWeb({
|
|
|
763
1039
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
764
1040
|
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
765
1041
|
...referenceProps,
|
|
766
|
-
alignSelf:
|
|
1042
|
+
alignSelf: hugSelf,
|
|
767
1043
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
768
1044
|
opacity: disabled ? 0.5 : 1,
|
|
769
1045
|
"data-fp-reference": "",
|
|
@@ -779,71 +1055,80 @@ function FloatingPanelWeb({
|
|
|
779
1055
|
children
|
|
780
1056
|
}), panel.mounted && !collisionSheet && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PanelPortal.PanelPortal, {
|
|
781
1057
|
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
|
-
|
|
1058
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Theme, {
|
|
1059
|
+
name: "alt1",
|
|
1060
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
1061
|
+
...getFloatingProps({
|
|
1062
|
+
ref: panel.refs.setFloating,
|
|
1063
|
+
style: {
|
|
1064
|
+
...elevatedSurfaceStyle,
|
|
1065
|
+
position: panel.strategy,
|
|
1066
|
+
top: overlayStyleRef.current?.top ?? panel.y ?? 0,
|
|
1067
|
+
left: overlayStyleRef.current?.left ?? panel.x ?? 0,
|
|
1068
|
+
scrollbarWidth: "none",
|
|
1069
|
+
zIndex: panelZIndex,
|
|
1070
|
+
overflow: "auto",
|
|
1071
|
+
...(cover && !pointMenu ? {
|
|
1072
|
+
overflowX: "hidden"
|
|
1073
|
+
} : {}),
|
|
1074
|
+
...panel.floatingStyleRef.current,
|
|
1075
|
+
...(overlayStyleRef.current ? {
|
|
1076
|
+
maxHeight: overlayStyleRef.current.maxHeight
|
|
1077
|
+
} : {}),
|
|
1078
|
+
opacity: panel.visible ? 1 : 0,
|
|
1079
|
+
// `none`, not scale(1): any transform makes this panel the
|
|
1080
|
+
// containing block of a nested panel's `position: fixed`, which
|
|
1081
|
+
// then positions against this box and is clipped by its scroll.
|
|
1082
|
+
transform: panel.visible ? "none" : "scale(0.96)",
|
|
1083
|
+
transition: webTransition,
|
|
1084
|
+
transformOrigin: cover && !pointMenu ? `${iconEchoUpRef.current ? "bottom" : "top"} ${isRtl(panel.triggerRef.current) !== coverAlignEndRef.current ? "right" : "left"}` : panelTransformOrigin(pointPlacementRef.current ? `${pointPlacementRef.current.dropup ? "top" : "bottom"}-${pointPlacementRef.current.alignEnd ? "end" : "start"}` : panel.placement)
|
|
1085
|
+
},
|
|
1086
|
+
onScroll: handleScroll,
|
|
1087
|
+
onTransitionEnd: event => {
|
|
1088
|
+
if (event.target === event.currentTarget && (event.propertyName === "height" || event.propertyName === "max-height")) {
|
|
1089
|
+
panel.updateArrows(event.currentTarget);
|
|
1090
|
+
}
|
|
812
1091
|
}
|
|
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
|
-
|
|
1092
|
+
}),
|
|
1093
|
+
"data-testid": "floating-panel-viewport",
|
|
1094
|
+
"data-fp-panel": "",
|
|
1095
|
+
...panelChromeFocus,
|
|
1096
|
+
pointerEvents: panel.visible ? "auto" : "none",
|
|
1097
|
+
...elevatedSurfaceProps,
|
|
1098
|
+
borderRadius: panel.dropdownRadius,
|
|
1099
|
+
paddingVertical: 0,
|
|
1100
|
+
paddingBottom: panel.coverCornerInset || 0,
|
|
1101
|
+
children: [pointMenu || !cover || !triggerEcho || showIconEcho ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(TriggerEchoRow, {
|
|
1102
|
+
sourceRef: panel.triggerRef,
|
|
1103
|
+
source: trigger,
|
|
1104
|
+
anchorRect,
|
|
1105
|
+
onPress: () => onOpenChange(false),
|
|
1106
|
+
children: triggerRow
|
|
1107
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floatingList.ScrollArrow, {
|
|
1108
|
+
direction: "up",
|
|
1109
|
+
scrollRef: panel.refs.floating,
|
|
1110
|
+
visible: panel.arrowUp,
|
|
1111
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
1112
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
1113
|
+
ref: contentRef,
|
|
1114
|
+
...(contentPadding !== "none" ? panel.knobProps.panelPadding : void 0),
|
|
1115
|
+
...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
|
|
1116
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_overlayStack.OverlayStackProvider, {
|
|
1117
|
+
zIndex: panelZIndex,
|
|
1118
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_echoContext.PanelIconEchoBoxContext.Provider, {
|
|
1119
|
+
value: echoBox,
|
|
1120
|
+
children
|
|
1121
|
+
})
|
|
1122
|
+
})
|
|
1123
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floatingList.ScrollArrow, {
|
|
1124
|
+
direction: "down",
|
|
1125
|
+
scrollRef: panel.refs.floating,
|
|
1126
|
+
visible: panel.arrowDown,
|
|
1127
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
1128
|
+
}), showIconEcho && iconEcho ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(IconEchoRow, {
|
|
1129
|
+
children: (0, import_iconEcho.iconEchoElement)(trigger, iconEcho, () => onOpenChange(false), triggerSurface)
|
|
1130
|
+
}) : null]
|
|
1131
|
+
})
|
|
847
1132
|
})
|
|
848
1133
|
})]
|
|
849
1134
|
});
|