react-native-atomic-ui 1.0.1 → 1.0.3
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 +14 -0
- package/dist/advanced/date-picker/index.js.map +1 -1
- package/dist/advanced/date-picker/index.mjs.map +1 -1
- package/dist/advanced/file-picker/index.js.map +1 -1
- package/dist/advanced/file-picker/index.mjs.map +1 -1
- package/dist/advanced/picker/index.js.map +1 -1
- package/dist/advanced/picker/index.mjs.map +1 -1
- package/dist/advanced/rich-text/index.js.map +1 -1
- package/dist/advanced/rich-text/index.mjs.map +1 -1
- package/dist/{chunk-IOIXIQ2F.mjs → chunk-56IADPYY.mjs} +2 -5
- package/dist/chunk-56IADPYY.mjs.map +7 -0
- package/dist/chunk-GSLM4BKO.mjs +789 -0
- package/dist/chunk-GSLM4BKO.mjs.map +7 -0
- package/dist/components/display/Badge.d.ts +7 -0
- package/dist/components/display/Badge.d.ts.map +1 -0
- package/dist/components/display/Badge.js +52 -0
- package/dist/components/display/Badge.js.map +1 -0
- package/dist/components/display/Divider.d.ts +7 -0
- package/dist/components/display/Divider.d.ts.map +1 -0
- package/dist/components/display/Divider.js +19 -0
- package/dist/components/display/Divider.js.map +1 -0
- package/dist/components/display/ProgressBar.d.ts +7 -0
- package/dist/components/display/ProgressBar.d.ts.map +1 -0
- package/dist/components/display/ProgressBar.js +27 -0
- package/dist/components/display/ProgressBar.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +504 -35
- package/dist/components/index.js.map +4 -4
- package/dist/components/index.mjs +18 -2
- package/dist/components/inputs/Button.d.ts.map +1 -1
- package/dist/components/inputs/Button.js +1 -1
- package/dist/components/inputs/Button.js.map +1 -1
- package/dist/components/inputs/CheckBox.d.ts +7 -0
- package/dist/components/inputs/CheckBox.d.ts.map +1 -0
- package/dist/components/inputs/CheckBox.js +56 -0
- package/dist/components/inputs/CheckBox.js.map +1 -0
- package/dist/components/inputs/Input.d.ts +7 -0
- package/dist/components/inputs/Input.d.ts.map +1 -0
- package/dist/components/inputs/Input.js +44 -0
- package/dist/components/inputs/Input.js.map +1 -0
- package/dist/components/inputs/RadioButton.d.ts +7 -0
- package/dist/components/inputs/RadioButton.d.ts.map +1 -0
- package/dist/components/inputs/RadioButton.js +57 -0
- package/dist/components/inputs/RadioButton.js.map +1 -0
- package/dist/components/inputs/Switch.d.ts +7 -0
- package/dist/components/inputs/Switch.d.ts.map +1 -0
- package/dist/components/inputs/Switch.js +14 -0
- package/dist/components/inputs/Switch.js.map +1 -0
- package/dist/components/layouts/Box.d.ts +3 -3
- package/dist/components/layouts/Box.d.ts.map +1 -1
- package/dist/components/layouts/Box.js +23 -4
- package/dist/components/layouts/Box.js.map +1 -1
- package/dist/components/layouts/Collapsible.d.ts +7 -0
- package/dist/components/layouts/Collapsible.d.ts.map +1 -0
- package/dist/components/layouts/Collapsible.js +49 -0
- package/dist/components/layouts/Collapsible.js.map +1 -0
- package/dist/components/typography/Text.d.ts +1 -1
- package/dist/components/typography/Text.d.ts.map +1 -1
- package/dist/components/typography/Text.js +17 -17
- package/dist/components/typography/Text.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +505 -39
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +18 -2
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -4
- package/dist/theme/index.js.map +2 -2
- package/dist/theme/index.mjs +1 -1
- package/dist/types/index.d.ts +64 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -4
- package/dist/chunk-IOIXIQ2F.mjs.map +0 -7
- package/dist/chunk-NUUZYCND.mjs +0 -318
- package/dist/chunk-NUUZYCND.mjs.map +0 -7
package/README.md
CHANGED
|
@@ -56,6 +56,20 @@ npm install react-native-atomic-ui react-native
|
|
|
56
56
|
yarn add react-native-atomic-ui react-native
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## 📱 Example App
|
|
60
|
+
|
|
61
|
+
Want to see all components in action? Check out our comprehensive showcase app:
|
|
62
|
+
|
|
63
|
+
👉 **[AtomicUIApp Example](examples/app/)** - A complete React Native app demonstrating all components, themes, and features.
|
|
64
|
+
|
|
65
|
+
To run the example app:
|
|
66
|
+
```bash
|
|
67
|
+
cd examples/app
|
|
68
|
+
npm install
|
|
69
|
+
cd ios && pod install && cd ..
|
|
70
|
+
npx react-native run-ios # or run-android
|
|
71
|
+
```
|
|
72
|
+
|
|
59
73
|
### With Optional Components
|
|
60
74
|
|
|
61
75
|
```bash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/date-picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * DatePickerInput - Advanced component for date selection\n * Requires peer dependency: @react-native-community/datetimepicker\n *\n * Installation:\n * npm install @react-native-community/datetimepicker\n *\n * Usage:\n * import { DatePickerInput } from 'react-native-atomic-ui/date-picker';\n */\n\nexport interface DatePickerInputProps {\n value: Date;\n onChange: (date: Date) => void;\n label?: string;\n format?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function DatePickerInput() {\n throw new Error(\n 'DatePickerInput requires peer dependency: @react-native-community/datetimepicker\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * DatePickerInput - Advanced component for date selection\n * Requires peer dependency: @react-native-community/datetimepicker\n *\n * Installation:\n * npm install @react-native-community/datetimepicker\n *\n * Usage:\n * import { DatePickerInput } from 'react-native-atomic-ui/date-picker';\n */\n\nexport interface DatePickerInputProps {\n value: Date;\n onChange: (date: Date) => void;\n label?: string;\n format?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function DatePickerInput() {\n throw new Error(\n 'DatePickerInput requires peer dependency: @react-native-community/datetimepicker\\n' +\n 'Install it with: npm install @react-native-community/datetimepicker'\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBO,SAAS,kBAAkB;AAChC,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/date-picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * DatePickerInput - Advanced component for date selection\n * Requires peer dependency: @react-native-community/datetimepicker\n *\n * Installation:\n * npm install @react-native-community/datetimepicker\n *\n * Usage:\n * import { DatePickerInput } from 'react-native-atomic-ui/date-picker';\n */\n\nexport interface DatePickerInputProps {\n value: Date;\n onChange: (date: Date) => void;\n label?: string;\n format?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function DatePickerInput() {\n throw new Error(\n 'DatePickerInput requires peer dependency: @react-native-community/datetimepicker\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * DatePickerInput - Advanced component for date selection\n * Requires peer dependency: @react-native-community/datetimepicker\n *\n * Installation:\n * npm install @react-native-community/datetimepicker\n *\n * Usage:\n * import { DatePickerInput } from 'react-native-atomic-ui/date-picker';\n */\n\nexport interface DatePickerInputProps {\n value: Date;\n onChange: (date: Date) => void;\n label?: string;\n format?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function DatePickerInput() {\n throw new Error(\n 'DatePickerInput requires peer dependency: @react-native-community/datetimepicker\\n' +\n 'Install it with: npm install @react-native-community/datetimepicker'\n );\n}\n"],
|
|
5
5
|
"mappings": ";AAwBO,SAAS,kBAAkB;AAChC,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/file-picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * FilePicker - Advanced component for file selection\n * Requires peer dependency: @react-native-documents/picker\n *\n * Installation:\n * npm install @react-native-documents/picker\n *\n * Usage:\n * import { FilePicker } from 'react-native-atomic-ui/file-picker';\n */\n\nexport interface FilePickerProps {\n onFileSelected: (file: any) => void;\n multiple?: boolean;\n type?: string;\n label?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function FilePicker() {\n throw new Error(\n 'FilePicker requires peer dependency: @react-native-documents/picker\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * FilePicker - Advanced component for file selection\n * Requires peer dependency: @react-native-documents/picker\n *\n * Installation:\n * npm install @react-native-documents/picker\n *\n * Usage:\n * import { FilePicker } from 'react-native-atomic-ui/file-picker';\n */\n\nexport interface FilePickerProps {\n onFileSelected: (file: any) => void;\n multiple?: boolean;\n type?: string;\n label?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function FilePicker() {\n throw new Error(\n 'FilePicker requires peer dependency: @react-native-documents/picker\\n' +\n 'Install it with: npm install @react-native-documents/picker'\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBO,SAAS,aAAa;AAC3B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/file-picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * FilePicker - Advanced component for file selection\n * Requires peer dependency: @react-native-documents/picker\n *\n * Installation:\n * npm install @react-native-documents/picker\n *\n * Usage:\n * import { FilePicker } from 'react-native-atomic-ui/file-picker';\n */\n\nexport interface FilePickerProps {\n onFileSelected: (file: any) => void;\n multiple?: boolean;\n type?: string;\n label?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function FilePicker() {\n throw new Error(\n 'FilePicker requires peer dependency: @react-native-documents/picker\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * FilePicker - Advanced component for file selection\n * Requires peer dependency: @react-native-documents/picker\n *\n * Installation:\n * npm install @react-native-documents/picker\n *\n * Usage:\n * import { FilePicker } from 'react-native-atomic-ui/file-picker';\n */\n\nexport interface FilePickerProps {\n onFileSelected: (file: any) => void;\n multiple?: boolean;\n type?: string;\n label?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementation would go here\n// This is a placeholder for library structure\nexport function FilePicker() {\n throw new Error(\n 'FilePicker requires peer dependency: @react-native-documents/picker\\n' +\n 'Install it with: npm install @react-native-documents/picker'\n );\n}\n"],
|
|
5
5
|
"mappings": ";AAuBO,SAAS,aAAa;AAC3B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Picker Components - Advanced dropdowns and selection\n * Requires peer dependency: react-native-picker-select\n *\n * Installation:\n * npm install react-native-picker-select\n *\n * Usage:\n * import { BorderedPickerInput } from 'react-native-atomic-ui/picker';\n */\n\nexport interface PickerOption {\n label: string;\n value: string | number;\n}\n\nexport interface PickerInputProps {\n value: string | number | undefined;\n onValueChange: (value: string | number) => void;\n items: PickerOption[];\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function BorderedPickerInput() {\n throw new Error(\n 'BorderedPickerInput requires peer dependency: react-native-picker-select\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * Picker Components - Advanced dropdowns and selection\n * Requires peer dependency: react-native-picker-select\n *\n * Installation:\n * npm install react-native-picker-select\n *\n * Usage:\n * import { BorderedPickerInput } from 'react-native-atomic-ui/picker';\n */\n\nexport interface PickerOption {\n label: string;\n value: string | number;\n}\n\nexport interface PickerInputProps {\n value: string | number | undefined;\n onValueChange: (value: string | number) => void;\n items: PickerOption[];\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function BorderedPickerInput() {\n throw new Error(\n 'BorderedPickerInput requires peer dependency: react-native-picker-select\\n' +\n 'Install it with: npm install react-native-picker-select'\n );\n}\n\nexport function PickerModal() {\n throw new Error(\n 'PickerModal requires peer dependency: react-native-picker-select\\n' +\n 'Install it with: npm install react-native-picker-select'\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BO,SAAS,sBAAsB;AACpC,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;AAEO,SAAS,cAAc;AAC5B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/picker/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Picker Components - Advanced dropdowns and selection\n * Requires peer dependency: react-native-picker-select\n *\n * Installation:\n * npm install react-native-picker-select\n *\n * Usage:\n * import { BorderedPickerInput } from 'react-native-atomic-ui/picker';\n */\n\nexport interface PickerOption {\n label: string;\n value: string | number;\n}\n\nexport interface PickerInputProps {\n value: string | number | undefined;\n onValueChange: (value: string | number) => void;\n items: PickerOption[];\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function BorderedPickerInput() {\n throw new Error(\n 'BorderedPickerInput requires peer dependency: react-native-picker-select\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * Picker Components - Advanced dropdowns and selection\n * Requires peer dependency: react-native-picker-select\n *\n * Installation:\n * npm install react-native-picker-select\n *\n * Usage:\n * import { BorderedPickerInput } from 'react-native-atomic-ui/picker';\n */\n\nexport interface PickerOption {\n label: string;\n value: string | number;\n}\n\nexport interface PickerInputProps {\n value: string | number | undefined;\n onValueChange: (value: string | number) => void;\n items: PickerOption[];\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function BorderedPickerInput() {\n throw new Error(\n 'BorderedPickerInput requires peer dependency: react-native-picker-select\\n' +\n 'Install it with: npm install react-native-picker-select'\n );\n}\n\nexport function PickerModal() {\n throw new Error(\n 'PickerModal requires peer dependency: react-native-picker-select\\n' +\n 'Install it with: npm install react-native-picker-select'\n );\n}\n"],
|
|
5
5
|
"mappings": ";AA6BO,SAAS,sBAAsB;AACpC,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;AAEO,SAAS,cAAc;AAC5B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/rich-text/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Rich Text Components - Advanced text display and editing\n * Requires peer dependencies:\n * - react-native-webview (for RichText display)\n * - @10play/tentap-editor (for RichTextInput, custom fork)\n *\n * Installation:\n * npm install react-native-webview\n * npm install github:starburst997/10tap-editor#jd\n *\n * Usage:\n * import { RichText, RichTextInput } from 'react-native-atomic-ui/rich-text';\n */\n\nexport interface RichTextProps {\n html: string;\n onLinkPress?: (url: string) => void;\n style?: any;\n testID?: string;\n}\n\nexport interface RichTextInputProps {\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function RichText() {\n throw new Error(\n 'RichText requires peer dependency: react-native-webview\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * Rich Text Components - Advanced text display and editing\n * Requires peer dependencies:\n * - react-native-webview (for RichText display)\n * - @10play/tentap-editor (for RichTextInput, custom fork)\n *\n * Installation:\n * npm install react-native-webview\n * npm install github:starburst997/10tap-editor#jd\n *\n * Usage:\n * import { RichText, RichTextInput } from 'react-native-atomic-ui/rich-text';\n */\n\nexport interface RichTextProps {\n html: string;\n onLinkPress?: (url: string) => void;\n style?: any;\n testID?: string;\n}\n\nexport interface RichTextInputProps {\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function RichText() {\n throw new Error(\n 'RichText requires peer dependency: react-native-webview\\n' +\n 'Install it with: npm install react-native-webview'\n );\n}\n\nexport function RichTextInput() {\n throw new Error(\n 'RichTextInput requires peer dependency: @10play/tentap-editor\\n' +\n 'Install it with: npm install github:starburst997/10tap-editor#jd'\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BO,SAAS,WAAW;AACzB,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;AAEO,SAAS,gBAAgB;AAC9B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/advanced/rich-text/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Rich Text Components - Advanced text display and editing\n * Requires peer dependencies:\n * - react-native-webview (for RichText display)\n * - @10play/tentap-editor (for RichTextInput, custom fork)\n *\n * Installation:\n * npm install react-native-webview\n * npm install github:starburst997/10tap-editor#jd\n *\n * Usage:\n * import { RichText, RichTextInput } from 'react-native-atomic-ui/rich-text';\n */\n\nexport interface RichTextProps {\n html: string;\n onLinkPress?: (url: string) => void;\n style?: any;\n testID?: string;\n}\n\nexport interface RichTextInputProps {\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function RichText() {\n throw new Error(\n 'RichText requires peer dependency: react-native-webview\\n' +\n
|
|
4
|
+
"sourcesContent": ["/**\n * Rich Text Components - Advanced text display and editing\n * Requires peer dependencies:\n * - react-native-webview (for RichText display)\n * - @10play/tentap-editor (for RichTextInput, custom fork)\n *\n * Installation:\n * npm install react-native-webview\n * npm install github:starburst997/10tap-editor#jd\n *\n * Usage:\n * import { RichText, RichTextInput } from 'react-native-atomic-ui/rich-text';\n */\n\nexport interface RichTextProps {\n html: string;\n onLinkPress?: (url: string) => void;\n style?: any;\n testID?: string;\n}\n\nexport interface RichTextInputProps {\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n style?: any;\n testID?: string;\n}\n\n// Component implementations would go here\n// These are placeholders for library structure\nexport function RichText() {\n throw new Error(\n 'RichText requires peer dependency: react-native-webview\\n' +\n 'Install it with: npm install react-native-webview'\n );\n}\n\nexport function RichTextInput() {\n throw new Error(\n 'RichTextInput requires peer dependency: @10play/tentap-editor\\n' +\n 'Install it with: npm install github:starburst997/10tap-editor#jd'\n );\n}\n"],
|
|
5
5
|
"mappings": ";AA+BO,SAAS,WAAW;AACzB,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;AAEO,SAAS,gBAAgB;AAC9B,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -132,10 +132,7 @@ var darkTheme = {
|
|
|
132
132
|
|
|
133
133
|
// src/theme/index.tsx
|
|
134
134
|
var ThemeContext = createContext(null);
|
|
135
|
-
function ThemeProvider({
|
|
136
|
-
children,
|
|
137
|
-
defaultTheme = "system"
|
|
138
|
-
}) {
|
|
135
|
+
function ThemeProvider({ children, defaultTheme = "system" }) {
|
|
139
136
|
const systemColorScheme = useColorScheme();
|
|
140
137
|
const isSystemDark = systemColorScheme === "dark";
|
|
141
138
|
const [isDark, setIsDark] = useState(() => {
|
|
@@ -174,4 +171,4 @@ export {
|
|
|
174
171
|
ThemeProvider,
|
|
175
172
|
useTheme
|
|
176
173
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
174
|
+
//# sourceMappingURL=chunk-56IADPYY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/theme/index.tsx", "../src/theme/themes.ts"],
|
|
4
|
+
"sourcesContent": ["import React, { createContext, useState, useContext, useEffect } from 'react';\nimport { useColorScheme } from 'react-native';\nimport type { ThemeContextValue } from '../types/index';\nimport { lightTheme, darkTheme } from './themes';\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: 'light' | 'dark' | 'system';\n}\n\n/**\n * Context-based Theme Provider\n * Provides theme context without requiring Redux\n */\nexport function ThemeProvider({ children, defaultTheme = 'system' }: ThemeProviderProps) {\n const systemColorScheme = useColorScheme();\n const isSystemDark = systemColorScheme === 'dark';\n\n const [isDark, setIsDark] = useState<boolean>(() => {\n if (defaultTheme === 'system') {\n return isSystemDark;\n }\n return defaultTheme === 'dark';\n });\n\n // Update when system preference changes\n useEffect(() => {\n if (defaultTheme === 'system') {\n setIsDark(isSystemDark);\n }\n }, [isSystemDark, defaultTheme]);\n\n const theme = isDark ? darkTheme : lightTheme;\n\n const toggleTheme = () => {\n setIsDark((prev) => !prev);\n };\n\n const value: ThemeContextValue = {\n isDark,\n theme,\n toggleTheme,\n };\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\n/**\n * Hook to access theme context in components\n * Must be used within ThemeProvider\n */\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n\nexport { lightTheme, darkTheme } from './themes';\nexport type { Theme, ThemeContextValue } from '../types/index';\n", "import type { Theme } from '../types/index';\n\nconst baseTheme = {\n spacing: {\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 32,\n xxl: 48,\n },\n borderRadius: {\n xs: 2,\n sm: 4,\n md: 8,\n lg: 12,\n full: 9999,\n },\n};\n\nexport const lightTheme: Theme = {\n colors: {\n primary: '#007AFF',\n secondary: '#5AC8FA',\n background: '#FFFFFF',\n surface: '#F5F5F5',\n text: '#000000',\n textSecondary: '#666666',\n textTertiary: '#999999',\n border: '#CCCCCC',\n borderLight: '#E8E8E8',\n error: '#FF3B30',\n success: '#34C759',\n warning: '#FF9500',\n info: '#5AC8FA',\n transparent: 'transparent',\n white: '#FFFFFF',\n black: '#000000',\n disabled: '#D0D0D0',\n },\n typography: {\n h1: { fontSize: 48, fontWeight: '700', lineHeight: 56 },\n h2: { fontSize: 40, fontWeight: '700', lineHeight: 48 },\n h3: { fontSize: 34, fontWeight: '700', lineHeight: 41 },\n h4: { fontSize: 28, fontWeight: '700', lineHeight: 34 },\n h5: { fontSize: 22, fontWeight: '600', lineHeight: 28 },\n h6: { fontSize: 18, fontWeight: '600', lineHeight: 24 },\n body1: { fontSize: 16, fontWeight: '400', lineHeight: 24 },\n body2: { fontSize: 15, fontWeight: '400', lineHeight: 22 },\n body3: { fontSize: 14, fontWeight: '400', lineHeight: 20 },\n body4: { fontSize: 13, fontWeight: '400', lineHeight: 18 },\n body5: { fontSize: 12, fontWeight: '400', lineHeight: 16 },\n body6: { fontSize: 11, fontWeight: '400', lineHeight: 15 },\n subtitle1: { fontSize: 14, fontWeight: '600', lineHeight: 20 },\n subtitle2: { fontSize: 12, fontWeight: '600', lineHeight: 16 },\n caption: { fontSize: 12, fontWeight: '400', lineHeight: 16 },\n overline: { fontSize: 10, fontWeight: '600', lineHeight: 14 },\n },\n ...baseTheme,\n shadows: {\n light: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 1 },\n shadowOpacity: 0.1,\n shadowRadius: 2,\n elevation: 2,\n },\n medium: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.15,\n shadowRadius: 8,\n elevation: 4,\n },\n heavy: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 8 },\n shadowOpacity: 0.2,\n shadowRadius: 16,\n elevation: 8,\n },\n },\n};\n\nexport const darkTheme: Theme = {\n colors: {\n primary: '#0A84FF',\n secondary: '#30B0C5',\n background: '#1C1C1E',\n surface: '#2C2C2E',\n text: '#FFFFFF',\n textSecondary: '#A0A0A0',\n textTertiary: '#808080',\n border: '#454546',\n borderLight: '#3A3A3C',\n error: '#FF453A',\n success: '#30C759',\n warning: '#FF9500',\n info: '#30B0C5',\n transparent: 'transparent',\n white: '#FFFFFF',\n black: '#000000',\n disabled: '#636366',\n },\n typography: lightTheme.typography,\n ...baseTheme,\n shadows: {\n light: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 1 },\n shadowOpacity: 0.3,\n shadowRadius: 2,\n elevation: 2,\n },\n medium: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.4,\n shadowRadius: 8,\n elevation: 4,\n },\n heavy: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 8 },\n shadowOpacity: 0.5,\n shadowRadius: 16,\n elevation: 8,\n },\n },\n};\n"],
|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