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,8 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ViewProps, type ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
|
|
3
3
|
export interface CardProps extends ViewProps {
|
|
4
|
+
/** Content of the card, inside its padding, background and border. */
|
|
4
5
|
children: React.ReactNode;
|
|
5
|
-
style?: ViewStyle
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Card
|
|
10
|
+
* Surface container: groups related content.
|
|
11
|
+
*
|
|
12
|
+
* Gestalt, common region: everything inside the same background and border
|
|
13
|
+
* reads as a group, even when other elements are nearby. Figure and ground:
|
|
14
|
+
* in light the shadow sets it apart; in dark (where the shadow isn't visible)
|
|
15
|
+
* a thin border does. The inner padding (`spacing.lg`) must be larger than the
|
|
16
|
+
* spacing between the elements inside, so the content reads as one block.
|
|
17
|
+
*/
|
|
7
18
|
export declare const Card: React.MemoExoticComponent<({ children, style, ...props }: CardProps) => React.JSX.Element>;
|
|
8
19
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/atoms/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/atoms/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpF,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,sEAAsE;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAmBD;;;;;;;;;GASG;AAEH,eAAO,MAAM,IAAI,4DAAwC,SAAS,uBAOhE,CAAC"}
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CheckboxProps {
|
|
3
|
+
/** Whether the box is checked (controlled). */
|
|
3
4
|
value: boolean;
|
|
5
|
+
/** Called with the new value when the row is pressed. */
|
|
4
6
|
onValueChange: (value: boolean) => void;
|
|
7
|
+
/** Text next to the box; the whole row is touchable. Also the accessible name. */
|
|
5
8
|
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Fill and border color when checked. The check turns black or white for contrast. @default
|
|
11
|
+
* colors.primary
|
|
12
|
+
*/
|
|
6
13
|
color?: string;
|
|
14
|
+
/** Dims the box and the label and ignores presses. */
|
|
7
15
|
disabled?: boolean;
|
|
16
|
+
/** Effectively required without `label`: it is all a screen reader announces. */
|
|
17
|
+
accessibilityLabel?: string;
|
|
8
18
|
testID?: string;
|
|
9
19
|
}
|
|
10
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Checkbox
|
|
22
|
+
* Box + optional label; the whole row is touchable.
|
|
23
|
+
*
|
|
24
|
+
* Gestalt:
|
|
25
|
+
* - Proximity: the box and its label sit `spacing.md` apart, less than the
|
|
26
|
+
* spacing between rows, so each label reads with its box.
|
|
27
|
+
* - Common region: the whole row is the touch area, not just the box, and it
|
|
28
|
+
* is at least 44pt tall (Fitts).
|
|
29
|
+
* - Figure and ground: when checked, the box fills with the accent and the
|
|
30
|
+
* check turns black or white depending on that fill (also with a custom `color`).
|
|
31
|
+
*
|
|
32
|
+
* `disabled` dims the box and the label (not just the box). The check
|
|
33
|
+
* animation is skipped with Reduce Motion.
|
|
34
|
+
*/
|
|
35
|
+
export declare const Checkbox: React.MemoExoticComponent<({ value, onValueChange, label, color, disabled, accessibilityLabel, testID }: CheckboxProps) => React.JSX.Element>;
|
|
11
36
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/atoms/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/atoms/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAQvD,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,KAAK,EAAE,OAAO,CAAC;IACf,yDAAyD;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,2GAAuF,aAAa,uBAsDvH,CAAC"}
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { Tokens } from '../theme/tokens';
|
|
3
4
|
export interface DividerProps {
|
|
5
|
+
/** `vertical` separates items in a row and stretches to the row's height. @default 'horizontal' */
|
|
6
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7
|
+
/** Space on each side of the line, from the spacing scale. Unset, the line adds no margin. */
|
|
8
|
+
spacing?: keyof Tokens['spacing'];
|
|
4
9
|
style?: StyleProp<ViewStyle>;
|
|
5
10
|
testID?: string;
|
|
6
11
|
}
|
|
7
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Divider
|
|
14
|
+
* 1pt line in `colors.border`.
|
|
15
|
+
*
|
|
16
|
+
* Gestalt: separates groups when proximity alone isn't enough (dense lists,
|
|
17
|
+
* rows spanning the whole screen). If spacing already separates the groups,
|
|
18
|
+
* prefer spacing: one line too many fragments what should read together.
|
|
19
|
+
* `spacing` takes its room from the token scale so the separation is the
|
|
20
|
+
* same across the whole app, instead of a different margin on each screen.
|
|
21
|
+
*
|
|
22
|
+
* It is decorative: it doesn't enter the accessibility tree.
|
|
23
|
+
*/
|
|
24
|
+
export declare const Divider: React.MemoExoticComponent<({ orientation, spacing, style, testID }: DividerProps) => React.JSX.Element>;
|
|
8
25
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/atoms/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/atoms/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,mGAAmG;IACnG,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,sEAAiE,YAAY,uBAgB/F,CAAC"}
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../icons/types';
|
|
4
|
+
import { type ButtonVariant } from './Button';
|
|
5
|
+
export interface EmptyStateAction {
|
|
6
|
+
label: string;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
/** @default 'primary' */
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
}
|
|
4
11
|
export interface EmptyStateProps {
|
|
12
|
+
/** Main line. @default labels.noResultsTitle */
|
|
5
13
|
title?: string;
|
|
14
|
+
/** Supporting line under the title. @default labels.noResultsDescription */
|
|
6
15
|
description?: string;
|
|
16
|
+
/** Built-in or custom icon name. Ignored when `icon` is passed. @default 'search' */
|
|
7
17
|
iconName?: IconName;
|
|
18
|
+
/** Any node in place of the icon (an Image, an illustration). */
|
|
8
19
|
icon?: React.ReactNode;
|
|
9
|
-
|
|
20
|
+
/** The next step, shown as a button under the text (e.g. "Add client"). */
|
|
21
|
+
action?: EmptyStateAction;
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
testID?: string;
|
|
10
24
|
}
|
|
11
|
-
|
|
25
|
+
/**
|
|
26
|
+
* EmptyState
|
|
27
|
+
* Centered icon + title + description for a list or screen with no data.
|
|
28
|
+
*
|
|
29
|
+
* Gestalt, proximity: title and description sit close together (`spacing.xs`)
|
|
30
|
+
* and the icon one step further (`spacing.md`), so they read as a message
|
|
31
|
+
* with its image and not as three loose pieces. Similarity: the title in
|
|
32
|
+
* `text` and the description in `textLight` mark the hierarchy. The action,
|
|
33
|
+
* if any, is set further apart (`spacing.lg`): it is the next step, not part
|
|
34
|
+
* of the message.
|
|
35
|
+
* The message is a single accessibility node (title and description together;
|
|
36
|
+
* the icon is decorative) and the button a separate, focusable one.
|
|
37
|
+
*/
|
|
38
|
+
export declare const EmptyState: React.MemoExoticComponent<({ title, description, iconName, icon, action, style, testID }: EmptyStateProps) => React.JSX.Element>;
|
|
12
39
|
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/atoms/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/atoms/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yBAAyB;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkCD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,4FACsD,eAAe,uBA6B3F,CAAC"}
|
|
@@ -2,21 +2,41 @@ import React from 'react';
|
|
|
2
2
|
import { type GestureResponderEvent, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../icons/types';
|
|
4
4
|
export interface FabProps {
|
|
5
|
+
/** Called when the button is pressed. */
|
|
5
6
|
onPress: (e: GestureResponderEvent) => void;
|
|
7
|
+
/** Built-in or custom icon name. Ignored when `icon` is passed. @default 'plus' */
|
|
6
8
|
iconName?: IconName;
|
|
9
|
+
/** Any node in place of the icon. */
|
|
7
10
|
icon?: React.ReactNode;
|
|
11
|
+
/** Diameter in pt. @default 60 */
|
|
8
12
|
size?: number;
|
|
13
|
+
/** Distance from the bottom edge, on top of the safe area. @default tokens.spacing.xl (20) */
|
|
9
14
|
bottom?: number;
|
|
15
|
+
/** Distance from the right edge, on top of the safe area. @default tokens.spacing.xl (20) */
|
|
10
16
|
right?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Adds the safe-area insets to `bottom`/`right`, so the button clears the
|
|
19
|
+
* home indicator. Pass false above a NavigationBar or tab bar, which
|
|
20
|
+
* already covers that edge. @default true
|
|
21
|
+
*/
|
|
22
|
+
safeArea?: boolean;
|
|
23
|
+
/** Fill color. The icon switches to black or white for contrast. @default theme.colors.primary */
|
|
11
24
|
color?: string;
|
|
12
25
|
style?: StyleProp<ViewStyle>;
|
|
26
|
+
/** Required: the button has no visible text. */
|
|
13
27
|
accessibilityLabel: string;
|
|
28
|
+
testID?: string;
|
|
14
29
|
}
|
|
15
30
|
/**
|
|
16
31
|
* Fab
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* offset (
|
|
32
|
+
* Circular floating button for the screen's main action.
|
|
33
|
+
* `bottom`/`right` instead of the required `tabBarHeight` of the original
|
|
34
|
+
* version — the consumer decides its own offset (with or without a tab bar).
|
|
35
|
+
*
|
|
36
|
+
* Gestalt, figure/ground: it is the only thing that floats (`lg` shadow) and
|
|
37
|
+
* carries the accent, so it stands apart from the content passing beneath it
|
|
38
|
+
* (Von Restorff: one per screen). Fitts: large and in the thumb's corner,
|
|
39
|
+
* above the safe area so it doesn't compete with the home gesture.
|
|
20
40
|
*/
|
|
21
|
-
export declare const Fab: React.MemoExoticComponent<({ onPress, iconName, icon, size, bottom, right, color, style, accessibilityLabel }: FabProps) => React.JSX.Element>;
|
|
41
|
+
export declare const Fab: React.MemoExoticComponent<({ onPress, iconName, icon, size, bottom, right, safeArea, color, style, accessibilityLabel, testID, }: FabProps) => React.JSX.Element>;
|
|
22
42
|
//# sourceMappingURL=Fab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/atoms/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/atoms/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C,MAAM,WAAW,QAAQ;IACvB,yCAAyC;IACzC,OAAO,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5C,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,gDAAgD;IAChD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,oIAaX,QAAQ,uBAkCZ,CAAC"}
|
|
@@ -2,36 +2,42 @@ import React from 'react';
|
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
export type GradientDirection = 'vertical' | 'horizontal' | 'diagonal' | 'diagonal-reverse';
|
|
4
4
|
export interface GradientProps {
|
|
5
|
-
/**
|
|
5
|
+
/** Gradient stops. A single color paints flat; none paints nothing. */
|
|
6
6
|
colors: string[];
|
|
7
7
|
/**
|
|
8
|
-
* 'vertical'
|
|
9
|
-
*
|
|
10
|
-
* arriba-derecha a abajo-izquierda.
|
|
8
|
+
* 'vertical' runs top to bottom, 'horizontal' left to right, 'diagonal'
|
|
9
|
+
* top-left to bottom-right and 'diagonal-reverse' top-right to bottom-left.
|
|
11
10
|
* @default 'vertical'
|
|
12
11
|
*/
|
|
13
12
|
direction?: GradientDirection;
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
16
|
-
* =
|
|
17
|
-
* @default
|
|
14
|
+
* Bands per segment (a segment = a pair of consecutive colors). More bands
|
|
15
|
+
* = a smoother transition and more views in the tree.
|
|
16
|
+
* @default 48
|
|
18
17
|
*/
|
|
19
18
|
steps?: number;
|
|
20
|
-
/**
|
|
19
|
+
/** Content rendered on top of the gradient. */
|
|
21
20
|
children?: React.ReactNode;
|
|
22
21
|
style?: StyleProp<ViewStyle>;
|
|
23
22
|
testID?: string;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* Gradient
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* Dependency-free linear gradient: React Native doesn't ship one in the
|
|
27
|
+
* supported range (Expo SDK 54–57) and `experimental_backgroundImage` isn't
|
|
28
|
+
* available across that whole window, so it is composed from bands.
|
|
30
29
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
30
|
+
* Each segment paints the start color and, on top, layers of the end color
|
|
31
|
+
* that accumulate (see `layerOpacities`). The compositor blends alpha linearly:
|
|
32
|
+
* the result is the sRGB interpolation between stops without parsing the
|
|
33
|
+
* color, which is why any format RN accepts works (hex, `rgba()`, name). The
|
|
34
|
+
* layers run to the end of the plane so no thin lines are left between
|
|
35
|
+
* bands, and the diagonals rotate a square the size of the measured diagonal
|
|
36
|
+
* to cover any rectangle, not just squares.
|
|
37
|
+
*
|
|
38
|
+
* Gestalt, figure and ground: content on top must contrast with ALL the
|
|
39
|
+
* stops, not just the first — white text that reads well over the blue at
|
|
40
|
+
* the start can get lost over the light blue at the end.
|
|
35
41
|
*/
|
|
36
42
|
export declare const Gradient: React.MemoExoticComponent<({ colors, direction, steps, children, style, testID }: GradientProps) => React.JSX.Element>;
|
|
37
43
|
//# sourceMappingURL=Gradient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../src/atoms/Gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../src/atoms/Gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExG,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAE5F,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsCD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,oFACkE,aAAa,uBAmEnG,CAAC"}
|
|
@@ -2,22 +2,36 @@ import React from 'react';
|
|
|
2
2
|
import { type GestureResponderEvent, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../icons/types';
|
|
4
4
|
export interface IconButtonProps {
|
|
5
|
+
/** Icon from the library's set. Ignored when `icon` is passed. */
|
|
5
6
|
iconName?: IconName;
|
|
7
|
+
/** Custom node in place of the icon. Takes precedence over `iconName`. */
|
|
6
8
|
icon?: React.ReactNode;
|
|
9
|
+
/** Called on press. Not called while `disabled`. */
|
|
7
10
|
onPress?: (e: GestureResponderEvent) => void;
|
|
11
|
+
/** Icon size in pt. The touch area is padded up to 44pt with `hitSlop`. @default 24 */
|
|
8
12
|
size?: number;
|
|
13
|
+
/** Icon color. Defaults to `colors.text`. */
|
|
9
14
|
color?: string;
|
|
15
|
+
/** Dims the button by half and ignores presses. */
|
|
10
16
|
disabled?: boolean;
|
|
11
17
|
style?: StyleProp<ViewStyle>;
|
|
18
|
+
/** Required: the button has no visible text, so this is all a screen reader announces. */
|
|
12
19
|
accessibilityLabel: string;
|
|
13
20
|
testID?: string;
|
|
14
21
|
}
|
|
15
22
|
/**
|
|
16
23
|
* IconButton
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
24
|
+
* Icon-only button. `accessibilityLabel` is required: with no visible text,
|
|
25
|
+
* it is the only way for a screen reader to announce what it does.
|
|
26
|
+
*
|
|
27
|
+
* Fitts: the visible area is icon + `spacing.sm` per side (24 + 16 = 40pt
|
|
28
|
+
* with the default size, 32pt with `size={16}`). `hitSlop` makes up the
|
|
29
|
+
* rest up to 44pt without enlarging the layout, so a row of icons keeps its
|
|
30
|
+
* rhythm and each one is still easy to tap.
|
|
31
|
+
*
|
|
32
|
+
* Gestalt, figure and ground: it has no background of its own, the icon is
|
|
33
|
+
* the figure over whatever is behind it; that is why the default color is
|
|
34
|
+
* `colors.text` (guaranteed AA contrast) and `disabled` dims it by half.
|
|
21
35
|
*/
|
|
22
36
|
export declare const IconButton: React.MemoExoticComponent<({ iconName, icon, onPress, size, color, disabled, style, accessibilityLabel, testID }: IconButtonProps) => React.JSX.Element>;
|
|
23
37
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/atoms/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/atoms/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oDAAoD;IACpD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,0FAA0F;IAC1F,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAaD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,oHACwE,eAAe,uBAqB7G,CAAC"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type ImageProps as RNImageProps, type ImageResizeMode, type ImageSourcePropType, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* The event RN's Image passes to `onError`. Taken from its own prop type:
|
|
5
|
+
* react-native 0.88 (Expo SDK 58) renamed the exported name
|
|
6
|
+
* (`ImageErrorEventData` -> `ImageErrorEvent`).
|
|
7
|
+
*/
|
|
8
|
+
type ImageErrorEvent = Parameters<NonNullable<RNImageProps['onError']>>[0];
|
|
3
9
|
export interface ImageProps {
|
|
10
|
+
/** Image to load (same as React Native's `source`). */
|
|
4
11
|
source: ImageSourcePropType;
|
|
12
|
+
/** Width of the image slot, in pt. */
|
|
5
13
|
width?: number;
|
|
14
|
+
/** Height of the image slot, in pt. */
|
|
6
15
|
height?: number;
|
|
7
|
-
/** @default 'cover' */
|
|
16
|
+
/** How the image fits its slot (same as React Native). @default 'cover' */
|
|
8
17
|
resizeMode?: ImageResizeMode;
|
|
9
18
|
/** Corner radius, same pattern as Avatar/Card. @default 0 */
|
|
10
19
|
radius?: number;
|
|
11
20
|
/** What to show while loading. `false` to show nothing. @default true (small spinner) */
|
|
12
21
|
loading?: React.ReactNode | boolean;
|
|
13
|
-
/** What to show if loading fails. @default
|
|
22
|
+
/** What to show if loading fails. @default placeholder with a warning icon */
|
|
14
23
|
fallback?: React.ReactNode;
|
|
15
24
|
/**
|
|
16
25
|
* 'high' triggers Image.prefetch() on mount, before <Image> starts
|
|
@@ -20,26 +29,39 @@ export interface ImageProps {
|
|
|
20
29
|
*/
|
|
21
30
|
priority?: 'low' | 'normal' | 'high';
|
|
22
31
|
style?: StyleProp<ViewStyle>;
|
|
32
|
+
/** Called when loading finishes, successfully or not (same as RN). */
|
|
23
33
|
onLoadEnd?: () => void;
|
|
24
|
-
|
|
34
|
+
/** Describes the image for screen readers. Without it the image is decorative. */
|
|
35
|
+
accessibilityLabel?: string;
|
|
36
|
+
/** Called when loading fails; the `fallback` is shown. */
|
|
37
|
+
onError?: (error: ImageErrorEvent) => void;
|
|
25
38
|
testID?: string;
|
|
26
39
|
}
|
|
27
40
|
/**
|
|
28
41
|
* Image
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* `priority="high"`
|
|
32
|
-
* cache
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
42
|
+
* Zero-dependency wrapper over RN's <Image>: adds loading and error state
|
|
43
|
+
* (with the same placeholders as the rest of the library), and exposes
|
|
44
|
+
* `priority="high"` to start the download early via Image.prefetch(). The
|
|
45
|
+
* actual cache (disk/memory) is handled by RN's native image engine — this
|
|
46
|
+
* doesn't reimplement it, it just keeps it from being accidentally turned off:
|
|
47
|
+
* on iOS it forces `cache="force-cache"` (uses the disk even when the HTTP
|
|
48
|
+
* header doesn't ask for it); on Android the native image's disk cache is
|
|
49
|
+
* always on, there is no equivalent knob to touch.
|
|
50
|
+
*
|
|
51
|
+
* Gestalt, closure: the container takes its final size from the first frame
|
|
52
|
+
* (`skeleton` background), so the layout doesn't jump when the image arrives
|
|
53
|
+
* and the eye completes the shape it will fill. If loading fails, the same
|
|
54
|
+
* slot shows a warning icon: the state is visible, not a silent gray.
|
|
55
|
+
*
|
|
56
|
+
* Success is detected with `onLoad`, not `onLoadEnd`: RN also calls
|
|
57
|
+
* `onLoadEnd` on failure, and using it for "loaded" overwrote the error.
|
|
37
58
|
*/
|
|
38
|
-
export declare const Image: React.MemoExoticComponent<({ source, width, height, resizeMode, radius, loading, fallback, priority, style, onLoadEnd, onError, testID, }: ImageProps) => React.JSX.Element>;
|
|
59
|
+
export declare const Image: React.MemoExoticComponent<({ source, width, height, resizeMode, radius, loading, fallback, priority, style, onLoadEnd, onError, testID, accessibilityLabel, }: ImageProps) => React.JSX.Element>;
|
|
39
60
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* Image.prefetch
|
|
61
|
+
* Preloads a URL before mounting the component (e.g. on receiving a list
|
|
62
|
+
* response, before navigating to the detail). Re-exports RN's
|
|
63
|
+
* Image.prefetch — there is nothing zero-dep to add on top.
|
|
43
64
|
*/
|
|
44
|
-
export declare const prefetchImage:
|
|
65
|
+
export declare const prefetchImage: (url: string) => Promise<boolean>;
|
|
66
|
+
export {};
|
|
45
67
|
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/atoms/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/atoms/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAKL,KAAK,UAAU,IAAI,YAAY,EAC/B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB;;;;GAIG;AACH,KAAK,eAAe,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAeD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,iKAeb,UAAU,uBAuEd,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,aAAa,mCAAmB,CAAC"}
|
|
@@ -1,24 +1,74 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type StyleProp, type TextInputProps, type ViewStyle } from 'react-native';
|
|
1
|
+
import React, { type ComponentRef } from 'react';
|
|
2
|
+
import { TextInput, type StyleProp, type TextInputProps, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../icons/types';
|
|
4
|
+
import { type InputRules } from './inputValidation';
|
|
5
|
+
export type { InputRules, InputRuleValue } from './inputValidation';
|
|
6
|
+
/** The TextInput instance, plus `validate()` to check the field on demand (e.g. on submit). */
|
|
7
|
+
export type InputHandle = ComponentRef<typeof TextInput> & {
|
|
8
|
+
/** Runs the rules, shows the error (if any) and returns it. */
|
|
9
|
+
validate: () => string | undefined;
|
|
10
|
+
};
|
|
4
11
|
export interface InputProps extends Omit<TextInputProps, 'style'> {
|
|
12
|
+
/** Text above the field; also its accessible name (falls back to `placeholder`). */
|
|
5
13
|
label?: string;
|
|
6
|
-
/** Shows an asterisk next to the label
|
|
14
|
+
/** Shows an asterisk next to the label, and an empty value fails validation (`labels.requiredError`). */
|
|
7
15
|
required?: boolean;
|
|
16
|
+
/** Error shown under the field. Takes precedence over the built-in validation. */
|
|
8
17
|
error?: string;
|
|
18
|
+
/** Built-in validation: length limits, a pattern and/or a custom check. */
|
|
19
|
+
rules?: InputRules;
|
|
20
|
+
/**
|
|
21
|
+
* When the rules run: on leaving the field, on every change, or only through
|
|
22
|
+
* `ref.validate()`. Once an error shows, it re-checks on every change so it
|
|
23
|
+
* clears as soon as the value is fixed. @default 'blur'
|
|
24
|
+
*/
|
|
25
|
+
validateOn?: 'blur' | 'change' | 'submit';
|
|
26
|
+
/** Called with the error (or undefined) every time the rules run. */
|
|
27
|
+
onValidate?: (error: string | undefined) => void;
|
|
28
|
+
/** Style of the outer wrapper (label, field and error). */
|
|
9
29
|
containerStyle?: StyleProp<ViewStyle>;
|
|
10
30
|
style?: TextInputProps['style'];
|
|
31
|
+
/** Icon shown inside the field, to the left of the text. */
|
|
11
32
|
leftIconName?: IconName;
|
|
33
|
+
/** Icon button inside the field, on the right. Ignored with `isPassword` or `isLoading`. */
|
|
12
34
|
rightIconName?: IconName;
|
|
35
|
+
/** Called when the `rightIconName` button is pressed. Without it the button is disabled. */
|
|
13
36
|
onRightIconPress?: () => void;
|
|
37
|
+
/** Accessible name of the `rightIconName` button. @default labels.clear */
|
|
38
|
+
rightIconAccessibilityLabel?: string;
|
|
39
|
+
/** Hides the text and adds an eye button to show or hide it. @default false */
|
|
14
40
|
isPassword?: boolean;
|
|
41
|
+
/** Shows a small spinner on the right, in place of the right icon. @default false */
|
|
15
42
|
isLoading?: boolean;
|
|
16
43
|
}
|
|
17
44
|
/**
|
|
18
45
|
* Input
|
|
19
|
-
*
|
|
20
|
-
* useNativeDriver:
|
|
21
|
-
*
|
|
46
|
+
* The border animates its color between border/primary/error with Animated
|
|
47
|
+
* (no useNativeDriver: color drivers in RN without Fabric are only reliable
|
|
48
|
+
* on the JS thread; the cost is negligible, it animates one border).
|
|
49
|
+
*
|
|
50
|
+
* Gestalt:
|
|
51
|
+
* - Proximity: label (`spacing.sm` above) and error (`spacing.xs` below) sit
|
|
52
|
+
* right next to the field and the next field is `spacing.lg` away: each
|
|
53
|
+
* label and its error read with their field, not with the neighbor.
|
|
54
|
+
* - Common region: left icon, text and right action share the same border
|
|
55
|
+
* and background, so they read as a single control.
|
|
56
|
+
* - Focal point: the border turns `primary` on focus and `error` on error;
|
|
57
|
+
* the error is also written out (not just color).
|
|
58
|
+
*
|
|
59
|
+
* Accessibility: the accessible name includes "required" when applicable, the
|
|
60
|
+
* error is announced as a hint, and the eye and right-action buttons have a
|
|
61
|
+
* 44pt touch area and texts from `labels` (translatable).
|
|
62
|
+
*
|
|
63
|
+
* Keyboard: on focus it registers with the root UIProvider's host, which
|
|
64
|
+
* lifts the app just enough for the whole field (label, field and error) to
|
|
65
|
+
* sit above the keyboard — without depending on Screen or a ScrollView. What
|
|
66
|
+
* you type is always visible.
|
|
67
|
+
*
|
|
68
|
+
* Validation: `required` and `rules` run when leaving the field (`validateOn`),
|
|
69
|
+
* the error appears in writing, is announced to the screen reader and, once
|
|
70
|
+
* visible, is revalidated on every change so it disappears as soon as it is
|
|
71
|
+
* fixed. An `error` passed by hand overrides the internal validation.
|
|
22
72
|
*/
|
|
23
|
-
export declare const Input: React.
|
|
73
|
+
export declare const Input: React.NamedExoticComponent<InputProps & React.RefAttributes<InputHandle>>;
|
|
24
74
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/atoms/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/atoms/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACrH,OAAO,EAKL,SAAS,EAGT,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpE,+FAA+F;AAC/F,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG;IACzD,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IAC/D,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yGAAyG;IACzG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,qEAAqE;IACrE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,2DAA2D;IAC3D,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,4DAA4D;IAC5D,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,4FAA4F;IAC5F,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,4FAA4F;IAC5F,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,2EAA2E;IAC3E,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,KAAK,2EAsJjB,CAAC"}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
3
|
export interface KeyValueRowProps {
|
|
4
|
+
/** Left side. A string or number gets the default label style; any other node renders as is. */
|
|
4
5
|
label: React.ReactNode;
|
|
6
|
+
/** Right side. A string or number gets the default value style (tabular digits); any other node renders as is. */
|
|
5
7
|
value: React.ReactNode;
|
|
6
8
|
style?: StyleProp<ViewStyle>;
|
|
9
|
+
/** Only applies when `label` is a string or number. */
|
|
7
10
|
labelStyle?: StyleProp<TextStyle>;
|
|
11
|
+
/** Only applies when `value` is a string or number. */
|
|
8
12
|
valueStyle?: StyleProp<TextStyle>;
|
|
13
|
+
testID?: string;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* KeyValueRow
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
17
|
+
* Label (left) / value (right) row. If label/value are a string or number,
|
|
18
|
+
* they render with the default style; if they already come wrapped in a
|
|
19
|
+
* custom component, they are kept as is.
|
|
20
|
+
*
|
|
21
|
+
* Gestalt, alignment and similarity: labels share color and weight and values
|
|
22
|
+
* align to the right edge with tabular digits, so a stack of rows reads as
|
|
23
|
+
* two columns — what on the left, how much on the right.
|
|
24
|
+
* With a text label and value, the row is a single accessibility node
|
|
25
|
+
* ("Subtotal, $300.00"); if either is a custom node (a Badge, a button) it
|
|
26
|
+
* isn't merged, so as not to hide what that node announces or lets you tap.
|
|
15
27
|
*/
|
|
16
|
-
export declare const KeyValueRow: React.MemoExoticComponent<({ label, value, style, labelStyle, valueStyle }: KeyValueRowProps) => React.JSX.Element>;
|
|
28
|
+
export declare const KeyValueRow: React.MemoExoticComponent<({ label, value, style, labelStyle, valueStyle, testID }: KeyValueRowProps) => React.JSX.Element>;
|
|
17
29
|
//# sourceMappingURL=KeyValueRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.d.ts","sourceRoot":"","sources":["../../../src/atoms/KeyValueRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1F,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"KeyValueRow.d.ts","sourceRoot":"","sources":["../../../src/atoms/KeyValueRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1F,MAAM,WAAW,gBAAgB;IAC/B,gGAAgG;IAChG,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kHAAkH;IAClH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,uDAAuD;IACvD,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,uDAAuD;IACvD,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAqCD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,sFACoC,gBAAgB,uBAuB3E,CAAC"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type PressableProps, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
export interface PressableScaleProps extends Omit<PressableProps, 'style'> {
|
|
3
|
+
export interface PressableScaleProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
4
4
|
/** Target scale when pressed. @default 0.96 */
|
|
5
5
|
scaleTo?: number;
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
|
+
/** Pressable content. */
|
|
7
8
|
children: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* PressableScale
|
|
11
|
-
*
|
|
12
|
-
* (useNativeDriver: true —
|
|
13
|
-
*
|
|
12
|
+
* Tactile "shrink" feedback on press, with RN's Animated.spring
|
|
13
|
+
* (useNativeDriver: true — runs on the native thread, no JS cost per frame).
|
|
14
|
+
* Doesn't depend on reanimated: the whole library is zero-dependency.
|
|
15
|
+
*
|
|
16
|
+
* Gestalt, figure/ground: as it sinks, the pressed element separates for an
|
|
17
|
+
* instant from the rest and confirms what was touched (Doherty: immediate
|
|
18
|
+
* response). Announces itself as a button by default (`accessibilityRole` can
|
|
19
|
+
* be changed) and, when disabled, exposes `disabled` to the screen reader.
|
|
20
|
+
* With Reduce Motion it doesn't scale.
|
|
14
21
|
*/
|
|
15
|
-
export declare const PressableScale: React.MemoExoticComponent<({ scaleTo, style, children, onPressIn, onPressOut, disabled, ...props }: PressableScaleProps) => React.JSX.Element>;
|
|
22
|
+
export declare const PressableScale: React.MemoExoticComponent<({ scaleTo, style, children, onPressIn, onPressOut, disabled, accessibilityRole, accessibilityState, ...props }: PressableScaleProps) => React.JSX.Element>;
|
|
16
23
|
//# sourceMappingURL=PressableScale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PressableScale.d.ts","sourceRoot":"","sources":["../../../src/atoms/PressableScale.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PressableScale.d.ts","sourceRoot":"","sources":["../../../src/atoms/PressableScale.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC;IACrF,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAOD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,6IAWtB,mBAAmB,uBAqCvB,CAAC"}
|