@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
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { transitionProps } from "@multiplatform.one/theme";
|
|
2
2
|
import { cloneElement, isValidElement, useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
-
import { OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, Surface, useResolvedKnobs, wasKeyboardFocus, ensureKeyboardModalityTracking, motionDurationMs } from "@multiplatform.one/theme";
|
|
4
|
-
import { isWeb, Sheet, View, YStack } from "tamagui";
|
|
3
|
+
import { OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, Surface, SurfaceContext, useResolvedKnobs, wasKeyboardFocus, ensureKeyboardModalityTracking, motionDurationMs } from "@multiplatform.one/theme";
|
|
4
|
+
import { isWeb, Sheet, Theme, View, YStack } from "tamagui";
|
|
5
5
|
import { useClick, useDismiss, useInteractions } from "@floating-ui/react";
|
|
6
6
|
import { ScrollArrow } from "../shared/floatingList.mjs";
|
|
7
7
|
import { TrailingActionOverlay, TriggerWithTrailingAction } from "./trailingAction.mjs";
|
|
8
8
|
import { useReturnFocusOnClose, useSheetModalFocus } from "../shared/focusManagement.mjs";
|
|
9
9
|
import { useSheetEscapeDismiss } from "../shared/useSheetEscapeDismiss.mjs";
|
|
10
|
-
import { useFloatingPanel, panelViewportPadding } from "./useFloatingPanel.mjs";
|
|
10
|
+
import { useFloatingPanel, panelViewportPadding, paintedCornerBox } from "./useFloatingPanel.mjs";
|
|
11
|
+
import { fixedContainingBlockOrigin } from "./containingBlock.mjs";
|
|
12
|
+
import { echoOffset, panelLeftForWidth, screenBounds, slidesAlongScreen } from "./panelWidth.mjs";
|
|
11
13
|
import { OverlayStackProvider, useInsideOverlay, useOverlayZIndex } from "../shared/overlayStack.mjs";
|
|
12
14
|
import { resolveCompactFace } from "./compactFace.mjs";
|
|
13
15
|
import { isNestedPanelAction } from "./nestedAction.mjs";
|
|
14
16
|
import { PanelPortal } from "./PanelPortal.mjs";
|
|
15
|
-
import {
|
|
17
|
+
import { echoHeaderBox, PanelIconEchoBoxContext, sameEchoBox } from "./echoContext.mjs";
|
|
18
|
+
import { iconEchoElement, iconEchoOverlays } from "./iconEcho.mjs";
|
|
19
|
+
import { groupSurfaceOf, paintedTriggerBox } from "./paintedBox.mjs";
|
|
16
20
|
import { contextMenuPoint, placeOverTrigger, pointOpensUp, pointPanelLeft, referenceCornerPoint } from "./pointAnchor.mjs";
|
|
17
21
|
import { floatingPanelActionProps, isNestedPanelAction as isNestedPanelAction2 } from "./nestedAction.mjs";
|
|
18
22
|
import { useFloatingPanel as useFloatingPanel2, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding as panelViewportPadding2, panelAnchorOffset, resolvePanelWidthMode } from "./useFloatingPanel.mjs";
|
|
@@ -70,12 +74,40 @@ function panelTransformOrigin(placement) {
|
|
|
70
74
|
return `${originY} ${originX}`;
|
|
71
75
|
}
|
|
72
76
|
const ECHO_STRIPPED_ATTRIBUTES = ["id", "for", "name", "data-testid", "aria-label", "aria-controls", "aria-labelledby", "aria-describedby", "aria-activedescendant"];
|
|
77
|
+
function childPath(root, node) {
|
|
78
|
+
const path = [];
|
|
79
|
+
for (let at = node; at && at !== root; at = at.parentElement) {
|
|
80
|
+
const parent = at.parentElement;
|
|
81
|
+
if (!parent) return null;
|
|
82
|
+
path.unshift(Array.prototype.indexOf.call(parent.children, at));
|
|
83
|
+
}
|
|
84
|
+
return path;
|
|
85
|
+
}
|
|
86
|
+
function followPath(root, path) {
|
|
87
|
+
let at = root;
|
|
88
|
+
for (const index of path) at = at?.children[index];
|
|
89
|
+
return at ?? null;
|
|
90
|
+
}
|
|
91
|
+
function dropEchoChrome(source, snapshot) {
|
|
92
|
+
const painted = paintedCornerBox(source);
|
|
93
|
+
const path = painted ? childPath(source, painted) : null;
|
|
94
|
+
const frame = path ? followPath(snapshot, path) : null;
|
|
95
|
+
if (!frame) return;
|
|
96
|
+
frame.style.setProperty("border-color", "transparent", "important");
|
|
97
|
+
frame.style.setProperty("background-color", "transparent", "important");
|
|
98
|
+
frame.style.setProperty("background-image", "none", "important");
|
|
99
|
+
frame.style.setProperty("box-shadow", "none", "important");
|
|
100
|
+
frame.style.setProperty("outline", "none", "important");
|
|
101
|
+
frame.setAttribute("data-fp-echo-frame", "");
|
|
102
|
+
}
|
|
73
103
|
function TriggerEchoRow({
|
|
74
104
|
sourceRef,
|
|
75
105
|
onPress,
|
|
76
106
|
children,
|
|
77
107
|
anchorRect,
|
|
78
|
-
source
|
|
108
|
+
source,
|
|
109
|
+
presentational = false,
|
|
110
|
+
edge = "top"
|
|
79
111
|
}) {
|
|
80
112
|
const rowRef = useRef(null);
|
|
81
113
|
const visualRef = useRef(null);
|
|
@@ -87,17 +119,31 @@ function TriggerEchoRow({
|
|
|
87
119
|
const control = source2.matches(PANEL_FOCUSABLE) ? source2 : source2.querySelector(PANEL_FOCUSABLE);
|
|
88
120
|
const labelledBy = control?.getAttribute("aria-labelledby");
|
|
89
121
|
const label = control?.getAttribute("aria-label") || labelledBy?.split(/\s+/).map(id => document.getElementById(id)?.textContent || "").join(" ") || control?.textContent || source2.textContent || "";
|
|
90
|
-
row.setAttribute("aria-label", label);
|
|
122
|
+
if (!presentational) row.setAttribute("aria-label", label);
|
|
91
123
|
const rect = anchorRect ?? source2.getBoundingClientRect();
|
|
92
|
-
row.
|
|
124
|
+
const grown = Number(row.getAttribute("data-fp-echo-stretched")) || 0;
|
|
125
|
+
const stretched = grown > rect.width;
|
|
126
|
+
row.style.width = `${stretched ? grown : rect.width}px`;
|
|
93
127
|
row.style.height = `${rect.height}px`;
|
|
94
128
|
const rtl = isRtl(source2);
|
|
95
129
|
row.style.alignSelf = "flex-start";
|
|
96
130
|
const frameStyle = row.parentElement ? getComputedStyle(row.parentElement) : null;
|
|
97
|
-
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
98
131
|
row.style.position = "sticky";
|
|
99
|
-
|
|
132
|
+
if (edge === "bottom") {
|
|
133
|
+
row.style.order = "1";
|
|
134
|
+
row.style.marginTop = "";
|
|
135
|
+
row.style.top = "";
|
|
136
|
+
row.style.marginBottom = `${-(parseFloat(frameStyle?.borderBottomWidth || "0") || 0)}px`;
|
|
137
|
+
row.style.bottom = row.style.marginBottom;
|
|
138
|
+
} else {
|
|
139
|
+
row.style.order = "";
|
|
140
|
+
row.style.marginBottom = "";
|
|
141
|
+
row.style.bottom = "";
|
|
142
|
+
row.style.marginTop = `${-(parseFloat(frameStyle?.borderTopWidth || "0") || 0)}px`;
|
|
143
|
+
row.style.top = row.style.marginTop;
|
|
144
|
+
}
|
|
100
145
|
row.style.zIndex = "1";
|
|
146
|
+
row.style.backgroundColor = frameStyle?.backgroundColor ?? "";
|
|
101
147
|
row.style.marginLeft = rtl ? "" : `${-(parseFloat(frameStyle?.borderLeftWidth || "0") || 0)}px`;
|
|
102
148
|
row.style.marginRight = rtl ? `${-(parseFloat(frameStyle?.borderRightWidth || "0") || 0)}px` : "";
|
|
103
149
|
const snapshot = children == null ? source2.cloneNode(true) : visualRef.current;
|
|
@@ -114,8 +160,11 @@ function TriggerEchoRow({
|
|
|
114
160
|
node.setAttribute("tabindex", "-1");
|
|
115
161
|
}
|
|
116
162
|
}
|
|
163
|
+
if (children == null) dropEchoChrome(source2, snapshot);
|
|
117
164
|
snapshot.setAttribute("inert", "");
|
|
118
165
|
snapshot.setAttribute("aria-hidden", "true");
|
|
166
|
+
snapshot.style.width = stretched ? "100%" : "";
|
|
167
|
+
snapshot.style.maxWidth = stretched ? "none" : "";
|
|
119
168
|
if (children == null) visualRef.current?.replaceChildren(snapshot);
|
|
120
169
|
};
|
|
121
170
|
sync();
|
|
@@ -123,12 +172,16 @@ function TriggerEchoRow({
|
|
|
123
172
|
const observer = new ResizeObserver(sync);
|
|
124
173
|
observer.observe(source2);
|
|
125
174
|
return () => observer.disconnect();
|
|
126
|
-
}, [sourceRef, source, children, anchorRect]);
|
|
175
|
+
}, [sourceRef, source, children, anchorRect, presentational, edge]);
|
|
127
176
|
return /* @__PURE__ */jsx(View, {
|
|
128
177
|
ref: rowRef,
|
|
129
178
|
"data-fp-trigger-row": "",
|
|
130
|
-
|
|
131
|
-
|
|
179
|
+
...(presentational ? {
|
|
180
|
+
"aria-hidden": true
|
|
181
|
+
} : {
|
|
182
|
+
role: "button",
|
|
183
|
+
"aria-expanded": true
|
|
184
|
+
}),
|
|
132
185
|
tabIndex: -1,
|
|
133
186
|
cursor: "pointer",
|
|
134
187
|
onPress,
|
|
@@ -144,6 +197,108 @@ function TriggerEchoRow({
|
|
|
144
197
|
})
|
|
145
198
|
});
|
|
146
199
|
}
|
|
200
|
+
const ECHO_FIELD = 'input, textarea, [role="combobox"], [aria-haspopup="listbox"]';
|
|
201
|
+
function placeEchoOverTrigger(panelElement, geometry, {
|
|
202
|
+
stretch = false
|
|
203
|
+
} = {}) {
|
|
204
|
+
const row = panelElement.querySelector("[data-fp-trigger-row]");
|
|
205
|
+
if (!row) return;
|
|
206
|
+
const offset = echoOffset(geometry);
|
|
207
|
+
const x = geometry.rtl ? -offset : offset;
|
|
208
|
+
row.style.translate = Math.abs(x) < 0.5 ? "" : `${x}px 0`;
|
|
209
|
+
const triggerWidth = geometry.triggerRight - geometry.triggerLeft;
|
|
210
|
+
const grown = geometry.panelWidth - offset;
|
|
211
|
+
const field = stretch && row.querySelector(ECHO_FIELD) != null;
|
|
212
|
+
const visual = row.firstElementChild;
|
|
213
|
+
const snapshot = visual?.firstElementChild;
|
|
214
|
+
if (field && grown > triggerWidth + 0.5) {
|
|
215
|
+
row.style.width = `${grown}px`;
|
|
216
|
+
row.setAttribute("data-fp-echo-stretched", String(grown));
|
|
217
|
+
for (const node of [visual, snapshot]) {
|
|
218
|
+
if (!node) continue;
|
|
219
|
+
node.style.width = "100%";
|
|
220
|
+
node.style.maxWidth = "none";
|
|
221
|
+
}
|
|
222
|
+
} else if (row.hasAttribute("data-fp-echo-stretched")) {
|
|
223
|
+
row.removeAttribute("data-fp-echo-stretched");
|
|
224
|
+
row.style.width = `${triggerWidth}px`;
|
|
225
|
+
for (const node of [visual, snapshot]) {
|
|
226
|
+
if (!node) continue;
|
|
227
|
+
node.style.width = "";
|
|
228
|
+
node.style.maxWidth = "";
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function IconEchoRow({
|
|
233
|
+
children
|
|
234
|
+
}) {
|
|
235
|
+
return /* @__PURE__ */jsx(View, {
|
|
236
|
+
"data-fp-icon-echo": "",
|
|
237
|
+
flexShrink: 0,
|
|
238
|
+
alignSelf: "stretch",
|
|
239
|
+
pointerEvents: "box-none",
|
|
240
|
+
style: {
|
|
241
|
+
order: -1,
|
|
242
|
+
position: "sticky",
|
|
243
|
+
zIndex: 1
|
|
244
|
+
},
|
|
245
|
+
children: /* @__PURE__ */jsx(View, {
|
|
246
|
+
"data-fp-icon-echo-box": "",
|
|
247
|
+
alignItems: "flex-start",
|
|
248
|
+
justifyContent: "flex-start",
|
|
249
|
+
children
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function placeIconEcho(panelElement, {
|
|
254
|
+
offset,
|
|
255
|
+
width,
|
|
256
|
+
height,
|
|
257
|
+
up,
|
|
258
|
+
overlay,
|
|
259
|
+
group = null
|
|
260
|
+
}) {
|
|
261
|
+
const row = panelElement.querySelector("[data-fp-icon-echo]");
|
|
262
|
+
const box = row?.querySelector("[data-fp-icon-echo-box]");
|
|
263
|
+
if (!row || !box) return;
|
|
264
|
+
const frame = getComputedStyle(panelElement);
|
|
265
|
+
const border = side => parseFloat(frame[`border${side}Width`] || "0") || 0;
|
|
266
|
+
const rtl = panelElement.dir === "rtl";
|
|
267
|
+
row.style.order = up ? "1" : "-1";
|
|
268
|
+
row.style.height = `${height}px`;
|
|
269
|
+
row.style.backgroundColor = overlay ? "transparent" : frame.backgroundColor;
|
|
270
|
+
if (up) {
|
|
271
|
+
row.style.top = "";
|
|
272
|
+
row.style.marginTop = "";
|
|
273
|
+
row.style.marginBottom = `${-border("Bottom")}px`;
|
|
274
|
+
row.style.bottom = row.style.marginBottom;
|
|
275
|
+
} else {
|
|
276
|
+
row.style.bottom = "";
|
|
277
|
+
row.style.marginTop = `${-border("Top")}px`;
|
|
278
|
+
row.style.marginBottom = overlay ? `${-(height - border("Top"))}px` : "";
|
|
279
|
+
row.style.top = row.style.marginTop;
|
|
280
|
+
}
|
|
281
|
+
row.setAttribute("data-fp-icon-echo", overlay ? "overlay" : "band");
|
|
282
|
+
if (group) {
|
|
283
|
+
row.style.height = `${group.height}px`;
|
|
284
|
+
if (!up && overlay) row.style.marginBottom = `${-(group.height - border("Top"))}px`;
|
|
285
|
+
}
|
|
286
|
+
row.style.marginLeft = `${-border("Left")}px`;
|
|
287
|
+
row.style.marginRight = `${-border("Right")}px`;
|
|
288
|
+
box.style.width = `${width}px`;
|
|
289
|
+
box.style.height = `${height}px`;
|
|
290
|
+
box.style.marginLeft = rtl ? "" : `${offset}px`;
|
|
291
|
+
box.style.marginRight = rtl ? `${offset}px` : "";
|
|
292
|
+
box.style.alignSelf = "flex-start";
|
|
293
|
+
box.style.marginTop = group ? `${group.top}px` : "";
|
|
294
|
+
box.style.position = "relative";
|
|
295
|
+
box.style.zIndex = "1";
|
|
296
|
+
}
|
|
297
|
+
function layoutParentOf(element) {
|
|
298
|
+
let parent = element?.parentElement ?? null;
|
|
299
|
+
while (parent && getComputedStyle(parent).display === "contents") parent = parent.parentElement;
|
|
300
|
+
return parent;
|
|
301
|
+
}
|
|
147
302
|
const overlayFloatBreakpoint = OVERLAY_BREAKPOINT;
|
|
148
303
|
function subscribeViewport(listener) {
|
|
149
304
|
if (!isWeb || typeof window === "undefined") return () => {};
|
|
@@ -330,10 +485,13 @@ function FloatingPanelWeb({
|
|
|
330
485
|
sizing = "grow",
|
|
331
486
|
widthMode,
|
|
332
487
|
fitContent,
|
|
488
|
+
panelWidth,
|
|
333
489
|
contentPadding = "default",
|
|
334
490
|
openOn = "press",
|
|
335
491
|
cover = true,
|
|
336
492
|
triggerEcho = true,
|
|
493
|
+
coverAlign = "start",
|
|
494
|
+
iconEcho,
|
|
337
495
|
triggerRow,
|
|
338
496
|
anchorRect,
|
|
339
497
|
clampCollisions = false,
|
|
@@ -343,6 +501,11 @@ function FloatingPanelWeb({
|
|
|
343
501
|
const [collisionSheet, setCollisionSheet] = useState(false);
|
|
344
502
|
const isFill = sizing === "fill";
|
|
345
503
|
const isContextMenu = openOn === "contextmenu";
|
|
504
|
+
const pointMenu = isContextMenu && sheetProps.anchorMode !== "cover-trigger";
|
|
505
|
+
const showIconEcho = cover && !pointMenu && iconEcho != null;
|
|
506
|
+
const triggerSurface = SurfaceContext.useStyledContext();
|
|
507
|
+
const iconEchoUpRef = useRef(false);
|
|
508
|
+
const [echoBox, setEchoBox] = useState(null);
|
|
346
509
|
const overlayStyleRef = useRef(null);
|
|
347
510
|
const pinnedTopRef = useRef(0);
|
|
348
511
|
const pinnedHeightRef = useRef(0);
|
|
@@ -354,6 +517,7 @@ function FloatingPanelWeb({
|
|
|
354
517
|
const contentRef = useRef(null);
|
|
355
518
|
const anchorPointRef = useRef(null);
|
|
356
519
|
const pointPlacementRef = useRef(null);
|
|
520
|
+
const coverAlignEndRef = useRef(false);
|
|
357
521
|
const repositionFnRef = useRef(null);
|
|
358
522
|
const resetPosition = () => {
|
|
359
523
|
overlayStyleRef.current = null;
|
|
@@ -373,8 +537,10 @@ function FloatingPanelWeb({
|
|
|
373
537
|
wheelGrowRef: isFill ? void 0 : grownRef,
|
|
374
538
|
widthMode: widthMode ?? (isContextMenu && fitContent === void 0 ? "fit-content" : void 0),
|
|
375
539
|
fitContent,
|
|
376
|
-
freeOverlay:
|
|
540
|
+
freeOverlay: pointMenu,
|
|
377
541
|
cover,
|
|
542
|
+
panelWidth,
|
|
543
|
+
echo: cover && triggerEcho && !pointMenu,
|
|
378
544
|
onBeforeOpen: resetPosition
|
|
379
545
|
});
|
|
380
546
|
useReturnFocusOnClose(open, skipReturnFocusRef, panel.refs.floating);
|
|
@@ -398,7 +564,7 @@ function FloatingPanelWeb({
|
|
|
398
564
|
if (pinnedTopRef.current === 0 && pinnedHeightRef.current === 0) {
|
|
399
565
|
dropdownElement.scrollTop = 0;
|
|
400
566
|
}
|
|
401
|
-
const point =
|
|
567
|
+
const point = pointMenu ? anchorPointRef.current ?? referenceCornerPoint(trig, isRtl()) : null;
|
|
402
568
|
const measured = anchorRect ? {
|
|
403
569
|
...anchorRect,
|
|
404
570
|
top: anchorRect.y,
|
|
@@ -427,19 +593,77 @@ function FloatingPanelWeb({
|
|
|
427
593
|
const viewportRight = viewportLeft + (viewport?.width ?? (document.documentElement.clientWidth || window.innerWidth));
|
|
428
594
|
const viewportBottom = viewportTop + (viewport?.height ?? window.innerHeight);
|
|
429
595
|
dropdownElement.style.left = `${viewportLeft - containingBlock.left}px`;
|
|
596
|
+
const groupSurface = showIconEcho ? groupSurfaceOf(trig) : null;
|
|
597
|
+
const groupBox = groupSurface?.getBoundingClientRect() ?? null;
|
|
598
|
+
if (showIconEcho) dropdownElement.style.minWidth = groupBox ? `${groupBox.width}px` : "";
|
|
430
599
|
const layoutStyle = getComputedStyle(dropdownElement);
|
|
431
600
|
const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
|
|
432
601
|
const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
|
|
433
602
|
const width = Math.max(layoutWidth || dropdownElement.offsetWidth, measured.width);
|
|
434
|
-
const
|
|
603
|
+
const startLeft = rtl ? measured.right - width : measured.left;
|
|
604
|
+
const endLeft = rtl ? measured.left : measured.right - width;
|
|
605
|
+
const iconCover = coverAlign === "auto";
|
|
606
|
+
const startFree = rtl ? startLeft >= viewportLeft + panelViewportPadding : startLeft + width <= viewportRight - panelViewportPadding;
|
|
607
|
+
const endFree = rtl ? endLeft + width <= viewportRight - panelViewportPadding : endLeft >= viewportLeft + panelViewportPadding;
|
|
608
|
+
let alignEnd = iconCover && !startFree && endFree;
|
|
609
|
+
const slides = slidesAlongScreen(panelWidth);
|
|
610
|
+
const margins = {
|
|
611
|
+
boundsLeft: viewportLeft + panelViewportPadding,
|
|
612
|
+
boundsRight: viewportRight - panelViewportPadding
|
|
613
|
+
};
|
|
614
|
+
const room = panelWidth === "screen" ? screenBounds({
|
|
615
|
+
triggerLeft: measured.left,
|
|
616
|
+
triggerRight: measured.right,
|
|
617
|
+
...margins,
|
|
618
|
+
rtl
|
|
619
|
+
}) : {
|
|
620
|
+
left: margins.boundsLeft,
|
|
621
|
+
right: margins.boundsRight
|
|
622
|
+
};
|
|
623
|
+
const left = slides ? panelLeftForWidth({
|
|
624
|
+
triggerLeft: measured.left,
|
|
625
|
+
triggerRight: measured.right,
|
|
626
|
+
width,
|
|
627
|
+
boundsLeft: room.left,
|
|
628
|
+
boundsRight: room.right,
|
|
629
|
+
rtl
|
|
630
|
+
}) : alignEnd ? endLeft : startLeft;
|
|
435
631
|
const firstActionHeight = contentRef.current?.querySelector(PANEL_FOCUSABLE)?.getBoundingClientRect().height || Number(panel.knobProps.menuRow.minHeight) || totalContentHeight;
|
|
436
632
|
const bodyStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
437
633
|
const bodyPadding = (parseFloat(bodyStyle?.paddingTop || "0") || 0) + (parseFloat(bodyStyle?.paddingBottom || "0") || 0);
|
|
438
634
|
const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
|
|
439
635
|
let placedTop = measured.top;
|
|
440
636
|
let placedLeft = left;
|
|
441
|
-
|
|
442
|
-
|
|
637
|
+
let placedMaxHeight = null;
|
|
638
|
+
iconEchoUpRef.current = false;
|
|
639
|
+
if (showIconEcho && measured.width > 0 && measured.height > 0) {
|
|
640
|
+
const painted = groupBox ?? paintedTriggerBox(trig, measured);
|
|
641
|
+
const placed = placeOverTrigger({
|
|
642
|
+
trigger: {
|
|
643
|
+
x: painted.left,
|
|
644
|
+
y: groupBox ? groupBox.top : measured.top,
|
|
645
|
+
width: painted.right - painted.left,
|
|
646
|
+
height: groupBox ? groupBox.height : measured.height
|
|
647
|
+
},
|
|
648
|
+
width,
|
|
649
|
+
height: totalContentHeight,
|
|
650
|
+
bounds: {
|
|
651
|
+
top: viewportTop + panelViewportPadding,
|
|
652
|
+
left: viewportLeft + panelViewportPadding,
|
|
653
|
+
right: viewportRight - panelViewportPadding,
|
|
654
|
+
bottom: viewportBottom - panelViewportPadding
|
|
655
|
+
},
|
|
656
|
+
rtl,
|
|
657
|
+
align: coverAlign,
|
|
658
|
+
pinned: true
|
|
659
|
+
});
|
|
660
|
+
placedTop = placed.top;
|
|
661
|
+
if (!slides) placedLeft = placed.left;
|
|
662
|
+
alignEnd = placed.end;
|
|
663
|
+
placedMaxHeight = placed.maxHeight;
|
|
664
|
+
iconEchoUpRef.current = placed.up;
|
|
665
|
+
} else if (measured.width > 0 && measured.height > 0 && (!slides && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - panelViewportPadding)) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - panelViewportPadding)) {
|
|
666
|
+
if (!clampCollisions && !iconCover) {
|
|
443
667
|
dropdownElement.style.visibility = "hidden";
|
|
444
668
|
setCollisionSheet(true);
|
|
445
669
|
return;
|
|
@@ -459,19 +683,58 @@ function FloatingPanelWeb({
|
|
|
459
683
|
right: viewportRight - panelViewportPadding,
|
|
460
684
|
bottom: viewportBottom - panelViewportPadding
|
|
461
685
|
},
|
|
462
|
-
rtl
|
|
686
|
+
rtl,
|
|
687
|
+
align: coverAlign
|
|
463
688
|
});
|
|
464
689
|
placedTop = placed.top;
|
|
465
|
-
placedLeft = placed.left;
|
|
690
|
+
if (!slides) placedLeft = placed.left;
|
|
691
|
+
alignEnd = placed.end;
|
|
466
692
|
}
|
|
693
|
+
coverAlignEndRef.current = alignEnd;
|
|
694
|
+
const echoStart = echoOffset({
|
|
695
|
+
triggerLeft: measured.left,
|
|
696
|
+
triggerRight: measured.right,
|
|
697
|
+
panelLeft: placedLeft,
|
|
698
|
+
panelWidth: width,
|
|
699
|
+
rtl
|
|
700
|
+
});
|
|
701
|
+
const echoOverlays = iconEcho != null && iconEchoOverlays(iconEcho, iconEchoUpRef.current);
|
|
702
|
+
const nextEchoBox = showIconEcho && echoOverlays ? echoHeaderBox({
|
|
703
|
+
offset: echoStart,
|
|
704
|
+
width: measured.width,
|
|
705
|
+
height: measured.height,
|
|
706
|
+
panelWidth: width,
|
|
707
|
+
rtl
|
|
708
|
+
}) : null;
|
|
709
|
+
setEchoBox(previous => sameEchoBox(previous, nextEchoBox) ? previous : nextEchoBox);
|
|
710
|
+
placeIconEcho(dropdownElement, {
|
|
711
|
+
offset: echoStart,
|
|
712
|
+
width: measured.width,
|
|
713
|
+
height: measured.height,
|
|
714
|
+
up: iconEchoUpRef.current,
|
|
715
|
+
overlay: echoOverlays,
|
|
716
|
+
group: groupSurface && groupBox ? {
|
|
717
|
+
top: measured.top - groupBox.top,
|
|
718
|
+
height: groupBox.height
|
|
719
|
+
} : null
|
|
720
|
+
});
|
|
721
|
+
placeEchoOverTrigger(dropdownElement, {
|
|
722
|
+
triggerLeft: measured.left,
|
|
723
|
+
triggerRight: measured.right,
|
|
724
|
+
panelLeft: placedLeft,
|
|
725
|
+
panelWidth: width,
|
|
726
|
+
rtl
|
|
727
|
+
}, {
|
|
728
|
+
stretch: panelWidth !== void 0
|
|
729
|
+
});
|
|
467
730
|
const top2 = placedTop - containingBlock.top;
|
|
468
731
|
const cssLeft2 = placedLeft - containingBlock.left;
|
|
469
|
-
const maxHeight = Math.max(0, viewportBottom - panelViewportPadding - placedTop);
|
|
732
|
+
const maxHeight = placedMaxHeight ?? Math.max(0, viewportBottom - panelViewportPadding - placedTop);
|
|
470
733
|
dropdownElement.style.top = `${top2}px`;
|
|
471
734
|
dropdownElement.style.left = `${cssLeft2}px`;
|
|
472
735
|
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
473
736
|
dropdownElement.dir = rtl ? "rtl" : "ltr";
|
|
474
|
-
dropdownElement.style.transformOrigin =
|
|
737
|
+
dropdownElement.style.transformOrigin = `${iconEchoUpRef.current ? "bottom" : "top"} ${rtl !== alignEnd ? "right" : "left"}`;
|
|
475
738
|
dropdownElement.style.visibility = "visible";
|
|
476
739
|
overlayStyleRef.current = {
|
|
477
740
|
top: top2,
|
|
@@ -602,7 +865,7 @@ function FloatingPanelWeb({
|
|
|
602
865
|
});
|
|
603
866
|
}
|
|
604
867
|
});
|
|
605
|
-
}, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
868
|
+
}, [isFill, isContextMenu, pointMenu, showIconEcho, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
|
|
606
869
|
repositionFnRef.current = repositionOverlay;
|
|
607
870
|
const click = useClick(panel.context, {
|
|
608
871
|
event: "mousedown",
|
|
@@ -648,7 +911,7 @@ function FloatingPanelWeb({
|
|
|
648
911
|
const handleScroll = useCallback(event => {
|
|
649
912
|
const el = event.target;
|
|
650
913
|
panel.updateArrows(el);
|
|
651
|
-
if (isFill || cover && !
|
|
914
|
+
if (isFill || cover && !pointMenu) return;
|
|
652
915
|
if (panel.initializingRef.current) {
|
|
653
916
|
lastScrollTopRef.current = el.scrollTop;
|
|
654
917
|
return;
|
|
@@ -671,7 +934,7 @@ function FloatingPanelWeb({
|
|
|
671
934
|
grownRef.current = true;
|
|
672
935
|
repositionFnRef.current?.();
|
|
673
936
|
}
|
|
674
|
-
}, [isFill, cover,
|
|
937
|
+
}, [isFill, cover, pointMenu, panel.updateArrows]);
|
|
675
938
|
const webTransition = panel.panelTransition;
|
|
676
939
|
const {
|
|
677
940
|
style: elevatedSurfaceStyle,
|
|
@@ -713,6 +976,17 @@ function FloatingPanelWeb({
|
|
|
713
976
|
onContextMenu: openFromContextMenu
|
|
714
977
|
} : {})
|
|
715
978
|
});
|
|
979
|
+
const contentSized = sheetProps.triggerSizing === "content";
|
|
980
|
+
const [hugSelf, setHugSelf] = useState(contentSized ? "flex-start" : void 0);
|
|
981
|
+
useLayoutEffect(() => {
|
|
982
|
+
if (!contentSized) {
|
|
983
|
+
setHugSelf(void 0);
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
const parent = layoutParentOf(panel.triggerRef.current);
|
|
987
|
+
const align = parent ? getComputedStyle(parent).alignItems : "stretch";
|
|
988
|
+
setHugSelf(align === "stretch" || align === "normal" ? "flex-start" : void 0);
|
|
989
|
+
}, [contentSized, panel.triggerRef]);
|
|
716
990
|
for (const name of ["onMouseDown", "onClick", "onKeyDown", "onKeyUp"]) {
|
|
717
991
|
const handler = referenceProps[name];
|
|
718
992
|
if (typeof handler === "function") {
|
|
@@ -726,7 +1000,7 @@ function FloatingPanelWeb({
|
|
|
726
1000
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
727
1001
|
children: [/* @__PURE__ */jsx(View, {
|
|
728
1002
|
...referenceProps,
|
|
729
|
-
alignSelf:
|
|
1003
|
+
alignSelf: hugSelf,
|
|
730
1004
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
731
1005
|
opacity: disabled ? 0.5 : 1,
|
|
732
1006
|
"data-fp-reference": "",
|
|
@@ -742,74 +1016,83 @@ function FloatingPanelWeb({
|
|
|
742
1016
|
children
|
|
743
1017
|
}), panel.mounted && !collisionSheet && /* @__PURE__ */jsx(PanelPortal, {
|
|
744
1018
|
anchor: panel.triggerRef.current,
|
|
745
|
-
children: /* @__PURE__ */
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
1019
|
+
children: /* @__PURE__ */jsx(Theme, {
|
|
1020
|
+
name: "alt1",
|
|
1021
|
+
children: /* @__PURE__ */jsxs(YStack, {
|
|
1022
|
+
...getFloatingProps({
|
|
1023
|
+
ref: panel.refs.setFloating,
|
|
1024
|
+
style: {
|
|
1025
|
+
...elevatedSurfaceStyle,
|
|
1026
|
+
position: panel.strategy,
|
|
1027
|
+
top: overlayStyleRef.current?.top ?? panel.y ?? 0,
|
|
1028
|
+
left: overlayStyleRef.current?.left ?? panel.x ?? 0,
|
|
1029
|
+
scrollbarWidth: "none",
|
|
1030
|
+
zIndex: panelZIndex,
|
|
1031
|
+
overflow: "auto",
|
|
1032
|
+
...(cover && !pointMenu ? {
|
|
1033
|
+
overflowX: "hidden"
|
|
1034
|
+
} : {}),
|
|
1035
|
+
...panel.floatingStyleRef.current,
|
|
1036
|
+
...(overlayStyleRef.current ? {
|
|
1037
|
+
maxHeight: overlayStyleRef.current.maxHeight
|
|
1038
|
+
} : {}),
|
|
1039
|
+
opacity: panel.visible ? 1 : 0,
|
|
1040
|
+
// `none`, not scale(1): any transform makes this panel the
|
|
1041
|
+
// containing block of a nested panel's `position: fixed`, which
|
|
1042
|
+
// then positions against this box and is clipped by its scroll.
|
|
1043
|
+
transform: panel.visible ? "none" : "scale(0.96)",
|
|
1044
|
+
transition: webTransition,
|
|
1045
|
+
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)
|
|
1046
|
+
},
|
|
1047
|
+
onScroll: handleScroll,
|
|
1048
|
+
onTransitionEnd: event => {
|
|
1049
|
+
if (event.target === event.currentTarget && (event.propertyName === "height" || event.propertyName === "max-height")) {
|
|
1050
|
+
panel.updateArrows(event.currentTarget);
|
|
1051
|
+
}
|
|
775
1052
|
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
1053
|
+
}),
|
|
1054
|
+
"data-testid": "floating-panel-viewport",
|
|
1055
|
+
"data-fp-panel": "",
|
|
1056
|
+
...panelChromeFocus,
|
|
1057
|
+
pointerEvents: panel.visible ? "auto" : "none",
|
|
1058
|
+
...elevatedSurfaceProps,
|
|
1059
|
+
borderRadius: panel.dropdownRadius,
|
|
1060
|
+
paddingVertical: 0,
|
|
1061
|
+
paddingBottom: panel.coverCornerInset || 0,
|
|
1062
|
+
children: [pointMenu || !cover || !triggerEcho || showIconEcho ? null : /* @__PURE__ */jsx(TriggerEchoRow, {
|
|
1063
|
+
sourceRef: panel.triggerRef,
|
|
1064
|
+
source: trigger,
|
|
1065
|
+
anchorRect,
|
|
1066
|
+
onPress: () => onOpenChange(false),
|
|
1067
|
+
children: triggerRow
|
|
1068
|
+
}), /* @__PURE__ */jsx(ScrollArrow, {
|
|
1069
|
+
direction: "up",
|
|
1070
|
+
scrollRef: panel.refs.floating,
|
|
1071
|
+
visible: panel.arrowUp,
|
|
1072
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
1073
|
+
}), /* @__PURE__ */jsx(View, {
|
|
1074
|
+
ref: contentRef,
|
|
1075
|
+
...(contentPadding !== "none" ? panel.knobProps.panelPadding : void 0),
|
|
1076
|
+
...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
|
|
1077
|
+
children: /* @__PURE__ */jsx(OverlayStackProvider, {
|
|
1078
|
+
zIndex: panelZIndex,
|
|
1079
|
+
children: /* @__PURE__ */jsx(PanelIconEchoBoxContext.Provider, {
|
|
1080
|
+
value: echoBox,
|
|
1081
|
+
children
|
|
1082
|
+
})
|
|
1083
|
+
})
|
|
1084
|
+
}), /* @__PURE__ */jsx(ScrollArrow, {
|
|
1085
|
+
direction: "down",
|
|
1086
|
+
scrollRef: panel.refs.floating,
|
|
1087
|
+
visible: panel.arrowDown,
|
|
1088
|
+
arrowScrollDirRef: panel.arrowScrollDirRef
|
|
1089
|
+
}), showIconEcho && iconEcho ? /* @__PURE__ */jsx(IconEchoRow, {
|
|
1090
|
+
children: iconEchoElement(trigger, iconEcho, () => onOpenChange(false), triggerSurface)
|
|
1091
|
+
}) : null]
|
|
1092
|
+
})
|
|
810
1093
|
})
|
|
811
1094
|
})]
|
|
812
1095
|
});
|
|
813
1096
|
}
|
|
814
|
-
export { FloatingPanel, floatingPanelActionProps, isNestedPanelAction2 as isNestedPanelAction, panelAnchorOffset, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding2 as panelViewportPadding, resolvePanelWidthMode, useFloatingPanel2 as useFloatingPanel, useViewportGtSm };
|
|
1097
|
+
export { FloatingPanel, TriggerEchoRow, floatingPanelActionProps, isNestedPanelAction2 as isNestedPanelAction, panelAnchorOffset, panelAnimationDuration, panelGrowDuration, panelTransition, panelViewportPadding2 as panelViewportPadding, placeEchoOverTrigger, resolvePanelWidthMode, useFloatingPanel2 as useFloatingPanel, useViewportGtSm };
|
|
815
1098
|
//# sourceMappingURL=index.mjs.map
|