orn-ui 0.2.9 → 0.3.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/AGENTS.md +67 -52
- package/README.md +5 -9
- package/lib/commonjs/atoms/Avatar.js +77 -5
- package/lib/commonjs/atoms/Avatar.js.map +1 -1
- package/lib/commonjs/atoms/Badge.js +17 -8
- package/lib/commonjs/atoms/Badge.js.map +1 -1
- package/lib/commonjs/atoms/Button.js +108 -39
- package/lib/commonjs/atoms/Button.js.map +1 -1
- package/lib/commonjs/atoms/Card.js +24 -2
- package/lib/commonjs/atoms/Card.js.map +1 -1
- package/lib/commonjs/atoms/Checkbox.js +41 -10
- package/lib/commonjs/atoms/Checkbox.js.map +1 -1
- package/lib/commonjs/atoms/Divider.js +30 -5
- package/lib/commonjs/atoms/Divider.js.map +1 -1
- package/lib/commonjs/atoms/EmptyState.js +58 -20
- package/lib/commonjs/atoms/EmptyState.js.map +1 -1
- package/lib/commonjs/atoms/Fab.js +32 -12
- package/lib/commonjs/atoms/Fab.js.map +1 -1
- package/lib/commonjs/atoms/Gradient.js +102 -36
- package/lib/commonjs/atoms/Gradient.js.map +1 -1
- package/lib/commonjs/atoms/IconButton.js +25 -4
- package/lib/commonjs/atoms/IconButton.js.map +1 -1
- package/lib/commonjs/atoms/Image.js +61 -25
- package/lib/commonjs/atoms/Image.js.map +1 -1
- package/lib/commonjs/atoms/Input.js +105 -17
- package/lib/commonjs/atoms/Input.js.map +1 -1
- package/lib/commonjs/atoms/KeyValueRow.js +37 -9
- package/lib/commonjs/atoms/KeyValueRow.js.map +1 -1
- package/lib/commonjs/atoms/PressableScale.js +25 -5
- package/lib/commonjs/atoms/PressableScale.js.map +1 -1
- package/lib/commonjs/atoms/ShinyText.js +29 -29
- package/lib/commonjs/atoms/Skeleton.js +28 -13
- package/lib/commonjs/atoms/Skeleton.js.map +1 -1
- package/lib/commonjs/atoms/Spinner.js +81 -22
- package/lib/commonjs/atoms/Spinner.js.map +1 -1
- package/lib/commonjs/atoms/Text.js +56 -5
- package/lib/commonjs/atoms/Text.js.map +1 -1
- package/lib/commonjs/atoms/Transition.js +46 -43
- package/lib/commonjs/atoms/Transition.js.map +1 -1
- package/lib/commonjs/atoms/index.js +6 -0
- package/lib/commonjs/atoms/index.js.map +1 -1
- package/lib/commonjs/atoms/inputValidation.js +56 -0
- package/lib/commonjs/atoms/inputValidation.js.map +1 -0
- package/lib/commonjs/icons/Icon.js +4 -4
- package/lib/commonjs/icons/defaultIcons.js +576 -24
- package/lib/commonjs/icons/defaultIcons.js.map +1 -1
- package/lib/commonjs/icons/index.js +6 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/molecules/AvatarHeader.js +47 -14
- package/lib/commonjs/molecules/AvatarHeader.js.map +1 -1
- package/lib/commonjs/molecules/FormActions.js +25 -9
- package/lib/commonjs/molecules/FormActions.js.map +1 -1
- package/lib/commonjs/molecules/InfoRow.js +30 -14
- package/lib/commonjs/molecules/InfoRow.js.map +1 -1
- package/lib/commonjs/molecules/OptionCard.js +37 -22
- package/lib/commonjs/molecules/OptionCard.js.map +1 -1
- package/lib/commonjs/molecules/SegmentedControl.js +103 -14
- package/lib/commonjs/molecules/SegmentedControl.js.map +1 -1
- package/lib/commonjs/molecules/Stepper.js +61 -16
- package/lib/commonjs/molecules/Stepper.js.map +1 -1
- package/lib/commonjs/molecules/Steps.js +105 -41
- package/lib/commonjs/molecules/Steps.js.map +1 -1
- package/lib/commonjs/molecules/SymmetricGrid.js +26 -18
- package/lib/commonjs/molecules/SymmetricGrid.js.map +1 -1
- package/lib/commonjs/organisms/Alert.js +49 -35
- package/lib/commonjs/organisms/Alert.js.map +1 -1
- package/lib/commonjs/organisms/AlertProvider.js +10 -10
- package/lib/commonjs/organisms/BottomSheet.js +137 -85
- package/lib/commonjs/organisms/BottomSheet.js.map +1 -1
- package/lib/commonjs/organisms/Chart.js +197 -156
- package/lib/commonjs/organisms/Chart.js.map +1 -1
- package/lib/commonjs/organisms/DateField.js +36 -20
- package/lib/commonjs/organisms/DateField.js.map +1 -1
- package/lib/commonjs/organisms/DatePicker.js +56 -33
- package/lib/commonjs/organisms/DatePicker.js.map +1 -1
- package/lib/commonjs/organisms/List.js +62 -34
- package/lib/commonjs/organisms/List.js.map +1 -1
- package/lib/commonjs/organisms/Modal.js +120 -82
- package/lib/commonjs/organisms/Modal.js.map +1 -1
- package/lib/commonjs/organisms/NavigationBar.js +63 -24
- package/lib/commonjs/organisms/NavigationBar.js.map +1 -1
- package/lib/commonjs/organisms/OptionWheel.js +64 -64
- package/lib/commonjs/organisms/OptionWheel.js.map +1 -1
- package/lib/commonjs/organisms/ReorderableList.js +48 -27
- package/lib/commonjs/organisms/ReorderableList.js.map +1 -1
- package/lib/commonjs/organisms/Screen.js +68 -35
- package/lib/commonjs/organisms/Screen.js.map +1 -1
- package/lib/commonjs/organisms/SearchList.js +56 -26
- package/lib/commonjs/organisms/SearchList.js.map +1 -1
- package/lib/commonjs/organisms/Select.js +45 -24
- package/lib/commonjs/organisms/Select.js.map +1 -1
- package/lib/commonjs/organisms/Slides.js +36 -23
- package/lib/commonjs/organisms/Slides.js.map +1 -1
- package/lib/commonjs/organisms/ThemeToggle.js +10 -9
- package/lib/commonjs/organisms/ThemeToggle.js.map +1 -1
- package/lib/commonjs/organisms/Timeline.js +73 -56
- package/lib/commonjs/organisms/Timeline.js.map +1 -1
- package/lib/commonjs/organisms/Toast.js +46 -15
- package/lib/commonjs/organisms/Toast.js.map +1 -1
- package/lib/commonjs/organisms/ToastProvider.js +14 -10
- package/lib/commonjs/organisms/ToastProvider.js.map +1 -1
- package/lib/commonjs/organisms/Wizard.js +40 -15
- package/lib/commonjs/organisms/Wizard.js.map +1 -1
- package/lib/commonjs/organisms/chart/frame.js +25 -25
- package/lib/commonjs/organisms/chart/frame.js.map +1 -1
- package/lib/commonjs/organisms/chart/marks.js +42 -42
- package/lib/commonjs/organisms/chart/math.js +84 -85
- package/lib/commonjs/organisms/chart/math.js.map +1 -1
- package/lib/commonjs/organisms/chart/palette.js +28 -28
- package/lib/commonjs/organisms/imperativeBridge.js +5 -5
- package/lib/commonjs/organisms/imperativeBridge.js.map +1 -1
- package/lib/commonjs/organisms/useSlides.js +53 -21
- package/lib/commonjs/organisms/useSlides.js.map +1 -1
- package/lib/commonjs/safe-area/SafeAreaUIProvider.js +9 -66
- package/lib/commonjs/safe-area/SafeAreaUIProvider.js.map +1 -1
- package/lib/commonjs/safe-area/index.js.map +1 -1
- package/lib/commonjs/theme/KeyboardAvoidance.js +206 -0
- package/lib/commonjs/theme/KeyboardAvoidance.js.map +1 -0
- package/lib/commonjs/theme/NativeOverlay.js +263 -0
- package/lib/commonjs/theme/NativeOverlay.js.map +1 -0
- package/lib/commonjs/theme/UIProvider.js +86 -33
- package/lib/commonjs/theme/UIProvider.js.map +1 -1
- package/lib/commonjs/theme/colors.js +17 -17
- package/lib/commonjs/theme/colors.js.map +1 -1
- package/lib/commonjs/theme/createStyles.js +19 -16
- package/lib/commonjs/theme/createStyles.js.map +1 -1
- package/lib/commonjs/theme/createTheme.js +6 -6
- package/lib/commonjs/theme/index.js +6 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/insets.js +1 -1
- package/lib/commonjs/theme/labels.js +29 -1
- package/lib/commonjs/theme/labels.js.map +1 -1
- package/lib/commonjs/theme/palettes.js +25 -23
- package/lib/commonjs/theme/palettes.js.map +1 -1
- package/lib/commonjs/theme/tokens.js +28 -14
- package/lib/commonjs/theme/tokens.js.map +1 -1
- package/lib/commonjs/theme/useKeyboardField.js +36 -0
- package/lib/commonjs/theme/useKeyboardField.js.map +1 -0
- package/lib/commonjs/theme/useReduceMotion.js +31 -0
- package/lib/commonjs/theme/useReduceMotion.js.map +1 -0
- package/lib/module/atoms/Avatar.js +79 -8
- package/lib/module/atoms/Avatar.js.map +1 -1
- package/lib/module/atoms/Badge.js +17 -8
- package/lib/module/atoms/Badge.js.map +1 -1
- package/lib/module/atoms/Button.js +110 -41
- package/lib/module/atoms/Button.js.map +1 -1
- package/lib/module/atoms/Card.js +24 -2
- package/lib/module/atoms/Card.js.map +1 -1
- package/lib/module/atoms/Checkbox.js +42 -11
- package/lib/module/atoms/Checkbox.js.map +1 -1
- package/lib/module/atoms/Divider.js +31 -6
- package/lib/module/atoms/Divider.js.map +1 -1
- package/lib/module/atoms/EmptyState.js +58 -20
- package/lib/module/atoms/EmptyState.js.map +1 -1
- package/lib/module/atoms/Fab.js +33 -13
- package/lib/module/atoms/Fab.js.map +1 -1
- package/lib/module/atoms/Gradient.js +103 -37
- package/lib/module/atoms/Gradient.js.map +1 -1
- package/lib/module/atoms/IconButton.js +25 -4
- package/lib/module/atoms/IconButton.js.map +1 -1
- package/lib/module/atoms/Image.js +61 -25
- package/lib/module/atoms/Image.js.map +1 -1
- package/lib/module/atoms/Input.js +108 -20
- package/lib/module/atoms/Input.js.map +1 -1
- package/lib/module/atoms/KeyValueRow.js +37 -9
- package/lib/module/atoms/KeyValueRow.js.map +1 -1
- package/lib/module/atoms/PressableScale.js +25 -5
- package/lib/module/atoms/PressableScale.js.map +1 -1
- package/lib/module/atoms/ShinyText.js +29 -29
- package/lib/module/atoms/Skeleton.js +30 -13
- package/lib/module/atoms/Skeleton.js.map +1 -1
- package/lib/module/atoms/Spinner.js +82 -23
- package/lib/module/atoms/Spinner.js.map +1 -1
- package/lib/module/atoms/Text.js +56 -5
- package/lib/module/atoms/Text.js.map +1 -1
- package/lib/module/atoms/Transition.js +41 -42
- package/lib/module/atoms/Transition.js.map +1 -1
- package/lib/module/atoms/index.js +1 -1
- package/lib/module/atoms/index.js.map +1 -1
- package/lib/module/atoms/inputValidation.js +52 -0
- package/lib/module/atoms/inputValidation.js.map +1 -0
- package/lib/module/icons/Icon.js +4 -4
- package/lib/module/icons/defaultIcons.js +574 -24
- package/lib/module/icons/defaultIcons.js.map +1 -1
- package/lib/module/icons/index.js +1 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/molecules/AvatarHeader.js +47 -14
- package/lib/module/molecules/AvatarHeader.js.map +1 -1
- package/lib/module/molecules/FormActions.js +25 -9
- package/lib/module/molecules/FormActions.js.map +1 -1
- package/lib/module/molecules/InfoRow.js +30 -14
- package/lib/module/molecules/InfoRow.js.map +1 -1
- package/lib/module/molecules/OptionCard.js +37 -22
- package/lib/module/molecules/OptionCard.js.map +1 -1
- package/lib/module/molecules/SegmentedControl.js +107 -18
- package/lib/module/molecules/SegmentedControl.js.map +1 -1
- package/lib/module/molecules/Stepper.js +63 -18
- package/lib/module/molecules/Stepper.js.map +1 -1
- package/lib/module/molecules/Steps.js +107 -43
- package/lib/module/molecules/Steps.js.map +1 -1
- package/lib/module/molecules/SymmetricGrid.js +26 -18
- package/lib/module/molecules/SymmetricGrid.js.map +1 -1
- package/lib/module/organisms/Alert.js +51 -37
- package/lib/module/organisms/Alert.js.map +1 -1
- package/lib/module/organisms/AlertProvider.js +10 -10
- package/lib/module/organisms/BottomSheet.js +142 -88
- package/lib/module/organisms/BottomSheet.js.map +1 -1
- package/lib/module/organisms/Chart.js +199 -158
- package/lib/module/organisms/Chart.js.map +1 -1
- package/lib/module/organisms/DateField.js +36 -20
- package/lib/module/organisms/DateField.js.map +1 -1
- package/lib/module/organisms/DatePicker.js +56 -33
- package/lib/module/organisms/DatePicker.js.map +1 -1
- package/lib/module/organisms/List.js +62 -34
- package/lib/module/organisms/List.js.map +1 -1
- package/lib/module/organisms/Modal.js +122 -84
- package/lib/module/organisms/Modal.js.map +1 -1
- package/lib/module/organisms/NavigationBar.js +64 -25
- package/lib/module/organisms/NavigationBar.js.map +1 -1
- package/lib/module/organisms/OptionWheel.js +64 -64
- package/lib/module/organisms/OptionWheel.js.map +1 -1
- package/lib/module/organisms/ReorderableList.js +48 -27
- package/lib/module/organisms/ReorderableList.js.map +1 -1
- package/lib/module/organisms/Screen.js +70 -37
- package/lib/module/organisms/Screen.js.map +1 -1
- package/lib/module/organisms/SearchList.js +56 -26
- package/lib/module/organisms/SearchList.js.map +1 -1
- package/lib/module/organisms/Select.js +46 -25
- package/lib/module/organisms/Select.js.map +1 -1
- package/lib/module/organisms/Slides.js +37 -24
- package/lib/module/organisms/Slides.js.map +1 -1
- package/lib/module/organisms/ThemeToggle.js +11 -10
- package/lib/module/organisms/ThemeToggle.js.map +1 -1
- package/lib/module/organisms/Timeline.js +73 -56
- package/lib/module/organisms/Timeline.js.map +1 -1
- package/lib/module/organisms/Toast.js +47 -16
- package/lib/module/organisms/Toast.js.map +1 -1
- package/lib/module/organisms/ToastProvider.js +15 -11
- package/lib/module/organisms/ToastProvider.js.map +1 -1
- package/lib/module/organisms/Wizard.js +41 -16
- package/lib/module/organisms/Wizard.js.map +1 -1
- package/lib/module/organisms/chart/frame.js +25 -25
- package/lib/module/organisms/chart/frame.js.map +1 -1
- package/lib/module/organisms/chart/marks.js +42 -42
- package/lib/module/organisms/chart/math.js +84 -85
- package/lib/module/organisms/chart/math.js.map +1 -1
- package/lib/module/organisms/chart/palette.js +28 -28
- package/lib/module/organisms/imperativeBridge.js +5 -5
- package/lib/module/organisms/imperativeBridge.js.map +1 -1
- package/lib/module/organisms/useSlides.js +53 -21
- package/lib/module/organisms/useSlides.js.map +1 -1
- package/lib/module/safe-area/SafeAreaUIProvider.js +10 -65
- package/lib/module/safe-area/SafeAreaUIProvider.js.map +1 -1
- package/lib/module/safe-area/index.js +1 -0
- package/lib/module/safe-area/index.js.map +1 -1
- package/lib/module/theme/KeyboardAvoidance.js +198 -0
- package/lib/module/theme/KeyboardAvoidance.js.map +1 -0
- package/lib/module/theme/NativeOverlay.js +257 -0
- package/lib/module/theme/NativeOverlay.js.map +1 -0
- package/lib/module/theme/UIProvider.js +88 -35
- package/lib/module/theme/UIProvider.js.map +1 -1
- package/lib/module/theme/colors.js +17 -17
- package/lib/module/theme/colors.js.map +1 -1
- package/lib/module/theme/createStyles.js +20 -16
- package/lib/module/theme/createStyles.js.map +1 -1
- package/lib/module/theme/createTheme.js +6 -6
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/insets.js +1 -1
- package/lib/module/theme/labels.js +29 -1
- package/lib/module/theme/labels.js.map +1 -1
- package/lib/module/theme/palettes.js +25 -23
- package/lib/module/theme/palettes.js.map +1 -1
- package/lib/module/theme/tokens.js +27 -13
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/module/theme/useKeyboardField.js +33 -0
- package/lib/module/theme/useKeyboardField.js.map +1 -0
- package/lib/module/theme/useReduceMotion.js +28 -0
- package/lib/module/theme/useReduceMotion.js.map +1 -0
- package/lib/typescript/atoms/Avatar.d.ts +35 -5
- package/lib/typescript/atoms/Avatar.d.ts.map +1 -1
- package/lib/typescript/atoms/Badge.d.ts +14 -3
- package/lib/typescript/atoms/Badge.d.ts.map +1 -1
- package/lib/typescript/atoms/Button.d.ts +34 -3
- package/lib/typescript/atoms/Button.d.ts.map +1 -1
- package/lib/typescript/atoms/Card.d.ts +13 -2
- package/lib/typescript/atoms/Card.d.ts.map +1 -1
- package/lib/typescript/atoms/Checkbox.d.ts +26 -1
- package/lib/typescript/atoms/Checkbox.d.ts.map +1 -1
- package/lib/typescript/atoms/Divider.d.ts +18 -1
- package/lib/typescript/atoms/Divider.d.ts.map +1 -1
- package/lib/typescript/atoms/EmptyState.d.ts +30 -3
- package/lib/typescript/atoms/EmptyState.d.ts.map +1 -1
- package/lib/typescript/atoms/Fab.d.ts +24 -4
- package/lib/typescript/atoms/Fab.d.ts.map +1 -1
- package/lib/typescript/atoms/Gradient.d.ts +21 -15
- package/lib/typescript/atoms/Gradient.d.ts.map +1 -1
- package/lib/typescript/atoms/IconButton.d.ts +18 -4
- package/lib/typescript/atoms/IconButton.d.ts.map +1 -1
- package/lib/typescript/atoms/Image.d.ts +39 -17
- package/lib/typescript/atoms/Image.d.ts.map +1 -1
- package/lib/typescript/atoms/Input.d.ts +57 -7
- package/lib/typescript/atoms/Input.d.ts.map +1 -1
- package/lib/typescript/atoms/KeyValueRow.d.ts +16 -4
- package/lib/typescript/atoms/KeyValueRow.d.ts.map +1 -1
- package/lib/typescript/atoms/PressableScale.d.ts +12 -5
- package/lib/typescript/atoms/PressableScale.d.ts.map +1 -1
- package/lib/typescript/atoms/ShinyText.d.ts +17 -17
- package/lib/typescript/atoms/ShinyText.d.ts.map +1 -1
- package/lib/typescript/atoms/Skeleton.d.ts +12 -7
- package/lib/typescript/atoms/Skeleton.d.ts.map +1 -1
- package/lib/typescript/atoms/Spinner.d.ts +29 -1
- package/lib/typescript/atoms/Spinner.d.ts.map +1 -1
- package/lib/typescript/atoms/Text.d.ts +46 -0
- package/lib/typescript/atoms/Text.d.ts.map +1 -1
- package/lib/typescript/atoms/Transition.d.ts +19 -15
- package/lib/typescript/atoms/Transition.d.ts.map +1 -1
- package/lib/typescript/atoms/index.d.ts +3 -3
- package/lib/typescript/atoms/index.d.ts.map +1 -1
- package/lib/typescript/atoms/inputValidation.d.ts +29 -0
- package/lib/typescript/atoms/inputValidation.d.ts.map +1 -0
- package/lib/typescript/icons/Icon.d.ts +4 -4
- package/lib/typescript/icons/defaultIcons.d.ts +19 -2
- package/lib/typescript/icons/defaultIcons.d.ts.map +1 -1
- package/lib/typescript/icons/index.d.ts +2 -2
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/icons/types.d.ts +13 -3
- package/lib/typescript/icons/types.d.ts.map +1 -1
- package/lib/typescript/molecules/AvatarHeader.d.ts +23 -4
- package/lib/typescript/molecules/AvatarHeader.d.ts.map +1 -1
- package/lib/typescript/molecules/FormActions.d.ts +21 -4
- package/lib/typescript/molecules/FormActions.d.ts.map +1 -1
- package/lib/typescript/molecules/InfoRow.d.ts +17 -3
- package/lib/typescript/molecules/InfoRow.d.ts.map +1 -1
- package/lib/typescript/molecules/OptionCard.d.ts +20 -5
- package/lib/typescript/molecules/OptionCard.d.ts.map +1 -1
- package/lib/typescript/molecules/SegmentedControl.d.ts +18 -2
- package/lib/typescript/molecules/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/molecules/Stepper.d.ts +23 -7
- package/lib/typescript/molecules/Stepper.d.ts.map +1 -1
- package/lib/typescript/molecules/Steps.d.ts +18 -4
- package/lib/typescript/molecules/Steps.d.ts.map +1 -1
- package/lib/typescript/molecules/SymmetricGrid.d.ts +15 -5
- package/lib/typescript/molecules/SymmetricGrid.d.ts.map +1 -1
- package/lib/typescript/organisms/Alert.d.ts +28 -2
- package/lib/typescript/organisms/Alert.d.ts.map +1 -1
- package/lib/typescript/organisms/AlertProvider.d.ts +10 -10
- package/lib/typescript/organisms/AlertProvider.d.ts.map +1 -1
- package/lib/typescript/organisms/BottomSheet.d.ts +20 -5
- package/lib/typescript/organisms/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/organisms/Chart.d.ts +86 -75
- package/lib/typescript/organisms/Chart.d.ts.map +1 -1
- package/lib/typescript/organisms/DateField.d.ts +17 -3
- package/lib/typescript/organisms/DateField.d.ts.map +1 -1
- package/lib/typescript/organisms/DatePicker.d.ts +7 -11
- package/lib/typescript/organisms/DatePicker.d.ts.map +1 -1
- package/lib/typescript/organisms/List.d.ts +30 -3
- package/lib/typescript/organisms/List.d.ts.map +1 -1
- package/lib/typescript/organisms/Modal.d.ts +30 -3
- package/lib/typescript/organisms/Modal.d.ts.map +1 -1
- package/lib/typescript/organisms/NavigationBar.d.ts +26 -7
- package/lib/typescript/organisms/NavigationBar.d.ts.map +1 -1
- package/lib/typescript/organisms/OptionWheel.d.ts +20 -16
- package/lib/typescript/organisms/OptionWheel.d.ts.map +1 -1
- package/lib/typescript/organisms/ReorderableList.d.ts +20 -11
- package/lib/typescript/organisms/ReorderableList.d.ts.map +1 -1
- package/lib/typescript/organisms/Screen.d.ts +27 -8
- package/lib/typescript/organisms/Screen.d.ts.map +1 -1
- package/lib/typescript/organisms/SearchList.d.ts +46 -3
- package/lib/typescript/organisms/SearchList.d.ts.map +1 -1
- package/lib/typescript/organisms/Select.d.ts +26 -6
- package/lib/typescript/organisms/Select.d.ts.map +1 -1
- package/lib/typescript/organisms/Slides.d.ts +44 -26
- package/lib/typescript/organisms/Slides.d.ts.map +1 -1
- package/lib/typescript/organisms/ThemeToggle.d.ts +6 -2
- package/lib/typescript/organisms/ThemeToggle.d.ts.map +1 -1
- package/lib/typescript/organisms/Timeline.d.ts +26 -9
- package/lib/typescript/organisms/Timeline.d.ts.map +1 -1
- package/lib/typescript/organisms/Toast.d.ts +19 -4
- package/lib/typescript/organisms/Toast.d.ts.map +1 -1
- package/lib/typescript/organisms/ToastProvider.d.ts +8 -8
- package/lib/typescript/organisms/ToastProvider.d.ts.map +1 -1
- package/lib/typescript/organisms/Wizard.d.ts +24 -6
- package/lib/typescript/organisms/Wizard.d.ts.map +1 -1
- package/lib/typescript/organisms/chart/frame.d.ts +21 -21
- package/lib/typescript/organisms/chart/frame.d.ts.map +1 -1
- package/lib/typescript/organisms/chart/marks.d.ts +28 -28
- package/lib/typescript/organisms/chart/marks.d.ts.map +1 -1
- package/lib/typescript/organisms/chart/math.d.ts +69 -70
- package/lib/typescript/organisms/chart/math.d.ts.map +1 -1
- package/lib/typescript/organisms/chart/palette.d.ts +2 -2
- package/lib/typescript/organisms/chart/palette.d.ts.map +1 -1
- package/lib/typescript/organisms/imperativeBridge.d.ts +4 -4
- package/lib/typescript/organisms/useSlides.d.ts +8 -16
- package/lib/typescript/organisms/useSlides.d.ts.map +1 -1
- package/lib/typescript/safe-area/SafeAreaUIProvider.d.ts +9 -7
- package/lib/typescript/safe-area/SafeAreaUIProvider.d.ts.map +1 -1
- package/lib/typescript/safe-area/index.d.ts.map +1 -1
- package/lib/typescript/theme/KeyboardAvoidance.d.ts +62 -0
- package/lib/typescript/theme/KeyboardAvoidance.d.ts.map +1 -0
- package/lib/typescript/theme/NativeOverlay.d.ts +43 -0
- package/lib/typescript/theme/NativeOverlay.d.ts.map +1 -0
- package/lib/typescript/theme/UIProvider.d.ts +38 -20
- package/lib/typescript/theme/UIProvider.d.ts.map +1 -1
- package/lib/typescript/theme/colors.d.ts +13 -13
- package/lib/typescript/theme/colors.d.ts.map +1 -1
- package/lib/typescript/theme/createStyles.d.ts +20 -14
- package/lib/typescript/theme/createStyles.d.ts.map +1 -1
- package/lib/typescript/theme/createTheme.d.ts +5 -5
- package/lib/typescript/theme/index.d.ts +1 -1
- package/lib/typescript/theme/index.d.ts.map +1 -1
- package/lib/typescript/theme/insets.d.ts +1 -1
- package/lib/typescript/theme/insets.d.ts.map +1 -1
- package/lib/typescript/theme/labels.d.ts +57 -2
- package/lib/typescript/theme/labels.d.ts.map +1 -1
- package/lib/typescript/theme/palettes.d.ts +25 -19
- package/lib/typescript/theme/palettes.d.ts.map +1 -1
- package/lib/typescript/theme/tokens.d.ts +15 -8
- package/lib/typescript/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/theme/types.d.ts +7 -7
- package/lib/typescript/theme/types.d.ts.map +1 -1
- package/lib/typescript/theme/useKeyboardField.d.ts +17 -0
- package/lib/typescript/theme/useKeyboardField.d.ts.map +1 -0
- package/lib/typescript/theme/useReduceMotion.d.ts +7 -0
- package/lib/typescript/theme/useReduceMotion.d.ts.map +1 -0
- package/llms.txt +4 -4
- package/package.json +15 -14
- package/registry/alert-provider.json +4 -3
- package/registry/alert.json +3 -2
- package/registry/avatar-header.json +1 -1
- package/registry/avatar.json +3 -2
- package/registry/badge.json +1 -1
- package/registry/bottom-sheet.json +1 -1
- package/registry/button.json +3 -2
- package/registry/card.json +1 -1
- package/registry/chart.json +5 -5
- package/registry/checkbox.json +3 -2
- package/registry/core.json +31 -15
- package/registry/date-field.json +1 -1
- package/registry/date-picker.json +3 -2
- package/registry/divider.json +1 -1
- package/registry/empty-state.json +4 -2
- package/registry/fab.json +3 -2
- package/registry/form-actions.json +3 -2
- package/registry/gradient.json +1 -1
- package/registry/icon-button.json +3 -2
- package/registry/image.json +1 -1
- package/registry/index.json +79 -61
- package/registry/info-row.json +1 -1
- package/registry/input.json +5 -1
- package/registry/key-value-row.json +1 -1
- package/registry/list.json +3 -1
- package/registry/manifest.json +3 -1
- package/registry/modal.json +1 -1
- package/registry/navigation-bar.json +1 -1
- package/registry/option-card.json +3 -2
- package/registry/option-wheel.json +1 -1
- package/registry/pressable-scale.json +3 -2
- package/registry/reorderable-list.json +1 -1
- package/registry/screen.json +1 -1
- package/registry/search-list.json +7 -1
- package/registry/segmented-control.json +1 -1
- package/registry/select.json +1 -1
- package/registry/shiny-text.json +1 -1
- package/registry/skeleton.json +3 -2
- package/registry/slides.json +2 -2
- package/registry/spinner.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/steps.json +1 -1
- package/registry/symmetric-grid.json +1 -1
- package/registry/theme-toggle.json +1 -1
- package/registry/timeline.json +1 -1
- package/registry/title.json +1 -1
- package/registry/toast-provider.json +2 -2
- package/registry/toast.json +1 -1
- package/registry/transition.json +1 -1
- package/registry/wizard.json +1 -1
- package/src/atoms/Avatar.tsx +117 -26
- package/src/atoms/Badge.tsx +20 -9
- package/src/atoms/Button.tsx +102 -30
- package/src/atoms/Card.tsx +23 -3
- package/src/atoms/Checkbox.tsx +49 -12
- package/src/atoms/Divider.tsx +34 -4
- package/src/atoms/EmptyState.tsx +63 -16
- package/src/atoms/Fab.tsx +56 -9
- package/src/atoms/Gradient.tsx +92 -41
- package/src/atoms/IconButton.tsx +27 -4
- package/src/atoms/Image.tsx +74 -28
- package/src/atoms/Input.tsx +129 -19
- package/src/atoms/KeyValueRow.tsx +72 -28
- package/src/atoms/PressableScale.tsx +31 -7
- package/src/atoms/ShinyText.tsx +31 -31
- package/src/atoms/Skeleton.tsx +37 -17
- package/src/atoms/Spinner.tsx +87 -24
- package/src/atoms/Text.tsx +66 -6
- package/src/atoms/Transition.tsx +40 -44
- package/src/atoms/index.ts +3 -3
- package/src/atoms/inputValidation.ts +59 -0
- package/src/icons/Icon.tsx +4 -4
- package/src/icons/defaultIcons.tsx +445 -22
- package/src/icons/index.ts +2 -2
- package/src/icons/types.ts +26 -4
- package/src/molecules/AvatarHeader.tsx +88 -34
- package/src/molecules/FormActions.tsx +36 -6
- package/src/molecules/InfoRow.tsx +39 -12
- package/src/molecules/OptionCard.tsx +55 -20
- package/src/molecules/SegmentedControl.tsx +135 -15
- package/src/molecules/Stepper.tsx +73 -19
- package/src/molecules/Steps.tsx +121 -39
- package/src/molecules/SymmetricGrid.tsx +28 -12
- package/src/organisms/Alert.tsx +97 -26
- package/src/organisms/AlertProvider.tsx +13 -13
- package/src/organisms/BottomSheet.tsx +115 -43
- package/src/organisms/Chart.tsx +223 -165
- package/src/organisms/DateField.tsx +40 -15
- package/src/organisms/DatePicker.tsx +53 -32
- package/src/organisms/List.tsx +64 -15
- package/src/organisms/Modal.tsx +122 -63
- package/src/organisms/NavigationBar.tsx +73 -23
- package/src/organisms/OptionWheel.tsx +70 -66
- package/src/organisms/ReorderableList.tsx +49 -27
- package/src/organisms/Screen.tsx +79 -42
- package/src/organisms/SearchList.tsx +84 -20
- package/src/organisms/Select.tsx +63 -29
- package/src/organisms/Slides.tsx +63 -44
- package/src/organisms/ThemeToggle.tsx +15 -6
- package/src/organisms/Timeline.tsx +79 -62
- package/src/organisms/Toast.tsx +50 -15
- package/src/organisms/ToastProvider.tsx +17 -13
- package/src/organisms/Wizard.tsx +58 -21
- package/src/organisms/chart/frame.tsx +35 -35
- package/src/organisms/chart/marks.tsx +53 -53
- package/src/organisms/chart/math.ts +93 -94
- package/src/organisms/chart/palette.ts +28 -28
- package/src/organisms/imperativeBridge.ts +5 -5
- package/src/organisms/useSlides.ts +66 -31
- package/src/safe-area/SafeAreaUIProvider.tsx +9 -70
- package/src/safe-area/index.ts +1 -0
- package/src/theme/KeyboardAvoidance.tsx +216 -0
- package/src/theme/NativeOverlay.tsx +269 -0
- package/src/theme/UIProvider.tsx +109 -46
- package/src/theme/colors.ts +21 -21
- package/src/theme/createStyles.ts +23 -19
- package/src/theme/createTheme.ts +6 -6
- package/src/theme/index.ts +1 -1
- package/src/theme/insets.ts +1 -1
- package/src/theme/labels.ts +85 -2
- package/src/theme/palettes.ts +33 -25
- package/src/theme/tokens.ts +27 -13
- package/src/theme/types.ts +7 -7
- package/src/theme/useKeyboardField.ts +33 -0
- package/src/theme/useReduceMotion.ts +27 -0
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Chart geometry and scales: everything that can be tested without mounting a
|
|
3
|
+
* tree lives here, without React and without dependencies. marks.tsx only
|
|
4
|
+
* translates these numbers into styles, and Chart.tsx only decides which mark to draw.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
6
|
+
* Conventions:
|
|
7
|
+
* - React Native coordinates: origin at the top-left, `y` grows downward.
|
|
8
|
+
* - Angles in degrees, 0° at 12 o'clock, increasing clockwise —
|
|
9
|
+
* which is how a pie is read and how `transform: rotate` turns in RN.
|
|
10
10
|
*/
|
|
11
11
|
export interface Point {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/** Data row: an x-axis category and one number per series. */
|
|
16
16
|
export type ChartRow = Record<string, string | number | null | undefined>;
|
|
17
|
-
/**
|
|
17
|
+
/** Reads a cell as a number, or null if it isn't one (a gap in the series). */
|
|
18
18
|
export declare function toNumber(value: unknown): number | null;
|
|
19
19
|
export declare function clamp(value: number, min: number, max: number): number;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The 1, 2, 5 or 10 (times its power of ten) closest above `rough`.
|
|
22
|
+
* It is what makes ticks land on numbers someone would say out loud —
|
|
23
|
+
* 0, 250, 500 — and not on 0, 237, 474.
|
|
24
24
|
*/
|
|
25
25
|
export declare function niceStep(rough: number): number;
|
|
26
26
|
export interface Ticks {
|
|
27
|
-
/**
|
|
27
|
+
/** Lower end, rounded outward. */
|
|
28
28
|
min: number;
|
|
29
|
-
/**
|
|
29
|
+
/** Upper end, rounded outward. */
|
|
30
30
|
max: number;
|
|
31
31
|
step: number;
|
|
32
32
|
values: number[];
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* Domain rounded to legible values plus the list of ticks. `count` is an
|
|
36
|
+
* intent, not a promise: rounding outward may give one more or one fewer,
|
|
37
|
+
* and that is preferable to an axis with arbitrary numbers.
|
|
38
38
|
*/
|
|
39
39
|
export declare function niceScale(min: number, max: number, count?: number): Ticks;
|
|
40
40
|
/**
|
|
41
|
-
* Ticks
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* Ticks for a domain the consumer set by hand. It rounds nothing: if someone
|
|
42
|
+
* asks for 0–100, the axis says 0–100. It is the opposite of `niceScale`, and
|
|
43
|
+
* it is what a live chart needs — an axis that rearranges itself on every tick
|
|
44
|
+
* makes the line jump even though the data hasn't moved.
|
|
45
45
|
*/
|
|
46
46
|
export declare function exactTicks(min: number, max: number, count?: number): Ticks;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
* Merges two domains keeping the widest. It is the 'sticky' mode: the axis
|
|
49
|
+
* grows when a value arrives that didn't fit and never shrinks back, so what
|
|
50
|
+
* you see moving is the data and not the scale.
|
|
51
51
|
*/
|
|
52
52
|
export declare function growExtent(previous: [number, number] | null, next: [number, number]): [number, number];
|
|
53
|
-
/**
|
|
53
|
+
/** Linear domain → range interpolator. A degenerate domain falls to the middle of the range. */
|
|
54
54
|
export declare function linearScale(domain: [number, number], range: [number, number]): (value: number) => number;
|
|
55
55
|
export interface ExtentOptions {
|
|
56
|
-
/**
|
|
56
|
+
/** The series are summed instead of compared (stacked bars/areas). */
|
|
57
57
|
stacked?: boolean;
|
|
58
|
-
/**
|
|
58
|
+
/** Forces 0 into the domain: without it, a short bar lies. */
|
|
59
59
|
includeZero?: boolean;
|
|
60
60
|
}
|
|
61
|
-
/**
|
|
61
|
+
/** Minimum and maximum of the requested series. With no data it returns [0, 1]. */
|
|
62
62
|
export declare function extent(rows: ChartRow[], keys: string[], options?: ExtentOptions): [number, number];
|
|
63
63
|
export interface StackBand {
|
|
64
64
|
key: string;
|
|
65
|
-
/**
|
|
65
|
+
/** Edge of the band closest to zero. */
|
|
66
66
|
from: number;
|
|
67
|
-
/**
|
|
67
|
+
/** Edge furthest from zero. */
|
|
68
68
|
to: number;
|
|
69
69
|
value: number;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* Stacked bands of a row. Positives grow from 0 upward and negatives from 0
|
|
73
|
+
* downward: a negative series doesn't eat the positives' height, which is
|
|
74
|
+
* what happens if everything is stacked in a single accumulator.
|
|
75
75
|
*/
|
|
76
76
|
export declare function stackRow(row: ChartRow, keys: string[]): StackBand[];
|
|
77
|
-
/**
|
|
77
|
+
/** Point at `radius` from the center at the given angle (0° up, clockwise). */
|
|
78
78
|
export declare function polar(center: Point, radius: number, angle: number): Point;
|
|
79
|
-
/**
|
|
79
|
+
/** Angle of a point relative to the center, normalized to [0, 360). */
|
|
80
80
|
export declare function angleOf(center: Point, point: Point): number;
|
|
81
81
|
export interface Arc {
|
|
82
|
-
/**
|
|
82
|
+
/** Index of the row it represents. */
|
|
83
83
|
index: number;
|
|
84
84
|
start: number;
|
|
85
85
|
sweep: number;
|
|
86
86
|
value: number;
|
|
87
|
-
/**
|
|
87
|
+
/** Share of the total, 0–1. */
|
|
88
88
|
ratio: number;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
91
|
+
* Arcs of a pie. Negatives don't exist in a pie (there is no "less slice"):
|
|
92
|
+
* they are dropped instead of inverted. Total 0 ⇒ nothing to draw.
|
|
93
93
|
*/
|
|
94
94
|
export declare function arcsFor(values: number[]): Arc[];
|
|
95
|
-
/**
|
|
95
|
+
/** The arc containing that angle, or -1. */
|
|
96
96
|
export declare function arcAt(arcs: Arc[], angle: number): number;
|
|
97
|
-
/**
|
|
97
|
+
/** Angles of a radar's axes: the first at the top, the rest evenly spread. */
|
|
98
98
|
export declare function radarAngles(count: number): number[];
|
|
99
99
|
export interface SegmentBox {
|
|
100
100
|
left: number;
|
|
101
101
|
top: number;
|
|
102
102
|
width: number;
|
|
103
103
|
height: number;
|
|
104
|
-
/**
|
|
104
|
+
/** Degrees for `transform: [{ rotate }]`. */
|
|
105
105
|
rotate: number;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
108
|
+
* Box of a segment a→b: without SVG, a line is a thin rectangle rotated
|
|
109
|
+
* around its center. Width = distance, height = thickness, rotation = the slope.
|
|
110
110
|
*/
|
|
111
111
|
export declare function segmentBox(a: Point, b: Point, thickness: number): SegmentBox;
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
113
|
+
* Smooths a polyline with Catmull-Rom sampled in `steps` segments per span.
|
|
114
|
+
* The curve passes through all the original points (unlike a free-control
|
|
115
|
+
* Bézier), so the data is still the data; only path is added in between, and
|
|
116
|
+
* the result is drawn with the same straight segments.
|
|
117
117
|
*/
|
|
118
118
|
export declare function smoothPoints(points: Point[], steps?: number): Point[];
|
|
119
119
|
/**
|
|
120
|
-
* `y`
|
|
121
|
-
*
|
|
120
|
+
* The polyline's `y` at that `x`, or null if it falls outside. It is what
|
|
121
|
+
* turns a line into an area: each vertical strip asks for its height here.
|
|
122
122
|
*/
|
|
123
123
|
export declare function sampleY(points: Point[], x: number): number | null;
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
125
|
+
* Default format for axes and tooltip: compact, because the axis of a 320px
|
|
126
|
+
* chart has no room for "1250000". The consumer replaces it entirely with
|
|
127
|
+
* `formatValue`.
|
|
128
128
|
*/
|
|
129
129
|
export declare function formatNumber(value: number): string;
|
|
130
130
|
export interface FanStrip {
|
|
@@ -133,29 +133,28 @@ export interface FanStrip {
|
|
|
133
133
|
radius: number;
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
136
|
+
* Breaks a polygon around a center into angular slices: it is what lets a
|
|
137
|
+
* radar be filled with the same primitive that draws a pie.
|
|
138
138
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
139
|
+
* The cut goes along the polygon's side (parameter `t`), not by angle: the
|
|
140
|
+
* radius of a chord isn't linear in the angle, and cutting by angle would
|
|
141
|
+
* round off the vertices exactly where the data says there should be a point.
|
|
142
142
|
*/
|
|
143
143
|
export declare function fanStrips(center: Point, points: Point[], steps?: number): FanStrip[];
|
|
144
144
|
/**
|
|
145
|
-
* LTTB (Largest-Triangle-Three-Buckets):
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
145
|
+
* LTTB (Largest-Triangle-Three-Buckets): picks `threshold` points from
|
|
146
|
+
* `values` while keeping the shape of the curve. Returns indexes, not points,
|
|
147
|
+
* so the caller can keep the whole row —all its series— and not only the one
|
|
148
|
+
* used to decide.
|
|
149
149
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
150
|
+
* Why not sample every N: every N eats the peaks, which are exactly what
|
|
151
|
+
* someone looks at in a time series. LTTB splits the path into buckets and
|
|
152
|
+
* from each one keeps the point that forms the largest triangle with the one
|
|
153
|
+
* already picked and with the average of the next bucket — that is, the one
|
|
154
|
+
* that changes the silhouette the most. First and last are always kept.
|
|
155
155
|
*
|
|
156
|
-
* `x`
|
|
157
|
-
*
|
|
158
|
-
* índice.
|
|
156
|
+
* `x` is the index: a chart's categories are spread evenly along the axis, so
|
|
157
|
+
* the horizontal distance between two points is their index distance.
|
|
159
158
|
*/
|
|
160
159
|
export declare function lttbIndices(values: (number | null)[], threshold: number): number[];
|
|
161
160
|
//# sourceMappingURL=math.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/organisms/chart/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/organisms/chart/math.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Theme } from '../../theme/types';
|
|
2
|
-
/**
|
|
2
|
+
/** Minimum contrast of a graphical object against its background (WCAG 1.4.11). */
|
|
3
3
|
export declare const GRAPHIC_CONTRAST = 3;
|
|
4
|
-
/** `count`
|
|
4
|
+
/** `count` stable colors for the series: the same index always gives the same color. */
|
|
5
5
|
export declare function seriesPalette(theme: Theme, count: number): string[];
|
|
6
6
|
//# sourceMappingURL=palette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../../src/organisms/chart/palette.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../../src/organisms/chart/palette.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAqFlC,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAMnE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Bridge between the mounted provider and code that isn't a component
|
|
3
|
+
* (services, API layer, interceptors). The provider registers itself on mount
|
|
4
|
+
* and clears itself on unmount, so outside the tree there is never a live
|
|
5
|
+
* reference left to a dead context.
|
|
6
6
|
*/
|
|
7
7
|
export interface ImperativeBridge<T> {
|
|
8
8
|
set: (value: T | null) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ComponentRef } from 'react';
|
|
1
2
|
import type { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, ScrollView } from 'react-native';
|
|
2
3
|
export type SlidesOrientation = 'horizontal' | 'vertical';
|
|
3
4
|
export interface UseSlidesOptions {
|
|
@@ -6,12 +7,12 @@ export interface UseSlidesOptions {
|
|
|
6
7
|
loop: boolean;
|
|
7
8
|
autoPlay: boolean;
|
|
8
9
|
interval: number;
|
|
9
|
-
/**
|
|
10
|
+
/** Controlled index; without it the internal state rules. */
|
|
10
11
|
index?: number;
|
|
11
12
|
defaultIndex: number;
|
|
12
13
|
onIndexChange?: (index: number) => void;
|
|
13
14
|
}
|
|
14
|
-
/**
|
|
15
|
+
/** A page of the scroll. The infinite mode's clones repeat a neighbor's `real`. */
|
|
15
16
|
export interface SlidesPage {
|
|
16
17
|
real: number;
|
|
17
18
|
clone: 'head' | 'tail' | null;
|
|
@@ -25,28 +26,19 @@ export interface UseSlidesResult {
|
|
|
25
26
|
width: number;
|
|
26
27
|
height: number;
|
|
27
28
|
};
|
|
28
|
-
/**
|
|
29
|
+
/** Length of a page along the scroll axis. At 0 it hasn't been measured yet. */
|
|
29
30
|
pageSize: number;
|
|
30
|
-
scrollRef: React.RefObject<ScrollView | null>;
|
|
31
|
+
scrollRef: React.RefObject<ComponentRef<typeof ScrollView> | null>;
|
|
31
32
|
autoPlayPaused: boolean;
|
|
32
|
-
/**
|
|
33
|
+
/** The system asked to reduce motion: no autoPlay or transitions. */
|
|
33
34
|
motionReduced: boolean;
|
|
34
35
|
goTo: (index: number) => void;
|
|
35
36
|
toggleAutoPlay: () => void;
|
|
36
37
|
onLayout: (event: LayoutChangeEvent) => void;
|
|
37
38
|
onMomentumScrollEnd: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
38
|
-
onScrollBeginDrag: () => void;
|
|
39
|
-
onScrollEndDrag: () => void;
|
|
39
|
+
onScrollBeginDrag: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
40
|
+
onScrollEndDrag: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
40
41
|
}
|
|
41
42
|
export declare function clampIndex(value: number, total: number): number;
|
|
42
|
-
/**
|
|
43
|
-
* useSlides
|
|
44
|
-
* Todo lo que en `Slides` no se ve: qué página está encuadrada, cuándo mover el
|
|
45
|
-
* scroll, cómo se mapean los clones del modo infinito a índices reales, y el
|
|
46
|
-
* reloj del avance automático.
|
|
47
|
-
*
|
|
48
|
-
* Trabaja sólo con índices, nunca con los ítems: así no necesita el genérico
|
|
49
|
-
* `T` del componente, y el UI resuelve `pages[i].real` contra su propio `data`.
|
|
50
|
-
*/
|
|
51
43
|
export declare function useSlides({ total, orientation, loop, autoPlay, interval, index, defaultIndex, onIndexChange, }: UseSlidesOptions): UseSlidesResult;
|
|
52
44
|
//# sourceMappingURL=useSlides.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSlides.d.ts","sourceRoot":"","sources":["../../../src/organisms/useSlides.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSlides.d.ts","sourceRoot":"","sources":["../../../src/organisms/useSlides.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG3G,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,iBAAiB,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;IACnE,cAAc,EAAE,OAAO,CAAC;IACxB,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,mBAAmB,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9E,iBAAiB,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC5E,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC3E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK/D;AAcD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,aAAa,GACd,EAAE,gBAAgB,GAAG,eAAe,CAsLpC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
import { UIProvider, type UIProviderProps } from '../theme/UIProvider';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `UIProvider` from 'orn-ui': it now measures the safe area
|
|
4
|
+
* insets itself (react-native-safe-area-context is a required peer). This
|
|
5
|
+
* alias stays for one minor version so existing imports keep working.
|
|
6
|
+
*/
|
|
7
|
+
export type SafeAreaUIProviderProps = UIProviderProps;
|
|
8
|
+
/** @deprecated Use `UIProvider` from 'orn-ui' — same component. */
|
|
9
|
+
export declare const SafeAreaUIProvider: typeof UIProvider;
|
|
8
10
|
//# sourceMappingURL=SafeAreaUIProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SafeAreaUIProvider.d.ts","sourceRoot":"","sources":["../../../src/safe-area/SafeAreaUIProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SafeAreaUIProvider.d.ts","sourceRoot":"","sources":["../../../src/safe-area/SafeAreaUIProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEtD,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,mBAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/safe-area/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/safe-area/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** A focused field the host has to keep in view. */
|
|
3
|
+
export interface KeyboardField {
|
|
4
|
+
/** The field's box in window coordinates (label, field and error included). */
|
|
5
|
+
measure: () => Promise<{
|
|
6
|
+
y: number;
|
|
7
|
+
height: number;
|
|
8
|
+
} | null>;
|
|
9
|
+
}
|
|
10
|
+
export interface KeyboardHost {
|
|
11
|
+
focus: (field: KeyboardField) => void;
|
|
12
|
+
blur: (field: KeyboardField) => void;
|
|
13
|
+
}
|
|
14
|
+
/** The active host, or null if a container already handles the keyboard (or it is off). */
|
|
15
|
+
export declare function useKeyboardHost(): KeyboardHost | null;
|
|
16
|
+
/**
|
|
17
|
+
* For containers that already keep the focused field visible on their own:
|
|
18
|
+
* a Modal or BottomSheet (its own native window, which the root's shift
|
|
19
|
+
* doesn't move) or a ScrollView with `automaticallyAdjustKeyboardInsets`.
|
|
20
|
+
* Inside, Inputs ask nothing of the host and the keyboard isn't compensated
|
|
21
|
+
* twice.
|
|
22
|
+
*/
|
|
23
|
+
export declare function KeyboardHandled({ children }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Vertical shift (≤ 0) so the whole field sits above the keyboard, with
|
|
28
|
+
* `margin` of room, without its top edge going past `topLimit`.
|
|
29
|
+
* `fieldY` is the position measured with the `current` shift applied.
|
|
30
|
+
* If the field is already visible, it moves back toward 0: it never rises more than needed.
|
|
31
|
+
*/
|
|
32
|
+
export declare function computeKeyboardOffset({ fieldY, fieldHeight, keyboardTop, current, margin, topLimit, }: {
|
|
33
|
+
fieldY: number;
|
|
34
|
+
fieldHeight: number;
|
|
35
|
+
keyboardTop: number;
|
|
36
|
+
current: number;
|
|
37
|
+
margin: number;
|
|
38
|
+
topLimit: number;
|
|
39
|
+
}): number;
|
|
40
|
+
/**
|
|
41
|
+
* An area that shifts so the focused Input inside it sits above the
|
|
42
|
+
* keyboard (transform on the native thread; it returns to 0 on close). It is
|
|
43
|
+
* Android's `adjustPan`, the same on both platforms.
|
|
44
|
+
*
|
|
45
|
+
* - The root UIProvider mounts one around the whole app: the fallback, so
|
|
46
|
+
* an Input is visible even when it isn't inside a Screen.
|
|
47
|
+
* - Screen mounts another around its content, with `clip`: only the content
|
|
48
|
+
* moves and the header (`header` prop) and the tab bar stay still, as in a
|
|
49
|
+
* native app. The Input registers with the nearest area, so inside a
|
|
50
|
+
* Screen the root doesn't move.
|
|
51
|
+
*
|
|
52
|
+
* With `clip`, whatever rises is clipped at the area's top edge and the field
|
|
53
|
+
* never goes above that edge (it stays under the header).
|
|
54
|
+
*/
|
|
55
|
+
export declare function KeyboardPanArea({ margin, topLimit, clip, children, }: {
|
|
56
|
+
margin: number;
|
|
57
|
+
/** Top limit in window coordinates. With `clip`, the area's edge is used if it is lower. */
|
|
58
|
+
topLimit: number;
|
|
59
|
+
clip?: boolean;
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
}): React.JSX.Element;
|
|
62
|
+
//# sourceMappingURL=KeyboardAvoidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardAvoidance.d.ts","sourceRoot":"","sources":["../../../src/theme/KeyboardAvoidance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmF,MAAM,OAAO,CAAC;AAYxG,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,+EAA+E;IAC/E,OAAO,EAAE,MAAM,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CACtC;AAID,2FAA2F;AAC3F,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAE1E;AAKD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,WAAW,EACX,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAOT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,EACR,IAAY,EACZ,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAoGA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ModalProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* NativeOverlay
|
|
5
|
+
* The native `Modal` every orn-ui overlay (Alert, BottomSheet, Modal, Select)
|
|
6
|
+
* goes through.
|
|
7
|
+
*
|
|
8
|
+
* Why: iOS presents a native modal from the root view controller and only one
|
|
9
|
+
* at a time. A second `<Modal>` that is not rendered inside the first one is
|
|
10
|
+
* silently ignored while the first is presented, and also while it is still
|
|
11
|
+
* being dismissed. In practice an Alert from `showAlert()` over an open
|
|
12
|
+
* BottomSheet never showed, and neither did one opened right after closing a
|
|
13
|
+
* sheet. Android opens a window per modal and never had the problem: there
|
|
14
|
+
* this is a plain `Modal`.
|
|
15
|
+
*
|
|
16
|
+
* iOS, when an overlay becomes visible:
|
|
17
|
+
* - Rendered inside another overlay (nested): plain native modal; iOS presents
|
|
18
|
+
* it from that one, which works.
|
|
19
|
+
* - Another overlay is presented and this one is not inside it: it is drawn
|
|
20
|
+
* as a layer inside the topmost presented overlay instead of presenting a
|
|
21
|
+
* second native modal. Its React context then comes from that overlay's
|
|
22
|
+
* position: a provider that wraps only this overlay doesn't reach it.
|
|
23
|
+
* - Another overlay is closing (exit animation or native dismissal): it waits
|
|
24
|
+
* until that one is gone, then presents.
|
|
25
|
+
*/
|
|
26
|
+
export interface NativeOverlayProps extends Pick<ModalProps, 'transparent' | 'animationType' | 'presentationStyle' | 'statusBarTranslucent' | 'onRequestClose' | 'hardwareAccelerated'> {
|
|
27
|
+
/**
|
|
28
|
+
* The overlay is logically hidden but still mounted to play its exit
|
|
29
|
+
* animation: it stays on screen, but no other overlay may layer into it.
|
|
30
|
+
*/
|
|
31
|
+
closing?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A dialog (Alert) always ends up on top: whatever gets layered into it is
|
|
34
|
+
* drawn beneath its own content, and as a layer it is drawn after any
|
|
35
|
+
* non-dialog layer of the same host.
|
|
36
|
+
*/
|
|
37
|
+
dialog?: boolean;
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export declare function NativeOverlay({ closing, dialog, children, ...modalProps }: NativeOverlayProps): React.JSX.Element | null;
|
|
41
|
+
/** Test-only: clears the registry between tests. */
|
|
42
|
+
export declare function __resetNativeOverlays(): void;
|
|
43
|
+
//# sourceMappingURL=NativeOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeOverlay.d.ts","sourceRoot":"","sources":["../../../src/theme/NativeOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkF,MAAM,OAAO,CAAC;AACvG,OAAO,EAAyB,KAAK,UAAU,EAAkB,MAAM,cAAc,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,UAAU,EACV,aAAa,GAAG,eAAe,GAAG,mBAAmB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,qBAAqB,CAC1H;IACD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAoHD,wBAAgB,aAAa,CAAC,EAAE,OAAe,EAAE,MAAc,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAAE,kBAAkB,4BAqG7G;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,SAIpC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Appearance } from 'react-native';
|
|
3
3
|
import { type Labels } from './labels';
|
|
4
|
-
import {
|
|
4
|
+
import type { EdgeInsets } from './insets';
|
|
5
5
|
import type { Theme, ThemePair } from './types';
|
|
6
6
|
import type { IconRenderer } from '../icons/types';
|
|
7
7
|
export type ThemeMode = 'system' | 'light' | 'dark';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* monta un `<SafeAreaProvider>` nuevo y remide dentro de esa ventana.
|
|
9
|
+
* A native `<Modal>`/`<BottomSheet>` opens its own window (always on Android;
|
|
10
|
+
* on iOS depending on `presentationStyle`), so the insets measured at the app
|
|
11
|
+
* root may not hold in there. The boundary mounts a new `<SafeAreaProvider>`
|
|
12
|
+
* inside that window and re-measures; until the first measurement arrives it
|
|
13
|
+
* repeats the ambient insets.
|
|
15
14
|
*/
|
|
16
15
|
export interface ModalSafeAreaBoundaryProps {
|
|
17
16
|
children: (insets: EdgeInsets) => React.ReactNode;
|
|
@@ -28,26 +27,45 @@ export interface UIProviderProps {
|
|
|
28
27
|
onModeChange?: (mode: ThemeMode) => void;
|
|
29
28
|
/** Icon renderer. Defaults to the included zero-dep glyphs. */
|
|
30
29
|
icons?: IconRenderer;
|
|
31
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Overrides the measured safe area insets. Leave it out: the provider
|
|
32
|
+
* measures them itself with react-native-safe-area-context.
|
|
33
|
+
*/
|
|
32
34
|
insets?: EdgeInsets;
|
|
33
35
|
labels?: Partial<Labels>;
|
|
34
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Lets every orn-ui text follow the system font size (Dynamic Type / Android
|
|
38
|
+
* font scale). Opt-in: layouts are tuned for the default size, so turn it on
|
|
39
|
+
* only after checking your screens at large sizes.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
35
42
|
allowFontScaling?: boolean;
|
|
36
43
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
44
|
+
* Mounts a `<SafeAreaProvider>` around the app. Pass `false` only if the app
|
|
45
|
+
* already mounts one above (e.g. expo-router does): insets are then read
|
|
46
|
+
* from that one.
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
mountSafeAreaProvider?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Keeps the focused Input visible above the keyboard by moving the whole app
|
|
52
|
+
* up just enough (like Android's adjustPan, on both platforms), with no
|
|
53
|
+
* Screen or ScrollView needed. Only the root provider does it. Turn it off if
|
|
54
|
+
* your app already handles the keyboard its own way.
|
|
55
|
+
* @default true
|
|
40
56
|
*/
|
|
41
|
-
|
|
57
|
+
keyboardAvoidance?: boolean;
|
|
42
58
|
}
|
|
43
59
|
/**
|
|
44
60
|
* UIProvider
|
|
45
|
-
*
|
|
46
|
-
* override
|
|
47
|
-
*
|
|
48
|
-
*
|
|
61
|
+
* The library's single entry point: resolves the active theme (system or
|
|
62
|
+
* manual override), measures the safe area insets (react-native-safe-area-context,
|
|
63
|
+
* a required peer) and injects icons, insets and default texts into the whole
|
|
64
|
+
* tree. It doesn't persist the mode — if the consumer wants to remember the
|
|
65
|
+
* preference across sessions, it controls `mode`/`onModeChange` and persists
|
|
66
|
+
* wherever it prefers.
|
|
49
67
|
*/
|
|
50
|
-
export declare function UIProvider({
|
|
68
|
+
export declare function UIProvider({ mountSafeAreaProvider, ...props }: UIProviderProps): React.JSX.Element;
|
|
51
69
|
export declare function useTheme(): Theme;
|
|
52
70
|
export declare function useColors(): Theme['colors'];
|
|
53
71
|
export declare function useThemeMode(): {
|
|
@@ -58,9 +76,9 @@ export declare function useIcons(): IconRenderer;
|
|
|
58
76
|
export declare function useInsets(): EdgeInsets;
|
|
59
77
|
export declare function useLabels(): Labels;
|
|
60
78
|
export declare function useAllowFontScaling(): boolean;
|
|
61
|
-
/**
|
|
79
|
+
/** Internal: consumed by `Modal`/`BottomSheet` to re-measure insets inside their own native window. */
|
|
62
80
|
export declare function useModalSafeAreaBoundary(): ModalSafeAreaBoundaryComponent;
|
|
63
|
-
/** Re-
|
|
81
|
+
/** Re-exported so tests/consumers can simulate system changes without real RN. */
|
|
64
82
|
export declare const __testUtils: {
|
|
65
83
|
Appearance: typeof Appearance;
|
|
66
84
|
};
|