orn-ui 0.1.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/README.md +107 -0
- package/bin/orn-ui.mjs +228 -0
- package/lib/commonjs/atoms/Avatar.js +42 -0
- package/lib/commonjs/atoms/Avatar.js.map +1 -0
- package/lib/commonjs/atoms/Badge.js +82 -0
- package/lib/commonjs/atoms/Badge.js.map +1 -0
- package/lib/commonjs/atoms/Button.js +222 -0
- package/lib/commonjs/atoms/Button.js.map +1 -0
- package/lib/commonjs/atoms/Card.js +33 -0
- package/lib/commonjs/atoms/Card.js.map +1 -0
- package/lib/commonjs/atoms/Checkbox.js +107 -0
- package/lib/commonjs/atoms/Checkbox.js.map +1 -0
- package/lib/commonjs/atoms/Divider.js +27 -0
- package/lib/commonjs/atoms/Divider.js.map +1 -0
- package/lib/commonjs/atoms/EmptyState.js +69 -0
- package/lib/commonjs/atoms/EmptyState.js.map +1 -0
- package/lib/commonjs/atoms/Fab.js +62 -0
- package/lib/commonjs/atoms/Fab.js.map +1 -0
- package/lib/commonjs/atoms/IconButton.js +60 -0
- package/lib/commonjs/atoms/IconButton.js.map +1 -0
- package/lib/commonjs/atoms/Image.js +113 -0
- package/lib/commonjs/atoms/Image.js.map +1 -0
- package/lib/commonjs/atoms/Input.js +173 -0
- package/lib/commonjs/atoms/Input.js.map +1 -0
- package/lib/commonjs/atoms/KeyValueRow.js +60 -0
- package/lib/commonjs/atoms/KeyValueRow.js.map +1 -0
- package/lib/commonjs/atoms/PressableScale.js +60 -0
- package/lib/commonjs/atoms/PressableScale.js.map +1 -0
- package/lib/commonjs/atoms/Spinner.js +156 -0
- package/lib/commonjs/atoms/Spinner.js.map +1 -0
- package/lib/commonjs/atoms/Text.js +63 -0
- package/lib/commonjs/atoms/Text.js.map +1 -0
- package/lib/commonjs/atoms/index.js +135 -0
- package/lib/commonjs/atoms/index.js.map +1 -0
- package/lib/commonjs/icons/Icon.js +40 -0
- package/lib/commonjs/icons/Icon.js.map +1 -0
- package/lib/commonjs/icons/defaultIcons.js +386 -0
- package/lib/commonjs/icons/defaultIcons.js.map +1 -0
- package/lib/commonjs/icons/index.js +20 -0
- package/lib/commonjs/icons/index.js.map +1 -0
- package/lib/commonjs/icons/types.js +6 -0
- package/lib/commonjs/icons/types.js.map +1 -0
- package/lib/commonjs/index.js +61 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/molecules/AvatarHeader.js +87 -0
- package/lib/commonjs/molecules/AvatarHeader.js.map +1 -0
- package/lib/commonjs/molecules/FormActions.js +47 -0
- package/lib/commonjs/molecules/FormActions.js.map +1 -0
- package/lib/commonjs/molecules/InfoRow.js +83 -0
- package/lib/commonjs/molecules/InfoRow.js.map +1 -0
- package/lib/commonjs/molecules/OptionCard.js +98 -0
- package/lib/commonjs/molecules/OptionCard.js.map +1 -0
- package/lib/commonjs/molecules/Stepper.js +104 -0
- package/lib/commonjs/molecules/Stepper.js.map +1 -0
- package/lib/commonjs/molecules/Steps.js +220 -0
- package/lib/commonjs/molecules/Steps.js.map +1 -0
- package/lib/commonjs/molecules/ThemeToggle.js +91 -0
- package/lib/commonjs/molecules/ThemeToggle.js.map +1 -0
- package/lib/commonjs/molecules/index.js +55 -0
- package/lib/commonjs/molecules/index.js.map +1 -0
- package/lib/commonjs/organisms/Alert.js +223 -0
- package/lib/commonjs/organisms/Alert.js.map +1 -0
- package/lib/commonjs/organisms/AlertProvider.js +109 -0
- package/lib/commonjs/organisms/AlertProvider.js.map +1 -0
- package/lib/commonjs/organisms/BottomSheet.js +154 -0
- package/lib/commonjs/organisms/BottomSheet.js.map +1 -0
- package/lib/commonjs/organisms/DateField.js +147 -0
- package/lib/commonjs/organisms/DateField.js.map +1 -0
- package/lib/commonjs/organisms/DatePicker.js +253 -0
- package/lib/commonjs/organisms/DatePicker.js.map +1 -0
- package/lib/commonjs/organisms/List.js +143 -0
- package/lib/commonjs/organisms/List.js.map +1 -0
- package/lib/commonjs/organisms/Modal.js +286 -0
- package/lib/commonjs/organisms/Modal.js.map +1 -0
- package/lib/commonjs/organisms/Screen.js +75 -0
- package/lib/commonjs/organisms/Screen.js.map +1 -0
- package/lib/commonjs/organisms/SearchList.js +180 -0
- package/lib/commonjs/organisms/SearchList.js.map +1 -0
- package/lib/commonjs/organisms/Select.js +178 -0
- package/lib/commonjs/organisms/Select.js.map +1 -0
- package/lib/commonjs/organisms/Toast.js +157 -0
- package/lib/commonjs/organisms/Toast.js.map +1 -0
- package/lib/commonjs/organisms/ToastProvider.js +131 -0
- package/lib/commonjs/organisms/ToastProvider.js.map +1 -0
- package/lib/commonjs/organisms/Wizard.js +116 -0
- package/lib/commonjs/organisms/Wizard.js.map +1 -0
- package/lib/commonjs/organisms/index.js +127 -0
- package/lib/commonjs/organisms/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/UIProvider.js +110 -0
- package/lib/commonjs/theme/UIProvider.js.map +1 -0
- package/lib/commonjs/theme/createStyles.js +42 -0
- package/lib/commonjs/theme/createStyles.js.map +1 -0
- package/lib/commonjs/theme/createTheme.js +50 -0
- package/lib/commonjs/theme/createTheme.js.map +1 -0
- package/lib/commonjs/theme/index.js +151 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/insets.js +15 -0
- package/lib/commonjs/theme/insets.js.map +1 -0
- package/lib/commonjs/theme/labels.js +18 -0
- package/lib/commonjs/theme/labels.js.map +1 -0
- package/lib/commonjs/theme/palettes.js +42 -0
- package/lib/commonjs/theme/palettes.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +120 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/theme/types.js +6 -0
- package/lib/commonjs/theme/types.js.map +1 -0
- package/lib/module/atoms/Avatar.js +37 -0
- package/lib/module/atoms/Avatar.js.map +1 -0
- package/lib/module/atoms/Badge.js +77 -0
- package/lib/module/atoms/Badge.js.map +1 -0
- package/lib/module/atoms/Button.js +217 -0
- package/lib/module/atoms/Button.js.map +1 -0
- package/lib/module/atoms/Card.js +28 -0
- package/lib/module/atoms/Card.js.map +1 -0
- package/lib/module/atoms/Checkbox.js +102 -0
- package/lib/module/atoms/Checkbox.js.map +1 -0
- package/lib/module/atoms/Divider.js +22 -0
- package/lib/module/atoms/Divider.js.map +1 -0
- package/lib/module/atoms/EmptyState.js +64 -0
- package/lib/module/atoms/EmptyState.js.map +1 -0
- package/lib/module/atoms/Fab.js +57 -0
- package/lib/module/atoms/Fab.js.map +1 -0
- package/lib/module/atoms/IconButton.js +55 -0
- package/lib/module/atoms/IconButton.js.map +1 -0
- package/lib/module/atoms/Image.js +108 -0
- package/lib/module/atoms/Image.js.map +1 -0
- package/lib/module/atoms/Input.js +168 -0
- package/lib/module/atoms/Input.js.map +1 -0
- package/lib/module/atoms/KeyValueRow.js +55 -0
- package/lib/module/atoms/KeyValueRow.js.map +1 -0
- package/lib/module/atoms/PressableScale.js +55 -0
- package/lib/module/atoms/PressableScale.js.map +1 -0
- package/lib/module/atoms/Spinner.js +151 -0
- package/lib/module/atoms/Spinner.js.map +1 -0
- package/lib/module/atoms/Text.js +58 -0
- package/lib/module/atoms/Text.js.map +1 -0
- package/lib/module/atoms/index.js +18 -0
- package/lib/module/atoms/index.js.map +1 -0
- package/lib/module/icons/Icon.js +35 -0
- package/lib/module/icons/Icon.js.map +1 -0
- package/lib/module/icons/defaultIcons.js +381 -0
- package/lib/module/icons/defaultIcons.js.map +1 -0
- package/lib/module/icons/index.js +5 -0
- package/lib/module/icons/index.js.map +1 -0
- package/lib/module/icons/types.js +4 -0
- package/lib/module/icons/types.js.map +1 -0
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/molecules/AvatarHeader.js +82 -0
- package/lib/module/molecules/AvatarHeader.js.map +1 -0
- package/lib/module/molecules/FormActions.js +42 -0
- package/lib/module/molecules/FormActions.js.map +1 -0
- package/lib/module/molecules/InfoRow.js +78 -0
- package/lib/module/molecules/InfoRow.js.map +1 -0
- package/lib/module/molecules/OptionCard.js +93 -0
- package/lib/module/molecules/OptionCard.js.map +1 -0
- package/lib/module/molecules/Stepper.js +99 -0
- package/lib/module/molecules/Stepper.js.map +1 -0
- package/lib/module/molecules/Steps.js +215 -0
- package/lib/module/molecules/Steps.js.map +1 -0
- package/lib/module/molecules/ThemeToggle.js +86 -0
- package/lib/module/molecules/ThemeToggle.js.map +1 -0
- package/lib/module/molecules/index.js +10 -0
- package/lib/module/molecules/index.js.map +1 -0
- package/lib/module/organisms/Alert.js +218 -0
- package/lib/module/organisms/Alert.js.map +1 -0
- package/lib/module/organisms/AlertProvider.js +103 -0
- package/lib/module/organisms/AlertProvider.js.map +1 -0
- package/lib/module/organisms/BottomSheet.js +149 -0
- package/lib/module/organisms/BottomSheet.js.map +1 -0
- package/lib/module/organisms/DateField.js +142 -0
- package/lib/module/organisms/DateField.js.map +1 -0
- package/lib/module/organisms/DatePicker.js +247 -0
- package/lib/module/organisms/DatePicker.js.map +1 -0
- package/lib/module/organisms/List.js +138 -0
- package/lib/module/organisms/List.js.map +1 -0
- package/lib/module/organisms/Modal.js +281 -0
- package/lib/module/organisms/Modal.js.map +1 -0
- package/lib/module/organisms/Screen.js +70 -0
- package/lib/module/organisms/Screen.js.map +1 -0
- package/lib/module/organisms/SearchList.js +175 -0
- package/lib/module/organisms/SearchList.js.map +1 -0
- package/lib/module/organisms/Select.js +173 -0
- package/lib/module/organisms/Select.js.map +1 -0
- package/lib/module/organisms/Toast.js +152 -0
- package/lib/module/organisms/Toast.js.map +1 -0
- package/lib/module/organisms/ToastProvider.js +125 -0
- package/lib/module/organisms/ToastProvider.js.map +1 -0
- package/lib/module/organisms/Wizard.js +111 -0
- package/lib/module/organisms/Wizard.js.map +1 -0
- package/lib/module/organisms/index.js +16 -0
- package/lib/module/organisms/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/UIProvider.js +97 -0
- package/lib/module/theme/UIProvider.js.map +1 -0
- package/lib/module/theme/createStyles.js +38 -0
- package/lib/module/theme/createStyles.js.map +1 -0
- package/lib/module/theme/createTheme.js +45 -0
- package/lib/module/theme/createTheme.js.map +1 -0
- package/lib/module/theme/index.js +10 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/insets.js +11 -0
- package/lib/module/theme/insets.js.map +1 -0
- package/lib/module/theme/labels.js +14 -0
- package/lib/module/theme/labels.js.map +1 -0
- package/lib/module/theme/palettes.js +38 -0
- package/lib/module/theme/palettes.js.map +1 -0
- package/lib/module/theme/tokens.js +117 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/theme/types.js +4 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/typescript/atoms/Avatar.d.ts +15 -0
- package/lib/typescript/atoms/Avatar.d.ts.map +1 -0
- package/lib/typescript/atoms/Badge.d.ts +19 -0
- package/lib/typescript/atoms/Badge.d.ts.map +1 -0
- package/lib/typescript/atoms/Button.d.ts +30 -0
- package/lib/typescript/atoms/Button.d.ts.map +1 -0
- package/lib/typescript/atoms/Card.d.ts +8 -0
- package/lib/typescript/atoms/Card.d.ts.map +1 -0
- package/lib/typescript/atoms/Checkbox.d.ts +11 -0
- package/lib/typescript/atoms/Checkbox.d.ts.map +1 -0
- package/lib/typescript/atoms/Divider.d.ts +8 -0
- package/lib/typescript/atoms/Divider.d.ts.map +1 -0
- package/lib/typescript/atoms/EmptyState.d.ts +12 -0
- package/lib/typescript/atoms/EmptyState.d.ts.map +1 -0
- package/lib/typescript/atoms/Fab.d.ts +22 -0
- package/lib/typescript/atoms/Fab.d.ts.map +1 -0
- package/lib/typescript/atoms/IconButton.d.ts +23 -0
- package/lib/typescript/atoms/IconButton.d.ts.map +1 -0
- package/lib/typescript/atoms/Image.d.ts +45 -0
- package/lib/typescript/atoms/Image.d.ts.map +1 -0
- package/lib/typescript/atoms/Input.d.ts +24 -0
- package/lib/typescript/atoms/Input.d.ts.map +1 -0
- package/lib/typescript/atoms/KeyValueRow.d.ts +17 -0
- package/lib/typescript/atoms/KeyValueRow.d.ts.map +1 -0
- package/lib/typescript/atoms/PressableScale.d.ts +15 -0
- package/lib/typescript/atoms/PressableScale.d.ts.map +1 -0
- package/lib/typescript/atoms/Spinner.d.ts +20 -0
- package/lib/typescript/atoms/Spinner.d.ts.map +1 -0
- package/lib/typescript/atoms/Text.d.ts +13 -0
- package/lib/typescript/atoms/Text.d.ts.map +1 -0
- package/lib/typescript/atoms/index.d.ts +31 -0
- package/lib/typescript/atoms/index.d.ts.map +1 -0
- package/lib/typescript/icons/Icon.d.ts +18 -0
- package/lib/typescript/icons/Icon.d.ts.map +1 -0
- package/lib/typescript/icons/defaultIcons.d.ts +5 -0
- package/lib/typescript/icons/defaultIcons.d.ts.map +1 -0
- package/lib/typescript/icons/index.d.ts +5 -0
- package/lib/typescript/icons/index.d.ts.map +1 -0
- package/lib/typescript/icons/types.d.ts +10 -0
- package/lib/typescript/icons/types.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +6 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/molecules/AvatarHeader.d.ts +20 -0
- package/lib/typescript/molecules/AvatarHeader.d.ts.map +1 -0
- package/lib/typescript/molecules/FormActions.d.ts +21 -0
- package/lib/typescript/molecules/FormActions.d.ts.map +1 -0
- package/lib/typescript/molecules/InfoRow.d.ts +17 -0
- package/lib/typescript/molecules/InfoRow.d.ts.map +1 -0
- package/lib/typescript/molecules/OptionCard.d.ts +20 -0
- package/lib/typescript/molecules/OptionCard.d.ts.map +1 -0
- package/lib/typescript/molecules/Stepper.d.ts +15 -0
- package/lib/typescript/molecules/Stepper.d.ts.map +1 -0
- package/lib/typescript/molecules/Steps.d.ts +29 -0
- package/lib/typescript/molecules/Steps.d.ts.map +1 -0
- package/lib/typescript/molecules/ThemeToggle.d.ts +15 -0
- package/lib/typescript/molecules/ThemeToggle.d.ts.map +1 -0
- package/lib/typescript/molecules/index.d.ts +15 -0
- package/lib/typescript/molecules/index.d.ts.map +1 -0
- package/lib/typescript/organisms/Alert.d.ts +29 -0
- package/lib/typescript/organisms/Alert.d.ts.map +1 -0
- package/lib/typescript/organisms/AlertProvider.d.ts +32 -0
- package/lib/typescript/organisms/AlertProvider.d.ts.map +1 -0
- package/lib/typescript/organisms/BottomSheet.d.ts +15 -0
- package/lib/typescript/organisms/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/organisms/DateField.d.ts +26 -0
- package/lib/typescript/organisms/DateField.d.ts.map +1 -0
- package/lib/typescript/organisms/DatePicker.d.ts +49 -0
- package/lib/typescript/organisms/DatePicker.d.ts.map +1 -0
- package/lib/typescript/organisms/List.d.ts +35 -0
- package/lib/typescript/organisms/List.d.ts.map +1 -0
- package/lib/typescript/organisms/Modal.d.ts +25 -0
- package/lib/typescript/organisms/Modal.d.ts.map +1 -0
- package/lib/typescript/organisms/Screen.d.ts +26 -0
- package/lib/typescript/organisms/Screen.d.ts.map +1 -0
- package/lib/typescript/organisms/SearchList.d.ts +40 -0
- package/lib/typescript/organisms/SearchList.d.ts.map +1 -0
- package/lib/typescript/organisms/Select.d.ts +25 -0
- package/lib/typescript/organisms/Select.d.ts.map +1 -0
- package/lib/typescript/organisms/Toast.d.ts +28 -0
- package/lib/typescript/organisms/Toast.d.ts.map +1 -0
- package/lib/typescript/organisms/ToastProvider.d.ts +36 -0
- package/lib/typescript/organisms/ToastProvider.d.ts.map +1 -0
- package/lib/typescript/organisms/Wizard.d.ts +40 -0
- package/lib/typescript/organisms/Wizard.d.ts.map +1 -0
- package/lib/typescript/organisms/index.d.ts +27 -0
- package/lib/typescript/organisms/index.d.ts.map +1 -0
- package/lib/typescript/theme/UIProvider.d.ts +47 -0
- package/lib/typescript/theme/UIProvider.d.ts.map +1 -0
- package/lib/typescript/theme/createStyles.d.ts +21 -0
- package/lib/typescript/theme/createStyles.d.ts.map +1 -0
- package/lib/typescript/theme/createTheme.d.ts +9 -0
- package/lib/typescript/theme/createTheme.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +14 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/insets.d.ts +9 -0
- package/lib/typescript/theme/insets.d.ts.map +1 -0
- package/lib/typescript/theme/labels.d.ts +13 -0
- package/lib/typescript/theme/labels.d.ts.map +1 -0
- package/lib/typescript/theme/palettes.d.ts +24 -0
- package/lib/typescript/theme/palettes.d.ts.map +1 -0
- package/lib/typescript/theme/tokens.d.ts +41 -0
- package/lib/typescript/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/theme/types.d.ts +24 -0
- package/lib/typescript/theme/types.d.ts.map +1 -0
- package/package.json +311 -0
- package/registry/alert-provider.json +21 -0
- package/registry/alert.json +19 -0
- package/registry/avatar-header.json +18 -0
- package/registry/avatar.json +18 -0
- package/registry/badge.json +18 -0
- package/registry/bottom-sheet.json +18 -0
- package/registry/button.json +18 -0
- package/registry/card.json +18 -0
- package/registry/checkbox.json +18 -0
- package/registry/core.json +64 -0
- package/registry/date-field.json +24 -0
- package/registry/date-picker.json +23 -0
- package/registry/divider.json +18 -0
- package/registry/empty-state.json +18 -0
- package/registry/fab.json +19 -0
- package/registry/form-actions.json +19 -0
- package/registry/icon-button.json +19 -0
- package/registry/image.json +20 -0
- package/registry/index.json +465 -0
- package/registry/info-row.json +19 -0
- package/registry/input.json +18 -0
- package/registry/key-value-row.json +18 -0
- package/registry/list.json +20 -0
- package/registry/manifest.json +263 -0
- package/registry/modal.json +21 -0
- package/registry/option-card.json +18 -0
- package/registry/pressable-scale.json +18 -0
- package/registry/screen.json +18 -0
- package/registry/search-list.json +23 -0
- package/registry/select.json +18 -0
- package/registry/spinner.json +18 -0
- package/registry/stepper.json +18 -0
- package/registry/steps.json +18 -0
- package/registry/theme-toggle.json +18 -0
- package/registry/title.json +21 -0
- package/registry/toast-provider.json +20 -0
- package/registry/toast.json +18 -0
- package/registry/wizard.json +20 -0
- package/src/atoms/Avatar.tsx +40 -0
- package/src/atoms/Badge.tsx +55 -0
- package/src/atoms/Button.tsx +186 -0
- package/src/atoms/Card.tsx +27 -0
- package/src/atoms/Checkbox.tsx +75 -0
- package/src/atoms/Divider.tsx +14 -0
- package/src/atoms/EmptyState.tsx +60 -0
- package/src/atoms/Fab.tsx +63 -0
- package/src/atoms/IconButton.tsx +53 -0
- package/src/atoms/Image.tsx +137 -0
- package/src/atoms/Input.tsx +166 -0
- package/src/atoms/KeyValueRow.tsx +48 -0
- package/src/atoms/PressableScale.tsx +52 -0
- package/src/atoms/Spinner.tsx +127 -0
- package/src/atoms/Text.tsx +58 -0
- package/src/atoms/index.ts +30 -0
- package/src/icons/Icon.tsx +27 -0
- package/src/icons/defaultIcons.tsx +292 -0
- package/src/icons/index.ts +4 -0
- package/src/icons/types.ts +27 -0
- package/src/index.ts +5 -0
- package/src/molecules/AvatarHeader.tsx +69 -0
- package/src/molecules/FormActions.tsx +52 -0
- package/src/molecules/InfoRow.tsx +52 -0
- package/src/molecules/OptionCard.tsx +82 -0
- package/src/molecules/Stepper.tsx +76 -0
- package/src/molecules/Steps.tsx +198 -0
- package/src/molecules/ThemeToggle.tsx +67 -0
- package/src/molecules/index.ts +14 -0
- package/src/organisms/Alert.tsx +162 -0
- package/src/organisms/AlertProvider.tsx +125 -0
- package/src/organisms/BottomSheet.tsx +95 -0
- package/src/organisms/DateField.tsx +134 -0
- package/src/organisms/DatePicker.tsx +255 -0
- package/src/organisms/List.tsx +154 -0
- package/src/organisms/Modal.tsx +251 -0
- package/src/organisms/Screen.tsx +84 -0
- package/src/organisms/SearchList.tsx +186 -0
- package/src/organisms/Select.tsx +156 -0
- package/src/organisms/Toast.tsx +135 -0
- package/src/organisms/ToastProvider.tsx +166 -0
- package/src/organisms/Wizard.tsx +137 -0
- package/src/organisms/index.ts +26 -0
- package/src/theme/UIProvider.tsx +129 -0
- package/src/theme/createStyles.ts +40 -0
- package/src/theme/createTheme.ts +49 -0
- package/src/theme/index.ts +22 -0
- package/src/theme/insets.ts +9 -0
- package/src/theme/labels.ts +23 -0
- package/src/theme/palettes.ts +53 -0
- package/src/theme/tokens.ts +113 -0
- package/src/theme/types.ts +27 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo, useEffect, useRef } from 'react';
|
|
4
|
+
import { ActivityIndicator, Animated, Easing, Text, View } from 'react-native';
|
|
5
|
+
import { createStyles } from '../theme/createStyles';
|
|
6
|
+
import { useAllowFontScaling, useColors } from '../theme/UIProvider';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const useStyles = createStyles(theme => ({
|
|
9
|
+
container: {
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
padding: theme.tokens.spacing.xl
|
|
13
|
+
},
|
|
14
|
+
text: {
|
|
15
|
+
marginTop: theme.tokens.spacing.md,
|
|
16
|
+
color: theme.colors.textLight,
|
|
17
|
+
fontSize: theme.tokens.fontSize.md
|
|
18
|
+
},
|
|
19
|
+
dots: {
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
gap: theme.tokens.spacing.sm
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
/** Tres puntos que laten en secuencia. Animated + useNativeDriver: corre en el hilo nativo. */
|
|
26
|
+
const DotsIndicator = /*#__PURE__*/memo(({
|
|
27
|
+
color,
|
|
28
|
+
dotSize
|
|
29
|
+
}) => {
|
|
30
|
+
const dots = [useRef(new Animated.Value(0)).current, useRef(new Animated.Value(0)).current, useRef(new Animated.Value(0)).current];
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const animations = dots.map((dot, i) => Animated.loop(Animated.sequence([Animated.delay(i * 140), Animated.timing(dot, {
|
|
33
|
+
toValue: 1,
|
|
34
|
+
duration: 320,
|
|
35
|
+
useNativeDriver: true,
|
|
36
|
+
easing: Easing.out(Easing.quad)
|
|
37
|
+
}), Animated.timing(dot, {
|
|
38
|
+
toValue: 0,
|
|
39
|
+
duration: 320,
|
|
40
|
+
useNativeDriver: true,
|
|
41
|
+
easing: Easing.in(Easing.quad)
|
|
42
|
+
}), Animated.delay((2 - i) * 140)])));
|
|
43
|
+
animations.forEach(a => a.start());
|
|
44
|
+
// Sin stop() los loops siguen corriendo tras desmontar y mantienen vivo
|
|
45
|
+
// el árbol de Animated.
|
|
46
|
+
return () => animations.forEach(a => a.stop());
|
|
47
|
+
}, []);
|
|
48
|
+
return /*#__PURE__*/_jsx(View, {
|
|
49
|
+
style: {
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
gap: dotSize * 0.6
|
|
52
|
+
},
|
|
53
|
+
children: dots.map((dot, i) => /*#__PURE__*/_jsx(Animated.View, {
|
|
54
|
+
style: {
|
|
55
|
+
width: dotSize,
|
|
56
|
+
height: dotSize,
|
|
57
|
+
borderRadius: dotSize / 2,
|
|
58
|
+
backgroundColor: color,
|
|
59
|
+
opacity: dot.interpolate({
|
|
60
|
+
inputRange: [0, 1],
|
|
61
|
+
outputRange: [0.3, 1]
|
|
62
|
+
}),
|
|
63
|
+
transform: [{
|
|
64
|
+
scale: dot.interpolate({
|
|
65
|
+
inputRange: [0, 1],
|
|
66
|
+
outputRange: [0.75, 1]
|
|
67
|
+
})
|
|
68
|
+
}]
|
|
69
|
+
}
|
|
70
|
+
}, i))
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
DotsIndicator.displayName = 'DotsIndicator';
|
|
74
|
+
|
|
75
|
+
/** Anillo que gira: un borde con un solo lado coloreado. */
|
|
76
|
+
const RingIndicator = /*#__PURE__*/memo(({
|
|
77
|
+
color,
|
|
78
|
+
diameter
|
|
79
|
+
}) => {
|
|
80
|
+
const spin = useRef(new Animated.Value(0)).current;
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const animation = Animated.loop(Animated.timing(spin, {
|
|
83
|
+
toValue: 1,
|
|
84
|
+
duration: 900,
|
|
85
|
+
useNativeDriver: true,
|
|
86
|
+
easing: Easing.linear
|
|
87
|
+
}));
|
|
88
|
+
animation.start();
|
|
89
|
+
return () => animation.stop();
|
|
90
|
+
}, []);
|
|
91
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
92
|
+
style: {
|
|
93
|
+
width: diameter,
|
|
94
|
+
height: diameter,
|
|
95
|
+
borderRadius: diameter / 2,
|
|
96
|
+
borderWidth: Math.max(2, diameter / 10),
|
|
97
|
+
borderColor: color + '33',
|
|
98
|
+
borderTopColor: color,
|
|
99
|
+
transform: [{
|
|
100
|
+
rotate: spin.interpolate({
|
|
101
|
+
inputRange: [0, 1],
|
|
102
|
+
outputRange: ['0deg', '360deg']
|
|
103
|
+
})
|
|
104
|
+
}]
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
RingIndicator.displayName = 'RingIndicator';
|
|
109
|
+
export const Spinner = /*#__PURE__*/memo(({
|
|
110
|
+
size = 'large',
|
|
111
|
+
color,
|
|
112
|
+
text,
|
|
113
|
+
fullscreen = true,
|
|
114
|
+
variant = 'native',
|
|
115
|
+
indicator,
|
|
116
|
+
testID
|
|
117
|
+
}) => {
|
|
118
|
+
const colors = useColors();
|
|
119
|
+
const styles = useStyles();
|
|
120
|
+
const allowFontScaling = useAllowFontScaling();
|
|
121
|
+
const resolvedColor = color || colors.primary;
|
|
122
|
+
const scale = size === 'small' ? 8 : 12;
|
|
123
|
+
const renderIndicator = () => {
|
|
124
|
+
if (indicator) return indicator;
|
|
125
|
+
if (variant === 'dots') return /*#__PURE__*/_jsx(DotsIndicator, {
|
|
126
|
+
color: resolvedColor,
|
|
127
|
+
dotSize: scale
|
|
128
|
+
});
|
|
129
|
+
if (variant === 'ring') return /*#__PURE__*/_jsx(RingIndicator, {
|
|
130
|
+
color: resolvedColor,
|
|
131
|
+
diameter: scale * 3
|
|
132
|
+
});
|
|
133
|
+
return /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
134
|
+
size: size,
|
|
135
|
+
color: resolvedColor
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
139
|
+
style: [styles.container, fullscreen && {
|
|
140
|
+
flex: 1
|
|
141
|
+
}],
|
|
142
|
+
testID: testID,
|
|
143
|
+
children: [renderIndicator(), text && /*#__PURE__*/_jsx(Text, {
|
|
144
|
+
allowFontScaling: allowFontScaling,
|
|
145
|
+
style: styles.text,
|
|
146
|
+
children: text
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
Spinner.displayName = 'Spinner';
|
|
151
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","useEffect","useRef","ActivityIndicator","Animated","Easing","Text","View","createStyles","useAllowFontScaling","useColors","jsx","_jsx","jsxs","_jsxs","useStyles","theme","container","justifyContent","alignItems","padding","tokens","spacing","xl","text","marginTop","md","color","colors","textLight","fontSize","dots","flexDirection","gap","sm","DotsIndicator","dotSize","Value","current","animations","map","dot","i","loop","sequence","delay","timing","toValue","duration","useNativeDriver","easing","out","quad","in","forEach","a","start","stop","style","children","width","height","borderRadius","backgroundColor","opacity","interpolate","inputRange","outputRange","transform","scale","displayName","RingIndicator","diameter","spin","animation","linear","borderWidth","Math","max","borderColor","borderTopColor","rotate","Spinner","size","fullscreen","variant","indicator","testID","styles","allowFontScaling","resolvedColor","primary","renderIndicator","flex"],"sourceRoot":"../../../src","sources":["atoms/Spinner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACtD,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC9E,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,EAAEC,SAAS,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAqBrE,MAAMC,SAAS,GAAGP,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;IAACN,MAAM,EAAEA,MAAO;IAAA5B,QAAA,GACxEiC,eAAe,CAAC,CAAC,EACjBpE,IAAI,iBACHZ,IAAA,CAACN,IAAI;MAACmF,gBAAgB,EAAEA,gBAAiB;MAAC/B,KAAK,EAAE8B,MAAM,CAAChE,IAAK;MAAAmC,QAAA,EAC1DnC;IAAI,CACD,CACP;EAAA,CACG,CAAC;AAEX,CACF,CAAC;AACD0D,OAAO,CAACZ,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo } from 'react';
|
|
4
|
+
import { Text as RNText } from 'react-native';
|
|
5
|
+
import { createStyles } from '../theme/createStyles';
|
|
6
|
+
import { useAllowFontScaling, useColors } from '../theme/UIProvider';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const useStyles = createStyles(theme => ({
|
|
9
|
+
title: {
|
|
10
|
+
fontSize: theme.tokens.fontSize.xxl,
|
|
11
|
+
fontWeight: theme.tokens.fontWeight.bold,
|
|
12
|
+
letterSpacing: -0.5,
|
|
13
|
+
color: theme.colors.text
|
|
14
|
+
},
|
|
15
|
+
subtitle: {
|
|
16
|
+
fontSize: theme.tokens.fontSize.lg,
|
|
17
|
+
fontWeight: theme.tokens.fontWeight.medium,
|
|
18
|
+
color: theme.colors.text
|
|
19
|
+
},
|
|
20
|
+
body: {
|
|
21
|
+
fontSize: theme.tokens.fontSize.md,
|
|
22
|
+
lineHeight: theme.tokens.lineHeight.md,
|
|
23
|
+
color: theme.colors.text
|
|
24
|
+
},
|
|
25
|
+
caption: {
|
|
26
|
+
fontSize: theme.tokens.fontSize.sm,
|
|
27
|
+
color: theme.colors.textLight
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
function makeVariant(variant, defaultColor) {
|
|
31
|
+
const Component = /*#__PURE__*/memo(({
|
|
32
|
+
children,
|
|
33
|
+
style,
|
|
34
|
+
color,
|
|
35
|
+
align = 'left',
|
|
36
|
+
...props
|
|
37
|
+
}) => {
|
|
38
|
+
const styles = useStyles();
|
|
39
|
+
const colors = useColors();
|
|
40
|
+
const allowFontScaling = useAllowFontScaling();
|
|
41
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
42
|
+
allowFontScaling: allowFontScaling,
|
|
43
|
+
style: [styles[variant], {
|
|
44
|
+
color: color || colors[defaultColor],
|
|
45
|
+
textAlign: align
|
|
46
|
+
}, style],
|
|
47
|
+
...props,
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
Component.displayName = variant;
|
|
52
|
+
return Component;
|
|
53
|
+
}
|
|
54
|
+
export const Title = makeVariant('title', 'text');
|
|
55
|
+
export const Subtitle = makeVariant('subtitle', 'text');
|
|
56
|
+
export const Body = makeVariant('body', 'text');
|
|
57
|
+
export const Caption = makeVariant('caption', 'textLight');
|
|
58
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","Text","RNText","createStyles","useAllowFontScaling","useColors","jsx","_jsx","useStyles","theme","title","fontSize","tokens","xxl","fontWeight","bold","letterSpacing","color","colors","text","subtitle","lg","medium","body","md","lineHeight","caption","sm","textLight","makeVariant","variant","defaultColor","Component","children","style","align","props","styles","allowFontScaling","textAlign","displayName","Title","Subtitle","Body","Caption"],"sourceRoot":"../../../src","sources":["atoms/Text.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,IAAIC,MAAM,QAAwD,cAAc;AAC7F,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,EAAEC,SAAS,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASrE,MAAMC,SAAS,GAAGL,YAAY,CAAEM,KAAK,KAAM;EACzCC,KAAK,EAAE;IACLC,QAAQ,EAAEF,KAAK,CAACG,MAAM,CAAC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MAAM,CAACa,YAAY,CAAC;QAAEQ,SAAS,EAAEJ;MAAM,CAAC,EAAED,KAAK,CAAE;MAAA,GACxFE,KAAK;MAAAH,QAAA,EAERA;IAAQ,CACH,CAAC;EAEb,CAAC,CAAC;EACFD,SAAS,CAACQ,WAAW,GAAGV,OAAO;EAC/B,OAAOE,SAAS;AAClB;AAEA,OAAO,MAAMS,KAAK,GAAGZ,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;AACjD,OAAO,MAAMa,QAAQ,GAAGb,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC;AACvD,OAAO,MAAMc,IAAI,GAAGd,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;AAC/C,OAAO,MAAMe,OAAO,GAAGf,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Title, Subtitle, Body, Caption } from './Text';
|
|
4
|
+
export { Button } from './Button';
|
|
5
|
+
export { IconButton } from './IconButton';
|
|
6
|
+
export { Input } from './Input';
|
|
7
|
+
export { Checkbox } from './Checkbox';
|
|
8
|
+
export { Badge } from './Badge';
|
|
9
|
+
export { Card } from './Card';
|
|
10
|
+
export { Divider } from './Divider';
|
|
11
|
+
export { Avatar } from './Avatar';
|
|
12
|
+
export { Image, prefetchImage } from './Image';
|
|
13
|
+
export { Spinner } from './Spinner';
|
|
14
|
+
export { EmptyState } from './EmptyState';
|
|
15
|
+
export { KeyValueRow } from './KeyValueRow';
|
|
16
|
+
export { Fab } from './Fab';
|
|
17
|
+
export { PressableScale } from './PressableScale';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Title","Subtitle","Body","Caption","Button","IconButton","Input","Checkbox","Badge","Card","Divider","Avatar","Image","prefetchImage","Spinner","EmptyState","KeyValueRow","Fab","PressableScale"],"sourceRoot":"../../../src","sources":["atoms/index.ts"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,QAAQ,QAAQ;AAEvD,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,KAAK,QAAQ,SAAS;AAE/B,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,OAAO,QAAQ,WAAW;AAEnC,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,KAAK,EAAEC,aAAa,QAAQ,SAAS;AAE9C,SAASC,OAAO,QAAQ,WAAW;AAEnC,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,WAAW,QAAQ,eAAe;AAE3C,SAASC,GAAG,QAAQ,OAAO;AAE3B,SAASC,cAAc,QAAQ,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { useColors, useIcons } from '../theme/UIProvider';
|
|
6
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Icon
|
|
9
|
+
* Resuelve el glifo vía el renderer activo (UIProvider.icons, default zero-dep
|
|
10
|
+
* si no se configuró ninguno). Uso interno de la librería — los componentes
|
|
11
|
+
* públicos exponen `icon?: ReactNode` además de esto, para que el consumidor
|
|
12
|
+
* pueda inyectar cualquier ícono sin pasar por el sistema de nombres.
|
|
13
|
+
*/
|
|
14
|
+
export const Icon = /*#__PURE__*/memo(({
|
|
15
|
+
name,
|
|
16
|
+
size = 20,
|
|
17
|
+
color,
|
|
18
|
+
style
|
|
19
|
+
}) => {
|
|
20
|
+
const colors = useColors();
|
|
21
|
+
const render = useIcons();
|
|
22
|
+
const glyph = render(name, {
|
|
23
|
+
size,
|
|
24
|
+
color: color ?? colors.text
|
|
25
|
+
});
|
|
26
|
+
if (!style) return /*#__PURE__*/_jsx(_Fragment, {
|
|
27
|
+
children: glyph
|
|
28
|
+
});
|
|
29
|
+
return /*#__PURE__*/_jsx(View, {
|
|
30
|
+
style: style,
|
|
31
|
+
children: glyph
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
Icon.displayName = 'Icon';
|
|
35
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","View","useColors","useIcons","Fragment","_Fragment","jsx","_jsx","Icon","name","size","color","style","colors","render","glyph","text","children","displayName"],"sourceRoot":"../../../src","sources":["icons/Icon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,SAAS,EAAEC,QAAQ,QAAQ,qBAAqB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAU1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,gBAAGR,IAAI,CAAC,CAAC;EAAES,IAAI;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK;EAAEC;AAAiB,CAAC,KAAK;EACzE,MAAMC,MAAM,GAAGX,SAAS,CAAC,CAAC;EAC1B,MAAMY,MAAM,GAAGX,QAAQ,CAAC,CAAC;EACzB,MAAMY,KAAK,GAAGD,MAAM,CAACL,IAAI,EAAE;IAAEC,IAAI;IAAEC,KAAK,EAAEA,KAAK,IAAIE,MAAM,CAACG;EAAK,CAAC,CAAC;EACjE,IAAI,CAACJ,KAAK,EAAE,oBAAOL,IAAA,CAAAF,SAAA;IAAAY,QAAA,EAAGF;EAAK,CAAG,CAAC;EAC/B,oBAAOR,IAAA,CAACN,IAAI;IAACW,KAAK,EAAEA,KAAM;IAAAK,QAAA,EAAEF;EAAK,CAAO,CAAC;AAC3C,CAAC,CAAC;AACFP,IAAI,CAACU,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo } from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Glifos default dibujados con primitivas de RN (View + border + transform).
|
|
8
|
+
* Cero dependencias, cero fuentes, cero carga asíncrona. Cubren únicamente
|
|
9
|
+
* lo que la librería necesita internamente (checkbox, chevrons de Select,
|
|
10
|
+
* toggle de password en Input, etc). Para íconos de producto, el consumidor
|
|
11
|
+
* inyecta su propio set vía <UIProvider icons={...}> o la prop `icon`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const Chevron = /*#__PURE__*/memo(({
|
|
15
|
+
size,
|
|
16
|
+
color,
|
|
17
|
+
direction
|
|
18
|
+
}) => {
|
|
19
|
+
const strokeWidth = Math.max(1.5, size / 12);
|
|
20
|
+
const arm = size * 0.32;
|
|
21
|
+
const rotation = {
|
|
22
|
+
down: 45,
|
|
23
|
+
up: 225,
|
|
24
|
+
left: 135,
|
|
25
|
+
right: -45
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/_jsx(View, {
|
|
28
|
+
style: {
|
|
29
|
+
width: size,
|
|
30
|
+
height: size,
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center'
|
|
33
|
+
},
|
|
34
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
35
|
+
style: {
|
|
36
|
+
width: arm,
|
|
37
|
+
height: arm,
|
|
38
|
+
borderRightWidth: strokeWidth,
|
|
39
|
+
borderBottomWidth: strokeWidth,
|
|
40
|
+
borderColor: color,
|
|
41
|
+
transform: [{
|
|
42
|
+
rotate: `${rotation[direction]}deg`
|
|
43
|
+
}, {
|
|
44
|
+
translateY: -arm * 0.15
|
|
45
|
+
}]
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
Chevron.displayName = 'Chevron';
|
|
51
|
+
const Check = /*#__PURE__*/memo(({
|
|
52
|
+
size,
|
|
53
|
+
color
|
|
54
|
+
}) => {
|
|
55
|
+
const strokeWidth = Math.max(1.5, size / 10);
|
|
56
|
+
return /*#__PURE__*/_jsx(View, {
|
|
57
|
+
style: {
|
|
58
|
+
width: size,
|
|
59
|
+
height: size,
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
justifyContent: 'center'
|
|
62
|
+
},
|
|
63
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
64
|
+
style: {
|
|
65
|
+
width: size * 0.5,
|
|
66
|
+
height: size * 0.28,
|
|
67
|
+
borderLeftWidth: strokeWidth,
|
|
68
|
+
borderBottomWidth: strokeWidth,
|
|
69
|
+
borderColor: color,
|
|
70
|
+
transform: [{
|
|
71
|
+
rotate: '-45deg'
|
|
72
|
+
}, {
|
|
73
|
+
translateY: -size * 0.06
|
|
74
|
+
}]
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
Check.displayName = 'Check';
|
|
80
|
+
const Close = /*#__PURE__*/memo(({
|
|
81
|
+
size,
|
|
82
|
+
color
|
|
83
|
+
}) => {
|
|
84
|
+
const strokeWidth = Math.max(1.5, size / 10);
|
|
85
|
+
const line = size * 0.62;
|
|
86
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
87
|
+
style: {
|
|
88
|
+
width: size,
|
|
89
|
+
height: size,
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
justifyContent: 'center'
|
|
92
|
+
},
|
|
93
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
94
|
+
style: {
|
|
95
|
+
position: 'absolute',
|
|
96
|
+
width: line,
|
|
97
|
+
height: strokeWidth,
|
|
98
|
+
backgroundColor: color,
|
|
99
|
+
borderRadius: strokeWidth / 2,
|
|
100
|
+
transform: [{
|
|
101
|
+
rotate: '45deg'
|
|
102
|
+
}]
|
|
103
|
+
}
|
|
104
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
105
|
+
style: {
|
|
106
|
+
position: 'absolute',
|
|
107
|
+
width: line,
|
|
108
|
+
height: strokeWidth,
|
|
109
|
+
backgroundColor: color,
|
|
110
|
+
borderRadius: strokeWidth / 2,
|
|
111
|
+
transform: [{
|
|
112
|
+
rotate: '-45deg'
|
|
113
|
+
}]
|
|
114
|
+
}
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
Close.displayName = 'Close';
|
|
119
|
+
const PlusMinus = /*#__PURE__*/memo(({
|
|
120
|
+
size,
|
|
121
|
+
color,
|
|
122
|
+
minusOnly
|
|
123
|
+
}) => {
|
|
124
|
+
const strokeWidth = Math.max(1.5, size / 10);
|
|
125
|
+
const line = size * 0.56;
|
|
126
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
127
|
+
style: {
|
|
128
|
+
width: size,
|
|
129
|
+
height: size,
|
|
130
|
+
alignItems: 'center',
|
|
131
|
+
justifyContent: 'center'
|
|
132
|
+
},
|
|
133
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
134
|
+
style: {
|
|
135
|
+
position: 'absolute',
|
|
136
|
+
width: line,
|
|
137
|
+
height: strokeWidth,
|
|
138
|
+
backgroundColor: color,
|
|
139
|
+
borderRadius: strokeWidth / 2
|
|
140
|
+
}
|
|
141
|
+
}), !minusOnly && /*#__PURE__*/_jsx(View, {
|
|
142
|
+
style: {
|
|
143
|
+
position: 'absolute',
|
|
144
|
+
width: strokeWidth,
|
|
145
|
+
height: line,
|
|
146
|
+
backgroundColor: color,
|
|
147
|
+
borderRadius: strokeWidth / 2
|
|
148
|
+
}
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
PlusMinus.displayName = 'PlusMinus';
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Círculo con un glifo tipográfico adentro (!, i, ?).
|
|
156
|
+
*
|
|
157
|
+
* Usa <Text> con la fuente del sistema en vez de componer el glifo con
|
|
158
|
+
* Views: sigue siendo cero-dependencias (no carga ninguna fuente), y "i" vs
|
|
159
|
+
* "!" vs "?" quedan inequívocos. Dibujarlos con barras y puntos daba un
|
|
160
|
+
* "info" idéntico a un "!" invertido, que es exactamente lo que un ícono de
|
|
161
|
+
* información no debe comunicar.
|
|
162
|
+
*/
|
|
163
|
+
const Circle = /*#__PURE__*/memo(({
|
|
164
|
+
size,
|
|
165
|
+
color,
|
|
166
|
+
filled,
|
|
167
|
+
label
|
|
168
|
+
}) => {
|
|
169
|
+
const strokeWidth = Math.max(1.5, size / 12);
|
|
170
|
+
return /*#__PURE__*/_jsx(View, {
|
|
171
|
+
style: {
|
|
172
|
+
width: size,
|
|
173
|
+
height: size,
|
|
174
|
+
borderRadius: size / 2,
|
|
175
|
+
borderWidth: filled ? 0 : strokeWidth,
|
|
176
|
+
borderColor: color,
|
|
177
|
+
backgroundColor: filled ? color : 'transparent',
|
|
178
|
+
alignItems: 'center',
|
|
179
|
+
justifyContent: 'center'
|
|
180
|
+
},
|
|
181
|
+
children: !!label && /*#__PURE__*/_jsx(Text, {
|
|
182
|
+
allowFontScaling: false,
|
|
183
|
+
style: {
|
|
184
|
+
color: filled ? '#fff' : color,
|
|
185
|
+
fontSize: size * 0.62,
|
|
186
|
+
lineHeight: size * 0.74,
|
|
187
|
+
fontWeight: '700',
|
|
188
|
+
textAlign: 'center',
|
|
189
|
+
includeFontPadding: false
|
|
190
|
+
},
|
|
191
|
+
children: label
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
Circle.displayName = 'Circle';
|
|
196
|
+
const Eye = /*#__PURE__*/memo(({
|
|
197
|
+
size,
|
|
198
|
+
color,
|
|
199
|
+
off
|
|
200
|
+
}) => {
|
|
201
|
+
const strokeWidth = Math.max(1.5, size / 12);
|
|
202
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
203
|
+
style: {
|
|
204
|
+
width: size,
|
|
205
|
+
height: size,
|
|
206
|
+
alignItems: 'center',
|
|
207
|
+
justifyContent: 'center'
|
|
208
|
+
},
|
|
209
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
210
|
+
style: {
|
|
211
|
+
width: size * 0.8,
|
|
212
|
+
height: size * 0.8,
|
|
213
|
+
borderRadius: size * 0.4,
|
|
214
|
+
borderWidth: strokeWidth,
|
|
215
|
+
borderColor: color,
|
|
216
|
+
overflow: 'hidden',
|
|
217
|
+
alignItems: 'center',
|
|
218
|
+
justifyContent: 'center',
|
|
219
|
+
transform: [{
|
|
220
|
+
scaleY: 0.55
|
|
221
|
+
}]
|
|
222
|
+
},
|
|
223
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
224
|
+
style: {
|
|
225
|
+
width: size * 0.26,
|
|
226
|
+
height: size * 0.26,
|
|
227
|
+
borderRadius: size * 0.13,
|
|
228
|
+
backgroundColor: color,
|
|
229
|
+
transform: [{
|
|
230
|
+
scaleY: 1 / 0.55
|
|
231
|
+
}]
|
|
232
|
+
}
|
|
233
|
+
})
|
|
234
|
+
}), off && /*#__PURE__*/_jsx(View, {
|
|
235
|
+
style: {
|
|
236
|
+
position: 'absolute',
|
|
237
|
+
width: size * 1.05,
|
|
238
|
+
height: strokeWidth,
|
|
239
|
+
backgroundColor: color,
|
|
240
|
+
borderRadius: strokeWidth / 2,
|
|
241
|
+
transform: [{
|
|
242
|
+
rotate: '-45deg'
|
|
243
|
+
}]
|
|
244
|
+
}
|
|
245
|
+
})]
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
Eye.displayName = 'Eye';
|
|
249
|
+
const Search = /*#__PURE__*/memo(({
|
|
250
|
+
size,
|
|
251
|
+
color
|
|
252
|
+
}) => {
|
|
253
|
+
const strokeWidth = Math.max(1.5, size / 9);
|
|
254
|
+
// Lente grande (72% del alto) arriba-izquierda y mango corto saliendo de su
|
|
255
|
+
// borde inferior-derecho sobre la diagonal de 45°. Las proporciones importan
|
|
256
|
+
// a tamaños chicos (16-20px): con un lente chico y mango largo el glifo se
|
|
257
|
+
// lee como una coma, no como una lupa.
|
|
258
|
+
const lensD = size * 0.72;
|
|
259
|
+
const lensR = lensD / 2;
|
|
260
|
+
const handleLen = size * 0.34;
|
|
261
|
+
const diag = Math.SQRT1_2; // cos(45°) === sin(45°)
|
|
262
|
+
// El mango se centra sobre la diagonal, arrancando justo en el borde del
|
|
263
|
+
// lente: distancia = radio + mitad del mango, menos un solapamiento de
|
|
264
|
+
// medio trazo para que no quede un hueco entre borde y mango.
|
|
265
|
+
const dist = lensR + handleLen / 2 - strokeWidth / 2;
|
|
266
|
+
const cx = lensR + dist * diag;
|
|
267
|
+
const cy = lensR + dist * diag;
|
|
268
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
269
|
+
style: {
|
|
270
|
+
width: size,
|
|
271
|
+
height: size
|
|
272
|
+
},
|
|
273
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
274
|
+
style: {
|
|
275
|
+
position: 'absolute',
|
|
276
|
+
top: 0,
|
|
277
|
+
left: 0,
|
|
278
|
+
width: lensD,
|
|
279
|
+
height: lensD,
|
|
280
|
+
borderRadius: lensR,
|
|
281
|
+
borderWidth: strokeWidth,
|
|
282
|
+
borderColor: color
|
|
283
|
+
}
|
|
284
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
285
|
+
style: {
|
|
286
|
+
position: 'absolute',
|
|
287
|
+
left: cx - strokeWidth / 2,
|
|
288
|
+
top: cy - handleLen / 2,
|
|
289
|
+
width: strokeWidth,
|
|
290
|
+
height: handleLen,
|
|
291
|
+
backgroundColor: color,
|
|
292
|
+
borderRadius: strokeWidth / 2,
|
|
293
|
+
transform: [{
|
|
294
|
+
rotate: '-45deg'
|
|
295
|
+
}]
|
|
296
|
+
}
|
|
297
|
+
})]
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
Search.displayName = 'Search';
|
|
301
|
+
|
|
302
|
+
/** Renderer default. Se usa cuando <UIProvider icons={...}> no pasa uno propio. */
|
|
303
|
+
export function renderDefaultIcon(name, props) {
|
|
304
|
+
switch (name) {
|
|
305
|
+
case 'check':
|
|
306
|
+
return /*#__PURE__*/_jsx(Check, {
|
|
307
|
+
...props
|
|
308
|
+
});
|
|
309
|
+
case 'close':
|
|
310
|
+
return /*#__PURE__*/_jsx(Close, {
|
|
311
|
+
...props
|
|
312
|
+
});
|
|
313
|
+
case 'chevron-down':
|
|
314
|
+
return /*#__PURE__*/_jsx(Chevron, {
|
|
315
|
+
...props,
|
|
316
|
+
direction: "down"
|
|
317
|
+
});
|
|
318
|
+
case 'chevron-up':
|
|
319
|
+
return /*#__PURE__*/_jsx(Chevron, {
|
|
320
|
+
...props,
|
|
321
|
+
direction: "up"
|
|
322
|
+
});
|
|
323
|
+
case 'chevron-left':
|
|
324
|
+
return /*#__PURE__*/_jsx(Chevron, {
|
|
325
|
+
...props,
|
|
326
|
+
direction: "left"
|
|
327
|
+
});
|
|
328
|
+
case 'chevron-right':
|
|
329
|
+
return /*#__PURE__*/_jsx(Chevron, {
|
|
330
|
+
...props,
|
|
331
|
+
direction: "right"
|
|
332
|
+
});
|
|
333
|
+
case 'eye':
|
|
334
|
+
return /*#__PURE__*/_jsx(Eye, {
|
|
335
|
+
...props
|
|
336
|
+
});
|
|
337
|
+
case 'eye-off':
|
|
338
|
+
return /*#__PURE__*/_jsx(Eye, {
|
|
339
|
+
...props,
|
|
340
|
+
off: true
|
|
341
|
+
});
|
|
342
|
+
case 'search':
|
|
343
|
+
return /*#__PURE__*/_jsx(Search, {
|
|
344
|
+
...props
|
|
345
|
+
});
|
|
346
|
+
case 'plus':
|
|
347
|
+
return /*#__PURE__*/_jsx(PlusMinus, {
|
|
348
|
+
...props
|
|
349
|
+
});
|
|
350
|
+
case 'minus':
|
|
351
|
+
return /*#__PURE__*/_jsx(PlusMinus, {
|
|
352
|
+
...props,
|
|
353
|
+
minusOnly: true
|
|
354
|
+
});
|
|
355
|
+
case 'alert':
|
|
356
|
+
return /*#__PURE__*/_jsx(Circle, {
|
|
357
|
+
...props,
|
|
358
|
+
filled: true,
|
|
359
|
+
label: "!"
|
|
360
|
+
});
|
|
361
|
+
case 'info':
|
|
362
|
+
return /*#__PURE__*/_jsx(Circle, {
|
|
363
|
+
...props,
|
|
364
|
+
label: "i"
|
|
365
|
+
});
|
|
366
|
+
case 'warning':
|
|
367
|
+
return /*#__PURE__*/_jsx(Circle, {
|
|
368
|
+
...props,
|
|
369
|
+
filled: true,
|
|
370
|
+
label: "!"
|
|
371
|
+
});
|
|
372
|
+
case 'question':
|
|
373
|
+
return /*#__PURE__*/_jsx(Circle, {
|
|
374
|
+
...props,
|
|
375
|
+
label: "?"
|
|
376
|
+
});
|
|
377
|
+
default:
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=defaultIcons.js.map
|