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
|
@@ -5,28 +5,47 @@ export interface NavigationBarItem {
|
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
7
|
iconName?: IconName;
|
|
8
|
-
/**
|
|
8
|
+
/** Counter over the icon, also read by screen readers. `true` shows only the dot. */
|
|
9
9
|
badge?: number | string | true;
|
|
10
10
|
}
|
|
11
11
|
export interface NavigationBarProps {
|
|
12
|
+
/** The destinations: key, label, and optionally an icon and a badge. */
|
|
12
13
|
items: NavigationBarItem[];
|
|
14
|
+
/** Key of the selected item (controlled). */
|
|
13
15
|
activeKey: string;
|
|
16
|
+
/** Called with the key of the pressed item. */
|
|
14
17
|
onChange: (key: string) => void;
|
|
15
18
|
/** Screen edge where the bar lives. @default 'bottom' */
|
|
16
19
|
position?: 'bottom' | 'top';
|
|
17
|
-
/** @default true */
|
|
20
|
+
/** Shows the label under each icon. @default true */
|
|
18
21
|
showLabels?: boolean;
|
|
19
22
|
/** Adds the safe area inset for the edge where the bar lives. @default true */
|
|
20
23
|
safeArea?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Hides a bottom bar while the keyboard is open, like native tab bars, so
|
|
26
|
+
* it doesn't sit between the field and the keyboard. Only Android needs it:
|
|
27
|
+
* on iOS the keyboard already covers the bar. @default true
|
|
28
|
+
*/
|
|
29
|
+
hideOnKeyboard?: boolean;
|
|
21
30
|
style?: StyleProp<ViewStyle>;
|
|
22
31
|
testID?: string;
|
|
23
32
|
}
|
|
24
33
|
/**
|
|
25
34
|
* NavigationBar
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
35
|
+
* Tab navigation bar with the same look and the same transitions on iOS and
|
|
36
|
+
* Android: the indicator slides to the active tab and its content grows and
|
|
37
|
+
* takes the accent color with a cross-fade.
|
|
38
|
+
* It doesn't navigate on its own — it reports the tapped tab and the consumer decides.
|
|
39
|
+
*
|
|
40
|
+
* Design:
|
|
41
|
+
* - Jakob's law: the tab bar people know from every app, at the bottom by
|
|
42
|
+
* default, icon over label.
|
|
43
|
+
* - Similarity + Von Restorff: every tab looks the same except the active
|
|
44
|
+
* one, which alone gets the accent and the indicator.
|
|
45
|
+
* - Continuity: the indicator slides from tab to tab instead of jumping
|
|
46
|
+
* (in place with Reduce Motion).
|
|
47
|
+
* - Fitts's law: the whole column is the target, not just the icon.
|
|
48
|
+
* - Hick's law: meant for 3–5 destinations.
|
|
30
49
|
*/
|
|
31
|
-
export declare const NavigationBar: React.MemoExoticComponent<({ items, activeKey, onChange, position, showLabels, safeArea, style, testID, }: NavigationBarProps) => React.JSX.Element>;
|
|
50
|
+
export declare const NavigationBar: React.MemoExoticComponent<({ items, activeKey, onChange, position, showLabels, safeArea, hideOnKeyboard, style, testID, }: NavigationBarProps) => React.JSX.Element | null>;
|
|
32
51
|
//# sourceMappingURL=NavigationBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../../../src/organisms/NavigationBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../../../src/organisms/NavigationBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AACjE,OAAO,EASL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwDD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,6HAWrB,kBAAkB,8BAiJtB,CAAC"}
|
|
@@ -8,8 +8,11 @@ export interface OptionWheelOption<T> {
|
|
|
8
8
|
}
|
|
9
9
|
export type OptionWheelVariant = 'window' | 'spotlight';
|
|
10
10
|
export interface OptionWheelProps<T> {
|
|
11
|
+
/** The range, in order. Each option has a label, its value, and may be disabled. */
|
|
11
12
|
options: OptionWheelOption<T>[];
|
|
13
|
+
/** Value of the option in the centre row (controlled). */
|
|
12
14
|
selectedValue: T | undefined;
|
|
15
|
+
/** Called with the value of the option the wheel settles on. */
|
|
13
16
|
onSelect: (value: T) => void;
|
|
14
17
|
/** Title above the wheel. */
|
|
15
18
|
label?: string;
|
|
@@ -48,31 +51,32 @@ export interface OptionWheelProps<T> {
|
|
|
48
51
|
curveRadius?: number;
|
|
49
52
|
/** Which side the wheel's centre is on. @default 'left' */
|
|
50
53
|
curveFrom?: 'left' | 'right';
|
|
54
|
+
/** Dims the wheel and stops it from turning. @default false */
|
|
51
55
|
disabled?: boolean;
|
|
52
56
|
style?: StyleProp<ViewStyle>;
|
|
53
57
|
testID?: string;
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* OptionWheel
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
61
|
+
* Wheel picker: the options pass through a fixed window and the one left in
|
|
62
|
+
* the center is the selected one. The scroll snaps to the row height, so
|
|
63
|
+
* lifting the finger anywhere always leaves one option centered, never half.
|
|
60
64
|
*
|
|
61
|
-
* Gestalt,
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
65
|
+
* Gestalt, figure and ground: what marks the selection isn't a style on the
|
|
66
|
+
* row —which would travel with it— but a still window on top of the list. The
|
|
67
|
+
* figure stays, the ground moves, and that is why the wheel reads without
|
|
68
|
+
* reading: the place signals, not the color. And common fate: all rows shrink
|
|
69
|
+
* and tilt by the same law relative to the center, so they are perceived as a
|
|
70
|
+
* rigid surface that turns and not as N rows animating on their own.
|
|
67
71
|
*
|
|
68
|
-
*
|
|
69
|
-
* `contentOffset
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
72
|
+
* Scale, opacity and tilt come from interpolating the scroll's
|
|
73
|
+
* `contentOffset`, not from React state: they are computed on the native
|
|
74
|
+
* thread (`useNativeDriver`) and the JS thread only takes part once the wheel
|
|
75
|
+
* has stopped, to report what was selected. With "reduce motion" on, the tilt
|
|
76
|
+
* is turned off and the size stays, since it is information, not decoration.
|
|
73
77
|
*
|
|
74
|
-
* `disabled`
|
|
75
|
-
*
|
|
78
|
+
* `disabled` on an option can't keep the snap from centering it, so the
|
|
79
|
+
* wheel centers it and moves on its own to the nearest enabled one.
|
|
76
80
|
*/
|
|
77
81
|
export declare function OptionWheel<T extends string | number>({ options, selectedValue, onSelect, label, accessibilityLabel, visibleCount, itemHeight, unit, perspective, variant, textColor, curveRadius, curveFrom, disabled, style, testID, }: OptionWheelProps<T>): React.JSX.Element;
|
|
78
82
|
//# sourceMappingURL=OptionWheel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionWheel.d.ts","sourceRoot":"","sources":["../../../src/organisms/OptionWheel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"OptionWheel.d.ts","sourceRoot":"","sources":["../../../src/organisms/OptionWheel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqE,MAAM,OAAO,CAAC;AAC1F,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExD,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,oFAAoF;IACpF,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChC,0DAA0D;IAC1D,aAAa,EAAE,CAAC,GAAG,SAAS,CAAC;IAC7B,gEAAgE;IAChE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA+GD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACrD,OAAO,EACP,aAAa,EACb,QAAQ,EACR,KAAK,EACL,kBAAkB,EAClB,YAAoC,EACpC,UAAgC,EAChC,IAAI,EACJ,WAAkB,EAClB,OAAkB,EAClB,SAAS,EACT,WAAW,EACX,SAAkB,EAClB,QAAgB,EAChB,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,CAAC,CAAC,CAAC,qBAgQrB"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
export interface ReorderableListProps<T> {
|
|
4
|
+
/** Items, in their current order. */
|
|
4
5
|
data: T[];
|
|
6
|
+
/** Stable key per item. */
|
|
5
7
|
keyExtractor: (item: T, index: number) => string;
|
|
6
8
|
/** Fixed height of each row: needed to calculate the target index without measuring layout async. */
|
|
7
9
|
itemHeight: number;
|
|
10
|
+
/** Renders each row; the third argument is true while that row is being dragged. */
|
|
8
11
|
renderItem: (item: T, index: number, dragging: boolean) => React.ReactElement;
|
|
9
12
|
/** Called on release, with the array already reordered. Does not mutate `data`. */
|
|
10
13
|
onReorder: (data: T[]) => void;
|
|
@@ -17,25 +20,31 @@ export interface ReorderableListProps<T> {
|
|
|
17
20
|
onDragStart?: (index: number) => void;
|
|
18
21
|
/** Ends the drag — on release or cancellation. Always runs if `onDragStart` ran. */
|
|
19
22
|
onDragEnd?: () => void;
|
|
23
|
+
/** Turns off dragging. @default false */
|
|
20
24
|
disabled?: boolean;
|
|
21
25
|
style?: StyleProp<ViewStyle>;
|
|
22
26
|
}
|
|
23
|
-
/**
|
|
27
|
+
/** Reorders by moving the item from `from` to `to`, without mutating `data`. Exported separately so it can be tested without simulating gestures. */
|
|
24
28
|
export declare function move<T>(data: T[], from: number, to: number): T[];
|
|
25
29
|
/**
|
|
26
30
|
* ReorderableList
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* Law of common fate: when dragging a row, the rows it has to cross shift
|
|
32
|
+
* together in the same direction — that is what communicates "they are
|
|
33
|
+
* going to swap places" before the finger lifts, not a simple highlight of
|
|
34
|
+
* the active item.
|
|
31
35
|
*
|
|
32
|
-
*
|
|
33
|
-
* PanResponder + Animated
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
+
* No external gesture/animation dependencies (reanimated, gesture-handler):
|
|
37
|
+
* PanResponder + Animated are enough because computing the target index
|
|
38
|
+
* needs the drag value in JS on every move (not something useNativeDriver
|
|
39
|
+
* can resolve on its own).
|
|
36
40
|
*
|
|
37
|
-
*
|
|
38
|
-
* `scrollEnabled`,
|
|
41
|
+
* Inside a vertical scroll you have to wire `onDragStart`/`onDragEnd` to
|
|
42
|
+
* `scrollEnabled`, or on iOS the drag never gets to start:
|
|
43
|
+
*
|
|
44
|
+
* Screen readers can't drag: each row is one accessible element with two
|
|
45
|
+
* actions, "Move up" and "Move down" (`labels.moveUp` / `labels.moveDown`),
|
|
46
|
+
* that call `onReorder` the same way a drop does. The row's content is read
|
|
47
|
+
* as its label, so keep interactive controls out of reorderable rows.
|
|
39
48
|
*
|
|
40
49
|
* ```tsx
|
|
41
50
|
* const [dragging, setDragging] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReorderableList.d.ts","sourceRoot":"","sources":["../../../src/organisms/ReorderableList.tsx"],"names":[],"mappings":"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,CAAC,CAAC,EAAE,EACjC,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,KAAK,GACN,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBA6HzB"}
|
|
@@ -2,26 +2,45 @@ import React from 'react';
|
|
|
2
2
|
import { type ViewStyle } from 'react-native';
|
|
3
3
|
export type ScreenEdge = 'top' | 'bottom';
|
|
4
4
|
export interface ScreenProps {
|
|
5
|
+
/** Content of the screen. */
|
|
5
6
|
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Fixed bar on top (back button, title, actions). It stays in place while
|
|
9
|
+
* the content scrolls or moves up for the keyboard. The top safe area goes
|
|
10
|
+
* above it.
|
|
11
|
+
*/
|
|
12
|
+
header?: React.ReactNode;
|
|
6
13
|
style?: ViewStyle;
|
|
14
|
+
/** Wraps the content in a ScrollView. @default true */
|
|
7
15
|
scrollable?: boolean;
|
|
16
|
+
/** Style of the ScrollView's content container. Only applies when `scrollable`. */
|
|
8
17
|
contentContainerStyle?: ViewStyle;
|
|
9
18
|
/** Which safe area insets to apply. @default ['top', 'bottom'] */
|
|
10
19
|
edges?: ScreenEdge[];
|
|
11
20
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* the
|
|
15
|
-
*
|
|
16
|
-
* ends up pushed off screen.
|
|
21
|
+
* Keeps the focused Input above the keyboard by moving only the content
|
|
22
|
+
* (the `header` and a tab bar outside the Screen stay put). On iOS with
|
|
23
|
+
* scroll, the ScrollView scrolls to it instead. Set to false when the
|
|
24
|
+
* content brings its own keyboard handling.
|
|
17
25
|
* @default true
|
|
18
26
|
*/
|
|
19
27
|
keyboardAvoiding?: boolean;
|
|
20
28
|
}
|
|
21
29
|
/**
|
|
22
30
|
* Screen
|
|
23
|
-
*
|
|
24
|
-
*
|
|
31
|
+
* Root screen container: theme background, safe area (via the UIProvider's
|
|
32
|
+
* insets), keyboard and optional scroll handled consistently.
|
|
33
|
+
*
|
|
34
|
+
* Keyboard: with the UIProvider handling it (default), Screen shifts only its
|
|
35
|
+
* content — clipped below the `header` — to keep the focused Input above the
|
|
36
|
+
* keyboard. The header stays fixed and a tab bar outside the Screen stays
|
|
37
|
+
* behind the keyboard, as in a native app. On iOS with scroll, the ScrollView
|
|
38
|
+
* already brings the field into view (automaticallyAdjustKeyboardInsets) and
|
|
39
|
+
* nothing is added. Without a host (`keyboardAvoidance={false}` on the
|
|
40
|
+
* provider) the usual KeyboardAvoidingView remains.
|
|
41
|
+
*
|
|
42
|
+
* Gestalt, common region: the header shares the screen's background and stays
|
|
43
|
+
* fixed; only the content moves, so navigation isn't lost.
|
|
25
44
|
*/
|
|
26
|
-
export declare const Screen: React.MemoExoticComponent<({ children, style, scrollable, contentContainerStyle, edges, keyboardAvoiding, }: ScreenProps) => React.JSX.Element>;
|
|
45
|
+
export declare const Screen: React.MemoExoticComponent<({ children, header, style, scrollable, contentContainerStyle, edges, keyboardAvoiding, }: ScreenProps) => React.JSX.Element>;
|
|
27
46
|
//# sourceMappingURL=Screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/organisms/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/organisms/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKhG,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,6BAA6B;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mFAAmF;IACnF,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,kEAAkE;IAClE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,uHAQhB,WAAW,uBA6DZ,CAAC"}
|
|
@@ -4,15 +4,25 @@ import type { IconName } from '../icons/types';
|
|
|
4
4
|
export interface SearchListProps<T> {
|
|
5
5
|
/** Optional chrome above the search bar (e.g. back button + title). */
|
|
6
6
|
header?: React.ReactNode;
|
|
7
|
+
/** Text of the search box (controlled). */
|
|
7
8
|
searchValue: string;
|
|
9
|
+
/** Called with the new text; the clear button calls it with an empty string. */
|
|
8
10
|
onSearchChange: (text: string) => void;
|
|
11
|
+
/** Placeholder of the search box. @default labels.search */
|
|
9
12
|
searchPlaceholder?: string;
|
|
13
|
+
/** Shows a spinner inside the search box. @default false */
|
|
10
14
|
searchIsLoading?: boolean;
|
|
15
|
+
/** Shows a button next to the search box and is called when it is pressed. */
|
|
11
16
|
onScanPress?: () => void;
|
|
17
|
+
/** Accessible name of the `onScanPress` button. @default labels.scan */
|
|
12
18
|
scanAccessibilityLabel?: string;
|
|
19
|
+
/** Extra nodes at the end of the search row. */
|
|
13
20
|
extraActions?: React.ReactNode;
|
|
21
|
+
/** Items to render. */
|
|
14
22
|
data: T[];
|
|
23
|
+
/** Stable key per item. */
|
|
15
24
|
keyExtractor: (item: T, index: number) => string;
|
|
25
|
+
/** Renders each row (same as FlatList's `renderItem`). */
|
|
16
26
|
renderItem: FlatListProps<T>['renderItem'];
|
|
17
27
|
/** Initial load: while true and there's no data, placeholders are shown. */
|
|
18
28
|
isLoading?: boolean;
|
|
@@ -20,37 +30,70 @@ export interface SearchListProps<T> {
|
|
|
20
30
|
loadingMode?: 'replace' | 'overlay';
|
|
21
31
|
/** Reload with data already on screen (pull-to-refresh). @default false */
|
|
22
32
|
isRefreshing?: boolean;
|
|
33
|
+
/** Shows a spinner in the footer while the next page loads. @default false */
|
|
23
34
|
isLoadingMore?: boolean;
|
|
24
35
|
/** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
|
|
25
36
|
isReady?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Text of the spinner shown while `isReady` is false and of the `overlay` loading. @default
|
|
39
|
+
* labels.loading
|
|
40
|
+
*/
|
|
26
41
|
loadingText?: string;
|
|
42
|
+
/** Text of the footer spinner shown with `isLoadingMore`. @default labels.loadingMore */
|
|
27
43
|
loadingMoreText?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether more pages remain. While false, `noMoreText` shows at the end of a non-empty list.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
28
48
|
hasMore?: boolean;
|
|
49
|
+
/** Text shown at the end of the list when `hasMore` is false. */
|
|
29
50
|
noMoreText?: string;
|
|
30
51
|
/** Ghost rows for the initial load. @default 6 */
|
|
31
52
|
skeletonCount?: number;
|
|
32
53
|
/** Custom placeholder, to match the real shape of the item. */
|
|
33
54
|
renderSkeletonItem?: () => React.ReactElement;
|
|
55
|
+
/** Called when scrolling gets close to the end. Takes precedence over `onEndReached`. */
|
|
34
56
|
onLoadMore?: () => void;
|
|
57
|
+
/** Called when scrolling gets close to the end. Ignored when `onLoadMore` is passed. */
|
|
35
58
|
onEndReached?: () => void;
|
|
59
|
+
/** How close to the end `onEndReached` fires, in visible lengths of the list. @default 0.3 */
|
|
36
60
|
onEndReachedThreshold?: number;
|
|
61
|
+
/** Enables pull-to-refresh and is called when the user pulls. */
|
|
37
62
|
onRefresh?: () => void;
|
|
63
|
+
/** Title of the empty state. @default labels.noResultsTitle */
|
|
38
64
|
emptyTitle?: string;
|
|
65
|
+
/** Supporting line of the empty state. @default labels.noResultsDescription */
|
|
39
66
|
emptyDescription?: string;
|
|
67
|
+
/** Icon of the empty state. @default 'search' */
|
|
40
68
|
emptyIconName?: IconName;
|
|
69
|
+
/** Rendered above the items, inside the scroll. */
|
|
41
70
|
ListHeaderComponent?: FlatListProps<T>['ListHeaderComponent'];
|
|
71
|
+
/** Rendered below the items, before the pagination loader and `noMoreText`. */
|
|
42
72
|
ListFooterComponent?: FlatListProps<T>['ListFooterComponent'];
|
|
73
|
+
/** Style of the list's content container (also used by the skeleton). */
|
|
43
74
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
75
|
+
/** Style of the outer wrapper. */
|
|
44
76
|
containerStyle?: ViewStyle;
|
|
45
77
|
/** List component to use (FlashList, etc). @default FlatList */
|
|
46
78
|
ListComponent?: React.ComponentType<any>;
|
|
79
|
+
/** Extra props passed to `ListComponent`; they override the ones set here. */
|
|
47
80
|
listProps?: Record<string, unknown>;
|
|
48
81
|
}
|
|
49
82
|
/**
|
|
50
83
|
* SearchList
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
84
|
+
* Search box + list + loading/pagination/empty states. The content of each
|
|
85
|
+
* item (renderItem) is up to whoever uses it, since it differs completely
|
|
86
|
+
* between use cases.
|
|
87
|
+
*
|
|
88
|
+
* Design:
|
|
89
|
+
* - Proximity + common region: the search row (box, scan, extra actions)
|
|
90
|
+
* sits right on top of the results it filters.
|
|
91
|
+
* - Doherty threshold: every wait has immediate feedback (placeholders, a
|
|
92
|
+
* spinner in the box while searching, a footer loader while paging), and
|
|
93
|
+
* "no results" only appears once it is known there is nothing.
|
|
94
|
+
* - Jakob's law: the clear (×) inside the box, pull-to-refresh, the keyboard
|
|
95
|
+
* dismissed when the list is dragged.
|
|
96
|
+
* - Fitts's law: the scan button is as tall as the box, a 50pt target.
|
|
54
97
|
*/
|
|
55
98
|
export declare function SearchList<T>({ header, searchValue, onSearchChange, searchPlaceholder, searchIsLoading, onScanPress, scanAccessibilityLabel, extraActions, data, keyExtractor, renderItem, isLoading, loadingMode, isRefreshing, isLoadingMore, isReady, loadingText, loadingMoreText, hasMore, noMoreText, skeletonCount, renderSkeletonItem, onLoadMore, onEndReached, onEndReachedThreshold, onRefresh, emptyTitle, emptyDescription, emptyIconName, ListHeaderComponent, ListFooterComponent, contentContainerStyle, containerStyle, ListComponent, listProps, }: SearchListProps<T>): React.JSX.Element;
|
|
56
99
|
//# sourceMappingURL=SearchList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../src/organisms/SearchList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,uEAAuE;IACvE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAE3C,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB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B,MAAM,EACN,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,eAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,SAAiB,EACjB,WAAuB,EACvB,YAAoB,EACpB,aAAqB,EACrB,OAAc,EACd,WAAW,EACX,eAAe,EACf,OAAe,EACf,UAAU,EACV,aAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,qBAA2B,EAC3B,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,aAAwB,EACxB,SAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,qBAqJpB"}
|
|
@@ -4,37 +4,57 @@ import type { IconName } from '../icons/types';
|
|
|
4
4
|
export interface SelectOption<T> {
|
|
5
5
|
label: string;
|
|
6
6
|
value: T;
|
|
7
|
-
/**
|
|
7
|
+
/** Glyph from the library's icon set, left of the label. */
|
|
8
8
|
iconName?: IconName;
|
|
9
|
-
/** Emoji
|
|
9
|
+
/** Emoji left of the label. Takes precedence over `iconName`. */
|
|
10
10
|
emoji?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface SelectProps<T> {
|
|
14
|
+
/** Text above the field; also its accessible name. */
|
|
14
15
|
label?: string;
|
|
16
|
+
/** Shows an asterisk next to the label. @default false */
|
|
15
17
|
required?: boolean;
|
|
18
|
+
/** Options of the dropdown: label, value and, optionally, icon, emoji or disabled. */
|
|
16
19
|
options: SelectOption<T>[];
|
|
20
|
+
/** Value of the selected option (controlled). `undefined` shows the placeholder. */
|
|
17
21
|
selectedValue: T | undefined;
|
|
22
|
+
/** Called with the value of the chosen option; the dropdown then closes. */
|
|
18
23
|
onSelect: (value: T) => void;
|
|
24
|
+
/** Text while nothing is selected. @default labels.selectPlaceholder */
|
|
19
25
|
placeholder?: string;
|
|
26
|
+
/** Error shown under the field. */
|
|
20
27
|
error?: string;
|
|
28
|
+
/** Shows a spinner in place of the chevron and blocks opening. @default false */
|
|
21
29
|
isLoading?: boolean;
|
|
30
|
+
/** Dims the field and blocks opening. @default false */
|
|
22
31
|
disabled?: boolean;
|
|
23
32
|
/** Adds a search box inside the dropdown. @default false */
|
|
24
33
|
searchable?: boolean;
|
|
34
|
+
/** Placeholder of the search box (with `searchable`). @default labels.search */
|
|
25
35
|
searchPlaceholder?: string;
|
|
26
36
|
/** Maximum height of the dropdown, if the available space allows it. @default 280 */
|
|
27
37
|
maxHeight?: number;
|
|
38
|
+
/** Called with `true` when the dropdown opens and `false` when it closes. */
|
|
28
39
|
onOpenChange?: (open: boolean) => void;
|
|
40
|
+
/** Style of the outer wrapper (label, field and error). */
|
|
29
41
|
containerStyle?: StyleProp<ViewStyle>;
|
|
30
42
|
testID?: string;
|
|
31
43
|
}
|
|
32
44
|
/**
|
|
33
45
|
* Select
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Modal
|
|
46
|
+
* Single-option dropdown. The list is measured against the window and drawn
|
|
47
|
+
* inside a Modal, not in the field's tree: that way no `overflow: hidden`
|
|
48
|
+
* clips it, it doesn't depend on zIndex (unreliable on Android) and the
|
|
49
|
+
* Modal's backdrop handles closing by tapping outside and with the back button.
|
|
50
|
+
*
|
|
51
|
+
* Design:
|
|
52
|
+
* - Proximity + continuity: the list opens right against the field, toward
|
|
53
|
+
* wherever there is more room, so the eye goes from field to options.
|
|
54
|
+
* - Von Restorff: the picked option alone has the accent fill and a check.
|
|
55
|
+
* - Jakob's law: same field as Input and DateField (height, border, label,
|
|
56
|
+
* red border with an error); tap outside or Android back closes it.
|
|
57
|
+
* - Hick's law: past a handful of options, `searchable` narrows the list.
|
|
38
58
|
*/
|
|
39
59
|
export declare function Select<T extends string | number>({ label, required, options, selectedValue, onSelect, placeholder, error, isLoading, disabled, searchable, searchPlaceholder, maxHeight, onOpenChange, containerStyle, testID, }: SelectProps<T>): React.JSX.Element;
|
|
40
60
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/organisms/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/organisms/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+E,MAAM,OAAO,CAAC;AACpG,OAAO,EAUL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,oFAAoF;IACpF,aAAa,EAAE,CAAC,GAAG,SAAS,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkFD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAChD,KAAK,EACL,QAAgB,EAChB,OAAO,EACP,aAAa,EACb,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAiB,EACjB,QAAgB,EAChB,UAAkB,EAClB,iBAAiB,EACjB,SAAe,EACf,YAAY,EACZ,cAAc,EACd,MAAM,GACP,EAAE,WAAW,CAAC,CAAC,CAAC,qBAkMhB"}
|
|
@@ -5,65 +5,83 @@ import { type SlidesOrientation } from './useSlides';
|
|
|
5
5
|
export type { SlidesOrientation } from './useSlides';
|
|
6
6
|
export type SlidesIndicators = 'dots' | 'numbers' | 'none';
|
|
7
7
|
export type SlidesIndicatorPlacement = 'overlay' | 'outside';
|
|
8
|
-
/**
|
|
8
|
+
/** A solid color, or two or more for a gradient (see `Gradient`). */
|
|
9
9
|
export type SlideBackground = string | string[];
|
|
10
10
|
export interface SlidesProps<T> {
|
|
11
|
+
/** One item per slide. */
|
|
11
12
|
data: T[];
|
|
13
|
+
/** Stable key per item. */
|
|
12
14
|
keyExtractor: (item: T, index: number) => string;
|
|
13
|
-
/**
|
|
15
|
+
/** Slide content: images, buttons, anything. Drawn on top of `background`. */
|
|
14
16
|
renderItem: (item: T, index: number) => React.ReactNode;
|
|
15
|
-
/**
|
|
17
|
+
/** Per-slide background: `'#101014'` paints flat, `['#004cef', '#00cae1']` paints a gradient. */
|
|
16
18
|
background?: (item: T, index: number) => SlideBackground | undefined;
|
|
17
|
-
/**
|
|
19
|
+
/** Gradient direction when `background` returns several colors. @default 'vertical' */
|
|
18
20
|
gradientDirection?: GradientDirection;
|
|
19
|
-
/** @default 'horizontal' */
|
|
21
|
+
/** Direction of the swipe. @default 'horizontal' */
|
|
20
22
|
orientation?: SlidesOrientation;
|
|
21
|
-
/**
|
|
23
|
+
/** Dots, numbered dots, or none. @default 'dots' */
|
|
22
24
|
indicators?: SlidesIndicators;
|
|
23
25
|
/**
|
|
24
|
-
* 'overlay'
|
|
25
|
-
*
|
|
26
|
+
* 'overlay' places them on the slide, in white; 'outside' moves them out of
|
|
27
|
+
* the swipeable area, in theme colors.
|
|
26
28
|
* @default 'overlay'
|
|
27
29
|
*/
|
|
28
30
|
indicatorPlacement?: SlidesIndicatorPlacement;
|
|
29
|
-
/**
|
|
31
|
+
/** After the last slide, wraps to the first (and vice versa). @default false */
|
|
30
32
|
loop?: boolean;
|
|
31
|
-
/**
|
|
33
|
+
/** Advances automatically. Pauses while a finger is dragging. @default false */
|
|
32
34
|
autoPlay?: boolean;
|
|
33
|
-
/**
|
|
35
|
+
/** Milliseconds between `autoPlay` advances. @default 4000 */
|
|
34
36
|
interval?: number;
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* Button that pauses auto-advance. Only shown with `autoPlay`; on by default
|
|
39
|
+
* because content that moves on its own needs a way to pause it
|
|
40
|
+
* (WCAG 2.2.2).
|
|
39
41
|
* @default true
|
|
40
42
|
*/
|
|
41
43
|
showAutoPlayToggle?: boolean;
|
|
42
|
-
/**
|
|
44
|
+
/** Gap between slides, in px. At 0 they touch. @default 0 */
|
|
43
45
|
spacing?: number;
|
|
44
|
-
/**
|
|
46
|
+
/** Controlled index. Without it, the component manages its own from `defaultIndex`. */
|
|
45
47
|
index?: number;
|
|
46
|
-
/** @default 0 */
|
|
48
|
+
/** Starting slide when the index is uncontrolled. @default 0 */
|
|
47
49
|
defaultIndex?: number;
|
|
50
|
+
/** Called with the new index when the active slide changes. */
|
|
48
51
|
onIndexChange?: (index: number) => void;
|
|
49
|
-
/**
|
|
52
|
+
/** Height of the swipeable area. @default 240 */
|
|
50
53
|
height?: number;
|
|
51
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Lets the user swipe between slides. When false, they change only through the indicators,
|
|
56
|
+
* `autoPlay` or `index`. @default true
|
|
57
|
+
*/
|
|
52
58
|
swipeEnabled?: boolean;
|
|
53
|
-
/**
|
|
59
|
+
/** Styles for each slide's visible box — padding, alignment, radius. */
|
|
54
60
|
slideStyle?: StyleProp<ViewStyle>;
|
|
55
61
|
style?: StyleProp<ViewStyle>;
|
|
56
62
|
testID?: string;
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
59
65
|
* Slides
|
|
60
|
-
*
|
|
61
|
-
* `renderItem`
|
|
62
|
-
*
|
|
66
|
+
* Carousel with its own background (flat color or gradient) and free-form
|
|
67
|
+
* content: `renderItem` decides whether an image, text or buttons go inside.
|
|
68
|
+
* The state lives in `useSlides`; only the tree is here.
|
|
69
|
+
*
|
|
70
|
+
* Sliding is a `ScrollView` with `pagingEnabled` instead of hand-made
|
|
71
|
+
* gestures: it is the only thing that gives native snapping on iOS and
|
|
72
|
+
* Android without `react-native-gesture-handler`, across the whole supported
|
|
73
|
+
* range of Expo SDKs.
|
|
63
74
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
75
|
+
* Design:
|
|
76
|
+
* - Jakob's law: native paging swipe and dots under the slide, like the
|
|
77
|
+
* system's own onboarding carousels.
|
|
78
|
+
* - Similarity + Von Restorff: every indicator looks the same except the
|
|
79
|
+
* current one.
|
|
80
|
+
* - Continuity: the slides slide (a jump with Reduce Motion, and autoPlay
|
|
81
|
+
* stops); infinite mode clones the edges so the swipe never rewinds.
|
|
82
|
+
* - Fitts's law: indicators have padding around the dot as touch area.
|
|
83
|
+
* - Screen readers: each indicator is "Slide n of total" (`labels.slideOf`),
|
|
84
|
+
* and autoPlay can be paused from its own button.
|
|
67
85
|
*/
|
|
68
86
|
export declare function Slides<T>({ data, keyExtractor, renderItem, background, gradientDirection, orientation, indicators, indicatorPlacement, loop, autoPlay, interval, showAutoPlayToggle, spacing, index, defaultIndex, onIndexChange, height, swipeEnabled, slideStyle, style, testID, }: SlidesProps<T>): React.JSX.Element;
|
|
69
87
|
//# sourceMappingURL=Slides.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slides.d.ts","sourceRoot":"","sources":["../../../src/organisms/Slides.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7D,
|
|
1
|
+
{"version":3,"file":"Slides.d.ts","sourceRoot":"","sources":["../../../src/organisms/Slides.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAA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