@multiplatform.one/forms 7.7.6 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Button/index.cjs +1 -4
- package/dist/cjs/Button/index.native.js +5 -6
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +1 -1
- package/dist/cjs/Chip/index.native.js +1 -1
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/index.cjs +59 -14
- package/dist/cjs/FloatingPanel/index.native.js +16 -7
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/nestedAction.cjs +37 -0
- package/dist/cjs/FloatingPanel/nestedAction.native.js +42 -0
- package/dist/cjs/FloatingPanel/nestedAction.native.js.map +1 -0
- package/dist/cjs/InputParts/index.cjs +19 -8
- package/dist/cjs/InputParts/index.native.js +20 -11
- package/dist/cjs/InputParts/index.native.js.map +1 -1
- package/dist/cjs/Wheel/index.cjs +3 -3
- package/dist/cjs/Wheel/index.native.js +3 -3
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/fieldLayout.cjs +3 -3
- package/dist/cjs/fieldLayout.native.js +3 -3
- package/dist/cjs/fieldLayout.native.js.map +1 -1
- package/dist/cjs/fields/Checkbox/CheckboxFieldFrame.cjs +9 -2
- package/dist/cjs/fields/Checkbox/CheckboxFieldFrame.native.js +10 -1
- package/dist/cjs/fields/Checkbox/CheckboxFieldFrame.native.js.map +1 -1
- package/dist/cjs/fields/Combobox/index.cjs +36 -29
- package/dist/cjs/fields/Combobox/index.native.js +38 -38
- package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/Calendar.cjs +6 -1
- package/dist/cjs/fields/DatePicker/Calendar.native.js +6 -1
- package/dist/cjs/fields/DatePicker/Calendar.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/DateRangePicker.cjs +2 -2
- package/dist/cjs/fields/DatePicker/DateRangePicker.native.js +2 -2
- package/dist/cjs/fields/DatePicker/DateRangePicker.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.cjs +15 -12
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.native.js +16 -12
- package/dist/cjs/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/DatetimePicker.native.js +39 -14
- package/dist/cjs/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/MonthPicker.cjs +10 -3
- package/dist/cjs/fields/DatePicker/MonthPicker.native.js +10 -3
- package/dist/cjs/fields/DatePicker/MonthPicker.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/MultiDatePicker.cjs +2 -2
- package/dist/cjs/fields/DatePicker/MultiDatePicker.native.js +2 -2
- package/dist/cjs/fields/DatePicker/MultiDatePicker.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/index.native.js +3 -0
- package/dist/cjs/fields/DatePicker/index.native.js.map +1 -1
- package/dist/cjs/fields/DatePicker/parts.cjs +26 -14
- package/dist/cjs/fields/DatePicker/parts.native.js +28 -14
- package/dist/cjs/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/cjs/fields/FileUpload/index.cjs +6 -0
- package/dist/cjs/fields/FileUpload/index.native.js +6 -0
- package/dist/cjs/fields/FileUpload/index.native.js.map +1 -1
- package/dist/cjs/fields/Geolocation/GeolocationMap.native.js.map +1 -1
- package/dist/cjs/fields/Geolocation/geocoder.cjs +63 -0
- package/dist/cjs/fields/Geolocation/geocoder.native.js +68 -0
- package/dist/cjs/fields/Geolocation/geocoder.native.js.map +1 -0
- package/dist/cjs/fields/Geolocation/index.cjs +801 -152
- package/dist/cjs/fields/Geolocation/index.native.js +856 -167
- package/dist/cjs/fields/Geolocation/index.native.js.map +1 -1
- package/dist/cjs/fields/Geolocation/nativeSearchFocus.cjs +44 -0
- package/dist/cjs/fields/Geolocation/nativeSearchFocus.native.js +47 -0
- package/dist/cjs/fields/Geolocation/nativeSearchFocus.native.js.map +1 -0
- package/dist/cjs/fields/Icon/drawnSet.cjs +16 -3
- package/dist/cjs/fields/Icon/drawnSet.native.js +20 -3
- package/dist/cjs/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/cjs/fields/Icon/index.cjs +102 -27
- package/dist/cjs/fields/Icon/index.native.js +115 -31
- package/dist/cjs/fields/Icon/index.native.js.map +1 -1
- package/dist/cjs/fields/Input/index.cjs +5 -12
- package/dist/cjs/fields/Input/index.native.js +5 -13
- package/dist/cjs/fields/Input/index.native.js.map +1 -1
- package/dist/cjs/fields/PhoneInput/index.cjs +2 -2
- package/dist/cjs/fields/PhoneInput/index.native.js +2 -2
- package/dist/cjs/fields/PhoneInput/index.native.js.map +1 -1
- package/dist/cjs/fields/RadioGroup/index.cjs +34 -5
- package/dist/cjs/fields/RadioGroup/index.native.js +49 -7
- package/dist/cjs/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/cjs/fields/SearchInput/index.cjs +8 -9
- package/dist/cjs/fields/SearchInput/index.native.js +8 -9
- package/dist/cjs/fields/SearchInput/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/index.cjs +42 -11
- package/dist/cjs/fields/Select/index.native.js +52 -20
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/Stepper/index.cjs +144 -31
- package/dist/cjs/fields/Stepper/index.native.js +151 -31
- package/dist/cjs/fields/Stepper/index.native.js.map +1 -1
- package/dist/cjs/fields/ToggleGroup/index.cjs +35 -2
- package/dist/cjs/fields/ToggleGroup/index.native.js +42 -2
- package/dist/cjs/fields/ToggleGroup/index.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/focusManagement.cjs +24 -11
- package/dist/cjs/shared/focusManagement.native.js +24 -11
- package/dist/cjs/shared/focusManagement.native.js.map +1 -1
- package/dist/cjs/shared/nativeA11y.cjs +57 -0
- package/dist/cjs/shared/nativeA11y.native.js +61 -0
- package/dist/cjs/shared/nativeA11y.native.js.map +1 -0
- package/dist/esm/Button/index.mjs +1 -4
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +5 -6
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +1 -1
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/index.mjs +58 -15
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +15 -8
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/nestedAction.mjs +11 -0
- package/dist/esm/FloatingPanel/nestedAction.mjs.map +1 -0
- package/dist/esm/FloatingPanel/nestedAction.native.js +13 -0
- package/dist/esm/FloatingPanel/nestedAction.native.js.map +1 -0
- package/dist/esm/InputParts/index.mjs +20 -9
- package/dist/esm/InputParts/index.mjs.map +1 -1
- package/dist/esm/InputParts/index.native.js +21 -12
- package/dist/esm/InputParts/index.native.js.map +1 -1
- package/dist/esm/Wheel/index.mjs +3 -3
- package/dist/esm/Wheel/index.mjs.map +1 -1
- package/dist/esm/Wheel/index.native.js +3 -3
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/fieldLayout.mjs +3 -3
- package/dist/esm/fieldLayout.mjs.map +1 -1
- package/dist/esm/fieldLayout.native.js +3 -3
- package/dist/esm/fieldLayout.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.mjs +8 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.mjs.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.native.js +10 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.mjs +36 -29
- package/dist/esm/fields/Combobox/index.mjs.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js +38 -38
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/Calendar.mjs +6 -1
- package/dist/esm/fields/DatePicker/Calendar.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/Calendar.native.js +6 -1
- package/dist/esm/fields/DatePicker/Calendar.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DateRangePicker.mjs +2 -2
- package/dist/esm/fields/DatePicker/DateRangePicker.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/DateRangePicker.native.js +2 -2
- package/dist/esm/fields/DatePicker/DateRangePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.mjs +15 -12
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js +16 -12
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.native.js +39 -14
- package/dist/esm/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MonthPicker.mjs +10 -3
- package/dist/esm/fields/DatePicker/MonthPicker.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/MonthPicker.native.js +10 -3
- package/dist/esm/fields/DatePicker/MonthPicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MultiDatePicker.mjs +2 -2
- package/dist/esm/fields/DatePicker/MultiDatePicker.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/MultiDatePicker.native.js +2 -2
- package/dist/esm/fields/DatePicker/MultiDatePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/index.native.js +3 -0
- package/dist/esm/fields/DatePicker/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/parts.mjs +28 -16
- package/dist/esm/fields/DatePicker/parts.mjs.map +1 -1
- package/dist/esm/fields/DatePicker/parts.native.js +30 -16
- package/dist/esm/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/index.mjs +6 -0
- package/dist/esm/fields/FileUpload/index.mjs.map +1 -1
- package/dist/esm/fields/FileUpload/index.native.js +6 -0
- package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/GeolocationMap.mjs.map +1 -1
- package/dist/esm/fields/Geolocation/GeolocationMap.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geocoder.mjs +33 -0
- package/dist/esm/fields/Geolocation/geocoder.mjs.map +1 -0
- package/dist/esm/fields/Geolocation/geocoder.native.js +35 -0
- package/dist/esm/fields/Geolocation/geocoder.native.js.map +1 -0
- package/dist/esm/fields/Geolocation/index.mjs +792 -149
- package/dist/esm/fields/Geolocation/index.mjs.map +1 -1
- package/dist/esm/fields/Geolocation/index.native.js +847 -164
- package/dist/esm/fields/Geolocation/index.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/nativeSearchFocus.mjs +19 -0
- package/dist/esm/fields/Geolocation/nativeSearchFocus.mjs.map +1 -0
- package/dist/esm/fields/Geolocation/nativeSearchFocus.native.js +19 -0
- package/dist/esm/fields/Geolocation/nativeSearchFocus.native.js.map +1 -0
- package/dist/esm/fields/Icon/drawnSet.mjs +16 -3
- package/dist/esm/fields/Icon/drawnSet.mjs.map +1 -1
- package/dist/esm/fields/Icon/drawnSet.native.js +20 -3
- package/dist/esm/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/esm/fields/Icon/index.mjs +93 -18
- package/dist/esm/fields/Icon/index.mjs.map +1 -1
- package/dist/esm/fields/Icon/index.native.js +106 -22
- package/dist/esm/fields/Icon/index.native.js.map +1 -1
- package/dist/esm/fields/Input/index.mjs +5 -12
- package/dist/esm/fields/Input/index.mjs.map +1 -1
- package/dist/esm/fields/Input/index.native.js +5 -13
- package/dist/esm/fields/Input/index.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/index.mjs +2 -2
- package/dist/esm/fields/PhoneInput/index.mjs.map +1 -1
- package/dist/esm/fields/PhoneInput/index.native.js +2 -2
- package/dist/esm/fields/PhoneInput/index.native.js.map +1 -1
- package/dist/esm/fields/RadioGroup/index.mjs +34 -5
- package/dist/esm/fields/RadioGroup/index.mjs.map +1 -1
- package/dist/esm/fields/RadioGroup/index.native.js +49 -7
- package/dist/esm/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/esm/fields/SearchInput/index.mjs +9 -10
- package/dist/esm/fields/SearchInput/index.mjs.map +1 -1
- package/dist/esm/fields/SearchInput/index.native.js +9 -10
- package/dist/esm/fields/SearchInput/index.native.js.map +1 -1
- package/dist/esm/fields/Select/index.mjs +42 -11
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +52 -20
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/Stepper/index.mjs +145 -32
- package/dist/esm/fields/Stepper/index.mjs.map +1 -1
- package/dist/esm/fields/Stepper/index.native.js +152 -32
- package/dist/esm/fields/Stepper/index.native.js.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.mjs +35 -2
- package/dist/esm/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.native.js +42 -2
- package/dist/esm/fields/ToggleGroup/index.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/focusManagement.mjs +24 -11
- package/dist/esm/shared/focusManagement.mjs.map +1 -1
- package/dist/esm/shared/focusManagement.native.js +24 -11
- package/dist/esm/shared/focusManagement.native.js.map +1 -1
- package/dist/esm/shared/nativeA11y.mjs +31 -0
- package/dist/esm/shared/nativeA11y.mjs.map +1 -0
- package/dist/esm/shared/nativeA11y.native.js +32 -0
- package/dist/esm/shared/nativeA11y.native.js.map +1 -0
- package/dist/jsx/Button/index.mjs +1 -4
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +5 -6
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +1 -1
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/index.mjs +58 -15
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +16 -7
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/nestedAction.mjs +11 -0
- package/dist/jsx/FloatingPanel/nestedAction.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/nestedAction.native.js +42 -0
- package/dist/jsx/FloatingPanel/nestedAction.native.js.map +1 -0
- package/dist/jsx/InputParts/index.mjs +20 -9
- package/dist/jsx/InputParts/index.mjs.map +1 -1
- package/dist/jsx/InputParts/index.native.js +20 -11
- package/dist/jsx/InputParts/index.native.js.map +1 -1
- package/dist/jsx/Wheel/index.mjs +3 -3
- package/dist/jsx/Wheel/index.mjs.map +1 -1
- package/dist/jsx/Wheel/index.native.js +3 -3
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/fieldLayout.mjs +3 -3
- package/dist/jsx/fieldLayout.mjs.map +1 -1
- package/dist/jsx/fieldLayout.native.js +3 -3
- package/dist/jsx/fieldLayout.native.js.map +1 -1
- package/dist/jsx/fields/Checkbox/CheckboxFieldFrame.mjs +8 -1
- package/dist/jsx/fields/Checkbox/CheckboxFieldFrame.mjs.map +1 -1
- package/dist/jsx/fields/Checkbox/CheckboxFieldFrame.native.js +10 -1
- package/dist/jsx/fields/Checkbox/CheckboxFieldFrame.native.js.map +1 -1
- package/dist/jsx/fields/Combobox/index.mjs +36 -29
- package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
- package/dist/jsx/fields/Combobox/index.native.js +38 -38
- package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/Calendar.mjs +6 -1
- package/dist/jsx/fields/DatePicker/Calendar.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/Calendar.native.js +6 -1
- package/dist/jsx/fields/DatePicker/Calendar.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/DateRangePicker.mjs +2 -2
- package/dist/jsx/fields/DatePicker/DateRangePicker.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/DateRangePicker.native.js +2 -2
- package/dist/jsx/fields/DatePicker/DateRangePicker.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.mjs +15 -12
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.native.js +16 -12
- package/dist/jsx/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/DatetimePicker.native.js +39 -14
- package/dist/jsx/fields/DatePicker/DatetimePicker.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/MonthPicker.mjs +10 -3
- package/dist/jsx/fields/DatePicker/MonthPicker.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/MonthPicker.native.js +10 -3
- package/dist/jsx/fields/DatePicker/MonthPicker.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/MultiDatePicker.mjs +2 -2
- package/dist/jsx/fields/DatePicker/MultiDatePicker.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/MultiDatePicker.native.js +2 -2
- package/dist/jsx/fields/DatePicker/MultiDatePicker.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/index.native.js +3 -0
- package/dist/jsx/fields/DatePicker/index.native.js.map +1 -1
- package/dist/jsx/fields/DatePicker/parts.mjs +28 -16
- package/dist/jsx/fields/DatePicker/parts.mjs.map +1 -1
- package/dist/jsx/fields/DatePicker/parts.native.js +28 -14
- package/dist/jsx/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/jsx/fields/FileUpload/index.mjs +6 -0
- package/dist/jsx/fields/FileUpload/index.mjs.map +1 -1
- package/dist/jsx/fields/FileUpload/index.native.js +6 -0
- package/dist/jsx/fields/FileUpload/index.native.js.map +1 -1
- package/dist/jsx/fields/Geolocation/GeolocationMap.mjs.map +1 -1
- package/dist/jsx/fields/Geolocation/GeolocationMap.native.js.map +1 -1
- package/dist/jsx/fields/Geolocation/geocoder.mjs +33 -0
- package/dist/jsx/fields/Geolocation/geocoder.mjs.map +1 -0
- package/dist/jsx/fields/Geolocation/geocoder.native.js +68 -0
- package/dist/jsx/fields/Geolocation/geocoder.native.js.map +1 -0
- package/dist/jsx/fields/Geolocation/index.mjs +792 -149
- package/dist/jsx/fields/Geolocation/index.mjs.map +1 -1
- package/dist/jsx/fields/Geolocation/index.native.js +856 -167
- package/dist/jsx/fields/Geolocation/index.native.js.map +1 -1
- package/dist/jsx/fields/Geolocation/nativeSearchFocus.mjs +19 -0
- package/dist/jsx/fields/Geolocation/nativeSearchFocus.mjs.map +1 -0
- package/dist/jsx/fields/Geolocation/nativeSearchFocus.native.js +47 -0
- package/dist/jsx/fields/Geolocation/nativeSearchFocus.native.js.map +1 -0
- package/dist/jsx/fields/Icon/drawnSet.mjs +16 -3
- package/dist/jsx/fields/Icon/drawnSet.mjs.map +1 -1
- package/dist/jsx/fields/Icon/drawnSet.native.js +20 -3
- package/dist/jsx/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/jsx/fields/Icon/index.mjs +93 -18
- package/dist/jsx/fields/Icon/index.mjs.map +1 -1
- package/dist/jsx/fields/Icon/index.native.js +115 -31
- package/dist/jsx/fields/Icon/index.native.js.map +1 -1
- package/dist/jsx/fields/Input/index.mjs +5 -12
- package/dist/jsx/fields/Input/index.mjs.map +1 -1
- package/dist/jsx/fields/Input/index.native.js +5 -13
- package/dist/jsx/fields/Input/index.native.js.map +1 -1
- package/dist/jsx/fields/PhoneInput/index.mjs +2 -2
- package/dist/jsx/fields/PhoneInput/index.mjs.map +1 -1
- package/dist/jsx/fields/PhoneInput/index.native.js +2 -2
- package/dist/jsx/fields/PhoneInput/index.native.js.map +1 -1
- package/dist/jsx/fields/RadioGroup/index.mjs +34 -5
- package/dist/jsx/fields/RadioGroup/index.mjs.map +1 -1
- package/dist/jsx/fields/RadioGroup/index.native.js +49 -7
- package/dist/jsx/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/jsx/fields/SearchInput/index.mjs +9 -10
- package/dist/jsx/fields/SearchInput/index.mjs.map +1 -1
- package/dist/jsx/fields/SearchInput/index.native.js +8 -9
- package/dist/jsx/fields/SearchInput/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/index.mjs +42 -11
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +52 -20
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/Stepper/index.mjs +145 -32
- package/dist/jsx/fields/Stepper/index.mjs.map +1 -1
- package/dist/jsx/fields/Stepper/index.native.js +151 -31
- package/dist/jsx/fields/Stepper/index.native.js.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.mjs +35 -2
- package/dist/jsx/fields/ToggleGroup/index.mjs.map +1 -1
- package/dist/jsx/fields/ToggleGroup/index.native.js +42 -2
- package/dist/jsx/fields/ToggleGroup/index.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/focusManagement.mjs +24 -11
- package/dist/jsx/shared/focusManagement.mjs.map +1 -1
- package/dist/jsx/shared/focusManagement.native.js +24 -11
- package/dist/jsx/shared/focusManagement.native.js.map +1 -1
- package/dist/jsx/shared/nativeA11y.mjs +31 -0
- package/dist/jsx/shared/nativeA11y.mjs.map +1 -0
- package/dist/jsx/shared/nativeA11y.native.js +61 -0
- package/dist/jsx/shared/nativeA11y.native.js.map +1 -0
- package/package.json +9 -7
- package/src/Button/Button.fontWeight.spec.tsx +75 -0
- package/src/Button/Button.labelInk.spec.tsx +21 -18
- package/src/Button/Button.outlinedChannel.spec.tsx +46 -0
- package/src/Button/Button.sizeLadder.spec.tsx +4 -3
- package/src/Button/Button.stories.tsx +20 -0
- package/src/Button/index.tsx +30 -7
- package/src/Chip/Chip.spec.tsx +3 -1
- package/src/Chip/index.tsx +1 -5
- package/src/FieldGroup.stories.tsx +3 -7
- package/src/FieldLayout.stories.tsx +75 -12
- package/src/Fieldset.stories.tsx +3 -7
- package/src/FloatingPanel/FloatingPanel.native.spec.tsx +54 -0
- package/src/FloatingPanel/FloatingPanel.spec.tsx +109 -0
- package/src/FloatingPanel/index.native.tsx +24 -7
- package/src/FloatingPanel/index.tsx +80 -13
- package/src/FloatingPanel/nestedAction.spec.ts +36 -0
- package/src/FloatingPanel/nestedAction.ts +15 -0
- package/src/FloatingPanel/panelWidthContract.spec.ts +12 -15
- package/src/FormGrid.stories.tsx +5 -11
- package/src/FormsIntegration.stories.tsx +2 -6
- package/src/InputParts/InputButton.spec.tsx +16 -0
- package/src/InputParts/index.tsx +34 -7
- package/src/InputParts/layoutGap.spec.tsx +43 -0
- package/src/Wheel/Wheel.spec.tsx +16 -0
- package/src/Wheel/index.tsx +3 -3
- package/src/fieldFamilyStories.radius.spec.tsx +118 -0
- package/src/fieldLayout.spec.tsx +42 -1
- package/src/fieldLayout.tsx +9 -9
- package/src/fields/Barcode/Barcode.spec.tsx +2 -0
- package/src/fields/Checkbox/CheckboxFieldFrame.spec.tsx +18 -0
- package/src/fields/Checkbox/CheckboxFieldFrame.tsx +6 -1
- package/src/fields/Combobox/Combobox.spec.tsx +48 -1
- package/src/fields/Combobox/index.tsx +53 -39
- package/src/fields/DatePicker/Calendar.tsx +4 -1
- package/src/fields/DatePicker/DatePicker.stories.tsx +22 -1
- package/src/fields/DatePicker/DateRangePicker.tsx +4 -2
- package/src/fields/DatePicker/DatetimePicker.catalog.tsx +21 -19
- package/src/fields/DatePicker/DatetimePicker.native.spec.tsx +144 -0
- package/src/fields/DatePicker/DatetimePicker.native.tsx +57 -32
- package/src/fields/DatePicker/DatetimePicker.stories.tsx +22 -0
- package/src/fields/DatePicker/MonthPicker.tsx +8 -3
- package/src/fields/DatePicker/MultiDatePicker.tsx +4 -2
- package/src/fields/DatePicker/index.native.tsx +1 -0
- package/src/fields/DatePicker/parts.spec.tsx +56 -0
- package/src/fields/DatePicker/parts.tsx +33 -12
- package/src/fields/FileUpload/FileUpload.spec.tsx +29 -0
- package/src/fields/FileUpload/index.tsx +6 -0
- package/src/fields/Geolocation/Geolocation.spec.tsx +287 -35
- package/src/fields/Geolocation/Geolocation.stories.tsx +141 -7
- package/src/fields/Geolocation/GeolocationMap.native.tsx +3 -0
- package/src/fields/Geolocation/GeolocationMap.tsx +4 -0
- package/src/fields/Geolocation/geocoder.spec.ts +59 -0
- package/src/fields/Geolocation/geocoder.ts +84 -0
- package/src/fields/Geolocation/geocoderSeam.spec.tsx +203 -0
- package/src/fields/Geolocation/index.tsx +912 -180
- package/src/fields/Geolocation/nativeSearchFocus.spec.ts +34 -0
- package/src/fields/Geolocation/nativeSearchFocus.ts +19 -0
- package/src/fields/Geolocation/salvage.spec.tsx +398 -0
- package/src/fields/Geolocation/storyProviders.spec.tsx +44 -0
- package/src/fields/Icon/Icon.spec.tsx +215 -1
- package/src/fields/Icon/Icon.stories.tsx +9 -1
- package/src/fields/Icon/drawnSet.tsx +44 -4
- package/src/fields/Icon/index.tsx +118 -18
- package/src/fields/Input/Input.copy.spec.tsx +1 -0
- package/src/fields/Input/Input.spec.tsx +50 -0
- package/src/fields/Input/Input.stories.tsx +1 -1
- package/src/fields/Input/index.tsx +7 -13
- package/src/fields/PhoneInput/index.tsx +2 -2
- package/src/fields/RadioGroup/RadioGroup.native.spec.tsx +67 -0
- package/src/fields/RadioGroup/index.tsx +82 -8
- package/src/fields/SearchInput/SearchInput.spec.tsx +14 -0
- package/src/fields/SearchInput/index.tsx +5 -6
- package/src/fields/Select/Select.spec.tsx +54 -0
- package/src/fields/Select/index.tsx +52 -17
- package/src/fields/Stepper/Stepper.spec.tsx +34 -1
- package/src/fields/Stepper/index.tsx +193 -33
- package/src/fields/ToggleGroup/ToggleGroup.native.spec.tsx +73 -0
- package/src/fields/ToggleGroup/ToggleGroup.spec.tsx +49 -0
- package/src/fields/ToggleGroup/index.tsx +76 -1
- package/src/index.ts +9 -0
- package/src/shared/focusManagement.spec.tsx +68 -0
- package/src/shared/focusManagement.ts +20 -10
- package/src/shared/nativeA11y.spec.ts +64 -0
- package/src/shared/nativeA11y.ts +80 -0
- package/types/Button/index.d.ts +22 -3
- package/types/Button/index.d.ts.map +1 -1
- package/types/Chip/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.d.ts +11 -1
- package/types/FloatingPanel/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.native.d.ts +2 -1
- package/types/FloatingPanel/index.native.d.ts.map +1 -1
- package/types/FloatingPanel/nestedAction.d.ts +13 -0
- package/types/FloatingPanel/nestedAction.d.ts.map +1 -0
- package/types/InputParts/index.d.ts.map +1 -1
- package/types/fields/Checkbox/CheckboxFieldFrame.d.ts +46 -2
- package/types/fields/Checkbox/CheckboxFieldFrame.d.ts.map +1 -1
- package/types/fields/Checkbox/index.d.ts +3 -3
- package/types/fields/Combobox/index.d.ts +3 -1
- package/types/fields/Combobox/index.d.ts.map +1 -1
- package/types/fields/DatePicker/Calendar.d.ts.map +1 -1
- package/types/fields/DatePicker/DateRangePicker.d.ts.map +1 -1
- package/types/fields/DatePicker/DatetimePicker.catalog.d.ts.map +1 -1
- package/types/fields/DatePicker/DatetimePicker.native.d.ts.map +1 -1
- package/types/fields/DatePicker/MonthPicker.d.ts.map +1 -1
- package/types/fields/DatePicker/MultiDatePicker.d.ts.map +1 -1
- package/types/fields/DatePicker/index.native.d.ts.map +1 -1
- package/types/fields/DatePicker/parts.d.ts.map +1 -1
- package/types/fields/FileUpload/index.d.ts.map +1 -1
- package/types/fields/Geolocation/GeolocationMap.d.ts +4 -0
- package/types/fields/Geolocation/GeolocationMap.d.ts.map +1 -1
- package/types/fields/Geolocation/GeolocationMap.native.d.ts +3 -0
- package/types/fields/Geolocation/GeolocationMap.native.d.ts.map +1 -1
- package/types/fields/Geolocation/geocoder.d.ts +53 -0
- package/types/fields/Geolocation/geocoder.d.ts.map +1 -0
- package/types/fields/Geolocation/index.d.ts +18 -2
- package/types/fields/Geolocation/index.d.ts.map +1 -1
- package/types/fields/Geolocation/nativeSearchFocus.d.ts +8 -0
- package/types/fields/Geolocation/nativeSearchFocus.d.ts.map +1 -0
- package/types/fields/Icon/drawnSet.d.ts.map +1 -1
- package/types/fields/Icon/index.d.ts.map +1 -1
- package/types/fields/Input/index.d.ts.map +1 -1
- package/types/fields/PhoneInput/index.d.ts.map +1 -1
- package/types/fields/RadioGroup/index.d.ts +30 -3
- package/types/fields/RadioGroup/index.d.ts.map +1 -1
- package/types/fields/SearchInput/index.d.ts.map +1 -1
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/fields/Stepper/index.d.ts.map +1 -1
- package/types/fields/ToggleGroup/index.d.ts +31 -2
- package/types/fields/ToggleGroup/index.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/shared/focusManagement.d.ts +2 -2
- package/types/shared/focusManagement.d.ts.map +1 -1
- package/types/shared/nativeA11y.d.ts +61 -0
- package/types/shared/nativeA11y.d.ts.map +1 -0
- package/src/router.d.ts +0 -16
|
@@ -28,6 +28,7 @@ __export(Stepper_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(Stepper_exports);
|
|
29
29
|
var import_react = require("@phosphor-icons/react");
|
|
30
30
|
var import_react2 = require("react");
|
|
31
|
+
var import_react_native = require("react-native-web");
|
|
31
32
|
var import_tamagui = require("tamagui");
|
|
32
33
|
var import_theme = require("@multiplatform.one/theme");
|
|
33
34
|
var import_resolveStepperPlacement = require("./resolveStepperPlacement.cjs");
|
|
@@ -42,6 +43,7 @@ var import_t = require("../../shared/t.cjs");
|
|
|
42
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
const repeatDelay = 400;
|
|
44
45
|
const repeatInterval = 80;
|
|
46
|
+
const boundCaptionDuration = 2e3;
|
|
45
47
|
const LARGE_STEP_FACTOR = 10;
|
|
46
48
|
const stepperCssTimings = {
|
|
47
49
|
bouncy: "ease-in 200ms",
|
|
@@ -88,51 +90,107 @@ function useRepeatAction(action, repeatingRef) {
|
|
|
88
90
|
(0, import_react2.useEffect)(() => stop, [stop]);
|
|
89
91
|
return {
|
|
90
92
|
onPressIn: start,
|
|
91
|
-
onPressOut: stop
|
|
93
|
+
onPressOut: stop,
|
|
94
|
+
stop
|
|
92
95
|
};
|
|
93
96
|
}
|
|
94
97
|
function StepperSpinButton({
|
|
95
98
|
kind,
|
|
96
99
|
disabled,
|
|
100
|
+
atBound,
|
|
101
|
+
seamWidth,
|
|
97
102
|
stacked,
|
|
98
103
|
seam,
|
|
99
104
|
onPressIn,
|
|
100
105
|
onPressOut,
|
|
101
106
|
onActivate,
|
|
107
|
+
onBoundPress,
|
|
102
108
|
children
|
|
103
109
|
}) {
|
|
104
110
|
const label = kind === "increment" ? (0, import_t.t)("Increase") : (0, import_t.t)("Decrease");
|
|
105
|
-
|
|
111
|
+
const [pressed, setPressed] = (0, import_react2.useState)(false);
|
|
112
|
+
const button = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_InputParts.Input.Button, {
|
|
106
113
|
tabIndex: -1,
|
|
107
114
|
disabled,
|
|
108
|
-
"aria-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
112
|
-
opacity: disabled ? 0.4 : 1,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
"aria-hidden": true,
|
|
116
|
+
importantForAccessibility: "no-hide-descendants",
|
|
117
|
+
pointerEvents: "none",
|
|
118
|
+
cursor: disabled || atBound ? "not-allowed" : "pointer",
|
|
119
|
+
opacity: disabled || atBound ? 0.4 : 1,
|
|
120
|
+
backgroundColor: pressed && !disabled && !atBound ? import_colorRamps.formButtonColors.background.active : "transparent",
|
|
121
|
+
height: "100%",
|
|
115
122
|
alignSelf: "stretch",
|
|
116
|
-
borderBottomWidth: seam === "bottom" ?
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
borderBottomWidth: seam === "bottom" ? seamWidth : 0,
|
|
124
|
+
...(import_tamagui.isWeb ? {
|
|
125
|
+
style: {
|
|
126
|
+
borderInlineEndWidth: seam === "end" ? seamWidth : 0,
|
|
127
|
+
borderInlineStartWidth: seam === "start" ? seamWidth : 0,
|
|
128
|
+
borderInlineEndStyle: "solid",
|
|
129
|
+
borderInlineStartStyle: "solid"
|
|
130
|
+
}
|
|
131
|
+
} : {
|
|
132
|
+
borderEndWidth: seam === "end" ? seamWidth : 0,
|
|
133
|
+
borderStartWidth: seam === "start" ? seamWidth : 0
|
|
134
|
+
}),
|
|
119
135
|
borderColor: import_colorRamps.formInputColors.border.base,
|
|
120
136
|
focusStyle: noButtonRing,
|
|
121
137
|
focusVisibleStyle: noButtonRing,
|
|
122
138
|
hoverStyle: disabled ? {
|
|
123
139
|
backgroundColor: "transparent"
|
|
124
140
|
} : void 0,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
children
|
|
142
|
+
});
|
|
143
|
+
const start = () => {
|
|
144
|
+
if (disabled) return;
|
|
145
|
+
setPressed(true);
|
|
146
|
+
onActivate();
|
|
147
|
+
if (atBound) onBoundPress();else onPressIn();
|
|
148
|
+
};
|
|
149
|
+
const stop = () => {
|
|
150
|
+
setPressed(false);
|
|
151
|
+
onPressOut();
|
|
152
|
+
};
|
|
153
|
+
const hitStyle = {
|
|
154
|
+
display: "flex",
|
|
155
|
+
height: stacked ? "50%" : "100%",
|
|
156
|
+
flex: stacked ? 1 : void 0
|
|
157
|
+
};
|
|
158
|
+
return import_tamagui.isWeb ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("div", {
|
|
159
|
+
role: "button",
|
|
160
|
+
"aria-label": label,
|
|
161
|
+
"aria-disabled": disabled || atBound || void 0,
|
|
162
|
+
tabIndex: -1,
|
|
163
|
+
"data-stepper-button": kind,
|
|
164
|
+
style: hitStyle,
|
|
165
|
+
onPointerDown: event => {
|
|
166
|
+
preventFocusSteal(event);
|
|
167
|
+
start();
|
|
128
168
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
169
|
+
onMouseDown: preventFocusSteal,
|
|
170
|
+
onPointerUp: stop,
|
|
171
|
+
onPointerCancel: stop,
|
|
172
|
+
onPointerLeave: stop,
|
|
173
|
+
onClick: event => {
|
|
174
|
+
if (event.detail !== 0) return;
|
|
175
|
+
start();
|
|
176
|
+
stop();
|
|
132
177
|
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
178
|
+
children: button
|
|
179
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
|
|
180
|
+
accessibilityRole: "button",
|
|
181
|
+
accessibilityLabel: label,
|
|
182
|
+
accessibilityState: {
|
|
183
|
+
disabled: disabled || atBound
|
|
184
|
+
},
|
|
185
|
+
disabled: disabled || void 0,
|
|
186
|
+
onPressIn: start,
|
|
187
|
+
onPressOut: stop,
|
|
188
|
+
hitSlop: {
|
|
189
|
+
top: seamWidth,
|
|
190
|
+
bottom: seamWidth
|
|
191
|
+
},
|
|
192
|
+
style: hitStyle,
|
|
193
|
+
children: button
|
|
136
194
|
});
|
|
137
195
|
}
|
|
138
196
|
function Stepper(props) {
|
|
@@ -193,6 +251,24 @@ function Stepper(props) {
|
|
|
193
251
|
return "";
|
|
194
252
|
});
|
|
195
253
|
const [valueFlash, setValueFlash] = (0, import_react2.useState)(false);
|
|
254
|
+
const [boundCaption, setBoundCaption] = (0, import_react2.useState)(null);
|
|
255
|
+
const boundTimerRef = (0, import_react2.useRef)(null);
|
|
256
|
+
const clearBoundCaption = (0, import_react2.useCallback)(() => {
|
|
257
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
258
|
+
boundTimerRef.current = null;
|
|
259
|
+
setBoundCaption(null);
|
|
260
|
+
}, []);
|
|
261
|
+
const showBoundCaption = (0, import_react2.useCallback)(kind => {
|
|
262
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
263
|
+
setBoundCaption(kind === "min" ? (0, import_t.t)("Minimum reached") : (0, import_t.t)("Maximum reached"));
|
|
264
|
+
boundTimerRef.current = setTimeout(() => {
|
|
265
|
+
boundTimerRef.current = null;
|
|
266
|
+
setBoundCaption(null);
|
|
267
|
+
}, boundCaptionDuration);
|
|
268
|
+
}, []);
|
|
269
|
+
(0, import_react2.useEffect)(() => () => {
|
|
270
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
271
|
+
}, []);
|
|
196
272
|
const repeatingRef = (0, import_react2.useRef)(false);
|
|
197
273
|
const typingRef = (0, import_react2.useRef)(false);
|
|
198
274
|
const incrementRef = (0, import_react2.useRef)(() => {});
|
|
@@ -231,16 +307,34 @@ function Stepper(props) {
|
|
|
231
307
|
const clamped = clampValue(next);
|
|
232
308
|
const formatted = formatValue(clamped);
|
|
233
309
|
if (formatted === inputValue) return;
|
|
310
|
+
clearBoundCaption();
|
|
234
311
|
if (pulse) pulseDiscreteStep();
|
|
235
312
|
setInputValue(formatted);
|
|
236
313
|
if (!name) onChange?.(clamped);
|
|
237
|
-
}, [clampValue, formatValue, inputValue, name, onChange, pulseDiscreteStep]);
|
|
314
|
+
}, [clampValue, formatValue, inputValue, name, onChange, pulseDiscreteStep, clearBoundCaption]);
|
|
238
315
|
const applyDelta = (0, import_react2.useCallback)(delta => {
|
|
239
316
|
if (disabled || readOnly) return;
|
|
240
317
|
const current = parseValue(inputValue);
|
|
241
318
|
const from = current ?? 0;
|
|
319
|
+
if (current !== null && delta < 0 && boundsLo !== void 0 && from <= boundsLo) {
|
|
320
|
+
showBoundCaption("min");
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (current !== null && delta > 0 && boundsHi !== void 0 && from >= boundsHi) {
|
|
324
|
+
showBoundCaption("max");
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
242
327
|
commitNumber(from + delta, true);
|
|
243
|
-
}, [disabled, readOnly, parseValue, inputValue, commitNumber]);
|
|
328
|
+
}, [disabled, readOnly, parseValue, inputValue, commitNumber, boundsLo, boundsHi, showBoundCaption]);
|
|
329
|
+
(0, import_react2.useEffect)(() => {
|
|
330
|
+
const current = parseValue(inputValue);
|
|
331
|
+
if (disabled || readOnly || current !== null && boundsHi !== void 0 && current >= boundsHi) {
|
|
332
|
+
repeatIncrement.stop();
|
|
333
|
+
}
|
|
334
|
+
if (disabled || readOnly || current !== null && boundsLo !== void 0 && current <= boundsLo) {
|
|
335
|
+
repeatDecrement.stop();
|
|
336
|
+
}
|
|
337
|
+
}, [inputValue, parseValue, boundsLo, boundsHi, disabled, readOnly, repeatIncrement.stop, repeatDecrement.stop]);
|
|
244
338
|
const increment = (0, import_react2.useCallback)(() => applyDelta(step), [applyDelta, step]);
|
|
245
339
|
const decrement = (0, import_react2.useCallback)(() => applyDelta(-step), [applyDelta, step]);
|
|
246
340
|
incrementRef.current = increment;
|
|
@@ -320,16 +414,18 @@ function Stepper(props) {
|
|
|
320
414
|
};
|
|
321
415
|
const stacked = placement === "left" || placement === "right";
|
|
322
416
|
const showSpin = showButtons && !readOnly;
|
|
323
|
-
const
|
|
324
|
-
const incDisabled = !!(disabled || atMax);
|
|
417
|
+
const seamWidth = knobProps.borderRadius.borderWidth;
|
|
325
418
|
const decrementButton = /* @__PURE__ */(0, import_jsx_runtime.jsx)(StepperSpinButton, {
|
|
326
419
|
kind: "decrement",
|
|
327
|
-
disabled:
|
|
420
|
+
disabled: !!disabled,
|
|
421
|
+
atBound: atMin,
|
|
422
|
+
seamWidth,
|
|
328
423
|
stacked,
|
|
329
424
|
seam: placement === "both" ? "end" : void 0,
|
|
330
425
|
onPressIn: repeatDecrement.onPressIn,
|
|
331
426
|
onPressOut: repeatDecrement.onPressOut,
|
|
332
427
|
onActivate: focusArea,
|
|
428
|
+
onBoundPress: () => showBoundCaption("min"),
|
|
333
429
|
children: stacked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.CaretDownIcon, {
|
|
334
430
|
size: iconPx,
|
|
335
431
|
weight: "bold",
|
|
@@ -344,12 +440,15 @@ function Stepper(props) {
|
|
|
344
440
|
});
|
|
345
441
|
const incrementButton = /* @__PURE__ */(0, import_jsx_runtime.jsx)(StepperSpinButton, {
|
|
346
442
|
kind: "increment",
|
|
347
|
-
disabled:
|
|
443
|
+
disabled: !!disabled,
|
|
444
|
+
atBound: atMax,
|
|
445
|
+
seamWidth,
|
|
348
446
|
stacked,
|
|
349
447
|
seam: stacked ? "bottom" : placement === "both" ? "start" : void 0,
|
|
350
448
|
onPressIn: repeatIncrement.onPressIn,
|
|
351
449
|
onPressOut: repeatIncrement.onPressOut,
|
|
352
450
|
onActivate: focusArea,
|
|
451
|
+
onBoundPress: () => showBoundCaption("max"),
|
|
353
452
|
children: stacked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.CaretUpIcon, {
|
|
354
453
|
size: iconPx,
|
|
355
454
|
weight: "bold",
|
|
@@ -367,8 +466,15 @@ function Stepper(props) {
|
|
|
367
466
|
alignSelf: "stretch",
|
|
368
467
|
flexShrink: 0,
|
|
369
468
|
width: controlSize,
|
|
370
|
-
|
|
371
|
-
|
|
469
|
+
...(import_tamagui.isWeb ? {
|
|
470
|
+
borderInlineStartWidth: edge === "end" ? seamWidth : 0,
|
|
471
|
+
borderInlineEndWidth: edge === "start" ? seamWidth : 0,
|
|
472
|
+
borderInlineStartStyle: "solid",
|
|
473
|
+
borderInlineEndStyle: "solid"
|
|
474
|
+
} : {
|
|
475
|
+
borderStartWidth: edge === "end" ? seamWidth : 0,
|
|
476
|
+
borderEndWidth: edge === "start" ? seamWidth : 0
|
|
477
|
+
}),
|
|
372
478
|
borderColor: import_colorRamps.formInputColors.border.base,
|
|
373
479
|
children: [incrementButton, decrementButton]
|
|
374
480
|
});
|
|
@@ -412,11 +518,13 @@ function Stepper(props) {
|
|
|
412
518
|
...(onBlurHandler ? {
|
|
413
519
|
onBlur: () => {
|
|
414
520
|
typingRef.current = false;
|
|
521
|
+
clearBoundCaption();
|
|
415
522
|
onBlurHandler();
|
|
416
523
|
}
|
|
417
524
|
} : {
|
|
418
525
|
onBlur: () => {
|
|
419
526
|
typingRef.current = false;
|
|
527
|
+
clearBoundCaption();
|
|
420
528
|
}
|
|
421
529
|
}),
|
|
422
530
|
...(onFocusHandler ? {
|
|
@@ -427,7 +535,12 @@ function Stepper(props) {
|
|
|
427
535
|
size: controlSize,
|
|
428
536
|
disabled,
|
|
429
537
|
"data-stepper": "true",
|
|
538
|
+
"data-stepper-control": "true",
|
|
430
539
|
"data-stepper-placement": placement,
|
|
540
|
+
...(showSpin ? {
|
|
541
|
+
paddingHorizontal: 0,
|
|
542
|
+
sizeRecipeEscape: "LC-81 stepper segments reach the compound frame edges"
|
|
543
|
+
} : void 0),
|
|
431
544
|
children: [showSpin && placement === "both" ? decrementButton : null, showSpin && placement === "left" ? spinColumn("start") : null, area, showSpin && placement === "right" ? spinColumn("end") : null, showSpin && placement === "both" ? incrementButton : null]
|
|
432
545
|
});
|
|
433
546
|
if (import_tamagui.isWeb && !disabled && !readOnly) {
|
|
@@ -466,7 +579,7 @@ function Stepper(props) {
|
|
|
466
579
|
label,
|
|
467
580
|
labelProps,
|
|
468
581
|
error: errorProp,
|
|
469
|
-
helperText,
|
|
582
|
+
helperText: boundCaption ?? helperText,
|
|
470
583
|
required,
|
|
471
584
|
size,
|
|
472
585
|
knobProps,
|
|
@@ -491,7 +604,7 @@ function Stepper(props) {
|
|
|
491
604
|
label,
|
|
492
605
|
labelProps,
|
|
493
606
|
error: errorProp,
|
|
494
|
-
helperText,
|
|
607
|
+
helperText: boundCaption ?? helperText,
|
|
495
608
|
required,
|
|
496
609
|
size,
|
|
497
610
|
readOnly,
|
|
@@ -31,6 +31,7 @@ module.exports = __toCommonJS(Stepper_exports);
|
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("@phosphor-icons/react");
|
|
33
33
|
var import_react2 = require("react");
|
|
34
|
+
var import_react_native = require("react-native");
|
|
34
35
|
var import_tamagui = require("tamagui");
|
|
35
36
|
var import_theme = require("@multiplatform.one/theme");
|
|
36
37
|
var import_resolveStepperPlacement = require("./resolveStepperPlacement.native.js");
|
|
@@ -44,6 +45,7 @@ var import_colorRamps = require("../../shared/colorRamps.native.js");
|
|
|
44
45
|
var import_t = require("../../shared/t.native.js");
|
|
45
46
|
var repeatDelay = 400;
|
|
46
47
|
var repeatInterval = 80;
|
|
48
|
+
var boundCaptionDuration = 2e3;
|
|
47
49
|
var LARGE_STEP_FACTOR = 10;
|
|
48
50
|
var stepperCssTimings = {
|
|
49
51
|
bouncy: "ease-in 200ms",
|
|
@@ -95,52 +97,109 @@ function useRepeatAction(action, repeatingRef) {
|
|
|
95
97
|
}, [stop]);
|
|
96
98
|
return {
|
|
97
99
|
onPressIn: start,
|
|
98
|
-
onPressOut: stop
|
|
100
|
+
onPressOut: stop,
|
|
101
|
+
stop
|
|
99
102
|
};
|
|
100
103
|
}
|
|
101
104
|
function StepperSpinButton(param) {
|
|
102
105
|
var {
|
|
103
106
|
kind,
|
|
104
107
|
disabled,
|
|
108
|
+
atBound,
|
|
109
|
+
seamWidth,
|
|
105
110
|
stacked,
|
|
106
111
|
seam,
|
|
107
112
|
onPressIn,
|
|
108
113
|
onPressOut,
|
|
109
114
|
onActivate,
|
|
115
|
+
onBoundPress,
|
|
110
116
|
children
|
|
111
117
|
} = param;
|
|
112
118
|
var label = kind === "increment" ? (0, import_t.t)("Increase") : (0, import_t.t)("Decrease");
|
|
113
|
-
|
|
119
|
+
var [pressed, setPressed] = (0, import_react2.useState)(false);
|
|
120
|
+
var button = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_InputParts.Input.Button, {
|
|
114
121
|
tabIndex: -1,
|
|
115
122
|
disabled,
|
|
116
|
-
"aria-
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
120
|
-
opacity: disabled ? 0.4 : 1,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
"aria-hidden": true,
|
|
124
|
+
importantForAccessibility: "no-hide-descendants",
|
|
125
|
+
pointerEvents: "none",
|
|
126
|
+
cursor: disabled || atBound ? "not-allowed" : "pointer",
|
|
127
|
+
opacity: disabled || atBound ? 0.4 : 1,
|
|
128
|
+
backgroundColor: pressed && !disabled && !atBound ? import_colorRamps.formButtonColors.background.active : "transparent",
|
|
129
|
+
height: "100%",
|
|
123
130
|
alignSelf: "stretch",
|
|
124
|
-
borderBottomWidth: seam === "bottom" ?
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
borderBottomWidth: seam === "bottom" ? seamWidth : 0,
|
|
132
|
+
...(import_tamagui.isWeb ? {
|
|
133
|
+
style: {
|
|
134
|
+
borderInlineEndWidth: seam === "end" ? seamWidth : 0,
|
|
135
|
+
borderInlineStartWidth: seam === "start" ? seamWidth : 0,
|
|
136
|
+
borderInlineEndStyle: "solid",
|
|
137
|
+
borderInlineStartStyle: "solid"
|
|
138
|
+
}
|
|
139
|
+
} : {
|
|
140
|
+
borderEndWidth: seam === "end" ? seamWidth : 0,
|
|
141
|
+
borderStartWidth: seam === "start" ? seamWidth : 0
|
|
142
|
+
}),
|
|
127
143
|
borderColor: import_colorRamps.formInputColors.border.base,
|
|
128
144
|
focusStyle: noButtonRing,
|
|
129
145
|
focusVisibleStyle: noButtonRing,
|
|
130
146
|
hoverStyle: disabled ? {
|
|
131
147
|
backgroundColor: "transparent"
|
|
132
148
|
} : void 0,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
149
|
+
children
|
|
150
|
+
});
|
|
151
|
+
var start = function start2() {
|
|
152
|
+
if (disabled) return;
|
|
153
|
+
setPressed(true);
|
|
154
|
+
onActivate();
|
|
155
|
+
if (atBound) onBoundPress();else onPressIn();
|
|
156
|
+
};
|
|
157
|
+
var stop = function stop2() {
|
|
158
|
+
setPressed(false);
|
|
159
|
+
onPressOut();
|
|
160
|
+
};
|
|
161
|
+
var hitStyle = {
|
|
162
|
+
display: "flex",
|
|
163
|
+
height: stacked ? "50%" : "100%",
|
|
164
|
+
flex: stacked ? 1 : void 0
|
|
165
|
+
};
|
|
166
|
+
return import_tamagui.isWeb ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("div", {
|
|
167
|
+
role: "button",
|
|
168
|
+
"aria-label": label,
|
|
169
|
+
"aria-disabled": disabled || atBound || void 0,
|
|
170
|
+
tabIndex: -1,
|
|
171
|
+
"data-stepper-button": kind,
|
|
172
|
+
style: hitStyle,
|
|
173
|
+
onPointerDown: function onPointerDown(event) {
|
|
174
|
+
preventFocusSteal(event);
|
|
175
|
+
start();
|
|
136
176
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
177
|
+
onMouseDown: preventFocusSteal,
|
|
178
|
+
onPointerUp: stop,
|
|
179
|
+
onPointerCancel: stop,
|
|
180
|
+
onPointerLeave: stop,
|
|
181
|
+
onClick: function onClick(event) {
|
|
182
|
+
if (event.detail !== 0) return;
|
|
183
|
+
start();
|
|
184
|
+
stop();
|
|
140
185
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
186
|
+
children: button
|
|
187
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
|
|
188
|
+
accessibilityRole: "button",
|
|
189
|
+
accessibilityLabel: label,
|
|
190
|
+
accessibilityState: {
|
|
191
|
+
disabled: disabled || atBound
|
|
192
|
+
},
|
|
193
|
+
// An explicit false overrides accessibilityState in React Native.
|
|
194
|
+
disabled: disabled || void 0,
|
|
195
|
+
onPressIn: start,
|
|
196
|
+
onPressOut: stop,
|
|
197
|
+
hitSlop: {
|
|
198
|
+
top: seamWidth,
|
|
199
|
+
bottom: seamWidth
|
|
200
|
+
},
|
|
201
|
+
style: hitStyle,
|
|
202
|
+
children: button
|
|
144
203
|
});
|
|
145
204
|
}
|
|
146
205
|
function Stepper(props) {
|
|
@@ -201,6 +260,26 @@ function Stepper(props) {
|
|
|
201
260
|
return "";
|
|
202
261
|
});
|
|
203
262
|
var [valueFlash, setValueFlash] = (0, import_react2.useState)(false);
|
|
263
|
+
var [boundCaption, setBoundCaption] = (0, import_react2.useState)(null);
|
|
264
|
+
var boundTimerRef = (0, import_react2.useRef)(null);
|
|
265
|
+
var clearBoundCaption = (0, import_react2.useCallback)(function () {
|
|
266
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
267
|
+
boundTimerRef.current = null;
|
|
268
|
+
setBoundCaption(null);
|
|
269
|
+
}, []);
|
|
270
|
+
var showBoundCaption = (0, import_react2.useCallback)(function (kind) {
|
|
271
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
272
|
+
setBoundCaption(kind === "min" ? (0, import_t.t)("Minimum reached") : (0, import_t.t)("Maximum reached"));
|
|
273
|
+
boundTimerRef.current = setTimeout(function () {
|
|
274
|
+
boundTimerRef.current = null;
|
|
275
|
+
setBoundCaption(null);
|
|
276
|
+
}, boundCaptionDuration);
|
|
277
|
+
}, []);
|
|
278
|
+
(0, import_react2.useEffect)(function () {
|
|
279
|
+
return function () {
|
|
280
|
+
if (boundTimerRef.current) clearTimeout(boundTimerRef.current);
|
|
281
|
+
};
|
|
282
|
+
}, []);
|
|
204
283
|
var repeatingRef = (0, import_react2.useRef)(false);
|
|
205
284
|
var typingRef = (0, import_react2.useRef)(false);
|
|
206
285
|
var incrementRef = (0, import_react2.useRef)(function () {});
|
|
@@ -247,16 +326,34 @@ function Stepper(props) {
|
|
|
247
326
|
var clamped = clampValue(next);
|
|
248
327
|
var formatted = formatValue(clamped);
|
|
249
328
|
if (formatted === inputValue) return;
|
|
329
|
+
clearBoundCaption();
|
|
250
330
|
if (pulse) pulseDiscreteStep();
|
|
251
331
|
setInputValue(formatted);
|
|
252
332
|
if (!name) onChange === null || onChange === void 0 ? void 0 : onChange(clamped);
|
|
253
|
-
}, [clampValue, formatValue, inputValue, name, onChange, pulseDiscreteStep]);
|
|
333
|
+
}, [clampValue, formatValue, inputValue, name, onChange, pulseDiscreteStep, clearBoundCaption]);
|
|
254
334
|
var applyDelta = (0, import_react2.useCallback)(function (delta) {
|
|
255
335
|
if (disabled || readOnly) return;
|
|
256
336
|
var current = parseValue(inputValue);
|
|
257
337
|
var from = current !== null && current !== void 0 ? current : 0;
|
|
338
|
+
if (current !== null && delta < 0 && boundsLo !== void 0 && from <= boundsLo) {
|
|
339
|
+
showBoundCaption("min");
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
if (current !== null && delta > 0 && boundsHi !== void 0 && from >= boundsHi) {
|
|
343
|
+
showBoundCaption("max");
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
258
346
|
commitNumber(from + delta, true);
|
|
259
|
-
}, [disabled, readOnly, parseValue, inputValue, commitNumber]);
|
|
347
|
+
}, [disabled, readOnly, parseValue, inputValue, commitNumber, boundsLo, boundsHi, showBoundCaption]);
|
|
348
|
+
(0, import_react2.useEffect)(function () {
|
|
349
|
+
var current = parseValue(inputValue);
|
|
350
|
+
if (disabled || readOnly || current !== null && boundsHi !== void 0 && current >= boundsHi) {
|
|
351
|
+
repeatIncrement.stop();
|
|
352
|
+
}
|
|
353
|
+
if (disabled || readOnly || current !== null && boundsLo !== void 0 && current <= boundsLo) {
|
|
354
|
+
repeatDecrement.stop();
|
|
355
|
+
}
|
|
356
|
+
}, [inputValue, parseValue, boundsLo, boundsHi, disabled, readOnly, repeatIncrement.stop, repeatDecrement.stop]);
|
|
260
357
|
var increment = (0, import_react2.useCallback)(function () {
|
|
261
358
|
return applyDelta(step);
|
|
262
359
|
}, [applyDelta, step]);
|
|
@@ -343,16 +440,20 @@ function Stepper(props) {
|
|
|
343
440
|
};
|
|
344
441
|
var stacked = placement === "left" || placement === "right";
|
|
345
442
|
var showSpin = showButtons && !readOnly;
|
|
346
|
-
var
|
|
347
|
-
var incDisabled = !!(disabled || atMax);
|
|
443
|
+
var seamWidth = knobProps.borderRadius.borderWidth;
|
|
348
444
|
var decrementButton = /* @__PURE__ */(0, import_jsx_runtime.jsx)(StepperSpinButton, {
|
|
349
445
|
kind: "decrement",
|
|
350
|
-
disabled:
|
|
446
|
+
disabled: !!disabled,
|
|
447
|
+
atBound: atMin,
|
|
448
|
+
seamWidth,
|
|
351
449
|
stacked,
|
|
352
450
|
seam: placement === "both" ? "end" : void 0,
|
|
353
451
|
onPressIn: repeatDecrement.onPressIn,
|
|
354
452
|
onPressOut: repeatDecrement.onPressOut,
|
|
355
453
|
onActivate: focusArea,
|
|
454
|
+
onBoundPress: function onBoundPress() {
|
|
455
|
+
return showBoundCaption("min");
|
|
456
|
+
},
|
|
356
457
|
children: stacked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.CaretDownIcon, {
|
|
357
458
|
size: iconPx,
|
|
358
459
|
weight: "bold",
|
|
@@ -367,12 +468,17 @@ function Stepper(props) {
|
|
|
367
468
|
});
|
|
368
469
|
var incrementButton = /* @__PURE__ */(0, import_jsx_runtime.jsx)(StepperSpinButton, {
|
|
369
470
|
kind: "increment",
|
|
370
|
-
disabled:
|
|
471
|
+
disabled: !!disabled,
|
|
472
|
+
atBound: atMax,
|
|
473
|
+
seamWidth,
|
|
371
474
|
stacked,
|
|
372
475
|
seam: stacked ? "bottom" : placement === "both" ? "start" : void 0,
|
|
373
476
|
onPressIn: repeatIncrement.onPressIn,
|
|
374
477
|
onPressOut: repeatIncrement.onPressOut,
|
|
375
478
|
onActivate: focusArea,
|
|
479
|
+
onBoundPress: function onBoundPress() {
|
|
480
|
+
return showBoundCaption("max");
|
|
481
|
+
},
|
|
376
482
|
children: stacked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.CaretUpIcon, {
|
|
377
483
|
size: iconPx,
|
|
378
484
|
weight: "bold",
|
|
@@ -391,8 +497,15 @@ function Stepper(props) {
|
|
|
391
497
|
alignSelf: "stretch",
|
|
392
498
|
flexShrink: 0,
|
|
393
499
|
width: controlSize,
|
|
394
|
-
|
|
395
|
-
|
|
500
|
+
...(import_tamagui.isWeb ? {
|
|
501
|
+
borderInlineStartWidth: edge === "end" ? seamWidth : 0,
|
|
502
|
+
borderInlineEndWidth: edge === "start" ? seamWidth : 0,
|
|
503
|
+
borderInlineStartStyle: "solid",
|
|
504
|
+
borderInlineEndStyle: "solid"
|
|
505
|
+
} : {
|
|
506
|
+
borderStartWidth: edge === "end" ? seamWidth : 0,
|
|
507
|
+
borderEndWidth: edge === "start" ? seamWidth : 0
|
|
508
|
+
}),
|
|
396
509
|
borderColor: import_colorRamps.formInputColors.border.base,
|
|
397
510
|
children: [incrementButton, decrementButton]
|
|
398
511
|
});
|
|
@@ -443,11 +556,13 @@ function Stepper(props) {
|
|
|
443
556
|
...(onBlurHandler ? {
|
|
444
557
|
onBlur: function onBlur2() {
|
|
445
558
|
typingRef.current = false;
|
|
559
|
+
clearBoundCaption();
|
|
446
560
|
onBlurHandler();
|
|
447
561
|
}
|
|
448
562
|
} : {
|
|
449
563
|
onBlur: function onBlur2() {
|
|
450
564
|
typingRef.current = false;
|
|
565
|
+
clearBoundCaption();
|
|
451
566
|
}
|
|
452
567
|
}),
|
|
453
568
|
...(onFocusHandler ? {
|
|
@@ -458,7 +573,12 @@ function Stepper(props) {
|
|
|
458
573
|
size: controlSize,
|
|
459
574
|
disabled,
|
|
460
575
|
"data-stepper": "true",
|
|
576
|
+
"data-stepper-control": "true",
|
|
461
577
|
"data-stepper-placement": placement,
|
|
578
|
+
...(showSpin ? {
|
|
579
|
+
paddingHorizontal: 0,
|
|
580
|
+
sizeRecipeEscape: "LC-81 stepper segments reach the compound frame edges"
|
|
581
|
+
} : void 0),
|
|
462
582
|
children: [showSpin && placement === "both" ? decrementButton : null, showSpin && placement === "left" ? spinColumn("start") : null, area, showSpin && placement === "right" ? spinColumn("end") : null, showSpin && placement === "both" ? incrementButton : null]
|
|
463
583
|
});
|
|
464
584
|
if (import_tamagui.isWeb && !disabled && !readOnly) {
|
|
@@ -497,7 +617,7 @@ function Stepper(props) {
|
|
|
497
617
|
label,
|
|
498
618
|
labelProps,
|
|
499
619
|
error: errorProp,
|
|
500
|
-
helperText,
|
|
620
|
+
helperText: boundCaption !== null && boundCaption !== void 0 ? boundCaption : helperText,
|
|
501
621
|
required,
|
|
502
622
|
size,
|
|
503
623
|
knobProps,
|
|
@@ -525,7 +645,7 @@ function Stepper(props) {
|
|
|
525
645
|
label,
|
|
526
646
|
labelProps,
|
|
527
647
|
error: errorProp,
|
|
528
|
-
helperText,
|
|
648
|
+
helperText: boundCaption !== null && boundCaption !== void 0 ? boundCaption : helperText,
|
|
529
649
|
required,
|
|
530
650
|
size,
|
|
531
651
|
readOnly,
|