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
|
@@ -3,19 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.BUILT_IN_ICON_NAMES = void 0;
|
|
7
|
+
exports.onColor = onColor;
|
|
6
8
|
exports.renderDefaultIcon = renderDefaultIcon;
|
|
7
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
10
|
var _reactNative = require("react-native");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Default glyphs drawn with RN primitives (View + border + transform).
|
|
15
|
+
* Zero dependencies, zero fonts, zero async loading. They cover what the
|
|
16
|
+
* library needs internally (checkbox, Select chevrons, password toggle in
|
|
17
|
+
* Input, etc) plus a basic set for apps (menu, home, user…).
|
|
18
|
+
* For a complete set, the consumer injects their own via
|
|
19
|
+
* <UIProvider icons={...}> or the `icon` prop.
|
|
17
20
|
*/
|
|
18
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Color of the inner glyph of a filled icon (alert, warning): black or
|
|
24
|
+
* white depending on the fill's luminance. A fixed white disappeared over
|
|
25
|
+
* dark mode's light fills (figure and ground). Non-hex colors (rgb(),
|
|
26
|
+
* names) fall back to white, the common case over saturated accents.
|
|
27
|
+
*/
|
|
28
|
+
function onColor(fill) {
|
|
29
|
+
const hex = fill.trim().replace('#', '');
|
|
30
|
+
const full = hex.length === 3 ? hex.split('').map(c => c + c).join('') : hex.slice(0, 6);
|
|
31
|
+
if (!/^[0-9a-fA-F]{6}$/.test(full)) return '#fff';
|
|
32
|
+
const channel = i => {
|
|
33
|
+
const c = parseInt(full.slice(i, i + 2), 16) / 255;
|
|
34
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
35
|
+
};
|
|
36
|
+
const r = channel(0);
|
|
37
|
+
const g = channel(2);
|
|
38
|
+
const b = channel(4);
|
|
39
|
+
const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
40
|
+
// Threshold where contrast with black exceeds contrast with white.
|
|
41
|
+
return luminance > 0.179 ? '#000' : '#fff';
|
|
42
|
+
}
|
|
19
43
|
const Chevron = /*#__PURE__*/(0, _react.memo)(({
|
|
20
44
|
size,
|
|
21
45
|
color,
|
|
@@ -157,13 +181,13 @@ const PlusMinus = /*#__PURE__*/(0, _react.memo)(({
|
|
|
157
181
|
PlusMinus.displayName = 'PlusMinus';
|
|
158
182
|
|
|
159
183
|
/**
|
|
160
|
-
*
|
|
184
|
+
* Circle with a typographic glyph inside (!, i, ?).
|
|
161
185
|
*
|
|
162
|
-
*
|
|
163
|
-
* Views:
|
|
164
|
-
* "
|
|
165
|
-
*
|
|
166
|
-
*
|
|
186
|
+
* Uses <Text> with the system font instead of composing the glyph from
|
|
187
|
+
* Views: it is still zero-dependency (it loads no font), and "i" vs "!" vs
|
|
188
|
+
* "?" stay unambiguous. Drawing them with bars and dots gave an "info"
|
|
189
|
+
* identical to an inverted "!", which is exactly what an information icon
|
|
190
|
+
* must not convey.
|
|
167
191
|
*/
|
|
168
192
|
const Circle = /*#__PURE__*/(0, _react.memo)(({
|
|
169
193
|
size,
|
|
@@ -186,7 +210,7 @@ const Circle = /*#__PURE__*/(0, _react.memo)(({
|
|
|
186
210
|
children: !!label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
187
211
|
allowFontScaling: false,
|
|
188
212
|
style: {
|
|
189
|
-
color: filled ?
|
|
213
|
+
color: filled ? onColor(color) : color,
|
|
190
214
|
fontSize: size * 0.62,
|
|
191
215
|
lineHeight: size * 0.74,
|
|
192
216
|
fontWeight: '700',
|
|
@@ -256,17 +280,17 @@ const Search = /*#__PURE__*/(0, _react.memo)(({
|
|
|
256
280
|
color
|
|
257
281
|
}) => {
|
|
258
282
|
const strokeWidth = Math.max(1.5, size / 9);
|
|
259
|
-
//
|
|
260
|
-
//
|
|
261
|
-
//
|
|
262
|
-
//
|
|
283
|
+
// Large lens (72% of the height) at the top-left and a short handle coming
|
|
284
|
+
// out of its bottom-right edge along the 45° diagonal. The proportions matter
|
|
285
|
+
// at small sizes (16-20px): with a small lens and a long handle the glyph
|
|
286
|
+
// reads as a comma, not a magnifying glass.
|
|
263
287
|
const lensD = size * 0.72;
|
|
264
288
|
const lensR = lensD / 2;
|
|
265
289
|
const handleLen = size * 0.34;
|
|
266
290
|
const diag = Math.SQRT1_2; // cos(45°) === sin(45°)
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
//
|
|
291
|
+
// The handle is centered on the diagonal, starting right at the lens's
|
|
292
|
+
// edge: distance = radius + half the handle, minus a half-stroke overlap
|
|
293
|
+
// so no gap is left between edge and handle.
|
|
270
294
|
const dist = lensR + handleLen / 2 - strokeWidth / 2;
|
|
271
295
|
const cx = lensR + dist * diag;
|
|
272
296
|
const cy = lensR + dist * diag;
|
|
@@ -304,7 +328,487 @@ const Search = /*#__PURE__*/(0, _react.memo)(({
|
|
|
304
328
|
});
|
|
305
329
|
Search.displayName = 'Search';
|
|
306
330
|
|
|
307
|
-
|
|
331
|
+
// ── Basic set for apps ─────────────────────────────────────────────────────
|
|
332
|
+
// Same rules as the rest: only View/Text, stroke proportional to the size
|
|
333
|
+
// (`size / 10`, minimum 1.5) and a square `size` box, so they all line up
|
|
334
|
+
// the same way in a row (Gestalt, similarity).
|
|
335
|
+
|
|
336
|
+
const stroke = size => Math.max(1.5, size / 10);
|
|
337
|
+
const box = size => ({
|
|
338
|
+
width: size,
|
|
339
|
+
height: size,
|
|
340
|
+
alignItems: 'center',
|
|
341
|
+
justifyContent: 'center'
|
|
342
|
+
});
|
|
343
|
+
const Menu = /*#__PURE__*/(0, _react.memo)(({
|
|
344
|
+
size,
|
|
345
|
+
color
|
|
346
|
+
}) => {
|
|
347
|
+
const sw = stroke(size);
|
|
348
|
+
const bar = {
|
|
349
|
+
width: size * 0.7,
|
|
350
|
+
height: sw,
|
|
351
|
+
borderRadius: sw / 2,
|
|
352
|
+
backgroundColor: color
|
|
353
|
+
};
|
|
354
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
355
|
+
style: [box(size), {
|
|
356
|
+
gap: size * 0.16
|
|
357
|
+
}],
|
|
358
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
359
|
+
style: bar
|
|
360
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
361
|
+
style: bar
|
|
362
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
363
|
+
style: bar
|
|
364
|
+
})]
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
Menu.displayName = 'Menu';
|
|
368
|
+
const Scan = /*#__PURE__*/(0, _react.memo)(({
|
|
369
|
+
size,
|
|
370
|
+
color
|
|
371
|
+
}) => {
|
|
372
|
+
const sw = stroke(size);
|
|
373
|
+
const arm = size * 0.26;
|
|
374
|
+
const inset = size * 0.1;
|
|
375
|
+
const corner = (v, h) => ({
|
|
376
|
+
position: 'absolute',
|
|
377
|
+
[v]: inset,
|
|
378
|
+
[h]: inset,
|
|
379
|
+
width: arm,
|
|
380
|
+
height: arm,
|
|
381
|
+
borderColor: color,
|
|
382
|
+
[v === 'top' ? 'borderTopWidth' : 'borderBottomWidth']: sw,
|
|
383
|
+
[h === 'left' ? 'borderLeftWidth' : 'borderRightWidth']: sw
|
|
384
|
+
});
|
|
385
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
386
|
+
style: box(size),
|
|
387
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
388
|
+
style: corner('top', 'left')
|
|
389
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
390
|
+
style: corner('top', 'right')
|
|
391
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
392
|
+
style: corner('bottom', 'left')
|
|
393
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
394
|
+
style: corner('bottom', 'right')
|
|
395
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
396
|
+
style: {
|
|
397
|
+
width: size * 0.6,
|
|
398
|
+
height: sw,
|
|
399
|
+
borderRadius: sw / 2,
|
|
400
|
+
backgroundColor: color
|
|
401
|
+
}
|
|
402
|
+
})]
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
Scan.displayName = 'Scan';
|
|
406
|
+
const More = /*#__PURE__*/(0, _react.memo)(({
|
|
407
|
+
size,
|
|
408
|
+
color
|
|
409
|
+
}) => {
|
|
410
|
+
const d = Math.max(3, size * 0.16);
|
|
411
|
+
const dot = {
|
|
412
|
+
width: d,
|
|
413
|
+
height: d,
|
|
414
|
+
borderRadius: d / 2,
|
|
415
|
+
backgroundColor: color
|
|
416
|
+
};
|
|
417
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
418
|
+
style: [box(size), {
|
|
419
|
+
flexDirection: 'row',
|
|
420
|
+
gap: size * 0.12
|
|
421
|
+
}],
|
|
422
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
423
|
+
style: dot
|
|
424
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
425
|
+
style: dot
|
|
426
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
427
|
+
style: dot
|
|
428
|
+
})]
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
More.displayName = 'More';
|
|
432
|
+
const Home = /*#__PURE__*/(0, _react.memo)(({
|
|
433
|
+
size,
|
|
434
|
+
color
|
|
435
|
+
}) => {
|
|
436
|
+
const sw = stroke(size);
|
|
437
|
+
const roof = size * 0.5;
|
|
438
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
439
|
+
style: box(size),
|
|
440
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
441
|
+
style: {
|
|
442
|
+
position: 'absolute',
|
|
443
|
+
top: size * 0.14,
|
|
444
|
+
width: roof,
|
|
445
|
+
height: roof,
|
|
446
|
+
borderTopWidth: sw,
|
|
447
|
+
borderLeftWidth: sw,
|
|
448
|
+
borderColor: color,
|
|
449
|
+
transform: [{
|
|
450
|
+
rotate: '45deg'
|
|
451
|
+
}]
|
|
452
|
+
}
|
|
453
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
454
|
+
style: {
|
|
455
|
+
position: 'absolute',
|
|
456
|
+
bottom: size * 0.12,
|
|
457
|
+
width: size * 0.56,
|
|
458
|
+
height: size * 0.4,
|
|
459
|
+
borderLeftWidth: sw,
|
|
460
|
+
borderRightWidth: sw,
|
|
461
|
+
borderBottomWidth: sw,
|
|
462
|
+
borderColor: color
|
|
463
|
+
}
|
|
464
|
+
})]
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
Home.displayName = 'Home';
|
|
468
|
+
const Settings = /*#__PURE__*/(0, _react.memo)(({
|
|
469
|
+
size,
|
|
470
|
+
color
|
|
471
|
+
}) => {
|
|
472
|
+
const sw = stroke(size);
|
|
473
|
+
const ring = size * 0.5;
|
|
474
|
+
const tooth = {
|
|
475
|
+
width: size * 0.16,
|
|
476
|
+
height: size * 0.2,
|
|
477
|
+
backgroundColor: color,
|
|
478
|
+
borderRadius: sw / 2
|
|
479
|
+
};
|
|
480
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
481
|
+
style: box(size),
|
|
482
|
+
children: [[0, 45, 90, 135, 180, 225, 270, 315].map(deg => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
483
|
+
style: [box(size), {
|
|
484
|
+
position: 'absolute',
|
|
485
|
+
transform: [{
|
|
486
|
+
rotate: `${deg}deg`
|
|
487
|
+
}]
|
|
488
|
+
}],
|
|
489
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
490
|
+
style: [tooth, {
|
|
491
|
+
position: 'absolute',
|
|
492
|
+
top: size * 0.08
|
|
493
|
+
}]
|
|
494
|
+
})
|
|
495
|
+
}, deg)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
496
|
+
style: {
|
|
497
|
+
width: ring,
|
|
498
|
+
height: ring,
|
|
499
|
+
borderRadius: ring / 2,
|
|
500
|
+
borderWidth: sw * 1.6,
|
|
501
|
+
borderColor: color
|
|
502
|
+
}
|
|
503
|
+
})]
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
Settings.displayName = 'Settings';
|
|
507
|
+
const User = /*#__PURE__*/(0, _react.memo)(({
|
|
508
|
+
size,
|
|
509
|
+
color
|
|
510
|
+
}) => {
|
|
511
|
+
const sw = stroke(size);
|
|
512
|
+
const head = size * 0.38;
|
|
513
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
514
|
+
style: box(size),
|
|
515
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
516
|
+
style: {
|
|
517
|
+
position: 'absolute',
|
|
518
|
+
top: size * 0.08,
|
|
519
|
+
width: head,
|
|
520
|
+
height: head,
|
|
521
|
+
borderRadius: head / 2,
|
|
522
|
+
borderWidth: sw,
|
|
523
|
+
borderColor: color
|
|
524
|
+
}
|
|
525
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
526
|
+
style: {
|
|
527
|
+
position: 'absolute',
|
|
528
|
+
bottom: size * 0.08,
|
|
529
|
+
width: size * 0.74,
|
|
530
|
+
height: size * 0.34,
|
|
531
|
+
borderTopLeftRadius: size * 0.37,
|
|
532
|
+
borderTopRightRadius: size * 0.37,
|
|
533
|
+
borderTopWidth: sw,
|
|
534
|
+
borderLeftWidth: sw,
|
|
535
|
+
borderRightWidth: sw,
|
|
536
|
+
borderColor: color
|
|
537
|
+
}
|
|
538
|
+
})]
|
|
539
|
+
});
|
|
540
|
+
});
|
|
541
|
+
User.displayName = 'User';
|
|
542
|
+
const Trash = /*#__PURE__*/(0, _react.memo)(({
|
|
543
|
+
size,
|
|
544
|
+
color
|
|
545
|
+
}) => {
|
|
546
|
+
const sw = stroke(size);
|
|
547
|
+
const bodyW = size * 0.52;
|
|
548
|
+
const bodyH = size * 0.56;
|
|
549
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
550
|
+
style: box(size),
|
|
551
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
552
|
+
style: {
|
|
553
|
+
position: 'absolute',
|
|
554
|
+
top: size * 0.08,
|
|
555
|
+
width: size * 0.26,
|
|
556
|
+
height: size * 0.12,
|
|
557
|
+
borderTopWidth: sw,
|
|
558
|
+
borderLeftWidth: sw,
|
|
559
|
+
borderRightWidth: sw,
|
|
560
|
+
borderColor: color
|
|
561
|
+
}
|
|
562
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
563
|
+
style: {
|
|
564
|
+
position: 'absolute',
|
|
565
|
+
top: size * 0.19,
|
|
566
|
+
width: size * 0.72,
|
|
567
|
+
height: sw,
|
|
568
|
+
borderRadius: sw / 2,
|
|
569
|
+
backgroundColor: color
|
|
570
|
+
}
|
|
571
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
572
|
+
style: {
|
|
573
|
+
position: 'absolute',
|
|
574
|
+
bottom: size * 0.08,
|
|
575
|
+
width: bodyW,
|
|
576
|
+
height: bodyH,
|
|
577
|
+
borderLeftWidth: sw,
|
|
578
|
+
borderRightWidth: sw,
|
|
579
|
+
borderBottomWidth: sw,
|
|
580
|
+
borderBottomLeftRadius: sw * 1.5,
|
|
581
|
+
borderBottomRightRadius: sw * 1.5,
|
|
582
|
+
borderColor: color,
|
|
583
|
+
flexDirection: 'row',
|
|
584
|
+
justifyContent: 'center',
|
|
585
|
+
alignItems: 'center',
|
|
586
|
+
gap: bodyW * 0.22
|
|
587
|
+
},
|
|
588
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
589
|
+
style: {
|
|
590
|
+
width: sw * 0.8,
|
|
591
|
+
height: bodyH * 0.55,
|
|
592
|
+
backgroundColor: color,
|
|
593
|
+
borderRadius: sw / 2
|
|
594
|
+
}
|
|
595
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
596
|
+
style: {
|
|
597
|
+
width: sw * 0.8,
|
|
598
|
+
height: bodyH * 0.55,
|
|
599
|
+
backgroundColor: color,
|
|
600
|
+
borderRadius: sw / 2
|
|
601
|
+
}
|
|
602
|
+
})]
|
|
603
|
+
})]
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
Trash.displayName = 'Trash';
|
|
607
|
+
const Edit = /*#__PURE__*/(0, _react.memo)(({
|
|
608
|
+
size,
|
|
609
|
+
color
|
|
610
|
+
}) => {
|
|
611
|
+
const sw = stroke(size);
|
|
612
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
613
|
+
style: box(size),
|
|
614
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
615
|
+
style: {
|
|
616
|
+
alignItems: 'center',
|
|
617
|
+
transform: [{
|
|
618
|
+
rotate: '45deg'
|
|
619
|
+
}, {
|
|
620
|
+
translateY: -size * 0.02
|
|
621
|
+
}]
|
|
622
|
+
},
|
|
623
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
624
|
+
style: {
|
|
625
|
+
width: size * 0.3,
|
|
626
|
+
height: size * 0.66,
|
|
627
|
+
borderWidth: sw,
|
|
628
|
+
borderColor: color,
|
|
629
|
+
borderTopLeftRadius: sw,
|
|
630
|
+
borderTopRightRadius: sw
|
|
631
|
+
}
|
|
632
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
633
|
+
style: {
|
|
634
|
+
width: 0,
|
|
635
|
+
height: 0,
|
|
636
|
+
borderLeftWidth: size * 0.15,
|
|
637
|
+
borderRightWidth: size * 0.15,
|
|
638
|
+
borderTopWidth: size * 0.22,
|
|
639
|
+
borderLeftColor: 'transparent',
|
|
640
|
+
borderRightColor: 'transparent',
|
|
641
|
+
borderTopColor: color
|
|
642
|
+
}
|
|
643
|
+
})]
|
|
644
|
+
})
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
Edit.displayName = 'Edit';
|
|
648
|
+
const Share = /*#__PURE__*/(0, _react.memo)(({
|
|
649
|
+
size,
|
|
650
|
+
color
|
|
651
|
+
}) => {
|
|
652
|
+
const sw = stroke(size);
|
|
653
|
+
const arm = size * 0.26;
|
|
654
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
655
|
+
style: box(size),
|
|
656
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
657
|
+
style: {
|
|
658
|
+
position: 'absolute',
|
|
659
|
+
bottom: size * 0.08,
|
|
660
|
+
width: size * 0.64,
|
|
661
|
+
height: size * 0.42,
|
|
662
|
+
borderLeftWidth: sw,
|
|
663
|
+
borderRightWidth: sw,
|
|
664
|
+
borderBottomWidth: sw,
|
|
665
|
+
borderBottomLeftRadius: sw * 1.5,
|
|
666
|
+
borderBottomRightRadius: sw * 1.5,
|
|
667
|
+
borderColor: color
|
|
668
|
+
}
|
|
669
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
670
|
+
style: {
|
|
671
|
+
position: 'absolute',
|
|
672
|
+
top: size * 0.1,
|
|
673
|
+
width: sw,
|
|
674
|
+
height: size * 0.56,
|
|
675
|
+
backgroundColor: color,
|
|
676
|
+
borderRadius: sw / 2
|
|
677
|
+
}
|
|
678
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
679
|
+
style: {
|
|
680
|
+
position: 'absolute',
|
|
681
|
+
top: size * 0.12,
|
|
682
|
+
width: arm,
|
|
683
|
+
height: arm,
|
|
684
|
+
borderTopWidth: sw,
|
|
685
|
+
borderLeftWidth: sw,
|
|
686
|
+
borderColor: color,
|
|
687
|
+
transform: [{
|
|
688
|
+
rotate: '45deg'
|
|
689
|
+
}]
|
|
690
|
+
}
|
|
691
|
+
})]
|
|
692
|
+
});
|
|
693
|
+
});
|
|
694
|
+
Share.displayName = 'Share';
|
|
695
|
+
const Heart = /*#__PURE__*/(0, _react.memo)(({
|
|
696
|
+
size,
|
|
697
|
+
color
|
|
698
|
+
}) => {
|
|
699
|
+
// Two circles over a square rotated 45°: the classic shape, filled.
|
|
700
|
+
const s = size * 0.46;
|
|
701
|
+
const lobe = {
|
|
702
|
+
position: 'absolute',
|
|
703
|
+
width: s,
|
|
704
|
+
height: s,
|
|
705
|
+
borderRadius: s / 2,
|
|
706
|
+
backgroundColor: color
|
|
707
|
+
};
|
|
708
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
709
|
+
style: box(size),
|
|
710
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
711
|
+
style: {
|
|
712
|
+
width: s,
|
|
713
|
+
height: s,
|
|
714
|
+
transform: [{
|
|
715
|
+
translateY: size * 0.05
|
|
716
|
+
}, {
|
|
717
|
+
rotate: '45deg'
|
|
718
|
+
}]
|
|
719
|
+
},
|
|
720
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
721
|
+
style: {
|
|
722
|
+
position: 'absolute',
|
|
723
|
+
width: s,
|
|
724
|
+
height: s,
|
|
725
|
+
backgroundColor: color
|
|
726
|
+
}
|
|
727
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
728
|
+
style: [lobe, {
|
|
729
|
+
left: -s / 2
|
|
730
|
+
}]
|
|
731
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
732
|
+
style: [lobe, {
|
|
733
|
+
top: -s / 2
|
|
734
|
+
}]
|
|
735
|
+
})]
|
|
736
|
+
})
|
|
737
|
+
});
|
|
738
|
+
});
|
|
739
|
+
Heart.displayName = 'Heart';
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Star: typographic glyph (★, U+2605) like Circle's. A five-pointed star
|
|
743
|
+
* can't be composed well from rectangles; the variation selector U+FE0E
|
|
744
|
+
* forces the text version (monochrome, in the requested color) instead of
|
|
745
|
+
* the emoji.
|
|
746
|
+
*/
|
|
747
|
+
const Star = /*#__PURE__*/(0, _react.memo)(({
|
|
748
|
+
size,
|
|
749
|
+
color
|
|
750
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
751
|
+
style: box(size),
|
|
752
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
753
|
+
allowFontScaling: false,
|
|
754
|
+
style: {
|
|
755
|
+
color,
|
|
756
|
+
fontSize: size * 0.95,
|
|
757
|
+
lineHeight: size,
|
|
758
|
+
textAlign: 'center',
|
|
759
|
+
includeFontPadding: false
|
|
760
|
+
},
|
|
761
|
+
children: '\u2605\uFE0E'
|
|
762
|
+
})
|
|
763
|
+
}));
|
|
764
|
+
Star.displayName = 'Star';
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Warning: filled triangle with a "!" (not a circle like `alert`), so that
|
|
768
|
+
* warning and error aren't told apart by color alone.
|
|
769
|
+
*/
|
|
770
|
+
const WarningTriangle = /*#__PURE__*/(0, _react.memo)(({
|
|
771
|
+
size,
|
|
772
|
+
color
|
|
773
|
+
}) => {
|
|
774
|
+
const half = size * 0.5;
|
|
775
|
+
const height = size * 0.88;
|
|
776
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
777
|
+
style: box(size),
|
|
778
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
779
|
+
style: {
|
|
780
|
+
width: 0,
|
|
781
|
+
height: 0,
|
|
782
|
+
borderLeftWidth: half,
|
|
783
|
+
borderRightWidth: half,
|
|
784
|
+
borderBottomWidth: height,
|
|
785
|
+
borderLeftColor: 'transparent',
|
|
786
|
+
borderRightColor: 'transparent',
|
|
787
|
+
borderBottomColor: color
|
|
788
|
+
}
|
|
789
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
790
|
+
allowFontScaling: false,
|
|
791
|
+
style: {
|
|
792
|
+
position: 'absolute',
|
|
793
|
+
bottom: size * 0.06,
|
|
794
|
+
color: onColor(color),
|
|
795
|
+
fontSize: size * 0.58,
|
|
796
|
+
lineHeight: size * 0.66,
|
|
797
|
+
fontWeight: '700',
|
|
798
|
+
textAlign: 'center',
|
|
799
|
+
includeFontPadding: false
|
|
800
|
+
},
|
|
801
|
+
children: "!"
|
|
802
|
+
})]
|
|
803
|
+
});
|
|
804
|
+
});
|
|
805
|
+
WarningTriangle.displayName = 'WarningTriangle';
|
|
806
|
+
const warned = new Set();
|
|
807
|
+
|
|
808
|
+
/** All included glyphs, in catalog order. */
|
|
809
|
+
const BUILT_IN_ICON_NAMES = exports.BUILT_IN_ICON_NAMES = ['check', 'close', 'plus', 'minus', 'search', 'scan', 'menu', 'more', 'home', 'settings', 'user', 'trash', 'edit', 'share', 'heart', 'star', 'eye', 'eye-off', 'chevron-left', 'chevron-right', 'chevron-up', 'chevron-down', 'alert', 'warning', 'info', 'question'];
|
|
810
|
+
|
|
811
|
+
/** Default renderer. Used when <UIProvider icons={...}> doesn't pass its own. */
|
|
308
812
|
function renderDefaultIcon(name, props) {
|
|
309
813
|
switch (name) {
|
|
310
814
|
case 'check':
|
|
@@ -348,6 +852,10 @@ function renderDefaultIcon(name, props) {
|
|
|
348
852
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Search, {
|
|
349
853
|
...props
|
|
350
854
|
});
|
|
855
|
+
case 'scan':
|
|
856
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Scan, {
|
|
857
|
+
...props
|
|
858
|
+
});
|
|
351
859
|
case 'plus':
|
|
352
860
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PlusMinus, {
|
|
353
861
|
...props
|
|
@@ -369,17 +877,61 @@ function renderDefaultIcon(name, props) {
|
|
|
369
877
|
label: "i"
|
|
370
878
|
});
|
|
371
879
|
case 'warning':
|
|
372
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
373
|
-
...props
|
|
374
|
-
filled: true,
|
|
375
|
-
label: "!"
|
|
880
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(WarningTriangle, {
|
|
881
|
+
...props
|
|
376
882
|
});
|
|
377
883
|
case 'question':
|
|
378
884
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, {
|
|
379
885
|
...props,
|
|
380
886
|
label: "?"
|
|
381
887
|
});
|
|
888
|
+
case 'menu':
|
|
889
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu, {
|
|
890
|
+
...props
|
|
891
|
+
});
|
|
892
|
+
case 'more':
|
|
893
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(More, {
|
|
894
|
+
...props
|
|
895
|
+
});
|
|
896
|
+
case 'home':
|
|
897
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Home, {
|
|
898
|
+
...props
|
|
899
|
+
});
|
|
900
|
+
case 'settings':
|
|
901
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Settings, {
|
|
902
|
+
...props
|
|
903
|
+
});
|
|
904
|
+
case 'user':
|
|
905
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(User, {
|
|
906
|
+
...props
|
|
907
|
+
});
|
|
908
|
+
case 'trash':
|
|
909
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Trash, {
|
|
910
|
+
...props
|
|
911
|
+
});
|
|
912
|
+
case 'edit':
|
|
913
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Edit, {
|
|
914
|
+
...props
|
|
915
|
+
});
|
|
916
|
+
case 'share':
|
|
917
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Share, {
|
|
918
|
+
...props
|
|
919
|
+
});
|
|
920
|
+
case 'heart':
|
|
921
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Heart, {
|
|
922
|
+
...props
|
|
923
|
+
});
|
|
924
|
+
case 'star':
|
|
925
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Star, {
|
|
926
|
+
...props
|
|
927
|
+
});
|
|
382
928
|
default:
|
|
929
|
+
// A name outside the included set only makes sense with a custom
|
|
930
|
+
// renderer (<UIProvider icons>). Without one there is no glyph: warn once.
|
|
931
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__ && !warned.has(name)) {
|
|
932
|
+
warned.add(name);
|
|
933
|
+
console.warn(`orn-ui: no built-in icon named "${name}". Pass <UIProvider icons={...}> to render custom names.`);
|
|
934
|
+
}
|
|
383
935
|
return null;
|
|
384
936
|
}
|
|
385
937
|
}
|