@a-little-world/little-world-design-system-native 0.5.1
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/LICENSE.md +175 -0
- package/README.md +160 -0
- package/dist/components/Accordion/Accordion.d.ts +9 -0
- package/dist/components/Accordion/styles.d.ts +50 -0
- package/dist/components/Button/Button.d.ts +12 -0
- package/dist/components/Button/styles.d.ts +31 -0
- package/dist/components/Card/Card.d.ts +10 -0
- package/dist/components/Card/styles.d.ts +22 -0
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/styles.d.ts +45 -0
- package/dist/components/Dropdown/Dropdown.d.ts +9 -0
- package/dist/components/Dropdown/styles.d.ts +32 -0
- package/dist/components/Gradient/Gradient.d.ts +9 -0
- package/dist/components/Icon/Icon.d.ts +16 -0
- package/dist/components/Icon/IconGradient.d.ts +4 -0
- package/dist/components/Icon/createIconComponent.d.ts +16 -0
- package/dist/components/Icon/index.d.ts +949 -0
- package/dist/components/Illustrations/Illustration.d.ts +3 -0
- package/dist/components/Illustrations/createIllustrationComponent.d.ts +11 -0
- package/dist/components/Illustrations/index.d.ts +134 -0
- package/dist/components/InputError/InputError.d.ts +5 -0
- package/dist/components/Label/Label.d.ts +12 -0
- package/dist/components/Label/styles.d.ts +9 -0
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/styles.d.ts +12 -0
- package/dist/components/Loading/Loading.d.ts +10 -0
- package/dist/components/Loading/LoadingLogo.d.ts +8 -0
- package/dist/components/Loading/LoadingLogo.styles.d.ts +4 -0
- package/dist/components/Loading/styles.d.ts +4 -0
- package/dist/components/Popover/Popover.d.ts +12 -0
- package/dist/components/Popover/styles.d.ts +51 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar/styles.d.ts +24 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/components/RadioGroup/styles.d.ts +32 -0
- package/dist/components/Separator/Separator.d.ts +8 -0
- package/dist/components/Separator/styles.d.ts +22 -0
- package/dist/components/Tags/Tags.d.ts +11 -0
- package/dist/components/Tags/styles.d.ts +8 -0
- package/dist/components/Text/BaseText.d.ts +9 -0
- package/dist/components/Text/Text.d.ts +7 -0
- package/dist/components/TextInput/TextInput.d.ts +9 -0
- package/dist/components/TextInput/styles.d.ts +54 -0
- package/dist/components/ToolTip/ToolTip.d.ts +12 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.esm.js +2985 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3148 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +39 -0
- package/dist/theme/index.d.ts +16 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/styles.d.ts +3 -0
- package/dist/utils/createReactNativeSvg.d.ts +4 -0
- package/dist/utils/gradientParser.d.ts +13 -0
- package/dist/utils/parser.d.ts +12 -0
- package/dist/utils/replaceUrlsWithAnchors.d.ts +6 -0
- package/package.json +73 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Copyright (C) 2025 A Little World gUG
|
|
2
|
+
|
|
3
|
+
This components is part of the Little World Matching Platform, find additional components and information in our core repository: https://github.com/a-little-world/little-world-core
|
|
4
|
+
|
|
5
|
+
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation.
|
|
6
|
+
|
|
7
|
+
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
8
|
+
|
|
9
|
+
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
GNU Lesser General Public License
|
|
14
|
+
=================================
|
|
15
|
+
|
|
16
|
+
_Version 3, 29 June 2007_
|
|
17
|
+
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
18
|
+
|
|
19
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
20
|
+
of this license document, but changing it is not allowed.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
This version of the GNU Lesser General Public License incorporates
|
|
24
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
25
|
+
License, supplemented by the additional permissions listed below.
|
|
26
|
+
|
|
27
|
+
### 0. Additional Definitions
|
|
28
|
+
|
|
29
|
+
As used herein, “this License” refers to version 3 of the GNU Lesser
|
|
30
|
+
General Public License, and the “GNU GPL” refers to version 3 of the GNU
|
|
31
|
+
General Public License.
|
|
32
|
+
|
|
33
|
+
“The Library” refers to a covered work governed by this License,
|
|
34
|
+
other than an Application or a Combined Work as defined below.
|
|
35
|
+
|
|
36
|
+
An “Application” is any work that makes use of an interface provided
|
|
37
|
+
by the Library, but which is not otherwise based on the Library.
|
|
38
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
39
|
+
of using an interface provided by the Library.
|
|
40
|
+
|
|
41
|
+
A “Combined Work” is a work produced by combining or linking an
|
|
42
|
+
Application with the Library. The particular version of the Library
|
|
43
|
+
with which the Combined Work was made is also called the “Linked
|
|
44
|
+
Version”.
|
|
45
|
+
|
|
46
|
+
The “Minimal Corresponding Source” for a Combined Work means the
|
|
47
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
48
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
49
|
+
based on the Application, and not on the Linked Version.
|
|
50
|
+
|
|
51
|
+
The “Corresponding Application Code” for a Combined Work means the
|
|
52
|
+
object code and/or source code for the Application, including any data
|
|
53
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
54
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
55
|
+
|
|
56
|
+
### 1. Exception to Section 3 of the GNU GPL
|
|
57
|
+
|
|
58
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
59
|
+
without being bound by section 3 of the GNU GPL.
|
|
60
|
+
|
|
61
|
+
### 2. Conveying Modified Versions
|
|
62
|
+
|
|
63
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
64
|
+
facility refers to a function or data to be supplied by an Application
|
|
65
|
+
that uses the facility (other than as an argument passed when the
|
|
66
|
+
facility is invoked), then you may convey a copy of the modified
|
|
67
|
+
version:
|
|
68
|
+
|
|
69
|
+
* **a)** under this License, provided that you make a good faith effort to
|
|
70
|
+
ensure that, in the event an Application does not supply the
|
|
71
|
+
function or data, the facility still operates, and performs
|
|
72
|
+
whatever part of its purpose remains meaningful, or
|
|
73
|
+
|
|
74
|
+
* **b)** under the GNU GPL, with none of the additional permissions of
|
|
75
|
+
this License applicable to that copy.
|
|
76
|
+
|
|
77
|
+
### 3. Object Code Incorporating Material from Library Header Files
|
|
78
|
+
|
|
79
|
+
The object code form of an Application may incorporate material from
|
|
80
|
+
a header file that is part of the Library. You may convey such object
|
|
81
|
+
code under terms of your choice, provided that, if the incorporated
|
|
82
|
+
material is not limited to numerical parameters, data structure
|
|
83
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
84
|
+
(ten or fewer lines in length), you do both of the following:
|
|
85
|
+
|
|
86
|
+
* **a)** Give prominent notice with each copy of the object code that the
|
|
87
|
+
Library is used in it and that the Library and its use are
|
|
88
|
+
covered by this License.
|
|
89
|
+
* **b)** Accompany the object code with a copy of the GNU GPL and this license
|
|
90
|
+
document.
|
|
91
|
+
|
|
92
|
+
### 4. Combined Works
|
|
93
|
+
|
|
94
|
+
You may convey a Combined Work under terms of your choice that,
|
|
95
|
+
taken together, effectively do not restrict modification of the
|
|
96
|
+
portions of the Library contained in the Combined Work and reverse
|
|
97
|
+
engineering for debugging such modifications, if you also do each of
|
|
98
|
+
the following:
|
|
99
|
+
|
|
100
|
+
* **a)** Give prominent notice with each copy of the Combined Work that
|
|
101
|
+
the Library is used in it and that the Library and its use are
|
|
102
|
+
covered by this License.
|
|
103
|
+
|
|
104
|
+
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
105
|
+
document.
|
|
106
|
+
|
|
107
|
+
* **c)** For a Combined Work that displays copyright notices during
|
|
108
|
+
execution, include the copyright notice for the Library among
|
|
109
|
+
these notices, as well as a reference directing the user to the
|
|
110
|
+
copies of the GNU GPL and this license document.
|
|
111
|
+
|
|
112
|
+
* **d)** Do one of the following:
|
|
113
|
+
- **0)** Convey the Minimal Corresponding Source under the terms of this
|
|
114
|
+
License, and the Corresponding Application Code in a form
|
|
115
|
+
suitable for, and under terms that permit, the user to
|
|
116
|
+
recombine or relink the Application with a modified version of
|
|
117
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
118
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
119
|
+
Corresponding Source.
|
|
120
|
+
- **1)** Use a suitable shared library mechanism for linking with the
|
|
121
|
+
Library. A suitable mechanism is one that **(a)** uses at run time
|
|
122
|
+
a copy of the Library already present on the user's computer
|
|
123
|
+
system, and **(b)** will operate properly with a modified version
|
|
124
|
+
of the Library that is interface-compatible with the Linked
|
|
125
|
+
Version.
|
|
126
|
+
|
|
127
|
+
* **e)** Provide Installation Information, but only if you would otherwise
|
|
128
|
+
be required to provide such information under section 6 of the
|
|
129
|
+
GNU GPL, and only to the extent that such information is
|
|
130
|
+
necessary to install and execute a modified version of the
|
|
131
|
+
Combined Work produced by recombining or relinking the
|
|
132
|
+
Application with a modified version of the Linked Version. (If
|
|
133
|
+
you use option **4d0**, the Installation Information must accompany
|
|
134
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
135
|
+
Code. If you use option **4d1**, you must provide the Installation
|
|
136
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
137
|
+
for conveying Corresponding Source.)
|
|
138
|
+
|
|
139
|
+
### 5. Combined Libraries
|
|
140
|
+
|
|
141
|
+
You may place library facilities that are a work based on the
|
|
142
|
+
Library side by side in a single library together with other library
|
|
143
|
+
facilities that are not Applications and are not covered by this
|
|
144
|
+
License, and convey such a combined library under terms of your
|
|
145
|
+
choice, if you do both of the following:
|
|
146
|
+
|
|
147
|
+
* **a)** Accompany the combined library with a copy of the same work based
|
|
148
|
+
on the Library, uncombined with any other library facilities,
|
|
149
|
+
conveyed under the terms of this License.
|
|
150
|
+
* **b)** Give prominent notice with the combined library that part of it
|
|
151
|
+
is a work based on the Library, and explaining where to find the
|
|
152
|
+
accompanying uncombined form of the same work.
|
|
153
|
+
|
|
154
|
+
### 6. Revised Versions of the GNU Lesser General Public License
|
|
155
|
+
|
|
156
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
157
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
158
|
+
versions will be similar in spirit to the present version, but may
|
|
159
|
+
differ in detail to address new problems or concerns.
|
|
160
|
+
|
|
161
|
+
Each version is given a distinguishing version number. If the
|
|
162
|
+
Library as you received it specifies that a certain numbered version
|
|
163
|
+
of the GNU Lesser General Public License “or any later version”
|
|
164
|
+
applies to it, you have the option of following the terms and
|
|
165
|
+
conditions either of that published version or of any later version
|
|
166
|
+
published by the Free Software Foundation. If the Library as you
|
|
167
|
+
received it does not specify a version number of the GNU Lesser
|
|
168
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
169
|
+
General Public License ever published by the Free Software Foundation.
|
|
170
|
+
|
|
171
|
+
If the Library as you received it specifies that a proxy can decide
|
|
172
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
173
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
174
|
+
permanent authorization for you to choose that version for the
|
|
175
|
+
Library.
|
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# @a-little-world/little-world-design-system-native
|
|
2
|
+
|
|
3
|
+
React Native components for the Little World Design System.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @a-little-world/little-world-design-system-native
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button, Text } from '@a-little-world/little-world-design-system-native';
|
|
15
|
+
|
|
16
|
+
export default function App() {
|
|
17
|
+
return (
|
|
18
|
+
<Button variant="primary">
|
|
19
|
+
<Text>Hello World</Text>
|
|
20
|
+
</Button>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Local Development & Testing
|
|
26
|
+
|
|
27
|
+
The native package includes a test app for local development and testing of components.
|
|
28
|
+
|
|
29
|
+
### ⚠️ Important: Build from Root
|
|
30
|
+
|
|
31
|
+
**Always build and publish from the root of the monorepo, never from individual package directories.**
|
|
32
|
+
|
|
33
|
+
✅ **Correct (from root):**
|
|
34
|
+
```bash
|
|
35
|
+
pnpm build:native
|
|
36
|
+
pnpm --filter=@a-little-world/little-world-design-system-native publish
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
❌ **Incorrect (from package directory):**
|
|
40
|
+
```bash
|
|
41
|
+
cd packages/native
|
|
42
|
+
npm run build
|
|
43
|
+
npm publish # This will break workspace dependencies!
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Prerequisites
|
|
47
|
+
|
|
48
|
+
- [Expo CLI](https://docs.expo.dev/get-started/installation/) installed globally
|
|
49
|
+
- [Expo Go](https://expo.dev/client) app installed on your mobile device
|
|
50
|
+
- iOS Simulator (for iOS testing) or Android Emulator (for Android testing)
|
|
51
|
+
|
|
52
|
+
### Quick Start
|
|
53
|
+
|
|
54
|
+
From the root of the monorepo:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Build and setup test app (builds core + native, creates tarballs, installs in testApp)
|
|
58
|
+
pnpm native:setup
|
|
59
|
+
|
|
60
|
+
# Start Expo development server
|
|
61
|
+
pnpm native:start
|
|
62
|
+
|
|
63
|
+
# Or run Storybook for native components
|
|
64
|
+
pnpm storybook:native
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### What the setup script does:
|
|
68
|
+
|
|
69
|
+
1. **Builds core package** - Compiles design tokens and utilities
|
|
70
|
+
2. **Builds native package** - Compiles React Native components
|
|
71
|
+
3. **Creates tarballs** - Packages both libraries for local installation
|
|
72
|
+
4. **Installs in testApp** - Installs the local packages in the Expo test app
|
|
73
|
+
|
|
74
|
+
### Development Workflow
|
|
75
|
+
|
|
76
|
+
1. **Make changes** to core or native packages
|
|
77
|
+
2. **Run setup** - `pnpm native:setup` (rebuilds and reinstalls)
|
|
78
|
+
3. **Start app** - `pnpm native:start` (starts Expo dev server)
|
|
79
|
+
4. **Test on device** - Scan QR code with Expo Go app
|
|
80
|
+
5. **Hot reload** - Changes will automatically reload in the app
|
|
81
|
+
|
|
82
|
+
### Manual Setup (Alternative)
|
|
83
|
+
|
|
84
|
+
If you prefer to work directly in the testApp directory:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
cd packages/native/testApp
|
|
88
|
+
npm install
|
|
89
|
+
npm start # Start Expo app
|
|
90
|
+
npm run storybook # Start Storybook
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Troubleshooting
|
|
94
|
+
|
|
95
|
+
- **Clear cache**: Use `npx expo start -c` to clear Expo cache
|
|
96
|
+
- **Reset testApp**: Delete `packages/native/testApp/node_modules` and run setup again
|
|
97
|
+
- **Version conflicts**: The setup script uses wildcards to automatically find the latest tarball versions
|
|
98
|
+
|
|
99
|
+
## Storybook
|
|
100
|
+
|
|
101
|
+
The native package includes Storybook for component development and testing:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# From root
|
|
105
|
+
pnpm storybook:native
|
|
106
|
+
|
|
107
|
+
# Or from testApp directory
|
|
108
|
+
cd packages/native/testApp
|
|
109
|
+
npm run storybook
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Building
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Build the native package
|
|
116
|
+
pnpm build:native
|
|
117
|
+
|
|
118
|
+
# Or from the native package directory
|
|
119
|
+
cd packages/native
|
|
120
|
+
npm run build
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Publishing
|
|
124
|
+
|
|
125
|
+
### Automated Releases (Recommended)
|
|
126
|
+
|
|
127
|
+
**Releases should ideally be automated and handled via merging into the main branch of the repo.**
|
|
128
|
+
|
|
129
|
+
See the [Versioning and Releases section in the root README](../../README.md#versioning-and-releases) for detailed information about the automated release process using Changesets.
|
|
130
|
+
|
|
131
|
+
The automated workflow will:
|
|
132
|
+
- Detect version changes in package.json
|
|
133
|
+
- Publish to GitHub Packages registry
|
|
134
|
+
- Create GitHub releases with changelog information
|
|
135
|
+
- Handle all publishing steps automatically
|
|
136
|
+
|
|
137
|
+
### Manual Publishing (Fallback)
|
|
138
|
+
|
|
139
|
+
If you need to publish manually (not recommended):
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Ensure you're authenticated to GitHub Packages
|
|
143
|
+
npm login --registry=https://npm.pkg.github.com
|
|
144
|
+
|
|
145
|
+
# Build the package
|
|
146
|
+
pnpm build:native
|
|
147
|
+
|
|
148
|
+
# Publish from the native package directory
|
|
149
|
+
cd packages/native
|
|
150
|
+
npm publish --access restricted
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Note**: Manual publishing bypasses the automated changelog generation and release management. Use the automated process whenever possible.
|
|
154
|
+
|
|
155
|
+
## Dependencies
|
|
156
|
+
|
|
157
|
+
This package depends on:
|
|
158
|
+
- `@a-little-world/little-world-design-system-core` - Core design tokens and utilities
|
|
159
|
+
- `react-native` - React Native framework
|
|
160
|
+
- `styled-components` - Styling library
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AccordionBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ViewStyle } from 'react-native';
|
|
4
|
+
interface AccordionProps extends AccordionBaseProps {
|
|
5
|
+
style?: ViewStyle;
|
|
6
|
+
contentStyle?: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
declare const Accordion: React.FC<AccordionProps>;
|
|
9
|
+
export default Accordion;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
2
|
+
export declare const getAccordionStyles: ({ theme }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
}) => {
|
|
5
|
+
root: {
|
|
6
|
+
borderWidth: number;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
item: {
|
|
12
|
+
borderBottomWidth: number;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
margin: number;
|
|
15
|
+
paddingVertical: number;
|
|
16
|
+
paddingHorizontal: number;
|
|
17
|
+
paddingBottom: number;
|
|
18
|
+
width: number;
|
|
19
|
+
};
|
|
20
|
+
itemLastChild: {
|
|
21
|
+
borderTopWidth: number;
|
|
22
|
+
borderBottomWidth: number;
|
|
23
|
+
};
|
|
24
|
+
header: {
|
|
25
|
+
margin: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
content: {
|
|
29
|
+
width: number;
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
borderRadius: number;
|
|
32
|
+
padding: number;
|
|
33
|
+
marginBottom: number;
|
|
34
|
+
};
|
|
35
|
+
trigger: {
|
|
36
|
+
display: "flex";
|
|
37
|
+
alignItems: "flex-start";
|
|
38
|
+
justifyContent: "space-between";
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
paddingVertical: number;
|
|
41
|
+
paddingHorizontal: number;
|
|
42
|
+
gap: number;
|
|
43
|
+
width: number;
|
|
44
|
+
textAlign: "left";
|
|
45
|
+
};
|
|
46
|
+
triggerIcon: {
|
|
47
|
+
flexShrink: number;
|
|
48
|
+
marginTop: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonAppearance, ButtonBaseProps, ButtonSizes, ButtonVariations } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
export { ButtonAppearance, ButtonSizes, ButtonVariations };
|
|
5
|
+
export interface ButtonProps extends ButtonBaseProps {
|
|
6
|
+
onPress?: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<import("react-native").View>>;
|
|
12
|
+
export default Button;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ButtonAppearance, ButtonSizes, ButtonVariations } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
export declare const getButtonStyles: ({ appearance, color, variation, size, backgroundColor, borderColor, theme, }: {
|
|
4
|
+
appearance: ButtonAppearance;
|
|
5
|
+
color?: string | undefined;
|
|
6
|
+
variation: ButtonVariations;
|
|
7
|
+
size: ButtonSizes;
|
|
8
|
+
backgroundColor?: string | undefined;
|
|
9
|
+
borderColor?: string | undefined;
|
|
10
|
+
theme: any;
|
|
11
|
+
}) => ViewStyle;
|
|
12
|
+
export declare const gradientStyles: {
|
|
13
|
+
fullSize: {
|
|
14
|
+
position: "absolute";
|
|
15
|
+
left: number;
|
|
16
|
+
right: number;
|
|
17
|
+
top: number;
|
|
18
|
+
bottom: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const getButtonTextStyles: ({ color, variation, appearance, theme, }: {
|
|
22
|
+
color?: string | undefined;
|
|
23
|
+
variation: ButtonVariations;
|
|
24
|
+
appearance: ButtonAppearance;
|
|
25
|
+
theme: any;
|
|
26
|
+
}) => TextStyle;
|
|
27
|
+
export declare const OPTION_BUTTON_CSS: import("styled-components/native/dist/types").RuleSet<{
|
|
28
|
+
$appearance?: ButtonAppearance | undefined;
|
|
29
|
+
$backgroundColor?: string | undefined;
|
|
30
|
+
$color?: string | undefined;
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardBaseProps, CardContentProps, CardFooterProps, CardHeaderProps } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
type CardProps = CardBaseProps & {
|
|
4
|
+
style?: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const CardHeader: React.FC<CardHeaderProps>;
|
|
7
|
+
export declare const CardContent: React.FC<CardContentProps>;
|
|
8
|
+
export declare const CardFooter: React.FC<CardFooterProps>;
|
|
9
|
+
declare const Card: React.FC<CardProps>;
|
|
10
|
+
export default Card;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ViewStyle, DimensionValue } from 'react-native';
|
|
2
|
+
import { CardSizes } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
import { FlexAlignType, FlexStyle } from 'react-native';
|
|
4
|
+
export declare const getCardStyles: ({ borderColor, height, theme, width, }: {
|
|
5
|
+
borderColor?: string | undefined;
|
|
6
|
+
height?: DimensionValue | undefined;
|
|
7
|
+
theme: any;
|
|
8
|
+
width?: CardSizes | undefined;
|
|
9
|
+
}) => ViewStyle;
|
|
10
|
+
export declare const getCardHeaderStyles: ({ theme }: {
|
|
11
|
+
theme: any;
|
|
12
|
+
}) => ViewStyle;
|
|
13
|
+
export declare const getCardContentStyles: ({ align, gap, marginBottom, theme, }: {
|
|
14
|
+
align?: FlexAlignType | undefined;
|
|
15
|
+
gap?: number | undefined;
|
|
16
|
+
marginBottom?: number | undefined;
|
|
17
|
+
theme: any;
|
|
18
|
+
}) => ViewStyle;
|
|
19
|
+
export declare const getCardFooterStyles: ({ align, theme, }: {
|
|
20
|
+
align?: FlexStyle['justifyContent'];
|
|
21
|
+
theme: any;
|
|
22
|
+
}) => ViewStyle;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@rn-primitives/checkbox';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
type CheckboxProps = {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
color?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
inputRef?: React.RefObject<HTMLButtonElement>;
|
|
10
|
+
label?: string;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
} & CheckboxPrimitive.RootProps;
|
|
14
|
+
declare const Checkbox: React.FC<CheckboxProps>;
|
|
15
|
+
export default Checkbox;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
2
|
+
export declare const getContainerStyles: ({ theme }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
}) => {
|
|
5
|
+
container: {
|
|
6
|
+
display: "flex";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
flexDirection: "row";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const getCheckboxStyles: ({ theme, hasError, color, checked, }: {
|
|
13
|
+
theme: DefaultTheme;
|
|
14
|
+
hasError: boolean;
|
|
15
|
+
color?: string | undefined;
|
|
16
|
+
checked: boolean;
|
|
17
|
+
}) => {
|
|
18
|
+
container: {
|
|
19
|
+
flexDirection: "row";
|
|
20
|
+
alignItems: "flex-start";
|
|
21
|
+
justifyContent: "flex-start";
|
|
22
|
+
};
|
|
23
|
+
text: {
|
|
24
|
+
paddingHorizontal: number;
|
|
25
|
+
};
|
|
26
|
+
checkbox: {
|
|
27
|
+
backgroundColor: string | undefined;
|
|
28
|
+
borderColor: string;
|
|
29
|
+
color?: string | undefined;
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
borderWidth: number;
|
|
33
|
+
flexDirection: "row";
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
justifyContent: "center";
|
|
36
|
+
display: "flex";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const indicatorStyles: {
|
|
40
|
+
indicator: {
|
|
41
|
+
display: "flex";
|
|
42
|
+
alignItems: "center";
|
|
43
|
+
justifyContent: "center";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
export type DropdownProps = DropdownBaseProps & {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
inputRef?: React.RefObject<HTMLButtonElement>;
|
|
7
|
+
};
|
|
8
|
+
declare const Dropdown: React.FC<DropdownProps>;
|
|
9
|
+
export default Dropdown;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InputHeight } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
3
|
+
export declare const DROPDOWN_MAX_WIDTH = 300;
|
|
4
|
+
export declare const getDropdownStyles: ({ theme, maxWidth, height, hasError, }: {
|
|
5
|
+
theme: DefaultTheme;
|
|
6
|
+
maxWidth: number;
|
|
7
|
+
height: InputHeight;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
wrapper: {
|
|
11
|
+
position: "relative";
|
|
12
|
+
maxWidth: number;
|
|
13
|
+
width: "100%";
|
|
14
|
+
};
|
|
15
|
+
trigger: {
|
|
16
|
+
alignItems: "center";
|
|
17
|
+
justifyContent: "space-between";
|
|
18
|
+
paddingVertical: number;
|
|
19
|
+
paddingHorizontal: number;
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
height: number;
|
|
22
|
+
gap: number;
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
borderRadius: number;
|
|
25
|
+
borderWidth: number;
|
|
26
|
+
borderColor: string;
|
|
27
|
+
width: "100%";
|
|
28
|
+
color: string;
|
|
29
|
+
marginBottom: number;
|
|
30
|
+
};
|
|
31
|
+
triggerWithError: {};
|
|
32
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Gradients, IconBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
export declare const ImageLabel: ({ children, top, }: {
|
|
4
|
+
children: string;
|
|
5
|
+
top: number;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export type IconSvgProps = Omit<IconBaseProps, 'children'> & {
|
|
8
|
+
gradient?: Gradients;
|
|
9
|
+
width?: number | string;
|
|
10
|
+
height?: number | string;
|
|
11
|
+
viewBox?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const Icon: ({ backgroundColor, borderColor, children, circular, style, label, labelVisible, labelTop, }: Omit<IconBaseProps, "className"> & {
|
|
14
|
+
style?: any;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export default Icon;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
import { IconSvgProps } from './Icon';
|
|
4
|
+
import { SvgFactoryOptions } from '@a-little-world/little-world-design-system-core';
|
|
5
|
+
export declare const createIconComponent: ({ name, svgData, gradientType, }: SvgFactoryOptions) => {
|
|
6
|
+
({ height, width, style, color, backgroundColor, gradient, borderColor, circular, label, labelVisible, }: Omit<import("@a-little-world/little-world-design-system-core").IconBaseProps, "children"> & {
|
|
7
|
+
gradient?: import("@a-little-world/little-world-design-system-core").Gradients | undefined;
|
|
8
|
+
width?: string | number | undefined;
|
|
9
|
+
height?: string | number | undefined;
|
|
10
|
+
viewBox?: string | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
style?: ViewStyle | undefined;
|
|
13
|
+
color?: string | undefined;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|