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
package/registry/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"core": {
|
|
3
|
-
"bytes":
|
|
3
|
+
"bytes": 75729
|
|
4
4
|
},
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"registryDependencies": [
|
|
17
17
|
"core"
|
|
18
18
|
],
|
|
19
|
-
"bytes":
|
|
19
|
+
"bytes": 4555
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"name": "Button",
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
"Button"
|
|
27
27
|
],
|
|
28
28
|
"registryDependencies": [
|
|
29
|
-
"core"
|
|
29
|
+
"core",
|
|
30
|
+
"transition"
|
|
30
31
|
],
|
|
31
|
-
"bytes":
|
|
32
|
+
"bytes": 10380
|
|
32
33
|
},
|
|
33
34
|
{
|
|
34
35
|
"name": "IconButton",
|
|
@@ -39,9 +40,10 @@
|
|
|
39
40
|
],
|
|
40
41
|
"registryDependencies": [
|
|
41
42
|
"core",
|
|
42
|
-
"pressable-scale"
|
|
43
|
+
"pressable-scale",
|
|
44
|
+
"transition"
|
|
43
45
|
],
|
|
44
|
-
"bytes":
|
|
46
|
+
"bytes": 3020
|
|
45
47
|
},
|
|
46
48
|
{
|
|
47
49
|
"name": "Input",
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
"registryDependencies": [
|
|
54
56
|
"core"
|
|
55
57
|
],
|
|
56
|
-
"bytes":
|
|
58
|
+
"bytes": 13674
|
|
57
59
|
},
|
|
58
60
|
{
|
|
59
61
|
"name": "Checkbox",
|
|
@@ -63,9 +65,10 @@
|
|
|
63
65
|
"Checkbox"
|
|
64
66
|
],
|
|
65
67
|
"registryDependencies": [
|
|
66
|
-
"core"
|
|
68
|
+
"core",
|
|
69
|
+
"transition"
|
|
67
70
|
],
|
|
68
|
-
"bytes":
|
|
71
|
+
"bytes": 4557
|
|
69
72
|
},
|
|
70
73
|
{
|
|
71
74
|
"name": "Badge",
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
"registryDependencies": [
|
|
78
81
|
"core"
|
|
79
82
|
],
|
|
80
|
-
"bytes":
|
|
83
|
+
"bytes": 2936
|
|
81
84
|
},
|
|
82
85
|
{
|
|
83
86
|
"name": "Card",
|
|
@@ -89,7 +92,7 @@
|
|
|
89
92
|
"registryDependencies": [
|
|
90
93
|
"core"
|
|
91
94
|
],
|
|
92
|
-
"bytes":
|
|
95
|
+
"bytes": 1777
|
|
93
96
|
},
|
|
94
97
|
{
|
|
95
98
|
"name": "Divider",
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
"registryDependencies": [
|
|
102
105
|
"core"
|
|
103
106
|
],
|
|
104
|
-
"bytes":
|
|
107
|
+
"bytes": 1712
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
110
|
"name": "Gradient",
|
|
@@ -113,19 +116,20 @@
|
|
|
113
116
|
"registryDependencies": [
|
|
114
117
|
"core"
|
|
115
118
|
],
|
|
116
|
-
"bytes":
|
|
119
|
+
"bytes": 6615
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
122
|
"name": "Avatar",
|
|
120
123
|
"slug": "avatar",
|
|
121
124
|
"category": "atoms",
|
|
122
125
|
"exportedNames": [
|
|
123
|
-
"Avatar"
|
|
126
|
+
"Avatar",
|
|
127
|
+
"initialsOf"
|
|
124
128
|
],
|
|
125
129
|
"registryDependencies": [
|
|
126
130
|
"core"
|
|
127
131
|
],
|
|
128
|
-
"bytes":
|
|
132
|
+
"bytes": 4274
|
|
129
133
|
},
|
|
130
134
|
{
|
|
131
135
|
"name": "Image",
|
|
@@ -139,7 +143,7 @@
|
|
|
139
143
|
"core",
|
|
140
144
|
"spinner"
|
|
141
145
|
],
|
|
142
|
-
"bytes":
|
|
146
|
+
"bytes": 6629
|
|
143
147
|
},
|
|
144
148
|
{
|
|
145
149
|
"name": "Spinner",
|
|
@@ -151,7 +155,7 @@
|
|
|
151
155
|
"registryDependencies": [
|
|
152
156
|
"core"
|
|
153
157
|
],
|
|
154
|
-
"bytes":
|
|
158
|
+
"bytes": 7139
|
|
155
159
|
},
|
|
156
160
|
{
|
|
157
161
|
"name": "Skeleton",
|
|
@@ -161,9 +165,10 @@
|
|
|
161
165
|
"Skeleton"
|
|
162
166
|
],
|
|
163
167
|
"registryDependencies": [
|
|
164
|
-
"core"
|
|
168
|
+
"core",
|
|
169
|
+
"transition"
|
|
165
170
|
],
|
|
166
|
-
"bytes":
|
|
171
|
+
"bytes": 4658
|
|
167
172
|
},
|
|
168
173
|
{
|
|
169
174
|
"name": "Transition",
|
|
@@ -176,7 +181,7 @@
|
|
|
176
181
|
"registryDependencies": [
|
|
177
182
|
"core"
|
|
178
183
|
],
|
|
179
|
-
"bytes":
|
|
184
|
+
"bytes": 7026
|
|
180
185
|
},
|
|
181
186
|
{
|
|
182
187
|
"name": "ShinyText",
|
|
@@ -189,7 +194,7 @@
|
|
|
189
194
|
"core",
|
|
190
195
|
"transition"
|
|
191
196
|
],
|
|
192
|
-
"bytes":
|
|
197
|
+
"bytes": 7882
|
|
193
198
|
},
|
|
194
199
|
{
|
|
195
200
|
"name": "EmptyState",
|
|
@@ -199,9 +204,11 @@
|
|
|
199
204
|
"EmptyState"
|
|
200
205
|
],
|
|
201
206
|
"registryDependencies": [
|
|
202
|
-
"core"
|
|
207
|
+
"core",
|
|
208
|
+
"button",
|
|
209
|
+
"transition"
|
|
203
210
|
],
|
|
204
|
-
"bytes":
|
|
211
|
+
"bytes": 3894
|
|
205
212
|
},
|
|
206
213
|
{
|
|
207
214
|
"name": "KeyValueRow",
|
|
@@ -213,7 +220,7 @@
|
|
|
213
220
|
"registryDependencies": [
|
|
214
221
|
"core"
|
|
215
222
|
],
|
|
216
|
-
"bytes":
|
|
223
|
+
"bytes": 3434
|
|
217
224
|
},
|
|
218
225
|
{
|
|
219
226
|
"name": "Fab",
|
|
@@ -224,9 +231,10 @@
|
|
|
224
231
|
],
|
|
225
232
|
"registryDependencies": [
|
|
226
233
|
"core",
|
|
227
|
-
"pressable-scale"
|
|
234
|
+
"pressable-scale",
|
|
235
|
+
"transition"
|
|
228
236
|
],
|
|
229
|
-
"bytes":
|
|
237
|
+
"bytes": 3696
|
|
230
238
|
},
|
|
231
239
|
{
|
|
232
240
|
"name": "PressableScale",
|
|
@@ -236,9 +244,10 @@
|
|
|
236
244
|
"PressableScale"
|
|
237
245
|
],
|
|
238
246
|
"registryDependencies": [
|
|
239
|
-
"core"
|
|
247
|
+
"core",
|
|
248
|
+
"transition"
|
|
240
249
|
],
|
|
241
|
-
"bytes":
|
|
250
|
+
"bytes": 2545
|
|
242
251
|
},
|
|
243
252
|
{
|
|
244
253
|
"name": "Stepper",
|
|
@@ -251,7 +260,7 @@
|
|
|
251
260
|
"registryDependencies": [
|
|
252
261
|
"core"
|
|
253
262
|
],
|
|
254
|
-
"bytes":
|
|
263
|
+
"bytes": 9001
|
|
255
264
|
},
|
|
256
265
|
{
|
|
257
266
|
"name": "OptionCard",
|
|
@@ -262,9 +271,10 @@
|
|
|
262
271
|
],
|
|
263
272
|
"registryDependencies": [
|
|
264
273
|
"core",
|
|
265
|
-
"pressable-scale"
|
|
274
|
+
"pressable-scale",
|
|
275
|
+
"transition"
|
|
266
276
|
],
|
|
267
|
-
"bytes":
|
|
277
|
+
"bytes": 5678
|
|
268
278
|
},
|
|
269
279
|
{
|
|
270
280
|
"name": "InfoRow",
|
|
@@ -277,7 +287,7 @@
|
|
|
277
287
|
"core",
|
|
278
288
|
"avatar"
|
|
279
289
|
],
|
|
280
|
-
"bytes":
|
|
290
|
+
"bytes": 3038
|
|
281
291
|
},
|
|
282
292
|
{
|
|
283
293
|
"name": "FormActions",
|
|
@@ -288,9 +298,10 @@
|
|
|
288
298
|
],
|
|
289
299
|
"registryDependencies": [
|
|
290
300
|
"core",
|
|
291
|
-
"button"
|
|
301
|
+
"button",
|
|
302
|
+
"transition"
|
|
292
303
|
],
|
|
293
|
-
"bytes":
|
|
304
|
+
"bytes": 2778
|
|
294
305
|
},
|
|
295
306
|
{
|
|
296
307
|
"name": "AvatarHeader",
|
|
@@ -302,7 +313,7 @@
|
|
|
302
313
|
"registryDependencies": [
|
|
303
314
|
"core"
|
|
304
315
|
],
|
|
305
|
-
"bytes":
|
|
316
|
+
"bytes": 4476
|
|
306
317
|
},
|
|
307
318
|
{
|
|
308
319
|
"name": "SegmentedControl",
|
|
@@ -314,7 +325,7 @@
|
|
|
314
325
|
"registryDependencies": [
|
|
315
326
|
"core"
|
|
316
327
|
],
|
|
317
|
-
"bytes":
|
|
328
|
+
"bytes": 7315
|
|
318
329
|
},
|
|
319
330
|
{
|
|
320
331
|
"name": "Steps",
|
|
@@ -326,7 +337,7 @@
|
|
|
326
337
|
"registryDependencies": [
|
|
327
338
|
"core"
|
|
328
339
|
],
|
|
329
|
-
"bytes":
|
|
340
|
+
"bytes": 12197
|
|
330
341
|
},
|
|
331
342
|
{
|
|
332
343
|
"name": "SymmetricGrid",
|
|
@@ -338,7 +349,7 @@
|
|
|
338
349
|
"registryDependencies": [
|
|
339
350
|
"core"
|
|
340
351
|
],
|
|
341
|
-
"bytes":
|
|
352
|
+
"bytes": 3411
|
|
342
353
|
},
|
|
343
354
|
{
|
|
344
355
|
"name": "Timeline",
|
|
@@ -352,7 +363,7 @@
|
|
|
352
363
|
"pressable-scale",
|
|
353
364
|
"transition"
|
|
354
365
|
],
|
|
355
|
-
"bytes":
|
|
366
|
+
"bytes": 18305
|
|
356
367
|
},
|
|
357
368
|
{
|
|
358
369
|
"name": "Modal",
|
|
@@ -368,7 +379,7 @@
|
|
|
368
379
|
"pressable-scale",
|
|
369
380
|
"transition"
|
|
370
381
|
],
|
|
371
|
-
"bytes":
|
|
382
|
+
"bytes": 12074
|
|
372
383
|
},
|
|
373
384
|
{
|
|
374
385
|
"name": "BottomSheet",
|
|
@@ -384,7 +395,7 @@
|
|
|
384
395
|
"pressable-scale",
|
|
385
396
|
"transition"
|
|
386
397
|
],
|
|
387
|
-
"bytes":
|
|
398
|
+
"bytes": 12747
|
|
388
399
|
},
|
|
389
400
|
{
|
|
390
401
|
"name": "OptionWheel",
|
|
@@ -397,7 +408,7 @@
|
|
|
397
408
|
"core",
|
|
398
409
|
"transition"
|
|
399
410
|
],
|
|
400
|
-
"bytes":
|
|
411
|
+
"bytes": 18596
|
|
401
412
|
},
|
|
402
413
|
{
|
|
403
414
|
"name": "Select",
|
|
@@ -409,7 +420,7 @@
|
|
|
409
420
|
"registryDependencies": [
|
|
410
421
|
"core"
|
|
411
422
|
],
|
|
412
|
-
"bytes":
|
|
423
|
+
"bytes": 14187
|
|
413
424
|
},
|
|
414
425
|
{
|
|
415
426
|
"name": "Alert",
|
|
@@ -420,9 +431,10 @@
|
|
|
420
431
|
],
|
|
421
432
|
"registryDependencies": [
|
|
422
433
|
"core",
|
|
423
|
-
"button"
|
|
434
|
+
"button",
|
|
435
|
+
"transition"
|
|
424
436
|
],
|
|
425
|
-
"bytes":
|
|
437
|
+
"bytes": 8414
|
|
426
438
|
},
|
|
427
439
|
{
|
|
428
440
|
"name": "AlertProvider",
|
|
@@ -438,9 +450,10 @@
|
|
|
438
450
|
"registryDependencies": [
|
|
439
451
|
"core",
|
|
440
452
|
"alert",
|
|
441
|
-
"button"
|
|
453
|
+
"button",
|
|
454
|
+
"transition"
|
|
442
455
|
],
|
|
443
|
-
"bytes":
|
|
456
|
+
"bytes": 5787
|
|
444
457
|
},
|
|
445
458
|
{
|
|
446
459
|
"name": "Screen",
|
|
@@ -452,7 +465,7 @@
|
|
|
452
465
|
"registryDependencies": [
|
|
453
466
|
"core"
|
|
454
467
|
],
|
|
455
|
-
"bytes":
|
|
468
|
+
"bytes": 4537
|
|
456
469
|
},
|
|
457
470
|
{
|
|
458
471
|
"name": "List",
|
|
@@ -464,10 +477,12 @@
|
|
|
464
477
|
"registryDependencies": [
|
|
465
478
|
"core",
|
|
466
479
|
"empty-state",
|
|
480
|
+
"button",
|
|
481
|
+
"transition",
|
|
467
482
|
"skeleton",
|
|
468
483
|
"spinner"
|
|
469
484
|
],
|
|
470
|
-
"bytes":
|
|
485
|
+
"bytes": 8602
|
|
471
486
|
},
|
|
472
487
|
{
|
|
473
488
|
"name": "SearchList",
|
|
@@ -480,12 +495,14 @@
|
|
|
480
495
|
"core",
|
|
481
496
|
"input",
|
|
482
497
|
"empty-state",
|
|
498
|
+
"button",
|
|
499
|
+
"transition",
|
|
483
500
|
"skeleton",
|
|
484
501
|
"spinner",
|
|
485
502
|
"icon-button",
|
|
486
503
|
"pressable-scale"
|
|
487
504
|
],
|
|
488
|
-
"bytes":
|
|
505
|
+
"bytes": 14954
|
|
489
506
|
},
|
|
490
507
|
{
|
|
491
508
|
"name": "Toast",
|
|
@@ -498,7 +515,7 @@
|
|
|
498
515
|
"core",
|
|
499
516
|
"transition"
|
|
500
517
|
],
|
|
501
|
-
"bytes":
|
|
518
|
+
"bytes": 6071
|
|
502
519
|
},
|
|
503
520
|
{
|
|
504
521
|
"name": "ToastProvider",
|
|
@@ -516,7 +533,7 @@
|
|
|
516
533
|
"toast",
|
|
517
534
|
"transition"
|
|
518
535
|
],
|
|
519
|
-
"bytes":
|
|
536
|
+
"bytes": 6623
|
|
520
537
|
},
|
|
521
538
|
{
|
|
522
539
|
"name": "DatePicker",
|
|
@@ -531,9 +548,10 @@
|
|
|
531
548
|
"registryDependencies": [
|
|
532
549
|
"core",
|
|
533
550
|
"icon-button",
|
|
534
|
-
"pressable-scale"
|
|
551
|
+
"pressable-scale",
|
|
552
|
+
"transition"
|
|
535
553
|
],
|
|
536
|
-
"bytes":
|
|
554
|
+
"bytes": 14573
|
|
537
555
|
},
|
|
538
556
|
{
|
|
539
557
|
"name": "DateField",
|
|
@@ -552,7 +570,7 @@
|
|
|
552
570
|
"date-picker",
|
|
553
571
|
"button"
|
|
554
572
|
],
|
|
555
|
-
"bytes":
|
|
573
|
+
"bytes": 7729
|
|
556
574
|
},
|
|
557
575
|
{
|
|
558
576
|
"name": "Wizard",
|
|
@@ -567,7 +585,7 @@
|
|
|
567
585
|
"button",
|
|
568
586
|
"transition"
|
|
569
587
|
],
|
|
570
|
-
"bytes":
|
|
588
|
+
"bytes": 7806
|
|
571
589
|
},
|
|
572
590
|
{
|
|
573
591
|
"name": "ThemeToggle",
|
|
@@ -580,7 +598,7 @@
|
|
|
580
598
|
"core",
|
|
581
599
|
"segmented-control"
|
|
582
600
|
],
|
|
583
|
-
"bytes":
|
|
601
|
+
"bytes": 1565
|
|
584
602
|
},
|
|
585
603
|
{
|
|
586
604
|
"name": "NavigationBar",
|
|
@@ -592,7 +610,7 @@
|
|
|
592
610
|
"registryDependencies": [
|
|
593
611
|
"core"
|
|
594
612
|
],
|
|
595
|
-
"bytes":
|
|
613
|
+
"bytes": 10471
|
|
596
614
|
},
|
|
597
615
|
{
|
|
598
616
|
"name": "ReorderableList",
|
|
@@ -604,7 +622,7 @@
|
|
|
604
622
|
"registryDependencies": [
|
|
605
623
|
"core"
|
|
606
624
|
],
|
|
607
|
-
"bytes":
|
|
625
|
+
"bytes": 8397
|
|
608
626
|
},
|
|
609
627
|
{
|
|
610
628
|
"name": "Slides",
|
|
@@ -618,7 +636,7 @@
|
|
|
618
636
|
"transition",
|
|
619
637
|
"gradient"
|
|
620
638
|
],
|
|
621
|
-
"bytes":
|
|
639
|
+
"bytes": 24056
|
|
622
640
|
},
|
|
623
641
|
{
|
|
624
642
|
"name": "Chart",
|
|
@@ -631,7 +649,7 @@
|
|
|
631
649
|
"core",
|
|
632
650
|
"segmented-control"
|
|
633
651
|
],
|
|
634
|
-
"bytes":
|
|
652
|
+
"bytes": 93020
|
|
635
653
|
}
|
|
636
654
|
]
|
|
637
655
|
}
|
package/registry/info-row.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "molecules/InfoRow.tsx",
|
|
12
|
-
"content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors } from '../theme/UIProvider';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\nimport { Avatar } from '../atoms/Avatar';\n\nexport interface InfoRowProps {\n icon: IconName;\n label: string;\n value: string | null | undefined;\n placeholder: string;\n style?: StyleProp<ViewStyle>;\n}\n\nconst useStyles = createStyles((theme) => ({\n row: { flexDirection: 'row', alignItems: 'center'
|
|
12
|
+
"content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors } from '../theme/UIProvider';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\nimport { Avatar } from '../atoms/Avatar';\n\nexport interface InfoRowProps {\n /** Icon that identifies the kind of data at a glance (decorative for screen readers). */\n icon: IconName;\n /** What the value is (\"Email\", \"Address\"). */\n label: string;\n /** The data itself. Empty, `null` or `undefined` shows `placeholder`. */\n value: string | null | undefined;\n /** Text shown, in italics, when there is no value (\"No phone number\"). */\n placeholder: string;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\nconst ICON_BADGE = 40;\nconst ICON_SIZE = 20;\n\nconst useStyles = createStyles((theme) => ({\n row: { flexDirection: 'row', alignItems: 'center', gap: theme.tokens.spacing.md },\n textContainer: { flex: 1 },\n label: {\n fontSize: theme.tokens.fontSize.sm,\n lineHeight: theme.tokens.lineHeight.sm,\n color: theme.colors.textLight,\n marginBottom: theme.tokens.spacing.xxs,\n },\n value: {\n fontSize: theme.tokens.fontSize.md,\n lineHeight: theme.tokens.lineHeight.md,\n color: theme.colors.text,\n fontWeight: theme.tokens.fontWeight.medium,\n },\n placeholder: { color: theme.colors.textLight, fontStyle: 'italic', fontWeight: theme.tokens.fontWeight.regular },\n}));\n\n/**\n * InfoRow\n * Circular icon on the left + stacked label/value on the right. Shows\n * `placeholder` in italics when there is no value. Meant for detail modals.\n *\n * Gestalt, proximity: label and value sit 2pt apart and the icon a token\n * further, so each row reads as one fact; stack rows with a larger gap.\n * Similarity: every label shares the small muted style and every value the\n * strong one, so a list of rows scans by column. A missing value changes\n * style (muted italics) so it can't be mistaken for data.\n *\n * Accessibility: the row is a single element (\"Email, jane@example.com\");\n * the icon is decorative.\n */\nexport const InfoRow = memo(({ icon, label, value, placeholder, style, testID }: InfoRowProps) => {\n const colors = useColors();\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n const shown = value || placeholder;\n\n return (\n <View style={[styles.row, style]} accessible accessibilityLabel={`${label}, ${shown}`} testID={testID}>\n <Avatar size={ICON_BADGE} backgroundColor={colors.inputBackground}>\n <Icon name={icon} size={ICON_SIZE} color={colors.textLight} />\n </Avatar>\n <View style={styles.textContainer}>\n <Text allowFontScaling={allowFontScaling} style={styles.label}>\n {label}\n </Text>\n <Text allowFontScaling={allowFontScaling} style={[styles.value, !value && styles.placeholder]}>\n {shown}\n </Text>\n </View>\n </View>\n );\n});\nInfoRow.displayName = 'InfoRow';\n"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"registryDependencies": [
|
package/registry/input.json
CHANGED
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "atoms/Input.tsx",
|
|
12
|
-
"content": "import React, { memo, useRef, useState } from 'react';\nimport {\n ActivityIndicator,\n Animated,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n type StyleProp,\n type TextInputProps,\n type ViewStyle,\n} from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors } from '../theme/UIProvider';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\n\nexport interface InputProps extends Omit<TextInputProps, 'style'> {\n label?: string;\n /** Shows an asterisk next to the label. Purely visual, doesn't validate anything. */\n required?: boolean;\n error?: string;\n containerStyle?: StyleProp<ViewStyle>;\n style?: TextInputProps['style'];\n leftIconName?: IconName;\n rightIconName?: IconName;\n onRightIconPress?: () => void;\n isPassword?: boolean;\n isLoading?: boolean;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { marginBottom: theme.tokens.spacing.lg, width: '100%' },\n label: {\n marginBottom: theme.tokens.spacing.sm,\n fontSize: theme.tokens.fontSize.md,\n fontWeight: theme.tokens.fontWeight.medium,\n color: theme.colors.text,\n },\n required: { color: theme.colors.errorText },\n inputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: theme.colors.inputBackground,\n borderRadius: theme.tokens.radius.lg,\n borderWidth: 2,\n minHeight: 50,\n },\n input: {\n flex: 1,\n paddingVertical: theme.tokens.spacing.md,\n paddingHorizontal: theme.tokens.spacing.lg,\n fontSize: theme.tokens.fontSize.lg,\n color: theme.colors.text,\n },\n leftIcon: { marginLeft: theme.tokens.spacing.lg, marginRight: -theme.tokens.spacing.xs },\n rightIcon: { padding: theme.tokens.spacing.sm + 2, marginRight: theme.tokens.spacing.xs },\n errorText: { marginTop: theme.tokens.spacing.xs, fontSize: theme.tokens.fontSize.sm, color: theme.colors.errorText },\n}));\n\n/**\n * Input\n * El borde anima color entre border/primary/error con Animated (no\n * useNativeDriver: los navegadores de color en RN sin Fabric solo son\n * confiables en el hilo de JS; el costo es despreciable, se anima un borde).\n */\nexport const Input = memo(\n ({\n label,\n required = false,\n error,\n containerStyle,\n leftIconName,\n rightIconName,\n onRightIconPress,\n isPassword = false,\n isLoading = false,\n style,\n onFocus,\n onBlur,\n testID,\n ...props\n }: InputProps) => {\n const colors = useColors();\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n const [isFocused, setIsFocused] = useState(false);\n const [showPassword, setShowPassword] = useState(false);\n const focusProgress = useRef(new Animated.Value(0)).current;\n\n const handleFocus: TextInputProps['onFocus'] = (e) => {\n setIsFocused(true);\n Animated.timing(focusProgress, { toValue: 1, duration: 200, useNativeDriver: false }).start();\n onFocus?.(e);\n };\n\n const handleBlur: TextInputProps['onBlur'] = (e) => {\n setIsFocused(false);\n Animated.timing(focusProgress, { toValue: 0, duration: 200, useNativeDriver: false }).start();\n onBlur?.(e);\n };\n\n const borderColor = error\n ? colors.error\n : focusProgress.interpolate({ outputRange: [colors.border, colors.primary], inputRange: [0, 1] });\n\n return (\n <View style={[styles.container, containerStyle]} testID={testID}>\n {label && (\n <Text allowFontScaling={allowFontScaling} style={styles.label}>\n {label}\n {required && <Text style={styles.required}> *</Text>}\n </Text>\n )}\n\n <Animated.View style={[styles.inputWrapper, { borderColor }]}>\n {leftIconName && <Icon name={leftIconName} size={20} color={colors.textLight} style={styles.leftIcon} />}\n\n <TextInput\n style={[styles.input, style]}\n placeholderTextColor={colors.textLight}\n onFocus={handleFocus}\n onBlur={handleBlur}\n secureTextEntry={isPassword && !showPassword}\n allowFontScaling={allowFontScaling}\n textAlignVertical=\"center\"\n accessibilityLabel={label ?? props.placeholder}\n {...props}\n />\n\n {isLoading ? (\n <View style={styles.rightIcon}>\n <ActivityIndicator size=\"small\" color={colors.primary} />\n </View>\n ) : isPassword ? (\n <TouchableOpacity\n onPress={() => setShowPassword((v) => !v)}\n style={styles.rightIcon}\n accessibilityRole=\"button\"\n accessibilityLabel={showPassword ? 'Hide password' : 'Show password'}\n >\n <Icon name={showPassword ? 'eye-off' : 'eye'} size={20} color={colors.textLight} />\n </TouchableOpacity>\n ) : rightIconName ? (\n <TouchableOpacity\n onPress={onRightIconPress}\n style={styles.rightIcon}\n disabled={!onRightIconPress}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Clear\"\n >\n <Icon name={rightIconName} size={20} color={colors.textLight} />\n </TouchableOpacity>\n ) : null}\n </Animated.View>\n\n {!!error && (\n <Text allowFontScaling={allowFontScaling} style={styles.errorText}>\n {error}\n </Text>\n )}\n </View>\n );\n }\n);\nInput.displayName = 'Input';\n"
|
|
12
|
+
"content": "import React, { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState, type ComponentRef } from 'react';\nimport {\n AccessibilityInfo,\n ActivityIndicator,\n Animated,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n type StyleProp,\n type TextInputProps,\n type ViewStyle,\n} from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors, useLabels, useTheme } from '../theme/UIProvider';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\nimport { useKeyboardField } from '../theme/useKeyboardField';\nimport { validateInputValue, type InputRules } from './inputValidation';\n\nexport type { InputRules, InputRuleValue } from './inputValidation';\n\n/** The TextInput instance, plus `validate()` to check the field on demand (e.g. on submit). */\nexport type InputHandle = ComponentRef<typeof TextInput> & {\n /** Runs the rules, shows the error (if any) and returns it. */\n validate: () => string | undefined;\n};\n\nexport interface InputProps extends Omit<TextInputProps, 'style'> {\n /** Text above the field; also its accessible name (falls back to `placeholder`). */\n label?: string;\n /** Shows an asterisk next to the label, and an empty value fails validation (`labels.requiredError`). */\n required?: boolean;\n /** Error shown under the field. Takes precedence over the built-in validation. */\n error?: string;\n /** Built-in validation: length limits, a pattern and/or a custom check. */\n rules?: InputRules;\n /**\n * When the rules run: on leaving the field, on every change, or only through\n * `ref.validate()`. Once an error shows, it re-checks on every change so it\n * clears as soon as the value is fixed. @default 'blur'\n */\n validateOn?: 'blur' | 'change' | 'submit';\n /** Called with the error (or undefined) every time the rules run. */\n onValidate?: (error: string | undefined) => void;\n /** Style of the outer wrapper (label, field and error). */\n containerStyle?: StyleProp<ViewStyle>;\n style?: TextInputProps['style'];\n /** Icon shown inside the field, to the left of the text. */\n leftIconName?: IconName;\n /** Icon button inside the field, on the right. Ignored with `isPassword` or `isLoading`. */\n rightIconName?: IconName;\n /** Called when the `rightIconName` button is pressed. Without it the button is disabled. */\n onRightIconPress?: () => void;\n /** Accessible name of the `rightIconName` button. @default labels.clear */\n rightIconAccessibilityLabel?: string;\n /** Hides the text and adds an eye button to show or hide it. @default false */\n isPassword?: boolean;\n /** Shows a small spinner on the right, in place of the right icon. @default false */\n isLoading?: boolean;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { marginBottom: theme.tokens.spacing.lg, width: '100%' },\n label: {\n marginBottom: theme.tokens.spacing.sm,\n fontSize: theme.tokens.fontSize.md,\n fontWeight: theme.tokens.fontWeight.medium,\n color: theme.colors.text,\n },\n required: { color: theme.colors.errorText },\n inputWrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: theme.colors.inputBackground,\n borderRadius: theme.tokens.radius.lg,\n borderWidth: 2,\n minHeight: 50,\n },\n input: {\n flex: 1,\n paddingVertical: theme.tokens.spacing.md,\n paddingHorizontal: theme.tokens.spacing.lg,\n fontSize: theme.tokens.fontSize.lg,\n color: theme.colors.text,\n },\n leftIcon: { marginLeft: theme.tokens.spacing.lg, marginRight: -theme.tokens.spacing.xs },\n // 20 icon + md padding (12) per side = 44pt touch area (Fitts).\n rightIcon: { padding: theme.tokens.spacing.md, marginRight: theme.tokens.spacing.xxs },\n // Read-only: no fill, so it doesn't look like a field you can tap\n // (affordance), but the text keeps its contrast to stay readable.\n readOnly: { backgroundColor: 'transparent' },\n errorText: { marginTop: theme.tokens.spacing.xs, fontSize: theme.tokens.fontSize.sm, color: theme.colors.errorText },\n}));\n\n/**\n * Input\n * The border animates its color between border/primary/error with Animated\n * (no useNativeDriver: color drivers in RN without Fabric are only reliable\n * on the JS thread; the cost is negligible, it animates one border).\n *\n * Gestalt:\n * - Proximity: label (`spacing.sm` above) and error (`spacing.xs` below) sit\n * right next to the field and the next field is `spacing.lg` away: each\n * label and its error read with their field, not with the neighbor.\n * - Common region: left icon, text and right action share the same border\n * and background, so they read as a single control.\n * - Focal point: the border turns `primary` on focus and `error` on error;\n * the error is also written out (not just color).\n *\n * Accessibility: the accessible name includes \"required\" when applicable, the\n * error is announced as a hint, and the eye and right-action buttons have a\n * 44pt touch area and texts from `labels` (translatable).\n *\n * Keyboard: on focus it registers with the root UIProvider's host, which\n * lifts the app just enough for the whole field (label, field and error) to\n * sit above the keyboard — without depending on Screen or a ScrollView. What\n * you type is always visible.\n *\n * Validation: `required` and `rules` run when leaving the field (`validateOn`),\n * the error appears in writing, is announced to the screen reader and, once\n * visible, is revalidated on every change so it disappears as soon as it is\n * fixed. An `error` passed by hand overrides the internal validation.\n */\nexport const Input = memo(\n forwardRef<InputHandle, InputProps>(({\n label,\n required = false,\n error: errorProp,\n rules,\n validateOn = 'blur',\n onValidate,\n onChangeText,\n containerStyle,\n leftIconName,\n rightIconName,\n onRightIconPress,\n rightIconAccessibilityLabel,\n isPassword = false,\n isLoading = false,\n style,\n onFocus,\n onBlur,\n testID,\n ...props\n }, ref) => {\n const colors = useColors();\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n const labels = useLabels();\n const theme = useTheme();\n const readOnly = props.editable === false;\n const [isFocused, setIsFocused] = useState(false);\n const [showPassword, setShowPassword] = useState(false);\n const focusProgress = useRef(new Animated.Value(0)).current;\n const inputRef = useRef<ComponentRef<typeof TextInput>>(null);\n const containerRef = useRef<ComponentRef<typeof View>>(null);\n const [internalError, setInternalError] = useState<string | undefined>(undefined);\n // Last known value: the controlled one (`value`) or what was typed (uncontrolled).\n const valueRef = useRef(props.value ?? props.defaultValue ?? '');\n if (props.value !== undefined) valueRef.current = props.value;\n const error = errorProp ?? internalError;\n\n const runValidation = () => {\n const next = validateInputValue(valueRef.current, { required, rules }, labels);\n setInternalError(next);\n onValidate?.(next);\n return next;\n };\n\n useImperativeHandle(ref, () => Object.assign(inputRef.current as ComponentRef<typeof TextInput>, { validate: runValidation }));\n\n // The new error is announced right away, not only as a hint when returning to the field.\n useEffect(() => {\n if (internalError && errorProp === undefined) AccessibilityInfo.announceForAccessibility(internalError);\n }, [internalError, errorProp]);\n\n const keyboard = useKeyboardField(containerRef);\n\n // If the error appears or changes while the field is focused, the block grows:\n // a readjustment is requested so the error line isn't covered either.\n useEffect(() => {\n if (isFocused) keyboard.focus();\n }, [error, isFocused, keyboard]);\n\n const handleFocus: TextInputProps['onFocus'] = (e) => {\n setIsFocused(true);\n keyboard.focus();\n Animated.timing(focusProgress, { toValue: 1, duration: theme.tokens.duration.base, useNativeDriver: false }).start();\n onFocus?.(e);\n };\n\n const handleBlur: TextInputProps['onBlur'] = (e) => {\n setIsFocused(false);\n keyboard.blur();\n if (validateOn === 'blur') runValidation();\n Animated.timing(focusProgress, { toValue: 0, duration: theme.tokens.duration.base, useNativeDriver: false }).start();\n onBlur?.(e);\n };\n\n const handleChangeText = (text: string) => {\n valueRef.current = text;\n onChangeText?.(text);\n if (validateOn === 'change' || internalError) runValidation();\n };\n\n const borderColor = error\n ? colors.error\n : focusProgress.interpolate({ outputRange: [colors.border, colors.primary], inputRange: [0, 1] });\n\n return (\n <View ref={containerRef} style={[styles.container, containerStyle]} testID={testID}>\n {!!label && (\n <Text allowFontScaling={allowFontScaling} style={styles.label}>\n {label}\n {required && <Text style={styles.required}> *</Text>}\n </Text>\n )}\n\n <Animated.View style={[styles.inputWrapper, readOnly && styles.readOnly, { borderColor }]}>\n {leftIconName && <Icon name={leftIconName} size={20} color={colors.textLight} style={styles.leftIcon} />}\n\n <TextInput\n ref={inputRef}\n style={[styles.input, style]}\n placeholderTextColor={colors.textLight}\n onFocus={handleFocus}\n onBlur={handleBlur}\n secureTextEntry={isPassword && !showPassword}\n allowFontScaling={allowFontScaling}\n textAlignVertical=\"center\"\n accessibilityLabel={\n label || props.placeholder ? `${label ?? props.placeholder}${required ? `, ${labels.required}` : ''}` : undefined\n }\n accessibilityHint={error || undefined}\n accessibilityState={{ disabled: readOnly, busy: isLoading }}\n {...props}\n onChangeText={handleChangeText}\n />\n\n {isLoading ? (\n <View style={styles.rightIcon}>\n <ActivityIndicator size=\"small\" color={colors.primary} />\n </View>\n ) : isPassword ? (\n <TouchableOpacity\n onPress={() => setShowPassword((v) => !v)}\n style={styles.rightIcon}\n accessibilityRole=\"button\"\n accessibilityLabel={showPassword ? labels.hidePassword : labels.showPassword}\n >\n <Icon name={showPassword ? 'eye-off' : 'eye'} size={20} color={colors.textLight} />\n </TouchableOpacity>\n ) : rightIconName ? (\n <TouchableOpacity\n onPress={onRightIconPress}\n style={styles.rightIcon}\n disabled={!onRightIconPress}\n accessibilityRole=\"button\"\n accessibilityLabel={rightIconAccessibilityLabel ?? labels.clear}\n >\n <Icon name={rightIconName} size={20} color={colors.textLight} />\n </TouchableOpacity>\n ) : null}\n </Animated.View>\n\n {!!error && (\n <Text allowFontScaling={allowFontScaling} style={styles.errorText}>\n {error}\n </Text>\n )}\n </View>\n );\n })\n);\nInput.displayName = 'Input';\n"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"path": "atoms/inputValidation.ts",
|
|
16
|
+
"content": "import type { Labels } from '../theme/labels';\n\n/** A rule's value, optionally with its own message instead of the default label. */\nexport type InputRuleValue<T> = T | { value: T; message: string };\n\nexport interface InputRules {\n /** Fewer characters than this is an error. Message: `labels.minLengthError`. */\n minLength?: InputRuleValue<number>;\n /** More characters than this is an error. Message: `labels.maxLengthError`. */\n maxLength?: InputRuleValue<number>;\n /** The value must match. Message: `labels.patternError`. */\n pattern?: InputRuleValue<RegExp>;\n /**\n * Custom check, run last. Return an error message, or `false` for\n * `labels.patternError`; anything else means valid.\n */\n validate?: (value: string) => string | boolean | null | undefined;\n}\n\nfunction unpack<T>(rule: InputRuleValue<T>): { value: T; message?: string } {\n return typeof rule === 'object' && rule !== null && 'value' in rule && 'message' in rule\n ? (rule as { value: T; message: string })\n : { value: rule as T };\n}\n\n/**\n * Error for the value, or undefined if it is valid. Order: required, min\n * length, max length, pattern, custom validation — a single error is shown,\n * the first one. An empty optional field is valid: the other rules don't run on nothing.\n */\nexport function validateInputValue(\n value: string,\n { required, rules }: { required?: boolean; rules?: InputRules },\n labels: Labels\n): string | undefined {\n if (value.trim() === '') return required ? labels.requiredError : undefined;\n if (!rules) return undefined;\n\n if (rules.minLength !== undefined) {\n const { value: n, message } = unpack(rules.minLength);\n if (value.length < n) return message ?? labels.minLengthError.replace('{n}', String(n));\n }\n if (rules.maxLength !== undefined) {\n const { value: n, message } = unpack(rules.maxLength);\n if (value.length > n) return message ?? labels.maxLengthError.replace('{n}', String(n));\n }\n if (rules.pattern !== undefined) {\n const { value: re, message } = unpack(rules.pattern);\n // A RegExp with the `g` flag keeps lastIndex between calls: reset it.\n re.lastIndex = 0;\n if (!re.test(value)) return message ?? labels.patternError;\n }\n if (rules.validate) {\n const result = rules.validate(value);\n if (typeof result === 'string' && result !== '') return result;\n if (result === false) return labels.patternError;\n }\n return undefined;\n}\n"
|
|
13
17
|
}
|
|
14
18
|
],
|
|
15
19
|
"registryDependencies": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "atoms/KeyValueRow.tsx",
|
|
12
|
-
"content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling } from '../theme/UIProvider';\n\nexport interface KeyValueRowProps {\n label: React.ReactNode;\n value: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n valueStyle?: StyleProp<TextStyle>;\n}\n\nconst useStyles = createStyles((theme) => ({\n row: {
|
|
12
|
+
"content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling } from '../theme/UIProvider';\n\nexport interface KeyValueRowProps {\n /** Left side. A string or number gets the default label style; any other node renders as is. */\n label: React.ReactNode;\n /** Right side. A string or number gets the default value style (tabular digits); any other node renders as is. */\n value: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n /** Only applies when `label` is a string or number. */\n labelStyle?: StyleProp<TextStyle>;\n /** Only applies when `value` is a string or number. */\n valueStyle?: StyleProp<TextStyle>;\n testID?: string;\n}\n\nconst useStyles = createStyles((theme) => ({\n row: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: theme.tokens.spacing.md,\n },\n // Two texts: aligned on the first line, so a value that wraps onto\n // several lines still reads next to its label.\n rowText: { alignItems: 'baseline' },\n // The label keeps its natural width up to half the row; the value\n // shrinks and wraps instead of pushing the row off the screen.\n label: {\n flexShrink: 0,\n maxWidth: '50%',\n fontSize: theme.tokens.fontSize.sm,\n lineHeight: theme.tokens.lineHeight.sm,\n fontWeight: theme.tokens.fontWeight.semibold,\n color: theme.colors.textLight,\n },\n value: {\n flexShrink: 1,\n fontSize: theme.tokens.fontSize.sm,\n lineHeight: theme.tokens.lineHeight.sm,\n textAlign: 'right',\n color: theme.colors.text,\n // Fixed-width digits: in a column of amounts the figures line up\n // across rows.\n fontVariant: ['tabular-nums'],\n },\n}));\n\nconst isPrimitive = (node: React.ReactNode): node is string | number =>\n typeof node === 'string' || typeof node === 'number';\n\n/**\n * KeyValueRow\n * Label (left) / value (right) row. If label/value are a string or number,\n * they render with the default style; if they already come wrapped in a\n * custom component, they are kept as is.\n *\n * Gestalt, alignment and similarity: labels share color and weight and values\n * align to the right edge with tabular digits, so a stack of rows reads as\n * two columns — what on the left, how much on the right.\n * With a text label and value, the row is a single accessibility node\n * (\"Subtotal, $300.00\"); if either is a custom node (a Badge, a button) it\n * isn't merged, so as not to hide what that node announces or lets you tap.\n */\nexport const KeyValueRow = memo(\n ({ label, value, style, labelStyle, valueStyle, testID }: KeyValueRowProps) => {\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n const merge = isPrimitive(label) && isPrimitive(value);\n return (\n <View style={[styles.row, merge && styles.rowText, style]} accessible={merge || undefined} testID={testID}>\n {isPrimitive(label) ? (\n <Text allowFontScaling={allowFontScaling} style={[styles.label, labelStyle]}>\n {label}\n </Text>\n ) : (\n label\n )}\n {isPrimitive(value) ? (\n <Text allowFontScaling={allowFontScaling} style={[styles.value, valueStyle]}>\n {value}\n </Text>\n ) : (\n value\n )}\n </View>\n );\n }\n);\nKeyValueRow.displayName = 'KeyValueRow';\n"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"registryDependencies": [
|
package/registry/list.json
CHANGED
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "organisms/List.tsx",
|
|
12
|
-
"content": "import React, { useCallback } from 'react';\nimport { FlatList, RefreshControl, View, type FlatListProps, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useColors, useLabels } from '../theme/UIProvider';\nimport { EmptyState } from '../atoms/EmptyState';\nimport { Skeleton } from '../atoms/Skeleton';\nimport { Spinner } from '../atoms/Spinner';\nimport type { IconName } from '../icons/types';\n\nexport interface ListProps<T> {\n data: T[];\n keyExtractor: (item: T, index: number) => string;\n renderItem: FlatListProps<T>['renderItem'];\n\n /** Initial load: while true and there's no data, placeholders are shown. */\n isLoading: boolean;\n /** Reload with data already on screen (pull-to-refresh). @default false */\n isRefreshing?: boolean;\n isLoadingMore?: boolean;\n /** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */\n isReady?: boolean;\n loadingText?: string;\n loadingMoreText?: string;\n\n /** Ghost rows for the initial load. @default 6 */\n skeletonCount?: number;\n /** Custom placeholder, to match the real shape of the item. */\n renderSkeletonItem?: () => React.ReactElement;\n\n onEndReached?: () => void;\n onEndReachedThreshold?: number;\n onRefresh?: () => void;\n\n emptyTitle?: string;\n emptyDescription?: string;\n emptyIconName?: IconName;\n\n ListHeaderComponent?: FlatListProps<T>['ListHeaderComponent'];\n ListFooterComponent?: FlatListProps<T>['ListFooterComponent'];\n\n contentContainerStyle?: ViewStyle;\n containerStyle?: ViewStyle;\n\n /** List component to use (FlashList, etc). @default FlatList */\n ListComponent?: React.ComponentType<any>;\n listProps?: Record<string, unknown>;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { flex: 1, backgroundColor: theme.colors.background },\n listContent: { padding: theme.tokens.spacing.md },\n footerLoader: { paddingVertical: theme.tokens.spacing.xl, alignItems: 'center' },\n skeletonRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.tokens.spacing.md,\n padding: theme.tokens.spacing.md,\n },\n skeletonText: { flex: 1
|
|
12
|
+
"content": "import React, { useCallback } from 'react';\nimport { FlatList, RefreshControl, View, type FlatListProps, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useColors, useLabels } from '../theme/UIProvider';\nimport { EmptyState } from '../atoms/EmptyState';\nimport { Skeleton } from '../atoms/Skeleton';\nimport { Spinner } from '../atoms/Spinner';\nimport type { IconName } from '../icons/types';\n\nexport interface ListProps<T> {\n /** Items to render. */\n data: T[];\n /** Stable key per item. */\n keyExtractor: (item: T, index: number) => string;\n /** Renders each row (same as FlatList's `renderItem`). */\n renderItem: FlatListProps<T>['renderItem'];\n\n /** Initial load: while true and there's no data, placeholders are shown. */\n isLoading: boolean;\n /** Reload with data already on screen (pull-to-refresh). @default false */\n isRefreshing?: boolean;\n /** Shows a spinner in the footer while the next page loads. @default false */\n isLoadingMore?: boolean;\n /** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */\n isReady?: boolean;\n /** Text of the fullscreen spinner shown while `isReady` is false. @default labels.loading */\n loadingText?: string;\n /** Text of the footer spinner shown with `isLoadingMore`. @default labels.loadingMore */\n loadingMoreText?: string;\n\n /** Ghost rows for the initial load. @default 6 */\n skeletonCount?: number;\n /** Custom placeholder, to match the real shape of the item. */\n renderSkeletonItem?: () => React.ReactElement;\n\n /** Called when scrolling gets close to the end (to load the next page). */\n onEndReached?: () => void;\n /** How close to the end `onEndReached` fires, in visible lengths of the list. @default 0.3 */\n onEndReachedThreshold?: number;\n /** Enables pull-to-refresh and is called when the user pulls. */\n onRefresh?: () => void;\n\n /** Title of the empty state. @default labels.noResultsTitle */\n emptyTitle?: string;\n /** Supporting line of the empty state. @default labels.noResultsDescription */\n emptyDescription?: string;\n /** Icon of the empty state. @default 'search' */\n emptyIconName?: IconName;\n\n /** Rendered above the items, inside the scroll. */\n ListHeaderComponent?: FlatListProps<T>['ListHeaderComponent'];\n /** Rendered below the items, before the pagination loader. */\n ListFooterComponent?: FlatListProps<T>['ListFooterComponent'];\n\n /** Style of the list's content container (also used by the skeleton). */\n contentContainerStyle?: ViewStyle;\n /** Style of the outer wrapper. */\n containerStyle?: ViewStyle;\n\n /** List component to use (FlashList, etc). @default FlatList */\n ListComponent?: React.ComponentType<any>;\n /** Extra props passed to `ListComponent`; they override the ones set here. */\n listProps?: Record<string, unknown>;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { flex: 1, backgroundColor: theme.colors.background },\n listContent: { padding: theme.tokens.spacing.md },\n footerLoader: { paddingVertical: theme.tokens.spacing.xl, alignItems: 'center' },\n skeletonRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.tokens.spacing.md,\n padding: theme.tokens.spacing.md,\n },\n skeletonText: { flex: 1 },\n empty: { marginTop: theme.tokens.spacing.xxxl },\n}));\n\n/** Same as Avatar's default size: the placeholder row matches a typical avatar row. */\nconst SKELETON_AVATAR = 44;\n\nfunction renderHeader(Header: ListProps<unknown>['ListHeaderComponent']) {\n if (!Header) return null;\n return typeof Header === 'function' ? <Header /> : (Header as React.ReactElement);\n}\n\n/**\n * List\n * List with loading/pagination/empty states handled, without being tied to\n * expo-router or FlashList: `ListComponent` lets you inject any of them\n * (React Native's own FlatList by default).\n *\n * Design:\n * - Continuity (Gestalt): the first load shows placeholders shaped like the\n * rows and keeps `ListHeaderComponent` in place, so nothing jumps when the\n * data arrives.\n * - Doherty threshold: every wait has immediate feedback (placeholders,\n * pull-to-refresh spinner, footer loader while paging), and \"no results\"\n * only appears once it is known there is nothing.\n * - Jakob's law: the native pull-to-refresh and infinite scroll people\n * already know from other apps.\n */\nexport function List<T>({\n data,\n keyExtractor,\n renderItem,\n isLoading,\n isRefreshing = false,\n isLoadingMore = false,\n isReady = true,\n loadingText,\n loadingMoreText,\n skeletonCount = 6,\n renderSkeletonItem,\n onEndReached,\n onEndReachedThreshold = 0.3,\n onRefresh,\n emptyTitle,\n emptyDescription,\n emptyIconName,\n ListHeaderComponent,\n ListFooterComponent,\n contentContainerStyle,\n containerStyle,\n ListComponent = FlatList,\n listProps,\n}: ListProps<T>) {\n const colors = useColors();\n const styles = useStyles();\n const labels = useLabels();\n const resolvedLoadingText = loadingText ?? labels.loading;\n const resolvedLoadingMoreText = loadingMoreText ?? labels.loadingMore;\n\n const isInitialLoading = isLoading && data.length === 0;\n\n // The custom footer and the pagination loader coexist: previously the first\n // covered the second and the list stopped signaling it was fetching more.\n const renderFooter = useCallback(() => {\n const custom =\n typeof ListFooterComponent === 'function' ? (\n <ListFooterComponent />\n ) : (\n (ListFooterComponent as React.ReactElement | undefined) ?? null\n );\n\n return (\n <>\n {custom}\n {isLoadingMore && (\n <View style={styles.footerLoader}>\n <Spinner text={resolvedLoadingMoreText} fullscreen={false} />\n </View>\n )}\n </>\n );\n }, [isLoadingMore, resolvedLoadingMoreText, ListFooterComponent, styles.footerLoader]);\n\n // Empty only once it is known there is nothing: during the initial load\n // placeholders are shown, not \"no results\".\n const renderEmpty = useCallback(() => {\n if (isLoading || isRefreshing) return null;\n return <EmptyState title={emptyTitle} description={emptyDescription} iconName={emptyIconName} style={styles.empty} />;\n }, [isLoading, isRefreshing, emptyTitle, emptyDescription, emptyIconName, styles.empty]);\n\n if (!isReady) {\n return (\n <View style={[styles.container, containerStyle]}>\n <Spinner text={resolvedLoadingText} />\n </View>\n );\n }\n\n if (isInitialLoading) {\n return (\n <View style={[styles.container, containerStyle]}>\n <View style={[styles.listContent, contentContainerStyle]}>\n {/* Same padding as the loaded list, and outside the group below so it\n stays reachable (a search field above the list, say). */}\n {renderHeader(ListHeaderComponent as ListProps<unknown>['ListHeaderComponent'])}\n <View\n testID=\"list-skeleton\"\n // The placeholders themselves are hidden from screen readers: the\n // group announces that the list is loading instead of silence.\n accessible\n accessibilityRole=\"progressbar\"\n accessibilityLabel={resolvedLoadingText}\n accessibilityState={{ busy: true }}\n >\n {Array.from({ length: skeletonCount }, (_, i) => (\n <React.Fragment key={i}>\n {renderSkeletonItem?.() ?? (\n <View style={styles.skeletonRow}>\n <Skeleton variant=\"circle\" width={SKELETON_AVATAR} />\n <View style={styles.skeletonText}>\n <Skeleton variant=\"text\" width=\"60%\" />\n <Skeleton variant=\"text\" width=\"35%\" />\n </View>\n </View>\n )}\n </React.Fragment>\n ))}\n </View>\n </View>\n </View>\n );\n }\n\n return (\n <View style={[styles.container, containerStyle]}>\n <ListComponent\n data={data}\n keyExtractor={keyExtractor}\n renderItem={renderItem}\n contentContainerStyle={[styles.listContent, contentContainerStyle]}\n onEndReached={onEndReached}\n onEndReachedThreshold={onEndReachedThreshold}\n ListHeaderComponent={ListHeaderComponent}\n ListFooterComponent={renderFooter}\n ListEmptyComponent={renderEmpty}\n refreshControl={\n onRefresh ? (\n <RefreshControl\n refreshing={isRefreshing}\n onRefresh={onRefresh}\n colors={[colors.primary]}\n tintColor={colors.primary}\n />\n ) : undefined\n }\n {...listProps}\n />\n </View>\n );\n}\n"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"registryDependencies": [
|
|
16
16
|
"core",
|
|
17
17
|
"empty-state",
|
|
18
|
+
"button",
|
|
19
|
+
"transition",
|
|
18
20
|
"skeleton",
|
|
19
21
|
"spinner"
|
|
20
22
|
]
|