@multiplatform.one/forms 7.66.0 → 7.68.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/AdaptivePopup/index.cjs +45 -5
- package/dist/cjs/AdaptivePopup/index.native.js +47 -5
- package/dist/cjs/AdaptivePopup/index.native.js.map +1 -1
- package/dist/cjs/Button/glass.cjs +30 -0
- package/dist/cjs/Button/glass.native.js +47 -0
- package/dist/cjs/Button/glass.native.js.map +1 -0
- package/dist/cjs/Button/index.cjs +157 -28
- package/dist/cjs/Button/index.native.js +156 -27
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/ContextualSaveBar/index.cjs +6 -8
- package/dist/cjs/ContextualSaveBar/index.native.js +6 -8
- package/dist/cjs/ContextualSaveBar/index.native.js.map +1 -1
- package/dist/cjs/DescriptionList/index.cjs +0 -1
- package/dist/cjs/DescriptionList/index.native.js +0 -1
- package/dist/cjs/DescriptionList/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/RegularPanel.cjs +164 -0
- package/dist/cjs/FloatingPanel/RegularPanel.native.js +169 -0
- package/dist/cjs/FloatingPanel/RegularPanel.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/compactFace.cjs +6 -0
- package/dist/cjs/FloatingPanel/compactFace.native.js +6 -0
- package/dist/cjs/FloatingPanel/compactFace.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/containingBlock.cjs +46 -0
- package/dist/cjs/FloatingPanel/containingBlock.native.js +51 -0
- package/dist/cjs/FloatingPanel/containingBlock.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/index.cjs +2 -20
- package/dist/cjs/FloatingPanel/index.native.js +79 -45
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/pointAnchor.cjs +25 -0
- package/dist/cjs/FloatingPanel/pointAnchor.native.js +26 -0
- package/dist/cjs/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/regularPlacement.cjs +61 -0
- package/dist/cjs/FloatingPanel/regularPlacement.native.js +65 -0
- package/dist/cjs/FloatingPanel/regularPlacement.native.js.map +1 -0
- package/dist/cjs/fields/Barcode/BarcodeScanner.cjs +7 -8
- package/dist/cjs/fields/Barcode/BarcodeScanner.native.js +7 -8
- package/dist/cjs/fields/Barcode/BarcodeScanner.native.js.map +1 -1
- package/dist/cjs/fields/Combobox/index.cjs +1 -1
- package/dist/cjs/fields/Combobox/index.native.js +3 -1
- package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
- package/dist/cjs/fields/FileUpload/index.cjs +83 -60
- package/dist/cjs/fields/FileUpload/index.native.js +96 -73
- package/dist/cjs/fields/FileUpload/index.native.js.map +1 -1
- package/dist/cjs/fields/Geolocation/index.cjs +7 -8
- package/dist/cjs/fields/Geolocation/index.native.js +7 -8
- package/dist/cjs/fields/Geolocation/index.native.js.map +1 -1
- package/dist/cjs/fields/ImageField/index.cjs +4 -6
- package/dist/cjs/fields/ImageField/index.native.js +4 -6
- package/dist/cjs/fields/ImageField/index.native.js.map +1 -1
- package/dist/cjs/fields/Input/index.cjs +5 -0
- package/dist/cjs/fields/Input/index.native.js +5 -0
- package/dist/cjs/fields/Input/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/InlineChoices.cjs +3 -2
- package/dist/cjs/fields/Select/InlineChoices.native.js +5 -2
- package/dist/cjs/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/cjs/fields/Select/SheetPickerRow.cjs +154 -0
- package/dist/cjs/fields/Select/SheetPickerRow.native.js +165 -0
- package/dist/cjs/fields/Select/SheetPickerRow.native.js.map +1 -0
- package/dist/cjs/fields/Select/index.cjs +63 -4
- package/dist/cjs/fields/Select/index.native.js +85 -26
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.cjs +14 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.native.js +15 -1
- package/dist/cjs/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/cjs/fields/Slider/index.cjs +96 -4
- package/dist/cjs/fields/Slider/index.native.js +103 -5
- package/dist/cjs/fields/Slider/index.native.js.map +1 -1
- package/dist/cjs/fields/Switch/index.cjs +71 -1
- package/dist/cjs/fields/Switch/index.native.js +72 -1
- package/dist/cjs/fields/Switch/index.native.js.map +1 -1
- package/dist/cjs/fields/ToggleGroup/index.cjs +67 -1
- package/dist/cjs/fields/ToggleGroup/index.native.js +75 -1
- package/dist/cjs/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.cjs +54 -47
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js +64 -49
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.cjs +54 -0
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js +57 -0
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
- package/dist/cjs/index.cjs +19 -1
- package/dist/cjs/index.native.js +18 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared/colorRamps.cjs +0 -8
- package/dist/cjs/shared/colorRamps.native.js +0 -8
- package/dist/cjs/shared/colorRamps.native.js.map +1 -1
- package/dist/cjs/shared/overlaySizeClass.cjs +42 -0
- package/dist/cjs/shared/overlaySizeClass.native.js +45 -0
- package/dist/cjs/shared/overlaySizeClass.native.js.map +1 -0
- package/dist/cjs/shared/sheetNavigation.cjs +76 -0
- package/dist/cjs/shared/sheetNavigation.native.js +129 -0
- package/dist/cjs/shared/sheetNavigation.native.js.map +1 -0
- package/dist/cjs/shared/systemControlModules.cjs +34 -0
- package/dist/cjs/shared/systemControlModules.gnome.cjs +34 -0
- package/dist/cjs/shared/systemControlModules.gnome.native.js +37 -0
- package/dist/cjs/shared/systemControlModules.gnome.native.js.map +1 -0
- package/dist/cjs/shared/systemControlModules.native.js +77 -0
- package/dist/cjs/shared/systemControlModules.native.js.map +1 -0
- package/dist/cjs/shared/systemControls.cjs +47 -0
- package/dist/cjs/shared/systemControls.native.js +51 -0
- package/dist/cjs/shared/systemControls.native.js.map +1 -0
- package/dist/cjs/standardActions.cjs +117 -0
- package/dist/cjs/standardActions.native.js +120 -0
- package/dist/cjs/standardActions.native.js.map +1 -0
- package/dist/esm/AdaptivePopup/index.mjs +45 -5
- package/dist/esm/AdaptivePopup/index.mjs.map +1 -1
- package/dist/esm/AdaptivePopup/index.native.js +47 -5
- package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
- package/dist/esm/Button/glass.mjs +5 -0
- package/dist/esm/Button/glass.mjs.map +1 -0
- package/dist/esm/Button/glass.native.js +19 -0
- package/dist/esm/Button/glass.native.js.map +1 -0
- package/dist/esm/Button/index.mjs +153 -28
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +153 -28
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/index.mjs +7 -9
- package/dist/esm/ContextualSaveBar/index.mjs.map +1 -1
- package/dist/esm/ContextualSaveBar/index.native.js +7 -9
- package/dist/esm/ContextualSaveBar/index.native.js.map +1 -1
- package/dist/esm/DescriptionList/index.mjs +0 -1
- package/dist/esm/DescriptionList/index.mjs.map +1 -1
- package/dist/esm/DescriptionList/index.native.js +0 -1
- package/dist/esm/DescriptionList/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/RegularPanel.mjs +139 -0
- package/dist/esm/FloatingPanel/RegularPanel.mjs.map +1 -0
- package/dist/esm/FloatingPanel/RegularPanel.native.js +141 -0
- package/dist/esm/FloatingPanel/RegularPanel.native.js.map +1 -0
- package/dist/esm/FloatingPanel/compactFace.mjs +5 -1
- package/dist/esm/FloatingPanel/compactFace.mjs.map +1 -1
- package/dist/esm/FloatingPanel/compactFace.native.js +5 -1
- package/dist/esm/FloatingPanel/compactFace.native.js.map +1 -1
- package/dist/esm/FloatingPanel/containingBlock.mjs +21 -0
- package/dist/esm/FloatingPanel/containingBlock.mjs.map +1 -0
- package/dist/esm/FloatingPanel/containingBlock.native.js +23 -0
- package/dist/esm/FloatingPanel/containingBlock.native.js.map +1 -0
- package/dist/esm/FloatingPanel/index.mjs +1 -19
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +83 -49
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/pointAnchor.mjs +25 -1
- package/dist/esm/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/esm/FloatingPanel/pointAnchor.native.js +26 -1
- package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/esm/FloatingPanel/regularPlacement.mjs +35 -0
- package/dist/esm/FloatingPanel/regularPlacement.mjs.map +1 -0
- package/dist/esm/FloatingPanel/regularPlacement.native.js +36 -0
- package/dist/esm/FloatingPanel/regularPlacement.native.js.map +1 -0
- package/dist/esm/fields/Barcode/BarcodeScanner.mjs +8 -9
- package/dist/esm/fields/Barcode/BarcodeScanner.mjs.map +1 -1
- package/dist/esm/fields/Barcode/BarcodeScanner.native.js +8 -9
- package/dist/esm/fields/Barcode/BarcodeScanner.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.mjs +1 -1
- package/dist/esm/fields/Combobox/index.mjs.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js +3 -1
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/index.mjs +84 -61
- package/dist/esm/fields/FileUpload/index.mjs.map +1 -1
- package/dist/esm/fields/FileUpload/index.native.js +97 -74
- package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/index.mjs +8 -9
- package/dist/esm/fields/Geolocation/index.mjs.map +1 -1
- package/dist/esm/fields/Geolocation/index.native.js +8 -9
- package/dist/esm/fields/Geolocation/index.native.js.map +1 -1
- package/dist/esm/fields/ImageField/index.mjs +6 -8
- package/dist/esm/fields/ImageField/index.mjs.map +1 -1
- package/dist/esm/fields/ImageField/index.native.js +6 -8
- package/dist/esm/fields/ImageField/index.native.js.map +1 -1
- package/dist/esm/fields/Input/index.mjs +6 -1
- package/dist/esm/fields/Input/index.mjs.map +1 -1
- package/dist/esm/fields/Input/index.native.js +6 -1
- package/dist/esm/fields/Input/index.native.js.map +1 -1
- package/dist/esm/fields/Select/InlineChoices.mjs +3 -2
- package/dist/esm/fields/Select/InlineChoices.mjs.map +1 -1
- package/dist/esm/fields/Select/InlineChoices.native.js +5 -2
- package/dist/esm/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/esm/fields/Select/SheetPickerRow.mjs +129 -0
- package/dist/esm/fields/Select/SheetPickerRow.mjs.map +1 -0
- package/dist/esm/fields/Select/SheetPickerRow.native.js +137 -0
- package/dist/esm/fields/Select/SheetPickerRow.native.js.map +1 -0
- package/dist/esm/fields/Select/index.mjs +64 -5
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +86 -27
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/Select/shouldInlineChoices.mjs +12 -1
- package/dist/esm/fields/Select/shouldInlineChoices.mjs.map +1 -1
- package/dist/esm/fields/Select/shouldInlineChoices.native.js +13 -1
- package/dist/esm/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/esm/fields/Slider/index.mjs +96 -4
- package/dist/esm/fields/Slider/index.mjs.map +1 -1
- package/dist/esm/fields/Slider/index.native.js +103 -5
- package/dist/esm/fields/Slider/index.native.js.map +1 -1
- package/dist/esm/fields/Switch/index.mjs +71 -1
- package/dist/esm/fields/Switch/index.mjs.map +1 -1
- package/dist/esm/fields/Switch/index.native.js +72 -1
- package/dist/esm/fields/Switch/index.native.js.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.mjs +67 -1
- package/dist/esm/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.native.js +75 -1
- package/dist/esm/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs +56 -49
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js +66 -51
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs +21 -0
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -0
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js +21 -0
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
- package/dist/esm/index.mjs +5 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +5 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/shared/colorRamps.mjs +0 -8
- package/dist/esm/shared/colorRamps.mjs.map +1 -1
- package/dist/esm/shared/colorRamps.native.js +0 -8
- package/dist/esm/shared/colorRamps.native.js.map +1 -1
- package/dist/esm/shared/overlaySizeClass.mjs +14 -0
- package/dist/esm/shared/overlaySizeClass.mjs.map +1 -0
- package/dist/esm/shared/overlaySizeClass.native.js +14 -0
- package/dist/esm/shared/overlaySizeClass.native.js.map +1 -0
- package/dist/esm/shared/sheetNavigation.mjs +47 -0
- package/dist/esm/shared/sheetNavigation.mjs.map +1 -0
- package/dist/esm/shared/sheetNavigation.native.js +97 -0
- package/dist/esm/shared/sheetNavigation.native.js.map +1 -0
- package/dist/esm/shared/systemControlModules.gnome.mjs +8 -0
- package/dist/esm/shared/systemControlModules.gnome.mjs.map +1 -0
- package/dist/esm/shared/systemControlModules.gnome.native.js +8 -0
- package/dist/esm/shared/systemControlModules.gnome.native.js.map +1 -0
- package/dist/esm/shared/systemControlModules.mjs +8 -0
- package/dist/esm/shared/systemControlModules.mjs.map +1 -0
- package/dist/esm/shared/systemControlModules.native.js +47 -0
- package/dist/esm/shared/systemControlModules.native.js.map +1 -0
- package/dist/esm/shared/systemControls.mjs +19 -0
- package/dist/esm/shared/systemControls.mjs.map +1 -0
- package/dist/esm/shared/systemControls.native.js +20 -0
- package/dist/esm/shared/systemControls.native.js.map +1 -0
- package/dist/esm/standardActions.mjs +91 -0
- package/dist/esm/standardActions.mjs.map +1 -0
- package/dist/esm/standardActions.native.js +91 -0
- package/dist/esm/standardActions.native.js.map +1 -0
- package/dist/jsx/AdaptivePopup/index.mjs +45 -5
- package/dist/jsx/AdaptivePopup/index.mjs.map +1 -1
- package/dist/jsx/AdaptivePopup/index.native.js +47 -5
- package/dist/jsx/AdaptivePopup/index.native.js.map +1 -1
- package/dist/jsx/Button/glass.mjs +5 -0
- package/dist/jsx/Button/glass.mjs.map +1 -0
- package/dist/jsx/Button/glass.native.js +47 -0
- package/dist/jsx/Button/glass.native.js.map +1 -0
- package/dist/jsx/Button/index.mjs +153 -28
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +156 -27
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/ContextualSaveBar/index.mjs +7 -9
- package/dist/jsx/ContextualSaveBar/index.mjs.map +1 -1
- package/dist/jsx/ContextualSaveBar/index.native.js +6 -8
- package/dist/jsx/ContextualSaveBar/index.native.js.map +1 -1
- package/dist/jsx/DescriptionList/index.mjs +0 -1
- package/dist/jsx/DescriptionList/index.mjs.map +1 -1
- package/dist/jsx/DescriptionList/index.native.js +0 -1
- package/dist/jsx/DescriptionList/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/RegularPanel.mjs +139 -0
- package/dist/jsx/FloatingPanel/RegularPanel.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/RegularPanel.native.js +169 -0
- package/dist/jsx/FloatingPanel/RegularPanel.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/compactFace.mjs +5 -1
- package/dist/jsx/FloatingPanel/compactFace.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/compactFace.native.js +6 -0
- package/dist/jsx/FloatingPanel/compactFace.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/containingBlock.mjs +21 -0
- package/dist/jsx/FloatingPanel/containingBlock.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/containingBlock.native.js +51 -0
- package/dist/jsx/FloatingPanel/containingBlock.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/index.mjs +1 -19
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +79 -45
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/pointAnchor.mjs +25 -1
- package/dist/jsx/FloatingPanel/pointAnchor.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/pointAnchor.native.js +26 -0
- package/dist/jsx/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/regularPlacement.mjs +35 -0
- package/dist/jsx/FloatingPanel/regularPlacement.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/regularPlacement.native.js +65 -0
- package/dist/jsx/FloatingPanel/regularPlacement.native.js.map +1 -0
- package/dist/jsx/fields/Barcode/BarcodeScanner.mjs +8 -9
- package/dist/jsx/fields/Barcode/BarcodeScanner.mjs.map +1 -1
- package/dist/jsx/fields/Barcode/BarcodeScanner.native.js +7 -8
- package/dist/jsx/fields/Barcode/BarcodeScanner.native.js.map +1 -1
- package/dist/jsx/fields/Combobox/index.mjs +1 -1
- package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
- package/dist/jsx/fields/Combobox/index.native.js +3 -1
- package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
- package/dist/jsx/fields/FileUpload/index.mjs +84 -61
- package/dist/jsx/fields/FileUpload/index.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload/index.native.js +96 -73
- package/dist/jsx/fields/FileUpload/index.native.js.map +1 -1
- package/dist/jsx/fields/Geolocation/index.mjs +8 -9
- package/dist/jsx/fields/Geolocation/index.mjs.map +1 -1
- package/dist/jsx/fields/Geolocation/index.native.js +7 -8
- package/dist/jsx/fields/Geolocation/index.native.js.map +1 -1
- package/dist/jsx/fields/ImageField/index.mjs +6 -8
- package/dist/jsx/fields/ImageField/index.mjs.map +1 -1
- package/dist/jsx/fields/ImageField/index.native.js +4 -6
- package/dist/jsx/fields/ImageField/index.native.js.map +1 -1
- package/dist/jsx/fields/Input/index.mjs +6 -1
- package/dist/jsx/fields/Input/index.mjs.map +1 -1
- package/dist/jsx/fields/Input/index.native.js +5 -0
- package/dist/jsx/fields/Input/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/InlineChoices.mjs +3 -2
- package/dist/jsx/fields/Select/InlineChoices.mjs.map +1 -1
- package/dist/jsx/fields/Select/InlineChoices.native.js +5 -2
- package/dist/jsx/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/jsx/fields/Select/SheetPickerRow.mjs +129 -0
- package/dist/jsx/fields/Select/SheetPickerRow.mjs.map +1 -0
- package/dist/jsx/fields/Select/SheetPickerRow.native.js +165 -0
- package/dist/jsx/fields/Select/SheetPickerRow.native.js.map +1 -0
- package/dist/jsx/fields/Select/index.mjs +64 -5
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +85 -26
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.mjs +12 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.mjs.map +1 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.native.js +15 -1
- package/dist/jsx/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/jsx/fields/Slider/index.mjs +96 -4
- package/dist/jsx/fields/Slider/index.mjs.map +1 -1
- package/dist/jsx/fields/Slider/index.native.js +103 -5
- package/dist/jsx/fields/Slider/index.native.js.map +1 -1
- package/dist/jsx/fields/Switch/index.mjs +71 -1
- package/dist/jsx/fields/Switch/index.mjs.map +1 -1
- package/dist/jsx/fields/Switch/index.native.js +72 -1
- package/dist/jsx/fields/Switch/index.native.js.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.mjs +67 -1
- package/dist/jsx/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.native.js +75 -1
- package/dist/jsx/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs +56 -49
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js +64 -49
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs +21 -0
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -0
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js +57 -0
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
- package/dist/jsx/index.js +5 -2
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +5 -2
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +18 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared/colorRamps.mjs +0 -8
- package/dist/jsx/shared/colorRamps.mjs.map +1 -1
- package/dist/jsx/shared/colorRamps.native.js +0 -8
- package/dist/jsx/shared/colorRamps.native.js.map +1 -1
- package/dist/jsx/shared/overlaySizeClass.mjs +14 -0
- package/dist/jsx/shared/overlaySizeClass.mjs.map +1 -0
- package/dist/jsx/shared/overlaySizeClass.native.js +45 -0
- package/dist/jsx/shared/overlaySizeClass.native.js.map +1 -0
- package/dist/jsx/shared/sheetNavigation.mjs +47 -0
- package/dist/jsx/shared/sheetNavigation.mjs.map +1 -0
- package/dist/jsx/shared/sheetNavigation.native.js +129 -0
- package/dist/jsx/shared/sheetNavigation.native.js.map +1 -0
- package/dist/jsx/shared/systemControlModules.gnome.mjs +8 -0
- package/dist/jsx/shared/systemControlModules.gnome.mjs.map +1 -0
- package/dist/jsx/shared/systemControlModules.gnome.native.js +37 -0
- package/dist/jsx/shared/systemControlModules.gnome.native.js.map +1 -0
- package/dist/jsx/shared/systemControlModules.mjs +8 -0
- package/dist/jsx/shared/systemControlModules.mjs.map +1 -0
- package/dist/jsx/shared/systemControlModules.native.js +77 -0
- package/dist/jsx/shared/systemControlModules.native.js.map +1 -0
- package/dist/jsx/shared/systemControls.mjs +19 -0
- package/dist/jsx/shared/systemControls.mjs.map +1 -0
- package/dist/jsx/shared/systemControls.native.js +51 -0
- package/dist/jsx/shared/systemControls.native.js.map +1 -0
- package/dist/jsx/standardActions.mjs +91 -0
- package/dist/jsx/standardActions.mjs.map +1 -0
- package/dist/jsx/standardActions.native.js +120 -0
- package/dist/jsx/standardActions.native.js.map +1 -0
- package/package.json +20 -8
- package/src/AdaptivePopup/AdaptivePopup.spec.tsx +44 -0
- package/src/AdaptivePopup/AdaptivePopup.stories.tsx +12 -32
- package/src/AdaptivePopup/index.tsx +65 -13
- package/src/Button/Button.disabledGlyph.spec.tsx +111 -0
- package/src/Button/Button.iconButton.spec.tsx +279 -0
- package/src/Button/Button.stories.tsx +59 -3
- package/src/Button/glass.native.ts +38 -0
- package/src/Button/glass.ts +18 -0
- package/src/Button/index.tsx +272 -40
- package/src/ContextualSaveBar/ContextualSaveBar.spec.tsx +3 -1
- package/src/ContextualSaveBar/ContextualSaveBar.stories.tsx +2 -2
- package/src/ContextualSaveBar/index.tsx +7 -10
- package/src/ControlGroup/ControlGroup.stories.tsx +3 -2
- package/src/DescriptionList/index.tsx +0 -1
- package/src/ErrorSummary.stories.tsx +2 -1
- package/src/FieldLayout.stories.tsx +3 -2
- package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +73 -3
- package/src/FloatingPanel/FloatingPanel.regularWidth.native.spec.tsx +193 -0
- package/src/FloatingPanel/FloatingPanel.stories.tsx +6 -10
- package/src/FloatingPanel/RegularPanel.tsx +159 -0
- package/src/FloatingPanel/compactFace.spec.ts +24 -1
- package/src/FloatingPanel/compactFace.ts +16 -0
- package/src/FloatingPanel/containingBlock.ts +32 -0
- package/src/FloatingPanel/index.native.tsx +80 -35
- package/src/FloatingPanel/index.tsx +1 -33
- package/src/FloatingPanel/pointAnchor.spec.ts +29 -0
- package/src/FloatingPanel/pointAnchor.ts +30 -0
- package/src/FloatingPanel/regularPlacement.spec.ts +65 -0
- package/src/FloatingPanel/regularPlacement.ts +40 -0
- package/src/Form/Form.stories.tsx +6 -5
- package/src/errorSummaryStories.spec.tsx +4 -4
- package/src/fields/Barcode/BarcodeScanner.native.tsx +10 -9
- package/src/fields/Barcode/BarcodeScanner.tsx +10 -9
- package/src/fields/Checkbox/Checkbox.stories.tsx +3 -3
- package/src/fields/Checkbox/CheckboxGroup.stories.tsx +2 -2
- package/src/fields/ColorPicker/ColorPicker.stories.tsx +2 -2
- package/src/fields/Combobox/Combobox.regularWidth.native.spec.tsx +94 -0
- package/src/fields/Combobox/Combobox.stories.tsx +2 -2
- package/src/fields/Combobox/index.tsx +3 -1
- package/src/fields/DatePicker/DatePicker.stories.tsx +2 -1
- package/src/fields/DatePicker/DateRangePicker.stories.tsx +2 -2
- package/src/fields/DatePicker/DatetimePicker.stories.tsx +2 -1
- package/src/fields/DatePicker/MonthPicker.stories.tsx +2 -2
- package/src/fields/DatePicker/MultiDatePicker.stories.tsx +2 -2
- package/src/fields/FileUpload/FileUpload.spec.tsx +11 -6
- package/src/fields/FileUpload/FileUpload.stories.tsx +2 -2
- package/src/fields/FileUpload/index.tsx +101 -77
- package/src/fields/Geolocation/index.tsx +12 -7
- package/src/fields/ImageField/ImageField.spec.tsx +5 -5
- package/src/fields/ImageField/ImageField.stories.tsx +2 -2
- package/src/fields/ImageField/index.tsx +6 -9
- package/src/fields/Input/Input.formName.spec.tsx +53 -0
- package/src/fields/Input/Input.stories.tsx +2 -2
- package/src/fields/Input/index.tsx +6 -1
- package/src/fields/MentionInput/MentionInput.stories.tsx +2 -1
- package/src/fields/Progress/Progress.stories.tsx +2 -1
- package/src/fields/RadioGroup/RadioGroup.stories.tsx +2 -1
- package/src/fields/Select/InlineChoices.tsx +6 -3
- package/src/fields/Select/SheetPickerRow.tsx +160 -0
- package/src/fields/Select/index.tsx +65 -4
- package/src/fields/Select/shouldInlineChoices.spec.ts +21 -1
- package/src/fields/Select/shouldInlineChoices.ts +26 -0
- package/src/fields/Signature/Signature.stories.tsx +2 -2
- package/src/fields/Slider/Slider.system.native.spec.tsx +168 -0
- package/src/fields/Slider/index.tsx +166 -30
- package/src/fields/Stepper/Stepper.stories.tsx +2 -2
- package/src/fields/Switch/Switch.system.native.spec.tsx +162 -0
- package/src/fields/Switch/index.tsx +98 -0
- package/src/fields/TextArea/TextArea.stories.tsx +2 -2
- package/src/fields/ToggleGroup/ToggleGroup.stories.tsx +2 -2
- package/src/fields/ToggleGroup/ToggleGroup.system.native.spec.tsx +192 -0
- package/src/fields/ToggleGroup/index.tsx +111 -0
- package/src/fields/nativeDateTime/OsDateTimeSheet.presentation.spec.tsx +168 -0
- package/src/fields/nativeDateTime/OsDateTimeSheet.tsx +60 -30
- package/src/fields/nativeDateTime/sheetKeyboard.spec.ts +60 -0
- package/src/fields/nativeDateTime/sheetKeyboard.ts +45 -0
- package/src/index.ts +25 -2
- package/src/shared/colorRamps.ts +1 -11
- package/src/shared/overlaySizeClass.spec.ts +27 -0
- package/src/shared/overlaySizeClass.ts +36 -0
- package/src/shared/sheetNavigation.ts +82 -0
- package/src/shared/systemControlModules.gnome.ts +10 -0
- package/src/shared/systemControlModules.native.spec.ts +52 -0
- package/src/shared/systemControlModules.native.ts +66 -0
- package/src/shared/systemControlModules.ts +10 -0
- package/src/shared/systemControls.ts +70 -0
- package/src/standardActions.ts +96 -0
- package/types/AdaptivePopup/index.d.ts +13 -1
- package/types/AdaptivePopup/index.d.ts.map +1 -1
- package/types/Button/glass.d.ts +15 -0
- package/types/Button/glass.d.ts.map +1 -0
- package/types/Button/glass.native.d.ts +11 -0
- package/types/Button/glass.native.d.ts.map +1 -0
- package/types/Button/index.d.ts +45 -1
- package/types/Button/index.d.ts.map +1 -1
- package/types/ContextualSaveBar/index.d.ts.map +1 -1
- package/types/DescriptionList/index.d.ts.map +1 -1
- package/types/FloatingPanel/RegularPanel.d.ts +29 -0
- package/types/FloatingPanel/RegularPanel.d.ts.map +1 -0
- package/types/FloatingPanel/compactFace.d.ts +12 -0
- package/types/FloatingPanel/compactFace.d.ts.map +1 -1
- package/types/FloatingPanel/containingBlock.d.ts +14 -0
- package/types/FloatingPanel/containingBlock.d.ts.map +1 -0
- package/types/FloatingPanel/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.native.d.ts +6 -1
- package/types/FloatingPanel/index.native.d.ts.map +1 -1
- package/types/FloatingPanel/pointAnchor.d.ts +12 -0
- package/types/FloatingPanel/pointAnchor.d.ts.map +1 -1
- package/types/FloatingPanel/regularPlacement.d.ts +20 -0
- package/types/FloatingPanel/regularPlacement.d.ts.map +1 -0
- package/types/fields/Barcode/BarcodeScanner.d.ts.map +1 -1
- package/types/fields/Barcode/BarcodeScanner.native.d.ts.map +1 -1
- package/types/fields/Combobox/index.d.ts.map +1 -1
- package/types/fields/FileUpload/index.d.ts.map +1 -1
- package/types/fields/Geolocation/index.d.ts.map +1 -1
- package/types/fields/ImageField/index.d.ts.map +1 -1
- package/types/fields/Input/index.d.ts.map +1 -1
- package/types/fields/Select/InlineChoices.d.ts.map +1 -1
- package/types/fields/Select/SheetPickerRow.d.ts +23 -0
- package/types/fields/Select/SheetPickerRow.d.ts.map +1 -0
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/fields/Select/shouldInlineChoices.d.ts +15 -0
- package/types/fields/Select/shouldInlineChoices.d.ts.map +1 -1
- package/types/fields/Slider/index.d.ts +7 -1
- package/types/fields/Slider/index.d.ts.map +1 -1
- package/types/fields/Switch/index.d.ts +7 -1
- package/types/fields/Switch/index.d.ts.map +1 -1
- package/types/fields/ToggleGroup/index.d.ts +8 -1
- package/types/fields/ToggleGroup/index.d.ts.map +1 -1
- package/types/fields/nativeDateTime/OsDateTimeSheet.d.ts.map +1 -1
- package/types/fields/nativeDateTime/sheetKeyboard.d.ts +20 -0
- package/types/fields/nativeDateTime/sheetKeyboard.d.ts.map +1 -0
- package/types/index.d.ts +8 -2
- package/types/index.d.ts.map +1 -1
- package/types/shared/colorRamps.d.ts +1 -11
- package/types/shared/colorRamps.d.ts.map +1 -1
- package/types/shared/overlaySizeClass.d.ts +24 -0
- package/types/shared/overlaySizeClass.d.ts.map +1 -0
- package/types/shared/sheetNavigation.d.ts +31 -0
- package/types/shared/sheetNavigation.d.ts.map +1 -0
- package/types/shared/systemControlModules.d.ts +5 -0
- package/types/shared/systemControlModules.d.ts.map +1 -0
- package/types/shared/systemControlModules.gnome.d.ts +5 -0
- package/types/shared/systemControlModules.gnome.d.ts.map +1 -0
- package/types/shared/systemControlModules.native.d.ts +20 -0
- package/types/shared/systemControlModules.native.d.ts.map +1 -0
- package/types/shared/systemControls.d.ts +53 -0
- package/types/shared/systemControls.d.ts.map +1 -0
- package/types/standardActions.d.ts +24 -0
- package/types/standardActions.d.ts.map +1 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { edgeColorAt, transitionProps, Text } from "@multiplatform.one/theme";
|
|
13
|
-
import { ImageSquareIcon
|
|
13
|
+
import { ImageSquareIcon } from "@phosphor-icons/react";
|
|
14
14
|
import {
|
|
15
15
|
ensureFocusVisibleRing,
|
|
16
16
|
ensureKeyboardModalityTracking,
|
|
@@ -22,7 +22,8 @@ import type { DragEvent, ReactNode } from "react";
|
|
|
22
22
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
23
23
|
import type { LabelProps, SizeTokens } from "tamagui";
|
|
24
24
|
import { Image, Text as TamaguiText, View, YStack, isWeb, styled } from "tamagui";
|
|
25
|
-
import {
|
|
25
|
+
import { IconButton } from "../../Button";
|
|
26
|
+
import { standardActions } from "../../standardActions";
|
|
26
27
|
import { Field, FieldLayout, useFieldA11y, useFieldDescribedBy } from "../../fieldLayout";
|
|
27
28
|
import { Skeleton } from "../../Skeleton";
|
|
28
29
|
import { t } from "../../shared/t";
|
|
@@ -422,15 +423,11 @@ function ImageControl({
|
|
|
422
423
|
</ImageFrame>
|
|
423
424
|
|
|
424
425
|
{showRemove && hasValue && canInteract && !inTableCell && (
|
|
425
|
-
<
|
|
426
|
-
|
|
427
|
-
size="$2"
|
|
428
|
-
icon={XIcon}
|
|
426
|
+
<IconButton
|
|
427
|
+
icon={standardActions.remove.icon}
|
|
429
428
|
aria-label={t("Remove image")}
|
|
430
429
|
onPress={() => handleRemove()}
|
|
431
|
-
|
|
432
|
-
{t("Remove")}
|
|
433
|
-
</Button>
|
|
430
|
+
/>
|
|
434
431
|
)}
|
|
435
432
|
</YStack>
|
|
436
433
|
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import userEvent from "@testing-library/user-event";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
4
|
+
import { Theme } from "tamagui";
|
|
5
|
+
import { Input } from "./index";
|
|
6
|
+
|
|
7
|
+
function SignIn({ scheme }: { scheme: "light" | "dark" }) {
|
|
8
|
+
return (
|
|
9
|
+
<Theme name={scheme}>
|
|
10
|
+
<form id="sign-in" action="/login" method="post">
|
|
11
|
+
<Input id="username" name="username" label="Username" labelHidden />
|
|
12
|
+
<Input id="password" name="password" label="Password" labelHidden secureTextEntry />
|
|
13
|
+
<input type="hidden" name="credentialId" value="" />
|
|
14
|
+
</form>
|
|
15
|
+
</Theme>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const field = (container: HTMLElement, id: string) =>
|
|
20
|
+
container.querySelector<HTMLInputElement>(`input#${id}`)!;
|
|
21
|
+
|
|
22
|
+
describe("Input posts under its name in a native form (FZ-8159)", () => {
|
|
23
|
+
it("keeps name through typing and a scheme change, so FormData carries both fields", async () => {
|
|
24
|
+
const user = userEvent.setup();
|
|
25
|
+
const view = renderWithProviders(<SignIn scheme="light" />);
|
|
26
|
+
const username = field(view.container, "username");
|
|
27
|
+
const password = field(view.container, "password");
|
|
28
|
+
|
|
29
|
+
await user.type(username, "ash");
|
|
30
|
+
await user.type(password, "pikachu");
|
|
31
|
+
expect(username.getAttribute("name")).toBe("username");
|
|
32
|
+
expect(password.getAttribute("name")).toBe("password");
|
|
33
|
+
|
|
34
|
+
view.rerender(<SignIn scheme="dark" />);
|
|
35
|
+
await user.type(field(view.container, "username"), "!");
|
|
36
|
+
|
|
37
|
+
const form = view.container.querySelector<HTMLFormElement>("form#sign-in")!;
|
|
38
|
+
const posted = new FormData(form);
|
|
39
|
+
expect(posted.get("username")).toBe("ash!");
|
|
40
|
+
expect(posted.get("password")).toBe("pikachu");
|
|
41
|
+
expect(posted.get("credentialId")).toBe("");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("a read-only field still posts under its name", () => {
|
|
45
|
+
const view = renderWithProviders(
|
|
46
|
+
<form>
|
|
47
|
+
<Input id="realm" name="realm" label="Realm" readOnly value="pokemon" />
|
|
48
|
+
</form>,
|
|
49
|
+
);
|
|
50
|
+
const posted = new FormData(view.container.querySelector("form")!);
|
|
51
|
+
expect(posted.get("realm")).toBe("pokemon");
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -5,11 +5,11 @@ import { MagnifyingGlassIcon, XIcon } from "@phosphor-icons/react";
|
|
|
5
5
|
import { useForm } from "@tanstack/react-form";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Input as TamaguiInput, XStack, YStack } from "tamagui";
|
|
8
|
-
import { Button } from "../../Button";
|
|
9
8
|
import { Form } from "../../Form";
|
|
10
9
|
import { SearchInput } from "../SearchInput";
|
|
11
10
|
import { Input } from "./index";
|
|
12
11
|
import { Paragraph } from "@multiplatform.one/theme";
|
|
12
|
+
import { ActionButton } from "@multiplatform.one/components";
|
|
13
13
|
|
|
14
14
|
const meta: Meta<typeof Input> = {
|
|
15
15
|
title: "Forms/Input",
|
|
@@ -64,7 +64,7 @@ export const Main: Story = {
|
|
|
64
64
|
},
|
|
65
65
|
}}
|
|
66
66
|
/>
|
|
67
|
-
<
|
|
67
|
+
<ActionButton kind="submit" formAction="submit" />
|
|
68
68
|
</YStack>
|
|
69
69
|
</Form>
|
|
70
70
|
);
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
SizeTokens,
|
|
12
12
|
TamaguiElement,
|
|
13
13
|
} from "tamagui";
|
|
14
|
-
import { Text } from "tamagui";
|
|
14
|
+
import { Text, isWeb } from "tamagui";
|
|
15
15
|
import { Skeleton } from "../../Skeleton";
|
|
16
16
|
import { resolveFieldInputProps } from "../../fieldDefaults";
|
|
17
17
|
import { Field, FieldLayout } from "../../fieldLayout";
|
|
@@ -241,6 +241,9 @@ export function Input({
|
|
|
241
241
|
|
|
242
242
|
const areaName =
|
|
243
243
|
visibleLabel || !resolvedAriaLabel ? undefined : { "aria-label": resolvedAriaLabel };
|
|
244
|
+
// A native <form> posts the field under its name, and React DOM drops a
|
|
245
|
+
// `name` it doesn't own on every update, so the Area carries it as a prop.
|
|
246
|
+
const domName = isWeb && name ? { name } : undefined;
|
|
244
247
|
|
|
245
248
|
const handleCopy = useCallback(
|
|
246
249
|
async (text: string) => {
|
|
@@ -332,6 +335,7 @@ export function Input({
|
|
|
332
335
|
value={inputValue ?? ""}
|
|
333
336
|
readOnly
|
|
334
337
|
id={id}
|
|
338
|
+
{...domName}
|
|
335
339
|
aria-readonly="true"
|
|
336
340
|
aria-required={required || undefined}
|
|
337
341
|
aria-invalid={hasError || undefined}
|
|
@@ -364,6 +368,7 @@ export function Input({
|
|
|
364
368
|
{...(placeholder !== undefined ? { placeholder } : undefined)}
|
|
365
369
|
disabled={disabled}
|
|
366
370
|
id={id}
|
|
371
|
+
{...domName}
|
|
367
372
|
{...(handleChange || value !== undefined
|
|
368
373
|
? { value: inputValue ?? "" }
|
|
369
374
|
: { defaultValue: inputValue })}
|
|
@@ -8,6 +8,7 @@ import { Button } from "../../Button";
|
|
|
8
8
|
import { Form } from "../../Form";
|
|
9
9
|
import { MentionInput } from "./index";
|
|
10
10
|
import type { MentionConfig } from "./index";
|
|
11
|
+
import { ActionButton } from "@multiplatform.one/components";
|
|
11
12
|
|
|
12
13
|
const meta: Meta<typeof MentionInput> = {
|
|
13
14
|
title: "Forms/MentionInput",
|
|
@@ -120,7 +121,7 @@ export const Main: Story = {
|
|
|
120
121
|
helperText="Write a message to your team"
|
|
121
122
|
placeholder="Type @ to mention someone"
|
|
122
123
|
/>
|
|
123
|
-
<
|
|
124
|
+
<ActionButton kind="submit" formAction="submit" />
|
|
124
125
|
</YStack>
|
|
125
126
|
</Form>
|
|
126
127
|
);
|
|
@@ -8,6 +8,7 @@ import { Button } from "../../Button";
|
|
|
8
8
|
import { Form } from "../../Form";
|
|
9
9
|
import { Progress } from "./index";
|
|
10
10
|
import { Paragraph } from "@multiplatform.one/theme";
|
|
11
|
+
import { ActionButton } from "@multiplatform.one/components";
|
|
11
12
|
|
|
12
13
|
const meta: Meta<typeof Progress> = {
|
|
13
14
|
title: "Forms/Progress",
|
|
@@ -59,7 +60,7 @@ export const Main: Story = {
|
|
|
59
60
|
name="completion"
|
|
60
61
|
helperText="Read from form state"
|
|
61
62
|
/>
|
|
62
|
-
<
|
|
63
|
+
<ActionButton kind="submit" formAction="submit" />
|
|
63
64
|
</YStack>
|
|
64
65
|
</Form>
|
|
65
66
|
);
|
|
@@ -12,6 +12,7 @@ import { Form } from "../../Form";
|
|
|
12
12
|
import { Checkbox } from "../Checkbox";
|
|
13
13
|
import { Switch } from "../Switch";
|
|
14
14
|
import { RadioGroup } from "./index";
|
|
15
|
+
import { ActionButton } from "@multiplatform.one/components";
|
|
15
16
|
|
|
16
17
|
const meta: Meta<typeof RadioGroup> = {
|
|
17
18
|
title: "Forms/RadioGroup",
|
|
@@ -395,7 +396,7 @@ export const RowPressInSheet: Story = {
|
|
|
395
396
|
return (
|
|
396
397
|
<YStack gap="$3">
|
|
397
398
|
<Text>{summary}</Text>
|
|
398
|
-
<
|
|
399
|
+
<ActionButton kind="filter" onPress={() => setOpen(true)} />
|
|
399
400
|
<AdaptivePopup open={open} onOpenChange={setOpen} title="Filter">
|
|
400
401
|
<YStack gap="$4">
|
|
401
402
|
<RadioGroup
|
|
@@ -55,6 +55,7 @@ export function InlineChoices({
|
|
|
55
55
|
const textColor = knobProps.textAccentColor;
|
|
56
56
|
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
57
57
|
const tabStop = selectedIndex >= 0 ? selectedIndex : 0;
|
|
58
|
+
const glyphed = options.some((option) => option.icon != null);
|
|
58
59
|
|
|
59
60
|
const choose = (index: number) => {
|
|
60
61
|
const option = options[index];
|
|
@@ -85,9 +86,11 @@ export function InlineChoices({
|
|
|
85
86
|
borderColor={formCommonColors.divider}
|
|
86
87
|
pointerEvents="none"
|
|
87
88
|
>
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
89
|
+
{glyphed ? (
|
|
90
|
+
<View flexShrink={0} alignItems="center" justifyContent="center" minWidth={18}>
|
|
91
|
+
<IconSlot icon={option.icon} color={textColor} />
|
|
92
|
+
</View>
|
|
93
|
+
) : null}
|
|
91
94
|
<Text
|
|
92
95
|
fontFamily={knobProps.body.fontFamily}
|
|
93
96
|
fontWeight={knobProps.body.fontWeight}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { keyboardFocusRingProps, useGlyphColor } from "@multiplatform.one/theme";
|
|
2
|
+
import { CaretRightIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useId, useLayoutEffect, useEffect } from "react";
|
|
4
|
+
import { Pressable } from "react-native";
|
|
5
|
+
import { isWeb, Text, View, XStack } from "tamagui";
|
|
6
|
+
import { useFieldDescribedBy } from "../../fieldLayout";
|
|
7
|
+
import { formInputColors } from "../../shared/colorRamps";
|
|
8
|
+
import { useSheetPageOpen, type SheetNavigationStore } from "../../shared/sheetNavigation";
|
|
9
|
+
import { InlineChoices, type InlineChoice } from "./InlineChoices";
|
|
10
|
+
|
|
11
|
+
const useIsoLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
12
|
+
|
|
13
|
+
export interface SheetPickerRowProps {
|
|
14
|
+
store: SheetNavigationStore;
|
|
15
|
+
label: string;
|
|
16
|
+
options: InlineChoice[];
|
|
17
|
+
value?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
onValueChange: (value: string) => void;
|
|
20
|
+
onBlur?: (...args: any[]) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
id?: string;
|
|
23
|
+
knobProps: any;
|
|
24
|
+
markColor: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A long choice list inside a sheet (LC-262, FZ-7830 round 3): a Settings row
|
|
29
|
+
* with the label, the current value and a chevron. Pressing it pushes the
|
|
30
|
+
* checkmark list onto the sheet's own navigation stack; Back returns with the
|
|
31
|
+
* value set. Nothing floats over the field.
|
|
32
|
+
*/
|
|
33
|
+
export function SheetPickerRow({
|
|
34
|
+
store,
|
|
35
|
+
label,
|
|
36
|
+
options,
|
|
37
|
+
value,
|
|
38
|
+
placeholder,
|
|
39
|
+
onValueChange,
|
|
40
|
+
onBlur,
|
|
41
|
+
disabled,
|
|
42
|
+
id,
|
|
43
|
+
knobProps,
|
|
44
|
+
markColor,
|
|
45
|
+
}: SheetPickerRowProps) {
|
|
46
|
+
const pageId = `sheet-picker-${useId()}`;
|
|
47
|
+
const pushed = useSheetPageOpen(store, pageId);
|
|
48
|
+
const describedBy = useFieldDescribedBy();
|
|
49
|
+
const current = options.find((option) => option.value === value);
|
|
50
|
+
const textColor = knobProps.textAccentColor;
|
|
51
|
+
const chevronInk = useGlyphColor("$textMuted");
|
|
52
|
+
|
|
53
|
+
const page = {
|
|
54
|
+
id: pageId,
|
|
55
|
+
title: label,
|
|
56
|
+
content: (
|
|
57
|
+
<InlineChoices
|
|
58
|
+
options={options}
|
|
59
|
+
value={value}
|
|
60
|
+
onValueChange={onValueChange}
|
|
61
|
+
disabled={disabled}
|
|
62
|
+
aria-label={label}
|
|
63
|
+
knobProps={knobProps}
|
|
64
|
+
markColor={markColor}
|
|
65
|
+
/>
|
|
66
|
+
),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
useIsoLayoutEffect(() => {
|
|
70
|
+
if (pushed) store.update(page);
|
|
71
|
+
});
|
|
72
|
+
useEffect(() => () => store.remove(pageId), [store, pageId]);
|
|
73
|
+
|
|
74
|
+
const open = () => {
|
|
75
|
+
if (disabled) return;
|
|
76
|
+
store.push(page);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const row = (
|
|
80
|
+
<XStack
|
|
81
|
+
alignItems="center"
|
|
82
|
+
minHeight={knobProps.menuRow.minHeight}
|
|
83
|
+
paddingHorizontal={knobProps.panelPadding.padding}
|
|
84
|
+
{...knobProps.gap}
|
|
85
|
+
pointerEvents="none"
|
|
86
|
+
>
|
|
87
|
+
<Text
|
|
88
|
+
fontFamily={knobProps.body.fontFamily}
|
|
89
|
+
fontWeight={knobProps.body.fontWeight}
|
|
90
|
+
color={textColor}
|
|
91
|
+
numberOfLines={1}
|
|
92
|
+
flex={1}
|
|
93
|
+
>
|
|
94
|
+
{label}
|
|
95
|
+
</Text>
|
|
96
|
+
<Text
|
|
97
|
+
testID="sheet-picker-value"
|
|
98
|
+
fontFamily={knobProps.body.fontFamily}
|
|
99
|
+
color="$textMuted"
|
|
100
|
+
numberOfLines={1}
|
|
101
|
+
flexShrink={1}
|
|
102
|
+
>
|
|
103
|
+
{current?.label ?? placeholder}
|
|
104
|
+
</Text>
|
|
105
|
+
<CaretRightIcon size={14} weight="bold" color={chevronInk} />
|
|
106
|
+
</XStack>
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const surface = {
|
|
110
|
+
...knobProps.borderRadius,
|
|
111
|
+
borderColor: formInputColors.border.base,
|
|
112
|
+
backgroundColor: formInputColors.background.base,
|
|
113
|
+
overflow: "hidden" as const,
|
|
114
|
+
width: "100%" as const,
|
|
115
|
+
opacity: disabled ? 0.5 : 1,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (isWeb) {
|
|
119
|
+
return (
|
|
120
|
+
<View
|
|
121
|
+
id={id}
|
|
122
|
+
role="button"
|
|
123
|
+
aria-label={label}
|
|
124
|
+
aria-describedby={describedBy}
|
|
125
|
+
aria-disabled={disabled || undefined}
|
|
126
|
+
data-testid="sheet-picker-row"
|
|
127
|
+
tabIndex={disabled ? -1 : 0}
|
|
128
|
+
cursor={disabled ? "default" : "pointer"}
|
|
129
|
+
onPress={open}
|
|
130
|
+
onKeyDown={(event: any) => {
|
|
131
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
open();
|
|
134
|
+
}
|
|
135
|
+
}}
|
|
136
|
+
onBlur={onBlur}
|
|
137
|
+
outlineWidth={0}
|
|
138
|
+
focusVisibleStyle={keyboardFocusRingProps}
|
|
139
|
+
{...surface}
|
|
140
|
+
>
|
|
141
|
+
{row}
|
|
142
|
+
</View>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
return (
|
|
146
|
+
<View {...surface}>
|
|
147
|
+
<Pressable
|
|
148
|
+
testID="sheet-picker-row"
|
|
149
|
+
accessibilityRole="button"
|
|
150
|
+
accessibilityLabel={label}
|
|
151
|
+
accessibilityValue={{ text: current?.label ?? placeholder ?? "" }}
|
|
152
|
+
accessibilityState={{ disabled: !!disabled }}
|
|
153
|
+
disabled={disabled}
|
|
154
|
+
onPress={open}
|
|
155
|
+
>
|
|
156
|
+
{row}
|
|
157
|
+
</Pressable>
|
|
158
|
+
</View>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
} from "../../FloatingPanel";
|
|
67
67
|
import { pickerCompactFace, resolveCompactFace } from "../../FloatingPanel/compactFace";
|
|
68
68
|
import { PanelPortal } from "../../FloatingPanel/PanelPortal";
|
|
69
|
+
import { fixedContainingBlockOrigin } from "../../FloatingPanel/containingBlock";
|
|
69
70
|
import { useInsideOverlay, useOverlayZIndex } from "../../shared/overlayStack";
|
|
70
71
|
import { useDragScroll } from "../../shared/useDragScroll";
|
|
71
72
|
import { useIsInTableCell } from "../../shared/tableCellContext";
|
|
@@ -73,7 +74,9 @@ import { t } from "../../shared/t";
|
|
|
73
74
|
import { orderOptionsBySelected, type SelectedOrder } from "../selectedOrder";
|
|
74
75
|
import { shouldUseIosNativeSelect } from "../nativeSelect";
|
|
75
76
|
import { InlineChoices } from "./InlineChoices";
|
|
76
|
-
import {
|
|
77
|
+
import { SheetPickerRow } from "./SheetPickerRow";
|
|
78
|
+
import { opensBesideTrigger, shouldInlineChoices, shouldPushChoices } from "./shouldInlineChoices";
|
|
79
|
+
import { useSheetNavigation } from "../../shared/sheetNavigation";
|
|
77
80
|
|
|
78
81
|
/** Undefined on web (RNW ships no ActionSheetIOS); real on iOS. */
|
|
79
82
|
const actionSheetIOS = (ReactNative as { ActionSheetIOS?: typeof ReactNative.ActionSheetIOS })
|
|
@@ -540,6 +543,7 @@ function FloatingSelectCore({
|
|
|
540
543
|
const { style: elevatedSurfaceStyle, ...elevatedSurfaceProps } = knobProps.elevatedSurface;
|
|
541
544
|
const hydrationTouch = useTouchSurface();
|
|
542
545
|
const inTableCell = useIsInTableCell();
|
|
546
|
+
const beside = useInsideOverlay() && !inTableCell && opensBesideTrigger(options.length);
|
|
543
547
|
const describedBy = useFieldDescribedBy();
|
|
544
548
|
const glyphColor = useGlyphColor();
|
|
545
549
|
const [open, setOpen] = useState(false);
|
|
@@ -672,8 +676,31 @@ function FloatingSelectCore({
|
|
|
672
676
|
const selectedItemIndex = selectedIndex >= 0 ? selectedIndex : 0;
|
|
673
677
|
const selectedItem = listItemsRef.current[selectedItemIndex];
|
|
674
678
|
const trigger = panel.triggerRef.current;
|
|
675
|
-
if (!dropdownElement || !
|
|
679
|
+
if (!dropdownElement || !trigger) return;
|
|
680
|
+
|
|
681
|
+
if (beside) {
|
|
682
|
+
const isInitial = panel.initializingRef.current;
|
|
683
|
+
if (isInitial) dropdownElement.style.transition = "none";
|
|
684
|
+
const bounds = trigger.getBoundingClientRect();
|
|
685
|
+
const contentHeight = dropdownElement.scrollHeight;
|
|
686
|
+
const below = window.innerHeight - panelViewportPadding - bounds.bottom;
|
|
687
|
+
const above = bounds.top - panelViewportPadding;
|
|
688
|
+
const opensUp = contentHeight > below && above > below;
|
|
689
|
+
const maxHeight = Math.min(contentHeight || Infinity, opensUp ? above : below);
|
|
690
|
+
const top =
|
|
691
|
+
(opensUp ? bounds.top - maxHeight : bounds.bottom) -
|
|
692
|
+
fixedContainingBlockOrigin(dropdownElement).top;
|
|
693
|
+
dropdownElement.style.top = `${top}px`;
|
|
694
|
+
dropdownElement.style.maxHeight = `${maxHeight}px`;
|
|
695
|
+
dropdownElement.style.height = "";
|
|
696
|
+
overlayStyle.current = { top, maxHeight };
|
|
697
|
+
panel.initializingRef.current = false;
|
|
698
|
+
void dropdownElement.offsetHeight;
|
|
699
|
+
if (isInitial) dropdownElement.style.transition = panel.panelTransition;
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
676
702
|
|
|
703
|
+
if (!selectedItem) return;
|
|
677
704
|
const isInitial = panel.initializingRef.current;
|
|
678
705
|
if (isInitial) dropdownElement.style.transition = "none";
|
|
679
706
|
|
|
@@ -813,6 +840,7 @@ function FloatingSelectCore({
|
|
|
813
840
|
panel.placement,
|
|
814
841
|
panel.panelTransition,
|
|
815
842
|
options.length,
|
|
843
|
+
beside,
|
|
816
844
|
]);
|
|
817
845
|
|
|
818
846
|
repositionRef.current = repositionOverlay;
|
|
@@ -1574,6 +1602,9 @@ function NativeSelectCore({
|
|
|
1574
1602
|
// A short list opens as a menu over its trigger; a long one keeps its
|
|
1575
1603
|
// sheet at page level and opens as a menu inside another overlay (FZ-7830).
|
|
1576
1604
|
compactFace={compactFace}
|
|
1605
|
+
{...(asMenu && insideOverlay && opensBesideTrigger(options.length)
|
|
1606
|
+
? { anchorMode: "attach" as const, triggerEcho: false }
|
|
1607
|
+
: null)}
|
|
1577
1608
|
triggerA11y={{
|
|
1578
1609
|
label: ariaLabel ?? fieldA11y?.label,
|
|
1579
1610
|
value: triggerValueText,
|
|
@@ -1762,6 +1793,13 @@ export function Select({
|
|
|
1762
1793
|
const shouldUseSheet = !isWeb || (!effectiveGtSm && !compactMenu);
|
|
1763
1794
|
const inTableCell = useIsInTableCell();
|
|
1764
1795
|
const inline = !inTableCell && shouldInlineChoices({ insideOverlay, multiple, options });
|
|
1796
|
+
const sheetNavigation = useSheetNavigation();
|
|
1797
|
+
const rowLabel = typeof label === "string" ? label : ariaLabel;
|
|
1798
|
+
const pushed =
|
|
1799
|
+
!inline &&
|
|
1800
|
+
!inTableCell &&
|
|
1801
|
+
Boolean(rowLabel) &&
|
|
1802
|
+
shouldPushChoices({ inSheet: Boolean(sheetNavigation), multiple, options });
|
|
1765
1803
|
// DG-CTRL-01 / DG-CTRL-05 — short single-select lists prefer RadioGroup,
|
|
1766
1804
|
// which the inline face already is.
|
|
1767
1805
|
if (!inline) {
|
|
@@ -1837,6 +1875,27 @@ export function Select({
|
|
|
1837
1875
|
handleBlur?: (...args: any[]) => void,
|
|
1838
1876
|
) => {
|
|
1839
1877
|
if (readOnly) return renderReadOnly(selectValue);
|
|
1878
|
+
if (pushed && sheetNavigation) {
|
|
1879
|
+
return (
|
|
1880
|
+
<SheetPickerRow
|
|
1881
|
+
store={sheetNavigation}
|
|
1882
|
+
label={rowLabel as string}
|
|
1883
|
+
options={options}
|
|
1884
|
+
value={typeof selectValue === "string" ? selectValue : undefined}
|
|
1885
|
+
placeholder={placeholder}
|
|
1886
|
+
onValueChange={(val) => {
|
|
1887
|
+
if (disabled) return;
|
|
1888
|
+
handleValueChange?.(val);
|
|
1889
|
+
emitValueChange(val);
|
|
1890
|
+
}}
|
|
1891
|
+
onBlur={handleBlur}
|
|
1892
|
+
disabled={disabled}
|
|
1893
|
+
id={id}
|
|
1894
|
+
knobProps={knobProps}
|
|
1895
|
+
markColor={markColor}
|
|
1896
|
+
/>
|
|
1897
|
+
);
|
|
1898
|
+
}
|
|
1840
1899
|
if (inline) {
|
|
1841
1900
|
return (
|
|
1842
1901
|
<InlineChoices
|
|
@@ -1887,7 +1946,8 @@ export function Select({
|
|
|
1887
1946
|
return (
|
|
1888
1947
|
<FieldLayout
|
|
1889
1948
|
id={id}
|
|
1890
|
-
label={label}
|
|
1949
|
+
label={pushed ? undefined : label}
|
|
1950
|
+
aria-label={pushed ? rowLabel : undefined}
|
|
1891
1951
|
labelProps={labelProps}
|
|
1892
1952
|
error={error}
|
|
1893
1953
|
helperText={helperText}
|
|
@@ -1922,7 +1982,8 @@ export function Select({
|
|
|
1922
1982
|
return (
|
|
1923
1983
|
<FieldLayout
|
|
1924
1984
|
id={id}
|
|
1925
|
-
label={label}
|
|
1985
|
+
label={pushed ? undefined : label}
|
|
1986
|
+
aria-label={pushed ? rowLabel : undefined}
|
|
1926
1987
|
labelProps={labelProps}
|
|
1927
1988
|
error={resolvedError}
|
|
1928
1989
|
helperText={helperText}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
INLINE_CHOICES_MAX,
|
|
4
|
+
opensBesideTrigger,
|
|
5
|
+
shouldInlineChoices,
|
|
6
|
+
shouldPushChoices,
|
|
7
|
+
} from "./shouldInlineChoices";
|
|
3
8
|
|
|
4
9
|
const glyph = "•";
|
|
5
10
|
const withIcons = (n: number) => Array.from({ length: n }, () => ({ icon: glyph }));
|
|
@@ -23,3 +28,18 @@ describe("shouldInlineChoices (LC-262, FZ-7830)", () => {
|
|
|
23
28
|
expect(shouldInlineChoices({ insideOverlay: true, options: [] })).toBe(false);
|
|
24
29
|
});
|
|
25
30
|
});
|
|
31
|
+
|
|
32
|
+
describe("shouldPushChoices and opensBesideTrigger (LC-262, FZ-7830 round 3)", () => {
|
|
33
|
+
it("pushes a single-choice list past five options inside a sheet", () => {
|
|
34
|
+
expect(shouldPushChoices({ inSheet: true, options: withIcons(6) })).toBe(true);
|
|
35
|
+
expect(shouldPushChoices({ inSheet: true, options: withIcons(5) })).toBe(false);
|
|
36
|
+
expect(shouldPushChoices({ inSheet: false, options: withIcons(8) })).toBe(false);
|
|
37
|
+
expect(shouldPushChoices({ inSheet: true, multiple: true, options: withIcons(8) })).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("opens a list of five or fewer beside its field", () => {
|
|
41
|
+
expect(opensBesideTrigger(5)).toBe(true);
|
|
42
|
+
expect(opensBesideTrigger(6)).toBe(false);
|
|
43
|
+
expect(opensBesideTrigger(0)).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -20,3 +20,29 @@ export function shouldInlineChoices({
|
|
|
20
20
|
if (!insideOverlay || multiple || !options?.length) return false;
|
|
21
21
|
return options.length <= INLINE_CHOICES_MAX && options.every((option) => option.icon != null);
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A single-choice Select inside a sheet with more options than the inline
|
|
26
|
+
* list holds pushes its checkmark list onto the sheet's navigation stack from
|
|
27
|
+
* a Settings row (LC-262, FZ-7830 round 3), instead of a menu over the field.
|
|
28
|
+
*/
|
|
29
|
+
export function shouldPushChoices({
|
|
30
|
+
inSheet,
|
|
31
|
+
multiple,
|
|
32
|
+
options,
|
|
33
|
+
}: {
|
|
34
|
+
inSheet: boolean;
|
|
35
|
+
multiple?: boolean;
|
|
36
|
+
options: ReadonlyArray<unknown> | undefined;
|
|
37
|
+
}): boolean {
|
|
38
|
+
if (!inSheet || multiple || !options?.length) return false;
|
|
39
|
+
return options.length > INLINE_CHOICES_MAX;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A short list inside a sheet that is not laid out inline opens as a menu
|
|
44
|
+
* beside its field, under it or above it, never over it (LC-262).
|
|
45
|
+
*/
|
|
46
|
+
export function opensBesideTrigger(optionCount: number): boolean {
|
|
47
|
+
return optionCount > 0 && optionCount <= INLINE_CHOICES_MAX;
|
|
48
|
+
}
|
|
@@ -5,10 +5,10 @@ import { EraserIcon } from "@phosphor-icons/react";
|
|
|
5
5
|
import { useForm } from "@tanstack/react-form";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { YStack } from "tamagui";
|
|
8
|
-
import { Button } from "../../Button";
|
|
9
8
|
import { Form } from "../../Form";
|
|
10
9
|
import { Signature } from "./index";
|
|
11
10
|
import { Text } from "@multiplatform.one/theme";
|
|
11
|
+
import { ActionButton } from "@multiplatform.one/components";
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof Signature> = {
|
|
14
14
|
title: "Forms/Signature",
|
|
@@ -61,7 +61,7 @@ export const Main: Story = {
|
|
|
61
61
|
required
|
|
62
62
|
clearIcon={<EraserIcon size={16} />}
|
|
63
63
|
/>
|
|
64
|
-
<
|
|
64
|
+
<ActionButton kind="submit" formAction="submit" />
|
|
65
65
|
</YStack>
|
|
66
66
|
</Form>
|
|
67
67
|
);
|