orn-ui 0.2.10 → 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 +66 -51
- package/README.md +3 -7
- 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 +174 -154
- 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 +176 -156
- 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 +193 -164
- 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
|
@@ -4,11 +4,11 @@ import { type ChartRow } from './chart/math';
|
|
|
4
4
|
export type { ChartRow } from './chart/math';
|
|
5
5
|
export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut' | 'radar';
|
|
6
6
|
export interface ChartSeries {
|
|
7
|
-
/**
|
|
7
|
+
/** Column of `data` this series reads. */
|
|
8
8
|
key: string;
|
|
9
|
-
/**
|
|
9
|
+
/** Text shown in the legend and tooltip. Defaults to `key`. */
|
|
10
10
|
label?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** Overrides the color derived from the theme. */
|
|
12
12
|
color?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface ChartFilterOption {
|
|
@@ -16,9 +16,9 @@ export interface ChartFilterOption {
|
|
|
16
16
|
label: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* A filter in the top bar. Chart doesn't filter anything on its own: it shows
|
|
20
|
+
* the control and reports. Whoever has the data decides what "last 7 days"
|
|
21
|
+
* means, and that can't be guessed from here.
|
|
22
22
|
*/
|
|
23
23
|
export interface ChartFilter {
|
|
24
24
|
key: string;
|
|
@@ -28,125 +28,135 @@ export interface ChartFilter {
|
|
|
28
28
|
}
|
|
29
29
|
export interface ChartSelection {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Row identity, stable across a `window` or decimation. Comes from
|
|
32
|
+
* `selectBy`; without it, it is the index, which does not survive the data
|
|
33
|
+
* shifting.
|
|
34
34
|
*/
|
|
35
35
|
id: string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
37
|
+
* Index within the **drawn** rows, not `data`: with `window` or decimation
|
|
38
|
+
* they are not the same list. Use `row` to get back to the datum.
|
|
39
39
|
*/
|
|
40
40
|
index: number;
|
|
41
|
-
/**
|
|
41
|
+
/** The whole row, without resolving the index against anything. */
|
|
42
42
|
row: ChartRow;
|
|
43
|
-
/**
|
|
43
|
+
/** Value of `xKey` in that row. */
|
|
44
44
|
label: string;
|
|
45
|
-
/**
|
|
45
|
+
/** Series that was touched. In a pie it is the row, which is the category there. */
|
|
46
46
|
seriesKey: string;
|
|
47
47
|
value: number;
|
|
48
48
|
}
|
|
49
49
|
interface ChartBaseProps {
|
|
50
|
+
/** Rows: one per category, with the label in `xKey` and one column per series. */
|
|
50
51
|
data: ChartRow[];
|
|
51
52
|
/**
|
|
52
|
-
* Series
|
|
53
|
-
*
|
|
53
|
+
* Series to draw. 'pie'/'donut' only use the first one: a pie's categories
|
|
54
|
+
* are the rows, not the columns.
|
|
54
55
|
*/
|
|
55
56
|
series: ChartSeries[];
|
|
56
|
-
/**
|
|
57
|
+
/** Column holding each row's label. @default 'x' */
|
|
57
58
|
xKey?: string;
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
60
|
+
* Stable identity of a row. Without it the selection is stored by index,
|
|
61
|
+
* and in a sliding window the index shifts: the highlighted point ends up
|
|
62
|
+
* pointing at another datum without anyone touching it. With it the
|
|
63
|
+
* highlight follows the datum and disappears only when it leaves the window.
|
|
63
64
|
*/
|
|
64
65
|
selectBy?: (row: ChartRow, index: number) => string;
|
|
65
66
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
67
|
+
* Draws only the last N rows. It is the sliding window of a live chart: the
|
|
68
|
+
* code pushing data doesn't have to trim it on every tick.
|
|
68
69
|
*/
|
|
69
70
|
window?: number;
|
|
70
|
-
/**
|
|
71
|
+
/** Height of the plot area, excluding filters and legend. @default 220 */
|
|
71
72
|
height?: number;
|
|
72
73
|
/**
|
|
73
|
-
* 'toggle'
|
|
74
|
-
*
|
|
74
|
+
* 'toggle' turns the legend into the cheapest filter a chart has: tapping a
|
|
75
|
+
* series hides it. @default 'auto' (toggle with 2+ series, none with one)
|
|
75
76
|
*/
|
|
76
77
|
legend?: 'auto' | 'none' | 'static' | 'toggle';
|
|
77
|
-
/**
|
|
78
|
+
/** Hidden series (controlled). Without it, Chart tracks them itself. */
|
|
78
79
|
hiddenKeys?: string[];
|
|
79
|
-
/** @default [] */
|
|
80
|
+
/** Series hidden at first (uncontrolled). @default [] */
|
|
80
81
|
defaultHiddenKeys?: string[];
|
|
82
|
+
/** Called when the legend shows or hides a series. */
|
|
81
83
|
onHiddenKeysChange?: (keys: string[]) => void;
|
|
82
|
-
/**
|
|
84
|
+
/** Controls above the chart, one per filter. */
|
|
83
85
|
filters?: ChartFilter[];
|
|
84
|
-
/**
|
|
86
|
+
/** Highlighted point (controlled). `null` means none. */
|
|
85
87
|
selected?: ChartSelection | null;
|
|
88
|
+
/** Called when a category is tapped, with `null` when it is released. */
|
|
86
89
|
onSelect?: (selection: ChartSelection | null) => void;
|
|
87
|
-
/**
|
|
90
|
+
/** Bubble with the values of the touched category. @default true */
|
|
88
91
|
tooltip?: boolean;
|
|
89
|
-
/** @default
|
|
92
|
+
/** Formats values on the axis, tooltip and slices. @default compact format: 1.2k, 3.4M */
|
|
90
93
|
formatValue?: (value: number) => string;
|
|
91
|
-
/** @default true */
|
|
94
|
+
/** Marks grow in on mount and morph on data changes (off with Reduce Motion). @default true */
|
|
92
95
|
animate?: boolean;
|
|
93
|
-
/**
|
|
96
|
+
/** Duration in ms of the marks' animation. @default tokens.duration.slow * 2 */
|
|
94
97
|
duration?: number;
|
|
95
|
-
/**
|
|
98
|
+
/** Text shown when there is nothing left to draw. */
|
|
96
99
|
emptyText?: string;
|
|
97
|
-
/**
|
|
100
|
+
/** Required: a chart has no text that describes it. */
|
|
98
101
|
accessibilityLabel: string;
|
|
102
|
+
/**
|
|
103
|
+
* Color behind the chart. The donut hole and the ring around points are
|
|
104
|
+
* painted with it, so they must match whatever the chart sits on.
|
|
105
|
+
* @default colors.surfaceRaised (a Chart usually lives in a Card)
|
|
106
|
+
*/
|
|
107
|
+
surfaceColor?: string;
|
|
99
108
|
style?: StyleProp<ViewStyle>;
|
|
100
109
|
testID?: string;
|
|
101
110
|
}
|
|
102
111
|
interface CartesianProps {
|
|
103
112
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
113
|
+
* Fixes the value axis. By default it is recomputed with every datum, which
|
|
114
|
+
* is right for a static chart and worst for a live one: a higher value
|
|
115
|
+
* arrives, the whole scale shifts and the line jumps even though the data
|
|
116
|
+
* didn't move.
|
|
108
117
|
*
|
|
109
|
-
* - `[min, max]` —
|
|
110
|
-
* - `'sticky'` —
|
|
111
|
-
*
|
|
118
|
+
* - `[min, max]` — exact, not rounded to nice numbers.
|
|
119
|
+
* - `'sticky'` — starts from the data and grows when something doesn't fit,
|
|
120
|
+
* but never shrinks back.
|
|
112
121
|
*/
|
|
113
122
|
domain?: [number, number] | 'sticky';
|
|
114
|
-
/**
|
|
123
|
+
/** Reference lines on the value axis. @default true */
|
|
115
124
|
grid?: boolean;
|
|
116
|
-
/**
|
|
125
|
+
/** Target tick count on the value axis; rounding may yield one more or one fewer. @default 4 */
|
|
117
126
|
ticks?: number;
|
|
118
|
-
/**
|
|
127
|
+
/** Labels on the horizontal axis. @default true */
|
|
119
128
|
xAxis?: boolean;
|
|
120
|
-
/**
|
|
129
|
+
/** Labels on the vertical axis. @default true */
|
|
121
130
|
yAxis?: boolean;
|
|
122
131
|
}
|
|
123
132
|
interface BarChartProps extends CartesianProps {
|
|
133
|
+
/** Kind of chart. Props marked "Only with type" depend on it. */
|
|
124
134
|
type: 'bar';
|
|
125
|
-
/** 'horizontal'
|
|
135
|
+
/** 'horizontal' puts the categories on the vertical axis. @default 'vertical' */
|
|
126
136
|
orientation?: 'vertical' | 'horizontal';
|
|
127
|
-
/**
|
|
137
|
+
/** Stacks the series instead of placing them side by side. @default false */
|
|
128
138
|
stacked?: boolean;
|
|
129
|
-
/**
|
|
139
|
+
/** Radius of each bar's free end. @default radius.xs */
|
|
130
140
|
barRadius?: number;
|
|
131
141
|
}
|
|
132
142
|
interface LineChartProps extends CartesianProps {
|
|
133
143
|
type: 'line';
|
|
134
144
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* `false`
|
|
145
|
+
* Maximum number of points to draw, picked with LTTB. Defaults to a value
|
|
146
|
+
* derived from the measured width: more than one point every two pixels
|
|
147
|
+
* isn't visible but still costs. `false` draws them all.
|
|
138
148
|
*/
|
|
139
149
|
decimate?: number | false;
|
|
140
|
-
/** Catmull-Rom
|
|
150
|
+
/** Catmull-Rom curves instead of straight segments. @default false */
|
|
141
151
|
smooth?: boolean;
|
|
142
|
-
/** @default 2 */
|
|
152
|
+
/** Line width in pt. @default 2 */
|
|
143
153
|
thickness?: number;
|
|
144
|
-
/**
|
|
154
|
+
/** A dot on each datum. @default true */
|
|
145
155
|
dots?: boolean;
|
|
146
156
|
}
|
|
147
157
|
interface AreaChartProps extends CartesianProps {
|
|
148
158
|
type: 'area';
|
|
149
|
-
/**
|
|
159
|
+
/** Same as in 'line'. */
|
|
150
160
|
decimate?: number | false;
|
|
151
161
|
smooth?: boolean;
|
|
152
162
|
thickness?: number;
|
|
@@ -154,13 +164,13 @@ interface AreaChartProps extends CartesianProps {
|
|
|
154
164
|
dots?: boolean;
|
|
155
165
|
/** @default false */
|
|
156
166
|
stacked?: boolean;
|
|
157
|
-
/**
|
|
167
|
+
/** Opacity of the fill under the line. @default 0.22 */
|
|
158
168
|
fillOpacity?: number;
|
|
159
169
|
}
|
|
160
170
|
interface PieBaseProps {
|
|
161
|
-
/**
|
|
171
|
+
/** Hole as a fraction of the radius, 0–0.9. @default 0 for 'pie', 0.6 for 'donut' */
|
|
162
172
|
innerRadius?: number;
|
|
163
|
-
/**
|
|
173
|
+
/** What to write on each slice. @default 'percent' */
|
|
164
174
|
sliceLabels?: 'none' | 'percent' | 'value';
|
|
165
175
|
}
|
|
166
176
|
interface PieChartProps extends PieBaseProps {
|
|
@@ -172,13 +182,13 @@ interface DonutChartProps extends PieBaseProps {
|
|
|
172
182
|
interface RadarChartProps {
|
|
173
183
|
type: 'radar';
|
|
174
184
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
185
|
+
* Fixes the axes' range. A radar measures from the center, so the minimum is
|
|
186
|
+
* always 0 and only `max` of `[min, max]` is used.
|
|
177
187
|
*/
|
|
178
188
|
domain?: [number, number] | 'sticky';
|
|
179
|
-
/**
|
|
189
|
+
/** Rings of the web. @default 4 */
|
|
180
190
|
levels?: number;
|
|
181
|
-
/**
|
|
191
|
+
/** Fills the polygon in addition to drawing its outline. @default true */
|
|
182
192
|
fill?: boolean;
|
|
183
193
|
thickness?: number;
|
|
184
194
|
/** @default true */
|
|
@@ -187,19 +197,20 @@ interface RadarChartProps {
|
|
|
187
197
|
export type ChartProps = ChartBaseProps & (BarChartProps | LineChartProps | AreaChartProps | PieChartProps | DonutChartProps | RadarChartProps);
|
|
188
198
|
/**
|
|
189
199
|
* Chart
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
200
|
+
* Bars (vertical, horizontal, grouped, stacked), line, area, pie, donut and
|
|
201
|
+
* radar in a single component, because what changes between them is the mark
|
|
202
|
+
* being drawn and not the rest: data, scale, axes, legend, tooltip, selection
|
|
203
|
+
* and filters are the same six mechanisms in all of them.
|
|
194
204
|
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
205
|
+
* It is drawn with `View`: React Native ships no vector canvas and the library
|
|
206
|
+
* can't add one. The three primitives are in `chart/marks.tsx` and the whole
|
|
207
|
+
* geometry, without React, in `chart/math.ts`.
|
|
198
208
|
*
|
|
199
|
-
* Gestalt:
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
209
|
+
* Gestalt: common fate — when you tap a category, everything that isn't it
|
|
210
|
+
* drops to {@link DIM_OPACITY} at once, so what is highlighted reads as a group
|
|
211
|
+
* and not as a loose mark. The legend uses similarity: the same color as the
|
|
212
|
+
* series, which is why it can turn it off without having to explain what it
|
|
213
|
+
* turns off.
|
|
203
214
|
*/
|
|
204
215
|
export declare function Chart(props: ChartProps): React.JSX.Element;
|
|
205
216
|
export declare namespace Chart {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/organisms/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/organisms/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkF,MAAM,OAAO,CAAC;AACvG,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,OAAO,EAmBL,KAAK,QAAQ,EAEd,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5E,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;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|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import { type DatePickerProps, type DateRange } from './DatePicker';
|
|
4
4
|
export interface DateFieldProps extends Pick<DatePickerProps, 'minDate' | 'maxDate' | 'monthNames' | 'weekdayNames' | 'firstDayOfWeek'> {
|
|
5
|
+
/** Text above the field; also its accessible name. */
|
|
5
6
|
label?: string;
|
|
7
|
+
/** Shows an asterisk and says "required" to screen readers. @default false */
|
|
6
8
|
required?: boolean;
|
|
7
9
|
/**
|
|
8
10
|
* 'single' picks one date; 'range' picks an interval with two taps.
|
|
@@ -17,8 +19,11 @@ export interface DateFieldProps extends Pick<DatePickerProps, 'minDate' | 'maxDa
|
|
|
17
19
|
range?: DateRange;
|
|
18
20
|
/** Called in mode="range", both when setting the start and when closing the range. */
|
|
19
21
|
onRangeChange?: (range: DateRange) => void;
|
|
22
|
+
/** Text while empty. @default labels.selectDate */
|
|
20
23
|
placeholder?: string;
|
|
24
|
+
/** Error under the field (red border); announced to screen readers. */
|
|
21
25
|
error?: string;
|
|
26
|
+
/** Dims the field and ignores taps. @default false */
|
|
22
27
|
disabled?: boolean;
|
|
23
28
|
/** Formats the date in the field. @default "Month D, YYYY" */
|
|
24
29
|
format?: (date: Date) => string;
|
|
@@ -31,14 +36,23 @@ export interface DateFieldProps extends Pick<DatePickerProps, 'minDate' | 'maxDa
|
|
|
31
36
|
onClear?: () => void;
|
|
32
37
|
/** Text for that button. @default the `clear` from `useLabels()` */
|
|
33
38
|
clearLabel?: string;
|
|
39
|
+
/** Style of the outer wrapper (label, field and error). */
|
|
34
40
|
containerStyle?: StyleProp<ViewStyle>;
|
|
35
41
|
testID?: string;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* DateField
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
45
|
+
* Date field: looks like an Input, opens a `DatePicker` in a Modal when
|
|
46
|
+
* tapped. No native system picker, so it looks and behaves the same on iOS
|
|
47
|
+
* and Android.
|
|
48
|
+
*
|
|
49
|
+
* Gestalt, similarity (and Jakob's law): same box, border, height and label
|
|
50
|
+
* as Input, and the same chevron as Select, so in a form it reads as one more
|
|
51
|
+
* field; only the chevron says it opens something. Proximity: label, field
|
|
52
|
+
* and error stack tight, as one unit.
|
|
53
|
+
*
|
|
54
|
+
* Accessibility: the name includes the label, "required" and the chosen date;
|
|
55
|
+
* the error is a hint; `expanded` tells whether the calendar is open.
|
|
42
56
|
*/
|
|
43
57
|
export declare const DateField: React.MemoExoticComponent<({ label, required, mode, value, onChange, range, onRangeChange, placeholder, error, disabled, format, modalTitle, onClear, clearLabel, containerStyle, monthNames, testID, ...pickerProps }: DateFieldProps) => React.JSX.Element>;
|
|
44
58
|
//# sourceMappingURL=DateField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../src/organisms/DateField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAgC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5F,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../src/organisms/DateField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAgC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5F,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIhF,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,gBAAgB,CAAC;IACvG,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,sCAAsC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,sFAAsF;IACtF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAChC,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmCD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,0NAoBjB,cAAc,uBAoGlB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
export declare const DEFAULT_MONTH_NAMES: string[];
|
|
4
|
-
/**
|
|
4
|
+
/** Index 0 = Sunday, to line up with Date.getDay(). */
|
|
5
5
|
export declare const DEFAULT_WEEKDAY_NAMES: string[];
|
|
6
6
|
export interface DateRange {
|
|
7
7
|
start: Date;
|
|
8
|
-
/**
|
|
8
|
+
/** Missing while the range is half-picked (only the start was tapped). */
|
|
9
9
|
end?: Date;
|
|
10
10
|
}
|
|
11
11
|
export interface DatePickerProps {
|
|
@@ -22,7 +22,9 @@ export interface DatePickerProps {
|
|
|
22
22
|
range?: DateRange;
|
|
23
23
|
/** Called in mode="range", both when setting the start and when closing the range. */
|
|
24
24
|
onRangeChange?: (range: DateRange) => void;
|
|
25
|
+
/** Earliest selectable day; earlier days are dimmed and the back arrow stops there. */
|
|
25
26
|
minDate?: Date;
|
|
27
|
+
/** Latest selectable day; later days are dimmed and the forward arrow stops there. */
|
|
26
28
|
maxDate?: Date;
|
|
27
29
|
/** Month shown on open if there's no `value`. @default today */
|
|
28
30
|
defaultMonth?: Date;
|
|
@@ -38,16 +40,10 @@ export interface DatePickerProps {
|
|
|
38
40
|
testID?: string;
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
43
|
+
* Returns the month grid: 6 rows of 7 cells. Cells outside the month are
|
|
44
|
+
* null, so the layout doesn't jump in height between months (a month can
|
|
45
|
+
* need 4, 5 or 6 rows depending on which day the 1st falls on).
|
|
44
46
|
*/
|
|
45
47
|
export declare function buildMonthGrid(year: number, month: number, firstDayOfWeek: 0 | 1): (Date | null)[][];
|
|
46
|
-
/**
|
|
47
|
-
* DatePicker
|
|
48
|
-
* Calendario mensual dibujado con View/Text puros — sin
|
|
49
|
-
* @react-native-community/datetimepicker ni ningún picker nativo, para
|
|
50
|
-
* mantener la librería en cero dependencias y verse igual en iOS y Android.
|
|
51
|
-
*/
|
|
52
48
|
export declare const DatePicker: React.MemoExoticComponent<({ mode, value, onChange, range, onRangeChange, minDate, maxDate, defaultMonth, monthNames, weekdayNames, firstDayOfWeek, onVisibleMonthChange, style, testID, }: DatePickerProps) => React.JSX.Element>;
|
|
53
49
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/organisms/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAgC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK5F,eAAO,MAAM,mBAAmB,UAG/B,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/organisms/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAgC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK5F,eAAO,MAAM,mBAAmB,UAG/B,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,UAAsC,CAAC;AAEzE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,CAAC;IACZ,0EAA0E;IAC1E,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,sCAAsC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,sFAAsF;IACtF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,uFAAuF;IACvF,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,sFAAsF;IACtF,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,gEAAgE;IAChE,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACvB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA0BD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAapG;AAkID,eAAO,MAAM,UAAU,8LAgBlB,eAAe,uBAwJnB,CAAC"}
|
|
@@ -2,41 +2,68 @@ import React from 'react';
|
|
|
2
2
|
import { type FlatListProps, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../icons/types';
|
|
4
4
|
export interface ListProps<T> {
|
|
5
|
+
/** Items to render. */
|
|
5
6
|
data: T[];
|
|
7
|
+
/** Stable key per item. */
|
|
6
8
|
keyExtractor: (item: T, index: number) => string;
|
|
9
|
+
/** Renders each row (same as FlatList's `renderItem`). */
|
|
7
10
|
renderItem: FlatListProps<T>['renderItem'];
|
|
8
11
|
/** Initial load: while true and there's no data, placeholders are shown. */
|
|
9
12
|
isLoading: boolean;
|
|
10
13
|
/** Reload with data already on screen (pull-to-refresh). @default false */
|
|
11
14
|
isRefreshing?: boolean;
|
|
15
|
+
/** Shows a spinner in the footer while the next page loads. @default false */
|
|
12
16
|
isLoadingMore?: boolean;
|
|
13
17
|
/** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
|
|
14
18
|
isReady?: boolean;
|
|
19
|
+
/** Text of the fullscreen spinner shown while `isReady` is false. @default labels.loading */
|
|
15
20
|
loadingText?: string;
|
|
21
|
+
/** Text of the footer spinner shown with `isLoadingMore`. @default labels.loadingMore */
|
|
16
22
|
loadingMoreText?: string;
|
|
17
23
|
/** Ghost rows for the initial load. @default 6 */
|
|
18
24
|
skeletonCount?: number;
|
|
19
25
|
/** Custom placeholder, to match the real shape of the item. */
|
|
20
26
|
renderSkeletonItem?: () => React.ReactElement;
|
|
27
|
+
/** Called when scrolling gets close to the end (to load the next page). */
|
|
21
28
|
onEndReached?: () => void;
|
|
29
|
+
/** How close to the end `onEndReached` fires, in visible lengths of the list. @default 0.3 */
|
|
22
30
|
onEndReachedThreshold?: number;
|
|
31
|
+
/** Enables pull-to-refresh and is called when the user pulls. */
|
|
23
32
|
onRefresh?: () => void;
|
|
33
|
+
/** Title of the empty state. @default labels.noResultsTitle */
|
|
24
34
|
emptyTitle?: string;
|
|
35
|
+
/** Supporting line of the empty state. @default labels.noResultsDescription */
|
|
25
36
|
emptyDescription?: string;
|
|
37
|
+
/** Icon of the empty state. @default 'search' */
|
|
26
38
|
emptyIconName?: IconName;
|
|
39
|
+
/** Rendered above the items, inside the scroll. */
|
|
27
40
|
ListHeaderComponent?: FlatListProps<T>['ListHeaderComponent'];
|
|
41
|
+
/** Rendered below the items, before the pagination loader. */
|
|
28
42
|
ListFooterComponent?: FlatListProps<T>['ListFooterComponent'];
|
|
43
|
+
/** Style of the list's content container (also used by the skeleton). */
|
|
29
44
|
contentContainerStyle?: ViewStyle;
|
|
45
|
+
/** Style of the outer wrapper. */
|
|
30
46
|
containerStyle?: ViewStyle;
|
|
31
47
|
/** List component to use (FlashList, etc). @default FlatList */
|
|
32
48
|
ListComponent?: React.ComponentType<any>;
|
|
49
|
+
/** Extra props passed to `ListComponent`; they override the ones set here. */
|
|
33
50
|
listProps?: Record<string, unknown>;
|
|
34
51
|
}
|
|
35
52
|
/**
|
|
36
53
|
* List
|
|
37
|
-
*
|
|
38
|
-
* expo-router
|
|
39
|
-
* (
|
|
54
|
+
* List with loading/pagination/empty states handled, without being tied to
|
|
55
|
+
* expo-router or FlashList: `ListComponent` lets you inject any of them
|
|
56
|
+
* (React Native's own FlatList by default).
|
|
57
|
+
*
|
|
58
|
+
* Design:
|
|
59
|
+
* - Continuity (Gestalt): the first load shows placeholders shaped like the
|
|
60
|
+
* rows and keeps `ListHeaderComponent` in place, so nothing jumps when the
|
|
61
|
+
* data arrives.
|
|
62
|
+
* - Doherty threshold: every wait has immediate feedback (placeholders,
|
|
63
|
+
* pull-to-refresh spinner, footer loader while paging), and "no results"
|
|
64
|
+
* only appears once it is known there is nothing.
|
|
65
|
+
* - Jakob's law: the native pull-to-refresh and infinite scroll people
|
|
66
|
+
* already know from other apps.
|
|
40
67
|
*/
|
|
41
68
|
export declare function List<T>({ data, keyExtractor, renderItem, isLoading, isRefreshing, isLoadingMore, isReady, loadingText, loadingMoreText, skeletonCount, renderSkeletonItem, onEndReached, onEndReachedThreshold, onRefresh, emptyTitle, emptyDescription, emptyIconName, ListHeaderComponent, ListFooterComponent, contentContainerStyle, containerStyle, ListComponent, listProps, }: ListProps<T>): React.JSX.Element;
|
|
42
69
|
//# sourceMappingURL=List.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/organisms/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAkC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAMlG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,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,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO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Ac,CAAC,EAAE,SAAS,CAAC;IAE3B,gEAAgE;IAChE,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAwBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,EACtB,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,SAAS,EACT,YAAoB,EACpB,aAAqB,EACrB,OAAc,EACd,WAAW,EACX,eAAe,EACf,aAAiB,EACjB,kBAAkB,EAClB,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,SAAS,CAAC,CAAC,CAAC,qBA2Gd"}
|
|
@@ -2,22 +2,49 @@ import React from 'react';
|
|
|
2
2
|
import { type ModalProps as RNModalProps, type ViewStyle } from 'react-native';
|
|
3
3
|
export type ModalVariant = 'full' | 'overlay' | 'fullScreen';
|
|
4
4
|
export interface ModalProps extends Pick<RNModalProps, 'statusBarTranslucent' | 'onRequestClose' | 'hardwareAccelerated'> {
|
|
5
|
+
/** Shows or hides the modal. The animated variants play their exit before unmounting. */
|
|
5
6
|
visible: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Shows the close button in the header and is called by it, by a tap on the backdrop (`overlay`) and
|
|
9
|
+
* by Android's back button.
|
|
10
|
+
*/
|
|
6
11
|
onClose?: () => void;
|
|
12
|
+
/** Header title, on a single line. */
|
|
7
13
|
title?: string;
|
|
14
|
+
/** Accessible name of the close button. @default labels.close */
|
|
8
15
|
closeAccessibilityLabel?: string;
|
|
16
|
+
/** Body of the modal. */
|
|
9
17
|
children: React.ReactNode;
|
|
18
|
+
/** Fixed area below the content (e.g. actions); it doesn't scroll. */
|
|
10
19
|
footer?: React.ReactNode;
|
|
20
|
+
/** Style of the card (`overlay`) or the full-screen wrapper. */
|
|
11
21
|
containerStyle?: ViewStyle;
|
|
22
|
+
/** Style of the content area (the scroll container when `scrollable`). */
|
|
12
23
|
contentStyle?: ViewStyle;
|
|
24
|
+
/**
|
|
25
|
+
* 'full' slides up a full page, 'overlay' a centered card over a dimmed backdrop, 'fullScreen' uses
|
|
26
|
+
* the native full-screen presentation. @default 'full'
|
|
27
|
+
*/
|
|
13
28
|
variant?: ModalVariant;
|
|
29
|
+
/** Wraps the content in a ScrollView. @default true */
|
|
14
30
|
scrollable?: boolean;
|
|
15
31
|
}
|
|
16
32
|
/**
|
|
17
33
|
* Modal
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* BottomSheet,
|
|
34
|
+
* A single component for all of the app's modals: handles scroll, keyboard,
|
|
35
|
+
* insets and layout according to `variant`. For a sheet from the bottom there
|
|
36
|
+
* is BottomSheet, which also comes with drag to close.
|
|
37
|
+
*
|
|
38
|
+
* Design:
|
|
39
|
+
* - Figure and ground (Gestalt): `overlay` dims the screen behind a raised
|
|
40
|
+
* card, so the task in front is the only figure.
|
|
41
|
+
* - Common region: header, content and footer share one surface, split by
|
|
42
|
+
* hairlines; the footer stays fixed so its actions are always in reach.
|
|
43
|
+
* - Jakob's law: title on the left, close at the top right, Android back and
|
|
44
|
+
* the VoiceOver escape gesture close it, like the system's own sheets.
|
|
45
|
+
* - Fitts's law: the close button is a 44pt target.
|
|
46
|
+
* - Screen readers stay inside the modal (`accessibilityViewIsModal`), which
|
|
47
|
+
* matters on iOS when it is drawn inside another open overlay.
|
|
21
48
|
*/
|
|
22
49
|
export declare const Modal: React.MemoExoticComponent<({ visible, onClose, title, closeAccessibilityLabel, children, footer, containerStyle, contentStyle, variant, scrollable, statusBarTranslucent, onRequestClose, hardwareAccelerated, }: ModalProps) => React.JSX.Element | null>;
|
|
23
50
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/organisms/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/organisms/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAOL,KAAK,UAAU,IAAI,YAAY,EAC/B,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAUtB,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,YAAY,EAAE,sBAAsB,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;IAC7F,yFAAyF;IACzF,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sEAAsE;IACtE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,gEAAgE;IAChE,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,0EAA0E;IAC1E,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA4CD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,oNAeb,UAAU,8BAgLd,CAAC"}
|