@multiplatform.one/forms 7.77.0 → 7.77.2
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/IconButtonGroup.cjs +45 -18
- package/dist/cjs/Button/IconButtonGroup.native.js +51 -20
- package/dist/cjs/Button/IconButtonGroup.native.js.map +1 -1
- package/dist/cjs/Button/circleGlyph.cjs +12 -2
- package/dist/cjs/Button/circleGlyph.native.js +12 -1
- package/dist/cjs/Button/circleGlyph.native.js.map +1 -1
- package/dist/cjs/Button/iconButtonGroupContext.cjs +7 -1
- package/dist/cjs/Button/iconButtonGroupContext.native.js +7 -1
- package/dist/cjs/Button/iconButtonGroupContext.native.js.map +1 -1
- package/dist/cjs/Button/index.cjs +3 -11
- package/dist/cjs/Button/index.native.js +3 -12
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/coverRect.cjs +50 -0
- package/dist/cjs/FloatingPanel/coverRect.native.js +54 -0
- package/dist/cjs/FloatingPanel/coverRect.native.js.map +1 -0
- package/dist/cjs/FloatingPanel/iconEcho.cjs +3 -1
- package/dist/cjs/FloatingPanel/iconEcho.native.js +3 -1
- package/dist/cjs/FloatingPanel/iconEcho.native.js.map +1 -1
- package/dist/cjs/FloatingPanel/index.cjs +27 -29
- package/dist/cjs/FloatingPanel/index.native.js +41 -15
- package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
- package/dist/cjs/InputParts/index.cjs +5 -0
- package/dist/cjs/InputParts/index.native.js +7 -0
- package/dist/cjs/InputParts/index.native.js.map +1 -1
- package/dist/cjs/InputParts/keyboardAppearance.cjs +30 -0
- package/dist/cjs/InputParts/keyboardAppearance.native.js +33 -0
- package/dist/cjs/InputParts/keyboardAppearance.native.js.map +1 -0
- package/dist/cjs/fields/Duration/DurationWheel.cjs +34 -0
- package/dist/cjs/fields/Duration/DurationWheel.native.js +132 -0
- package/dist/cjs/fields/Duration/DurationWheel.native.js.map +1 -0
- package/dist/cjs/fields/Duration/durationMath.cjs +19 -1
- package/dist/cjs/fields/Duration/durationMath.native.js +19 -1
- package/dist/cjs/fields/Duration/durationMath.native.js.map +1 -1
- package/dist/cjs/fields/Duration/durationWheelTypes.cjs +18 -0
- package/dist/cjs/fields/Duration/durationWheelTypes.native.js +21 -0
- package/dist/cjs/fields/Duration/durationWheelTypes.native.js.map +1 -0
- package/dist/cjs/fields/Duration/index.cjs +30 -10
- package/dist/cjs/fields/Duration/index.native.js +32 -12
- package/dist/cjs/fields/Duration/index.native.js.map +1 -1
- package/dist/cjs/fields/Select/index.cjs +98 -30
- package/dist/cjs/fields/Select/index.native.js +122 -54
- package/dist/cjs/fields/Select/index.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.cjs +8 -7
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js +8 -7
- package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/osDateTimeIosDisplay.cjs +1 -1
- package/dist/cjs/fields/nativeDateTime/osDateTimeIosDisplay.native.js +1 -1
- package/dist/cjs/fields/nativeDateTime/osDateTimeIosDisplay.native.js.map +1 -1
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.cjs +1 -1
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js +1 -1
- package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -1
- package/dist/cjs/shared/floatingList.cjs +2 -3
- package/dist/cjs/shared/floatingList.native.js +2 -3
- package/dist/cjs/shared/floatingList.native.js.map +1 -1
- package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
- package/dist/esm/Button/IconButtonGroup.mjs +47 -20
- package/dist/esm/Button/IconButtonGroup.mjs.map +1 -1
- package/dist/esm/Button/IconButtonGroup.native.js +53 -22
- package/dist/esm/Button/IconButtonGroup.native.js.map +1 -1
- package/dist/esm/Button/circleGlyph.mjs +9 -1
- package/dist/esm/Button/circleGlyph.mjs.map +1 -1
- package/dist/esm/Button/circleGlyph.native.js +10 -1
- package/dist/esm/Button/circleGlyph.native.js.map +1 -1
- package/dist/esm/Button/iconButtonGroupContext.mjs +5 -1
- package/dist/esm/Button/iconButtonGroupContext.mjs.map +1 -1
- package/dist/esm/Button/iconButtonGroupContext.native.js +5 -1
- package/dist/esm/Button/iconButtonGroupContext.native.js.map +1 -1
- package/dist/esm/Button/index.mjs +1 -9
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +1 -10
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/Button/mediaPlate.native.js.map +1 -1
- package/dist/esm/Button/webGlass.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/UnsavedChangesDialog.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/clientKnownIdentity.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/commitImmediateField.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/index.native.js.map +1 -1
- package/dist/esm/ContextualSaveBar/useUnsavedChangesGuard.native.js.map +1 -1
- package/dist/esm/ControlGroup/index.native.js.map +1 -1
- package/dist/esm/DescriptionList/index.native.js.map +1 -1
- package/dist/esm/ErrorSummary.native.js.map +1 -1
- package/dist/esm/FieldDisplay/editMode.native.js.map +1 -1
- package/dist/esm/FieldDisplay/formatters.native.js.map +1 -1
- package/dist/esm/FieldDisplay/index.native.js.map +1 -1
- package/dist/esm/FieldGroup.native.js.map +1 -1
- package/dist/esm/FloatingPanel/PanelHeader.native.js.map +1 -1
- package/dist/esm/FloatingPanel/RegularPanel.native.js.map +1 -1
- package/dist/esm/FloatingPanel/compactFace.native.js.map +1 -1
- package/dist/esm/FloatingPanel/containingBlock.native.js.map +1 -1
- package/dist/esm/FloatingPanel/coverRect.mjs +23 -0
- package/dist/esm/FloatingPanel/coverRect.mjs.map +1 -0
- package/dist/esm/FloatingPanel/coverRect.native.js +24 -0
- package/dist/esm/FloatingPanel/coverRect.native.js.map +1 -0
- package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -1
- package/dist/esm/FloatingPanel/iconEcho.mjs +4 -2
- package/dist/esm/FloatingPanel/iconEcho.mjs.map +1 -1
- package/dist/esm/FloatingPanel/iconEcho.native.js +4 -2
- package/dist/esm/FloatingPanel/iconEcho.native.js.map +1 -1
- package/dist/esm/FloatingPanel/index.mjs +27 -29
- package/dist/esm/FloatingPanel/index.mjs.map +1 -1
- package/dist/esm/FloatingPanel/index.native.js +41 -15
- package/dist/esm/FloatingPanel/index.native.js.map +1 -1
- package/dist/esm/FloatingPanel/nestedAction.native.js.map +1 -1
- package/dist/esm/FloatingPanel/paintedBox.native.js.map +1 -1
- package/dist/esm/FloatingPanel/panelWidth.native.js.map +1 -1
- package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
- package/dist/esm/FloatingPanel/regularPlacement.native.js.map +1 -1
- package/dist/esm/FloatingPanel/trailingAction.native.js.map +1 -1
- package/dist/esm/FloatingPanel/useFloatingPanel.native.js.map +1 -1
- package/dist/esm/Form/index.native.js.map +1 -1
- package/dist/esm/Form/submissionController.native.js.map +1 -1
- package/dist/esm/Form/validateOn.native.js.map +1 -1
- package/dist/esm/FormGrid.native.js.map +1 -1
- package/dist/esm/FormSection.native.js.map +1 -1
- package/dist/esm/InputParts/PasswordReveal.native.js.map +1 -1
- package/dist/esm/InputParts/index.mjs +6 -1
- package/dist/esm/InputParts/index.mjs.map +1 -1
- package/dist/esm/InputParts/index.native.js +8 -1
- package/dist/esm/InputParts/index.native.js.map +1 -1
- package/dist/esm/InputParts/keyboardAppearance.mjs +5 -0
- package/dist/esm/InputParts/keyboardAppearance.mjs.map +1 -0
- package/dist/esm/InputParts/keyboardAppearance.native.js +5 -0
- package/dist/esm/InputParts/keyboardAppearance.native.js.map +1 -0
- package/dist/esm/Label/index.native.js.map +1 -1
- package/dist/esm/MediaPicker/base64.native.js.map +1 -1
- package/dist/esm/MediaPicker/payload.native.js.map +1 -1
- package/dist/esm/MediaPicker/types.native.js.map +1 -1
- package/dist/esm/MediaPicker/useMediaPicker.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/Spinner/SpinnerGlyph.native.js.map +1 -1
- package/dist/esm/Spinner/spinnerSize.native.js.map +1 -1
- package/dist/esm/Table/index.native.js.map +1 -1
- package/dist/esm/Wheel/haptic.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wheel/wheelShared.native.js.map +1 -1
- package/dist/esm/actionLabel.native.js.map +1 -1
- package/dist/esm/fieldDefaults.native.js.map +1 -1
- package/dist/esm/fieldLayout.native.js.map +1 -1
- package/dist/esm/fields/Barcode/BarcodePreview.native.js.map +1 -1
- package/dist/esm/fields/Barcode/code128.native.js.map +1 -1
- package/dist/esm/fields/Barcode/index.native.js.map +1 -1
- package/dist/esm/fields/Barcode/qr.native.js.map +1 -1
- package/dist/esm/fields/Barcode/scannerTypes.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/Checkbox.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxBox.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxCard.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxFieldFrame.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/CheckboxGroup.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/checkboxGroupContext.native.js.map +1 -1
- package/dist/esm/fields/Checkbox/index.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/SystemColorField.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/index.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/parts.native.js.map +1 -1
- package/dist/esm/fields/ColorPicker/systemColorWell.gnome.native.js.map +1 -1
- package/dist/esm/fields/Combobox/authorOptions.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/Calendar.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DateRangePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/DatetimePicker.catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MonthPicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/MultiDatePicker.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/fieldValueSync.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/DatePicker/utils.native.js.map +1 -1
- package/dist/esm/fields/Duration/DurationWheel.mjs +8 -0
- package/dist/esm/fields/Duration/DurationWheel.mjs.map +1 -0
- package/dist/esm/fields/Duration/DurationWheel.native.js +103 -0
- package/dist/esm/fields/Duration/DurationWheel.native.js.map +1 -0
- package/dist/esm/fields/Duration/durationMath.mjs +16 -1
- package/dist/esm/fields/Duration/durationMath.mjs.map +1 -1
- package/dist/esm/fields/Duration/durationMath.native.js +16 -1
- package/dist/esm/fields/Duration/durationMath.native.js.map +1 -1
- package/dist/esm/fields/Duration/durationWheelTypes.mjs +2 -0
- package/dist/esm/fields/Duration/durationWheelTypes.mjs.map +1 -0
- package/dist/esm/fields/Duration/durationWheelTypes.native.js +2 -0
- package/dist/esm/fields/Duration/durationWheelTypes.native.js.map +1 -0
- package/dist/esm/fields/Duration/index.mjs +28 -11
- package/dist/esm/fields/Duration/index.mjs.map +1 -1
- package/dist/esm/fields/Duration/index.native.js +30 -13
- package/dist/esm/fields/Duration/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/filePickerTypes.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
- package/dist/esm/fields/FileUpload/nativePickerLoader.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/expoMapsLoader.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geoValue.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geocoder.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/geocoderContext.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/index.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/mapMath.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/mapTypes.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/nativeSearchFocus.native.js.map +1 -1
- package/dist/esm/fields/Geolocation/photonGeocoder.native.js.map +1 -1
- package/dist/esm/fields/Icon/drawnSet.native.js.map +1 -1
- package/dist/esm/fields/Icon/index.native.js.map +1 -1
- package/dist/esm/fields/ImageField/index.native.js.map +1 -1
- package/dist/esm/fields/Input/index.native.js.map +1 -1
- package/dist/esm/fields/MentionInput/index.native.js.map +1 -1
- package/dist/esm/fields/OTPInput/index.native.js.map +1 -1
- package/dist/esm/fields/OTPInput/otpCellCss.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/dialCodes.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/index.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/phone.native.js.map +1 -1
- package/dist/esm/fields/PhoneInput/regionNames.native.js.map +1 -1
- package/dist/esm/fields/Progress/index.native.js.map +1 -1
- package/dist/esm/fields/RadioGroup/index.native.js.map +1 -1
- package/dist/esm/fields/Rating/index.native.js.map +1 -1
- package/dist/esm/fields/Rating/ratingMath.native.js.map +1 -1
- package/dist/esm/fields/Rating/types.native.js.map +1 -1
- package/dist/esm/fields/SearchInput/index.native.js.map +1 -1
- package/dist/esm/fields/Select/InlineChoices.native.js.map +1 -1
- package/dist/esm/fields/Select/SheetPickerRow.native.js.map +1 -1
- package/dist/esm/fields/Select/index.mjs +98 -30
- package/dist/esm/fields/Select/index.mjs.map +1 -1
- package/dist/esm/fields/Select/index.native.js +122 -54
- package/dist/esm/fields/Select/index.native.js.map +1 -1
- package/dist/esm/fields/Select/shouldInlineChoices.native.js.map +1 -1
- package/dist/esm/fields/Signature/index.native.js.map +1 -1
- package/dist/esm/fields/Slider/index.native.js.map +1 -1
- package/dist/esm/fields/Slider/jumpMotion.native.js.map +1 -1
- package/dist/esm/fields/Stepper/index.native.js.map +1 -1
- package/dist/esm/fields/Stepper/resolveStepperPlacement.native.js.map +1 -1
- package/dist/esm/fields/Switch/footprint.native.js.map +1 -1
- package/dist/esm/fields/Switch/index.native.js.map +1 -1
- package/dist/esm/fields/TextArea/index.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/catalog.native.js.map +1 -1
- package/dist/esm/fields/TimePicker/parts.native.js.map +1 -1
- package/dist/esm/fields/TimeRangeScrubber/geometry.native.js.map +1 -1
- package/dist/esm/fields/TimeRangeScrubber/index.native.js.map +1 -1
- package/dist/esm/fields/ToggleGroup/index.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs +8 -7
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js +8 -7
- package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/dateTimePickerLoader.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/osDateTimeIosDisplay.mjs +1 -1
- package/dist/esm/fields/nativeDateTime/osDateTimeIosDisplay.mjs.map +1 -1
- package/dist/esm/fields/nativeDateTime/osDateTimeIosDisplay.native.js +1 -1
- package/dist/esm/fields/nativeDateTime/osDateTimeIosDisplay.native.js.map +1 -1
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs +1 -1
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -1
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js +1 -1
- package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -1
- package/dist/esm/fields/nativeSelect.native.js.map +1 -1
- package/dist/esm/fields/selectedOrder.native.js.map +1 -1
- package/dist/esm/formSpacing.native.js.map +1 -1
- package/dist/esm/hooks/useFocusManagement.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/keyboard/chain.native.js.map +1 -1
- package/dist/esm/keyboard/index.native.js.map +1 -1
- package/dist/esm/keyboard/types.native.js.map +1 -1
- package/dist/esm/requiredMarking.native.js.map +1 -1
- package/dist/esm/shared/TimeColumn.native.js.map +1 -1
- package/dist/esm/shared/capabilityPreflight.native.js.map +1 -1
- package/dist/esm/shared/choiceRowPress.native.js.map +1 -1
- package/dist/esm/shared/colorRamps.native.js.map +1 -1
- package/dist/esm/shared/devWarn.native.js.map +1 -1
- package/dist/esm/shared/fieldRowContext.native.js.map +1 -1
- package/dist/esm/shared/floatingList.mjs +2 -3
- package/dist/esm/shared/floatingList.mjs.map +1 -1
- package/dist/esm/shared/floatingList.native.js +2 -3
- package/dist/esm/shared/floatingList.native.js.map +1 -1
- package/dist/esm/shared/focusManagement.native.js.map +1 -1
- package/dist/esm/shared/groupContext.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/instantMotion.native.js.map +1 -1
- package/dist/esm/shared/nativeA11y.native.js.map +1 -1
- package/dist/esm/shared/nativeAutoFocus.native.js.map +1 -1
- package/dist/esm/shared/overlaySizeClass.native.js.map +1 -1
- package/dist/esm/shared/overlayStack.native.js.map +1 -1
- package/dist/esm/shared/panelPortal.native.js.map +1 -1
- package/dist/esm/shared/pickerTriggerContract.native.js.map +1 -1
- package/dist/esm/shared/pressSlopProps.native.js.map +1 -1
- package/dist/esm/shared/restoreRetries.native.js.map +1 -1
- package/dist/esm/shared/sheetNavigation.native.js.map +1 -1
- package/dist/esm/shared/systemControlModules.gnome.native.js.map +1 -1
- package/dist/esm/shared/systemControls.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/tableCellContext.native.js.map +1 -1
- package/dist/esm/shared/useDragScroll.native.js.map +1 -1
- package/dist/esm/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/esm/shared/useSheetEscapeDismiss.native.js.map +1 -1
- package/dist/esm/shared/useWheelIncrement.native.js.map +1 -1
- package/dist/esm/shared/utils.native.js.map +1 -1
- package/dist/esm/shared/zIndex.native.js.map +1 -1
- package/dist/esm/standardActions.native.js.map +1 -1
- package/dist/esm/themedPrimitives.native.js.map +1 -1
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/utils/LinkCell.native.js.map +1 -1
- package/dist/jsx/Button/IconButtonGroup.mjs +47 -20
- package/dist/jsx/Button/IconButtonGroup.mjs.map +1 -1
- package/dist/jsx/Button/IconButtonGroup.native.js +51 -20
- package/dist/jsx/Button/IconButtonGroup.native.js.map +1 -1
- package/dist/jsx/Button/circleGlyph.mjs +9 -1
- package/dist/jsx/Button/circleGlyph.mjs.map +1 -1
- package/dist/jsx/Button/circleGlyph.native.js +12 -1
- package/dist/jsx/Button/circleGlyph.native.js.map +1 -1
- package/dist/jsx/Button/iconButtonGroupContext.mjs +5 -1
- package/dist/jsx/Button/iconButtonGroupContext.mjs.map +1 -1
- package/dist/jsx/Button/iconButtonGroupContext.native.js +7 -1
- package/dist/jsx/Button/iconButtonGroupContext.native.js.map +1 -1
- package/dist/jsx/Button/index.mjs +1 -9
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +3 -12
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/coverRect.mjs +23 -0
- package/dist/jsx/FloatingPanel/coverRect.mjs.map +1 -0
- package/dist/jsx/FloatingPanel/coverRect.native.js +54 -0
- package/dist/jsx/FloatingPanel/coverRect.native.js.map +1 -0
- package/dist/jsx/FloatingPanel/iconEcho.mjs +4 -2
- package/dist/jsx/FloatingPanel/iconEcho.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/iconEcho.native.js +3 -1
- package/dist/jsx/FloatingPanel/iconEcho.native.js.map +1 -1
- package/dist/jsx/FloatingPanel/index.mjs +27 -29
- package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
- package/dist/jsx/FloatingPanel/index.native.js +41 -15
- package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
- package/dist/jsx/InputParts/index.mjs +6 -1
- package/dist/jsx/InputParts/index.mjs.map +1 -1
- package/dist/jsx/InputParts/index.native.js +7 -0
- package/dist/jsx/InputParts/index.native.js.map +1 -1
- package/dist/jsx/InputParts/keyboardAppearance.mjs +5 -0
- package/dist/jsx/InputParts/keyboardAppearance.mjs.map +1 -0
- package/dist/jsx/InputParts/keyboardAppearance.native.js +33 -0
- package/dist/jsx/InputParts/keyboardAppearance.native.js.map +1 -0
- package/dist/jsx/fields/Duration/DurationWheel.mjs +8 -0
- package/dist/jsx/fields/Duration/DurationWheel.mjs.map +1 -0
- package/dist/jsx/fields/Duration/DurationWheel.native.js +132 -0
- package/dist/jsx/fields/Duration/DurationWheel.native.js.map +1 -0
- package/dist/jsx/fields/Duration/durationMath.mjs +16 -1
- package/dist/jsx/fields/Duration/durationMath.mjs.map +1 -1
- package/dist/jsx/fields/Duration/durationMath.native.js +19 -1
- package/dist/jsx/fields/Duration/durationMath.native.js.map +1 -1
- package/dist/jsx/fields/Duration/durationWheelTypes.mjs +2 -0
- package/dist/jsx/fields/Duration/durationWheelTypes.mjs.map +1 -0
- package/dist/jsx/fields/Duration/durationWheelTypes.native.js +21 -0
- package/dist/jsx/fields/Duration/durationWheelTypes.native.js.map +1 -0
- package/dist/jsx/fields/Duration/index.mjs +28 -11
- package/dist/jsx/fields/Duration/index.mjs.map +1 -1
- package/dist/jsx/fields/Duration/index.native.js +32 -12
- package/dist/jsx/fields/Duration/index.native.js.map +1 -1
- package/dist/jsx/fields/Select/index.mjs +98 -30
- package/dist/jsx/fields/Select/index.mjs.map +1 -1
- package/dist/jsx/fields/Select/index.native.js +122 -54
- package/dist/jsx/fields/Select/index.native.js.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs +8 -7
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js +8 -7
- package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
- package/dist/jsx/fields/nativeDateTime/osDateTimeIosDisplay.mjs +1 -1
- package/dist/jsx/fields/nativeDateTime/osDateTimeIosDisplay.mjs.map +1 -1
- package/dist/jsx/fields/nativeDateTime/osDateTimeIosDisplay.native.js +1 -1
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs +1 -1
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -1
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js +1 -1
- package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared/floatingList.mjs +2 -3
- package/dist/jsx/shared/floatingList.mjs.map +1 -1
- package/dist/jsx/shared/floatingList.native.js +2 -3
- package/dist/jsx/shared/floatingList.native.js.map +1 -1
- package/package.json +8 -8
- package/src/Button/IconButtonGroup.spec.tsx +20 -0
- package/src/Button/IconButtonGroup.tsx +60 -25
- package/src/Button/circleGlyph.ts +18 -0
- package/src/Button/iconButtonGroupContext.ts +25 -0
- package/src/Button/index.tsx +2 -20
- package/src/FloatingPanel/FloatingPanel.iconEcho.spec.tsx +61 -1
- package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +104 -0
- package/src/FloatingPanel/coverRect.ts +42 -0
- package/src/FloatingPanel/iconEcho.tsx +9 -3
- package/src/FloatingPanel/index.native.tsx +63 -18
- package/src/FloatingPanel/index.tsx +38 -35
- package/src/InputParts/index.tsx +6 -0
- package/src/InputParts/keyboardAppearance.spec.ts +12 -0
- package/src/InputParts/keyboardAppearance.ts +4 -0
- package/src/fields/Duration/Duration.spec.tsx +19 -10
- package/src/fields/Duration/Duration.wheel.native.spec.tsx +98 -0
- package/src/fields/Duration/DurationWheel.native.tsx +101 -0
- package/src/fields/Duration/DurationWheel.tsx +11 -0
- package/src/fields/Duration/durationMath.spec.ts +43 -0
- package/src/fields/Duration/durationMath.ts +31 -0
- package/src/fields/Duration/durationWheelTypes.ts +18 -0
- package/src/fields/Duration/index.tsx +58 -27
- package/src/fields/Select/Select.containingBlock.spec.tsx +88 -12
- package/src/fields/Select/Select.stories.tsx +74 -0
- package/src/fields/Select/index.tsx +113 -44
- package/src/fields/nativeDateTime/OsDateTimeSheet.countdown.native.spec.tsx +121 -0
- package/src/fields/nativeDateTime/OsDateTimeSheet.spec.ts +4 -0
- package/src/fields/nativeDateTime/OsDateTimeSheet.tsx +14 -9
- package/src/fields/nativeDateTime/osDateTimeIosDisplay.ts +3 -3
- package/src/fields/nativeDateTime/sheetKeyboard.spec.ts +6 -0
- package/src/fields/nativeDateTime/sheetKeyboard.ts +2 -2
- package/src/shared/floatingList.tsx +1 -4
- package/types/Button/IconButtonGroup.d.ts.map +1 -1
- package/types/Button/circleGlyph.d.ts +12 -0
- package/types/Button/circleGlyph.d.ts.map +1 -1
- package/types/Button/iconButtonGroupContext.d.ts +19 -0
- package/types/Button/iconButtonGroupContext.d.ts.map +1 -1
- package/types/Button/index.d.ts +2 -9
- package/types/Button/index.d.ts.map +1 -1
- package/types/FloatingPanel/coverRect.d.ts +25 -0
- package/types/FloatingPanel/coverRect.d.ts.map +1 -0
- package/types/FloatingPanel/index.d.ts +1 -6
- package/types/FloatingPanel/index.d.ts.map +1 -1
- package/types/FloatingPanel/index.native.d.ts.map +1 -1
- package/types/InputParts/index.d.ts.map +1 -1
- package/types/InputParts/keyboardAppearance.d.ts +3 -0
- package/types/InputParts/keyboardAppearance.d.ts.map +1 -0
- package/types/fields/Duration/DurationWheel.d.ts +5 -0
- package/types/fields/Duration/DurationWheel.d.ts.map +1 -0
- package/types/fields/Duration/DurationWheel.native.d.ts +5 -0
- package/types/fields/Duration/DurationWheel.native.d.ts.map +1 -0
- package/types/fields/Duration/durationMath.d.ts +13 -0
- package/types/fields/Duration/durationMath.d.ts.map +1 -1
- package/types/fields/Duration/durationWheelTypes.d.ts +18 -0
- package/types/fields/Duration/durationWheelTypes.d.ts.map +1 -0
- package/types/fields/Duration/index.d.ts +8 -3
- package/types/fields/Duration/index.d.ts.map +1 -1
- package/types/fields/Select/index.d.ts.map +1 -1
- package/types/fields/nativeDateTime/OsDateTimeSheet.d.ts +1 -1
- package/types/fields/nativeDateTime/OsDateTimeSheet.d.ts.map +1 -1
- package/types/fields/nativeDateTime/osDateTimeIosDisplay.d.ts +2 -2
- package/types/fields/nativeDateTime/osDateTimeIosDisplay.d.ts.map +1 -1
- package/types/fields/nativeDateTime/sheetKeyboard.d.ts +1 -1
- package/types/fields/nativeDateTime/sheetKeyboard.d.ts.map +1 -1
- package/types/shared/floatingList.d.ts +1 -3
- package/types/shared/floatingList.d.ts.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","keyboardAppearance_exports","keyboardAppearanceFor","module","exports","themeName","String","startsWith"],"sources":["keyboardAppearance.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar keyboardAppearance_exports = {};\n__export(keyboardAppearance_exports, {\n keyboardAppearanceFor: () => keyboardAppearanceFor\n});\nmodule.exports = __toCommonJS(keyboardAppearance_exports);\nfunction keyboardAppearanceFor(themeName) {\n return String(themeName !== null && themeName !== void 0 ? themeName : \"\").startsWith(\"dark\") ? \"dark\" : \"light\";\n}\n//# sourceMappingURL=keyboardAppearance.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAAKR,WAAW,CAAChB,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEyB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,0BAA0B,GAAG,CAAC,CAAC;AACnChB,QAAQ,CAACgB,0BAA0B,EAAE;EACnCC,qBAAqB,EAAEA,CAAA,KAAMA;AAC/B,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGN,YAAY,CAACG,0BAA0B,CAAC;AACzD,SAASC,qBAAqBA,CAACG,SAAS,EAAE;EACxC,OAAOC,MAAM,CAACD,SAAS,KAAK,IAAI,IAAIA,SAAS,KAAK,KAAK,CAAC,GAAGA,SAAS,GAAG,EAAE,CAAC,CAACE,UAAU,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,OAAO;AAClH","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var DurationWheel_exports = {};
|
|
24
|
+
__export(DurationWheel_exports, {
|
|
25
|
+
DurationWheelField: () => DurationWheelField,
|
|
26
|
+
durationWheelAvailable: () => durationWheelAvailable
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(DurationWheel_exports);
|
|
29
|
+
function durationWheelAvailable() {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
function DurationWheelField(_props) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var DurationWheel_native_exports = {};
|
|
26
|
+
__export(DurationWheel_native_exports, {
|
|
27
|
+
DurationWheelField: () => DurationWheelField,
|
|
28
|
+
durationWheelAvailable: () => durationWheelAvailable
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(DurationWheel_native_exports);
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
33
|
+
var import_react = require("@phosphor-icons/react");
|
|
34
|
+
var import_react2 = require("react");
|
|
35
|
+
var import_react_native = require("react-native");
|
|
36
|
+
var import_tamagui = require("tamagui");
|
|
37
|
+
var import_InputParts = require("../../InputParts");
|
|
38
|
+
var import_colorRamps = require("../../shared/colorRamps.native.js");
|
|
39
|
+
var import_t = require("../../shared/t.native.js");
|
|
40
|
+
var import_dateTimePickerLoader = require("../nativeDateTime/dateTimePickerLoader.native.js");
|
|
41
|
+
var import_OsDateTimeSheet = require("../nativeDateTime/OsDateTimeSheet.native.js");
|
|
42
|
+
var import_durationMath = require("./durationMath.native.js");
|
|
43
|
+
function durationWheelAvailable() {
|
|
44
|
+
return (0, import_dateTimePickerLoader.loadDateTimePicker)() != null;
|
|
45
|
+
}
|
|
46
|
+
function DurationWheelField(param) {
|
|
47
|
+
var {
|
|
48
|
+
seconds,
|
|
49
|
+
onChange,
|
|
50
|
+
disabled,
|
|
51
|
+
readOnly,
|
|
52
|
+
foldDays,
|
|
53
|
+
clockIcon,
|
|
54
|
+
hasError,
|
|
55
|
+
id,
|
|
56
|
+
hasLabel,
|
|
57
|
+
required,
|
|
58
|
+
size,
|
|
59
|
+
knobProps
|
|
60
|
+
} = param;
|
|
61
|
+
var [open, setOpen] = (0, import_react2.useState)(false);
|
|
62
|
+
var sizeToken = String(size || knobProps.sizeToken);
|
|
63
|
+
var recipe = (0, import_theme.sizeRecipeForToken)(sizeToken);
|
|
64
|
+
var resolvedClock = clockIcon === void 0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.ClockIcon, {
|
|
65
|
+
size: recipe.iconSize
|
|
66
|
+
}) : clockIcon;
|
|
67
|
+
var shown = (0, import_durationMath.formatDurationParts)((0, import_durationMath.secondsToParts)(seconds, foldDays), foldDays, {
|
|
68
|
+
d: (0, import_t.t)("d"),
|
|
69
|
+
h: (0, import_t.t)("h"),
|
|
70
|
+
m: (0, import_t.t)("m")
|
|
71
|
+
});
|
|
72
|
+
var interactive = !disabled && !readOnly;
|
|
73
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_InputParts.Input, {
|
|
74
|
+
size: size || knobProps.sizeToken,
|
|
75
|
+
...(hasError ? {
|
|
76
|
+
theme: "error"
|
|
77
|
+
} : void 0),
|
|
78
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
|
|
79
|
+
nativeID: id,
|
|
80
|
+
onPress: interactive ? function () {
|
|
81
|
+
return setOpen(true);
|
|
82
|
+
} : void 0,
|
|
83
|
+
disabled: !interactive,
|
|
84
|
+
accessibilityRole: "button",
|
|
85
|
+
accessibilityLabel: hasLabel ? void 0 : (0, import_t.t)("Duration"),
|
|
86
|
+
accessibilityValue: {
|
|
87
|
+
text: shown
|
|
88
|
+
},
|
|
89
|
+
accessibilityState: {
|
|
90
|
+
disabled: !!disabled
|
|
91
|
+
},
|
|
92
|
+
"aria-required": required || void 0,
|
|
93
|
+
"aria-invalid": hasError || void 0,
|
|
94
|
+
style: {
|
|
95
|
+
width: "100%"
|
|
96
|
+
},
|
|
97
|
+
testID: "duration-wheel-trigger",
|
|
98
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_InputParts.Input.Box, {
|
|
99
|
+
disabled,
|
|
100
|
+
"data-duration-box": "",
|
|
101
|
+
"data-duration-wheel": "",
|
|
102
|
+
justifyContent: "flex-start",
|
|
103
|
+
size: sizeToken,
|
|
104
|
+
pointerEvents: "none",
|
|
105
|
+
children: [resolvedClock != null ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_InputParts.Input.Icon, {
|
|
106
|
+
adornment: "leading",
|
|
107
|
+
children: resolvedClock
|
|
108
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
109
|
+
...knobProps.body,
|
|
110
|
+
...knobProps.controlType,
|
|
111
|
+
fontSize: recipe.fontSize,
|
|
112
|
+
color: import_colorRamps.formCommonColors.text,
|
|
113
|
+
numberOfLines: 1,
|
|
114
|
+
"data-duration-value": "",
|
|
115
|
+
children: shown
|
|
116
|
+
})]
|
|
117
|
+
})
|
|
118
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_OsDateTimeSheet.OsDateTimeSheet, {
|
|
119
|
+
open,
|
|
120
|
+
value: (0, import_durationMath.durationToWheelDate)(seconds),
|
|
121
|
+
mode: "countdown",
|
|
122
|
+
onCancel: function onCancel() {
|
|
123
|
+
return setOpen(false);
|
|
124
|
+
},
|
|
125
|
+
onConfirm: function onConfirm(picked) {
|
|
126
|
+
setOpen(false);
|
|
127
|
+
onChange((0, import_durationMath.wheelDateToDuration)(picked, seconds));
|
|
128
|
+
}
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=DurationWheel.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DurationWheel_native_exports","__export","DurationWheelField","durationWheelAvailable","module","exports","__toCommonJS","import_jsx_runtime","require","import_theme","import_react","import_react2","import_react_native","import_tamagui","import_InputParts","import_colorRamps","import_t","import_dateTimePickerLoader","import_OsDateTimeSheet","import_durationMath","loadDateTimePicker","param","seconds","onChange","disabled","readOnly","foldDays","clockIcon","hasError","id","hasLabel","required","size","knobProps","open","setOpen","useState","sizeToken","String","recipe","sizeRecipeForToken","resolvedClock","jsx","ClockIcon","iconSize","shown","formatDurationParts","secondsToParts","d","t","h","m","interactive","jsxs","Input","theme","children","Pressable","nativeID","onPress","accessibilityRole","accessibilityLabel","accessibilityValue","text","accessibilityState","style","width","testID","Box","justifyContent","pointerEvents","Icon","adornment","Text","body","controlType","fontSize","color","formCommonColors","numberOfLines","OsDateTimeSheet","value","durationToWheelDate","mode","onCancel","onConfirm","picked","wheelDateToDu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(__defProp({}, "__esModule", {
|
|
|
23
23
|
var durationMath_exports = {};
|
|
24
24
|
__export(durationMath_exports, {
|
|
25
25
|
durationSegmentWidth: () => durationSegmentWidth,
|
|
26
|
+
durationToWheelDate: () => durationToWheelDate,
|
|
27
|
+
formatDurationParts: () => formatDurationParts,
|
|
26
28
|
normalizeSeconds: () => normalizeSeconds,
|
|
27
29
|
parseDurationText: () => parseDurationText,
|
|
28
30
|
partsToSeconds: () => partsToSeconds,
|
|
29
|
-
secondsToParts: () => secondsToParts
|
|
31
|
+
secondsToParts: () => secondsToParts,
|
|
32
|
+
wheelDateToDuration: () => wheelDateToDuration
|
|
30
33
|
});
|
|
31
34
|
module.exports = __toCommonJS(durationMath_exports);
|
|
32
35
|
var import_theme = require("@multiplatform.one/theme");
|
|
@@ -90,4 +93,19 @@ function parseDurationText(text) {
|
|
|
90
93
|
function durationSegmentWidth(sizeToken, digits) {
|
|
91
94
|
const recipe = (0, import_theme.sizeRecipeForToken)(sizeToken);
|
|
92
95
|
return recipe.fontSize * digits;
|
|
96
|
+
}
|
|
97
|
+
const DAY = 86400;
|
|
98
|
+
function durationToWheelDate(total) {
|
|
99
|
+
const s = normalizeSeconds(total) % DAY;
|
|
100
|
+
const date = /* @__PURE__ */new Date();
|
|
101
|
+
date.setHours(Math.floor(s / 3600), Math.floor(s % 3600 / 60), 0, 0);
|
|
102
|
+
return date;
|
|
103
|
+
}
|
|
104
|
+
function wheelDateToDuration(picked, previous) {
|
|
105
|
+
const prev = normalizeSeconds(previous);
|
|
106
|
+
return Math.floor(prev / DAY) * DAY + picked.getHours() * 3600 + picked.getMinutes() * 60 + prev % 60;
|
|
107
|
+
}
|
|
108
|
+
function formatDurationParts(parts, hideDays, units) {
|
|
109
|
+
const head = hideDays || parts.days === 0 ? [] : [`${parts.days} ${units.d}`];
|
|
110
|
+
return [...head, `${parts.hours} ${units.h}`, `${parts.minutes} ${units.m}`].join(" ");
|
|
93
111
|
}
|
|
@@ -25,10 +25,13 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
25
25
|
var durationMath_exports = {};
|
|
26
26
|
__export(durationMath_exports, {
|
|
27
27
|
durationSegmentWidth: () => durationSegmentWidth,
|
|
28
|
+
durationToWheelDate: () => durationToWheelDate,
|
|
29
|
+
formatDurationParts: () => formatDurationParts,
|
|
28
30
|
normalizeSeconds: () => normalizeSeconds,
|
|
29
31
|
parseDurationText: () => parseDurationText,
|
|
30
32
|
partsToSeconds: () => partsToSeconds,
|
|
31
|
-
secondsToParts: () => secondsToParts
|
|
33
|
+
secondsToParts: () => secondsToParts,
|
|
34
|
+
wheelDateToDuration: () => wheelDateToDuration
|
|
32
35
|
});
|
|
33
36
|
module.exports = __toCommonJS(durationMath_exports);
|
|
34
37
|
var import_theme = require("@multiplatform.one/theme");
|
|
@@ -112,4 +115,19 @@ function durationSegmentWidth(sizeToken, digits) {
|
|
|
112
115
|
var recipe = (0, import_theme.sizeRecipeForToken)(sizeToken);
|
|
113
116
|
return recipe.fontSize * digits;
|
|
114
117
|
}
|
|
118
|
+
var DAY = 86400;
|
|
119
|
+
function durationToWheelDate(total) {
|
|
120
|
+
var s = normalizeSeconds(total) % DAY;
|
|
121
|
+
var date = /* @__PURE__ */new Date();
|
|
122
|
+
date.setHours(Math.floor(s / 3600), Math.floor(s % 3600 / 60), 0, 0);
|
|
123
|
+
return date;
|
|
124
|
+
}
|
|
125
|
+
function wheelDateToDuration(picked, previous) {
|
|
126
|
+
var prev = normalizeSeconds(previous);
|
|
127
|
+
return Math.floor(prev / DAY) * DAY + picked.getHours() * 3600 + picked.getMinutes() * 60 + prev % 60;
|
|
128
|
+
}
|
|
129
|
+
function formatDurationParts(parts, hideDays, units) {
|
|
130
|
+
var head = hideDays || parts.days === 0 ? [] : [`${parts.days} ${units.d}`];
|
|
131
|
+
return [...head, `${parts.hours} ${units.h}`, `${parts.minutes} ${units.m}`].join(" ");
|
|
132
|
+
}
|
|
115
133
|
//# sourceMappingURL=durationMath.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","durationMath_exports","durationSegmentWidth","normalizeSeconds","parseDurationText","partsToSeconds","secondsToParts","module","exports","import_theme","require","UNIT_SECONDS","d","h","m","s","n","Number","isFinite","Math","floor","total","hideDays","days","hours","minutes","seconds","parts","max","text","trimmed","trim","toLowerCase","test","clock","match","pieces","matchAll","length","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","piece","unit","err","return","sizeToken","digits","recipe","sizeRecipeForToken","fontSize"],"sources":["durationMath.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar durationMath_exports = {};\n__export(durationMath_exports, {\n durationSegmentWidth: () => durationSegmentWidth,\n normalizeSeconds: () => normalizeSeconds,\n parseDurationText: () => parseDurationText,\n partsToSeconds: () => partsToSeconds,\n secondsToParts: () => secondsToParts\n});\nmodule.exports = __toCommonJS(durationMath_exports);\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar UNIT_SECONDS = {\n d: 86400,\n h: 3600,\n m: 60,\n s: 1\n};\nfunction normalizeSeconds(value) {\n var n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 0) return 0;\n return Math.floor(n);\n}\nfunction secondsToParts(total, hideDays) {\n var s = normalizeSeconds(total);\n if (hideDays) {\n return {\n days: 0,\n hours: Math.floor(s / 3600),\n minutes: Math.floor(s % 3600 / 60),\n seconds: s % 60\n };\n }\n return {\n days: Math.floor(s / 86400),\n hours: Math.floor(s % 86400 / 3600),\n minutes: Math.floor(s % 3600 / 60),\n seconds: s % 60\n };\n}\nfunction partsToSeconds(parts, hideDays) {\n var days = hideDays ? 0 : Math.max(0, Math.floor(Number(parts.days)) || 0);\n var hours = Math.max(0, Math.floor(Number(parts.hours)) || 0);\n var minutes = Math.max(0, Math.floor(Number(parts.minutes)) || 0);\n var seconds = Math.max(0, Math.floor(Number(parts.seconds)) || 0);\n return days * 86400 + hours * 3600 + minutes * 60 + seconds;\n}\nfunction parseDurationText(text) {\n var trimmed = text.trim().toLowerCase();\n if (!trimmed) return null;\n if (/^-?\\d+$/.test(trimmed)) return normalizeSeconds(Number(trimmed));\n var clock = trimmed.match(/^(\\d+):(\\d{1,2})(?::(\\d{1,2}))?$/);\n if (clock) {\n return partsToSeconds({\n days: 0,\n hours: Number(clock[1]),\n minutes: Number(clock[2]),\n seconds: Number(clock[3] || 0)\n }, true);\n }\n var pieces = [\n ...trimmed.matchAll(/(\\d+)\\s*(d|h|m|s)\\b/g)\n ];\n if (pieces.length === 0) return null;\n var total = 0;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = pieces[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var piece = _step.value;\n var unit = piece[2];\n total += Number(piece[1]) * UNIT_SECONDS[unit];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return total;\n}\nfunction durationSegmentWidth(sizeToken, digits) {\n var recipe = (0, import_theme.sizeRecipeForToken)(sizeToken);\n return recipe.fontSize * digits;\n}\n//# sourceMappingURL=durationMath.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AAC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AIJ,MAAM,CAAC+B,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGrC,YAAY,CAACsC,IAAI,CAAC;IAChD;EACF,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZV,iBAAiB,GAAG,IAAI;IACxBC,cAAc,GAAGS,GAAG;EACtB,CAAC,SAAS;IACR,IAAI;MACF,IAAI,CAACX,yBAAyB,IAAIG,SAAS,CAACS,MAAM,IAAI,IAAI,EAAE;QAC1DT,SAAS,CAACS,MAAM,CAAC,CAAC;MACpB;IACF,CAAC,SAAS;MACR,IAAIX,iBAAiB,EAAE;QACrB,MAAMC,cAAc;MACtB;IACF;EACF;EACA,OAAOpB,KAAK;AACd;AACA,SAASnB,oBAAoBA,CAACkD,SAAS,EAAEC,MAAM,EAAE;EAC/C,IAAIC,MAAM,GAAG,CAAC,CAAC,EAAE7C,YAAY,CAAC8C,kBAAkB,EAAEH,SAAS,CAAC;EAC5D,OAAOE,MAAM,CAACE,QAAQ,GAAGH,MAAM;AACjC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","durationMath_exports","durationSegmentWidth","durationToWheelDate","formatDurationParts","normalizeSeconds","parseDurationText","partsToSeconds","secondsToParts","wheelDateToDuration","module","exports","import_theme","require","UNIT_SECONDS","d","h","m","s","n","Number","isFinite","Math","floor","total","hideDays","days","hours","minutes","seconds","parts","max","text","trimmed","trim","toLowerCase","test","clock","match","pieces","matchAll","length","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","piece","unit","err","return","sizeToken","digits","recipe","sizeRecipeForToken","fontSize","DAY","date","Date","setHours","picked","previous","prev","getHours","getMinutes","units","head","join"],"sources":["durationMath.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar durationMath_exports = {};\n__export(durationMath_exports, {\n durationSegmentWidth: () => durationSegmentWidth,\n durationToWheelDate: () => durationToWheelDate,\n formatDurationParts: () => formatDurationParts,\n normalizeSeconds: () => normalizeSeconds,\n parseDurationText: () => parseDurationText,\n partsToSeconds: () => partsToSeconds,\n secondsToParts: () => secondsToParts,\n wheelDateToDuration: () => wheelDateToDuration\n});\nmodule.exports = __toCommonJS(durationMath_exports);\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar UNIT_SECONDS = {\n d: 86400,\n h: 3600,\n m: 60,\n s: 1\n};\nfunction normalizeSeconds(value) {\n var n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 0) return 0;\n return Math.floor(n);\n}\nfunction secondsToParts(total, hideDays) {\n var s = normalizeSeconds(total);\n if (hideDays) {\n return {\n days: 0,\n hours: Math.floor(s / 3600),\n minutes: Math.floor(s % 3600 / 60),\n seconds: s % 60\n };\n }\n return {\n days: Math.floor(s / 86400),\n hours: Math.floor(s % 86400 / 3600),\n minutes: Math.floor(s % 3600 / 60),\n seconds: s % 60\n };\n}\nfunction partsToSeconds(parts, hideDays) {\n var days = hideDays ? 0 : Math.max(0, Math.floor(Number(parts.days)) || 0);\n var hours = Math.max(0, Math.floor(Number(parts.hours)) || 0);\n var minutes = Math.max(0, Math.floor(Number(parts.minutes)) || 0);\n var seconds = Math.max(0, Math.floor(Number(parts.seconds)) || 0);\n return days * 86400 + hours * 3600 + minutes * 60 + seconds;\n}\nfunction parseDurationText(text) {\n var trimmed = text.trim().toLowerCase();\n if (!trimmed) return null;\n if (/^-?\\d+$/.test(trimmed)) return normalizeSeconds(Number(trimmed));\n var clock = trimmed.match(/^(\\d+):(\\d{1,2})(?::(\\d{1,2}))?$/);\n if (clock) {\n return partsToSeconds({\n days: 0,\n hours: Number(clock[1]),\n minutes: Number(clock[2]),\n seconds: Number(clock[3] || 0)\n }, true);\n }\n var pieces = [\n ...trimmed.matchAll(/(\\d+)\\s*(d|h|m|s)\\b/g)\n ];\n if (pieces.length === 0) return null;\n var total = 0;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = pieces[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var piece = _step.value;\n var unit = piece[2];\n total += Number(piece[1]) * UNIT_SECONDS[unit];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return total;\n}\nfunction durationSegmentWidth(sizeToken, digits) {\n var recipe = (0, import_theme.sizeRecipeForToken)(sizeToken);\n return recipe.fontSize * digits;\n}\nvar DAY = 86400;\nfunction durationToWheelDate(total) {\n var s = normalizeSeconds(total) % DAY;\n var date = /* @__PURE__ */ new Date();\n date.setHours(Math.floor(s / 3600), Math.floor(s % 3600 / 60), 0, 0);\n return date;\n}\nfunction wheelDateToDuration(picked, previous) {\n var prev = normalizeSeconds(previous);\n return Math.floor(prev / DAY) * DAY + picked.getHours() * 3600 + picked.getMinutes() * 60 + prev % 60;\n}\nfunction formatDurationParts(parts, hideDays, units) {\n var head = hideDays || parts.days === 0 ? [] : [\n `${parts.days} ${units.d}`\n ];\n return [\n ...head,\n `${parts.hours} ${units.h}`,\n `${parts.minutes} ${units.m}`\n ].join(\" \");\n}\n//# sourceMappingURL=durationMath.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAAKR,WAAW,C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CAACC,KAAK,CAAC2C,IAAI,GAAGN,GAAG,CAAC,GAAGA,GAAG,GAAGI,MAAM,CAACG,QAAQ,CAAC,CAAC,GAAG,IAAI,GAAGH,MAAM,CAACI,UAAU,CAAC,CAAC,GAAG,EAAE,GAAGF,IAAI,GAAG,EAAE;AACvG;AACA,SAAS9D,mBAAmBA,CAAC0B,KAAK,EAAEL,QAAQ,EAAE4C,KAAK,EAAE;EACnD,IAAIC,IAAI,GAAG7C,QAAQ,IAAIK,KAAK,CAACJ,IAAI,KAAK,CAAC,GAAG,EAAE,GAAG,CAC7C,GAAGI,KAAK,CAACJ,IAAI,IAAI2C,KAAK,CAACtD,CAAC,EAAE,CAC3B;EACD,OAAO,CACL,GAAGuD,IAAI,EACP,GAAGxC,KAAK,CAACH,KAAK,IAAI0C,KAAK,CAACrD,CAAC,EAAE,EAC3B,GAAGc,KAAK,CAACF,OAAO,IAAIyC,KAAK,CAACpD,CAAC,EAAE,CAC9B,CAACsD,IAAI,CAAC,GAAG,CAAC;AACb","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
}), mod);
|
|
17
|
+
var durationWheelTypes_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(durationWheelTypes_exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
}), mod);
|
|
19
|
+
var durationWheelTypes_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(durationWheelTypes_exports);
|
|
21
|
+
//# sourceMappingURL=durationWheelTypes.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__toCommonJS","mod","value","durationWheelTypes_exports","module","exports"],"sources":["durationWheelTypes.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar durationWheelTypes_exports = {};\nmodule.exports = __toCommonJS(durationWheelTypes_exports);\n//# sourceMappingURL=durationWheelTypes.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,YAAY,GAAIC,GAAG,IAAKV,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEqB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,0BAA0B,GAAG,CAAC,CAAC;AACnCC,MAAM,CAACC,OAAO,GAAGL,YAAY,CAACG,0BAA0B,CAAC","ignoreList":[]}
|
|
@@ -25,10 +25,13 @@ __export(Duration_exports, {
|
|
|
25
25
|
DURATION_PRESET_SIZE: () => DURATION_PRESET_SIZE,
|
|
26
26
|
Duration: () => Duration,
|
|
27
27
|
durationSegmentWidth: () => import_durationMath.durationSegmentWidth,
|
|
28
|
+
durationToWheelDate: () => import_durationMath.durationToWheelDate,
|
|
29
|
+
formatDurationParts: () => import_durationMath.formatDurationParts,
|
|
28
30
|
normalizeSeconds: () => import_durationMath.normalizeSeconds,
|
|
29
31
|
parseDurationText: () => import_durationMath.parseDurationText,
|
|
30
32
|
partsToSeconds: () => import_durationMath.partsToSeconds,
|
|
31
|
-
secondsToParts: () => import_durationMath.secondsToParts
|
|
33
|
+
secondsToParts: () => import_durationMath.secondsToParts,
|
|
34
|
+
wheelDateToDuration: () => import_durationMath.wheelDateToDuration
|
|
32
35
|
});
|
|
33
36
|
module.exports = __toCommonJS(Duration_exports);
|
|
34
37
|
var import_theme = require("@multiplatform.one/theme");
|
|
@@ -36,7 +39,7 @@ var import_theme2 = require("@multiplatform.one/theme");
|
|
|
36
39
|
var import_react = require("@phosphor-icons/react");
|
|
37
40
|
var import_react2 = require("react");
|
|
38
41
|
var import_tamagui = require("tamagui");
|
|
39
|
-
var
|
|
42
|
+
var import_Chip = require("../../Chip/index.cjs");
|
|
40
43
|
var import_Skeleton = require("../../Skeleton/index.cjs");
|
|
41
44
|
var import_fieldLayout = require("../../fieldLayout.cjs");
|
|
42
45
|
var import_InputParts = require("../../InputParts/index.cjs");
|
|
@@ -44,6 +47,7 @@ var import_colorRamps = require("../../shared/colorRamps.cjs");
|
|
|
44
47
|
var import_t = require("../../shared/t.cjs");
|
|
45
48
|
var import_tableCellContext = require("../../shared/tableCellContext.cjs");
|
|
46
49
|
var import_utils = require("../../shared/utils.cjs");
|
|
50
|
+
var import_DurationWheel = require("./DurationWheel.cjs");
|
|
47
51
|
var import_durationMath = require("./durationMath.cjs");
|
|
48
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
53
|
const defaultPresets = [{
|
|
@@ -327,13 +331,14 @@ function DurationPresets({
|
|
|
327
331
|
"data-duration-presets": "",
|
|
328
332
|
children: presets.map(preset => {
|
|
329
333
|
const selected = seconds === preset.seconds;
|
|
330
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
331
|
-
size: DURATION_PRESET_SIZE,
|
|
332
|
-
outlined: !selected,
|
|
333
|
-
accent: selected,
|
|
334
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
334
335
|
"data-duration-preset": preset.label,
|
|
335
|
-
|
|
336
|
-
|
|
336
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Chip.Chip, {
|
|
337
|
+
size: DURATION_PRESET_SIZE,
|
|
338
|
+
selected,
|
|
339
|
+
onPress: () => onChange(preset.seconds),
|
|
340
|
+
children: preset.label
|
|
341
|
+
})
|
|
337
342
|
}, preset.seconds);
|
|
338
343
|
})
|
|
339
344
|
});
|
|
@@ -360,7 +365,8 @@ function Duration({
|
|
|
360
365
|
presets = defaultPresets,
|
|
361
366
|
placeholder = (0, import_t.t)("Select duration"),
|
|
362
367
|
clockIcon,
|
|
363
|
-
skeleton
|
|
368
|
+
skeleton,
|
|
369
|
+
native
|
|
364
370
|
}) {
|
|
365
371
|
const hydrationTouch = (0, import_theme.useTouchSurface)();
|
|
366
372
|
const {
|
|
@@ -401,9 +407,23 @@ function Duration({
|
|
|
401
407
|
})
|
|
402
408
|
});
|
|
403
409
|
}
|
|
410
|
+
const wheel = native !== false && !showSeconds && (0, import_DurationWheel.durationWheelAvailable)();
|
|
404
411
|
const fieldBody = (current, onValueChange, hasError) => /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
405
412
|
...knobProps.gap,
|
|
406
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
413
|
+
children: [wheel ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_DurationWheel.DurationWheelField, {
|
|
414
|
+
seconds: current,
|
|
415
|
+
onChange: onValueChange,
|
|
416
|
+
disabled,
|
|
417
|
+
readOnly,
|
|
418
|
+
foldDays: hideDays,
|
|
419
|
+
clockIcon,
|
|
420
|
+
hasError,
|
|
421
|
+
id,
|
|
422
|
+
hasLabel: Boolean(label),
|
|
423
|
+
required,
|
|
424
|
+
size,
|
|
425
|
+
knobProps
|
|
426
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(DurationControl, {
|
|
407
427
|
seconds: current,
|
|
408
428
|
onChange: onValueChange,
|
|
409
429
|
disabled,
|
|
@@ -27,10 +27,13 @@ __export(Duration_exports, {
|
|
|
27
27
|
DURATION_PRESET_SIZE: () => DURATION_PRESET_SIZE,
|
|
28
28
|
Duration: () => Duration,
|
|
29
29
|
durationSegmentWidth: () => import_durationMath.durationSegmentWidth,
|
|
30
|
+
durationToWheelDate: () => import_durationMath.durationToWheelDate,
|
|
31
|
+
formatDurationParts: () => import_durationMath.formatDurationParts,
|
|
30
32
|
normalizeSeconds: () => import_durationMath.normalizeSeconds,
|
|
31
33
|
parseDurationText: () => import_durationMath.parseDurationText,
|
|
32
34
|
partsToSeconds: () => import_durationMath.partsToSeconds,
|
|
33
|
-
secondsToParts: () => import_durationMath.secondsToParts
|
|
35
|
+
secondsToParts: () => import_durationMath.secondsToParts,
|
|
36
|
+
wheelDateToDuration: () => import_durationMath.wheelDateToDuration
|
|
34
37
|
});
|
|
35
38
|
module.exports = __toCommonJS(Duration_exports);
|
|
36
39
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -39,7 +42,7 @@ var import_theme2 = require("@multiplatform.one/theme");
|
|
|
39
42
|
var import_react = require("@phosphor-icons/react");
|
|
40
43
|
var import_react2 = require("react");
|
|
41
44
|
var import_tamagui = require("tamagui");
|
|
42
|
-
var
|
|
45
|
+
var import_Chip = require("../../Chip");
|
|
43
46
|
var import_Skeleton = require("../../Skeleton");
|
|
44
47
|
var import_fieldLayout = require("../../fieldLayout.native.js");
|
|
45
48
|
var import_InputParts = require("../../InputParts");
|
|
@@ -47,6 +50,7 @@ var import_colorRamps = require("../../shared/colorRamps.native.js");
|
|
|
47
50
|
var import_t = require("../../shared/t.native.js");
|
|
48
51
|
var import_tableCellContext = require("../../shared/tableCellContext.native.js");
|
|
49
52
|
var import_utils = require("../../shared/utils.native.js");
|
|
53
|
+
var import_DurationWheel = require("./DurationWheel.native.js");
|
|
50
54
|
var import_durationMath = require("./durationMath.native.js");
|
|
51
55
|
var defaultPresets = [{
|
|
52
56
|
label: "15m",
|
|
@@ -349,15 +353,16 @@ function DurationPresets(param) {
|
|
|
349
353
|
"data-duration-presets": "",
|
|
350
354
|
children: presets.map(function (preset) {
|
|
351
355
|
var selected = seconds === preset.seconds;
|
|
352
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
353
|
-
size: DURATION_PRESET_SIZE,
|
|
354
|
-
outlined: !selected,
|
|
355
|
-
accent: selected,
|
|
356
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
356
357
|
"data-duration-preset": preset.label,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Chip.Chip, {
|
|
359
|
+
size: DURATION_PRESET_SIZE,
|
|
360
|
+
selected,
|
|
361
|
+
onPress: function onPress() {
|
|
362
|
+
return onChange(preset.seconds);
|
|
363
|
+
},
|
|
364
|
+
children: preset.label
|
|
365
|
+
})
|
|
361
366
|
}, preset.seconds);
|
|
362
367
|
})
|
|
363
368
|
});
|
|
@@ -385,7 +390,8 @@ function Duration(param) {
|
|
|
385
390
|
presets = defaultPresets,
|
|
386
391
|
placeholder = (0, import_t.t)("Select duration"),
|
|
387
392
|
clockIcon,
|
|
388
|
-
skeleton
|
|
393
|
+
skeleton,
|
|
394
|
+
native
|
|
389
395
|
} = param;
|
|
390
396
|
var hydrationTouch = (0, import_theme.useTouchSurface)();
|
|
391
397
|
var {
|
|
@@ -428,10 +434,24 @@ function Duration(param) {
|
|
|
428
434
|
})
|
|
429
435
|
});
|
|
430
436
|
}
|
|
437
|
+
var wheel = native !== false && !showSeconds && (0, import_DurationWheel.durationWheelAvailable)();
|
|
431
438
|
var fieldBody = function fieldBody2(current, onValueChange, hasError) {
|
|
432
439
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
433
440
|
...knobProps.gap,
|
|
434
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
441
|
+
children: [wheel ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_DurationWheel.DurationWheelField, {
|
|
442
|
+
seconds: current,
|
|
443
|
+
onChange: onValueChange,
|
|
444
|
+
disabled,
|
|
445
|
+
readOnly,
|
|
446
|
+
foldDays: hideDays,
|
|
447
|
+
clockIcon,
|
|
448
|
+
hasError,
|
|
449
|
+
id,
|
|
450
|
+
hasLabel: Boolean(label),
|
|
451
|
+
required,
|
|
452
|
+
size,
|
|
453
|
+
knobProps
|
|
454
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(DurationControl, {
|
|
435
455
|
seconds: current,
|
|
436
456
|
onChange: onValueChange,
|
|
437
457
|
disabled,
|